diff --git a/.github/actions/changesets-fixed-version-bump/action.yml b/.github/actions/changesets-fixed-version-bump/action.yml index 4538f7e141..008ad9c9ca 100644 --- a/.github/actions/changesets-fixed-version-bump/action.yml +++ b/.github/actions/changesets-fixed-version-bump/action.yml @@ -9,4 +9,4 @@ outputs: runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/changesets-fixed-version-bump/dist/index.js b/.github/actions/changesets-fixed-version-bump/dist/index.js new file mode 100644 index 0000000000..be76da507b --- /dev/null +++ b/.github/actions/changesets-fixed-version-bump/dist/index.js @@ -0,0 +1,42878 @@ +import { createRequire } from "node:module"; +import { readFile, writeFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import * as os$6 from "os"; +import os, { EOL } from "os"; +import * as crypto from "crypto"; +import * as fs$18 from "fs"; +import { constants, promises } from "fs"; +import * as path$65 from "path"; +import * as events from "events"; +import { info } from "node:console"; +import "child_process"; +import "timers"; +var __defProp$1 = Object.defineProperty; +var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames$1 = Object.getOwnPropertyNames; +var __hasOwnProp$1 = Object.prototype.hasOwnProperty; +var __esmMin = (fn, res, err) => () => { + if (err) throw err[0]; + try { + return fn && (res = fn(fn = 0)), res; + } catch (e) { + throw err = [e], e; + } +}; +var __commonJSMin$1 = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp$1(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +var __copyProps$1 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toCommonJS = (mod) => __hasOwnProp$1.call(mod, "module.exports") ? mod["module.exports"] : __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js +/** +* Sanitizes an input into a string so it can be passed into issueCommand safely +* @param input input to sanitize into a string +*/ +function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js +/** +* Issues a command to the GitHub Actions runner +* +* @param command - The command name to issue +* @param properties - Additional properties for the command (key-value pairs) +* @param message - The message to include with the command +* @remarks +* This function outputs a specially formatted string to stdout that the Actions +* runner interprets as a command. These commands can control workflow behavior, +* set outputs, create annotations, mask values, and more. +* +* Command Format: +* ::name key=value,key=value::message +* +* @example +* ```typescript +* // Issue a warning annotation +* issueCommand('warning', {}, 'This is a warning message'); +* // Output: ::warning::This is a warning message +* +* // Set an environment variable +* issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); +* // Output: ::set-env name=MY_VAR::some value +* +* // Add a secret mask +* issueCommand('add-mask', {}, 'secretValue123'); +* // Output: ::add-mask::secretValue123 +* ``` +* +* @internal +* This is an internal utility function that powers the public API functions +* such as setSecret, warning, error, and exportVariable. +*/ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$6.EOL); +} +const CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); + if (!fs$18.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); + fs$18.appendFileSync(filePath, `${toCommandValue(message)}${os$6.EOL}`, { encoding: "utf8" }); +} +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + return `${key}<<${delimiter}${os$6.EOL}${convertedValue}${os$6.EOL}${delimiter}`; +} +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + __require("net"); + __require("tls"); + var http$1 = __require("http"); + __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$6 = __require("util"); + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$1.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$6.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; +})); +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = require_tunnel$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + const kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"); + var MessageSizeExceededError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + get [kMessageSizeExceededError]() { + return true; + } + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/constants.js +var require_constants$8 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$8(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$29 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream$1 = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$3 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$8(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$29(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$29(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$3.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$29(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$29(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream$1.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream$1.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream$1.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream$1.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$29(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$5 = __require("node:util"); + const undiciDebugLog = util$5.debuglog("undici"); + const fetchDebuglog = util$5.debuglog("fetch"); + const websocketDebuglog = util$5.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$28 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$8(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (upgrade && !isValidHeaderValue(upgrade)) throw new InvalidArgumentError("invalid upgrade header"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$28(!this.aborted); + assert$28(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$28(!this.aborted); + assert$28(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$28(!this.aborted); + assert$28(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$28(!this.aborted); + assert$28(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$28(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (headerName === "host") { + if (request.host !== null) throw new InvalidArgumentError("duplicate host header"); + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) throw new InvalidArgumentError("duplicate content-length header"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const EventEmitter$1 = __require("node:events"); + var Dispatcher = class extends EventEmitter$1 { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + var DispatcherBase = class extends Dispatcher { + constructor(opts) { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 }; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = 499; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const net$1 = __require("node:net"); + const assert$27 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$27(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$27(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/utils.js +var require_utils$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$7 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils$4(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"); + module.exports = Buffer$2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAA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gAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIA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QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQN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AiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJ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kACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBv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cMAIQMMxgILIAFBAWohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAA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hAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDD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IQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCAC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+var require_constants$6 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet: new Set(subresource), + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$26 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$26(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$26(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$26(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$26(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { types: types$4, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$4.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$4.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$4.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$4.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform: Transform$3 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$6(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$25 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$25(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$25(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$25(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$25(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$25("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$25("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$3 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$25(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject: new EnvironmentSettingsObject() + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/file.js +var require_file$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file$2(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file$2(); + const { makeEntry } = require_formdata(); + const assert$24 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$24(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$24(isUSVString(name)); + assert$24(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$24(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$23 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$23(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$23(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$23(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$22 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$7(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$22(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$22(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$22(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$22(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$22(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$22(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$22(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 3; + const TIMEOUT_BODY = 5; + const TIMEOUT_KEEP_ALIVE = 8; + var Parser = class { + constructor(client, socket, { exports: exports$17 }) { + assert$22(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$17; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$22(this.ptr != null); + assert$22(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$22(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$22(this.ptr != null); + assert$22(currentParser == null); + assert$22(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$22(this.ptr != null); + assert$22(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$22(upgrade); + assert$22(client[kSocket] === socket); + assert$22(!socket.destroyed); + assert$22(!this.paused); + assert$22((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$22(request); + assert$22(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$22(!this.upgrade); + assert$22(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$22(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$22(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$22(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$22((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$22(request); + assert$22(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$22(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$22(statusCode >= 100); + assert$22((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$22(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$22(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$22(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$22(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$22(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$22(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$22(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$22(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$22(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$22(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$22(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$22(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$22(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$22(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$22(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$22(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$21 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$21(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$21(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$21(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$21(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$21(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$21(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$21(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$21(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$21(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$21(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$21(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$21(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$20 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$2 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$20(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$20(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$2.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$20(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$19 = __require("node:assert"); + const net = __require("node:net"); + const http = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, webSocket } = {}) { + super({ webSocket }); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$19(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$19(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$19(!client[kConnecting]); + assert$19(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$19(idx !== -1); + const ip = hostname.substring(1, idx); + assert$19(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$19(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$19(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$19(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + super(options); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + super(options); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$18 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + module.exports = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$18(this.start === start, "content-range mismatch"); + assert$18(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$18(start != null && Number.isFinite(start), "content-range mismatch"); + assert$18(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$18(Number.isFinite(this.start)); + assert$18(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$17 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$17(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$17(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return /* @__PURE__ */ new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$16 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$16(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$15 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$15(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$14 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$3 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$14(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$3(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough: PassThrough$2 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$13 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$13(!res, "pipeline cannot be retried"); + assert$13(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough$2().destroy(err); + } + } + module.exports = pipeline; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$12 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$12(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$11 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$11(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + module.exports = { MockNotMatchedError: class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + } }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { promisify: promisify$6 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$6(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { promisify: promisify$5 } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$5(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$2({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$10 = __require("node:assert"); + const util$4 = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$10(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$10(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$10(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util$4.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util$4.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util$4.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util$4.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$6(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$9 = __require("node:assert"); + const { types: types$3 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$9(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$9(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$9(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$3.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$6(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$8 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$8(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$7 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$6(); + const EE$1 = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE$1 { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$7(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$7(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$7(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$7(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$7(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$7(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$7(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$2 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$2.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$6 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$6(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$5 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$5(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$5(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$5(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$5 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$5(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$4 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$4(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { parseSetCookie } = require_parse$4(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 2 ** 16 - 1, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants$4(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { maxUnsigned16Bit } = require_constants$4(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants$4(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const { MessageSizeExceededError } = require_errors(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; + } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert$3 = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants$4(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + const { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {number} */ + #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert$3(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants$4(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants$4(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types: types$1 } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types$1.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { maxPayloadSize }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types$1.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform$1 { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); +require_tunnel(); +require_undici(); +var HttpCodes; +(function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect; +HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout; +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js +var __awaiter$6 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { access, appendFile, writeFile: writeFile$1 } = promises; +const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$6(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$6(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile$1 : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$6(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +new Summary(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js +var __awaiter$5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs$18.promises; +const IS_WINDOWS$1 = process.platform === "win32"; +fs$18.constants.O_RDONLY; +/** +* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: +* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). +*/ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (IS_WINDOWS$1) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); +} +/** +* Best effort attempt to determine whether a file exists and is executable. +* @param filePath file path to check +* @param extensions additional file extensions to try +* @return if file exists and is executable, returns the file path. otherwise empty string. +*/ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter$5(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + const upperExt = path$65.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + try { + const directory = path$65.dirname(filePath); + const upperName = path$65.basename(filePath).toUpperCase(); + for (const actualName of yield readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path$65.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); +} +function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$1) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js +var __awaiter$4 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/** +* Returns path of a tool had the tool actually been invoked. Resolves via paths. +* If you check and the tool does not exist, it will throw. +* +* @param tool name of the tool +* @param check whether to check if tool exists +* @returns Promise path to tool +*/ +function which(tool, check) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (IS_WINDOWS$1) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); +} +/** +* Returns a list of all occurrences of the given tool on the system path. +* +* @returns Promise the paths of the tool +*/ +function findInPath(tool) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (IS_WINDOWS$1 && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path$65.delimiter)) if (extension) extensions.push(extension); + } + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path$65.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path$65.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath(path$65.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); +} +process.platform; +events.EventEmitter; +events.EventEmitter; +os.platform(); +os.arch(); +/** +* The code to exit an action +*/ +var ExitCode; +(function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +/** +* Gets the value of an input. +* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. +* Returns an empty string if the value is not defined. +* +* @param name name of the input to get +* @param options optional. See InputOptions. +* @returns string +*/ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); + if (options && options.trimWhitespace === false) return val; + return val.trim(); +} +/** +* Sets the value of an output. +* +* @param name name of the output to set +* @param value value to store. Non-string values will be converted to a string via JSON.stringify +*/ +function setOutput(name, value) { + if (process.env["GITHUB_OUTPUT"] || "") return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); + process.stdout.write(os$6.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); +} +/** +* Writes info to log with console.log. +* @param message info message +*/ +function info$2(message) { + process.stdout.write(message + os$6.EOL); +} +//#endregion +//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +var require_windows = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = isexe; + isexe.sync = sync; + var fs$17 = __require("fs"); + function checkPathExt(path, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) return true; + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) return true; + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path.substr(-p.length).toLowerCase() === p) return true; + } + return false; + } + function checkStat(stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) return false; + return checkPathExt(path, options); + } + function isexe(path, options, cb) { + fs$17.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, path, options)); + }); + } + function sync(path, options) { + return checkStat(fs$17.statSync(path), path, options); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +var require_mode = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = isexe; + isexe.sync = sync; + var fs$16 = __require("fs"); + function isexe(path, options, cb) { + fs$16.stat(path, function(er, stat) { + cb(er, er ? false : checkStat(stat, options)); + }); + } + function sync(path, options) { + return checkStat(fs$16.statSync(path), options); + } + function checkStat(stat, options) { + return stat.isFile() && checkMode(stat, options); + } + function checkMode(stat, options) { + var mod = stat.mode; + var uid = stat.uid; + var gid = stat.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + return mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +var require_isexe = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + __require("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows(); + else core = require_mode(); + module.exports = isexe; + isexe.sync = sync; + function isexe(path, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") throw new TypeError("callback not provided"); + return new Promise(function(resolve, reject) { + isexe(path, options || {}, function(er, is) { + if (er) reject(er); + else resolve(is); + }); + }); + } + core(path, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path, options) { + try { + return core.sync(path, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") return false; + else throw er; + } + } +})); +//#endregion +//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +var require_which = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + const path$64 = __require("path"); + const COLON = isWindows ? ";" : ":"; + const isexe = require_isexe(); + const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" }); + const getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + const which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path$64.join(pathPart, cmd); + resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) if (opt.all) found.push(p + ext); + else return resolve(p + ext); + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + const whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path$64.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur); + else return cur; + } catch (ex) {} + } + } + if (opt.all && found.length) return found; + if (opt.nothrow) return null; + throw getNotFoundError(cmd); + }; + module.exports = which; + which.sync = whichSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +var require_path_key = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pathKey = (options = {}) => { + const environment = options.env || process.env; + if ((options.platform || process.platform) !== "win32") return "PATH"; + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module.exports = pathKey; + module.exports.default = pathKey; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +var require_resolveCommand = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$63 = __require("path"); + const which = require_which(); + const getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) try { + process.chdir(parsed.options.cwd); + } catch (err) {} + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path$63.delimiter : void 0 + }); + } catch (e) {} finally { + if (shouldSwitchCwd) process.chdir(cwd); + } + if (resolved) resolved = path$63.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module.exports = resolveCommand; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +var require_escape = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\""); + arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + module.exports.command = escapeCommand; + module.exports.argument = escapeArgument; +})); +//#endregion +//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +var require_shebang_regex = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = /^#!(.*)/; +})); +//#endregion +//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +var require_shebang_command = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const shebangRegex = require_shebang_regex(); + module.exports = (string = "") => { + const match = string.match(shebangRegex); + if (!match) return null; + const [path, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path.split("/").pop(); + if (binary === "env") return argument; + return argument ? `${binary} ${argument}` : binary; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +var require_readShebang = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs$15 = __require("fs"); + const shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs$15.openSync(command, "r"); + fs$15.readSync(fd, buffer, 0, size, 0); + fs$15.closeSync(fd); + } catch (e) {} + return shebangCommand(buffer.toString()); + } + module.exports = readShebang; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +var require_parse$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$62 = __require("path"); + const resolveCommand = require_resolveCommand(); + const escape = require_escape(); + const readShebang = require_readShebang(); + const isWin = process.platform === "win32"; + const isExecutableRegExp = /\.(?:com|exe)$/i; + const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) return parsed; + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path$62.normalize(parsed.command); + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + parsed.args = [ + "/d", + "/s", + "/c", + `"${[parsed.command].concat(parsed.args).join(" ")}"` + ]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse(command, args, options) { + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + args = args ? args.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args, + options, + file: void 0, + original: { + command, + args + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +var require_enoent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) return; + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed); + if (err) return originalEmit.call(cp, "error", err); + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn"); + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync"); + return null; + } + module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +var require_cross_spawn = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const cp = __require("child_process"); + const parse = require_parse$3(); + const enoent = require_enoent(); + function spawn(command, args, options) { + const parsed = parse(command, args, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args, options) { + const parsed = parse(command, args, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module.exports = spawn; + module.exports.spawn = spawn; + module.exports.sync = spawnSync; + module.exports._parse = parse; + module.exports._enoent = enoent; +})); +//#endregion +//#region ../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +var require_strip_final_newline = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = (input) => { + const LF = typeof input === "string" ? "\n" : "\n".charCodeAt(); + const CR = typeof input === "string" ? "\r" : "\r".charCodeAt(); + if (input[input.length - 1] === LF) input = input.slice(0, input.length - 1); + if (input[input.length - 1] === CR) input = input.slice(0, input.length - 1); + return input; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +var require_npm_run_path = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$61 = __require("path"); + const pathKey = require_path_key(); + const npmRunPath = (options) => { + options = { + cwd: process.cwd(), + path: process.env[pathKey()], + execPath: process.execPath, + ...options + }; + let previous; + let cwdPath = path$61.resolve(options.cwd); + const result = []; + while (previous !== cwdPath) { + result.push(path$61.join(cwdPath, "node_modules/.bin")); + previous = cwdPath; + cwdPath = path$61.resolve(cwdPath, ".."); + } + const execPathDir = path$61.resolve(options.cwd, options.execPath, ".."); + result.push(execPathDir); + return result.concat(options.path).join(path$61.delimiter); + }; + module.exports = npmRunPath; + module.exports.default = npmRunPath; + module.exports.env = (options) => { + options = { + env: process.env, + ...options + }; + const env = { ...options.env }; + const path = pathKey({ env }); + options.path = env[path]; + env[path] = module.exports(options); + return env; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +var require_mimic_fn = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const mimicFn = (to, from) => { + for (const prop of Reflect.ownKeys(from)) Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + return to; + }; + module.exports = mimicFn; + module.exports.default = mimicFn; +})); +//#endregion +//#region ../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +var require_onetime = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const mimicFn = require_mimic_fn(); + const calledFunctions = /* @__PURE__ */ new WeakMap(); + const onetime = (function_, options = {}) => { + if (typeof function_ !== "function") throw new TypeError("Expected a function"); + let returnValue; + let callCount = 0; + const functionName = function_.displayName || function_.name || ""; + const onetime = function(...arguments_) { + calledFunctions.set(onetime, ++callCount); + if (callCount === 1) { + returnValue = function_.apply(this, arguments_); + function_ = null; + } else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`); + return returnValue; + }; + mimicFn(onetime, function_); + calledFunctions.set(onetime, callCount); + return onetime; + }; + module.exports = onetime; + module.exports.default = onetime; + module.exports.callCount = (function_) => { + if (!calledFunctions.has(function_)) throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); + return calledFunctions.get(function_); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +var require_core$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SIGNALS = void 0; + exports.SIGNALS = [ + { + name: "SIGHUP", + number: 1, + action: "terminate", + description: "Terminal closed", + standard: "posix" + }, + { + name: "SIGINT", + number: 2, + action: "terminate", + description: "User interruption with CTRL-C", + standard: "ansi" + }, + { + name: "SIGQUIT", + number: 3, + action: "core", + description: "User interruption with CTRL-\\", + standard: "posix" + }, + { + name: "SIGILL", + number: 4, + action: "core", + description: "Invalid machine instruction", + standard: "ansi" + }, + { + name: "SIGTRAP", + number: 5, + action: "core", + description: "Debugger breakpoint", + standard: "posix" + }, + { + name: "SIGABRT", + number: 6, + action: "core", + description: "Aborted", + standard: "ansi" + }, + { + name: "SIGIOT", + number: 6, + action: "core", + description: "Aborted", + standard: "bsd" + }, + { + name: "SIGBUS", + number: 7, + action: "core", + description: "Bus error due to misaligned, non-existing address or paging error", + standard: "bsd" + }, + { + name: "SIGEMT", + number: 7, + action: "terminate", + description: "Command should be emulated but is not implemented", + standard: "other" + }, + { + name: "SIGFPE", + number: 8, + action: "core", + description: "Floating point arithmetic error", + standard: "ansi" + }, + { + name: "SIGKILL", + number: 9, + action: "terminate", + description: "Forced termination", + standard: "posix", + forced: true + }, + { + name: "SIGUSR1", + number: 10, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGSEGV", + number: 11, + action: "core", + description: "Segmentation fault", + standard: "ansi" + }, + { + name: "SIGUSR2", + number: 12, + action: "terminate", + description: "Application-specific signal", + standard: "posix" + }, + { + name: "SIGPIPE", + number: 13, + action: "terminate", + description: "Broken pipe or socket", + standard: "posix" + }, + { + name: "SIGALRM", + number: 14, + action: "terminate", + description: "Timeout or timer", + standard: "posix" + }, + { + name: "SIGTERM", + number: 15, + action: "terminate", + description: "Termination", + standard: "ansi" + }, + { + name: "SIGSTKFLT", + number: 16, + action: "terminate", + description: "Stack is empty or overflowed", + standard: "other" + }, + { + name: "SIGCHLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "posix" + }, + { + name: "SIGCLD", + number: 17, + action: "ignore", + description: "Child process terminated, paused or unpaused", + standard: "other" + }, + { + name: "SIGCONT", + number: 18, + action: "unpause", + description: "Unpaused", + standard: "posix", + forced: true + }, + { + name: "SIGSTOP", + number: 19, + action: "pause", + description: "Paused", + standard: "posix", + forced: true + }, + { + name: "SIGTSTP", + number: 20, + action: "pause", + description: "Paused using CTRL-Z or \"suspend\"", + standard: "posix" + }, + { + name: "SIGTTIN", + number: 21, + action: "pause", + description: "Background process cannot read terminal input", + standard: "posix" + }, + { + name: "SIGBREAK", + number: 21, + action: "terminate", + description: "User interruption with CTRL-BREAK", + standard: "other" + }, + { + name: "SIGTTOU", + number: 22, + action: "pause", + description: "Background process cannot write to terminal output", + standard: "posix" + }, + { + name: "SIGURG", + number: 23, + action: "ignore", + description: "Socket received out-of-band data", + standard: "bsd" + }, + { + name: "SIGXCPU", + number: 24, + action: "core", + description: "Process timed out", + standard: "bsd" + }, + { + name: "SIGXFSZ", + number: 25, + action: "core", + description: "File too big", + standard: "bsd" + }, + { + name: "SIGVTALRM", + number: 26, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGPROF", + number: 27, + action: "terminate", + description: "Timeout or timer", + standard: "bsd" + }, + { + name: "SIGWINCH", + number: 28, + action: "ignore", + description: "Terminal window size changed", + standard: "bsd" + }, + { + name: "SIGIO", + number: 29, + action: "terminate", + description: "I/O is available", + standard: "other" + }, + { + name: "SIGPOLL", + number: 29, + action: "terminate", + description: "Watched event", + standard: "other" + }, + { + name: "SIGINFO", + number: 29, + action: "ignore", + description: "Request for process information", + standard: "other" + }, + { + name: "SIGPWR", + number: 30, + action: "terminate", + description: "Device running out of power", + standard: "systemv" + }, + { + name: "SIGSYS", + number: 31, + action: "core", + description: "Invalid system call", + standard: "other" + }, + { + name: "SIGUNUSED", + number: 31, + action: "terminate", + description: "Invalid system call", + standard: "other" + } + ]; +})); +//#endregion +//#region ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +var require_realtime = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SIGRTMAX = exports.getRealtimeSignals = void 0; + const getRealtimeSignals = function() { + const length = SIGRTMAX - SIGRTMIN + 1; + return Array.from({ length }, getRealtimeSignal); + }; + exports.getRealtimeSignals = getRealtimeSignals; + const getRealtimeSignal = function(value, index) { + return { + name: `SIGRT${index + 1}`, + number: SIGRTMIN + index, + action: "terminate", + description: "Application-specific signal (realtime)", + standard: "posix" + }; + }; + const SIGRTMIN = 34; + const SIGRTMAX = 64; + exports.SIGRTMAX = SIGRTMAX; +})); +//#endregion +//#region ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +var require_signals$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getSignals = void 0; + var _os$1 = __require("os"); + var _core = require_core$2(); + var _realtime = require_realtime(); + const getSignals = function() { + const realtimeSignals = (0, _realtime.getRealtimeSignals)(); + return [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal); + }; + exports.getSignals = getSignals; + const normalizeSignal = function({ name, number: defaultNumber, description, action, forced = false, standard }) { + const { signals: { [name]: constantSignal } } = _os$1.constants; + const supported = constantSignal !== void 0; + return { + name, + number: supported ? constantSignal : defaultNumber, + description, + supported, + action, + forced, + standard + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +var require_main = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.signalsByNumber = exports.signalsByName = void 0; + var _os = __require("os"); + var _signals = require_signals$1(); + var _realtime = require_realtime(); + const getSignalsByName = function() { + return (0, _signals.getSignals)().reduce(getSignalByName, {}); + }; + const getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) { + return { + ...signalByNameMemo, + [name]: { + name, + number, + description, + supported, + action, + forced, + standard + } + }; + }; + exports.signalsByName = getSignalsByName(); + const getSignalsByNumber = function() { + const signals = (0, _signals.getSignals)(); + const length = _realtime.SIGRTMAX + 1; + const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals)); + return Object.assign({}, ...signalsA); + }; + const getSignalByNumber = function(number, signals) { + const signal = findSignalByNumber(number, signals); + if (signal === void 0) return {}; + const { name, description, supported, action, forced, standard } = signal; + return { [number]: { + name, + number, + description, + supported, + action, + forced, + standard + } }; + }; + const findSignalByNumber = function(number, signals) { + const signal = signals.find(({ name }) => _os.constants.signals[name] === number); + if (signal !== void 0) return signal; + return signals.find((signalA) => signalA.number === number); + }; + exports.signalsByNumber = getSignalsByNumber(); +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +var require_error$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { signalsByName } = require_main(); + const getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => { + if (timedOut) return `timed out after ${timeout} milliseconds`; + if (isCanceled) return "was canceled"; + if (errorCode !== void 0) return `failed with ${errorCode}`; + if (signal !== void 0) return `was killed with ${signal} (${signalDescription})`; + if (exitCode !== void 0) return `failed with exit code ${exitCode}`; + return "failed"; + }; + const makeError = ({ stdout, stderr, all, error, signal, exitCode, command, escapedCommand, timedOut, isCanceled, killed, parsed: { options: { timeout } } }) => { + exitCode = exitCode === null ? void 0 : exitCode; + signal = signal === null ? void 0 : signal; + const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description; + const execaMessage = `Command ${getErrorPrefix({ + timedOut, + timeout, + errorCode: error && error.code, + signal, + signalDescription, + exitCode, + isCanceled + })}: ${command}`; + const isError = Object.prototype.toString.call(error) === "[object Error]"; + const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage; + const message = [ + shortMessage, + stderr, + stdout + ].filter(Boolean).join("\n"); + if (isError) { + error.originalMessage = error.message; + error.message = message; + } else error = new Error(message); + error.shortMessage = shortMessage; + error.command = command; + error.escapedCommand = escapedCommand; + error.exitCode = exitCode; + error.signal = signal; + error.signalDescription = signalDescription; + error.stdout = stdout; + error.stderr = stderr; + if (all !== void 0) error.all = all; + if ("bufferedData" in error) delete error.bufferedData; + error.failed = true; + error.timedOut = Boolean(timedOut); + error.isCanceled = isCanceled; + error.killed = killed && !timedOut; + return error; + }; + module.exports = makeError; +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +var require_stdio = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const aliases = [ + "stdin", + "stdout", + "stderr" + ]; + const hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0); + const normalizeStdio = (options) => { + if (!options) return; + const { stdio } = options; + if (stdio === void 0) return aliases.map((alias) => options[alias]); + if (hasAlias(options)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`); + if (typeof stdio === "string") return stdio; + if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + const length = Math.max(stdio.length, aliases.length); + return Array.from({ length }, (value, index) => stdio[index]); + }; + module.exports = normalizeStdio; + module.exports.node = (options) => { + const stdio = normalizeStdio(options); + if (stdio === "ipc") return "ipc"; + if (stdio === void 0 || typeof stdio === "string") return [ + stdio, + stdio, + stdio, + "ipc" + ]; + if (stdio.includes("ipc")) return stdio; + return [...stdio, "ipc"]; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +var require_signals = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = [ + "SIGABRT", + "SIGALRM", + "SIGHUP", + "SIGINT", + "SIGTERM" + ]; + if (process.platform !== "win32") module.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); + if (process.platform === "linux") module.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED"); +})); +//#endregion +//#region ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +var require_signal_exit = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var process = global.process; + const processOk = function(process) { + return process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function"; + }; + /* istanbul ignore if */ + if (!processOk(process)) module.exports = function() { + return function() {}; + }; + else { + var assert$2 = __require("assert"); + var signals$1 = require_signals(); + var isWin = /^win/i.test(process.platform); + var EE = __require("events"); + /* istanbul ignore if */ + if (typeof EE !== "function") EE = EE.EventEmitter; + var emitter; + if (process.__signal_exit_emitter__) emitter = process.__signal_exit_emitter__; + else { + emitter = process.__signal_exit_emitter__ = new EE(); + emitter.count = 0; + emitter.emitted = {}; + } + if (!emitter.infinite) { + emitter.setMaxListeners(Infinity); + emitter.infinite = true; + } + module.exports = function(cb, opts) { + /* istanbul ignore if */ + if (!processOk(global.process)) return function() {}; + assert$2.equal(typeof cb, "function", "a callback must be provided for exit handler"); + if (loaded === false) load$2(); + var ev = "exit"; + if (opts && opts.alwaysLast) ev = "afterexit"; + var remove = function() { + emitter.removeListener(ev, cb); + if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) unload$1(); + }; + emitter.on(ev, cb); + return remove; + }; + var unload$1 = function unload() { + if (!loaded || !processOk(global.process)) return; + loaded = false; + signals$1.forEach(function(sig) { + try { + process.removeListener(sig, sigListeners[sig]); + } catch (er) {} + }); + process.emit = originalProcessEmit; + process.reallyExit = originalProcessReallyExit; + emitter.count -= 1; + }; + module.exports.unload = unload$1; + var emit = function emit(event, code, signal) { + /* istanbul ignore if */ + if (emitter.emitted[event]) return; + emitter.emitted[event] = true; + emitter.emit(event, code, signal); + }; + var sigListeners = {}; + signals$1.forEach(function(sig) { + sigListeners[sig] = function listener() { + /* istanbul ignore if */ + if (!processOk(global.process)) return; + if (process.listeners(sig).length === emitter.count) { + unload$1(); + emit("exit", null, sig); + /* istanbul ignore next */ + emit("afterexit", null, sig); + /* istanbul ignore next */ + if (isWin && sig === "SIGHUP") sig = "SIGINT"; + /* istanbul ignore next */ + process.kill(process.pid, sig); + } + }; + }); + module.exports.signals = function() { + return signals$1; + }; + var loaded = false; + var load$2 = function load() { + if (loaded || !processOk(global.process)) return; + loaded = true; + emitter.count += 1; + signals$1 = signals$1.filter(function(sig) { + try { + process.on(sig, sigListeners[sig]); + return true; + } catch (er) { + return false; + } + }); + process.emit = processEmit; + process.reallyExit = processReallyExit; + }; + module.exports.load = load$2; + var originalProcessReallyExit = process.reallyExit; + var processReallyExit = function processReallyExit(code) { + /* istanbul ignore if */ + if (!processOk(global.process)) return; + process.exitCode = code || 0; + emit("exit", process.exitCode, null); + /* istanbul ignore next */ + emit("afterexit", process.exitCode, null); + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode); + }; + var originalProcessEmit = process.emit; + var processEmit = function processEmit(ev, arg) { + if (ev === "exit" && processOk(global.process)) { + /* istanbul ignore else */ + if (arg !== void 0) process.exitCode = arg; + var ret = originalProcessEmit.apply(this, arguments); + /* istanbul ignore next */ + emit("exit", process.exitCode, null); + /* istanbul ignore next */ + emit("afterexit", process.exitCode, null); + /* istanbul ignore next */ + return ret; + } else return originalProcessEmit.apply(this, arguments); + }; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +var require_kill = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const os$5 = __require("os"); + const onExit = require_signal_exit(); + const DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5; + const spawnedKill = (kill, signal = "SIGTERM", options = {}) => { + const killResult = kill(signal); + setKillTimeout(kill, signal, options, killResult); + return killResult; + }; + const setKillTimeout = (kill, signal, options, killResult) => { + if (!shouldForceKill(signal, options, killResult)) return; + const timeout = getForceKillAfterTimeout(options); + const t = setTimeout(() => { + kill("SIGKILL"); + }, timeout); + // istanbul ignore else + if (t.unref) t.unref(); + }; + const shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => { + return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; + }; + const isSigterm = (signal) => { + return signal === os$5.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM"; + }; + const getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => { + if (forceKillAfterTimeout === true) return DEFAULT_FORCE_KILL_TIMEOUT; + if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); + return forceKillAfterTimeout; + }; + const spawnedCancel = (spawned, context) => { + if (spawned.kill()) context.isCanceled = true; + }; + const timeoutKill = (spawned, signal, reject) => { + spawned.kill(signal); + reject(Object.assign(/* @__PURE__ */ new Error("Timed out"), { + timedOut: true, + signal + })); + }; + const setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => { + if (timeout === 0 || timeout === void 0) return spawnedPromise; + let timeoutId; + const timeoutPromise = new Promise((resolve, reject) => { + timeoutId = setTimeout(() => { + timeoutKill(spawned, killSignal, reject); + }, timeout); + }); + const safeSpawnedPromise = spawnedPromise.finally(() => { + clearTimeout(timeoutId); + }); + return Promise.race([timeoutPromise, safeSpawnedPromise]); + }; + const validateTimeout = ({ timeout }) => { + if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); + }; + const setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => { + if (!cleanup || detached) return timedPromise; + const removeExitHandler = onExit(() => { + spawned.kill(); + }); + return timedPromise.finally(() => { + removeExitHandler(); + }); + }; + module.exports = { + spawnedKill, + spawnedCancel, + setupTimeout, + validateTimeout, + setExitHandler + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +var require_is_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function"; + isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object"; + isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object"; + isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream); + isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function"; + module.exports = isStream; +})); +//#endregion +//#region ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +var require_buffer_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { PassThrough: PassThroughStream } = __require("stream"); + module.exports = (options) => { + options = { ...options }; + const { array } = options; + let { encoding } = options; + const isBuffer = encoding === "buffer"; + let objectMode = false; + if (array) objectMode = !(encoding || isBuffer); + else encoding = encoding || "utf8"; + if (isBuffer) encoding = null; + const stream = new PassThroughStream({ objectMode }); + if (encoding) stream.setEncoding(encoding); + let length = 0; + const chunks = []; + stream.on("data", (chunk) => { + chunks.push(chunk); + if (objectMode) length = chunks.length; + else length += chunk.length; + }); + stream.getBufferedValue = () => { + if (array) return chunks; + return isBuffer ? Buffer.concat(chunks, length) : chunks.join(""); + }; + stream.getBufferedLength = () => length; + return stream; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +var require_get_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { constants: BufferConstants } = __require("buffer"); + const stream = __require("stream"); + const { promisify: promisify$4 } = __require("util"); + const bufferStream = require_buffer_stream(); + const streamPipelinePromisified = promisify$4(stream.pipeline); + var MaxBufferError = class extends Error { + constructor() { + super("maxBuffer exceeded"); + this.name = "MaxBufferError"; + } + }; + async function getStream(inputStream, options) { + if (!inputStream) throw new Error("Expected a stream"); + options = { + maxBuffer: Infinity, + ...options + }; + const { maxBuffer } = options; + const stream = bufferStream(options); + await new Promise((resolve, reject) => { + const rejectPromise = (error) => { + if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) error.bufferedData = stream.getBufferedValue(); + reject(error); + }; + (async () => { + try { + await streamPipelinePromisified(inputStream, stream); + resolve(); + } catch (error) { + rejectPromise(error); + } + })(); + stream.on("data", () => { + if (stream.getBufferedLength() > maxBuffer) rejectPromise(new MaxBufferError()); + }); + }); + return stream.getBufferedValue(); + } + module.exports = getStream; + module.exports.buffer = (stream, options) => getStream(stream, { + ...options, + encoding: "buffer" + }); + module.exports.array = (stream, options) => getStream(stream, { + ...options, + array: true + }); + module.exports.MaxBufferError = MaxBufferError; +})); +//#endregion +//#region ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +var require_merge_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { PassThrough: PassThrough$1 } = __require("stream"); + module.exports = function() { + var sources = []; + var output = new PassThrough$1({ objectMode: true }); + output.setMaxListeners(0); + output.add = add; + output.isEmpty = isEmpty; + output.on("unpipe", remove); + Array.prototype.slice.call(arguments).forEach(add); + return output; + function add(source) { + if (Array.isArray(source)) { + source.forEach(add); + return this; + } + sources.push(source); + source.once("end", remove.bind(null, source)); + source.once("error", output.emit.bind(output, "error")); + source.pipe(output, { end: false }); + return this; + } + function isEmpty() { + return sources.length == 0; + } + function remove(source) { + sources = sources.filter(function(it) { + return it !== source; + }); + if (!sources.length && output.readable) output.end(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +var require_stream$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isStream = require_is_stream(); + const getStream = require_get_stream(); + const mergeStream = require_merge_stream(); + const handleInput = (spawned, input) => { + if (input === void 0 || spawned.stdin === void 0) return; + if (isStream(input)) input.pipe(spawned.stdin); + else spawned.stdin.end(input); + }; + const makeAllStream = (spawned, { all }) => { + if (!all || !spawned.stdout && !spawned.stderr) return; + const mixed = mergeStream(); + if (spawned.stdout) mixed.add(spawned.stdout); + if (spawned.stderr) mixed.add(spawned.stderr); + return mixed; + }; + const getBufferedData = async (stream, streamPromise) => { + if (!stream) return; + stream.destroy(); + try { + return await streamPromise; + } catch (error) { + return error.bufferedData; + } + }; + const getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => { + if (!stream || !buffer) return; + if (encoding) return getStream(stream, { + encoding, + maxBuffer + }); + return getStream.buffer(stream, { maxBuffer }); + }; + const getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => { + const stdoutPromise = getStreamPromise(stdout, { + encoding, + buffer, + maxBuffer + }); + const stderrPromise = getStreamPromise(stderr, { + encoding, + buffer, + maxBuffer + }); + const allPromise = getStreamPromise(all, { + encoding, + buffer, + maxBuffer: maxBuffer * 2 + }); + try { + return await Promise.all([ + processDone, + stdoutPromise, + stderrPromise, + allPromise + ]); + } catch (error) { + return Promise.all([ + { + error, + signal: error.signal, + timedOut: error.timedOut + }, + getBufferedData(stdout, stdoutPromise), + getBufferedData(stderr, stderrPromise), + getBufferedData(all, allPromise) + ]); + } + }; + const validateInputSync = ({ input }) => { + if (isStream(input)) throw new TypeError("The `input` option cannot be a stream in sync mode"); + }; + module.exports = { + handleInput, + makeAllStream, + getSpawnedResult, + validateInputSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +var require_promise$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const nativePromisePrototype = (async () => {})().constructor.prototype; + const descriptors = [ + "then", + "catch", + "finally" + ].map((property) => [property, Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)]); + const mergePromise = (spawned, promise) => { + for (const [property, descriptor] of descriptors) { + const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise); + Reflect.defineProperty(spawned, property, { + ...descriptor, + value + }); + } + return spawned; + }; + const getSpawnedPromise = (spawned) => { + return new Promise((resolve, reject) => { + spawned.on("exit", (exitCode, signal) => { + resolve({ + exitCode, + signal + }); + }); + spawned.on("error", (error) => { + reject(error); + }); + if (spawned.stdin) spawned.stdin.on("error", (error) => { + reject(error); + }); + }); + }; + module.exports = { + mergePromise, + getSpawnedPromise + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +var require_command = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const normalizeArgs = (file, args = []) => { + if (!Array.isArray(args)) return [file]; + return [file, ...args]; + }; + const NO_ESCAPE_REGEXP = /^[\w.-]+$/; + const DOUBLE_QUOTES_REGEXP = /"/g; + const escapeArg = (arg) => { + if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) return arg; + return `"${arg.replace(DOUBLE_QUOTES_REGEXP, "\\\"")}"`; + }; + const joinCommand = (file, args) => { + return normalizeArgs(file, args).join(" "); + }; + const getEscapedCommand = (file, args) => { + return normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" "); + }; + const SPACES_REGEXP = / +/g; + const parseCommand = (command) => { + const tokens = []; + for (const token of command.trim().split(SPACES_REGEXP)) { + const previousToken = tokens[tokens.length - 1]; + if (previousToken && previousToken.endsWith("\\")) tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; + else tokens.push(token); + } + return tokens; + }; + module.exports = { + joinCommand, + getEscapedCommand, + parseCommand + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +var require_execa = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$60 = __require("path"); + const childProcess = __require("child_process"); + const crossSpawn = require_cross_spawn(); + const stripFinalNewline = require_strip_final_newline(); + const npmRunPath = require_npm_run_path(); + const onetime = require_onetime(); + const makeError = require_error$1(); + const normalizeStdio = require_stdio(); + const { spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler } = require_kill(); + const { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream$4(); + const { mergePromise, getSpawnedPromise } = require_promise$1(); + const { joinCommand, parseCommand, getEscapedCommand } = require_command(); + const DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100; + const getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => { + const env = extendEnv ? { + ...process.env, + ...envOption + } : envOption; + if (preferLocal) return npmRunPath.env({ + env, + cwd: localDir, + execPath + }); + return env; + }; + const handleArguments = (file, args, options = {}) => { + const parsed = crossSpawn._parse(file, args, options); + file = parsed.command; + args = parsed.args; + options = parsed.options; + options = { + maxBuffer: DEFAULT_MAX_BUFFER, + buffer: true, + stripFinalNewline: true, + extendEnv: true, + preferLocal: false, + localDir: options.cwd || process.cwd(), + execPath: process.execPath, + encoding: "utf8", + reject: true, + cleanup: true, + all: false, + windowsHide: true, + ...options + }; + options.env = getEnv(options); + options.stdio = normalizeStdio(options); + if (process.platform === "win32" && path$60.basename(file, ".exe") === "cmd") args.unshift("/q"); + return { + file, + args, + options, + parsed + }; + }; + const handleOutput = (options, value, error) => { + if (typeof value !== "string" && !Buffer.isBuffer(value)) return error === void 0 ? void 0 : ""; + if (options.stripFinalNewline) return stripFinalNewline(value); + return value; + }; + const execa = (file, args, options) => { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + validateTimeout(parsed.options); + let spawned; + try { + spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); + } catch (error) { + return mergePromise(new childProcess.ChildProcess(), Promise.reject(makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }))); + } + const spawnedPromise = getSpawnedPromise(spawned); + const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); + const processDone = setExitHandler(spawned, parsed.options, timedPromise); + const context = { isCanceled: false }; + spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); + spawned.cancel = spawnedCancel.bind(null, spawned, context); + const handlePromise = async () => { + const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); + const stdout = handleOutput(parsed.options, stdoutResult); + const stderr = handleOutput(parsed.options, stderrResult); + const all = handleOutput(parsed.options, allResult); + if (error || exitCode !== 0 || signal !== null) { + const returnedError = makeError({ + error, + exitCode, + signal, + stdout, + stderr, + all, + command, + escapedCommand, + parsed, + timedOut, + isCanceled: context.isCanceled, + killed: spawned.killed + }); + if (!parsed.options.reject) return returnedError; + throw returnedError; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + all, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + const handlePromiseOnce = onetime(handlePromise); + handleInput(spawned, parsed.options.input); + spawned.all = makeAllStream(spawned, parsed.options); + return mergePromise(spawned, handlePromiseOnce); + }; + module.exports = execa; + module.exports.sync = (file, args, options) => { + const parsed = handleArguments(file, args, options); + const command = joinCommand(file, args); + const escapedCommand = getEscapedCommand(file, args); + validateInputSync(parsed.options); + let result; + try { + result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); + } catch (error) { + throw makeError({ + error, + stdout: "", + stderr: "", + all: "", + command, + escapedCommand, + parsed, + timedOut: false, + isCanceled: false, + killed: false + }); + } + const stdout = handleOutput(parsed.options, result.stdout, result.error); + const stderr = handleOutput(parsed.options, result.stderr, result.error); + if (result.error || result.status !== 0 || result.signal !== null) { + const error = makeError({ + stdout, + stderr, + error: result.error, + signal: result.signal, + exitCode: result.status, + command, + escapedCommand, + parsed, + timedOut: result.error && result.error.code === "ETIMEDOUT", + isCanceled: false, + killed: result.signal !== null + }); + if (!parsed.options.reject) return error; + throw error; + } + return { + command, + escapedCommand, + exitCode: 0, + stdout, + stderr, + failed: false, + timedOut: false, + isCanceled: false, + killed: false + }; + }; + module.exports.command = (command, options) => { + const [file, ...args] = parseCommand(command); + return execa(file, args, options); + }; + module.exports.commandSync = (command, options) => { + const [file, ...args] = parseCommand(command); + return execa.sync(file, args, options); + }; + module.exports.node = (scriptPath, args, options = {}) => { + if (args && !Array.isArray(args) && typeof args === "object") { + options = args; + args = []; + } + const stdio = normalizeStdio.node(options); + const defaultExecArgv = process.execArgv.filter((arg) => !arg.startsWith("--inspect")); + const { nodePath = process.execPath, nodeOptions = defaultExecArgv } = options; + return execa(nodePath, [ + ...nodeOptions, + scriptPath, + ...Array.isArray(args) ? args : [] + ], { + ...options, + stdin: void 0, + stdout: void 0, + stderr: void 0, + stdio, + shell: false + }); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/extendable-error@0.1.7/node_modules/extendable-error/bld/index.js +var require_bld = /* @__PURE__ */ __commonJSMin$1(((exports) => { + var __extends = exports && exports.__extends || (function() { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function(d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports, "__esModule", { value: true }); + var ExtendableError = function(_super) { + __extends(ExtendableError, _super); + function ExtendableError(message) { + var _newTarget = this.constructor; + if (message === void 0) message = ""; + var _this = _super.call(this, message) || this; + _this.message = message; + Object.setPrototypeOf(_this, _newTarget.prototype); + delete _this.stack; + _this.name = _newTarget.name; + _this._error = /* @__PURE__ */ new Error(); + return _this; + } + Object.defineProperty(ExtendableError.prototype, "stack", { + get: function() { + if (this._stack) return this._stack; + var prototype = Object.getPrototypeOf(this); + var depth = 1; + loop: while (prototype) { + switch (prototype) { + case ExtendableError.prototype: break loop; + case Object.prototype: + depth = 1; + break loop; + default: + depth++; + break; + } + prototype = Object.getPrototypeOf(prototype); + } + var stackLines = (this._error.stack || "").match(/.+/g) || []; + var nameLine = this.name; + if (this.message) nameLine += ": " + this.message; + stackLines.splice(0, depth + 1, nameLine); + return this._stack = stackLines.join("\n"); + }, + enumerable: true, + configurable: true + }); + return ExtendableError; + }(Error); + exports.ExtendableError = ExtendableError; + exports.default = ExtendableError; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+errors@0.2.0/node_modules/@changesets/errors/dist/changesets-errors.cjs.js +var require_changesets_errors_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var ExtendableError = require_bld(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var ExtendableError__default = /*#__PURE__*/ _interopDefault(ExtendableError); + var GitError = class extends ExtendableError__default["default"] { + constructor(code, message) { + super(`${message}, exit code: ${code}`); + this.code = code; + } + }; + var ValidationError = class extends ExtendableError__default["default"] {}; + var ExitError = class extends ExtendableError__default["default"] { + constructor(code) { + super(`The process exited with code: ${code}`); + this.code = code; + } + }; + var PreExitButNotInPreModeError = class extends ExtendableError__default["default"] { + constructor() { + super("pre mode cannot be exited when not in pre mode"); + } + }; + var PreEnterButInPreModeError = class extends ExtendableError__default["default"] { + constructor() { + super("pre mode cannot be entered when in pre mode"); + } + }; + var InternalError = class extends ExtendableError__default["default"] { + constructor(message) { + super(message); + } + }; + exports.ExitError = ExitError; + exports.GitError = GitError; + exports.InternalError = InternalError; + exports.PreEnterButInPreModeError = PreEnterButInPreModeError; + exports.PreExitButNotInPreModeError = PreExitButNotInPreModeError; + exports.ValidationError = ValidationError; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+errors@0.2.0/node_modules/@changesets/errors/dist/changesets-errors.cjs.mjs +var changesets_errors_cjs_exports = /* @__PURE__ */ __exportAll({ + ExitError: () => import_changesets_errors_cjs.ExitError, + GitError: () => import_changesets_errors_cjs.GitError, + InternalError: () => import_changesets_errors_cjs.InternalError, + PreEnterButInPreModeError: () => import_changesets_errors_cjs.PreEnterButInPreModeError, + PreExitButNotInPreModeError: () => import_changesets_errors_cjs.PreExitButNotInPreModeError, + ValidationError: () => import_changesets_errors_cjs.ValidationError +}); +var import_changesets_errors_cjs; +var init_changesets_errors_cjs = __esmMin((() => { + import_changesets_errors_cjs = require_changesets_errors_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js +var require_lrucache = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var LRUCache = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) return; + else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + if (!this.delete(key) && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module.exports = LRUCache; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js +var require_parse_options = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const looseOption = Object.freeze({ loose: true }); + const emptyOpts = Object.freeze({}); + const parseOptions = (options) => { + if (!options) return emptyOpts; + if (typeof options !== "object") return looseOption; + return options; + }; + module.exports = parseOptions; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SEMVER_SPEC_VERSION = "2.0.0"; + const MAX_LENGTH = 256; + const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH: 16, + MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6, + MAX_SAFE_INTEGER, + RELEASE_TYPES: [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ], + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js +var require_debug = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js +var require_re = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants$3(); + const debug = require_debug(); + exports = module.exports = {}; + const re = exports.re = []; + const safeRe = exports.safeRe = []; + const src = exports.src = []; + const safeSrc = exports.safeSrc = []; + const t = exports.t = {}; + let R = 0; + const LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + const safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + return value; + }; + const createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js +var require_identifiers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const numeric = /^[0-9]+$/; + const compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1; + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module.exports = { + compareIdentifiers, + rcompareIdentifiers + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js +var require_semver$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const debug = require_debug(); + const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants$3(); + const { safeRe: re, t } = require_re(); + const parseOptions = require_parse_options(); + const { compareIdentifiers } = require_identifiers(); + const isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split("."); + if (identifiers.length > prerelease.length) return false; + for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false; + return true; + }; + module.exports = class SemVer { + constructor(version, options) { + options = parseOptions(options); + if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version; + else version = version.version; + else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); + if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); + debug("SemVer", version, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) throw new TypeError(`Invalid Version: ${version}`); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); + if (!m[4]) this.prerelease = []; + else this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + return id; + }); + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`; + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof SemVer)) { + if (typeof other === "string" && other === this.version) return 0; + other = new SemVer(other, this.options); + } + if (other.version === this.version) return 0; + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.major < other.major) return -1; + if (this.major > other.major) return 1; + if (this.minor < other.minor) return -1; + if (this.minor > other.minor) return 1; + if (this.patch < other.patch) return -1; + if (this.patch > other.patch) return 1; + return 0; + } + comparePre(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + if (this.prerelease.length && !other.prerelease.length) return -1; + else if (!this.prerelease.length && other.prerelease.length) return 1; + else if (!this.prerelease.length && !other.prerelease.length) return 0; + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + } + compareBuild(other) { + if (!(other instanceof SemVer)) other = new SemVer(other, this.options); + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + } + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`); + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) this.prerelease = [base]; + else { + let i = this.prerelease.length; + while (--i >= 0) if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists"); + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) prerelease = [identifier]; + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split(".").length]; + if (isNaN(prereleaseBase)) this.prerelease = prerelease; + } else this.prerelease = prerelease; + } + break; + } + default: throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) this.raw += `+${this.build.join(".")}`; + return this; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js +var require_compare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module.exports = compare; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js +var require_eq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const eq = (a, b, loose) => compare(a, b, loose) === 0; + module.exports = eq; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js +var require_neq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const neq = (a, b, loose) => compare(a, b, loose) !== 0; + module.exports = neq; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js +var require_gt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const gt = (a, b, loose) => compare(a, b, loose) > 0; + module.exports = gt; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js +var require_gte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const gte = (a, b, loose) => compare(a, b, loose) >= 0; + module.exports = gte; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js +var require_lt = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const lt = (a, b, loose) => compare(a, b, loose) < 0; + module.exports = lt; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js +var require_lte = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const lte = (a, b, loose) => compare(a, b, loose) <= 0; + module.exports = lte; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js +var require_cmp = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const eq = require_eq(); + const neq = require_neq(); + const gt = require_gt(); + const gte = require_gte(); + const lt = require_lt(); + const lte = require_lte(); + const cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a === b; + case "!==": + if (typeof a === "object") a = a.version; + if (typeof b === "object") b = b.version; + return a !== b; + case "": + case "=": + case "==": return eq(a, b, loose); + case "!=": return neq(a, b, loose); + case ">": return gt(a, b, loose); + case ">=": return gte(a, b, loose); + case "<": return lt(a, b, loose); + case "<=": return lte(a, b, loose); + default: throw new TypeError(`Invalid operator: ${op}`); + } + }; + module.exports = cmp; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js +var require_comparator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const ANY = Symbol("SemVer ANY"); + module.exports = class Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp; + else comp = comp.value; + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) this.value = ""; + else this.value = this.operator + this.semver.version; + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) throw new TypeError(`Invalid comparator: ${comp}`); + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") this.operator = ""; + if (!m[2]) this.semver = ANY; + else this.semver = new SemVer(m[2], this.options.loose); + } + toString() { + return this.value; + } + test(version) { + debug("Comparator.test", version, this.options.loose); + if (this.semver === ANY || version === ANY) return true; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + return cmp(version, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required"); + if (this.operator === "") { + if (this.value === "") return true; + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") return true; + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false; + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false; + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true; + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true; + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true; + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true; + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true; + return false; + } + }; + const parseOptions = require_parse_options(); + const { safeRe: re, t } = require_re(); + const cmp = require_cmp(); + const debug = require_debug(); + const SemVer = require_semver$1(); + const Range = require_range(); +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js +var require_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SPACE_CHARACTERS = /\s+/g; + module.exports = class Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range; + else return new Range(range.raw, options); + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) this.set = [first]; + else if (this.set.length > 1) { + for (const c of this.set) if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) this.formatted += "||"; + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) this.formatted += " "; + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.replace(BUILDSTRIPRE, ""); + const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range; + const cached = cache.get(memoKey); + if (cached) return cached; + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) return [comp]; + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete(""); + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof Range)) throw new TypeError("a Range is required"); + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + test(version) { + if (!version) return false; + if (typeof version === "string") try { + version = new SemVer(version, this.options); + } catch (er) { + return false; + } + for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true; + return false; + } + }; + const cache = new (require_lrucache())(); + const parseOptions = require_parse_options(); + const Comparator = require_comparator(); + const debug = require_debug(); + const SemVer = require_semver$1(); + const { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re(); + const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants$3(); + const BUILDSTRIPRE = new RegExp(src[t.BUILD], "g"); + const isNullSet = (c) => c.value === "<0.0.0-0"; + const isAny = (c) => c.value === ""; + const isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + const parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], ""); + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + const isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + const invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p); + const replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("tilde", comp, _, M, m, p, pr); + let ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + else if (pr) { + debug("replaceTilde pr", pr); + ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + debug("tilde return", ret); + return ret; + }); + }; + const replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + const replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_, M, m, p, pr) => { + debug("caret", comp, _, M, m, p, pr); + let ret; + if (isX(M)) ret = ""; + else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } else { + debug("no pr"); + if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`; + else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + debug("caret return", ret); + return ret; + }); + }; + const replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + const replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret, gtlt, M, m, p, pr); + if (invalidXRangeOrder(M, m, p)) return comp; + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) gtlt = ""; + pr = options.includePrerelease ? "-0" : ""; + if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0"; + else ret = "*"; + else if (gtlt && anyX) { + if (xm) m = 0; + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) M = +M + 1; + else m = +m + 1; + } + if (gtlt === "<") pr = "-0"; + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + debug("xRange return", ret); + return ret; + }); + }; + const replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + const replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) from = ""; + else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + else if (fpr) from = `>=${from}`; + else from = `>=${from}${incPr ? "-0" : ""}`; + if (isX(tM)) to = ""; + else if (isX(tm)) to = `<${+tM + 1}.0.0-0`; + else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`; + else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`; + else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`; + else to = `<=${to}`; + return `${from} ${to}`.trim(); + }; + const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false; + if (version.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) continue; + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true; + } + } + return false; + } + return true; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +var require_picocolors = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + let p = process || {}, argv = p.argv || [], env = p.env || {}; + let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI); + let formatter = (open, close, replace = open) => (input) => { + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; + }; + let replaceClose = (string, close, replace, index) => { + let result = "", cursor = 0; + do { + result += string.substring(cursor, index) + replace; + cursor = index + close.length; + index = string.indexOf(close, cursor); + } while (~index); + return result + string.substring(cursor); + }; + let createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1B[0m", "\x1B[0m"), + bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), + dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), + italic: f("\x1B[3m", "\x1B[23m"), + underline: f("\x1B[4m", "\x1B[24m"), + inverse: f("\x1B[7m", "\x1B[27m"), + hidden: f("\x1B[8m", "\x1B[28m"), + strikethrough: f("\x1B[9m", "\x1B[29m"), + black: f("\x1B[30m", "\x1B[39m"), + red: f("\x1B[31m", "\x1B[39m"), + green: f("\x1B[32m", "\x1B[39m"), + yellow: f("\x1B[33m", "\x1B[39m"), + blue: f("\x1B[34m", "\x1B[39m"), + magenta: f("\x1B[35m", "\x1B[39m"), + cyan: f("\x1B[36m", "\x1B[39m"), + white: f("\x1B[37m", "\x1B[39m"), + gray: f("\x1B[90m", "\x1B[39m"), + bgBlack: f("\x1B[40m", "\x1B[49m"), + bgRed: f("\x1B[41m", "\x1B[49m"), + bgGreen: f("\x1B[42m", "\x1B[49m"), + bgYellow: f("\x1B[43m", "\x1B[49m"), + bgBlue: f("\x1B[44m", "\x1B[49m"), + bgMagenta: f("\x1B[45m", "\x1B[49m"), + bgCyan: f("\x1B[46m", "\x1B[49m"), + bgWhite: f("\x1B[47m", "\x1B[49m"), + blackBright: f("\x1B[90m", "\x1B[39m"), + redBright: f("\x1B[91m", "\x1B[39m"), + greenBright: f("\x1B[92m", "\x1B[39m"), + yellowBright: f("\x1B[93m", "\x1B[39m"), + blueBright: f("\x1B[94m", "\x1B[39m"), + magentaBright: f("\x1B[95m", "\x1B[39m"), + cyanBright: f("\x1B[96m", "\x1B[39m"), + whiteBright: f("\x1B[97m", "\x1B[39m"), + bgBlackBright: f("\x1B[100m", "\x1B[49m"), + bgRedBright: f("\x1B[101m", "\x1B[49m"), + bgGreenBright: f("\x1B[102m", "\x1B[49m"), + bgYellowBright: f("\x1B[103m", "\x1B[49m"), + bgBlueBright: f("\x1B[104m", "\x1B[49m"), + bgMagentaBright: f("\x1B[105m", "\x1B[49m"), + bgCyanBright: f("\x1B[106m", "\x1B[49m"), + bgWhiteBright: f("\x1B[107m", "\x1B[49m") + }; + }; + module.exports = createColors(); + module.exports.createColors = createColors; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@2.1.4/node_modules/@changesets/get-dependents-graph/dist/changesets-get-dependents-graph.cjs.js +var require_changesets_get_dependents_graph_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var Range = require_range(); + var pc = require_picocolors(); + var path$59 = __require("node:path"); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var Range__default = /*#__PURE__*/ _interopDefault(Range); + var pc__default = /*#__PURE__*/ _interopDefault(pc); + var path__default = /*#__PURE__*/ _interopDefault(path$59); + const DEPENDENCY_TYPES = [ + "dependencies", + "devDependencies", + "peerDependencies", + "optionalDependencies" + ]; + const getAllDependencies = (config, ignoreDevDependencies) => { + const allDependencies = /* @__PURE__ */ new Map(); + for (const type of DEPENDENCY_TYPES) { + const deps = config[type]; + if (!deps) continue; + for (const name of Object.keys(deps)) { + const depRange = deps[name]; + if (type === "devDependencies" && (ignoreDevDependencies || depRange.startsWith("link:") || depRange.startsWith("file:"))) continue; + allDependencies.set(name, depRange); + } + } + return allDependencies; + }; + const isProtocolRange = (range) => range.indexOf(":") !== -1; + const getValidRange = (potentialRange) => { + if (isProtocolRange(potentialRange)) return null; + try { + return new Range__default["default"](potentialRange); + } catch (_unused) { + return null; + } + }; + function getDependencyGraph(packages, { ignoreDevDependencies = false, bumpVersionsWithWorkspaceProtocolOnly = false } = {}) { + const graph = /* @__PURE__ */ new Map(); + let valid = true; + const packagesByName = { [packages.root.packageJson.name]: packages.root }; + const relativePathsByName = { [packages.root.packageJson.name]: "." }; + const queue = [packages.root]; + for (const pkg of packages.packages) { + queue.push(pkg); + packagesByName[pkg.packageJson.name] = pkg; + relativePathsByName[pkg.packageJson.name] = path__default["default"].relative(packages.root.dir, pkg.dir).replace(/\\/g, "/"); + } + for (const pkg of queue) { + const { name } = pkg.packageJson; + const dependencies = []; + const allDependencies = getAllDependencies(pkg.packageJson, ignoreDevDependencies); + for (let [depName, depRange] of allDependencies) { + const match = packagesByName[depName]; + if (!match) continue; + const expected = match.packageJson.version; + const rawDepRange = depRange; + if (depRange.startsWith("workspace:")) { + depRange = depRange.replace(/^workspace:/, ""); + if (depRange === "*" || depRange === "^" || depRange === "~") { + dependencies.push(depName); + continue; + } + if (path__default["default"].posix.normalize(depRange) === relativePathsByName[depName]) { + dependencies.push(depName); + continue; + } + if (!getValidRange(depRange)) { + valid = false; + console.error(`Package ${pc__default["default"].cyan(`"${name}"`)} must depend on the current version of ${pc__default["default"].cyan(`"${depName}"`)}: ${pc__default["default"].green(`"${expected}"`)} vs ${pc__default["default"].red(`"${rawDepRange}"`)}`); + continue; + } + } else if (bumpVersionsWithWorkspaceProtocolOnly) continue; + const range = getValidRange(depRange); + if (range && !range.test(expected) || isProtocolRange(depRange)) { + valid = false; + console.error(`Package ${pc__default["default"].cyan(`"${name}"`)} must depend on the current version of ${pc__default["default"].cyan(`"${depName}"`)}: ${pc__default["default"].green(`"${expected}"`)} vs ${pc__default["default"].red(`"${rawDepRange}"`)}`); + continue; + } + if (!range) continue; + dependencies.push(depName); + } + graph.set(name, { + pkg, + dependencies + }); + } + return { + graph, + valid + }; + } + function getDependentsGraph(packages, opts) { + const graph = /* @__PURE__ */ new Map(); + const { graph: dependencyGraph } = getDependencyGraph(packages, opts); + const dependentsLookup = { [packages.root.packageJson.name]: { + pkg: packages.root, + dependents: [] + } }; + packages.packages.forEach((pkg) => { + dependentsLookup[pkg.packageJson.name] = { + pkg, + dependents: [] + }; + }); + packages.packages.forEach((pkg) => { + const dependent = pkg.packageJson.name; + const valFromDependencyGraph = dependencyGraph.get(dependent); + if (valFromDependencyGraph) valFromDependencyGraph.dependencies.forEach((dependency) => { + dependentsLookup[dependency].dependents.push(dependent); + }); + }); + Object.keys(dependentsLookup).forEach((key) => { + graph.set(key, dependentsLookup[key]); + }); + const simplifiedDependentsGraph = /* @__PURE__ */ new Map(); + graph.forEach((pkgInfo, pkgName) => { + simplifiedDependentsGraph.set(pkgName, pkgInfo.dependents); + }); + return simplifiedDependentsGraph; + } + exports.getDependentsGraph = getDependentsGraph; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@2.1.4/node_modules/@changesets/get-dependents-graph/dist/changesets-get-dependents-graph.cjs.mjs +var changesets_get_dependents_graph_cjs_exports = /* @__PURE__ */ __exportAll({ getDependentsGraph: () => import_changesets_get_dependents_graph_cjs.getDependentsGraph }); +var import_changesets_get_dependents_graph_cjs; +var init_changesets_get_dependents_graph_cjs = __esmMin((() => { + import_changesets_get_dependents_graph_cjs = require_changesets_get_dependents_graph_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+should-skip-package@0.1.2/node_modules/@changesets/should-skip-package/dist/changesets-should-skip-package.cjs.js +var require_changesets_should_skip_package_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) { + if (ignore.includes(packageJson.name)) return true; + if (packageJson.private && !allowPrivatePackages) return true; + return !packageJson.version; + } + exports.shouldSkipPackage = shouldSkipPackage; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+should-skip-package@0.1.2/node_modules/@changesets/should-skip-package/dist/changesets-should-skip-package.cjs.mjs +var changesets_should_skip_package_cjs_exports = /* @__PURE__ */ __exportAll({ shouldSkipPackage: () => import_changesets_should_skip_package_cjs.shouldSkipPackage }); +var import_changesets_should_skip_package_cjs; +var init_changesets_should_skip_package_cjs = __esmMin((() => { + import_changesets_should_skip_package_cjs = require_changesets_should_skip_package_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js +var require_parse$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) return version; + try { + return new SemVer(version, options); + } catch (er) { + if (!throwErrors) return null; + throw er; + } + }; + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js +var require_satisfies = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Range = require_range(); + const satisfies = (version, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version); + }; + module.exports = satisfies; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js +var require_valid$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Range = require_range(); + const validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module.exports = validRange; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js +var require_inc = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const inc = (version, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module.exports = inc; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@6.0.10/node_modules/@changesets/assemble-release-plan/dist/changesets-assemble-release-plan.cjs.js +var require_changesets_assemble_release_plan_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var errors = (init_changesets_errors_cjs(), __toCommonJS(changesets_errors_cjs_exports)); + var getDependentsGraph = (init_changesets_get_dependents_graph_cjs(), __toCommonJS(changesets_get_dependents_graph_cjs_exports)); + var shouldSkipPackage = (init_changesets_should_skip_package_cjs(), __toCommonJS(changesets_should_skip_package_cjs_exports)); + var semverParse = require_parse$2(); + var semverGt = require_gt(); + var path$58 = __require("node:path"); + var semverSatisfies = require_satisfies(); + var validRange = require_valid$1(); + var semverInc = require_inc(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var semverParse__default = /*#__PURE__*/ _interopDefault(semverParse); + var semverGt__default = /*#__PURE__*/ _interopDefault(semverGt); + var path__default = /*#__PURE__*/ _interopDefault(path$58); + var semverSatisfies__default = /*#__PURE__*/ _interopDefault(semverSatisfies); + var validRange__default = /*#__PURE__*/ _interopDefault(validRange); + var semverInc__default = /*#__PURE__*/ _interopDefault(semverInc); + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + function getHighestReleaseType(releases) { + if (releases.length === 0) throw new Error(`Large internal Changesets error when calculating highest release type in the set of releases. Please contact the maintainers`); + let highestReleaseType = "none"; + for (let release of releases) switch (release.type) { + case "major": return "major"; + case "minor": + highestReleaseType = "minor"; + break; + case "patch": + if (highestReleaseType === "none") highestReleaseType = "patch"; + break; + } + return highestReleaseType; + } + function getCurrentHighestVersion(packageGroup, packagesByName) { + let highestVersion; + for (let pkgName of packageGroup) { + let pkg = mapGetOrThrowInternal(packagesByName, pkgName, `We were unable to version for package group: ${pkgName} in package group: ${packageGroup.toString()}`); + if (highestVersion === void 0 || semverGt__default["default"](pkg.packageJson.version, highestVersion)) highestVersion = pkg.packageJson.version; + } + return highestVersion; + } + function mapGetOrThrow(map, key, errorMessage) { + const value = map.get(key); + if (value === void 0) throw new Error(errorMessage); + return value; + } + function mapGetOrThrowInternal(map, key, errorMessage) { + const value = map.get(key); + if (value === void 0) throw new errors.InternalError(errorMessage); + return value; + } + function applyLinks(releases, packagesByName, linked) { + let updated = false; + for (let linkedPackages of linked) { + let releasingLinkedPackages = [...releases.values()].filter((release) => linkedPackages.includes(release.name) && release.type !== "none"); + if (releasingLinkedPackages.length === 0) continue; + let highestReleaseType = getHighestReleaseType(releasingLinkedPackages); + let highestVersion = getCurrentHighestVersion(linkedPackages, packagesByName); + for (let linkedPackage of releasingLinkedPackages) { + if (linkedPackage.type !== highestReleaseType) { + updated = true; + linkedPackage.type = highestReleaseType; + } + if (linkedPackage.oldVersion !== highestVersion) { + updated = true; + linkedPackage.oldVersion = highestVersion; + } + } + } + return updated; + } + function incrementVersion(release, preInfo) { + if (release.type === "none") return release.oldVersion; + let version = semverInc__default["default"](release.oldVersion, release.type); + if (preInfo !== void 0 && preInfo.state.mode !== "exit") { + let preVersion = mapGetOrThrowInternal(preInfo.preVersions, release.name, `preVersion for ${release.name} does not exist when preState is defined`); + version += `-${preInfo.state.tag}.${preVersion}`; + } + return version; + } + function determineDependents({ releases, packagesByName, rootDir, dependencyGraph, preInfo, config }) { + let updated = false; + let pkgsToSearch = [...releases.values()]; + while (pkgsToSearch.length > 0) { + const nextRelease = pkgsToSearch.shift(); + if (!nextRelease) continue; + mapGetOrThrowInternal(dependencyGraph, nextRelease.name, `Error in determining dependents - could not find package in repository: ${nextRelease.name}`).map((dependent) => { + let type; + const dependentPackage = mapGetOrThrowInternal(packagesByName, dependent, "Dependency map is incorrect"); + if (shouldSkipPackage.shouldSkipPackage(dependentPackage, { + ignore: config.ignore, + allowPrivatePackages: config.privatePackages.version + })) type = "none"; + else { + const dependencyPackage = mapGetOrThrowInternal(packagesByName, nextRelease.name, "Dependency map is incorrect"); + const dependencyVersionRanges = getDependencyVersionRanges(rootDir, dependentPackage.packageJson, nextRelease, dependencyPackage); + for (const { depType, versionRange } of dependencyVersionRanges) if (nextRelease.type === "none") continue; + else if (shouldBumpMajor({ + dependent, + depType, + versionRange, + releases, + nextRelease, + preInfo, + onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange + })) type = "major"; + else if ((!releases.has(dependent) || releases.get(dependent).type === "none") && (config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.updateInternalDependents === "always" || !semverSatisfies__default["default"](incrementVersion(nextRelease, preInfo), versionRange))) switch (depType) { + case "dependencies": + case "optionalDependencies": + case "peerDependencies": + if (type !== "major" && type !== "minor") type = "patch"; + break; + case "devDependencies": if (type !== "major" && type !== "minor" && type !== "patch") type = "none"; + } + } + if (releases.has(dependent) && releases.get(dependent).type === type) type = void 0; + return { + name: dependent, + type, + pkgJSON: dependentPackage.packageJson + }; + }).filter((dependentItem) => !!dependentItem.type).forEach(({ name, type, pkgJSON }) => { + updated = true; + const existing = releases.get(name); + if (existing && type === "major" && existing.type !== "major") { + existing.type = "major"; + pkgsToSearch.push(existing); + } else { + let newDependent = { + name, + type, + oldVersion: pkgJSON.version, + changesets: [] + }; + pkgsToSearch.push(newDependent); + releases.set(name, newDependent); + } + }); + } + return updated; + } + function getDependencyVersionRanges(rootDir, dependentPkgJSON, dependencyRelease, dependencyPackage) { + const DEPENDENCY_TYPES = [ + "dependencies", + "devDependencies", + "peerDependencies", + "optionalDependencies" + ]; + const dependencyVersionRanges = []; + for (const type of DEPENDENCY_TYPES) { + var _dependentPkgJSON$typ; + let versionRange = (_dependentPkgJSON$typ = dependentPkgJSON[type]) === null || _dependentPkgJSON$typ === void 0 ? void 0 : _dependentPkgJSON$typ[dependencyRelease.name]; + if (!versionRange) continue; + if (versionRange.startsWith("workspace:")) { + versionRange = versionRange.replace(/^workspace:/, ""); + switch (versionRange) { + case "*": + versionRange = dependencyRelease.oldVersion; + break; + case "^": + case "~": + versionRange = `${versionRange}${dependencyRelease.oldVersion}`; + break; + default: if (!validRange__default["default"](versionRange)) if (path__default["default"].posix.normalize(versionRange) === path__default["default"].relative(rootDir, dependencyPackage.dir).replace(/\\/g, "/")) versionRange = dependencyRelease.oldVersion; + else continue; + } + } + dependencyVersionRanges.push({ + depType: type, + versionRange + }); + } + return dependencyVersionRanges; + } + function shouldBumpMajor({ dependent, depType, versionRange, releases, nextRelease, preInfo, onlyUpdatePeerDependentsWhenOutOfRange }) { + return depType === "peerDependencies" && nextRelease.type !== "none" && nextRelease.type !== "patch" && (!onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default["default"](incrementVersion(nextRelease, preInfo), versionRange)) && (!releases.has(dependent) || releases.has(dependent) && releases.get(dependent).type !== "major"); + } + function flattenReleases(changesets, packagesByName, config) { + let releases = /* @__PURE__ */ new Map(); + changesets.forEach((changeset) => { + changeset.releases.filter(({ name }) => { + const pkg = mapGetOrThrowInternal(packagesByName, name, `Couldn't find package named "${name}" listed in changeset "${changeset.id}"`); + return !shouldSkipPackage.shouldSkipPackage(pkg, { + ignore: config.ignore, + allowPrivatePackages: config.privatePackages.version + }); + }).forEach(({ name, type }) => { + let pkg = mapGetOrThrowInternal(packagesByName, name, `Couldn't find package named "${name}" listed in changeset "${changeset.id}"`); + let release = releases.get(name); + if (!release) release = { + name, + type, + oldVersion: pkg.packageJson.version, + changesets: [changeset.id] + }; + else { + if (type === "major" || (release.type === "patch" || release.type === "none") && (type === "minor" || type === "patch")) release.type = type; + release.changesets.push(changeset.id); + } + releases.set(name, release); + }); + }); + return releases; + } + function matchFixedConstraint(releases, packagesByName, config) { + let updated = false; + for (let fixedPackages of config.fixed) { + let releasingFixedPackages = [...releases.values()].filter((release) => fixedPackages.includes(release.name) && release.type !== "none"); + if (releasingFixedPackages.length === 0) continue; + let highestReleaseType = getHighestReleaseType(releasingFixedPackages); + let highestVersion = getCurrentHighestVersion(fixedPackages, packagesByName); + for (let pkgName of fixedPackages) { + const pkg = mapGetOrThrowInternal(packagesByName, pkgName, `Could not find package named "${pkgName}" listed in fixed group ${JSON.stringify(fixedPackages)}`); + if (shouldSkipPackage.shouldSkipPackage(pkg, { + ignore: config.ignore, + allowPrivatePackages: config.privatePackages.version + })) continue; + let release = releases.get(pkgName); + if (!release) { + updated = true; + releases.set(pkgName, { + name: pkgName, + type: highestReleaseType, + oldVersion: highestVersion, + changesets: [] + }); + continue; + } + if (release.type !== highestReleaseType) { + updated = true; + release.type = highestReleaseType; + } + if (release.oldVersion !== highestVersion) { + updated = true; + release.oldVersion = highestVersion; + } + } + } + return updated; + } + function getPreVersion(version) { + let parsed = semverParse__default["default"](version); + let preVersion = parsed.prerelease[1] === void 0 ? -1 : parsed.prerelease[1]; + if (typeof preVersion !== "number") throw new errors.InternalError("preVersion is not a number"); + preVersion++; + return preVersion; + } + function getSnapshotSuffix(template, snapshotParameters) { + let snapshotRefDate = /* @__PURE__ */ new Date(); + const placeholderValues = { + commit: snapshotParameters.commit, + tag: snapshotParameters.tag, + timestamp: snapshotRefDate.getTime().toString(), + datetime: snapshotRefDate.toISOString().replace(/\.\d{3}Z$/, "").replace(/[^\d]/g, "") + }; + if (!template) return [placeholderValues.tag, placeholderValues.datetime].filter(Boolean).join("-"); + const placeholders = Object.keys(placeholderValues); + if (!template.includes(`{tag}`) && placeholderValues.tag !== void 0) throw new Error(`Failed to compose snapshot version: "{tag}" placeholder is missing, but the snapshot parameter is defined (value: '${placeholderValues.tag}')`); + return placeholders.reduce((prev, key) => { + return prev.replace(new RegExp(`\\{${key}\\}`, "g"), () => { + const value = placeholderValues[key]; + if (value === void 0) throw new Error(`Failed to compose snapshot version: "{${key}}" placeholder is used without having a value defined!`); + return value; + }); + }, template); + } + function getSnapshotVersion(release, preInfo, useCalculatedVersion, snapshotSuffix) { + if (release.type === "none") return release.oldVersion; + return `${useCalculatedVersion ? incrementVersion(release, preInfo) : `0.0.0`}-${snapshotSuffix}`; + } + function getNewVersion(release, preInfo) { + if (release.type === "none") return release.oldVersion; + return incrementVersion(release, preInfo); + } + function assembleReleasePlan(changesets, packages, config, preState, snapshot) { + const refinedConfig = config.snapshot ? config : _objectSpread2(_objectSpread2({}, config), {}, { snapshot: { + prereleaseTemplate: null, + useCalculatedVersion: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.useCalculatedVersionForSnapshots + } }); + const refinedSnapshot = typeof snapshot === "string" ? { tag: snapshot } : typeof snapshot === "boolean" ? { tag: void 0 } : snapshot; + let packagesByName = new Map(packages.packages.map((x) => [x.packageJson.name, x])); + const relevantChangesets = getRelevantChangesets(changesets, packagesByName, refinedConfig, preState); + const preInfo = getPreInfo(changesets, packagesByName, refinedConfig, preState); + let releases = flattenReleases(relevantChangesets, packagesByName, refinedConfig); + let dependencyGraph = getDependentsGraph.getDependentsGraph(packages, { bumpVersionsWithWorkspaceProtocolOnly: refinedConfig.bumpVersionsWithWorkspaceProtocolOnly }); + let releasesValidated = false; + while (releasesValidated === false) { + let dependentAdded = determineDependents({ + releases, + packagesByName, + rootDir: packages.root.dir, + dependencyGraph, + preInfo, + config: refinedConfig + }); + let fixedConstraintUpdated = matchFixedConstraint(releases, packagesByName, refinedConfig); + releasesValidated = !applyLinks(releases, packagesByName, refinedConfig.linked) && !dependentAdded && !fixedConstraintUpdated; + } + if ((preInfo === null || preInfo === void 0 ? void 0 : preInfo.state.mode) === "exit") { + for (let pkg of packages.packages) if (preInfo.preVersions.get(pkg.packageJson.name) !== 0) { + const existingRelease = releases.get(pkg.packageJson.name); + if (!existingRelease) releases.set(pkg.packageJson.name, { + name: pkg.packageJson.name, + type: "patch", + oldVersion: pkg.packageJson.version, + changesets: [] + }); + else if (existingRelease.type === "none" && !shouldSkipPackage.shouldSkipPackage(pkg, { + ignore: refinedConfig.ignore, + allowPrivatePackages: refinedConfig.privatePackages.version + })) existingRelease.type = "patch"; + } + } + const snapshotSuffix = refinedSnapshot && getSnapshotSuffix(refinedConfig.snapshot.prereleaseTemplate, refinedSnapshot); + return { + changesets: relevantChangesets, + releases: [...releases.values()].map((incompleteRelease) => { + return _objectSpread2(_objectSpread2({}, incompleteRelease), {}, { newVersion: snapshotSuffix ? getSnapshotVersion(incompleteRelease, preInfo, refinedConfig.snapshot.useCalculatedVersion, snapshotSuffix) : getNewVersion(incompleteRelease, preInfo) }); + }), + preState: preInfo === null || preInfo === void 0 ? void 0 : preInfo.state + }; + } + function getRelevantChangesets(changesets, packagesByName, config, preState) { + for (const changeset of changesets) { + const skippedPackages = []; + const notSkippedPackages = []; + for (const release of changeset.releases) { + const packageByName = mapGetOrThrow(packagesByName, release.name, `Found changeset ${changeset.id} for package ${release.name} which is not in the workspace`); + if (shouldSkipPackage.shouldSkipPackage(packageByName, { + ignore: config.ignore, + allowPrivatePackages: config.privatePackages.version + })) skippedPackages.push(release.name); + else notSkippedPackages.push(release.name); + } + if (skippedPackages.length > 0 && notSkippedPackages.length > 0) throw new Error(`Found mixed changeset ${changeset.id}\nFound ignored packages: ${skippedPackages.join(" ")}\nFound not ignored packages: ${notSkippedPackages.join(" ")}\nMixed changesets that contain both ignored and not ignored packages are not allowed`); + } + if (preState && preState.mode !== "exit") { + let usedChangesetIds = new Set(preState.changesets); + return changesets.filter((changeset) => !usedChangesetIds.has(changeset.id)); + } + return changesets; + } + function getHighestPreVersion(groupKind, packageGroup, packagesByName) { + let highestPreVersion = 0; + for (let pkgName of packageGroup) { + const pkg = mapGetOrThrowInternal(packagesByName, pkgName, `Could not find package named "${pkgName}" listed in ${groupKind} group ${JSON.stringify(packageGroup)}`); + highestPreVersion = Math.max(getPreVersion(pkg.packageJson.version), highestPreVersion); + } + return highestPreVersion; + } + function getPreInfo(changesets, packagesByName, config, preState) { + if (preState === void 0) return; + let updatedPreState = _objectSpread2(_objectSpread2({}, preState), {}, { + changesets: changesets.map((changeset) => changeset.id), + initialVersions: _objectSpread2({}, preState.initialVersions) + }); + for (const [, pkg] of packagesByName) if (updatedPreState.initialVersions[pkg.packageJson.name] === void 0) updatedPreState.initialVersions[pkg.packageJson.name] = pkg.packageJson.version; + let preVersions = /* @__PURE__ */ new Map(); + for (const [, pkg] of packagesByName) { + if (shouldSkipPackage.shouldSkipPackage(pkg, { + ignore: config.ignore, + allowPrivatePackages: config.privatePackages.version + })) continue; + preVersions.set(pkg.packageJson.name, getPreVersion(pkg.packageJson.version)); + } + for (let fixedGroup of config.fixed) { + let highestPreVersion = getHighestPreVersion("fixed", fixedGroup, packagesByName); + for (let fixedPackage of fixedGroup) preVersions.set(fixedPackage, highestPreVersion); + } + for (let linkedGroup of config.linked) { + let highestPreVersion = getHighestPreVersion("linked", linkedGroup, packagesByName); + for (let linkedPackage of linkedGroup) preVersions.set(linkedPackage, highestPreVersion); + } + return { + state: updatedPreState, + preVersions + }; + } + exports["default"] = assembleReleasePlan; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@6.0.10/node_modules/@changesets/assemble-release-plan/dist/changesets-assemble-release-plan.cjs.default.js +var require_changesets_assemble_release_plan_cjs_default = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports._default = require_changesets_assemble_release_plan_cjs().default; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@6.0.10/node_modules/@changesets/assemble-release-plan/dist/changesets-assemble-release-plan.cjs.mjs +var changesets_assemble_release_plan_cjs_exports = /* @__PURE__ */ __exportAll({ default: () => import_changesets_assemble_release_plan_cjs_default._default }), import_changesets_assemble_release_plan_cjs_default; +var init_changesets_assemble_release_plan_cjs = __esmMin((() => { + require_changesets_assemble_release_plan_cjs(); + import_changesets_assemble_release_plan_cjs_default = require_changesets_assemble_release_plan_cjs_default(); +})); +//#endregion +//#region ../../node_modules/.pnpm/universalify@0.1.2/node_modules/universalify/index.js +var require_universalify = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports.fromCallback = function(fn) { + return Object.defineProperty(function() { + if (typeof arguments[arguments.length - 1] === "function") fn.apply(this, arguments); + else return new Promise((resolve, reject) => { + arguments[arguments.length] = (err, res) => { + if (err) return reject(err); + resolve(res); + }; + arguments.length++; + fn.apply(this, arguments); + }); + }, "name", { value: fn.name }); + }; + exports.fromPromise = function(fn) { + return Object.defineProperty(function() { + const cb = arguments[arguments.length - 1]; + if (typeof cb !== "function") return fn.apply(this, arguments); + else fn.apply(this, arguments).then((r) => cb(null, r), cb); + }, "name", { value: fn.name }); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +var require_polyfills = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var constants$1 = __require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) {} + if (typeof process.chdir === "function") { + var chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + module.exports = patch; + function patch(fs) { + if (constants$1.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs); + if (!fs.lutimes) patchLutimes(fs); + fs.chown = chownFix(fs.chown); + fs.fchown = chownFix(fs.fchown); + fs.lchown = chownFix(fs.lchown); + fs.chmod = chmodFix(fs.chmod); + fs.fchmod = chmodFix(fs.fchmod); + fs.lchmod = chmodFix(fs.lchmod); + fs.chownSync = chownFixSync(fs.chownSync); + fs.fchownSync = chownFixSync(fs.fchownSync); + fs.lchownSync = chownFixSync(fs.lchownSync); + fs.chmodSync = chmodFixSync(fs.chmodSync); + fs.fchmodSync = chmodFixSync(fs.fchmodSync); + fs.lchmodSync = chmodFixSync(fs.lchmodSync); + fs.stat = statFix(fs.stat); + fs.fstat = statFix(fs.fstat); + fs.lstat = statFix(fs.lstat); + fs.statSync = statFixSync(fs.statSync); + fs.fstatSync = statFixSync(fs.fstatSync); + fs.lstatSync = statFixSync(fs.lstatSync); + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function(path, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchmodSync = function() {}; + } + if (fs.chown && !fs.lchown) { + fs.lchown = function(path, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchownSync = function() {}; + } + if (platform === "win32") fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { + setTimeout(function() { + fs.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); + else cb(er); + }); + }, backoff); + if (backoff < 100) backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs.rename); + fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs.read); + fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) try { + return fs$readSync.call(fs, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + }; + })(fs.readSync); + function patchLchmod(fs) { + fs.lchmod = function(path, mode, callback) { + fs.open(path, constants$1.O_WRONLY | constants$1.O_SYMLINK, mode, function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs.fchmod(fd, mode, function(err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2); + }); + }); + }); + }; + fs.lchmodSync = function(path, mode) { + var fd = fs.openSync(path, constants$1.O_WRONLY | constants$1.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) try { + fs.closeSync(fd); + } catch (er) {} + else fs.closeSync(fd); + } + return ret; + }; + } + function patchLutimes(fs) { + if (constants$1.hasOwnProperty("O_SYMLINK") && fs.futimes) { + fs.lutimes = function(path, at, mt, cb) { + fs.open(path, constants$1.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs.futimes(fd, at, mt, function(er) { + fs.close(fd, function(er2) { + if (cb) cb(er || er2); + }); + }); + }); + }; + fs.lutimesSync = function(path, at, mt) { + var fd = fs.openSync(path, constants$1.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) try { + fs.closeSync(fd); + } catch (er) {} + else fs.closeSync(fd); + } + return ret; + }; + } else if (fs.futimes) { + fs.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs.lutimesSync = function() {}; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) return true; + if (er.code === "ENOSYS") return true; + if (!process.getuid || process.getuid() !== 0) { + if (er.code === "EINVAL" || er.code === "EPERM") return true; + } + return false; + } + } +})); +//#endregion +//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Stream = __require("stream").Stream; + module.exports = legacy; + function legacy(fs) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + Stream.call(this); + var self = this; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) throw TypeError("start must be a Number"); + if (this.end === void 0) this.end = Infinity; + else if ("number" !== typeof this.end) throw TypeError("end must be a Number"); + if (this.start > this.end) throw new Error("start must be <= end"); + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self.emit("error", err); + self.readable = false; + return; + } + self.fd = fd; + self.emit("open", fd); + self._read(); + }); + } + function WriteStream(path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + Stream.call(this); + this.path = path; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) throw TypeError("start must be a Number"); + if (this.start < 0) throw new Error("start must be >= zero"); + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs.open; + this._queue.push([ + this._open, + this.path, + this.flags, + this.mode, + void 0 + ]); + this.flush(); + } + } + } +})); +//#endregion +//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +var require_clone = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") return obj; + if (obj instanceof Object) var copy = { __proto__: getPrototypeOf(obj) }; + else var copy = Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var fs$14 = __require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util$3 = __require("util"); + /* istanbul ignore next - node 0.x polyfill */ + var gracefulQueue; + var previousSymbol; + /* istanbul ignore else - node 0.x polyfill */ + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() {} + function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { get: function() { + return queue; + } }); + } + var debug = noop; + if (util$3.debuglog) debug = util$3.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) debug = function() { + var m = util$3.format.apply(util$3, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs$14[gracefulQueue]) { + publishQueue(fs$14, global[gracefulQueue] || []); + fs$14.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs$14, fd, function(err) { + if (!err) resetQueue(); + if (typeof cb === "function") cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { value: fs$close }); + return close; + })(fs$14.close); + fs$14.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs$14, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); + return closeSync; + })(fs$14.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() { + debug(fs$14[gracefulQueue]); + __require("assert").equal(fs$14[gracefulQueue].length, 0); + }); + } + if (!global[gracefulQueue]) publishQueue(global, fs$14[gracefulQueue]); + module.exports = patch(clone(fs$14)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$14.__patched) { + module.exports = patch(fs$14); + fs$14.__patched = true; + } + function patch(fs) { + polyfills(fs); + fs.gracefulify = patch; + fs.createReadStream = createReadStream; + fs.createWriteStream = createWriteStream; + var fs$readFile = fs.readFile; + fs.readFile = readFile; + function readFile(path, options, cb) { + if (typeof options === "function") cb = options, options = null; + return go$readFile(path, options, cb); + function go$readFile(path, options, cb, startTime) { + return fs$readFile(path, options, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$readFile, + [ + path, + options, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else if (typeof cb === "function") cb.apply(this, arguments); + }); + } + } + var fs$writeFile = fs.writeFile; + fs.writeFile = writeFile; + function writeFile(path, data, options, cb) { + if (typeof options === "function") cb = options, options = null; + return go$writeFile(path, data, options, cb); + function go$writeFile(path, data, options, cb, startTime) { + return fs$writeFile(path, data, options, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$writeFile, + [ + path, + data, + options, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else if (typeof cb === "function") cb.apply(this, arguments); + }); + } + } + var fs$appendFile = fs.appendFile; + if (fs$appendFile) fs.appendFile = appendFile; + function appendFile(path, data, options, cb) { + if (typeof options === "function") cb = options, options = null; + return go$appendFile(path, data, options, cb); + function go$appendFile(path, data, options, cb, startTime) { + return fs$appendFile(path, data, options, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$appendFile, + [ + path, + data, + options, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else if (typeof cb === "function") cb.apply(this, arguments); + }); + } + } + var fs$copyFile = fs.copyFile; + if (fs$copyFile) fs.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$copyFile, + [ + src, + dest, + flags, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else if (typeof cb === "function") cb.apply(this, arguments); + }); + } + } + var fs$readdir = fs.readdir; + fs.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path, options, cb) { + if (typeof options === "function") cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir(path, options, cb, startTime) { + return fs$readdir(path, fs$readdirCallback(path, options, cb, startTime)); + } : function go$readdir(path, options, cb, startTime) { + return fs$readdir(path, options, fs$readdirCallback(path, options, cb, startTime)); + }; + return go$readdir(path, options, cb); + function fs$readdirCallback(path, options, cb, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$readdir, + [ + path, + options, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) files.sort(); + if (typeof cb === "function") cb.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path, options) { + if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; + else return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path, options) { + if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; + else return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path, options) { + return new fs.ReadStream(path, options); + } + function createWriteStream(path, options) { + return new fs.WriteStream(path, options); + } + var fs$open = fs.open; + fs.open = open; + function open(path, flags, mode, cb) { + if (typeof mode === "function") cb = mode, mode = null; + return go$open(path, flags, mode, cb); + function go$open(path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ + go$open, + [ + path, + flags, + mode, + cb + ], + err, + startTime || Date.now(), + Date.now() + ]); + else if (typeof cb === "function") cb.apply(this, arguments); + }); + } + } + return fs; + } + function enqueue(elem) { + debug("ENQUEUE", elem[0].name, elem[1]); + fs$14[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs$14[gracefulQueue].length; ++i) if (fs$14[gracefulQueue][i].length > 2) { + fs$14[gracefulQueue][i][3] = now; + fs$14[gracefulQueue][i][4] = now; + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs$14[gracefulQueue].length === 0) return; + var elem = fs$14[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) { + debug("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else fs$14[gracefulQueue].push(elem); + } + if (retryTimer === void 0) retryTimer = setTimeout(retry, 0); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/fs/index.js +var require_fs$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const api = [ + "access", + "appendFile", + "chmod", + "chown", + "close", + "copyFile", + "fchmod", + "fchown", + "fdatasync", + "fstat", + "fsync", + "ftruncate", + "futimes", + "lchown", + "lchmod", + "link", + "lstat", + "mkdir", + "mkdtemp", + "open", + "readFile", + "readdir", + "readlink", + "realpath", + "rename", + "rmdir", + "stat", + "symlink", + "truncate", + "unlink", + "utimes", + "writeFile" + ].filter((key) => { + return typeof fs[key] === "function"; + }); + Object.keys(fs).forEach((key) => { + if (key === "promises") return; + exports[key] = fs[key]; + }); + api.forEach((method) => { + exports[method] = u(fs[method]); + }); + exports.exists = function(filename, callback) { + if (typeof callback === "function") return fs.exists(filename, callback); + return new Promise((resolve) => { + return fs.exists(filename, resolve); + }); + }; + exports.read = function(fd, buffer, offset, length, position, callback) { + if (typeof callback === "function") return fs.read(fd, buffer, offset, length, position, callback); + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { + if (err) return reject(err); + resolve({ + bytesRead, + buffer + }); + }); + }); + }; + exports.write = function(fd, buffer, ...args) { + if (typeof args[args.length - 1] === "function") return fs.write(fd, buffer, ...args); + return new Promise((resolve, reject) => { + fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { + if (err) return reject(err); + resolve({ + bytesWritten, + buffer + }); + }); + }); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/win32.js +var require_win32$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$57 = __require("path"); + function getRootPath(p) { + p = path$57.normalize(path$57.resolve(p)).split(path$57.sep); + if (p.length > 0) return p[0]; + return null; + } + const INVALID_PATH_CHARS = /[<>:"|?*]/; + function invalidWin32Path(p) { + const rp = getRootPath(p); + p = p.replace(rp, ""); + return INVALID_PATH_CHARS.test(p); + } + module.exports = { + getRootPath, + invalidWin32Path + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs.js +var require_mkdirs$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$56 = __require("path"); + const invalidWin32Path = require_win32$1().invalidWin32Path; + const o777 = parseInt("0777", 8); + function mkdirs(p, opts, callback, made) { + if (typeof opts === "function") { + callback = opts; + opts = {}; + } else if (!opts || typeof opts !== "object") opts = { mode: opts }; + if (process.platform === "win32" && invalidWin32Path(p)) { + const errInval = /* @__PURE__ */ new Error(p + " contains invalid WIN32 path characters."); + errInval.code = "EINVAL"; + return callback(errInval); + } + let mode = opts.mode; + const xfs = opts.fs || fs; + if (mode === void 0) mode = o777 & ~process.umask(); + if (!made) made = null; + callback = callback || function() {}; + p = path$56.resolve(p); + xfs.mkdir(p, mode, (er) => { + if (!er) { + made = made || p; + return callback(null, made); + } + switch (er.code) { + case "ENOENT": + if (path$56.dirname(p) === p) return callback(er); + mkdirs(path$56.dirname(p), opts, (er, made) => { + if (er) callback(er, made); + else mkdirs(p, opts, callback, made); + }); + break; + default: + xfs.stat(p, (er2, stat) => { + if (er2 || !stat.isDirectory()) callback(er, made); + else callback(null, made); + }); + break; + } + }); + } + module.exports = mkdirs; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +var require_mkdirs_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$55 = __require("path"); + const invalidWin32Path = require_win32$1().invalidWin32Path; + const o777 = parseInt("0777", 8); + function mkdirsSync(p, opts, made) { + if (!opts || typeof opts !== "object") opts = { mode: opts }; + let mode = opts.mode; + const xfs = opts.fs || fs; + if (process.platform === "win32" && invalidWin32Path(p)) { + const errInval = /* @__PURE__ */ new Error(p + " contains invalid WIN32 path characters."); + errInval.code = "EINVAL"; + throw errInval; + } + if (mode === void 0) mode = o777 & ~process.umask(); + if (!made) made = null; + p = path$55.resolve(p); + try { + xfs.mkdirSync(p, mode); + made = made || p; + } catch (err0) { + if (err0.code === "ENOENT") { + if (path$55.dirname(p) === p) throw err0; + made = mkdirsSync(path$55.dirname(p), opts, made); + mkdirsSync(p, opts, made); + } else { + let stat; + try { + stat = xfs.statSync(p); + } catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + } + } + return made; + } + module.exports = mkdirsSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/index.js +var require_mkdirs$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const mkdirs = u(require_mkdirs$3()); + const mkdirsSync = require_mkdirs_sync$1(); + module.exports = { + mkdirs, + mkdirsSync, + mkdirp: mkdirs, + mkdirpSync: mkdirsSync, + ensureDir: mkdirs, + ensureDirSync: mkdirsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/util/utimes.js +var require_utimes$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const os$4 = __require("os"); + const path$54 = __require("path"); + function hasMillisResSync() { + let tmpfile = path$54.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2)); + tmpfile = path$54.join(os$4.tmpdir(), tmpfile); + const d = /* @__PURE__ */ new Date(1435410243862); + fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141"); + const fd = fs.openSync(tmpfile, "r+"); + fs.futimesSync(fd, d, d); + fs.closeSync(fd); + return fs.statSync(tmpfile).mtime > 1435410243e3; + } + function hasMillisRes(callback) { + let tmpfile = path$54.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2)); + tmpfile = path$54.join(os$4.tmpdir(), tmpfile); + const d = /* @__PURE__ */ new Date(1435410243862); + fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => { + if (err) return callback(err); + fs.open(tmpfile, "r+", (err, fd) => { + if (err) return callback(err); + fs.futimes(fd, d, d, (err) => { + if (err) return callback(err); + fs.close(fd, (err) => { + if (err) return callback(err); + fs.stat(tmpfile, (err, stats) => { + if (err) return callback(err); + callback(null, stats.mtime > 1435410243e3); + }); + }); + }); + }); + }); + } + function timeRemoveMillis(timestamp) { + if (typeof timestamp === "number") return Math.floor(timestamp / 1e3) * 1e3; + else if (timestamp instanceof Date) return /* @__PURE__ */ new Date(Math.floor(timestamp.getTime() / 1e3) * 1e3); + else throw new Error("fs-extra: timeRemoveMillis() unknown parameter type"); + } + function utimesMillis(path, atime, mtime, callback) { + fs.open(path, "r+", (err, fd) => { + if (err) return callback(err); + fs.futimes(fd, atime, mtime, (futimesErr) => { + fs.close(fd, (closeErr) => { + if (callback) callback(futimesErr || closeErr); + }); + }); + }); + } + function utimesMillisSync(path, atime, mtime) { + const fd = fs.openSync(path, "r+"); + fs.futimesSync(fd, atime, mtime); + return fs.closeSync(fd); + } + module.exports = { + hasMillisRes, + hasMillisResSync, + timeRemoveMillis, + utimesMillis, + utimesMillisSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/util/buffer.js +var require_buffer$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = function(size) { + if (typeof Buffer.allocUnsafe === "function") try { + return Buffer.allocUnsafe(size); + } catch (e) { + return new Buffer(size); + } + return new Buffer(size); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy-sync/copy-sync.js +var require_copy_sync$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$53 = __require("path"); + const mkdirpSync = require_mkdirs$2().mkdirsSync; + const utimesSync = require_utimes$1().utimesMillisSync; + const notExist = Symbol("notExist"); + function copySync(src, dest, opts) { + if (typeof opts === "function") opts = { filter: opts }; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`); + const destStat = checkPaths(src, dest); + if (opts.filter && !opts.filter(src, dest)) return; + const destParent = path$53.dirname(dest); + if (!fs.existsSync(destParent)) mkdirpSync(destParent); + return startCopy(destStat, src, dest, opts); + } + function startCopy(destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return; + return getStats(destStat, src, dest, opts); + } + function getStats(destStat, src, dest, opts) { + const srcStat = (opts.dereference ? fs.statSync : fs.lstatSync)(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + } + function onFile(srcStat, destStat, src, dest, opts) { + if (destStat === notExist) return copyFile(srcStat, src, dest, opts); + return mayCopyFile(srcStat, src, dest, opts); + } + function mayCopyFile(srcStat, src, dest, opts) { + if (opts.overwrite) { + fs.unlinkSync(dest); + return copyFile(srcStat, src, dest, opts); + } else if (opts.errorOnExist) throw new Error(`'${dest}' already exists`); + } + function copyFile(srcStat, src, dest, opts) { + if (typeof fs.copyFileSync === "function") { + fs.copyFileSync(src, dest); + fs.chmodSync(dest, srcStat.mode); + if (opts.preserveTimestamps) return utimesSync(dest, srcStat.atime, srcStat.mtime); + return; + } + return copyFileFallback(srcStat, src, dest, opts); + } + function copyFileFallback(srcStat, src, dest, opts) { + const BUF_LENGTH = 64 * 1024; + const _buff = require_buffer$1()(BUF_LENGTH); + const fdr = fs.openSync(src, "r"); + const fdw = fs.openSync(dest, "w", srcStat.mode); + let pos = 0; + while (pos < srcStat.size) { + const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos); + fs.writeSync(fdw, _buff, 0, bytesRead); + pos += bytesRead; + } + if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime); + fs.closeSync(fdr); + fs.closeSync(fdw); + } + function onDir(srcStat, destStat, src, dest, opts) { + if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts); + if (destStat && !destStat.isDirectory()) throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + return copyDir(src, dest, opts); + } + function mkDirAndCopy(srcStat, src, dest, opts) { + fs.mkdirSync(dest); + copyDir(src, dest, opts); + return fs.chmodSync(dest, srcStat.mode); + } + function copyDir(src, dest, opts) { + fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts)); + } + function copyDirItem(item, src, dest, opts) { + const srcItem = path$53.join(src, item); + const destItem = path$53.join(dest, item); + return startCopy(checkPaths(srcItem, destItem), srcItem, destItem, opts); + } + function onLink(destStat, src, dest, opts) { + let resolvedSrc = fs.readlinkSync(src); + if (opts.dereference) resolvedSrc = path$53.resolve(process.cwd(), resolvedSrc); + if (destStat === notExist) return fs.symlinkSync(resolvedSrc, dest); + else { + let resolvedDest; + try { + resolvedDest = fs.readlinkSync(dest); + } catch (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest); + throw err; + } + if (opts.dereference) resolvedDest = path$53.resolve(process.cwd(), resolvedDest); + if (isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + return copyLink(resolvedSrc, dest); + } + } + function copyLink(resolvedSrc, dest) { + fs.unlinkSync(dest); + return fs.symlinkSync(resolvedSrc, dest); + } + function isSrcSubdir(src, dest) { + const srcArray = path$53.resolve(src).split(path$53.sep); + const destArray = path$53.resolve(dest).split(path$53.sep); + return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true); + } + function checkStats(src, dest) { + const srcStat = fs.statSync(src); + let destStat; + try { + destStat = fs.statSync(dest); + } catch (err) { + if (err.code === "ENOENT") return { + srcStat, + destStat: notExist + }; + throw err; + } + return { + srcStat, + destStat + }; + } + function checkPaths(src, dest) { + const { srcStat, destStat } = checkStats(src, dest); + if (destStat.ino && destStat.ino === srcStat.ino) throw new Error("Source and destination must not be the same."); + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`); + return destStat; + } + module.exports = copySync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy-sync/index.js +var require_copy_sync$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { copySync: require_copy_sync$3() }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/path-exists/index.js +var require_path_exists$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromPromise; + const fs = require_fs$5(); + function pathExists(path) { + return fs.access(path).then(() => true).catch(() => false); + } + module.exports = { + pathExists: u(pathExists), + pathExistsSync: fs.existsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy/copy.js +var require_copy$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$52 = __require("path"); + const mkdirp = require_mkdirs$2().mkdirs; + const pathExists = require_path_exists$2().pathExists; + const utimes = require_utimes$1().utimesMillis; + const notExist = Symbol("notExist"); + function copy(src, dest, opts, cb) { + if (typeof opts === "function" && !cb) { + cb = opts; + opts = {}; + } else if (typeof opts === "function") opts = { filter: opts }; + cb = cb || function() {}; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`); + checkPaths(src, dest, (err, destStat) => { + if (err) return cb(err); + if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb); + return checkParentDir(destStat, src, dest, opts, cb); + }); + } + function checkParentDir(destStat, src, dest, opts, cb) { + const destParent = path$52.dirname(dest); + pathExists(destParent, (err, dirExists) => { + if (err) return cb(err); + if (dirExists) return startCopy(destStat, src, dest, opts, cb); + mkdirp(destParent, (err) => { + if (err) return cb(err); + return startCopy(destStat, src, dest, opts, cb); + }); + }); + } + function handleFilter(onInclude, destStat, src, dest, opts, cb) { + Promise.resolve(opts.filter(src, dest)).then((include) => { + if (include) { + if (destStat) return onInclude(destStat, src, dest, opts, cb); + return onInclude(src, dest, opts, cb); + } + return cb(); + }, (error) => cb(error)); + } + function startCopy(destStat, src, dest, opts, cb) { + if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb); + return getStats(destStat, src, dest, opts, cb); + } + function getStats(destStat, src, dest, opts, cb) { + (opts.dereference ? fs.stat : fs.lstat)(src, (err, srcStat) => { + if (err) return cb(err); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); + }); + } + function onFile(srcStat, destStat, src, dest, opts, cb) { + if (destStat === notExist) return copyFile(srcStat, src, dest, opts, cb); + return mayCopyFile(srcStat, src, dest, opts, cb); + } + function mayCopyFile(srcStat, src, dest, opts, cb) { + if (opts.overwrite) fs.unlink(dest, (err) => { + if (err) return cb(err); + return copyFile(srcStat, src, dest, opts, cb); + }); + else if (opts.errorOnExist) return cb(/* @__PURE__ */ new Error(`'${dest}' already exists`)); + else return cb(); + } + function copyFile(srcStat, src, dest, opts, cb) { + if (typeof fs.copyFile === "function") return fs.copyFile(src, dest, (err) => { + if (err) return cb(err); + return setDestModeAndTimestamps(srcStat, dest, opts, cb); + }); + return copyFileFallback(srcStat, src, dest, opts, cb); + } + function copyFileFallback(srcStat, src, dest, opts, cb) { + const rs = fs.createReadStream(src); + rs.on("error", (err) => cb(err)).once("open", () => { + const ws = fs.createWriteStream(dest, { mode: srcStat.mode }); + ws.on("error", (err) => cb(err)).on("open", () => rs.pipe(ws)).once("close", () => setDestModeAndTimestamps(srcStat, dest, opts, cb)); + }); + } + function setDestModeAndTimestamps(srcStat, dest, opts, cb) { + fs.chmod(dest, srcStat.mode, (err) => { + if (err) return cb(err); + if (opts.preserveTimestamps) return utimes(dest, srcStat.atime, srcStat.mtime, cb); + return cb(); + }); + } + function onDir(srcStat, destStat, src, dest, opts, cb) { + if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts, cb); + if (destStat && !destStat.isDirectory()) return cb(/* @__PURE__ */ new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)); + return copyDir(src, dest, opts, cb); + } + function mkDirAndCopy(srcStat, src, dest, opts, cb) { + fs.mkdir(dest, (err) => { + if (err) return cb(err); + copyDir(src, dest, opts, (err) => { + if (err) return cb(err); + return fs.chmod(dest, srcStat.mode, cb); + }); + }); + } + function copyDir(src, dest, opts, cb) { + fs.readdir(src, (err, items) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + } + function copyDirItems(items, src, dest, opts, cb) { + const item = items.pop(); + if (!item) return cb(); + return copyDirItem(items, item, src, dest, opts, cb); + } + function copyDirItem(items, item, src, dest, opts, cb) { + const srcItem = path$52.join(src, item); + const destItem = path$52.join(dest, item); + checkPaths(srcItem, destItem, (err, destStat) => { + if (err) return cb(err); + startCopy(destStat, srcItem, destItem, opts, (err) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + }); + } + function onLink(destStat, src, dest, opts, cb) { + fs.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err); + if (opts.dereference) resolvedSrc = path$52.resolve(process.cwd(), resolvedSrc); + if (destStat === notExist) return fs.symlink(resolvedSrc, dest, cb); + else fs.readlink(dest, (err, resolvedDest) => { + if (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb); + return cb(err); + } + if (opts.dereference) resolvedDest = path$52.resolve(process.cwd(), resolvedDest); + if (isSrcSubdir(resolvedSrc, resolvedDest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)); + if (destStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) return cb(/* @__PURE__ */ new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)); + return copyLink(resolvedSrc, dest, cb); + }); + }); + } + function copyLink(resolvedSrc, dest, cb) { + fs.unlink(dest, (err) => { + if (err) return cb(err); + return fs.symlink(resolvedSrc, dest, cb); + }); + } + function isSrcSubdir(src, dest) { + const srcArray = path$52.resolve(src).split(path$52.sep); + const destArray = path$52.resolve(dest).split(path$52.sep); + return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true); + } + function checkStats(src, dest, cb) { + fs.stat(src, (err, srcStat) => { + if (err) return cb(err); + fs.stat(dest, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(null, { + srcStat, + destStat: notExist + }); + return cb(err); + } + return cb(null, { + srcStat, + destStat + }); + }); + }); + } + function checkPaths(src, dest, cb) { + checkStats(src, dest, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + if (destStat.ino && destStat.ino === srcStat.ino) return cb(/* @__PURE__ */ new Error("Source and destination must not be the same.")); + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)); + return cb(null, destStat); + }); + } + module.exports = copy; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy/index.js +var require_copy$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + module.exports = { copy: u(require_copy$3()) }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/remove/rimraf.js +var require_rimraf$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$51 = __require("path"); + const assert$1 = __require("assert"); + const isWindows = process.platform === "win32"; + function defaults(options) { + [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ].forEach((m) => { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + } + function rimraf(p, options, cb) { + let busyTries = 0; + if (typeof options === "function") { + cb = options; + options = {}; + } + assert$1(p, "rimraf: missing path"); + assert$1.strictEqual(typeof p, "string", "rimraf: path should be a string"); + assert$1.strictEqual(typeof cb, "function", "rimraf: callback function required"); + assert$1(options, "rimraf: invalid options argument provided"); + assert$1.strictEqual(typeof options, "object", "rimraf: options should be object"); + defaults(options); + rimraf_(p, options, function CB(er) { + if (er) { + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + const time = busyTries * 100; + return setTimeout(() => rimraf_(p, options, CB), time); + } + if (er.code === "ENOENT") er = null; + } + cb(er); + }); + } + function rimraf_(p, options, cb) { + assert$1(p); + assert$1(options); + assert$1(typeof cb === "function"); + options.lstat(p, (er, st) => { + if (er && er.code === "ENOENT") return cb(null); + if (er && er.code === "EPERM" && isWindows) return fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) return rmdir(p, options, er, cb); + options.unlink(p, (er) => { + if (er) { + if (er.code === "ENOENT") return cb(null); + if (er.code === "EPERM") return isWindows ? fixWinEPERM(p, options, er, cb) : rmdir(p, options, er, cb); + if (er.code === "EISDIR") return rmdir(p, options, er, cb); + } + return cb(er); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert$1(p); + assert$1(options); + assert$1(typeof cb === "function"); + if (er) assert$1(er instanceof Error); + options.chmod(p, 438, (er2) => { + if (er2) cb(er2.code === "ENOENT" ? null : er); + else options.stat(p, (er3, stats) => { + if (er3) cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) rmdir(p, options, er, cb); + else options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + let stats; + assert$1(p); + assert$1(options); + if (er) assert$1(er instanceof Error); + try { + options.chmodSync(p, 438); + } catch (er2) { + if (er2.code === "ENOENT") return; + else throw er; + } + try { + stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") return; + else throw er; + } + if (stats.isDirectory()) rmdirSync(p, options, er); + else options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert$1(p); + assert$1(options); + if (originalEr) assert$1(originalEr instanceof Error); + assert$1(typeof cb === "function"); + options.rmdir(p, (er) => { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") cb(originalEr); + else cb(er); + }); + } + function rmkids(p, options, cb) { + assert$1(p); + assert$1(options); + assert$1(typeof cb === "function"); + options.readdir(p, (er, files) => { + if (er) return cb(er); + let n = files.length; + let errState; + if (n === 0) return options.rmdir(p, cb); + files.forEach((f) => { + rimraf(path$51.join(p, f), options, (er) => { + if (errState) return; + if (er) return cb(errState = er); + if (--n === 0) options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + let st; + options = options || {}; + defaults(options); + assert$1(p, "rimraf: missing path"); + assert$1.strictEqual(typeof p, "string", "rimraf: path should be a string"); + assert$1(options, "rimraf: missing options"); + assert$1.strictEqual(typeof options, "object", "rimraf: options should be object"); + try { + st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") return; + if (er.code === "EPERM" && isWindows) fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) rmdirSync(p, options, null); + else options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") return; + else if (er.code === "EPERM") return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + else if (er.code !== "EISDIR") throw er; + rmdirSync(p, options, er); + } + } + function rmdirSync(p, options, originalEr) { + assert$1(p); + assert$1(options); + if (originalEr) assert$1(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOTDIR") throw originalEr; + else if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") rmkidsSync(p, options); + else if (er.code !== "ENOENT") throw er; + } + } + function rmkidsSync(p, options) { + assert$1(p); + assert$1(options); + options.readdirSync(p).forEach((f) => rimrafSync(path$51.join(p, f), options)); + if (isWindows) { + const startTime = Date.now(); + do + try { + return options.rmdirSync(p, options); + } catch (er) {} + while (Date.now() - startTime < 500); + } else return options.rmdirSync(p, options); + } + module.exports = rimraf; + rimraf.sync = rimrafSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/remove/index.js +var require_remove$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const rimraf = require_rimraf$1(); + module.exports = { + remove: u(rimraf), + removeSync: rimraf.sync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/empty/index.js +var require_empty$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const fs$13 = __require("fs"); + const path$50 = __require("path"); + const mkdir = require_mkdirs$2(); + const remove = require_remove$1(); + const emptyDir = u(function emptyDir(dir, callback) { + callback = callback || function() {}; + fs$13.readdir(dir, (err, items) => { + if (err) return mkdir.mkdirs(dir, callback); + items = items.map((item) => path$50.join(dir, item)); + deleteItem(); + function deleteItem() { + const item = items.pop(); + if (!item) return callback(); + remove.remove(item, (err) => { + if (err) return callback(err); + deleteItem(); + }); + } + }); + }); + function emptyDirSync(dir) { + let items; + try { + items = fs$13.readdirSync(dir); + } catch (err) { + return mkdir.mkdirsSync(dir); + } + items.forEach((item) => { + item = path$50.join(dir, item); + remove.removeSync(item); + }); + } + module.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/file.js +var require_file$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$49 = __require("path"); + const fs = require_graceful_fs(); + const mkdir = require_mkdirs$2(); + const pathExists = require_path_exists$2().pathExists; + function createFile(file, callback) { + function makeFile() { + fs.writeFile(file, "", (err) => { + if (err) return callback(err); + callback(); + }); + } + fs.stat(file, (err, stats) => { + if (!err && stats.isFile()) return callback(); + const dir = path$49.dirname(file); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return makeFile(); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + makeFile(); + }); + }); + }); + } + function createFileSync(file) { + let stats; + try { + stats = fs.statSync(file); + } catch (e) {} + if (stats && stats.isFile()) return; + const dir = path$49.dirname(file); + if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir); + fs.writeFileSync(file, ""); + } + module.exports = { + createFile: u(createFile), + createFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/link.js +var require_link$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$48 = __require("path"); + const fs = require_graceful_fs(); + const mkdir = require_mkdirs$2(); + const pathExists = require_path_exists$2().pathExists; + function createLink(srcpath, dstpath, callback) { + function makeLink(srcpath, dstpath) { + fs.link(srcpath, dstpath, (err) => { + if (err) return callback(err); + callback(null); + }); + } + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err); + if (destinationExists) return callback(null); + fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureLink"); + return callback(err); + } + const dir = path$48.dirname(dstpath); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return makeLink(srcpath, dstpath); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + makeLink(srcpath, dstpath); + }); + }); + }); + }); + } + function createLinkSync(srcpath, dstpath) { + if (fs.existsSync(dstpath)) return void 0; + try { + fs.lstatSync(srcpath); + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + const dir = path$48.dirname(dstpath); + if (fs.existsSync(dir)) return fs.linkSync(srcpath, dstpath); + mkdir.mkdirsSync(dir); + return fs.linkSync(srcpath, dstpath); + } + module.exports = { + createLink: u(createLink), + createLinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-paths.js +var require_symlink_paths$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$47 = __require("path"); + const fs = require_graceful_fs(); + const pathExists = require_path_exists$2().pathExists; + /** + * Function that returns two types of paths, one relative to symlink, and one + * relative to the current working directory. Checks if path is absolute or + * relative. If the path is relative, this function checks if the path is + * relative to symlink or relative to current working directory. This is an + * initiative to find a smarter `srcpath` to supply when building symlinks. + * This allows you to determine which path to use out of one of three possible + * types of source paths. The first is an absolute path. This is detected by + * `path.isAbsolute()`. When an absolute path is provided, it is checked to + * see if it exists. If it does it's used, if not an error is returned + * (callback)/ thrown (sync). The other two options for `srcpath` are a + * relative url. By default Node's `fs.symlink` works by creating a symlink + * using `dstpath` and expects the `srcpath` to be relative to the newly + * created symlink. If you provide a `srcpath` that does not exist on the file + * system it results in a broken symlink. To minimize this, the function + * checks to see if the 'relative to symlink' source file exists, and if it + * does it will use it. If it does not, it checks if there's a file that + * exists that is relative to the current working directory, if does its used. + * This preserves the expectations of the original fs.symlink spec and adds + * the ability to pass in `relative to current working direcotry` paths. + */ + function symlinkPaths(srcpath, dstpath, callback) { + if (path$47.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + "toCwd": srcpath, + "toDst": srcpath + }); + }); + else { + const dstdir = path$47.dirname(dstpath); + const relativeToDst = path$47.join(dstdir, srcpath); + return pathExists(relativeToDst, (err, exists) => { + if (err) return callback(err); + if (exists) return callback(null, { + "toCwd": relativeToDst, + "toDst": srcpath + }); + else return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + "toCwd": srcpath, + "toDst": path$47.relative(dstdir, srcpath) + }); + }); + }); + } + } + function symlinkPathsSync(srcpath, dstpath) { + let exists; + if (path$47.isAbsolute(srcpath)) { + exists = fs.existsSync(srcpath); + if (!exists) throw new Error("absolute srcpath does not exist"); + return { + "toCwd": srcpath, + "toDst": srcpath + }; + } else { + const dstdir = path$47.dirname(dstpath); + const relativeToDst = path$47.join(dstdir, srcpath); + exists = fs.existsSync(relativeToDst); + if (exists) return { + "toCwd": relativeToDst, + "toDst": srcpath + }; + else { + exists = fs.existsSync(srcpath); + if (!exists) throw new Error("relative srcpath does not exist"); + return { + "toCwd": srcpath, + "toDst": path$47.relative(dstdir, srcpath) + }; + } + } + } + module.exports = { + symlinkPaths, + symlinkPathsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-type.js +var require_symlink_type$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + function symlinkType(srcpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + if (type) return callback(null, type); + fs.lstat(srcpath, (err, stats) => { + if (err) return callback(null, "file"); + type = stats && stats.isDirectory() ? "dir" : "file"; + callback(null, type); + }); + } + function symlinkTypeSync(srcpath, type) { + let stats; + if (type) return type; + try { + stats = fs.lstatSync(srcpath); + } catch (e) { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + module.exports = { + symlinkType, + symlinkTypeSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink.js +var require_symlink$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$46 = __require("path"); + const fs = require_graceful_fs(); + const _mkdirs = require_mkdirs$2(); + const mkdirs = _mkdirs.mkdirs; + const mkdirsSync = _mkdirs.mkdirsSync; + const _symlinkPaths = require_symlink_paths$1(); + const symlinkPaths = _symlinkPaths.symlinkPaths; + const symlinkPathsSync = _symlinkPaths.symlinkPathsSync; + const _symlinkType = require_symlink_type$1(); + const symlinkType = _symlinkType.symlinkType; + const symlinkTypeSync = _symlinkType.symlinkTypeSync; + const pathExists = require_path_exists$2().pathExists; + function createSymlink(srcpath, dstpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err); + if (destinationExists) return callback(null); + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err); + srcpath = relative.toDst; + symlinkType(relative.toCwd, type, (err, type) => { + if (err) return callback(err); + const dir = path$46.dirname(dstpath); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return fs.symlink(srcpath, dstpath, type, callback); + mkdirs(dir, (err) => { + if (err) return callback(err); + fs.symlink(srcpath, dstpath, type, callback); + }); + }); + }); + }); + }); + } + function createSymlinkSync(srcpath, dstpath, type) { + if (fs.existsSync(dstpath)) return void 0; + const relative = symlinkPathsSync(srcpath, dstpath); + srcpath = relative.toDst; + type = symlinkTypeSync(relative.toCwd, type); + const dir = path$46.dirname(dstpath); + if (fs.existsSync(dir)) return fs.symlinkSync(srcpath, dstpath, type); + mkdirsSync(dir); + return fs.symlinkSync(srcpath, dstpath, type); + } + module.exports = { + createSymlink: u(createSymlink), + createSymlinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/index.js +var require_ensure$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const file = require_file$1(); + const link = require_link$1(); + const symlink = require_symlink$1(); + module.exports = { + createFile: file.createFile, + createFileSync: file.createFileSync, + ensureFile: file.createFile, + ensureFileSync: file.createFileSync, + createLink: link.createLink, + createLinkSync: link.createLinkSync, + ensureLink: link.createLink, + ensureLinkSync: link.createLinkSync, + createSymlink: symlink.createSymlink, + createSymlinkSync: symlink.createSymlinkSync, + ensureSymlink: symlink.createSymlink, + ensureSymlinkSync: symlink.createSymlinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jsonfile@4.0.0/node_modules/jsonfile/index.js +var require_jsonfile$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var _fs; + try { + _fs = require_graceful_fs(); + } catch (_) { + _fs = __require("fs"); + } + function readFile(file, options, callback) { + if (callback == null) { + callback = options; + options = {}; + } + if (typeof options === "string") options = { encoding: options }; + options = options || {}; + var fs = options.fs || _fs; + var shouldThrow = true; + if ("throws" in options) shouldThrow = options.throws; + fs.readFile(file, options, function(err, data) { + if (err) return callback(err); + data = stripBom(data); + var obj; + try { + obj = JSON.parse(data, options ? options.reviver : null); + } catch (err2) { + if (shouldThrow) { + err2.message = file + ": " + err2.message; + return callback(err2); + } else return callback(null, null); + } + callback(null, obj); + }); + } + function readFileSync(file, options) { + options = options || {}; + if (typeof options === "string") options = { encoding: options }; + var fs = options.fs || _fs; + var shouldThrow = true; + if ("throws" in options) shouldThrow = options.throws; + try { + var content = fs.readFileSync(file, options); + content = stripBom(content); + return JSON.parse(content, options.reviver); + } catch (err) { + if (shouldThrow) { + err.message = file + ": " + err.message; + throw err; + } else return null; + } + } + function stringify(obj, options) { + var spaces; + var EOL = "\n"; + if (typeof options === "object" && options !== null) { + if (options.spaces) spaces = options.spaces; + if (options.EOL) EOL = options.EOL; + } + return JSON.stringify(obj, options ? options.replacer : null, spaces).replace(/\n/g, EOL) + EOL; + } + function writeFile(file, obj, options, callback) { + if (callback == null) { + callback = options; + options = {}; + } + options = options || {}; + var fs = options.fs || _fs; + var str = ""; + try { + str = stringify(obj, options); + } catch (err) { + if (callback) callback(err, null); + return; + } + fs.writeFile(file, str, options, callback); + } + function writeFileSync(file, obj, options) { + options = options || {}; + var fs = options.fs || _fs; + var str = stringify(obj, options); + return fs.writeFileSync(file, str, options); + } + function stripBom(content) { + if (Buffer.isBuffer(content)) content = content.toString("utf8"); + content = content.replace(/^\uFEFF/, ""); + return content; + } + module.exports = { + readFile, + readFileSync, + writeFile, + writeFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/jsonfile.js +var require_jsonfile$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const jsonFile = require_jsonfile$2(); + module.exports = { + readJson: u(jsonFile.readFile), + readJsonSync: jsonFile.readFileSync, + writeJson: u(jsonFile.writeFile), + writeJsonSync: jsonFile.writeFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/output-json.js +var require_output_json$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$45 = __require("path"); + const mkdir = require_mkdirs$2(); + const pathExists = require_path_exists$2().pathExists; + const jsonFile = require_jsonfile$1(); + function outputJson(file, data, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } + const dir = path$45.dirname(file); + pathExists(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return jsonFile.writeJson(file, data, options, callback); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + jsonFile.writeJson(file, data, options, callback); + }); + }); + } + module.exports = outputJson; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/output-json-sync.js +var require_output_json_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$44 = __require("path"); + const mkdir = require_mkdirs$2(); + const jsonFile = require_jsonfile$1(); + function outputJsonSync(file, data, options) { + const dir = path$44.dirname(file); + if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir); + jsonFile.writeJsonSync(file, data, options); + } + module.exports = outputJsonSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/index.js +var require_json$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const jsonFile = require_jsonfile$1(); + jsonFile.outputJson = u(require_output_json$1()); + jsonFile.outputJsonSync = require_output_json_sync$1(); + jsonFile.outputJSON = jsonFile.outputJson; + jsonFile.outputJSONSync = jsonFile.outputJsonSync; + jsonFile.writeJSON = jsonFile.writeJson; + jsonFile.writeJSONSync = jsonFile.writeJsonSync; + jsonFile.readJSON = jsonFile.readJson; + jsonFile.readJSONSync = jsonFile.readJsonSync; + module.exports = jsonFile; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move-sync/index.js +var require_move_sync$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$43 = __require("path"); + const copySync = require_copy_sync$2().copySync; + const removeSync = require_remove$1().removeSync; + const mkdirpSync = require_mkdirs$2().mkdirsSync; + const buffer = require_buffer$1(); + function moveSync(src, dest, options) { + options = options || {}; + const overwrite = options.overwrite || options.clobber || false; + src = path$43.resolve(src); + dest = path$43.resolve(dest); + if (src === dest) return fs.accessSync(src); + if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`); + mkdirpSync(path$43.dirname(dest)); + tryRenameSync(); + function tryRenameSync() { + if (overwrite) try { + return fs.renameSync(src, dest); + } catch (err) { + if (err.code === "ENOTEMPTY" || err.code === "EEXIST" || err.code === "EPERM") { + removeSync(dest); + options.overwrite = false; + return moveSync(src, dest, options); + } + if (err.code !== "EXDEV") throw err; + return moveSyncAcrossDevice(src, dest, overwrite); + } + else try { + fs.linkSync(src, dest); + return fs.unlinkSync(src); + } catch (err) { + if (err.code === "EXDEV" || err.code === "EISDIR" || err.code === "EPERM" || err.code === "ENOTSUP") return moveSyncAcrossDevice(src, dest, overwrite); + throw err; + } + } + } + function moveSyncAcrossDevice(src, dest, overwrite) { + if (fs.statSync(src).isDirectory()) return moveDirSyncAcrossDevice(src, dest, overwrite); + else return moveFileSyncAcrossDevice(src, dest, overwrite); + } + function moveFileSyncAcrossDevice(src, dest, overwrite) { + const BUF_LENGTH = 64 * 1024; + const _buff = buffer(BUF_LENGTH); + const flags = overwrite ? "w" : "wx"; + const fdr = fs.openSync(src, "r"); + const stat = fs.fstatSync(fdr); + const fdw = fs.openSync(dest, flags, stat.mode); + let pos = 0; + while (pos < stat.size) { + const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos); + fs.writeSync(fdw, _buff, 0, bytesRead); + pos += bytesRead; + } + fs.closeSync(fdr); + fs.closeSync(fdw); + return fs.unlinkSync(src); + } + function moveDirSyncAcrossDevice(src, dest, overwrite) { + const options = { overwrite: false }; + if (overwrite) { + removeSync(dest); + tryCopySync(); + } else tryCopySync(); + function tryCopySync() { + copySync(src, dest, options); + return removeSync(src); + } + } + function isSrcSubdir(src, dest) { + try { + return fs.statSync(src).isDirectory() && src !== dest && dest.indexOf(src) > -1 && dest.split(path$43.dirname(src) + path$43.sep)[1].split(path$43.sep)[0] === path$43.basename(src); + } catch (e) { + return false; + } + } + module.exports = { moveSync }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move/index.js +var require_move$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const path$42 = __require("path"); + const copy = require_copy$2().copy; + const remove = require_remove$1().remove; + const mkdirp = require_mkdirs$2().mkdirp; + const pathExists = require_path_exists$2().pathExists; + function move(src, dest, opts, cb) { + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + const overwrite = opts.overwrite || opts.clobber || false; + src = path$42.resolve(src); + dest = path$42.resolve(dest); + if (src === dest) return fs.access(src, cb); + fs.stat(src, (err, st) => { + if (err) return cb(err); + if (st.isDirectory() && isSrcSubdir(src, dest)) return cb(/* @__PURE__ */ new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`)); + mkdirp(path$42.dirname(dest), (err) => { + if (err) return cb(err); + return doRename(src, dest, overwrite, cb); + }); + }); + } + function doRename(src, dest, overwrite, cb) { + if (overwrite) return remove(dest, (err) => { + if (err) return cb(err); + return rename(src, dest, overwrite, cb); + }); + pathExists(dest, (err, destExists) => { + if (err) return cb(err); + if (destExists) return cb(/* @__PURE__ */ new Error("dest already exists.")); + return rename(src, dest, overwrite, cb); + }); + } + function rename(src, dest, overwrite, cb) { + fs.rename(src, dest, (err) => { + if (!err) return cb(); + if (err.code !== "EXDEV") return cb(err); + return moveAcrossDevice(src, dest, overwrite, cb); + }); + } + function moveAcrossDevice(src, dest, overwrite, cb) { + copy(src, dest, { + overwrite, + errorOnExist: true + }, (err) => { + if (err) return cb(err); + return remove(src, cb); + }); + } + function isSrcSubdir(src, dest) { + const srcArray = src.split(path$42.sep); + const destArray = dest.split(path$42.sep); + return srcArray.reduce((acc, current, i) => { + return acc && destArray[i] === current; + }, true); + } + module.exports = { move: u(move) }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/output/index.js +var require_output$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const path$41 = __require("path"); + const mkdir = require_mkdirs$2(); + const pathExists = require_path_exists$2().pathExists; + function outputFile(file, data, encoding, callback) { + if (typeof encoding === "function") { + callback = encoding; + encoding = "utf8"; + } + const dir = path$41.dirname(file); + pathExists(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return fs.writeFile(file, data, encoding, callback); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + fs.writeFile(file, data, encoding, callback); + }); + }); + } + function outputFileSync(file, ...args) { + const dir = path$41.dirname(file); + if (fs.existsSync(dir)) return fs.writeFileSync(file, ...args); + mkdir.mkdirsSync(dir); + fs.writeFileSync(file, ...args); + } + module.exports = { + outputFile: u(outputFile), + outputFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/index.js +var require_lib$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = Object.assign({}, require_fs$5(), require_copy_sync$2(), require_copy$2(), require_empty$1(), require_ensure$1(), require_json$3(), require_mkdirs$2(), require_move_sync$2(), require_move$2(), require_output$1(), require_path_exists$2(), require_remove$1()); + const fs$12 = __require("fs"); + if (Object.getOwnPropertyDescriptor(fs$12, "promises")) Object.defineProperty(module.exports, "promises", { get() { + return fs$12.promises; + } }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/dist/js-yaml.mjs +var js_yaml_exports = /* @__PURE__ */ __exportAll({ + CORE_SCHEMA: () => CORE_SCHEMA, + DEFAULT_SCHEMA: () => DEFAULT_SCHEMA, + FAILSAFE_SCHEMA: () => FAILSAFE_SCHEMA, + JSON_SCHEMA: () => JSON_SCHEMA, + Schema: () => Schema, + Type: () => Type, + YAMLException: () => YAMLException, + default: () => index_vite_proxy_tmp_default, + dump: () => dump, + load: () => load$1, + loadAll: () => loadAll, + safeDump: () => safeDump, + safeLoad: () => safeLoad, + safeLoadAll: () => safeLoadAll, + types: () => types +}); +var __create, __defProp, __getOwnPropDesc, __getOwnPropNames, __getProtoOf, __hasOwnProp, __commonJSMin, __copyProps, __toESM, require_common$3, require_exception$1, require_snippet, require_type$1, require_schema$1, require_str$1, require_seq$1, require_map$1, require_failsafe$1, require_null$1, require_bool$1, require_int$1, require_float$1, require_json$2, require_core$1, require_timestamp$1, require_merge$1, require_binary$1, require_omap$1, require_pairs$1, require_set$1, require_default, require_loader$1, require_dumper$1, import_js_yaml, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load$1, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump, index_vite_proxy_tmp_default; +var init_js_yaml = __esmMin((() => { + __create = Object.create; + __defProp = Object.defineProperty; + __getOwnPropDesc = Object.getOwnPropertyDescriptor; + __getOwnPropNames = Object.getOwnPropertyNames; + __getProtoOf = Object.getPrototypeOf; + __hasOwnProp = Object.prototype.hasOwnProperty; + __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); + __copyProps = (to, from, except, desc) => { + /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */ + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; + }; + __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true + }) : target, mod)); + require_common$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + function extend(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module.exports.isNothing = isNothing; + module.exports.isObject = isObject; + module.exports.toArray = toArray; + module.exports.repeat = repeat; + module.exports.isNegativeZero = isNegativeZero; + module.exports.extend = extend; + })); + require_exception$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + function formatError(exception, compact) { + let where = ""; + const message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) where += "in \"" + exception.mark.name + "\" "; + where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) where += "\n\n" + exception.mark.snippet; + return message + " " + where; + } + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + else this.stack = (/* @__PURE__ */ new Error()).stack || ""; + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + module.exports = YAMLException; + })); + require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common$3(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position - lineStart + head.length + }; + } + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) return null; + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== "number") options.indent = 1; + if (typeof options.linesBefore !== "number") options.linesBefore = 3; + if (typeof options.linesAfter !== "number") options.linesAfter = 2; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match; + let foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2; + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (let i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); + } + module.exports = makeSnippet; + })); + require_type$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var YAMLException = require_exception$1(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException("Unknown option \"" + name + "\" is met in definition of \"" + tag + "\" YAML type."); + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) throw new YAMLException("Unknown kind \"" + this.kind + "\" is specified for \"" + tag + "\" YAML type."); + } + module.exports = Type; + })); + require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var YAMLException = require_exception$1(); + var Type = require_type$1(); + function compileList(schema, name) { + const result = []; + schema[name].forEach(function(currentType) { + let newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) newIndex = previousIndex; + }); + result[newIndex] = currentType; + }); + return result; + } + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi["fallback"].push(type); + } else result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; + } + function Schema(definition) { + return this.extend(definition); + } + Schema.prototype.extend = function extend(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type) explicit.push(definition); + else if (Array.isArray(definition)) explicit = explicit.concat(definition); + else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + } else throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type)) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + }); + const result = Object.create(Schema.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module.exports = Schema; + })); + require_str$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type$1())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + })); + require_seq$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type$1())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + })); + require_map$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type$1())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + })); + require_failsafe$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_schema$1())({ explicit: [ + require_str$1(), + require_seq$1(), + require_map$1() + ] }); + })); + require_null$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + })); + require_bool$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + })); + require_int$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common$3(); + var Type = require_type$1(); + function isHexCode(c) { + return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102; + } + function isOctCode(c) { + return c >= 48 && c <= 55; + } + function isDecCode(c) { + return c >= 48 && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); + } + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + module.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + })); + require_float$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common$3(); + var Type = require_type$1(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + else if (value === ".nan") return NaN; + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { + case "lowercase": return ".nan"; + case "uppercase": return ".NAN"; + case "camelcase": return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === object) switch (style) { + case "lowercase": return ".inf"; + case "uppercase": return ".INF"; + case "camelcase": return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === object) switch (style) { + case "lowercase": return "-.inf"; + case "uppercase": return "-.INF"; + case "camelcase": return "-.Inf"; + } + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + })); + require_json$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_failsafe$1().extend({ implicit: [ + require_null$1(), + require_bool$1(), + require_int$1(), + require_float$1() + ] }); + })); + require_core$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_json$2(); + })); + require_timestamp$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + const year = +match[1]; + const month = +match[2] - 1; + const day = +match[3]; + if (!match[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match[4]; + const minute = +match[5]; + const second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match[9]) { + const tzHour = +match[10]; + const tzMinute = +(match[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + })); + require_merge$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + })); + require_binary$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) result.push(bits >> 4 & 255); + return new Uint8Array(result); + } + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + module.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + })); + require_omap$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + })); + require_pairs$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + })); + require_set$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type$1(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + })); + require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_core$1().extend({ + implicit: [require_timestamp$1(), require_merge$1()], + explicit: [ + require_binary$1(), + require_omap$1(), + require_pairs$1(), + require_set$1() + ] + }); + })); + require_loader$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common$3(); + var YAMLException = require_exception$1(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function isEol(c) { + return c === 10 || c === 13; + } + function isWhiteSpace(c) { + return c === 9 || c === 32; + } + function isWsOrEol(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function isFlowIndicator(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + if (c >= 48 && c <= 57) return c - 48; + const lc = c | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; + } + function escapedHexLen(c) { + if (c === 120) return 2; + if (c === 117) return 4; + if (c === 85) return 8; + return 0; + } + function fromDecimalCode(c) { + if (c >= 48 && c <= 57) return c - 48; + return -1; + } + function simpleEscapeSequence(c) { + switch (c) { + case 48: return "\0"; + case 97: return "\x07"; + case 98: return "\b"; + case 116: return " "; + case 9: return " "; + case 110: return "\n"; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 101: return "\x1B"; + case 32: return " "; + case 34: return "\""; + case 47: return "/"; + case 92: return "\\"; + case 78: return "…"; + case 95: return "\xA0"; + case 76: return "\u2028"; + case 80: return "\u2029"; + default: return ""; + } + } + function charFromCodepoint(c) { + if (c <= 65535) return String.fromCharCode(c); + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { + configurable: true, + enumerable: true, + writable: true, + value + }); + else object[key] = value; + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + function generateError(state, message) { + const mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException(message, mark); + } + function throwError(state, message) { + throw generateError(state, message); + } + function throwWarning(state, message) { + if (state.onWarning) state.onWarning.call(null, generateError(state, message)); + } + function storeAnchor(state, name, value) { + const transactions = state.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state.anchorMap, name), + value: state.anchorMap[name] + }; + } + state.anchorMap[name] = value; + } + function beginAnchorTransaction(state) { + state.anchorMapTransactions.push(Object.create(null)); + } + function commitAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const transactions = state.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; + } + } + function rollbackAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state.anchorMap[names[index]] = entry.value; + else delete state.anchorMap[names[index]]; + } + } + function snapshotState(state) { + return { + position: state.position, + line: state.line, + lineStart: state.lineStart, + lineIndent: state.lineIndent, + firstTabInLine: state.firstTabInLine, + tag: state.tag, + anchor: state.anchor, + kind: state.kind, + result: state.result + }; + } + function restoreState(state, snapshot) { + state.position = snapshot.position; + state.line = snapshot.line; + state.lineStart = snapshot.lineStart; + state.lineIndent = snapshot.lineIndent; + state.firstTabInLine = snapshot.firstTabInLine; + state.tag = snapshot.tag; + state.anchor = snapshot.anchor; + state.kind = snapshot.kind; + state.result = snapshot.result; + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + if (state.version !== null) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + const major = parseInt(match[1], 10); + const minor = parseInt(match[2], 10); + if (major !== 1) throwError(state, "unacceptable YAML version of the document"); + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state, "unsupported YAML version of the document"); + }, + TAG: function handleTagDirective(state, name, args) { + let prefix; + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + if (_hasOwnProperty.call(state.tagMap, handle)) throwError(state, "there is a previously declared suffix for \"" + handle + "\" tag handle"); + if (!PATTERN_TAG_URI.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + if (start < end) { + const _result = state.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state, "expected valid JSON character"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters"); + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Object]"; + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") keyNode = "[object Object]"; + keyNode = String(keyNode); + if (_result === null) _result = {}; + if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) { + if (valueNode.length > state.maxMergeSeqLength) throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state, _result, src, overridableKeys); + } + } else mergeMappings(state, _result, valueNode, overridableKeys); + else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + const ch = state.input.charCodeAt(state.position); + if (ch === 10) state.position++; + else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } else throwError(state, "a line break is expected"); + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (isWhiteSpace(ch)) { + if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position; + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else break; + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) throwWarning(state, "deficient indentation"); + return lineBreaks; + } + function testDocumentSeparator(state) { + let _position = state.position; + let ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || isWsOrEol(ch)) return true; + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) state.result += " "; + else if (count > 1) state.result += common.repeat("\n", count - 1); + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state.kind; + const _result = state.result; + let ch = state.input.charCodeAt(state.position); + if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) return false; + if (ch === 63 || ch === 45) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break; + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) break; + else if (isEol(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!isWhiteSpace(ch)) captureEnd = state.position + 1; + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) return true; + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let ch = state.input.charCodeAt(state.position); + if (ch !== 39) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else return true; + } else if (isEol(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar"); + else { + state.position++; + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let ch = state.input.charCodeAt(state.position); + if (ch !== 34) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (isEol(ch)) skipSeparationSpace(state, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + let hexLength = tmp; + let hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state, "expected hexadecimal character"); + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else throwError(state, "unknown escape sequence"); + captureStart = captureEnd = state.position; + } else if (isEol(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar"); + else { + state.position++; + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state.tag; + let _result; + const _anchor = state.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) throwError(state, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state, "expected the node content, but found ','"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + if (isWsOrEol(state.input.charCodeAt(state.position + 1))) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + else if (isPair) _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + else _result.push(keyNode); + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let ch = state.input.charCodeAt(state.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else throwError(state, "repeat of an indentation width identifier"); + else break; + } + if (isWhiteSpace(ch)) { + do + ch = state.input.charCodeAt(++state.position); + while (isWhiteSpace(ch)); + if (ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!isEol(ch) && ch !== 0); + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state, "missing indentation for block scalar"); + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state.result += "\n"; + } + break; + } + if (folding) if (isWhiteSpace(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) state.result += " "; + } else state.result += common.repeat("\n", emptyLines); + else state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state.position; + while (!isEol(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position); + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + const _tag = state.tag; + const _anchor = state.anchor; + const _result = []; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) break; + if (!isWsOrEol(state.input.charCodeAt(state.position + 1))) break; + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + const _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a sequence entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state.tag; + const _anchor = state.anchor; + const _result = {}; + const overridableKeys = Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const following = state.input.charCodeAt(state.position + 1); + const _line = state.line; + if ((ch === 63 || ch === 58) && isWsOrEol(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!isWsOrEol(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) throwError(state, "can not read an implicit mapping pair; a colon is missed"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state.result; + else valueNode = state.result; + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a mapping entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (atExplicitKey) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) throwError(state, "duplication of a tag property"); + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else tagHandle = "!"; + let _position = state.position; + if (isVerbatim) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else throwError(state, "unexpected end of the stream within a verbatim tag"); + } else { + while (ch !== 0 && !isWsOrEol(ch)) { + if (ch === 33) if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters"); + isNamed = true; + _position = state.position + 1; + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters"); + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state, "tag name cannot contain such characters: " + tagName); + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) state.tag = tagName; + else if (_hasOwnProperty.call(state.tagMap, tagHandle)) state.tag = state.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state.tag = "!" + tagName; + else if (tagHandle === "!!") state.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state, "undeclared tag handle \"" + tagHandle + "\""); + return true; + } + function readAnchorProperty(state) { + let ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) throwError(state, "duplication of an anchor property"); + ch = state.input.charCodeAt(++state.position); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character"); + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + let ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an alias node must contain at least one character"); + const alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) throwError(state, "unidentified alias \"" + alias + "\""); + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state); + beginAnchorTransaction(state); + restoreState(state, propertyStart); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") { + commitAnchorTransaction(state); + return true; + } + rollbackAnchorTransaction(state); + restoreState(state, fallbackState); + return false; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state.depth >= state.maxDepth) throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")"); + state.depth += 1; + if (state.listener !== null) state.listener("open", state); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } + } + if (indentStatus === 1) while (true) { + const ch = state.input.charCodeAt(state.position); + const propertyState = snapshotState(state); + if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) break; + if (!readTagProperty(state) && !readAnchorProperty(state)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true; + else { + const ch = state.input.charCodeAt(state.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true; + else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true; + else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) throwError(state, "alias node should not have any properties"); + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) state.tag = "?"; + } + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + if (state.tag === null) { + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") throwError(state, "unacceptable node kind for ! tag; it should be \"scalar\", not \"" + state.kind + "\""); + for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) type = state.typeMap[state.kind || "fallback"][state.tag]; + else { + type = null; + const typeList = state.typeMap.multi[state.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + if (!type) throwError(state, "unknown tag !<" + state.tag + ">"); + if (state.result !== null && type.kind !== state.kind) throwError(state, "unacceptable node kind for !<" + state.tag + "> tag; it should be \"" + type.kind + "\", not \"" + state.kind + "\""); + if (!type.resolve(state.result, state.tag)) throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + } + if (state.listener !== null) state.listener("close", state); + state.depth -= 1; + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + const documentStart = state.position; + let hasDirectives = false; + let ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + let _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + const directiveName = state.input.slice(_position, state.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 35) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state, directiveName, directiveArgs); + else throwWarning(state, "unknown document directive \"" + directiveName + "\""); + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) throwError(state, "directives end mark is expected"); + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) throwWarning(state, "non-ASCII line breaks are interpreted as content"); + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected"); + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) input += "\n"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state = new State(input, options); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) readDocument(state); + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]); + } + function load(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException("expected a single document in the stream, but found more"); + } + module.exports.loadAll = loadAll; + module.exports.load = load; + })); + require_dumper$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common$3(); + var YAMLException = require_exception$1(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = "\\\""; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + function compileStyleMap(schema, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; + } + return result; + } + function encodeHex(character) { + let handle; + let length; + const string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === "\"" ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) if (state.implicitTypes[index].resolve(str)) return true; + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return c >= 32 && c <= 126 || c >= 161 && c <= 55295 && c !== 8232 && c !== 8233 || c >= 57344 && c <= 65533 && c !== CHAR_BOM || c >= 65536 && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar; + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + const first = string.charCodeAt(pos); + let second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first - 55296) * 1024 + second - 56320 + 65536; + } + return first; + } + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + let i; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) return STYLE_PLAIN; + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) return STYLE_DOUBLE; + if (!forceQuotes) return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock) { + state.dump = function() { + if (string.length === 0) return state.quotingType === QUOTING_TYPE_DOUBLE ? "\"\"" : "''"; + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state.quotingType === QUOTING_TYPE_DOUBLE ? "\"" + string + "\"" : "'" + string + "'"; + } + const indent = state.indent * Math.max(1, level); + const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + const singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: return string; + case STYLE_SINGLE: return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: return "\"" + escapeString(string, lineWidth) + "\""; + default: throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match; + while (match = lineRe.exec(string)) { + const prefix = match[1]; + const line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match; + let start = 0; + let end; + let curr = 0; + let next = 0; + let result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + else result += line.slice(start); + return result.slice(1); + } + function escapeString(string) { + let result = ""; + let char = 0; + for (let i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) result += string[i + 1]; + } else result += escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state.replacer) value = state.replacer.call(object, String(index), value); + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state.replacer) value = state.replacer.call(object, String(index), value); + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") _result += generateNextLine(state, level); + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += "\""; + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue); + if (!writeNode(state, level, objectKey, false, false)) continue; + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? "\"" : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) continue; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + if (state.sortKeys === true) objectKeyList.sort(); + else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys); + else if (state.sortKeys) throw new YAMLException("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue); + if (!writeNode(state, level + 1, objectKey, true, true, true)) continue; + const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state.dump; + if (explicitPair) pairBuffer += generateNextLine(state, level); + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) continue; + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + const typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + if (explicit) if (type.multi && type.representName) state.tag = type.representName(object); + else state.tag = type.tag; + else state.tag = "?"; + if (type.represent) { + const style = state.styleMap[type.tag] || type.defaultStyle; + let _result; + if (_toString.call(type.represent) === "[object Function]") _result = type.represent(object, style); + else if (_hasOwnProperty.call(type.represent, style)) _result = type.represent[style](object, style); + else throw new YAMLException("!<" + type.tag + "> tag resolver accepts not \"" + style + "\" style"); + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) detectType(state, object, true); + const type = _toString.call(state.dump); + const inblock = block; + if (block) block = state.flowLevel < 0 || state.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) compact = false; + if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + else if (type === "[object Array]") if (block && state.dump.length !== 0) { + if (state.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state, level - 1, state.dump, compact); + else writeBlockSequence(state, level, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + else if (type === "[object String]") { + if (state.tag !== "?") writeScalar(state, state.dump, level, iskey, inblock); + } else if (type === "[object Undefined]") return false; + else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21"); + if (state.tag[0] === "!") tagStr = "!" + tagStr; + else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18); + else tagStr = "!<" + tagStr + ">"; + state.dump = tagStr + " " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]); + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); + } else { + objects.push(object); + if (Array.isArray(object)) for (let i = 0, length = object.length; i < length; i += 1) inspectNode(object[i], objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i = 0, length = objectKeyList.length; i < length; i += 1) inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes); + } + } + } + } + function dump(input, options) { + options = options || {}; + const state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + let value = input; + if (state.replacer) value = state.replacer.call({ "": value }, "", value); + if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; + return ""; + } + module.exports.dump = dump; + })); + import_js_yaml = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => { + var loader = require_loader$1(); + var dumper = require_dumper$1(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module.exports.Type = require_type$1(); + module.exports.Schema = require_schema$1(); + module.exports.FAILSAFE_SCHEMA = require_failsafe$1(); + module.exports.JSON_SCHEMA = require_json$2(); + module.exports.CORE_SCHEMA = require_core$1(); + module.exports.DEFAULT_SCHEMA = require_default(); + module.exports.load = loader.load; + module.exports.loadAll = loader.loadAll; + module.exports.dump = dumper.dump; + module.exports.YAMLException = require_exception$1(); + module.exports.types = { + binary: require_binary$1(), + float: require_float$1(), + map: require_map$1(), + null: require_null$1(), + pairs: require_pairs$1(), + set: require_set$1(), + timestamp: require_timestamp$1(), + bool: require_bool$1(), + int: require_int$1(), + merge: require_merge$1(), + omap: require_omap$1(), + seq: require_seq$1(), + str: require_str$1() + }; + module.exports.safeLoad = renamed("safeLoad", "load"); + module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module.exports.safeDump = renamed("safeDump", "dump"); + })))(), 1); + ({Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load: load$1, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump} = import_js_yaml.default); + index_vite_proxy_tmp_default = import_js_yaml.default; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+parse@0.4.3/node_modules/@changesets/parse/dist/changesets-parse.cjs.js +var require_changesets_parse_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var yaml = (init_js_yaml(), __toCommonJS(js_yaml_exports)); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var yaml__default = /*#__PURE__*/ _interopDefault(yaml); + const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/; + const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`; + const validVersionTypes = [ + "major", + "minor", + "patch", + "none" + ]; + function truncate(s, max = 200) { + return s.length > max ? s.slice(0, max) + "..." : s; + } + function validateReleases(releases, contents) { + for (const release of releases) { + if (typeof release.name !== "string" || release.name.trim() === "") throw new Error(`could not parse changeset - invalid package name in frontmatter.\nExpected a non-empty string for package name, but got: ${JSON.stringify(release.name)}\nChangeset contents:\n${truncate(contents)}`); + if (typeof release.type !== "string") throw new Error(`could not parse changeset - invalid release type for package "${release.name}".\nExpected a string for release type, but got: ${typeof release.type}\nChangeset contents:\n${truncate(contents)}`); + if (!validVersionTypes.includes(release.type)) throw new Error(`could not parse changeset - invalid version type ${JSON.stringify(release.type)} for package "${release.name}".\nValid version types are: ${validVersionTypes.join(", ")}\nChangeset contents:\n${truncate(contents)}`); + } + } + function parseChangesetFile(contents) { + const trimmedContents = contents.trim(); + if (!trimmedContents) throw new Error(`could not parse changeset - file is empty. +Changesets must have frontmatter with package names and version types. +Example:\n${EXAMPLE_FORMAT}\n\nYour changeset summary here.`); + const execResult = mdRegex.exec(contents); + if (!execResult) throw new Error(`could not parse changeset - missing or invalid frontmatter. +Changesets must start with frontmatter delimited by "---". +Example:\n${EXAMPLE_FORMAT}\n\nYour changeset summary here.\nReceived content:\n${truncate(trimmedContents)}`); + let [, roughReleases, roughSummary] = execResult; + let summary = roughSummary.trim(); + let releases; + let yamlStuff; + try { + yamlStuff = yaml__default["default"].load(roughReleases); + } catch (e) { + throw new Error(`could not parse changeset - invalid YAML in frontmatter. +The frontmatter between the "---" delimiters must be valid YAML. +YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\n${roughReleases}`); + } + if (yamlStuff) { + if (typeof yamlStuff !== "object" || Array.isArray(yamlStuff)) throw new Error(`could not parse changeset - frontmatter must be an object mapping package names to version types.\nExpected format:\n${EXAMPLE_FORMAT}\nReceived:\n${roughReleases}`); + releases = Object.entries(yamlStuff).map(([name, type]) => ({ + name, + type + })); + } else releases = []; + validateReleases(releases, contents); + return { + releases, + summary + }; + } + exports["default"] = parseChangesetFile; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+parse@0.4.3/node_modules/@changesets/parse/dist/changesets-parse.cjs.default.js +var require_changesets_parse_cjs_default = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports._default = require_changesets_parse_cjs().default; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+parse@0.4.3/node_modules/@changesets/parse/dist/changesets-parse.cjs.mjs +var changesets_parse_cjs_exports = /* @__PURE__ */ __exportAll({ default: () => import_changesets_parse_cjs_default._default }), import_changesets_parse_cjs_default; +var init_changesets_parse_cjs = __esmMin((() => { + require_changesets_parse_cjs(); + import_changesets_parse_cjs_default = require_changesets_parse_cjs_default(); +})); +//#endregion +//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js +var signals; +var init_signals = __esmMin((() => { + signals = []; + signals.push("SIGHUP", "SIGINT", "SIGTERM"); + if (process.platform !== "win32") signals.push("SIGALRM", "SIGABRT", "SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT"); + if (process.platform === "linux") signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT"); +})); +//#endregion +//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js +var mjs_exports = /* @__PURE__ */ __exportAll({ + load: () => load, + onExit: () => onExit, + signals: () => signals, + unload: () => unload +}); +var processOk, kExitEmitter, global$1, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process$1, onExit, load, unload; +var init_mjs = __esmMin((() => { + init_signals(); + processOk = (process) => !!process && typeof process === "object" && typeof process.removeListener === "function" && typeof process.emit === "function" && typeof process.reallyExit === "function" && typeof process.listeners === "function" && typeof process.kill === "function" && typeof process.pid === "number" && typeof process.on === "function"; + kExitEmitter = Symbol.for("signal-exit emitter"); + global$1 = globalThis; + ObjectDefineProperty = Object.defineProperty.bind(Object); + Emitter = class { + emitted = { + afterExit: false, + exit: false + }; + listeners = { + afterExit: [], + exit: [] + }; + count = 0; + id = Math.random(); + constructor() { + if (global$1[kExitEmitter]) return global$1[kExitEmitter]; + ObjectDefineProperty(global$1, kExitEmitter, { + value: this, + writable: false, + enumerable: false, + configurable: false + }); + } + on(ev, fn) { + this.listeners[ev].push(fn); + } + removeListener(ev, fn) { + const list = this.listeners[ev]; + const i = list.indexOf(fn); + /* c8 ignore start */ + if (i === -1) return; + /* c8 ignore stop */ + if (i === 0 && list.length === 1) list.length = 0; + else list.splice(i, 1); + } + emit(ev, code, signal) { + if (this.emitted[ev]) return false; + this.emitted[ev] = true; + let ret = false; + for (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret; + if (ev === "exit") ret = this.emit("afterExit", code, signal) || ret; + return ret; + } + }; + SignalExitBase = class {}; + signalExitWrap = (handler) => { + return { + onExit(cb, opts) { + return handler.onExit(cb, opts); + }, + load() { + return handler.load(); + }, + unload() { + return handler.unload(); + } + }; + }; + SignalExitFallback = class extends SignalExitBase { + onExit() { + return () => {}; + } + load() {} + unload() {} + }; + SignalExit = class extends SignalExitBase { + /* c8 ignore start */ + #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP"; + /* c8 ignore stop */ + #emitter = new Emitter(); + #process; + #originalProcessEmit; + #originalProcessReallyExit; + #sigListeners = {}; + #loaded = false; + constructor(process) { + super(); + this.#process = process; + this.#sigListeners = {}; + for (const sig of signals) this.#sigListeners[sig] = () => { + const listeners = this.#process.listeners(sig); + let { count } = this.#emitter; + /* c8 ignore start */ + const p = process; + if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count; + /* c8 ignore stop */ + if (listeners.length === count) { + this.unload(); + const ret = this.#emitter.emit("exit", null, sig); + /* c8 ignore start */ + const s = sig === "SIGHUP" ? this.#hupSig : sig; + if (!ret) process.kill(process.pid, s); + } + }; + this.#originalProcessReallyExit = process.reallyExit; + this.#originalProcessEmit = process.emit; + } + onExit(cb, opts) { + /* c8 ignore start */ + if (!processOk(this.#process)) return () => {}; + /* c8 ignore stop */ + if (this.#loaded === false) this.load(); + const ev = opts?.alwaysLast ? "afterExit" : "exit"; + this.#emitter.on(ev, cb); + return () => { + this.#emitter.removeListener(ev, cb); + if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) this.unload(); + }; + } + load() { + if (this.#loaded) return; + this.#loaded = true; + this.#emitter.count += 1; + for (const sig of signals) try { + const fn = this.#sigListeners[sig]; + if (fn) this.#process.on(sig, fn); + } catch (_) {} + this.#process.emit = (ev, ...a) => { + return this.#processEmit(ev, ...a); + }; + this.#process.reallyExit = (code) => { + return this.#processReallyExit(code); + }; + } + unload() { + if (!this.#loaded) return; + this.#loaded = false; + signals.forEach((sig) => { + const listener = this.#sigListeners[sig]; + /* c8 ignore start */ + if (!listener) throw new Error("Listener not defined for signal: " + sig); + /* c8 ignore stop */ + try { + this.#process.removeListener(sig, listener); + } catch (_) {} + /* c8 ignore stop */ + }); + this.#process.emit = this.#originalProcessEmit; + this.#process.reallyExit = this.#originalProcessReallyExit; + this.#emitter.count -= 1; + } + #processReallyExit(code) { + /* c8 ignore start */ + if (!processOk(this.#process)) return 0; + this.#process.exitCode = code || 0; + /* c8 ignore stop */ + this.#emitter.emit("exit", this.#process.exitCode, null); + return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); + } + #processEmit(ev, ...args) { + const og = this.#originalProcessEmit; + if (ev === "exit" && processOk(this.#process)) { + if (typeof args[0] === "number") this.#process.exitCode = args[0]; + /* c8 ignore start */ + const ret = og.call(this.#process, ev, ...args); + /* c8 ignore start */ + this.#emitter.emit("exit", this.#process.exitCode, null); + /* c8 ignore stop */ + return ret; + } else return og.call(this.#process, ev, ...args); + } + }; + process$1 = globalThis.process; + ({onExit, load, unload} = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback())); +})); +//#endregion +//#region ../../node_modules/.pnpm/spawndamnit@3.0.1/node_modules/spawndamnit/promise.js +var require_promise = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const EventEmitter = __require("events"); + var ChildProcessPromise = class extends Promise { + constructor(executer) { + let resolve; + let reject; + super((res, rej) => { + resolve = res; + reject = rej; + }); + executer(resolve, reject, this); + } + }; + Object.assign(ChildProcessPromise.prototype, EventEmitter.prototype); + module.exports = ChildProcessPromise; +})); +//#endregion +//#region ../../node_modules/.pnpm/spawndamnit@3.0.1/node_modules/spawndamnit/index.js +var require_spawndamnit = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const crossSpawn = require_cross_spawn(); + const { onExit } = (init_mjs(), __toCommonJS(mjs_exports)); + __require("events"); + const ChildProcessPromise = require_promise(); + const activeProcesses = /* @__PURE__ */ new Set(); + onExit(() => { + for (let child of activeProcesses) child.kill("SIGTERM"); + }); + function spawn(cmd, args, opts) { + return new ChildProcessPromise((resolve, reject, events) => { + let child = crossSpawn(cmd, args, opts); + let stdout = Buffer.from(""); + let stderr = Buffer.from(""); + activeProcesses.add(child); + if (child.stdout) child.stdout.on("data", (data) => { + stdout = Buffer.concat([stdout, data]); + events.emit("stdout", data); + }); + if (child.stderr) child.stderr.on("data", (data) => { + stderr = Buffer.concat([stderr, data]); + events.emit("stderr", data); + }); + child.on("error", (err) => { + activeProcesses.delete(child); + reject(err); + }); + child.on("close", (code) => { + activeProcesses.delete(child); + resolve({ + code, + stdout, + stderr + }); + }); + }); + } + module.exports = spawn; + module.exports.ChildProcessPromise = ChildProcessPromise; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/OverloadYield.js +var require_OverloadYield = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _OverloadYield(e, d) { + this.v = e, this.k = d; + } + module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorDefine.js +var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _regeneratorDefine(e, r, n, t) { + var i = Object.defineProperty; + try { + i({}, "", {}); + } catch (e) { + i = 0; + } + module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { + function o(r, n) { + _regeneratorDefine(e, r, function(e) { + return this._invoke(r, n, e); + }); + } + r ? i ? i(e, r, { + value: n, + enumerable: !t, + configurable: !t, + writable: !t + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); + } + module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regenerator.js +var require_regenerator$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var regeneratorDefine = require_regeneratorDefine(); + function _regenerator() { + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ + var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; + function i(r, n, o, i) { + var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); + return regeneratorDefine(u, "_invoke", function(r, n, o) { + var i, c, u, f = 0, p = o || [], y = !1, G = { + p: 0, + n: 0, + v: e, + a: d, + f: d.bind(e, 4), + d: function d(t, r) { + return i = t, c = 0, u = e, G.n = r, a; + } + }; + function d(r, n) { + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { + var o, i = p[t], d = G.p, l = i[2]; + r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); + } + if (o || r > 1) return a; + throw y = !0, n; + } + return function(o, p, l) { + if (f > 1) throw TypeError("Generator is already running"); + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); + try { + if (f = 2, i) { + if (c || (o = "next"), t = i[o]) { + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); + if (!t.done) return t; + u = t.value, c < 2 && (c = 0); + } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); + i = e; + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; + } catch (t) { + i = e, c = 1, u = t; + } finally { + f = 1; + } + } + return { + value: t, + done: y + }; + }; + }(r, o, i), !0), u; + } + var a = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + t = Object.getPrototypeOf; + var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { + return this; + }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); + function f(e) { + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; + } + return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { + return this; + }), regeneratorDefine(u, "toString", function() { + return "[object Generator]"; + }), (module.exports = _regenerator = function _regenerator() { + return { + w: i, + m: f + }; + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); + } + module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var OverloadYield = require_OverloadYield(); + var regeneratorDefine = require_regeneratorDefine(); + function AsyncIterator(t, e) { + function n(r, o, i, f) { + try { + var c = t[r](o), u = c.value; + return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { + n("next", t, i, f); + }, function(t) { + n("throw", t, i, f); + }) : e.resolve(u).then(function(t) { + c.value = t, i(c); + }, function(t) { + return n("throw", t, i, f); + }); + } catch (t) { + f(t); + } + } + var r; + this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { + return this; + })), regeneratorDefine(this, "_invoke", function(t, o, i) { + function f() { + return new e(function(e, r) { + n(t, i, e, r); + }); + } + return r = r ? r.then(f, f) : f(); + }, !0); + } + module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var regenerator = require_regenerator$1(); + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); + function _regeneratorAsyncGen(r, e, t, o, n) { + return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); + } + module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorAsync.js +var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var regeneratorAsyncGen = require_regeneratorAsyncGen(); + function _regeneratorAsync(n, e, r, t, o) { + var a = regeneratorAsyncGen(n, e, r, t, o); + return a.next().then(function(n) { + return n.done ? n.value : a.next(); + }); + } + module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorKeys.js +var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _regeneratorKeys(e) { + var n = Object(e), r = []; + for (var t in n) r.unshift(t); + return function e() { + for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; + return e.done = !0, e; + }; + } + module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/typeof.js +var require_typeof = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _typeof(o) { + "@babel/helpers - typeof"; + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { + return typeof o; + } : function(o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); + } + module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorValues.js +var require_regeneratorValues = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var _typeof = require_typeof()["default"]; + function _regeneratorValues(e) { + if (null != e) { + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; + if (t) return t.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) return { next: function next() { + return e && r >= e.length && (e = void 0), { + value: e && e[r++], + done: !e + }; + } }; + } + throw new TypeError(_typeof(e) + " is not iterable"); + } + module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var OverloadYield = require_OverloadYield(); + var regenerator = require_regenerator$1(); + var regeneratorAsync = require_regeneratorAsync(); + var regeneratorAsyncGen = require_regeneratorAsyncGen(); + var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); + var regeneratorKeys = require_regeneratorKeys(); + var regeneratorValues = require_regeneratorValues(); + function _regeneratorRuntime() { + "use strict"; + var r = regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; + function n(r) { + var e = "function" == typeof r && r.constructor; + return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); + } + var o = { + "throw": 1, + "return": 2, + "break": 3, + "continue": 3 + }; + function a(r) { + var e, t; + return function(n) { + e || (e = { + stop: function stop() { + return t(n.a, 2); + }, + "catch": function _catch() { + return n.v; + }, + abrupt: function abrupt(r, e) { + return t(n.a, o[r], e); + }, + delegateYield: function delegateYield(r, o, a) { + return e.resultName = o, t(n.d, regeneratorValues(r), a); + }, + finish: function finish(r) { + return t(n.f, r); + } + }, t = function t(r, _t, o) { + n.p = e.prev, n.n = e.next; + try { + return r(_t, o); + } finally { + e.next = n.n; + } + }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; + try { + return r.call(this, e); + } finally { + n.p = e.prev, n.n = e.next; + } + }; + } + return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { + return { + wrap: function wrap(e, t, n, o) { + return r.w(a(e), t, n, o && o.reverse()); + }, + isGeneratorFunction: n, + mark: r.m, + awrap: function awrap(r, e) { + return new OverloadYield(r, e); + }, + AsyncIterator: regeneratorAsyncIterator, + async: function async(r, e, t, o, u) { + return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); + }, + keys: regeneratorKeys, + values: regeneratorValues + }; + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); + } + module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/regenerator/index.js +var require_regenerator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var runtime = require_regeneratorRuntime()(); + module.exports = runtime; + try { + regeneratorRuntime = runtime; + } catch (accidentalStrictMode) { + if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; + else Function("r", "regeneratorRuntime = r")(runtime); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/asyncToGenerator.js +var require_asyncToGenerator = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function asyncGeneratorStep(n, t, e, r, o, a, c) { + try { + var i = n[a](c), u = i.value; + } catch (n) { + e(n); + return; + } + i.done ? t(u) : Promise.resolve(u).then(r, o); + } + function _asyncToGenerator(n) { + return function() { + var t = this, e = arguments; + return new Promise(function(r, o) { + var a = n.apply(t, e); + function _next(n) { + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); + } + function _throw(n) { + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); + } + _next(void 0); + }); + }; + } + module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/classCallCheck.js +var require_classCallCheck = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/assertThisInitialized.js +var require_assertThisInitialized = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; + } + module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +var require_possibleConstructorReturn = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var _typeof = require_typeof()["default"]; + var assertThisInitialized = require_assertThisInitialized(); + function _possibleConstructorReturn(t, e) { + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return assertThisInitialized(t); + } + module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/getPrototypeOf.js +var require_getPrototypeOf = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _getPrototypeOf(t) { + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); + } + module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/setPrototypeOf.js +var require_setPrototypeOf = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _setPrototypeOf(t, e) { + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { + return t.__proto__ = e, t; + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); + } + module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/inherits.js +var require_inherits = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var setPrototypeOf = require_setPrototypeOf(); + function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + writable: !0, + configurable: !0 + } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && setPrototypeOf(t, e); + } + module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/isNativeFunction.js +var require_isNativeFunction = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _isNativeFunction(t) { + try { + return -1 !== Function.toString.call(t).indexOf("[native code]"); + } catch (n) { + return "function" == typeof t; + } + } + module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +var require_isNativeReflectConstruct = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); + } catch (t) {} + return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { + return !!t; + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); + } + module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/construct.js +var require_construct = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var isNativeReflectConstruct = require_isNativeReflectConstruct(); + var setPrototypeOf = require_setPrototypeOf(); + function _construct(t, e, r) { + if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); + var o = [null]; + o.push.apply(o, e); + var p = new (t.bind.apply(t, o))(); + return r && setPrototypeOf(p, r.prototype), p; + } + module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/@babel+runtime@7.29.2/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +var require_wrapNativeSuper = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var getPrototypeOf = require_getPrototypeOf(); + var setPrototypeOf = require_setPrototypeOf(); + var isNativeFunction = require_isNativeFunction(); + var construct = require_construct(); + function _wrapNativeSuper(t) { + var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; + return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { + if (null === t || !isNativeFunction(t)) return t; + if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); + if (void 0 !== r) { + if (r.has(t)) return r.get(t); + r.set(t, Wrapper); + } + function Wrapper() { + return construct(t, arguments, getPrototypeOf(this).constructor); + } + return Wrapper.prototype = Object.create(t.prototype, { constructor: { + value: Wrapper, + enumerable: !1, + writable: !0, + configurable: !0 + } }), setPrototypeOf(Wrapper, t); + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); + } + module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/fs/index.js +var require_fs$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const api = [ + "access", + "appendFile", + "chmod", + "chown", + "close", + "copyFile", + "fchmod", + "fchown", + "fdatasync", + "fstat", + "fsync", + "ftruncate", + "futimes", + "lchown", + "lchmod", + "link", + "lstat", + "mkdir", + "mkdtemp", + "open", + "readFile", + "readdir", + "readlink", + "realpath", + "rename", + "rmdir", + "stat", + "symlink", + "truncate", + "unlink", + "utimes", + "writeFile" + ].filter((key) => { + return typeof fs[key] === "function"; + }); + Object.keys(fs).forEach((key) => { + if (key === "promises") return; + exports[key] = fs[key]; + }); + api.forEach((method) => { + exports[method] = u(fs[method]); + }); + exports.exists = function(filename, callback) { + if (typeof callback === "function") return fs.exists(filename, callback); + return new Promise((resolve) => { + return fs.exists(filename, resolve); + }); + }; + exports.read = function(fd, buffer, offset, length, position, callback) { + if (typeof callback === "function") return fs.read(fd, buffer, offset, length, position, callback); + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { + if (err) return reject(err); + resolve({ + bytesRead, + buffer + }); + }); + }); + }; + exports.write = function(fd, buffer, ...args) { + if (typeof args[args.length - 1] === "function") return fs.write(fd, buffer, ...args); + return new Promise((resolve, reject) => { + fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { + if (err) return reject(err); + resolve({ + bytesWritten, + buffer + }); + }); + }); + }; + if (typeof fs.realpath.native === "function") exports.realpath.native = u(fs.realpath.native); +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/mkdirs/win32.js +var require_win32 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$40 = __require("path"); + function getRootPath(p) { + p = path$40.normalize(path$40.resolve(p)).split(path$40.sep); + if (p.length > 0) return p[0]; + return null; + } + const INVALID_PATH_CHARS = /[<>:"|?*]/; + function invalidWin32Path(p) { + const rp = getRootPath(p); + p = p.replace(rp, ""); + return INVALID_PATH_CHARS.test(p); + } + module.exports = { + getRootPath, + invalidWin32Path + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/mkdirs/mkdirs.js +var require_mkdirs$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$39 = __require("path"); + const invalidWin32Path = require_win32().invalidWin32Path; + const o777 = parseInt("0777", 8); + function mkdirs(p, opts, callback, made) { + if (typeof opts === "function") { + callback = opts; + opts = {}; + } else if (!opts || typeof opts !== "object") opts = { mode: opts }; + if (process.platform === "win32" && invalidWin32Path(p)) { + const errInval = /* @__PURE__ */ new Error(p + " contains invalid WIN32 path characters."); + errInval.code = "EINVAL"; + return callback(errInval); + } + let mode = opts.mode; + const xfs = opts.fs || fs; + if (mode === void 0) mode = o777 & ~process.umask(); + if (!made) made = null; + callback = callback || function() {}; + p = path$39.resolve(p); + xfs.mkdir(p, mode, (er) => { + if (!er) { + made = made || p; + return callback(null, made); + } + switch (er.code) { + case "ENOENT": + if (path$39.dirname(p) === p) return callback(er); + mkdirs(path$39.dirname(p), opts, (er, made) => { + if (er) callback(er, made); + else mkdirs(p, opts, callback, made); + }); + break; + default: + xfs.stat(p, (er2, stat) => { + if (er2 || !stat.isDirectory()) callback(er, made); + else callback(null, made); + }); + break; + } + }); + } + module.exports = mkdirs; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js +var require_mkdirs_sync = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$38 = __require("path"); + const invalidWin32Path = require_win32().invalidWin32Path; + const o777 = parseInt("0777", 8); + function mkdirsSync(p, opts, made) { + if (!opts || typeof opts !== "object") opts = { mode: opts }; + let mode = opts.mode; + const xfs = opts.fs || fs; + if (process.platform === "win32" && invalidWin32Path(p)) { + const errInval = /* @__PURE__ */ new Error(p + " contains invalid WIN32 path characters."); + errInval.code = "EINVAL"; + throw errInval; + } + if (mode === void 0) mode = o777 & ~process.umask(); + if (!made) made = null; + p = path$38.resolve(p); + try { + xfs.mkdirSync(p, mode); + made = made || p; + } catch (err0) { + if (err0.code === "ENOENT") { + if (path$38.dirname(p) === p) throw err0; + made = mkdirsSync(path$38.dirname(p), opts, made); + mkdirsSync(p, opts, made); + } else { + let stat; + try { + stat = xfs.statSync(p); + } catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + } + } + return made; + } + module.exports = mkdirsSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/mkdirs/index.js +var require_mkdirs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const mkdirs = u(require_mkdirs$1()); + const mkdirsSync = require_mkdirs_sync(); + module.exports = { + mkdirs, + mkdirsSync, + mkdirp: mkdirs, + mkdirpSync: mkdirsSync, + ensureDir: mkdirs, + ensureDirSync: mkdirsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/util/utimes.js +var require_utimes = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const os$3 = __require("os"); + const path$37 = __require("path"); + function hasMillisResSync() { + let tmpfile = path$37.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2)); + tmpfile = path$37.join(os$3.tmpdir(), tmpfile); + const d = /* @__PURE__ */ new Date(1435410243862); + fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141"); + const fd = fs.openSync(tmpfile, "r+"); + fs.futimesSync(fd, d, d); + fs.closeSync(fd); + return fs.statSync(tmpfile).mtime > 1435410243e3; + } + function hasMillisRes(callback) { + let tmpfile = path$37.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2)); + tmpfile = path$37.join(os$3.tmpdir(), tmpfile); + const d = /* @__PURE__ */ new Date(1435410243862); + fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => { + if (err) return callback(err); + fs.open(tmpfile, "r+", (err, fd) => { + if (err) return callback(err); + fs.futimes(fd, d, d, (err) => { + if (err) return callback(err); + fs.close(fd, (err) => { + if (err) return callback(err); + fs.stat(tmpfile, (err, stats) => { + if (err) return callback(err); + callback(null, stats.mtime > 1435410243e3); + }); + }); + }); + }); + }); + } + function timeRemoveMillis(timestamp) { + if (typeof timestamp === "number") return Math.floor(timestamp / 1e3) * 1e3; + else if (timestamp instanceof Date) return /* @__PURE__ */ new Date(Math.floor(timestamp.getTime() / 1e3) * 1e3); + else throw new Error("fs-extra: timeRemoveMillis() unknown parameter type"); + } + function utimesMillis(path, atime, mtime, callback) { + fs.open(path, "r+", (err, fd) => { + if (err) return callback(err); + fs.futimes(fd, atime, mtime, (futimesErr) => { + fs.close(fd, (closeErr) => { + if (callback) callback(futimesErr || closeErr); + }); + }); + }); + } + function utimesMillisSync(path, atime, mtime) { + const fd = fs.openSync(path, "r+"); + fs.futimesSync(fd, atime, mtime); + return fs.closeSync(fd); + } + module.exports = { + hasMillisRes, + hasMillisResSync, + timeRemoveMillis, + utimesMillis, + utimesMillisSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/util/stat.js +var require_stat = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$36 = __require("path"); + const NODE_VERSION_MAJOR_WITH_BIGINT = 10; + const NODE_VERSION_MINOR_WITH_BIGINT = 5; + const NODE_VERSION_PATCH_WITH_BIGINT = 0; + const nodeVersion = process.versions.node.split("."); + const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10); + const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10); + const nodeVersionPatch = Number.parseInt(nodeVersion[2], 10); + function nodeSupportsBigInt() { + if (nodeVersionMajor > NODE_VERSION_MAJOR_WITH_BIGINT) return true; + else if (nodeVersionMajor === NODE_VERSION_MAJOR_WITH_BIGINT) { + if (nodeVersionMinor > NODE_VERSION_MINOR_WITH_BIGINT) return true; + else if (nodeVersionMinor === NODE_VERSION_MINOR_WITH_BIGINT) { + if (nodeVersionPatch >= NODE_VERSION_PATCH_WITH_BIGINT) return true; + } + } + return false; + } + function getStats(src, dest, cb) { + if (nodeSupportsBigInt()) fs.stat(src, { bigint: true }, (err, srcStat) => { + if (err) return cb(err); + fs.stat(dest, { bigint: true }, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(null, { + srcStat, + destStat: null + }); + return cb(err); + } + return cb(null, { + srcStat, + destStat + }); + }); + }); + else fs.stat(src, (err, srcStat) => { + if (err) return cb(err); + fs.stat(dest, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(null, { + srcStat, + destStat: null + }); + return cb(err); + } + return cb(null, { + srcStat, + destStat + }); + }); + }); + } + function getStatsSync(src, dest) { + let srcStat, destStat; + if (nodeSupportsBigInt()) srcStat = fs.statSync(src, { bigint: true }); + else srcStat = fs.statSync(src); + try { + if (nodeSupportsBigInt()) destStat = fs.statSync(dest, { bigint: true }); + else destStat = fs.statSync(dest); + } catch (err) { + if (err.code === "ENOENT") return { + srcStat, + destStat: null + }; + throw err; + } + return { + srcStat, + destStat + }; + } + function checkPaths(src, dest, funcName, cb) { + getStats(src, dest, (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) return cb(/* @__PURE__ */ new Error("Source and destination must not be the same.")); + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) return cb(new Error(errMsg(src, dest, funcName))); + return cb(null, { + srcStat, + destStat + }); + }); + } + function checkPathsSync(src, dest, funcName) { + const { srcStat, destStat } = getStatsSync(src, dest); + if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) throw new Error("Source and destination must not be the same."); + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) throw new Error(errMsg(src, dest, funcName)); + return { + srcStat, + destStat + }; + } + function checkParentPaths(src, srcStat, dest, funcName, cb) { + const srcParent = path$36.resolve(path$36.dirname(src)); + const destParent = path$36.resolve(path$36.dirname(dest)); + if (destParent === srcParent || destParent === path$36.parse(destParent).root) return cb(); + if (nodeSupportsBigInt()) fs.stat(destParent, { bigint: true }, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(); + return cb(err); + } + if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) return cb(new Error(errMsg(src, dest, funcName))); + return checkParentPaths(src, srcStat, destParent, funcName, cb); + }); + else fs.stat(destParent, (err, destStat) => { + if (err) { + if (err.code === "ENOENT") return cb(); + return cb(err); + } + if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) return cb(new Error(errMsg(src, dest, funcName))); + return checkParentPaths(src, srcStat, destParent, funcName, cb); + }); + } + function checkParentPathsSync(src, srcStat, dest, funcName) { + const srcParent = path$36.resolve(path$36.dirname(src)); + const destParent = path$36.resolve(path$36.dirname(dest)); + if (destParent === srcParent || destParent === path$36.parse(destParent).root) return; + let destStat; + try { + if (nodeSupportsBigInt()) destStat = fs.statSync(destParent, { bigint: true }); + else destStat = fs.statSync(destParent); + } catch (err) { + if (err.code === "ENOENT") return; + throw err; + } + if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) throw new Error(errMsg(src, dest, funcName)); + return checkParentPathsSync(src, srcStat, destParent, funcName); + } + function isSrcSubdir(src, dest) { + const srcArr = path$36.resolve(src).split(path$36.sep).filter((i) => i); + const destArr = path$36.resolve(dest).split(path$36.sep).filter((i) => i); + return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true); + } + function errMsg(src, dest, funcName) { + return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`; + } + module.exports = { + checkPaths, + checkPathsSync, + checkParentPaths, + checkParentPathsSync, + isSrcSubdir + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/util/buffer.js +var require_buffer = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = function(size) { + if (typeof Buffer.allocUnsafe === "function") try { + return Buffer.allocUnsafe(size); + } catch (e) { + return new Buffer(size); + } + return new Buffer(size); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/copy-sync/copy-sync.js +var require_copy_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$35 = __require("path"); + const mkdirpSync = require_mkdirs().mkdirsSync; + const utimesSync = require_utimes().utimesMillisSync; + const stat = require_stat(); + function copySync(src, dest, opts) { + if (typeof opts === "function") opts = { filter: opts }; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`); + const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy"); + stat.checkParentPathsSync(src, srcStat, dest, "copy"); + return handleFilterAndCopy(destStat, src, dest, opts); + } + function handleFilterAndCopy(destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return; + const destParent = path$35.dirname(dest); + if (!fs.existsSync(destParent)) mkdirpSync(destParent); + return startCopy(destStat, src, dest, opts); + } + function startCopy(destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return; + return getStats(destStat, src, dest, opts); + } + function getStats(destStat, src, dest, opts) { + const srcStat = (opts.dereference ? fs.statSync : fs.lstatSync)(src); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts); + } + function onFile(srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts); + return mayCopyFile(srcStat, src, dest, opts); + } + function mayCopyFile(srcStat, src, dest, opts) { + if (opts.overwrite) { + fs.unlinkSync(dest); + return copyFile(srcStat, src, dest, opts); + } else if (opts.errorOnExist) throw new Error(`'${dest}' already exists`); + } + function copyFile(srcStat, src, dest, opts) { + if (typeof fs.copyFileSync === "function") { + fs.copyFileSync(src, dest); + fs.chmodSync(dest, srcStat.mode); + if (opts.preserveTimestamps) return utimesSync(dest, srcStat.atime, srcStat.mtime); + return; + } + return copyFileFallback(srcStat, src, dest, opts); + } + function copyFileFallback(srcStat, src, dest, opts) { + const BUF_LENGTH = 64 * 1024; + const _buff = require_buffer()(BUF_LENGTH); + const fdr = fs.openSync(src, "r"); + const fdw = fs.openSync(dest, "w", srcStat.mode); + let pos = 0; + while (pos < srcStat.size) { + const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos); + fs.writeSync(fdw, _buff, 0, bytesRead); + pos += bytesRead; + } + if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime); + fs.closeSync(fdr); + fs.closeSync(fdw); + } + function onDir(srcStat, destStat, src, dest, opts) { + if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts); + if (destStat && !destStat.isDirectory()) throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`); + return copyDir(src, dest, opts); + } + function mkDirAndCopy(srcStat, src, dest, opts) { + fs.mkdirSync(dest); + copyDir(src, dest, opts); + return fs.chmodSync(dest, srcStat.mode); + } + function copyDir(src, dest, opts) { + fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts)); + } + function copyDirItem(item, src, dest, opts) { + const srcItem = path$35.join(src, item); + const destItem = path$35.join(dest, item); + const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy"); + return startCopy(destStat, srcItem, destItem, opts); + } + function onLink(destStat, src, dest, opts) { + let resolvedSrc = fs.readlinkSync(src); + if (opts.dereference) resolvedSrc = path$35.resolve(process.cwd(), resolvedSrc); + if (!destStat) return fs.symlinkSync(resolvedSrc, dest); + else { + let resolvedDest; + try { + resolvedDest = fs.readlinkSync(dest); + } catch (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlinkSync(resolvedSrc, dest); + throw err; + } + if (opts.dereference) resolvedDest = path$35.resolve(process.cwd(), resolvedDest); + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`); + if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`); + return copyLink(resolvedSrc, dest); + } + } + function copyLink(resolvedSrc, dest) { + fs.unlinkSync(dest); + return fs.symlinkSync(resolvedSrc, dest); + } + module.exports = copySync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/copy-sync/index.js +var require_copy_sync = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { copySync: require_copy_sync$1() }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/path-exists/index.js +var require_path_exists$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromPromise; + const fs = require_fs$4(); + function pathExists(path) { + return fs.access(path).then(() => true).catch(() => false); + } + module.exports = { + pathExists: u(pathExists), + pathExistsSync: fs.existsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/copy/copy.js +var require_copy$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$34 = __require("path"); + const mkdirp = require_mkdirs().mkdirs; + const pathExists = require_path_exists$1().pathExists; + const utimes = require_utimes().utimesMillis; + const stat = require_stat(); + function copy(src, dest, opts, cb) { + if (typeof opts === "function" && !cb) { + cb = opts; + opts = {}; + } else if (typeof opts === "function") opts = { filter: opts }; + cb = cb || function() {}; + opts = opts || {}; + opts.clobber = "clobber" in opts ? !!opts.clobber : true; + opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber; + if (opts.preserveTimestamps && process.arch === "ia32") console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`); + stat.checkPaths(src, dest, "copy", (err, stats) => { + if (err) return cb(err); + const { srcStat, destStat } = stats; + stat.checkParentPaths(src, srcStat, dest, "copy", (err) => { + if (err) return cb(err); + if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb); + return checkParentDir(destStat, src, dest, opts, cb); + }); + }); + } + function checkParentDir(destStat, src, dest, opts, cb) { + const destParent = path$34.dirname(dest); + pathExists(destParent, (err, dirExists) => { + if (err) return cb(err); + if (dirExists) return startCopy(destStat, src, dest, opts, cb); + mkdirp(destParent, (err) => { + if (err) return cb(err); + return startCopy(destStat, src, dest, opts, cb); + }); + }); + } + function handleFilter(onInclude, destStat, src, dest, opts, cb) { + Promise.resolve(opts.filter(src, dest)).then((include) => { + if (include) return onInclude(destStat, src, dest, opts, cb); + return cb(); + }, (error) => cb(error)); + } + function startCopy(destStat, src, dest, opts, cb) { + if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb); + return getStats(destStat, src, dest, opts, cb); + } + function getStats(destStat, src, dest, opts, cb) { + (opts.dereference ? fs.stat : fs.lstat)(src, (err, srcStat) => { + if (err) return cb(err); + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb); + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb); + }); + } + function onFile(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return copyFile(srcStat, src, dest, opts, cb); + return mayCopyFile(srcStat, src, dest, opts, cb); + } + function mayCopyFile(srcStat, src, dest, opts, cb) { + if (opts.overwrite) fs.unlink(dest, (err) => { + if (err) return cb(err); + return copyFile(srcStat, src, dest, opts, cb); + }); + else if (opts.errorOnExist) return cb(/* @__PURE__ */ new Error(`'${dest}' already exists`)); + else return cb(); + } + function copyFile(srcStat, src, dest, opts, cb) { + if (typeof fs.copyFile === "function") return fs.copyFile(src, dest, (err) => { + if (err) return cb(err); + return setDestModeAndTimestamps(srcStat, dest, opts, cb); + }); + return copyFileFallback(srcStat, src, dest, opts, cb); + } + function copyFileFallback(srcStat, src, dest, opts, cb) { + const rs = fs.createReadStream(src); + rs.on("error", (err) => cb(err)).once("open", () => { + const ws = fs.createWriteStream(dest, { mode: srcStat.mode }); + ws.on("error", (err) => cb(err)).on("open", () => rs.pipe(ws)).once("close", () => setDestModeAndTimestamps(srcStat, dest, opts, cb)); + }); + } + function setDestModeAndTimestamps(srcStat, dest, opts, cb) { + fs.chmod(dest, srcStat.mode, (err) => { + if (err) return cb(err); + if (opts.preserveTimestamps) return utimes(dest, srcStat.atime, srcStat.mtime, cb); + return cb(); + }); + } + function onDir(srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts, cb); + if (destStat && !destStat.isDirectory()) return cb(/* @__PURE__ */ new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)); + return copyDir(src, dest, opts, cb); + } + function mkDirAndCopy(srcStat, src, dest, opts, cb) { + fs.mkdir(dest, (err) => { + if (err) return cb(err); + copyDir(src, dest, opts, (err) => { + if (err) return cb(err); + return fs.chmod(dest, srcStat.mode, cb); + }); + }); + } + function copyDir(src, dest, opts, cb) { + fs.readdir(src, (err, items) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + } + function copyDirItems(items, src, dest, opts, cb) { + const item = items.pop(); + if (!item) return cb(); + return copyDirItem(items, item, src, dest, opts, cb); + } + function copyDirItem(items, item, src, dest, opts, cb) { + const srcItem = path$34.join(src, item); + const destItem = path$34.join(dest, item); + stat.checkPaths(srcItem, destItem, "copy", (err, stats) => { + if (err) return cb(err); + const { destStat } = stats; + startCopy(destStat, srcItem, destItem, opts, (err) => { + if (err) return cb(err); + return copyDirItems(items, src, dest, opts, cb); + }); + }); + } + function onLink(destStat, src, dest, opts, cb) { + fs.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err); + if (opts.dereference) resolvedSrc = path$34.resolve(process.cwd(), resolvedSrc); + if (!destStat) return fs.symlink(resolvedSrc, dest, cb); + else fs.readlink(dest, (err, resolvedDest) => { + if (err) { + if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs.symlink(resolvedSrc, dest, cb); + return cb(err); + } + if (opts.dereference) resolvedDest = path$34.resolve(process.cwd(), resolvedDest); + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) return cb(/* @__PURE__ */ new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)); + if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) return cb(/* @__PURE__ */ new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)); + return copyLink(resolvedSrc, dest, cb); + }); + }); + } + function copyLink(resolvedSrc, dest, cb) { + fs.unlink(dest, (err) => { + if (err) return cb(err); + return fs.symlink(resolvedSrc, dest, cb); + }); + } + module.exports = copy; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/copy/index.js +var require_copy = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + module.exports = { copy: u(require_copy$1()) }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/remove/rimraf.js +var require_rimraf = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$33 = __require("path"); + const assert = __require("assert"); + const isWindows = process.platform === "win32"; + function defaults(options) { + [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ].forEach((m) => { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + } + function rimraf(p, options, cb) { + let busyTries = 0; + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.strictEqual(typeof p, "string", "rimraf: path should be a string"); + assert.strictEqual(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.strictEqual(typeof options, "object", "rimraf: options should be object"); + defaults(options); + rimraf_(p, options, function CB(er) { + if (er) { + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + const time = busyTries * 100; + return setTimeout(() => rimraf_(p, options, CB), time); + } + if (er.code === "ENOENT") er = null; + } + cb(er); + }); + } + function rimraf_(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, (er, st) => { + if (er && er.code === "ENOENT") return cb(null); + if (er && er.code === "EPERM" && isWindows) return fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) return rmdir(p, options, er, cb); + options.unlink(p, (er) => { + if (er) { + if (er.code === "ENOENT") return cb(null); + if (er.code === "EPERM") return isWindows ? fixWinEPERM(p, options, er, cb) : rmdir(p, options, er, cb); + if (er.code === "EISDIR") return rmdir(p, options, er, cb); + } + return cb(er); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + if (er) assert(er instanceof Error); + options.chmod(p, 438, (er2) => { + if (er2) cb(er2.code === "ENOENT" ? null : er); + else options.stat(p, (er3, stats) => { + if (er3) cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) rmdir(p, options, er, cb); + else options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + let stats; + assert(p); + assert(options); + if (er) assert(er instanceof Error); + try { + options.chmodSync(p, 438); + } catch (er2) { + if (er2.code === "ENOENT") return; + else throw er; + } + try { + stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") return; + else throw er; + } + if (stats.isDirectory()) rmdirSync(p, options, er); + else options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert(p); + assert(options); + if (originalEr) assert(originalEr instanceof Error); + assert(typeof cb === "function"); + options.rmdir(p, (er) => { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") cb(originalEr); + else cb(er); + }); + } + function rmkids(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, (er, files) => { + if (er) return cb(er); + let n = files.length; + let errState; + if (n === 0) return options.rmdir(p, cb); + files.forEach((f) => { + rimraf(path$33.join(p, f), options, (er) => { + if (errState) return; + if (er) return cb(errState = er); + if (--n === 0) options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + let st; + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.strictEqual(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.strictEqual(typeof options, "object", "rimraf: options should be object"); + try { + st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") return; + if (er.code === "EPERM" && isWindows) fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) rmdirSync(p, options, null); + else options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") return; + else if (er.code === "EPERM") return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + else if (er.code !== "EISDIR") throw er; + rmdirSync(p, options, er); + } + } + function rmdirSync(p, options, originalEr) { + assert(p); + assert(options); + if (originalEr) assert(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOTDIR") throw originalEr; + else if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") rmkidsSync(p, options); + else if (er.code !== "ENOENT") throw er; + } + } + function rmkidsSync(p, options) { + assert(p); + assert(options); + options.readdirSync(p).forEach((f) => rimrafSync(path$33.join(p, f), options)); + if (isWindows) { + const startTime = Date.now(); + do + try { + return options.rmdirSync(p, options); + } catch (er) {} + while (Date.now() - startTime < 500); + } else return options.rmdirSync(p, options); + } + module.exports = rimraf; + rimraf.sync = rimrafSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/remove/index.js +var require_remove = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const rimraf = require_rimraf(); + module.exports = { + remove: u(rimraf), + removeSync: rimraf.sync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/empty/index.js +var require_empty = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const path$32 = __require("path"); + const mkdir = require_mkdirs(); + const remove = require_remove(); + const emptyDir = u(function emptyDir(dir, callback) { + callback = callback || function() {}; + fs.readdir(dir, (err, items) => { + if (err) return mkdir.mkdirs(dir, callback); + items = items.map((item) => path$32.join(dir, item)); + deleteItem(); + function deleteItem() { + const item = items.pop(); + if (!item) return callback(); + remove.remove(item, (err) => { + if (err) return callback(err); + deleteItem(); + }); + } + }); + }); + function emptyDirSync(dir) { + let items; + try { + items = fs.readdirSync(dir); + } catch (err) { + return mkdir.mkdirsSync(dir); + } + items.forEach((item) => { + item = path$32.join(dir, item); + remove.removeSync(item); + }); + } + module.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/file.js +var require_file = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$31 = __require("path"); + const fs = require_graceful_fs(); + const mkdir = require_mkdirs(); + const pathExists = require_path_exists$1().pathExists; + function createFile(file, callback) { + function makeFile() { + fs.writeFile(file, "", (err) => { + if (err) return callback(err); + callback(); + }); + } + fs.stat(file, (err, stats) => { + if (!err && stats.isFile()) return callback(); + const dir = path$31.dirname(file); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return makeFile(); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + makeFile(); + }); + }); + }); + } + function createFileSync(file) { + let stats; + try { + stats = fs.statSync(file); + } catch (e) {} + if (stats && stats.isFile()) return; + const dir = path$31.dirname(file); + if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir); + fs.writeFileSync(file, ""); + } + module.exports = { + createFile: u(createFile), + createFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/link.js +var require_link = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$30 = __require("path"); + const fs = require_graceful_fs(); + const mkdir = require_mkdirs(); + const pathExists = require_path_exists$1().pathExists; + function createLink(srcpath, dstpath, callback) { + function makeLink(srcpath, dstpath) { + fs.link(srcpath, dstpath, (err) => { + if (err) return callback(err); + callback(null); + }); + } + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err); + if (destinationExists) return callback(null); + fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureLink"); + return callback(err); + } + const dir = path$30.dirname(dstpath); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return makeLink(srcpath, dstpath); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + makeLink(srcpath, dstpath); + }); + }); + }); + }); + } + function createLinkSync(srcpath, dstpath) { + if (fs.existsSync(dstpath)) return void 0; + try { + fs.lstatSync(srcpath); + } catch (err) { + err.message = err.message.replace("lstat", "ensureLink"); + throw err; + } + const dir = path$30.dirname(dstpath); + if (fs.existsSync(dir)) return fs.linkSync(srcpath, dstpath); + mkdir.mkdirsSync(dir); + return fs.linkSync(srcpath, dstpath); + } + module.exports = { + createLink: u(createLink), + createLinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js +var require_symlink_paths = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$29 = __require("path"); + const fs = require_graceful_fs(); + const pathExists = require_path_exists$1().pathExists; + /** + * Function that returns two types of paths, one relative to symlink, and one + * relative to the current working directory. Checks if path is absolute or + * relative. If the path is relative, this function checks if the path is + * relative to symlink or relative to current working directory. This is an + * initiative to find a smarter `srcpath` to supply when building symlinks. + * This allows you to determine which path to use out of one of three possible + * types of source paths. The first is an absolute path. This is detected by + * `path.isAbsolute()`. When an absolute path is provided, it is checked to + * see if it exists. If it does it's used, if not an error is returned + * (callback)/ thrown (sync). The other two options for `srcpath` are a + * relative url. By default Node's `fs.symlink` works by creating a symlink + * using `dstpath` and expects the `srcpath` to be relative to the newly + * created symlink. If you provide a `srcpath` that does not exist on the file + * system it results in a broken symlink. To minimize this, the function + * checks to see if the 'relative to symlink' source file exists, and if it + * does it will use it. If it does not, it checks if there's a file that + * exists that is relative to the current working directory, if does its used. + * This preserves the expectations of the original fs.symlink spec and adds + * the ability to pass in `relative to current working direcotry` paths. + */ + function symlinkPaths(srcpath, dstpath, callback) { + if (path$29.isAbsolute(srcpath)) return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + "toCwd": srcpath, + "toDst": srcpath + }); + }); + else { + const dstdir = path$29.dirname(dstpath); + const relativeToDst = path$29.join(dstdir, srcpath); + return pathExists(relativeToDst, (err, exists) => { + if (err) return callback(err); + if (exists) return callback(null, { + "toCwd": relativeToDst, + "toDst": srcpath + }); + else return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace("lstat", "ensureSymlink"); + return callback(err); + } + return callback(null, { + "toCwd": srcpath, + "toDst": path$29.relative(dstdir, srcpath) + }); + }); + }); + } + } + function symlinkPathsSync(srcpath, dstpath) { + let exists; + if (path$29.isAbsolute(srcpath)) { + exists = fs.existsSync(srcpath); + if (!exists) throw new Error("absolute srcpath does not exist"); + return { + "toCwd": srcpath, + "toDst": srcpath + }; + } else { + const dstdir = path$29.dirname(dstpath); + const relativeToDst = path$29.join(dstdir, srcpath); + exists = fs.existsSync(relativeToDst); + if (exists) return { + "toCwd": relativeToDst, + "toDst": srcpath + }; + else { + exists = fs.existsSync(srcpath); + if (!exists) throw new Error("relative srcpath does not exist"); + return { + "toCwd": srcpath, + "toDst": path$29.relative(dstdir, srcpath) + }; + } + } + } + module.exports = { + symlinkPaths, + symlinkPathsSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js +var require_symlink_type = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + function symlinkType(srcpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + if (type) return callback(null, type); + fs.lstat(srcpath, (err, stats) => { + if (err) return callback(null, "file"); + type = stats && stats.isDirectory() ? "dir" : "file"; + callback(null, type); + }); + } + function symlinkTypeSync(srcpath, type) { + let stats; + if (type) return type; + try { + stats = fs.lstatSync(srcpath); + } catch (e) { + return "file"; + } + return stats && stats.isDirectory() ? "dir" : "file"; + } + module.exports = { + symlinkType, + symlinkTypeSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/symlink.js +var require_symlink = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const path$28 = __require("path"); + const fs = require_graceful_fs(); + const _mkdirs = require_mkdirs(); + const mkdirs = _mkdirs.mkdirs; + const mkdirsSync = _mkdirs.mkdirsSync; + const _symlinkPaths = require_symlink_paths(); + const symlinkPaths = _symlinkPaths.symlinkPaths; + const symlinkPathsSync = _symlinkPaths.symlinkPathsSync; + const _symlinkType = require_symlink_type(); + const symlinkType = _symlinkType.symlinkType; + const symlinkTypeSync = _symlinkType.symlinkTypeSync; + const pathExists = require_path_exists$1().pathExists; + function createSymlink(srcpath, dstpath, type, callback) { + callback = typeof type === "function" ? type : callback; + type = typeof type === "function" ? false : type; + pathExists(dstpath, (err, destinationExists) => { + if (err) return callback(err); + if (destinationExists) return callback(null); + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err); + srcpath = relative.toDst; + symlinkType(relative.toCwd, type, (err, type) => { + if (err) return callback(err); + const dir = path$28.dirname(dstpath); + pathExists(dir, (err, dirExists) => { + if (err) return callback(err); + if (dirExists) return fs.symlink(srcpath, dstpath, type, callback); + mkdirs(dir, (err) => { + if (err) return callback(err); + fs.symlink(srcpath, dstpath, type, callback); + }); + }); + }); + }); + }); + } + function createSymlinkSync(srcpath, dstpath, type) { + if (fs.existsSync(dstpath)) return void 0; + const relative = symlinkPathsSync(srcpath, dstpath); + srcpath = relative.toDst; + type = symlinkTypeSync(relative.toCwd, type); + const dir = path$28.dirname(dstpath); + if (fs.existsSync(dir)) return fs.symlinkSync(srcpath, dstpath, type); + mkdirsSync(dir); + return fs.symlinkSync(srcpath, dstpath, type); + } + module.exports = { + createSymlink: u(createSymlink), + createSymlinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/ensure/index.js +var require_ensure = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const file = require_file(); + const link = require_link(); + const symlink = require_symlink(); + module.exports = { + createFile: file.createFile, + createFileSync: file.createFileSync, + ensureFile: file.createFile, + ensureFileSync: file.createFileSync, + createLink: link.createLink, + createLinkSync: link.createLinkSync, + ensureLink: link.createLink, + ensureLinkSync: link.createLinkSync, + createSymlink: symlink.createSymlink, + createSymlinkSync: symlink.createSymlinkSync, + ensureSymlink: symlink.createSymlink, + ensureSymlinkSync: symlink.createSymlinkSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/json/jsonfile.js +var require_jsonfile = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const jsonFile = require_jsonfile$2(); + module.exports = { + readJson: u(jsonFile.readFile), + readJsonSync: jsonFile.readFileSync, + writeJson: u(jsonFile.writeFile), + writeJsonSync: jsonFile.writeFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/json/output-json.js +var require_output_json = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$27 = __require("path"); + const mkdir = require_mkdirs(); + const pathExists = require_path_exists$1().pathExists; + const jsonFile = require_jsonfile(); + function outputJson(file, data, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } + const dir = path$27.dirname(file); + pathExists(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return jsonFile.writeJson(file, data, options, callback); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + jsonFile.writeJson(file, data, options, callback); + }); + }); + } + module.exports = outputJson; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/json/output-json-sync.js +var require_output_json_sync = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$26 = __require("path"); + const mkdir = require_mkdirs(); + const jsonFile = require_jsonfile(); + function outputJsonSync(file, data, options) { + const dir = path$26.dirname(file); + if (!fs.existsSync(dir)) mkdir.mkdirsSync(dir); + jsonFile.writeJsonSync(file, data, options); + } + module.exports = outputJsonSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/json/index.js +var require_json$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const jsonFile = require_jsonfile(); + jsonFile.outputJson = u(require_output_json()); + jsonFile.outputJsonSync = require_output_json_sync(); + jsonFile.outputJSON = jsonFile.outputJson; + jsonFile.outputJSONSync = jsonFile.outputJsonSync; + jsonFile.writeJSON = jsonFile.writeJson; + jsonFile.writeJSONSync = jsonFile.writeJsonSync; + jsonFile.readJSON = jsonFile.readJson; + jsonFile.readJSONSync = jsonFile.readJsonSync; + module.exports = jsonFile; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/move-sync/move-sync.js +var require_move_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$25 = __require("path"); + const copySync = require_copy_sync().copySync; + const removeSync = require_remove().removeSync; + const mkdirpSync = require_mkdirs().mkdirpSync; + const stat = require_stat(); + function moveSync(src, dest, opts) { + opts = opts || {}; + const overwrite = opts.overwrite || opts.clobber || false; + const { srcStat } = stat.checkPathsSync(src, dest, "move"); + stat.checkParentPathsSync(src, srcStat, dest, "move"); + mkdirpSync(path$25.dirname(dest)); + return doRename(src, dest, overwrite); + } + function doRename(src, dest, overwrite) { + if (overwrite) { + removeSync(dest); + return rename(src, dest, overwrite); + } + if (fs.existsSync(dest)) throw new Error("dest already exists."); + return rename(src, dest, overwrite); + } + function rename(src, dest, overwrite) { + try { + fs.renameSync(src, dest); + } catch (err) { + if (err.code !== "EXDEV") throw err; + return moveAcrossDevice(src, dest, overwrite); + } + } + function moveAcrossDevice(src, dest, overwrite) { + copySync(src, dest, { + overwrite, + errorOnExist: true + }); + return removeSync(src); + } + module.exports = moveSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/move-sync/index.js +var require_move_sync = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { moveSync: require_move_sync$1() }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/move/move.js +var require_move$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const path$24 = __require("path"); + const copy = require_copy().copy; + const remove = require_remove().remove; + const mkdirp = require_mkdirs().mkdirp; + const pathExists = require_path_exists$1().pathExists; + const stat = require_stat(); + function move(src, dest, opts, cb) { + if (typeof opts === "function") { + cb = opts; + opts = {}; + } + const overwrite = opts.overwrite || opts.clobber || false; + stat.checkPaths(src, dest, "move", (err, stats) => { + if (err) return cb(err); + const { srcStat } = stats; + stat.checkParentPaths(src, srcStat, dest, "move", (err) => { + if (err) return cb(err); + mkdirp(path$24.dirname(dest), (err) => { + if (err) return cb(err); + return doRename(src, dest, overwrite, cb); + }); + }); + }); + } + function doRename(src, dest, overwrite, cb) { + if (overwrite) return remove(dest, (err) => { + if (err) return cb(err); + return rename(src, dest, overwrite, cb); + }); + pathExists(dest, (err, destExists) => { + if (err) return cb(err); + if (destExists) return cb(/* @__PURE__ */ new Error("dest already exists.")); + return rename(src, dest, overwrite, cb); + }); + } + function rename(src, dest, overwrite, cb) { + fs.rename(src, dest, (err) => { + if (!err) return cb(); + if (err.code !== "EXDEV") return cb(err); + return moveAcrossDevice(src, dest, overwrite, cb); + }); + } + function moveAcrossDevice(src, dest, overwrite, cb) { + copy(src, dest, { + overwrite, + errorOnExist: true + }, (err) => { + if (err) return cb(err); + return remove(src, cb); + }); + } + module.exports = move; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/move/index.js +var require_move = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + module.exports = { move: u(require_move$1()) }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/output/index.js +var require_output = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const u = require_universalify().fromCallback; + const fs = require_graceful_fs(); + const path$23 = __require("path"); + const mkdir = require_mkdirs(); + const pathExists = require_path_exists$1().pathExists; + function outputFile(file, data, encoding, callback) { + if (typeof encoding === "function") { + callback = encoding; + encoding = "utf8"; + } + const dir = path$23.dirname(file); + pathExists(dir, (err, itDoes) => { + if (err) return callback(err); + if (itDoes) return fs.writeFile(file, data, encoding, callback); + mkdir.mkdirs(dir, (err) => { + if (err) return callback(err); + fs.writeFile(file, data, encoding, callback); + }); + }); + } + function outputFileSync(file, ...args) { + const dir = path$23.dirname(file); + if (fs.existsSync(dir)) return fs.writeFileSync(file, ...args); + mkdir.mkdirsSync(dir); + fs.writeFileSync(file, ...args); + } + module.exports = { + outputFile: u(outputFile), + outputFileSync + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/fs-extra@8.1.0/node_modules/fs-extra/lib/index.js +var require_lib = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = Object.assign({}, require_fs$4(), require_copy_sync(), require_copy(), require_empty(), require_ensure(), require_json$1(), require_mkdirs(), require_move_sync(), require_move(), require_output(), require_path_exists$1(), require_remove()); + const fs$11 = __require("fs"); + if (Object.getOwnPropertyDescriptor(fs$11, "promises")) Object.defineProperty(module.exports, "promises", { get() { + return fs$11.promises; + } }); +})); +//#endregion +//#region ../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js +var require_array_union = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = (...arguments_) => { + return [...new Set([].concat(...arguments_))]; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js +var require_merge2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const PassThrough = __require("stream").PassThrough; + const slice = Array.prototype.slice; + module.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) args.pop(); + else options = {}; + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) options.objectMode = true; + if (options.highWaterMark == null) options.highWaterMark = 64 * 1024; + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) streamsQueue.push(pauseStreams(arguments[i], options)); + mergeStream(); + return this; + } + function mergeStream() { + if (merging) return; + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream); + return; + } + if (!Array.isArray(streams)) streams = [streams]; + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) return; + merging = false; + mergeStream(); + } + function pipe(stream) { + function onend() { + stream.removeListener("merge2UnpipeEnd", onend); + stream.removeListener("end", onend); + if (doPipeError) stream.removeListener("error", onerror); + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream._readableState.endEmitted) return next(); + stream.on("merge2UnpipeEnd", onend); + stream.on("end", onend); + if (doPipeError) stream.on("error", onerror); + stream.pipe(mergedStream, { end: false }); + stream.resume(); + } + for (let i = 0; i < streams.length; i++) pipe(streams[i]); + next(); + } + function endStream() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) mergedStream.end(); + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream) { + stream.emit("merge2UnpipeEnd"); + }); + if (args.length) addStream.apply(null, args); + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options)); + if (!streams._readableState || !streams.pause || !streams.pipe) throw new Error("Only readable stream can be merged."); + streams.pause(); + } else for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options); + return streams; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js +var require_array = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.splitWhen = exports.flatten = void 0; + function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); + } + exports.flatten = flatten; + function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } else result[groupIndex].push(item); + return result; + } + exports.splitWhen = splitWhen; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js +var require_errno = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEnoentCodeError = void 0; + function isEnoentCodeError(error) { + return error.code === "ENOENT"; + } + exports.isEnoentCodeError = isEnoentCodeError; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js +var require_fs$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js +var require_path = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; + const os$2 = __require("os"); + const path$22 = __require("path"); + const IS_WINDOWS_PLATFORM = os$2.platform() === "win32"; + const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; + /** + * All non-escaped special characters. + * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. + * Windows: (){}[], !+@ before (, ! at the beginning. + */ + const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; + const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; + /** + * The device path (\\.\ or \\?\). + * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths + */ + const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; + /** + * All backslashes except those escaping special characters. + * Windows: !()+@{} + * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions + */ + const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; + /** + * Designed to work only with simple paths: `dir\\file`. + */ + function unixify(filepath) { + return filepath.replace(/\\/g, "/"); + } + exports.unixify = unixify; + function makeAbsolute(cwd, filepath) { + return path$22.resolve(cwd, filepath); + } + exports.makeAbsolute = makeAbsolute; + function removeLeadingDotSegment(entry) { + if (entry.charAt(0) === ".") { + const secondCharactery = entry.charAt(1); + if (secondCharactery === "/" || secondCharactery === "\\") return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + return entry; + } + exports.removeLeadingDotSegment = removeLeadingDotSegment; + exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; + function escapeWindowsPath(pattern) { + return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapeWindowsPath = escapeWindowsPath; + function escapePosixPath(pattern) { + return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapePosixPath = escapePosixPath; + exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; + function convertWindowsPathToPattern(filepath) { + return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); + } + exports.convertWindowsPathToPattern = convertWindowsPathToPattern; + function convertPosixPathToPattern(filepath) { + return escapePosixPath(filepath); + } + exports.convertPosixPathToPattern = convertPosixPathToPattern; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js +var require_is_extglob = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + module.exports = function isExtglob(str) { + if (typeof str !== "string" || str === "") return false; + var match; + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js +var require_is_glob = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + var isExtglob = require_is_extglob(); + var chars = { + "{": "}", + "(": ")", + "[": "]" + }; + var strictCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === "*") return true; + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) return true; + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { + if (closeSquareIndex < index) closeSquareIndex = str.indexOf("]", index); + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + } + } + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) return true; + } + } + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { + if (pipeIndex < index) pipeIndex = str.indexOf("|", index); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf("\\", pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + } + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + var relaxedCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) return true; + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + module.exports = function isGlob(str, options) { + if (typeof str !== "string" || str === "") return false; + if (isExtglob(str)) return true; + var check = strictCheck; + if (options && options.strict === false) check = relaxedCheck; + return check(str); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js +var require_glob_parent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var isGlob = require_is_glob(); + var pathPosixDirname = __require("path").posix.dirname; + var isWin32 = __require("os").platform() === "win32"; + var slash = "/"; + var backslash = /\\/g; + var enclosure = /[\{\[].*[\}\]]$/; + var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + /** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} + */ + module.exports = function globParent(str, opts) { + if (Object.assign({ flipBackslashes: true }, opts).flipBackslashes && isWin32 && str.indexOf(slash) < 0) str = str.replace(backslash, slash); + if (enclosure.test(str)) str += slash; + str += "a"; + do + str = pathPosixDirname(str); + while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js +var require_utils$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports.isInteger = (num) => { + if (typeof num === "number") return Number.isInteger(num); + if (typeof num === "string" && num.trim() !== "") return Number.isInteger(Number(num)); + return false; + }; + /** + * Find a node of the given type + */ + exports.find = (node, type) => node.nodes.find((node) => node.type === type); + /** + * Find a node of the given type + */ + exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return (Number(max) - Number(min)) / Number(step) >= limit; + }; + /** + * Escape the given node with '\\' before node.value + */ + exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + if (type && node.type === type || node.type === "open" || node.type === "close") { + if (node.escaped !== true) { + node.value = "\\" + node.value; + node.escaped = true; + } + } + }; + /** + * Returns true if the given brace node should be enclosed in literal braces + */ + exports.encloseBrace = (node) => { + if (node.type !== "brace") return false; + if (node.commas >> 0 + node.ranges >> 0 === 0) { + node.invalid = true; + return true; + } + return false; + }; + /** + * Returns true if a brace node is invalid. + */ + exports.isInvalidBrace = (block) => { + if (block.type !== "brace") return false; + if (block.invalid === true || block.dollar) return true; + if (block.commas >> 0 + block.ranges >> 0 === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; + }; + /** + * Returns true if a node is an open or close node + */ + exports.isOpenOrClose = (node) => { + if (node.type === "open" || node.type === "close") return true; + return node.open === true || node.close === true; + }; + /** + * Reduce an array of text nodes. + */ + exports.reduce = (nodes) => nodes.reduce((acc, node) => { + if (node.type === "text") acc.push(node.value); + if (node.type === "range") node.type = "text"; + return acc; + }, []); + /** + * Flatten an array + */ + exports.flatten = (...args) => { + const result = []; + const flat = (arr) => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + if (Array.isArray(ele)) { + flat(ele); + continue; + } + if (ele !== void 0) result.push(ele); + } + return result; + }; + flat(args); + return result; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js +var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const utils = require_utils$3(); + module.exports = (ast, options = {}) => { + const stringify = (node, parent = {}) => { + const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ""; + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) return "\\" + node.value; + return node.value; + } + if (node.value) return node.value; + if (node.nodes) for (const child of node.nodes) output += stringify(child); + return output; + }; + return stringify(ast); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js +/*! +* is-number +* +* Copyright (c) 2014-present, Jon Schlinkert. +* Released under the MIT License. +*/ +var require_is_number = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = function(num) { + if (typeof num === "number") return num - num === 0; + if (typeof num === "string" && num.trim() !== "") return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + return false; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js +/*! +* to-regex-range +* +* Copyright (c) 2015-present, Jon Schlinkert. +* Released under the MIT License. +*/ +var require_to_regex_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isNumber = require_is_number(); + const toRegexRange = (min, max, options) => { + if (isNumber(min) === false) throw new TypeError("toRegexRange: expected the first argument to be a number"); + if (max === void 0 || min === max) return String(min); + if (isNumber(max) === false) throw new TypeError("toRegexRange: expected the second argument to be a number."); + let opts = { + relaxZeros: true, + ...options + }; + if (typeof opts.strictZeros === "boolean") opts.relaxZeros = opts.strictZeros === false; + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; + if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result; + let a = Math.min(min, max); + let b = Math.max(min, max); + if (Math.abs(a - b) === 1) { + let result = min + "|" + max; + if (opts.capture) return `(${result})`; + if (opts.wrap === false) return result; + return `(?:${result})`; + } + let isPadded = hasPadding(min) || hasPadding(max); + let state = { + min, + max, + a, + b + }; + let positives = []; + let negatives = []; + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + if (a < 0) { + negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts); + a = state.a = 0; + } + if (b >= 0) positives = splitToPatterns(a, b, state, opts); + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + if (opts.capture === true) state.result = `(${state.result})`; + else if (opts.wrap !== false && positives.length + negatives.length > 1) state.result = `(?:${state.result})`; + toRegexRange.cache[cacheKey] = state; + return state.result; + }; + function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; + let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; + let intersected = filterPatterns(neg, pos, "-?", true, options) || []; + return onlyNegative.concat(intersected).concat(onlyPositive).join("|"); + } + function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + let stop = countNines(min, nines); + let stops = /* @__PURE__ */ new Set([max]); + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + stop = countZeros(max + 1, zeros) - 1; + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + stops = [...stops]; + stops.sort(compare); + return stops; + } + /** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + function rangeToPattern(start, stop, options) { + if (start === stop) return { + pattern: start, + count: [], + digits: 0 + }; + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ""; + let count = 0; + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + if (startDigit === stopDigit) pattern += startDigit; + else if (startDigit !== "0" || stopDigit !== "9") pattern += toCharacterClass(startDigit, stopDigit, options); + else count++; + } + if (count) pattern += options.shorthand === true ? "\\d" : "[0-9]"; + return { + pattern, + count: [count], + digits + }; + } + function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + for (let i = 0; i < ranges.length; i++) { + let max = ranges[i]; + let obj = rangeToPattern(String(start), String(max), options); + let zeros = ""; + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) prev.count.pop(); + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max + 1; + continue; + } + if (tok.isPadded) zeros = padZeros(max, tok, options); + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max + 1; + prev = obj; + } + return tokens; + } + function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + for (let ele of arr) { + let { string } = ele; + if (!intersection && !contains(comparison, "string", string)) result.push(prefix + string); + if (intersection && contains(comparison, "string", string)) result.push(prefix + string); + } + return result; + } + /** + * Zip strings + */ + function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; + } + function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; + } + function contains(arr, key, val) { + return arr.some((ele) => ele[key] === val); + } + function countNines(min, len) { + return Number(String(min).slice(0, -len) + "9".repeat(len)); + } + function countZeros(integer, zeros) { + return integer - integer % Math.pow(10, zeros); + } + function toQuantifier(digits) { + let [start = 0, stop = ""] = digits; + if (stop || start > 1) return `{${start + (stop ? "," + stop : "")}}`; + return ""; + } + function toCharacterClass(a, b, options) { + return `[${a}${b - a === 1 ? "" : "-"}${b}]`; + } + function hasPadding(str) { + return /^-?(0+)\d/.test(str); + } + function padZeros(value, tok, options) { + if (!tok.isPadded) return value; + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + switch (diff) { + case 0: return ""; + case 1: return relax ? "0?" : "0"; + case 2: return relax ? "0{0,2}" : "00"; + default: return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } + /** + * Cache + */ + toRegexRange.cache = {}; + toRegexRange.clearCache = () => toRegexRange.cache = {}; + /** + * Expose `toRegexRange` + */ + module.exports = toRegexRange; +})); +//#endregion +//#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js +/*! +* fill-range +* +* Copyright (c) 2014-present, Jon Schlinkert. +* Licensed under the MIT License. +*/ +var require_fill_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util$2 = __require("util"); + const toRegexRange = require_to_regex_range(); + const isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + const transform = (toNumber) => { + return (value) => toNumber === true ? Number(value) : String(value); + }; + const isValidValue = (value) => { + return typeof value === "number" || typeof value === "string" && value !== ""; + }; + const isNumber = (num) => Number.isInteger(+num); + const zeros = (input) => { + let value = `${input}`; + let index = -1; + if (value[0] === "-") value = value.slice(1); + if (value === "0") return false; + while (value[++index] === "0"); + return index > 0; + }; + const stringify = (start, end, options) => { + if (typeof start === "string" || typeof end === "string") return true; + return options.stringify === true; + }; + const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === "-" ? "-" : ""; + if (dash) input = input.slice(1); + input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); + } + if (toNumber === false) return String(input); + return input; + }; + const toMaxLen = (input, maxLength) => { + let negative = input[0] === "-" ? "-" : ""; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = "0" + input; + return negative ? "-" + input : input; + }; + const toSequence = (parts, options, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + let prefix = options.capture ? "" : "?:"; + let positives = ""; + let negatives = ""; + let result; + if (parts.positives.length) positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); + if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; + if (positives && negatives) result = `${positives}|${negatives}`; + else result = positives || negatives; + if (options.wrap) return `(${prefix}${result})`; + return result; + }; + const toRange = (a, b, isNumbers, options) => { + if (isNumbers) return toRegexRange(a, b, { + wrap: false, + ...options + }); + let start = String.fromCharCode(a); + if (a === b) return start; + return `[${start}-${String.fromCharCode(b)}]`; + }; + const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? "" : "?:"; + return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); + } + return toRegexRange(start, end, options); + }; + const rangeError = (...args) => { + return /* @__PURE__ */ new RangeError("Invalid range arguments: " + util$2.inspect(...args)); + }; + const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + }; + const invalidStep = (step, options) => { + if (options.strictRanges === true) throw new TypeError(`Expected step "${step}" to be a number`); + return []; + }; + const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + if (a === 0) a = 0; + if (b === 0) b = 0; + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + if (options.toRegex && step === 1) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + let parts = { + negatives: [], + positives: [] + }; + let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) push(a); + else range.push(pad(format(a, index), maxLen, toNumber)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { + wrap: false, + ...options + }); + return range; + }; + const fillLetters = (start, end, step = 1, options = {}) => { + if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) return invalidRange(start, end, options); + let format = options.transform || ((val) => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + if (options.toRegex && step === 1) return toRange(min, max, false, options); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) return toRegex(range, null, { + wrap: false, + options + }); + return range; + }; + const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) return [start]; + if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options); + if (typeof step === "function") return fill(start, end, 1, { transform: step }); + if (isObject(step)) return fill(start, end, 0, step); + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + if (isNumber(start) && isNumber(end)) return fillNumbers(start, end, step, opts); + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); + }; + module.exports = fill; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js +var require_compile = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fill = require_fill_range(); + const utils = require_utils$3(); + const compile = (ast, options = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options.escapeInvalid === true ? "\\" : ""; + let output = ""; + if (node.isOpen === true) return prefix + node.value; + if (node.isClose === true) { + console.log("node.isClose", prefix, node.value); + return prefix + node.value; + } + if (node.type === "open") return invalid ? prefix + node.value : "("; + if (node.type === "close") return invalid ? prefix + node.value : ")"; + if (node.type === "comma") return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; + if (node.value) return node.value; + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { + ...options, + wrap: false, + toRegex: true, + strictZeros: true + }); + if (range.length !== 0) return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + if (node.nodes) for (const child of node.nodes) output += walk(child, node); + return output; + }; + return walk(ast); + }; + module.exports = compile; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js +var require_expand = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fill = require_fill_range(); + const stringify = require_stringify(); + const utils = require_utils$3(); + const append = (queue = "", stash = "", enclose = false) => { + const result = []; + queue = [].concat(queue); + stash = [].concat(stash); + if (!stash.length) return queue; + if (!queue.length) return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; + for (const item of queue) if (Array.isArray(item)) for (const value of item) result.push(append(value, stash, enclose)); + else for (let ele of stash) { + if (enclose === true && typeof ele === "string") ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + return utils.flatten(result); + }; + const expand = (ast, options = {}) => { + const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; + const walk = (node, parent = {}) => { + node.queue = []; + let p = parent; + let q = parent.queue; + while (p.type !== "brace" && p.type !== "root" && p.parent) { + p = p.parent; + q = p.queue; + } + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ["{}"])); + return; + } + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); + let range = fill(...args, options); + if (range.length === 0) range = stringify(node, options); + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + while (block.type !== "brace" && block.type !== "root" && block.parent) { + block = block.parent; + queue = block.queue; + } + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + if (child.type === "comma" && node.type === "brace") { + if (i === 1) queue.push(""); + queue.push(""); + continue; + } + if (child.type === "close") { + q.push(append(q.pop(), queue, enclose)); + continue; + } + if (child.value && child.type !== "open") { + queue.push(append(queue.pop(), child.value)); + continue; + } + if (child.nodes) walk(child, node); + } + return queue; + }; + return utils.flatten(walk(ast)); + }; + module.exports = expand; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + MAX_LENGTH: 1e4, + CHAR_0: "0", + CHAR_9: "9", + CHAR_UPPERCASE_A: "A", + CHAR_LOWERCASE_A: "a", + CHAR_UPPERCASE_Z: "Z", + CHAR_LOWERCASE_Z: "z", + CHAR_LEFT_PARENTHESES: "(", + CHAR_RIGHT_PARENTHESES: ")", + CHAR_ASTERISK: "*", + CHAR_AMPERSAND: "&", + CHAR_AT: "@", + CHAR_BACKSLASH: "\\", + CHAR_BACKTICK: "`", + CHAR_CARRIAGE_RETURN: "\r", + CHAR_CIRCUMFLEX_ACCENT: "^", + CHAR_COLON: ":", + CHAR_COMMA: ",", + CHAR_DOLLAR: "$", + CHAR_DOT: ".", + CHAR_DOUBLE_QUOTE: "\"", + CHAR_EQUAL: "=", + CHAR_EXCLAMATION_MARK: "!", + CHAR_FORM_FEED: "\f", + CHAR_FORWARD_SLASH: "/", + CHAR_HASH: "#", + CHAR_HYPHEN_MINUS: "-", + CHAR_LEFT_ANGLE_BRACKET: "<", + CHAR_LEFT_CURLY_BRACE: "{", + CHAR_LEFT_SQUARE_BRACKET: "[", + CHAR_LINE_FEED: "\n", + CHAR_NO_BREAK_SPACE: "\xA0", + CHAR_PERCENT: "%", + CHAR_PLUS: "+", + CHAR_QUESTION_MARK: "?", + CHAR_RIGHT_ANGLE_BRACKET: ">", + CHAR_RIGHT_CURLY_BRACE: "}", + CHAR_RIGHT_SQUARE_BRACKET: "]", + CHAR_SEMICOLON: ";", + CHAR_SINGLE_QUOTE: "'", + CHAR_SPACE: " ", + CHAR_TAB: " ", + CHAR_UNDERSCORE: "_", + CHAR_VERTICAL_LINE: "|", + CHAR_ZERO_WIDTH_NOBREAK_SPACE: "" + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js +var require_parse$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const stringify = require_stringify(); + /** + * Constants + */ + const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants$2(); + /** + * parse + */ + const parse = (input, options = {}) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + const opts = options || {}; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + const ast = { + type: "root", + input, + nodes: [] + }; + const stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + /** + * Helpers + */ + const advance = () => input[index++]; + const push = (node) => { + if (node.type === "text" && prev.type === "dot") prev.type = "text"; + if (prev && prev.type === "text" && node.type === "text") { + prev.value += node.value; + return; + } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + push({ type: "bos" }); + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + /** + * Invalid chars + */ + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) continue; + /** + * Escaped chars + */ + if (value === CHAR_BACKSLASH) { + push({ + type: "text", + value: (options.keepEscaping ? value : "") + advance() + }); + continue; + } + /** + * Right square bracket (literal): ']' + */ + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ + type: "text", + value: "\\" + value + }); + continue; + } + /** + * Left square bracket: '[' + */ + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + let next; + while (index < length && (next = advance())) { + value += next; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + if (brackets === 0) break; + } + } + push({ + type: "text", + value + }); + continue; + } + /** + * Parentheses + */ + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ + type: "paren", + nodes: [] + }); + stack.push(block); + push({ + type: "text", + value + }); + continue; + } + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== "paren") { + push({ + type: "text", + value + }); + continue; + } + block = stack.pop(); + push({ + type: "text", + value + }); + block = stack[stack.length - 1]; + continue; + } + /** + * Quotes: '|"|` + */ + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + if (options.keepQuotes !== true) value = ""; + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + value += next; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Left curly brace: '{' + */ + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + block = push({ + type: "brace", + open: true, + close: false, + dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === true, + depth, + commas: 0, + ranges: 0, + nodes: [] + }); + stack.push(block); + push({ + type: "open", + value + }); + continue; + } + /** + * Right curly brace: '}' + */ + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== "brace") { + push({ + type: "text", + value + }); + continue; + } + const type = "close"; + block = stack.pop(); + block.close = true; + push({ + type, + value + }); + depth--; + block = stack[stack.length - 1]; + continue; + } + /** + * Comma: ',' + */ + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { + type: "text", + value: stringify(block) + }]; + } + push({ + type: "comma", + value + }); + block.commas++; + continue; + } + /** + * Dot: '.' + */ + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + if (depth === 0 || siblings.length === 0) { + push({ + type: "text", + value + }); + continue; + } + if (prev.type === "dot") { + block.range = []; + prev.value += value; + prev.type = "range"; + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = "text"; + continue; + } + block.ranges++; + block.args = []; + continue; + } + if (prev.type === "range") { + siblings.pop(); + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + push({ + type: "dot", + value + }); + continue; + } + /** + * Text + */ + push({ + type: "text", + value + }); + } + do { + block = stack.pop(); + if (block.type !== "root") { + block.nodes.forEach((node) => { + if (!node.nodes) { + if (node.type === "open") node.isOpen = true; + if (node.type === "close") node.isClose = true; + if (!node.nodes) node.type = "text"; + node.invalid = true; + } + }); + const parent = stack[stack.length - 1]; + const index = parent.nodes.indexOf(block); + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + push({ type: "eos" }); + return ast; + }; + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js +var require_braces = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const stringify = require_stringify(); + const compile = require_compile(); + const expand = require_expand(); + const parse = require_parse$1(); + /** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + const braces = (input, options = {}) => { + let output = []; + if (Array.isArray(input)) for (const pattern of input) { + const result = braces.create(pattern, options); + if (Array.isArray(result)) output.push(...result); + else output.push(result); + } + else output = [].concat(braces.create(input, options)); + if (options && options.expand === true && options.nodupes === true) output = [...new Set(output)]; + return output; + }; + /** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + braces.parse = (input, options = {}) => parse(input, options); + /** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.stringify = (input, options = {}) => { + if (typeof input === "string") return stringify(braces.parse(input, options), options); + return stringify(input, options); + }; + /** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.compile = (input, options = {}) => { + if (typeof input === "string") input = braces.parse(input, options); + return compile(input, options); + }; + /** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.expand = (input, options = {}) => { + if (typeof input === "string") input = braces.parse(input, options); + let result = expand(input, options); + if (options.noempty === true) result = result.filter(Boolean); + if (options.nodupes === true) result = [...new Set(result)]; + return result; + }; + /** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.create = (input, options = {}) => { + if (input === "" || input.length < 3) return [input]; + return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); + }; + /** + * Expose "braces" + */ + module.exports = braces; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$21 = __require("path"); + const WIN_SLASH = "\\\\/"; + const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + const DEFAULT_MAX_EXTGLOB_RECURSION = 0; + /** + * Posix glob regex + */ + const DOT_LITERAL = "\\."; + const PLUS_LITERAL = "\\+"; + const QMARK_LITERAL = "\\?"; + const SLASH_LITERAL = "\\/"; + const ONE_CHAR = "(?=.)"; + const QMARK = "[^/]"; + const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, + NO_DOTS_SLASH: `(?!${DOTS_SLASH})`, + QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`, + STAR: `${QMARK}*?`, + START_ANCHOR + }; + /** + * Windows glob regex + */ + const WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + module.exports = { + DEFAULT_MAX_EXTGLOB_RECURSION, + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: { + __proto__: null, + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }, + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + REPLACEMENTS: { + __proto__: null, + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + CHAR_0: 48, + CHAR_9: 57, + CHAR_UPPERCASE_A: 65, + CHAR_LOWERCASE_A: 97, + CHAR_UPPERCASE_Z: 90, + CHAR_LOWERCASE_Z: 122, + CHAR_LEFT_PARENTHESES: 40, + CHAR_RIGHT_PARENTHESES: 41, + CHAR_ASTERISK: 42, + CHAR_AMPERSAND: 38, + CHAR_AT: 64, + CHAR_BACKWARD_SLASH: 92, + CHAR_CARRIAGE_RETURN: 13, + CHAR_CIRCUMFLEX_ACCENT: 94, + CHAR_COLON: 58, + CHAR_COMMA: 44, + CHAR_DOT: 46, + CHAR_DOUBLE_QUOTE: 34, + CHAR_EQUAL: 61, + CHAR_EXCLAMATION_MARK: 33, + CHAR_FORM_FEED: 12, + CHAR_FORWARD_SLASH: 47, + CHAR_GRAVE_ACCENT: 96, + CHAR_HASH: 35, + CHAR_HYPHEN_MINUS: 45, + CHAR_LEFT_ANGLE_BRACKET: 60, + CHAR_LEFT_CURLY_BRACE: 123, + CHAR_LEFT_SQUARE_BRACKET: 91, + CHAR_LINE_FEED: 10, + CHAR_NO_BREAK_SPACE: 160, + CHAR_PERCENT: 37, + CHAR_PLUS: 43, + CHAR_QUESTION_MARK: 63, + CHAR_RIGHT_ANGLE_BRACKET: 62, + CHAR_RIGHT_CURLY_BRACE: 125, + CHAR_RIGHT_SQUARE_BRACKET: 93, + CHAR_SEMICOLON: 59, + CHAR_SINGLE_QUOTE: 39, + CHAR_SPACE: 32, + CHAR_TAB: 9, + CHAR_UNDERSCORE: 95, + CHAR_VERTICAL_LINE: 124, + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + SEP: path$21.sep, + /** + * Create EXTGLOB_CHARS + */ + extglobChars(chars) { + return { + "!": { + type: "negate", + open: "(?:(?!(?:", + close: `))${chars.STAR})` + }, + "?": { + type: "qmark", + open: "(?:", + close: ")?" + }, + "+": { + type: "plus", + open: "(?:", + close: ")+" + }, + "*": { + type: "star", + open: "(?:", + close: ")*" + }, + "@": { + type: "at", + open: "(?:", + close: ")" + } + }; + }, + /** + * Create GLOB_CHARS + */ + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js +var require_utils$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + const path$20 = __require("path"); + const win32 = process.platform === "win32"; + const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) return true; + return false; + }; + exports.isWindows = (options) => { + if (options && typeof options.windows === "boolean") return options.windows; + return win32 === true || path$20.sep === "\\"; + }; + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports.wrapOutput = (input, state = {}, options = {}) => { + let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`; + if (state.negated === true) output = `(?:^(?!${output}).*$)`; + return output; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js +var require_scan = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const utils = require_utils$2(); + const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants$1(); + const isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + const depth = (token) => { + if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1; + }; + /** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + const scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { + value: "", + depth: 0, + isGlob: false + }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) braceEscaped = true; + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { + value: "", + depth: 0, + isGlob: false + }; + if (finished === true) continue; + if (prev === CHAR_DOT && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + if ((code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + if (scanToEnd === true) continue; + break; + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) continue; + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else base = str; + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1); + } + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + if (base && backslashes === true) base = utils.removeBackslashes(base); + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) tokens.push(token); + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else tokens[idx].value = value; + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") parts.push(value); + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module.exports = scan; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const constants = require_constants$1(); + const utils = require_utils$2(); + /** + * Constants + */ + const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants; + /** + * Helpers + */ + const expandRange = (args, options) => { + if (typeof options.expandRange === "function") return options.expandRange(...args, options); + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + /** + * Create the message for a syntax error + */ + const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + const splitTopLevel = (input) => { + const parts = []; + let bracket = 0; + let paren = 0; + let quote = 0; + let value = ""; + let escaped = false; + for (const ch of input) { + if (escaped === true) { + value += ch; + escaped = false; + continue; + } + if (ch === "\\") { + value += ch; + escaped = true; + continue; + } + if (ch === "\"") { + quote = quote === 1 ? 0 : 1; + value += ch; + continue; + } + if (quote === 0) { + if (ch === "[") bracket++; + else if (ch === "]" && bracket > 0) bracket--; + else if (bracket === 0) { + if (ch === "(") paren++; + else if (ch === ")" && paren > 0) paren--; + else if (ch === "|" && paren === 0) { + parts.push(value); + value = ""; + continue; + } + } + } + value += ch; + } + parts.push(value); + return parts; + }; + const isPlainBranch = (branch) => { + let escaped = false; + for (const ch of branch) { + if (escaped === true) { + escaped = false; + continue; + } + if (ch === "\\") { + escaped = true; + continue; + } + if (/[?*+@!()[\]{}]/.test(ch)) return false; + } + return true; + }; + const normalizeSimpleBranch = (branch) => { + let value = branch.trim(); + let changed = true; + while (changed === true) { + changed = false; + if (/^@\([^\\()[\]{}|]+\)$/.test(value)) { + value = value.slice(2, -1); + changed = true; + } + } + if (!isPlainBranch(value)) return; + return value.replace(/\\(.)/g, "$1"); + }; + const hasRepeatedCharPrefixOverlap = (branches) => { + const values = branches.map(normalizeSimpleBranch).filter(Boolean); + for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) { + const a = values[i]; + const b = values[j]; + const char = a[0]; + if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue; + if (a === b || a.startsWith(b) || b.startsWith(a)) return true; + } + return false; + }; + const parseRepeatedExtglob = (pattern, requireEnd = true) => { + if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return; + let bracket = 0; + let paren = 0; + let quote = 0; + let escaped = false; + for (let i = 1; i < pattern.length; i++) { + const ch = pattern[i]; + if (escaped === true) { + escaped = false; + continue; + } + if (ch === "\\") { + escaped = true; + continue; + } + if (ch === "\"") { + quote = quote === 1 ? 0 : 1; + continue; + } + if (quote === 1) continue; + if (ch === "[") { + bracket++; + continue; + } + if (ch === "]" && bracket > 0) { + bracket--; + continue; + } + if (bracket > 0) continue; + if (ch === "(") { + paren++; + continue; + } + if (ch === ")") { + paren--; + if (paren === 0) { + if (requireEnd === true && i !== pattern.length - 1) return; + return { + type: pattern[0], + body: pattern.slice(2, i), + end: i + }; + } + } + } + }; + const getStarExtglobSequenceOutput = (pattern) => { + let index = 0; + const chars = []; + while (index < pattern.length) { + const match = parseRepeatedExtglob(pattern.slice(index), false); + if (!match || match.type !== "*") return; + const branches = splitTopLevel(match.body).map((branch) => branch.trim()); + if (branches.length !== 1) return; + const branch = normalizeSimpleBranch(branches[0]); + if (!branch || branch.length !== 1) return; + chars.push(branch); + index += match.end + 1; + } + if (chars.length < 1) return; + return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`; + }; + const repeatedExtglobRecursion = (pattern) => { + let depth = 0; + let value = pattern.trim(); + let match = parseRepeatedExtglob(value); + while (match) { + depth++; + value = match.body.trim(); + match = parseRepeatedExtglob(value); + } + return depth; + }; + const analyzeRepeatedExtglob = (body, options) => { + if (options.maxExtglobRecursion === false) return { risky: false }; + const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION; + const branches = splitTopLevel(body).map((branch) => branch.trim()); + if (branches.length > 1) { + if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true }; + } + for (const branch of branches) { + const safeOutput = getStarExtglobSequenceOutput(branch); + if (safeOutput) return { + risky: true, + safeOutput + }; + if (repeatedExtglobRecursion(branch) > max) return { risky: true }; + } + return { risky: false }; + }; + /** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + const parse = (input, options) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + const bos = { + type: "bos", + value: "", + output: opts.prepend || "" + }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const win32 = utils.isWindows(options); + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS; + const globstar = (opts) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) star = `(${star})`; + if (typeof opts.noext === "boolean") opts.noextglob = opts.noext; + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + /** + * Tokenizing helpers + */ + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ""; + const remaining = () => input.slice(state.index + 1); + const consume = (value = "", num = 0) => { + state.consumed += value; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) return false; + state.negated = true; + state.start++; + return true; + }; + const increment = (type) => { + state[type]++; + stack.push(type); + }; + const decrement = (type) => { + state[type]--; + stack.pop(); + }; + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren") extglobs[extglobs.length - 1].inner += tok.value; + if (tok.value || tok.output) append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type, value) => { + const token = { + ...EXTGLOB_CHARS[value], + conditions: 1, + inner: "" + }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + token.startIndex = state.index; + token.tokensIndex = tokens.length; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ + type, + value, + output: state.output ? "" : ONE_CHAR + }); + push({ + type: "paren", + extglob: true, + value: advance(), + output + }); + extglobs.push(token); + }; + const extglobClose = (token) => { + const literal = input.slice(token.startIndex, state.index + 1); + const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts); + if ((token.type === "plus" || token.type === "star") && analysis.risky) { + const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0; + const open = tokens[token.tokensIndex]; + open.type = "text"; + open.value = literal; + open.output = safeOutput || utils.escapeRegex(literal); + for (let i = token.tokensIndex + 1; i < tokens.length; i++) { + tokens[i].value = ""; + tokens[i].output = ""; + delete tokens[i].suffix; + } + state.output = token.output + open.output; + state.backtrack = true; + push({ + type: "paren", + extglob: true, + value, + output: "" + }); + decrement("parens"); + return; + } + let output = token.close + (opts.capture ? ")" : ""); + let rest; + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts); + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`; + if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) output = token.close = `)${parse(rest, { + ...options, + fastpaths: false + }).output})${extglobStar})`; + if (token.prev.type === "bos") state.negatedExtglob = true; + } + push({ + type: "paren", + extglob: true, + value, + output + }); + decrement("parens"); + }; + /** + * Fast paths + */ + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + return QMARK.repeat(chars.length); + } + if (first === ".") return DOT_LITERAL.repeat(chars.length); + if (first === "*") { + if (esc) return esc + first + (rest ? star : ""); + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) if (opts.unescape === true) output = output.replace(/\\/g, ""); + else output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + /** + * Tokenize input until we reach end-of-string + */ + while (!eos()) { + value = advance(); + if (value === "\0") continue; + /** + * Escaped characters + */ + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) continue; + if (next === "." || next === ";") continue; + if (!next) { + value += "\\"; + push({ + type: "text", + value + }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) value += "\\"; + } + if (opts.unescape === true) value = advance(); + else value += advance(); + if (state.brackets === 0) { + push({ + type: "text", + value + }); + continue; + } + } + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) bos.output = ONE_CHAR; + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") value = `\\${value}`; + if (value === "]" && (prev.value === "[" || prev.value === "[^")) value = `\\${value}`; + if (opts.posix === true && value === "!" && prev.value === "[") value = "^"; + prev.value += value; + append({ value }); + continue; + } + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + if (state.quotes === 1 && value !== "\"") { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + /** + * Double quotes + */ + if (value === "\"") { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) push({ + type: "text", + value + }); + continue; + } + /** + * Parentheses + */ + if (value === "(") { + increment("parens"); + push({ + type: "paren", + value + }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "(")); + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ + type: "paren", + value, + output: state.parens ? ")" : "\\)" + }); + decrement("parens"); + continue; + } + /** + * Square brackets + */ + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); + value = `\\${value}`; + } else increment("brackets"); + push({ + type: "bracket", + value + }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "[")); + push({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) value = `/${value}`; + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) continue; + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + /** + * Braces + */ + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ + type: "text", + value, + output: value + }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") break; + if (arr[i].type !== "dots") range.unshift(arr[i].value); + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t of toks) state.output += t.output || t.value; + } + push({ + type: "brace", + value, + output + }); + decrement("braces"); + braces.pop(); + continue; + } + /** + * Pipes + */ + if (value === "|") { + if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++; + push({ + type: "text", + value + }); + continue; + } + /** + * Commas + */ + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ + type: "comma", + value, + output + }); + continue; + } + /** + * Slashes + */ + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ + type: "slash", + value, + output: SLASH_LITERAL + }); + continue; + } + /** + * Dots + */ + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ + type: "text", + value, + output: DOT_LITERAL + }); + continue; + } + push({ + type: "dot", + value, + output: DOT_LITERAL + }); + continue; + } + /** + * Question marks + */ + if (value === "?") { + if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`; + push({ + type: "text", + value, + output + }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ + type: "qmark", + value, + output: QMARK_NO_DOT + }); + continue; + } + push({ + type: "qmark", + value, + output: QMARK + }); + continue; + } + /** + * Exclamation + */ + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + /** + * Plus + */ + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ + type: "plus", + value, + output: PLUS_LITERAL + }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ + type: "plus", + value + }); + continue; + } + push({ + type: "plus", + value: PLUS_LITERAL + }); + continue; + } + /** + * Plain text + */ + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ + type: "at", + extglob: true, + value, + output: "" + }); + continue; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Plain text + */ + if (value !== "*") { + if (value === "$" || value === "^") value = `\\${value}`; + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Stars + */ + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ + type: "star", + value, + output: "" + }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ + type: "star", + value, + output: "" + }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") break; + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { + type: "star", + value, + output: star + }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") token.output = nodot + token.output; + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push({ + type: "maybe_slash", + value: "", + output: `${SLASH_LITERAL}?` + }); + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) state.output += token.suffix; + } + } + return state; + }; + /** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { + negated: false, + prefix: "" + }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) star = `(${star})`; + const globstar = (opts) => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": return `${nodot}${ONE_CHAR}${star}`; + case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": return nodot + globstar(opts); + case "**/*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + const source = create(match[1]); + if (!source) return; + return source + DOT_LITERAL + match[2]; + } + } + }; + let source = create(utils.removePrefix(input, state)); + if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`; + return source; + }; + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js +var require_picomatch$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$19 = __require("path"); + const scan = require_scan(); + const parse = require_parse(); + const utils = require_utils$2(); + const constants = require_constants$1(); + const isObject = (val) => val && typeof val === "object" && !Array.isArray(val); + /** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string"); + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { + ...options, + ignore: null, + onMatch: null, + onResult: null + }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { + glob, + posix + }); + const result = { + glob, + state, + regex, + posix, + input, + output, + match, + isMatch + }; + if (typeof opts.onResult === "function") opts.onResult(result); + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored(input)) { + if (typeof opts.onIgnore === "function") opts.onIgnore(result); + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") opts.onMatch(result); + return returnObject ? result : true; + }; + if (returnState) matcher.state = state; + return matcher; + }; + /** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== "string") throw new TypeError("Expected input to be a string"); + if (input === "") return { + isMatch: false, + output: "" + }; + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format ? format(input) : input; + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) if (opts.matchBase === true || opts.basename === true) match = picomatch.matchBase(input, regex, options, posix); + else match = regex.exec(output); + return { + isMatch: Boolean(match), + match, + output + }; + }; + /** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$19.basename(input)); + }; + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + /** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); + return parse(pattern, { + ...options, + fastpaths: false + }); + }; + /** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + picomatch.scan = (input, options) => scan(input, options); + /** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) return state.output; + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) source = `^(?!${source}).*$`; + const regex = picomatch.toRegex(source, options); + if (returnState === true) regex.state = state; + return regex; + }; + /** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string"); + let parsed = { + negated: false, + fastpaths: true + }; + if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse.fastpaths(input, options); + if (!parsed.output) parsed = parse(input, options); + return picomatch.compileRe(parsed, options, returnOutput, returnState); + }; + /** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } + }; + /** + * Picomatch constants. + * @return {Object} + */ + picomatch.constants = constants; + /** + * Expose "picomatch" + */ + module.exports = picomatch; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js +var require_picomatch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = require_picomatch$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js +var require_micromatch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util$1 = __require("util"); + const braces = require_braces(); + const picomatch = require_picomatch(); + const utils = require_utils$2(); + const isEmptyString = (v) => v === "" || v === "./"; + const hasBraces = (v) => { + const index = v.indexOf("{"); + return index > -1 && v.indexOf("}", index) > -1; + }; + /** + * Returns an array of strings that match one or more glob patterns. + * + * ```js + * const mm = require('micromatch'); + * // mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {String|Array} `list` List of strings to match. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + const micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); + let omit = /* @__PURE__ */ new Set(); + let keep = /* @__PURE__ */ new Set(); + let items = /* @__PURE__ */ new Set(); + let negatives = 0; + let onResult = (state) => { + items.add(state.output); + if (options && options.onResult) options.onResult(state); + }; + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { + ...options, + onResult + }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) negatives++; + for (let item of list) { + let matched = isMatch(item, true); + if (!(negated ? !matched.isMatch : matched.isMatch)) continue; + if (negated) omit.add(matched.output); + else { + omit.delete(matched.output); + keep.add(matched.output); + } + } + } + let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item)); + if (options && matches.length === 0) { + if (options.failglob === true) throw new Error(`No matches found for "${patterns.join(", ")}"`); + if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; + } + return matches; + }; + /** + * Backwards compatibility + */ + micromatch.match = micromatch; + /** + * Returns a matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * const mm = require('micromatch'); + * // mm.matcher(pattern[, options]); + * + * const isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` + * @return {Function} Returns a matcher function. + * @api public + */ + micromatch.matcher = (pattern, options) => picomatch(pattern, options); + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const mm = require('micromatch'); + * // mm.isMatch(string, patterns[, options]); + * + * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(mm.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `[options]` See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + /** + * Backwards compatibility + */ + micromatch.any = micromatch.isMatch; + /** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = /* @__PURE__ */ new Set(); + let items = []; + let onResult = (state) => { + if (options.onResult) options.onResult(state); + items.push(state.output); + }; + let matches = new Set(micromatch(list, patterns, { + ...options, + onResult + })); + for (let item of items) if (!matches.has(item)) result.add(item); + return [...result]; + }; + /** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * // mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any of the patterns matches any part of `str`. + * @api public + */ + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`); + if (Array.isArray(pattern)) return pattern.some((p) => micromatch.contains(str, p, options)); + if (typeof pattern === "string") { + if (isEmptyString(str) || isEmptyString(pattern)) return false; + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) return true; + } + return micromatch.isMatch(str, pattern, { + ...options, + contains: true + }); + }; + /** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * const mm = require('micromatch'); + * // mm.matchKeys(object, patterns[, options]); + * + * const obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) throw new TypeError("Expected the first argument to be an object"); + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) res[key] = obj[key]; + return res; + }; + /** + * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` + * @api public + */ + micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some((item) => isMatch(item))) return true; + } + return false; + }; + /** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` + * @api public + */ + micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every((item) => isMatch(item))) return false; + } + return true; + }; + /** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * const mm = require('micromatch'); + * // mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`); + return [].concat(patterns).every((p) => picomatch(p, options)(str)); + }; + /** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * const mm = require('micromatch'); + * // mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `glob` Glob pattern to use for matching. + * @param {String} `input` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. + * @api public + */ + micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let match = picomatch.makeRe(String(glob), { + ...options, + capture: true + }).exec(posix ? utils.toPosixSlashes(input) : input); + if (match) return match.slice(1).map((v) => v === void 0 ? "" : v); + }; + /** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * const mm = require('micromatch'); + * // mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + micromatch.makeRe = (...args) => picomatch.makeRe(...args); + /** + * Scan a glob pattern to separate the pattern into segments. Used + * by the [split](#split) method. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.scan(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + micromatch.scan = (...args) => picomatch.scan(...args); + /** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.parse(pattern[, options]); + * ``` + * @param {String} `glob` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as regex source string. + * @api public + */ + micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) for (let str of braces(String(pattern), options)) res.push(picomatch.parse(str, options)); + return res; + }; + /** + * Process the given brace `pattern`. + * + * ```js + * const { braces } = require('micromatch'); + * console.log(braces('foo/{a,b,c}/bar')); + * //=> [ 'foo/(a|b|c)/bar' ] + * + * console.log(braces('foo/{a,b,c}/bar', { expand: true })); + * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] + * ``` + * @param {String} `pattern` String with brace pattern to process. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + micromatch.braces = (pattern, options) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + if (options && options.nobrace === true || !hasBraces(pattern)) return [pattern]; + return braces(pattern, options); + }; + /** + * Expand braces + */ + micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + return micromatch.braces(pattern, { + ...options, + expand: true + }); + }; + /** + * Expose micromatch + */ + micromatch.hasBraces = hasBraces; + module.exports = micromatch; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js +var require_pattern = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; + const path$18 = __require("path"); + const globParent = require_glob_parent(); + const micromatch = require_micromatch(); + const GLOBSTAR = "**"; + const ESCAPE_SYMBOL = "\\"; + const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; + const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; + const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; + const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; + const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; + /** + * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. + * The latter is due to the presence of the device path at the beginning of the UNC path. + */ + const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; + function isStaticPattern(pattern, options = {}) { + return !isDynamicPattern(pattern, options); + } + exports.isStaticPattern = isStaticPattern; + function isDynamicPattern(pattern, options = {}) { + /** + * A special case with an empty string is necessary for matching patterns that start with a forward slash. + * An empty string cannot be a dynamic pattern. + * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. + */ + if (pattern === "") return false; + /** + * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check + * filepath directly (without read directory). + */ + if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) return true; + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) return true; + if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) return true; + if (options.braceExpansion !== false && hasBraceExpansion(pattern)) return true; + return false; + } + exports.isDynamicPattern = isDynamicPattern; + function hasBraceExpansion(pattern) { + const openingBraceIndex = pattern.indexOf("{"); + if (openingBraceIndex === -1) return false; + const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); + if (closingBraceIndex === -1) return false; + const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); + return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); + } + function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + } + exports.convertToPositivePattern = convertToPositivePattern; + function convertToNegativePattern(pattern) { + return "!" + pattern; + } + exports.convertToNegativePattern = convertToNegativePattern; + function isNegativePattern(pattern) { + return pattern.startsWith("!") && pattern[1] !== "("; + } + exports.isNegativePattern = isNegativePattern; + function isPositivePattern(pattern) { + return !isNegativePattern(pattern); + } + exports.isPositivePattern = isPositivePattern; + function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); + } + exports.getNegativePatterns = getNegativePatterns; + function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); + } + exports.getPositivePatterns = getPositivePatterns; + /** + * Returns patterns that can be applied inside the current directory. + * + * @example + * // ['./*', '*', 'a/*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ + function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); + } + exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; + /** + * Returns patterns to be expanded relative to (outside) the current directory. + * + * @example + * // ['../*', './../*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ + function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); + } + exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; + function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith("..") || pattern.startsWith("./.."); + } + exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; + function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); + } + exports.getBaseDirectory = getBaseDirectory; + function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); + } + exports.hasGlobStar = hasGlobStar; + function endsWithSlashGlobStar(pattern) { + return pattern.endsWith("/**"); + } + exports.endsWithSlashGlobStar = endsWithSlashGlobStar; + function isAffectDepthOfReadingPattern(pattern) { + const basename = path$18.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); + } + exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; + function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); + } + exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; + function expandBraceExpansion(pattern) { + const patterns = micromatch.braces(pattern, { + expand: true, + nodupes: true, + keepEscaping: true + }); + /** + * Sort the patterns by length so that the same depth patterns are processed side by side. + * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` + */ + patterns.sort((a, b) => a.length - b.length); + /** + * Micromatch can return an empty string in the case of patterns like `{a,}`. + */ + return patterns.filter((pattern) => pattern !== ""); + } + exports.expandBraceExpansion = expandBraceExpansion; + function getPatternParts(pattern, options) { + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + /** + * The scan method returns an empty array in some cases. + * See micromatch/picomatch#58 for more details. + */ + if (parts.length === 0) parts = [pattern]; + /** + * The scan method does not return an empty part for the pattern with a forward slash. + * This is another part of micromatch/picomatch#58. + */ + if (parts[0].startsWith("/")) { + parts[0] = parts[0].slice(1); + parts.unshift(""); + } + return parts; + } + exports.getPatternParts = getPatternParts; + function makeRe(pattern, options) { + return micromatch.makeRe(pattern, options); + } + exports.makeRe = makeRe; + function convertPatternsToRe(patterns, options) { + return patterns.map((pattern) => makeRe(pattern, options)); + } + exports.convertPatternsToRe = convertPatternsToRe; + function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); + } + exports.matchAny = matchAny; + /** + * This package only works with forward slashes as a path separator. + * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. + */ + function removeDuplicateSlashes(pattern) { + return pattern.replace(DOUBLE_SLASH_RE, "/"); + } + exports.removeDuplicateSlashes = removeDuplicateSlashes; + function partitionAbsoluteAndRelative(patterns) { + const absolute = []; + const relative = []; + for (const pattern of patterns) if (isAbsolute(pattern)) absolute.push(pattern); + else relative.push(pattern); + return [absolute, relative]; + } + exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; + function isAbsolute(pattern) { + return path$18.isAbsolute(pattern); + } + exports.isAbsolute = isAbsolute; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js +var require_stream$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.merge = void 0; + const merge2 = require_merge2(); + function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once("error", (error) => mergedStream.emit("error", error)); + }); + mergedStream.once("close", () => propagateCloseEventToSources(streams)); + mergedStream.once("end", () => propagateCloseEventToSources(streams)); + return mergedStream; + } + exports.merge = merge; + function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit("close")); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js +var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEmpty = exports.isString = void 0; + function isString(input) { + return typeof input === "string"; + } + exports.isString = isString; + function isEmpty(input) { + return input === ""; + } + exports.isEmpty = isEmpty; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js +var require_utils$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; + exports.array = require_array(); + exports.errno = require_errno(); + exports.fs = require_fs$3(); + exports.path = require_path(); + exports.pattern = require_pattern(); + exports.stream = require_stream$3(); + exports.string = require_string(); +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js +var require_tasks = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; + const utils = require_utils$1(); + function generate(input, settings) { + const patterns = processPatterns(input, settings); + const ignore = processPatterns(settings.ignore, settings); + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); + return staticTasks.concat(dynamicTasks); + } + exports.generate = generate; + function processPatterns(input, settings) { + let patterns = input; + /** + * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry + * and some problems with the micromatch package (see fast-glob issues: #365, #394). + * + * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown + * in matching in the case of a large set of patterns after expansion. + */ + if (settings.braceExpansion) patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); + /** + * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used + * at any nesting level. + * + * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change + * the pattern in the filter before creating a regular expression. There is no need to change the patterns + * in the application. Only on the input. + */ + if (settings.baseNameMatch) patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); + /** + * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. + */ + return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); + } + /** + * Returns tasks grouped by basic pattern directories. + * + * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. + * This is necessary because directory traversal starts at the base directory and goes deeper. + */ + function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + if ("." in insideCurrentDirectoryGroup) tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); + else tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + return tasks; + } + exports.convertPatternsToTasks = convertPatternsToTasks; + function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); + } + exports.getPositivePatterns = getPositivePatterns; + function getNegativePatternsAsPositive(patterns, ignore) { + return utils.pattern.getNegativePatterns(patterns).concat(ignore).map(utils.pattern.convertToPositivePattern); + } + exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; + function groupPatternsByBaseDirectory(patterns) { + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) collection[base].push(pattern); + else collection[base] = [pattern]; + return collection; + }, {}); + } + exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; + function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); + } + exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; + function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; + } + exports.convertPatternGroupToTask = convertPatternGroupToTask; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js +var require_async$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; + callSuccessCallback(callback, stat); + }); + }); + } + exports.read = read; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js +var require_sync$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat; + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; + return stat; + } catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) return lstat; + throw error; + } + } + exports.read = read; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js +var require_fs$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + const fs$10 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs$10.lstat, + stat: fs$10.stat, + lstatSync: fs$10.lstatSync, + statSync: fs$10.statSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js +var require_settings$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fs = require_fs$2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js +var require_out$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.statSync = exports.stat = exports.Settings = void 0; + const async = require_async$5(); + const sync = require_sync$5(); + const settings_1 = require_settings$3(); + exports.Settings = settings_1.default; + function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.stat = stat; + function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports.statSync = statSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js +var require_queue_microtask = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! queue-microtask. MIT License. Feross Aboukhadijeh */ + let promise; + module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); +})); +//#endregion +//#region ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js +var require_run_parallel = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! run-parallel. MIT License. Feross Aboukhadijeh */ + module.exports = runParallel; + const queueMicrotask = require_queue_microtask(); + function runParallel(tasks, cb) { + let results, pending, keys; + let isSync = true; + if (Array.isArray(tasks)) { + results = []; + pending = tasks.length; + } else { + keys = Object.keys(tasks); + results = {}; + pending = keys.length; + } + function done(err) { + function end() { + if (cb) cb(err, results); + cb = null; + } + if (isSync) queueMicrotask(end); + else end(); + } + function each(i, err, result) { + results[i] = result; + if (--pending === 0 || err) done(err); + } + if (!pending) done(null); + else if (keys) keys.forEach(function(key) { + tasks[key](function(err, result) { + each(key, err, result); + }); + }); + else tasks.forEach(function(task, i) { + task(function(err, result) { + each(i, err, result); + }); + }); + isSync = false; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; + const NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); + if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); + const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); + const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); + const SUPPORTED_MAJOR_VERSION = 10; + /** + * IS `true` for Node.js 10.10 and greater. + */ + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION || MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= 10; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js +var require_fs$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js +var require_utils = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.fs = void 0; + exports.fs = require_fs$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js +var require_common$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = void 0; + function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js +var require_async$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + const fsStat = require_out$3(); + const rpl = require_run_parallel(); + const constants_1 = require_constants(); + const utils = require_utils(); + const common = require_common$2(); + function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); + } + exports.read = read; + function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + rpl(entries.map((entry) => makeRplTaskEntry(entry, settings)), (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; + } + function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + rpl(names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + done(null, entry); + }); + }; + }), (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); + } + exports.readdir = readdir; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js +var require_sync$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + const fsStat = require_out$3(); + const constants_1 = require_constants(); + const utils = require_utils(); + const common = require_common$2(); + function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return readdirWithFileTypes(directory, settings); + return readdir(directory, settings); + } + exports.read = read; + function readdirWithFileTypes(directory, settings) { + return settings.fs.readdirSync(directory, { withFileTypes: true }).map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) throw error; + } + return entry; + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function readdir(directory, settings) { + return settings.fs.readdirSync(directory).map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + return entry; + }); + } + exports.readdir = readdir; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +var require_fs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + const fs$9 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs$9.lstat, + stat: fs$9.stat, + lstatSync: fs$9.lstatSync, + statSync: fs$9.statSync, + readdir: fs$9.readdir, + readdirSync: fs$9.readdirSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js +var require_settings$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$17 = __require("path"); + const fsStat = require_out$3(); + const fs = require_fs(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$17.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js +var require_out$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.scandirSync = exports.scandir = void 0; + const async = require_async$4(); + const sync = require_sync$4(); + const settings_1 = require_settings$2(); + exports.Settings = settings_1.default; + function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.scandir = scandir; + function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports.scandirSync = scandirSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js +var require_reusify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) head = current.next; + else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module.exports = reusify; +})); +//#endregion +//#region ../../node_modules/.pnpm/fastq@1.20.1/node_modules/fastq/queue.js +var require_queue = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var reusify = require_reusify(); + function fastqueue(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + if (!(_concurrency >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + var cache = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self = { + push, + drain: noop, + saturated: noop, + pause, + paused: false, + get concurrency() { + return _concurrency; + }, + set concurrency(value) { + if (!(value >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + _concurrency = value; + if (self.paused) return; + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + }, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop, + kill, + killAndDrain, + error, + abort + }; + return self; + function running() { + return _running; + } + function pause() { + self.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self.paused) return; + self.paused = false; + if (queueHead === null) { + _running++; + release(); + return; + } + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self.length() === 0; + } + function push(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) cache.release(holder); + var next = queueHead; + if (next && _running <= _concurrency) if (!self.paused) { + if (queueTail === queueHead) queueTail = null; + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) self.empty(); + } else _running--; + else if (--_running === 0) self.drain(); + } + function kill() { + queueHead = null; + queueTail = null; + self.drain = noop; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self.drain(); + self.drain = noop; + } + function abort() { + var current = queueHead; + queueHead = null; + queueTail = null; + while (current) { + var next = current.next; + var callback = current.callback; + var errorHandler = current.errorHandler; + var val = current.value; + var context = current.context; + current.value = null; + current.callback = noop; + current.errorHandler = null; + if (errorHandler) errorHandler(/* @__PURE__ */ new Error("abort"), val); + callback.call(context, /* @__PURE__ */ new Error("abort")); + current.release(current); + current = next; + } + self.drain = noop; + } + function error(handler) { + errorHandler = handler; + } + } + function noop() {} + function Task() { + this.value = null; + this.callback = noop; + this.next = null; + this.release = noop; + this.context = null; + this.errorHandler = null; + var self = this; + this.worked = function worked(err, result) { + var callback = self.callback; + var errorHandler = self.errorHandler; + var val = self.value; + self.value = null; + self.callback = noop; + if (self.errorHandler) errorHandler(err, val); + callback.call(self.context, err, result); + self.release(self); + }; + } + function queueAsPromised(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, _concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push(value) { + var p = new Promise(function(resolve, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function drained() { + return new Promise(function(resolve) { + process.nextTick(function() { + if (queue.idle()) resolve(); + else { + var previousDrain = queue.drain; + queue.drain = function() { + if (typeof previousDrain === "function") previousDrain(); + resolve(); + queue.drain = previousDrain; + }; + } + }); + }); + } + } + module.exports = fastqueue; + module.exports.promise = queueAsPromised; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js +var require_common$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; + function isFatalError(settings, error) { + if (settings.errorFilter === null) return true; + return !settings.errorFilter(error); + } + exports.isFatalError = isFatalError; + function isAppliedFilter(filter, value) { + return filter === null || filter(value); + } + exports.isAppliedFilter = isAppliedFilter; + function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); + } + exports.replacePathSegmentSeparator = replacePathSegmentSeparator; + function joinPathSegments(a, b, separator) { + if (a === "") return b; + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js +var require_reader$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const common = require_common$1(); + var Reader = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } + }; + exports.default = Reader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js +var require_async$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const events_1 = __require("events"); + const fsScandir = require_out$2(); + const fastq = require_queue(); + const common = require_common$1(); + const reader_1 = require_reader$1(); + var AsyncReader = class extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) this._emitter.emit("end"); + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) throw new Error("The reader is already destroyed"); + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on("entry", callback); + } + onError(callback) { + this._emitter.once("error", callback); + } + onEnd(callback) { + this._emitter.once("end", callback); + } + _pushToQueue(directory, base) { + const queueItem = { + directory, + base + }; + this._queue.push(queueItem, (error) => { + if (error !== null) this._handleError(error); + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, void 0); + return; + } + for (const entry of entries) this._handleEntry(entry, item.base); + done(null, void 0); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) return; + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit("error", error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) return; + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._emitEntry(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _emitEntry(entry) { + this._emitter.emit("entry", entry); + } + }; + exports.default = AsyncReader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js +var require_async$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const async_1 = require_async$3(); + var AsyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } + }; + exports.default = AsyncProvider; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, entries) { + callback(null, entries); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js +var require_stream$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1$2 = __require("stream"); + const async_1 = require_async$3(); + var StreamProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1$2.Readable({ + objectMode: true, + read: () => {}, + destroy: () => { + if (!this._reader.isDestroyed) this._reader.destroy(); + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit("error", error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } + }; + exports.default = StreamProvider; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js +var require_sync$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsScandir = require_out$2(); + const common = require_common$1(); + const reader_1 = require_reader$1(); + var SyncReader = class extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = /* @__PURE__ */ new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ + directory, + base + }); + } + _handleQueue() { + for (const item of this._queue.values()) this._handleDirectory(item.directory, item.base); + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) this._handleEntry(entry, base); + } catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) return; + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._pushToStorage(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _pushToStorage(entry) { + this._storage.push(entry); + } + }; + exports.default = SyncReader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js +var require_sync$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const sync_1 = require_sync$3(); + var SyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } + }; + exports.default = SyncProvider; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js +var require_settings$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$16 = __require("path"); + const fsScandir = require_out$2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, void 0); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$16.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js +var require_out$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; + const async_1 = require_async$2(); + const stream_1 = require_stream$2(); + const sync_1 = require_sync$2(); + const settings_1 = require_settings$1(); + exports.Settings = settings_1.default; + function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); + } + exports.walk = walk; + function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new sync_1.default(directory, settings).read(); + } + exports.walkSync = walkSync; + function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new stream_1.default(directory, settings).read(); + } + exports.walkStream = walkStream; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js +var require_reader = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$15 = __require("path"); + const fsStat = require_out$3(); + const utils = require_utils$1(); + var Reader = class { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path$15.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) entry.stats = stats; + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } + }; + exports.default = Reader; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js +var require_stream$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1$1 = __require("stream"); + const fsStat = require_out$3(); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + var ReaderStream = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root, options) { + return this._walkStream(root, options); + } + static(patterns, options) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1$1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { + if (entry !== null && options.entryFilter(entry)) stream.push(entry); + if (index === filepaths.length - 1) stream.end(); + done(); + }).catch(done); + }; + for (let i = 0; i < filepaths.length; i++) stream.write(i); + return stream; + } + _getEntry(filepath, pattern, options) { + return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { + if (options.errorFilter(error)) return null; + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve(stats) : reject(error); + }); + }); + } + }; + exports.default = ReaderStream; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js +var require_async$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + const stream_1 = require_stream$1(); + var ReaderAsync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkAsync = fsWalk.walk; + this._readerStream = new stream_1.default(this._settings); + } + dynamic(root, options) { + return new Promise((resolve, reject) => { + this._walkAsync(root, options, (error, entries) => { + if (error === null) resolve(entries); + else reject(error); + }); + }); + } + async static(patterns, options) { + const entries = []; + const stream = this._readerStream.static(patterns, options); + return new Promise((resolve, reject) => { + stream.once("error", reject); + stream.on("data", (entry) => entries.push(entry)); + stream.once("end", () => resolve(entries)); + }); + } + }; + exports.default = ReaderAsync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js +var require_matcher = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$1(); + var Matcher = class { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + for (const pattern of this._patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + return utils.pattern.getPatternParts(pattern, this._micromatchOptions).map((part) => { + if (!utils.pattern.isDynamicPattern(part, this._settings)) return { + dynamic: false, + pattern: part + }; + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } + }; + exports.default = Matcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js +var require_partial = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const matcher_1 = require_matcher(); + var PartialMatcher = class extends matcher_1.default { + match(filepath) { + const parts = filepath.split("/"); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + /** + * In this case, the pattern has a globstar and we must read all directories unconditionally, + * but only if the level has reached the end of the first group. + * + * fixtures/{a,b}/** + * ^ true/false ^ always true + */ + if (!pattern.complete && levels > section.length) return true; + if (parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) return true; + if (!segment.dynamic && segment.pattern === part) return true; + return false; + })) return true; + } + return false; + } + }; + exports.default = PartialMatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js +var require_deep = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$1(); + const partial_1 = require_partial(); + var DeepFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath, entry.path)) return false; + if (this._isSkippedSymbolicLink(entry)) return false; + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) return false; + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath, entryPath) { + /** + * Avoid unnecessary depth calculations when it doesn't matter. + */ + if (this._settings.deep === Infinity) return false; + return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath, entryPath) { + const entryPathDepth = entryPath.split("/").length; + if (basePath === "") return entryPathDepth; + return entryPathDepth - basePath.split("/").length; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } + }; + exports.default = DeepFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js +var require_entry$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$1(); + var EntryFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = /* @__PURE__ */ new Map(); + } + getFilter(positive, negative) { + const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); + const patterns = { + positive: { all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) }, + negative: { + absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), + relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) + } + }; + return (entry) => this._filter(entry, patterns); + } + _filter(entry, patterns) { + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._settings.unique && this._isDuplicateEntry(filepath)) return false; + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) return false; + const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); + if (this._settings.unique && isMatched) this._createIndexRecord(filepath); + return isMatched; + } + _isDuplicateEntry(filepath) { + return this.index.has(filepath); + } + _createIndexRecord(filepath) { + this.index.set(filepath, void 0); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isMatchToPatternsSet(filepath, patterns, isDirectory) { + if (!this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory)) return false; + if (this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory)) return false; + if (this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory)) return false; + return true; + } + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) return false; + const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + } + _isMatchToPatterns(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) return false; + const isMatched = utils.pattern.matchAny(filepath, patternsRe); + if (!isMatched && isDirectory) return utils.pattern.matchAny(filepath + "/", patternsRe); + return isMatched; + } + }; + exports.default = EntryFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js +var require_error = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$1(); + var ErrorFilter = class { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } + }; + exports.default = ErrorFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js +var require_entry = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$1(); + var EntryTransformer = class { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) filepath += "/"; + if (!this._settings.objectMode) return filepath; + return Object.assign(Object.assign({}, entry), { path: filepath }); + } + }; + exports.default = EntryTransformer; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js +var require_provider = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$14 = __require("path"); + const deep_1 = require_deep(); + const entry_1 = require_entry$1(); + const error_1 = require_error(); + const entry_2 = require_entry(); + var Provider = class { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path$14.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath = task.base === "." ? "" : task.base; + return { + basePath, + pathSegmentSeparator: "/", + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } + }; + exports.default = Provider; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js +var require_async = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const async_1 = require_async$1(); + const provider_1 = require_provider(); + var ProviderAsync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new async_1.default(this._settings); + } + async read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + return (await this.api(root, task, options)).map((entry) => options.transform(entry)); + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderAsync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js +var require_stream = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1 = __require("stream"); + const stream_2 = require_stream$1(); + const provider_1 = require_provider(); + var ProviderStream = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const source = this.api(root, task, options); + const destination = new stream_1.Readable({ + objectMode: true, + read: () => {} + }); + source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source.destroy()); + return destination; + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderStream; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js +var require_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsStat = require_out$3(); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + var ReaderSync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root, options) { + return this._walkSync(root, options); + } + static(patterns, options) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options); + if (entry === null || !options.entryFilter(entry)) continue; + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } catch (error) { + if (options.errorFilter(error)) return null; + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } + }; + exports.default = ReaderSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js +var require_sync = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const sync_1 = require_sync$1(); + const provider_1 = require_provider(); + var ProviderSync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + return this.api(root, task, options).map(options.transform); + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js +var require_settings = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; + const fs$8 = __require("fs"); + const os$1 = __require("os"); + /** + * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. + * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 + */ + const CPU_COUNT = Math.max(os$1.cpus().length, 1); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs$8.lstat, + lstatSync: fs$8.lstatSync, + stat: fs$8.stat, + statSync: fs$8.statSync, + readdir: fs$8.readdir, + readdirSync: fs$8.readdirSync + }; + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) this.onlyFiles = false; + if (this.stats) this.objectMode = true; + this.ignore = [].concat(this.ignore); + } + _getValue(option, value) { + return option === void 0 ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.js +var require_out = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const taskManager = require_tasks(); + const async_1 = require_async(); + const stream_1 = require_stream(); + const sync_1 = require_sync(); + const settings_1 = require_settings(); + const utils = require_utils$1(); + async function FastGlob(source, options) { + assertPatternsInput(source); + const works = getWorks(source, async_1.default, options); + const result = await Promise.all(works); + return utils.array.flatten(result); + } + (function(FastGlob) { + FastGlob.glob = FastGlob; + FastGlob.globSync = sync; + FastGlob.globStream = stream; + FastGlob.async = FastGlob; + function sync(source, options) { + assertPatternsInput(source); + const works = getWorks(source, sync_1.default, options); + return utils.array.flatten(works); + } + FastGlob.sync = sync; + function stream(source, options) { + assertPatternsInput(source); + const works = getWorks(source, stream_1.default, options); + /** + * The stream returned by the provider cannot work with an asynchronous iterator. + * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. + * This affects performance (+25%). I don't see best solution right now. + */ + return utils.stream.merge(works); + } + FastGlob.stream = stream; + function generateTasks(source, options) { + assertPatternsInput(source); + const patterns = [].concat(source); + const settings = new settings_1.default(options); + return taskManager.generate(patterns, settings); + } + FastGlob.generateTasks = generateTasks; + function isDynamicPattern(source, options) { + assertPatternsInput(source); + const settings = new settings_1.default(options); + return utils.pattern.isDynamicPattern(source, settings); + } + FastGlob.isDynamicPattern = isDynamicPattern; + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escape(source); + } + FastGlob.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPathToPattern(source); + } + FastGlob.convertPathToPattern = convertPathToPattern; + (function(posix) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapePosixPath(source); + } + posix.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPosixPathToPattern(source); + } + posix.convertPathToPattern = convertPathToPattern; + })(FastGlob.posix || (FastGlob.posix = {})); + (function(win32) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapeWindowsPath(source); + } + win32.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertWindowsPathToPattern(source); + } + win32.convertPathToPattern = convertPathToPattern; + })(FastGlob.win32 || (FastGlob.win32 = {})); + })(FastGlob || (FastGlob = {})); + function getWorks(source, _Provider, options) { + const patterns = [].concat(source); + const settings = new settings_1.default(options); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); + } + function assertPatternsInput(input) { + if (![].concat(input).every((item) => utils.string.isString(item) && !utils.string.isEmpty(item))) throw new TypeError("Patterns must be a string (non empty) or an array of strings"); + } + module.exports = FastGlob; +})); +//#endregion +//#region ../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js +var require_path_type = /* @__PURE__ */ __commonJSMin$1(((exports) => { + const { promisify: promisify$3 } = __require("util"); + const fs$7 = __require("fs"); + async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") throw new TypeError(`Expected a string, got ${typeof filePath}`); + try { + return (await promisify$3(fs$7[fsStatType])(filePath))[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") return false; + throw error; + } + } + function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") throw new TypeError(`Expected a string, got ${typeof filePath}`); + try { + return fs$7[fsStatType](filePath)[statsMethodName](); + } catch (error) { + if (error.code === "ENOENT") return false; + throw error; + } + } + exports.isFile = isType.bind(null, "stat", "isFile"); + exports.isDirectory = isType.bind(null, "stat", "isDirectory"); + exports.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); + exports.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); + exports.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); + exports.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); +})); +//#endregion +//#region ../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js +var require_dir_glob = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$13 = __require("path"); + const pathType = require_path_type(); + const getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; + const getPath = (filepath, cwd) => { + const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; + return path$13.isAbsolute(pth) ? pth : path$13.join(cwd, pth); + }; + const addExtensions = (file, extensions) => { + if (path$13.extname(file)) return `**/${file}`; + return `**/${file}.${getExtensions(extensions)}`; + }; + const getGlob = (directory, options) => { + if (options.files && !Array.isArray(options.files)) throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); + if (options.extensions && !Array.isArray(options.extensions)) throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); + if (options.files && options.extensions) return options.files.map((x) => path$13.posix.join(directory, addExtensions(x, options.extensions))); + if (options.files) return options.files.map((x) => path$13.posix.join(directory, `**/${x}`)); + if (options.extensions) return [path$13.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; + return [path$13.posix.join(directory, "**")]; + }; + module.exports = async (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + const globs = await Promise.all([].concat(input).map(async (x) => { + return await pathType.isDirectory(getPath(x, options.cwd)) ? getGlob(x, options) : x; + })); + return [].concat.apply([], globs); + }; + module.exports.sync = (input, options) => { + options = { + cwd: process.cwd(), + ...options + }; + if (typeof options.cwd !== "string") throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); + const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); + return [].concat.apply([], globs); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/ignore@5.3.2/node_modules/ignore/index.js +var require_ignore = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + const EMPTY = ""; + const SPACE = " "; + const ESCAPE = "\\"; + const REGEX_TEST_BLANK_LINE = /^\s+$/; + const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + const REGEX_SPLITALL_CRLF = /\r?\n/g; + const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + const SLASH = "/"; + let TMP_KEY_IGNORE = "node-ignore"; + /* istanbul ignore else */ + if (typeof Symbol !== "undefined") TMP_KEY_IGNORE = Symbol.for("node-ignore"); + const KEY_IGNORE = TMP_KEY_IGNORE; + const define = (object, key, value) => Object.defineProperty(object, key, { value }); + const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + const RETURN_FALSE = () => false; + const sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY); + const cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + const REPLACERS = [ + [/^\uFEFF/, () => EMPTY], + [/((?:\\\\)*?)(\\?\s+)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)], + [/(\\+?)\s/g, (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + }], + [/[\\$.|*+(){^]/g, (match) => `\\${match}`], + [/(?!\\)\?/g, () => "[^/]"], + [/^\//, () => "^"], + [/\//g, () => "\\/"], + [/^\^*\\\*\\\*\\\//, () => "^(?:.*\\/)?"], + [/^(?=[^^])/, function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + }], + [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"], + [/(^|[^\\]+)(\\\*)+(?=.+)/g, (_, p1, p2) => { + return p1 + p2.replace(/\\\*/g, "[^\\/]*"); + }], + [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE], + [/\\\\/g, () => ESCAPE], + [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"], + [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`], + [/(\^|\\\/)?\\\*$/, (_, p1) => { + return `${p1 ? `${p1}[^/]+` : "[^/]*"}(?=$|\\/$)`; + }] + ]; + const regexCache = Object.create(null); + const makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern]; + if (!source) { + source = REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern); + regexCache[pattern] = source; + } + return ignoreCase ? new RegExp(source, "i") : new RegExp(source); + }; + const isString = (subject) => typeof subject === "string"; + const checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + const splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + const createRule = (pattern, ignoreCase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule(origin, pattern, negative, regex); + }; + const throwError = (message, Ctor) => { + throw new Ctor(message); + }; + const checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError); + if (!path) return doThrow(`path must not be empty`, TypeError); + if (checkPath.isNotRelative(path)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError); + return true; + }; + const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ ignorecase = true, ignoreCase = ignorecase, allowRelativePaths = false } = {}) { + define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + add(pattern) { + this._added = false; + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); + if (this._added) this._initCache(); + return this; + } + addPattern(pattern) { + return this.add(pattern); + } + _testOne(path, checkUnignored) { + let ignored = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return; + if (rule.regex.test(path)) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored, + unignored + }; + } + _test(originalPath, cache, checkUnignored, slices) { + const path = originalPath && checkPath.convert(originalPath); + checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError); + return this._t(path, cache, checkUnignored, slices); + } + _t(path, cache, checkUnignored, slices) { + if (path in cache) return cache[path]; + if (!slices) slices = path.split(SLASH); + slices.pop(); + if (!slices.length) return cache[path] = this._testOne(path, checkUnignored); + const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); + return cache[path] = parent.ignored ? parent : this._testOne(path, checkUnignored); + } + ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + createFilter() { + return (path) => !this.ignores(path); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + test(path) { + return this._test(path, this._testCache, true); + } + }; + const factory = (options) => new Ignore(options); + const isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE); + factory.isPathValid = isPathValid; + factory.default = factory; + module.exports = factory; + /* istanbul ignore if */ + if (typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/slash@3.0.0/node_modules/slash/index.js +var require_slash = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = (path) => { + const isExtendedLengthPath = /^\\\\\?\\/.test(path); + const hasNonAscii = /[^\u0000-\u0080]+/.test(path); + if (isExtendedLengthPath || hasNonAscii) return path; + return path.replace(/\\/g, "/"); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/globby@11.1.0/node_modules/globby/gitignore.js +var require_gitignore = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { promisify: promisify$2 } = __require("util"); + const fs$6 = __require("fs"); + const path$12 = __require("path"); + const fastGlob = require_out(); + const gitIgnore = require_ignore(); + const slash = require_slash(); + const DEFAULT_IGNORE = [ + "**/node_modules/**", + "**/flow-typed/**", + "**/coverage/**", + "**/.git" + ]; + const readFileP = promisify$2(fs$6.readFile); + const mapGitIgnorePatternTo = (base) => (ignore) => { + if (ignore.startsWith("!")) return "!" + path$12.posix.join(base, ignore.slice(1)); + return path$12.posix.join(base, ignore); + }; + const parseGitIgnore = (content, options) => { + const base = slash(path$12.relative(options.cwd, path$12.dirname(options.fileName))); + return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); + }; + const reduceIgnore = (files) => { + const ignores = gitIgnore(); + for (const file of files) ignores.add(parseGitIgnore(file.content, { + cwd: file.cwd, + fileName: file.filePath + })); + return ignores; + }; + const ensureAbsolutePathForCwd = (cwd, p) => { + cwd = slash(cwd); + if (path$12.isAbsolute(p)) { + if (slash(p).startsWith(cwd)) return p; + throw new Error(`Path ${p} is not in cwd ${cwd}`); + } + return path$12.join(cwd, p); + }; + const getIsIgnoredPredecate = (ignores, cwd) => { + return (p) => ignores.ignores(slash(path$12.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); + }; + const getFile = async (file, cwd) => { + const filePath = path$12.join(cwd, file); + return { + cwd, + filePath, + content: await readFileP(filePath, "utf8") + }; + }; + const getFileSync = (file, cwd) => { + const filePath = path$12.join(cwd, file); + return { + cwd, + filePath, + content: fs$6.readFileSync(filePath, "utf8") + }; + }; + const normalizeOptions = ({ ignore = [], cwd = slash(process.cwd()) } = {}) => { + return { + ignore, + cwd + }; + }; + module.exports = async (options) => { + options = normalizeOptions(options); + const paths = await fastGlob("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }); + return getIsIgnoredPredecate(reduceIgnore(await Promise.all(paths.map((file) => getFile(file, options.cwd)))), options.cwd); + }; + module.exports.sync = (options) => { + options = normalizeOptions(options); + return getIsIgnoredPredecate(reduceIgnore(fastGlob.sync("**/.gitignore", { + ignore: DEFAULT_IGNORE.concat(options.ignore), + cwd: options.cwd + }).map((file) => getFileSync(file, options.cwd))), options.cwd); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/globby@11.1.0/node_modules/globby/stream-utils.js +var require_stream_utils = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform } = __require("stream"); + var ObjectTransform = class extends Transform { + constructor() { + super({ objectMode: true }); + } + }; + var FilterStream = class extends ObjectTransform { + constructor(filter) { + super(); + this._filter = filter; + } + _transform(data, encoding, callback) { + if (this._filter(data)) this.push(data); + callback(); + } + }; + var UniqueStream = class extends ObjectTransform { + constructor() { + super(); + this._pushed = /* @__PURE__ */ new Set(); + } + _transform(data, encoding, callback) { + if (!this._pushed.has(data)) { + this.push(data); + this._pushed.add(data); + } + callback(); + } + }; + module.exports = { + FilterStream, + UniqueStream + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js +var require_globby = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs$5 = __require("fs"); + const arrayUnion = require_array_union(); + const merge2 = require_merge2(); + const fastGlob = require_out(); + const dirGlob = require_dir_glob(); + const gitignore = require_gitignore(); + const { FilterStream, UniqueStream } = require_stream_utils(); + const DEFAULT_FILTER = () => false; + const isNegative = (pattern) => pattern[0] === "!"; + const assertPatternsInput = (patterns) => { + if (!patterns.every((pattern) => typeof pattern === "string")) throw new TypeError("Patterns must be a string or an array of strings"); + }; + const checkCwdOption = (options = {}) => { + if (!options.cwd) return; + let stat; + try { + stat = fs$5.statSync(options.cwd); + } catch { + return; + } + if (!stat.isDirectory()) throw new Error("The `cwd` option must be a path to a directory"); + }; + const getPathString = (p) => p.stats instanceof fs$5.Stats ? p.path : p; + const generateGlobTasks = (patterns, taskOptions) => { + patterns = arrayUnion([].concat(patterns)); + assertPatternsInput(patterns); + checkCwdOption(taskOptions); + const globTasks = []; + taskOptions = { + ignore: [], + expandDirectories: true, + ...taskOptions + }; + for (const [index, pattern] of patterns.entries()) { + if (isNegative(pattern)) continue; + const ignore = patterns.slice(index).filter((pattern) => isNegative(pattern)).map((pattern) => pattern.slice(1)); + const options = { + ...taskOptions, + ignore: taskOptions.ignore.concat(ignore) + }; + globTasks.push({ + pattern, + options + }); + } + return globTasks; + }; + const globDirs = (task, fn) => { + let options = {}; + if (task.options.cwd) options.cwd = task.options.cwd; + if (Array.isArray(task.options.expandDirectories)) options = { + ...options, + files: task.options.expandDirectories + }; + else if (typeof task.options.expandDirectories === "object") options = { + ...options, + ...task.options.expandDirectories + }; + return fn(task.pattern, options); + }; + const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; + const getFilterSync = (options) => { + return options && options.gitignore ? gitignore.sync({ + cwd: options.cwd, + ignore: options.ignore + }) : DEFAULT_FILTER; + }; + const globToTask = (task) => (glob) => { + const { options } = task; + if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) options.ignore = dirGlob.sync(options.ignore); + return { + pattern: glob, + options + }; + }; + module.exports = async (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const getFilter = async () => { + return options && options.gitignore ? gitignore({ + cwd: options.cwd, + ignore: options.ignore + }) : DEFAULT_FILTER; + }; + const getTasks = async () => { + return arrayUnion(...await Promise.all(globTasks.map(async (task) => { + const globs = await getPattern(task, dirGlob); + return Promise.all(globs.map(globToTask(task))); + }))); + }; + const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); + return arrayUnion(...await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options)))).filter((path_) => !filter(getPathString(path_))); + }; + module.exports.sync = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + let matches = []; + for (const task of tasks) matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); + return matches.filter((path_) => !filter(path_)); + }; + module.exports.stream = (patterns, options) => { + const globTasks = generateGlobTasks(patterns, options); + const tasks = []; + for (const task of globTasks) { + const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); + tasks.push(...newTask); + } + const filter = getFilterSync(options); + const filterStream = new FilterStream((p) => !filter(p)); + const uniqueStream = new UniqueStream(); + return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); + }; + module.exports.generateGlobTasks = generateGlobTasks; + module.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); + module.exports.gitignore = gitignore; +})); +//#endregion +//#region ../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js +var require_pify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const processFn = (fn, options) => function(...args) { + const P = options.promiseModule; + return new P((resolve, reject) => { + if (options.multiArgs) args.push((...result) => { + if (options.errorFirst) if (result[0]) reject(result); + else { + result.shift(); + resolve(result); + } + else resolve(result); + }); + else if (options.errorFirst) args.push((error, result) => { + if (error) reject(error); + else resolve(result); + }); + else args.push(resolve); + fn.apply(this, args); + }); + }; + module.exports = (input, options) => { + options = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options); + const objType = typeof input; + if (!(input !== null && (objType === "object" || objType === "function"))) throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? "null" : objType}\``); + const filter = (key) => { + const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key); + return options.include ? options.include.some(match) : !options.exclude.some(match); + }; + let ret; + if (objType === "function") ret = function(...args) { + return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); + }; + else ret = Object.create(Object.getPrototypeOf(input)); + for (const key in input) { + const property = input[key]; + ret[key] = typeof property === "function" && filter(key) ? processFn(property, options) : property; + } + return ret; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js +var require_strip_bom = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = (x) => { + if (typeof x !== "string") throw new TypeError("Expected a string, got " + typeof x); + if (x.charCodeAt(0) === 65279) return x.slice(1); + return x; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/common.js +var require_common = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) result += string; + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module.exports.isNothing = isNothing; + module.exports.isObject = isObject; + module.exports.toArray = toArray; + module.exports.repeat = repeat; + module.exports.isNegativeZero = isNegativeZero; + module.exports.extend = extend; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/exception.js +var require_exception = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""); + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + else this.stack = (/* @__PURE__ */ new Error()).stack || ""; + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ": "; + result += this.reason || "(unknown reason)"; + if (!compact && this.mark) result += " " + this.mark.toString(); + return result; + }; + module.exports = YAMLException; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/mark.js +var require_mark = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + if (!this.buffer) return null; + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && "\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } + } + tail = ""; + end = this.position; + while (end < this.buffer.length && "\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } + } + snippet = this.buffer.slice(start, end); + return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark.prototype.toString = function toString(compact) { + var snippet, where = ""; + if (this.name) where += "in \"" + this.name + "\" "; + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet = this.getSnippet(); + if (snippet) where += ":\n" + snippet; + } + return where; + }; + module.exports = Mark; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type.js +var require_type = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException("Unknown option \"" + name + "\" is met in definition of \"" + tag + "\" YAML type."); + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) throw new YAMLException("Unknown kind \"" + this.kind + "\" is specified for \"" + tag + "\" YAML type."); + } + module.exports = Type; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema.js +var require_schema = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + var YAMLException = require_exception(); + var Type = require_type(); + function compileList(schema, name, result) { + var exclude = []; + schema.include.forEach(function(includedSchema) { + result = compileList(includedSchema, name, result); + }); + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) exclude.push(previousIndex); + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + function collectType(type) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; + } + function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type) { + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + }); + this.compiledImplicit = compileList(this, "implicit", []); + this.compiledExplicit = compileList(this, "explicit", []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); + } + Schema.DEFAULT = null; + Schema.create = function createSchema() { + var schemas, types; + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + default: throw new YAMLException("Wrong number of arguments for Schema.create function"); + } + schemas = common.toArray(schemas); + types = common.toArray(types); + if (!schemas.every(function(schema) { + return schema instanceof Schema; + })) throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + if (!types.every(function(type) { + return type instanceof Type; + })) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + return new Schema({ + include: schemas, + explicit: types + }); + }; + module.exports = Schema; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/str.js +var require_str = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/seq.js +var require_seq = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/map.js +var require_map = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +var require_failsafe = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_schema())({ explicit: [ + require_str(), + require_seq(), + require_map() + ] }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/null.js +var require_null = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + } + }, + defaultStyle: "lowercase" + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/bool.js +var require_bool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/int.js +var require_int = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + var Type = require_type(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch === ":") break; + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits || ch === "_") return false; + if (ch !== ":") return true; + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + if (value.indexOf("_") !== -1) value = value.replace(/_/g, ""); + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach(function(v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + module.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/float.js +var require_float = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + var Type = require_type(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") return false; + return true; + } + function constructYamlFloat(data) { + var value = data.replace(/_/g, "").toLowerCase(), sign = value[0] === "-" ? -1 : 1, base, digits = []; + if ("+-".indexOf(value[0]) >= 0) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + else if (value === ".nan") return NaN; + else if (value.indexOf(":") >= 0) { + value.split(":").forEach(function(v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) switch (style) { + case "lowercase": return ".nan"; + case "uppercase": return ".NAN"; + case "camelcase": return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === object) switch (style) { + case "lowercase": return ".inf"; + case "uppercase": return ".INF"; + case "camelcase": return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === object) switch (style) { + case "lowercase": return "-.inf"; + case "uppercase": return "-.INF"; + case "camelcase": return "-.Inf"; + } + else if (common.isNegativeZero(object)) return "-0.0"; + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/json.js +var require_json = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_schema())({ + include: [require_failsafe()], + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/core.js +var require_core = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_schema())({ include: [require_json()] }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +var require_timestamp = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) return new Date(Date.UTC(year, month, day)); + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/merge.js +var require_merge = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/binary.js +var require_binary = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var NodeBuffer; + try { + NodeBuffer = __require("buffer").Buffer; + } catch (__) {} + var Type = require_type(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) result.push(bits >> 4 & 255); + if (NodeBuffer) return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + return result; + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/omap.js +var require_omap = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +var require_pairs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/set.js +var require_set = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + var key, object = data; + for (key in object) if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +var require_default_safe = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = new (require_schema())({ + include: [require_core()], + implicit: [require_timestamp(), require_merge()], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +var require_undefined = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() {} + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return typeof object === "undefined"; + } + module.exports = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +var require_regexp = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Type = require_type(); + function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) modifiers = tail[1]; + if (modifiers.length > 3) return false; + if (regexp[regexp.length - modifiers.length - 1] !== "/") return false; + } + return true; + } + function constructJavascriptRegExp(data) { + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + return new RegExp(regexp, modifiers); + } + function representJavascriptRegExp(object) { + var result = "/" + object.source + "/"; + if (object.global) result += "g"; + if (object.multiline) result += "m"; + if (object.ignoreCase) result += "i"; + return result; + } + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + module.exports = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/esprima@4.0.1/node_modules/esprima/dist/esprima.js +var require_esprima = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + (function webpackUniversalModuleDefinition(root, factory) { + /* istanbul ignore next */ + if (typeof exports === "object" && typeof module === "object") module.exports = factory(); + else if (typeof define === "function" && define.amd) define([], factory); + else if (typeof exports === "object") exports["esprima"] = factory(); + else root["esprima"] = factory(); + })(exports, function() { + return (function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + /* istanbul ignore if */ + if (installedModules[moduleId]) return installedModules[moduleId].exports; + var module$1 = installedModules[moduleId] = { + exports: {}, + id: moduleId, + loaded: false + }; + modules[moduleId].call(module$1.exports, module$1, module$1.exports, __webpack_require__); + module$1.loaded = true; + return module$1.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.p = ""; + return __webpack_require__(0); + })([ + function(module$2, exports$1, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$1, "__esModule", { value: true }); + var comment_handler_1 = __webpack_require__(1); + var jsx_parser_1 = __webpack_require__(3); + var parser_1 = __webpack_require__(8); + var tokenizer_1 = __webpack_require__(15); + function parse(code, options, delegate) { + var commentHandler = null; + var proxyDelegate = function(node, metadata) { + if (delegate) delegate(node, metadata); + if (commentHandler) commentHandler.visit(node, metadata); + }; + var parserDelegate = typeof delegate === "function" ? proxyDelegate : null; + var collectComment = false; + if (options) { + collectComment = typeof options.comment === "boolean" && options.comment; + var attachComment = typeof options.attachComment === "boolean" && options.attachComment; + if (collectComment || attachComment) { + commentHandler = new comment_handler_1.CommentHandler(); + commentHandler.attach = attachComment; + options.comment = true; + parserDelegate = proxyDelegate; + } + } + var isModule = false; + if (options && typeof options.sourceType === "string") isModule = options.sourceType === "module"; + var parser; + if (options && typeof options.jsx === "boolean" && options.jsx) parser = new jsx_parser_1.JSXParser(code, options, parserDelegate); + else parser = new parser_1.Parser(code, options, parserDelegate); + var ast = isModule ? parser.parseModule() : parser.parseScript(); + if (collectComment && commentHandler) ast.comments = commentHandler.comments; + if (parser.config.tokens) ast.tokens = parser.tokens; + if (parser.config.tolerant) ast.errors = parser.errorHandler.errors; + return ast; + } + exports$1.parse = parse; + function parseModule(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = "module"; + return parse(code, parsingOptions, delegate); + } + exports$1.parseModule = parseModule; + function parseScript(code, options, delegate) { + var parsingOptions = options || {}; + parsingOptions.sourceType = "script"; + return parse(code, parsingOptions, delegate); + } + exports$1.parseScript = parseScript; + function tokenize(code, options, delegate) { + var tokenizer = new tokenizer_1.Tokenizer(code, options); + var tokens = []; + try { + while (true) { + var token = tokenizer.getNextToken(); + if (!token) break; + if (delegate) token = delegate(token); + tokens.push(token); + } + } catch (e) { + tokenizer.errorHandler.tolerate(e); + } + if (tokenizer.errorHandler.tolerant) tokens.errors = tokenizer.errors(); + return tokens; + } + exports$1.tokenize = tokenize; + exports$1.Syntax = __webpack_require__(2).Syntax; + exports$1.version = "4.0.1"; + }, + function(module$3, exports$2, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$2, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + exports$2.CommentHandler = function() { + function CommentHandler() { + this.attach = false; + this.comments = []; + this.stack = []; + this.leading = []; + this.trailing = []; + } + CommentHandler.prototype.insertInnerComments = function(node, metadata) { + if (node.type === syntax_1.Syntax.BlockStatement && node.body.length === 0) { + var innerComments = []; + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (metadata.end.offset >= entry.start) { + innerComments.unshift(entry.comment); + this.leading.splice(i, 1); + this.trailing.splice(i, 1); + } + } + if (innerComments.length) node.innerComments = innerComments; + } + }; + CommentHandler.prototype.findTrailingComments = function(metadata) { + var trailingComments = []; + if (this.trailing.length > 0) { + for (var i = this.trailing.length - 1; i >= 0; --i) { + var entry_1 = this.trailing[i]; + if (entry_1.start >= metadata.end.offset) trailingComments.unshift(entry_1.comment); + } + this.trailing.length = 0; + return trailingComments; + } + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.node.trailingComments) { + var firstComment = entry.node.trailingComments[0]; + if (firstComment && firstComment.range[0] >= metadata.end.offset) { + trailingComments = entry.node.trailingComments; + delete entry.node.trailingComments; + } + } + return trailingComments; + }; + CommentHandler.prototype.findLeadingComments = function(metadata) { + var leadingComments = []; + var target; + while (this.stack.length > 0) { + var entry = this.stack[this.stack.length - 1]; + if (entry && entry.start >= metadata.start.offset) { + target = entry.node; + this.stack.pop(); + } else break; + } + if (target) { + for (var i = (target.leadingComments ? target.leadingComments.length : 0) - 1; i >= 0; --i) { + var comment = target.leadingComments[i]; + if (comment.range[1] <= metadata.start.offset) { + leadingComments.unshift(comment); + target.leadingComments.splice(i, 1); + } + } + if (target.leadingComments && target.leadingComments.length === 0) delete target.leadingComments; + return leadingComments; + } + for (var i = this.leading.length - 1; i >= 0; --i) { + var entry = this.leading[i]; + if (entry.start <= metadata.start.offset) { + leadingComments.unshift(entry.comment); + this.leading.splice(i, 1); + } + } + return leadingComments; + }; + CommentHandler.prototype.visitNode = function(node, metadata) { + if (node.type === syntax_1.Syntax.Program && node.body.length > 0) return; + this.insertInnerComments(node, metadata); + var trailingComments = this.findTrailingComments(metadata); + var leadingComments = this.findLeadingComments(metadata); + if (leadingComments.length > 0) node.leadingComments = leadingComments; + if (trailingComments.length > 0) node.trailingComments = trailingComments; + this.stack.push({ + node, + start: metadata.start.offset + }); + }; + CommentHandler.prototype.visitComment = function(node, metadata) { + var type = node.type[0] === "L" ? "Line" : "Block"; + var comment = { + type, + value: node.value + }; + if (node.range) comment.range = node.range; + if (node.loc) comment.loc = node.loc; + this.comments.push(comment); + if (this.attach) { + var entry = { + comment: { + type, + value: node.value, + range: [metadata.start.offset, metadata.end.offset] + }, + start: metadata.start.offset + }; + if (node.loc) entry.comment.loc = node.loc; + node.type = type; + this.leading.push(entry); + this.trailing.push(entry); + } + }; + CommentHandler.prototype.visit = function(node, metadata) { + if (node.type === "LineComment") this.visitComment(node, metadata); + else if (node.type === "BlockComment") this.visitComment(node, metadata); + else if (this.attach) this.visitNode(node, metadata); + }; + return CommentHandler; + }(); + }, + function(module$4, exports$3) { + "use strict"; + Object.defineProperty(exports$3, "__esModule", { value: true }); + exports$3.Syntax = { + AssignmentExpression: "AssignmentExpression", + AssignmentPattern: "AssignmentPattern", + ArrayExpression: "ArrayExpression", + ArrayPattern: "ArrayPattern", + ArrowFunctionExpression: "ArrowFunctionExpression", + AwaitExpression: "AwaitExpression", + BlockStatement: "BlockStatement", + BinaryExpression: "BinaryExpression", + BreakStatement: "BreakStatement", + CallExpression: "CallExpression", + CatchClause: "CatchClause", + ClassBody: "ClassBody", + ClassDeclaration: "ClassDeclaration", + ClassExpression: "ClassExpression", + ConditionalExpression: "ConditionalExpression", + ContinueStatement: "ContinueStatement", + DoWhileStatement: "DoWhileStatement", + DebuggerStatement: "DebuggerStatement", + EmptyStatement: "EmptyStatement", + ExportAllDeclaration: "ExportAllDeclaration", + ExportDefaultDeclaration: "ExportDefaultDeclaration", + ExportNamedDeclaration: "ExportNamedDeclaration", + ExportSpecifier: "ExportSpecifier", + ExpressionStatement: "ExpressionStatement", + ForStatement: "ForStatement", + ForOfStatement: "ForOfStatement", + ForInStatement: "ForInStatement", + FunctionDeclaration: "FunctionDeclaration", + FunctionExpression: "FunctionExpression", + Identifier: "Identifier", + IfStatement: "IfStatement", + ImportDeclaration: "ImportDeclaration", + ImportDefaultSpecifier: "ImportDefaultSpecifier", + ImportNamespaceSpecifier: "ImportNamespaceSpecifier", + ImportSpecifier: "ImportSpecifier", + Literal: "Literal", + LabeledStatement: "LabeledStatement", + LogicalExpression: "LogicalExpression", + MemberExpression: "MemberExpression", + MetaProperty: "MetaProperty", + MethodDefinition: "MethodDefinition", + NewExpression: "NewExpression", + ObjectExpression: "ObjectExpression", + ObjectPattern: "ObjectPattern", + Program: "Program", + Property: "Property", + RestElement: "RestElement", + ReturnStatement: "ReturnStatement", + SequenceExpression: "SequenceExpression", + SpreadElement: "SpreadElement", + Super: "Super", + SwitchCase: "SwitchCase", + SwitchStatement: "SwitchStatement", + TaggedTemplateExpression: "TaggedTemplateExpression", + TemplateElement: "TemplateElement", + TemplateLiteral: "TemplateLiteral", + ThisExpression: "ThisExpression", + ThrowStatement: "ThrowStatement", + TryStatement: "TryStatement", + UnaryExpression: "UnaryExpression", + UpdateExpression: "UpdateExpression", + VariableDeclaration: "VariableDeclaration", + VariableDeclarator: "VariableDeclarator", + WhileStatement: "WhileStatement", + WithStatement: "WithStatement", + YieldExpression: "YieldExpression" + }; + }, + function(module$5, exports$4, __webpack_require__) { + "use strict"; + /* istanbul ignore next */ + var __extends = this && this.__extends || (function() { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + return function(d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })(); + Object.defineProperty(exports$4, "__esModule", { value: true }); + var character_1 = __webpack_require__(4); + var JSXNode = __webpack_require__(5); + var jsx_syntax_1 = __webpack_require__(6); + var Node = __webpack_require__(7); + var parser_1 = __webpack_require__(8); + var token_1 = __webpack_require__(13); + var xhtml_entities_1 = __webpack_require__(14); + token_1.TokenName[100] = "JSXIdentifier"; + token_1.TokenName[101] = "JSXText"; + function getQualifiedElementName(elementName) { + var qualifiedName; + switch (elementName.type) { + case jsx_syntax_1.JSXSyntax.JSXIdentifier: + qualifiedName = elementName.name; + break; + case jsx_syntax_1.JSXSyntax.JSXNamespacedName: + var ns = elementName; + qualifiedName = getQualifiedElementName(ns.namespace) + ":" + getQualifiedElementName(ns.name); + break; + case jsx_syntax_1.JSXSyntax.JSXMemberExpression: + var expr = elementName; + qualifiedName = getQualifiedElementName(expr.object) + "." + getQualifiedElementName(expr.property); + break; + /* istanbul ignore next */ + default: break; + } + return qualifiedName; + } + exports$4.JSXParser = function(_super) { + __extends(JSXParser, _super); + function JSXParser(code, options, delegate) { + return _super.call(this, code, options, delegate) || this; + } + JSXParser.prototype.parsePrimaryExpression = function() { + return this.match("<") ? this.parseJSXRoot() : _super.prototype.parsePrimaryExpression.call(this); + }; + JSXParser.prototype.startJSX = function() { + this.scanner.index = this.startMarker.index; + this.scanner.lineNumber = this.startMarker.line; + this.scanner.lineStart = this.startMarker.index - this.startMarker.column; + }; + JSXParser.prototype.finishJSX = function() { + this.nextToken(); + }; + JSXParser.prototype.reenterJSX = function() { + this.startJSX(); + this.expectJSX("}"); + if (this.config.tokens) this.tokens.pop(); + }; + JSXParser.prototype.createJSXNode = function() { + this.collectComments(); + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.createJSXChildNode = function() { + return { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + }; + JSXParser.prototype.scanXHTMLEntity = function(quote) { + var result = "&"; + var valid = true; + var terminated = false; + var numeric = false; + var hex = false; + while (!this.scanner.eof() && valid && !terminated) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === quote) break; + terminated = ch === ";"; + result += ch; + ++this.scanner.index; + if (!terminated) switch (result.length) { + case 2: + numeric = ch === "#"; + break; + case 3: + if (numeric) { + hex = ch === "x"; + valid = hex || character_1.Character.isDecimalDigit(ch.charCodeAt(0)); + numeric = numeric && !hex; + } + break; + default: + valid = valid && !(numeric && !character_1.Character.isDecimalDigit(ch.charCodeAt(0))); + valid = valid && !(hex && !character_1.Character.isHexDigit(ch.charCodeAt(0))); + break; + } + } + if (valid && terminated && result.length > 2) { + var str = result.substr(1, result.length - 2); + if (numeric && str.length > 1) result = String.fromCharCode(parseInt(str.substr(1), 10)); + else if (hex && str.length > 2) result = String.fromCharCode(parseInt("0" + str.substr(1), 16)); + else if (!numeric && !hex && xhtml_entities_1.XHTMLEntities[str]) result = xhtml_entities_1.XHTMLEntities[str]; + } + return result; + }; + JSXParser.prototype.lexJSX = function() { + var cp = this.scanner.source.charCodeAt(this.scanner.index); + if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { + var value = this.scanner.source[this.scanner.index++]; + return { + type: 7, + value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index - 1, + end: this.scanner.index + }; + } + if (cp === 34 || cp === 39) { + var start = this.scanner.index; + var quote = this.scanner.source[this.scanner.index++]; + var str = ""; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index++]; + if (ch === quote) break; + else if (ch === "&") str += this.scanXHTMLEntity(quote); + else str += ch; + } + return { + type: 8, + value: str, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start, + end: this.scanner.index + }; + } + if (cp === 46) { + var n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); + var n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); + var value = n1 === 46 && n2 === 46 ? "..." : "."; + var start = this.scanner.index; + this.scanner.index += value.length; + return { + type: 7, + value, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start, + end: this.scanner.index + }; + } + if (cp === 96) return { + type: 10, + value: "", + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start: this.scanner.index, + end: this.scanner.index + }; + if (character_1.Character.isIdentifierStart(cp) && cp !== 92) { + var start = this.scanner.index; + ++this.scanner.index; + while (!this.scanner.eof()) { + var ch = this.scanner.source.charCodeAt(this.scanner.index); + if (character_1.Character.isIdentifierPart(ch) && ch !== 92) ++this.scanner.index; + else if (ch === 45) ++this.scanner.index; + else break; + } + return { + type: 100, + value: this.scanner.source.slice(start, this.scanner.index), + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start, + end: this.scanner.index + }; + } + return this.scanner.lex(); + }; + JSXParser.prototype.nextJSXToken = function() { + this.collectComments(); + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var token = this.lexJSX(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + if (this.config.tokens) this.tokens.push(this.convertToken(token)); + return token; + }; + JSXParser.prototype.nextJSXText = function() { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + var start = this.scanner.index; + var text = ""; + while (!this.scanner.eof()) { + var ch = this.scanner.source[this.scanner.index]; + if (ch === "{" || ch === "<") break; + ++this.scanner.index; + text += ch; + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.scanner.lineNumber; + if (ch === "\r" && this.scanner.source[this.scanner.index] === "\n") ++this.scanner.index; + this.scanner.lineStart = this.scanner.index; + } + } + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + var token = { + type: 101, + value: text, + lineNumber: this.scanner.lineNumber, + lineStart: this.scanner.lineStart, + start, + end: this.scanner.index + }; + if (text.length > 0 && this.config.tokens) this.tokens.push(this.convertToken(token)); + return token; + }; + JSXParser.prototype.peekJSXToken = function() { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.lexJSX(); + this.scanner.restoreState(state); + return next; + }; + JSXParser.prototype.expectJSX = function(value) { + var token = this.nextJSXToken(); + if (token.type !== 7 || token.value !== value) this.throwUnexpectedToken(token); + }; + JSXParser.prototype.matchJSX = function(value) { + var next = this.peekJSXToken(); + return next.type === 7 && next.value === value; + }; + JSXParser.prototype.parseJSXIdentifier = function() { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 100) this.throwUnexpectedToken(token); + return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); + }; + JSXParser.prototype.parseJSXElementName = function() { + var node = this.createJSXNode(); + var elementName = this.parseJSXIdentifier(); + if (this.matchJSX(":")) { + var namespace = elementName; + this.expectJSX(":"); + var name_1 = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_1)); + } else if (this.matchJSX(".")) while (this.matchJSX(".")) { + var object = elementName; + this.expectJSX("."); + var property = this.parseJSXIdentifier(); + elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); + } + return elementName; + }; + JSXParser.prototype.parseJSXAttributeName = function() { + var node = this.createJSXNode(); + var attributeName; + var identifier = this.parseJSXIdentifier(); + if (this.matchJSX(":")) { + var namespace = identifier; + this.expectJSX(":"); + var name_2 = this.parseJSXIdentifier(); + attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name_2)); + } else attributeName = identifier; + return attributeName; + }; + JSXParser.prototype.parseJSXStringLiteralAttribute = function() { + var node = this.createJSXNode(); + var token = this.nextJSXToken(); + if (token.type !== 8) this.throwUnexpectedToken(token); + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + JSXParser.prototype.parseJSXExpressionAttribute = function() { + var node = this.createJSXNode(); + this.expectJSX("{"); + this.finishJSX(); + if (this.match("}")) this.tolerateError("JSX attributes must only be assigned a non-empty expression"); + var expression = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXAttributeValue = function() { + return this.matchJSX("{") ? this.parseJSXExpressionAttribute() : this.matchJSX("<") ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); + }; + JSXParser.prototype.parseJSXNameValueAttribute = function() { + var node = this.createJSXNode(); + var name = this.parseJSXAttributeName(); + var value = null; + if (this.matchJSX("=")) { + this.expectJSX("="); + value = this.parseJSXAttributeValue(); + } + return this.finalize(node, new JSXNode.JSXAttribute(name, value)); + }; + JSXParser.prototype.parseJSXSpreadAttribute = function() { + var node = this.createJSXNode(); + this.expectJSX("{"); + this.expectJSX("..."); + this.finishJSX(); + var argument = this.parseAssignmentExpression(); + this.reenterJSX(); + return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); + }; + JSXParser.prototype.parseJSXAttributes = function() { + var attributes = []; + while (!this.matchJSX("/") && !this.matchJSX(">")) { + var attribute = this.matchJSX("{") ? this.parseJSXSpreadAttribute() : this.parseJSXNameValueAttribute(); + attributes.push(attribute); + } + return attributes; + }; + JSXParser.prototype.parseJSXOpeningElement = function() { + var node = this.createJSXNode(); + this.expectJSX("<"); + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX("/"); + if (selfClosing) this.expectJSX("/"); + this.expectJSX(">"); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXBoundaryElement = function() { + var node = this.createJSXNode(); + this.expectJSX("<"); + if (this.matchJSX("/")) { + this.expectJSX("/"); + var name_3 = this.parseJSXElementName(); + this.expectJSX(">"); + return this.finalize(node, new JSXNode.JSXClosingElement(name_3)); + } + var name = this.parseJSXElementName(); + var attributes = this.parseJSXAttributes(); + var selfClosing = this.matchJSX("/"); + if (selfClosing) this.expectJSX("/"); + this.expectJSX(">"); + return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); + }; + JSXParser.prototype.parseJSXEmptyExpression = function() { + var node = this.createJSXChildNode(); + this.collectComments(); + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + return this.finalize(node, new JSXNode.JSXEmptyExpression()); + }; + JSXParser.prototype.parseJSXExpressionContainer = function() { + var node = this.createJSXNode(); + this.expectJSX("{"); + var expression; + if (this.matchJSX("}")) { + expression = this.parseJSXEmptyExpression(); + this.expectJSX("}"); + } else { + this.finishJSX(); + expression = this.parseAssignmentExpression(); + this.reenterJSX(); + } + return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); + }; + JSXParser.prototype.parseJSXChildren = function() { + var children = []; + while (!this.scanner.eof()) { + var node = this.createJSXChildNode(); + var token = this.nextJSXText(); + if (token.start < token.end) { + var raw = this.getTokenRaw(token); + var child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); + children.push(child); + } + if (this.scanner.source[this.scanner.index] === "{") { + var container = this.parseJSXExpressionContainer(); + children.push(container); + } else break; + } + return children; + }; + JSXParser.prototype.parseComplexJSXElement = function(el) { + var stack = []; + while (!this.scanner.eof()) { + el.children = el.children.concat(this.parseJSXChildren()); + var node = this.createJSXChildNode(); + var element = this.parseJSXBoundaryElement(); + if (element.type === jsx_syntax_1.JSXSyntax.JSXOpeningElement) { + var opening = element; + if (opening.selfClosing) { + var child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); + el.children.push(child); + } else { + stack.push(el); + el = { + node, + opening, + closing: null, + children: [] + }; + } + } + if (element.type === jsx_syntax_1.JSXSyntax.JSXClosingElement) { + el.closing = element; + var open_1 = getQualifiedElementName(el.opening.name); + if (open_1 !== getQualifiedElementName(el.closing.name)) this.tolerateError("Expected corresponding JSX closing tag for %0", open_1); + if (stack.length > 0) { + var child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); + el = stack[stack.length - 1]; + el.children.push(child); + stack.pop(); + } else break; + } + } + return el; + }; + JSXParser.prototype.parseJSXElement = function() { + var node = this.createJSXNode(); + var opening = this.parseJSXOpeningElement(); + var children = []; + var closing = null; + if (!opening.selfClosing) { + var el = this.parseComplexJSXElement({ + node, + opening, + closing, + children + }); + children = el.children; + closing = el.closing; + } + return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); + }; + JSXParser.prototype.parseJSXRoot = function() { + if (this.config.tokens) this.tokens.pop(); + this.startJSX(); + var element = this.parseJSXElement(); + this.finishJSX(); + return element; + }; + JSXParser.prototype.isStartOfExpression = function() { + return _super.prototype.isStartOfExpression.call(this) || this.match("<"); + }; + return JSXParser; + }(parser_1.Parser); + }, + function(module$6, exports$5) { + "use strict"; + Object.defineProperty(exports$5, "__esModule", { value: true }); + var Regex = { + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2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\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\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DF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + exports$5.Character = { + fromCodePoint: function(cp) { + return cp < 65536 ? String.fromCharCode(cp) : String.fromCharCode(55296 + (cp - 65536 >> 10)) + String.fromCharCode(56320 + (cp - 65536 & 1023)); + }, + isWhiteSpace: function(cp) { + return cp === 32 || cp === 9 || cp === 11 || cp === 12 || cp === 160 || cp >= 5760 && [ + 5760, + 8192, + 8193, + 8194, + 8195, + 8196, + 8197, + 8198, + 8199, + 8200, + 8201, + 8202, + 8239, + 8287, + 12288, + 65279 + ].indexOf(cp) >= 0; + }, + isLineTerminator: function(cp) { + return cp === 10 || cp === 13 || cp === 8232 || cp === 8233; + }, + isIdentifierStart: function(cp) { + return cp === 36 || cp === 95 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 92 || cp >= 128 && Regex.NonAsciiIdentifierStart.test(exports$5.Character.fromCodePoint(cp)); + }, + isIdentifierPart: function(cp) { + return cp === 36 || cp === 95 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp >= 48 && cp <= 57 || cp === 92 || cp >= 128 && Regex.NonAsciiIdentifierPart.test(exports$5.Character.fromCodePoint(cp)); + }, + isDecimalDigit: function(cp) { + return cp >= 48 && cp <= 57; + }, + isHexDigit: function(cp) { + return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 70 || cp >= 97 && cp <= 102; + }, + isOctalDigit: function(cp) { + return cp >= 48 && cp <= 55; + } + }; + }, + function(module$7, exports$6, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$6, "__esModule", { value: true }); + var jsx_syntax_1 = __webpack_require__(6); + exports$6.JSXClosingElement = function() { + function JSXClosingElement(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXClosingElement; + this.name = name; + } + return JSXClosingElement; + }(); + exports$6.JSXElement = function() { + function JSXElement(openingElement, children, closingElement) { + this.type = jsx_syntax_1.JSXSyntax.JSXElement; + this.openingElement = openingElement; + this.children = children; + this.closingElement = closingElement; + } + return JSXElement; + }(); + exports$6.JSXEmptyExpression = function() { + function JSXEmptyExpression() { + this.type = jsx_syntax_1.JSXSyntax.JSXEmptyExpression; + } + return JSXEmptyExpression; + }(); + exports$6.JSXExpressionContainer = function() { + function JSXExpressionContainer(expression) { + this.type = jsx_syntax_1.JSXSyntax.JSXExpressionContainer; + this.expression = expression; + } + return JSXExpressionContainer; + }(); + exports$6.JSXIdentifier = function() { + function JSXIdentifier(name) { + this.type = jsx_syntax_1.JSXSyntax.JSXIdentifier; + this.name = name; + } + return JSXIdentifier; + }(); + exports$6.JSXMemberExpression = function() { + function JSXMemberExpression(object, property) { + this.type = jsx_syntax_1.JSXSyntax.JSXMemberExpression; + this.object = object; + this.property = property; + } + return JSXMemberExpression; + }(); + exports$6.JSXAttribute = function() { + function JSXAttribute(name, value) { + this.type = jsx_syntax_1.JSXSyntax.JSXAttribute; + this.name = name; + this.value = value; + } + return JSXAttribute; + }(); + exports$6.JSXNamespacedName = function() { + function JSXNamespacedName(namespace, name) { + this.type = jsx_syntax_1.JSXSyntax.JSXNamespacedName; + this.namespace = namespace; + this.name = name; + } + return JSXNamespacedName; + }(); + exports$6.JSXOpeningElement = function() { + function JSXOpeningElement(name, selfClosing, attributes) { + this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement; + this.name = name; + this.selfClosing = selfClosing; + this.attributes = attributes; + } + return JSXOpeningElement; + }(); + exports$6.JSXSpreadAttribute = function() { + function JSXSpreadAttribute(argument) { + this.type = jsx_syntax_1.JSXSyntax.JSXSpreadAttribute; + this.argument = argument; + } + return JSXSpreadAttribute; + }(); + exports$6.JSXText = function() { + function JSXText(value, raw) { + this.type = jsx_syntax_1.JSXSyntax.JSXText; + this.value = value; + this.raw = raw; + } + return JSXText; + }(); + }, + function(module$8, exports$7) { + "use strict"; + Object.defineProperty(exports$7, "__esModule", { value: true }); + exports$7.JSXSyntax = { + JSXAttribute: "JSXAttribute", + JSXClosingElement: "JSXClosingElement", + JSXElement: "JSXElement", + JSXEmptyExpression: "JSXEmptyExpression", + JSXExpressionContainer: "JSXExpressionContainer", + JSXIdentifier: "JSXIdentifier", + JSXMemberExpression: "JSXMemberExpression", + JSXNamespacedName: "JSXNamespacedName", + JSXOpeningElement: "JSXOpeningElement", + JSXSpreadAttribute: "JSXSpreadAttribute", + JSXText: "JSXText" + }; + }, + function(module$9, exports$8, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$8, "__esModule", { value: true }); + var syntax_1 = __webpack_require__(2); + exports$8.ArrayExpression = function() { + function ArrayExpression(elements) { + this.type = syntax_1.Syntax.ArrayExpression; + this.elements = elements; + } + return ArrayExpression; + }(); + exports$8.ArrayPattern = function() { + function ArrayPattern(elements) { + this.type = syntax_1.Syntax.ArrayPattern; + this.elements = elements; + } + return ArrayPattern; + }(); + exports$8.ArrowFunctionExpression = function() { + function ArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = false; + } + return ArrowFunctionExpression; + }(); + exports$8.AssignmentExpression = function() { + function AssignmentExpression(operator, left, right) { + this.type = syntax_1.Syntax.AssignmentExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return AssignmentExpression; + }(); + exports$8.AssignmentPattern = function() { + function AssignmentPattern(left, right) { + this.type = syntax_1.Syntax.AssignmentPattern; + this.left = left; + this.right = right; + } + return AssignmentPattern; + }(); + exports$8.AsyncArrowFunctionExpression = function() { + function AsyncArrowFunctionExpression(params, body, expression) { + this.type = syntax_1.Syntax.ArrowFunctionExpression; + this.id = null; + this.params = params; + this.body = body; + this.generator = false; + this.expression = expression; + this.async = true; + } + return AsyncArrowFunctionExpression; + }(); + exports$8.AsyncFunctionDeclaration = function() { + function AsyncFunctionDeclaration(id, params, body) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionDeclaration; + }(); + exports$8.AsyncFunctionExpression = function() { + function AsyncFunctionExpression(id, params, body) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = false; + this.expression = false; + this.async = true; + } + return AsyncFunctionExpression; + }(); + exports$8.AwaitExpression = function() { + function AwaitExpression(argument) { + this.type = syntax_1.Syntax.AwaitExpression; + this.argument = argument; + } + return AwaitExpression; + }(); + exports$8.BinaryExpression = function() { + function BinaryExpression(operator, left, right) { + var logical = operator === "||" || operator === "&&"; + this.type = logical ? syntax_1.Syntax.LogicalExpression : syntax_1.Syntax.BinaryExpression; + this.operator = operator; + this.left = left; + this.right = right; + } + return BinaryExpression; + }(); + exports$8.BlockStatement = function() { + function BlockStatement(body) { + this.type = syntax_1.Syntax.BlockStatement; + this.body = body; + } + return BlockStatement; + }(); + exports$8.BreakStatement = function() { + function BreakStatement(label) { + this.type = syntax_1.Syntax.BreakStatement; + this.label = label; + } + return BreakStatement; + }(); + exports$8.CallExpression = function() { + function CallExpression(callee, args) { + this.type = syntax_1.Syntax.CallExpression; + this.callee = callee; + this.arguments = args; + } + return CallExpression; + }(); + exports$8.CatchClause = function() { + function CatchClause(param, body) { + this.type = syntax_1.Syntax.CatchClause; + this.param = param; + this.body = body; + } + return CatchClause; + }(); + exports$8.ClassBody = function() { + function ClassBody(body) { + this.type = syntax_1.Syntax.ClassBody; + this.body = body; + } + return ClassBody; + }(); + exports$8.ClassDeclaration = function() { + function ClassDeclaration(id, superClass, body) { + this.type = syntax_1.Syntax.ClassDeclaration; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassDeclaration; + }(); + exports$8.ClassExpression = function() { + function ClassExpression(id, superClass, body) { + this.type = syntax_1.Syntax.ClassExpression; + this.id = id; + this.superClass = superClass; + this.body = body; + } + return ClassExpression; + }(); + exports$8.ComputedMemberExpression = function() { + function ComputedMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = true; + this.object = object; + this.property = property; + } + return ComputedMemberExpression; + }(); + exports$8.ConditionalExpression = function() { + function ConditionalExpression(test, consequent, alternate) { + this.type = syntax_1.Syntax.ConditionalExpression; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return ConditionalExpression; + }(); + exports$8.ContinueStatement = function() { + function ContinueStatement(label) { + this.type = syntax_1.Syntax.ContinueStatement; + this.label = label; + } + return ContinueStatement; + }(); + exports$8.DebuggerStatement = function() { + function DebuggerStatement() { + this.type = syntax_1.Syntax.DebuggerStatement; + } + return DebuggerStatement; + }(); + exports$8.Directive = function() { + function Directive(expression, directive) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + this.directive = directive; + } + return Directive; + }(); + exports$8.DoWhileStatement = function() { + function DoWhileStatement(body, test) { + this.type = syntax_1.Syntax.DoWhileStatement; + this.body = body; + this.test = test; + } + return DoWhileStatement; + }(); + exports$8.EmptyStatement = function() { + function EmptyStatement() { + this.type = syntax_1.Syntax.EmptyStatement; + } + return EmptyStatement; + }(); + exports$8.ExportAllDeclaration = function() { + function ExportAllDeclaration(source) { + this.type = syntax_1.Syntax.ExportAllDeclaration; + this.source = source; + } + return ExportAllDeclaration; + }(); + exports$8.ExportDefaultDeclaration = function() { + function ExportDefaultDeclaration(declaration) { + this.type = syntax_1.Syntax.ExportDefaultDeclaration; + this.declaration = declaration; + } + return ExportDefaultDeclaration; + }(); + exports$8.ExportNamedDeclaration = function() { + function ExportNamedDeclaration(declaration, specifiers, source) { + this.type = syntax_1.Syntax.ExportNamedDeclaration; + this.declaration = declaration; + this.specifiers = specifiers; + this.source = source; + } + return ExportNamedDeclaration; + }(); + exports$8.ExportSpecifier = function() { + function ExportSpecifier(local, exported) { + this.type = syntax_1.Syntax.ExportSpecifier; + this.exported = exported; + this.local = local; + } + return ExportSpecifier; + }(); + exports$8.ExpressionStatement = function() { + function ExpressionStatement(expression) { + this.type = syntax_1.Syntax.ExpressionStatement; + this.expression = expression; + } + return ExpressionStatement; + }(); + exports$8.ForInStatement = function() { + function ForInStatement(left, right, body) { + this.type = syntax_1.Syntax.ForInStatement; + this.left = left; + this.right = right; + this.body = body; + this.each = false; + } + return ForInStatement; + }(); + exports$8.ForOfStatement = function() { + function ForOfStatement(left, right, body) { + this.type = syntax_1.Syntax.ForOfStatement; + this.left = left; + this.right = right; + this.body = body; + } + return ForOfStatement; + }(); + exports$8.ForStatement = function() { + function ForStatement(init, test, update, body) { + this.type = syntax_1.Syntax.ForStatement; + this.init = init; + this.test = test; + this.update = update; + this.body = body; + } + return ForStatement; + }(); + exports$8.FunctionDeclaration = function() { + function FunctionDeclaration(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionDeclaration; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionDeclaration; + }(); + exports$8.FunctionExpression = function() { + function FunctionExpression(id, params, body, generator) { + this.type = syntax_1.Syntax.FunctionExpression; + this.id = id; + this.params = params; + this.body = body; + this.generator = generator; + this.expression = false; + this.async = false; + } + return FunctionExpression; + }(); + exports$8.Identifier = function() { + function Identifier(name) { + this.type = syntax_1.Syntax.Identifier; + this.name = name; + } + return Identifier; + }(); + exports$8.IfStatement = function() { + function IfStatement(test, consequent, alternate) { + this.type = syntax_1.Syntax.IfStatement; + this.test = test; + this.consequent = consequent; + this.alternate = alternate; + } + return IfStatement; + }(); + exports$8.ImportDeclaration = function() { + function ImportDeclaration(specifiers, source) { + this.type = syntax_1.Syntax.ImportDeclaration; + this.specifiers = specifiers; + this.source = source; + } + return ImportDeclaration; + }(); + exports$8.ImportDefaultSpecifier = function() { + function ImportDefaultSpecifier(local) { + this.type = syntax_1.Syntax.ImportDefaultSpecifier; + this.local = local; + } + return ImportDefaultSpecifier; + }(); + exports$8.ImportNamespaceSpecifier = function() { + function ImportNamespaceSpecifier(local) { + this.type = syntax_1.Syntax.ImportNamespaceSpecifier; + this.local = local; + } + return ImportNamespaceSpecifier; + }(); + exports$8.ImportSpecifier = function() { + function ImportSpecifier(local, imported) { + this.type = syntax_1.Syntax.ImportSpecifier; + this.local = local; + this.imported = imported; + } + return ImportSpecifier; + }(); + exports$8.LabeledStatement = function() { + function LabeledStatement(label, body) { + this.type = syntax_1.Syntax.LabeledStatement; + this.label = label; + this.body = body; + } + return LabeledStatement; + }(); + exports$8.Literal = function() { + function Literal(value, raw) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + } + return Literal; + }(); + exports$8.MetaProperty = function() { + function MetaProperty(meta, property) { + this.type = syntax_1.Syntax.MetaProperty; + this.meta = meta; + this.property = property; + } + return MetaProperty; + }(); + exports$8.MethodDefinition = function() { + function MethodDefinition(key, computed, value, kind, isStatic) { + this.type = syntax_1.Syntax.MethodDefinition; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.static = isStatic; + } + return MethodDefinition; + }(); + exports$8.Module = function() { + function Module(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = "module"; + } + return Module; + }(); + exports$8.NewExpression = function() { + function NewExpression(callee, args) { + this.type = syntax_1.Syntax.NewExpression; + this.callee = callee; + this.arguments = args; + } + return NewExpression; + }(); + exports$8.ObjectExpression = function() { + function ObjectExpression(properties) { + this.type = syntax_1.Syntax.ObjectExpression; + this.properties = properties; + } + return ObjectExpression; + }(); + exports$8.ObjectPattern = function() { + function ObjectPattern(properties) { + this.type = syntax_1.Syntax.ObjectPattern; + this.properties = properties; + } + return ObjectPattern; + }(); + exports$8.Property = function() { + function Property(kind, key, computed, value, method, shorthand) { + this.type = syntax_1.Syntax.Property; + this.key = key; + this.computed = computed; + this.value = value; + this.kind = kind; + this.method = method; + this.shorthand = shorthand; + } + return Property; + }(); + exports$8.RegexLiteral = function() { + function RegexLiteral(value, raw, pattern, flags) { + this.type = syntax_1.Syntax.Literal; + this.value = value; + this.raw = raw; + this.regex = { + pattern, + flags + }; + } + return RegexLiteral; + }(); + exports$8.RestElement = function() { + function RestElement(argument) { + this.type = syntax_1.Syntax.RestElement; + this.argument = argument; + } + return RestElement; + }(); + exports$8.ReturnStatement = function() { + function ReturnStatement(argument) { + this.type = syntax_1.Syntax.ReturnStatement; + this.argument = argument; + } + return ReturnStatement; + }(); + exports$8.Script = function() { + function Script(body) { + this.type = syntax_1.Syntax.Program; + this.body = body; + this.sourceType = "script"; + } + return Script; + }(); + exports$8.SequenceExpression = function() { + function SequenceExpression(expressions) { + this.type = syntax_1.Syntax.SequenceExpression; + this.expressions = expressions; + } + return SequenceExpression; + }(); + exports$8.SpreadElement = function() { + function SpreadElement(argument) { + this.type = syntax_1.Syntax.SpreadElement; + this.argument = argument; + } + return SpreadElement; + }(); + exports$8.StaticMemberExpression = function() { + function StaticMemberExpression(object, property) { + this.type = syntax_1.Syntax.MemberExpression; + this.computed = false; + this.object = object; + this.property = property; + } + return StaticMemberExpression; + }(); + exports$8.Super = function() { + function Super() { + this.type = syntax_1.Syntax.Super; + } + return Super; + }(); + exports$8.SwitchCase = function() { + function SwitchCase(test, consequent) { + this.type = syntax_1.Syntax.SwitchCase; + this.test = test; + this.consequent = consequent; + } + return SwitchCase; + }(); + exports$8.SwitchStatement = function() { + function SwitchStatement(discriminant, cases) { + this.type = syntax_1.Syntax.SwitchStatement; + this.discriminant = discriminant; + this.cases = cases; + } + return SwitchStatement; + }(); + exports$8.TaggedTemplateExpression = function() { + function TaggedTemplateExpression(tag, quasi) { + this.type = syntax_1.Syntax.TaggedTemplateExpression; + this.tag = tag; + this.quasi = quasi; + } + return TaggedTemplateExpression; + }(); + exports$8.TemplateElement = function() { + function TemplateElement(value, tail) { + this.type = syntax_1.Syntax.TemplateElement; + this.value = value; + this.tail = tail; + } + return TemplateElement; + }(); + exports$8.TemplateLiteral = function() { + function TemplateLiteral(quasis, expressions) { + this.type = syntax_1.Syntax.TemplateLiteral; + this.quasis = quasis; + this.expressions = expressions; + } + return TemplateLiteral; + }(); + exports$8.ThisExpression = function() { + function ThisExpression() { + this.type = syntax_1.Syntax.ThisExpression; + } + return ThisExpression; + }(); + exports$8.ThrowStatement = function() { + function ThrowStatement(argument) { + this.type = syntax_1.Syntax.ThrowStatement; + this.argument = argument; + } + return ThrowStatement; + }(); + exports$8.TryStatement = function() { + function TryStatement(block, handler, finalizer) { + this.type = syntax_1.Syntax.TryStatement; + this.block = block; + this.handler = handler; + this.finalizer = finalizer; + } + return TryStatement; + }(); + exports$8.UnaryExpression = function() { + function UnaryExpression(operator, argument) { + this.type = syntax_1.Syntax.UnaryExpression; + this.operator = operator; + this.argument = argument; + this.prefix = true; + } + return UnaryExpression; + }(); + exports$8.UpdateExpression = function() { + function UpdateExpression(operator, argument, prefix) { + this.type = syntax_1.Syntax.UpdateExpression; + this.operator = operator; + this.argument = argument; + this.prefix = prefix; + } + return UpdateExpression; + }(); + exports$8.VariableDeclaration = function() { + function VariableDeclaration(declarations, kind) { + this.type = syntax_1.Syntax.VariableDeclaration; + this.declarations = declarations; + this.kind = kind; + } + return VariableDeclaration; + }(); + exports$8.VariableDeclarator = function() { + function VariableDeclarator(id, init) { + this.type = syntax_1.Syntax.VariableDeclarator; + this.id = id; + this.init = init; + } + return VariableDeclarator; + }(); + exports$8.WhileStatement = function() { + function WhileStatement(test, body) { + this.type = syntax_1.Syntax.WhileStatement; + this.test = test; + this.body = body; + } + return WhileStatement; + }(); + exports$8.WithStatement = function() { + function WithStatement(object, body) { + this.type = syntax_1.Syntax.WithStatement; + this.object = object; + this.body = body; + } + return WithStatement; + }(); + exports$8.YieldExpression = function() { + function YieldExpression(argument, delegate) { + this.type = syntax_1.Syntax.YieldExpression; + this.argument = argument; + this.delegate = delegate; + } + return YieldExpression; + }(); + }, + function(module$10, exports$9, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$9, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var error_handler_1 = __webpack_require__(10); + var messages_1 = __webpack_require__(11); + var Node = __webpack_require__(7); + var scanner_1 = __webpack_require__(12); + var syntax_1 = __webpack_require__(2); + var token_1 = __webpack_require__(13); + var ArrowParameterPlaceHolder = "ArrowParameterPlaceHolder"; + exports$9.Parser = function() { + function Parser(code, options, delegate) { + if (options === void 0) options = {}; + this.config = { + range: typeof options.range === "boolean" && options.range, + loc: typeof options.loc === "boolean" && options.loc, + source: null, + tokens: typeof options.tokens === "boolean" && options.tokens, + comment: typeof options.comment === "boolean" && options.comment, + tolerant: typeof options.tolerant === "boolean" && options.tolerant + }; + if (this.config.loc && options.source && options.source !== null) this.config.source = String(options.source); + this.delegate = delegate; + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = this.config.tolerant; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = this.config.comment; + this.operatorPrecedence = { + ")": 0, + ";": 0, + ",": 0, + "=": 0, + "]": 0, + "||": 1, + "&&": 2, + "|": 3, + "^": 4, + "&": 5, + "==": 6, + "!=": 6, + "===": 6, + "!==": 6, + "<": 7, + ">": 7, + "<=": 7, + ">=": 7, + "<<": 8, + ">>": 8, + ">>>": 8, + "+": 9, + "-": 9, + "*": 11, + "/": 11, + "%": 11 + }; + this.lookahead = { + type: 2, + value: "", + lineNumber: this.scanner.lineNumber, + lineStart: 0, + start: 0, + end: 0 + }; + this.hasLineTerminator = false; + this.context = { + isModule: false, + await: false, + allowIn: true, + allowStrictDirective: true, + allowYield: true, + firstCoverInitializedNameError: null, + isAssignmentTarget: false, + isBindingElement: false, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + labelSet: {}, + strict: false + }; + this.tokens = []; + this.startMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.lastMarker = { + index: 0, + line: this.scanner.lineNumber, + column: 0 + }; + this.nextToken(); + this.lastMarker = { + index: this.scanner.index, + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + } + Parser.prototype.throwError = function(messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i]; + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) { + assert_1.assert(idx < args.length, "Message reference must be in range"); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + throw this.errorHandler.createError(index, line, column, msg); + }; + Parser.prototype.tolerateError = function(messageFormat) { + var values = []; + for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i]; + var args = Array.prototype.slice.call(arguments, 1); + var msg = messageFormat.replace(/%(\d)/g, function(whole, idx) { + assert_1.assert(idx < args.length, "Message reference must be in range"); + return args[idx]; + }); + var index = this.lastMarker.index; + var line = this.scanner.lineNumber; + var column = this.lastMarker.column + 1; + this.errorHandler.tolerateError(index, line, column, msg); + }; + Parser.prototype.unexpectedTokenError = function(token, message) { + var msg = message || messages_1.Messages.UnexpectedToken; + var value; + if (token) { + if (!message) { + msg = token.type === 2 ? messages_1.Messages.UnexpectedEOS : token.type === 3 ? messages_1.Messages.UnexpectedIdentifier : token.type === 6 ? messages_1.Messages.UnexpectedNumber : token.type === 8 ? messages_1.Messages.UnexpectedString : token.type === 10 ? messages_1.Messages.UnexpectedTemplate : messages_1.Messages.UnexpectedToken; + if (token.type === 4) { + if (this.scanner.isFutureReservedWord(token.value)) msg = messages_1.Messages.UnexpectedReserved; + else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) msg = messages_1.Messages.StrictReservedWord; + } + } + value = token.value; + } else value = "ILLEGAL"; + msg = msg.replace("%0", value); + if (token && typeof token.lineNumber === "number") { + var index = token.start; + var line = token.lineNumber; + var lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; + var column = token.start - lastMarkerLineStart + 1; + return this.errorHandler.createError(index, line, column, msg); + } else { + var index = this.lastMarker.index; + var line = this.lastMarker.line; + var column = this.lastMarker.column + 1; + return this.errorHandler.createError(index, line, column, msg); + } + }; + Parser.prototype.throwUnexpectedToken = function(token, message) { + throw this.unexpectedTokenError(token, message); + }; + Parser.prototype.tolerateUnexpectedToken = function(token, message) { + this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); + }; + Parser.prototype.collectComments = function() { + if (!this.config.comment) this.scanner.scanComments(); + else { + var comments = this.scanner.scanComments(); + if (comments.length > 0 && this.delegate) for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var node = void 0; + node = { + type: e.multiLine ? "BlockComment" : "LineComment", + value: this.scanner.source.slice(e.slice[0], e.slice[1]) + }; + if (this.config.range) node.range = e.range; + if (this.config.loc) node.loc = e.loc; + var metadata = { + start: { + line: e.loc.start.line, + column: e.loc.start.column, + offset: e.range[0] + }, + end: { + line: e.loc.end.line, + column: e.loc.end.column, + offset: e.range[1] + } + }; + this.delegate(node, metadata); + } + } + }; + Parser.prototype.getTokenRaw = function(token) { + return this.scanner.source.slice(token.start, token.end); + }; + Parser.prototype.convertToken = function(token) { + var t = { + type: token_1.TokenName[token.type], + value: this.getTokenRaw(token) + }; + if (this.config.range) t.range = [token.start, token.end]; + if (this.config.loc) t.loc = { + start: { + line: this.startMarker.line, + column: this.startMarker.column + }, + end: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + } + }; + if (token.type === 9) t.regex = { + pattern: token.pattern, + flags: token.flags + }; + return t; + }; + Parser.prototype.nextToken = function() { + var token = this.lookahead; + this.lastMarker.index = this.scanner.index; + this.lastMarker.line = this.scanner.lineNumber; + this.lastMarker.column = this.scanner.index - this.scanner.lineStart; + this.collectComments(); + if (this.scanner.index !== this.startMarker.index) { + this.startMarker.index = this.scanner.index; + this.startMarker.line = this.scanner.lineNumber; + this.startMarker.column = this.scanner.index - this.scanner.lineStart; + } + var next = this.scanner.lex(); + this.hasLineTerminator = token.lineNumber !== next.lineNumber; + if (next && this.context.strict && next.type === 3) { + if (this.scanner.isStrictModeReservedWord(next.value)) next.type = 4; + } + this.lookahead = next; + if (this.config.tokens && next.type !== 2) this.tokens.push(this.convertToken(next)); + return token; + }; + Parser.prototype.nextRegexToken = function() { + this.collectComments(); + var token = this.scanner.scanRegExp(); + if (this.config.tokens) { + this.tokens.pop(); + this.tokens.push(this.convertToken(token)); + } + this.lookahead = token; + this.nextToken(); + return token; + }; + Parser.prototype.createNode = function() { + return { + index: this.startMarker.index, + line: this.startMarker.line, + column: this.startMarker.column + }; + }; + Parser.prototype.startNode = function(token, lastLineStart) { + if (lastLineStart === void 0) lastLineStart = 0; + var column = token.start - token.lineStart; + var line = token.lineNumber; + if (column < 0) { + column += lastLineStart; + line--; + } + return { + index: token.start, + line, + column + }; + }; + Parser.prototype.finalize = function(marker, node) { + if (this.config.range) node.range = [marker.index, this.lastMarker.index]; + if (this.config.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.column + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column + } + }; + if (this.config.source) node.loc.source = this.config.source; + } + if (this.delegate) { + var metadata = { + start: { + line: marker.line, + column: marker.column, + offset: marker.index + }, + end: { + line: this.lastMarker.line, + column: this.lastMarker.column, + offset: this.lastMarker.index + } + }; + this.delegate(node, metadata); + } + return node; + }; + Parser.prototype.expect = function(value) { + var token = this.nextToken(); + if (token.type !== 7 || token.value !== value) this.throwUnexpectedToken(token); + }; + Parser.prototype.expectCommaSeparator = function() { + if (this.config.tolerant) { + var token = this.lookahead; + if (token.type === 7 && token.value === ",") this.nextToken(); + else if (token.type === 7 && token.value === ";") { + this.nextToken(); + this.tolerateUnexpectedToken(token); + } else this.tolerateUnexpectedToken(token, messages_1.Messages.UnexpectedToken); + } else this.expect(","); + }; + Parser.prototype.expectKeyword = function(keyword) { + var token = this.nextToken(); + if (token.type !== 4 || token.value !== keyword) this.throwUnexpectedToken(token); + }; + Parser.prototype.match = function(value) { + return this.lookahead.type === 7 && this.lookahead.value === value; + }; + Parser.prototype.matchKeyword = function(keyword) { + return this.lookahead.type === 4 && this.lookahead.value === keyword; + }; + Parser.prototype.matchContextualKeyword = function(keyword) { + return this.lookahead.type === 3 && this.lookahead.value === keyword; + }; + Parser.prototype.matchAssign = function() { + if (this.lookahead.type !== 7) return false; + var op = this.lookahead.value; + return op === "=" || op === "*=" || op === "**=" || op === "/=" || op === "%=" || op === "+=" || op === "-=" || op === "<<=" || op === ">>=" || op === ">>>=" || op === "&=" || op === "^=" || op === "|="; + }; + Parser.prototype.isolateCoverGrammar = function(parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + if (this.context.firstCoverInitializedNameError !== null) this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); + this.context.isBindingElement = previousIsBindingElement; + this.context.isAssignmentTarget = previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; + return result; + }; + Parser.prototype.inheritCoverGrammar = function(parseFunction) { + var previousIsBindingElement = this.context.isBindingElement; + var previousIsAssignmentTarget = this.context.isAssignmentTarget; + var previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; + this.context.isBindingElement = true; + this.context.isAssignmentTarget = true; + this.context.firstCoverInitializedNameError = null; + var result = parseFunction.call(this); + this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; + this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; + this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; + return result; + }; + Parser.prototype.consumeSemicolon = function() { + if (this.match(";")) this.nextToken(); + else if (!this.hasLineTerminator) { + if (this.lookahead.type !== 2 && !this.match("}")) this.throwUnexpectedToken(this.lookahead); + this.lastMarker.index = this.startMarker.index; + this.lastMarker.line = this.startMarker.line; + this.lastMarker.column = this.startMarker.column; + } + }; + Parser.prototype.parsePrimaryExpression = function() { + var node = this.createNode(); + var expr; + var token, raw; + switch (this.lookahead.type) { + case 3: + if ((this.context.isModule || this.context.await) && this.lookahead.value === "await") this.tolerateUnexpectedToken(this.lookahead); + expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); + break; + case 6: + case 8: + if (this.context.strict && this.lookahead.octal) this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.StrictOctalLiteral); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 1: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(token.value === "true", raw)); + break; + case 5: + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + token = this.nextToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.Literal(null, raw)); + break; + case 10: + expr = this.parseTemplateLiteral(); + break; + case 7: + switch (this.lookahead.value) { + case "(": + this.context.isBindingElement = false; + expr = this.inheritCoverGrammar(this.parseGroupExpression); + break; + case "[": + expr = this.inheritCoverGrammar(this.parseArrayInitializer); + break; + case "{": + expr = this.inheritCoverGrammar(this.parseObjectInitializer); + break; + case "/": + case "/=": + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.scanner.index = this.startMarker.index; + token = this.nextRegexToken(); + raw = this.getTokenRaw(token); + expr = this.finalize(node, new Node.RegexLiteral(token.regex, raw, token.pattern, token.flags)); + break; + default: expr = this.throwUnexpectedToken(this.nextToken()); + } + break; + case 4: + if (!this.context.strict && this.context.allowYield && this.matchKeyword("yield")) expr = this.parseIdentifierName(); + else if (!this.context.strict && this.matchKeyword("let")) expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); + else { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + if (this.matchKeyword("function")) expr = this.parseFunctionExpression(); + else if (this.matchKeyword("this")) { + this.nextToken(); + expr = this.finalize(node, new Node.ThisExpression()); + } else if (this.matchKeyword("class")) expr = this.parseClassExpression(); + else expr = this.throwUnexpectedToken(this.nextToken()); + } + break; + default: expr = this.throwUnexpectedToken(this.nextToken()); + } + return expr; + }; + Parser.prototype.parseSpreadElement = function() { + var node = this.createNode(); + this.expect("..."); + var arg = this.inheritCoverGrammar(this.parseAssignmentExpression); + return this.finalize(node, new Node.SpreadElement(arg)); + }; + Parser.prototype.parseArrayInitializer = function() { + var node = this.createNode(); + var elements = []; + this.expect("["); + while (!this.match("]")) if (this.match(",")) { + this.nextToken(); + elements.push(null); + } else if (this.match("...")) { + var element = this.parseSpreadElement(); + if (!this.match("]")) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + this.expect(","); + } + elements.push(element); + } else { + elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + if (!this.match("]")) this.expect(","); + } + this.expect("]"); + return this.finalize(node, new Node.ArrayExpression(elements)); + }; + Parser.prototype.parsePropertyMethod = function(params) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = params.simple; + var body = this.isolateCoverGrammar(this.parseFunctionSourceElements); + if (this.context.strict && params.firstRestricted) this.tolerateUnexpectedToken(params.firstRestricted, params.message); + if (this.context.strict && params.stricted) this.tolerateUnexpectedToken(params.stricted, params.message); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + return body; + }; + Parser.prototype.parsePropertyMethodFunction = function() { + var isGenerator = false; + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + Parser.prototype.parsePropertyMethodAsyncFunction = function() { + var node = this.createNode(); + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = false; + this.context.await = true; + var params = this.parseFormalParameters(); + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); + }; + Parser.prototype.parseObjectPropertyKey = function() { + var node = this.createNode(); + var token = this.nextToken(); + var key; + switch (token.type) { + case 8: + case 6: + if (this.context.strict && token.octal) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictOctalLiteral); + var raw = this.getTokenRaw(token); + key = this.finalize(node, new Node.Literal(token.value, raw)); + break; + case 3: + case 1: + case 5: + case 4: + key = this.finalize(node, new Node.Identifier(token.value)); + break; + case 7: + if (token.value === "[") { + key = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.expect("]"); + } else key = this.throwUnexpectedToken(token); + break; + default: key = this.throwUnexpectedToken(token); + } + return key; + }; + Parser.prototype.isPropertyKey = function(key, value) { + return key.type === syntax_1.Syntax.Identifier && key.name === value || key.type === syntax_1.Syntax.Literal && key.value === value; + }; + Parser.prototype.parseObjectProperty = function(hasProto) { + var node = this.createNode(); + var token = this.lookahead; + var kind; + var key = null; + var value = null; + var computed = false; + var method = false; + var shorthand = false; + var isAsync = false; + if (token.type === 3) { + var id = token.value; + this.nextToken(); + computed = this.match("["); + isAsync = !this.hasLineTerminator && id === "async" && !this.match(":") && !this.match("(") && !this.match("*") && !this.match(","); + key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); + } else if (this.match("*")) this.nextToken(); + else { + computed = this.match("["); + key = this.parseObjectPropertyKey(); + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3 && !isAsync && token.value === "get" && lookaheadPropertyKey) { + kind = "get"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } else if (token.type === 3 && !isAsync && token.value === "set" && lookaheadPropertyKey) { + kind = "set"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } else if (token.type === 7 && token.value === "*" && lookaheadPropertyKey) { + kind = "init"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } else { + if (!key) this.throwUnexpectedToken(this.lookahead); + kind = "init"; + if (this.match(":") && !isAsync) { + if (!computed && this.isPropertyKey(key, "__proto__")) { + if (hasProto.value) this.tolerateError(messages_1.Messages.DuplicateProtoProperty); + hasProto.value = true; + } + this.nextToken(); + value = this.inheritCoverGrammar(this.parseAssignmentExpression); + } else if (this.match("(")) { + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } else if (token.type === 3) { + var id = this.finalize(node, new Node.Identifier(token.value)); + if (this.match("=")) { + this.context.firstCoverInitializedNameError = this.lookahead; + this.nextToken(); + shorthand = true; + var init = this.isolateCoverGrammar(this.parseAssignmentExpression); + value = this.finalize(node, new Node.AssignmentPattern(id, init)); + } else { + shorthand = true; + value = id; + } + } else this.throwUnexpectedToken(this.nextToken()); + } + return this.finalize(node, new Node.Property(kind, key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectInitializer = function() { + var node = this.createNode(); + this.expect("{"); + var properties = []; + var hasProto = { value: false }; + while (!this.match("}")) { + properties.push(this.parseObjectProperty(hasProto)); + if (!this.match("}")) this.expectCommaSeparator(); + } + this.expect("}"); + return this.finalize(node, new Node.ObjectExpression(properties)); + }; + Parser.prototype.parseTemplateHead = function() { + assert_1.assert(this.lookahead.head, "Template literal must start with a template head"); + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ + raw, + cooked + }, token.tail)); + }; + Parser.prototype.parseTemplateElement = function() { + if (this.lookahead.type !== 10) this.throwUnexpectedToken(); + var node = this.createNode(); + var token = this.nextToken(); + var raw = token.value; + var cooked = token.cooked; + return this.finalize(node, new Node.TemplateElement({ + raw, + cooked + }, token.tail)); + }; + Parser.prototype.parseTemplateLiteral = function() { + var node = this.createNode(); + var expressions = []; + var quasis = []; + var quasi = this.parseTemplateHead(); + quasis.push(quasi); + while (!quasi.tail) { + expressions.push(this.parseExpression()); + quasi = this.parseTemplateElement(); + quasis.push(quasi); + } + return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); + }; + Parser.prototype.reinterpretExpressionAsPattern = function(expr) { + switch (expr.type) { + case syntax_1.Syntax.Identifier: + case syntax_1.Syntax.MemberExpression: + case syntax_1.Syntax.RestElement: + case syntax_1.Syntax.AssignmentPattern: break; + case syntax_1.Syntax.SpreadElement: + expr.type = syntax_1.Syntax.RestElement; + this.reinterpretExpressionAsPattern(expr.argument); + break; + case syntax_1.Syntax.ArrayExpression: + expr.type = syntax_1.Syntax.ArrayPattern; + for (var i = 0; i < expr.elements.length; i++) if (expr.elements[i] !== null) this.reinterpretExpressionAsPattern(expr.elements[i]); + break; + case syntax_1.Syntax.ObjectExpression: + expr.type = syntax_1.Syntax.ObjectPattern; + for (var i = 0; i < expr.properties.length; i++) this.reinterpretExpressionAsPattern(expr.properties[i].value); + break; + case syntax_1.Syntax.AssignmentExpression: + expr.type = syntax_1.Syntax.AssignmentPattern; + delete expr.operator; + this.reinterpretExpressionAsPattern(expr.left); + break; + default: break; + } + }; + Parser.prototype.parseGroupExpression = function() { + var expr; + this.expect("("); + if (this.match(")")) { + this.nextToken(); + if (!this.match("=>")) this.expect("=>"); + expr = { + type: ArrowParameterPlaceHolder, + params: [], + async: false + }; + } else { + var startToken = this.lookahead; + var params = []; + if (this.match("...")) { + expr = this.parseRestElement(params); + this.expect(")"); + if (!this.match("=>")) this.expect("=>"); + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } else { + var arrow = false; + this.context.isBindingElement = true; + expr = this.inheritCoverGrammar(this.parseAssignmentExpression); + if (this.match(",")) { + var expressions = []; + this.context.isAssignmentTarget = false; + expressions.push(expr); + while (this.lookahead.type !== 2) { + if (!this.match(",")) break; + this.nextToken(); + if (this.match(")")) { + this.nextToken(); + for (var i = 0; i < expressions.length; i++) this.reinterpretExpressionAsPattern(expressions[i]); + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } else if (this.match("...")) { + if (!this.context.isBindingElement) this.throwUnexpectedToken(this.lookahead); + expressions.push(this.parseRestElement(params)); + this.expect(")"); + if (!this.match("=>")) this.expect("=>"); + this.context.isBindingElement = false; + for (var i = 0; i < expressions.length; i++) this.reinterpretExpressionAsPattern(expressions[i]); + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: expressions, + async: false + }; + } else expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); + if (arrow) break; + } + if (!arrow) expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + if (!arrow) { + this.expect(")"); + if (this.match("=>")) { + if (expr.type === syntax_1.Syntax.Identifier && expr.name === "yield") { + arrow = true; + expr = { + type: ArrowParameterPlaceHolder, + params: [expr], + async: false + }; + } + if (!arrow) { + if (!this.context.isBindingElement) this.throwUnexpectedToken(this.lookahead); + if (expr.type === syntax_1.Syntax.SequenceExpression) for (var i = 0; i < expr.expressions.length; i++) this.reinterpretExpressionAsPattern(expr.expressions[i]); + else this.reinterpretExpressionAsPattern(expr); + expr = { + type: ArrowParameterPlaceHolder, + params: expr.type === syntax_1.Syntax.SequenceExpression ? expr.expressions : [expr], + async: false + }; + } + } + this.context.isBindingElement = false; + } + } + } + return expr; + }; + Parser.prototype.parseArguments = function() { + this.expect("("); + var args = []; + if (!this.match(")")) while (true) { + var expr = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAssignmentExpression); + args.push(expr); + if (this.match(")")) break; + this.expectCommaSeparator(); + if (this.match(")")) break; + } + this.expect(")"); + return args; + }; + Parser.prototype.isIdentifierName = function(token) { + return token.type === 3 || token.type === 4 || token.type === 1 || token.type === 5; + }; + Parser.prototype.parseIdentifierName = function() { + var node = this.createNode(); + var token = this.nextToken(); + if (!this.isIdentifierName(token)) this.throwUnexpectedToken(token); + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseNewExpression = function() { + var node = this.createNode(); + var id = this.parseIdentifierName(); + assert_1.assert(id.name === "new", "New expression must start with `new`"); + var expr; + if (this.match(".")) { + this.nextToken(); + if (this.lookahead.type === 3 && this.context.inFunctionBody && this.lookahead.value === "target") { + var property = this.parseIdentifierName(); + expr = new Node.MetaProperty(id, property); + } else this.throwUnexpectedToken(this.lookahead); + } else { + var callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); + var args = this.match("(") ? this.parseArguments() : []; + expr = new Node.NewExpression(callee, args); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return this.finalize(node, expr); + }; + Parser.prototype.parseAsyncArgument = function() { + var arg = this.parseAssignmentExpression(); + this.context.firstCoverInitializedNameError = null; + return arg; + }; + Parser.prototype.parseAsyncArguments = function() { + this.expect("("); + var args = []; + if (!this.match(")")) while (true) { + var expr = this.match("...") ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAsyncArgument); + args.push(expr); + if (this.match(")")) break; + this.expectCommaSeparator(); + if (this.match(")")) break; + } + this.expect(")"); + return args; + }; + Parser.prototype.parseLeftHandSideExpressionAllowCall = function() { + var startToken = this.lookahead; + var maybeAsync = this.matchContextualKeyword("async"); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var expr; + if (this.matchKeyword("super") && this.context.inFunctionBody) { + expr = this.createNode(); + this.nextToken(); + expr = this.finalize(expr, new Node.Super()); + if (!this.match("(") && !this.match(".") && !this.match("[")) this.throwUnexpectedToken(this.lookahead); + } else expr = this.inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression); + while (true) if (this.match(".")) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect("."); + var property = this.parseIdentifierName(); + expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); + } else if (this.match("(")) { + var asyncArrow = maybeAsync && startToken.lineNumber === this.lookahead.lineNumber; + this.context.isBindingElement = false; + this.context.isAssignmentTarget = false; + var args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); + expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); + if (asyncArrow && this.match("=>")) { + for (var i = 0; i < args.length; ++i) this.reinterpretExpressionAsPattern(args[i]); + expr = { + type: ArrowParameterPlaceHolder, + params: args, + async: true + }; + } + } else if (this.match("[")) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect("["); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect("]"); + expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); + } else if (this.lookahead.type === 10 && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); + } else break; + this.context.allowIn = previousAllowIn; + return expr; + }; + Parser.prototype.parseSuper = function() { + var node = this.createNode(); + this.expectKeyword("super"); + if (!this.match("[") && !this.match(".")) this.throwUnexpectedToken(this.lookahead); + return this.finalize(node, new Node.Super()); + }; + Parser.prototype.parseLeftHandSideExpression = function() { + assert_1.assert(this.context.allowIn, "callee of new expression always allow in keyword."); + var node = this.startNode(this.lookahead); + var expr = this.matchKeyword("super") && this.context.inFunctionBody ? this.parseSuper() : this.inheritCoverGrammar(this.matchKeyword("new") ? this.parseNewExpression : this.parsePrimaryExpression); + while (true) if (this.match("[")) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect("["); + var property = this.isolateCoverGrammar(this.parseExpression); + this.expect("]"); + expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); + } else if (this.match(".")) { + this.context.isBindingElement = false; + this.context.isAssignmentTarget = true; + this.expect("."); + var property = this.parseIdentifierName(); + expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); + } else if (this.lookahead.type === 10 && this.lookahead.head) { + var quasi = this.parseTemplateLiteral(); + expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); + } else break; + return expr; + }; + Parser.prototype.parseUpdateExpression = function() { + var expr; + var startToken = this.lookahead; + if (this.match("++") || this.match("--")) { + var node = this.startNode(startToken); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) this.tolerateError(messages_1.Messages.StrictLHSPrefix); + if (!this.context.isAssignmentTarget) this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + var prefix = true; + expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } else { + expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + if (!this.hasLineTerminator && this.lookahead.type === 7) { + if (this.match("++") || this.match("--")) { + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) this.tolerateError(messages_1.Messages.StrictLHSPostfix); + if (!this.context.isAssignmentTarget) this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var operator = this.nextToken().value; + var prefix = false; + expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); + } + } + } + return expr; + }; + Parser.prototype.parseAwaitExpression = function() { + var node = this.createNode(); + this.nextToken(); + var argument = this.parseUnaryExpression(); + return this.finalize(node, new Node.AwaitExpression(argument)); + }; + Parser.prototype.parseUnaryExpression = function() { + var expr; + if (this.match("+") || this.match("-") || this.match("~") || this.match("!") || this.matchKeyword("delete") || this.matchKeyword("void") || this.matchKeyword("typeof")) { + var node = this.startNode(this.lookahead); + var token = this.nextToken(); + expr = this.inheritCoverGrammar(this.parseUnaryExpression); + expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); + if (this.context.strict && expr.operator === "delete" && expr.argument.type === syntax_1.Syntax.Identifier) this.tolerateError(messages_1.Messages.StrictDelete); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } else if (this.context.await && this.matchContextualKeyword("await")) expr = this.parseAwaitExpression(); + else expr = this.parseUpdateExpression(); + return expr; + }; + Parser.prototype.parseExponentiationExpression = function() { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseUnaryExpression); + if (expr.type !== syntax_1.Syntax.UnaryExpression && this.match("**")) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression("**", left, right)); + } + return expr; + }; + Parser.prototype.binaryPrecedence = function(token) { + var op = token.value; + var precedence; + if (token.type === 7) precedence = this.operatorPrecedence[op] || 0; + else if (token.type === 4) precedence = op === "instanceof" || this.context.allowIn && op === "in" ? 7 : 0; + else precedence = 0; + return precedence; + }; + Parser.prototype.parseBinaryExpression = function() { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseExponentiationExpression); + var token = this.lookahead; + var prec = this.binaryPrecedence(token); + if (prec > 0) { + this.nextToken(); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var markers = [startToken, this.lookahead]; + var left = expr; + var right = this.isolateCoverGrammar(this.parseExponentiationExpression); + var stack = [ + left, + token.value, + right + ]; + var precedences = [prec]; + while (true) { + prec = this.binaryPrecedence(this.lookahead); + if (prec <= 0) break; + while (stack.length > 2 && prec <= precedences[precedences.length - 1]) { + right = stack.pop(); + var operator = stack.pop(); + precedences.pop(); + left = stack.pop(); + markers.pop(); + var node = this.startNode(markers[markers.length - 1]); + stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); + } + stack.push(this.nextToken().value); + precedences.push(prec); + markers.push(this.lookahead); + stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); + } + var i = stack.length - 1; + expr = stack[i]; + var lastMarker = markers.pop(); + while (i > 1) { + var marker = markers.pop(); + var lastLineStart = lastMarker && lastMarker.lineStart; + var node = this.startNode(marker, lastLineStart); + var operator = stack[i - 1]; + expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); + i -= 2; + lastMarker = marker; + } + } + return expr; + }; + Parser.prototype.parseConditionalExpression = function() { + var startToken = this.lookahead; + var expr = this.inheritCoverGrammar(this.parseBinaryExpression); + if (this.match("?")) { + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + var consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + this.expect(":"); + var alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } + return expr; + }; + Parser.prototype.checkPatternParam = function(options, param) { + switch (param.type) { + case syntax_1.Syntax.Identifier: + this.validateParam(options, param, param.name); + break; + case syntax_1.Syntax.RestElement: + this.checkPatternParam(options, param.argument); + break; + case syntax_1.Syntax.AssignmentPattern: + this.checkPatternParam(options, param.left); + break; + case syntax_1.Syntax.ArrayPattern: + for (var i = 0; i < param.elements.length; i++) if (param.elements[i] !== null) this.checkPatternParam(options, param.elements[i]); + break; + case syntax_1.Syntax.ObjectPattern: + for (var i = 0; i < param.properties.length; i++) this.checkPatternParam(options, param.properties[i].value); + break; + default: break; + } + options.simple = options.simple && param instanceof Node.Identifier; + }; + Parser.prototype.reinterpretAsCoverFormalsList = function(expr) { + var params = [expr]; + var options; + var asyncArrow = false; + switch (expr.type) { + case syntax_1.Syntax.Identifier: break; + case ArrowParameterPlaceHolder: + params = expr.params; + asyncArrow = expr.async; + break; + default: return null; + } + options = { + simple: true, + paramSet: {} + }; + for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.AssignmentPattern) { + if (param.right.type === syntax_1.Syntax.YieldExpression) { + if (param.right.argument) this.throwUnexpectedToken(this.lookahead); + param.right.type = syntax_1.Syntax.Identifier; + param.right.name = "yield"; + delete param.right.argument; + delete param.right.delegate; + } + } else if (asyncArrow && param.type === syntax_1.Syntax.Identifier && param.name === "await") this.throwUnexpectedToken(this.lookahead); + this.checkPatternParam(options, param); + params[i] = param; + } + if (this.context.strict || !this.context.allowYield) for (var i = 0; i < params.length; ++i) { + var param = params[i]; + if (param.type === syntax_1.Syntax.YieldExpression) this.throwUnexpectedToken(this.lookahead); + } + if (options.message === messages_1.Messages.StrictParamDupe) { + var token = this.context.strict ? options.stricted : options.firstRestricted; + this.throwUnexpectedToken(token, options.message); + } + return { + simple: options.simple, + params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.parseAssignmentExpression = function() { + var expr; + if (!this.context.allowYield && this.matchKeyword("yield")) expr = this.parseYieldExpression(); + else { + var startToken = this.lookahead; + var token = startToken; + expr = this.parseConditionalExpression(); + if (token.type === 3 && token.lineNumber === this.lookahead.lineNumber && token.value === "async") { + if (this.lookahead.type === 3 || this.matchKeyword("yield")) { + var arg = this.parsePrimaryExpression(); + this.reinterpretExpressionAsPattern(arg); + expr = { + type: ArrowParameterPlaceHolder, + params: [arg], + async: true + }; + } + } + if (expr.type === ArrowParameterPlaceHolder || this.match("=>")) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + var isAsync = expr.async; + var list = this.reinterpretAsCoverFormalsList(expr); + if (list) { + if (this.hasLineTerminator) this.tolerateUnexpectedToken(this.lookahead); + this.context.firstCoverInitializedNameError = null; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = list.simple; + var previousAllowYield = this.context.allowYield; + var previousAwait = this.context.await; + this.context.allowYield = true; + this.context.await = isAsync; + var node = this.startNode(startToken); + this.expect("=>"); + var body = void 0; + if (this.match("{")) { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = true; + body = this.parseFunctionSourceElements(); + this.context.allowIn = previousAllowIn; + } else body = this.isolateCoverGrammar(this.parseAssignmentExpression); + var expression = body.type !== syntax_1.Syntax.BlockStatement; + if (this.context.strict && list.firstRestricted) this.throwUnexpectedToken(list.firstRestricted, list.message); + if (this.context.strict && list.stricted) this.tolerateUnexpectedToken(list.stricted, list.message); + expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.allowYield = previousAllowYield; + this.context.await = previousAwait; + } + } else if (this.matchAssign()) { + if (!this.context.isAssignmentTarget) this.tolerateError(messages_1.Messages.InvalidLHSInAssignment); + if (this.context.strict && expr.type === syntax_1.Syntax.Identifier) { + var id = expr; + if (this.scanner.isRestrictedWord(id.name)) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictLHSAssignment); + if (this.scanner.isStrictModeReservedWord(id.name)) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + } + if (!this.match("=")) { + this.context.isAssignmentTarget = false; + this.context.isBindingElement = false; + } else this.reinterpretExpressionAsPattern(expr); + token = this.nextToken(); + var operator = token.value; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); + this.context.firstCoverInitializedNameError = null; + } + } + return expr; + }; + Parser.prototype.parseExpression = function() { + var startToken = this.lookahead; + var expr = this.isolateCoverGrammar(this.parseAssignmentExpression); + if (this.match(",")) { + var expressions = []; + expressions.push(expr); + while (this.lookahead.type !== 2) { + if (!this.match(",")) break; + this.nextToken(); + expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); + } + return expr; + }; + Parser.prototype.parseStatementListItem = function() { + var statement; + this.context.isAssignmentTarget = true; + this.context.isBindingElement = true; + if (this.lookahead.type === 4) switch (this.lookahead.value) { + case "export": + if (!this.context.isModule) this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalExportDeclaration); + statement = this.parseExportDeclaration(); + break; + case "import": + if (!this.context.isModule) this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.IllegalImportDeclaration); + statement = this.parseImportDeclaration(); + break; + case "const": + statement = this.parseLexicalDeclaration({ inFor: false }); + break; + case "function": + statement = this.parseFunctionDeclaration(); + break; + case "class": + statement = this.parseClassDeclaration(); + break; + case "let": + statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); + break; + default: + statement = this.parseStatement(); + break; + } + else statement = this.parseStatement(); + return statement; + }; + Parser.prototype.parseBlock = function() { + var node = this.createNode(); + this.expect("{"); + var block = []; + while (true) { + if (this.match("}")) break; + block.push(this.parseStatementListItem()); + } + this.expect("}"); + return this.finalize(node, new Node.BlockStatement(block)); + }; + Parser.prototype.parseLexicalBinding = function(kind, options) { + var node = this.createNode(); + var id = this.parsePattern([], kind); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) this.tolerateError(messages_1.Messages.StrictVarName); + } + var init = null; + if (kind === "const") { + if (!this.matchKeyword("in") && !this.matchContextualKeyword("of")) if (this.match("=")) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } else this.throwError(messages_1.Messages.DeclarationMissingInitializer, "const"); + } else if (!options.inFor && id.type !== syntax_1.Syntax.Identifier || this.match("=")) { + this.expect("="); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseBindingList = function(kind, options) { + var list = [this.parseLexicalBinding(kind, options)]; + while (this.match(",")) { + this.nextToken(); + list.push(this.parseLexicalBinding(kind, options)); + } + return list; + }; + Parser.prototype.isLexicalDeclaration = function() { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + return next.type === 3 || next.type === 7 && next.value === "[" || next.type === 7 && next.value === "{" || next.type === 4 && next.value === "let" || next.type === 4 && next.value === "yield"; + }; + Parser.prototype.parseLexicalDeclaration = function(options) { + var node = this.createNode(); + var kind = this.nextToken().value; + assert_1.assert(kind === "let" || kind === "const", "Lexical declaration must be either let or const"); + var declarations = this.parseBindingList(kind, options); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); + }; + Parser.prototype.parseBindingRestElement = function(params, kind) { + var node = this.createNode(); + this.expect("..."); + var arg = this.parsePattern(params, kind); + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseArrayPattern = function(params, kind) { + var node = this.createNode(); + this.expect("["); + var elements = []; + while (!this.match("]")) if (this.match(",")) { + this.nextToken(); + elements.push(null); + } else { + if (this.match("...")) { + elements.push(this.parseBindingRestElement(params, kind)); + break; + } else elements.push(this.parsePatternWithDefault(params, kind)); + if (!this.match("]")) this.expect(","); + } + this.expect("]"); + return this.finalize(node, new Node.ArrayPattern(elements)); + }; + Parser.prototype.parsePropertyPattern = function(params, kind) { + var node = this.createNode(); + var computed = false; + var shorthand = false; + var method = false; + var key; + var value; + if (this.lookahead.type === 3) { + var keyToken = this.lookahead; + key = this.parseVariableIdentifier(); + var init = this.finalize(node, new Node.Identifier(keyToken.value)); + if (this.match("=")) { + params.push(keyToken); + shorthand = true; + this.nextToken(); + var expr = this.parseAssignmentExpression(); + value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); + } else if (!this.match(":")) { + params.push(keyToken); + shorthand = true; + value = init; + } else { + this.expect(":"); + value = this.parsePatternWithDefault(params, kind); + } + } else { + computed = this.match("["); + key = this.parseObjectPropertyKey(); + this.expect(":"); + value = this.parsePatternWithDefault(params, kind); + } + return this.finalize(node, new Node.Property("init", key, computed, value, method, shorthand)); + }; + Parser.prototype.parseObjectPattern = function(params, kind) { + var node = this.createNode(); + var properties = []; + this.expect("{"); + while (!this.match("}")) { + properties.push(this.parsePropertyPattern(params, kind)); + if (!this.match("}")) this.expect(","); + } + this.expect("}"); + return this.finalize(node, new Node.ObjectPattern(properties)); + }; + Parser.prototype.parsePattern = function(params, kind) { + var pattern; + if (this.match("[")) pattern = this.parseArrayPattern(params, kind); + else if (this.match("{")) pattern = this.parseObjectPattern(params, kind); + else { + if (this.matchKeyword("let") && (kind === "const" || kind === "let")) this.tolerateUnexpectedToken(this.lookahead, messages_1.Messages.LetInLexicalBinding); + params.push(this.lookahead); + pattern = this.parseVariableIdentifier(kind); + } + return pattern; + }; + Parser.prototype.parsePatternWithDefault = function(params, kind) { + var startToken = this.lookahead; + var pattern = this.parsePattern(params, kind); + if (this.match("=")) { + this.nextToken(); + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var right = this.isolateCoverGrammar(this.parseAssignmentExpression); + this.context.allowYield = previousAllowYield; + pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); + } + return pattern; + }; + Parser.prototype.parseVariableIdentifier = function(kind) { + var node = this.createNode(); + var token = this.nextToken(); + if (token.type === 4 && token.value === "yield") { + if (this.context.strict) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + else if (!this.context.allowYield) this.throwUnexpectedToken(token); + } else if (token.type !== 3) { + if (this.context.strict && token.type === 4 && this.scanner.isStrictModeReservedWord(token.value)) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictReservedWord); + else if (this.context.strict || token.value !== "let" || kind !== "var") this.throwUnexpectedToken(token); + } else if ((this.context.isModule || this.context.await) && token.type === 3 && token.value === "await") this.tolerateUnexpectedToken(token); + return this.finalize(node, new Node.Identifier(token.value)); + }; + Parser.prototype.parseVariableDeclaration = function(options) { + var node = this.createNode(); + var id = this.parsePattern([], "var"); + if (this.context.strict && id.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(id.name)) this.tolerateError(messages_1.Messages.StrictVarName); + } + var init = null; + if (this.match("=")) { + this.nextToken(); + init = this.isolateCoverGrammar(this.parseAssignmentExpression); + } else if (id.type !== syntax_1.Syntax.Identifier && !options.inFor) this.expect("="); + return this.finalize(node, new Node.VariableDeclarator(id, init)); + }; + Parser.prototype.parseVariableDeclarationList = function(options) { + var opt = { inFor: options.inFor }; + var list = []; + list.push(this.parseVariableDeclaration(opt)); + while (this.match(",")) { + this.nextToken(); + list.push(this.parseVariableDeclaration(opt)); + } + return list; + }; + Parser.prototype.parseVariableStatement = function() { + var node = this.createNode(); + this.expectKeyword("var"); + var declarations = this.parseVariableDeclarationList({ inFor: false }); + this.consumeSemicolon(); + return this.finalize(node, new Node.VariableDeclaration(declarations, "var")); + }; + Parser.prototype.parseEmptyStatement = function() { + var node = this.createNode(); + this.expect(";"); + return this.finalize(node, new Node.EmptyStatement()); + }; + Parser.prototype.parseExpressionStatement = function() { + var node = this.createNode(); + var expr = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ExpressionStatement(expr)); + }; + Parser.prototype.parseIfClause = function() { + if (this.context.strict && this.matchKeyword("function")) this.tolerateError(messages_1.Messages.StrictFunction); + return this.parseStatement(); + }; + Parser.prototype.parseIfStatement = function() { + var node = this.createNode(); + var consequent; + var alternate = null; + this.expectKeyword("if"); + this.expect("("); + var test = this.parseExpression(); + if (!this.match(")") && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); + } else { + this.expect(")"); + consequent = this.parseIfClause(); + if (this.matchKeyword("else")) { + this.nextToken(); + alternate = this.parseIfClause(); + } + } + return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); + }; + Parser.prototype.parseDoWhileStatement = function() { + var node = this.createNode(); + this.expectKeyword("do"); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + var body = this.parseStatement(); + this.context.inIteration = previousInIteration; + this.expectKeyword("while"); + this.expect("("); + var test = this.parseExpression(); + if (!this.match(")") && this.config.tolerant) this.tolerateUnexpectedToken(this.nextToken()); + else { + this.expect(")"); + if (this.match(";")) this.nextToken(); + } + return this.finalize(node, new Node.DoWhileStatement(body, test)); + }; + Parser.prototype.parseWhileStatement = function() { + var node = this.createNode(); + var body; + this.expectKeyword("while"); + this.expect("("); + var test = this.parseExpression(); + if (!this.match(")") && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } else { + this.expect(")"); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.parseStatement(); + this.context.inIteration = previousInIteration; + } + return this.finalize(node, new Node.WhileStatement(test, body)); + }; + Parser.prototype.parseForStatement = function() { + var init = null; + var test = null; + var update = null; + var forIn = true; + var left, right; + var node = this.createNode(); + this.expectKeyword("for"); + this.expect("("); + if (this.match(";")) this.nextToken(); + else if (this.matchKeyword("var")) { + init = this.createNode(); + this.nextToken(); + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseVariableDeclarationList({ inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && this.matchKeyword("in")) { + var decl = declarations[0]; + if (decl.init && (decl.id.type === syntax_1.Syntax.ArrayPattern || decl.id.type === syntax_1.Syntax.ObjectPattern || this.context.strict)) this.tolerateError(messages_1.Messages.ForInOfLoopInitializer, "for-in"); + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } else { + init = this.finalize(init, new Node.VariableDeclaration(declarations, "var")); + this.expect(";"); + } + } else if (this.matchKeyword("const") || this.matchKeyword("let")) { + init = this.createNode(); + var kind = this.nextToken().value; + if (!this.context.strict && this.lookahead.value === "in") { + init = this.finalize(init, new Node.Identifier(kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } else { + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + var declarations = this.parseBindingList(kind, { inFor: true }); + this.context.allowIn = previousAllowIn; + if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword("in")) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseExpression(); + init = null; + } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword("of")) { + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + this.nextToken(); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } else { + this.consumeSemicolon(); + init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); + } + } + } else { + var initStartToken = this.lookahead; + var previousAllowIn = this.context.allowIn; + this.context.allowIn = false; + init = this.inheritCoverGrammar(this.parseAssignmentExpression); + this.context.allowIn = previousAllowIn; + if (this.matchKeyword("in")) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) this.tolerateError(messages_1.Messages.InvalidLHSInForIn); + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseExpression(); + init = null; + } else if (this.matchContextualKeyword("of")) { + if (!this.context.isAssignmentTarget || init.type === syntax_1.Syntax.AssignmentExpression) this.tolerateError(messages_1.Messages.InvalidLHSInForLoop); + this.nextToken(); + this.reinterpretExpressionAsPattern(init); + left = init; + right = this.parseAssignmentExpression(); + init = null; + forIn = false; + } else { + if (this.match(",")) { + var initSeq = [init]; + while (this.match(",")) { + this.nextToken(); + initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); + } + init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); + } + this.expect(";"); + } + } + if (typeof left === "undefined") { + if (!this.match(";")) test = this.parseExpression(); + this.expect(";"); + if (!this.match(")")) update = this.parseExpression(); + } + var body; + if (!this.match(")") && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } else { + this.expect(")"); + var previousInIteration = this.context.inIteration; + this.context.inIteration = true; + body = this.isolateCoverGrammar(this.parseStatement); + this.context.inIteration = previousInIteration; + } + return typeof left === "undefined" ? this.finalize(node, new Node.ForStatement(init, test, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body)); + }; + Parser.prototype.parseContinueStatement = function() { + var node = this.createNode(); + this.expectKeyword("continue"); + var label = null; + if (this.lookahead.type === 3 && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + label = id; + var key = "$" + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) this.throwError(messages_1.Messages.UnknownLabel, id.name); + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration) this.throwError(messages_1.Messages.IllegalContinue); + return this.finalize(node, new Node.ContinueStatement(label)); + }; + Parser.prototype.parseBreakStatement = function() { + var node = this.createNode(); + this.expectKeyword("break"); + var label = null; + if (this.lookahead.type === 3 && !this.hasLineTerminator) { + var id = this.parseVariableIdentifier(); + var key = "$" + id.name; + if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) this.throwError(messages_1.Messages.UnknownLabel, id.name); + label = id; + } + this.consumeSemicolon(); + if (label === null && !this.context.inIteration && !this.context.inSwitch) this.throwError(messages_1.Messages.IllegalBreak); + return this.finalize(node, new Node.BreakStatement(label)); + }; + Parser.prototype.parseReturnStatement = function() { + if (!this.context.inFunctionBody) this.tolerateError(messages_1.Messages.IllegalReturn); + var node = this.createNode(); + this.expectKeyword("return"); + var argument = !this.match(";") && !this.match("}") && !this.hasLineTerminator && this.lookahead.type !== 2 || this.lookahead.type === 8 || this.lookahead.type === 10 ? this.parseExpression() : null; + this.consumeSemicolon(); + return this.finalize(node, new Node.ReturnStatement(argument)); + }; + Parser.prototype.parseWithStatement = function() { + if (this.context.strict) this.tolerateError(messages_1.Messages.StrictModeWith); + var node = this.createNode(); + var body; + this.expectKeyword("with"); + this.expect("("); + var object = this.parseExpression(); + if (!this.match(")") && this.config.tolerant) { + this.tolerateUnexpectedToken(this.nextToken()); + body = this.finalize(this.createNode(), new Node.EmptyStatement()); + } else { + this.expect(")"); + body = this.parseStatement(); + } + return this.finalize(node, new Node.WithStatement(object, body)); + }; + Parser.prototype.parseSwitchCase = function() { + var node = this.createNode(); + var test; + if (this.matchKeyword("default")) { + this.nextToken(); + test = null; + } else { + this.expectKeyword("case"); + test = this.parseExpression(); + } + this.expect(":"); + var consequent = []; + while (true) { + if (this.match("}") || this.matchKeyword("default") || this.matchKeyword("case")) break; + consequent.push(this.parseStatementListItem()); + } + return this.finalize(node, new Node.SwitchCase(test, consequent)); + }; + Parser.prototype.parseSwitchStatement = function() { + var node = this.createNode(); + this.expectKeyword("switch"); + this.expect("("); + var discriminant = this.parseExpression(); + this.expect(")"); + var previousInSwitch = this.context.inSwitch; + this.context.inSwitch = true; + var cases = []; + var defaultFound = false; + this.expect("{"); + while (true) { + if (this.match("}")) break; + var clause = this.parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) this.throwError(messages_1.Messages.MultipleDefaultsInSwitch); + defaultFound = true; + } + cases.push(clause); + } + this.expect("}"); + this.context.inSwitch = previousInSwitch; + return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); + }; + Parser.prototype.parseLabelledStatement = function() { + var node = this.createNode(); + var expr = this.parseExpression(); + var statement; + if (expr.type === syntax_1.Syntax.Identifier && this.match(":")) { + this.nextToken(); + var id = expr; + var key = "$" + id.name; + if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) this.throwError(messages_1.Messages.Redeclaration, "Label", id.name); + this.context.labelSet[key] = true; + var body = void 0; + if (this.matchKeyword("class")) { + this.tolerateUnexpectedToken(this.lookahead); + body = this.parseClassDeclaration(); + } else if (this.matchKeyword("function")) { + var token = this.lookahead; + var declaration = this.parseFunctionDeclaration(); + if (this.context.strict) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunction); + else if (declaration.generator) this.tolerateUnexpectedToken(token, messages_1.Messages.GeneratorInLegacyContext); + body = declaration; + } else body = this.parseStatement(); + delete this.context.labelSet[key]; + statement = new Node.LabeledStatement(id, body); + } else { + this.consumeSemicolon(); + statement = new Node.ExpressionStatement(expr); + } + return this.finalize(node, statement); + }; + Parser.prototype.parseThrowStatement = function() { + var node = this.createNode(); + this.expectKeyword("throw"); + if (this.hasLineTerminator) this.throwError(messages_1.Messages.NewlineAfterThrow); + var argument = this.parseExpression(); + this.consumeSemicolon(); + return this.finalize(node, new Node.ThrowStatement(argument)); + }; + Parser.prototype.parseCatchClause = function() { + var node = this.createNode(); + this.expectKeyword("catch"); + this.expect("("); + if (this.match(")")) this.throwUnexpectedToken(this.lookahead); + var params = []; + var param = this.parsePattern(params); + var paramMap = {}; + for (var i = 0; i < params.length; i++) { + var key = "$" + params[i].value; + if (Object.prototype.hasOwnProperty.call(paramMap, key)) this.tolerateError(messages_1.Messages.DuplicateBinding, params[i].value); + paramMap[key] = true; + } + if (this.context.strict && param.type === syntax_1.Syntax.Identifier) { + if (this.scanner.isRestrictedWord(param.name)) this.tolerateError(messages_1.Messages.StrictCatchVariable); + } + this.expect(")"); + var body = this.parseBlock(); + return this.finalize(node, new Node.CatchClause(param, body)); + }; + Parser.prototype.parseFinallyClause = function() { + this.expectKeyword("finally"); + return this.parseBlock(); + }; + Parser.prototype.parseTryStatement = function() { + var node = this.createNode(); + this.expectKeyword("try"); + var block = this.parseBlock(); + var handler = this.matchKeyword("catch") ? this.parseCatchClause() : null; + var finalizer = this.matchKeyword("finally") ? this.parseFinallyClause() : null; + if (!handler && !finalizer) this.throwError(messages_1.Messages.NoCatchOrFinally); + return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); + }; + Parser.prototype.parseDebuggerStatement = function() { + var node = this.createNode(); + this.expectKeyword("debugger"); + this.consumeSemicolon(); + return this.finalize(node, new Node.DebuggerStatement()); + }; + Parser.prototype.parseStatement = function() { + var statement; + switch (this.lookahead.type) { + case 1: + case 5: + case 6: + case 8: + case 10: + case 9: + statement = this.parseExpressionStatement(); + break; + case 7: + var value = this.lookahead.value; + if (value === "{") statement = this.parseBlock(); + else if (value === "(") statement = this.parseExpressionStatement(); + else if (value === ";") statement = this.parseEmptyStatement(); + else statement = this.parseExpressionStatement(); + break; + case 3: + statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); + break; + case 4: + switch (this.lookahead.value) { + case "break": + statement = this.parseBreakStatement(); + break; + case "continue": + statement = this.parseContinueStatement(); + break; + case "debugger": + statement = this.parseDebuggerStatement(); + break; + case "do": + statement = this.parseDoWhileStatement(); + break; + case "for": + statement = this.parseForStatement(); + break; + case "function": + statement = this.parseFunctionDeclaration(); + break; + case "if": + statement = this.parseIfStatement(); + break; + case "return": + statement = this.parseReturnStatement(); + break; + case "switch": + statement = this.parseSwitchStatement(); + break; + case "throw": + statement = this.parseThrowStatement(); + break; + case "try": + statement = this.parseTryStatement(); + break; + case "var": + statement = this.parseVariableStatement(); + break; + case "while": + statement = this.parseWhileStatement(); + break; + case "with": + statement = this.parseWithStatement(); + break; + default: + statement = this.parseExpressionStatement(); + break; + } + break; + default: statement = this.throwUnexpectedToken(this.lookahead); + } + return statement; + }; + Parser.prototype.parseFunctionSourceElements = function() { + var node = this.createNode(); + this.expect("{"); + var body = this.parseDirectivePrologues(); + var previousLabelSet = this.context.labelSet; + var previousInIteration = this.context.inIteration; + var previousInSwitch = this.context.inSwitch; + var previousInFunctionBody = this.context.inFunctionBody; + this.context.labelSet = {}; + this.context.inIteration = false; + this.context.inSwitch = false; + this.context.inFunctionBody = true; + while (this.lookahead.type !== 2) { + if (this.match("}")) break; + body.push(this.parseStatementListItem()); + } + this.expect("}"); + this.context.labelSet = previousLabelSet; + this.context.inIteration = previousInIteration; + this.context.inSwitch = previousInSwitch; + this.context.inFunctionBody = previousInFunctionBody; + return this.finalize(node, new Node.BlockStatement(body)); + }; + Parser.prototype.validateParam = function(options, param, name) { + var key = "$" + name; + if (this.context.strict) { + if (this.scanner.isRestrictedWord(name)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (this.scanner.isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictParamName; + } else if (this.scanner.isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = messages_1.Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = messages_1.Messages.StrictParamDupe; + } + } + /* istanbul ignore next */ + if (typeof Object.defineProperty === "function") Object.defineProperty(options.paramSet, key, { + value: true, + enumerable: true, + writable: true, + configurable: true + }); + else options.paramSet[key] = true; + }; + Parser.prototype.parseRestElement = function(params) { + var node = this.createNode(); + this.expect("..."); + var arg = this.parsePattern(params); + if (this.match("=")) this.throwError(messages_1.Messages.DefaultRestParameter); + if (!this.match(")")) this.throwError(messages_1.Messages.ParameterAfterRestParameter); + return this.finalize(node, new Node.RestElement(arg)); + }; + Parser.prototype.parseFormalParameter = function(options) { + var params = []; + var param = this.match("...") ? this.parseRestElement(params) : this.parsePatternWithDefault(params); + for (var i = 0; i < params.length; i++) this.validateParam(options, params[i], params[i].value); + options.simple = options.simple && param instanceof Node.Identifier; + options.params.push(param); + }; + Parser.prototype.parseFormalParameters = function(firstRestricted) { + var options = { + simple: true, + params: [], + firstRestricted + }; + this.expect("("); + if (!this.match(")")) { + options.paramSet = {}; + while (this.lookahead.type !== 2) { + this.parseFormalParameter(options); + if (this.match(")")) break; + this.expect(","); + if (this.match(")")) break; + } + } + this.expect(")"); + return { + simple: options.simple, + params: options.params, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + }; + Parser.prototype.matchAsyncFunction = function() { + var match = this.matchContextualKeyword("async"); + if (match) { + var state = this.scanner.saveState(); + this.scanner.scanComments(); + var next = this.scanner.lex(); + this.scanner.restoreState(state); + match = state.lineNumber === next.lineNumber && next.type === 4 && next.value === "function"; + } + return match; + }; + Parser.prototype.parseFunctionDeclaration = function(identifierIsOptional) { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword("async"); + if (isAsync) this.nextToken(); + this.expectKeyword("function"); + var isGenerator = isAsync ? false : this.match("*"); + if (isGenerator) this.nextToken(); + var message; + var id = null; + var firstRestricted = null; + if (!identifierIsOptional || !this.match("(")) { + var token = this.lookahead; + id = this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } else if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) message = formalParameters.message; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) this.throwUnexpectedToken(firstRestricted, message); + if (this.context.strict && stricted) this.tolerateUnexpectedToken(stricted, message); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); + }; + Parser.prototype.parseFunctionExpression = function() { + var node = this.createNode(); + var isAsync = this.matchContextualKeyword("async"); + if (isAsync) this.nextToken(); + this.expectKeyword("function"); + var isGenerator = isAsync ? false : this.match("*"); + if (isGenerator) this.nextToken(); + var message; + var id = null; + var firstRestricted; + var previousAllowAwait = this.context.await; + var previousAllowYield = this.context.allowYield; + this.context.await = isAsync; + this.context.allowYield = !isGenerator; + if (!this.match("(")) { + var token = this.lookahead; + id = !this.context.strict && !isGenerator && this.matchKeyword("yield") ? this.parseIdentifierName() : this.parseVariableIdentifier(); + if (this.context.strict) { + if (this.scanner.isRestrictedWord(token.value)) this.tolerateUnexpectedToken(token, messages_1.Messages.StrictFunctionName); + } else if (this.scanner.isRestrictedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictFunctionName; + } else if (this.scanner.isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = messages_1.Messages.StrictReservedWord; + } + } + var formalParameters = this.parseFormalParameters(firstRestricted); + var params = formalParameters.params; + var stricted = formalParameters.stricted; + firstRestricted = formalParameters.firstRestricted; + if (formalParameters.message) message = formalParameters.message; + var previousStrict = this.context.strict; + var previousAllowStrictDirective = this.context.allowStrictDirective; + this.context.allowStrictDirective = formalParameters.simple; + var body = this.parseFunctionSourceElements(); + if (this.context.strict && firstRestricted) this.throwUnexpectedToken(firstRestricted, message); + if (this.context.strict && stricted) this.tolerateUnexpectedToken(stricted, message); + this.context.strict = previousStrict; + this.context.allowStrictDirective = previousAllowStrictDirective; + this.context.await = previousAllowAwait; + this.context.allowYield = previousAllowYield; + return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); + }; + Parser.prototype.parseDirective = function() { + var token = this.lookahead; + var node = this.createNode(); + var expr = this.parseExpression(); + var directive = expr.type === syntax_1.Syntax.Literal ? this.getTokenRaw(token).slice(1, -1) : null; + this.consumeSemicolon(); + return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); + }; + Parser.prototype.parseDirectivePrologues = function() { + var firstRestricted = null; + var body = []; + while (true) { + var token = this.lookahead; + if (token.type !== 8) break; + var statement = this.parseDirective(); + body.push(statement); + var directive = statement.directive; + if (typeof directive !== "string") break; + if (directive === "use strict") { + this.context.strict = true; + if (firstRestricted) this.tolerateUnexpectedToken(firstRestricted, messages_1.Messages.StrictOctalLiteral); + if (!this.context.allowStrictDirective) this.tolerateUnexpectedToken(token, messages_1.Messages.IllegalLanguageModeDirective); + } else if (!firstRestricted && token.octal) firstRestricted = token; + } + return body; + }; + Parser.prototype.qualifiedPropertyName = function(token) { + switch (token.type) { + case 3: + case 8: + case 1: + case 5: + case 6: + case 4: return true; + case 7: return token.value === "["; + default: break; + } + return false; + }; + Parser.prototype.parseGetterMethod = function() { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length > 0) this.tolerateError(messages_1.Messages.BadGetterArity); + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseSetterMethod = function() { + var node = this.createNode(); + var isGenerator = false; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = !isGenerator; + var formalParameters = this.parseFormalParameters(); + if (formalParameters.params.length !== 1) this.tolerateError(messages_1.Messages.BadSetterArity); + else if (formalParameters.params[0] instanceof Node.RestElement) this.tolerateError(messages_1.Messages.BadSetterRestParameter); + var method = this.parsePropertyMethod(formalParameters); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); + }; + Parser.prototype.parseGeneratorMethod = function() { + var node = this.createNode(); + var isGenerator = true; + var previousAllowYield = this.context.allowYield; + this.context.allowYield = true; + var params = this.parseFormalParameters(); + this.context.allowYield = false; + var method = this.parsePropertyMethod(params); + this.context.allowYield = previousAllowYield; + return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); + }; + Parser.prototype.isStartOfExpression = function() { + var start = true; + var value = this.lookahead.value; + switch (this.lookahead.type) { + case 7: + start = value === "[" || value === "(" || value === "{" || value === "+" || value === "-" || value === "!" || value === "~" || value === "++" || value === "--" || value === "/" || value === "/="; + break; + case 4: + start = value === "class" || value === "delete" || value === "function" || value === "let" || value === "new" || value === "super" || value === "this" || value === "typeof" || value === "void" || value === "yield"; + break; + default: break; + } + return start; + }; + Parser.prototype.parseYieldExpression = function() { + var node = this.createNode(); + this.expectKeyword("yield"); + var argument = null; + var delegate = false; + if (!this.hasLineTerminator) { + var previousAllowYield = this.context.allowYield; + this.context.allowYield = false; + delegate = this.match("*"); + if (delegate) { + this.nextToken(); + argument = this.parseAssignmentExpression(); + } else if (this.isStartOfExpression()) argument = this.parseAssignmentExpression(); + this.context.allowYield = previousAllowYield; + } + return this.finalize(node, new Node.YieldExpression(argument, delegate)); + }; + Parser.prototype.parseClassElement = function(hasConstructor) { + var token = this.lookahead; + var node = this.createNode(); + var kind = ""; + var key = null; + var value = null; + var computed = false; + var method = false; + var isStatic = false; + var isAsync = false; + if (this.match("*")) this.nextToken(); + else { + computed = this.match("["); + key = this.parseObjectPropertyKey(); + if (key.name === "static" && (this.qualifiedPropertyName(this.lookahead) || this.match("*"))) { + token = this.lookahead; + isStatic = true; + computed = this.match("["); + if (this.match("*")) this.nextToken(); + else key = this.parseObjectPropertyKey(); + } + if (token.type === 3 && !this.hasLineTerminator && token.value === "async") { + var punctuator = this.lookahead.value; + if (punctuator !== ":" && punctuator !== "(" && punctuator !== "*") { + isAsync = true; + token = this.lookahead; + key = this.parseObjectPropertyKey(); + if (token.type === 3 && token.value === "constructor") this.tolerateUnexpectedToken(token, messages_1.Messages.ConstructorIsAsync); + } + } + } + var lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); + if (token.type === 3) { + if (token.value === "get" && lookaheadPropertyKey) { + kind = "get"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + this.context.allowYield = false; + value = this.parseGetterMethod(); + } else if (token.value === "set" && lookaheadPropertyKey) { + kind = "set"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + value = this.parseSetterMethod(); + } + } else if (token.type === 7 && token.value === "*" && lookaheadPropertyKey) { + kind = "init"; + computed = this.match("["); + key = this.parseObjectPropertyKey(); + value = this.parseGeneratorMethod(); + method = true; + } + if (!kind && key && this.match("(")) { + kind = "init"; + value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); + method = true; + } + if (!kind) this.throwUnexpectedToken(this.lookahead); + if (kind === "init") kind = "method"; + if (!computed) { + if (isStatic && this.isPropertyKey(key, "prototype")) this.throwUnexpectedToken(token, messages_1.Messages.StaticPrototype); + if (!isStatic && this.isPropertyKey(key, "constructor")) { + if (kind !== "method" || !method || value && value.generator) this.throwUnexpectedToken(token, messages_1.Messages.ConstructorSpecialMethod); + if (hasConstructor.value) this.throwUnexpectedToken(token, messages_1.Messages.DuplicateConstructor); + else hasConstructor.value = true; + kind = "constructor"; + } + } + return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); + }; + Parser.prototype.parseClassElementList = function() { + var body = []; + var hasConstructor = { value: false }; + this.expect("{"); + while (!this.match("}")) if (this.match(";")) this.nextToken(); + else body.push(this.parseClassElement(hasConstructor)); + this.expect("}"); + return body; + }; + Parser.prototype.parseClassBody = function() { + var node = this.createNode(); + var elementList = this.parseClassElementList(); + return this.finalize(node, new Node.ClassBody(elementList)); + }; + Parser.prototype.parseClassDeclaration = function(identifierIsOptional) { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword("class"); + var id = identifierIsOptional && this.lookahead.type !== 3 ? null : this.parseVariableIdentifier(); + var superClass = null; + if (this.matchKeyword("extends")) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); + }; + Parser.prototype.parseClassExpression = function() { + var node = this.createNode(); + var previousStrict = this.context.strict; + this.context.strict = true; + this.expectKeyword("class"); + var id = this.lookahead.type === 3 ? this.parseVariableIdentifier() : null; + var superClass = null; + if (this.matchKeyword("extends")) { + this.nextToken(); + superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); + } + var classBody = this.parseClassBody(); + this.context.strict = previousStrict; + return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); + }; + Parser.prototype.parseModule = function() { + this.context.strict = true; + this.context.isModule = true; + this.scanner.isModule = true; + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2) body.push(this.parseStatementListItem()); + return this.finalize(node, new Node.Module(body)); + }; + Parser.prototype.parseScript = function() { + var node = this.createNode(); + var body = this.parseDirectivePrologues(); + while (this.lookahead.type !== 2) body.push(this.parseStatementListItem()); + return this.finalize(node, new Node.Script(body)); + }; + Parser.prototype.parseModuleSpecifier = function() { + var node = this.createNode(); + if (this.lookahead.type !== 8) this.throwError(messages_1.Messages.InvalidModuleSpecifier); + var token = this.nextToken(); + var raw = this.getTokenRaw(token); + return this.finalize(node, new Node.Literal(token.value, raw)); + }; + Parser.prototype.parseImportSpecifier = function() { + var node = this.createNode(); + var imported; + var local; + if (this.lookahead.type === 3) { + imported = this.parseVariableIdentifier(); + local = imported; + if (this.matchContextualKeyword("as")) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } + } else { + imported = this.parseIdentifierName(); + local = imported; + if (this.matchContextualKeyword("as")) { + this.nextToken(); + local = this.parseVariableIdentifier(); + } else this.throwUnexpectedToken(this.nextToken()); + } + return this.finalize(node, new Node.ImportSpecifier(local, imported)); + }; + Parser.prototype.parseNamedImports = function() { + this.expect("{"); + var specifiers = []; + while (!this.match("}")) { + specifiers.push(this.parseImportSpecifier()); + if (!this.match("}")) this.expect(","); + } + this.expect("}"); + return specifiers; + }; + Parser.prototype.parseImportDefaultSpecifier = function() { + var node = this.createNode(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportDefaultSpecifier(local)); + }; + Parser.prototype.parseImportNamespaceSpecifier = function() { + var node = this.createNode(); + this.expect("*"); + if (!this.matchContextualKeyword("as")) this.throwError(messages_1.Messages.NoAsAfterImportNamespace); + this.nextToken(); + var local = this.parseIdentifierName(); + return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); + }; + Parser.prototype.parseImportDeclaration = function() { + if (this.context.inFunctionBody) this.throwError(messages_1.Messages.IllegalImportDeclaration); + var node = this.createNode(); + this.expectKeyword("import"); + var src; + var specifiers = []; + if (this.lookahead.type === 8) src = this.parseModuleSpecifier(); + else { + if (this.match("{")) specifiers = specifiers.concat(this.parseNamedImports()); + else if (this.match("*")) specifiers.push(this.parseImportNamespaceSpecifier()); + else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword("default")) { + specifiers.push(this.parseImportDefaultSpecifier()); + if (this.match(",")) { + this.nextToken(); + if (this.match("*")) specifiers.push(this.parseImportNamespaceSpecifier()); + else if (this.match("{")) specifiers = specifiers.concat(this.parseNamedImports()); + else this.throwUnexpectedToken(this.lookahead); + } + } else this.throwUnexpectedToken(this.nextToken()); + if (!this.matchContextualKeyword("from")) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + src = this.parseModuleSpecifier(); + } + this.consumeSemicolon(); + return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); + }; + Parser.prototype.parseExportSpecifier = function() { + var node = this.createNode(); + var local = this.parseIdentifierName(); + var exported = local; + if (this.matchContextualKeyword("as")) { + this.nextToken(); + exported = this.parseIdentifierName(); + } + return this.finalize(node, new Node.ExportSpecifier(local, exported)); + }; + Parser.prototype.parseExportDeclaration = function() { + if (this.context.inFunctionBody) this.throwError(messages_1.Messages.IllegalExportDeclaration); + var node = this.createNode(); + this.expectKeyword("export"); + var exportDeclaration; + if (this.matchKeyword("default")) { + this.nextToken(); + if (this.matchKeyword("function")) { + var declaration = this.parseFunctionDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } else if (this.matchKeyword("class")) { + var declaration = this.parseClassDeclaration(true); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } else if (this.matchContextualKeyword("async")) { + var declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } else { + if (this.matchContextualKeyword("from")) this.throwError(messages_1.Messages.UnexpectedToken, this.lookahead.value); + var declaration = this.match("{") ? this.parseObjectInitializer() : this.match("[") ? this.parseArrayInitializer() : this.parseAssignmentExpression(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); + } + } else if (this.match("*")) { + this.nextToken(); + if (!this.matchContextualKeyword("from")) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } + this.nextToken(); + var src = this.parseModuleSpecifier(); + this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); + } else if (this.lookahead.type === 4) { + var declaration = void 0; + switch (this.lookahead.value) { + case "let": + case "const": + declaration = this.parseLexicalDeclaration({ inFor: false }); + break; + case "var": + case "class": + case "function": + declaration = this.parseStatementListItem(); + break; + default: this.throwUnexpectedToken(this.lookahead); + } + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } else if (this.matchAsyncFunction()) { + var declaration = this.parseFunctionDeclaration(); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); + } else { + var specifiers = []; + var source = null; + var isExportFromIdentifier = false; + this.expect("{"); + while (!this.match("}")) { + isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword("default"); + specifiers.push(this.parseExportSpecifier()); + if (!this.match("}")) this.expect(","); + } + this.expect("}"); + if (this.matchContextualKeyword("from")) { + this.nextToken(); + source = this.parseModuleSpecifier(); + this.consumeSemicolon(); + } else if (isExportFromIdentifier) { + var message = this.lookahead.value ? messages_1.Messages.UnexpectedToken : messages_1.Messages.MissingFromClause; + this.throwError(message, this.lookahead.value); + } else this.consumeSemicolon(); + exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); + } + return exportDeclaration; + }; + return Parser; + }(); + }, + function(module$11, exports$10) { + "use strict"; + Object.defineProperty(exports$10, "__esModule", { value: true }); + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) throw new Error("ASSERT: " + message); + } + exports$10.assert = assert; + }, + function(module$12, exports$11) { + "use strict"; + Object.defineProperty(exports$11, "__esModule", { value: true }); + exports$11.ErrorHandler = function() { + function ErrorHandler() { + this.errors = []; + this.tolerant = false; + } + ErrorHandler.prototype.recordError = function(error) { + this.errors.push(error); + }; + ErrorHandler.prototype.tolerate = function(error) { + if (this.tolerant) this.recordError(error); + else throw error; + }; + ErrorHandler.prototype.constructError = function(msg, column) { + var error = new Error(msg); + try { + throw error; + } catch (base) { + /* istanbul ignore else */ + if (Object.create && Object.defineProperty) { + error = Object.create(base); + Object.defineProperty(error, "column", { value: column }); + } + } + /* istanbul ignore next */ + return error; + }; + ErrorHandler.prototype.createError = function(index, line, col, description) { + var msg = "Line " + line + ": " + description; + var error = this.constructError(msg, col); + error.index = index; + error.lineNumber = line; + error.description = description; + return error; + }; + ErrorHandler.prototype.throwError = function(index, line, col, description) { + throw this.createError(index, line, col, description); + }; + ErrorHandler.prototype.tolerateError = function(index, line, col, description) { + var error = this.createError(index, line, col, description); + if (this.tolerant) this.recordError(error); + else throw error; + }; + return ErrorHandler; + }(); + }, + function(module$13, exports$12) { + "use strict"; + Object.defineProperty(exports$12, "__esModule", { value: true }); + exports$12.Messages = { + BadGetterArity: "Getter must not have any formal parameters", + BadSetterArity: "Setter must have exactly one formal parameter", + BadSetterRestParameter: "Setter function argument must not be a rest parameter", + ConstructorIsAsync: "Class constructor may not be an async method", + ConstructorSpecialMethod: "Class constructor may not be an accessor", + DeclarationMissingInitializer: "Missing initializer in %0 declaration", + DefaultRestParameter: "Unexpected token =", + DuplicateBinding: "Duplicate binding %0", + DuplicateConstructor: "A class may only have one constructor", + DuplicateProtoProperty: "Duplicate __proto__ fields are not allowed in object literals", + ForInOfLoopInitializer: "%0 loop variable declaration may not have an initializer", + GeneratorInLegacyContext: "Generator declarations are not allowed in legacy contexts", + IllegalBreak: "Illegal break statement", + IllegalContinue: "Illegal continue statement", + IllegalExportDeclaration: "Unexpected token", + IllegalImportDeclaration: "Unexpected token", + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list", + IllegalReturn: "Illegal return statement", + InvalidEscapedReservedWord: "Keyword must not contain escaped characters", + InvalidHexEscapeSequence: "Invalid hexadecimal escape sequence", + InvalidLHSInAssignment: "Invalid left-hand side in assignment", + InvalidLHSInForIn: "Invalid left-hand side in for-in", + InvalidLHSInForLoop: "Invalid left-hand side in for-loop", + InvalidModuleSpecifier: "Unexpected token", + InvalidRegExp: "Invalid regular expression", + LetInLexicalBinding: "let is disallowed as a lexically bound name", + MissingFromClause: "Unexpected token", + MultipleDefaultsInSwitch: "More than one default clause in switch statement", + NewlineAfterThrow: "Illegal newline after throw", + NoAsAfterImportNamespace: "Unexpected token", + NoCatchOrFinally: "Missing catch or finally after try", + ParameterAfterRestParameter: "Rest parameter must be last formal parameter", + Redeclaration: "%0 '%1' has already been declared", + StaticPrototype: "Classes may not have static property named prototype", + StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode", + StrictDelete: "Delete of an unqualified identifier in strict mode.", + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block", + StrictFunctionName: "Function name may not be eval or arguments in strict mode", + StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode", + StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode", + StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode", + StrictModeWith: "Strict mode code may not include a with statement", + StrictOctalLiteral: "Octal literals are not allowed in strict mode.", + StrictParamDupe: "Strict mode function may not have duplicate parameter names", + StrictParamName: "Parameter name eval or arguments is not allowed in strict mode", + StrictReservedWord: "Use of future reserved word in strict mode", + StrictVarName: "Variable name may not be eval or arguments in strict mode", + TemplateOctalLiteral: "Octal literals are not allowed in template strings.", + UnexpectedEOS: "Unexpected end of input", + UnexpectedIdentifier: "Unexpected identifier", + UnexpectedNumber: "Unexpected number", + UnexpectedReserved: "Unexpected reserved word", + UnexpectedString: "Unexpected string", + UnexpectedTemplate: "Unexpected quasi %0", + UnexpectedToken: "Unexpected token %0", + UnexpectedTokenIllegal: "Unexpected token ILLEGAL", + UnknownLabel: "Undefined label '%0'", + UnterminatedRegExp: "Invalid regular expression: missing /" + }; + }, + function(module$14, exports$13, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$13, "__esModule", { value: true }); + var assert_1 = __webpack_require__(9); + var character_1 = __webpack_require__(4); + var messages_1 = __webpack_require__(11); + function hexValue(ch) { + return "0123456789abcdef".indexOf(ch.toLowerCase()); + } + function octalValue(ch) { + return "01234567".indexOf(ch); + } + exports$13.Scanner = function() { + function Scanner(code, handler) { + this.source = code; + this.errorHandler = handler; + this.trackComment = false; + this.isModule = false; + this.length = code.length; + this.index = 0; + this.lineNumber = code.length > 0 ? 1 : 0; + this.lineStart = 0; + this.curlyStack = []; + } + Scanner.prototype.saveState = function() { + return { + index: this.index, + lineNumber: this.lineNumber, + lineStart: this.lineStart + }; + }; + Scanner.prototype.restoreState = function(state) { + this.index = state.index; + this.lineNumber = state.lineNumber; + this.lineStart = state.lineStart; + }; + Scanner.prototype.eof = function() { + return this.index >= this.length; + }; + Scanner.prototype.throwUnexpectedToken = function(message) { + if (message === void 0) message = messages_1.Messages.UnexpectedTokenIllegal; + return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + Scanner.prototype.tolerateUnexpectedToken = function(message) { + if (message === void 0) message = messages_1.Messages.UnexpectedTokenIllegal; + this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); + }; + Scanner.prototype.skipSingleLineComment = function(offset) { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - offset; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - offset + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + ++this.index; + if (character_1.Character.isLineTerminator(ch)) { + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart - 1 + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index - 1], + range: [start, this.index - 1], + loc + }; + comments.push(entry); + } + if (ch === 13 && this.source.charCodeAt(this.index) === 10) ++this.index; + ++this.lineNumber; + this.lineStart = this.index; + return comments; + } + } + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: false, + slice: [start + offset, this.index], + range: [start, this.index], + loc + }; + comments.push(entry); + } + return comments; + }; + Scanner.prototype.skipMultiLineComment = function() { + var comments = []; + var start, loc; + if (this.trackComment) { + comments = []; + start = this.index - 2; + loc = { + start: { + line: this.lineNumber, + column: this.index - this.lineStart - 2 + }, + end: {} + }; + } + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isLineTerminator(ch)) { + if (ch === 13 && this.source.charCodeAt(this.index + 1) === 10) ++this.index; + ++this.lineNumber; + ++this.index; + this.lineStart = this.index; + } else if (ch === 42) { + if (this.source.charCodeAt(this.index + 1) === 47) { + this.index += 2; + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index - 2], + range: [start, this.index], + loc + }; + comments.push(entry); + } + return comments; + } + ++this.index; + } else ++this.index; + } + if (this.trackComment) { + loc.end = { + line: this.lineNumber, + column: this.index - this.lineStart + }; + var entry = { + multiLine: true, + slice: [start + 2, this.index], + range: [start, this.index], + loc + }; + comments.push(entry); + } + this.tolerateUnexpectedToken(); + return comments; + }; + Scanner.prototype.scanComments = function() { + var comments; + if (this.trackComment) comments = []; + var start = this.index === 0; + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (character_1.Character.isWhiteSpace(ch)) ++this.index; + else if (character_1.Character.isLineTerminator(ch)) { + ++this.index; + if (ch === 13 && this.source.charCodeAt(this.index) === 10) ++this.index; + ++this.lineNumber; + this.lineStart = this.index; + start = true; + } else if (ch === 47) { + ch = this.source.charCodeAt(this.index + 1); + if (ch === 47) { + this.index += 2; + var comment = this.skipSingleLineComment(2); + if (this.trackComment) comments = comments.concat(comment); + start = true; + } else if (ch === 42) { + this.index += 2; + var comment = this.skipMultiLineComment(); + if (this.trackComment) comments = comments.concat(comment); + } else break; + } else if (start && ch === 45) if (this.source.charCodeAt(this.index + 1) === 45 && this.source.charCodeAt(this.index + 2) === 62) { + this.index += 3; + var comment = this.skipSingleLineComment(3); + if (this.trackComment) comments = comments.concat(comment); + } else break; + else if (ch === 60 && !this.isModule) if (this.source.slice(this.index + 1, this.index + 4) === "!--") { + this.index += 4; + var comment = this.skipSingleLineComment(4); + if (this.trackComment) comments = comments.concat(comment); + } else break; + else break; + } + return comments; + }; + Scanner.prototype.isFutureReservedWord = function(id) { + switch (id) { + case "enum": + case "export": + case "import": + case "super": return true; + default: return false; + } + }; + Scanner.prototype.isStrictModeReservedWord = function(id) { + switch (id) { + case "implements": + case "interface": + case "package": + case "private": + case "protected": + case "public": + case "static": + case "yield": + case "let": return true; + default: return false; + } + }; + Scanner.prototype.isRestrictedWord = function(id) { + return id === "eval" || id === "arguments"; + }; + Scanner.prototype.isKeyword = function(id) { + switch (id.length) { + case 2: return id === "if" || id === "in" || id === "do"; + case 3: return id === "var" || id === "for" || id === "new" || id === "try" || id === "let"; + case 4: return id === "this" || id === "else" || id === "case" || id === "void" || id === "with" || id === "enum"; + case 5: return id === "while" || id === "break" || id === "catch" || id === "throw" || id === "const" || id === "yield" || id === "class" || id === "super"; + case 6: return id === "return" || id === "typeof" || id === "delete" || id === "switch" || id === "export" || id === "import"; + case 7: return id === "default" || id === "finally" || id === "extends"; + case 8: return id === "function" || id === "continue" || id === "debugger"; + case 10: return id === "instanceof"; + default: return false; + } + }; + Scanner.prototype.codePointAt = function(i) { + var cp = this.source.charCodeAt(i); + if (cp >= 55296 && cp <= 56319) { + var second = this.source.charCodeAt(i + 1); + if (second >= 56320 && second <= 57343) cp = (cp - 55296) * 1024 + second - 56320 + 65536; + } + return cp; + }; + Scanner.prototype.scanHexEscape = function(prefix) { + var len = prefix === "u" ? 4 : 2; + var code = 0; + for (var i = 0; i < len; ++i) if (!this.eof() && character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) code = code * 16 + hexValue(this.source[this.index++]); + else return null; + return String.fromCharCode(code); + }; + Scanner.prototype.scanUnicodeCodePointEscape = function() { + var ch = this.source[this.index]; + var code = 0; + if (ch === "}") this.throwUnexpectedToken(); + while (!this.eof()) { + ch = this.source[this.index++]; + if (!character_1.Character.isHexDigit(ch.charCodeAt(0))) break; + code = code * 16 + hexValue(ch); + } + if (code > 1114111 || ch !== "}") this.throwUnexpectedToken(); + return character_1.Character.fromCodePoint(code); + }; + Scanner.prototype.getIdentifier = function() { + var start = this.index++; + while (!this.eof()) { + var ch = this.source.charCodeAt(this.index); + if (ch === 92) { + this.index = start; + return this.getComplexIdentifier(); + } else if (ch >= 55296 && ch < 57343) { + this.index = start; + return this.getComplexIdentifier(); + } + if (character_1.Character.isIdentifierPart(ch)) ++this.index; + else break; + } + return this.source.slice(start, this.index); + }; + Scanner.prototype.getComplexIdentifier = function() { + var cp = this.codePointAt(this.index); + var id = character_1.Character.fromCodePoint(cp); + this.index += id.length; + var ch; + if (cp === 92) { + if (this.source.charCodeAt(this.index) !== 117) this.throwUnexpectedToken(); + ++this.index; + if (this.source[this.index] === "{") { + ++this.index; + ch = this.scanUnicodeCodePointEscape(); + } else { + ch = this.scanHexEscape("u"); + if (ch === null || ch === "\\" || !character_1.Character.isIdentifierStart(ch.charCodeAt(0))) this.throwUnexpectedToken(); + } + id = ch; + } + while (!this.eof()) { + cp = this.codePointAt(this.index); + if (!character_1.Character.isIdentifierPart(cp)) break; + ch = character_1.Character.fromCodePoint(cp); + id += ch; + this.index += ch.length; + if (cp === 92) { + id = id.substr(0, id.length - 1); + if (this.source.charCodeAt(this.index) !== 117) this.throwUnexpectedToken(); + ++this.index; + if (this.source[this.index] === "{") { + ++this.index; + ch = this.scanUnicodeCodePointEscape(); + } else { + ch = this.scanHexEscape("u"); + if (ch === null || ch === "\\" || !character_1.Character.isIdentifierPart(ch.charCodeAt(0))) this.throwUnexpectedToken(); + } + id += ch; + } + } + return id; + }; + Scanner.prototype.octalToDecimal = function(ch) { + var octal = ch !== "0"; + var code = octalValue(ch); + if (!this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) { + octal = true; + code = code * 8 + octalValue(this.source[this.index++]); + if ("0123".indexOf(ch) >= 0 && !this.eof() && character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) code = code * 8 + octalValue(this.source[this.index++]); + } + return { + code, + octal + }; + }; + Scanner.prototype.scanIdentifier = function() { + var type; + var start = this.index; + var id = this.source.charCodeAt(start) === 92 ? this.getComplexIdentifier() : this.getIdentifier(); + if (id.length === 1) type = 3; + else if (this.isKeyword(id)) type = 4; + else if (id === "null") type = 5; + else if (id === "true" || id === "false") type = 1; + else type = 3; + if (type !== 3 && start + id.length !== this.index) { + var restore = this.index; + this.index = start; + this.tolerateUnexpectedToken(messages_1.Messages.InvalidEscapedReservedWord); + this.index = restore; + } + return { + type, + value: id, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanPunctuator = function() { + var start = this.index; + var str = this.source[this.index]; + switch (str) { + case "(": + case "{": + if (str === "{") this.curlyStack.push("{"); + ++this.index; + break; + case ".": + ++this.index; + if (this.source[this.index] === "." && this.source[this.index + 1] === ".") { + this.index += 2; + str = "..."; + } + break; + case "}": + ++this.index; + this.curlyStack.pop(); + break; + case ")": + case ";": + case ",": + case "[": + case "]": + case ":": + case "?": + case "~": + ++this.index; + break; + default: + str = this.source.substr(this.index, 4); + if (str === ">>>=") this.index += 4; + else { + str = str.substr(0, 3); + if (str === "===" || str === "!==" || str === ">>>" || str === "<<=" || str === ">>=" || str === "**=") this.index += 3; + else { + str = str.substr(0, 2); + if (str === "&&" || str === "||" || str === "==" || str === "!=" || str === "+=" || str === "-=" || str === "*=" || str === "/=" || str === "++" || str === "--" || str === "<<" || str === ">>" || str === "&=" || str === "|=" || str === "^=" || str === "%=" || str === "<=" || str === ">=" || str === "=>" || str === "**") this.index += 2; + else { + str = this.source[this.index]; + if ("<>=!+-*%&|^/".indexOf(str) >= 0) ++this.index; + } + } + } + } + if (this.index === start) this.throwUnexpectedToken(); + return { + type: 7, + value: str, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanHexLiteral = function(start) { + var num = ""; + while (!this.eof()) { + if (!character_1.Character.isHexDigit(this.source.charCodeAt(this.index))) break; + num += this.source[this.index++]; + } + if (num.length === 0) this.throwUnexpectedToken(); + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) this.throwUnexpectedToken(); + return { + type: 6, + value: parseInt("0x" + num, 16), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanBinaryLiteral = function(start) { + var num = ""; + var ch; + while (!this.eof()) { + ch = this.source[this.index]; + if (ch !== "0" && ch !== "1") break; + num += this.source[this.index++]; + } + if (num.length === 0) this.throwUnexpectedToken(); + if (!this.eof()) { + ch = this.source.charCodeAt(this.index); + /* istanbul ignore else */ + if (character_1.Character.isIdentifierStart(ch) || character_1.Character.isDecimalDigit(ch)) this.throwUnexpectedToken(); + } + return { + type: 6, + value: parseInt(num, 2), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanOctalLiteral = function(prefix, start) { + var num = ""; + var octal = false; + if (character_1.Character.isOctalDigit(prefix.charCodeAt(0))) { + octal = true; + num = "0" + this.source[this.index++]; + } else ++this.index; + while (!this.eof()) { + if (!character_1.Character.isOctalDigit(this.source.charCodeAt(this.index))) break; + num += this.source[this.index++]; + } + if (!octal && num.length === 0) this.throwUnexpectedToken(); + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index)) || character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) this.throwUnexpectedToken(); + return { + type: 6, + value: parseInt(num, 8), + octal, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.isImplicitOctalLiteral = function() { + for (var i = this.index + 1; i < this.length; ++i) { + var ch = this.source[i]; + if (ch === "8" || ch === "9") return false; + if (!character_1.Character.isOctalDigit(ch.charCodeAt(0))) return true; + } + return true; + }; + Scanner.prototype.scanNumericLiteral = function() { + var start = this.index; + var ch = this.source[start]; + assert_1.assert(character_1.Character.isDecimalDigit(ch.charCodeAt(0)) || ch === ".", "Numeric literal must start with a decimal digit or a decimal point"); + var num = ""; + if (ch !== ".") { + num = this.source[this.index++]; + ch = this.source[this.index]; + if (num === "0") { + if (ch === "x" || ch === "X") { + ++this.index; + return this.scanHexLiteral(start); + } + if (ch === "b" || ch === "B") { + ++this.index; + return this.scanBinaryLiteral(start); + } + if (ch === "o" || ch === "O") return this.scanOctalLiteral(ch, start); + if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + if (this.isImplicitOctalLiteral()) return this.scanOctalLiteral(ch, start); + } + } + while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) num += this.source[this.index++]; + ch = this.source[this.index]; + } + if (ch === ".") { + num += this.source[this.index++]; + while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) num += this.source[this.index++]; + ch = this.source[this.index]; + } + if (ch === "e" || ch === "E") { + num += this.source[this.index++]; + ch = this.source[this.index]; + if (ch === "+" || ch === "-") num += this.source[this.index++]; + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) while (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) num += this.source[this.index++]; + else this.throwUnexpectedToken(); + } + if (character_1.Character.isIdentifierStart(this.source.charCodeAt(this.index))) this.throwUnexpectedToken(); + return { + type: 6, + value: parseFloat(num), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanStringLiteral = function() { + var start = this.index; + var quote = this.source[start]; + assert_1.assert(quote === "'" || quote === "\"", "String literal must starts with a quote"); + ++this.index; + var octal = false; + var str = ""; + while (!this.eof()) { + var ch = this.source[this.index++]; + if (ch === quote) { + quote = ""; + break; + } else if (ch === "\\") { + ch = this.source[this.index++]; + if (!ch || !character_1.Character.isLineTerminator(ch.charCodeAt(0))) switch (ch) { + case "u": + if (this.source[this.index] === "{") { + ++this.index; + str += this.scanUnicodeCodePointEscape(); + } else { + var unescaped_1 = this.scanHexEscape(ch); + if (unescaped_1 === null) this.throwUnexpectedToken(); + str += unescaped_1; + } + break; + case "x": + var unescaped = this.scanHexEscape(ch); + if (unescaped === null) this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); + str += unescaped; + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "b": + str += "\b"; + break; + case "f": + str += "\f"; + break; + case "v": + str += "\v"; + break; + case "8": + case "9": + str += ch; + this.tolerateUnexpectedToken(); + break; + default: + if (ch && character_1.Character.isOctalDigit(ch.charCodeAt(0))) { + var octToDec = this.octalToDecimal(ch); + octal = octToDec.octal || octal; + str += String.fromCharCode(octToDec.code); + } else str += ch; + break; + } + else { + ++this.lineNumber; + if (ch === "\r" && this.source[this.index] === "\n") ++this.index; + this.lineStart = this.index; + } + } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) break; + else str += ch; + } + if (quote !== "") { + this.index = start; + this.throwUnexpectedToken(); + } + return { + type: 8, + value: str, + octal, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.scanTemplate = function() { + var cooked = ""; + var terminated = false; + var start = this.index; + var head = this.source[start] === "`"; + var tail = false; + var rawOffset = 2; + ++this.index; + while (!this.eof()) { + var ch = this.source[this.index++]; + if (ch === "`") { + rawOffset = 1; + tail = true; + terminated = true; + break; + } else if (ch === "$") { + if (this.source[this.index] === "{") { + this.curlyStack.push("${"); + ++this.index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === "\\") { + ch = this.source[this.index++]; + if (!character_1.Character.isLineTerminator(ch.charCodeAt(0))) switch (ch) { + case "n": + cooked += "\n"; + break; + case "r": + cooked += "\r"; + break; + case "t": + cooked += " "; + break; + case "u": + if (this.source[this.index] === "{") { + ++this.index; + cooked += this.scanUnicodeCodePointEscape(); + } else { + var restore = this.index; + var unescaped_2 = this.scanHexEscape(ch); + if (unescaped_2 !== null) cooked += unescaped_2; + else { + this.index = restore; + cooked += ch; + } + } + break; + case "x": + var unescaped = this.scanHexEscape(ch); + if (unescaped === null) this.throwUnexpectedToken(messages_1.Messages.InvalidHexEscapeSequence); + cooked += unescaped; + break; + case "b": + cooked += "\b"; + break; + case "f": + cooked += "\f"; + break; + case "v": + cooked += "\v"; + break; + default: + if (ch === "0") { + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index))) this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); + cooked += "\0"; + } else if (character_1.Character.isOctalDigit(ch.charCodeAt(0))) this.throwUnexpectedToken(messages_1.Messages.TemplateOctalLiteral); + else cooked += ch; + break; + } + else { + ++this.lineNumber; + if (ch === "\r" && this.source[this.index] === "\n") ++this.index; + this.lineStart = this.index; + } + } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) { + ++this.lineNumber; + if (ch === "\r" && this.source[this.index] === "\n") ++this.index; + this.lineStart = this.index; + cooked += "\n"; + } else cooked += ch; + } + if (!terminated) this.throwUnexpectedToken(); + if (!head) this.curlyStack.pop(); + return { + type: 10, + value: this.source.slice(start + 1, this.index - rawOffset), + cooked, + head, + tail, + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.testRegExp = function(pattern, flags) { + var astralSubstitute = "￿"; + var tmp = pattern; + var self = this; + if (flags.indexOf("u") >= 0) tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function($0, $1, $2) { + var codePoint = parseInt($1 || $2, 16); + if (codePoint > 1114111) self.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); + if (codePoint <= 65535) return String.fromCharCode(codePoint); + return astralSubstitute; + }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, astralSubstitute); + try { + RegExp(tmp); + } catch (e) { + this.throwUnexpectedToken(messages_1.Messages.InvalidRegExp); + } + try { + return new RegExp(pattern, flags); + } catch (exception) { + /* istanbul ignore next */ + return null; + } + }; + Scanner.prototype.scanRegExpBody = function() { + var ch = this.source[this.index]; + assert_1.assert(ch === "/", "Regular expression literal must start with a slash"); + var str = this.source[this.index++]; + var classMarker = false; + var terminated = false; + while (!this.eof()) { + ch = this.source[this.index++]; + str += ch; + if (ch === "\\") { + ch = this.source[this.index++]; + if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + str += ch; + } else if (character_1.Character.isLineTerminator(ch.charCodeAt(0))) this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + else if (classMarker) { + if (ch === "]") classMarker = false; + } else if (ch === "/") { + terminated = true; + break; + } else if (ch === "[") classMarker = true; + } + if (!terminated) this.throwUnexpectedToken(messages_1.Messages.UnterminatedRegExp); + return str.substr(1, str.length - 2); + }; + Scanner.prototype.scanRegExpFlags = function() { + var str = ""; + var flags = ""; + while (!this.eof()) { + var ch = this.source[this.index]; + if (!character_1.Character.isIdentifierPart(ch.charCodeAt(0))) break; + ++this.index; + if (ch === "\\" && !this.eof()) { + ch = this.source[this.index]; + if (ch === "u") { + ++this.index; + var restore = this.index; + var char = this.scanHexEscape("u"); + if (char !== null) { + flags += char; + for (str += "\\u"; restore < this.index; ++restore) str += this.source[restore]; + } else { + this.index = restore; + flags += "u"; + str += "\\u"; + } + this.tolerateUnexpectedToken(); + } else { + str += "\\"; + this.tolerateUnexpectedToken(); + } + } else { + flags += ch; + str += ch; + } + } + return flags; + }; + Scanner.prototype.scanRegExp = function() { + var start = this.index; + var pattern = this.scanRegExpBody(); + var flags = this.scanRegExpFlags(); + return { + type: 9, + value: "", + pattern, + flags, + regex: this.testRegExp(pattern, flags), + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start, + end: this.index + }; + }; + Scanner.prototype.lex = function() { + if (this.eof()) return { + type: 2, + value: "", + lineNumber: this.lineNumber, + lineStart: this.lineStart, + start: this.index, + end: this.index + }; + var cp = this.source.charCodeAt(this.index); + if (character_1.Character.isIdentifierStart(cp)) return this.scanIdentifier(); + if (cp === 40 || cp === 41 || cp === 59) return this.scanPunctuator(); + if (cp === 39 || cp === 34) return this.scanStringLiteral(); + if (cp === 46) { + if (character_1.Character.isDecimalDigit(this.source.charCodeAt(this.index + 1))) return this.scanNumericLiteral(); + return this.scanPunctuator(); + } + if (character_1.Character.isDecimalDigit(cp)) return this.scanNumericLiteral(); + if (cp === 96 || cp === 125 && this.curlyStack[this.curlyStack.length - 1] === "${") return this.scanTemplate(); + if (cp >= 55296 && cp < 57343) { + if (character_1.Character.isIdentifierStart(this.codePointAt(this.index))) return this.scanIdentifier(); + } + return this.scanPunctuator(); + }; + return Scanner; + }(); + }, + function(module$15, exports$14) { + "use strict"; + Object.defineProperty(exports$14, "__esModule", { value: true }); + exports$14.TokenName = {}; + exports$14.TokenName[1] = "Boolean"; + exports$14.TokenName[2] = ""; + exports$14.TokenName[3] = "Identifier"; + exports$14.TokenName[4] = "Keyword"; + exports$14.TokenName[5] = "Null"; + exports$14.TokenName[6] = "Numeric"; + exports$14.TokenName[7] = "Punctuator"; + exports$14.TokenName[8] = "String"; + exports$14.TokenName[9] = "RegularExpression"; + exports$14.TokenName[10] = "Template"; + }, + function(module$16, exports$15) { + "use strict"; + Object.defineProperty(exports$15, "__esModule", { value: true }); + exports$15.XHTMLEntities = { + quot: "\"", + amp: "&", + apos: "'", + gt: ">", + nbsp: "\xA0", + iexcl: "¡", + cent: "¢", + pound: "£", + curren: "¤", + yen: "¥", + brvbar: "¦", + sect: "§", + uml: "¨", + copy: "©", + ordf: "ª", + laquo: "«", + not: "¬", + shy: "­", + reg: "®", + macr: "¯", + deg: "°", + plusmn: "±", + sup2: "²", + sup3: "³", + acute: "´", + micro: "µ", + para: "¶", + middot: "·", + cedil: "¸", + sup1: "¹", + ordm: "º", + raquo: "»", + frac14: "¼", + frac12: "½", + frac34: "¾", + iquest: "¿", + Agrave: "À", + Aacute: "Á", + Acirc: "Â", + Atilde: "Ã", + Auml: "Ä", + Aring: "Å", + AElig: "Æ", + Ccedil: "Ç", + Egrave: "È", + Eacute: "É", + Ecirc: "Ê", + Euml: "Ë", + Igrave: "Ì", + Iacute: "Í", + Icirc: "Î", + Iuml: "Ï", + ETH: "Ð", + Ntilde: "Ñ", + Ograve: "Ò", + Oacute: "Ó", + Ocirc: "Ô", + Otilde: "Õ", + Ouml: "Ö", + times: "×", + Oslash: "Ø", + Ugrave: "Ù", + Uacute: "Ú", + Ucirc: "Û", + Uuml: "Ü", + Yacute: "Ý", + THORN: "Þ", + szlig: "ß", + agrave: "à", + aacute: "á", + acirc: "â", + atilde: "ã", + auml: "ä", + aring: "å", + aelig: "æ", + ccedil: "ç", + egrave: "è", + eacute: "é", + ecirc: "ê", + euml: "ë", + igrave: "ì", + iacute: "í", + icirc: "î", + iuml: "ï", + eth: "ð", + ntilde: "ñ", + ograve: "ò", + oacute: "ó", + ocirc: "ô", + otilde: "õ", + ouml: "ö", + divide: "÷", + oslash: "ø", + ugrave: "ù", + uacute: "ú", + ucirc: "û", + uuml: "ü", + yacute: "ý", + thorn: "þ", + yuml: "ÿ", + OElig: "Œ", + oelig: "œ", + Scaron: "Š", + scaron: "š", + Yuml: "Ÿ", + fnof: "ƒ", + circ: "ˆ", + tilde: "˜", + Alpha: "Α", + Beta: "Β", + Gamma: "Γ", + Delta: "Δ", + Epsilon: "Ε", + Zeta: "Ζ", + Eta: "Η", + Theta: "Θ", + Iota: "Ι", + Kappa: "Κ", + Lambda: "Λ", + Mu: "Μ", + Nu: "Ν", + Xi: "Ξ", + Omicron: "Ο", + Pi: "Π", + Rho: "Ρ", + Sigma: "Σ", + Tau: "Τ", + Upsilon: "Υ", + Phi: "Φ", + Chi: "Χ", + Psi: "Ψ", + Omega: "Ω", + alpha: "α", + beta: "β", + gamma: "γ", + delta: "δ", + epsilon: "ε", + zeta: "ζ", + eta: "η", + theta: "θ", + iota: "ι", + kappa: "κ", + lambda: "λ", + mu: "μ", + nu: "ν", + xi: "ξ", + omicron: "ο", + pi: "π", + rho: "ρ", + sigmaf: "ς", + sigma: "σ", + tau: "τ", + upsilon: "υ", + phi: "φ", + chi: "χ", + psi: "ψ", + omega: "ω", + thetasym: "ϑ", + upsih: "ϒ", + piv: "ϖ", + ensp: " ", + emsp: " ", + thinsp: " ", + zwnj: "‌", + zwj: "‍", + lrm: "‎", + rlm: "‏", + ndash: "–", + mdash: "—", + lsquo: "‘", + rsquo: "’", + sbquo: "‚", + ldquo: "“", + rdquo: "”", + bdquo: "„", + dagger: "†", + Dagger: "‡", + bull: "•", + hellip: "…", + permil: "‰", + prime: "′", + Prime: "″", + lsaquo: "‹", + rsaquo: "›", + oline: "‾", + frasl: "⁄", + euro: "€", + image: "ℑ", + weierp: "℘", + real: "ℜ", + trade: "™", + alefsym: "ℵ", + larr: "←", + uarr: "↑", + rarr: "→", + darr: "↓", + harr: "↔", + crarr: "↵", + lArr: "⇐", + uArr: "⇑", + rArr: "⇒", + dArr: "⇓", + hArr: "⇔", + forall: "∀", + part: "∂", + exist: "∃", + empty: "∅", + nabla: "∇", + isin: "∈", + notin: "∉", + ni: "∋", + prod: "∏", + sum: "∑", + minus: "−", + lowast: "∗", + radic: "√", + prop: "∝", + infin: "∞", + ang: "∠", + and: "∧", + or: "∨", + cap: "∩", + cup: "∪", + int: "∫", + there4: "∴", + sim: "∼", + cong: "≅", + asymp: "≈", + ne: "≠", + equiv: "≡", + le: "≤", + ge: "≥", + sub: "⊂", + sup: "⊃", + nsub: "⊄", + sube: "⊆", + supe: "⊇", + oplus: "⊕", + otimes: "⊗", + perp: "⊥", + sdot: "⋅", + lceil: "⌈", + rceil: "⌉", + lfloor: "⌊", + rfloor: "⌋", + loz: "◊", + spades: "♠", + clubs: "♣", + hearts: "♥", + diams: "♦", + lang: "⟨", + rang: "⟩" + }; + }, + function(module$17, exports$16, __webpack_require__) { + "use strict"; + Object.defineProperty(exports$16, "__esModule", { value: true }); + var error_handler_1 = __webpack_require__(10); + var scanner_1 = __webpack_require__(12); + var token_1 = __webpack_require__(13); + var Reader = function() { + function Reader() { + this.values = []; + this.curly = this.paren = -1; + } + Reader.prototype.beforeFunctionExpression = function(t) { + return [ + "(", + "{", + "[", + "in", + "typeof", + "instanceof", + "new", + "return", + "case", + "delete", + "throw", + "void", + "=", + "+=", + "-=", + "*=", + "**=", + "/=", + "%=", + "<<=", + ">>=", + ">>>=", + "&=", + "|=", + "^=", + ",", + "+", + "-", + "*", + "**", + "/", + "%", + "++", + "--", + "<<", + ">>", + ">>>", + "&", + "|", + "^", + "!", + "~", + "&&", + "||", + "?", + ":", + "===", + "==", + ">=", + "<=", + "<", + ">", + "!=", + "!==" + ].indexOf(t) >= 0; + }; + Reader.prototype.isRegexStart = function() { + var previous = this.values[this.values.length - 1]; + var regex = previous !== null; + switch (previous) { + case "this": + case "]": + regex = false; + break; + case ")": + var keyword = this.values[this.paren - 1]; + regex = keyword === "if" || keyword === "while" || keyword === "for" || keyword === "with"; + break; + case "}": + regex = false; + if (this.values[this.curly - 3] === "function") { + var check = this.values[this.curly - 4]; + regex = check ? !this.beforeFunctionExpression(check) : false; + } else if (this.values[this.curly - 4] === "function") { + var check = this.values[this.curly - 5]; + regex = check ? !this.beforeFunctionExpression(check) : true; + } + break; + default: break; + } + return regex; + }; + Reader.prototype.push = function(token) { + if (token.type === 7 || token.type === 4) { + if (token.value === "{") this.curly = this.values.length; + else if (token.value === "(") this.paren = this.values.length; + this.values.push(token.value); + } else this.values.push(null); + }; + return Reader; + }(); + exports$16.Tokenizer = function() { + function Tokenizer(code, config) { + this.errorHandler = new error_handler_1.ErrorHandler(); + this.errorHandler.tolerant = config ? typeof config.tolerant === "boolean" && config.tolerant : false; + this.scanner = new scanner_1.Scanner(code, this.errorHandler); + this.scanner.trackComment = config ? typeof config.comment === "boolean" && config.comment : false; + this.trackRange = config ? typeof config.range === "boolean" && config.range : false; + this.trackLoc = config ? typeof config.loc === "boolean" && config.loc : false; + this.buffer = []; + this.reader = new Reader(); + } + Tokenizer.prototype.errors = function() { + return this.errorHandler.errors; + }; + Tokenizer.prototype.getNextToken = function() { + if (this.buffer.length === 0) { + var comments = this.scanner.scanComments(); + if (this.scanner.trackComment) for (var i = 0; i < comments.length; ++i) { + var e = comments[i]; + var value = this.scanner.source.slice(e.slice[0], e.slice[1]); + var comment = { + type: e.multiLine ? "BlockComment" : "LineComment", + value + }; + if (this.trackRange) comment.range = e.range; + if (this.trackLoc) comment.loc = e.loc; + this.buffer.push(comment); + } + if (!this.scanner.eof()) { + var loc = void 0; + if (this.trackLoc) loc = { + start: { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }, + end: {} + }; + var token = this.scanner.source[this.scanner.index] === "/" && this.reader.isRegexStart() ? this.scanner.scanRegExp() : this.scanner.lex(); + this.reader.push(token); + var entry = { + type: token_1.TokenName[token.type], + value: this.scanner.source.slice(token.start, token.end) + }; + if (this.trackRange) entry.range = [token.start, token.end]; + if (this.trackLoc) { + loc.end = { + line: this.scanner.lineNumber, + column: this.scanner.index - this.scanner.lineStart + }; + entry.loc = loc; + } + if (token.type === 9) entry.regex = { + pattern: token.pattern, + flags: token.flags + }; + this.buffer.push(entry); + } + } + return this.buffer.shift(); + }; + return Tokenizer; + }(); + } + ]); + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +var require_function = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var esprima; + try { + esprima = require_esprima(); + } catch (_) { + if (typeof window !== "undefined") esprima = window.esprima; + } + var Type = require_type(); + function resolveJavascriptFunction(data) { + if (data === null) return false; + try { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }); + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") return false; + return true; + } catch (err) { + return false; + } + } + function constructJavascriptFunction(data) { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }), params = [], body; + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") throw new Error("Failed to resolve function"); + ast.body[0].expression.params.forEach(function(param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; + if (ast.body[0].expression.body.type === "BlockStatement") return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + return new Function(params, "return " + source.slice(body[0], body[1])); + } + function representJavascriptFunction(object) { + return object.toString(); + } + function isFunction(object) { + return Object.prototype.toString.call(object) === "[object Function]"; + } + module.exports = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +var require_default_full = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Schema = require_schema(); + module.exports = Schema.DEFAULT = new Schema({ + include: [require_default_safe()], + explicit: [ + require_undefined(), + require_regexp(), + require_function() + ] + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/loader.js +var require_loader = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + var YAMLException = require_exception(); + var Mark = require_mark(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) return c - 48; + lc = c | 32; + if (97 <= lc && lc <= 102) return lc - 97 + 10; + return -1; + } + function escapedHexLen(c) { + if (c === 120) return 2; + if (c === 117) return 4; + if (c === 85) return 8; + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) return c - 48; + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? "\"" : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "…" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) return String.fromCharCode(c); + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { + configurable: true, + enumerable: true, + writable: true, + value + }); + else object[key] = value; + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + } + function generateError(state, message) { + return new YAMLException(message, new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart)); + } + function throwError(state, message) { + throw generateError(state, message); + } + function throwWarning(state, message) { + if (state.onWarning) state.onWarning.call(null, generateError(state, message)); + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match, major, minor; + if (state.version !== null) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) throwError(state, "unacceptable YAML version of the document"); + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state, "unsupported YAML version of the document"); + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + if (_hasOwnProperty.call(state.tagMap, handle)) throwError(state, "there is a previously declared suffix for \"" + handle + "\" tag handle"); + if (!PATTERN_TAG_URI.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) throwError(state, "expected valid JSON character"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters"); + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Object]"; + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") keyNode = "[object Object]"; + keyNode = String(keyNode); + if (_result === null) _result = {}; + if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) for (index = 0, quantity = valueNode.length; index < quantity; index += 1) mergeMappings(state, _result, valueNode[index], overridableKeys); + else mergeMappings(state, _result, valueNode, overridableKeys); + else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch = state.input.charCodeAt(state.position); + if (ch === 10) state.position++; + else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } else throwError(state, "a line break is expected"); + state.line += 1; + state.lineStart = state.position; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position); + if (allowComments && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else break; + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) throwWarning(state, "deficient indentation"); + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) return true; + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) state.result += " "; + else if (count > 1) state.result += common.repeat("\n", count - 1); + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) return false; + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) return false; + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) break; + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) break; + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) break; + else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) captureEnd = state.position + 1; + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) return true; + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch = state.input.charCodeAt(state.position), captureStart, captureEnd; + if (ch !== 39) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else return true; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar"); + else { + state.position++; + captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch = state.input.charCodeAt(state.position); + if (ch !== 34) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) skipSeparationSpace(state, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state, "expected hexadecimal character"); + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else throwError(state, "unknown escape sequence"); + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar"); + else { + state.position++; + captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode, ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state.anchor !== null) state.anchorMap[state.anchor] = _result; + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) throwError(state, "missed comma between flow collection entries"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + else if (isPair) _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + else _result.push(keyNode); + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch = state.input.charCodeAt(state.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else throwError(state, "repeat of an indentation width identifier"); + else break; + } + if (is_WHITE_SPACE(ch)) { + do + ch = state.input.charCodeAt(++state.position); + while (is_WHITE_SPACE(ch)); + if (ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!is_EOL(ch) && ch !== 0); + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent; + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state.result += "\n"; + } + break; + } + if (folding) if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) state.result += " "; + } else state.result += common.repeat("\n", emptyLines); + else state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position); + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.anchor !== null) state.anchorMap[state.anchor] = _result; + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (ch !== 45) break; + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) break; + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a sequence entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.anchor !== null) state.anchorMap[state.anchor] = _result; + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + _pos = state.position; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + state.position += 1; + ch = following; + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) throwError(state, "can not read an implicit mapping pair; a colon is missed"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + else break; + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state.result; + else valueNode = state.result; + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if (state.lineIndent > nodeIndent && ch !== 0) throwError(state, "bad indentation of a mapping entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (atExplicitKey) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) throwError(state, "duplication of a tag property"); + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else tagHandle = "!"; + _position = state.position; + if (isVerbatim) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else throwError(state, "unexpected end of the stream within a verbatim tag"); + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters"); + isNamed = true; + _position = state.position + 1; + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters"); + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state, "tag name cannot contain such characters: " + tagName); + if (isVerbatim) state.tag = tagName; + else if (_hasOwnProperty.call(state.tagMap, tagHandle)) state.tag = state.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state.tag = "!" + tagName; + else if (tagHandle === "!!") state.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state, "undeclared tag handle \"" + tagHandle + "\""); + return true; + } + function readAnchorProperty(state) { + var _position, ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) throwError(state, "duplication of an anchor property"); + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character"); + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an alias node must contain at least one character"); + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) throwError(state, "unidentified alias \"" + alias + "\""); + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent; + if (state.listener !== null) state.listener("open", state); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } + } + if (indentStatus === 1) while (readTagProperty(state) || readAnchorProperty(state)) if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true; + else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true; + else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) throwError(state, "alias node should not have any properties"); + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) state.tag = "?"; + } + if (state.anchor !== null) state.anchorMap[state.anchor] = state.result; + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + if (state.tag !== null && state.tag !== "!") if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") throwError(state, "unacceptable node kind for ! tag; it should be \"scalar\", not \"" + state.kind + "\""); + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) state.anchorMap[state.anchor] = state.result; + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + if (state.result !== null && type.kind !== state.kind) throwError(state, "unacceptable node kind for !<" + state.tag + "> tag; it should be \"" + type.kind + "\", not \"" + state.kind + "\""); + if (!type.resolve(state.result)) throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + else { + state.result = type.construct(state.result); + if (state.anchor !== null) state.anchorMap[state.anchor] = state.result; + } + } else throwError(state, "unknown tag !<" + state.tag + ">"); + if (state.listener !== null) state.listener("close", state); + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position); + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 35) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) ch = state.input.charCodeAt(++state.position); + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state, directiveName, directiveArgs); + else throwWarning(state, "unknown document directive \"" + directiveName + "\""); + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) throwError(state, "directives end mark is expected"); + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) throwWarning(state, "non-ASCII line breaks are interpreted as content"); + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected"); + else return; + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) input += "\n"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) readDocument(state); + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") return documents; + for (var index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]); + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException("expected a single document in the stream, but found more"); + } + function safeLoadAll(input, iterator, options) { + if (typeof iterator === "object" && iterator !== null && typeof options === "undefined") { + options = iterator; + iterator = null; + } + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module.exports.loadAll = loadAll; + module.exports.load = load; + module.exports.safeLoadAll = safeLoadAll; + module.exports.safeLoad = safeLoad; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml/dumper.js +var require_dumper = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var common = require_common(); + var YAMLException = require_exception(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = "\\\""; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + if (map === null) return {}; + result = {}; + keys = Object.keys(map); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string = character.toString(16).toUpperCase(), handle, length; + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + function State(options) { + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) return true; + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111; + } + function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev) { + return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev)); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + var STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); + if (singleLineOnly) for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) return STYLE_DOUBLE; + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + else { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + } + if (!hasLineBreak && !hasFoldableLine) return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE; + if (indentPerLevel > 9 && needIndentIndicator(string)) return STYLE_DOUBLE; + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + function writeScalar(state, string, level, iskey) { + state.dump = function() { + if (string.length === 0) return "''"; + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) return "'" + string + "'"; + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: return string; + case STYLE_SINGLE: return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: return "\"" + escapeString(string, lineWidth) + "\""; + default: throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + else result += line.slice(start); + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char, nextChar; + var escapeSeq; + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char >= 55296 && char <= 56319) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 56320 && nextChar <= 57343) { + result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536); + i++; + continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) _result += generateNextLine(state, level); + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state.dump; + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (index !== 0) pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += "\""; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level, objectKey, false, false)) continue; + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? "\"" : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) continue; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) objectKeyList.sort(); + else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys); + else if (state.sortKeys) throw new YAMLException("sortKeys must be a boolean or a function"); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || index !== 0) pairBuffer += generateNextLine(state, level); + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level + 1, objectKey, true, true, true)) continue; + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state.dump; + if (explicitPair) pairBuffer += generateNextLine(state, level); + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) continue; + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList = explicit ? state.explicitTypes : state.implicitTypes, index, length, type, style; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") _result = type.represent(object, style); + else if (_hasOwnProperty.call(type.represent, style)) _result = type.represent[style](object, style); + else throw new YAMLException("!<" + type.tag + "> tag resolver accepts not \"" + style + "\" style"); + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) detectType(state, object, true); + var type = _toString.call(state.dump); + if (block) block = state.flowLevel < 0 || state.flowLevel > level; + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) compact = false; + if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + else if (type === "[object Array]") { + var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level; + if (block && state.dump.length !== 0) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } else if (type === "[object String]") { + if (state.tag !== "?") writeScalar(state, state.dump, level, iskey); + } else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") state.dump = "!<" + state.tag + "> " + state.dump; + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]); + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); + } else { + objects.push(object); + if (Array.isArray(object)) for (index = 0, length = object.length; index < length; index += 1) inspectNode(object[index], objects, duplicatesIndexes); + else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) return state.dump + "\n"; + return ""; + } + function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module.exports.dump = dump; + module.exports.safeDump = safeDump; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/lib/js-yaml.js +var require_js_yaml$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var loader = require_loader(); + var dumper = require_dumper(); + function deprecated(name) { + return function() { + throw new Error("Function " + name + " is deprecated and cannot be used."); + }; + } + module.exports.Type = require_type(); + module.exports.Schema = require_schema(); + module.exports.FAILSAFE_SCHEMA = require_failsafe(); + module.exports.JSON_SCHEMA = require_json(); + module.exports.CORE_SCHEMA = require_core(); + module.exports.DEFAULT_SAFE_SCHEMA = require_default_safe(); + module.exports.DEFAULT_FULL_SCHEMA = require_default_full(); + module.exports.load = loader.load; + module.exports.loadAll = loader.loadAll; + module.exports.safeLoad = loader.safeLoad; + module.exports.safeLoadAll = loader.safeLoadAll; + module.exports.dump = dumper.dump; + module.exports.safeDump = dumper.safeDump; + module.exports.YAMLException = require_exception(); + module.exports.MINIMAL_SCHEMA = require_failsafe(); + module.exports.SAFE_SCHEMA = require_default_safe(); + module.exports.DEFAULT_SCHEMA = require_default_full(); + module.exports.scan = deprecated("scan"); + module.exports.parse = deprecated("parse"); + module.exports.compose = deprecated("compose"); + module.exports.addConstructor = deprecated("addConstructor"); +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@3.14.2/node_modules/js-yaml/index.js +var require_js_yaml = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = require_js_yaml$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/read-yaml-file@1.1.0/node_modules/read-yaml-file/index.js +var require_read_yaml_file = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs = require_graceful_fs(); + const pify = require_pify(); + const stripBom = require_strip_bom(); + const yaml = require_js_yaml(); + const parse = (data) => yaml.safeLoad(stripBom(data)); + const readYamlFile = (fp) => pify(fs.readFile)(fp, "utf8").then((data) => parse(data)); + module.exports = readYamlFile; + module.exports.default = readYamlFile; + module.exports.sync = (fp) => parse(fs.readFileSync(fp, "utf8")); +})); +//#endregion +//#region ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pTry = (fn, ...arguments_) => new Promise((resolve) => { + resolve(fn(...arguments_)); + }); + module.exports = pTry; + module.exports.default = pTry; +})); +//#endregion +//#region ../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pTry = require_p_try(); + const pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) return Promise.reject(/* @__PURE__ */ new TypeError("Expected `concurrency` to be a number from 1 and up")); + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) queue.shift()(); + }; + const run = (fn, resolve, ...args) => { + activeCount++; + const result = pTry(fn, ...args); + resolve(result); + result.then(next, next); + }; + const enqueue = (fn, resolve, ...args) => { + if (activeCount < concurrency) run(fn, resolve, ...args); + else queue.push(run.bind(null, fn, resolve, ...args)); + }; + const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args)); + Object.defineProperties(generator, { + activeCount: { get: () => activeCount }, + pendingCount: { get: () => queue.length }, + clearQueue: { value: () => { + queue.length = 0; + } } + }); + return generator; + }; + module.exports = pLimit; + module.exports.default = pLimit; +})); +//#endregion +//#region ../../node_modules/.pnpm/p-locate@4.1.0/node_modules/p-locate/index.js +var require_p_locate = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pLimit = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + const testElement = async (element, tester) => tester(await element); + const finder = async (element) => { + const values = await Promise.all(element); + if (values[1] === true) throw new EndError(values[0]); + return false; + }; + const pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + const limit = pLimit(options.concurrency); + const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + try { + await Promise.all(items.map((element) => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) return error.value; + throw error; + } + }; + module.exports = pLocate; + module.exports.default = pLocate; +})); +//#endregion +//#region ../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js +var require_locate_path = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$11 = __require("path"); + const fs$4 = __require("fs"); + const { promisify: promisify$1 } = __require("util"); + const pLocate = require_p_locate(); + const fsStat = promisify$1(fs$4.stat); + const fsLStat = promisify$1(fs$4.lstat); + const typeMappings = { + directory: "isDirectory", + file: "isFile" + }; + function checkType({ type }) { + if (type in typeMappings) return; + throw new Error(`Invalid type specified: ${type}`); + } + const matchType = (type, stat) => type === void 0 || stat[typeMappings[type]](); + module.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: "file", + allowSymlinks: true, + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fsStat : fsLStat; + return pLocate(paths, async (path_) => { + try { + const stat = await statFn(path$11.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch (_) { + return false; + } + }, options); + }; + module.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: "file", + ...options + }; + checkType(options); + const statFn = options.allowSymlinks ? fs$4.statSync : fs$4.lstatSync; + for (const path_ of paths) try { + const stat = statFn(path$11.resolve(options.cwd, path_)); + if (matchType(options.type, stat)) return path_; + } catch (_) {} + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js +var require_path_exists = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fs$3 = __require("fs"); + const { promisify } = __require("util"); + const pAccess = promisify(fs$3.access); + module.exports = async (path) => { + try { + await pAccess(path); + return true; + } catch (_) { + return false; + } + }; + module.exports.sync = (path) => { + try { + fs$3.accessSync(path); + return true; + } catch (_) { + return false; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js +var require_find_up = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$10 = __require("path"); + const locatePath = require_locate_path(); + const pathExists = require_path_exists(); + const stop = Symbol("findUp.stop"); + module.exports = async (name, options = {}) => { + let directory = path$10.resolve(options.cwd || ""); + const { root } = path$10.parse(directory); + const paths = [].concat(name); + const runMatcher = async (locateOptions) => { + if (typeof name !== "function") return locatePath(paths, locateOptions); + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === "string") return locatePath([foundPath], locateOptions); + return foundPath; + }; + while (true) { + const foundPath = await runMatcher({ + ...options, + cwd: directory + }); + if (foundPath === stop) return; + if (foundPath) return path$10.resolve(directory, foundPath); + if (directory === root) return; + directory = path$10.dirname(directory); + } + }; + module.exports.sync = (name, options = {}) => { + let directory = path$10.resolve(options.cwd || ""); + const { root } = path$10.parse(directory); + const paths = [].concat(name); + const runMatcher = (locateOptions) => { + if (typeof name !== "function") return locatePath.sync(paths, locateOptions); + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === "string") return locatePath.sync([foundPath], locateOptions); + return foundPath; + }; + while (true) { + const foundPath = runMatcher({ + ...options, + cwd: directory + }); + if (foundPath === stop) return; + if (foundPath) return path$10.resolve(directory, foundPath); + if (directory === root) return; + directory = path$10.dirname(directory); + } + }; + module.exports.exists = pathExists; + module.exports.sync.exists = pathExists.sync; + module.exports.stop = stop; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@1.1.0/node_modules/@manypkg/find-root/dist/find-root.cjs.prod.js +var require_find_root_cjs_prod = /* @__PURE__ */ __commonJSMin$1(((exports) => { + function _interopDefault(ex) { + return ex && "object" == typeof ex && "default" in ex ? ex.default : ex; + } + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _regeneratorRuntime$1 = _interopDefault(require_regenerator()), _asyncToGenerator$1 = _interopDefault(require_asyncToGenerator()), _classCallCheck$1 = _interopDefault(require_classCallCheck()), _possibleConstructorReturn$1 = _interopDefault(require_possibleConstructorReturn()), _getPrototypeOf$1 = _interopDefault(require_getPrototypeOf()), _inherits$1 = _interopDefault(require_inherits()), _wrapNativeSuper$1 = _interopDefault(require_wrapNativeSuper()), findUp = require_find_up(), findUp__default = _interopDefault(findUp), path$9 = _interopDefault(__require("path")), fs$2 = _interopDefault(require_lib()), NoPkgJsonFound = function(_Error) { + function NoPkgJsonFound(directory) { + var _this; + return _classCallCheck$1(this, NoPkgJsonFound), (_this = _possibleConstructorReturn$1(this, _getPrototypeOf$1(NoPkgJsonFound).call(this, "No package.json could be found upwards from the directory ".concat(directory)))).directory = directory, _this; + } + return _inherits$1(NoPkgJsonFound, _Error), NoPkgJsonFound; + }(_wrapNativeSuper$1(Error)); + function hasWorkspacesConfiguredViaPkgJson(_x, _x2) { + return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaPkgJson() { + return (_hasWorkspacesConfiguredViaPkgJson = _asyncToGenerator$1(_regeneratorRuntime$1.mark(function _callee(directory, firstPkgJsonDirRef) { + var pkgJson; + return _regeneratorRuntime$1.wrap(function(_context) { + for (;;) switch (_context.prev = _context.next) { + case 0: return _context.prev = 0, _context.next = 3, fs$2.readJson(path$9.join(directory, "package.json")); + case 3: + if (pkgJson = _context.sent, void 0 === firstPkgJsonDirRef.current && (firstPkgJsonDirRef.current = directory), !pkgJson.workspaces && !pkgJson.bolt) { + _context.next = 7; + break; + } + return _context.abrupt("return", directory); + case 7: + _context.next = 13; + break; + case 9: + if (_context.prev = 9, _context.t0 = _context.catch(0), "ENOENT" === _context.t0.code) { + _context.next = 13; + break; + } + throw _context.t0; + case 13: + case "end": return _context.stop(); + } + }, _callee, null, [[0, 9]]); + }))).apply(this, arguments); + } + function hasWorkspacesConfiguredViaLerna(_x3) { + return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaLerna() { + return (_hasWorkspacesConfiguredViaLerna = _asyncToGenerator$1(_regeneratorRuntime$1.mark(function _callee2(directory) { + return _regeneratorRuntime$1.wrap(function(_context2) { + for (;;) switch (_context2.prev = _context2.next) { + case 0: return _context2.prev = 0, _context2.next = 3, fs$2.readJson(path$9.join(directory, "lerna.json")); + case 3: + if (!0 === _context2.sent.useWorkspaces) { + _context2.next = 6; + break; + } + return _context2.abrupt("return", directory); + case 6: + _context2.next = 12; + break; + case 8: + if (_context2.prev = 8, _context2.t0 = _context2.catch(0), "ENOENT" === _context2.t0.code) { + _context2.next = 12; + break; + } + throw _context2.t0; + case 12: + case "end": return _context2.stop(); + } + }, _callee2, null, [[0, 8]]); + }))).apply(this, arguments); + } + function hasWorkspacesConfiguredViaPnpm(_x4) { + return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaPnpm() { + return (_hasWorkspacesConfiguredViaPnpm = _asyncToGenerator$1(_regeneratorRuntime$1.mark(function _callee3(directory) { + return _regeneratorRuntime$1.wrap(function(_context3) { + for (;;) switch (_context3.prev = _context3.next) { + case 0: return _context3.next = 2, fs$2.exists(path$9.join(directory, "pnpm-workspace.yaml")); + case 2: + if (!_context3.sent) { + _context3.next = 5; + break; + } + return _context3.abrupt("return", directory); + case 5: + case "end": return _context3.stop(); + } + }, _callee3); + }))).apply(this, arguments); + } + function findRoot(_x5) { + return _findRoot.apply(this, arguments); + } + function _findRoot() { + return (_findRoot = _asyncToGenerator$1(_regeneratorRuntime$1.mark(function _callee4(cwd) { + var firstPkgJsonDirRef, dir; + return _regeneratorRuntime$1.wrap(function(_context4) { + for (;;) switch (_context4.prev = _context4.next) { + case 0: return firstPkgJsonDirRef = { current: void 0 }, _context4.next = 3, findUp__default(function(directory) { + return Promise.all([ + hasWorkspacesConfiguredViaLerna(directory), + hasWorkspacesConfiguredViaPkgJson(directory, firstPkgJsonDirRef), + hasWorkspacesConfiguredViaPnpm(directory) + ]).then(function(x) { + return x.find(function(dir) { + return dir; + }); + }); + }, { + cwd, + type: "directory" + }); + case 3: + if (dir = _context4.sent, void 0 !== firstPkgJsonDirRef.current) { + _context4.next = 6; + break; + } + throw new NoPkgJsonFound(cwd); + case 6: + if (void 0 !== dir) { + _context4.next = 8; + break; + } + return _context4.abrupt("return", firstPkgJsonDirRef.current); + case 8: return _context4.abrupt("return", dir); + case 9: + case "end": return _context4.stop(); + } + }, _callee4); + }))).apply(this, arguments); + } + function hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef) { + try { + var pkgJson = fs$2.readJsonSync(path$9.join(directory, "package.json")); + if (void 0 === firstPkgJsonDirRef.current && (firstPkgJsonDirRef.current = directory), pkgJson.workspaces || pkgJson.bolt) return directory; + } catch (err) { + if ("ENOENT" !== err.code) throw err; + } + } + function hasWorkspacesConfiguredViaLernaSync(directory) { + try { + if (!0 !== fs$2.readJsonSync(path$9.join(directory, "lerna.json")).useWorkspaces) return directory; + } catch (err) { + if ("ENOENT" !== err.code) throw err; + } + } + function hasWorkspacesConfiguredViaPnpmSync(directory) { + if (fs$2.existsSync(path$9.join(directory, "pnpm-workspace.yaml"))) return directory; + } + function findRootSync(cwd) { + var firstPkgJsonDirRef = { current: void 0 }, dir = findUp.sync(function(directory) { + return [ + hasWorkspacesConfiguredViaLernaSync(directory), + hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef), + hasWorkspacesConfiguredViaPnpmSync(directory) + ].find(function(dir) { + return dir; + }); + }, { + cwd, + type: "directory" + }); + if (void 0 === firstPkgJsonDirRef.current) throw new NoPkgJsonFound(cwd); + return void 0 === dir ? firstPkgJsonDirRef.current : dir; + } + exports.NoPkgJsonFound = NoPkgJsonFound, exports.findRoot = findRoot, exports.findRootSync = findRootSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@1.1.0/node_modules/@manypkg/find-root/dist/find-root.cjs.dev.js +var require_find_root_cjs_dev = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + function _interopDefault(ex) { + return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; + } + var _regeneratorRuntime = _interopDefault(require_regenerator()); + var _asyncToGenerator = _interopDefault(require_asyncToGenerator()); + var _classCallCheck = _interopDefault(require_classCallCheck()); + var _possibleConstructorReturn = _interopDefault(require_possibleConstructorReturn()); + var _getPrototypeOf = _interopDefault(require_getPrototypeOf()); + var _inherits = _interopDefault(require_inherits()); + var _wrapNativeSuper = _interopDefault(require_wrapNativeSuper()); + var findUp = require_find_up(); + var findUp__default = _interopDefault(findUp); + var path$8 = _interopDefault(__require("path")); + var fs = _interopDefault(require_lib()); + var NoPkgJsonFound = /*#__PURE__*/ function(_Error) { + _inherits(NoPkgJsonFound, _Error); + function NoPkgJsonFound(directory) { + var _this; + _classCallCheck(this, NoPkgJsonFound); + _this = _possibleConstructorReturn(this, _getPrototypeOf(NoPkgJsonFound).call(this, "No package.json could be found upwards from the directory ".concat(directory))); + _this.directory = directory; + return _this; + } + return NoPkgJsonFound; + }(_wrapNativeSuper(Error)); + function hasWorkspacesConfiguredViaPkgJson(_x, _x2) { + return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaPkgJson() { + _hasWorkspacesConfiguredViaPkgJson = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.mark(function _callee(directory, firstPkgJsonDirRef) { + var pkgJson; + return _regeneratorRuntime.wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return fs.readJson(path$8.join(directory, "package.json")); + case 3: + pkgJson = _context.sent; + if (firstPkgJsonDirRef.current === void 0) firstPkgJsonDirRef.current = directory; + if (!(pkgJson.workspaces || pkgJson.bolt)) { + _context.next = 7; + break; + } + return _context.abrupt("return", directory); + case 7: + _context.next = 13; + break; + case 9: + _context.prev = 9; + _context.t0 = _context["catch"](0); + if (!(_context.t0.code !== "ENOENT")) { + _context.next = 13; + break; + } + throw _context.t0; + case 13: + case "end": return _context.stop(); + } + }, _callee, null, [[0, 9]]); + })); + return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); + } + function hasWorkspacesConfiguredViaLerna(_x3) { + return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaLerna() { + _hasWorkspacesConfiguredViaLerna = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.mark(function _callee2(directory) { + var lernaJson; + return _regeneratorRuntime.wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + _context2.next = 3; + return fs.readJson(path$8.join(directory, "lerna.json")); + case 3: + lernaJson = _context2.sent; + if (!(lernaJson.useWorkspaces !== true)) { + _context2.next = 6; + break; + } + return _context2.abrupt("return", directory); + case 6: + _context2.next = 12; + break; + case 8: + _context2.prev = 8; + _context2.t0 = _context2["catch"](0); + if (!(_context2.t0.code !== "ENOENT")) { + _context2.next = 12; + break; + } + throw _context2.t0; + case 12: + case "end": return _context2.stop(); + } + }, _callee2, null, [[0, 8]]); + })); + return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); + } + function hasWorkspacesConfiguredViaPnpm(_x4) { + return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); + } + function _hasWorkspacesConfiguredViaPnpm() { + _hasWorkspacesConfiguredViaPnpm = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.mark(function _callee3(directory) { + var pnpmWorkspacesFileExists; + return _regeneratorRuntime.wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return fs.exists(path$8.join(directory, "pnpm-workspace.yaml")); + case 2: + pnpmWorkspacesFileExists = _context3.sent; + if (!pnpmWorkspacesFileExists) { + _context3.next = 5; + break; + } + return _context3.abrupt("return", directory); + case 5: + case "end": return _context3.stop(); + } + }, _callee3); + })); + return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); + } + function findRoot(_x5) { + return _findRoot.apply(this, arguments); + } + function _findRoot() { + _findRoot = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.mark(function _callee4(cwd) { + var firstPkgJsonDirRef, dir; + return _regeneratorRuntime.wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + firstPkgJsonDirRef = { current: void 0 }; + _context4.next = 3; + return findUp__default(function(directory) { + return Promise.all([ + hasWorkspacesConfiguredViaLerna(directory), + hasWorkspacesConfiguredViaPkgJson(directory, firstPkgJsonDirRef), + hasWorkspacesConfiguredViaPnpm(directory) + ]).then(function(x) { + return x.find(function(dir) { + return dir; + }); + }); + }, { + cwd, + type: "directory" + }); + case 3: + dir = _context4.sent; + if (!(firstPkgJsonDirRef.current === void 0)) { + _context4.next = 6; + break; + } + throw new NoPkgJsonFound(cwd); + case 6: + if (!(dir === void 0)) { + _context4.next = 8; + break; + } + return _context4.abrupt("return", firstPkgJsonDirRef.current); + case 8: return _context4.abrupt("return", dir); + case 9: + case "end": return _context4.stop(); + } + }, _callee4); + })); + return _findRoot.apply(this, arguments); + } + function hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef) { + try { + var pkgJson = fs.readJsonSync(path$8.join(directory, "package.json")); + if (firstPkgJsonDirRef.current === void 0) firstPkgJsonDirRef.current = directory; + if (pkgJson.workspaces || pkgJson.bolt) return directory; + } catch (err) { + if (err.code !== "ENOENT") throw err; + } + } + function hasWorkspacesConfiguredViaLernaSync(directory) { + try { + if (fs.readJsonSync(path$8.join(directory, "lerna.json")).useWorkspaces !== true) return directory; + } catch (err) { + if (err.code !== "ENOENT") throw err; + } + } + function hasWorkspacesConfiguredViaPnpmSync(directory) { + if (fs.existsSync(path$8.join(directory, "pnpm-workspace.yaml"))) return directory; + } + function findRootSync(cwd) { + var firstPkgJsonDirRef = { current: void 0 }; + var dir = findUp.sync(function(directory) { + return [ + hasWorkspacesConfiguredViaLernaSync(directory), + hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef), + hasWorkspacesConfiguredViaPnpmSync(directory) + ].find(function(dir) { + return dir; + }); + }, { + cwd, + type: "directory" + }); + if (firstPkgJsonDirRef.current === void 0) throw new NoPkgJsonFound(cwd); + if (dir === void 0) return firstPkgJsonDirRef.current; + return dir; + } + exports.NoPkgJsonFound = NoPkgJsonFound; + exports.findRoot = findRoot; + exports.findRootSync = findRootSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@1.1.0/node_modules/@manypkg/find-root/dist/find-root.cjs.js +var require_find_root_cjs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + if (process.env.NODE_ENV === "production") module.exports = require_find_root_cjs_prod(); + else module.exports = require_find_root_cjs_dev(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+get-packages@1.1.3/node_modules/@manypkg/get-packages/dist/get-packages.cjs.prod.js +var require_get_packages_cjs_prod = /* @__PURE__ */ __commonJSMin$1(((exports) => { + function _interopDefault(ex) { + return ex && "object" == typeof ex && "default" in ex ? ex.default : ex; + } + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _regeneratorRuntime = _interopDefault(require_regenerator()), _asyncToGenerator = _interopDefault(require_asyncToGenerator()), _classCallCheck = _interopDefault(require_classCallCheck()), _possibleConstructorReturn = _interopDefault(require_possibleConstructorReturn()), _getPrototypeOf = _interopDefault(require_getPrototypeOf()), _inherits = _interopDefault(require_inherits()), _wrapNativeSuper = _interopDefault(require_wrapNativeSuper()), fs$1 = _interopDefault(require_lib()), path$7 = _interopDefault(__require("path")), globby = require_globby(), globby__default = _interopDefault(globby), readYamlFile = require_read_yaml_file(), readYamlFile__default = _interopDefault(readYamlFile), findRoot = require_find_root_cjs(), PackageJsonMissingNameError = function(_Error) { + function PackageJsonMissingNameError(directories) { + var _this; + return _classCallCheck(this, PackageJsonMissingNameError), (_this = _possibleConstructorReturn(this, _getPrototypeOf(PackageJsonMissingNameError).call(this, "The following package.jsons are missing the \"name\" field:\n".concat(directories.join("\n"))))).directories = directories, _this; + } + return _inherits(PackageJsonMissingNameError, _Error), PackageJsonMissingNameError; + }(_wrapNativeSuper(Error)); + function getPackages(_x) { + return _getPackages.apply(this, arguments); + } + function _getPackages() { + return (_getPackages = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(dir) { + var cwd, pkg, tool, manifest, lernaJson, root, relativeDirectories, directories, pkgJsonsMissingNameField, results; + return _regeneratorRuntime.wrap(function(_context) { + for (;;) switch (_context.prev = _context.next) { + case 0: return _context.next = 2, findRoot.findRoot(dir); + case 2: return cwd = _context.sent, _context.next = 5, fs$1.readJson(path$7.join(cwd, "package.json")); + case 5: + if (!(pkg = _context.sent).workspaces) { + _context.next = 10; + break; + } + Array.isArray(pkg.workspaces) ? tool = { + type: "yarn", + packageGlobs: pkg.workspaces + } : pkg.workspaces.packages && (tool = { + type: "yarn", + packageGlobs: pkg.workspaces.packages + }), _context.next = 37; + break; + case 10: + if (!pkg.bolt || !pkg.bolt.workspaces) { + _context.next = 14; + break; + } + tool = { + type: "bolt", + packageGlobs: pkg.bolt.workspaces + }, _context.next = 37; + break; + case 14: return _context.prev = 14, _context.next = 17, readYamlFile__default(path$7.join(cwd, "pnpm-workspace.yaml")); + case 17: + (manifest = _context.sent) && manifest.packages && (tool = { + type: "pnpm", + packageGlobs: manifest.packages + }), _context.next = 25; + break; + case 21: + if (_context.prev = 21, _context.t0 = _context.catch(14), "ENOENT" === _context.t0.code) { + _context.next = 25; + break; + } + throw _context.t0; + case 25: + if (tool) { + _context.next = 37; + break; + } + return _context.prev = 26, _context.next = 29, fs$1.readJson(path$7.join(cwd, "lerna.json")); + case 29: + (lernaJson = _context.sent) && (tool = { + type: "lerna", + packageGlobs: lernaJson.packages || ["packages/*"] + }), _context.next = 37; + break; + case 33: + if (_context.prev = 33, _context.t1 = _context.catch(26), "ENOENT" === _context.t1.code) { + _context.next = 37; + break; + } + throw _context.t1; + case 37: + if (tool) { + _context.next = 42; + break; + } + if (root = { + dir: cwd, + packageJson: pkg + }, pkg.name) { + _context.next = 41; + break; + } + throw new PackageJsonMissingNameError(["package.json"]); + case 41: return _context.abrupt("return", { + tool: "root", + root, + packages: [root] + }); + case 42: return _context.next = 44, globby__default(tool.packageGlobs, { + cwd, + onlyDirectories: !0, + expandDirectories: !1, + ignore: ["**/node_modules"] + }); + case 44: return relativeDirectories = _context.sent, directories = relativeDirectories.map(function(p) { + return path$7.resolve(cwd, p); + }), pkgJsonsMissingNameField = [], _context.next = 49, Promise.all(directories.sort().map(function(dir) { + return fs$1.readJson(path$7.join(dir, "package.json")).then(function(packageJson) { + return packageJson.name || pkgJsonsMissingNameField.push(path$7.relative(cwd, path$7.join(dir, "package.json"))), { + packageJson, + dir + }; + }).catch(function(err) { + if ("ENOENT" === err.code) return null; + throw err; + }); + })); + case 49: + if (_context.t2 = function(x) { + return x; + }, results = _context.sent.filter(_context.t2), 0 === pkgJsonsMissingNameField.length) { + _context.next = 54; + break; + } + throw pkgJsonsMissingNameField.sort(), new PackageJsonMissingNameError(pkgJsonsMissingNameField); + case 54: return _context.abrupt("return", { + tool: tool.type, + root: { + dir: cwd, + packageJson: pkg + }, + packages: results + }); + case 55: + case "end": return _context.stop(); + } + }, _callee, null, [[14, 21], [26, 33]]); + }))).apply(this, arguments); + } + function getPackagesSync(dir) { + var tool, cwd = findRoot.findRootSync(dir), pkg = fs$1.readJsonSync(path$7.join(cwd, "package.json")); + if (pkg.workspaces) Array.isArray(pkg.workspaces) ? tool = { + type: "yarn", + packageGlobs: pkg.workspaces + } : pkg.workspaces.packages && (tool = { + type: "yarn", + packageGlobs: pkg.workspaces.packages + }); + else if (pkg.bolt && pkg.bolt.workspaces) tool = { + type: "bolt", + packageGlobs: pkg.bolt.workspaces + }; + else { + try { + var manifest = readYamlFile.sync(path$7.join(cwd, "pnpm-workspace.yaml")); + manifest && manifest.packages && (tool = { + type: "pnpm", + packageGlobs: manifest.packages + }); + } catch (err) { + if ("ENOENT" !== err.code) throw err; + } + if (!tool) try { + var lernaJson = fs$1.readJsonSync(path$7.join(cwd, "lerna.json")); + lernaJson && (tool = { + type: "lerna", + packageGlobs: lernaJson.packages || ["packages/*"] + }); + } catch (err) { + if ("ENOENT" !== err.code) throw err; + } + } + if (!tool) { + var root = { + dir: cwd, + packageJson: pkg + }; + if (!pkg.name) throw new PackageJsonMissingNameError(["package.json"]); + return { + tool: "root", + root, + packages: [root] + }; + } + var directories = globby.sync(tool.packageGlobs, { + cwd, + onlyDirectories: !0, + expandDirectories: !1, + ignore: ["**/node_modules"] + }).map(function(p) { + return path$7.resolve(cwd, p); + }), pkgJsonsMissingNameField = [], results = directories.sort().map(function(dir) { + try { + var packageJson = fs$1.readJsonSync(path$7.join(dir, "package.json")); + return packageJson.name || pkgJsonsMissingNameField.push(path$7.relative(cwd, path$7.join(dir, "package.json"))), { + packageJson, + dir + }; + } catch (err) { + if ("ENOENT" === err.code) return null; + throw err; + } + }).filter(function(x) { + return x; + }); + if (0 !== pkgJsonsMissingNameField.length) throw pkgJsonsMissingNameField.sort(), new PackageJsonMissingNameError(pkgJsonsMissingNameField); + return { + tool: tool.type, + root: { + dir: cwd, + packageJson: pkg + }, + packages: results + }; + } + exports.PackageJsonMissingNameError = PackageJsonMissingNameError, exports.getPackages = getPackages, exports.getPackagesSync = getPackagesSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+get-packages@1.1.3/node_modules/@manypkg/get-packages/dist/get-packages.cjs.dev.js +var require_get_packages_cjs_dev = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + function _interopDefault(ex) { + return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; + } + var _regeneratorRuntime = _interopDefault(require_regenerator()); + var _asyncToGenerator = _interopDefault(require_asyncToGenerator()); + var _classCallCheck = _interopDefault(require_classCallCheck()); + var _possibleConstructorReturn = _interopDefault(require_possibleConstructorReturn()); + var _getPrototypeOf = _interopDefault(require_getPrototypeOf()); + var _inherits = _interopDefault(require_inherits()); + var _wrapNativeSuper = _interopDefault(require_wrapNativeSuper()); + var fs = _interopDefault(require_lib()); + var path$6 = _interopDefault(__require("path")); + var globby = require_globby(); + var globby__default = _interopDefault(globby); + var readYamlFile = require_read_yaml_file(); + var readYamlFile__default = _interopDefault(readYamlFile); + var findRoot = require_find_root_cjs(); + var PackageJsonMissingNameError = /*#__PURE__*/ function(_Error) { + _inherits(PackageJsonMissingNameError, _Error); + function PackageJsonMissingNameError(directories) { + var _this; + _classCallCheck(this, PackageJsonMissingNameError); + _this = _possibleConstructorReturn(this, _getPrototypeOf(PackageJsonMissingNameError).call(this, "The following package.jsons are missing the \"name\" field:\n".concat(directories.join("\n")))); + _this.directories = directories; + return _this; + } + return PackageJsonMissingNameError; + }(_wrapNativeSuper(Error)); + function getPackages(_x) { + return _getPackages.apply(this, arguments); + } + function _getPackages() { + _getPackages = _asyncToGenerator(/*#__PURE__*/ _regeneratorRuntime.mark(function _callee(dir) { + var cwd, pkg, tool, manifest, lernaJson, root, relativeDirectories, directories, pkgJsonsMissingNameField, results; + return _regeneratorRuntime.wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return findRoot.findRoot(dir); + case 2: + cwd = _context.sent; + _context.next = 5; + return fs.readJson(path$6.join(cwd, "package.json")); + case 5: + pkg = _context.sent; + if (!pkg.workspaces) { + _context.next = 10; + break; + } + if (Array.isArray(pkg.workspaces)) tool = { + type: "yarn", + packageGlobs: pkg.workspaces + }; + else if (pkg.workspaces.packages) tool = { + type: "yarn", + packageGlobs: pkg.workspaces.packages + }; + _context.next = 37; + break; + case 10: + if (!(pkg.bolt && pkg.bolt.workspaces)) { + _context.next = 14; + break; + } + tool = { + type: "bolt", + packageGlobs: pkg.bolt.workspaces + }; + _context.next = 37; + break; + case 14: + _context.prev = 14; + _context.next = 17; + return readYamlFile__default(path$6.join(cwd, "pnpm-workspace.yaml")); + case 17: + manifest = _context.sent; + if (manifest && manifest.packages) tool = { + type: "pnpm", + packageGlobs: manifest.packages + }; + _context.next = 25; + break; + case 21: + _context.prev = 21; + _context.t0 = _context["catch"](14); + if (!(_context.t0.code !== "ENOENT")) { + _context.next = 25; + break; + } + throw _context.t0; + case 25: + if (tool) { + _context.next = 37; + break; + } + _context.prev = 26; + _context.next = 29; + return fs.readJson(path$6.join(cwd, "lerna.json")); + case 29: + lernaJson = _context.sent; + if (lernaJson) tool = { + type: "lerna", + packageGlobs: lernaJson.packages || ["packages/*"] + }; + _context.next = 37; + break; + case 33: + _context.prev = 33; + _context.t1 = _context["catch"](26); + if (!(_context.t1.code !== "ENOENT")) { + _context.next = 37; + break; + } + throw _context.t1; + case 37: + if (tool) { + _context.next = 42; + break; + } + root = { + dir: cwd, + packageJson: pkg + }; + if (pkg.name) { + _context.next = 41; + break; + } + throw new PackageJsonMissingNameError(["package.json"]); + case 41: return _context.abrupt("return", { + tool: "root", + root, + packages: [root] + }); + case 42: + _context.next = 44; + return globby__default(tool.packageGlobs, { + cwd, + onlyDirectories: true, + expandDirectories: false, + ignore: ["**/node_modules"] + }); + case 44: + relativeDirectories = _context.sent; + directories = relativeDirectories.map(function(p) { + return path$6.resolve(cwd, p); + }); + pkgJsonsMissingNameField = []; + _context.next = 49; + return Promise.all(directories.sort().map(function(dir) { + return fs.readJson(path$6.join(dir, "package.json")).then(function(packageJson) { + if (!packageJson.name) pkgJsonsMissingNameField.push(path$6.relative(cwd, path$6.join(dir, "package.json"))); + return { + packageJson, + dir + }; + })["catch"](function(err) { + if (err.code === "ENOENT") return null; + throw err; + }); + })); + case 49: + _context.t2 = function(x) { + return x; + }; + results = _context.sent.filter(_context.t2); + if (!(pkgJsonsMissingNameField.length !== 0)) { + _context.next = 54; + break; + } + pkgJsonsMissingNameField.sort(); + throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); + case 54: return _context.abrupt("return", { + tool: tool.type, + root: { + dir: cwd, + packageJson: pkg + }, + packages: results + }); + case 55: + case "end": return _context.stop(); + } + }, _callee, null, [[14, 21], [26, 33]]); + })); + return _getPackages.apply(this, arguments); + } + function getPackagesSync(dir) { + var cwd = findRoot.findRootSync(dir); + var pkg = fs.readJsonSync(path$6.join(cwd, "package.json")); + var tool; + if (pkg.workspaces) { + if (Array.isArray(pkg.workspaces)) tool = { + type: "yarn", + packageGlobs: pkg.workspaces + }; + else if (pkg.workspaces.packages) tool = { + type: "yarn", + packageGlobs: pkg.workspaces.packages + }; + } else if (pkg.bolt && pkg.bolt.workspaces) tool = { + type: "bolt", + packageGlobs: pkg.bolt.workspaces + }; + else { + try { + var manifest = readYamlFile.sync(path$6.join(cwd, "pnpm-workspace.yaml")); + if (manifest && manifest.packages) tool = { + type: "pnpm", + packageGlobs: manifest.packages + }; + } catch (err) { + if (err.code !== "ENOENT") throw err; + } + if (!tool) try { + var lernaJson = fs.readJsonSync(path$6.join(cwd, "lerna.json")); + if (lernaJson) tool = { + type: "lerna", + packageGlobs: lernaJson.packages || ["packages/*"] + }; + } catch (err) { + if (err.code !== "ENOENT") throw err; + } + } + if (!tool) { + var root = { + dir: cwd, + packageJson: pkg + }; + if (!pkg.name) throw new PackageJsonMissingNameError(["package.json"]); + return { + tool: "root", + root, + packages: [root] + }; + } + var directories = globby.sync(tool.packageGlobs, { + cwd, + onlyDirectories: true, + expandDirectories: false, + ignore: ["**/node_modules"] + }).map(function(p) { + return path$6.resolve(cwd, p); + }); + var pkgJsonsMissingNameField = []; + var results = directories.sort().map(function(dir) { + try { + var packageJson = fs.readJsonSync(path$6.join(dir, "package.json")); + if (!packageJson.name) pkgJsonsMissingNameField.push(path$6.relative(cwd, path$6.join(dir, "package.json"))); + return { + packageJson, + dir + }; + } catch (err) { + if (err.code === "ENOENT") return null; + throw err; + } + }).filter(function(x) { + return x; + }); + if (pkgJsonsMissingNameField.length !== 0) { + pkgJsonsMissingNameField.sort(); + throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); + } + return { + tool: tool.type, + root: { + dir: cwd, + packageJson: pkg + }, + packages: results + }; + } + exports.PackageJsonMissingNameError = PackageJsonMissingNameError; + exports.getPackages = getPackages; + exports.getPackagesSync = getPackagesSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+get-packages@1.1.3/node_modules/@manypkg/get-packages/dist/get-packages.cjs.js +var require_get_packages_cjs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + if (process.env.NODE_ENV === "production") module.exports = require_get_packages_cjs_prod(); + else module.exports = require_get_packages_cjs_dev(); +})); +//#endregion +//#region ../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js +var require_is_windows = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! + * is-windows + * + * Copyright © 2015-2018, Jon Schlinkert. + * Released under the MIT License. + */ + (function(factory) { + if (exports && typeof exports === "object" && typeof module !== "undefined") module.exports = factory(); + else if (typeof define === "function" && define.amd) define([], factory); + else if (typeof window !== "undefined") window.isWindows = factory(); + else if (typeof global !== "undefined") global.isWindows = factory(); + else if (typeof self !== "undefined") self.isWindows = factory(); + else this.isWindows = factory(); + })(function() { + "use strict"; + return function isWindows() { + return process && (process.platform === "win32" || /^(msys|cygwin)$/.test(process.env.OSTYPE)); + }; + }); +})); +//#endregion +//#region ../../node_modules/.pnpm/better-path-resolve@1.0.0/node_modules/better-path-resolve/index.js +var require_better_path_resolve = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$5 = __require("path"); + module.exports = require_is_windows()() ? winResolve : path$5.resolve; + function winResolve(p) { + if (arguments.length === 0) return path$5.resolve(); + if (typeof p !== "string") return path$5.resolve(p); + if (p[1] === ":") { + const cc = p[0].charCodeAt(); + if (cc < 65 || cc > 90) p = `${p[0].toUpperCase()}${p.substr(1)}`; + } + if (p.endsWith(":")) return p; + return path$5.resolve(p); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/is-subdir@1.2.0/node_modules/is-subdir/index.js +var require_is_subdir = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const betterPathResolve = require_better_path_resolve(); + const path$4 = __require("path"); + function isSubdir(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path$4.sep}`; + return `${betterPathResolve(subdir)}${path$4.sep}`.startsWith(rParent); + } + isSubdir.strict = function isSubdirStrict(parentDir, subdir) { + const rParent = `${betterPathResolve(parentDir)}${path$4.sep}`; + const rDir = `${betterPathResolve(subdir)}${path$4.sep}`; + return rDir !== rParent && rDir.startsWith(rParent); + }; + module.exports = isSubdir; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+git@3.0.4/node_modules/@changesets/git/dist/changesets-git.cjs.js +var require_changesets_git_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var spawn = require_spawndamnit(); + var fs = __require("fs"); + var path$3 = __require("path"); + var getPackages = require_get_packages_cjs(); + var errors = (init_changesets_errors_cjs(), __toCommonJS(changesets_errors_cjs_exports)); + var isSubdir = require_is_subdir(); + var micromatch = require_micromatch(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var spawn__default = /*#__PURE__*/ _interopDefault(spawn); + var fs__default = /*#__PURE__*/ _interopDefault(fs); + var path__default = /*#__PURE__*/ _interopDefault(path$3); + var isSubdir__default = /*#__PURE__*/ _interopDefault(isSubdir); + var micromatch__default = /*#__PURE__*/ _interopDefault(micromatch); + async function add(pathToFile, cwd) { + const gitCmd = await spawn__default["default"]("git", ["add", pathToFile], { cwd }); + if (gitCmd.code !== 0) console.log(pathToFile, gitCmd.stderr.toString()); + return gitCmd.code === 0; + } + async function commit(message, cwd) { + return (await spawn__default["default"]("git", [ + "commit", + "-m", + message, + "--allow-empty" + ], { cwd })).code === 0; + } + async function getAllTags(cwd) { + const gitCmd = await spawn__default["default"]("git", ["tag"], { cwd }); + if (gitCmd.code !== 0) throw new Error(gitCmd.stderr.toString()); + const tags = gitCmd.stdout.toString().trim().split("\n"); + return new Set(tags); + } + async function tag(tagStr, cwd) { + return (await spawn__default["default"]("git", [ + "tag", + tagStr, + "-m", + tagStr + ], { cwd })).code === 0; + } + async function getDivergedCommit(cwd, ref) { + const cmd = await spawn__default["default"]("git", [ + "merge-base", + ref, + "HEAD" + ], { cwd }); + if (cmd.code !== 0) throw new Error(`Failed to find where HEAD diverged from "${ref}". Does "${ref}" exist and it's synced with remote?`); + return cmd.stdout.toString().trim(); + } + /** + * Get the SHAs for the commits that added files, including automatically + * extending a shallow clone if necessary to determine any commits. + * @param gitPaths - Paths to fetch + * @param options - `cwd` and `short` + */ + async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) { + const map = /* @__PURE__ */ new Map(); + let remaining = gitPaths; + do { + const commitInfos = await Promise.all(remaining.map(async (gitPath) => { + const [commitSha, parentSha] = (await spawn__default["default"]("git", [ + "log", + "--diff-filter=A", + "--max-count=1", + short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", + gitPath + ], { cwd })).stdout.toString().split(":"); + return { + path: gitPath, + commitSha, + parentSha + }; + })); + let commitsWithMissingParents = []; + for (const info of commitInfos) if (info.commitSha) if (info.parentSha) map.set(info.path, info.commitSha); + else commitsWithMissingParents.push(info); + if (commitsWithMissingParents.length === 0) break; + if (await isRepoShallow({ cwd })) { + await deepenCloneBy({ + by: 50, + cwd + }); + remaining = commitsWithMissingParents.map((p) => p.path); + } else { + for (const unresolved of commitsWithMissingParents) map.set(unresolved.path, unresolved.commitSha); + break; + } + } while (true); + return gitPaths.map((p) => map.get(p)); + } + async function isRepoShallow({ cwd }) { + const isShallowRepoOutput = (await spawn__default["default"]("git", ["rev-parse", "--is-shallow-repository"], { cwd })).stdout.toString().trim(); + if (isShallowRepoOutput === "--is-shallow-repository") { + const gitDir = (await spawn__default["default"]("git", ["rev-parse", "--git-dir"], { cwd })).stdout.toString().trim(); + const fullGitDir = path__default["default"].resolve(cwd, gitDir); + return fs__default["default"].existsSync(path__default["default"].join(fullGitDir, "shallow")); + } else return isShallowRepoOutput === "true"; + } + async function deepenCloneBy({ by, cwd }) { + await spawn__default["default"]("git", ["fetch", `--deepen=${by}`], { cwd }); + } + async function getRepoRoot({ cwd }) { + const { stdout, code, stderr } = await spawn__default["default"]("git", ["rev-parse", "--show-toplevel"], { cwd }); + if (code !== 0) throw new Error(stderr.toString()); + return stdout.toString().trim().replace(/\n|\r/g, ""); + } + async function getChangedFilesSince({ cwd, ref, fullPath = false }) { + const divergedAt = await getDivergedCommit(cwd, ref); + const cmd = await spawn__default["default"]("git", [ + "diff", + "--name-only", + "--no-relative", + divergedAt + ], { cwd }); + if (cmd.code !== 0) throw new Error(`Failed to diff against ${divergedAt}. Is ${divergedAt} a valid ref?`); + const files = cmd.stdout.toString().trim().split("\n").filter((a) => a); + if (!fullPath) return files; + const repoRoot = await getRepoRoot({ cwd }); + return files.map((file) => path__default["default"].resolve(repoRoot, file)); + } + async function getChangedChangesetFilesSinceRef({ cwd, ref }) { + try { + const divergedAt = await getDivergedCommit(cwd, ref); + const cmd = await spawn__default["default"]("git", [ + "diff", + "--name-only", + "--diff-filter=d", + "--no-relative", + divergedAt + ], { cwd }); + let tester = /.changeset\/[^/]+\.md$/; + return cmd.stdout.toString().trim().split("\n").filter((file) => tester.test(file)); + } catch (err) { + if (err instanceof errors.GitError) return []; + throw err; + } + } + async function getChangedPackagesSinceRef({ cwd, ref, changedFilePatterns = ["**"] }) { + const changedFiles = await getChangedFilesSince({ + ref, + cwd, + fullPath: true + }); + return [...(await getPackages.getPackages(cwd)).packages].sort((pkgA, pkgB) => pkgB.dir.length - pkgA.dir.length).filter((pkg) => { + const changedPackageFiles = []; + for (let i = changedFiles.length - 1; i >= 0; i--) { + const file = changedFiles[i]; + if (isSubdir__default["default"](pkg.dir, file)) { + changedFiles.splice(i, 1); + const relativeFile = file.slice(pkg.dir.length + 1); + changedPackageFiles.push(relativeFile); + } + } + return changedPackageFiles.length > 0 && micromatch__default["default"](changedPackageFiles, changedFilePatterns).length > 0; + }); + } + async function tagExists(tagStr, cwd) { + return !!(await spawn__default["default"]("git", [ + "tag", + "-l", + tagStr + ], { cwd })).stdout.toString().trim(); + } + async function getCurrentCommitId({ cwd, short = false }) { + return (await spawn__default["default"]("git", [ + "rev-parse", + short && "--short", + "HEAD" + ].filter(Boolean), { cwd })).stdout.toString().trim(); + } + async function remoteTagExists(tagStr) { + return !!(await spawn__default["default"]("git", [ + "ls-remote", + "--tags", + "origin", + "-l", + tagStr + ])).stdout.toString().trim(); + } + exports.add = add; + exports.commit = commit; + exports.deepenCloneBy = deepenCloneBy; + exports.getAllTags = getAllTags; + exports.getChangedChangesetFilesSinceRef = getChangedChangesetFilesSinceRef; + exports.getChangedFilesSince = getChangedFilesSince; + exports.getChangedPackagesSinceRef = getChangedPackagesSinceRef; + exports.getCommitsThatAddFiles = getCommitsThatAddFiles; + exports.getCurrentCommitId = getCurrentCommitId; + exports.getDivergedCommit = getDivergedCommit; + exports.isRepoShallow = isRepoShallow; + exports.remoteTagExists = remoteTagExists; + exports.tag = tag; + exports.tagExists = tagExists; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+git@3.0.4/node_modules/@changesets/git/dist/changesets-git.cjs.mjs +var changesets_git_cjs_exports = /* @__PURE__ */ __exportAll({ + add: () => import_changesets_git_cjs.add, + commit: () => import_changesets_git_cjs.commit, + deepenCloneBy: () => import_changesets_git_cjs.deepenCloneBy, + getAllTags: () => import_changesets_git_cjs.getAllTags, + getChangedChangesetFilesSinceRef: () => import_changesets_git_cjs.getChangedChangesetFilesSinceRef, + getChangedFilesSince: () => import_changesets_git_cjs.getChangedFilesSince, + getChangedPackagesSinceRef: () => import_changesets_git_cjs.getChangedPackagesSinceRef, + getCommitsThatAddFiles: () => import_changesets_git_cjs.getCommitsThatAddFiles, + getCurrentCommitId: () => import_changesets_git_cjs.getCurrentCommitId, + getDivergedCommit: () => import_changesets_git_cjs.getDivergedCommit, + isRepoShallow: () => import_changesets_git_cjs.isRepoShallow, + remoteTagExists: () => import_changesets_git_cjs.remoteTagExists, + tag: () => import_changesets_git_cjs.tag, + tagExists: () => import_changesets_git_cjs.tagExists +}); +var import_changesets_git_cjs; +var init_changesets_git_cjs = __esmMin((() => { + import_changesets_git_cjs = require_changesets_git_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js +var require_p_map = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pMap = (iterable, mapper, options) => new Promise((resolve, reject) => { + options = Object.assign({ concurrency: Infinity }, options); + if (typeof mapper !== "function") throw new TypeError("Mapper function is required"); + const { concurrency } = options; + if (!(typeof concurrency === "number" && concurrency >= 1)) throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); + const ret = []; + const iterator = iterable[Symbol.iterator](); + let isRejected = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const next = () => { + if (isRejected) return; + const nextItem = iterator.next(); + const i = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0) resolve(ret); + return; + } + resolvingCount++; + Promise.resolve(nextItem.value).then((element) => mapper(element, i)).then((value) => { + ret[i] = value; + resolvingCount--; + next(); + }, (error) => { + isRejected = true; + reject(error); + }); + }; + for (let i = 0; i < concurrency; i++) { + next(); + if (isIterableDone) break; + } + }); + module.exports = pMap; + module.exports.default = pMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js +var require_p_filter = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const pMap = require_p_map(); + const pFilter = async (iterable, filterer, options) => { + return (await pMap(iterable, (element, index) => Promise.all([filterer(element, index), element]), options)).filter((value) => Boolean(value[0])).map((value) => value[1]); + }; + module.exports = pFilter; + module.exports.default = pFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+logger@0.1.1/node_modules/@changesets/logger/dist/changesets-logger.cjs.js +var require_changesets_logger_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var pc = require_picocolors(); + var util = __require("util"); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var pc__default = /*#__PURE__*/ _interopDefault(pc); + var util__default = /*#__PURE__*/ _interopDefault(util); + let prefix = "🦋 "; + function format(args, customPrefix) { + let fullPrefix = prefix + (customPrefix === void 0 ? "" : " " + customPrefix); + return fullPrefix + util__default["default"].format("", ...args).split("\n").join("\n" + fullPrefix + " "); + } + function error(...args) { + console.error(format(args, pc__default["default"].red("error"))); + } + function info(...args) { + console.info(format(args, pc__default["default"].cyan("info"))); + } + function log(...args) { + console.log(format(args)); + } + function success(...args) { + console.log(format(args, pc__default["default"].green("success"))); + } + function warn(...args) { + console.warn(format(args, pc__default["default"].yellow("warn"))); + } + exports.error = error; + exports.info = info; + exports.log = log; + exports.prefix = prefix; + exports.success = success; + exports.warn = warn; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+logger@0.1.1/node_modules/@changesets/logger/dist/changesets-logger.cjs.mjs +var changesets_logger_cjs_exports = /* @__PURE__ */ __exportAll({ + error: () => import_changesets_logger_cjs.error, + info: () => import_changesets_logger_cjs.info, + log: () => import_changesets_logger_cjs.log, + prefix: () => import_changesets_logger_cjs.prefix, + success: () => import_changesets_logger_cjs.success, + warn: () => import_changesets_logger_cjs.warn +}); +var import_changesets_logger_cjs; +var init_changesets_logger_cjs = __esmMin((() => { + import_changesets_logger_cjs = require_changesets_logger_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+read@0.6.7/node_modules/@changesets/read/dist/changesets-read.cjs.js +var require_changesets_read_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var fs = require_lib$1(); + var path$2 = __require("path"); + var parse = (init_changesets_parse_cjs(), __toCommonJS(changesets_parse_cjs_exports)); + var git = (init_changesets_git_cjs(), __toCommonJS(changesets_git_cjs_exports)); + var pc = require_picocolors(); + var pFilter = require_p_filter(); + var logger = (init_changesets_logger_cjs(), __toCommonJS(changesets_logger_cjs_exports)); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) Object.keys(e).forEach(function(k) { + if (k !== "default") { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function() { + return e[k]; + } + }); + } + }); + n["default"] = e; + return Object.freeze(n); + } + var fs__namespace = /*#__PURE__*/ _interopNamespace(fs); + var path__default = /*#__PURE__*/ _interopDefault(path$2); + var parse__default = /*#__PURE__*/ _interopDefault(parse); + var git__namespace = /*#__PURE__*/ _interopNamespace(git); + var pc__default = /*#__PURE__*/ _interopDefault(pc); + var pFilter__default = /*#__PURE__*/ _interopDefault(pFilter); + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + let importantSeparator = pc__default["default"].red("===============================IMPORTANT!==============================="); + let importantEnd = pc__default["default"].red("----------------------------------------------------------------------"); + async function getOldChangesets(changesetBase, dirs) { + const changesetContents = (await pFilter__default["default"](dirs, async (dir) => (await fs__namespace.lstat(path__default["default"].join(changesetBase, dir))).isDirectory())).map(async (changesetDir) => { + const jsonPath = path__default["default"].join(changesetBase, changesetDir, "changes.json"); + const [summary, json] = await Promise.all([fs__namespace.readFile(path__default["default"].join(changesetBase, changesetDir, "changes.md"), "utf-8"), fs__namespace.readJson(jsonPath)]); + return { + releases: json.releases, + summary, + id: changesetDir + }; + }); + return Promise.all(changesetContents); + } + async function getOldChangesetsAndWarn(changesetBase, dirs) { + let oldChangesets = await getOldChangesets(changesetBase, dirs); + if (oldChangesets.length === 0) return []; + logger.warn(importantSeparator); + logger.warn("There were old changesets from version 1 found"); + logger.warn("These are being applied now but the dependents graph may have changed"); + logger.warn("Make sure you validate all your dependencies"); + logger.warn("In a future major version, we will no longer apply these old changesets, and will instead throw here"); + logger.warn(importantEnd); + return oldChangesets; + } + async function filterChangesetsSinceRef(changesets, changesetBase, sinceRef) { + const newHashes = (await git__namespace.getChangedChangesetFilesSinceRef({ + cwd: changesetBase, + ref: sinceRef + })).map((c) => c.split("/").pop()); + return changesets.filter((dir) => newHashes.includes(dir)); + } + async function getChangesets(rootDir, sinceRef) { + let changesetBase = path__default["default"].join(rootDir, ".changeset"); + let contents; + try { + contents = await fs__namespace["default"].readdir(changesetBase); + } catch (err) { + if (err.code === "ENOENT") throw new Error("There is no .changeset directory in this project"); + throw err; + } + if (sinceRef !== void 0) contents = await filterChangesetsSinceRef(contents, changesetBase, sinceRef); + let oldChangesetsPromise = getOldChangesetsAndWarn(changesetBase, contents); + const changesetContents = contents.filter((file) => !file.startsWith(".") && file.endsWith(".md") && !/^README\.md$/i.test(file)).map(async (file) => { + const changeset = await fs__namespace["default"].readFile(path__default["default"].join(changesetBase, file), "utf-8"); + return _objectSpread2(_objectSpread2({}, parse__default["default"](changeset)), {}, { id: file.replace(".md", "") }); + }); + return [...await oldChangesetsPromise, ...await Promise.all(changesetContents)]; + } + exports["default"] = getChangesets; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+read@0.6.7/node_modules/@changesets/read/dist/changesets-read.cjs.default.js +var require_changesets_read_cjs_default = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports._default = require_changesets_read_cjs().default; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+read@0.6.7/node_modules/@changesets/read/dist/changesets-read.cjs.mjs +var changesets_read_cjs_exports = /* @__PURE__ */ __exportAll({ default: () => import_changesets_read_cjs_default._default }), import_changesets_read_cjs_default; +var init_changesets_read_cjs = __esmMin((() => { + require_changesets_read_cjs(); + import_changesets_read_cjs_default = require_changesets_read_cjs_default(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+config@3.1.4/node_modules/@changesets/config/dist/changesets-config.cjs.js +var require_changesets_config_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var fs = require_lib$1(); + var path$1 = __require("path"); + var micromatch = require_micromatch(); + var errors = (init_changesets_errors_cjs(), __toCommonJS(changesets_errors_cjs_exports)); + var logger = (init_changesets_logger_cjs(), __toCommonJS(changesets_logger_cjs_exports)); + var getPackages = require_get_packages_cjs(); + var getDependentsGraph = (init_changesets_get_dependents_graph_cjs(), __toCommonJS(changesets_get_dependents_graph_cjs_exports)); + var shouldSkipPackage = (init_changesets_should_skip_package_cjs(), __toCommonJS(changesets_should_skip_package_cjs_exports)); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) Object.keys(e).forEach(function(k) { + if (k !== "default") { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function() { + return e[k]; + } + }); + } + }); + n["default"] = e; + return Object.freeze(n); + } + var fs__namespace = /*#__PURE__*/ _interopNamespace(fs); + var path__default = /*#__PURE__*/ _interopDefault(path$1); + var micromatch__default = /*#__PURE__*/ _interopDefault(micromatch); + let defaultWrittenConfig = { + $schema: `https://unpkg.com/@changesets/config@${{ + name: "@changesets/config", + version: "3.1.4", + description: "Utilities for reading and parsing Changeset's config", + main: "dist/changesets-config.cjs.js", + module: "dist/changesets-config.esm.js", + exports: { + ".": { + types: { + "import": "./dist/changesets-config.cjs.mjs", + "default": "./dist/changesets-config.cjs.js" + }, + module: "./dist/changesets-config.esm.js", + "import": "./dist/changesets-config.cjs.mjs", + "default": "./dist/changesets-config.cjs.js" + }, + "./package.json": "./package.json", + "./schema.json": "./schema.json" + }, + license: "MIT", + repository: "https://github.com/changesets/changesets/tree/main/packages/config", + files: ["dist", "schema.json"], + dependencies: { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.4", + "@changesets/logger": "^0.1.1", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + micromatch: "^4.0.8" + }, + devDependencies: { + "@changesets/test-utils": "*", + "@types/micromatch": "^4.0.1", + "jest-in-case": "^1.0.2", + outdent: "^0.5.0" + }, + preconstruct: { exports: { extra: { "./schema.json": "./schema.json" } } } + }.version}/schema.json`, + changelog: "@changesets/cli/changelog", + commit: false, + fixed: [], + linked: [], + access: "restricted", + baseBranch: "master", + updateInternalDependencies: "patch", + ignore: [] + }; + function flatten(arr) { + return [].concat(...arr); + } + function getNormalizedChangelogOption(thing) { + if (thing === false) return false; + if (typeof thing === "string") return [thing, null]; + return thing; + } + function getNormalizedCommitOption(thing) { + if (thing === false) return false; + if (thing === true) return ["@changesets/cli/commit", { skipCI: "version" }]; + if (typeof thing === "string") return [thing, null]; + return thing; + } + function getUnmatchedPatterns(listOfPackageNamesOrGlob, pkgNames) { + return listOfPackageNamesOrGlob.filter((pkgNameOrGlob) => !pkgNames.some((pkgName) => micromatch__default["default"].isMatch(pkgName, pkgNameOrGlob))); + } + const havePackageGroupsCorrectShape = (pkgGroups) => { + return isArray(pkgGroups) && pkgGroups.every((arr) => isArray(arr) && arr.every((pkgName) => typeof pkgName === "string")); + }; + function isArray(arg) { + return Array.isArray(arg); + } + let read = async (cwd, packages) => { + packages !== null && packages !== void 0 || (packages = await getPackages.getPackages(cwd)); + return parse(await fs__namespace.readJSON(path__default["default"].join(packages.root.dir, ".changeset", "config.json")), packages); + }; + let parse = (json, packages) => { + var _json$privatePackages, _json$privatePackages2, _json$changedFilePatt, _json$snapshot$prerel, _json$snapshot, _json$snapshot2, _json$___experimental, _json$___experimental2, _json$___experimental3, _json$___experimental4; + let messages = []; + let pkgNames = packages.packages.map(({ packageJson }) => packageJson.name); + if (json.changelog !== void 0 && json.changelog !== false && typeof json.changelog !== "string" && !(isArray(json.changelog) && json.changelog.length === 2 && typeof json.changelog[0] === "string")) messages.push(`The \`changelog\` option is set as ${JSON.stringify(json.changelog, null, 2)} when the only valid values are undefined, false, a module path(e.g. "@changesets/cli/changelog" or "./some-module") or a tuple with a module path and config for the changelog generator(e.g. ["@changesets/cli/changelog", { someOption: true }])`); + let normalizedAccess = json.access; + if (json.access === "private") { + normalizedAccess = "restricted"; + logger.warn("The `access` option is set as \"private\", but this is actually not a valid value - the correct form is \"restricted\"."); + } + if (normalizedAccess !== void 0 && normalizedAccess !== "restricted" && normalizedAccess !== "public") messages.push(`The \`access\` option is set as ${JSON.stringify(normalizedAccess, null, 2)} when the only valid values are undefined, "public" or "restricted"`); + if (json.commit !== void 0 && typeof json.commit !== "boolean" && typeof json.commit !== "string" && !(isArray(json.commit) && json.commit.length === 2 && typeof json.commit[0] === "string")) messages.push(`The \`commit\` option is set as ${JSON.stringify(json.commit, null, 2)} when the only valid values are undefined or a boolean or a module path (e.g. "@changesets/cli/commit" or "./some-module") or a tuple with a module path and config for the commit message generator (e.g. ["@changesets/cli/commit", { "skipCI": "version" }])`); + if (json.baseBranch !== void 0 && typeof json.baseBranch !== "string") messages.push(`The \`baseBranch\` option is set as ${JSON.stringify(json.baseBranch, null, 2)} but the \`baseBranch\` option can only be set as a string`); + if (json.changedFilePatterns !== void 0 && (!isArray(json.changedFilePatterns) || !json.changedFilePatterns.every((pattern) => typeof pattern === "string"))) messages.push(`The \`changedFilePatterns\` option is set as ${JSON.stringify(json.changedFilePatterns, null, 2)} but the \`changedFilePatterns\` option can only be set as an array of strings`); + let fixed = []; + if (json.fixed !== void 0) if (!havePackageGroupsCorrectShape(json.fixed)) messages.push(`The \`fixed\` option is set as ${JSON.stringify(json.fixed, null, 2)} when the only valid values are undefined or an array of arrays of package names`); + else { + let foundPkgNames = /* @__PURE__ */ new Set(); + let duplicatedPkgNames = /* @__PURE__ */ new Set(); + for (let fixedGroup of json.fixed) { + messages.push(...getUnmatchedPatterns(fixedGroup, pkgNames).map((pkgOrGlob) => `The package or glob expression "${pkgOrGlob}" specified in the \`fixed\` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); + let expandedFixedGroup = micromatch__default["default"](pkgNames, fixedGroup); + fixed.push(expandedFixedGroup); + for (let fixedPkgName of expandedFixedGroup) { + if (foundPkgNames.has(fixedPkgName)) duplicatedPkgNames.add(fixedPkgName); + foundPkgNames.add(fixedPkgName); + } + } + if (duplicatedPkgNames.size) duplicatedPkgNames.forEach((pkgName) => { + messages.push(`The package "${pkgName}" is defined in multiple sets of fixed packages. Packages can only be defined in a single set of fixed packages. If you are using glob expressions, make sure that they are valid according to https://www.npmjs.com/package/micromatch`); + }); + } + let linked = []; + if (json.linked !== void 0) if (!havePackageGroupsCorrectShape(json.linked)) messages.push(`The \`linked\` option is set as ${JSON.stringify(json.linked, null, 2)} when the only valid values are undefined or an array of arrays of package names`); + else { + let foundPkgNames = /* @__PURE__ */ new Set(); + let duplicatedPkgNames = /* @__PURE__ */ new Set(); + for (let linkedGroup of json.linked) { + messages.push(...getUnmatchedPatterns(linkedGroup, pkgNames).map((pkgOrGlob) => `The package or glob expression "${pkgOrGlob}" specified in the \`linked\` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); + let expandedLinkedGroup = micromatch__default["default"](pkgNames, linkedGroup); + linked.push(expandedLinkedGroup); + for (let linkedPkgName of expandedLinkedGroup) { + if (foundPkgNames.has(linkedPkgName)) duplicatedPkgNames.add(linkedPkgName); + foundPkgNames.add(linkedPkgName); + } + } + if (duplicatedPkgNames.size) duplicatedPkgNames.forEach((pkgName) => { + messages.push(`The package "${pkgName}" is defined in multiple sets of linked packages. Packages can only be defined in a single set of linked packages. If you are using glob expressions, make sure that they are valid according to https://www.npmjs.com/package/micromatch`); + }); + } + const allFixedPackages = new Set(flatten(fixed)); + const allLinkedPackages = new Set(flatten(linked)); + allFixedPackages.forEach((pkgName) => { + if (allLinkedPackages.has(pkgName)) messages.push(`The package "${pkgName}" can be found in both fixed and linked groups. A package can only be either fixed or linked.`); + }); + if (json.updateInternalDependencies !== void 0 && !["patch", "minor"].includes(json.updateInternalDependencies)) messages.push(`The \`updateInternalDependencies\` option is set as ${JSON.stringify(json.updateInternalDependencies, null, 2)} but can only be 'patch' or 'minor'`); + if (json.privatePackages !== void 0 && json.privatePackages !== false) if (typeof json.privatePackages !== "object") messages.push(`The \`privatePackages\` option is set as ${JSON.stringify(json.privatePackages, null, 2)} when the only valid values are undefined, false, or an object with optional boolean \`version\` and \`tag\` properties`); + else { + if (json.privatePackages.version !== void 0 && typeof json.privatePackages.version !== "boolean") messages.push(`The \`privatePackages.version\` option is set as ${JSON.stringify(json.privatePackages.version, null, 2)} but the only valid values are undefined or a boolean`); + if (json.privatePackages.tag !== void 0 && typeof json.privatePackages.tag !== "boolean") messages.push(`The \`privatePackages.tag\` option is set as ${JSON.stringify(json.privatePackages.tag, null, 2)} but the only valid values are undefined or a boolean`); + } + const privatePackages = json.privatePackages === false ? { + tag: false, + version: false + } : json.privatePackages ? { + version: (_json$privatePackages = json.privatePackages.version) !== null && _json$privatePackages !== void 0 ? _json$privatePackages : true, + tag: (_json$privatePackages2 = json.privatePackages.tag) !== null && _json$privatePackages2 !== void 0 ? _json$privatePackages2 : false + } : { + version: true, + tag: false + }; + if (json.ignore) if (!(isArray(json.ignore) && json.ignore.every((pkgName) => typeof pkgName === "string"))) messages.push(`The \`ignore\` option is set as ${JSON.stringify(json.ignore, null, 2)} when the only valid values are undefined or an array of package names`); + else messages.push(...getUnmatchedPatterns(json.ignore, pkgNames).map((pkgOrGlob) => `The package or glob expression "${pkgOrGlob}" is specified in the \`ignore\` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); + const ignore = isArray(json.ignore) ? json.ignore : []; + if (ignore.length || !privatePackages.version) { + const dependentsGraph = getDependentsGraph.getDependentsGraph(packages, { + ignoreDevDependencies: true, + bumpVersionsWithWorkspaceProtocolOnly: json.bumpVersionsWithWorkspaceProtocolOnly + }); + const packagesByName = new Map(packages.packages.map((x) => [x.packageJson.name, x])); + for (const pkg of packages.packages) { + if (!shouldSkipPackage.shouldSkipPackage(pkg, { + ignore, + allowPrivatePackages: privatePackages.version + })) continue; + const skippedPackage = pkg.packageJson.name; + const dependents = dependentsGraph.get(skippedPackage) || []; + for (const dependent of dependents) { + const dependentPkg = packagesByName.get(dependent); + if (!dependentPkg) continue; + if (shouldSkipPackage.shouldSkipPackage(dependentPkg, { + ignore, + allowPrivatePackages: privatePackages.version + })) continue; + if (dependentPkg.packageJson.private) continue; + messages.push(`The package "${dependent}" depends on the skipped package "${skippedPackage}", but "${dependent}" is not being skipped. Please add "${dependent}" to the \`ignore\` option.`); + } + } + } + if (json.prettier !== void 0 && typeof json.prettier !== "boolean") messages.push(`The \`prettier\` option is set as ${JSON.stringify(json.prettier, null, 2)} when the only valid values are undefined or a boolean`); + const { snapshot } = json; + if (snapshot !== void 0) { + if (snapshot.useCalculatedVersion !== void 0 && typeof snapshot.useCalculatedVersion !== "boolean") messages.push(`The \`snapshot.useCalculatedVersion\` option is set as ${JSON.stringify(snapshot.useCalculatedVersion, null, 2)} when the only valid values are undefined or a boolean`); + if (snapshot.prereleaseTemplate !== void 0 && typeof snapshot.prereleaseTemplate !== "string") messages.push(`The \`snapshot.prereleaseTemplate\` option is set as ${JSON.stringify(snapshot.prereleaseTemplate, null, 2)} when the only valid values are undefined, or a template string.`); + } + if (json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH !== void 0) { + const { onlyUpdatePeerDependentsWhenOutOfRange, updateInternalDependents, useCalculatedVersionForSnapshots } = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH; + if (onlyUpdatePeerDependentsWhenOutOfRange !== void 0 && typeof onlyUpdatePeerDependentsWhenOutOfRange !== "boolean") messages.push(`The \`onlyUpdatePeerDependentsWhenOutOfRange\` option is set as ${JSON.stringify(onlyUpdatePeerDependentsWhenOutOfRange, null, 2)} when the only valid values are undefined or a boolean`); + if (updateInternalDependents !== void 0 && !["always", "out-of-range"].includes(updateInternalDependents)) messages.push(`The \`updateInternalDependents\` option is set as ${JSON.stringify(updateInternalDependents, null, 2)} but can only be 'always' or 'out-of-range'`); + if (useCalculatedVersionForSnapshots && useCalculatedVersionForSnapshots !== void 0) { + console.warn(`Experimental flag "useCalculatedVersionForSnapshots" is deprecated since snapshot feature became stable. Please use "snapshot.useCalculatedVersion" instead.`); + if (typeof useCalculatedVersionForSnapshots !== "boolean") messages.push(`The \`useCalculatedVersionForSnapshots\` option is set as ${JSON.stringify(useCalculatedVersionForSnapshots, null, 2)} when the only valid values are undefined or a boolean`); + } + } + if (messages.length) throw new errors.ValidationError(`Some errors occurred when validating the changesets config:\n` + messages.join("\n")); + let config = { + changelog: getNormalizedChangelogOption(json.changelog === void 0 ? defaultWrittenConfig.changelog : json.changelog), + access: normalizedAccess === void 0 ? defaultWrittenConfig.access : normalizedAccess, + commit: getNormalizedCommitOption(json.commit === void 0 ? defaultWrittenConfig.commit : json.commit), + fixed, + linked, + baseBranch: json.baseBranch === void 0 ? defaultWrittenConfig.baseBranch : json.baseBranch, + changedFilePatterns: (_json$changedFilePatt = json.changedFilePatterns) !== null && _json$changedFilePatt !== void 0 ? _json$changedFilePatt : ["**"], + updateInternalDependencies: json.updateInternalDependencies === void 0 ? defaultWrittenConfig.updateInternalDependencies : json.updateInternalDependencies, + ignore: json.ignore === void 0 ? defaultWrittenConfig.ignore : micromatch__default["default"](pkgNames, json.ignore), + bumpVersionsWithWorkspaceProtocolOnly: json.bumpVersionsWithWorkspaceProtocolOnly === true, + snapshot: { + prereleaseTemplate: (_json$snapshot$prerel = (_json$snapshot = json.snapshot) === null || _json$snapshot === void 0 ? void 0 : _json$snapshot.prereleaseTemplate) !== null && _json$snapshot$prerel !== void 0 ? _json$snapshot$prerel : null, + useCalculatedVersion: ((_json$snapshot2 = json.snapshot) === null || _json$snapshot2 === void 0 ? void 0 : _json$snapshot2.useCalculatedVersion) !== void 0 ? json.snapshot.useCalculatedVersion : ((_json$___experimental = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental === void 0 ? void 0 : _json$___experimental.useCalculatedVersionForSnapshots) !== void 0 ? (_json$___experimental2 = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental2 === void 0 ? void 0 : _json$___experimental2.useCalculatedVersionForSnapshots : false + }, + ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH: { + onlyUpdatePeerDependentsWhenOutOfRange: json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH === void 0 || json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange === void 0 ? false : json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange, + updateInternalDependents: (_json$___experimental3 = (_json$___experimental4 = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental4 === void 0 ? void 0 : _json$___experimental4.updateInternalDependents) !== null && _json$___experimental3 !== void 0 ? _json$___experimental3 : "out-of-range" + }, + prettier: typeof json.prettier === "boolean" ? json.prettier : true, + privatePackages + }; + if (config.privatePackages.version === false && config.privatePackages.tag === true) throw new errors.ValidationError(`The \`privatePackages.tag\` option is set to \`true\` but \`privatePackages.version\` is set to \`false\`. This is not allowed.`); + return config; + }; + let fakePackage = { + dir: "", + packageJson: { + name: "", + version: "" + } + }; + exports.defaultConfig = parse(defaultWrittenConfig, { + root: fakePackage, + tool: "root", + packages: [fakePackage] + }); + exports.defaultWrittenConfig = defaultWrittenConfig; + exports.parse = parse; + exports.read = read; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+config@3.1.4/node_modules/@changesets/config/dist/changesets-config.cjs.mjs +var changesets_config_cjs_exports = /* @__PURE__ */ __exportAll({ + defaultConfig: () => import_changesets_config_cjs.defaultConfig, + defaultWrittenConfig: () => import_changesets_config_cjs.defaultWrittenConfig, + parse: () => import_changesets_config_cjs.parse, + read: () => import_changesets_config_cjs.read +}); +var import_changesets_config_cjs; +var init_changesets_config_cjs = __esmMin((() => { + import_changesets_config_cjs = require_changesets_config_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+pre@2.0.2/node_modules/@changesets/pre/dist/changesets-pre.cjs.js +var require_changesets_pre_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var fs = require_lib$1(); + var path = __require("path"); + var getPackages = require_get_packages_cjs(); + var errors = (init_changesets_errors_cjs(), __toCommonJS(changesets_errors_cjs_exports)); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) Object.keys(e).forEach(function(k) { + if (k !== "default") { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function() { + return e[k]; + } + }); + } + }); + n["default"] = e; + return Object.freeze(n); + } + var fs__namespace = /*#__PURE__*/ _interopNamespace(fs); + var path__default = /*#__PURE__*/ _interopDefault(path); + function _defineProperty(obj, key, value) { + if (key in obj) Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + else obj[key] = value; + return obj; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }); + else if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + else ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + async function readPreState(cwd) { + let preStatePath = path__default["default"].resolve(cwd, ".changeset", "pre.json"); + let preState; + try { + let contents = await fs__namespace.readFile(preStatePath, "utf8"); + try { + preState = JSON.parse(contents); + } catch (err) { + if (err instanceof SyntaxError) console.error("error parsing json:", contents); + throw err; + } + } catch (err) { + if (err.code !== "ENOENT") throw err; + } + return preState; + } + async function exitPre(cwd) { + let preStatePath = path__default["default"].resolve(cwd, ".changeset", "pre.json"); + let preState = await readPreState(cwd); + if (preState === void 0) throw new errors.PreExitButNotInPreModeError(); + await fs__namespace.outputFile(preStatePath, JSON.stringify(_objectSpread2(_objectSpread2({}, preState), {}, { mode: "exit" }), null, 2) + "\n"); + } + async function enterPre(cwd, tag) { + var _preState$changesets; + let packages = await getPackages.getPackages(cwd); + let preStatePath = path__default["default"].resolve(packages.root.dir, ".changeset", "pre.json"); + let preState = await readPreState(packages.root.dir); + if ((preState === null || preState === void 0 ? void 0 : preState.mode) === "pre") throw new errors.PreEnterButInPreModeError(); + let newPreState = { + mode: "pre", + tag, + initialVersions: {}, + changesets: (_preState$changesets = preState === null || preState === void 0 ? void 0 : preState.changesets) !== null && _preState$changesets !== void 0 ? _preState$changesets : [] + }; + for (let pkg of packages.packages) newPreState.initialVersions[pkg.packageJson.name] = pkg.packageJson.version; + await fs__namespace.outputFile(preStatePath, JSON.stringify(newPreState, null, 2) + "\n"); + } + exports.enterPre = enterPre; + exports.exitPre = exitPre; + exports.readPreState = readPreState; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+pre@2.0.2/node_modules/@changesets/pre/dist/changesets-pre.cjs.mjs +var changesets_pre_cjs_exports = /* @__PURE__ */ __exportAll({ + enterPre: () => import_changesets_pre_cjs.enterPre, + exitPre: () => import_changesets_pre_cjs.exitPre, + readPreState: () => import_changesets_pre_cjs.readPreState +}); +var import_changesets_pre_cjs; +var init_changesets_pre_cjs = __esmMin((() => { + import_changesets_pre_cjs = require_changesets_pre_cjs(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.js +var require_changesets_get_release_plan_cjs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var assembleReleasePlan = (init_changesets_assemble_release_plan_cjs(), __toCommonJS(changesets_assemble_release_plan_cjs_exports)); + var readChangesets = (init_changesets_read_cjs(), __toCommonJS(changesets_read_cjs_exports)); + var config = (init_changesets_config_cjs(), __toCommonJS(changesets_config_cjs_exports)); + var getPackages = require_get_packages_cjs(); + var pre = (init_changesets_pre_cjs(), __toCommonJS(changesets_pre_cjs_exports)); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var assembleReleasePlan__default = /*#__PURE__*/ _interopDefault(assembleReleasePlan); + var readChangesets__default = /*#__PURE__*/ _interopDefault(readChangesets); + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + async function getReleasePlan(cwd, sinceRef, passedConfig) { + const packages = await getPackages.getPackages(cwd); + const preState = await pre.readPreState(packages.root.dir); + const readConfig = await config.read(packages.root.dir, packages); + const config$1 = passedConfig ? _objectSpread2(_objectSpread2({}, readConfig), passedConfig) : readConfig; + const changesets = await readChangesets__default["default"](packages.root.dir, sinceRef); + return assembleReleasePlan__default["default"](changesets, packages, config$1, preState); + } + exports["default"] = getReleasePlan; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.default.js +var require_changesets_get_release_plan_cjs_default = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports._default = require_changesets_get_release_plan_cjs().default; +})); +//#endregion +//#region ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.mjs +var import_execa = require_execa(); +require_changesets_get_release_plan_cjs(); +var import_changesets_get_release_plan_cjs_default = require_changesets_get_release_plan_cjs_default(); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js +var require_valid = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const parse = require_parse$2(); + const valid = (version, options) => { + const v = parse(version, options); + return v ? v.version : null; + }; + module.exports = valid; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js +var require_clean = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const parse = require_parse$2(); + const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module.exports = clean; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js +var require_diff = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const parse = require_parse$2(); + const diff = (version1, version2) => { + const v1 = parse(version1, null, true); + const v2 = parse(version2, null, true); + const comparison = v1.compare(v2); + if (comparison === 0) return null; + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v1 : v2; + const lowVersion = v1Higher ? v2 : v1; + const highHasPre = !!highVersion.prerelease.length; + if (!!lowVersion.prerelease.length && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) return "major"; + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) return "minor"; + return "patch"; + } + } + const prefix = highHasPre ? "pre" : ""; + if (v1.major !== v2.major) return prefix + "major"; + if (v1.minor !== v2.minor) return prefix + "minor"; + if (v1.patch !== v2.patch) return prefix + "patch"; + return "prerelease"; + }; + module.exports = diff; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js +var require_major = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const major = (a, loose) => new SemVer(a, loose).major; + module.exports = major; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js +var require_minor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const minor = (a, loose) => new SemVer(a, loose).minor; + module.exports = minor; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js +var require_patch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const patch = (a, loose) => new SemVer(a, loose).patch; + module.exports = patch; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js +var require_prerelease = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const parse = require_parse$2(); + const prerelease = (version, options) => { + const parsed = parse(version, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module.exports = prerelease; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js +var require_rcompare = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const rcompare = (a, b, loose) => compare(b, a, loose); + module.exports = rcompare; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js +var require_compare_loose = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compare = require_compare(); + const compareLoose = (a, b) => compare(a, b, true); + module.exports = compareLoose; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js +var require_compare_build = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module.exports = compareBuild; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js +var require_sort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compareBuild = require_compare_build(); + const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module.exports = sort; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js +var require_rsort = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const compareBuild = require_compare_build(); + const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module.exports = rsort; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js +var require_coerce = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const parse = require_parse$2(); + const { safeRe: re, t } = require_re(); + const coerce = (version, options) => { + if (version instanceof SemVer) return version; + if (typeof version === "number") version = String(version); + if (typeof version !== "string") return null; + options = options || {}; + let match = null; + if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + else { + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) match = next; + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match === null) return null; + const major = match[2]; + return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options); + }; + module.exports = coerce; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js +var require_truncate = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const parse = require_parse$2(); + const constants = require_constants$3(); + const SemVer = require_semver$1(); + const truncate = (version, truncation, options) => { + if (!constants.RELEASE_TYPES.includes(truncation)) return null; + const clonedVersion = cloneInputVersion(version, options); + return clonedVersion && doTruncation(clonedVersion, truncation); + }; + const cloneInputVersion = (version, options) => { + return parse(version instanceof SemVer ? version.version : version, options); + }; + const doTruncation = (version, truncation) => { + if (isPrerelease(truncation)) return version.version; + version.prerelease = []; + switch (truncation) { + case "major": + version.minor = 0; + version.patch = 0; + break; + case "minor": + version.patch = 0; + break; + } + return version.format(); + }; + const isPrerelease = (type) => { + return type.startsWith("pre"); + }; + module.exports = truncate; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Range = require_range(); + const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module.exports = toComparators; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module.exports = maxSatisfying; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module.exports = minSatisfying; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js +var require_min_version = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const Range = require_range(); + const gt = require_gt(); + const minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) return minver; + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) return minver; + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) compver.patch++; + else compver.prerelease.push(0); + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) setMin = compver; + break; + case "<": + case "<=": break; + /* istanbul ignore next */ + default: throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) minver = setMin; + } + if (minver && range.test(minver)) return minver; + return null; + }; + module.exports = minVersion; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js +var require_outside = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const SemVer = require_semver$1(); + const Comparator = require_comparator(); + const { ANY } = Comparator; + const Range = require_range(); + const satisfies = require_satisfies(); + const gt = require_gt(); + const lt = require_lt(); + const lte = require_lte(); + const gte = require_gte(); + const outside = (version, range, hilo, options) => { + version = new SemVer(version, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: throw new TypeError("Must provide a hilo val of \"<\" or \">\""); + } + if (satisfies(version, range, options)) return false; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0"); + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) high = comparator; + else if (ltfn(comparator.semver, low.semver, options)) low = comparator; + }); + if (high.operator === comp || high.operator === ecomp) return false; + if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false; + else if (low.operator === ecomp && ltfn(version, low.semver)) return false; + } + return true; + }; + module.exports = outside; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js +var require_gtr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const outside = require_outside(); + const gtr = (version, range, options) => outside(version, range, ">", options); + module.exports = gtr; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js +var require_ltr = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const outside = require_outside(); + const ltr = (version, range, options) => outside(version, range, "<", options); + module.exports = ltr; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js +var require_intersects = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Range = require_range(); + const intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module.exports = intersects; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js +var require_simplify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const satisfies = require_satisfies(); + const compare = require_compare(); + module.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version of v) if (satisfies(version, range, options)) { + prev = version; + if (!first) first = version; + } else { + if (prev) set.push([first, prev]); + prev = null; + first = null; + } + if (first) set.push([first, null]); + const ranges = []; + for (const [min, max] of set) if (min === max) ranges.push(min); + else if (!max && min === v[0]) ranges.push("*"); + else if (!max) ranges.push(`>=${min}`); + else if (min === v[0]) ranges.push(`<=${max}`); + else ranges.push(`${min} - ${max}`); + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js +var require_subset = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Range = require_range(); + const Comparator = require_comparator(); + const { ANY } = Comparator; + const satisfies = require_satisfies(); + const compare = require_compare(); + const subset = (sub, dom, options = {}) => { + if (sub === dom) return true; + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) continue OUTER; + } + if (sawNonNull) return false; + } + return true; + }; + const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + const minimumVersion = [new Comparator(">=0.0.0")]; + const simpleSubset = (sub, dom, options) => { + if (sub === dom) return true; + if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true; + else if (options.includePrerelease) sub = minimumVersionWithPreRelease; + else sub = minimumVersion; + if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true; + else dom = minimumVersion; + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options); + else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options); + else eqSet.add(c.semver); + if (eqSet.size > 1) return null; + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) return null; + else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null; + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) return null; + if (lt && !satisfies(eq, String(lt), options)) return null; + for (const c of dom) if (!satisfies(eq, String(c), options)) return false; + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false; + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false; + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) return false; + } else if (gt.operator === ">=" && !c.test(gt.semver)) return false; + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false; + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) return false; + } else if (lt.operator === "<=" && !c.test(lt.semver)) return false; + } + if (!c.operator && (lt || gt) && gtltComp !== 0) return false; + } + if (gt && hasDomLT && !lt && gtltComp !== 0) return false; + if (lt && hasDomGT && !gt && gtltComp !== 0) return false; + if (needDomGTPre || needDomLTPre) return false; + return true; + }; + const higherGT = (a, b, options) => { + if (!a) return b; + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + const lowerLT = (a, b, options) => { + if (!a) return b; + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module.exports = subset; +})); +//#endregion +//#region util.ts +var import_semver = (/* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const internalRe = require_re(); + const constants = require_constants$3(); + const SemVer = require_semver$1(); + const identifiers = require_identifiers(); + module.exports = { + parse: require_parse$2(), + valid: require_valid(), + clean: require_clean(), + inc: require_inc(), + diff: require_diff(), + major: require_major(), + minor: require_minor(), + patch: require_patch(), + prerelease: require_prerelease(), + compare: require_compare(), + rcompare: require_rcompare(), + compareLoose: require_compare_loose(), + compareBuild: require_compare_build(), + sort: require_sort(), + rsort: require_rsort(), + gt: require_gt(), + lt: require_lt(), + eq: require_eq(), + neq: require_neq(), + gte: require_gte(), + lte: require_lte(), + cmp: require_cmp(), + coerce: require_coerce(), + truncate: require_truncate(), + Comparator: require_comparator(), + Range: require_range(), + satisfies: require_satisfies(), + toComparators: require_to_comparators(), + maxSatisfying: require_max_satisfying(), + minSatisfying: require_min_satisfying(), + minVersion: require_min_version(), + validRange: require_valid$1(), + outside: require_outside(), + gtr: require_gtr(), + ltr: require_ltr(), + intersects: require_intersects(), + simplifyRange: require_simplify(), + subset: require_subset(), + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; +})))(); +async function getPackageVersion() { + const packageJson = await readFile("package.json", "utf8"); + return JSON.parse(packageJson).version; +} +const bumpTypeOrder = [ + "major", + "minor", + "patch", + "none" +]; +async function getNextVersion() { + const currentVersion = await getPackageVersion(); + info(`Current version: ${currentVersion}`); + const bumpType = await getBumpType(); + info(`Bump type: ${bumpType}`); + if (bumpType === "none" || !bumpType) throw new Error("No changesets to release"); + const version = (0, import_semver.inc)(currentVersion, bumpType); + if (!version) throw new Error(`Invalid new version -- current version: ${currentVersion}, bump type: ${bumpType}`); + return { + version, + bumpType + }; +} +async function getBumpType() { + const releasePlan = await (0, import_changesets_get_release_plan_cjs_default._default)(process.cwd()); + info(`Release plan: ${JSON.stringify(releasePlan)}`); + const versionIncreases = releasePlan.releases.map(({ type }) => bumpTypeOrder.indexOf(type)).sort((a, b) => b - a); + return bumpTypeOrder[Math.min(...versionIncreases)]; +} +function formatJson(json) { + return JSON.stringify(json, null, 2) + "\n"; +} +//#endregion +//#region index.ts +async function transformFile(filePath, transformFn) { + await writeFile(filePath, await transformFn(await readFile(filePath, { encoding: "utf8" })), { encoding: "utf8" }); +} +async function bump() { + const { version, bumpType } = await getNextVersion(); + if (bumpType === "major" && version !== getInput("majorVersion")) throw new Error("Cannot apply major version bump. If you want to bump a major version, you must set the \"majorVersion\" input."); + info$2(`bumping to version ${version}`); + setOutput("version", version); + info$2("updating root package.json"); + await updateRootPackageJson(version); + info$2("setting version"); + await (0, import_execa.command)("node_modules/@changesets/cli/bin.js version"); +} +async function updateRootPackageJson(version) { + await transformFile(resolve("package.json"), (packageJson) => formatJson({ + ...JSON.parse(packageJson), + version: `${version}` + })); +} +bump(); +//#endregion +export {}; diff --git a/.github/actions/changesets-fixed-version-bump/index.js b/.github/actions/changesets-fixed-version-bump/index.js deleted file mode 100644 index 1432afbfd5..0000000000 --- a/.github/actions/changesets-fixed-version-bump/index.js +++ /dev/null @@ -1,63655 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 701: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var errors = __nccwpck_require__(6861); -var getDependentsGraph = __nccwpck_require__(9401); -var shouldSkipPackage = __nccwpck_require__(5481); -var semverParse = __nccwpck_require__(9380); -var semverGt = __nccwpck_require__(768); -var path = __nccwpck_require__(6760); -var semverSatisfies = __nccwpck_require__(7226); -var validRange = __nccwpck_require__(6470); -var semverInc = __nccwpck_require__(5651); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var semverParse__default = /*#__PURE__*/_interopDefault(semverParse); -var semverGt__default = /*#__PURE__*/_interopDefault(semverGt); -var path__default = /*#__PURE__*/_interopDefault(path); -var semverSatisfies__default = /*#__PURE__*/_interopDefault(semverSatisfies); -var validRange__default = /*#__PURE__*/_interopDefault(validRange); -var semverInc__default = /*#__PURE__*/_interopDefault(semverInc); - -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} - -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} - -function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} - -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} - -function getHighestReleaseType(releases) { - if (releases.length === 0) { - throw new Error(`Large internal Changesets error when calculating highest release type in the set of releases. Please contact the maintainers`); - } - let highestReleaseType = "none"; - for (let release of releases) { - switch (release.type) { - case "major": - return "major"; - case "minor": - highestReleaseType = "minor"; - break; - case "patch": - if (highestReleaseType === "none") { - highestReleaseType = "patch"; - } - break; - } - } - return highestReleaseType; -} -function getCurrentHighestVersion(packageGroup, packagesByName) { - let highestVersion; - for (let pkgName of packageGroup) { - let pkg = mapGetOrThrowInternal(packagesByName, pkgName, `We were unable to version for package group: ${pkgName} in package group: ${packageGroup.toString()}`); - if (highestVersion === undefined || semverGt__default["default"](pkg.packageJson.version, highestVersion)) { - highestVersion = pkg.packageJson.version; - } - } - return highestVersion; -} -function mapGetOrThrow(map, key, errorMessage) { - const value = map.get(key); - if (value === undefined) { - throw new Error(errorMessage); - } - return value; -} -function mapGetOrThrowInternal(map, key, errorMessage) { - const value = map.get(key); - if (value === undefined) { - throw new errors.InternalError(errorMessage); - } - return value; -} - -/* - WARNING: - Important note for understanding how this package works: - - We are doing some kind of wacky things with manipulating the objects within the - releases array, despite the fact that this was passed to us as an argument. We are - aware that this is generally bad practice, but have decided to to this here as - we control the entire flow of releases. - - We could solve this by inlining this function, or by returning a deep-cloned then - modified array, but we decided both of those are worse than this solution. -*/ -function applyLinks(releases, packagesByName, linked) { - let updated = false; - - // We do this for each set of linked packages - for (let linkedPackages of linked) { - // First we filter down to all the relevant releases for one set of linked packages - let releasingLinkedPackages = [...releases.values()].filter(release => linkedPackages.includes(release.name) && release.type !== "none"); - - // If we proceed any further we do extra work with calculating highestVersion for things that might - // not need one, as they only have workspace based packages - if (releasingLinkedPackages.length === 0) continue; - let highestReleaseType = getHighestReleaseType(releasingLinkedPackages); - let highestVersion = getCurrentHighestVersion(linkedPackages, packagesByName); - - // Finally, we update the packages so all of them are on the highest version - for (let linkedPackage of releasingLinkedPackages) { - if (linkedPackage.type !== highestReleaseType) { - updated = true; - linkedPackage.type = highestReleaseType; - } - if (linkedPackage.oldVersion !== highestVersion) { - updated = true; - linkedPackage.oldVersion = highestVersion; - } - } - } - return updated; -} - -function incrementVersion(release, preInfo) { - if (release.type === "none") { - return release.oldVersion; - } - let version = semverInc__default["default"](release.oldVersion, release.type); - if (preInfo !== undefined && preInfo.state.mode !== "exit") { - let preVersion = mapGetOrThrowInternal(preInfo.preVersions, release.name, `preVersion for ${release.name} does not exist when preState is defined`); - // why are we adding this ourselves rather than passing 'pre' + versionType to semver.inc? - // because semver.inc with prereleases is confusing and this seems easier - version += `-${preInfo.state.tag}.${preVersion}`; - } - return version; -} - -/* - WARNING: - Important note for understanding how this package works: - - We are doing some kind of wacky things with manipulating the objects within the - releases array, despite the fact that this was passed to us as an argument. We are - aware that this is generally bad practice, but have decided to to this here as - we control the entire flow of releases. - - We could solve this by inlining this function, or by returning a deep-cloned then - modified array, but we decided both of those are worse than this solution. -*/ -function determineDependents({ - releases, - packagesByName, - rootDir, - dependencyGraph, - preInfo, - config -}) { - let updated = false; - // NOTE this is intended to be called recursively - let pkgsToSearch = [...releases.values()]; - while (pkgsToSearch.length > 0) { - // nextRelease is our dependency, think of it as "avatar" - const nextRelease = pkgsToSearch.shift(); - if (!nextRelease) continue; - // pkgDependents will be a list of packages that depend on nextRelease ie. ['avatar-group', 'comment'] - const pkgDependents = mapGetOrThrowInternal(dependencyGraph, nextRelease.name, `Error in determining dependents - could not find package in repository: ${nextRelease.name}`); - pkgDependents.map(dependent => { - let type; - const dependentPackage = mapGetOrThrowInternal(packagesByName, dependent, "Dependency map is incorrect"); - if (shouldSkipPackage.shouldSkipPackage(dependentPackage, { - ignore: config.ignore, - allowPrivatePackages: config.privatePackages.version - })) { - type = "none"; - } else { - const dependencyPackage = mapGetOrThrowInternal(packagesByName, nextRelease.name, "Dependency map is incorrect"); - const dependencyVersionRanges = getDependencyVersionRanges(rootDir, dependentPackage.packageJson, nextRelease, dependencyPackage); - for (const { - depType, - versionRange - } of dependencyVersionRanges) { - if (nextRelease.type === "none") { - continue; - } else if (shouldBumpMajor({ - dependent, - depType, - versionRange, - releases, - nextRelease, - preInfo, - onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange - })) { - type = "major"; - } else if ((!releases.has(dependent) || releases.get(dependent).type === "none") && (config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.updateInternalDependents === "always" || !semverSatisfies__default["default"](incrementVersion(nextRelease, preInfo), versionRange))) { - switch (depType) { - case "dependencies": - case "optionalDependencies": - case "peerDependencies": - if (type !== "major" && type !== "minor") { - type = "patch"; - } - break; - case "devDependencies": - { - // We don't need a version bump if the package is only in the devDependencies of the dependent package - if (type !== "major" && type !== "minor" && type !== "patch") { - type = "none"; - } - } - } - } - } - } - if (releases.has(dependent) && releases.get(dependent).type === type) { - type = undefined; - } - return { - name: dependent, - type, - pkgJSON: dependentPackage.packageJson - }; - }).filter(dependentItem => !!dependentItem.type).forEach(({ - name, - type, - pkgJSON - }) => { - // At this point, we know if we are making a change - updated = true; - const existing = releases.get(name); - // For things that are being given a major bump, we check if we have already - // added them here. If we have, we update the existing item instead of pushing it on to search. - // It is safe to not add it to pkgsToSearch because it should have already been searched at the - // largest possible bump type. - - if (existing && type === "major" && existing.type !== "major") { - existing.type = "major"; - pkgsToSearch.push(existing); - } else { - let newDependent = { - name, - type, - oldVersion: pkgJSON.version, - changesets: [] - }; - pkgsToSearch.push(newDependent); - releases.set(name, newDependent); - } - }); - } - return updated; -} - -/* - Returns an array of objects in the shape { depType: DependencyType, versionRange: string } - The array can contain more than one elements in case a dependency appears in multiple - dependency lists. For example, a package that is both a peerDepenency and a devDependency. -*/ -function getDependencyVersionRanges(rootDir, dependentPkgJSON, dependencyRelease, dependencyPackage) { - const DEPENDENCY_TYPES = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]; - const dependencyVersionRanges = []; - for (const type of DEPENDENCY_TYPES) { - var _dependentPkgJSON$typ; - let versionRange = (_dependentPkgJSON$typ = dependentPkgJSON[type]) === null || _dependentPkgJSON$typ === void 0 ? void 0 : _dependentPkgJSON$typ[dependencyRelease.name]; - if (!versionRange) continue; - if (versionRange.startsWith("workspace:")) { - versionRange = versionRange.replace(/^workspace:/, ""); - switch (versionRange) { - case "*": - // workspace:* actually means the current exact version, and not a wildcard similar to a reguler * range - versionRange = dependencyRelease.oldVersion; - break; - case "^": - case "~": - versionRange = `${versionRange}${dependencyRelease.oldVersion}`; - break; - default: - { - if (!validRange__default["default"](versionRange)) { - if (path__default["default"].posix.normalize(versionRange) === path__default["default"].relative(rootDir, dependencyPackage.dir).replace(/\\/g, "/")) { - versionRange = dependencyRelease.oldVersion; - } else { - continue; - } - } - // fallthrough: keep the stripped range as is - } - } - } - dependencyVersionRanges.push({ - depType: type, - versionRange - }); - } - return dependencyVersionRanges; -} -function shouldBumpMajor({ - dependent, - depType, - versionRange, - releases, - nextRelease, - preInfo, - onlyUpdatePeerDependentsWhenOutOfRange -}) { - // we check if it is a peerDependency because if it is, our dependent bump type might need to be major. - return depType === "peerDependencies" && nextRelease.type !== "none" && nextRelease.type !== "patch" && ( - // 1. If onlyUpdatePeerDependentsWhenOutOfRange set to true, bump major if the version is leaving the range. - // 2. If onlyUpdatePeerDependentsWhenOutOfRange set to false, bump major regardless whether or not the version is leaving the range. - !onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default["default"](incrementVersion(nextRelease, preInfo), versionRange)) && ( - // bump major only if the dependent doesn't already has a major release. - !releases.has(dependent) || releases.has(dependent) && releases.get(dependent).type !== "major"); -} - -// This function takes in changesets and returns one release per -function flattenReleases(changesets, packagesByName, config) { - let releases = new Map(); - changesets.forEach(changeset => { - changeset.releases - // Filter out skipped packages because they should not trigger a release - // If their dependencies need updates, they will be added to releases by `determineDependents()` with release type `none` - .filter(({ - name - }) => { - const pkg = mapGetOrThrowInternal(packagesByName, name, `Couldn't find package named "${name}" listed in changeset "${changeset.id}"`); - return !shouldSkipPackage.shouldSkipPackage(pkg, { - ignore: config.ignore, - allowPrivatePackages: config.privatePackages.version - }); - }).forEach(({ - name, - type - }) => { - let pkg = mapGetOrThrowInternal(packagesByName, name, `Couldn't find package named "${name}" listed in changeset "${changeset.id}"`); - let release = releases.get(name); - if (!release) { - release = { - name, - type, - oldVersion: pkg.packageJson.version, - changesets: [changeset.id] - }; - } else { - if (type === "major" || (release.type === "patch" || release.type === "none") && (type === "minor" || type === "patch")) { - release.type = type; - } - // Check whether the bumpType will change - // If the bumpType has changed recalc newVersion - // push new changeset to releases - release.changesets.push(changeset.id); - } - releases.set(name, release); - }); - }); - return releases; -} - -function matchFixedConstraint(releases, packagesByName, config) { - let updated = false; - for (let fixedPackages of config.fixed) { - let releasingFixedPackages = [...releases.values()].filter(release => fixedPackages.includes(release.name) && release.type !== "none"); - if (releasingFixedPackages.length === 0) continue; - let highestReleaseType = getHighestReleaseType(releasingFixedPackages); - let highestVersion = getCurrentHighestVersion(fixedPackages, packagesByName); - - // Finally, we update the packages so all of them are on the highest version - for (let pkgName of fixedPackages) { - const pkg = mapGetOrThrowInternal(packagesByName, pkgName, `Could not find package named "${pkgName}" listed in fixed group ${JSON.stringify(fixedPackages)}`); - if (shouldSkipPackage.shouldSkipPackage(pkg, { - ignore: config.ignore, - allowPrivatePackages: config.privatePackages.version - })) { - continue; - } - let release = releases.get(pkgName); - if (!release) { - updated = true; - releases.set(pkgName, { - name: pkgName, - type: highestReleaseType, - oldVersion: highestVersion, - changesets: [] - }); - continue; - } - if (release.type !== highestReleaseType) { - updated = true; - release.type = highestReleaseType; - } - if (release.oldVersion !== highestVersion) { - updated = true; - release.oldVersion = highestVersion; - } - } - } - return updated; -} - -function getPreVersion(version) { - let parsed = semverParse__default["default"](version); - let preVersion = parsed.prerelease[1] === undefined ? -1 : parsed.prerelease[1]; - if (typeof preVersion !== "number") { - throw new errors.InternalError("preVersion is not a number"); - } - preVersion++; - return preVersion; -} -function getSnapshotSuffix(template, snapshotParameters) { - let snapshotRefDate = new Date(); - const placeholderValues = { - commit: snapshotParameters.commit, - tag: snapshotParameters.tag, - timestamp: snapshotRefDate.getTime().toString(), - datetime: snapshotRefDate.toISOString().replace(/\.\d{3}Z$/, "").replace(/[^\d]/g, "") - }; - - // We need a special handling because we need to handle a case where `--snapshot` is used without any template, - // and the resulting version needs to be composed without a tag. - if (!template) { - return [placeholderValues.tag, placeholderValues.datetime].filter(Boolean).join("-"); - } - const placeholders = Object.keys(placeholderValues); - if (!template.includes(`{tag}`) && placeholderValues.tag !== undefined) { - throw new Error(`Failed to compose snapshot version: "{tag}" placeholder is missing, but the snapshot parameter is defined (value: '${placeholderValues.tag}')`); - } - return placeholders.reduce((prev, key) => { - return prev.replace(new RegExp(`\\{${key}\\}`, "g"), () => { - const value = placeholderValues[key]; - if (value === undefined) { - throw new Error(`Failed to compose snapshot version: "{${key}}" placeholder is used without having a value defined!`); - } - return value; - }); - }, template); -} -function getSnapshotVersion(release, preInfo, useCalculatedVersion, snapshotSuffix) { - if (release.type === "none") { - return release.oldVersion; - } - - /** - * Using version as 0.0.0 so that it does not hinder with other version release - * For example; - * if user has a regular pre-release at 1.0.0-beta.0 and then you had a snapshot pre-release at 1.0.0-canary-git-hash - * and a consumer is using the range ^1.0.0-beta, most people would expect that range to resolve to 1.0.0-beta.0 - * but it'll actually resolve to 1.0.0-canary-hash. Using 0.0.0 solves this problem because it won't conflict with other versions. - * - * You can set `snapshot.useCalculatedVersion` flag to true to use calculated versions if you don't care about the above problem. - */ - const baseVersion = useCalculatedVersion ? incrementVersion(release, preInfo) : `0.0.0`; - return `${baseVersion}-${snapshotSuffix}`; -} -function getNewVersion(release, preInfo) { - if (release.type === "none") { - return release.oldVersion; - } - return incrementVersion(release, preInfo); -} -function assembleReleasePlan(changesets, packages, config, -// intentionally not using an optional parameter here so the result of `readPreState` has to be passed in here -preState, -// snapshot: undefined -> not using snapshot -// snapshot: { tag: undefined } -> --snapshot (empty tag) -// snapshot: { tag: "canary" } -> --snapshot canary -snapshot) { - // TODO: remove `refined*` in the next major version of this package - // just use `config` and `snapshot` parameters directly, typed as: `config: Config, snapshot?: SnapshotReleaseParameters` - const refinedConfig = config.snapshot ? config : _objectSpread2(_objectSpread2({}, config), {}, { - snapshot: { - prereleaseTemplate: null, - useCalculatedVersion: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.useCalculatedVersionForSnapshots - } - }); - const refinedSnapshot = typeof snapshot === "string" ? { - tag: snapshot - } : typeof snapshot === "boolean" ? { - tag: undefined - } : snapshot; - let packagesByName = new Map(packages.packages.map(x => [x.packageJson.name, x])); - const relevantChangesets = getRelevantChangesets(changesets, packagesByName, refinedConfig, preState); - const preInfo = getPreInfo(changesets, packagesByName, refinedConfig, preState); - - // releases is, at this point a list of all packages we are going to releases, - // flattened down to one release per package, having a reference back to their - // changesets, and with a calculated new versions - let releases = flattenReleases(relevantChangesets, packagesByName, refinedConfig); - - // Unlike the config/CLI validation graphs, this graph intentionally includes - // devDependencies. While devDeps don't cause version bumps (determineDependents - // assigns type "none"), they must appear in the release plan so that - // apply-release-plan can update their version ranges in package.json. - let dependencyGraph = getDependentsGraph.getDependentsGraph(packages, { - bumpVersionsWithWorkspaceProtocolOnly: refinedConfig.bumpVersionsWithWorkspaceProtocolOnly - }); - let releasesValidated = false; - while (releasesValidated === false) { - // The map passed in to determineDependents will be mutated - let dependentAdded = determineDependents({ - releases, - packagesByName, - rootDir: packages.root.dir, - dependencyGraph, - preInfo, - config: refinedConfig - }); - - // `releases` might get mutated here - let fixedConstraintUpdated = matchFixedConstraint(releases, packagesByName, refinedConfig); - let linksUpdated = applyLinks(releases, packagesByName, refinedConfig.linked); - releasesValidated = !linksUpdated && !dependentAdded && !fixedConstraintUpdated; - } - if ((preInfo === null || preInfo === void 0 ? void 0 : preInfo.state.mode) === "exit") { - for (let pkg of packages.packages) { - // If a package had a prerelease, but didn't trigger a version bump in the regular release, - // we want to give it a patch release. - // Detailed explanation at https://github.com/changesets/changesets/pull/382#discussion_r434434182 - if (preInfo.preVersions.get(pkg.packageJson.name) !== 0) { - const existingRelease = releases.get(pkg.packageJson.name); - if (!existingRelease) { - releases.set(pkg.packageJson.name, { - name: pkg.packageJson.name, - type: "patch", - oldVersion: pkg.packageJson.version, - changesets: [] - }); - } else if (existingRelease.type === "none" && !shouldSkipPackage.shouldSkipPackage(pkg, { - ignore: refinedConfig.ignore, - allowPrivatePackages: refinedConfig.privatePackages.version - })) { - existingRelease.type = "patch"; - } - } - } - } - - // Caching the snapshot version here and use this if it is snapshot release - const snapshotSuffix = refinedSnapshot && getSnapshotSuffix(refinedConfig.snapshot.prereleaseTemplate, refinedSnapshot); - return { - changesets: relevantChangesets, - releases: [...releases.values()].map(incompleteRelease => { - return _objectSpread2(_objectSpread2({}, incompleteRelease), {}, { - newVersion: snapshotSuffix ? getSnapshotVersion(incompleteRelease, preInfo, refinedConfig.snapshot.useCalculatedVersion, snapshotSuffix) : getNewVersion(incompleteRelease, preInfo) - }); - }), - preState: preInfo === null || preInfo === void 0 ? void 0 : preInfo.state - }; -} -function getRelevantChangesets(changesets, packagesByName, config, preState) { - for (const changeset of changesets) { - // Using the following 2 arrays to decide whether a changeset - // contains both skipped and not skipped packages - const skippedPackages = []; - const notSkippedPackages = []; - for (const release of changeset.releases) { - // this acts as an early validation in this package so we don't throw an internal error here - const packageByName = mapGetOrThrow(packagesByName, release.name, `Found changeset ${changeset.id} for package ${release.name} which is not in the workspace`); - if (shouldSkipPackage.shouldSkipPackage(packageByName, { - ignore: config.ignore, - allowPrivatePackages: config.privatePackages.version - })) { - skippedPackages.push(release.name); - } else { - notSkippedPackages.push(release.name); - } - } - if (skippedPackages.length > 0 && notSkippedPackages.length > 0) { - throw new Error(`Found mixed changeset ${changeset.id}\n` + `Found ignored packages: ${skippedPackages.join(" ")}\n` + `Found not ignored packages: ${notSkippedPackages.join(" ")}\n` + "Mixed changesets that contain both ignored and not ignored packages are not allowed"); - } - } - if (preState && preState.mode !== "exit") { - let usedChangesetIds = new Set(preState.changesets); - return changesets.filter(changeset => !usedChangesetIds.has(changeset.id)); - } - return changesets; -} -function getHighestPreVersion(groupKind, packageGroup, packagesByName) { - let highestPreVersion = 0; - for (let pkgName of packageGroup) { - const pkg = mapGetOrThrowInternal(packagesByName, pkgName, `Could not find package named "${pkgName}" listed in ${groupKind} group ${JSON.stringify(packageGroup)}`); - highestPreVersion = Math.max(getPreVersion(pkg.packageJson.version), highestPreVersion); - } - return highestPreVersion; -} -function getPreInfo(changesets, packagesByName, config, preState) { - if (preState === undefined) { - return; - } - let updatedPreState = _objectSpread2(_objectSpread2({}, preState), {}, { - changesets: changesets.map(changeset => changeset.id), - initialVersions: _objectSpread2({}, preState.initialVersions) - }); - for (const [, pkg] of packagesByName) { - if (updatedPreState.initialVersions[pkg.packageJson.name] === undefined) { - updatedPreState.initialVersions[pkg.packageJson.name] = pkg.packageJson.version; - } - } - // Populate preVersion - // preVersion is the map between package name and its next pre version number. - let preVersions = new Map(); - for (const [, pkg] of packagesByName) { - if (shouldSkipPackage.shouldSkipPackage(pkg, { - ignore: config.ignore, - allowPrivatePackages: config.privatePackages.version - })) { - continue; - } - preVersions.set(pkg.packageJson.name, getPreVersion(pkg.packageJson.version)); - } - for (let fixedGroup of config.fixed) { - let highestPreVersion = getHighestPreVersion("fixed", fixedGroup, packagesByName); - for (let fixedPackage of fixedGroup) { - preVersions.set(fixedPackage, highestPreVersion); - } - } - for (let linkedGroup of config.linked) { - let highestPreVersion = getHighestPreVersion("linked", linkedGroup, packagesByName); - for (let linkedPackage of linkedGroup) { - preVersions.set(linkedPackage, highestPreVersion); - } - } - return { - state: updatedPreState, - preVersions - }; -} - -exports["default"] = assembleReleasePlan; - - -/***/ }), - -/***/ 8944: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var fs = __nccwpck_require__(925); -var path = __nccwpck_require__(6928); -var micromatch = __nccwpck_require__(9555); -var errors = __nccwpck_require__(6861); -var logger = __nccwpck_require__(9923); -var getPackages = __nccwpck_require__(7507); -var getDependentsGraph = __nccwpck_require__(9401); -var shouldSkipPackage = __nccwpck_require__(5481); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var fs__namespace = /*#__PURE__*/_interopNamespace(fs); -var path__default = /*#__PURE__*/_interopDefault(path); -var micromatch__default = /*#__PURE__*/_interopDefault(micromatch); - -var packageJson = { - name: "@changesets/config", - version: "3.1.4", - description: "Utilities for reading and parsing Changeset's config", - main: "dist/changesets-config.cjs.js", - module: "dist/changesets-config.esm.js", - exports: { - ".": { - types: { - "import": "./dist/changesets-config.cjs.mjs", - "default": "./dist/changesets-config.cjs.js" - }, - module: "./dist/changesets-config.esm.js", - "import": "./dist/changesets-config.cjs.mjs", - "default": "./dist/changesets-config.cjs.js" - }, - "./package.json": "./package.json", - "./schema.json": "./schema.json" - }, - license: "MIT", - repository: "https://github.com/changesets/changesets/tree/main/packages/config", - files: [ - "dist", - "schema.json" - ], - dependencies: { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.4", - "@changesets/logger": "^0.1.1", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1", - micromatch: "^4.0.8" - }, - devDependencies: { - "@changesets/test-utils": "*", - "@types/micromatch": "^4.0.1", - "jest-in-case": "^1.0.2", - outdent: "^0.5.0" - }, - preconstruct: { - exports: { - extra: { - "./schema.json": "./schema.json" - } - } - } -}; - -let defaultWrittenConfig = { - $schema: `https://unpkg.com/@changesets/config@${packageJson.version}/schema.json`, - changelog: "@changesets/cli/changelog", - commit: false, - fixed: [], - linked: [], - access: "restricted", - baseBranch: "master", - updateInternalDependencies: "patch", - ignore: [] -}; -function flatten(arr) { - return [].concat(...arr); -} -function getNormalizedChangelogOption(thing) { - if (thing === false) { - return false; - } - if (typeof thing === "string") { - return [thing, null]; - } - return thing; -} -function getNormalizedCommitOption(thing) { - if (thing === false) { - return false; - } - if (thing === true) { - return ["@changesets/cli/commit", { - skipCI: "version" - }]; - } - if (typeof thing === "string") { - return [thing, null]; - } - return thing; -} -function getUnmatchedPatterns(listOfPackageNamesOrGlob, pkgNames) { - return listOfPackageNamesOrGlob.filter(pkgNameOrGlob => !pkgNames.some(pkgName => micromatch__default["default"].isMatch(pkgName, pkgNameOrGlob))); -} -const havePackageGroupsCorrectShape = pkgGroups => { - return isArray(pkgGroups) && pkgGroups.every(arr => isArray(arr) && arr.every(pkgName => typeof pkgName === "string")); -}; - -// TODO: it might be possible to remove this if improvements to `Array.isArray` ever land -// related thread: github.com/microsoft/TypeScript/issues/36554 -function isArray(arg) { - return Array.isArray(arg); -} -let read = async (cwd, packages) => { - packages !== null && packages !== void 0 ? packages : packages = await getPackages.getPackages(cwd); - let json = await fs__namespace.readJSON(path__default["default"].join(packages.root.dir, ".changeset", "config.json")); - return parse(json, packages); -}; -let parse = (json, packages) => { - var _json$privatePackages, _json$privatePackages2, _json$changedFilePatt, _json$snapshot$prerel, _json$snapshot, _json$snapshot2, _json$___experimental, _json$___experimental2, _json$___experimental3, _json$___experimental4; - let messages = []; - let pkgNames = packages.packages.map(({ - packageJson - }) => packageJson.name); - if (json.changelog !== undefined && json.changelog !== false && typeof json.changelog !== "string" && !(isArray(json.changelog) && json.changelog.length === 2 && typeof json.changelog[0] === "string")) { - messages.push(`The \`changelog\` option is set as ${JSON.stringify(json.changelog, null, 2)} when the only valid values are undefined, false, a module path(e.g. "@changesets/cli/changelog" or "./some-module") or a tuple with a module path and config for the changelog generator(e.g. ["@changesets/cli/changelog", { someOption: true }])`); - } - let normalizedAccess = json.access; - if (json.access === "private") { - normalizedAccess = "restricted"; - logger.warn('The `access` option is set as "private", but this is actually not a valid value - the correct form is "restricted".'); - } - if (normalizedAccess !== undefined && normalizedAccess !== "restricted" && normalizedAccess !== "public") { - messages.push(`The \`access\` option is set as ${JSON.stringify(normalizedAccess, null, 2)} when the only valid values are undefined, "public" or "restricted"`); - } - if (json.commit !== undefined && typeof json.commit !== "boolean" && typeof json.commit !== "string" && !(isArray(json.commit) && json.commit.length === 2 && typeof json.commit[0] === "string")) { - messages.push(`The \`commit\` option is set as ${JSON.stringify(json.commit, null, 2)} when the only valid values are undefined or a boolean or a module path (e.g. "@changesets/cli/commit" or "./some-module") or a tuple with a module path and config for the commit message generator (e.g. ["@changesets/cli/commit", { "skipCI": "version" }])`); - } - if (json.baseBranch !== undefined && typeof json.baseBranch !== "string") { - messages.push(`The \`baseBranch\` option is set as ${JSON.stringify(json.baseBranch, null, 2)} but the \`baseBranch\` option can only be set as a string`); - } - if (json.changedFilePatterns !== undefined && (!isArray(json.changedFilePatterns) || !json.changedFilePatterns.every(pattern => typeof pattern === "string"))) { - messages.push(`The \`changedFilePatterns\` option is set as ${JSON.stringify(json.changedFilePatterns, null, 2)} but the \`changedFilePatterns\` option can only be set as an array of strings`); - } - let fixed = []; - if (json.fixed !== undefined) { - if (!havePackageGroupsCorrectShape(json.fixed)) { - messages.push(`The \`fixed\` option is set as ${JSON.stringify(json.fixed, null, 2)} when the only valid values are undefined or an array of arrays of package names`); - } else { - let foundPkgNames = new Set(); - let duplicatedPkgNames = new Set(); - for (let fixedGroup of json.fixed) { - messages.push(...getUnmatchedPatterns(fixedGroup, pkgNames).map(pkgOrGlob => `The package or glob expression "${pkgOrGlob}" specified in the \`fixed\` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); - let expandedFixedGroup = micromatch__default["default"](pkgNames, fixedGroup); - fixed.push(expandedFixedGroup); - for (let fixedPkgName of expandedFixedGroup) { - if (foundPkgNames.has(fixedPkgName)) { - duplicatedPkgNames.add(fixedPkgName); - } - foundPkgNames.add(fixedPkgName); - } - } - if (duplicatedPkgNames.size) { - duplicatedPkgNames.forEach(pkgName => { - messages.push(`The package "${pkgName}" is defined in multiple sets of fixed packages. Packages can only be defined in a single set of fixed packages. If you are using glob expressions, make sure that they are valid according to https://www.npmjs.com/package/micromatch`); - }); - } - } - } - let linked = []; - if (json.linked !== undefined) { - if (!havePackageGroupsCorrectShape(json.linked)) { - messages.push(`The \`linked\` option is set as ${JSON.stringify(json.linked, null, 2)} when the only valid values are undefined or an array of arrays of package names`); - } else { - let foundPkgNames = new Set(); - let duplicatedPkgNames = new Set(); - for (let linkedGroup of json.linked) { - messages.push(...getUnmatchedPatterns(linkedGroup, pkgNames).map(pkgOrGlob => `The package or glob expression "${pkgOrGlob}" specified in the \`linked\` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); - let expandedLinkedGroup = micromatch__default["default"](pkgNames, linkedGroup); - linked.push(expandedLinkedGroup); - for (let linkedPkgName of expandedLinkedGroup) { - if (foundPkgNames.has(linkedPkgName)) { - duplicatedPkgNames.add(linkedPkgName); - } - foundPkgNames.add(linkedPkgName); - } - } - if (duplicatedPkgNames.size) { - duplicatedPkgNames.forEach(pkgName => { - messages.push(`The package "${pkgName}" is defined in multiple sets of linked packages. Packages can only be defined in a single set of linked packages. If you are using glob expressions, make sure that they are valid according to https://www.npmjs.com/package/micromatch`); - }); - } - } - } - const allFixedPackages = new Set(flatten(fixed)); - const allLinkedPackages = new Set(flatten(linked)); - allFixedPackages.forEach(pkgName => { - if (allLinkedPackages.has(pkgName)) { - messages.push(`The package "${pkgName}" can be found in both fixed and linked groups. A package can only be either fixed or linked.`); - } - }); - if (json.updateInternalDependencies !== undefined && !["patch", "minor"].includes(json.updateInternalDependencies)) { - messages.push(`The \`updateInternalDependencies\` option is set as ${JSON.stringify(json.updateInternalDependencies, null, 2)} but can only be 'patch' or 'minor'`); - } - if (json.privatePackages !== undefined && json.privatePackages !== false) { - if (typeof json.privatePackages !== "object") { - messages.push(`The \`privatePackages\` option is set as ${JSON.stringify(json.privatePackages, null, 2)} when the only valid values are undefined, false, or an object with optional boolean \`version\` and \`tag\` properties`); - } else { - if (json.privatePackages.version !== undefined && typeof json.privatePackages.version !== "boolean") { - messages.push(`The \`privatePackages.version\` option is set as ${JSON.stringify(json.privatePackages.version, null, 2)} but the only valid values are undefined or a boolean`); - } - if (json.privatePackages.tag !== undefined && typeof json.privatePackages.tag !== "boolean") { - messages.push(`The \`privatePackages.tag\` option is set as ${JSON.stringify(json.privatePackages.tag, null, 2)} but the only valid values are undefined or a boolean`); - } - } - } - const privatePackages = json.privatePackages === false ? { - tag: false, - version: false - } : json.privatePackages ? { - version: (_json$privatePackages = json.privatePackages.version) !== null && _json$privatePackages !== void 0 ? _json$privatePackages : true, - tag: (_json$privatePackages2 = json.privatePackages.tag) !== null && _json$privatePackages2 !== void 0 ? _json$privatePackages2 : false - } : { - version: true, - tag: false - }; - if (json.ignore) { - if (!(isArray(json.ignore) && json.ignore.every(pkgName => typeof pkgName === "string"))) { - messages.push(`The \`ignore\` option is set as ${JSON.stringify(json.ignore, null, 2)} when the only valid values are undefined or an array of package names`); - } else { - messages.push(...getUnmatchedPatterns(json.ignore, pkgNames).map(pkgOrGlob => `The package or glob expression "${pkgOrGlob}" is specified in the \`ignore\` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch`)); - } - } - - // Validate that dependents of skipped packages are also skipped. - // A package is "skipped" if it's in the ignore list, or if it's private - // and privatePackages.version is false. - // devDependencies are excluded because they don't affect published consumers — - // a stale devDep range on a skipped package is harmless. - // Note: assemble-release-plan uses a graph WITH devDeps because it needs to - // update devDep ranges in package.json even though they don't cause version bumps. - const ignore = isArray(json.ignore) ? json.ignore : []; - if (ignore.length || !privatePackages.version) { - const dependentsGraph = getDependentsGraph.getDependentsGraph(packages, { - ignoreDevDependencies: true, - bumpVersionsWithWorkspaceProtocolOnly: json.bumpVersionsWithWorkspaceProtocolOnly - }); - const packagesByName = new Map(packages.packages.map(x => [x.packageJson.name, x])); - for (const pkg of packages.packages) { - if (!shouldSkipPackage.shouldSkipPackage(pkg, { - ignore, - allowPrivatePackages: privatePackages.version - })) { - continue; - } - const skippedPackage = pkg.packageJson.name; - const dependents = dependentsGraph.get(skippedPackage) || []; - for (const dependent of dependents) { - const dependentPkg = packagesByName.get(dependent); - if (!dependentPkg) { - continue; - } - if (shouldSkipPackage.shouldSkipPackage(dependentPkg, { - ignore, - allowPrivatePackages: privatePackages.version - })) { - continue; - } - // Private packages don't publish to npm, - // so they can safely depend on skipped packages. - // This also holds for private packages with other publish targets (like a VS Code extension) - // as those typically have to prebundle dependencies. - if (dependentPkg.packageJson.private) { - continue; - } - messages.push(`The package "${dependent}" depends on the skipped package "${skippedPackage}", but "${dependent}" is not being skipped. Please add "${dependent}" to the \`ignore\` option.`); - } - } - } - if (json.prettier !== undefined && typeof json.prettier !== "boolean") { - messages.push(`The \`prettier\` option is set as ${JSON.stringify(json.prettier, null, 2)} when the only valid values are undefined or a boolean`); - } - const { - snapshot - } = json; - if (snapshot !== undefined) { - if (snapshot.useCalculatedVersion !== undefined && typeof snapshot.useCalculatedVersion !== "boolean") { - messages.push(`The \`snapshot.useCalculatedVersion\` option is set as ${JSON.stringify(snapshot.useCalculatedVersion, null, 2)} when the only valid values are undefined or a boolean`); - } - if (snapshot.prereleaseTemplate !== undefined && typeof snapshot.prereleaseTemplate !== "string") { - messages.push(`The \`snapshot.prereleaseTemplate\` option is set as ${JSON.stringify(snapshot.prereleaseTemplate, null, 2)} when the only valid values are undefined, or a template string.`); - } - } - if (json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH !== undefined) { - const { - onlyUpdatePeerDependentsWhenOutOfRange, - updateInternalDependents, - useCalculatedVersionForSnapshots - } = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH; - if (onlyUpdatePeerDependentsWhenOutOfRange !== undefined && typeof onlyUpdatePeerDependentsWhenOutOfRange !== "boolean") { - messages.push(`The \`onlyUpdatePeerDependentsWhenOutOfRange\` option is set as ${JSON.stringify(onlyUpdatePeerDependentsWhenOutOfRange, null, 2)} when the only valid values are undefined or a boolean`); - } - if (updateInternalDependents !== undefined && !["always", "out-of-range"].includes(updateInternalDependents)) { - messages.push(`The \`updateInternalDependents\` option is set as ${JSON.stringify(updateInternalDependents, null, 2)} but can only be 'always' or 'out-of-range'`); - } - if (useCalculatedVersionForSnapshots && useCalculatedVersionForSnapshots !== undefined) { - console.warn(`Experimental flag "useCalculatedVersionForSnapshots" is deprecated since snapshot feature became stable. Please use "snapshot.useCalculatedVersion" instead.`); - if (typeof useCalculatedVersionForSnapshots !== "boolean") { - messages.push(`The \`useCalculatedVersionForSnapshots\` option is set as ${JSON.stringify(useCalculatedVersionForSnapshots, null, 2)} when the only valid values are undefined or a boolean`); - } - } - } - if (messages.length) { - throw new errors.ValidationError(`Some errors occurred when validating the changesets config:\n` + messages.join("\n")); - } - let config = { - changelog: getNormalizedChangelogOption(json.changelog === undefined ? defaultWrittenConfig.changelog : json.changelog), - access: normalizedAccess === undefined ? defaultWrittenConfig.access : normalizedAccess, - commit: getNormalizedCommitOption(json.commit === undefined ? defaultWrittenConfig.commit : json.commit), - fixed, - linked, - baseBranch: json.baseBranch === undefined ? defaultWrittenConfig.baseBranch : json.baseBranch, - changedFilePatterns: (_json$changedFilePatt = json.changedFilePatterns) !== null && _json$changedFilePatt !== void 0 ? _json$changedFilePatt : ["**"], - updateInternalDependencies: json.updateInternalDependencies === undefined ? defaultWrittenConfig.updateInternalDependencies : json.updateInternalDependencies, - ignore: json.ignore === undefined ? defaultWrittenConfig.ignore : micromatch__default["default"](pkgNames, json.ignore), - bumpVersionsWithWorkspaceProtocolOnly: json.bumpVersionsWithWorkspaceProtocolOnly === true, - snapshot: { - prereleaseTemplate: (_json$snapshot$prerel = (_json$snapshot = json.snapshot) === null || _json$snapshot === void 0 ? void 0 : _json$snapshot.prereleaseTemplate) !== null && _json$snapshot$prerel !== void 0 ? _json$snapshot$prerel : null, - useCalculatedVersion: ((_json$snapshot2 = json.snapshot) === null || _json$snapshot2 === void 0 ? void 0 : _json$snapshot2.useCalculatedVersion) !== undefined ? json.snapshot.useCalculatedVersion : ((_json$___experimental = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental === void 0 ? void 0 : _json$___experimental.useCalculatedVersionForSnapshots) !== undefined ? (_json$___experimental2 = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental2 === void 0 ? void 0 : _json$___experimental2.useCalculatedVersionForSnapshots : false - }, - ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH: { - onlyUpdatePeerDependentsWhenOutOfRange: json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH === undefined || json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange === undefined ? false : json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange, - updateInternalDependents: (_json$___experimental3 = (_json$___experimental4 = json.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH) === null || _json$___experimental4 === void 0 ? void 0 : _json$___experimental4.updateInternalDependents) !== null && _json$___experimental3 !== void 0 ? _json$___experimental3 : "out-of-range" - }, - prettier: typeof json.prettier === "boolean" ? json.prettier : true, - // TODO consider enabling this by default in the next major version - privatePackages - }; - if (config.privatePackages.version === false && config.privatePackages.tag === true) { - throw new errors.ValidationError(`The \`privatePackages.tag\` option is set to \`true\` but \`privatePackages.version\` is set to \`false\`. This is not allowed.`); - } - return config; -}; -let fakePackage = { - dir: "", - packageJson: { - name: "", - version: "" - } -}; -let defaultConfig = parse(defaultWrittenConfig, { - root: fakePackage, - tool: "root", - packages: [fakePackage] -}); - -exports.defaultConfig = defaultConfig; -exports.defaultWrittenConfig = defaultWrittenConfig; -exports.parse = parse; -exports.read = read; - - -/***/ }), - -/***/ 6861: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var ExtendableError = __nccwpck_require__(1456); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var ExtendableError__default = /*#__PURE__*/_interopDefault(ExtendableError); - -class GitError extends ExtendableError__default["default"] { - constructor(code, message) { - super(`${message}, exit code: ${code}`); - this.code = code; - } - -} -class ValidationError extends ExtendableError__default["default"] {} -class ExitError extends ExtendableError__default["default"] { - constructor(code) { - super(`The process exited with code: ${code}`); - this.code = code; - } - -} -class PreExitButNotInPreModeError extends ExtendableError__default["default"] { - constructor() { - super("pre mode cannot be exited when not in pre mode"); - } - -} -class PreEnterButInPreModeError extends ExtendableError__default["default"] { - constructor() { - super("pre mode cannot be entered when in pre mode"); - } - -} -class InternalError extends ExtendableError__default["default"] { - constructor(message) { - super(message); - } - -} - -exports.ExitError = ExitError; -exports.GitError = GitError; -exports.InternalError = InternalError; -exports.PreEnterButInPreModeError = PreEnterButInPreModeError; -exports.PreExitButNotInPreModeError = PreExitButNotInPreModeError; -exports.ValidationError = ValidationError; - - -/***/ }), - -/***/ 9401: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var Range = __nccwpck_require__(8251); -var pc = __nccwpck_require__(6831); -var path = __nccwpck_require__(6760); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var Range__default = /*#__PURE__*/_interopDefault(Range); -var pc__default = /*#__PURE__*/_interopDefault(pc); -var path__default = /*#__PURE__*/_interopDefault(path); - -// This is a modified version of the graph-getting in bolt -const DEPENDENCY_TYPES = ["dependencies", "devDependencies", "peerDependencies", "optionalDependencies"]; -const getAllDependencies = (config, ignoreDevDependencies) => { - const allDependencies = new Map(); - for (const type of DEPENDENCY_TYPES) { - const deps = config[type]; - if (!deps) continue; - for (const name of Object.keys(deps)) { - const depRange = deps[name]; - if (type === "devDependencies" && (ignoreDevDependencies || depRange.startsWith("link:") || depRange.startsWith("file:"))) { - continue; - } - allDependencies.set(name, depRange); - } - } - return allDependencies; -}; -const isProtocolRange = range => range.indexOf(":") !== -1; -const getValidRange = potentialRange => { - if (isProtocolRange(potentialRange)) { - return null; - } - try { - return new Range__default["default"](potentialRange); - } catch (_unused) { - return null; - } -}; -function getDependencyGraph(packages, { - ignoreDevDependencies = false, - bumpVersionsWithWorkspaceProtocolOnly = false -} = {}) { - const graph = new Map(); - let valid = true; - const packagesByName = { - [packages.root.packageJson.name]: packages.root - }; - const relativePathsByName = { - [packages.root.packageJson.name]: "." - }; - const queue = [packages.root]; - for (const pkg of packages.packages) { - queue.push(pkg); - packagesByName[pkg.packageJson.name] = pkg; - relativePathsByName[pkg.packageJson.name] = path__default["default"].relative(packages.root.dir, pkg.dir).replace(/\\/g, "/"); - } - for (const pkg of queue) { - const { - name - } = pkg.packageJson; - const dependencies = []; - const allDependencies = getAllDependencies(pkg.packageJson, ignoreDevDependencies); - for (let [depName, depRange] of allDependencies) { - const match = packagesByName[depName]; - if (!match) continue; - const expected = match.packageJson.version; - const rawDepRange = depRange; - const usesWorkspaceRange = depRange.startsWith("workspace:"); - if (usesWorkspaceRange) { - depRange = depRange.replace(/^workspace:/, ""); - if (depRange === "*" || depRange === "^" || depRange === "~") { - dependencies.push(depName); - continue; - } - if (path__default["default"].posix.normalize(depRange) === relativePathsByName[depName]) { - dependencies.push(depName); - continue; - } - if (!getValidRange(depRange)) { - valid = false; - console.error(`Package ${pc__default["default"].cyan(`"${name}"`)} must depend on the current version of ${pc__default["default"].cyan(`"${depName}"`)}: ${pc__default["default"].green(`"${expected}"`)} vs ${pc__default["default"].red(`"${rawDepRange}"`)}`); - continue; - } - } else if (bumpVersionsWithWorkspaceProtocolOnly) { - continue; - } - const range = getValidRange(depRange); - if (range && !range.test(expected) || isProtocolRange(depRange)) { - valid = false; - console.error(`Package ${pc__default["default"].cyan(`"${name}"`)} must depend on the current version of ${pc__default["default"].cyan(`"${depName}"`)}: ${pc__default["default"].green(`"${expected}"`)} vs ${pc__default["default"].red(`"${rawDepRange}"`)}`); - continue; - } - - // `depRange` could have been a tag and if a tag has been used there might have been a reason for that - // we should not count this as a local monorepro dependant - if (!range) { - continue; - } - dependencies.push(depName); - } - graph.set(name, { - pkg, - dependencies - }); - } - return { - graph, - valid - }; -} - -function getDependentsGraph(packages, opts) { - const graph = new Map(); - const { - graph: dependencyGraph - } = getDependencyGraph(packages, opts); - const dependentsLookup = { - [packages.root.packageJson.name]: { - pkg: packages.root, - dependents: [] - } - }; - packages.packages.forEach(pkg => { - dependentsLookup[pkg.packageJson.name] = { - pkg, - dependents: [] - }; - }); - packages.packages.forEach(pkg => { - const dependent = pkg.packageJson.name; - const valFromDependencyGraph = dependencyGraph.get(dependent); - if (valFromDependencyGraph) { - const dependencies = valFromDependencyGraph.dependencies; - dependencies.forEach(dependency => { - dependentsLookup[dependency].dependents.push(dependent); - }); - } - }); - Object.keys(dependentsLookup).forEach(key => { - graph.set(key, dependentsLookup[key]); - }); - const simplifiedDependentsGraph = new Map(); - graph.forEach((pkgInfo, pkgName) => { - simplifiedDependentsGraph.set(pkgName, pkgInfo.dependents); - }); - return simplifiedDependentsGraph; -} - -exports.getDependentsGraph = getDependentsGraph; - - -/***/ }), - -/***/ 4864: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -exports._default = __nccwpck_require__(5115)["default"]; - - -/***/ }), - -/***/ 5115: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ value: true }); - -var assembleReleasePlan = __nccwpck_require__(701); -var readChangesets = __nccwpck_require__(1933); -var config = __nccwpck_require__(8944); -var getPackages = __nccwpck_require__(7507); -var pre = __nccwpck_require__(7309); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var assembleReleasePlan__default = /*#__PURE__*/_interopDefault(assembleReleasePlan); -var readChangesets__default = /*#__PURE__*/_interopDefault(readChangesets); - -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} - -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} - -function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} - -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} - -async function getReleasePlan(cwd, sinceRef, passedConfig) { - const packages = await getPackages.getPackages(cwd); - const preState = await pre.readPreState(packages.root.dir); - const readConfig = await config.read(packages.root.dir, packages); - const config$1 = passedConfig ? _objectSpread2(_objectSpread2({}, readConfig), passedConfig) : readConfig; - const changesets = await readChangesets__default["default"](packages.root.dir, sinceRef); - return assembleReleasePlan__default["default"](changesets, packages, config$1, preState); -} - -exports["default"] = getReleasePlan; - - -/***/ }), - -/***/ 1865: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var spawn = __nccwpck_require__(2841); -var fs = __nccwpck_require__(9896); -var path = __nccwpck_require__(6928); -var getPackages = __nccwpck_require__(7507); -var errors = __nccwpck_require__(6861); -var isSubdir = __nccwpck_require__(2304); -var micromatch = __nccwpck_require__(9555); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var spawn__default = /*#__PURE__*/_interopDefault(spawn); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var path__default = /*#__PURE__*/_interopDefault(path); -var isSubdir__default = /*#__PURE__*/_interopDefault(isSubdir); -var micromatch__default = /*#__PURE__*/_interopDefault(micromatch); - -async function add(pathToFile, cwd) { - const gitCmd = await spawn__default["default"]("git", ["add", pathToFile], { - cwd - }); - if (gitCmd.code !== 0) { - console.log(pathToFile, gitCmd.stderr.toString()); - } - return gitCmd.code === 0; -} -async function commit(message, cwd) { - const gitCmd = await spawn__default["default"]("git", ["commit", "-m", message, "--allow-empty"], { - cwd - }); - return gitCmd.code === 0; -} -async function getAllTags(cwd) { - const gitCmd = await spawn__default["default"]("git", ["tag"], { - cwd - }); - if (gitCmd.code !== 0) { - throw new Error(gitCmd.stderr.toString()); - } - const tags = gitCmd.stdout.toString().trim().split("\n"); - return new Set(tags); -} - -// used to create a single tag at a time for the current head only -async function tag(tagStr, cwd) { - // NOTE: it's important we use the -m flag to create annotated tag otherwise 'git push --follow-tags' won't actually push - // the tags - const gitCmd = await spawn__default["default"]("git", ["tag", tagStr, "-m", tagStr], { - cwd - }); - return gitCmd.code === 0; -} - -// Find the commit where we diverged from `ref` at using `git merge-base` -async function getDivergedCommit(cwd, ref) { - const cmd = await spawn__default["default"]("git", ["merge-base", ref, "HEAD"], { - cwd - }); - if (cmd.code !== 0) { - throw new Error(`Failed to find where HEAD diverged from "${ref}". Does "${ref}" exist and it's synced with remote?`); - } - return cmd.stdout.toString().trim(); -} - -/** - * Get the SHAs for the commits that added files, including automatically - * extending a shallow clone if necessary to determine any commits. - * @param gitPaths - Paths to fetch - * @param options - `cwd` and `short` - */ -async function getCommitsThatAddFiles(gitPaths, { - cwd, - short = false -}) { - // Maps gitPath to commit SHA - const map = new Map(); - - // Paths we haven't completed processing on yet - let remaining = gitPaths; - do { - // Fetch commit information for all paths we don't have yet - const commitInfos = await Promise.all(remaining.map(async gitPath => { - const [commitSha, parentSha] = (await spawn__default["default"]("git", ["log", "--diff-filter=A", "--max-count=1", short ? "--pretty=format:%h:%p" : "--pretty=format:%H:%p", gitPath], { - cwd - })).stdout.toString().split(":"); - return { - path: gitPath, - commitSha, - parentSha - }; - })); - - // To collect commits without parents (usually because they're absent from - // a shallow clone). - let commitsWithMissingParents = []; - for (const info of commitInfos) { - if (info.commitSha) { - if (info.parentSha) { - // We have found the parent of the commit that added the file. - // Therefore we know that the commit is legitimate and isn't simply the boundary of a shallow clone. - map.set(info.path, info.commitSha); - } else { - commitsWithMissingParents.push(info); - } - } - } - if (commitsWithMissingParents.length === 0) { - break; - } - - // The commits we've found may be the real commits or they may be the boundary of - // a shallow clone. - - // Can we deepen the clone? - if (await isRepoShallow({ - cwd - })) { - // Yes. - await deepenCloneBy({ - by: 50, - cwd - }); - remaining = commitsWithMissingParents.map(p => p.path); - } else { - // It's not a shallow clone, so all the commit SHAs we have are legitimate. - for (const unresolved of commitsWithMissingParents) { - map.set(unresolved.path, unresolved.commitSha); - } - break; - } - } while (true); - return gitPaths.map(p => map.get(p)); -} -async function isRepoShallow({ - cwd -}) { - const isShallowRepoOutput = (await spawn__default["default"]("git", ["rev-parse", "--is-shallow-repository"], { - cwd - })).stdout.toString().trim(); - if (isShallowRepoOutput === "--is-shallow-repository") { - // We have an old version of Git (<2.15) which doesn't support `rev-parse --is-shallow-repository` - // In that case, we'll test for the existence of .git/shallow. - - // Firstly, find the .git folder for the repo; note that this will be relative to the repo dir - const gitDir = (await spawn__default["default"]("git", ["rev-parse", "--git-dir"], { - cwd - })).stdout.toString().trim(); - const fullGitDir = path__default["default"].resolve(cwd, gitDir); - - // Check for the existence of /shallow - return fs__default["default"].existsSync(path__default["default"].join(fullGitDir, "shallow")); - } else { - // We have a newer Git which supports `rev-parse --is-shallow-repository`. We'll use - // the output of that instead of messing with .git/shallow in case that changes in the future. - return isShallowRepoOutput === "true"; - } -} -async function deepenCloneBy({ - by, - cwd -}) { - await spawn__default["default"]("git", ["fetch", `--deepen=${by}`], { - cwd - }); -} -async function getRepoRoot({ - cwd -}) { - const { - stdout, - code, - stderr - } = await spawn__default["default"]("git", ["rev-parse", "--show-toplevel"], { - cwd - }); - if (code !== 0) { - throw new Error(stderr.toString()); - } - return stdout.toString().trim().replace(/\n|\r/g, ""); -} -async function getChangedFilesSince({ - cwd, - ref, - fullPath = false -}) { - const divergedAt = await getDivergedCommit(cwd, ref); - // Now we can find which files we added - const cmd = await spawn__default["default"]("git", ["diff", "--name-only", "--no-relative", divergedAt], { - cwd - }); - if (cmd.code !== 0) { - throw new Error(`Failed to diff against ${divergedAt}. Is ${divergedAt} a valid ref?`); - } - const files = cmd.stdout.toString().trim().split("\n").filter(a => a); - if (!fullPath) return files; - const repoRoot = await getRepoRoot({ - cwd - }); - return files.map(file => path__default["default"].resolve(repoRoot, file)); -} - -// below are less generic functions that we use in combination with other things we are doing -async function getChangedChangesetFilesSinceRef({ - cwd, - ref -}) { - try { - const divergedAt = await getDivergedCommit(cwd, ref); - // Now we can find which files we added - const cmd = await spawn__default["default"]("git", ["diff", "--name-only", "--diff-filter=d", "--no-relative", divergedAt], { - cwd - }); - let tester = /.changeset\/[^/]+\.md$/; - const files = cmd.stdout.toString().trim().split("\n").filter(file => tester.test(file)); - return files; - } catch (err) { - if (err instanceof errors.GitError) return []; - throw err; - } -} -async function getChangedPackagesSinceRef({ - cwd, - ref, - changedFilePatterns = ["**"] -}) { - const changedFiles = await getChangedFilesSince({ - ref, - cwd, - fullPath: true - }); - return [...(await getPackages.getPackages(cwd)).packages] - // sort packages by length of dir, so that we can check for subdirs first - .sort((pkgA, pkgB) => pkgB.dir.length - pkgA.dir.length).filter(pkg => { - const changedPackageFiles = []; - for (let i = changedFiles.length - 1; i >= 0; i--) { - const file = changedFiles[i]; - if (isSubdir__default["default"](pkg.dir, file)) { - changedFiles.splice(i, 1); - const relativeFile = file.slice(pkg.dir.length + 1); - changedPackageFiles.push(relativeFile); - } - } - return changedPackageFiles.length > 0 && micromatch__default["default"](changedPackageFiles, changedFilePatterns).length > 0; - }); -} -async function tagExists(tagStr, cwd) { - const gitCmd = await spawn__default["default"]("git", ["tag", "-l", tagStr], { - cwd - }); - const output = gitCmd.stdout.toString().trim(); - const tagExists = !!output; - return tagExists; -} -async function getCurrentCommitId({ - cwd, - short = false -}) { - return (await spawn__default["default"]("git", ["rev-parse", short && "--short", "HEAD"].filter(Boolean), { - cwd - })).stdout.toString().trim(); -} -async function remoteTagExists(tagStr) { - const gitCmd = await spawn__default["default"]("git", ["ls-remote", "--tags", "origin", "-l", tagStr]); - const output = gitCmd.stdout.toString().trim(); - const tagExists = !!output; - return tagExists; -} - -exports.add = add; -exports.commit = commit; -exports.deepenCloneBy = deepenCloneBy; -exports.getAllTags = getAllTags; -exports.getChangedChangesetFilesSinceRef = getChangedChangesetFilesSinceRef; -exports.getChangedFilesSince = getChangedFilesSince; -exports.getChangedPackagesSinceRef = getChangedPackagesSinceRef; -exports.getCommitsThatAddFiles = getCommitsThatAddFiles; -exports.getCurrentCommitId = getCurrentCommitId; -exports.getDivergedCommit = getDivergedCommit; -exports.isRepoShallow = isRepoShallow; -exports.remoteTagExists = remoteTagExists; -exports.tag = tag; -exports.tagExists = tagExists; - - -/***/ }), - -/***/ 9923: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var pc = __nccwpck_require__(6831); -var util = __nccwpck_require__(9023); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var pc__default = /*#__PURE__*/_interopDefault(pc); -var util__default = /*#__PURE__*/_interopDefault(util); - -let prefix = "🦋 "; - -function format(args, customPrefix) { - let fullPrefix = prefix + (customPrefix === undefined ? "" : " " + customPrefix); - return fullPrefix + util__default["default"].format("", ...args).split("\n").join("\n" + fullPrefix + " "); -} - -function error(...args) { - console.error(format(args, pc__default["default"].red("error"))); -} -function info(...args) { - console.info(format(args, pc__default["default"].cyan("info"))); -} -function log(...args) { - console.log(format(args)); -} -function success(...args) { - console.log(format(args, pc__default["default"].green("success"))); -} -function warn(...args) { - console.warn(format(args, pc__default["default"].yellow("warn"))); -} - -exports.error = error; -exports.info = info; -exports.log = log; -exports.prefix = prefix; -exports.success = success; -exports.warn = warn; - - -/***/ }), - -/***/ 492: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var yaml = __nccwpck_require__(1179); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var yaml__default = /*#__PURE__*/_interopDefault(yaml); - -const mdRegex = /\s*---([^]*?)\n\s*---(\s*(?:\n|$)[^]*)/; -const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`; -const validVersionTypes = ["major", "minor", "patch", "none"]; -function truncate(s, max = 200) { - return s.length > max ? s.slice(0, max) + "..." : s; -} -function validateReleases(releases, contents) { - for (const release of releases) { - if (typeof release.name !== "string" || release.name.trim() === "") { - throw new Error(`could not parse changeset - invalid package name in frontmatter.\n` + `Expected a non-empty string for package name, but got: ${JSON.stringify(release.name)}\n` + `Changeset contents:\n${truncate(contents)}`); - } - if (typeof release.type !== "string") { - throw new Error(`could not parse changeset - invalid release type for package "${release.name}".\n` + `Expected a string for release type, but got: ${typeof release.type}\n` + `Changeset contents:\n${truncate(contents)}`); - } - if (!validVersionTypes.includes(release.type)) { - throw new Error(`could not parse changeset - invalid version type ${JSON.stringify(release.type)} for package "${release.name}".\n` + `Valid version types are: ${validVersionTypes.join(", ")}\n` + `Changeset contents:\n${truncate(contents)}`); - } - } -} -function parseChangesetFile(contents) { - const trimmedContents = contents.trim(); - if (!trimmedContents) { - throw new Error(`could not parse changeset - file is empty.\n` + `Changesets must have frontmatter with package names and version types.\n` + `Example:\n${EXAMPLE_FORMAT}\n\nYour changeset summary here.`); - } - const execResult = mdRegex.exec(contents); - if (!execResult) { - throw new Error(`could not parse changeset - missing or invalid frontmatter.\n` + `Changesets must start with frontmatter delimited by "---".\n` + `Example:\n${EXAMPLE_FORMAT}\n\nYour changeset summary here.\n` + `Received content:\n${truncate(trimmedContents)}`); - } - let [, roughReleases, roughSummary] = execResult; - let summary = roughSummary.trim(); - let releases; - let yamlStuff; - try { - yamlStuff = yaml__default["default"].load(roughReleases); - } catch (e) { - throw new Error(`could not parse changeset - invalid YAML in frontmatter.\n` + `The frontmatter between the "---" delimiters must be valid YAML.\n` + `YAML error: ${e instanceof Error ? e.message : String(e)}\n` + `Frontmatter content:\n${roughReleases}`); - } - if (yamlStuff) { - if (typeof yamlStuff !== "object" || Array.isArray(yamlStuff)) { - throw new Error(`could not parse changeset - frontmatter must be an object mapping package names to version types.\n` + `Expected format:\n${EXAMPLE_FORMAT}\n` + `Received:\n${roughReleases}`); - } - releases = Object.entries(yamlStuff).map(([name, type]) => ({ - name, - type - })); - } else { - releases = []; - } - validateReleases(releases, contents); - return { - releases, - summary - }; -} - -exports["default"] = parseChangesetFile; - - -/***/ }), - -/***/ 7309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var fs = __nccwpck_require__(925); -var path = __nccwpck_require__(6928); -var getPackages = __nccwpck_require__(7507); -var errors = __nccwpck_require__(6861); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var fs__namespace = /*#__PURE__*/_interopNamespace(fs); -var path__default = /*#__PURE__*/_interopDefault(path); - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - -async function readPreState(cwd) { - let preStatePath = path__default["default"].resolve(cwd, ".changeset", "pre.json"); // TODO: verify that the pre state isn't broken - - let preState; - - try { - let contents = await fs__namespace.readFile(preStatePath, "utf8"); - - try { - preState = JSON.parse(contents); - } catch (err) { - if (err instanceof SyntaxError) { - console.error("error parsing json:", contents); - } - - throw err; - } - } catch (err) { - if (err.code !== "ENOENT") { - throw err; - } - } - - return preState; -} -async function exitPre(cwd) { - let preStatePath = path__default["default"].resolve(cwd, ".changeset", "pre.json"); // TODO: verify that the pre state isn't broken - - let preState = await readPreState(cwd); - - if (preState === undefined) { - throw new errors.PreExitButNotInPreModeError(); - } - - await fs__namespace.outputFile(preStatePath, JSON.stringify(_objectSpread2(_objectSpread2({}, preState), {}, { - mode: "exit" - }), null, 2) + "\n"); -} -async function enterPre(cwd, tag) { - var _preState$changesets; - - let packages = await getPackages.getPackages(cwd); - let preStatePath = path__default["default"].resolve(packages.root.dir, ".changeset", "pre.json"); - let preState = await readPreState(packages.root.dir); // can't reenter if pre mode still exists, but we should allow exited pre mode to be reentered - - if ((preState === null || preState === void 0 ? void 0 : preState.mode) === "pre") { - throw new errors.PreEnterButInPreModeError(); - } - - let newPreState = { - mode: "pre", - tag, - initialVersions: {}, - changesets: (_preState$changesets = preState === null || preState === void 0 ? void 0 : preState.changesets) !== null && _preState$changesets !== void 0 ? _preState$changesets : [] - }; - - for (let pkg of packages.packages) { - newPreState.initialVersions[pkg.packageJson.name] = pkg.packageJson.version; - } - - await fs__namespace.outputFile(preStatePath, JSON.stringify(newPreState, null, 2) + "\n"); -} - -exports.enterPre = enterPre; -exports.exitPre = exitPre; -exports.readPreState = readPreState; - - -/***/ }), - -/***/ 1933: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var fs = __nccwpck_require__(925); -var path = __nccwpck_require__(6928); -var parse = __nccwpck_require__(492); -var git = __nccwpck_require__(1865); -var pc = __nccwpck_require__(6831); -var pFilter = __nccwpck_require__(6374); -var logger = __nccwpck_require__(9923); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var fs__namespace = /*#__PURE__*/_interopNamespace(fs); -var path__default = /*#__PURE__*/_interopDefault(path); -var parse__default = /*#__PURE__*/_interopDefault(parse); -var git__namespace = /*#__PURE__*/_interopNamespace(git); -var pc__default = /*#__PURE__*/_interopDefault(pc); -var pFilter__default = /*#__PURE__*/_interopDefault(pFilter); - -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} - -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} - -function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { - value: t, - enumerable: !0, - configurable: !0, - writable: !0 - }) : e[r] = t, e; -} - -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} - -// THIS SHOULD BE REMOVED WHEN SUPPORT FOR CHANGESETS FROM V1 IS DROPPED - -let importantSeparator = pc__default["default"].red("===============================IMPORTANT!==============================="); -let importantEnd = pc__default["default"].red("----------------------------------------------------------------------"); -async function getOldChangesets(changesetBase, dirs) { - // this needs to support just not dealing with dirs that aren't set up properly - let changesets = await pFilter__default["default"](dirs, async dir => (await fs__namespace.lstat(path__default["default"].join(changesetBase, dir))).isDirectory()); - const changesetContents = changesets.map(async changesetDir => { - const jsonPath = path__default["default"].join(changesetBase, changesetDir, "changes.json"); - const [summary, json] = await Promise.all([fs__namespace.readFile(path__default["default"].join(changesetBase, changesetDir, "changes.md"), "utf-8"), fs__namespace.readJson(jsonPath)]); - return { - releases: json.releases, - summary, - id: changesetDir - }; - }); - return Promise.all(changesetContents); -} - -// this function only exists while we wait for v1 changesets to be obsoleted -// and should be deleted before v3 -async function getOldChangesetsAndWarn(changesetBase, dirs) { - let oldChangesets = await getOldChangesets(changesetBase, dirs); - if (oldChangesets.length === 0) { - return []; - } - logger.warn(importantSeparator); - logger.warn("There were old changesets from version 1 found"); - logger.warn("These are being applied now but the dependents graph may have changed"); - logger.warn("Make sure you validate all your dependencies"); - logger.warn("In a future major version, we will no longer apply these old changesets, and will instead throw here"); - logger.warn(importantEnd); - return oldChangesets; -} - -async function filterChangesetsSinceRef(changesets, changesetBase, sinceRef) { - const newChangesets = await git__namespace.getChangedChangesetFilesSinceRef({ - cwd: changesetBase, - ref: sinceRef - }); - const newHashes = newChangesets.map(c => c.split("/").pop()); - return changesets.filter(dir => newHashes.includes(dir)); -} -async function getChangesets(rootDir, sinceRef) { - let changesetBase = path__default["default"].join(rootDir, ".changeset"); - let contents; - try { - contents = await fs__namespace["default"].readdir(changesetBase); - } catch (err) { - if (err.code === "ENOENT") { - throw new Error("There is no .changeset directory in this project"); - } - throw err; - } - if (sinceRef !== undefined) { - contents = await filterChangesetsSinceRef(contents, changesetBase, sinceRef); - } - let oldChangesetsPromise = getOldChangesetsAndWarn(changesetBase, contents); - let changesets = contents.filter(file => !file.startsWith(".") && file.endsWith(".md") && !/^README\.md$/i.test(file)); - const changesetContents = changesets.map(async file => { - const changeset = await fs__namespace["default"].readFile(path__default["default"].join(changesetBase, file), "utf-8"); - return _objectSpread2(_objectSpread2({}, parse__default["default"](changeset)), {}, { - id: file.replace(".md", "") - }); - }); - return [...(await oldChangesetsPromise), ...(await Promise.all(changesetContents))]; -} - -exports["default"] = getChangesets; - - -/***/ }), - -/***/ 5481: -/***/ ((__unused_webpack_module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function shouldSkipPackage({ - packageJson -}, { - ignore, - allowPrivatePackages -}) { - if (ignore.includes(packageJson.name)) { - return true; - } - - if (packageJson.private && !allowPrivatePackages) { - return true; - } - - return !packageJson.version; -} - -exports.shouldSkipPackage = shouldSkipPackage; - - -/***/ }), - -/***/ 7079: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var _regeneratorRuntime = _interopDefault(__nccwpck_require__(7594)); -var _asyncToGenerator = _interopDefault(__nccwpck_require__(7270)); -var _classCallCheck = _interopDefault(__nccwpck_require__(1220)); -var _possibleConstructorReturn = _interopDefault(__nccwpck_require__(5297)); -var _getPrototypeOf = _interopDefault(__nccwpck_require__(1695)); -var _inherits = _interopDefault(__nccwpck_require__(4300)); -var _wrapNativeSuper = _interopDefault(__nccwpck_require__(4372)); -var findUp = __nccwpck_require__(9116); -var findUp__default = _interopDefault(findUp); -var path = _interopDefault(__nccwpck_require__(6928)); -var fs = _interopDefault(__nccwpck_require__(6668)); - -var NoPkgJsonFound = -/*#__PURE__*/ -function (_Error) { - _inherits(NoPkgJsonFound, _Error); - - function NoPkgJsonFound(directory) { - var _this; - - _classCallCheck(this, NoPkgJsonFound); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(NoPkgJsonFound).call(this, "No package.json could be found upwards from the directory ".concat(directory))); - _this.directory = directory; - return _this; - } - - return NoPkgJsonFound; -}(_wrapNativeSuper(Error)); - -function hasWorkspacesConfiguredViaPkgJson(_x, _x2) { - return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaPkgJson() { - _hasWorkspacesConfiguredViaPkgJson = _asyncToGenerator( - /*#__PURE__*/ - _regeneratorRuntime.mark(function _callee(directory, firstPkgJsonDirRef) { - var pkgJson; - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - _context.next = 3; - return fs.readJson(path.join(directory, "package.json")); - - case 3: - pkgJson = _context.sent; - - if (firstPkgJsonDirRef.current === undefined) { - firstPkgJsonDirRef.current = directory; - } - - if (!(pkgJson.workspaces || pkgJson.bolt)) { - _context.next = 7; - break; - } - - return _context.abrupt("return", directory); - - case 7: - _context.next = 13; - break; - - case 9: - _context.prev = 9; - _context.t0 = _context["catch"](0); - - if (!(_context.t0.code !== "ENOENT")) { - _context.next = 13; - break; - } - - throw _context.t0; - - case 13: - case "end": - return _context.stop(); - } - } - }, _callee, null, [[0, 9]]); - })); - return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); -} - -function hasWorkspacesConfiguredViaLerna(_x3) { - return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaLerna() { - _hasWorkspacesConfiguredViaLerna = _asyncToGenerator( - /*#__PURE__*/ - _regeneratorRuntime.mark(function _callee2(directory) { - var lernaJson; - return _regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - _context2.next = 3; - return fs.readJson(path.join(directory, "lerna.json")); - - case 3: - lernaJson = _context2.sent; - - if (!(lernaJson.useWorkspaces !== true)) { - _context2.next = 6; - break; - } - - return _context2.abrupt("return", directory); - - case 6: - _context2.next = 12; - break; - - case 8: - _context2.prev = 8; - _context2.t0 = _context2["catch"](0); - - if (!(_context2.t0.code !== "ENOENT")) { - _context2.next = 12; - break; - } - - throw _context2.t0; - - case 12: - case "end": - return _context2.stop(); - } - } - }, _callee2, null, [[0, 8]]); - })); - return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); -} - -function hasWorkspacesConfiguredViaPnpm(_x4) { - return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaPnpm() { - _hasWorkspacesConfiguredViaPnpm = _asyncToGenerator( - /*#__PURE__*/ - _regeneratorRuntime.mark(function _callee3(directory) { - var pnpmWorkspacesFileExists; - return _regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.next = 2; - return fs.exists(path.join(directory, "pnpm-workspace.yaml")); - - case 2: - pnpmWorkspacesFileExists = _context3.sent; - - if (!pnpmWorkspacesFileExists) { - _context3.next = 5; - break; - } - - return _context3.abrupt("return", directory); - - case 5: - case "end": - return _context3.stop(); - } - } - }, _callee3); - })); - return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); -} - -function findRoot(_x5) { - return _findRoot.apply(this, arguments); -} - -function _findRoot() { - _findRoot = _asyncToGenerator( - /*#__PURE__*/ - _regeneratorRuntime.mark(function _callee4(cwd) { - var firstPkgJsonDirRef, dir; - return _regeneratorRuntime.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - firstPkgJsonDirRef = { - current: undefined - }; - _context4.next = 3; - return findUp__default(function (directory) { - return Promise.all([hasWorkspacesConfiguredViaLerna(directory), hasWorkspacesConfiguredViaPkgJson(directory, firstPkgJsonDirRef), hasWorkspacesConfiguredViaPnpm(directory)]).then(function (x) { - return x.find(function (dir) { - return dir; - }); - }); - }, { - cwd: cwd, - type: "directory" - }); - - case 3: - dir = _context4.sent; - - if (!(firstPkgJsonDirRef.current === undefined)) { - _context4.next = 6; - break; - } - - throw new NoPkgJsonFound(cwd); - - case 6: - if (!(dir === undefined)) { - _context4.next = 8; - break; - } - - return _context4.abrupt("return", firstPkgJsonDirRef.current); - - case 8: - return _context4.abrupt("return", dir); - - case 9: - case "end": - return _context4.stop(); - } - } - }, _callee4); - })); - return _findRoot.apply(this, arguments); -} - -function hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef) { - try { - var pkgJson = fs.readJsonSync(path.join(directory, "package.json")); - - if (firstPkgJsonDirRef.current === undefined) { - firstPkgJsonDirRef.current = directory; - } - - if (pkgJson.workspaces || pkgJson.bolt) { - return directory; - } - } catch (err) { - if (err.code !== "ENOENT") { - throw err; - } - } -} - -function hasWorkspacesConfiguredViaLernaSync(directory) { - try { - var lernaJson = fs.readJsonSync(path.join(directory, "lerna.json")); - - if (lernaJson.useWorkspaces !== true) { - return directory; - } - } catch (err) { - if (err.code !== "ENOENT") { - throw err; - } - } -} - -function hasWorkspacesConfiguredViaPnpmSync(directory) { - // @ts-ignore - var pnpmWorkspacesFileExists = fs.existsSync(path.join(directory, "pnpm-workspace.yaml")); - - if (pnpmWorkspacesFileExists) { - return directory; - } -} - -function findRootSync(cwd) { - var firstPkgJsonDirRef = { - current: undefined - }; - var dir = findUp.sync(function (directory) { - return [hasWorkspacesConfiguredViaLernaSync(directory), hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef), hasWorkspacesConfiguredViaPnpmSync(directory)].find(function (dir) { - return dir; - }); - }, { - cwd: cwd, - type: "directory" - }); - - if (firstPkgJsonDirRef.current === undefined) { - throw new NoPkgJsonFound(cwd); - } - - if (dir === undefined) { - return firstPkgJsonDirRef.current; - } - - return dir; -} - -exports.NoPkgJsonFound = NoPkgJsonFound; -exports.findRoot = findRoot; -exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 4038: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(47); -} else { - module.exports = __nccwpck_require__(7079); -} - - -/***/ }), - -/***/ 47: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -function _interopDefault(ex) { - return ex && "object" == typeof ex && "default" in ex ? ex.default : ex; -} - -Object.defineProperty(exports, "__esModule", ({ - value: !0 -})); - -var _regeneratorRuntime = _interopDefault(__nccwpck_require__(7594)), _asyncToGenerator = _interopDefault(__nccwpck_require__(7270)), _classCallCheck = _interopDefault(__nccwpck_require__(1220)), _possibleConstructorReturn = _interopDefault(__nccwpck_require__(5297)), _getPrototypeOf = _interopDefault(__nccwpck_require__(1695)), _inherits = _interopDefault(__nccwpck_require__(4300)), _wrapNativeSuper = _interopDefault(__nccwpck_require__(4372)), findUp = __nccwpck_require__(9116), findUp__default = _interopDefault(findUp), path = _interopDefault(__nccwpck_require__(6928)), fs = _interopDefault(__nccwpck_require__(6668)), NoPkgJsonFound = function(_Error) { - function NoPkgJsonFound(directory) { - var _this; - return _classCallCheck(this, NoPkgJsonFound), (_this = _possibleConstructorReturn(this, _getPrototypeOf(NoPkgJsonFound).call(this, "No package.json could be found upwards from the directory ".concat(directory)))).directory = directory, - _this; - } - return _inherits(NoPkgJsonFound, _Error), NoPkgJsonFound; -}(_wrapNativeSuper(Error)); - -function hasWorkspacesConfiguredViaPkgJson(_x, _x2) { - return _hasWorkspacesConfiguredViaPkgJson.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaPkgJson() { - return (_hasWorkspacesConfiguredViaPkgJson = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(directory, firstPkgJsonDirRef) { - var pkgJson; - return _regeneratorRuntime.wrap(function(_context) { - for (;;) switch (_context.prev = _context.next) { - case 0: - return _context.prev = 0, _context.next = 3, fs.readJson(path.join(directory, "package.json")); - - case 3: - if (pkgJson = _context.sent, void 0 === firstPkgJsonDirRef.current && (firstPkgJsonDirRef.current = directory), - !pkgJson.workspaces && !pkgJson.bolt) { - _context.next = 7; - break; - } - return _context.abrupt("return", directory); - - case 7: - _context.next = 13; - break; - - case 9: - if (_context.prev = 9, _context.t0 = _context.catch(0), "ENOENT" === _context.t0.code) { - _context.next = 13; - break; - } - throw _context.t0; - - case 13: - case "end": - return _context.stop(); - } - }, _callee, null, [ [ 0, 9 ] ]); - }))).apply(this, arguments); -} - -function hasWorkspacesConfiguredViaLerna(_x3) { - return _hasWorkspacesConfiguredViaLerna.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaLerna() { - return (_hasWorkspacesConfiguredViaLerna = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(directory) { - return _regeneratorRuntime.wrap(function(_context2) { - for (;;) switch (_context2.prev = _context2.next) { - case 0: - return _context2.prev = 0, _context2.next = 3, fs.readJson(path.join(directory, "lerna.json")); - - case 3: - if (!0 === _context2.sent.useWorkspaces) { - _context2.next = 6; - break; - } - return _context2.abrupt("return", directory); - - case 6: - _context2.next = 12; - break; - - case 8: - if (_context2.prev = 8, _context2.t0 = _context2.catch(0), "ENOENT" === _context2.t0.code) { - _context2.next = 12; - break; - } - throw _context2.t0; - - case 12: - case "end": - return _context2.stop(); - } - }, _callee2, null, [ [ 0, 8 ] ]); - }))).apply(this, arguments); -} - -function hasWorkspacesConfiguredViaPnpm(_x4) { - return _hasWorkspacesConfiguredViaPnpm.apply(this, arguments); -} - -function _hasWorkspacesConfiguredViaPnpm() { - return (_hasWorkspacesConfiguredViaPnpm = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(directory) { - return _regeneratorRuntime.wrap(function(_context3) { - for (;;) switch (_context3.prev = _context3.next) { - case 0: - return _context3.next = 2, fs.exists(path.join(directory, "pnpm-workspace.yaml")); - - case 2: - if (!_context3.sent) { - _context3.next = 5; - break; - } - return _context3.abrupt("return", directory); - - case 5: - case "end": - return _context3.stop(); - } - }, _callee3); - }))).apply(this, arguments); -} - -function findRoot(_x5) { - return _findRoot.apply(this, arguments); -} - -function _findRoot() { - return (_findRoot = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(cwd) { - var firstPkgJsonDirRef, dir; - return _regeneratorRuntime.wrap(function(_context4) { - for (;;) switch (_context4.prev = _context4.next) { - case 0: - return firstPkgJsonDirRef = { - current: void 0 - }, _context4.next = 3, findUp__default(function(directory) { - return Promise.all([ hasWorkspacesConfiguredViaLerna(directory), hasWorkspacesConfiguredViaPkgJson(directory, firstPkgJsonDirRef), hasWorkspacesConfiguredViaPnpm(directory) ]).then(function(x) { - return x.find(function(dir) { - return dir; - }); - }); - }, { - cwd: cwd, - type: "directory" - }); - - case 3: - if (dir = _context4.sent, void 0 !== firstPkgJsonDirRef.current) { - _context4.next = 6; - break; - } - throw new NoPkgJsonFound(cwd); - - case 6: - if (void 0 !== dir) { - _context4.next = 8; - break; - } - return _context4.abrupt("return", firstPkgJsonDirRef.current); - - case 8: - return _context4.abrupt("return", dir); - - case 9: - case "end": - return _context4.stop(); - } - }, _callee4); - }))).apply(this, arguments); -} - -function hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef) { - try { - var pkgJson = fs.readJsonSync(path.join(directory, "package.json")); - if (void 0 === firstPkgJsonDirRef.current && (firstPkgJsonDirRef.current = directory), - pkgJson.workspaces || pkgJson.bolt) return directory; - } catch (err) { - if ("ENOENT" !== err.code) throw err; - } -} - -function hasWorkspacesConfiguredViaLernaSync(directory) { - try { - if (!0 !== fs.readJsonSync(path.join(directory, "lerna.json")).useWorkspaces) return directory; - } catch (err) { - if ("ENOENT" !== err.code) throw err; - } -} - -function hasWorkspacesConfiguredViaPnpmSync(directory) { - if (fs.existsSync(path.join(directory, "pnpm-workspace.yaml"))) return directory; -} - -function findRootSync(cwd) { - var firstPkgJsonDirRef = { - current: void 0 - }, dir = findUp.sync(function(directory) { - return [ hasWorkspacesConfiguredViaLernaSync(directory), hasWorkspacesConfiguredViaPkgJsonSync(directory, firstPkgJsonDirRef), hasWorkspacesConfiguredViaPnpmSync(directory) ].find(function(dir) { - return dir; - }); - }, { - cwd: cwd, - type: "directory" - }); - if (void 0 === firstPkgJsonDirRef.current) throw new NoPkgJsonFound(cwd); - return void 0 === dir ? firstPkgJsonDirRef.current : dir; -} - -exports.NoPkgJsonFound = NoPkgJsonFound, exports.findRoot = findRoot, exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 8366: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var _regeneratorRuntime = _interopDefault(__nccwpck_require__(7594)); -var _asyncToGenerator = _interopDefault(__nccwpck_require__(7270)); -var _classCallCheck = _interopDefault(__nccwpck_require__(1220)); -var _possibleConstructorReturn = _interopDefault(__nccwpck_require__(5297)); -var _getPrototypeOf = _interopDefault(__nccwpck_require__(1695)); -var _inherits = _interopDefault(__nccwpck_require__(4300)); -var _wrapNativeSuper = _interopDefault(__nccwpck_require__(4372)); -var fs = _interopDefault(__nccwpck_require__(6668)); -var path = _interopDefault(__nccwpck_require__(6928)); -var globby = __nccwpck_require__(8626); -var globby__default = _interopDefault(globby); -var readYamlFile = __nccwpck_require__(6143); -var readYamlFile__default = _interopDefault(readYamlFile); -var findRoot = __nccwpck_require__(4038); - -var PackageJsonMissingNameError = -/*#__PURE__*/ -function (_Error) { - _inherits(PackageJsonMissingNameError, _Error); - - function PackageJsonMissingNameError(directories) { - var _this; - - _classCallCheck(this, PackageJsonMissingNameError); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(PackageJsonMissingNameError).call(this, "The following package.jsons are missing the \"name\" field:\n".concat(directories.join("\n")))); - _this.directories = directories; - return _this; - } - - return PackageJsonMissingNameError; -}(_wrapNativeSuper(Error)); -function getPackages(_x) { - return _getPackages.apply(this, arguments); -} - -function _getPackages() { - _getPackages = _asyncToGenerator( - /*#__PURE__*/ - _regeneratorRuntime.mark(function _callee(dir) { - var cwd, pkg, tool, manifest, lernaJson, root, relativeDirectories, directories, pkgJsonsMissingNameField, results; - return _regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return findRoot.findRoot(dir); - - case 2: - cwd = _context.sent; - _context.next = 5; - return fs.readJson(path.join(cwd, "package.json")); - - case 5: - pkg = _context.sent; - - if (!pkg.workspaces) { - _context.next = 10; - break; - } - - if (Array.isArray(pkg.workspaces)) { - tool = { - type: "yarn", - packageGlobs: pkg.workspaces - }; - } else if (pkg.workspaces.packages) { - tool = { - type: "yarn", - packageGlobs: pkg.workspaces.packages - }; - } - - _context.next = 37; - break; - - case 10: - if (!(pkg.bolt && pkg.bolt.workspaces)) { - _context.next = 14; - break; - } - - tool = { - type: "bolt", - packageGlobs: pkg.bolt.workspaces - }; - _context.next = 37; - break; - - case 14: - _context.prev = 14; - _context.next = 17; - return readYamlFile__default(path.join(cwd, "pnpm-workspace.yaml")); - - case 17: - manifest = _context.sent; - - if (manifest && manifest.packages) { - tool = { - type: "pnpm", - packageGlobs: manifest.packages - }; - } - - _context.next = 25; - break; - - case 21: - _context.prev = 21; - _context.t0 = _context["catch"](14); - - if (!(_context.t0.code !== "ENOENT")) { - _context.next = 25; - break; - } - - throw _context.t0; - - case 25: - if (tool) { - _context.next = 37; - break; - } - - _context.prev = 26; - _context.next = 29; - return fs.readJson(path.join(cwd, "lerna.json")); - - case 29: - lernaJson = _context.sent; - - if (lernaJson) { - tool = { - type: "lerna", - packageGlobs: lernaJson.packages || ["packages/*"] - }; - } - - _context.next = 37; - break; - - case 33: - _context.prev = 33; - _context.t1 = _context["catch"](26); - - if (!(_context.t1.code !== "ENOENT")) { - _context.next = 37; - break; - } - - throw _context.t1; - - case 37: - if (tool) { - _context.next = 42; - break; - } - - root = { - dir: cwd, - packageJson: pkg - }; - - if (pkg.name) { - _context.next = 41; - break; - } - - throw new PackageJsonMissingNameError(["package.json"]); - - case 41: - return _context.abrupt("return", { - tool: "root", - root: root, - packages: [root] - }); - - case 42: - _context.next = 44; - return globby__default(tool.packageGlobs, { - cwd: cwd, - onlyDirectories: true, - expandDirectories: false, - ignore: ["**/node_modules"] - }); - - case 44: - relativeDirectories = _context.sent; - directories = relativeDirectories.map(function (p) { - return path.resolve(cwd, p); - }); - pkgJsonsMissingNameField = []; - _context.next = 49; - return Promise.all(directories.sort().map(function (dir) { - return fs.readJson(path.join(dir, "package.json")).then(function (packageJson) { - if (!packageJson.name) { - pkgJsonsMissingNameField.push(path.relative(cwd, path.join(dir, "package.json"))); - } - - return { - packageJson: packageJson, - dir: dir - }; - })["catch"](function (err) { - if (err.code === "ENOENT") { - return null; - } - - throw err; - }); - })); - - case 49: - _context.t2 = function (x) { - return x; - }; - - results = _context.sent.filter(_context.t2); - - if (!(pkgJsonsMissingNameField.length !== 0)) { - _context.next = 54; - break; - } - - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - - case 54: - return _context.abrupt("return", { - tool: tool.type, - root: { - dir: cwd, - packageJson: pkg - }, - packages: results - }); - - case 55: - case "end": - return _context.stop(); - } - } - }, _callee, null, [[14, 21], [26, 33]]); - })); - return _getPackages.apply(this, arguments); -} - -function getPackagesSync(dir) { - var cwd = findRoot.findRootSync(dir); - var pkg = fs.readJsonSync(path.join(cwd, "package.json")); - var tool; - - if (pkg.workspaces) { - if (Array.isArray(pkg.workspaces)) { - tool = { - type: "yarn", - packageGlobs: pkg.workspaces - }; - } else if (pkg.workspaces.packages) { - tool = { - type: "yarn", - packageGlobs: pkg.workspaces.packages - }; - } - } else if (pkg.bolt && pkg.bolt.workspaces) { - tool = { - type: "bolt", - packageGlobs: pkg.bolt.workspaces - }; - } else { - try { - var manifest = readYamlFile.sync(path.join(cwd, "pnpm-workspace.yaml")); - - if (manifest && manifest.packages) { - tool = { - type: "pnpm", - packageGlobs: manifest.packages - }; - } - } catch (err) { - if (err.code !== "ENOENT") { - throw err; - } - } - - if (!tool) { - try { - var lernaJson = fs.readJsonSync(path.join(cwd, "lerna.json")); - - if (lernaJson) { - tool = { - type: "lerna", - packageGlobs: lernaJson.packages || ["packages/*"] - }; - } - } catch (err) { - if (err.code !== "ENOENT") { - throw err; - } - } - } - } - - if (!tool) { - var root = { - dir: cwd, - packageJson: pkg - }; - - if (!pkg.name) { - throw new PackageJsonMissingNameError(["package.json"]); - } - - return { - tool: "root", - root: root, - packages: [root] - }; - } - - var relativeDirectories = globby.sync(tool.packageGlobs, { - cwd: cwd, - onlyDirectories: true, - expandDirectories: false, - ignore: ["**/node_modules"] - }); - var directories = relativeDirectories.map(function (p) { - return path.resolve(cwd, p); - }); - var pkgJsonsMissingNameField = []; - var results = directories.sort().map(function (dir) { - try { - var packageJson = fs.readJsonSync(path.join(dir, "package.json")); - - if (!packageJson.name) { - pkgJsonsMissingNameField.push(path.relative(cwd, path.join(dir, "package.json"))); - } - - return { - packageJson: packageJson, - dir: dir - }; - } catch (err) { - if (err.code === "ENOENT") return null; - throw err; - } - }).filter(function (x) { - return x; - }); - - if (pkgJsonsMissingNameField.length !== 0) { - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - } - - return { - tool: tool.type, - root: { - dir: cwd, - packageJson: pkg - }, - packages: results - }; -} - -exports.PackageJsonMissingNameError = PackageJsonMissingNameError; -exports.getPackages = getPackages; -exports.getPackagesSync = getPackagesSync; - - -/***/ }), - -/***/ 7507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(8656); -} else { - module.exports = __nccwpck_require__(8366); -} - - -/***/ }), - -/***/ 8656: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -function _interopDefault(ex) { - return ex && "object" == typeof ex && "default" in ex ? ex.default : ex; -} - -Object.defineProperty(exports, "__esModule", ({ - value: !0 -})); - -var _regeneratorRuntime = _interopDefault(__nccwpck_require__(7594)), _asyncToGenerator = _interopDefault(__nccwpck_require__(7270)), _classCallCheck = _interopDefault(__nccwpck_require__(1220)), _possibleConstructorReturn = _interopDefault(__nccwpck_require__(5297)), _getPrototypeOf = _interopDefault(__nccwpck_require__(1695)), _inherits = _interopDefault(__nccwpck_require__(4300)), _wrapNativeSuper = _interopDefault(__nccwpck_require__(4372)), fs = _interopDefault(__nccwpck_require__(6668)), path = _interopDefault(__nccwpck_require__(6928)), globby = __nccwpck_require__(8626), globby__default = _interopDefault(globby), readYamlFile = __nccwpck_require__(6143), readYamlFile__default = _interopDefault(readYamlFile), findRoot = __nccwpck_require__(4038), PackageJsonMissingNameError = function(_Error) { - function PackageJsonMissingNameError(directories) { - var _this; - return _classCallCheck(this, PackageJsonMissingNameError), (_this = _possibleConstructorReturn(this, _getPrototypeOf(PackageJsonMissingNameError).call(this, 'The following package.jsons are missing the "name" field:\n'.concat(directories.join("\n"))))).directories = directories, - _this; - } - return _inherits(PackageJsonMissingNameError, _Error), PackageJsonMissingNameError; -}(_wrapNativeSuper(Error)); - -function getPackages(_x) { - return _getPackages.apply(this, arguments); -} - -function _getPackages() { - return (_getPackages = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(dir) { - var cwd, pkg, tool, manifest, lernaJson, root, relativeDirectories, directories, pkgJsonsMissingNameField, results; - return _regeneratorRuntime.wrap(function(_context) { - for (;;) switch (_context.prev = _context.next) { - case 0: - return _context.next = 2, findRoot.findRoot(dir); - - case 2: - return cwd = _context.sent, _context.next = 5, fs.readJson(path.join(cwd, "package.json")); - - case 5: - if (!(pkg = _context.sent).workspaces) { - _context.next = 10; - break; - } - Array.isArray(pkg.workspaces) ? tool = { - type: "yarn", - packageGlobs: pkg.workspaces - } : pkg.workspaces.packages && (tool = { - type: "yarn", - packageGlobs: pkg.workspaces.packages - }), _context.next = 37; - break; - - case 10: - if (!pkg.bolt || !pkg.bolt.workspaces) { - _context.next = 14; - break; - } - tool = { - type: "bolt", - packageGlobs: pkg.bolt.workspaces - }, _context.next = 37; - break; - - case 14: - return _context.prev = 14, _context.next = 17, readYamlFile__default(path.join(cwd, "pnpm-workspace.yaml")); - - case 17: - (manifest = _context.sent) && manifest.packages && (tool = { - type: "pnpm", - packageGlobs: manifest.packages - }), _context.next = 25; - break; - - case 21: - if (_context.prev = 21, _context.t0 = _context.catch(14), "ENOENT" === _context.t0.code) { - _context.next = 25; - break; - } - throw _context.t0; - - case 25: - if (tool) { - _context.next = 37; - break; - } - return _context.prev = 26, _context.next = 29, fs.readJson(path.join(cwd, "lerna.json")); - - case 29: - (lernaJson = _context.sent) && (tool = { - type: "lerna", - packageGlobs: lernaJson.packages || [ "packages/*" ] - }), _context.next = 37; - break; - - case 33: - if (_context.prev = 33, _context.t1 = _context.catch(26), "ENOENT" === _context.t1.code) { - _context.next = 37; - break; - } - throw _context.t1; - - case 37: - if (tool) { - _context.next = 42; - break; - } - if (root = { - dir: cwd, - packageJson: pkg - }, pkg.name) { - _context.next = 41; - break; - } - throw new PackageJsonMissingNameError([ "package.json" ]); - - case 41: - return _context.abrupt("return", { - tool: "root", - root: root, - packages: [ root ] - }); - - case 42: - return _context.next = 44, globby__default(tool.packageGlobs, { - cwd: cwd, - onlyDirectories: !0, - expandDirectories: !1, - ignore: [ "**/node_modules" ] - }); - - case 44: - return relativeDirectories = _context.sent, directories = relativeDirectories.map(function(p) { - return path.resolve(cwd, p); - }), pkgJsonsMissingNameField = [], _context.next = 49, Promise.all(directories.sort().map(function(dir) { - return fs.readJson(path.join(dir, "package.json")).then(function(packageJson) { - return packageJson.name || pkgJsonsMissingNameField.push(path.relative(cwd, path.join(dir, "package.json"))), - { - packageJson: packageJson, - dir: dir - }; - }).catch(function(err) { - if ("ENOENT" === err.code) return null; - throw err; - }); - })); - - case 49: - if (_context.t2 = function(x) { - return x; - }, results = _context.sent.filter(_context.t2), 0 === pkgJsonsMissingNameField.length) { - _context.next = 54; - break; - } - throw pkgJsonsMissingNameField.sort(), new PackageJsonMissingNameError(pkgJsonsMissingNameField); - - case 54: - return _context.abrupt("return", { - tool: tool.type, - root: { - dir: cwd, - packageJson: pkg - }, - packages: results - }); - - case 55: - case "end": - return _context.stop(); - } - }, _callee, null, [ [ 14, 21 ], [ 26, 33 ] ]); - }))).apply(this, arguments); -} - -function getPackagesSync(dir) { - var tool, cwd = findRoot.findRootSync(dir), pkg = fs.readJsonSync(path.join(cwd, "package.json")); - if (pkg.workspaces) Array.isArray(pkg.workspaces) ? tool = { - type: "yarn", - packageGlobs: pkg.workspaces - } : pkg.workspaces.packages && (tool = { - type: "yarn", - packageGlobs: pkg.workspaces.packages - }); else if (pkg.bolt && pkg.bolt.workspaces) tool = { - type: "bolt", - packageGlobs: pkg.bolt.workspaces - }; else { - try { - var manifest = readYamlFile.sync(path.join(cwd, "pnpm-workspace.yaml")); - manifest && manifest.packages && (tool = { - type: "pnpm", - packageGlobs: manifest.packages - }); - } catch (err) { - if ("ENOENT" !== err.code) throw err; - } - if (!tool) try { - var lernaJson = fs.readJsonSync(path.join(cwd, "lerna.json")); - lernaJson && (tool = { - type: "lerna", - packageGlobs: lernaJson.packages || [ "packages/*" ] - }); - } catch (err) { - if ("ENOENT" !== err.code) throw err; - } - } - if (!tool) { - var root = { - dir: cwd, - packageJson: pkg - }; - if (!pkg.name) throw new PackageJsonMissingNameError([ "package.json" ]); - return { - tool: "root", - root: root, - packages: [ root ] - }; - } - var directories = globby.sync(tool.packageGlobs, { - cwd: cwd, - onlyDirectories: !0, - expandDirectories: !1, - ignore: [ "**/node_modules" ] - }).map(function(p) { - return path.resolve(cwd, p); - }), pkgJsonsMissingNameField = [], results = directories.sort().map(function(dir) { - try { - var packageJson = fs.readJsonSync(path.join(dir, "package.json")); - return packageJson.name || pkgJsonsMissingNameField.push(path.relative(cwd, path.join(dir, "package.json"))), - { - packageJson: packageJson, - dir: dir - }; - } catch (err) { - if ("ENOENT" === err.code) return null; - throw err; - } - }).filter(function(x) { - return x; - }); - if (0 !== pkgJsonsMissingNameField.length) throw pkgJsonsMissingNameField.sort(), - new PackageJsonMissingNameError(pkgJsonsMissingNameField); - return { - tool: tool.type, - root: { - dir: cwd, - packageJson: pkg - }, - packages: results - }; -} - -exports.PackageJsonMissingNameError = PackageJsonMissingNameError, exports.getPackages = getPackages, -exports.getPackagesSync = getPackagesSync; - - -/***/ }), - -/***/ 5254: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1121: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; -const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); -if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); -} -const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); -const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); -const SUPPORTED_MAJOR_VERSION = 10; -const SUPPORTED_MINOR_VERSION = 10; -const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; -const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; -/** - * IS `true` for Node.js 10.10 and greater. - */ -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - - -/***/ }), - -/***/ 1484: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.scandirSync = exports.scandir = void 0; -const async = __nccwpck_require__(9977); -const sync = __nccwpck_require__(5554); -const settings_1 = __nccwpck_require__(595); -exports.Settings = settings_1.default; -function scandir(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.scandir = scandir; -function scandirSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.scandirSync = scandirSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9977: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const rpl = __nccwpck_require__(7906); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); -} -exports.read = read; -function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; -} -function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path, settings.fsStatSettings, (error, stats) => { - if (error !== null) { - done(error); - return; - } - const entry = { - name, - path, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); -} -exports.readdir = readdir; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 9392: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = void 0; -function joinPathSegments(a, b, separator) { - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 5554: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); -} -exports.read = read; -function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } - catch (error) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error; - } - } - } - return entry; - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); -} -exports.readdir = readdir; - - -/***/ }), - -/***/ 595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const fs = __nccwpck_require__(5254); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2535: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 2046: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fs = void 0; -const fs = __nccwpck_require__(2535); -exports.fs = fs; - - -/***/ }), - -/***/ 5375: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.statSync = exports.stat = exports.Settings = void 0; -const async = __nccwpck_require__(9100); -const sync = __nccwpck_require__(4421); -const settings_1 = __nccwpck_require__(8448); -exports.Settings = settings_1.default; -function stat(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.stat = stat; -function statSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.statSync = statSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9100: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings, callback) { - settings.fs.lstat(path, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); -} -exports.read = read; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 4421: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings) { - const lstat = settings.fs.lstatSync(path); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } - catch (error) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error; - } -} -exports.read = read; - - -/***/ }), - -/***/ 8448: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs = __nccwpck_require__(5375); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2705: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; -const async_1 = __nccwpck_require__(6200); -const stream_1 = __nccwpck_require__(2); -const sync_1 = __nccwpck_require__(6345); -const settings_1 = __nccwpck_require__(2287); -exports.Settings = settings_1.default; -function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); -} -exports.walk = walk; -function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); -} -exports.walkSync = walkSync; -function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); -} -exports.walkStream = walkStream; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 6200: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(826); -class AsyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error) => { - callFailureCallback(callback, error); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } -} -exports["default"] = AsyncProvider; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, entries) { - callback(null, entries); -} - - -/***/ }), - -/***/ 2: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const async_1 = __nccwpck_require__(826); -class StreamProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error) => { - this._stream.emit('error', error); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } -} -exports["default"] = StreamProvider; - - -/***/ }), - -/***/ 6345: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(127); -class SyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } -} -exports["default"] = SyncProvider; - - -/***/ }), - -/***/ 826: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(4434); -const fsScandir = __nccwpck_require__(1484); -const fastq = __nccwpck_require__(885); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class AsyncReader extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit('end'); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error('The reader is already destroyed'); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on('entry', callback); - } - onError(callback) { - this._emitter.once('error', callback); - } - onEnd(callback) { - this._emitter.once('end', callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error) => { - if (error !== null) { - this._handleError(error); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { - if (error !== null) { - done(error, undefined); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, undefined); - }); - } - _handleError(error) { - if (this._isDestroyed || !common.isFatalError(this._settings, error)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit('error', error); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit('entry', entry); - } -} -exports["default"] = AsyncReader; - - -/***/ }), - -/***/ 5305: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; -function isFatalError(settings, error) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error); -} -exports.isFatalError = isFatalError; -function isAppliedFilter(filter, value) { - return filter === null || filter(value); -} -exports.isAppliedFilter = isAppliedFilter; -function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); -} -exports.replacePathSegmentSeparator = replacePathSegmentSeparator; -function joinPathSegments(a, b, separator) { - if (a === '') { - return b; - } - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 2983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const common = __nccwpck_require__(5305); -class Reader { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 127: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsScandir = __nccwpck_require__(1484); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class SyncReader extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } - catch (error) { - this._handleError(error); - } - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - throw error; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } -} -exports["default"] = SyncReader; - - -/***/ }), - -/***/ 2287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsScandir = __nccwpck_require__(1484); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, undefined); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 9430: -/***/ ((module) => { - - - -module.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; -}; - - -/***/ }), - -/***/ 6916: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928) -const isWindows = __nccwpck_require__(434) - -module.exports = isWindows() ? winResolve : path.resolve - -function winResolve (p) { - if (arguments.length === 0) return path.resolve() - if (typeof p !== 'string') { - return path.resolve(p) - } - // c: => C: - if (p[1] === ':') { - const cc = p[0].charCodeAt() - if (cc < 65 || cc > 90) { - p = `${p[0].toUpperCase()}${p.substr(1)}` - } - } - // On Windows path.resolve('C:') returns C:\Users\ - // We resolve C: to C: - if (p.endsWith(':')) { - return p - } - return path.resolve(p) -} - - -/***/ }), - -/***/ 8671: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); -const compile = __nccwpck_require__(4898); -const expand = __nccwpck_require__(5331); -const parse = __nccwpck_require__(7787); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; - - -/***/ }), - -/***/ 4898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const utils = __nccwpck_require__(2474); - -const compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - - if (node.isClose === true) { - console.log('node.isClose', prefix, node.value); - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? prefix + node.value : '('; - } - - if (node.type === 'close') { - return invalid ? prefix + node.value : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - - return output; - }; - - return walk(ast); -}; - -module.exports = compile; - - -/***/ }), - -/***/ 9397: -/***/ ((module) => { - - - -module.exports = { - MAX_LENGTH: 10000, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; - - -/***/ }), - -/***/ 5331: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const stringify = __nccwpck_require__(3062); -const utils = __nccwpck_require__(2474); - -const append = (queue = '', stash = '', enclose = false) => { - const result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; - - const walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; - - -/***/ }), - -/***/ 7787: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __nccwpck_require__(9397); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - const opts = options || {}; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - const ast = { type: 'root', input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - const open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - const brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - const type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - const parent = stack[stack.length - 1]; - const index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 3062: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(2474); - -module.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - - - -/***/ }), - -/***/ 2474: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - const node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - - if (Array.isArray(ele)) { - flat(ele); - continue; - } - - if (ele !== undefined) { - result.push(ele); - } - } - return result; - }; - - flat(args); - return result; -}; - - -/***/ }), - -/***/ 670: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const cp = __nccwpck_require__(5317); -const parse = __nccwpck_require__(8401); -const enoent = __nccwpck_require__(5377); - -function spawn(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); - - // Hook into child process "exit" event to emit an error if the command - // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - enoent.hookChildProcess(spawned, parsed); - - return spawned; -} - -function spawnSync(command, args, options) { - // Parse the arguments - const parsed = parse(command, args, options); - - // Spawn the child process - const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); - - // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 - result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); - - return result; -} - -module.exports = spawn; -module.exports.spawn = spawn; -module.exports.sync = spawnSync; - -module.exports._parse = parse; -module.exports._enoent = enoent; - - -/***/ }), - -/***/ 5377: -/***/ ((module) => { - - - -const isWin = process.platform === 'win32'; - -function notFoundError(original, syscall) { - return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { - code: 'ENOENT', - errno: 'ENOENT', - syscall: `${syscall} ${original.command}`, - path: original.command, - spawnargs: original.args, - }); -} - -function hookChildProcess(cp, parsed) { - if (!isWin) { - return; - } - - const originalEmit = cp.emit; - - cp.emit = function (name, arg1) { - // If emitting "exit" event and exit code is 1, we need to check if - // the command exists and emit an "error" instead - // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 - if (name === 'exit') { - const err = verifyENOENT(arg1, parsed); - - if (err) { - return originalEmit.call(cp, 'error', err); - } - } - - return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params - }; -} - -function verifyENOENT(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawn'); - } - - return null; -} - -function verifyENOENTSync(status, parsed) { - if (isWin && status === 1 && !parsed.file) { - return notFoundError(parsed.original, 'spawnSync'); - } - - return null; -} - -module.exports = { - hookChildProcess, - verifyENOENT, - verifyENOENTSync, - notFoundError, -}; - - -/***/ }), - -/***/ 8401: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const resolveCommand = __nccwpck_require__(7430); -const escape = __nccwpck_require__(6808); -const readShebang = __nccwpck_require__(9531); - -const isWin = process.platform === 'win32'; -const isExecutableRegExp = /\.(?:com|exe)$/i; -const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; - -function detectShebang(parsed) { - parsed.file = resolveCommand(parsed); - - const shebang = parsed.file && readShebang(parsed.file); - - if (shebang) { - parsed.args.unshift(parsed.file); - parsed.command = shebang; - - return resolveCommand(parsed); - } - - return parsed.file; -} - -function parseNonShell(parsed) { - if (!isWin) { - return parsed; - } - - // Detect & add support for shebangs - const commandFile = detectShebang(parsed); - - // We don't need a shell if the command filename is an executable - const needsShell = !isExecutableRegExp.test(commandFile); - - // If a shell is required, use cmd.exe and take care of escaping everything correctly - // Note that `forceShell` is an hidden option used only in tests - if (parsed.options.forceShell || needsShell) { - // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` - // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument - // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, - // we need to double escape them - const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); - - // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) - // This is necessary otherwise it will always fail with ENOENT in those cases - parsed.command = path.normalize(parsed.command); - - // Escape command & arguments - parsed.command = escape.command(parsed.command); - parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); - - const shellCommand = [parsed.command].concat(parsed.args).join(' '); - - parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; - parsed.command = process.env.comspec || 'cmd.exe'; - parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped - } - - return parsed; -} - -function parse(command, args, options) { - // Normalize arguments, similar to nodejs - if (args && !Array.isArray(args)) { - options = args; - args = null; - } - - args = args ? args.slice(0) : []; // Clone array to avoid changing the original - options = Object.assign({}, options); // Clone object to avoid changing the original - - // Build our parsed object - const parsed = { - command, - args, - options, - file: undefined, - original: { - command, - args, - }, - }; - - // Delegate further parsing to shell or non-shell - return options.shell ? parsed : parseNonShell(parsed); -} - -module.exports = parse; - - -/***/ }), - -/***/ 6808: -/***/ ((module) => { - - - -// See http://www.robvanderwoude.com/escapechars.php -const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; - -function escapeCommand(arg) { - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - return arg; -} - -function escapeArgument(arg, doubleEscapeMetaChars) { - // Convert to string - arg = `${arg}`; - - // Algorithm below is based on https://qntm.org/cmd - // It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input - // Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'); - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote later): - // double up all the backslashes - arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1'); - - // All other backslashes occur literally - - // Quote the whole thing: - arg = `"${arg}"`; - - // Escape meta chars - arg = arg.replace(metaCharsRegExp, '^$1'); - - // Double escape meta chars if necessary - if (doubleEscapeMetaChars) { - arg = arg.replace(metaCharsRegExp, '^$1'); - } - - return arg; -} - -module.exports.command = escapeCommand; -module.exports.argument = escapeArgument; - - -/***/ }), - -/***/ 9531: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(9896); -const shebangCommand = __nccwpck_require__(4881); - -function readShebang(command) { - // Read the first 150 bytes from the file - const size = 150; - const buffer = Buffer.alloc(size); - - let fd; - - try { - fd = fs.openSync(command, 'r'); - fs.readSync(fd, buffer, 0, size, 0); - fs.closeSync(fd); - } catch (e) { /* Empty */ } - - // Attempt to extract shebang (null is returned if not a shebang) - return shebangCommand(buffer.toString()); -} - -module.exports = readShebang; - - -/***/ }), - -/***/ 7430: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const which = __nccwpck_require__(1192); -const getPathKey = __nccwpck_require__(4662); - -function resolveCommandAttempt(parsed, withoutPathExt) { - const env = parsed.options.env || process.env; - const cwd = process.cwd(); - const hasCustomCwd = parsed.options.cwd != null; - // Worker threads do not have process.chdir() - const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled; - - // If a custom `cwd` was specified, we need to change the process cwd - // because `which` will do stat calls but does not support a custom cwd - if (shouldSwitchCwd) { - try { - process.chdir(parsed.options.cwd); - } catch (err) { - /* Empty */ - } - } - - let resolved; - - try { - resolved = which.sync(parsed.command, { - path: env[getPathKey({ env })], - pathExt: withoutPathExt ? path.delimiter : undefined, - }); - } catch (e) { - /* Empty */ - } finally { - if (shouldSwitchCwd) { - process.chdir(cwd); - } - } - - // If we successfully resolved, ensure that an absolute path is returned - // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it - if (resolved) { - resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); - } - - return resolved; -} - -function resolveCommand(parsed) { - return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); -} - -module.exports = resolveCommand; - - -/***/ }), - -/***/ 8797: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928); -const pathType = __nccwpck_require__(3051); - -const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; - -const getPath = (filepath, cwd) => { - const pth = filepath[0] === '!' ? filepath.slice(1) : filepath; - return path.isAbsolute(pth) ? pth : path.join(cwd, pth); -}; - -const addExtensions = (file, extensions) => { - if (path.extname(file)) { - return `**/${file}`; - } - - return `**/${file}.${getExtensions(extensions)}`; -}; - -const getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - - if (options.files && options.extensions) { - return options.files.map(x => path.posix.join(directory, addExtensions(x, options.extensions))); - } - - if (options.files) { - return options.files.map(x => path.posix.join(directory, `**/${x}`)); - } - - if (options.extensions) { - return [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - - return [path.posix.join(directory, '**')]; -}; - -module.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - - if (typeof options.cwd !== 'string') { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - - const globs = await Promise.all([].concat(input).map(async x => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - - return [].concat.apply([], globs); // eslint-disable-line prefer-spread -}; - -module.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - - if (typeof options.cwd !== 'string') { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - - const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - - return [].concat.apply([], globs); // eslint-disable-line prefer-spread -}; - - -/***/ }), - -/***/ 3650: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928); -const childProcess = __nccwpck_require__(5317); -const crossSpawn = __nccwpck_require__(670); -const stripFinalNewline = __nccwpck_require__(3757); -const npmRunPath = __nccwpck_require__(4876); -const onetime = __nccwpck_require__(7471); -const makeError = __nccwpck_require__(5156); -const normalizeStdio = __nccwpck_require__(2319); -const {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} = __nccwpck_require__(9388); -const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = __nccwpck_require__(6852); -const {mergePromise, getSpawnedPromise} = __nccwpck_require__(8531); -const {joinCommand, parseCommand, getEscapedCommand} = __nccwpck_require__(4435); - -const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100; - -const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => { - const env = extendEnv ? {...process.env, ...envOption} : envOption; - - if (preferLocal) { - return npmRunPath.env({env, cwd: localDir, execPath}); - } - - return env; -}; - -const handleArguments = (file, args, options = {}) => { - const parsed = crossSpawn._parse(file, args, options); - file = parsed.command; - args = parsed.args; - options = parsed.options; - - options = { - maxBuffer: DEFAULT_MAX_BUFFER, - buffer: true, - stripFinalNewline: true, - extendEnv: true, - preferLocal: false, - localDir: options.cwd || process.cwd(), - execPath: process.execPath, - encoding: 'utf8', - reject: true, - cleanup: true, - all: false, - windowsHide: true, - ...options - }; - - options.env = getEnv(options); - - options.stdio = normalizeStdio(options); - - if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') { - // #116 - args.unshift('/q'); - } - - return {file, args, options, parsed}; -}; - -const handleOutput = (options, value, error) => { - if (typeof value !== 'string' && !Buffer.isBuffer(value)) { - // When `execa.sync()` errors, we normalize it to '' to mimic `execa()` - return error === undefined ? undefined : ''; - } - - if (options.stripFinalNewline) { - return stripFinalNewline(value); - } - - return value; -}; - -const execa = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - - validateTimeout(parsed.options); - - let spawned; - try { - spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options); - } catch (error) { - // Ensure the returned error is always both a promise and a child process - const dummySpawned = new childProcess.ChildProcess(); - const errorPromise = Promise.reject(makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - })); - return mergePromise(dummySpawned, errorPromise); - } - - const spawnedPromise = getSpawnedPromise(spawned); - const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise); - const processDone = setExitHandler(spawned, parsed.options, timedPromise); - - const context = {isCanceled: false}; - - spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned)); - spawned.cancel = spawnedCancel.bind(null, spawned, context); - - const handlePromise = async () => { - const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone); - const stdout = handleOutput(parsed.options, stdoutResult); - const stderr = handleOutput(parsed.options, stderrResult); - const all = handleOutput(parsed.options, allResult); - - if (error || exitCode !== 0 || signal !== null) { - const returnedError = makeError({ - error, - exitCode, - signal, - stdout, - stderr, - all, - command, - escapedCommand, - parsed, - timedOut, - isCanceled: context.isCanceled, - killed: spawned.killed - }); - - if (!parsed.options.reject) { - return returnedError; - } - - throw returnedError; - } - - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - all, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; - }; - - const handlePromiseOnce = onetime(handlePromise); - - handleInput(spawned, parsed.options.input); - - spawned.all = makeAllStream(spawned, parsed.options); - - return mergePromise(spawned, handlePromiseOnce); -}; - -module.exports = execa; - -module.exports.sync = (file, args, options) => { - const parsed = handleArguments(file, args, options); - const command = joinCommand(file, args); - const escapedCommand = getEscapedCommand(file, args); - - validateInputSync(parsed.options); - - let result; - try { - result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options); - } catch (error) { - throw makeError({ - error, - stdout: '', - stderr: '', - all: '', - command, - escapedCommand, - parsed, - timedOut: false, - isCanceled: false, - killed: false - }); - } - - const stdout = handleOutput(parsed.options, result.stdout, result.error); - const stderr = handleOutput(parsed.options, result.stderr, result.error); - - if (result.error || result.status !== 0 || result.signal !== null) { - const error = makeError({ - stdout, - stderr, - error: result.error, - signal: result.signal, - exitCode: result.status, - command, - escapedCommand, - parsed, - timedOut: result.error && result.error.code === 'ETIMEDOUT', - isCanceled: false, - killed: result.signal !== null - }); - - if (!parsed.options.reject) { - return error; - } - - throw error; - } - - return { - command, - escapedCommand, - exitCode: 0, - stdout, - stderr, - failed: false, - timedOut: false, - isCanceled: false, - killed: false - }; -}; - -module.exports.command = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa(file, args, options); -}; - -module.exports.commandSync = (command, options) => { - const [file, ...args] = parseCommand(command); - return execa.sync(file, args, options); -}; - -module.exports.node = (scriptPath, args, options = {}) => { - if (args && !Array.isArray(args) && typeof args === 'object') { - options = args; - args = []; - } - - const stdio = normalizeStdio.node(options); - const defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect')); - - const { - nodePath = process.execPath, - nodeOptions = defaultExecArgv - } = options; - - return execa( - nodePath, - [ - ...nodeOptions, - scriptPath, - ...(Array.isArray(args) ? args : []) - ], - { - ...options, - stdin: undefined, - stdout: undefined, - stderr: undefined, - stdio, - shell: false - } - ); -}; - - -/***/ }), - -/***/ 4435: -/***/ ((module) => { - - -const normalizeArgs = (file, args = []) => { - if (!Array.isArray(args)) { - return [file]; - } - - return [file, ...args]; -}; - -const NO_ESCAPE_REGEXP = /^[\w.-]+$/; -const DOUBLE_QUOTES_REGEXP = /"/g; - -const escapeArg = arg => { - if (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) { - return arg; - } - - return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`; -}; - -const joinCommand = (file, args) => { - return normalizeArgs(file, args).join(' '); -}; - -const getEscapedCommand = (file, args) => { - return normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' '); -}; - -const SPACES_REGEXP = / +/g; - -// Handle `execa.command()` -const parseCommand = command => { - const tokens = []; - for (const token of command.trim().split(SPACES_REGEXP)) { - // Allow spaces to be escaped by a backslash if not meant as a delimiter - const previousToken = tokens[tokens.length - 1]; - if (previousToken && previousToken.endsWith('\\')) { - // Merge previous token with current one - tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`; - } else { - tokens.push(token); - } - } - - return tokens; -}; - -module.exports = { - joinCommand, - getEscapedCommand, - parseCommand -}; - - -/***/ }), - -/***/ 5156: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {signalsByName} = __nccwpck_require__(4743); - -const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => { - if (timedOut) { - return `timed out after ${timeout} milliseconds`; - } - - if (isCanceled) { - return 'was canceled'; - } - - if (errorCode !== undefined) { - return `failed with ${errorCode}`; - } - - if (signal !== undefined) { - return `was killed with ${signal} (${signalDescription})`; - } - - if (exitCode !== undefined) { - return `failed with exit code ${exitCode}`; - } - - return 'failed'; -}; - -const makeError = ({ - stdout, - stderr, - all, - error, - signal, - exitCode, - command, - escapedCommand, - timedOut, - isCanceled, - killed, - parsed: {options: {timeout}} -}) => { - // `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`. - // We normalize them to `undefined` - exitCode = exitCode === null ? undefined : exitCode; - signal = signal === null ? undefined : signal; - const signalDescription = signal === undefined ? undefined : signalsByName[signal].description; - - const errorCode = error && error.code; - - const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}); - const execaMessage = `Command ${prefix}: ${command}`; - const isError = Object.prototype.toString.call(error) === '[object Error]'; - const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage; - const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n'); - - if (isError) { - error.originalMessage = error.message; - error.message = message; - } else { - error = new Error(message); - } - - error.shortMessage = shortMessage; - error.command = command; - error.escapedCommand = escapedCommand; - error.exitCode = exitCode; - error.signal = signal; - error.signalDescription = signalDescription; - error.stdout = stdout; - error.stderr = stderr; - - if (all !== undefined) { - error.all = all; - } - - if ('bufferedData' in error) { - delete error.bufferedData; - } - - error.failed = true; - error.timedOut = Boolean(timedOut); - error.isCanceled = isCanceled; - error.killed = killed && !timedOut; - - return error; -}; - -module.exports = makeError; - - -/***/ }), - -/***/ 9388: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const os = __nccwpck_require__(857); -const onExit = __nccwpck_require__(6821); - -const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5; - -// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior -const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => { - const killResult = kill(signal); - setKillTimeout(kill, signal, options, killResult); - return killResult; -}; - -const setKillTimeout = (kill, signal, options, killResult) => { - if (!shouldForceKill(signal, options, killResult)) { - return; - } - - const timeout = getForceKillAfterTimeout(options); - const t = setTimeout(() => { - kill('SIGKILL'); - }, timeout); - - // Guarded because there's no `.unref()` when `execa` is used in the renderer - // process in Electron. This cannot be tested since we don't run tests in - // Electron. - // istanbul ignore else - if (t.unref) { - t.unref(); - } -}; - -const shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => { - return isSigterm(signal) && forceKillAfterTimeout !== false && killResult; -}; - -const isSigterm = signal => { - return signal === os.constants.signals.SIGTERM || - (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM'); -}; - -const getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => { - if (forceKillAfterTimeout === true) { - return DEFAULT_FORCE_KILL_TIMEOUT; - } - - if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) { - throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`); - } - - return forceKillAfterTimeout; -}; - -// `childProcess.cancel()` -const spawnedCancel = (spawned, context) => { - const killResult = spawned.kill(); - - if (killResult) { - context.isCanceled = true; - } -}; - -const timeoutKill = (spawned, signal, reject) => { - spawned.kill(signal); - reject(Object.assign(new Error('Timed out'), {timedOut: true, signal})); -}; - -// `timeout` option handling -const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => { - if (timeout === 0 || timeout === undefined) { - return spawnedPromise; - } - - let timeoutId; - const timeoutPromise = new Promise((resolve, reject) => { - timeoutId = setTimeout(() => { - timeoutKill(spawned, killSignal, reject); - }, timeout); - }); - - const safeSpawnedPromise = spawnedPromise.finally(() => { - clearTimeout(timeoutId); - }); - - return Promise.race([timeoutPromise, safeSpawnedPromise]); -}; - -const validateTimeout = ({timeout}) => { - if (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) { - throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`); - } -}; - -// `cleanup` option handling -const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => { - if (!cleanup || detached) { - return timedPromise; - } - - const removeExitHandler = onExit(() => { - spawned.kill(); - }); - - return timedPromise.finally(() => { - removeExitHandler(); - }); -}; - -module.exports = { - spawnedKill, - spawnedCancel, - setupTimeout, - validateTimeout, - setExitHandler -}; - - -/***/ }), - -/***/ 8531: -/***/ ((module) => { - - - -const nativePromisePrototype = (async () => {})().constructor.prototype; -const descriptors = ['then', 'catch', 'finally'].map(property => [ - property, - Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property) -]); - -// The return value is a mixin of `childProcess` and `Promise` -const mergePromise = (spawned, promise) => { - for (const [property, descriptor] of descriptors) { - // Starting the main `promise` is deferred to avoid consuming streams - const value = typeof promise === 'function' ? - (...args) => Reflect.apply(descriptor.value, promise(), args) : - descriptor.value.bind(promise); - - Reflect.defineProperty(spawned, property, {...descriptor, value}); - } - - return spawned; -}; - -// Use promises instead of `child_process` events -const getSpawnedPromise = spawned => { - return new Promise((resolve, reject) => { - spawned.on('exit', (exitCode, signal) => { - resolve({exitCode, signal}); - }); - - spawned.on('error', error => { - reject(error); - }); - - if (spawned.stdin) { - spawned.stdin.on('error', error => { - reject(error); - }); - } - }); -}; - -module.exports = { - mergePromise, - getSpawnedPromise -}; - - - -/***/ }), - -/***/ 2319: -/***/ ((module) => { - - -const aliases = ['stdin', 'stdout', 'stderr']; - -const hasAlias = options => aliases.some(alias => options[alias] !== undefined); - -const normalizeStdio = options => { - if (!options) { - return; - } - - const {stdio} = options; - - if (stdio === undefined) { - return aliases.map(alias => options[alias]); - } - - if (hasAlias(options)) { - throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`); - } - - if (typeof stdio === 'string') { - return stdio; - } - - if (!Array.isArray(stdio)) { - throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); - } - - const length = Math.max(stdio.length, aliases.length); - return Array.from({length}, (value, index) => stdio[index]); -}; - -module.exports = normalizeStdio; - -// `ipc` is pushed unless it is already present -module.exports.node = options => { - const stdio = normalizeStdio(options); - - if (stdio === 'ipc') { - return 'ipc'; - } - - if (stdio === undefined || typeof stdio === 'string') { - return [stdio, stdio, stdio, 'ipc']; - } - - if (stdio.includes('ipc')) { - return stdio; - } - - return [...stdio, 'ipc']; -}; - - -/***/ }), - -/***/ 6852: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const isStream = __nccwpck_require__(1066); -const getStream = __nccwpck_require__(2462); -const mergeStream = __nccwpck_require__(353); - -// `input` option -const handleInput = (spawned, input) => { - // Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852 - // @todo remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0 - if (input === undefined || spawned.stdin === undefined) { - return; - } - - if (isStream(input)) { - input.pipe(spawned.stdin); - } else { - spawned.stdin.end(input); - } -}; - -// `all` interleaves `stdout` and `stderr` -const makeAllStream = (spawned, {all}) => { - if (!all || (!spawned.stdout && !spawned.stderr)) { - return; - } - - const mixed = mergeStream(); - - if (spawned.stdout) { - mixed.add(spawned.stdout); - } - - if (spawned.stderr) { - mixed.add(spawned.stderr); - } - - return mixed; -}; - -// On failure, `result.stdout|stderr|all` should contain the currently buffered stream -const getBufferedData = async (stream, streamPromise) => { - if (!stream) { - return; - } - - stream.destroy(); - - try { - return await streamPromise; - } catch (error) { - return error.bufferedData; - } -}; - -const getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => { - if (!stream || !buffer) { - return; - } - - if (encoding) { - return getStream(stream, {encoding, maxBuffer}); - } - - return getStream.buffer(stream, {maxBuffer}); -}; - -// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all) -const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => { - const stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer}); - const stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer}); - const allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2}); - - try { - return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]); - } catch (error) { - return Promise.all([ - {error, signal: error.signal, timedOut: error.timedOut}, - getBufferedData(stdout, stdoutPromise), - getBufferedData(stderr, stderrPromise), - getBufferedData(all, allPromise) - ]); - } -}; - -const validateInputSync = ({input}) => { - if (isStream(input)) { - throw new TypeError('The `input` option cannot be a stream in sync mode'); - } -}; - -module.exports = { - handleInput, - makeAllStream, - getSpawnedResult, - validateInputSync -}; - - - -/***/ }), - -/***/ 1456: -/***/ (function(__unused_webpack_module, exports) { - - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var ExtendableError = /** @class */ (function (_super) { - __extends(ExtendableError, _super); - function ExtendableError(message) { - var _newTarget = this.constructor; - if (message === void 0) { message = ''; } - var _this = _super.call(this, message) || this; - _this.message = message; - Object.setPrototypeOf(_this, _newTarget.prototype); - delete _this.stack; - _this.name = _newTarget.name; - _this._error = new Error(); - return _this; - } - Object.defineProperty(ExtendableError.prototype, "stack", { - get: function () { - if (this._stack) { - return this._stack; - } - var prototype = Object.getPrototypeOf(this); - var depth = 1; - loop: while (prototype) { - switch (prototype) { - case ExtendableError.prototype: - break loop; - case Object.prototype: - depth = 1; - break loop; - default: - depth++; - break; - } - prototype = Object.getPrototypeOf(prototype); - } - var stackLines = (this._error.stack || '').match(/.+/g) || []; - var nameLine = this.name; - if (this.message) { - nameLine += ": " + this.message; - } - stackLines.splice(0, depth + 1, nameLine); - return this._stack = stackLines.join('\n'); - }, - enumerable: true, - configurable: true - }); - return ExtendableError; -}(Error)); -exports.ExtendableError = ExtendableError; -exports["default"] = ExtendableError; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 2457: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const taskManager = __nccwpck_require__(6160); -const async_1 = __nccwpck_require__(3616); -const stream_1 = __nccwpck_require__(2410); -const sync_1 = __nccwpck_require__(3473); -const settings_1 = __nccwpck_require__(948); -const utils = __nccwpck_require__(123); -async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); -} -// https://github.com/typescript-eslint/typescript-eslint/issues/60 -// eslint-disable-next-line no-redeclare -(function (FastGlob) { - FastGlob.glob = FastGlob; - FastGlob.globSync = sync; - FastGlob.globStream = stream; - FastGlob.async = FastGlob; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - /** - * The stream returned by the provider cannot work with an asynchronous iterator. - * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. - * This affects performance (+25%). I don't see best solution right now. - */ - return utils.stream.merge(works); - } - FastGlob.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob.convertPathToPattern = convertPathToPattern; - let posix; - (function (posix) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix.convertPathToPattern = convertPathToPattern; - })(posix = FastGlob.posix || (FastGlob.posix = {})); - let win32; - (function (win32) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win32.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win32.convertPathToPattern = convertPathToPattern; - })(win32 = FastGlob.win32 || (FastGlob.win32 = {})); -})(FastGlob || (FastGlob = {})); -function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); -} -function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError('Patterns must be a string (non empty) or an array of strings'); - } -} -module.exports = FastGlob; - - -/***/ }), - -/***/ 6160: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; -const utils = __nccwpck_require__(123); -function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); - const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); - return staticTasks.concat(dynamicTasks); -} -exports.generate = generate; -function processPatterns(input, settings) { - let patterns = input; - /** - * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry - * and some problems with the micromatch package (see fast-glob issues: #365, #394). - * - * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown - * in matching in the case of a large set of patterns after expansion. - */ - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - /** - * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used - * at any nesting level. - * - * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change - * the pattern in the filter before creating a regular expression. There is no need to change the patterns - * in the application. Only on the input. - */ - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`); - } - /** - * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. - */ - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); -} -/** - * Returns tasks grouped by basic pattern directories. - * - * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. - * This is necessary because directory traversal starts at the base directory and goes deeper. - */ -function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - /* - * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory - * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. - */ - if ('.' in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); - } - else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; -} -exports.convertPatternsToTasks = convertPatternsToTasks; -function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); -} -exports.getPositivePatterns = getPositivePatterns; -function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; -} -exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; -function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } - else { - collection[base] = [pattern]; - } - return collection; - }, group); -} -exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; -function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); -} -exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; -function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; -} -exports.convertPatternGroupToTask = convertPatternGroupToTask; - - -/***/ }), - -/***/ 3616: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(6866); -const provider_1 = __nccwpck_require__(3815); -class ProviderAsync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderAsync; - - -/***/ }), - -/***/ 4084: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -const partial_1 = __nccwpck_require__(3147); -class DeepFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - /** - * Avoid unnecessary depth calculations when it doesn't matter. - */ - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split('/').length; - if (basePath === '') { - return entryPathDepth; - } - const basePathDepth = basePath.split('/').length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } -} -exports["default"] = DeepFilter; - - -/***/ }), - -/***/ 2552: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, undefined); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - // Trying to match files and directories by patterns. - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - // A pattern with a trailling slash can be used for directory matching. - // To apply such pattern, we need to add a tralling slash to the path. - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + '/', patternsRe); - } - return isMatched; - } -} -exports["default"] = EntryFilter; - - -/***/ }), - -/***/ 5042: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class ErrorFilter { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error) => this._isNonFatalError(error); - } - _isNonFatalError(error) { - return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; - } -} -exports["default"] = ErrorFilter; - - -/***/ }), - -/***/ 5828: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class Matcher { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } -} -exports["default"] = Matcher; - - -/***/ }), - -/***/ 3147: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const matcher_1 = __nccwpck_require__(5828); -class PartialMatcher extends matcher_1.default { - match(filepath) { - const parts = filepath.split('/'); - const levels = parts.length; - const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - /** - * In this case, the pattern has a globstar and we must read all directories unconditionally, - * but only if the level has reached the end of the first group. - * - * fixtures/{a,b}/** - * ^ true/false ^ always true - */ - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } -} -exports["default"] = PartialMatcher; - - -/***/ }), - -/***/ 3815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const deep_1 = __nccwpck_require__(4084); -const entry_1 = __nccwpck_require__(2552); -const error_1 = __nccwpck_require__(5042); -const entry_2 = __nccwpck_require__(825); -class Provider { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === '.' ? '' : task.base; - return { - basePath, - pathSegmentSeparator: '/', - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } -} -exports["default"] = Provider; - - -/***/ }), - -/***/ 2410: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const stream_2 = __nccwpck_require__(1980); -const provider_1 = __nccwpck_require__(3815); -class ProviderStream extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); - source - .once('error', (error) => destination.emit('error', error)) - .on('data', (entry) => destination.emit('data', options.transform(entry))) - .once('end', () => destination.emit('end')); - destination - .once('close', () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderStream; - - -/***/ }), - -/***/ 3473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(967); -const provider_1 = __nccwpck_require__(3815); -class ProviderSync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderSync; - - -/***/ }), - -/***/ 825: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryTransformer { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += '/'; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } -} -exports["default"] = EntryTransformer; - - -/***/ }), - -/***/ 6866: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -const stream_1 = __nccwpck_require__(1980); -class ReaderAsync extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve, reject) => { - this._walkAsync(root, options, (error, entries) => { - if (error === null) { - resolve(entries); - } - else { - reject(error); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - // After #235, replace it with an asynchronous iterator. - return new Promise((resolve, reject) => { - stream.once('error', reject); - stream.on('data', (entry) => entries.push(entry)); - stream.once('end', () => resolve(entries)); - }); - } -} -exports["default"] = ReaderAsync; - - -/***/ }), - -/***/ 6703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const utils = __nccwpck_require__(123); -class Reader { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error) { - return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 1980: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderStream extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options) - .then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }) - .catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath) - .then((stats) => this._makeEntry(stats, pattern)) - .catch((error) => { - if (options.errorFilter(error)) { - return null; - } - throw error; - }); - } - _getStat(filepath) { - return new Promise((resolve, reject) => { - this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve(stats) : reject(error); - }); - }); - } -} -exports["default"] = ReaderStream; - - -/***/ }), - -/***/ 967: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderSync extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } - catch (error) { - if (options.errorFilter(error)) { - return null; - } - throw error; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } -} -exports["default"] = ReaderSync; - - -/***/ }), - -/***/ 948: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -const os = __nccwpck_require__(857); -/** - * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. - * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 - */ -const CPU_COUNT = Math.max(os.cpus().length, 1); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - lstatSync: fs.lstatSync, - stat: fs.stat, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -class Settings { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - // Remove the cast to the array in the next major (#404). - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === undefined ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 3614: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitWhen = exports.flatten = void 0; -function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); -} -exports.flatten = flatten; -function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } - else { - result[groupIndex].push(item); - } - } - return result; -} -exports.splitWhen = splitWhen; - - -/***/ }), - -/***/ 163: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEnoentCodeError = void 0; -function isEnoentCodeError(error) { - return error.code === 'ENOENT'; -} -exports.isEnoentCodeError = isEnoentCodeError; - - -/***/ }), - -/***/ 9416: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 123: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; -const array = __nccwpck_require__(3614); -exports.array = array; -const errno = __nccwpck_require__(163); -exports.errno = errno; -const fs = __nccwpck_require__(9416); -exports.fs = fs; -const path = __nccwpck_require__(3930); -exports.path = path; -const pattern = __nccwpck_require__(5869); -exports.pattern = pattern; -const stream = __nccwpck_require__(9103); -exports.stream = stream; -const string = __nccwpck_require__(3682); -exports.string = string; - - -/***/ }), - -/***/ 3930: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; -const os = __nccwpck_require__(857); -const path = __nccwpck_require__(6928); -const IS_WINDOWS_PLATFORM = os.platform() === 'win32'; -const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ -/** - * All non-escaped special characters. - * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. - * Windows: (){}[], !+@ before (, ! at the beginning. - */ -const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; -const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; -/** - * The device path (\\.\ or \\?\). - * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths - */ -const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; -/** - * All backslashes except those escaping special characters. - * Windows: !()+@{} - * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions - */ -const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; -/** - * Designed to work only with simple paths: `dir\\file`. - */ -function unixify(filepath) { - return filepath.replace(/\\/g, '/'); -} -exports.unixify = unixify; -function makeAbsolute(cwd, filepath) { - return path.resolve(cwd, filepath); -} -exports.makeAbsolute = makeAbsolute; -function removeLeadingDotSegment(entry) { - // We do not use `startsWith` because this is 10x slower than current implementation for some cases. - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with - if (entry.charAt(0) === '.') { - const secondCharactery = entry.charAt(1); - if (secondCharactery === '/' || secondCharactery === '\\') { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; -} -exports.removeLeadingDotSegment = removeLeadingDotSegment; -exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; -function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapeWindowsPath = escapeWindowsPath; -function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapePosixPath = escapePosixPath; -exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; -function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath) - .replace(DOS_DEVICE_PATH_RE, '//$1') - .replace(WINDOWS_BACKSLASHES_RE, '/'); -} -exports.convertWindowsPathToPattern = convertWindowsPathToPattern; -function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); -} -exports.convertPosixPathToPattern = convertPosixPathToPattern; - - -/***/ }), - -/***/ 5869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __nccwpck_require__(6928); -const globParent = __nccwpck_require__(2435); -const micromatch = __nccwpck_require__(9555); -const GLOBSTAR = '**'; -const ESCAPE_SYMBOL = '\\'; -const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; -const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; -const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; -const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; -const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; -/** - * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. - * The latter is due to the presence of the device path at the beginning of the UNC path. - */ -const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; -function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); -} -exports.isStaticPattern = isStaticPattern; -function isDynamicPattern(pattern, options = {}) { - /** - * A special case with an empty string is necessary for matching patterns that start with a forward slash. - * An empty string cannot be a dynamic pattern. - * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. - */ - if (pattern === '') { - return false; - } - /** - * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check - * filepath directly (without read directory). - */ - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; -} -exports.isDynamicPattern = isDynamicPattern; -function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf('{'); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); -} -function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; -} -exports.convertToPositivePattern = convertToPositivePattern; -function convertToNegativePattern(pattern) { - return '!' + pattern; -} -exports.convertToNegativePattern = convertToNegativePattern; -function isNegativePattern(pattern) { - return pattern.startsWith('!') && pattern[1] !== '('; -} -exports.isNegativePattern = isNegativePattern; -function isPositivePattern(pattern) { - return !isNegativePattern(pattern); -} -exports.isPositivePattern = isPositivePattern; -function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); -} -exports.getNegativePatterns = getNegativePatterns; -function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); -} -exports.getPositivePatterns = getPositivePatterns; -/** - * Returns patterns that can be applied inside the current directory. - * - * @example - * // ['./*', '*', 'a/*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); -} -exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; -/** - * Returns patterns to be expanded relative to (outside) the current directory. - * - * @example - * // ['../*', './../*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); -} -exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; -function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith('..') || pattern.startsWith('./..'); -} -exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; -function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); -} -exports.getBaseDirectory = getBaseDirectory; -function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); -} -exports.hasGlobStar = hasGlobStar; -function endsWithSlashGlobStar(pattern) { - return pattern.endsWith('/' + GLOBSTAR); -} -exports.endsWithSlashGlobStar = endsWithSlashGlobStar; -function isAffectDepthOfReadingPattern(pattern) { - const basename = path.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); -} -exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; -function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); -} -exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; -function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - /** - * Sort the patterns by length so that the same depth patterns are processed side by side. - * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` - */ - patterns.sort((a, b) => a.length - b.length); - /** - * Micromatch can return an empty string in the case of patterns like `{a,}`. - */ - return patterns.filter((pattern) => pattern !== ''); -} -exports.expandBraceExpansion = expandBraceExpansion; -function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - /** - * The scan method returns an empty array in some cases. - * See micromatch/picomatch#58 for more details. - */ - if (parts.length === 0) { - parts = [pattern]; - } - /** - * The scan method does not return an empty part for the pattern with a forward slash. - * This is another part of micromatch/picomatch#58. - */ - if (parts[0].startsWith('/')) { - parts[0] = parts[0].slice(1); - parts.unshift(''); - } - return parts; -} -exports.getPatternParts = getPatternParts; -function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); -} -exports.makeRe = makeRe; -function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); -} -exports.convertPatternsToRe = convertPatternsToRe; -function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); -} -exports.matchAny = matchAny; -/** - * This package only works with forward slashes as a path separator. - * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. - */ -function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, '/'); -} -exports.removeDuplicateSlashes = removeDuplicateSlashes; -function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute(pattern)) { - absolute.push(pattern); - } - else { - relative.push(pattern); - } - } - return [absolute, relative]; -} -exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; -function isAbsolute(pattern) { - return path.isAbsolute(pattern); -} -exports.isAbsolute = isAbsolute; - - -/***/ }), - -/***/ 9103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -const merge2 = __nccwpck_require__(4031); -function merge(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once('error', (error) => mergedStream.emit('error', error)); - }); - mergedStream.once('close', () => propagateCloseEventToSources(streams)); - mergedStream.once('end', () => propagateCloseEventToSources(streams)); - return mergedStream; -} -exports.merge = merge; -function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit('close')); -} - - -/***/ }), - -/***/ 3682: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEmpty = exports.isString = void 0; -function isString(input) { - return typeof input === 'string'; -} -exports.isString = isString; -function isEmpty(input) { - return input === ''; -} -exports.isEmpty = isEmpty; - - -/***/ }), - -/***/ 9730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -const util = __nccwpck_require__(9023); -const toRegexRange = __nccwpck_require__(743); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; - - -/***/ }), - -/***/ 9116: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928); -const locatePath = __nccwpck_require__(7738); -const pathExists = __nccwpck_require__(4219); - -const stop = Symbol('findUp.stop'); - -module.exports = async (name, options = {}) => { - let directory = path.resolve(options.cwd || ''); - const {root} = path.parse(directory); - const paths = [].concat(name); - - const runMatcher = async locateOptions => { - if (typeof name !== 'function') { - return locatePath(paths, locateOptions); - } - - const foundPath = await name(locateOptions.cwd); - if (typeof foundPath === 'string') { - return locatePath([foundPath], locateOptions); - } - - return foundPath; - }; - - // eslint-disable-next-line no-constant-condition - while (true) { - // eslint-disable-next-line no-await-in-loop - const foundPath = await runMatcher({...options, cwd: directory}); - - if (foundPath === stop) { - return; - } - - if (foundPath) { - return path.resolve(directory, foundPath); - } - - if (directory === root) { - return; - } - - directory = path.dirname(directory); - } -}; - -module.exports.sync = (name, options = {}) => { - let directory = path.resolve(options.cwd || ''); - const {root} = path.parse(directory); - const paths = [].concat(name); - - const runMatcher = locateOptions => { - if (typeof name !== 'function') { - return locatePath.sync(paths, locateOptions); - } - - const foundPath = name(locateOptions.cwd); - if (typeof foundPath === 'string') { - return locatePath.sync([foundPath], locateOptions); - } - - return foundPath; - }; - - // eslint-disable-next-line no-constant-condition - while (true) { - const foundPath = runMatcher({...options, cwd: directory}); - - if (foundPath === stop) { - return; - } - - if (foundPath) { - return path.resolve(directory, foundPath); - } - - if (directory === root) { - return; - } - - directory = path.dirname(directory); - } -}; - -module.exports.exists = pathExists; - -module.exports.sync.exists = pathExists.sync; - -module.exports.stop = stop; - - -/***/ }), - -/***/ 8998: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdirpSync = (__nccwpck_require__(4846).mkdirsSync) -const utimesSync = (__nccwpck_require__(2707).utimesMillisSync) - -const notExist = Symbol('notExist') - -function copySync (src, dest, opts) { - if (typeof opts === 'function') { - opts = {filter: opts} - } - - opts = opts || {} - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - const destStat = checkPaths(src, dest) - - if (opts.filter && !opts.filter(src, dest)) return - - const destParent = path.dirname(dest) - if (!fs.existsSync(destParent)) mkdirpSync(destParent) - return startCopy(destStat, src, dest, opts) -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - return getStats(destStat, src, dest, opts) -} - -function getStats (destStat, src, dest, opts) { - const statSync = opts.dereference ? fs.statSync : fs.lstatSync - const srcStat = statSync(src) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (destStat === notExist) return copyFile(srcStat, src, dest, opts) - return mayCopyFile(srcStat, src, dest, opts) -} - -function mayCopyFile (srcStat, src, dest, opts) { - if (opts.overwrite) { - fs.unlinkSync(dest) - return copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new Error(`'${dest}' already exists`) - } -} - -function copyFile (srcStat, src, dest, opts) { - if (typeof fs.copyFileSync === 'function') { - fs.copyFileSync(src, dest) - fs.chmodSync(dest, srcStat.mode) - if (opts.preserveTimestamps) { - return utimesSync(dest, srcStat.atime, srcStat.mtime) - } - return - } - return copyFileFallback(srcStat, src, dest, opts) -} - -function copyFileFallback (srcStat, src, dest, opts) { - const BUF_LENGTH = 64 * 1024 - const _buff = __nccwpck_require__(4390)(BUF_LENGTH) - - const fdr = fs.openSync(src, 'r') - const fdw = fs.openSync(dest, 'w', srcStat.mode) - let pos = 0 - - while (pos < srcStat.size) { - const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime) - - fs.closeSync(fdr) - fs.closeSync(fdw) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts) - if (destStat && !destStat.isDirectory()) { - throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) - } - return copyDir(src, dest, opts) -} - -function mkDirAndCopy (srcStat, src, dest, opts) { - fs.mkdirSync(dest) - copyDir(src, dest, opts) - return fs.chmodSync(dest, srcStat.mode) -} - -function copyDir (src, dest, opts) { - fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) -} - -function copyDirItem (item, src, dest, opts) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - const destStat = checkPaths(srcItem, destItem) - return startCopy(destStat, srcItem, destItem, opts) -} - -function onLink (destStat, src, dest, opts) { - let resolvedSrc = fs.readlinkSync(src) - - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (destStat === notExist) { - return fs.symlinkSync(resolvedSrc, dest) - } else { - let resolvedDest - try { - resolvedDest = fs.readlinkSync(dest) - } catch (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) - throw err - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) - } - - // prevent copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) - } - return copyLink(resolvedSrc, dest) - } -} - -function copyLink (resolvedSrc, dest) { - fs.unlinkSync(dest) - return fs.symlinkSync(resolvedSrc, dest) -} - -// return true if dest is a subdir of src, otherwise false. -function isSrcSubdir (src, dest) { - const srcArray = path.resolve(src).split(path.sep) - const destArray = path.resolve(dest).split(path.sep) - return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true) -} - -function checkStats (src, dest) { - const srcStat = fs.statSync(src) - let destStat - try { - destStat = fs.statSync(dest) - } catch (err) { - if (err.code === 'ENOENT') return {srcStat, destStat: notExist} - throw err - } - return {srcStat, destStat} -} - -function checkPaths (src, dest) { - const {srcStat, destStat} = checkStats(src, dest) - if (destStat.ino && destStat.ino === srcStat.ino) { - throw new Error('Source and destination must not be the same.') - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`) - } - return destStat -} - -module.exports = copySync - - -/***/ }), - -/***/ 1617: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - copySync: __nccwpck_require__(8998) -} - - -/***/ }), - -/***/ 138: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdirp = (__nccwpck_require__(4846).mkdirs) -const pathExists = (__nccwpck_require__(1216).pathExists) -const utimes = (__nccwpck_require__(2707).utimesMillis) - -const notExist = Symbol('notExist') - -function copy (src, dest, opts, cb) { - if (typeof opts === 'function' && !cb) { - cb = opts - opts = {} - } else if (typeof opts === 'function') { - opts = {filter: opts} - } - - cb = cb || function () {} - opts = opts || {} - - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - checkPaths(src, dest, (err, destStat) => { - if (err) return cb(err) - if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) - return checkParentDir(destStat, src, dest, opts, cb) - }) -} - -function checkParentDir (destStat, src, dest, opts, cb) { - const destParent = path.dirname(dest) - pathExists(destParent, (err, dirExists) => { - if (err) return cb(err) - if (dirExists) return startCopy(destStat, src, dest, opts, cb) - mkdirp(destParent, err => { - if (err) return cb(err) - return startCopy(destStat, src, dest, opts, cb) - }) - }) -} - -function handleFilter (onInclude, destStat, src, dest, opts, cb) { - Promise.resolve(opts.filter(src, dest)).then(include => { - if (include) { - if (destStat) return onInclude(destStat, src, dest, opts, cb) - return onInclude(src, dest, opts, cb) - } - return cb() - }, error => cb(error)) -} - -function startCopy (destStat, src, dest, opts, cb) { - if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) - return getStats(destStat, src, dest, opts, cb) -} - -function getStats (destStat, src, dest, opts, cb) { - const stat = opts.dereference ? fs.stat : fs.lstat - stat(src, (err, srcStat) => { - if (err) return cb(err) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) - }) -} - -function onFile (srcStat, destStat, src, dest, opts, cb) { - if (destStat === notExist) return copyFile(srcStat, src, dest, opts, cb) - return mayCopyFile(srcStat, src, dest, opts, cb) -} - -function mayCopyFile (srcStat, src, dest, opts, cb) { - if (opts.overwrite) { - fs.unlink(dest, err => { - if (err) return cb(err) - return copyFile(srcStat, src, dest, opts, cb) - }) - } else if (opts.errorOnExist) { - return cb(new Error(`'${dest}' already exists`)) - } else return cb() -} - -function copyFile (srcStat, src, dest, opts, cb) { - if (typeof fs.copyFile === 'function') { - return fs.copyFile(src, dest, err => { - if (err) return cb(err) - return setDestModeAndTimestamps(srcStat, dest, opts, cb) - }) - } - return copyFileFallback(srcStat, src, dest, opts, cb) -} - -function copyFileFallback (srcStat, src, dest, opts, cb) { - const rs = fs.createReadStream(src) - rs.on('error', err => cb(err)).once('open', () => { - const ws = fs.createWriteStream(dest, { mode: srcStat.mode }) - ws.on('error', err => cb(err)) - .on('open', () => rs.pipe(ws)) - .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb)) - }) -} - -function setDestModeAndTimestamps (srcStat, dest, opts, cb) { - fs.chmod(dest, srcStat.mode, err => { - if (err) return cb(err) - if (opts.preserveTimestamps) { - return utimes(dest, srcStat.atime, srcStat.mtime, cb) - } - return cb() - }) -} - -function onDir (srcStat, destStat, src, dest, opts, cb) { - if (destStat === notExist) return mkDirAndCopy(srcStat, src, dest, opts, cb) - if (destStat && !destStat.isDirectory()) { - return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) - } - return copyDir(src, dest, opts, cb) -} - -function mkDirAndCopy (srcStat, src, dest, opts, cb) { - fs.mkdir(dest, err => { - if (err) return cb(err) - copyDir(src, dest, opts, err => { - if (err) return cb(err) - return fs.chmod(dest, srcStat.mode, cb) - }) - }) -} - -function copyDir (src, dest, opts, cb) { - fs.readdir(src, (err, items) => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) -} - -function copyDirItems (items, src, dest, opts, cb) { - const item = items.pop() - if (!item) return cb() - return copyDirItem(items, item, src, dest, opts, cb) -} - -function copyDirItem (items, item, src, dest, opts, cb) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - checkPaths(srcItem, destItem, (err, destStat) => { - if (err) return cb(err) - startCopy(destStat, srcItem, destItem, opts, err => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) - }) -} - -function onLink (destStat, src, dest, opts, cb) { - fs.readlink(src, (err, resolvedSrc) => { - if (err) return cb(err) - - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (destStat === notExist) { - return fs.symlink(resolvedSrc, dest, cb) - } else { - fs.readlink(dest, (err, resolvedDest) => { - if (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) - return cb(err) - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (isSrcSubdir(resolvedSrc, resolvedDest)) { - return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) - } - - // do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (destStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { - return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) - } - return copyLink(resolvedSrc, dest, cb) - }) - } - }) -} - -function copyLink (resolvedSrc, dest, cb) { - fs.unlink(dest, err => { - if (err) return cb(err) - return fs.symlink(resolvedSrc, dest, cb) - }) -} - -// return true if dest is a subdir of src, otherwise false. -function isSrcSubdir (src, dest) { - const srcArray = path.resolve(src).split(path.sep) - const destArray = path.resolve(dest).split(path.sep) - return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true) -} - -function checkStats (src, dest, cb) { - fs.stat(src, (err, srcStat) => { - if (err) return cb(err) - fs.stat(dest, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb(null, {srcStat, destStat: notExist}) - return cb(err) - } - return cb(null, {srcStat, destStat}) - }) - }) -} - -function checkPaths (src, dest, cb) { - checkStats(src, dest, (err, stats) => { - if (err) return cb(err) - const {srcStat, destStat} = stats - if (destStat.ino && destStat.ino === srcStat.ino) { - return cb(new Error('Source and destination must not be the same.')) - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - return cb(new Error(`Cannot copy '${src}' to a subdirectory of itself, '${dest}'.`)) - } - return cb(null, destStat) - }) -} - -module.exports = copy - - -/***/ }), - -/***/ 4735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -module.exports = { - copy: u(__nccwpck_require__(138)) -} - - -/***/ }), - -/***/ 7559: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(9896) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(4846) -const remove = __nccwpck_require__(550) - -const emptyDir = u(function emptyDir (dir, callback) { - callback = callback || function () {} - fs.readdir(dir, (err, items) => { - if (err) return mkdir.mkdirs(dir, callback) - - items = items.map(item => path.join(dir, item)) - - deleteItem() - - function deleteItem () { - const item = items.pop() - if (!item) return callback() - remove.remove(item, err => { - if (err) return callback(err) - deleteItem() - }) - } - }) -}) - -function emptyDirSync (dir) { - let items - try { - items = fs.readdirSync(dir) - } catch (err) { - return mkdir.mkdirsSync(dir) - } - - items.forEach(item => { - item = path.join(dir, item) - remove.removeSync(item) - }) -} - -module.exports = { - emptyDirSync, - emptydirSync: emptyDirSync, - emptyDir, - emptydir: emptyDir -} - - -/***/ }), - -/***/ 312: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const mkdir = __nccwpck_require__(4846) -const pathExists = (__nccwpck_require__(1216).pathExists) - -function createFile (file, callback) { - function makeFile () { - fs.writeFile(file, '', err => { - if (err) return callback(err) - callback() - }) - } - - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err - if (!err && stats.isFile()) return callback() - const dir = path.dirname(file) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeFile() - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeFile() - }) - }) - }) -} - -function createFileSync (file) { - let stats - try { - stats = fs.statSync(file) - } catch (e) {} - if (stats && stats.isFile()) return - - const dir = path.dirname(file) - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - fs.writeFileSync(file, '') -} - -module.exports = { - createFile: u(createFile), - createFileSync -} - - -/***/ }), - -/***/ 168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const file = __nccwpck_require__(312) -const link = __nccwpck_require__(8682) -const symlink = __nccwpck_require__(5059) - -module.exports = { - // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, - // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, - // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync -} - - -/***/ }), - -/***/ 8682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const mkdir = __nccwpck_require__(4846) -const pathExists = (__nccwpck_require__(1216).pathExists) - -function createLink (srcpath, dstpath, callback) { - function makeLink (srcpath, dstpath) { - fs.link(srcpath, dstpath, err => { - if (err) return callback(err) - callback(null) - }) - } - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureLink') - return callback(err) - } - - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeLink(srcpath, dstpath) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeLink(srcpath, dstpath) - }) - }) - }) - }) -} - -function createLinkSync (srcpath, dstpath) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - try { - fs.lstatSync(srcpath) - } catch (err) { - err.message = err.message.replace('lstat', 'ensureLink') - throw err - } - - const dir = path.dirname(dstpath) - const dirExists = fs.existsSync(dir) - if (dirExists) return fs.linkSync(srcpath, dstpath) - mkdir.mkdirsSync(dir) - - return fs.linkSync(srcpath, dstpath) -} - -module.exports = { - createLink: u(createLink), - createLinkSync -} - - -/***/ }), - -/***/ 3926: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const pathExists = (__nccwpck_require__(1216).pathExists) - -/** - * Function that returns two types of paths, one relative to symlink, and one - * relative to the current working directory. Checks if path is absolute or - * relative. If the path is relative, this function checks if the path is - * relative to symlink or relative to current working directory. This is an - * initiative to find a smarter `srcpath` to supply when building symlinks. - * This allows you to determine which path to use out of one of three possible - * types of source paths. The first is an absolute path. This is detected by - * `path.isAbsolute()`. When an absolute path is provided, it is checked to - * see if it exists. If it does it's used, if not an error is returned - * (callback)/ thrown (sync). The other two options for `srcpath` are a - * relative url. By default Node's `fs.symlink` works by creating a symlink - * using `dstpath` and expects the `srcpath` to be relative to the newly - * created symlink. If you provide a `srcpath` that does not exist on the file - * system it results in a broken symlink. To minimize this, the function - * checks to see if the 'relative to symlink' source file exists, and if it - * does it will use it. If it does not, it checks if there's a file that - * exists that is relative to the current working directory, if does its used. - * This preserves the expectations of the original fs.symlink spec and adds - * the ability to pass in `relative to current working direcotry` paths. - */ - -function symlinkPaths (srcpath, dstpath, callback) { - if (path.isAbsolute(srcpath)) { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': srcpath - }) - }) - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - return pathExists(relativeToDst, (err, exists) => { - if (err) return callback(err) - if (exists) { - return callback(null, { - 'toCwd': relativeToDst, - 'toDst': srcpath - }) - } else { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - }) - }) - } - }) - } -} - -function symlinkPathsSync (srcpath, dstpath) { - let exists - if (path.isAbsolute(srcpath)) { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('absolute srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': srcpath - } - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - exists = fs.existsSync(relativeToDst) - if (exists) { - return { - 'toCwd': relativeToDst, - 'toDst': srcpath - } - } else { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('relative srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - } - } - } -} - -module.exports = { - symlinkPaths, - symlinkPathsSync -} - - -/***/ }), - -/***/ 2416: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) - -function symlinkType (srcpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - if (type) return callback(null, type) - fs.lstat(srcpath, (err, stats) => { - if (err) return callback(null, 'file') - type = (stats && stats.isDirectory()) ? 'dir' : 'file' - callback(null, type) - }) -} - -function symlinkTypeSync (srcpath, type) { - let stats - - if (type) return type - try { - stats = fs.lstatSync(srcpath) - } catch (e) { - return 'file' - } - return (stats && stats.isDirectory()) ? 'dir' : 'file' -} - -module.exports = { - symlinkType, - symlinkTypeSync -} - - -/***/ }), - -/***/ 5059: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const _mkdirs = __nccwpck_require__(4846) -const mkdirs = _mkdirs.mkdirs -const mkdirsSync = _mkdirs.mkdirsSync - -const _symlinkPaths = __nccwpck_require__(3926) -const symlinkPaths = _symlinkPaths.symlinkPaths -const symlinkPathsSync = _symlinkPaths.symlinkPathsSync - -const _symlinkType = __nccwpck_require__(2416) -const symlinkType = _symlinkType.symlinkType -const symlinkTypeSync = _symlinkType.symlinkTypeSync - -const pathExists = (__nccwpck_require__(1216).pathExists) - -function createSymlink (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - symlinkPaths(srcpath, dstpath, (err, relative) => { - if (err) return callback(err) - srcpath = relative.toDst - symlinkType(relative.toCwd, type, (err, type) => { - if (err) return callback(err) - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) - mkdirs(dir, err => { - if (err) return callback(err) - fs.symlink(srcpath, dstpath, type, callback) - }) - }) - }) - }) - }) -} - -function createSymlinkSync (srcpath, dstpath, type) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - const relative = symlinkPathsSync(srcpath, dstpath) - srcpath = relative.toDst - type = symlinkTypeSync(relative.toCwd, type) - const dir = path.dirname(dstpath) - const exists = fs.existsSync(dir) - if (exists) return fs.symlinkSync(srcpath, dstpath, type) - mkdirsSync(dir) - return fs.symlinkSync(srcpath, dstpath, type) -} - -module.exports = { - createSymlink: u(createSymlink), - createSymlinkSync -} - - -/***/ }), - -/***/ 9161: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// This is adapted from https://github.com/normalize/mz -// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) - -const api = [ - 'access', - 'appendFile', - 'chmod', - 'chown', - 'close', - 'copyFile', - 'fchmod', - 'fchown', - 'fdatasync', - 'fstat', - 'fsync', - 'ftruncate', - 'futimes', - 'lchown', - 'lchmod', - 'link', - 'lstat', - 'mkdir', - 'mkdtemp', - 'open', - 'readFile', - 'readdir', - 'readlink', - 'realpath', - 'rename', - 'rmdir', - 'stat', - 'symlink', - 'truncate', - 'unlink', - 'utimes', - 'writeFile' -].filter(key => { - // Some commands are not available on some systems. Ex: - // fs.copyFile was added in Node.js v8.5.0 - // fs.mkdtemp was added in Node.js v5.10.0 - // fs.lchown is not available on at least some Linux - return typeof fs[key] === 'function' -}) - -// Export all keys: -Object.keys(fs).forEach(key => { - if (key === 'promises') { - // fs.promises is a getter property that triggers ExperimentalWarning - // Don't re-export it here, the getter is defined in "lib/index.js" - return - } - exports[key] = fs[key] -}) - -// Universalify async methods: -api.forEach(method => { - exports[method] = u(fs[method]) -}) - -// We differ from mz/fs in that we still ship the old, broken, fs.exists() -// since we are a drop-in replacement for the native module -exports.exists = function (filename, callback) { - if (typeof callback === 'function') { - return fs.exists(filename, callback) - } - return new Promise(resolve => { - return fs.exists(filename, resolve) - }) -} - -// fs.read() & fs.write need special treatment due to multiple callback args - -exports.read = function (fd, buffer, offset, length, position, callback) { - if (typeof callback === 'function') { - return fs.read(fd, buffer, offset, length, position, callback) - } - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { - if (err) return reject(err) - resolve({ bytesRead, buffer }) - }) - }) -} - -// Function signature can be -// fs.write(fd, buffer[, offset[, length[, position]]], callback) -// OR -// fs.write(fd, string[, position[, encoding]], callback) -// We need to handle both cases, so we use ...args -exports.write = function (fd, buffer, ...args) { - if (typeof args[args.length - 1] === 'function') { - return fs.write(fd, buffer, ...args) - } - - return new Promise((resolve, reject) => { - fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) -} - - -/***/ }), - -/***/ 925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = Object.assign( - {}, - // Export promiseified graceful-fs: - __nccwpck_require__(9161), - // Export extra methods: - __nccwpck_require__(1617), - __nccwpck_require__(4735), - __nccwpck_require__(7559), - __nccwpck_require__(168), - __nccwpck_require__(4280), - __nccwpck_require__(4846), - __nccwpck_require__(5073), - __nccwpck_require__(6031), - __nccwpck_require__(9867), - __nccwpck_require__(1216), - __nccwpck_require__(550) -) - -// Export fs.promises as a getter property so that we don't trigger -// ExperimentalWarning before fs.promises is actually accessed. -const fs = __nccwpck_require__(9896) -if (Object.getOwnPropertyDescriptor(fs, 'promises')) { - Object.defineProperty(module.exports, "promises", ({ - get () { return fs.promises } - })) -} - - -/***/ }), - -/***/ 4280: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(14) - -jsonFile.outputJson = u(__nccwpck_require__(706)) -jsonFile.outputJsonSync = __nccwpck_require__(3732) -// aliases -jsonFile.outputJSON = jsonFile.outputJson -jsonFile.outputJSONSync = jsonFile.outputJsonSync -jsonFile.writeJSON = jsonFile.writeJson -jsonFile.writeJSONSync = jsonFile.writeJsonSync -jsonFile.readJSON = jsonFile.readJson -jsonFile.readJSONSync = jsonFile.readJsonSync - -module.exports = jsonFile - - -/***/ }), - -/***/ 14: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(6155) - -module.exports = { - // jsonfile exports - readJson: u(jsonFile.readFile), - readJsonSync: jsonFile.readFileSync, - writeJson: u(jsonFile.writeFile), - writeJsonSync: jsonFile.writeFileSync -} - - -/***/ }), - -/***/ 3732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(4846) -const jsonFile = __nccwpck_require__(14) - -function outputJsonSync (file, data, options) { - const dir = path.dirname(file) - - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - jsonFile.writeJsonSync(file, data, options) -} - -module.exports = outputJsonSync - - -/***/ }), - -/***/ 706: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(4846) -const pathExists = (__nccwpck_require__(1216).pathExists) -const jsonFile = __nccwpck_require__(14) - -function outputJson (file, data, options, callback) { - if (typeof options === 'function') { - callback = options - options = {} - } - - const dir = path.dirname(file) - - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return jsonFile.writeJson(file, data, options, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - jsonFile.writeJson(file, data, options, callback) - }) - }) -} - -module.exports = outputJson - - -/***/ }), - -/***/ 4846: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const mkdirs = u(__nccwpck_require__(4004)) -const mkdirsSync = __nccwpck_require__(6358) - -module.exports = { - mkdirs, - mkdirsSync, - // alias - mkdirp: mkdirs, - mkdirpSync: mkdirsSync, - ensureDir: mkdirs, - ensureDirSync: mkdirsSync -} - - -/***/ }), - -/***/ 6358: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(7533).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirsSync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - throw errInval - } - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - p = path.resolve(p) - - try { - xfs.mkdirSync(p, mode) - made = made || p - } catch (err0) { - if (err0.code === 'ENOENT') { - if (path.dirname(p) === p) throw err0 - made = mkdirsSync(path.dirname(p), opts, made) - mkdirsSync(p, opts, made) - } else { - // In the case of any other error, just see if there's a dir there - // already. If so, then hooray! If not, then something is borked. - let stat - try { - stat = xfs.statSync(p) - } catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0 - } - } - - return made -} - -module.exports = mkdirsSync - - -/***/ }), - -/***/ 4004: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(7533).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirs (p, opts, callback, made) { - if (typeof opts === 'function') { - callback = opts - opts = {} - } else if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - return callback(errInval) - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - callback = callback || function () {} - p = path.resolve(p) - - xfs.mkdir(p, mode, er => { - if (!er) { - made = made || p - return callback(null, made) - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return callback(er) - mkdirs(path.dirname(p), opts, (er, made) => { - if (er) callback(er, made) - else mkdirs(p, opts, callback, made) - }) - break - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, (er2, stat) => { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) callback(er, made) - else callback(null, made) - }) - break - } - }) -} - -module.exports = mkdirs - - -/***/ }), - -/***/ 7533: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) - -// get drive on windows -function getRootPath (p) { - p = path.normalize(path.resolve(p)).split(path.sep) - if (p.length > 0) return p[0] - return null -} - -// http://stackoverflow.com/a/62888/10333 contains more accurate -// TODO: expand to include the rest -const INVALID_PATH_CHARS = /[<>:"|?*]/ - -function invalidWin32Path (p) { - const rp = getRootPath(p) - p = p.replace(rp, '') - return INVALID_PATH_CHARS.test(p) -} - -module.exports = { - getRootPath, - invalidWin32Path -} - - -/***/ }), - -/***/ 5073: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const copySync = (__nccwpck_require__(1617).copySync) -const removeSync = (__nccwpck_require__(550).removeSync) -const mkdirpSync = (__nccwpck_require__(4846).mkdirsSync) -const buffer = __nccwpck_require__(4390) - -function moveSync (src, dest, options) { - options = options || {} - const overwrite = options.overwrite || options.clobber || false - - src = path.resolve(src) - dest = path.resolve(dest) - - if (src === dest) return fs.accessSync(src) - - if (isSrcSubdir(src, dest)) throw new Error(`Cannot move '${src}' into itself '${dest}'.`) - - mkdirpSync(path.dirname(dest)) - tryRenameSync() - - function tryRenameSync () { - if (overwrite) { - try { - return fs.renameSync(src, dest) - } catch (err) { - if (err.code === 'ENOTEMPTY' || err.code === 'EEXIST' || err.code === 'EPERM') { - removeSync(dest) - options.overwrite = false // just overwriteed it, no need to do it again - return moveSync(src, dest, options) - } - - if (err.code !== 'EXDEV') throw err - return moveSyncAcrossDevice(src, dest, overwrite) - } - } else { - try { - fs.linkSync(src, dest) - return fs.unlinkSync(src) - } catch (err) { - if (err.code === 'EXDEV' || err.code === 'EISDIR' || err.code === 'EPERM' || err.code === 'ENOTSUP') { - return moveSyncAcrossDevice(src, dest, overwrite) - } - throw err - } - } - } -} - -function moveSyncAcrossDevice (src, dest, overwrite) { - const stat = fs.statSync(src) - - if (stat.isDirectory()) { - return moveDirSyncAcrossDevice(src, dest, overwrite) - } else { - return moveFileSyncAcrossDevice(src, dest, overwrite) - } -} - -function moveFileSyncAcrossDevice (src, dest, overwrite) { - const BUF_LENGTH = 64 * 1024 - const _buff = buffer(BUF_LENGTH) - - const flags = overwrite ? 'w' : 'wx' - - const fdr = fs.openSync(src, 'r') - const stat = fs.fstatSync(fdr) - const fdw = fs.openSync(dest, flags, stat.mode) - let pos = 0 - - while (pos < stat.size) { - const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - fs.closeSync(fdr) - fs.closeSync(fdw) - return fs.unlinkSync(src) -} - -function moveDirSyncAcrossDevice (src, dest, overwrite) { - const options = { - overwrite: false - } - - if (overwrite) { - removeSync(dest) - tryCopySync() - } else { - tryCopySync() - } - - function tryCopySync () { - copySync(src, dest, options) - return removeSync(src) - } -} - -// return true if dest is a subdir of src, otherwise false. -// extract dest base dir and check if that is the same as src basename -function isSrcSubdir (src, dest) { - try { - return fs.statSync(src).isDirectory() && - src !== dest && - dest.indexOf(src) > -1 && - dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src) - } catch (e) { - return false - } -} - -module.exports = { - moveSync -} - - -/***/ }), - -/***/ 6031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const copy = (__nccwpck_require__(4735).copy) -const remove = (__nccwpck_require__(550).remove) -const mkdirp = (__nccwpck_require__(4846).mkdirp) -const pathExists = (__nccwpck_require__(1216).pathExists) - -function move (src, dest, opts, cb) { - if (typeof opts === 'function') { - cb = opts - opts = {} - } - - const overwrite = opts.overwrite || opts.clobber || false - - src = path.resolve(src) - dest = path.resolve(dest) - - if (src === dest) return fs.access(src, cb) - - fs.stat(src, (err, st) => { - if (err) return cb(err) - - if (st.isDirectory() && isSrcSubdir(src, dest)) { - return cb(new Error(`Cannot move '${src}' to a subdirectory of itself, '${dest}'.`)) - } - mkdirp(path.dirname(dest), err => { - if (err) return cb(err) - return doRename(src, dest, overwrite, cb) - }) - }) -} - -function doRename (src, dest, overwrite, cb) { - if (overwrite) { - return remove(dest, err => { - if (err) return cb(err) - return rename(src, dest, overwrite, cb) - }) - } - pathExists(dest, (err, destExists) => { - if (err) return cb(err) - if (destExists) return cb(new Error('dest already exists.')) - return rename(src, dest, overwrite, cb) - }) -} - -function rename (src, dest, overwrite, cb) { - fs.rename(src, dest, err => { - if (!err) return cb() - if (err.code !== 'EXDEV') return cb(err) - return moveAcrossDevice(src, dest, overwrite, cb) - }) -} - -function moveAcrossDevice (src, dest, overwrite, cb) { - const opts = { - overwrite, - errorOnExist: true - } - - copy(src, dest, opts, err => { - if (err) return cb(err) - return remove(src, cb) - }) -} - -function isSrcSubdir (src, dest) { - const srcArray = src.split(path.sep) - const destArray = dest.split(path.sep) - - return srcArray.reduce((acc, current, i) => { - return acc && destArray[i] === current - }, true) -} - -module.exports = { - move: u(move) -} - - -/***/ }), - -/***/ 9867: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(4846) -const pathExists = (__nccwpck_require__(1216).pathExists) - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - const dir = path.dirname(file) - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - -function outputFileSync (file, ...args) { - const dir = path.dirname(file) - if (fs.existsSync(dir)) { - return fs.writeFileSync(file, ...args) - } - mkdir.mkdirsSync(dir) - fs.writeFileSync(file, ...args) -} - -module.exports = { - outputFile: u(outputFile), - outputFileSync -} - - -/***/ }), - -/***/ 1216: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const u = (__nccwpck_require__(8710)/* .fromPromise */ .z) -const fs = __nccwpck_require__(9161) - -function pathExists (path) { - return fs.access(path).then(() => true).catch(() => false) -} - -module.exports = { - pathExists: u(pathExists), - pathExistsSync: fs.existsSync -} - - -/***/ }), - -/***/ 550: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const rimraf = __nccwpck_require__(1481) - -module.exports = { - remove: u(rimraf), - removeSync: rimraf.sync -} - - -/***/ }), - -/***/ 1481: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const assert = __nccwpck_require__(2613) - -const isWindows = (process.platform === 'win32') - -function defaults (options) { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 -} - -function rimraf (p, options, cb) { - let busyTries = 0 - - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && - busyTries < options.maxBusyTries) { - busyTries++ - const time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), time) - } - - // already gone - if (er.code === 'ENOENT') er = null - } - - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === 'ENOENT') { - return cb(null) - } - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === 'EPERM' && isWindows) { - return fixWinEPERM(p, options, er, cb) - } - - if (st && st.isDirectory()) { - return rmdir(p, options, er, cb) - } - - options.unlink(p, er => { - if (er) { - if (er.code === 'ENOENT') { - return cb(null) - } - if (er.code === 'EPERM') { - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - } - if (er.code === 'EISDIR') { - return rmdir(p, options, er, cb) - } - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) { - assert(er instanceof Error) - } - - options.chmod(p, 0o666, er2 => { - if (er2) { - cb(er2.code === 'ENOENT' ? null : er) - } else { - options.stat(p, (er3, stats) => { - if (er3) { - cb(er3.code === 'ENOENT' ? null : er) - } else if (stats.isDirectory()) { - rmdir(p, options, er, cb) - } else { - options.unlink(p, cb) - } - }) - } - }) -} - -function fixWinEPERMSync (p, options, er) { - let stats - - assert(p) - assert(options) - if (er) { - assert(er instanceof Error) - } - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === 'ENOENT') { - return - } else { - throw er - } - } - - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === 'ENOENT') { - return - } else { - throw er - } - } - - if (stats.isDirectory()) { - rmdirSync(p, options, er) - } else { - options.unlinkSync(p) - } -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { - rmkids(p, options, cb) - } else if (er && er.code === 'ENOTDIR') { - cb(originalEr) - } else { - cb(er) - } - }) -} - -function rmkids (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) return cb(er) - - let n = files.length - let errState - - if (n === 0) return options.rmdir(p, cb) - - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) { - return - } - if (er) return cb(errState = er) - if (--n === 0) { - options.rmdir(p, cb) - } - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - let st - - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === 'ENOENT') { - return - } - - // Windows can EPERM on stat. Life is suffering. - if (er.code === 'EPERM' && isWindows) { - fixWinEPERMSync(p, options, er) - } - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) { - rmdirSync(p, options, null) - } else { - options.unlinkSync(p) - } - } catch (er) { - if (er.code === 'ENOENT') { - return - } else if (er.code === 'EPERM') { - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - } else if (er.code !== 'EISDIR') { - throw er - } - rmdirSync(p, options, er) - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === 'ENOTDIR') { - throw originalEr - } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { - rmkidsSync(p, options) - } else if (er.code !== 'ENOENT') { - throw er - } - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - if (isWindows) { - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const startTime = Date.now() - do { - try { - const ret = options.rmdirSync(p, options) - return ret - } catch (er) { } - } while (Date.now() - startTime < 500) // give up after 500ms - } else { - const ret = options.rmdirSync(p, options) - return ret - } -} - -module.exports = rimraf -rimraf.sync = rimrafSync - - -/***/ }), - -/***/ 4390: -/***/ ((module) => { - - -/* eslint-disable node/no-deprecated-api */ -module.exports = function (size) { - if (typeof Buffer.allocUnsafe === 'function') { - try { - return Buffer.allocUnsafe(size) - } catch (e) { - return new Buffer(size) - } - } - return new Buffer(size) -} - - -/***/ }), - -/***/ 2707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const os = __nccwpck_require__(857) -const path = __nccwpck_require__(6928) - -// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not -function hasMillisResSync () { - let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') - const fd = fs.openSync(tmpfile, 'r+') - fs.futimesSync(fd, d, d) - fs.closeSync(fd) - return fs.statSync(tmpfile).mtime > 1435410243000 -} - -function hasMillisRes (callback) { - let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { - if (err) return callback(err) - fs.open(tmpfile, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, d, d, err => { - if (err) return callback(err) - fs.close(fd, err => { - if (err) return callback(err) - fs.stat(tmpfile, (err, stats) => { - if (err) return callback(err) - callback(null, stats.mtime > 1435410243000) - }) - }) - }) - }) - }) -} - -function timeRemoveMillis (timestamp) { - if (typeof timestamp === 'number') { - return Math.floor(timestamp / 1000) * 1000 - } else if (timestamp instanceof Date) { - return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) - } else { - throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') - } -} - -function utimesMillis (path, atime, mtime, callback) { - // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) - fs.open(path, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, atime, mtime, futimesErr => { - fs.close(fd, closeErr => { - if (callback) callback(futimesErr || closeErr) - }) - }) - }) -} - -function utimesMillisSync (path, atime, mtime) { - const fd = fs.openSync(path, 'r+') - fs.futimesSync(fd, atime, mtime) - return fs.closeSync(fd) -} - -module.exports = { - hasMillisRes, - hasMillisResSync, - timeRemoveMillis, - utimesMillis, - utimesMillisSync -} - - -/***/ }), - -/***/ 4699: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdirpSync = (__nccwpck_require__(1045).mkdirsSync) -const utimesSync = (__nccwpck_require__(6626).utimesMillisSync) -const stat = __nccwpck_require__(9203) - -function copySync (src, dest, opts) { - if (typeof opts === 'function') { - opts = { filter: opts } - } - - opts = opts || {} - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy') - stat.checkParentPathsSync(src, srcStat, dest, 'copy') - return handleFilterAndCopy(destStat, src, dest, opts) -} - -function handleFilterAndCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - const destParent = path.dirname(dest) - if (!fs.existsSync(destParent)) mkdirpSync(destParent) - return startCopy(destStat, src, dest, opts) -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - return getStats(destStat, src, dest, opts) -} - -function getStats (destStat, src, dest, opts) { - const statSync = opts.dereference ? fs.statSync : fs.lstatSync - const srcStat = statSync(src) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (!destStat) return copyFile(srcStat, src, dest, opts) - return mayCopyFile(srcStat, src, dest, opts) -} - -function mayCopyFile (srcStat, src, dest, opts) { - if (opts.overwrite) { - fs.unlinkSync(dest) - return copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new Error(`'${dest}' already exists`) - } -} - -function copyFile (srcStat, src, dest, opts) { - if (typeof fs.copyFileSync === 'function') { - fs.copyFileSync(src, dest) - fs.chmodSync(dest, srcStat.mode) - if (opts.preserveTimestamps) { - return utimesSync(dest, srcStat.atime, srcStat.mtime) - } - return - } - return copyFileFallback(srcStat, src, dest, opts) -} - -function copyFileFallback (srcStat, src, dest, opts) { - const BUF_LENGTH = 64 * 1024 - const _buff = __nccwpck_require__(7103)(BUF_LENGTH) - - const fdr = fs.openSync(src, 'r') - const fdw = fs.openSync(dest, 'w', srcStat.mode) - let pos = 0 - - while (pos < srcStat.size) { - const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime) - - fs.closeSync(fdr) - fs.closeSync(fdw) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts) - if (destStat && !destStat.isDirectory()) { - throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) - } - return copyDir(src, dest, opts) -} - -function mkDirAndCopy (srcStat, src, dest, opts) { - fs.mkdirSync(dest) - copyDir(src, dest, opts) - return fs.chmodSync(dest, srcStat.mode) -} - -function copyDir (src, dest, opts) { - fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) -} - -function copyDirItem (item, src, dest, opts) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy') - return startCopy(destStat, srcItem, destItem, opts) -} - -function onLink (destStat, src, dest, opts) { - let resolvedSrc = fs.readlinkSync(src) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlinkSync(resolvedSrc, dest) - } else { - let resolvedDest - try { - resolvedDest = fs.readlinkSync(dest) - } catch (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) - throw err - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) - } - - // prevent copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) - } - return copyLink(resolvedSrc, dest) - } -} - -function copyLink (resolvedSrc, dest) { - fs.unlinkSync(dest) - return fs.symlinkSync(resolvedSrc, dest) -} - -module.exports = copySync - - -/***/ }), - -/***/ 9288: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - copySync: __nccwpck_require__(4699) -} - - -/***/ }), - -/***/ 3395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdirp = (__nccwpck_require__(1045).mkdirs) -const pathExists = (__nccwpck_require__(13).pathExists) -const utimes = (__nccwpck_require__(6626).utimesMillis) -const stat = __nccwpck_require__(9203) - -function copy (src, dest, opts, cb) { - if (typeof opts === 'function' && !cb) { - cb = opts - opts = {} - } else if (typeof opts === 'function') { - opts = { filter: opts } - } - - cb = cb || function () {} - opts = opts || {} - - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - stat.checkPaths(src, dest, 'copy', (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - stat.checkParentPaths(src, srcStat, dest, 'copy', err => { - if (err) return cb(err) - if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) - return checkParentDir(destStat, src, dest, opts, cb) - }) - }) -} - -function checkParentDir (destStat, src, dest, opts, cb) { - const destParent = path.dirname(dest) - pathExists(destParent, (err, dirExists) => { - if (err) return cb(err) - if (dirExists) return startCopy(destStat, src, dest, opts, cb) - mkdirp(destParent, err => { - if (err) return cb(err) - return startCopy(destStat, src, dest, opts, cb) - }) - }) -} - -function handleFilter (onInclude, destStat, src, dest, opts, cb) { - Promise.resolve(opts.filter(src, dest)).then(include => { - if (include) return onInclude(destStat, src, dest, opts, cb) - return cb() - }, error => cb(error)) -} - -function startCopy (destStat, src, dest, opts, cb) { - if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) - return getStats(destStat, src, dest, opts, cb) -} - -function getStats (destStat, src, dest, opts, cb) { - const stat = opts.dereference ? fs.stat : fs.lstat - stat(src, (err, srcStat) => { - if (err) return cb(err) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) - }) -} - -function onFile (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return copyFile(srcStat, src, dest, opts, cb) - return mayCopyFile(srcStat, src, dest, opts, cb) -} - -function mayCopyFile (srcStat, src, dest, opts, cb) { - if (opts.overwrite) { - fs.unlink(dest, err => { - if (err) return cb(err) - return copyFile(srcStat, src, dest, opts, cb) - }) - } else if (opts.errorOnExist) { - return cb(new Error(`'${dest}' already exists`)) - } else return cb() -} - -function copyFile (srcStat, src, dest, opts, cb) { - if (typeof fs.copyFile === 'function') { - return fs.copyFile(src, dest, err => { - if (err) return cb(err) - return setDestModeAndTimestamps(srcStat, dest, opts, cb) - }) - } - return copyFileFallback(srcStat, src, dest, opts, cb) -} - -function copyFileFallback (srcStat, src, dest, opts, cb) { - const rs = fs.createReadStream(src) - rs.on('error', err => cb(err)).once('open', () => { - const ws = fs.createWriteStream(dest, { mode: srcStat.mode }) - ws.on('error', err => cb(err)) - .on('open', () => rs.pipe(ws)) - .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb)) - }) -} - -function setDestModeAndTimestamps (srcStat, dest, opts, cb) { - fs.chmod(dest, srcStat.mode, err => { - if (err) return cb(err) - if (opts.preserveTimestamps) { - return utimes(dest, srcStat.atime, srcStat.mtime, cb) - } - return cb() - }) -} - -function onDir (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts, cb) - if (destStat && !destStat.isDirectory()) { - return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) - } - return copyDir(src, dest, opts, cb) -} - -function mkDirAndCopy (srcStat, src, dest, opts, cb) { - fs.mkdir(dest, err => { - if (err) return cb(err) - copyDir(src, dest, opts, err => { - if (err) return cb(err) - return fs.chmod(dest, srcStat.mode, cb) - }) - }) -} - -function copyDir (src, dest, opts, cb) { - fs.readdir(src, (err, items) => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) -} - -function copyDirItems (items, src, dest, opts, cb) { - const item = items.pop() - if (!item) return cb() - return copyDirItem(items, item, src, dest, opts, cb) -} - -function copyDirItem (items, item, src, dest, opts, cb) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => { - if (err) return cb(err) - const { destStat } = stats - startCopy(destStat, srcItem, destItem, opts, err => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) - }) -} - -function onLink (destStat, src, dest, opts, cb) { - fs.readlink(src, (err, resolvedSrc) => { - if (err) return cb(err) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlink(resolvedSrc, dest, cb) - } else { - fs.readlink(dest, (err, resolvedDest) => { - if (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) - return cb(err) - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) - } - - // do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) - } - return copyLink(resolvedSrc, dest, cb) - }) - } - }) -} - -function copyLink (resolvedSrc, dest, cb) { - fs.unlink(dest, err => { - if (err) return cb(err) - return fs.symlink(resolvedSrc, dest, cb) - }) -} - -module.exports = copy - - -/***/ }), - -/***/ 8336: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -module.exports = { - copy: u(__nccwpck_require__(3395)) -} - - -/***/ }), - -/***/ 6494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(1045) -const remove = __nccwpck_require__(8233) - -const emptyDir = u(function emptyDir (dir, callback) { - callback = callback || function () {} - fs.readdir(dir, (err, items) => { - if (err) return mkdir.mkdirs(dir, callback) - - items = items.map(item => path.join(dir, item)) - - deleteItem() - - function deleteItem () { - const item = items.pop() - if (!item) return callback() - remove.remove(item, err => { - if (err) return callback(err) - deleteItem() - }) - } - }) -}) - -function emptyDirSync (dir) { - let items - try { - items = fs.readdirSync(dir) - } catch (err) { - return mkdir.mkdirsSync(dir) - } - - items.forEach(item => { - item = path.join(dir, item) - remove.removeSync(item) - }) -} - -module.exports = { - emptyDirSync, - emptydirSync: emptyDirSync, - emptyDir, - emptydir: emptyDir -} - - -/***/ }), - -/***/ 165: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const mkdir = __nccwpck_require__(1045) -const pathExists = (__nccwpck_require__(13).pathExists) - -function createFile (file, callback) { - function makeFile () { - fs.writeFile(file, '', err => { - if (err) return callback(err) - callback() - }) - } - - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err - if (!err && stats.isFile()) return callback() - const dir = path.dirname(file) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeFile() - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeFile() - }) - }) - }) -} - -function createFileSync (file) { - let stats - try { - stats = fs.statSync(file) - } catch (e) {} - if (stats && stats.isFile()) return - - const dir = path.dirname(file) - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - fs.writeFileSync(file, '') -} - -module.exports = { - createFile: u(createFile), - createFileSync -} - - -/***/ }), - -/***/ 1575: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const file = __nccwpck_require__(165) -const link = __nccwpck_require__(9571) -const symlink = __nccwpck_require__(9332) - -module.exports = { - // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, - // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, - // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync -} - - -/***/ }), - -/***/ 9571: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const mkdir = __nccwpck_require__(1045) -const pathExists = (__nccwpck_require__(13).pathExists) - -function createLink (srcpath, dstpath, callback) { - function makeLink (srcpath, dstpath) { - fs.link(srcpath, dstpath, err => { - if (err) return callback(err) - callback(null) - }) - } - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureLink') - return callback(err) - } - - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeLink(srcpath, dstpath) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeLink(srcpath, dstpath) - }) - }) - }) - }) -} - -function createLinkSync (srcpath, dstpath) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - try { - fs.lstatSync(srcpath) - } catch (err) { - err.message = err.message.replace('lstat', 'ensureLink') - throw err - } - - const dir = path.dirname(dstpath) - const dirExists = fs.existsSync(dir) - if (dirExists) return fs.linkSync(srcpath, dstpath) - mkdir.mkdirsSync(dir) - - return fs.linkSync(srcpath, dstpath) -} - -module.exports = { - createLink: u(createLink), - createLinkSync -} - - -/***/ }), - -/***/ 1042: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const pathExists = (__nccwpck_require__(13).pathExists) - -/** - * Function that returns two types of paths, one relative to symlink, and one - * relative to the current working directory. Checks if path is absolute or - * relative. If the path is relative, this function checks if the path is - * relative to symlink or relative to current working directory. This is an - * initiative to find a smarter `srcpath` to supply when building symlinks. - * This allows you to determine which path to use out of one of three possible - * types of source paths. The first is an absolute path. This is detected by - * `path.isAbsolute()`. When an absolute path is provided, it is checked to - * see if it exists. If it does it's used, if not an error is returned - * (callback)/ thrown (sync). The other two options for `srcpath` are a - * relative url. By default Node's `fs.symlink` works by creating a symlink - * using `dstpath` and expects the `srcpath` to be relative to the newly - * created symlink. If you provide a `srcpath` that does not exist on the file - * system it results in a broken symlink. To minimize this, the function - * checks to see if the 'relative to symlink' source file exists, and if it - * does it will use it. If it does not, it checks if there's a file that - * exists that is relative to the current working directory, if does its used. - * This preserves the expectations of the original fs.symlink spec and adds - * the ability to pass in `relative to current working direcotry` paths. - */ - -function symlinkPaths (srcpath, dstpath, callback) { - if (path.isAbsolute(srcpath)) { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': srcpath - }) - }) - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - return pathExists(relativeToDst, (err, exists) => { - if (err) return callback(err) - if (exists) { - return callback(null, { - 'toCwd': relativeToDst, - 'toDst': srcpath - }) - } else { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - }) - }) - } - }) - } -} - -function symlinkPathsSync (srcpath, dstpath) { - let exists - if (path.isAbsolute(srcpath)) { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('absolute srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': srcpath - } - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - exists = fs.existsSync(relativeToDst) - if (exists) { - return { - 'toCwd': relativeToDst, - 'toDst': srcpath - } - } else { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('relative srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - } - } - } -} - -module.exports = { - symlinkPaths, - symlinkPathsSync -} - - -/***/ }), - -/***/ 7561: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) - -function symlinkType (srcpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - if (type) return callback(null, type) - fs.lstat(srcpath, (err, stats) => { - if (err) return callback(null, 'file') - type = (stats && stats.isDirectory()) ? 'dir' : 'file' - callback(null, type) - }) -} - -function symlinkTypeSync (srcpath, type) { - let stats - - if (type) return type - try { - stats = fs.lstatSync(srcpath) - } catch (e) { - return 'file' - } - return (stats && stats.isDirectory()) ? 'dir' : 'file' -} - -module.exports = { - symlinkType, - symlinkTypeSync -} - - -/***/ }), - -/***/ 9332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(8692) -const _mkdirs = __nccwpck_require__(1045) -const mkdirs = _mkdirs.mkdirs -const mkdirsSync = _mkdirs.mkdirsSync - -const _symlinkPaths = __nccwpck_require__(1042) -const symlinkPaths = _symlinkPaths.symlinkPaths -const symlinkPathsSync = _symlinkPaths.symlinkPathsSync - -const _symlinkType = __nccwpck_require__(7561) -const symlinkType = _symlinkType.symlinkType -const symlinkTypeSync = _symlinkType.symlinkTypeSync - -const pathExists = (__nccwpck_require__(13).pathExists) - -function createSymlink (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - symlinkPaths(srcpath, dstpath, (err, relative) => { - if (err) return callback(err) - srcpath = relative.toDst - symlinkType(relative.toCwd, type, (err, type) => { - if (err) return callback(err) - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) - mkdirs(dir, err => { - if (err) return callback(err) - fs.symlink(srcpath, dstpath, type, callback) - }) - }) - }) - }) - }) -} - -function createSymlinkSync (srcpath, dstpath, type) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - const relative = symlinkPathsSync(srcpath, dstpath) - srcpath = relative.toDst - type = symlinkTypeSync(relative.toCwd, type) - const dir = path.dirname(dstpath) - const exists = fs.existsSync(dir) - if (exists) return fs.symlinkSync(srcpath, dstpath, type) - mkdirsSync(dir) - return fs.symlinkSync(srcpath, dstpath, type) -} - -module.exports = { - createSymlink: u(createSymlink), - createSymlinkSync -} - - -/***/ }), - -/***/ 2318: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -// This is adapted from https://github.com/normalize/mz -// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) - -const api = [ - 'access', - 'appendFile', - 'chmod', - 'chown', - 'close', - 'copyFile', - 'fchmod', - 'fchown', - 'fdatasync', - 'fstat', - 'fsync', - 'ftruncate', - 'futimes', - 'lchown', - 'lchmod', - 'link', - 'lstat', - 'mkdir', - 'mkdtemp', - 'open', - 'readFile', - 'readdir', - 'readlink', - 'realpath', - 'rename', - 'rmdir', - 'stat', - 'symlink', - 'truncate', - 'unlink', - 'utimes', - 'writeFile' -].filter(key => { - // Some commands are not available on some systems. Ex: - // fs.copyFile was added in Node.js v8.5.0 - // fs.mkdtemp was added in Node.js v5.10.0 - // fs.lchown is not available on at least some Linux - return typeof fs[key] === 'function' -}) - -// Export all keys: -Object.keys(fs).forEach(key => { - if (key === 'promises') { - // fs.promises is a getter property that triggers ExperimentalWarning - // Don't re-export it here, the getter is defined in "lib/index.js" - return - } - exports[key] = fs[key] -}) - -// Universalify async methods: -api.forEach(method => { - exports[method] = u(fs[method]) -}) - -// We differ from mz/fs in that we still ship the old, broken, fs.exists() -// since we are a drop-in replacement for the native module -exports.exists = function (filename, callback) { - if (typeof callback === 'function') { - return fs.exists(filename, callback) - } - return new Promise(resolve => { - return fs.exists(filename, resolve) - }) -} - -// fs.read() & fs.write need special treatment due to multiple callback args - -exports.read = function (fd, buffer, offset, length, position, callback) { - if (typeof callback === 'function') { - return fs.read(fd, buffer, offset, length, position, callback) - } - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { - if (err) return reject(err) - resolve({ bytesRead, buffer }) - }) - }) -} - -// Function signature can be -// fs.write(fd, buffer[, offset[, length[, position]]], callback) -// OR -// fs.write(fd, string[, position[, encoding]], callback) -// We need to handle both cases, so we use ...args -exports.write = function (fd, buffer, ...args) { - if (typeof args[args.length - 1] === 'function') { - return fs.write(fd, buffer, ...args) - } - - return new Promise((resolve, reject) => { - fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) -} - -// fs.realpath.native only available in Node v9.2+ -if (typeof fs.realpath.native === 'function') { - exports.realpath.native = u(fs.realpath.native) -} - - -/***/ }), - -/***/ 6668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = Object.assign( - {}, - // Export promiseified graceful-fs: - __nccwpck_require__(2318), - // Export extra methods: - __nccwpck_require__(9288), - __nccwpck_require__(8336), - __nccwpck_require__(6494), - __nccwpck_require__(1575), - __nccwpck_require__(5643), - __nccwpck_require__(1045), - __nccwpck_require__(1160), - __nccwpck_require__(656), - __nccwpck_require__(7936), - __nccwpck_require__(13), - __nccwpck_require__(8233) -) - -// Export fs.promises as a getter property so that we don't trigger -// ExperimentalWarning before fs.promises is actually accessed. -const fs = __nccwpck_require__(9896) -if (Object.getOwnPropertyDescriptor(fs, 'promises')) { - Object.defineProperty(module.exports, "promises", ({ - get () { return fs.promises } - })) -} - - -/***/ }), - -/***/ 5643: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(8667) - -jsonFile.outputJson = u(__nccwpck_require__(2165)) -jsonFile.outputJsonSync = __nccwpck_require__(4477) -// aliases -jsonFile.outputJSON = jsonFile.outputJson -jsonFile.outputJSONSync = jsonFile.outputJsonSync -jsonFile.writeJSON = jsonFile.writeJson -jsonFile.writeJSONSync = jsonFile.writeJsonSync -jsonFile.readJSON = jsonFile.readJson -jsonFile.readJSONSync = jsonFile.readJsonSync - -module.exports = jsonFile - - -/***/ }), - -/***/ 8667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(6155) - -module.exports = { - // jsonfile exports - readJson: u(jsonFile.readFile), - readJsonSync: jsonFile.readFileSync, - writeJson: u(jsonFile.writeFile), - writeJsonSync: jsonFile.writeFileSync -} - - -/***/ }), - -/***/ 4477: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(1045) -const jsonFile = __nccwpck_require__(8667) - -function outputJsonSync (file, data, options) { - const dir = path.dirname(file) - - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - jsonFile.writeJsonSync(file, data, options) -} - -module.exports = outputJsonSync - - -/***/ }), - -/***/ 2165: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(1045) -const pathExists = (__nccwpck_require__(13).pathExists) -const jsonFile = __nccwpck_require__(8667) - -function outputJson (file, data, options, callback) { - if (typeof options === 'function') { - callback = options - options = {} - } - - const dir = path.dirname(file) - - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return jsonFile.writeJson(file, data, options, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - jsonFile.writeJson(file, data, options, callback) - }) - }) -} - -module.exports = outputJson - - -/***/ }), - -/***/ 1045: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const mkdirs = u(__nccwpck_require__(845)) -const mkdirsSync = __nccwpck_require__(1749) - -module.exports = { - mkdirs, - mkdirsSync, - // alias - mkdirp: mkdirs, - mkdirpSync: mkdirsSync, - ensureDir: mkdirs, - ensureDirSync: mkdirsSync -} - - -/***/ }), - -/***/ 1749: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(6154).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirsSync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - throw errInval - } - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - p = path.resolve(p) - - try { - xfs.mkdirSync(p, mode) - made = made || p - } catch (err0) { - if (err0.code === 'ENOENT') { - if (path.dirname(p) === p) throw err0 - made = mkdirsSync(path.dirname(p), opts, made) - mkdirsSync(p, opts, made) - } else { - // In the case of any other error, just see if there's a dir there - // already. If so, then hooray! If not, then something is borked. - let stat - try { - stat = xfs.statSync(p) - } catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0 - } - } - - return made -} - -module.exports = mkdirsSync - - -/***/ }), - -/***/ 845: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(6154).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirs (p, opts, callback, made) { - if (typeof opts === 'function') { - callback = opts - opts = {} - } else if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - return callback(errInval) - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - callback = callback || function () {} - p = path.resolve(p) - - xfs.mkdir(p, mode, er => { - if (!er) { - made = made || p - return callback(null, made) - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return callback(er) - mkdirs(path.dirname(p), opts, (er, made) => { - if (er) callback(er, made) - else mkdirs(p, opts, callback, made) - }) - break - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, (er2, stat) => { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) callback(er, made) - else callback(null, made) - }) - break - } - }) -} - -module.exports = mkdirs - - -/***/ }), - -/***/ 6154: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928) - -// get drive on windows -function getRootPath (p) { - p = path.normalize(path.resolve(p)).split(path.sep) - if (p.length > 0) return p[0] - return null -} - -// http://stackoverflow.com/a/62888/10333 contains more accurate -// TODO: expand to include the rest -const INVALID_PATH_CHARS = /[<>:"|?*]/ - -function invalidWin32Path (p) { - const rp = getRootPath(p) - p = p.replace(rp, '') - return INVALID_PATH_CHARS.test(p) -} - -module.exports = { - getRootPath, - invalidWin32Path -} - - -/***/ }), - -/***/ 1160: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - moveSync: __nccwpck_require__(2483) -} - - -/***/ }), - -/***/ 2483: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const copySync = (__nccwpck_require__(9288).copySync) -const removeSync = (__nccwpck_require__(8233).removeSync) -const mkdirpSync = (__nccwpck_require__(1045).mkdirpSync) -const stat = __nccwpck_require__(9203) - -function moveSync (src, dest, opts) { - opts = opts || {} - const overwrite = opts.overwrite || opts.clobber || false - - const { srcStat } = stat.checkPathsSync(src, dest, 'move') - stat.checkParentPathsSync(src, srcStat, dest, 'move') - mkdirpSync(path.dirname(dest)) - return doRename(src, dest, overwrite) -} - -function doRename (src, dest, overwrite) { - if (overwrite) { - removeSync(dest) - return rename(src, dest, overwrite) - } - if (fs.existsSync(dest)) throw new Error('dest already exists.') - return rename(src, dest, overwrite) -} - -function rename (src, dest, overwrite) { - try { - fs.renameSync(src, dest) - } catch (err) { - if (err.code !== 'EXDEV') throw err - return moveAcrossDevice(src, dest, overwrite) - } -} - -function moveAcrossDevice (src, dest, overwrite) { - const opts = { - overwrite, - errorOnExist: true - } - copySync(src, dest, opts) - return removeSync(src) -} - -module.exports = moveSync - - -/***/ }), - -/***/ 656: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -module.exports = { - move: u(__nccwpck_require__(6680)) -} - - -/***/ }), - -/***/ 6680: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const copy = (__nccwpck_require__(8336).copy) -const remove = (__nccwpck_require__(8233).remove) -const mkdirp = (__nccwpck_require__(1045).mkdirp) -const pathExists = (__nccwpck_require__(13).pathExists) -const stat = __nccwpck_require__(9203) - -function move (src, dest, opts, cb) { - if (typeof opts === 'function') { - cb = opts - opts = {} - } - - const overwrite = opts.overwrite || opts.clobber || false - - stat.checkPaths(src, dest, 'move', (err, stats) => { - if (err) return cb(err) - const { srcStat } = stats - stat.checkParentPaths(src, srcStat, dest, 'move', err => { - if (err) return cb(err) - mkdirp(path.dirname(dest), err => { - if (err) return cb(err) - return doRename(src, dest, overwrite, cb) - }) - }) - }) -} - -function doRename (src, dest, overwrite, cb) { - if (overwrite) { - return remove(dest, err => { - if (err) return cb(err) - return rename(src, dest, overwrite, cb) - }) - } - pathExists(dest, (err, destExists) => { - if (err) return cb(err) - if (destExists) return cb(new Error('dest already exists.')) - return rename(src, dest, overwrite, cb) - }) -} - -function rename (src, dest, overwrite, cb) { - fs.rename(src, dest, err => { - if (!err) return cb() - if (err.code !== 'EXDEV') return cb(err) - return moveAcrossDevice(src, dest, overwrite, cb) - }) -} - -function moveAcrossDevice (src, dest, overwrite, cb) { - const opts = { - overwrite, - errorOnExist: true - } - copy(src, dest, opts, err => { - if (err) return cb(err) - return remove(src, cb) - }) -} - -module.exports = move - - -/***/ }), - -/***/ 7936: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(1045) -const pathExists = (__nccwpck_require__(13).pathExists) - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - const dir = path.dirname(file) - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - -function outputFileSync (file, ...args) { - const dir = path.dirname(file) - if (fs.existsSync(dir)) { - return fs.writeFileSync(file, ...args) - } - mkdir.mkdirsSync(dir) - fs.writeFileSync(file, ...args) -} - -module.exports = { - outputFile: u(outputFile), - outputFileSync -} - - -/***/ }), - -/***/ 13: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const u = (__nccwpck_require__(8710)/* .fromPromise */ .z) -const fs = __nccwpck_require__(2318) - -function pathExists (path) { - return fs.access(path).then(() => true).catch(() => false) -} - -module.exports = { - pathExists: u(pathExists), - pathExistsSync: fs.existsSync -} - - -/***/ }), - -/***/ 8233: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const u = (__nccwpck_require__(8710)/* .fromCallback */ .S) -const rimraf = __nccwpck_require__(5236) - -module.exports = { - remove: u(rimraf), - removeSync: rimraf.sync -} - - -/***/ }), - -/***/ 5236: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) -const assert = __nccwpck_require__(2613) - -const isWindows = (process.platform === 'win32') - -function defaults (options) { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 -} - -function rimraf (p, options, cb) { - let busyTries = 0 - - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && - busyTries < options.maxBusyTries) { - busyTries++ - const time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), time) - } - - // already gone - if (er.code === 'ENOENT') er = null - } - - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === 'ENOENT') { - return cb(null) - } - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === 'EPERM' && isWindows) { - return fixWinEPERM(p, options, er, cb) - } - - if (st && st.isDirectory()) { - return rmdir(p, options, er, cb) - } - - options.unlink(p, er => { - if (er) { - if (er.code === 'ENOENT') { - return cb(null) - } - if (er.code === 'EPERM') { - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - } - if (er.code === 'EISDIR') { - return rmdir(p, options, er, cb) - } - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) { - assert(er instanceof Error) - } - - options.chmod(p, 0o666, er2 => { - if (er2) { - cb(er2.code === 'ENOENT' ? null : er) - } else { - options.stat(p, (er3, stats) => { - if (er3) { - cb(er3.code === 'ENOENT' ? null : er) - } else if (stats.isDirectory()) { - rmdir(p, options, er, cb) - } else { - options.unlink(p, cb) - } - }) - } - }) -} - -function fixWinEPERMSync (p, options, er) { - let stats - - assert(p) - assert(options) - if (er) { - assert(er instanceof Error) - } - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === 'ENOENT') { - return - } else { - throw er - } - } - - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === 'ENOENT') { - return - } else { - throw er - } - } - - if (stats.isDirectory()) { - rmdirSync(p, options, er) - } else { - options.unlinkSync(p) - } -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { - rmkids(p, options, cb) - } else if (er && er.code === 'ENOTDIR') { - cb(originalEr) - } else { - cb(er) - } - }) -} - -function rmkids (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) return cb(er) - - let n = files.length - let errState - - if (n === 0) return options.rmdir(p, cb) - - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) { - return - } - if (er) return cb(errState = er) - if (--n === 0) { - options.rmdir(p, cb) - } - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - let st - - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === 'ENOENT') { - return - } - - // Windows can EPERM on stat. Life is suffering. - if (er.code === 'EPERM' && isWindows) { - fixWinEPERMSync(p, options, er) - } - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) { - rmdirSync(p, options, null) - } else { - options.unlinkSync(p) - } - } catch (er) { - if (er.code === 'ENOENT') { - return - } else if (er.code === 'EPERM') { - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - } else if (er.code !== 'EISDIR') { - throw er - } - rmdirSync(p, options, er) - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === 'ENOTDIR') { - throw originalEr - } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { - rmkidsSync(p, options) - } else if (er.code !== 'ENOENT') { - throw er - } - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - if (isWindows) { - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const startTime = Date.now() - do { - try { - const ret = options.rmdirSync(p, options) - return ret - } catch (er) { } - } while (Date.now() - startTime < 500) // give up after 500ms - } else { - const ret = options.rmdirSync(p, options) - return ret - } -} - -module.exports = rimraf -rimraf.sync = rimrafSync - - -/***/ }), - -/***/ 7103: -/***/ ((module) => { - - -/* eslint-disable node/no-deprecated-api */ -module.exports = function (size) { - if (typeof Buffer.allocUnsafe === 'function') { - try { - return Buffer.allocUnsafe(size) - } catch (e) { - return new Buffer(size) - } - } - return new Buffer(size) -} - - -/***/ }), - -/***/ 9203: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const path = __nccwpck_require__(6928) - -const NODE_VERSION_MAJOR_WITH_BIGINT = 10 -const NODE_VERSION_MINOR_WITH_BIGINT = 5 -const NODE_VERSION_PATCH_WITH_BIGINT = 0 -const nodeVersion = process.versions.node.split('.') -const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10) -const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10) -const nodeVersionPatch = Number.parseInt(nodeVersion[2], 10) - -function nodeSupportsBigInt () { - if (nodeVersionMajor > NODE_VERSION_MAJOR_WITH_BIGINT) { - return true - } else if (nodeVersionMajor === NODE_VERSION_MAJOR_WITH_BIGINT) { - if (nodeVersionMinor > NODE_VERSION_MINOR_WITH_BIGINT) { - return true - } else if (nodeVersionMinor === NODE_VERSION_MINOR_WITH_BIGINT) { - if (nodeVersionPatch >= NODE_VERSION_PATCH_WITH_BIGINT) { - return true - } - } - } - return false -} - -function getStats (src, dest, cb) { - if (nodeSupportsBigInt()) { - fs.stat(src, { bigint: true }, (err, srcStat) => { - if (err) return cb(err) - fs.stat(dest, { bigint: true }, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null }) - return cb(err) - } - return cb(null, { srcStat, destStat }) - }) - }) - } else { - fs.stat(src, (err, srcStat) => { - if (err) return cb(err) - fs.stat(dest, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null }) - return cb(err) - } - return cb(null, { srcStat, destStat }) - }) - }) - } -} - -function getStatsSync (src, dest) { - let srcStat, destStat - if (nodeSupportsBigInt()) { - srcStat = fs.statSync(src, { bigint: true }) - } else { - srcStat = fs.statSync(src) - } - try { - if (nodeSupportsBigInt()) { - destStat = fs.statSync(dest, { bigint: true }) - } else { - destStat = fs.statSync(dest) - } - } catch (err) { - if (err.code === 'ENOENT') return { srcStat, destStat: null } - throw err - } - return { srcStat, destStat } -} - -function checkPaths (src, dest, funcName, cb) { - getStats(src, dest, (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error('Source and destination must not be the same.')) - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return cb(null, { srcStat, destStat }) - }) -} - -function checkPathsSync (src, dest, funcName) { - const { srcStat, destStat } = getStatsSync(src, dest) - if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - throw new Error('Source and destination must not be the same.') - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new Error(errMsg(src, dest, funcName)) - } - return { srcStat, destStat } -} - -// recursively check if dest parent is a subdirectory of src. -// It works for all file types including symlinks since it -// checks the src and dest inodes. It starts from the deepest -// parent and stops once it reaches the src parent or the root path. -function checkParentPaths (src, srcStat, dest, funcName, cb) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return cb() - if (nodeSupportsBigInt()) { - fs.stat(destParent, { bigint: true }, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb() - return cb(err) - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return checkParentPaths(src, srcStat, destParent, funcName, cb) - }) - } else { - fs.stat(destParent, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb() - return cb(err) - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return checkParentPaths(src, srcStat, destParent, funcName, cb) - }) - } -} - -function checkParentPathsSync (src, srcStat, dest, funcName) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return - let destStat - try { - if (nodeSupportsBigInt()) { - destStat = fs.statSync(destParent, { bigint: true }) - } else { - destStat = fs.statSync(destParent) - } - } catch (err) { - if (err.code === 'ENOENT') return - throw err - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - throw new Error(errMsg(src, dest, funcName)) - } - return checkParentPathsSync(src, srcStat, destParent, funcName) -} - -// return true if dest is a subdir of src, otherwise false. -// It only checks the path strings. -function isSrcSubdir (src, dest) { - const srcArr = path.resolve(src).split(path.sep).filter(i => i) - const destArr = path.resolve(dest).split(path.sep).filter(i => i) - return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true) -} - -function errMsg (src, dest, funcName) { - return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.` -} - -module.exports = { - checkPaths, - checkPathsSync, - checkParentPaths, - checkParentPathsSync, - isSrcSubdir -} - - -/***/ }), - -/***/ 6626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const os = __nccwpck_require__(857) -const path = __nccwpck_require__(6928) - -// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not -function hasMillisResSync () { - let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') - const fd = fs.openSync(tmpfile, 'r+') - fs.futimesSync(fd, d, d) - fs.closeSync(fd) - return fs.statSync(tmpfile).mtime > 1435410243000 -} - -function hasMillisRes (callback) { - let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { - if (err) return callback(err) - fs.open(tmpfile, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, d, d, err => { - if (err) return callback(err) - fs.close(fd, err => { - if (err) return callback(err) - fs.stat(tmpfile, (err, stats) => { - if (err) return callback(err) - callback(null, stats.mtime > 1435410243000) - }) - }) - }) - }) - }) -} - -function timeRemoveMillis (timestamp) { - if (typeof timestamp === 'number') { - return Math.floor(timestamp / 1000) * 1000 - } else if (timestamp instanceof Date) { - return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) - } else { - throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') - } -} - -function utimesMillis (path, atime, mtime, callback) { - // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) - fs.open(path, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, atime, mtime, futimesErr => { - fs.close(fd, closeErr => { - if (callback) callback(futimesErr || closeErr) - }) - }) - }) -} - -function utimesMillisSync (path, atime, mtime) { - const fd = fs.openSync(path, 'r+') - fs.futimesSync(fd, atime, mtime) - return fs.closeSync(fd) -} - -module.exports = { - hasMillisRes, - hasMillisResSync, - timeRemoveMillis, - utimesMillis, - utimesMillisSync -} - - -/***/ }), - -/***/ 6359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {PassThrough: PassThroughStream} = __nccwpck_require__(2203); - -module.exports = options => { - options = {...options}; - - const {array} = options; - let {encoding} = options; - const isBuffer = encoding === 'buffer'; - let objectMode = false; - - if (array) { - objectMode = !(encoding || isBuffer); - } else { - encoding = encoding || 'utf8'; - } - - if (isBuffer) { - encoding = null; - } - - const stream = new PassThroughStream({objectMode}); - - if (encoding) { - stream.setEncoding(encoding); - } - - let length = 0; - const chunks = []; - - stream.on('data', chunk => { - chunks.push(chunk); - - if (objectMode) { - length = chunks.length; - } else { - length += chunk.length; - } - }); - - stream.getBufferedValue = () => { - if (array) { - return chunks; - } - - return isBuffer ? Buffer.concat(chunks, length) : chunks.join(''); - }; - - stream.getBufferedLength = () => length; - - return stream; -}; - - -/***/ }), - -/***/ 2462: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {constants: BufferConstants} = __nccwpck_require__(181); -const stream = __nccwpck_require__(2203); -const {promisify} = __nccwpck_require__(9023); -const bufferStream = __nccwpck_require__(6359); - -const streamPipelinePromisified = promisify(stream.pipeline); - -class MaxBufferError extends Error { - constructor() { - super('maxBuffer exceeded'); - this.name = 'MaxBufferError'; - } -} - -async function getStream(inputStream, options) { - if (!inputStream) { - throw new Error('Expected a stream'); - } - - options = { - maxBuffer: Infinity, - ...options - }; - - const {maxBuffer} = options; - const stream = bufferStream(options); - - await new Promise((resolve, reject) => { - const rejectPromise = error => { - // Don't retrieve an oversized buffer. - if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) { - error.bufferedData = stream.getBufferedValue(); - } - - reject(error); - }; - - (async () => { - try { - await streamPipelinePromisified(inputStream, stream); - resolve(); - } catch (error) { - rejectPromise(error); - } - })(); - - stream.on('data', () => { - if (stream.getBufferedLength() > maxBuffer) { - rejectPromise(new MaxBufferError()); - } - }); - }); - - return stream.getBufferedValue(); -} - -module.exports = getStream; -module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); -module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); -module.exports.MaxBufferError = MaxBufferError; - - -/***/ }), - -/***/ 2435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var isGlob = __nccwpck_require__(686); -var pathPosixDirname = (__nccwpck_require__(6928).posix).dirname; -var isWin32 = (__nccwpck_require__(857).platform)() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; - - -/***/ }), - -/***/ 1956: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {promisify} = __nccwpck_require__(9023); -const fs = __nccwpck_require__(9896); -const path = __nccwpck_require__(6928); -const fastGlob = __nccwpck_require__(2457); -const gitIgnore = __nccwpck_require__(3143); -const slash = __nccwpck_require__(5882); - -const DEFAULT_IGNORE = [ - '**/node_modules/**', - '**/flow-typed/**', - '**/coverage/**', - '**/.git' -]; - -const readFileP = promisify(fs.readFile); - -const mapGitIgnorePatternTo = base => ignore => { - if (ignore.startsWith('!')) { - return '!' + path.posix.join(base, ignore.slice(1)); - } - - return path.posix.join(base, ignore); -}; - -const parseGitIgnore = (content, options) => { - const base = slash(path.relative(options.cwd, path.dirname(options.fileName))); - - return content - .split(/\r?\n/) - .filter(Boolean) - .filter(line => !line.startsWith('#')) - .map(mapGitIgnorePatternTo(base)); -}; - -const reduceIgnore = files => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - - return ignores; -}; - -const ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - - return path.join(cwd, p); -}; - -const getIsIgnoredPredecate = (ignores, cwd) => { - return p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); -}; - -const getFile = async (file, cwd) => { - const filePath = path.join(cwd, file); - const content = await readFileP(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const getFileSync = (file, cwd) => { - const filePath = path.join(cwd, file); - const content = fs.readFileSync(filePath, 'utf8'); - - return { - cwd, - filePath, - content - }; -}; - -const normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) -} = {}) => { - return {ignore, cwd}; -}; - -module.exports = async options => { - options = normalizeOptions(options); - - const paths = await fastGlob('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = await Promise.all(paths.map(file => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - -module.exports.sync = options => { - options = normalizeOptions(options); - - const paths = fastGlob.sync('**/.gitignore', { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - - const files = paths.map(file => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - - return getIsIgnoredPredecate(ignores, options.cwd); -}; - - -/***/ }), - -/***/ 8626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const fs = __nccwpck_require__(9896); -const arrayUnion = __nccwpck_require__(9430); -const merge2 = __nccwpck_require__(4031); -const fastGlob = __nccwpck_require__(2457); -const dirGlob = __nccwpck_require__(8797); -const gitignore = __nccwpck_require__(1956); -const {FilterStream, UniqueStream} = __nccwpck_require__(7332); - -const DEFAULT_FILTER = () => false; - -const isNegative = pattern => pattern[0] === '!'; - -const assertPatternsInput = patterns => { - if (!patterns.every(pattern => typeof pattern === 'string')) { - throw new TypeError('Patterns must be a string or an array of strings'); - } -}; - -const checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - - let stat; - try { - stat = fs.statSync(options.cwd); - } catch { - return; - } - - if (!stat.isDirectory()) { - throw new Error('The `cwd` option must be a path to a directory'); - } -}; - -const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; - -const generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - - const globTasks = []; - - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - - const ignore = patterns - .slice(index) - .filter(pattern => isNegative(pattern)) - .map(pattern => pattern.slice(1)); - - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - - globTasks.push({pattern, options}); - } - - return globTasks; -}; - -const globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === 'object') { - options = { - ...options, - ...task.options.expandDirectories - }; - } - - return fn(task.pattern, options); -}; - -const getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - -const getFilterSync = options => { - return options && options.gitignore ? - gitignore.sync({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; -}; - -const globToTask = task => glob => { - const {options} = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - - return { - pattern: glob, - options - }; -}; - -module.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const getFilter = async () => { - return options && options.gitignore ? - gitignore({cwd: options.cwd, ignore: options.ignore}) : - DEFAULT_FILTER; - }; - - const getTasks = async () => { - const tasks = await Promise.all(globTasks.map(async task => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - - return arrayUnion(...tasks); - }; - - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options))); - - return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_))); -}; - -module.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - - const filter = getFilterSync(options); - - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - - return matches.filter(path_ => !filter(path_)); -}; - -module.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - - const filter = getFilterSync(options); - const filterStream = new FilterStream(p => !filter(p)); - const uniqueStream = new UniqueStream(); - - return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options))) - .pipe(filterStream) - .pipe(uniqueStream); -}; - -module.exports.generateGlobTasks = generateGlobTasks; - -module.exports.hasMagic = (patterns, options) => [] - .concat(patterns) - .some(pattern => fastGlob.isDynamicPattern(pattern, options)); - -module.exports.gitignore = gitignore; - - -/***/ }), - -/***/ 7332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const {Transform} = __nccwpck_require__(2203); - -class ObjectTransform extends Transform { - constructor() { - super({ - objectMode: true - }); - } -} - -class FilterStream extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - - callback(); - } -} - -class UniqueStream extends ObjectTransform { - constructor() { - super(); - this._pushed = new Set(); - } - - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - - callback(); - } -} - -module.exports = { - FilterStream, - UniqueStream -}; - - -/***/ }), - -/***/ 4648: -/***/ ((module) => { - - - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), - -/***/ 8692: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var fs = __nccwpck_require__(9896) -var polyfills = __nccwpck_require__(6161) -var legacy = __nccwpck_require__(7050) -var clone = __nccwpck_require__(4648) - -var util = __nccwpck_require__(9023) - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __nccwpck_require__(2613).equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } - - return go$readdir(path, options, cb) - - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} - - -/***/ }), - -/***/ 7050: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Stream = (__nccwpck_require__(2203).Stream) - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), - -/***/ 6161: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var constants = __nccwpck_require__(9140) - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} - - -/***/ }), - -/***/ 3865: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGNALS=void 0; - -const SIGNALS=[ -{ -name:"SIGHUP", -number:1, -action:"terminate", -description:"Terminal closed", -standard:"posix"}, - -{ -name:"SIGINT", -number:2, -action:"terminate", -description:"User interruption with CTRL-C", -standard:"ansi"}, - -{ -name:"SIGQUIT", -number:3, -action:"core", -description:"User interruption with CTRL-\\", -standard:"posix"}, - -{ -name:"SIGILL", -number:4, -action:"core", -description:"Invalid machine instruction", -standard:"ansi"}, - -{ -name:"SIGTRAP", -number:5, -action:"core", -description:"Debugger breakpoint", -standard:"posix"}, - -{ -name:"SIGABRT", -number:6, -action:"core", -description:"Aborted", -standard:"ansi"}, - -{ -name:"SIGIOT", -number:6, -action:"core", -description:"Aborted", -standard:"bsd"}, - -{ -name:"SIGBUS", -number:7, -action:"core", -description: -"Bus error due to misaligned, non-existing address or paging error", -standard:"bsd"}, - -{ -name:"SIGEMT", -number:7, -action:"terminate", -description:"Command should be emulated but is not implemented", -standard:"other"}, - -{ -name:"SIGFPE", -number:8, -action:"core", -description:"Floating point arithmetic error", -standard:"ansi"}, - -{ -name:"SIGKILL", -number:9, -action:"terminate", -description:"Forced termination", -standard:"posix", -forced:true}, - -{ -name:"SIGUSR1", -number:10, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGSEGV", -number:11, -action:"core", -description:"Segmentation fault", -standard:"ansi"}, - -{ -name:"SIGUSR2", -number:12, -action:"terminate", -description:"Application-specific signal", -standard:"posix"}, - -{ -name:"SIGPIPE", -number:13, -action:"terminate", -description:"Broken pipe or socket", -standard:"posix"}, - -{ -name:"SIGALRM", -number:14, -action:"terminate", -description:"Timeout or timer", -standard:"posix"}, - -{ -name:"SIGTERM", -number:15, -action:"terminate", -description:"Termination", -standard:"ansi"}, - -{ -name:"SIGSTKFLT", -number:16, -action:"terminate", -description:"Stack is empty or overflowed", -standard:"other"}, - -{ -name:"SIGCHLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"posix"}, - -{ -name:"SIGCLD", -number:17, -action:"ignore", -description:"Child process terminated, paused or unpaused", -standard:"other"}, - -{ -name:"SIGCONT", -number:18, -action:"unpause", -description:"Unpaused", -standard:"posix", -forced:true}, - -{ -name:"SIGSTOP", -number:19, -action:"pause", -description:"Paused", -standard:"posix", -forced:true}, - -{ -name:"SIGTSTP", -number:20, -action:"pause", -description:"Paused using CTRL-Z or \"suspend\"", -standard:"posix"}, - -{ -name:"SIGTTIN", -number:21, -action:"pause", -description:"Background process cannot read terminal input", -standard:"posix"}, - -{ -name:"SIGBREAK", -number:21, -action:"terminate", -description:"User interruption with CTRL-BREAK", -standard:"other"}, - -{ -name:"SIGTTOU", -number:22, -action:"pause", -description:"Background process cannot write to terminal output", -standard:"posix"}, - -{ -name:"SIGURG", -number:23, -action:"ignore", -description:"Socket received out-of-band data", -standard:"bsd"}, - -{ -name:"SIGXCPU", -number:24, -action:"core", -description:"Process timed out", -standard:"bsd"}, - -{ -name:"SIGXFSZ", -number:25, -action:"core", -description:"File too big", -standard:"bsd"}, - -{ -name:"SIGVTALRM", -number:26, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGPROF", -number:27, -action:"terminate", -description:"Timeout or timer", -standard:"bsd"}, - -{ -name:"SIGWINCH", -number:28, -action:"ignore", -description:"Terminal window size changed", -standard:"bsd"}, - -{ -name:"SIGIO", -number:29, -action:"terminate", -description:"I/O is available", -standard:"other"}, - -{ -name:"SIGPOLL", -number:29, -action:"terminate", -description:"Watched event", -standard:"other"}, - -{ -name:"SIGINFO", -number:29, -action:"ignore", -description:"Request for process information", -standard:"other"}, - -{ -name:"SIGPWR", -number:30, -action:"terminate", -description:"Device running out of power", -standard:"systemv"}, - -{ -name:"SIGSYS", -number:31, -action:"core", -description:"Invalid system call", -standard:"other"}, - -{ -name:"SIGUNUSED", -number:31, -action:"terminate", -description:"Invalid system call", -standard:"other"}];exports.SIGNALS=SIGNALS; -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 4743: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({value:true}));exports.signalsByNumber=exports.signalsByName=void 0;var _os=__nccwpck_require__(857); - -var _signals=__nccwpck_require__(2873); -var _realtime=__nccwpck_require__(347); - - - -const getSignalsByName=function(){ -const signals=(0,_signals.getSignals)(); -return signals.reduce(getSignalByName,{}); -}; - -const getSignalByName=function( -signalByNameMemo, -{name,number,description,supported,action,forced,standard}) -{ -return{ -...signalByNameMemo, -[name]:{name,number,description,supported,action,forced,standard}}; - -}; - -const signalsByName=getSignalsByName();exports.signalsByName=signalsByName; - - - - -const getSignalsByNumber=function(){ -const signals=(0,_signals.getSignals)(); -const length=_realtime.SIGRTMAX+1; -const signalsA=Array.from({length},(value,number)=> -getSignalByNumber(number,signals)); - -return Object.assign({},...signalsA); -}; - -const getSignalByNumber=function(number,signals){ -const signal=findSignalByNumber(number,signals); - -if(signal===undefined){ -return{}; -} - -const{name,description,supported,action,forced,standard}=signal; -return{ -[number]:{ -name, -number, -description, -supported, -action, -forced, -standard}}; - - -}; - - - -const findSignalByNumber=function(number,signals){ -const signal=signals.find(({name})=>_os.constants.signals[name]===number); - -if(signal!==undefined){ -return signal; -} - -return signals.find(signalA=>signalA.number===number); -}; - -const signalsByNumber=getSignalsByNumber();exports.signalsByNumber=signalsByNumber; -//# sourceMappingURL=main.js.map - -/***/ }), - -/***/ 347: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({value:true}));exports.SIGRTMAX=exports.getRealtimeSignals=void 0; -const getRealtimeSignals=function(){ -const length=SIGRTMAX-SIGRTMIN+1; -return Array.from({length},getRealtimeSignal); -};exports.getRealtimeSignals=getRealtimeSignals; - -const getRealtimeSignal=function(value,index){ -return{ -name:`SIGRT${index+1}`, -number:SIGRTMIN+index, -action:"terminate", -description:"Application-specific signal (realtime)", -standard:"posix"}; - -}; - -const SIGRTMIN=34; -const SIGRTMAX=64;exports.SIGRTMAX=SIGRTMAX; -//# sourceMappingURL=realtime.js.map - -/***/ }), - -/***/ 2873: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({value:true}));exports.getSignals=void 0;var _os=__nccwpck_require__(857); - -var _core=__nccwpck_require__(3865); -var _realtime=__nccwpck_require__(347); - - - -const getSignals=function(){ -const realtimeSignals=(0,_realtime.getRealtimeSignals)(); -const signals=[..._core.SIGNALS,...realtimeSignals].map(normalizeSignal); -return signals; -};exports.getSignals=getSignals; - - - - - - - -const normalizeSignal=function({ -name, -number:defaultNumber, -description, -action, -forced=false, -standard}) -{ -const{ -signals:{[name]:constantSignal}}= -_os.constants; -const supported=constantSignal!==undefined; -const number=supported?constantSignal:defaultNumber; -return{name,number,description,supported,action,forced,standard}; -}; -//# sourceMappingURL=signals.js.map - -/***/ }), - -/***/ 3143: -/***/ ((module) => { - -// A simple implementation of make-array -function makeArray (subject) { - return Array.isArray(subject) - ? subject - : [subject] -} - -const EMPTY = '' -const SPACE = ' ' -const ESCAPE = '\\' -const REGEX_TEST_BLANK_LINE = /^\s+$/ -const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/ -const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ -const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ -const REGEX_SPLITALL_CRLF = /\r?\n/g -// /foo, -// ./foo, -// ../foo, -// . -// .. -const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ - -const SLASH = '/' - -// Do not use ternary expression here, since "istanbul ignore next" is buggy -let TMP_KEY_IGNORE = 'node-ignore' -/* istanbul ignore else */ -if (typeof Symbol !== 'undefined') { - TMP_KEY_IGNORE = Symbol.for('node-ignore') -} -const KEY_IGNORE = TMP_KEY_IGNORE - -const define = (object, key, value) => - Object.defineProperty(object, key, {value}) - -const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g - -const RETURN_FALSE = () => false - -// Sanitize the range of a regular expression -// The cases are complicated, see test cases for details -const sanitizeRange = range => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) - ? match - // Invalid range (out of order) which is ok for gitignore rules but - // fatal for JavaScript regular expression, so eliminate it. - : EMPTY -) - -// See fixtures #59 -const cleanRangeBackSlash = slashes => { - const {length} = slashes - return slashes.slice(0, length - length % 2) -} - -// > If the pattern ends with a slash, -// > it is removed for the purpose of the following description, -// > but it would only find a match with a directory. -// > In other words, foo/ will match a directory foo and paths underneath it, -// > but will not match a regular file or a symbolic link foo -// > (this is consistent with the way how pathspec works in general in Git). -// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`' -// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call -// you could use option `mark: true` with `glob` - -// '`foo/`' should not continue with the '`..`' -const REPLACERS = [ - - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a ) -> (a) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + ( - m2.indexOf('\\') === 0 - ? SPACE - : EMPTY - ) - ], - - // replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\s/g, - (_, m1) => { - const {length} = m1 - return m1.slice(0, length - length % 2) + SPACE - } - ], - - // Escape metacharacters - // which is written down by users but means special for regular expressions. - - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - match => `\\${match}` - ], - - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => '[^/]' - ], - - // leading slash - [ - - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => '^' - ], - - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => '\\/' - ], - - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - - // '**/foo' <-> 'foo' - () => '^(?:.*\\/)?' - ], - - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer () { - // If has a slash `/` at the beginning or middle - return !/\/(?!$)/.test(this) - // > Prior to 2.22.1 - // > If the pattern does not contain a slash /, - // > Git treats it as a shell glob pattern - // Actually, if there is only a trailing slash, - // git also treats it as a shell glob pattern - - // After 2.22.1 (compatible but clearer) - // > If there is a separator at the beginning or middle (or both) - // > of the pattern, then the pattern is relative to the directory - // > level of the particular .gitignore file itself. - // > Otherwise the pattern may also match at any level below - // > the .gitignore level. - ? '(?:^|\\/)' - - // > Otherwise, Git treats the pattern as a shell glob suitable for - // > consumption by fnmatch(3) - : '^' - } - ], - - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - - // Check if it is not the last `'/**'` - (_, index, str) => index + 6 < str.length - - // case: /**/ - // > A slash followed by two consecutive asterisks then a slash matches - // > zero or more directories. - // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on. - // '/**/' - ? '(?:\\/[^\\/]+)*' - - // case: /** - // > A trailing `"/**"` matches everything inside. - - // #21: everything inside but it should not include the current folder - : '\\/.+' - ], - - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1, p2) => { - // 1. - // > An asterisk "*" matches anything except a slash. - // 2. - // > Other consecutive asterisks are considered regular asterisks - // > and will match according to the previous rules. - const unescaped = p2.replace(/\\\*/g, '[^\\/]*') - return p1 + unescaped - } - ], - - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE - // '\\[bar]' -> '\\\\[bar\\]' - ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` - : close === ']' - ? endEscape.length % 2 === 0 - // A normal case, and it is a range notation - // '[bar]' - // '[bar\\\\]' - ? `[${sanitizeRange(range)}${endEscape}]` - // Invalid range notaton - // '[bar\\]' -> '[bar\\\\]' - : '[]' - : '[]' - ], - - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - match => /\/$/.test(match) - // foo/ will not match 'foo' - ? `${match}$` - // foo matches 'foo' and 'foo/' - : `${match}(?=$|\\/$)` - ], - - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 - // '\^': - // '/*' does not match EMPTY - // '/*' does not match everything - - // '\\\/': - // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*' - - return `${prefix}(?=$|\\/$)` - } - ], -] - -// A simple cache, because an ignore rule only has only one certain meaning -const regexCache = Object.create(null) - -// @param {pattern} -const makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern] - - if (!source) { - source = REPLACERS.reduce( - (prev, [matcher, replacer]) => - prev.replace(matcher, replacer.bind(pattern)), - pattern - ) - regexCache[pattern] = source - } - - return ignoreCase - ? new RegExp(source, 'i') - : new RegExp(source) -} - -const isString = subject => typeof subject === 'string' - -// > A blank line matches no files, so it can serve as a separator for readability. -const checkPattern = pattern => pattern - && isString(pattern) - && !REGEX_TEST_BLANK_LINE.test(pattern) - && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) - - // > A line starting with # serves as a comment. - && pattern.indexOf('#') !== 0 - -const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) - -class IgnoreRule { - constructor ( - origin, - pattern, - negative, - regex - ) { - this.origin = origin - this.pattern = pattern - this.negative = negative - this.regex = regex - } -} - -const createRule = (pattern, ignoreCase) => { - const origin = pattern - let negative = false - - // > An optional prefix "!" which negates the pattern; - if (pattern.indexOf('!') === 0) { - negative = true - pattern = pattern.substr(1) - } - - pattern = pattern - // > Put a backslash ("\") in front of the first "!" for patterns that - // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') - // > Put a backslash ("\") in front of the first hash for patterns that - // > begin with a hash. - .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') - - const regex = makeRegex(pattern, ignoreCase) - - return new IgnoreRule( - origin, - pattern, - negative, - regex - ) -} - -const throwError = (message, Ctor) => { - throw new Ctor(message) -} - -const checkPath = (path, originalPath, doThrow) => { - if (!isString(path)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ) - } - - // We don't know if we should ignore EMPTY, so throw - if (!path) { - return doThrow(`path must not be empty`, TypeError) - } - - // Check if it is a relative path - if (checkPath.isNotRelative(path)) { - const r = '`path.relative()`d' - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ) - } - - return true -} - -const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) - -checkPath.isNotRelative = isNotRelative -checkPath.convert = p => p - -class Ignore { - constructor ({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define(this, KEY_IGNORE, true) - - this._rules = [] - this._ignoreCase = ignoreCase - this._allowRelativePaths = allowRelativePaths - this._initCache() - } - - _initCache () { - this._ignoreCache = Object.create(null) - this._testCache = Object.create(null) - } - - _addPattern (pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules) - this._added = true - return - } - - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase) - this._added = true - this._rules.push(rule) - } - } - - // @param {Array | string | Ignore} pattern - add (pattern) { - this._added = false - - makeArray( - isString(pattern) - ? splitPattern(pattern) - : pattern - ).forEach(this._addPattern, this) - - // Some rules have just added to the ignore, - // making the behavior changed. - if (this._added) { - this._initCache() - } - - return this - } - - // legacy - addPattern (pattern) { - return this.add(pattern) - } - - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - - // @returns {TestResult} true if a file is ignored - _testOne (path, checkUnignored) { - let ignored = false - let unignored = false - - this._rules.forEach(rule => { - const {negative} = rule - if ( - unignored === negative && ignored !== unignored - || negative && !ignored && !unignored && !checkUnignored - ) { - return - } - - const matched = rule.regex.test(path) - - if (matched) { - ignored = !negative - unignored = negative - } - }) - - return { - ignored, - unignored - } - } - - // @returns {TestResult} - _test (originalPath, cache, checkUnignored, slices) { - const path = originalPath - // Supports nullable path - && checkPath.convert(originalPath) - - checkPath( - path, - originalPath, - this._allowRelativePaths - ? RETURN_FALSE - : throwError - ) - - return this._t(path, cache, checkUnignored, slices) - } - - _t (path, cache, checkUnignored, slices) { - if (path in cache) { - return cache[path] - } - - if (!slices) { - // path/to/a.js - // ['path', 'to', 'a.js'] - slices = path.split(SLASH) - } - - slices.pop() - - // If the path has no parent directory, just test it - if (!slices.length) { - return cache[path] = this._testOne(path, checkUnignored) - } - - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ) - - // If the path contains a parent directory, check the parent first - return cache[path] = parent.ignored - // > It is not possible to re-include a file if a parent directory of - // > that file is excluded. - ? parent - : this._testOne(path, checkUnignored) - } - - ignores (path) { - return this._test(path, this._ignoreCache, false).ignored - } - - createFilter () { - return path => !this.ignores(path) - } - - filter (paths) { - return makeArray(paths).filter(this.createFilter()) - } - - // @returns {TestResult} - test (path) { - return this._test(path, this._testCache, true) - } -} - -const factory = options => new Ignore(options) - -const isPathValid = path => - checkPath(path && checkPath.convert(path), path, RETURN_FALSE) - -factory.isPathValid = isPathValid - -// Fixes typescript -factory.default = factory - -module.exports = factory - -// Windows -// -------------------------------------------------------------- -/* istanbul ignore if */ -if ( - // Detect `process` so that it can run in browsers. - typeof process !== 'undefined' - && ( - process.env && process.env.IGNORE_TEST_WIN32 - || process.platform === 'win32' - ) -) { - /* eslint no-control-regex: "off" */ - const makePosix = str => /^\\\\\?\\/.test(str) - || /["<>|\u0000-\u001F]+/u.test(str) - ? str - : str.replace(/\\/g, '/') - - checkPath.convert = makePosix - - // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' - // 'd:\\foo' - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i - checkPath.isNotRelative = path => - REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) - || isNotRelative(path) -} - - -/***/ }), - -/***/ 9825: -/***/ ((module) => { - -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; - - -/***/ }), - -/***/ 686: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = __nccwpck_require__(9825); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; - - -/***/ }), - -/***/ 952: -/***/ ((module) => { - -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; - - -/***/ }), - -/***/ 1066: -/***/ ((module) => { - - - -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; - -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; - -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); - -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; - -module.exports = isStream; - - -/***/ }), - -/***/ 2304: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const betterPathResolve = __nccwpck_require__(6916) -const path = __nccwpck_require__(6928) - -function isSubdir (parentDir, subdir) { - const rParent = `${betterPathResolve(parentDir)}${path.sep}` - const rDir = `${betterPathResolve(subdir)}${path.sep}` - return rDir.startsWith(rParent) -} - -isSubdir.strict = function isSubdirStrict (parentDir, subdir) { - const rParent = `${betterPathResolve(parentDir)}${path.sep}` - const rDir = `${betterPathResolve(subdir)}${path.sep}` - return rDir !== rParent && rDir.startsWith(rParent) -} - -module.exports = isSubdir - - -/***/ }), - -/***/ 434: -/***/ ((module, exports) => { - -/*! - * is-windows - * - * Copyright © 2015-2018, Jon Schlinkert. - * Released under the MIT License. - */ - -(function(factory) { - if (exports && typeof exports === 'object' && "object" !== 'undefined') { - module.exports = factory(); - } else if (typeof define === 'function' && define.amd) { - define([], factory); - } else if (typeof window !== 'undefined') { - window.isWindows = factory(); - } else if (typeof global !== 'undefined') { - global.isWindows = factory(); - } else if (typeof self !== 'undefined') { - self.isWindows = factory(); - } else { - this.isWindows = factory(); - } -})(function() { - 'use strict'; - return function isWindows() { - return process && (process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)); - }; -}); - - -/***/ }), - -/***/ 7105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var fs = __nccwpck_require__(9896) -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = __nccwpck_require__(6132) -} else { - core = __nccwpck_require__(1778) -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} - - -/***/ }), - -/***/ 1778: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = isexe -isexe.sync = sync - -var fs = __nccwpck_require__(9896) - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} - - -/***/ }), - -/***/ 6132: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = isexe -isexe.sync = sync - -var fs = __nccwpck_require__(9896) - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} - - -/***/ }), - -/***/ 2301: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - - -var yaml = __nccwpck_require__(4444); - - -module.exports = yaml; - - -/***/ }), - -/***/ 4444: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - - -var loader = __nccwpck_require__(8512); -var dumper = __nccwpck_require__(2634); - - -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} - - -module.exports.Type = __nccwpck_require__(5991); -module.exports.Schema = __nccwpck_require__(8912); -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(910); -module.exports.JSON_SCHEMA = __nccwpck_require__(4441); -module.exports.CORE_SCHEMA = __nccwpck_require__(5600); -module.exports.DEFAULT_SAFE_SCHEMA = __nccwpck_require__(1276); -module.exports.DEFAULT_FULL_SCHEMA = __nccwpck_require__(1280); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.safeLoad = loader.safeLoad; -module.exports.safeLoadAll = loader.safeLoadAll; -module.exports.dump = dumper.dump; -module.exports.safeDump = dumper.safeDump; -module.exports.YAMLException = __nccwpck_require__(7242); - -// Deprecated schema names from JS-YAML 2.0.x -module.exports.MINIMAL_SCHEMA = __nccwpck_require__(910); -module.exports.SAFE_SCHEMA = __nccwpck_require__(1276); -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(1280); - -// Deprecated functions from JS-YAML 1.x.x -module.exports.scan = deprecated('scan'); -module.exports.parse = deprecated('parse'); -module.exports.compose = deprecated('compose'); -module.exports.addConstructor = deprecated('addConstructor'); - - -/***/ }), - -/***/ 9082: -/***/ ((module) => { - - - - -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} - - -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; - - -/***/ }), - -/***/ 2634: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/*eslint-disable no-use-before-define*/ - -var common = __nccwpck_require__(9082); -var YAMLException = __nccwpck_require__(7242); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(1280); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(1276); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// [24] b-line-feed ::= #xA /* LF */ -// [25] b-carriage-return ::= #xD /* CR */ -// [3] c-byte-order-mark ::= #xFEFF -function isNsChar(c) { - return isPrintable(c) && !isWhitespace(c) - // byte-order-mark - && c !== 0xFEFF - // b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// Simplified test for values allowed after the first character in plain style. -function isPlainSafe(c, prev) { - // Uses a subset of nb-char - c-flow-indicator - ":" - "#" - // where nb-char ::= c-printable - b-char - c-byte-order-mark. - return isPrintable(c) && c !== 0xFEFF - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // - ":" - "#" - // /* An ns-char preceding */ "#" - && c !== CHAR_COLON - && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - return isPrintable(c) && c !== 0xFEFF - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { - var i; - var char, prev_char; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(string.charCodeAt(0)) - && !isWhitespace(string.charCodeAt(string.length - 1)); - - if (singleLineOnly) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - prev_char = i > 0 ? string.charCodeAt(i - 1) : null; - plain = plain && isPlainSafe(char, prev_char); - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - prev_char = i > 0 ? string.charCodeAt(i - 1) : null; - plain = plain && isPlainSafe(char, prev_char); - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - return plain && !testAmbiguousType(string) - ? STYLE_PLAIN : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey) { - state.dump = (function () { - if (string.length === 0) { - return "''"; - } - if (!state.noCompatMode && - DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { - return "'" + string + "'"; - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char, nextChar; - var escapeSeq; - - for (var i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). - if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { - nextChar = string.charCodeAt(i + 1); - if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { - // Combine the surrogate pair and store it escaped. - result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); - // Advance index one extra since we already used that char here. - i++; continue; - } - } - escapeSeq = ESCAPE_SEQUENCES[char]; - result += !escapeSeq && isPrintable(char) - ? string[i] - : escapeSeq || encodeHex(char); - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || index !== 0) { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (index !== 0) pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || index !== 0) { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - state.tag = explicit ? type.tag : '?'; - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; - if (block && (state.dump.length !== 0)) { - writeBlockSequence(state, arrayLevel, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, arrayLevel, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - - return ''; -} - -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - -module.exports.dump = dump; -module.exports.safeDump = safeDump; - - -/***/ }), - -/***/ 7242: -/***/ ((module) => { - -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; - - result += this.reason || '(unknown reason)'; - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; - - -/***/ }), - -/***/ 8512: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/*eslint-disable max-len,no-use-before-define*/ - -var common = __nccwpck_require__(9082); -var YAMLException = __nccwpck_require__(7242); -var Mark = __nccwpck_require__(8258); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(1276); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(1280); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -// set a property of a literal object, while protecting against prototype pollution, -// see https://github.com/nodeca/js-yaml/issues/164 for more details -function setProperty(object, key, value) { - // used for this specific key only because Object.defineProperty is slow - if (key === '__proto__') { - Object.defineProperty(object, key, { - configurable: true, - enumerable: true, - writable: true, - value: value - }); - } else { - object[key] = value; - } -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - setProperty(destination, key, source[key]); - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - setProperty(_result, keyNode, valueNode); - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = {}, - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _pos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - _pos = state.position; - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else { - break; // Reading is done. Go to the epilogue. - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if (state.lineIndent > nodeIndent && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag !== null && state.tag !== '!') { - if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -function safeLoadAll(input, iterator, options) { - if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; - - -/***/ }), - -/***/ 8258: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - - -var common = __nccwpck_require__(9082); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) return null; - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; - } - } - - return where; -}; - - -module.exports = Mark; - - -/***/ }), - -/***/ 8912: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/*eslint-disable max-len*/ - -var common = __nccwpck_require__(9082); -var YAMLException = __nccwpck_require__(7242); -var Type = __nccwpck_require__(5991); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return exclude.indexOf(index) === -1; - }); -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {} - }, index, length; - - function collectType(type) { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; - - -/***/ }), - -/***/ 5600: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - - - -var Schema = __nccwpck_require__(8912); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(4441) - ] -}); - - -/***/ }), - -/***/ 1280: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. - - - - - -var Schema = __nccwpck_require__(8912); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - __nccwpck_require__(1276) - ], - explicit: [ - __nccwpck_require__(9542), - __nccwpck_require__(3381), - __nccwpck_require__(4287) - ] -}); - - -/***/ }), - -/***/ 1276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - - - -var Schema = __nccwpck_require__(8912); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(5600) - ], - implicit: [ - __nccwpck_require__(5608), - __nccwpck_require__(3884) - ], - explicit: [ - __nccwpck_require__(1595), - __nccwpck_require__(1700), - __nccwpck_require__(4121), - __nccwpck_require__(3200) - ] -}); - - -/***/ }), - -/***/ 910: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - - - -var Schema = __nccwpck_require__(8912); - - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(1327), - __nccwpck_require__(1139), - __nccwpck_require__(506) - ] -}); - - -/***/ }), - -/***/ 4441: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - - - -var Schema = __nccwpck_require__(8912); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(910) - ], - implicit: [ - __nccwpck_require__(1755), - __nccwpck_require__(1990), - __nccwpck_require__(2113), - __nccwpck_require__(2382) - ] -}); - - -/***/ }), - -/***/ 5991: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var YAMLException = __nccwpck_require__(7242); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; - - -/***/ }), - -/***/ 1595: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/*eslint-disable no-bitwise*/ - -var NodeBuffer; - -try { - // A trick for browserified version, to not include `Buffer` shim - var _require = __WEBPACK_EXTERNAL_createRequire(import.meta.url); - NodeBuffer = _require('buffer').Buffer; -} catch (__) {} - -var Type = __nccwpck_require__(5991); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - // Support node 6.+ Buffer API when available - return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); - } - - return result; -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - - -/***/ }), - -/***/ 1990: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 2382: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var common = __nccwpck_require__(9082); -var Type = __nccwpck_require__(5991); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // 20:59 - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign, base, digits; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - digits = []; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - - } else if (value.indexOf(':') >= 0) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 2113: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var common = __nccwpck_require__(9082); -var Type = __nccwpck_require__(5991); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 10 (except 0) or base 60 - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch === ':') break; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - // if !base60 - done; - if (ch !== ':') return true; - - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value, 16); - return sign * parseInt(value, 8); - } - - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - - -/***/ }), - -/***/ 4287: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var esprima; - -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - // workaround to exclude package from browserify list. - var _require = __WEBPACK_EXTERNAL_createRequire(import.meta.url); - esprima = _require('esprima'); -} catch (_) { - /* eslint-disable no-redeclare */ - /* global window */ - if (typeof window !== 'undefined') esprima = window.esprima; -} - -var Type = __nccwpck_require__(5991); - -function resolveJavascriptFunction(data) { - if (data === null) return false; - - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - return false; - } - - return true; - } catch (err) { - return false; - } -} - -function constructJavascriptFunction(data) { - /*jslint evil:true*/ - - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - throw new Error('Failed to resolve function'); - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - if (ast.body[0].expression.body.type === 'BlockStatement') { - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); - } - // ES6 arrow functions can omit the BlockStatement. In that case, just return - // the body. - /*eslint-disable no-new-func*/ - return new Function(params, 'return ' + source.slice(body[0], body[1])); -} - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - -function isFunction(object) { - return Object.prototype.toString.call(object) === '[object Function]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); - - -/***/ }), - -/***/ 3381: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -function resolveJavascriptRegExp(data) { - if (data === null) return false; - if (data.length === 0) return false; - - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - - if (modifiers.length > 3) return false; - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; - } - - return true; -} - -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // `/foo/gim` - tail can be maximum 4 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) result += 'g'; - if (object.multiline) result += 'm'; - if (object.ignoreCase) result += 'i'; - - return result; -} - -function isRegExp(object) { - return Object.prototype.toString.call(object) === '[object RegExp]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); - - -/***/ }), - -/***/ 9542: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -function resolveJavascriptUndefined() { - return true; -} - -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} - -function representJavascriptUndefined() { - return ''; -} - -function isUndefined(object) { - return typeof object === 'undefined'; -} - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); - - -/***/ }), - -/***/ 506: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - - -/***/ }), - -/***/ 3884: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - - -/***/ }), - -/***/ 1755: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 1700: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - - -/***/ }), - -/***/ 4121: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - - -/***/ }), - -/***/ 1139: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - - -/***/ }), - -/***/ 3200: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - - -/***/ }), - -/***/ 1327: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - - -/***/ }), - -/***/ 5608: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var Type = __nccwpck_require__(5991); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const loader = __nccwpck_require__(9384) -const dumper = __nccwpck_require__(3698) - -function renamed (from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.') - } -} - -module.exports.Type = __nccwpck_require__(1647) -module.exports.Schema = __nccwpck_require__(9992) -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(5478) -module.exports.JSON_SCHEMA = __nccwpck_require__(1441) -module.exports.CORE_SCHEMA = __nccwpck_require__(8920) -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(8922) -module.exports.load = loader.load -module.exports.loadAll = loader.loadAll -module.exports.dump = dumper.dump -module.exports.YAMLException = __nccwpck_require__(3954) - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: __nccwpck_require__(4259), - float: __nccwpck_require__(2102), - map: __nccwpck_require__(9362), - null: __nccwpck_require__(3507), - pairs: __nccwpck_require__(3985), - set: __nccwpck_require__(3896), - timestamp: __nccwpck_require__(7328), - bool: __nccwpck_require__(7166), - int: __nccwpck_require__(2729), - merge: __nccwpck_require__(7652), - omap: __nccwpck_require__(7023), - seq: __nccwpck_require__(2987), - str: __nccwpck_require__(2999) -} - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load') -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll') -module.exports.safeDump = renamed('safeDump', 'dump') - - -/***/ }), - -/***/ 3922: -/***/ ((module) => { - - - -function isNothing (subject) { - return (typeof subject === 'undefined') || (subject === null) -} - -function isObject (subject) { - return (typeof subject === 'object') && (subject !== null) -} - -function toArray (sequence) { - if (Array.isArray(sequence)) return sequence - else if (isNothing(sequence)) return [] - - return [sequence] -} - -function extend (target, source) { - if (source) { - const sourceKeys = Object.keys(source) - - for (let index = 0, length = sourceKeys.length; index < length; index += 1) { - const key = sourceKeys[index] - target[key] = source[key] - } - } - - return target -} - -function repeat (string, count) { - let result = '' - - for (let cycle = 0; cycle < count; cycle += 1) { - result += string - } - - return result -} - -function isNegativeZero (number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number) -} - -module.exports.isNothing = isNothing -module.exports.isObject = isObject -module.exports.toArray = toArray -module.exports.repeat = repeat -module.exports.isNegativeZero = isNegativeZero -module.exports.extend = extend - - -/***/ }), - -/***/ 3698: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _toString = Object.prototype.toString -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CHAR_BOM = 0xFEFF -const CHAR_TAB = 0x09 /* Tab */ -const CHAR_LINE_FEED = 0x0A /* LF */ -const CHAR_CARRIAGE_RETURN = 0x0D /* CR */ -const CHAR_SPACE = 0x20 /* Space */ -const CHAR_EXCLAMATION = 0x21 /* ! */ -const CHAR_DOUBLE_QUOTE = 0x22 /* " */ -const CHAR_SHARP = 0x23 /* # */ -const CHAR_PERCENT = 0x25 /* % */ -const CHAR_AMPERSAND = 0x26 /* & */ -const CHAR_SINGLE_QUOTE = 0x27 /* ' */ -const CHAR_ASTERISK = 0x2A /* * */ -const CHAR_COMMA = 0x2C /* , */ -const CHAR_MINUS = 0x2D /* - */ -const CHAR_COLON = 0x3A /* : */ -const CHAR_EQUALS = 0x3D /* = */ -const CHAR_GREATER_THAN = 0x3E /* > */ -const CHAR_QUESTION = 0x3F /* ? */ -const CHAR_COMMERCIAL_AT = 0x40 /* @ */ -const CHAR_LEFT_SQUARE_BRACKET = 0x5B /* [ */ -const CHAR_RIGHT_SQUARE_BRACKET = 0x5D /* ] */ -const CHAR_GRAVE_ACCENT = 0x60 /* ` */ -const CHAR_LEFT_CURLY_BRACKET = 0x7B /* { */ -const CHAR_VERTICAL_LINE = 0x7C /* | */ -const CHAR_RIGHT_CURLY_BRACKET = 0x7D /* } */ - -const ESCAPE_SEQUENCES = {} - -ESCAPE_SEQUENCES[0x00] = '\\0' -ESCAPE_SEQUENCES[0x07] = '\\a' -ESCAPE_SEQUENCES[0x08] = '\\b' -ESCAPE_SEQUENCES[0x09] = '\\t' -ESCAPE_SEQUENCES[0x0A] = '\\n' -ESCAPE_SEQUENCES[0x0B] = '\\v' -ESCAPE_SEQUENCES[0x0C] = '\\f' -ESCAPE_SEQUENCES[0x0D] = '\\r' -ESCAPE_SEQUENCES[0x1B] = '\\e' -ESCAPE_SEQUENCES[0x22] = '\\"' -ESCAPE_SEQUENCES[0x5C] = '\\\\' -ESCAPE_SEQUENCES[0x85] = '\\N' -ESCAPE_SEQUENCES[0xA0] = '\\_' -ESCAPE_SEQUENCES[0x2028] = '\\L' -ESCAPE_SEQUENCES[0x2029] = '\\P' - -const DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -] - -const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/ - -function compileStyleMap (schema, map) { - if (map === null) return {} - - const result = {} - const keys = Object.keys(map) - - for (let index = 0, length = keys.length; index < length; index += 1) { - let tag = keys[index] - let style = String(map[tag]) - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2) - } - const type = schema.compiledTypeMap['fallback'][tag] - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style] - } - - result[tag] = style - } - - return result -} - -function encodeHex (character) { - let handle - let length - - const string = character.toString(16).toUpperCase() - - if (character <= 0xFF) { - handle = 'x' - length = 2 - } else if (character <= 0xFFFF) { - handle = 'u' - length = 4 - } else if (character <= 0xFFFFFFFF) { - handle = 'U' - length = 8 - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF') - } - - return '\\' + handle + common.repeat('0', length - string.length) + string -} - -const QUOTING_TYPE_SINGLE = 1 -const QUOTING_TYPE_DOUBLE = 2 - -function State (options) { - this.schema = options['schema'] || DEFAULT_SCHEMA - this.indent = Math.max(1, (options['indent'] || 2)) - this.noArrayIndent = options['noArrayIndent'] || false - this.skipInvalid = options['skipInvalid'] || false - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']) - this.styleMap = compileStyleMap(this.schema, options['styles'] || null) - this.sortKeys = options['sortKeys'] || false - this.lineWidth = options['lineWidth'] || 80 - this.noRefs = options['noRefs'] || false - this.noCompatMode = options['noCompatMode'] || false - this.condenseFlow = options['condenseFlow'] || false - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE - this.forceQuotes = options['forceQuotes'] || false - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null - - this.implicitTypes = this.schema.compiledImplicit - this.explicitTypes = this.schema.compiledExplicit - - this.tag = null - this.result = '' - - this.duplicates = [] - this.usedDuplicates = null -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString (string, spaces) { - const ind = common.repeat(' ', spaces) - let position = 0 - let result = '' - const length = string.length - - while (position < length) { - let line - const next = string.indexOf('\n', position) - if (next === -1) { - line = string.slice(position) - position = length - } else { - line = string.slice(position, next + 1) - position = next + 1 - } - - if (line.length && line !== '\n') result += ind - - result += line - } - - return result -} - -function generateNextLine (state, level) { - return '\n' + common.repeat(' ', state.indent * level) -} - -function testImplicitResolving (state, str) { - for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) { - const type = state.implicitTypes[index] - - if (type.resolve(str)) { - return true - } - } - - return false -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace (c) { - return c === CHAR_SPACE || c === CHAR_TAB -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable (c) { - return (c >= 0x00020 && c <= 0x00007E) || - ((c >= 0x000A1 && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) || - ((c >= 0x0E000 && c <= 0x00FFFD) && c !== CHAR_BOM) || - (c >= 0x10000 && c <= 0x10FFFF) -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace (c) { - return isPrintable(c) && - c !== CHAR_BOM && - // - b-char - c !== CHAR_CARRIAGE_RETURN && - c !== CHAR_LINE_FEED -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe (c, prev, inblock) { - const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c) - const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c) - return ( - ( - // ns-plain-safe - inblock // c = flow-in - ? cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace && - // - c-flow-indicator - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET - ) && - // ns-plain-char - c !== CHAR_SHARP && // false on '#' - !(prev === CHAR_COLON && !cIsNsChar) - ) || // false on ': ' - (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) || // change to true on '[^ ]#' - (prev === CHAR_COLON && cIsNsChar) // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst (c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && - c !== CHAR_BOM && - !isWhitespace(c) && // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - c !== CHAR_MINUS && - c !== CHAR_QUESTION && - c !== CHAR_COLON && - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET && - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - c !== CHAR_SHARP && - c !== CHAR_AMPERSAND && - c !== CHAR_ASTERISK && - c !== CHAR_EXCLAMATION && - c !== CHAR_VERTICAL_LINE && - c !== CHAR_EQUALS && - c !== CHAR_GREATER_THAN && - c !== CHAR_SINGLE_QUOTE && - c !== CHAR_DOUBLE_QUOTE && - // | “%” | “@” | “`”) - c !== CHAR_PERCENT && - c !== CHAR_COMMERCIAL_AT && - c !== CHAR_GRAVE_ACCENT -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast (c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt (string, pos) { - const first = string.charCodeAt(pos) - let second - - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1) - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000 - } - } - return first -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator (string) { - const leadingSpaceRe = /^\n* / - return leadingSpaceRe.test(string) -} - -const STYLE_PLAIN = 1 -const STYLE_SINGLE = 2 -const STYLE_LITERAL = 3 -const STYLE_FOLDED = 4 -const STYLE_DOUBLE = 5 - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle (string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - let i - let char = 0 - let prevChar = null - let hasLineBreak = false - let hasFoldableLine = false // only checked if shouldTrackWidth - const shouldTrackWidth = lineWidth !== -1 - let previousLineBreak = -1 // count the first line correctly - let plain = isPlainSafeFirst(codePointAt(string, 0)) && - isPlainSafeLast(codePointAt(string, string.length - 1)) - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (char === CHAR_LINE_FEED) { - hasLineBreak = true - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ') - previousLineBreak = i - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')) - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar (state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''" - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'") - } - } - - const indent = state.indent * Math.max(1, level) // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - const lineWidth = (state.lineWidth === -1) - ? -1 - : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent) - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - const singleLineOnly = iskey || - // No block styles in flow mode. - (state.flowLevel > -1 && level >= state.flowLevel) - function testAmbiguity (string) { - return testImplicitResolving(state, string) - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - case STYLE_PLAIN: - return string - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'" - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(string, indent)) - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(foldString(string, lineWidth), indent)) - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"' - default: - throw new YAMLException('impossible error: invalid scalar style') - } - }()) -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader (string, indentPerLevel) { - const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '' - - // note the special case: the string '\n' counts as a "trailing" empty line. - const clip = string[string.length - 1] === '\n' - const keep = clip && (string[string.length - 2] === '\n' || string === '\n') - const chomp = keep ? '+' : (clip ? '' : '-') - - return indentIndicator + chomp + '\n' -} - -// (See the note for writeScalar.) -function dropEndingNewline (string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString (string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - const lineRe = /(\n+)([^\n]*)/g - - // first line (possibly an empty line) - let result = (function () { - let nextLF = string.indexOf('\n') - nextLF = nextLF !== -1 ? nextLF : string.length - lineRe.lastIndex = nextLF - return foldLine(string.slice(0, nextLF), width) - }()) - // If we haven't reached the first content line yet, don't add an extra \n. - let prevMoreIndented = string[0] === '\n' || string[0] === ' ' - let moreIndented - - // rest of the lines - let match - while ((match = lineRe.exec(string))) { - const prefix = match[1] - const line = match[2] - - moreIndented = (line[0] === ' ') - result += prefix + - ((!prevMoreIndented && !moreIndented && line !== '') ? '\n' : '') + - foldLine(line, width) - prevMoreIndented = moreIndented - } - - return result -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine (line, width) { - if (line === '' || line[0] === ' ') return line - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - const breakRe = / [^ ]/g // note: the match index will always be <= length-2. - let match - // start is an inclusive index. end, curr, and next are exclusive. - let start = 0 - let end - let curr = 0 - let next = 0 - let result = '' - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next // derive end <= length-2 - result += '\n' + line.slice(start, end) - // skip the space that was output as \n - start = end + 1 // derive start <= length-1 - } - curr = next - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n' - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1) - } else { - result += line.slice(start) - } - - return result.slice(1) // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString (string) { - let result = '' - let char = 0 - - for (let i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - const escapeSeq = ESCAPE_SEQUENCES[char] - - if (!escapeSeq && isPrintable(char)) { - result += string[i] - if (char >= 0x10000) result += string[i + 1] - } else { - result += escapeSeq || encodeHex(char) - } - } - - return result -} - -function writeFlowSequence (state, level, object) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '') - _result += state.dump - } - } - - state.tag = _tag - state.dump = '[' + _result + ']' -} - -function writeBlockSequence (state, level, object, compact) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - if (!compact || _result !== '') { - _result += generateNextLine(state, level) - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-' - } else { - _result += '- ' - } - - _result += state.dump - } - } - - state.tag = _tag - state.dump = _result || '[]' // Empty sequence if no valid values. -} - -function writeFlowMapping (state, level, object) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - if (_result !== '') pairBuffer += ', ' - - if (state.condenseFlow) pairBuffer += '"' - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? ' - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ') - - if (!writeNode(state, level, objectValue, false, false)) { - continue // Skip this pair because of invalid value. - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = '{' + _result + '}' -} - -function writeBlockMapping (state, level, object, compact) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort() - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys) - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function') - } - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level) - } - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue // Skip this pair because of invalid key. - } - - const explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024) - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?' - } else { - pairBuffer += '? ' - } - } - - pairBuffer += state.dump - - if (explicitPair) { - pairBuffer += generateNextLine(state, level) - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':' - } else { - pairBuffer += ': ' - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = _result || '{}' // Empty mapping if no valid pairs. -} - -function detectType (state, object, explicit) { - const typeList = explicit ? state.explicitTypes : state.implicitTypes - - for (let index = 0, length = typeList.length; index < length; index += 1) { - const type = typeList[index] - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object) - } else { - state.tag = type.tag - } - } else { - state.tag = '?' - } - - if (type.represent) { - const style = state.styleMap[type.tag] || type.defaultStyle - - let _result - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style) - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style) - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style') - } - - state.dump = _result - } - - return true - } - } - - return false -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode (state, level, object, block, compact, iskey, isblockseq) { - state.tag = null - state.dump = object - - if (!detectType(state, object, false)) { - detectType(state, object, true) - } - - const type = _toString.call(state.dump) - const inblock = block - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level) - } - - const objectOrArray = type === '[object Object]' || type === '[object Array]' - let duplicateIndex - let duplicate - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object) - duplicate = duplicateIndex !== -1 - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowMapping(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact) - } else { - writeBlockSequence(state, level, state.dump, compact) - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowSequence(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock) - } - } else if (type === '[object Undefined]') { - return false - } else { - if (state.skipInvalid) return false - throw new YAMLException('unacceptable kind of an object to dump ' + type) - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - let tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21') - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18) - } else { - tagStr = '!<' + tagStr + '>' - } - - state.dump = tagStr + ' ' + state.dump - } - } - - return true -} - -function getDuplicateReferences (object, state) { - const objects = [] - const duplicatesIndexes = [] - - inspectNode(object, objects, duplicatesIndexes) - - const length = duplicatesIndexes.length - for (let index = 0; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]) - } - state.usedDuplicates = new Array(length) -} - -function inspectNode (object, objects, duplicatesIndexes) { - if (object !== null && typeof object === 'object') { - const index = objects.indexOf(object) - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index) - } - } else { - objects.push(object) - - if (Array.isArray(object)) { - for (let i = 0, length = object.length; i < length; i += 1) { - inspectNode(object[i], objects, duplicatesIndexes) - } - } else { - const objectKeyList = Object.keys(object) - - for (let i = 0, length = objectKeyList.length; i < length; i += 1) { - inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes) - } - } - } - } -} - -function dump (input, options) { - options = options || {} - - const state = new State(options) - - if (!state.noRefs) getDuplicateReferences(input, state) - - let value = input - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value) - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n' - - return '' -} - -module.exports.dump = dump - - -/***/ }), - -/***/ 3954: -/***/ ((module) => { - -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - -function formatError (exception, compact) { - let where = '' - const message = exception.reason || '(unknown reason)' - - if (!exception.mark) return message - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" ' - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')' - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet - } - - return message + ' ' + where -} - -function YAMLException (reason, mark) { - // Super constructor - Error.call(this) - - this.name = 'YAMLException' - this.reason = reason - this.mark = mark - this.message = formatError(this, false) - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor) - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || '' - } -} - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype) -YAMLException.prototype.constructor = YAMLException - -YAMLException.prototype.toString = function toString (compact) { - return this.name + ': ' + formatError(this, compact) -} - -module.exports = YAMLException - - -/***/ }), - -/***/ 9384: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const makeSnippet = __nccwpck_require__(1934) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CONTEXT_FLOW_IN = 1 -const CONTEXT_FLOW_OUT = 2 -const CONTEXT_BLOCK_IN = 3 -const CONTEXT_BLOCK_OUT = 4 - -const CHOMPING_CLIP = 1 -const CHOMPING_STRIP = 2 -const CHOMPING_KEEP = 3 - -// eslint-disable-next-line no-control-regex -const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ -const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i - -function _class (obj) { return Object.prototype.toString.call(obj) } - -function isEol (c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */) -} - -function isWhiteSpace (c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */) -} - -function isWsOrEol (c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */) -} - -function isFlowIndicator (c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */ -} - -function fromHexCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - const lc = c | 0x20 - - if ((lc >= 0x61/* a */) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10 - } - - return -1 -} - -function escapedHexLen (c) { - if (c === 0x78/* x */) { return 2 } - if (c === 0x75/* u */) { return 4 } - if (c === 0x55/* U */) { return 8 } - return 0 -} - -function fromDecimalCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - return -1 -} - -function simpleEscapeSequence (c) { - switch (c) { - case 0x30/* 0 */: return '\x00' - case 0x61/* a */: return '\x07' - case 0x62/* b */: return '\x08' - case 0x74/* t */: return '\x09' - case 0x09/* Tab */: return '\x09' - case 0x6E/* n */: return '\x0A' - case 0x76/* v */: return '\x0B' - case 0x66/* f */: return '\x0C' - case 0x72/* r */: return '\x0D' - case 0x65/* e */: return '\x1B' - case 0x20/* Space */: return ' ' - case 0x22/* " */: return '\x22' - case 0x2F/* / */: return '/' - case 0x5C/* \ */: return '\x5C' - case 0x4E/* N */: return '\x85' - case 0x5F/* _ */: return '\xA0' - case 0x4C/* L */: return '\u2028' - case 0x50/* P */: return '\u2029' - default: return '' - } -} - -function charFromCodepoint (c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c) - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ) -} - -// set a property of a literal object, while protecting against prototype pollution, -// see https://github.com/nodeca/js-yaml/issues/164 for more details -function setProperty (object, key, value) { - // used for this specific key only because Object.defineProperty is slow - if (key === '__proto__') { - Object.defineProperty(object, key, { - configurable: true, - enumerable: true, - writable: true, - value: value - }) - } else { - object[key] = value - } -} - -const simpleEscapeCheck = new Array(256) // integer, for fast access -const simpleEscapeMap = new Array(256) -for (let i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0 - simpleEscapeMap[i] = simpleEscapeSequence(i) -} - -function State (input, options) { - this.input = input - - this.filename = options['filename'] || null - this.schema = options['schema'] || DEFAULT_SCHEMA - this.onWarning = options['onWarning'] || null - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false - - this.json = options['json'] || false - this.listener = options['listener'] || null - this.maxDepth = typeof options['maxDepth'] === 'number' ? options['maxDepth'] : 100 - this.maxMergeSeqLength = typeof options['maxMergeSeqLength'] === 'number' ? options['maxMergeSeqLength'] : 20 - - this.implicitTypes = this.schema.compiledImplicit - this.typeMap = this.schema.compiledTypeMap - - this.length = input.length - this.position = 0 - this.line = 0 - this.lineStart = 0 - this.lineIndent = 0 - this.depth = 0 - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1 - - this.documents = [] - this.anchorMapTransactions = [] - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result; */ -} - -function generateError (state, message) { - const mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - } - - mark.snippet = makeSnippet(mark) - - return new YAMLException(message, mark) -} - -function throwError (state, message) { - throw generateError(state, message) -} - -function throwWarning (state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)) - } -} - -function storeAnchor (state, name, value) { - const transactions = state.anchorMapTransactions - - if (transactions.length !== 0) { - const transaction = transactions[transactions.length - 1] - - if (!_hasOwnProperty.call(transaction, name)) { - transaction[name] = { - existed: _hasOwnProperty.call(state.anchorMap, name), - value: state.anchorMap[name] - } - } - } - - state.anchorMap[name] = value -} - -function beginAnchorTransaction (state) { - state.anchorMapTransactions.push(Object.create(null)) -} - -function commitAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const transactions = state.anchorMapTransactions - - if (transactions.length === 0) return - - const parent = transactions[transactions.length - 1] - const names = Object.keys(transaction) - - for (let index = 0, length = names.length; index < length; index += 1) { - const name = names[index] - - if (!_hasOwnProperty.call(parent, name)) { - parent[name] = transaction[name] - } - } -} - -function rollbackAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const names = Object.keys(transaction) - - for (let index = names.length - 1; index >= 0; index -= 1) { - const entry = transaction[names[index]] - - if (entry.existed) { - state.anchorMap[names[index]] = entry.value - } else { - delete state.anchorMap[names[index]] - } - } -} - -function snapshotState (state) { - return { - position: state.position, - line: state.line, - lineStart: state.lineStart, - lineIndent: state.lineIndent, - firstTabInLine: state.firstTabInLine, - tag: state.tag, - anchor: state.anchor, - kind: state.kind, - result: state.result - } -} - -function restoreState (state, snapshot) { - state.position = snapshot.position - state.line = snapshot.line - state.lineStart = snapshot.lineStart - state.lineIndent = snapshot.lineIndent - state.firstTabInLine = snapshot.firstTabInLine - state.tag = snapshot.tag - state.anchor = snapshot.anchor - state.kind = snapshot.kind - state.result = snapshot.result -} - -const directiveHandlers = { - - YAML: function handleYamlDirective (state, name, args) { - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive') - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument') - } - - const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]) - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive') - } - - const major = parseInt(match[1], 10) - const minor = parseInt(match[2], 10) - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document') - } - - state.version = args[0] - state.checkLineBreaks = (minor < 2) - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document') - } - }, - - TAG: function handleTagDirective (state, name, args) { - let prefix - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments') - } - - const handle = args[0] - prefix = args[1] - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive') - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle') - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive') - } - - try { - prefix = decodeURIComponent(prefix) - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix) - } - - state.tagMap[handle] = prefix - } -} - -function captureSegment (state, start, end, checkJson) { - if (start < end) { - const _result = state.input.slice(start, end) - - if (checkJson) { - for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { - const _character = _result.charCodeAt(_position) - if (!(_character === 0x09 || - (_character >= 0x20 && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character') - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters') - } - - state.result += _result - } -} - -function mergeMappings (state, destination, source, overridableKeys) { - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable') - } - - const sourceKeys = Object.keys(source) - - for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - const key = sourceKeys[index] - - if (!_hasOwnProperty.call(destination, key)) { - setProperty(destination, key, source[key]) - overridableKeys[key] = true - } - } -} - -function storeMappingPair (state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode) - - for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys') - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]' - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]' - } - - keyNode = String(keyNode) - - if (_result === null) { - _result = {} - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - if (valueNode.length > state.maxMergeSeqLength) { - throwError(state, 'merge sequence length exceeded maxMergeSeqLength (' + state.maxMergeSeqLength + ')') - } - const seen = new Set() - for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { - const src = valueNode[index] - // Existing keys are not overridden on merge, so dedupe sources to - // avoid redundant work on repeated aliases. - if (seen.has(src)) continue - seen.add(src) - mergeMappings(state, _result, src, overridableKeys) - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys) - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line - state.lineStart = startLineStart || state.lineStart - state.position = startPos || state.position - throwError(state, 'duplicated mapping key') - } - - setProperty(_result, keyNode, valueNode) - delete overridableKeys[keyNode] - } - - return _result -} - -function readLineBreak (state) { - const ch = state.input.charCodeAt(state.position) - - if (ch === 0x0A/* LF */) { - state.position++ - } else if (ch === 0x0D/* CR */) { - state.position++ - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++ - } - } else { - throwError(state, 'a line break is expected') - } - - state.line += 1 - state.lineStart = state.position - state.firstTabInLine = -1 -} - -function skipSeparationSpace (state, allowComments, checkIndent) { - let lineBreaks = 0 - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position - } - ch = state.input.charCodeAt(++state.position) - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position) - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0) - } - - if (isEol(ch)) { - readLineBreak(state) - - ch = state.input.charCodeAt(state.position) - lineBreaks++ - state.lineIndent = 0 - - while (ch === 0x20/* Space */) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - } else { - break - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation') - } - - return lineBreaks -} - -function testDocumentSeparator (state) { - let _position = state.position - let ch = state.input.charCodeAt(_position) - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - _position += 3 - - ch = state.input.charCodeAt(_position) - - if (ch === 0 || isWsOrEol(ch)) { - return true - } - } - - return false -} - -function writeFoldedLines (state, count) { - if (count === 1) { - state.result += ' ' - } else if (count > 1) { - state.result += common.repeat('\n', count - 1) - } -} - -function readPlainScalar (state, nodeIndent, withinFlowCollection) { - let captureStart - let captureEnd - let hasPendingContent - let _line - let _lineStart - let _lineIndent - const _kind = state.kind - const _result = state.result - - let ch = state.input.charCodeAt(state.position) - - if (isWsOrEol(ch) || - isFlowIndicator(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - return false - } - } - - state.kind = 'scalar' - state.result = '' - captureStart = captureEnd = state.position - hasPendingContent = false - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - break - } - } else if (ch === 0x23/* # */) { - const preceding = state.input.charCodeAt(state.position - 1) - - if (isWsOrEol(preceding)) { - break - } - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - (withinFlowCollection && isFlowIndicator(ch))) { - break - } else if (isEol(ch)) { - _line = state.line - _lineStart = state.lineStart - _lineIndent = state.lineIndent - skipSeparationSpace(state, false, -1) - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true - ch = state.input.charCodeAt(state.position) - continue - } else { - state.position = captureEnd - state.line = _line - state.lineStart = _lineStart - state.lineIndent = _lineIndent - break - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false) - writeFoldedLines(state, state.line - _line) - captureStart = captureEnd = state.position - hasPendingContent = false - } - - if (!isWhiteSpace(ch)) { - captureEnd = state.position + 1 - } - - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, captureEnd, false) - - if (state.result) { - return true - } - - state.kind = _kind - state.result = _result - return false -} - -function readSingleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x27/* ' */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x27/* ' */) { - captureStart = state.position - state.position++ - captureEnd = state.position - } else { - return true - } - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar') -} - -function readDoubleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x22/* " */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true) - state.position++ - return true - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (isEol(ch)) { - skipSeparationSpace(state, false, nodeIndent) - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch] - state.position++ - } else if ((tmp = escapedHexLen(ch)) > 0) { - let hexLength = tmp - let hexResult = 0 - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position) - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp - } else { - throwError(state, 'expected hexadecimal character') - } - } - - state.result += charFromCodepoint(hexResult) - - state.position++ - } else { - throwError(state, 'unknown escape sequence') - } - - captureStart = captureEnd = state.position - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar') -} - -function readFlowCollection (state, nodeIndent) { - let readNext = true - let _line - let _lineStart - let _pos - const _tag = state.tag - let _result - const _anchor = state.anchor - let terminator - let isPair - let isExplicitPair - let isMapping - const overridableKeys = Object.create(null) - let keyNode - let keyTag - let valueNode - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x5B/* [ */) { - terminator = 0x5D/* ] */ - isMapping = false - _result = [] - } else if (ch === 0x7B/* { */) { - terminator = 0x7D/* } */ - isMapping = true - _result = {} - } else { - return false - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - ch = state.input.charCodeAt(++state.position) - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === terminator) { - state.position++ - state.tag = _tag - state.anchor = _anchor - state.kind = isMapping ? 'mapping' : 'sequence' - state.result = _result - return true - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries') - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','") - } - - keyTag = keyNode = valueNode = null - isPair = isExplicitPair = false - - if (ch === 0x3F/* ? */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following)) { - isPair = isExplicitPair = true - state.position++ - skipSeparationSpace(state, true, nodeIndent) - } - } - - _line = state.line // Save the current line. - _lineStart = state.lineStart - _pos = state.position - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - keyTag = state.tag - keyNode = state.result - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true - ch = state.input.charCodeAt(++state.position) - skipSeparationSpace(state, true, nodeIndent) - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - valueNode = state.result - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos) - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)) - } else { - _result.push(keyNode) - } - - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === 0x2C/* , */) { - readNext = true - ch = state.input.charCodeAt(++state.position) - } else { - readNext = false - } - } - - throwError(state, 'unexpected end of the stream within a flow collection') -} - -function readBlockScalar (state, nodeIndent) { - let folding - let chomping = CHOMPING_CLIP - let didReadContent = false - let detectedIndent = false - let textIndent = nodeIndent - let emptyLines = 0 - let atMoreIndented = false - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x7C/* | */) { - folding = false - } else if (ch === 0x3E/* > */) { - folding = true - } else { - return false - } - - state.kind = 'scalar' - state.result = '' - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP - } else { - throwError(state, 'repeat of a chomping mode identifier') - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one') - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1 - detectedIndent = true - } else { - throwError(state, 'repeat of an indentation width identifier') - } - } else { - break - } - } - - if (isWhiteSpace(ch)) { - do { ch = state.input.charCodeAt(++state.position) } - while (isWhiteSpace(ch)) - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (!isEol(ch) && (ch !== 0)) - } - } - - while (ch !== 0) { - readLineBreak(state) - state.lineIndent = 0 - - ch = state.input.charCodeAt(state.position) - - // eslint-disable-next-line no-unmodified-loop-condition - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent - } - - if (isEol(ch)) { - emptyLines++ - continue - } - - if (!detectedIndent && textIndent === 0) { - throwError(state, 'missing indentation for block scalar') - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n' - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - // Lines starting with white space characters (more-indented lines) are not folded. - if (isWhiteSpace(ch)) { - atMoreIndented = true - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false - state.result += common.repeat('\n', emptyLines + 1) - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' ' - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines) - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } - - didReadContent = true - detectedIndent = true - emptyLines = 0 - const captureStart = state.position - - while (!isEol(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, state.position, false) - } - - return true -} - -function readBlockSequence (state, nodeIndent) { - const _tag = state.tag - const _anchor = state.anchor - const _result = [] - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - if (ch !== 0x2D/* - */) { - break - } - - const following = state.input.charCodeAt(state.position + 1) - - if (!isWsOrEol(following)) { - break - } - - detected = true - state.position++ - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null) - ch = state.input.charCodeAt(state.position) - continue - } - } - - const _line = state.line - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true) - _result.push(state.result) - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'sequence' - state.result = _result - return true - } - return false -} - -function readBlockMapping (state, nodeIndent, flowIndent) { - let allowCompact - let _keyLine - let _keyLineStart - let _keyPos - const _tag = state.tag - const _anchor = state.anchor - const _result = {} - const overridableKeys = Object.create(null) - let keyTag = null - let keyNode = null - let valueNode = null - let atExplicitKey = false - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - const following = state.input.charCodeAt(state.position + 1) - const _line = state.line // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEol(following)) { - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = true - allowCompact = true - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false - allowCompact = true - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line') - } - - state.position += 1 - ch = following - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position) - - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position) - - if (!isWsOrEol(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping') - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = false - allowCompact = false - keyTag = state.tag - keyNode = state.result - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result - } else { - valueNode = state.result - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - skipSeparationSpace(state, true, -1) - ch = state.input.charCodeAt(state.position) - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'mapping' - state.result = _result - } - - return detected -} - -function readTagProperty (state) { - let isVerbatim = false - let isNamed = false - let tagHandle - let tagName - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x21/* ! */) return false - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property') - } - - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x3C/* < */) { - isVerbatim = true - ch = state.input.charCodeAt(++state.position) - } else if (ch === 0x21/* ! */) { - isNamed = true - tagHandle = '!!' - ch = state.input.charCodeAt(++state.position) - } else { - tagHandle = '!' - } - - let _position = state.position - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && ch !== 0x3E/* > */) - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position) - ch = state.input.charCodeAt(++state.position) - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag') - } - } else { - while (ch !== 0 && !isWsOrEol(ch)) { - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1) - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters') - } - - isNamed = true - _position = state.position + 1 - } else { - throwError(state, 'tag suffix cannot contain exclamation marks') - } - } - - ch = state.input.charCodeAt(++state.position) - } - - tagName = state.input.slice(_position, state.position) - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters') - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName) - } - - try { - tagName = decodeURIComponent(tagName) - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName) - } - - if (isVerbatim) { - state.tag = tagName - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName - } else if (tagHandle === '!') { - state.tag = '!' + tagName - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"') - } - - return true -} - -function readAnchorProperty (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x26/* & */) return false - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property') - } - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character') - } - - state.anchor = state.input.slice(_position, state.position) - return true -} - -function readAlias (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x2A/* * */) return false - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character') - } - - const alias = state.input.slice(_position, state.position) - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"') - } - - state.result = state.anchorMap[alias] - skipSeparationSpace(state, true, -1) - return true -} - -function tryReadBlockMappingFromProperty (state, propertyStart, nodeIndent, flowIndent) { - const fallbackState = snapshotState(state) - - beginAnchorTransaction(state) - restoreState(state, propertyStart) - - // Re-read the leading properties as part of the first implicit key, not as - // properties of the current node. - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === 'mapping') { - commitAnchorTransaction(state) - return true - } - - rollbackAnchorTransaction(state) - restoreState(state, fallbackState) - return false -} - -function composeNode (state, parentIndent, nodeContext, allowToSeek, allowCompact) { - let allowBlockScalars - let allowBlockCollections - let indentStatus = 1 // 1: this>parent, 0: this=parent, -1: this= state.maxDepth) { - throwError(state, 'nesting exceeded maxDepth (' + state.maxDepth + ')') - } - - state.depth += 1 - - if (state.listener !== null) { - state.listener('open', state) - } - - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - const allowBlockStyles = allowBlockScalars = allowBlockCollections = - CONTEXT_BLOCK_OUT === nodeContext || - CONTEXT_BLOCK_IN === nodeContext - - if (allowToSeek) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } - } - - if (indentStatus === 1) { - while (true) { - const ch = state.input.charCodeAt(state.position) - const propertyState = snapshotState(state) - - // A duplicate property token after a line break can be the first key of - // a nested block mapping, e.g. `!!map\n !!str key: value`. - if (atNewLine && - ((ch === 0x21/* ! */ && state.tag !== null) || - (ch === 0x26/* & */ && state.anchor !== null))) { - break - } - - if (!readTagProperty(state) && !readAnchorProperty(state)) { - break - } - - if (propertyStart === null) { - propertyStart = propertyState - } - - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - allowBlockCollections = allowBlockStyles - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } else { - allowBlockCollections = false - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent - } else { - flowIndent = parentIndent + 1 - } - - blockIndent = state.position - state.lineStart - - if (indentStatus === 1) { - if ((allowBlockCollections && - (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent))) || - readFlowCollection(state, flowIndent)) { - hasContent = true - } else { - const ch = state.input.charCodeAt(state.position) - - if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && - ch !== 0x7C/* | */ && ch !== 0x3E/* > */ && - tryReadBlockMappingFromProperty( - state, - propertyStart, - propertyStart.position - propertyStart.lineStart, - flowIndent - )) { - hasContent = true - } else if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true - } else if (readAlias(state)) { - hasContent = true - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties') - } - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true - - if (state.tag === null) { - state.tag = '?' - } - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent) - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"') - } - - for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex] - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result) - state.tag = type.tag - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - break - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag] - } else { - // looking for multi type - type = null - const typeList = state.typeMap.multi[state.kind || 'fallback'] - - for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex] - break - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>') - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"') - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag') - } else { - state.result = type.construct(state.result, state.tag) - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } - - if (state.listener !== null) { - state.listener('close', state) - } - - state.depth -= 1 - return state.tag !== null || state.anchor !== null || hasContent -} - -function readDocument (state) { - const documentStart = state.position - let hasDirectives = false - let ch - - state.version = null - state.checkLineBreaks = state.legacy - state.tagMap = Object.create(null) - state.anchorMap = Object.create(null) - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break - } - - hasDirectives = true - ch = state.input.charCodeAt(++state.position) - let _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - const directiveName = state.input.slice(_position, state.position) - const directiveArgs = [] - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length') - } - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && !isEol(ch)) - break - } - - if (isEol(ch)) break - - _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - directiveArgs.push(state.input.slice(_position, state.position)) - } - - if (ch !== 0) readLineBreak(state) - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs) - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"') - } - } - - skipSeparationSpace(state, true, -1) - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected') - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true) - skipSeparationSpace(state, true, -1) - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content') - } - - state.documents.push(state.result) - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } - return - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected') - } -} - -function loadDocuments (input, options) { - input = String(input) - options = options || {} - - if (input.length !== 0) { - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n' - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1) - } - } - - const state = new State(input, options) - - const nullpos = input.indexOf('\0') - - if (nullpos !== -1) { - state.position = nullpos - throwError(state, 'null byte is not allowed in input') - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0' - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1 - state.position += 1 - } - - while (state.position < (state.length - 1)) { - readDocument(state) - } - - return state.documents -} - -function loadAll (input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator - iterator = null - } - - const documents = loadDocuments(input, options) - - if (typeof iterator !== 'function') { - return documents - } - - for (let index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]) - } -} - -function load (input, options) { - const documents = loadDocuments(input, options) - - if (documents.length === 0) { - return undefined - } else if (documents.length === 1) { - return documents[0] - } - throw new YAMLException('expected a single document in the stream, but found more') -} - -module.exports.loadAll = loadAll -module.exports.load = load - - -/***/ }), - -/***/ 9992: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) -const Type = __nccwpck_require__(1647) - -function compileList (schema, name) { - const result = [] - - schema[name].forEach(function (currentType) { - let newIndex = result.length - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - newIndex = previousIndex - } - }) - - result[newIndex] = currentType - }) - - return result -} - -function compileMap (/* lists... */) { - const result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - } - function collectType (type) { - if (type.multi) { - result.multi[type.kind].push(type) - result.multi['fallback'].push(type) - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type - } - } - - for (let index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType) - } - return result -} - -function Schema (definition) { - return this.extend(definition) -} - -Schema.prototype.extend = function extend (definition) { - let implicit = [] - let explicit = [] - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition) - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition) - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit) - if (definition.explicit) explicit = explicit.concat(definition.explicit) - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })') - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.') - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.') - } - }) - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - }) - - const result = Object.create(Schema.prototype) - - result.implicit = (this.implicit || []).concat(implicit) - result.explicit = (this.explicit || []).concat(explicit) - - result.compiledImplicit = compileList(result, 'implicit') - result.compiledExplicit = compileList(result, 'explicit') - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit) - - return result -} - -module.exports = Schema - - -/***/ }), - -/***/ 8920: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - -module.exports = __nccwpck_require__(1441) - - -/***/ }), - -/***/ 8922: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - -module.exports = (__nccwpck_require__(8920).extend)({ - implicit: [ - __nccwpck_require__(7328), - __nccwpck_require__(7652) - ], - explicit: [ - __nccwpck_require__(4259), - __nccwpck_require__(7023), - __nccwpck_require__(3985), - __nccwpck_require__(3896) - ] -}) - - -/***/ }), - -/***/ 5478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - -const Schema = __nccwpck_require__(9992) - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(2999), - __nccwpck_require__(2987), - __nccwpck_require__(9362) - ] -}) - - -/***/ }), - -/***/ 1441: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - -module.exports = (__nccwpck_require__(5478).extend)({ - implicit: [ - __nccwpck_require__(3507), - __nccwpck_require__(7166), - __nccwpck_require__(2729), - __nccwpck_require__(2102) - ] -}) - - -/***/ }), - -/***/ 1934: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) - -// get snippet for a single line, respecting maxLength -function getLine (buffer, lineStart, lineEnd, position, maxLineLength) { - let head = '' - let tail = '' - const maxHalfLength = Math.floor(maxLineLength / 2) - 1 - - if (position - lineStart > maxHalfLength) { - head = ' ... ' - lineStart = position - maxHalfLength + head.length - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...' - lineEnd = position + maxHalfLength - tail.length - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - } -} - -function padStart (string, max) { - return common.repeat(' ', max - string.length) + string -} - -function makeSnippet (mark, options) { - options = Object.create(options || null) - - if (!mark.buffer) return null - - if (!options.maxLength) options.maxLength = 79 - if (typeof options.indent !== 'number') options.indent = 1 - if (typeof options.linesBefore !== 'number') options.linesBefore = 3 - if (typeof options.linesAfter !== 'number') options.linesAfter = 2 - - const re = /\r?\n|\r|\0/g - const lineStarts = [0] - const lineEnds = [] - let match - let foundLineNo = -1 - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index) - lineStarts.push(match.index + match[0].length) - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2 - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1 - - let result = '' - const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length - const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3) - - for (let i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ) - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result - } - - const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength) - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n' - - for (let i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ) - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - } - - return result.replace(/\n$/, '') -} - -module.exports = makeSnippet - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) - -const TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -] - -const YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -] - -function compileStyleAliases (map) { - const result = {} - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style - }) - }) - } - - return result -} - -function Type (tag, options) { - options = options || {} - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.') - } - }) - - // TODO: Add tag format check. - this.options = options // keep original options in case user wants to extend this type later - this.tag = tag - this.kind = options['kind'] || null - this.resolve = options['resolve'] || function () { return true } - this.construct = options['construct'] || function (data) { return data } - this.instanceOf = options['instanceOf'] || null - this.predicate = options['predicate'] || null - this.represent = options['represent'] || null - this.representName = options['representName'] || null - this.defaultStyle = options['defaultStyle'] || null - this.multi = options['multi'] || false - this.styleAliases = compileStyleAliases(options['styleAliases'] || null) - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.') - } -} - -module.exports = Type - - -/***/ }), - -/***/ 4259: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -const BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r' - -function resolveYamlBinary (data) { - if (data === null) return false - - let bitlen = 0 - const max = data.length - const map = BASE64_MAP - - // Convert one by one. - for (let idx = 0; idx < max; idx++) { - const code = map.indexOf(data.charAt(idx)) - - // Skip CR/LF - if (code > 64) continue - - // Fail on illegal characters - if (code < 0) return false - - bitlen += 6 - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0 -} - -function constructYamlBinary (data) { - const input = data.replace(/[\r\n=]/g, '') // remove CR/LF & padding to simplify scan - const max = input.length - const map = BASE64_MAP - let bits = 0 - const result = [] - - // Collect by 6*4 bits (3 bytes) - - for (let idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)) - } - - // Dump tail - - const tailbits = (max % 4) * 6 - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF) - result.push((bits >> 2) & 0xFF) - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF) - } - - return new Uint8Array(result) -} - -function representYamlBinary (object /*, style */) { - let result = '' - let bits = 0 - const max = object.length - const map = BASE64_MAP - - // Convert every three bytes to 4 ASCII characters. - - for (let idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } - - bits = (bits << 8) + object[idx] - } - - // Dump tail - - const tail = max % 3 - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F] - result += map[(bits >> 4) & 0x3F] - result += map[(bits << 2) & 0x3F] - result += map[64] - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F] - result += map[(bits << 4) & 0x3F] - result += map[64] - result += map[64] - } - - return result -} - -function isBinary (obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]' -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}) - - -/***/ }), - -/***/ 7166: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlBoolean (data) { - if (data === null) return false - - const max = data.length - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')) -} - -function constructYamlBoolean (data) { - return data === 'true' || - data === 'True' || - data === 'TRUE' -} - -function isBoolean (object) { - return Object.prototype.toString.call(object) === '[object Boolean]' -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false' }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE' }, - camelcase: function (object) { return object ? 'True' : 'False' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2102: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -const YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -const YAML_FLOAT_SPECIAL_PATTERN = new RegExp( - '^(?:' + - // .inf - '[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -function resolveYamlFloat (data) { - if (data === null) return false - - if (!YAML_FLOAT_PATTERN.test(data)) { - return false - } - - if (Number.isFinite(parseFloat(data, 10))) { - return true - } - - return YAML_FLOAT_SPECIAL_PATTERN.test(data) -} - -function constructYamlFloat (data) { - let value = data.toLowerCase() - const sign = value[0] === '-' ? -1 : 1 - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1) - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY - } else if (value === '.nan') { - return NaN - } - return sign * parseFloat(value, 10) -} - -const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/ - -function representYamlFloat (object, style) { - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan' - case 'uppercase': return '.NAN' - case 'camelcase': return '.NaN' - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf' - case 'uppercase': return '.INF' - case 'camelcase': return '.Inf' - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf' - case 'uppercase': return '-.INF' - case 'camelcase': return '-.Inf' - } - } else if (common.isNegativeZero(object)) { - return '-0.0' - } - - const res = object.toString(10) - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res -} - -function isFloat (object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2729: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -function isHexCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) || - ((c >= 0x41/* A */) && (c <= 0x46/* F */)) || - ((c >= 0x61/* a */) && (c <= 0x66/* f */)) -} - -function isOctCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x37/* 7 */)) -} - -function isDecCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) -} - -function resolveYamlInteger (data) { - if (data === null) return false - - const max = data.length - let index = 0 - let hasDigits = false - - if (!max) return false - - let ch = data[index] - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index] - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true - ch = data[++index] - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++ - - for (; index < max; index++) { - ch = data[index] - if (ch !== '0' && ch !== '1') return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'x') { - // base 16 - index++ - - for (; index < max; index++) { - if (!isHexCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'o') { - // base 8 - index++ - - for (; index < max; index++) { - if (!isOctCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - } - - // base 10 (except 0) - - for (; index < max; index++) { - if (!isDecCode(data.charCodeAt(index))) { - return false - } - hasDigits = true - } - - if (!hasDigits) return false - - return Number.isFinite(parseYamlInteger(data)) -} - -function parseYamlInteger (data) { - let value = data - let sign = 1 - - let ch = value[0] - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1 - value = value.slice(1) - ch = value[0] - } - - if (value === '0') return 0 - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2) - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16) - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8) - } - - return sign * parseInt(value, 10) -} - -function constructYamlInteger (data) { - return parseYamlInteger(data) -} - -function isInteger (object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1) }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1) }, - decimal: function (obj) { return obj.toString(10) }, - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1) } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [2, 'bin'], - octal: [8, 'oct'], - decimal: [10, 'dec'], - hexadecimal: [16, 'hex'] - } -}) - - -/***/ }), - -/***/ 9362: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {} } -}) - - -/***/ }), - -/***/ 7652: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlMerge (data) { - return data === '<<' || data === null -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}) - - -/***/ }), - -/***/ 3507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlNull (data) { - if (data === null) return true - - const max = data.length - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')) -} - -function constructYamlNull () { - return null -} - -function isNull (object) { - return object === null -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~' }, - lowercase: function () { return 'null' }, - uppercase: function () { return 'NULL' }, - camelcase: function () { return 'Null' }, - empty: function () { return '' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 7023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty -const _toString = Object.prototype.toString - -function resolveYamlOmap (data) { - if (data === null) return true - - const objectKeys = [] - const object = data - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - let pairHasKey = false - - if (_toString.call(pair) !== '[object Object]') return false - - let pairKey - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true - else return false - } - } - - if (!pairHasKey) return false - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey) - else return false - } - - return true -} - -function constructYamlOmap (data) { - return data !== null ? data : [] -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}) - - -/***/ }), - -/***/ 3985: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _toString = Object.prototype.toString - -function resolveYamlPairs (data) { - if (data === null) return true - - const object = data - - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - if (_toString.call(pair) !== '[object Object]') return false - - const keys = Object.keys(pair) - - if (keys.length !== 1) return false - - result[index] = [keys[0], pair[keys[0]]] - } - - return true -} - -function constructYamlPairs (data) { - if (data === null) return [] - - const object = data - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - const keys = Object.keys(pair) - - result[index] = [keys[0], pair[keys[0]]] - } - - return result -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}) - - -/***/ }), - -/***/ 2987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : [] } -}) - - -/***/ }), - -/***/ 3896: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -function resolveYamlSet (data) { - if (data === null) return true - - const object = data - - for (const key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false - } - } - - return true -} - -function constructYamlSet (data) { - return data !== null ? data : {} -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}) - - -/***/ }), - -/***/ 2999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : '' } -}) - - -/***/ }), - -/***/ 7328: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$') // [3] day - -const YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tzHour - '(?::([0-9][0-9]))?))?$') // [11] tzMinute - -function resolveYamlTimestamp (data) { - if (data === null) return false - if (YAML_DATE_REGEXP.exec(data) !== null) return true - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true - return false -} - -function constructYamlTimestamp (data) { - let fraction = 0 - let delta = null - - let match = YAML_DATE_REGEXP.exec(data) - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data) - - if (match === null) throw new Error('Date resolve error') - - // match: [1] year [2] month [3] day - - const year = +(match[1]) - const month = +(match[2]) - 1 // JS month starts with 0 - const day = +(match[3]) - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)) - } - - // match: [4] hour [5] minute [6] second [7] fraction - - const hour = +(match[4]) - const minute = +(match[5]) - const second = +(match[6]) - - if (match[7]) { - fraction = match[7].slice(0, 3) - while (fraction.length < 3) { // milli-seconds - fraction += '0' - } - fraction = +fraction - } - - // match: [8] tz [9] tz_sign [10] tzHour [11] tzMinute - - if (match[9]) { - const tzHour = +(match[10]) - const tzMinute = +(match[11] || 0) - delta = (tzHour * 60 + tzMinute) * 60000 // delta in mili-seconds - if (match[9] === '-') delta = -delta - } - - const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)) - - if (delta) date.setTime(date.getTime() - delta) - - return date -} - -function representYamlTimestamp (object /*, style */) { - return object.toISOString() -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}) - - -/***/ }), - -/***/ 6155: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var _fs -try { - _fs = __nccwpck_require__(8692) -} catch (_) { - _fs = __nccwpck_require__(9896) -} - -function readFile (file, options, callback) { - if (callback == null) { - callback = options - options = {} - } - - if (typeof options === 'string') { - options = {encoding: options} - } - - options = options || {} - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - fs.readFile(file, options, function (err, data) { - if (err) return callback(err) - - data = stripBom(data) - - var obj - try { - obj = JSON.parse(data, options ? options.reviver : null) - } catch (err2) { - if (shouldThrow) { - err2.message = file + ': ' + err2.message - return callback(err2) - } else { - return callback(null, null) - } - } - - callback(null, obj) - }) -} - -function readFileSync (file, options) { - options = options || {} - if (typeof options === 'string') { - options = {encoding: options} - } - - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - try { - var content = fs.readFileSync(file, options) - content = stripBom(content) - return JSON.parse(content, options.reviver) - } catch (err) { - if (shouldThrow) { - err.message = file + ': ' + err.message - throw err - } else { - return null - } - } -} - -function stringify (obj, options) { - var spaces - var EOL = '\n' - if (typeof options === 'object' && options !== null) { - if (options.spaces) { - spaces = options.spaces - } - if (options.EOL) { - EOL = options.EOL - } - } - - var str = JSON.stringify(obj, options ? options.replacer : null, spaces) - - return str.replace(/\n/g, EOL) + EOL -} - -function writeFile (file, obj, options, callback) { - if (callback == null) { - callback = options - options = {} - } - options = options || {} - var fs = options.fs || _fs - - var str = '' - try { - str = stringify(obj, options) - } catch (err) { - // Need to return whether a callback was passed or not - if (callback) callback(err, null) - return - } - - fs.writeFile(file, str, options, callback) -} - -function writeFileSync (file, obj, options) { - options = options || {} - var fs = options.fs || _fs - - var str = stringify(obj, options) - // not sure if fs.writeFileSync returns anything, but just in case - return fs.writeFileSync(file, str, options) -} - -function stripBom (content) { - // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified - if (Buffer.isBuffer(content)) content = content.toString('utf8') - content = content.replace(/^\uFEFF/, '') - return content -} - -var jsonfile = { - readFile: readFile, - readFileSync: readFileSync, - writeFile: writeFile, - writeFileSync: writeFileSync -} - -module.exports = jsonfile - - -/***/ }), - -/***/ 7738: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928); -const fs = __nccwpck_require__(9896); -const {promisify} = __nccwpck_require__(9023); -const pLocate = __nccwpck_require__(4296); - -const fsStat = promisify(fs.stat); -const fsLStat = promisify(fs.lstat); - -const typeMappings = { - directory: 'isDirectory', - file: 'isFile' -}; - -function checkType({type}) { - if (type in typeMappings) { - return; - } - - throw new Error(`Invalid type specified: ${type}`); -} - -const matchType = (type, stat) => type === undefined || stat[typeMappings[type]](); - -module.exports = async (paths, options) => { - options = { - cwd: process.cwd(), - type: 'file', - allowSymlinks: true, - ...options - }; - checkType(options); - const statFn = options.allowSymlinks ? fsStat : fsLStat; - - return pLocate(paths, async path_ => { - try { - const stat = await statFn(path.resolve(options.cwd, path_)); - return matchType(options.type, stat); - } catch (_) { - return false; - } - }, options); -}; - -module.exports.sync = (paths, options) => { - options = { - cwd: process.cwd(), - allowSymlinks: true, - type: 'file', - ...options - }; - checkType(options); - const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; - - for (const path_ of paths) { - try { - const stat = statFn(path.resolve(options.cwd, path_)); - - if (matchType(options.type, stat)) { - return path_; - } - } catch (_) { - } - } -}; - - -/***/ }), - -/***/ 353: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { PassThrough } = __nccwpck_require__(2203); - -module.exports = function (/*streams...*/) { - var sources = [] - var output = new PassThrough({objectMode: true}) - - output.setMaxListeners(0) - - output.add = add - output.isEmpty = isEmpty - - output.on('unpipe', remove) - - Array.prototype.slice.call(arguments).forEach(add) - - return output - - function add (source) { - if (Array.isArray(source)) { - source.forEach(add) - return this - } - - sources.push(source); - source.once('end', remove.bind(null, source)) - source.once('error', output.emit.bind(output, 'error')) - source.pipe(output, {end: false}) - return this - } - - function isEmpty () { - return sources.length == 0; - } - - function remove (source) { - sources = sources.filter(function (it) { return it !== source }) - if (!sources.length && output.readable) { output.end() } - } -} - - -/***/ }), - -/***/ 4031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/* - * merge2 - * https://github.com/teambition/merge2 - * - * Copyright (c) 2014-2020 Teambition - * Licensed under the MIT license. - */ -const Stream = __nccwpck_require__(2203) -const PassThrough = Stream.PassThrough -const slice = Array.prototype.slice - -module.exports = merge2 - -function merge2 () { - const streamsQueue = [] - const args = slice.call(arguments) - let merging = false - let options = args[args.length - 1] - - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop() - } else { - options = {} - } - - const doEnd = options.end !== false - const doPipeError = options.pipeError === true - if (options.objectMode == null) { - options.objectMode = true - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024 - } - const mergedStream = PassThrough(options) - - function addStream () { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)) - } - mergeStream() - return this - } - - function mergeStream () { - if (merging) { - return - } - merging = true - - let streams = streamsQueue.shift() - if (!streams) { - process.nextTick(endStream) - return - } - if (!Array.isArray(streams)) { - streams = [streams] - } - - let pipesCount = streams.length + 1 - - function next () { - if (--pipesCount > 0) { - return - } - merging = false - mergeStream() - } - - function pipe (stream) { - function onend () { - stream.removeListener('merge2UnpipeEnd', onend) - stream.removeListener('end', onend) - if (doPipeError) { - stream.removeListener('error', onerror) - } - next() - } - function onerror (err) { - mergedStream.emit('error', err) - } - // skip ended stream - if (stream._readableState.endEmitted) { - return next() - } - - stream.on('merge2UnpipeEnd', onend) - stream.on('end', onend) - - if (doPipeError) { - stream.on('error', onerror) - } - - stream.pipe(mergedStream, { end: false }) - // compatible for old stream - stream.resume() - } - - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]) - } - - next() - } - - function endStream () { - merging = false - // emit 'queueDrain' when all streams merged. - mergedStream.emit('queueDrain') - if (doEnd) { - mergedStream.end() - } - } - - mergedStream.setMaxListeners(0) - mergedStream.add = addStream - mergedStream.on('unpipe', function (stream) { - stream.emit('merge2UnpipeEnd') - }) - - if (args.length) { - addStream.apply(null, args) - } - return mergedStream -} - -// check and pause streams for pipe. -function pauseStreams (streams, options) { - if (!Array.isArray(streams)) { - // Backwards-compat with old-style streams - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)) - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error('Only readable stream can be merged.') - } - streams.pause() - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options) - } - } - return streams -} - - -/***/ }), - -/***/ 9555: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const braces = __nccwpck_require__(8671); -const picomatch = __nccwpck_require__(3268); -const utils = __nccwpck_require__(3753); - -const isEmptyString = v => v === '' || v === './'; -const hasBraces = v => { - const index = v.indexOf('{'); - return index > -1 && v.indexOf('}', index) > -1; -}; - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} `list` List of strings to match. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `[options]` See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any of the patterns matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.parse(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -// exposed for tests -micromatch.hasBraces = hasBraces; -module.exports = micromatch; - - -/***/ }), - -/***/ 7338: -/***/ ((module) => { - - - -const mimicFn = (to, from) => { - for (const prop of Reflect.ownKeys(from)) { - Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); - } - - return to; -}; - -module.exports = mimicFn; -// TODO: Remove this for the next major release -module.exports["default"] = mimicFn; - - -/***/ }), - -/***/ 4876: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const path = __nccwpck_require__(6928); -const pathKey = __nccwpck_require__(4662); - -const npmRunPath = options => { - options = { - cwd: process.cwd(), - path: process.env[pathKey()], - execPath: process.execPath, - ...options - }; - - let previous; - let cwdPath = path.resolve(options.cwd); - const result = []; - - while (previous !== cwdPath) { - result.push(path.join(cwdPath, 'node_modules/.bin')); - previous = cwdPath; - cwdPath = path.resolve(cwdPath, '..'); - } - - // Ensure the running `node` binary is used - const execPathDir = path.resolve(options.cwd, options.execPath, '..'); - result.push(execPathDir); - - return result.concat(options.path).join(path.delimiter); -}; - -module.exports = npmRunPath; -// TODO: Remove this for the next major release -module.exports["default"] = npmRunPath; - -module.exports.env = options => { - options = { - env: process.env, - ...options - }; - - const env = {...options.env}; - const path = pathKey({env}); - - options.path = env[path]; - env[path] = module.exports(options); - - return env; -}; - - -/***/ }), - -/***/ 7471: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const mimicFn = __nccwpck_require__(7338); - -const calledFunctions = new WeakMap(); - -const onetime = (function_, options = {}) => { - if (typeof function_ !== 'function') { - throw new TypeError('Expected a function'); - } - - let returnValue; - let callCount = 0; - const functionName = function_.displayName || function_.name || ''; - - const onetime = function (...arguments_) { - calledFunctions.set(onetime, ++callCount); - - if (callCount === 1) { - returnValue = function_.apply(this, arguments_); - function_ = null; - } else if (options.throw === true) { - throw new Error(`Function \`${functionName}\` can only be called once`); - } - - return returnValue; - }; - - mimicFn(onetime, function_); - calledFunctions.set(onetime, callCount); - - return onetime; -}; - -module.exports = onetime; -// TODO: Remove this for the next major release -module.exports["default"] = onetime; - -module.exports.callCount = function_ => { - if (!calledFunctions.has(function_)) { - throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`); - } - - return calledFunctions.get(function_); -}; - - -/***/ }), - -/***/ 6374: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const pMap = __nccwpck_require__(4158); - -const pFilter = async (iterable, filterer, options) => { - const values = await pMap( - iterable, - (element, index) => Promise.all([filterer(element, index), element]), - options - ); - return values.filter(value => Boolean(value[0])).map(value => value[1]); -}; - -module.exports = pFilter; -// TODO: Remove this for the next major release -module.exports["default"] = pFilter; - - -/***/ }), - -/***/ 6854: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const pTry = __nccwpck_require__(7607); - -const pLimit = concurrency => { - if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { - return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up')); - } - - const queue = []; - let activeCount = 0; - - const next = () => { - activeCount--; - - if (queue.length > 0) { - queue.shift()(); - } - }; - - const run = (fn, resolve, ...args) => { - activeCount++; - - const result = pTry(fn, ...args); - - resolve(result); - - result.then(next, next); - }; - - const enqueue = (fn, resolve, ...args) => { - if (activeCount < concurrency) { - run(fn, resolve, ...args); - } else { - queue.push(run.bind(null, fn, resolve, ...args)); - } - }; - - const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args)); - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.length - }, - clearQueue: { - value: () => { - queue.length = 0; - } - } - }); - - return generator; -}; - -module.exports = pLimit; -module.exports["default"] = pLimit; - - -/***/ }), - -/***/ 4296: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const pLimit = __nccwpck_require__(6854); - -class EndError extends Error { - constructor(value) { - super(); - this.value = value; - } -} - -// The input can also be a promise, so we await it -const testElement = async (element, tester) => tester(await element); - -// The input can also be a promise, so we `Promise.all()` them both -const finder = async element => { - const values = await Promise.all(element); - if (values[1] === true) { - throw new EndError(values[0]); - } - - return false; -}; - -const pLocate = async (iterable, tester, options) => { - options = { - concurrency: Infinity, - preserveOrder: true, - ...options - }; - - const limit = pLimit(options.concurrency); - - // Start all the promises concurrently with optional limit - const items = [...iterable].map(element => [element, limit(testElement, element, tester)]); - - // Check the promises either serially or concurrently - const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); - - try { - await Promise.all(items.map(element => checkLimit(finder, element))); - } catch (error) { - if (error instanceof EndError) { - return error.value; - } - - throw error; - } -}; - -module.exports = pLocate; -// TODO: Remove this for the next major release -module.exports["default"] = pLocate; - - -/***/ }), - -/***/ 4158: -/***/ ((module) => { - - - -const pMap = (iterable, mapper, options) => new Promise((resolve, reject) => { - options = Object.assign({ - concurrency: Infinity - }, options); - - if (typeof mapper !== 'function') { - throw new TypeError('Mapper function is required'); - } - - const {concurrency} = options; - - if (!(typeof concurrency === 'number' && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`); - } - - const ret = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - - const next = () => { - if (isRejected) { - return; - } - - const nextItem = iterator.next(); - const i = currentIndex; - currentIndex++; - - if (nextItem.done) { - isIterableDone = true; - - if (resolvingCount === 0) { - resolve(ret); - } - - return; - } - - resolvingCount++; - - Promise.resolve(nextItem.value) - .then(element => mapper(element, i)) - .then( - value => { - ret[i] = value; - resolvingCount--; - next(); - }, - error => { - isRejected = true; - reject(error); - } - ); - }; - - for (let i = 0; i < concurrency; i++) { - next(); - - if (isIterableDone) { - break; - } - } -}); - -module.exports = pMap; -// TODO: Remove this for the next major release -module.exports["default"] = pMap; - - -/***/ }), - -/***/ 7607: -/***/ ((module) => { - - - -const pTry = (fn, ...arguments_) => new Promise(resolve => { - resolve(fn(...arguments_)); -}); - -module.exports = pTry; -// TODO: remove this in the next major version -module.exports["default"] = pTry; - - -/***/ }), - -/***/ 4219: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const fs = __nccwpck_require__(9896); -const {promisify} = __nccwpck_require__(9023); - -const pAccess = promisify(fs.access); - -module.exports = async path => { - try { - await pAccess(path); - return true; - } catch (_) { - return false; - } -}; - -module.exports.sync = path => { - try { - fs.accessSync(path); - return true; - } catch (_) { - return false; - } -}; - - -/***/ }), - -/***/ 4662: -/***/ ((module) => { - - - -const pathKey = (options = {}) => { - const environment = options.env || process.env; - const platform = options.platform || process.platform; - - if (platform !== 'win32') { - return 'PATH'; - } - - return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path'; -}; - -module.exports = pathKey; -// TODO: Remove this for the next major release -module.exports["default"] = pathKey; - - -/***/ }), - -/***/ 3051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -const {promisify} = __nccwpck_require__(9023); -const fs = __nccwpck_require__(9896); - -async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== 'string') { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - - try { - const stats = await promisify(fs[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error) { - if (error.code === 'ENOENT') { - return false; - } - - throw error; - } -} - -function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== 'string') { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - - try { - return fs[fsStatType](filePath)[statsMethodName](); - } catch (error) { - if (error.code === 'ENOENT') { - return false; - } - - throw error; - } -} - -exports.isFile = isType.bind(null, 'stat', 'isFile'); -exports.isDirectory = isType.bind(null, 'stat', 'isDirectory'); -exports.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink'); -exports.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile'); -exports.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory'); -exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); - - -/***/ }), - -/***/ 6831: -/***/ ((module) => { - -let p = process || {}, argv = p.argv || [], env = p.env || {} -let isColorSupported = - !(!!env.NO_COLOR || argv.includes("--no-color")) && - (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || ((p.stdout || {}).isTTY && env.TERM !== "dumb") || !!env.CI) - -let formatter = (open, close, replace = open) => - input => { - let string = "" + input, index = string.indexOf(close, open.length) - return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close - } - -let replaceClose = (string, close, replace, index) => { - let result = "", cursor = 0 - do { - result += string.substring(cursor, index) + replace - cursor = index + close.length - index = string.indexOf(close, cursor) - } while (~index) - return result + string.substring(cursor) -} - -let createColors = (enabled = isColorSupported) => { - let f = enabled ? formatter : () => String - return { - isColorSupported: enabled, - reset: f("\x1b[0m", "\x1b[0m"), - bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"), - dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"), - italic: f("\x1b[3m", "\x1b[23m"), - underline: f("\x1b[4m", "\x1b[24m"), - inverse: f("\x1b[7m", "\x1b[27m"), - hidden: f("\x1b[8m", "\x1b[28m"), - strikethrough: f("\x1b[9m", "\x1b[29m"), - - black: f("\x1b[30m", "\x1b[39m"), - red: f("\x1b[31m", "\x1b[39m"), - green: f("\x1b[32m", "\x1b[39m"), - yellow: f("\x1b[33m", "\x1b[39m"), - blue: f("\x1b[34m", "\x1b[39m"), - magenta: f("\x1b[35m", "\x1b[39m"), - cyan: f("\x1b[36m", "\x1b[39m"), - white: f("\x1b[37m", "\x1b[39m"), - gray: f("\x1b[90m", "\x1b[39m"), - - bgBlack: f("\x1b[40m", "\x1b[49m"), - bgRed: f("\x1b[41m", "\x1b[49m"), - bgGreen: f("\x1b[42m", "\x1b[49m"), - bgYellow: f("\x1b[43m", "\x1b[49m"), - bgBlue: f("\x1b[44m", "\x1b[49m"), - bgMagenta: f("\x1b[45m", "\x1b[49m"), - bgCyan: f("\x1b[46m", "\x1b[49m"), - bgWhite: f("\x1b[47m", "\x1b[49m"), - - blackBright: f("\x1b[90m", "\x1b[39m"), - redBright: f("\x1b[91m", "\x1b[39m"), - greenBright: f("\x1b[92m", "\x1b[39m"), - yellowBright: f("\x1b[93m", "\x1b[39m"), - blueBright: f("\x1b[94m", "\x1b[39m"), - magentaBright: f("\x1b[95m", "\x1b[39m"), - cyanBright: f("\x1b[96m", "\x1b[39m"), - whiteBright: f("\x1b[97m", "\x1b[39m"), - - bgBlackBright: f("\x1b[100m", "\x1b[49m"), - bgRedBright: f("\x1b[101m", "\x1b[49m"), - bgGreenBright: f("\x1b[102m", "\x1b[49m"), - bgYellowBright: f("\x1b[103m", "\x1b[49m"), - bgBlueBright: f("\x1b[104m", "\x1b[49m"), - bgMagentaBright: f("\x1b[105m", "\x1b[49m"), - bgCyanBright: f("\x1b[106m", "\x1b[49m"), - bgWhiteBright: f("\x1b[107m", "\x1b[49m"), - } -} - -module.exports = createColors() -module.exports.createColors = createColors - - -/***/ }), - -/***/ 3268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = __nccwpck_require__(1614); - - -/***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -const DEFAULT_MAX_EXTGLOB_RECURSION = 0; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - __proto__: null, - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - DEFAULT_MAX_EXTGLOB_RECURSION, - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - __proto__: null, - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - - -/***/ }), - -/***/ 51: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const constants = __nccwpck_require__(1237); -const utils = __nccwpck_require__(3753); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -const splitTopLevel = input => { - const parts = []; - let bracket = 0; - let paren = 0; - let quote = 0; - let value = ''; - let escaped = false; - - for (const ch of input) { - if (escaped === true) { - value += ch; - escaped = false; - continue; - } - - if (ch === '\\') { - value += ch; - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - value += ch; - continue; - } - - if (quote === 0) { - if (ch === '[') { - bracket++; - } else if (ch === ']' && bracket > 0) { - bracket--; - } else if (bracket === 0) { - if (ch === '(') { - paren++; - } else if (ch === ')' && paren > 0) { - paren--; - } else if (ch === '|' && paren === 0) { - parts.push(value); - value = ''; - continue; - } - } - } - - value += ch; - } - - parts.push(value); - return parts; -}; - -const isPlainBranch = branch => { - let escaped = false; - - for (const ch of branch) { - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (/[?*+@!()[\]{}]/.test(ch)) { - return false; - } - } - - return true; -}; - -const normalizeSimpleBranch = branch => { - let value = branch.trim(); - let changed = true; - - while (changed === true) { - changed = false; - - if (/^@\([^\\()[\]{}|]+\)$/.test(value)) { - value = value.slice(2, -1); - changed = true; - } - } - - if (!isPlainBranch(value)) { - return; - } - - return value.replace(/\\(.)/g, '$1'); -}; - -const hasRepeatedCharPrefixOverlap = branches => { - const values = branches.map(normalizeSimpleBranch).filter(Boolean); - - for (let i = 0; i < values.length; i++) { - for (let j = i + 1; j < values.length; j++) { - const a = values[i]; - const b = values[j]; - const char = a[0]; - - if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) { - continue; - } - - if (a === b || a.startsWith(b) || b.startsWith(a)) { - return true; - } - } - } - - return false; -}; - -const parseRepeatedExtglob = (pattern, requireEnd = true) => { - if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') { - return; - } - - let bracket = 0; - let paren = 0; - let quote = 0; - let escaped = false; - - for (let i = 1; i < pattern.length; i++) { - const ch = pattern[i]; - - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - continue; - } - - if (quote === 1) { - continue; - } - - if (ch === '[') { - bracket++; - continue; - } - - if (ch === ']' && bracket > 0) { - bracket--; - continue; - } - - if (bracket > 0) { - continue; - } - - if (ch === '(') { - paren++; - continue; - } - - if (ch === ')') { - paren--; - - if (paren === 0) { - if (requireEnd === true && i !== pattern.length - 1) { - return; - } - - return { - type: pattern[0], - body: pattern.slice(2, i), - end: i - }; - } - } - } -}; - -const getStarExtglobSequenceOutput = pattern => { - let index = 0; - const chars = []; - - while (index < pattern.length) { - const match = parseRepeatedExtglob(pattern.slice(index), false); - - if (!match || match.type !== '*') { - return; - } - - const branches = splitTopLevel(match.body).map(branch => branch.trim()); - if (branches.length !== 1) { - return; - } - - const branch = normalizeSimpleBranch(branches[0]); - if (!branch || branch.length !== 1) { - return; - } - - chars.push(branch); - index += match.end + 1; - } - - if (chars.length < 1) { - return; - } - - const source = chars.length === 1 - ? utils.escapeRegex(chars[0]) - : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`; - - return `${source}*`; -}; - -const repeatedExtglobRecursion = pattern => { - let depth = 0; - let value = pattern.trim(); - let match = parseRepeatedExtglob(value); - - while (match) { - depth++; - value = match.body.trim(); - match = parseRepeatedExtglob(value); - } - - return depth; -}; - -const analyzeRepeatedExtglob = (body, options) => { - if (options.maxExtglobRecursion === false) { - return { risky: false }; - } - - const max = - typeof options.maxExtglobRecursion === 'number' - ? options.maxExtglobRecursion - : constants.DEFAULT_MAX_EXTGLOB_RECURSION; - - const branches = splitTopLevel(body).map(branch => branch.trim()); - - if (branches.length > 1) { - if ( - branches.some(branch => branch === '') || - branches.some(branch => /^[*?]+$/.test(branch)) || - hasRepeatedCharPrefixOverlap(branches) - ) { - return { risky: true }; - } - } - - for (const branch of branches) { - const safeOutput = getStarExtglobSequenceOutput(branch); - if (safeOutput) { - return { risky: true, safeOutput }; - } - - if (repeatedExtglobRecursion(branch) > max) { - return { risky: true }; - } - } - - return { risky: false }; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - token.startIndex = state.index; - token.tokensIndex = tokens.length; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - const literal = input.slice(token.startIndex, state.index + 1); - const body = input.slice(token.startIndex + 2, state.index); - const analysis = analyzeRepeatedExtglob(body, opts); - - if ((token.type === 'plus' || token.type === 'star') && analysis.risky) { - const safeOutput = analysis.safeOutput - ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) - : undefined; - const open = tokens[token.tokensIndex]; - - open.type = 'text'; - open.value = literal; - open.output = safeOutput || utils.escapeRegex(literal); - - for (let i = token.tokensIndex + 1; i < tokens.length; i++) { - tokens[i].value = ''; - tokens[i].output = ''; - delete tokens[i].suffix; - } - - state.output = token.output + open.output; - state.backtrack = true; - - push({ type: 'paren', extglob: true, value, output: '' }); - decrement('parens'); - return; - } - - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 1614: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const scan = __nccwpck_require__(3999); -const parse = __nccwpck_require__(51); -const utils = __nccwpck_require__(3753); -const constants = __nccwpck_require__(1237); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; - - -/***/ }), - -/***/ 3999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(3753); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __nccwpck_require__(1237); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; - - -/***/ }), - -/***/ 3753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = __nccwpck_require__(1237); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; - - -/***/ }), - -/***/ 9420: -/***/ ((module) => { - - - -const processFn = (fn, options) => function (...args) { - const P = options.promiseModule; - - return new P((resolve, reject) => { - if (options.multiArgs) { - args.push((...result) => { - if (options.errorFirst) { - if (result[0]) { - reject(result); - } else { - result.shift(); - resolve(result); - } - } else { - resolve(result); - } - }); - } else if (options.errorFirst) { - args.push((error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - } else { - args.push(resolve); - } - - fn.apply(this, args); - }); -}; - -module.exports = (input, options) => { - options = Object.assign({ - exclude: [/.+(Sync|Stream)$/], - errorFirst: true, - promiseModule: Promise - }, options); - - const objType = typeof input; - if (!(input !== null && (objType === 'object' || objType === 'function'))) { - throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? 'null' : objType}\``); - } - - const filter = key => { - const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); - return options.include ? options.include.some(match) : !options.exclude.some(match); - }; - - let ret; - if (objType === 'function') { - ret = function (...args) { - return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); - }; - } else { - ret = Object.create(Object.getPrototypeOf(input)); - } - - for (const key in input) { // eslint-disable-line guard-for-in - const property = input[key]; - ret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property; - } - - return ret; -}; - - -/***/ }), - -/***/ 1989: -/***/ ((module) => { - -/*! queue-microtask. MIT License. Feross Aboukhadijeh */ -let promise - -module.exports = typeof queueMicrotask === 'function' - ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) - // reuse resolved promise, and allocate it lazily - : cb => (promise || (promise = Promise.resolve())) - .then(cb) - .catch(err => setTimeout(() => { throw err }, 0)) - - -/***/ }), - -/***/ 6143: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fs = __nccwpck_require__(8692) -const pify = __nccwpck_require__(9420) -const stripBom = __nccwpck_require__(4938) -const yaml = __nccwpck_require__(2301) - -const parse = data => yaml.safeLoad(stripBom(data)) - -const readYamlFile = fp => pify(fs.readFile)(fp, 'utf8').then(data => parse(data)) - -module.exports = readYamlFile -module.exports["default"] = readYamlFile -module.exports.sync = fp => parse(fs.readFileSync(fp, 'utf8')) - - -/***/ }), - -/***/ 3728: -/***/ ((module) => { - - - -function reusify (Constructor) { - var head = new Constructor() - var tail = head - - function get () { - var current = head - - if (current.next) { - head = current.next - } else { - head = new Constructor() - tail = head - } - - current.next = null - - return current - } - - function release (obj) { - tail.next = obj - tail = obj - } - - return { - get: get, - release: release - } -} - -module.exports = reusify - - -/***/ }), - -/***/ 7906: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! run-parallel. MIT License. Feross Aboukhadijeh */ -module.exports = runParallel - -const queueMicrotask = __nccwpck_require__(1989) - -function runParallel (tasks, cb) { - let results, pending, keys - let isSync = true - - if (Array.isArray(tasks)) { - results = [] - pending = tasks.length - } else { - keys = Object.keys(tasks) - results = {} - pending = keys.length - } - - function done (err) { - function end () { - if (cb) cb(err, results) - cb = null - } - if (isSync) queueMicrotask(end) - else end() - } - - function each (i, err, result) { - results[i] = result - if (--pending === 0 || err) { - done(err) - } - } - - if (!pending) { - // empty - done(null) - } else if (keys) { - // object - keys.forEach(function (key) { - tasks[key](function (err, result) { each(key, err, result) }) - }) - } else { - // array - tasks.forEach(function (task, i) { - task(function (err, result) { each(i, err, result) }) - }) - } - - isSync = false -} - - -/***/ }), - -/***/ 6884: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } - - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false - } -} - -module.exports = Comparator - -const parseOptions = __nccwpck_require__(3607) -const { safeRe: re, t } = __nccwpck_require__(1650) -const cmp = __nccwpck_require__(3267) -const debug = __nccwpck_require__(4436) -const SemVer = __nccwpck_require__(3384) -const Range = __nccwpck_require__(8251) - - -/***/ }), - -/***/ 8251: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SPACE_CHARACTERS = /\s+/g - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.formatted = undefined - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') - - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.formatted = undefined - } - - get range () { - if (this.formatted === undefined) { - this.formatted = '' - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += '||' - } - const comps = this.set[i] - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' ' - } - this.formatted += comps[k].toString().trim() - } - } - } - return this.formatted - } - - format () { - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // strip build metadata so it can't bleed into the version - range = range.replace(BUILDSTRIPRE, '') - - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} - -module.exports = Range - -const LRU = __nccwpck_require__(1097) -const cache = new LRU() - -const parseOptions = __nccwpck_require__(3607) -const Comparator = __nccwpck_require__(6884) -const debug = __nccwpck_require__(4436) -const SemVer = __nccwpck_require__(3384) -const { - safeRe: re, - src, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(1650) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(654) - -// unbounded global build-metadata stripper used by parseRange -const BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g') - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - comp = comp.replace(re[t.BUILD], '') - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -const invalidXRangeOrder = (M, m, p) => ( - (isX(M) && !isX(m)) || - (isX(m) && p && !isX(p)) -) - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - // if we're including prereleases in the match, then the lower bound is - // -0, the lowest possible prerelease value, just like x-ranges and carets. - // this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as. - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - if (invalidXRangeOrder(M, m, p)) { - return comp - } - - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -// TODO build? -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return `${from} ${to}`.trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - - -/***/ }), - -/***/ 3384: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const debug = __nccwpck_require__(4436) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(654) -const { safeRe: re, t } = __nccwpck_require__(1650) - -const parseOptions = __nccwpck_require__(3607) -const { compareIdentifiers } = __nccwpck_require__(1823) - -const isPrereleaseIdentifier = (prerelease, identifier) => { - const identifiers = identifier.split('.') - if (identifiers.length > prerelease.length) { - return false - } - - for (let i = 0; i < identifiers.length; i++) { - if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { - return false - } - } - - return true -} - -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - if (this.major < other.major) { - return -1 - } - if (this.major > other.major) { - return 1 - } - if (this.minor < other.minor) { - return -1 - } - if (this.minor > other.minor) { - return 1 - } - if (this.patch < other.patch) { - return -1 - } - if (this.patch > other.patch) { - return 1 - } - return 0 - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('build compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - if (release.startsWith('pre')) { - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - // Avoid an invalid semver results - if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]) - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`) - } - } - } - - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break - case 'release': - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`) - } - this.prerelease.length = 0 - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 - - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (isPrereleaseIdentifier(this.prerelease, identifier)) { - const prereleaseBase = this.prerelease[identifier.split('.').length] - if (isNaN(prereleaseBase)) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break - } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` - } - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ 7402: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const parse = __nccwpck_require__(9380) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ 3267: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const eq = __nccwpck_require__(9805) -const neq = __nccwpck_require__(5435) -const gt = __nccwpck_require__(768) -const gte = __nccwpck_require__(5885) -const lt = __nccwpck_require__(3495) -const lte = __nccwpck_require__(404) - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp - - -/***/ }), - -/***/ 8726: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const parse = __nccwpck_require__(9380) -const { safeRe: re, t } = __nccwpck_require__(1650) - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 - } - - if (match === null) { - return null - } - - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) -} -module.exports = coerce - - -/***/ }), - -/***/ 5809: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild - - -/***/ }), - -/***/ 7423: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ 9508: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ 2148: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const parse = __nccwpck_require__(9380) - -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) - - if (comparison === 0) { - return null - } - - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } - - // If the main part has no difference - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return 'minor' - } - return 'patch' - } - } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' - } - - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - - // high and low are prereleases - return 'prerelease' -} - -module.exports = diff - - -/***/ }), - -/***/ 9805: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ 768: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ 5885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ 5651: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) - -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } -} -module.exports = inc - - -/***/ }), - -/***/ 3495: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ 404: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ 2678: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ 6786: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ 5435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ 9380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er - } -} - -module.exports = parse - - -/***/ }), - -/***/ 9201: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ 2013: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const parse = __nccwpck_require__(9380) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ 1678: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compare = __nccwpck_require__(9508) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ 3681: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compareBuild = __nccwpck_require__(5809) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ 7226: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Range = __nccwpck_require__(8251) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ 2504: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const compareBuild = __nccwpck_require__(5809) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ 7437: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const parse = __nccwpck_require__(9380) -const constants = __nccwpck_require__(654) -const SemVer = __nccwpck_require__(3384) - -const truncate = (version, truncation, options) => { - if (!constants.RELEASE_TYPES.includes(truncation)) { - return null - } - - const clonedVersion = cloneInputVersion(version, options) - return clonedVersion && doTruncation(clonedVersion, truncation) -} - -const cloneInputVersion = (version, options) => { - const versionStringToParse = ( - version instanceof SemVer ? version.version : version - ) - - return parse(versionStringToParse, options) -} - -const doTruncation = (version, truncation) => { - if (isPrerelease(truncation)) { - return version.version - } - - version.prerelease = [] - - switch (truncation) { - case 'major': - version.minor = 0 - version.patch = 0 - break - case 'minor': - version.patch = 0 - break - } - - return version.format() -} - -const isPrerelease = (type) => { - return type.startsWith('pre') -} - -module.exports = truncate - - -/***/ }), - -/***/ 2333: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const parse = __nccwpck_require__(9380) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ 9361: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(1650) -const constants = __nccwpck_require__(654) -const SemVer = __nccwpck_require__(3384) -const identifiers = __nccwpck_require__(1823) -const parse = __nccwpck_require__(9380) -const valid = __nccwpck_require__(2333) -const clean = __nccwpck_require__(7402) -const inc = __nccwpck_require__(5651) -const diff = __nccwpck_require__(2148) -const major = __nccwpck_require__(2678) -const minor = __nccwpck_require__(6786) -const patch = __nccwpck_require__(9201) -const prerelease = __nccwpck_require__(2013) -const compare = __nccwpck_require__(9508) -const rcompare = __nccwpck_require__(1678) -const compareLoose = __nccwpck_require__(7423) -const compareBuild = __nccwpck_require__(5809) -const sort = __nccwpck_require__(2504) -const rsort = __nccwpck_require__(3681) -const gt = __nccwpck_require__(768) -const lt = __nccwpck_require__(3495) -const eq = __nccwpck_require__(9805) -const neq = __nccwpck_require__(5435) -const gte = __nccwpck_require__(5885) -const lte = __nccwpck_require__(404) -const cmp = __nccwpck_require__(3267) -const coerce = __nccwpck_require__(8726) -const truncate = __nccwpck_require__(7437) -const Comparator = __nccwpck_require__(6884) -const Range = __nccwpck_require__(8251) -const satisfies = __nccwpck_require__(7226) -const toComparators = __nccwpck_require__(3515) -const maxSatisfying = __nccwpck_require__(2960) -const minSatisfying = __nccwpck_require__(9354) -const minVersion = __nccwpck_require__(97) -const validRange = __nccwpck_require__(6470) -const outside = __nccwpck_require__(9143) -const gtr = __nccwpck_require__(6271) -const ltr = __nccwpck_require__(5626) -const intersects = __nccwpck_require__(5272) -const simplifyRange = __nccwpck_require__(3417) -const subset = __nccwpck_require__(3447) -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - truncate, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} - - -/***/ }), - -/***/ 654: -/***/ ((module) => { - - - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] - -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} - - -/***/ }), - -/***/ 4436: -/***/ ((module) => { - - - -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug - - -/***/ }), - -/***/ 1823: -/***/ ((module) => { - - - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - if (typeof a === 'number' && typeof b === 'number') { - return a === b ? 0 : a < b ? -1 : 1 - } - - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} - - -/***/ }), - -/***/ 1097: -/***/ ((module) => { - - - -class LRUCache { - constructor () { - this.max = 1000 - this.map = new Map() - } - - get (key) { - const value = this.map.get(key) - if (value === undefined) { - return undefined - } else { - // Remove the key from the map and add it to the end - this.map.delete(key) - this.map.set(key, value) - return value - } - } - - delete (key) { - return this.map.delete(key) - } - - set (key, value) { - const deleted = this.delete(key) - - if (!deleted && value !== undefined) { - // If cache is full, delete the least recently used item - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value - this.delete(firstKey) - } - - this.map.set(key, value) - } - - return this - } -} - -module.exports = LRUCache - - -/***/ }), - -/***/ 3607: -/***/ ((module) => { - - - -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } - - if (typeof options !== 'object') { - return looseOption - } - - return options -} -module.exports = parseOptions - - -/***/ }), - -/***/ 1650: -/***/ ((module, exports, __nccwpck_require__) => { - - - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(654) -const debug = __nccwpck_require__(4436) -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const safeSrc = exports.safeSrc = [] -const t = exports.t = {} -let R = 0 - -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) - } - return value -} - -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - safeSrc[index] = safe - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. -// Non-numeric identifiers include numeric identifiers but can be longer. -// Therefore non-numeric identifiers must go first. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER] -}|${src[t.NUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER] -}|${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifier, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) -createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) -createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) -createToken('COERCERTLFULL', src[t.COERCEFULL], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') - - -/***/ }), - -/***/ 6271: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(9143) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ 5272: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Range = __nccwpck_require__(8251) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects - - -/***/ }), - -/***/ 5626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const outside = __nccwpck_require__(9143) -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr - - -/***/ }), - -/***/ 2960: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const Range = __nccwpck_require__(8251) - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying - - -/***/ }), - -/***/ 9354: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const Range = __nccwpck_require__(8251) -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying - - -/***/ }), - -/***/ 97: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const Range = __nccwpck_require__(8251) -const gt = __nccwpck_require__(768) - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), - -/***/ 9143: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const SemVer = __nccwpck_require__(3384) -const Comparator = __nccwpck_require__(6884) -const { ANY } = Comparator -const Range = __nccwpck_require__(8251) -const satisfies = __nccwpck_require__(7226) -const gt = __nccwpck_require__(768) -const lt = __nccwpck_require__(3495) -const lte = __nccwpck_require__(404) -const gte = __nccwpck_require__(5885) - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ 3417: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __nccwpck_require__(7226) -const compare = __nccwpck_require__(9508) -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ 3447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Range = __nccwpck_require__(8251) -const Comparator = __nccwpck_require__(6884) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(7226) -const compare = __nccwpck_require__(9508) - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If LT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !c.test(gt.semver)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !c.test(lt.semver)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ 3515: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Range = __nccwpck_require__(8251) - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators - - -/***/ }), - -/***/ 6470: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Range = __nccwpck_require__(8251) -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange - - -/***/ }), - -/***/ 4881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const shebangRegex = __nccwpck_require__(1940); - -module.exports = (string = '') => { - const match = string.match(shebangRegex); - - if (!match) { - return null; - } - - const [path, argument] = match[0].replace(/#! ?/, '').split(' '); - const binary = path.split('/').pop(); - - if (binary === 'env') { - return argument; - } - - return argument ? `${binary} ${argument}` : binary; -}; - - -/***/ }), - -/***/ 1940: -/***/ ((module) => { - - -module.exports = /^#!(.*)/; - - -/***/ }), - -/***/ 6821: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -// grab a reference to node's real process object right away -var process = global.process - -const processOk = function (process) { - return process && - typeof process === 'object' && - typeof process.removeListener === 'function' && - typeof process.emit === 'function' && - typeof process.reallyExit === 'function' && - typeof process.listeners === 'function' && - typeof process.kill === 'function' && - typeof process.pid === 'number' && - typeof process.on === 'function' -} - -// some kind of non-node environment, just no-op -/* istanbul ignore if */ -if (!processOk(process)) { - module.exports = function () { - return function () {} - } -} else { - var assert = __nccwpck_require__(2613) - var signals = __nccwpck_require__(9932) - var isWin = /^win/i.test(process.platform) - - var EE = __nccwpck_require__(4434) - /* istanbul ignore if */ - if (typeof EE !== 'function') { - EE = EE.EventEmitter - } - - var emitter - if (process.__signal_exit_emitter__) { - emitter = process.__signal_exit_emitter__ - } else { - emitter = process.__signal_exit_emitter__ = new EE() - emitter.count = 0 - emitter.emitted = {} - } - - // Because this emitter is a global, we have to check to see if a - // previous version of this library failed to enable infinite listeners. - // I know what you're about to say. But literally everything about - // signal-exit is a compromise with evil. Get used to it. - if (!emitter.infinite) { - emitter.setMaxListeners(Infinity) - emitter.infinite = true - } - - module.exports = function (cb, opts) { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return function () {} - } - assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') - - if (loaded === false) { - load() - } - - var ev = 'exit' - if (opts && opts.alwaysLast) { - ev = 'afterexit' - } - - var remove = function () { - emitter.removeListener(ev, cb) - if (emitter.listeners('exit').length === 0 && - emitter.listeners('afterexit').length === 0) { - unload() - } - } - emitter.on(ev, cb) - - return remove - } - - var unload = function unload () { - if (!loaded || !processOk(global.process)) { - return - } - loaded = false - - signals.forEach(function (sig) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch (er) {} - }) - process.emit = originalProcessEmit - process.reallyExit = originalProcessReallyExit - emitter.count -= 1 - } - module.exports.unload = unload - - var emit = function emit (event, code, signal) { - /* istanbul ignore if */ - if (emitter.emitted[event]) { - return - } - emitter.emitted[event] = true - emitter.emit(event, code, signal) - } - - // { : , ... } - var sigListeners = {} - signals.forEach(function (sig) { - sigListeners[sig] = function listener () { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return - } - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - var listeners = process.listeners(sig) - if (listeners.length === emitter.count) { - unload() - emit('exit', null, sig) - /* istanbul ignore next */ - emit('afterexit', null, sig) - /* istanbul ignore next */ - if (isWin && sig === 'SIGHUP') { - // "SIGHUP" throws an `ENOSYS` error on Windows, - // so use a supported signal instead - sig = 'SIGINT' - } - /* istanbul ignore next */ - process.kill(process.pid, sig) - } - } - }) - - module.exports.signals = function () { - return signals - } - - var loaded = false - - var load = function load () { - if (loaded || !processOk(global.process)) { - return - } - loaded = true - - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - emitter.count += 1 - - signals = signals.filter(function (sig) { - try { - process.on(sig, sigListeners[sig]) - return true - } catch (er) { - return false - } - }) - - process.emit = processEmit - process.reallyExit = processReallyExit - } - module.exports.load = load - - var originalProcessReallyExit = process.reallyExit - var processReallyExit = function processReallyExit (code) { - /* istanbul ignore if */ - if (!processOk(global.process)) { - return - } - process.exitCode = code || /* istanbul ignore next */ 0 - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - originalProcessReallyExit.call(process, process.exitCode) - } - - var originalProcessEmit = process.emit - var processEmit = function processEmit (ev, arg) { - if (ev === 'exit' && processOk(global.process)) { - /* istanbul ignore else */ - if (arg !== undefined) { - process.exitCode = arg - } - var ret = originalProcessEmit.apply(this, arguments) - /* istanbul ignore next */ - emit('exit', process.exitCode, null) - /* istanbul ignore next */ - emit('afterexit', process.exitCode, null) - /* istanbul ignore next */ - return ret - } else { - return originalProcessEmit.apply(this, arguments) - } - } -} - - -/***/ }), - -/***/ 9932: -/***/ ((module) => { - -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM' -] - -if (process.platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (process.platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} - - -/***/ }), - -/***/ 5882: -/***/ ((module) => { - - -module.exports = path => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return path; - } - - return path.replace(/\\/g, '/'); -}; - - -/***/ }), - -/***/ 2841: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @flow - -const crossSpawn = __nccwpck_require__(670); -const { onExit } = __nccwpck_require__(5767) -const EventEmitter = __nccwpck_require__(4434); -const ChildProcessPromise = __nccwpck_require__(304); - -const activeProcesses = new Set(); - -onExit(() => { - for (let child of activeProcesses) { - child.kill('SIGTERM'); - } -}); - -function spawn( - cmd /*: string */, - args /*:: ?: Array */, - opts /*:: ?: child_process$spawnOpts */ -) /*: ChildProcessPromise */ { - return new ChildProcessPromise((resolve, reject, events) => { - let child = crossSpawn(cmd, args, opts); - let stdout = Buffer.from(''); - let stderr = Buffer.from(''); - - activeProcesses.add(child); - - if (child.stdout) { - child.stdout.on('data', data => { - stdout = Buffer.concat([stdout, data]); - events.emit('stdout', data); - }); - } - - if (child.stderr) { - child.stderr.on('data', data => { - stderr = Buffer.concat([stderr, data]); - events.emit('stderr', data); - }); - } - - child.on('error', err => { - activeProcesses.delete(child); - reject(err); - }); - - child.on('close', code => { - activeProcesses.delete(child); - resolve({ code, stdout, stderr }); - }); - }); -} - -module.exports = spawn; -module.exports.ChildProcessPromise = ChildProcessPromise; - - -/***/ }), - -/***/ 304: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(4434); - -class ChildProcessPromise extends Promise { - constructor(executer) { - let resolve; - let reject; - - super((res, rej) => { - resolve = res; - reject = rej; - }); - - executer(resolve, reject, this); - } -} - -Object.assign(ChildProcessPromise.prototype, EventEmitter.prototype); - -module.exports = ChildProcessPromise; - - -/***/ }), - -/***/ 4938: -/***/ ((module) => { - - -module.exports = x => { - if (typeof x !== 'string') { - throw new TypeError('Expected a string, got ' + typeof x); - } - - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (x.charCodeAt(0) === 0xFEFF) { - return x.slice(1); - } - - return x; -}; - - -/***/ }), - -/***/ 3757: -/***/ ((module) => { - - - -module.exports = input => { - const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt(); - const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt(); - - if (input[input.length - 1] === LF) { - input = input.slice(0, input.length - 1); - } - - if (input[input.length - 1] === CR) { - input = input.slice(0, input.length - 1); - } - - return input; -}; - - -/***/ }), - -/***/ 743: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -const isNumber = __nccwpck_require__(952); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; - - -/***/ }), - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* unused reexport */ __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -__webpack_unused_export__ = httpOverHttp; -__webpack_unused_export__ = httpsOverHttp; -__webpack_unused_export__ = httpOverHttps; -__webpack_unused_export__ = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -__webpack_unused_export__ = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -__webpack_unused_export__ = Dispatcher -__webpack_unused_export__ = Client -__webpack_unused_export__ = Pool -__webpack_unused_export__ = BalancedPool -__webpack_unused_export__ = Agent -__webpack_unused_export__ = ProxyAgent -__webpack_unused_export__ = EnvHttpProxyAgent -__webpack_unused_export__ = RetryAgent -__webpack_unused_export__ = RetryHandler - -__webpack_unused_export__ = DecoratorHandler -__webpack_unused_export__ = RedirectHandler -__webpack_unused_export__ = createRedirectInterceptor -__webpack_unused_export__ = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -__webpack_unused_export__ = buildConnector -__webpack_unused_export__ = errors -__webpack_unused_export__ = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -__webpack_unused_export__ = setGlobalDispatcher -__webpack_unused_export__ = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -__webpack_unused_export__ = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -/* unused reexport */ __nccwpck_require__(9822).Headers -/* unused reexport */ __nccwpck_require__(8661).Response -/* unused reexport */ __nccwpck_require__(6465).Request -/* unused reexport */ __nccwpck_require__(9976).FormData -__webpack_unused_export__ = globalThis.File ?? (__nccwpck_require__(4573).File) -/* unused reexport */ __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -__webpack_unused_export__ = setGlobalOrigin -__webpack_unused_export__ = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -__webpack_unused_export__ = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -__webpack_unused_export__ = deleteCookie -__webpack_unused_export__ = getCookies -__webpack_unused_export__ = getSetCookies -__webpack_unused_export__ = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -__webpack_unused_export__ = parseMIMEType -__webpack_unused_export__ = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -/* unused reexport */ __nccwpck_require__(7976).WebSocket -__webpack_unused_export__ = CloseEvent -__webpack_unused_export__ = ErrorEvent -__webpack_unused_export__ = MessageEvent - -__webpack_unused_export__ = makeDispatcher(api.request) -__webpack_unused_export__ = makeDispatcher(api.stream) -__webpack_unused_export__ = makeDispatcher(api.pipeline) -__webpack_unused_export__ = makeDispatcher(api.connect) -__webpack_unused_export__ = makeDispatcher(api.upgrade) - -__webpack_unused_export__ = MockClient -__webpack_unused_export__ = MockPool -__webpack_unused_export__ = MockAgent -__webpack_unused_export__ = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -__webpack_unused_export__ = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2V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EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AE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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMB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B0dHR0dHR0dHR0AXQLIAFBAWohAUHmACEDDJgCCyABQQFqIQFB5wAhAwyXAgtB/QAhAyABIARGDa8CIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2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ABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAz+AQsgAkEANgIAIAZBAWohAUEqDEELIAEgBEYEQEGwASEDD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IoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlAD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ATYCFCACQZQNNgIQIAJBITYCDEEAIQMMlgELIAJB1wA2AhwgAiABNgIUIAJByRc2AhAgAkEVNgIMQQAhAwyVAQtBACEDIAJBADYCHCACIAE2AhQgAkGAETYCECACQQk2AgwMlAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0AIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMkwELQckAIQMMeQsgAkEANgIcIAIgATYCFCACQcEoNgIQIAJBBzYCDCACQQA2AgBBACEDDJEBCyACKAIEIQBBACEDIAJBADYCBCACIAAgARAlIgBFDQAgAkHSADYCHCACIAE2AhQgAiAANgIMDJABC0HIACEDDHYLIAJBADYCACAFIQELIAJBgBI7ASogAUEBaiEBQQAhAAJAIAIoAjgiA0UNACADKAIwIgNFDQAgAiADEQAAIQALIAANAQtBxwAhAwxzCyAAQRVGBEAgAkHRADYCHCACIAE2AhQgAkHjFzYCECACQRU2AgxBACEDDIwBC0EAIQMgAkEANgIcIAIgATYCFCACQbkNNgIQIAJBGjYCDAyLAQtBACEDIAJBADYCHCACIAE2AhQgAkGgGTYCECACQR42AgwMigELIAEtAABBOkYEQCACKAIEIQBBACEDIAJBADYCBCACIAAgARApIgBFDQEgAkHDADYCHCACIAA2AgwgAiABQQFqNgIUDIoBC0EAIQMgAkEANgIcIAIgATYCFCACQbERNgIQIAJBCjYCDAyJAQsgAUEBaiEBQTshAwxvCyACQcMANgIcIAIgADYCDCACIAFBAWo2AhQMhwELQQAhAyACQQA2AhwgAiABNgIUIAJB8A42AhAgAkEcNgIMDIYBCyACIAIvATBBEHI7ATAMZgsCQCACLwEwIgBBCHFFDQAgAi0AKEEBRw0AIAItAC1BCHFFDQMLIAIgAEH3+wNxQYAEcjsBMAwECyABIARHBEACQANAIAEtAABBMGsiAEH/AXFBCk8EQEE1IQMMbgsgAikDICIKQpmz5syZs+bMGVYNASACIApCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAIgCiALfDcDICAEIAFBAWoiAUcNAAtBOSEDDIU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BAQEBAQEBAQBB+cYACwQBAAABAEGRxwAL3wEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.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gAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbX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AFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgB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CHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCAC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AoAgwiAyAARwRAQZzQACgCABogAyAAKAIIIgE2AgggASADNgIMDBALIABBFGoiAigCACIBRQRAIAAoAhAiAUUNAyAAQRBqIQILA0AgAiEHIAEiA0EUaiICKAIAIgENACADQRBqIQIgAygCECIBDQALIAdBADYCAAwPC0F/IQQgAEG/f0sNACAAQRNqIgFBcHEhBEGQ0AAoAgAiCEUNAEEAIARrIQUCQAJAAkACf0EAIARBgAJJDQAaQR8gBEH///8HSw0AGiAEQSYgAUEIdmciAGt2QQFxIABBAXRrQT5qCyIGQQJ0QbzSAGooAgAiAkUEQEEAIQFBACEDDAELQQAhASAEQRkgBkEBdmtBACAGQR9HG3QhAEEAIQMDQAJAIAIoAgRBeHEgBGsiByAFTw0AIAIhAyAHIgUNAEEAIQUgAiEBDAMLIAEgAkEUaigCACIHIAcgAiAAQR12QQRxakEQaigCACICRhsgASAHGyEBIABBAXQhACACDQALCyABIANyRQRAQQAhA0ECIAZ0IgBBACAAa3IgCHEiAEUNAyAAaEECdEG80gBqKAIAIQELIAFFDQELA0AgASgCBEF4cSAEayICIAVJIQAgAiAFIAAbIQUgASADIAAbIQMgASgCECIABH8gAAUgAUEUaigCAAsiAQ0ACwsgA0UNACAFQZTQACgCACAEa08NACADKAIYIQcgAyADKAIMIgBHBEBBnNAAKAIAGiAAIAMoAggiATYCCCABIAA2AgwMDgsgA0EUaiICKAIAIgFFBEAgAygCECIBRQ0DIANBEGohAgsDQCACIQYgASIAQRRqIgIoAgAiAQ0AIABBEGohAiAAKAIQIgENAAsgBkEANgIADA0LQZTQACgCACIDIARPBEBBoNAAKAIAIQECQCADIARrIgJBEE8EQCABIARqIgAgAkEBcjYCBCABIANqIAI2AgAgASAEQQNyNgIEDAELIAEgA0EDcjYCBCABIANqIgAgACgCBEEBcjYCBEEAIQBBACECC0GU0AAgAjYCAEGg0AAgADYCACABQQhqIQEMDwtBmNAAKAIAIgMgBEsEQCAEIAlqIgAgAyAEayIBQQFyNgIEQaTQACAANgIAQZjQACABNgIAI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5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 8710: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.S = function (fn) { - return Object.defineProperty(function () { - if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) - else { - return new Promise((resolve, reject) => { - arguments[arguments.length] = (err, res) => { - if (err) return reject(err) - resolve(res) - } - arguments.length++ - fn.apply(this, arguments) - }) - } - }, 'name', { value: fn.name }) -} - -exports.z = function (fn) { - return Object.defineProperty(function () { - const cb = arguments[arguments.length - 1] - if (typeof cb !== 'function') return fn.apply(this, arguments) - else fn.apply(this, arguments).then(r => cb(null, r), cb) - }, 'name', { value: fn.name }) -} - - -/***/ }), - -/***/ 1192: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -const path = __nccwpck_require__(6928) -const COLON = isWindows ? ';' : ':' -const isexe = __nccwpck_require__(7105) - -const getNotFoundError = (cmd) => - Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) - -const getPathInfo = (cmd, opt) => { - const colon = opt.colon || COLON - - // If it has a slash, then we don't bother searching the pathenv. - // just check the file itself, and that's it. - const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [''] - : ( - [ - // windows always checks the cwd first - ...(isWindows ? [process.cwd()] : []), - ...(opt.path || process.env.PATH || - /* istanbul ignore next: very unusual */ '').split(colon), - ] - ) - const pathExtExe = isWindows - ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM' - : '' - const pathExt = isWindows ? pathExtExe.split(colon) : [''] - - if (isWindows) { - if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') - pathExt.unshift('') - } - - return { - pathEnv, - pathExt, - pathExtExe, - } -} - -const which = (cmd, opt, cb) => { - if (typeof opt === 'function') { - cb = opt - opt = {} - } - if (!opt) - opt = {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - const step = i => new Promise((resolve, reject) => { - if (i === pathEnv.length) - return opt.all && found.length ? resolve(found) - : reject(getNotFoundError(cmd)) - - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - resolve(subStep(p, i, 0)) - }) - - const subStep = (p, i, ii) => new Promise((resolve, reject) => { - if (ii === pathExt.length) - return resolve(step(i + 1)) - const ext = pathExt[ii] - isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { - if (!er && is) { - if (opt.all) - found.push(p + ext) - else - return resolve(p + ext) - } - return resolve(subStep(p, i, ii + 1)) - }) - }) - - return cb ? step(0).then(res => cb(null, res), cb) : step(0) -} - -const whichSync = (cmd, opt) => { - opt = opt || {} - - const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) - const found = [] - - for (let i = 0; i < pathEnv.length; i ++) { - const ppRaw = pathEnv[i] - const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw - - const pCmd = path.join(pathPart, cmd) - const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd - : pCmd - - for (let j = 0; j < pathExt.length; j ++) { - const cur = p + pathExt[j] - try { - const is = isexe.sync(cur, { pathExt: pathExtExe }) - if (is) { - if (opt.all) - found.push(cur) - else - return cur - } - } catch (ex) {} - } - } - - if (opt.all && found.length) - return found - - if (opt.nothrow) - return null - - throw getNotFoundError(cmd) -} - -module.exports = which -which.sync = whichSync - - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 181: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer"); - -/***/ }), - -/***/ 5317: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); - -/***/ }), - -/***/ 9140: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("constants"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 6760: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 857: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }), - -/***/ 5829: -/***/ ((module) => { - -function _OverloadYield(e, d) { - this.v = e, this.k = d; -} -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2569: -/***/ ((module) => { - -function _assertThisInitialized(e) { - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - return e; -} -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7270: -/***/ ((module) => { - -function asyncGeneratorStep(n, t, e, r, o, a, c) { - try { - var i = n[a](c), - u = i.value; - } catch (n) { - return void e(n); - } - i.done ? t(u) : Promise.resolve(u).then(r, o); -} -function _asyncToGenerator(n) { - return function () { - var t = this, - e = arguments; - return new Promise(function (r, o) { - var a = n.apply(t, e); - function _next(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); - } - function _throw(n) { - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); - } - _next(void 0); - }); - }; -} -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1220: -/***/ ((module) => { - -function _classCallCheck(a, n) { - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); -} -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isNativeReflectConstruct = __nccwpck_require__(469); -var setPrototypeOf = __nccwpck_require__(4299); -function _construct(t, e, r) { - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); - var o = [null]; - o.push.apply(o, e); - var p = new (t.bind.apply(t, o))(); - return r && setPrototypeOf(p, r.prototype), p; -} -module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1695: -/***/ ((module) => { - -function _getPrototypeOf(t) { - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { - return t.__proto__ || Object.getPrototypeOf(t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); -} -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4300: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var setPrototypeOf = __nccwpck_require__(4299); -function _inherits(t, e) { - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); - t.prototype = Object.create(e && e.prototype, { - constructor: { - value: t, - writable: !0, - configurable: !0 - } - }), Object.defineProperty(t, "prototype", { - writable: !1 - }), e && setPrototypeOf(t, e); -} -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 6311: -/***/ ((module) => { - -function _isNativeFunction(t) { - try { - return -1 !== Function.toString.call(t).indexOf("[native code]"); - } catch (n) { - return "function" == typeof t; - } -} -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 469: -/***/ ((module) => { - -function _isNativeReflectConstruct() { - try { - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - } catch (t) {} - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { - return !!t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 5297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var _typeof = (__nccwpck_require__(9741)["default"]); -var assertThisInitialized = __nccwpck_require__(2569); -function _possibleConstructorReturn(t, e) { - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); - return assertThisInitialized(t); -} -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2080: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var regeneratorDefine = __nccwpck_require__(1943); -function _regenerator() { - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ - var e, - t, - r = "function" == typeof Symbol ? Symbol : {}, - n = r.iterator || "@@iterator", - o = r.toStringTag || "@@toStringTag"; - function i(r, n, o, i) { - var c = n && n.prototype instanceof Generator ? n : Generator, - u = Object.create(c.prototype); - return regeneratorDefine(u, "_invoke", function (r, n, o) { - var i, - c, - u, - f = 0, - p = o || [], - y = !1, - G = { - p: 0, - n: 0, - v: e, - a: d, - f: d.bind(e, 4), - d: function d(t, r) { - return i = t, c = 0, u = e, G.n = r, a; - } - }; - function d(r, n) { - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { - var o, - i = p[t], - d = G.p, - l = i[2]; - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); - } - if (o || r > 1) return a; - throw y = !0, n; - } - return function (o, p, l) { - if (f > 1) throw TypeError("Generator is already running"); - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); - try { - if (f = 2, i) { - if (c || (o = "next"), t = i[o]) { - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); - if (!t.done) return t; - u = t.value, c < 2 && (c = 0); - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); - i = e; - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; - } catch (t) { - i = e, c = 1, u = t; - } finally { - f = 1; - } - } - return { - value: t, - done: y - }; - }; - }(r, o, i), !0), u; - } - var a = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - t = Object.getPrototypeOf; - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { - return this; - }), t), - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); - function f(e) { - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { - return this; - }), regeneratorDefine(u, "toString", function () { - return "[object Generator]"; - }), (module.exports = _regenerator = function _regenerator() { - return { - w: i, - m: f - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var regeneratorAsyncGen = __nccwpck_require__(2302); -function _regeneratorAsync(n, e, r, t, o) { - var a = regeneratorAsyncGen(n, e, r, t, o); - return a.next().then(function (n) { - return n.done ? n.value : a.next(); - }); -} -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 2302: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var regenerator = __nccwpck_require__(2080); -var regeneratorAsyncIterator = __nccwpck_require__(8996); -function _regeneratorAsyncGen(r, e, t, o, n) { - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); -} -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 8996: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var OverloadYield = __nccwpck_require__(5829); -var regeneratorDefine = __nccwpck_require__(1943); -function AsyncIterator(t, e) { - function n(r, o, i, f) { - try { - var c = t[r](o), - u = c.value; - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { - n("next", t, i, f); - }, function (t) { - n("throw", t, i, f); - }) : e.resolve(u).then(function (t) { - c.value = t, i(c); - }, function (t) { - return n("throw", t, i, f); - }); - } catch (t) { - f(t); - } - } - var r; - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { - return this; - })), regeneratorDefine(this, "_invoke", function (t, o, i) { - function f() { - return new e(function (e, r) { - n(t, i, e, r); - }); - } - return r = r ? r.then(f, f) : f(); - }, !0); -} -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 1943: -/***/ ((module) => { - -function _regeneratorDefine(e, r, n, t) { - var i = Object.defineProperty; - try { - i({}, "", {}); - } catch (e) { - i = 0; - } - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { - function o(r, n) { - _regeneratorDefine(e, r, function (e) { - return this._invoke(r, n, e); - }); - } - r ? i ? i(e, r, { - value: n, - enumerable: !t, - configurable: !t, - writable: !t - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); -} -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3072: -/***/ ((module) => { - -function _regeneratorKeys(e) { - var n = Object(e), - r = []; - for (var t in n) r.unshift(t); - return function e() { - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; - return e.done = !0, e; - }; -} -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 3390: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var OverloadYield = __nccwpck_require__(5829); -var regenerator = __nccwpck_require__(2080); -var regeneratorAsync = __nccwpck_require__(3822); -var regeneratorAsyncGen = __nccwpck_require__(2302); -var regeneratorAsyncIterator = __nccwpck_require__(8996); -var regeneratorKeys = __nccwpck_require__(3072); -var regeneratorValues = __nccwpck_require__(4106); -function _regeneratorRuntime() { - "use strict"; - - var r = regenerator(), - e = r.m(_regeneratorRuntime), - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; - function n(r) { - var e = "function" == typeof r && r.constructor; - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); - } - var o = { - "throw": 1, - "return": 2, - "break": 3, - "continue": 3 - }; - function a(r) { - var e, t; - return function (n) { - e || (e = { - stop: function stop() { - return t(n.a, 2); - }, - "catch": function _catch() { - return n.v; - }, - abrupt: function abrupt(r, e) { - return t(n.a, o[r], e); - }, - delegateYield: function delegateYield(r, o, a) { - return e.resultName = o, t(n.d, regeneratorValues(r), a); - }, - finish: function finish(r) { - return t(n.f, r); - } - }, t = function t(r, _t, o) { - n.p = e.prev, n.n = e.next; - try { - return r(_t, o); - } finally { - e.next = n.n; - } - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; - try { - return r.call(this, e); - } finally { - n.p = e.prev, n.n = e.next; - } - }; - } - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { - return { - wrap: function wrap(e, t, n, o) { - return r.w(a(e), t, n, o && o.reverse()); - }, - isGeneratorFunction: n, - mark: r.m, - awrap: function awrap(r, e) { - return new OverloadYield(r, e); - }, - AsyncIterator: regeneratorAsyncIterator, - async: function async(r, e, t, o, u) { - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); - }, - keys: regeneratorKeys, - values: regeneratorValues - }; - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); -} -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var _typeof = (__nccwpck_require__(9741)["default"]); -function _regeneratorValues(e) { - if (null != e) { - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], - r = 0; - if (t) return t.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) return { - next: function next() { - return e && r >= e.length && (e = void 0), { - value: e && e[r++], - done: !e - }; - } - }; - } - throw new TypeError(_typeof(e) + " is not iterable"); -} -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4299: -/***/ ((module) => { - -function _setPrototypeOf(t, e) { - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { - return t.__proto__ = e, t; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); -} -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 9741: -/***/ ((module) => { - -function _typeof(o) { - "@babel/helpers - typeof"; - - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); -} -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 4372: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getPrototypeOf = __nccwpck_require__(1695); -var setPrototypeOf = __nccwpck_require__(4299); -var isNativeFunction = __nccwpck_require__(6311); -var construct = __nccwpck_require__(7159); -function _wrapNativeSuper(t) { - var r = "function" == typeof Map ? new Map() : void 0; - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { - if (null === t || !isNativeFunction(t)) return t; - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); - if (void 0 !== r) { - if (r.has(t)) return r.get(t); - r.set(t, Wrapper); - } - function Wrapper() { - return construct(t, arguments, getPrototypeOf(this).constructor); - } - return Wrapper.prototype = Object.create(t.prototype, { - constructor: { - value: Wrapper, - enumerable: !1, - writable: !0, - configurable: !0 - } - }), setPrototypeOf(Wrapper, t); - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); -} -module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ 7594: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// TODO(Babel 8): Remove this file. - -var runtime = __nccwpck_require__(3390)(); -module.exports = runtime; - -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - if (typeof globalThis === "object") { - globalThis.regeneratorRuntime = runtime; - } else { - Function("r", "regeneratorRuntime = r")(runtime); - } -} - - -/***/ }), - -/***/ 885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* eslint-disable no-var */ - -var reusify = __nccwpck_require__(3728) - -function fastqueue (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - if (!(_concurrency >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - - var cache = reusify(Task) - var queueHead = null - var queueTail = null - var _running = 0 - var errorHandler = null - - var self = { - push: push, - drain: noop, - saturated: noop, - pause: pause, - paused: false, - - get concurrency () { - return _concurrency - }, - set concurrency (value) { - if (!(value >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - _concurrency = value - - if (self.paused) return - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - }, - - running: running, - resume: resume, - idle: idle, - length: length, - getQueue: getQueue, - unshift: unshift, - empty: noop, - kill: kill, - killAndDrain: killAndDrain, - error: error, - abort: abort - } - - return self - - function running () { - return _running - } - - function pause () { - self.paused = true - } - - function length () { - var current = queueHead - var counter = 0 - - while (current) { - current = current.next - counter++ - } - - return counter - } - - function getQueue () { - var current = queueHead - var tasks = [] - - while (current) { - tasks.push(current.value) - current = current.next - } - - return tasks - } - - function resume () { - if (!self.paused) return - self.paused = false - if (queueHead === null) { - _running++ - release() - return - } - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - } - - function idle () { - return _running === 0 && self.length() === 0 - } - - function push (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueTail) { - queueTail.next = current - queueTail = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function unshift (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueHead) { - current.next = queueHead - queueHead = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function release (holder) { - if (holder) { - cache.release(holder) - } - var next = queueHead - if (next && _running <= _concurrency) { - if (!self.paused) { - if (queueTail === queueHead) { - queueTail = null - } - queueHead = next.next - next.next = null - worker.call(context, next.value, next.worked) - if (queueTail === null) { - self.empty() - } - } else { - _running-- - } - } else if (--_running === 0) { - self.drain() - } - } - - function kill () { - queueHead = null - queueTail = null - self.drain = noop - } - - function killAndDrain () { - queueHead = null - queueTail = null - self.drain() - self.drain = noop - } - - function abort () { - var current = queueHead - queueHead = null - queueTail = null - - while (current) { - var next = current.next - var callback = current.callback - var errorHandler = current.errorHandler - var val = current.value - var context = current.context - - // Reset the task state - current.value = null - current.callback = noop - current.errorHandler = null - - // Call error handler if present - if (errorHandler) { - errorHandler(new Error('abort'), val) - } - - // Call callback with error - callback.call(context, new Error('abort')) - - // Release the task back to the pool - current.release(current) - - current = next - } - - self.drain = noop - } - - function error (handler) { - errorHandler = handler - } -} - -function noop () {} - -function Task () { - this.value = null - this.callback = noop - this.next = null - this.release = noop - this.context = null - this.errorHandler = null - - var self = this - - this.worked = function worked (err, result) { - var callback = self.callback - var errorHandler = self.errorHandler - var val = self.value - self.value = null - self.callback = noop - if (self.errorHandler) { - errorHandler(err, val) - } - callback.call(self.context, err, result) - self.release(self) - } -} - -function queueAsPromised (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - function asyncWrapper (arg, cb) { - worker.call(this, arg) - .then(function (res) { - cb(null, res) - }, cb) - } - - var queue = fastqueue(context, asyncWrapper, _concurrency) - - var pushCb = queue.push - var unshiftCb = queue.unshift - - queue.push = push - queue.unshift = unshift - queue.drained = drained - - return queue - - function push (value) { - var p = new Promise(function (resolve, reject) { - pushCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function unshift (value) { - var p = new Promise(function (resolve, reject) { - unshiftCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function drained () { - var p = new Promise(function (resolve) { - process.nextTick(function () { - if (queue.idle()) { - resolve() - } else { - var previousDrain = queue.drain - queue.drain = function () { - if (typeof previousDrain === 'function') previousDrain() - resolve() - queue.drain = previousDrain - } - } - }) - }) - - return p - } -} - -module.exports = fastqueue -module.exports.promise = queueAsPromised - - -/***/ }), - -/***/ 5767: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unload = exports.load = exports.onExit = exports.signals = void 0; -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -// grab a reference to node's real process object right away -const signals_js_1 = __nccwpck_require__(2362); -Object.defineProperty(exports, "signals", ({ enumerable: true, get: function () { return signals_js_1.signals; } })); -const processOk = (process) => !!process && - typeof process === 'object' && - typeof process.removeListener === 'function' && - typeof process.emit === 'function' && - typeof process.reallyExit === 'function' && - typeof process.listeners === 'function' && - typeof process.kill === 'function' && - typeof process.pid === 'number' && - typeof process.on === 'function'; -const kExitEmitter = Symbol.for('signal-exit emitter'); -const global = globalThis; -const ObjectDefineProperty = Object.defineProperty.bind(Object); -// teeny special purpose ee -class Emitter { - emitted = { - afterExit: false, - exit: false, - }; - listeners = { - afterExit: [], - exit: [], - }; - count = 0; - id = Math.random(); - constructor() { - if (global[kExitEmitter]) { - return global[kExitEmitter]; - } - ObjectDefineProperty(global, kExitEmitter, { - value: this, - writable: false, - enumerable: false, - configurable: false, - }); - } - on(ev, fn) { - this.listeners[ev].push(fn); - } - removeListener(ev, fn) { - const list = this.listeners[ev]; - const i = list.indexOf(fn); - /* c8 ignore start */ - if (i === -1) { - return; - } - /* c8 ignore stop */ - if (i === 0 && list.length === 1) { - list.length = 0; - } - else { - list.splice(i, 1); - } - } - emit(ev, code, signal) { - if (this.emitted[ev]) { - return false; - } - this.emitted[ev] = true; - let ret = false; - for (const fn of this.listeners[ev]) { - ret = fn(code, signal) === true || ret; - } - if (ev === 'exit') { - ret = this.emit('afterExit', code, signal) || ret; - } - return ret; - } -} -class SignalExitBase { -} -const signalExitWrap = (handler) => { - return { - onExit(cb, opts) { - return handler.onExit(cb, opts); - }, - load() { - return handler.load(); - }, - unload() { - return handler.unload(); - }, - }; -}; -class SignalExitFallback extends SignalExitBase { - onExit() { - return () => { }; - } - load() { } - unload() { } -} -class SignalExit extends SignalExitBase { - // "SIGHUP" throws an `ENOSYS` error on Windows, - // so use a supported signal instead - /* c8 ignore start */ - #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'; - /* c8 ignore stop */ - #emitter = new Emitter(); - #process; - #originalProcessEmit; - #originalProcessReallyExit; - #sigListeners = {}; - #loaded = false; - constructor(process) { - super(); - this.#process = process; - // { : , ... } - this.#sigListeners = {}; - for (const sig of signals_js_1.signals) { - this.#sigListeners[sig] = () => { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - const listeners = this.#process.listeners(sig); - let { count } = this.#emitter; - // This is a workaround for the fact that signal-exit v3 and signal - // exit v4 are not aware of each other, and each will attempt to let - // the other handle it, so neither of them do. To correct this, we - // detect if we're the only handler *except* for previous versions - // of signal-exit, and increment by the count of listeners it has - // created. - /* c8 ignore start */ - const p = process; - if (typeof p.__signal_exit_emitter__ === 'object' && - typeof p.__signal_exit_emitter__.count === 'number') { - count += p.__signal_exit_emitter__.count; - } - /* c8 ignore stop */ - if (listeners.length === count) { - this.unload(); - const ret = this.#emitter.emit('exit', null, sig); - /* c8 ignore start */ - const s = sig === 'SIGHUP' ? this.#hupSig : sig; - if (!ret) - process.kill(process.pid, s); - /* c8 ignore stop */ - } - }; - } - this.#originalProcessReallyExit = process.reallyExit; - this.#originalProcessEmit = process.emit; - } - onExit(cb, opts) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return () => { }; - } - /* c8 ignore stop */ - if (this.#loaded === false) { - this.load(); - } - const ev = opts?.alwaysLast ? 'afterExit' : 'exit'; - this.#emitter.on(ev, cb); - return () => { - this.#emitter.removeListener(ev, cb); - if (this.#emitter.listeners['exit'].length === 0 && - this.#emitter.listeners['afterExit'].length === 0) { - this.unload(); - } - }; - } - load() { - if (this.#loaded) { - return; - } - this.#loaded = true; - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - this.#emitter.count += 1; - for (const sig of signals_js_1.signals) { - try { - const fn = this.#sigListeners[sig]; - if (fn) - this.#process.on(sig, fn); - } - catch (_) { } - } - this.#process.emit = (ev, ...a) => { - return this.#processEmit(ev, ...a); - }; - this.#process.reallyExit = (code) => { - return this.#processReallyExit(code); - }; - } - unload() { - if (!this.#loaded) { - return; - } - this.#loaded = false; - signals_js_1.signals.forEach(sig => { - const listener = this.#sigListeners[sig]; - /* c8 ignore start */ - if (!listener) { - throw new Error('Listener not defined for signal: ' + sig); - } - /* c8 ignore stop */ - try { - this.#process.removeListener(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }); - this.#process.emit = this.#originalProcessEmit; - this.#process.reallyExit = this.#originalProcessReallyExit; - this.#emitter.count -= 1; - } - #processReallyExit(code) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return 0; - } - this.#process.exitCode = code || 0; - /* c8 ignore stop */ - this.#emitter.emit('exit', this.#process.exitCode, null); - return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); - } - #processEmit(ev, ...args) { - const og = this.#originalProcessEmit; - if (ev === 'exit' && processOk(this.#process)) { - if (typeof args[0] === 'number') { - this.#process.exitCode = args[0]; - /* c8 ignore start */ - } - /* c8 ignore start */ - const ret = og.call(this.#process, ev, ...args); - /* c8 ignore start */ - this.#emitter.emit('exit', this.#process.exitCode, null); - /* c8 ignore stop */ - return ret; - } - else { - return og.call(this.#process, ev, ...args); - } - } -} -const process = globalThis.process; -// wrap so that we call the method on the actual handler, without -// exporting it directly. -_a = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback()), -/** - * Called when the process is exiting, whether via signal, explicit - * exit, or running out of stuff to do. - * - * If the global process object is not suitable for instrumentation, - * then this will be a no-op. - * - * Returns a function that may be used to unload signal-exit. - */ -exports.onExit = _a.onExit, -/** - * Load the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -exports.load = _a.load, -/** - * Unload the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -exports.unload = _a.unload; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 2362: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.signals = void 0; -/** - * This is not the set of all possible signals. - * - * It IS, however, the set of all signals that trigger - * an exit on either Linux or BSD systems. Linux is a - * superset of the signal names supported on BSD, and - * the unknown signals just fail to register, so we can - * catch that easily enough. - * - * Windows signals are a different set, since there are - * signals that terminate Windows processes, but don't - * terminate (or don't even exist) on Posix systems. - * - * Don't bother with SIGKILL. It's uncatchable, which - * means that we can't fire any callbacks anyway. - * - * If a user does happen to register a handler on a non- - * fatal signal like SIGWINCH or something, and then - * exit, it'll end up firing `process.emit('exit')`, so - * the handler will be fired anyway. - * - * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised - * artificially, inherently leave the process in a - * state from which it is not safe to try and enter JS - * listeners. - */ -exports.signals = []; -exports.signals.push('SIGHUP', 'SIGINT', 'SIGTERM'); -if (process.platform !== 'win32') { - exports.signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ); -} -if (process.platform === 'linux') { - exports.signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT'); -} -//# sourceMappingURL=signals.js.map - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; - -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -// EXTERNAL MODULE: external "node:path" -var external_node_path_ = __nccwpck_require__(6760); -// EXTERNAL MODULE: external "os" -var external_os_ = __nccwpck_require__(857); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -;// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); -// EXTERNAL MODULE: external "fs" -var external_fs_ = __nccwpck_require__(9896); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!external_fs_.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - external_fs_.appendFileSync(filePath, `${utils_toCommandValue(message)}${external_os_.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${external_crypto_namespaceObject.randomUUID()}`; - const convertedValue = utils_toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${external_os_.EOL}${convertedValue}${external_os_.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -// EXTERNAL MODULE: external "path" -var external_path_ = __nccwpck_require__(6928); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_.constants.R_OK | external_fs_.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -// EXTERNAL MODULE: external "child_process" -var external_child_process_ = __nccwpck_require__(5317); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_.dirname(filePath); - const upperName = external_path_.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_.EOL.length); - n = s.indexOf(external_os_.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_.platform(); -const arch = external_os_.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return file_command_issueFileCommand('OUTPUT', file_command_prepareKeyValueMessage(name, value)); - } - process.stdout.write(external_os_.EOL); - command_issueCommand('set-output', { name }, utils_toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - issueCommand('error', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + external_os_.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js -var execa = __nccwpck_require__(3650); -// EXTERNAL MODULE: external "node:console" -var external_node_console_ = __nccwpck_require__(7540); -// EXTERNAL MODULE: ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.js -var changesets_get_release_plan_cjs = __nccwpck_require__(5115); -// EXTERNAL MODULE: ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.default.js -var changesets_get_release_plan_cjs_default = __nccwpck_require__(4864); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@changesets+get-release-plan@4.0.16/node_modules/@changesets/get-release-plan/dist/changesets-get-release-plan.cjs.mjs - - - -// EXTERNAL MODULE: ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js -var semver = __nccwpck_require__(9361); -;// CONCATENATED MODULE: ./lib/build-packages/changesets-fixed-version-bump/util.js -/* eslint-disable jsdoc/require-jsdoc */ - - - - -async function getPackageVersion() { - const packageJson = await (0,promises_namespaceObject.readFile)('package.json', 'utf8'); - return JSON.parse(packageJson).version; -} -const bumpTypeOrder = ['major', 'minor', 'patch', 'none']; -async function getNextVersion() { - const currentVersion = await getPackageVersion(); - (0,external_node_console_.info)(`Current version: ${currentVersion}`); - const bumpType = await getBumpType(); - (0,external_node_console_.info)(`Bump type: ${bumpType}`); - if (bumpType === 'none' || !bumpType) { - throw new Error('No changesets to release'); - } - const version = (0,semver.inc)(currentVersion, bumpType); - if (!version) { - throw new Error(`Invalid new version -- current version: ${currentVersion}, bump type: ${bumpType}`); - } - return { version, bumpType }; -} -async function getBumpType() { - const releasePlan = await (0,changesets_get_release_plan_cjs_default._default)(process.cwd()); - (0,external_node_console_.info)(`Release plan: ${JSON.stringify(releasePlan)}`); - const versionIncreases = releasePlan.releases - .map(({ type }) => bumpTypeOrder.indexOf(type)) - .sort((a, b) => b - a); - return bumpTypeOrder[Math.min(...versionIncreases)]; -} -function formatJson(json) { - return JSON.stringify(json, null, 2) + '\n'; -} - -;// CONCATENATED MODULE: ./lib/build-packages/changesets-fixed-version-bump/index.js - - - - - -async function transformFile(filePath, transformFn) { - const file = await (0,promises_namespaceObject.readFile)(filePath, { encoding: 'utf8' }); - await (0,promises_namespaceObject.writeFile)(filePath, await transformFn(file), { encoding: 'utf8' }); -} -async function bump() { - const { version, bumpType } = await getNextVersion(); - if (bumpType === 'major' && version !== getInput('majorVersion')) { - throw new Error('Cannot apply major version bump. If you want to bump a major version, you must set the "majorVersion" input.'); - } - info(`bumping to version ${version}`); - setOutput('version', version); - info('updating root package.json'); - await updateRootPackageJson(version); - info('setting version'); - // abstract from different package managers - await (0,execa.command)('node_modules/@changesets/cli/bin.js version'); -} -async function updateRootPackageJson(version) { - await transformFile((0,external_node_path_.resolve)('package.json'), packageJson => formatJson({ - ...JSON.parse(packageJson), - version: `${version}` - })); -} -bump(); - diff --git a/.github/actions/check-license/action.yml b/.github/actions/check-license/action.yml index ff18f08724..a4e98d5e42 100644 --- a/.github/actions/check-license/action.yml +++ b/.github/actions/check-license/action.yml @@ -2,4 +2,4 @@ name: 'Check License' description: 'Checks if the licenses of the dependencies are allowed.' runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/check-license/dist/index.js b/.github/actions/check-license/dist/index.js new file mode 100644 index 0000000000..08040adefb --- /dev/null +++ b/.github/actions/check-license/dist/index.js @@ -0,0 +1,17384 @@ +import { createRequire } from "node:module"; +import { execFileSync } from "node:child_process"; +import * as os$1 from "os"; +import os, { EOL } from "os"; +import * as fs from "fs"; +import { constants, promises } from "fs"; +import * as path from "path"; +import * as events from "events"; +import "child_process"; +import "timers"; +var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js +/** +* Sanitizes an input into a string so it can be passed into issueCommand safely +* @param input input to sanitize into a string +*/ +function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); +} +/** +* +* @param annotationProperties +* @returns The command properties to send with the actual annotation command +* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 +*/ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js +/** +* Issues a command to the GitHub Actions runner +* +* @param command - The command name to issue +* @param properties - Additional properties for the command (key-value pairs) +* @param message - The message to include with the command +* @remarks +* This function outputs a specially formatted string to stdout that the Actions +* runner interprets as a command. These commands can control workflow behavior, +* set outputs, create annotations, mask values, and more. +* +* Command Format: +* ::name key=value,key=value::message +* +* @example +* ```typescript +* // Issue a warning annotation +* issueCommand('warning', {}, 'This is a warning message'); +* // Output: ::warning::This is a warning message +* +* // Set an environment variable +* issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); +* // Output: ::set-env name=MY_VAR::some value +* +* // Add a secret mask +* issueCommand('add-mask', {}, 'secretValue123'); +* // Output: ::add-mask::secretValue123 +* ``` +* +* @internal +* This is an internal utility function that powers the public API functions +* such as setSecret, warning, error, and exportVariable. +*/ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$1.EOL); +} +const CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + __require("net"); + __require("tls"); + var http$1 = __require("http"); + __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$2 = __require("util"); + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$1.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$2.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; +})); +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_tunnel$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + const kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"); + var MessageSizeExceededError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + get [kMessageSizeExceededError]() { + return true; + } + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$4(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$26 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$2 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$26(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$26(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$2.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$26(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$26(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$26(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$1 = __require("node:util"); + const undiciDebugLog = util$1.debuglog("undici"); + const fetchDebuglog = util$1.debuglog("fetch"); + const websocketDebuglog = util$1.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$25 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (upgrade && !isValidHeaderValue(upgrade)) throw new InvalidArgumentError("invalid upgrade header"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$25(!this.aborted); + assert$25(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$25(!this.aborted); + assert$25(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$25(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (headerName === "host") { + if (request.host !== null) throw new InvalidArgumentError("duplicate host header"); + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) throw new InvalidArgumentError("duplicate content-length header"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const EventEmitter = __require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + var DispatcherBase = class extends Dispatcher { + constructor(opts) { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 }; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = 499; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const net$1 = __require("node:net"); + const assert$24 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$24(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$24(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"); + module.exports = Buffer$2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQL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AIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0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AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllb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HIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFNTk9QUVJTVFVWV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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGA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IAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC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IAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACED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EBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet: new Set(subresource), + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$23 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$23(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$23(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$23(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$23(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { types: types$3, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$3.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$3.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$2(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$22 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$22(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$22(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$22(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$22(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$2 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$22(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject: new EnvironmentSettingsObject() + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/file.js +var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file(); + const { makeEntry } = require_formdata(); + const assert$21 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$21(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$21(isUSVString(name)); + assert$21(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$21(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$20 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$20(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$20(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$20(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$19 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$3(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$19(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 3; + const TIMEOUT_BODY = 5; + const TIMEOUT_KEEP_ALIVE = 8; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$19(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$19(this.ptr != null); + assert$19(currentParser == null); + assert$19(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$19(upgrade); + assert$19(client[kSocket] === socket); + assert$19(!socket.destroyed); + assert$19(!this.paused); + assert$19((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$19(!this.upgrade); + assert$19(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$19(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$19((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$19(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$19(statusCode >= 100); + assert$19((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$19(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$19(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$19(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$19(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$19(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$19(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$19(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$19(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$19(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$19(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$18 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$18(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$18(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$18(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$18(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$18(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$17 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$1 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$17(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$17(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$17(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$16 = __require("node:assert"); + const net = __require("node:net"); + const http = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, webSocket } = {}) { + super({ webSocket }); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$16(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$16(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$16(!client[kConnecting]); + assert$16(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$16(idx !== -1); + const ip = hostname.substring(1, idx); + assert$16(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$16(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$16(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$16(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + super(options); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + super(options); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$15 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + module.exports = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$15(this.start === start, "content-range mismatch"); + assert$15(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$15(start != null && Number.isFinite(start), "content-range mismatch"); + assert$15(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$15(Number.isFinite(this.start)); + assert$15(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$14 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$14(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$14(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return /* @__PURE__ */ new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$13 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$13(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$12 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$11 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$1 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$11(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$1(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$10 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$10(!res, "pipeline cannot be retried"); + assert$10(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module.exports = pipeline; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$9 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$9(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$9(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$8 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$8(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + module.exports = { MockNotMatchedError: class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + } }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify: promisify$1 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$1(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$1({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$7 = __require("node:assert"); + const util = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$7(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$7(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$7(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$2(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$6 = __require("node:assert"); + const { types: types$2 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$6(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$6(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$6(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$2.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$2(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$5 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$5(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$4 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$2(); + const EE = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$4(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$4(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$4(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$4(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$4(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$4(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$1 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$1.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$3 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$3(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$2 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$2(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$1 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$1(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { parseSetCookie } = require_parse(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 2 ** 16 - 1, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxUnsigned16Bit } = require_constants(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const { MessageSizeExceededError } = require_errors(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; + } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + const { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {number} */ + #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { maxPayloadSize }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); +require_tunnel(); +require_undici(); +var HttpCodes; +(function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect; +HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout; +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js +var __awaiter$6 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { access, appendFile, writeFile } = promises; +const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$6(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$6(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$6(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +new Summary(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js +var __awaiter$5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs.promises; +const IS_WINDOWS$1 = process.platform === "win32"; +fs.constants.O_RDONLY; +/** +* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: +* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). +*/ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (IS_WINDOWS$1) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); +} +/** +* Best effort attempt to determine whether a file exists and is executable. +* @param filePath file path to check +* @param extensions additional file extensions to try +* @return if file exists and is executable, returns the file path. otherwise empty string. +*/ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter$5(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); +} +function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$1) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js +var __awaiter$4 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/** +* Returns path of a tool had the tool actually been invoked. Resolves via paths. +* If you check and the tool does not exist, it will throw. +* +* @param tool name of the tool +* @param check whether to check if tool exists +* @returns Promise path to tool +*/ +function which(tool, check) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (IS_WINDOWS$1) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); +} +/** +* Returns a list of all occurrences of the given tool on the system path. +* +* @returns Promise the paths of the tool +*/ +function findInPath(tool) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (IS_WINDOWS$1 && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path.delimiter)) if (extension) extensions.push(extension); + } + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); +} +process.platform; +events.EventEmitter; +events.EventEmitter; +os.platform(); +os.arch(); +/** +* The code to exit an action +*/ +var ExitCode; +(function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +/** +* Sets the action status to failed. +* When the action exits it will be with an exit code of 1 +* @param message add error issue message +*/ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +/** +* Adds an error issue +* @param message error issue message. Errors will be converted to string via toString() +* @param properties optional properties to add to the annotation. +*/ +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +/** +* Writes info to log with console.log. +* @param message info message +*/ +function info(message) { + process.stdout.write(message + os$1.EOL); +} +//#endregion +//#region ../../node_modules/.pnpm/@blueoak+list@15.0.0/node_modules/@blueoak/list/index.json +var list_default = [ + { + "name": "Model", + "notes": "The model license demonstrates all the characteristics the council looks for in a permissive open software license.", + "licenses": [{ + "name": "Blue Oak Model License 1.0.0", + "id": "BlueOak-1.0.0", + "url": "https://blueoakcouncil.org/license/1.0.0" + }] + }, + { + "name": "Gold", + "notes": "These licenses address patents explicitly, use robust language, and require only simple notice of license terms and copyright notices.", + "licenses": [{ + "name": "BSD-2-Clause Plus Patent License", + "id": "BSD-2-Clause-Patent", + "url": "https://spdx.org/licenses/BSD-2-Clause-Patent.html" + }] + }, + { + "name": "Silver", + "notes": "These licenses use robust language but either fail to address patents explicitly or require more than simple notice of license terms and copyright notices.", + "licenses": [ + { + "name": "Amazon Digital Services License", + "id": "ADSL", + "url": "https://spdx.org/licenses/ADSL.html" + }, + { + "name": "Apache License 2.0", + "id": "Apache-2.0", + "url": "https://spdx.org/licenses/Apache-2.0.html" + }, + { + "name": "Adobe Postscript AFM License", + "id": "APAFML", + "url": "https://spdx.org/licenses/APAFML.html" + }, + { + "name": "BSD 1-Clause License", + "id": "BSD-1-Clause", + "url": "https://spdx.org/licenses/BSD-1-Clause.html" + }, + { + "name": "BSD 2-Clause \"Simplified\" License", + "id": "BSD-2-Clause", + "url": "https://spdx.org/licenses/BSD-2-Clause.html" + }, + { + "name": "BSD 2-Clause FreeBSD License", + "id": "BSD-2-Clause-FreeBSD", + "url": "https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html" + }, + { + "name": "BSD 2-Clause NetBSD License", + "id": "BSD-2-Clause-NetBSD", + "url": "https://spdx.org/licenses/BSD-2-Clause-NetBSD.html" + }, + { + "name": "BSD 2-Clause with Views Sentence", + "id": "BSD-2-Clause-Views", + "url": "https://spdx.org/licenses/BSD-2-Clause-Views.html" + }, + { + "name": "Boost Software License 1.0", + "id": "BSL-1.0", + "url": "https://spdx.org/licenses/BSL-1.0.html" + }, + { + "name": "DSDP License", + "id": "DSDP", + "url": "https://spdx.org/licenses/DSDP.html" + }, + { + "name": "Educational Community License v1.0", + "id": "ECL-1.0", + "url": "https://spdx.org/licenses/ECL-1.0.html" + }, + { + "name": "Educational Community License v2.0", + "id": "ECL-2.0", + "url": "https://spdx.org/licenses/ECL-2.0.html" + }, + { + "name": "hdparm License", + "id": "hdparm", + "url": "https://spdx.org/licenses/hdparm" + }, + { + "name": "ImageMagick License", + "id": "ImageMagick", + "url": "https://spdx.org/licenses/ImageMagick.html" + }, + { + "name": "Intel ACPI Software License Agreement", + "id": "Intel-ACPI", + "url": "https://spdx.org/licenses/Intel-ACPI" + }, + { + "name": "ISC License", + "id": "ISC", + "url": "https://spdx.org/licenses/ISC.html" + }, + { + "name": "Linux Kernel Variant of OpenIB.org license", + "id": "Linux-OpenIB", + "url": "https://spdx.org/licenses/Linux-OpenIB.html" + }, + { + "name": "MIT License", + "id": "MIT", + "url": "https://spdx.org/licenses/MIT.html" + }, + { + "name": "MIT License Modern Variant", + "id": "MIT-Modern-Variant", + "url": "https://spdx.org/licenses/MIT-Modern-Variant.html" + }, + { + "name": "MIT testregex Variant", + "id": "MIT-testregex", + "url": "https://spdx.org/licenses/MIT-testregex" + }, + { + "name": "MIT Tom Wu Variant", + "id": "MIT-Wu", + "url": "https://spdx.org/licenses/MIT-Wu" + }, + { + "name": "Microsoft Public License", + "id": "MS-PL", + "url": "https://spdx.org/licenses/MS-PL.html" + }, + { + "id": "MulanPSL-1.0", + "url": "https://spdx.org/licenses/MulanPSL-1.0.html", + "name": "Mulan Permissive Software License, Version 1" + }, + { + "name": "Mup License", + "id": "Mup", + "url": "https://spdx.org/licenses/Mup.html" + }, + { + "name": "PostgreSQL License", + "id": "PostgreSQL", + "url": "https://spdx.org/licenses/PostgreSQL.html" + }, + { + "name": "Solderpad Hardware License v0.5", + "id": "SHL-0.5", + "url": "https://spdx.org/licenses/SHL-0.5" + }, + { + "name": "Spencer License 99", + "id": "Spencer-99", + "url": "https://spdx.org/licenses/Spencer-99.html" + }, + { + "name": "Universal Permissive License v1.0", + "id": "UPL-1.0", + "url": "https://spdx.org/licenses/UPL-1.0.html" + }, + { + "name": "Xerox License", + "id": "Xerox", + "url": "https://spdx.org/licenses/Xerox.html" + }, + { + "name": "Xfig License", + "id": "Xfig", + "url": "https://spdx.org/licenses/Xfig" + } + ] + }, + { + "name": "Bronze", + "notes": "These licenses lack important but nonessential elements of permissive open software licenses or impose additional requirements or restrictions, such as BSD-style prohibitions against endorsement and promotion.", + "licenses": [ + { + "id": "0BSD", + "url": "https://spdx.org/licenses/0BSD.html", + "name": "BSD Zero Clause License" + }, + { + "id": "AFL-1.1", + "url": "https://spdx.org/licenses/AFL-1.1.html", + "name": "Academic Free License v1.1" + }, + { + "id": "AFL-1.2", + "url": "https://spdx.org/licenses/AFL-1.2.html", + "name": "Academic Free License v1.2" + }, + { + "id": "AFL-2.0", + "url": "https://spdx.org/licenses/AFL-2.0.html", + "name": "Academic Free License v2.0" + }, + { + "id": "AFL-2.1", + "url": "https://spdx.org/licenses/AFL-2.1.html", + "name": "Academic Free License v2.1" + }, + { + "id": "AFL-3.0", + "url": "https://spdx.org/licenses/AFL-3.0.html", + "name": "Academic Free License v3.0" + }, + { + "id": "AMDPLPA", + "url": "https://spdx.org/licenses/AMDPLPA.html", + "name": "AMD's plpa_map.c License" + }, + { + "id": "AML", + "url": "https://spdx.org/licenses/AML.html", + "name": "Apple MIT License" + }, + { + "id": "AMPAS", + "url": "https://spdx.org/licenses/AMPAS.html", + "name": "Academy of Motion Picture Arts and Sciences BSD" + }, + { + "id": "ANTLR-PD", + "url": "https://spdx.org/licenses/ANTLR-PD.html", + "name": "ANTLR Software Rights Notice" + }, + { + "id": "ANTLR-PD-fallback", + "url": "https://spdx.org/licenses/ANTLR-PD-fallback.html", + "name": "ANTLR Software Rights Notice with license fallback" + }, + { + "id": "Apache-1.0", + "url": "https://spdx.org/licenses/Apache-1.0.html", + "name": "Apache License 1.0" + }, + { + "id": "Apache-1.1", + "url": "https://spdx.org/licenses/Apache-1.1.html", + "name": "Apache License 1.1" + }, + { + "id": "Artistic-2.0", + "url": "https://spdx.org/licenses/Artistic-2.0.html", + "name": "Artistic License 2.0" + }, + { + "id": "Bahyph", + "url": "https://spdx.org/licenses/Bahyph", + "name": "Bahyph License" + }, + { + "id": "Barr", + "url": "https://spdx.org/licenses/Barr.html", + "name": "Barr License" + }, + { + "name": "bcrypt Solar Designer License", + "id": "bcrypt-Solar-Designer", + "url": "https://spdx.org/licenses/bcrypt-Solar-Designer" + }, + { + "id": "BSD-3-Clause", + "url": "https://spdx.org/licenses/BSD-3-Clause.html", + "name": "BSD 3-Clause \"New\" or \"Revised\" License" + }, + { + "id": "BSD-3-Clause-Attribution", + "url": "https://spdx.org/licenses/BSD-3-Clause-Attribution.html", + "name": "BSD with attribution" + }, + { + "id": "BSD-3-Clause-Clear", + "url": "https://spdx.org/licenses/BSD-3-Clause-Clear.html", + "name": "BSD 3-Clause Clear License" + }, + { + "name": "Hewlett-Packard BSD variant license", + "id": "BSD-3-Clause-HP", + "url": "https://spdx.org/licenses/BSD-3-Clause-HP" + }, + { + "id": "BSD-3-Clause-LBNL", + "url": "https://spdx.org/licenses/BSD-3-Clause-LBNL.html", + "name": "Lawrence Berkeley National Labs BSD variant license" + }, + { + "id": "BSD-3-Clause-Modification", + "url": "https://spdx.org/licenses/BSD-3-Clause-Modification.html", + "name": "BSD 3-Clause Modification" + }, + { + "id": "BSD-3-Clause-No-Nuclear-License-2014", + "url": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.html", + "name": "BSD 3-Clause No Nuclear License 2014" + }, + { + "id": "BSD-3-Clause-No-Nuclear-Warranty", + "url": "https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.html", + "name": "BSD 3-Clause No Nuclear Warranty" + }, + { + "id": "BSD-3-Clause-Open-MPI", + "url": "https://spdx.org/licenses/BSD-3-Clause-Open-MPI", + "name": "BSD 3-Clause Open MPI Variant" + }, + { + "name": "BSD 3-Clause Sun Microsystems", + "id": "BSD-3-Clause-Sun", + "url": "https://spdx.org/licenses/BSD-3-Clause-Sun" + }, + { + "id": "BSD-4-Clause", + "url": "https://spdx.org/licenses/BSD-4-Clause.html", + "name": "BSD 4-Clause \"Original\" or \"Old\" License" + }, + { + "id": "BSD-4-Clause-Shortened", + "url": "https://spdx.org/licenses/BSD-4-Clause-Shortened.html", + "name": "BSD 4-Clause Shortened" + }, + { + "id": "BSD-4-Clause-UC", + "url": "https://spdx.org/licenses/BSD-4-Clause-UC.html", + "name": "BSD-4-Clause (University of California-Specific)" + }, + { + "id": "BSD-Source-Code", + "url": "https://spdx.org/licenses/BSD-Source-Code.html", + "name": "BSD Source Code Attribution" + }, + { + "id": "bzip2-1.0.5", + "url": "https://spdx.org/licenses/bzip2-1.0.5.html", + "name": "bzip2 and libbzip2 License v1.0.5" + }, + { + "id": "bzip2-1.0.6", + "url": "https://spdx.org/licenses/bzip2-1.0.6.html", + "name": "bzip2 and libbzip2 License v1.0.6" + }, + { + "id": "CC0-1.0", + "url": "https://spdx.org/licenses/CC0-1.0.html", + "name": "Creative Commons Zero v1.0 Universal" + }, + { + "name": "CFITSIO License", + "id": "CFITSIO", + "url": "https://spdx.org/licenses/CFITSIO" + }, + { + "name": "Clips License", + "id": "Clips", + "url": "https://spdx.org/licenses/Clips" + }, + { + "id": "CNRI-Jython", + "url": "https://spdx.org/licenses/CNRI-Jython.html", + "name": "CNRI Jython License" + }, + { + "id": "CNRI-Python", + "url": "https://spdx.org/licenses/CNRI-Python.html", + "name": "CNRI Python License" + }, + { + "id": "CNRI-Python-GPL-Compatible", + "url": "https://spdx.org/licenses/CNRI-Python-GPL-Compatible.html", + "name": "CNRI Python Open Source GPL Compatible License Agreement" + }, + { + "id": "Cube", + "url": "https://spdx.org/licenses/Cube.html", + "name": "Cube License" + }, + { + "id": "curl", + "url": "https://spdx.org/licenses/curl.html", + "name": "curl License" + }, + { + "id": "eGenix", + "url": "https://spdx.org/licenses/eGenix.html", + "name": "eGenix.com Public License 1.1.0" + }, + { + "id": "Entessa", + "url": "https://spdx.org/licenses/Entessa.html", + "name": "Entessa Public License v1.0" + }, + { + "id": "FTL", + "url": "https://spdx.org/licenses/FTL.html", + "name": "Freetype Project License" + }, + { + "name": "fwlw License", + "id": "fwlw", + "url": "https://spdx.org/licenses/fwlw" + }, + { + "name": "Historical Permission Notice and Disclaimer - Fenneberg-Livingston variant", + "id": "HPND-Fenneberg-Livingston", + "url": "https://spdx.org/licenses/HPND-Fenneberg-Livingston" + }, + { + "name": "Historical Permission Notice and Disclaimer - sell regexpr variant", + "id": "HPND-sell-regexpr", + "url": "https://spdx.org/licenses/HPND-sell-regexpr" + }, + { + "id": "HTMLTIDY", + "url": "https://spdx.org/licenses/HTMLTIDY.html", + "name": "HTML Tidy License" + }, + { + "id": "IBM-pibs", + "url": "https://spdx.org/licenses/IBM-pibs.html", + "name": "IBM PowerPC Initialization and Boot Software" + }, + { + "id": "ICU", + "url": "https://spdx.org/licenses/ICU.html", + "name": "ICU License" + }, + { + "id": "Info-ZIP", + "url": "https://spdx.org/licenses/Info-ZIP.html", + "name": "Info-ZIP License" + }, + { + "id": "Intel", + "url": "https://spdx.org/licenses/Intel.html", + "name": "Intel Open Source License" + }, + { + "id": "JasPer-2.0", + "url": "https://spdx.org/licenses/JasPer-2.0.html", + "name": "JasPer License" + }, + { + "id": "Libpng", + "url": "https://spdx.org/licenses/Libpng.html", + "name": "libpng License" + }, + { + "id": "libpng-2.0", + "url": "https://spdx.org/licenses/libpng-2.0.html", + "name": "PNG Reference Library version 2" + }, + { + "id": "libtiff", + "url": "https://spdx.org/licenses/libtiff.html", + "name": "libtiff License" + }, + { + "id": "LPPL-1.3c", + "url": "https://spdx.org/licenses/LPPL-1.3c.html", + "name": "LaTeX Project Public License v1.3c" + }, + { + "name": "LZMA SDK License (versions 9.22 and beyond)", + "id": "LZMA-SDK-9.22", + "url": "https://spdx.org/licenses/LZMA-SDK-9.22" + }, + { + "id": "MIT-0", + "url": "https://spdx.org/licenses/MIT-0.html", + "name": "MIT No Attribution" + }, + { + "id": "MIT-advertising", + "url": "https://spdx.org/licenses/MIT-advertising.html", + "name": "Enlightenment License (e16)" + }, + { + "id": "MIT-CMU", + "url": "https://spdx.org/licenses/MIT-CMU.html", + "name": "CMU License" + }, + { + "id": "MIT-enna", + "url": "https://spdx.org/licenses/MIT-enna.html", + "name": "enna License" + }, + { + "id": "MIT-feh", + "url": "https://spdx.org/licenses/MIT-feh.html", + "name": "feh License" + }, + { + "id": "MIT-open-group", + "url": "https://spdx.org/licenses/MIT-open-group.html", + "name": "MIT Open Group Variant" + }, + { + "id": "MITNFA", + "url": "https://spdx.org/licenses/MITNFA.html", + "name": "MIT +no-false-attribs license" + }, + { + "id": "MTLL", + "url": "https://spdx.org/licenses/MTLL.html", + "name": "Matrix Template Library License" + }, + { + "id": "MulanPSL-2.0", + "url": "https://spdx.org/licenses/MulanPSL-2.0.html", + "name": "Mulan Permissive Software License, Version 2" + }, + { + "id": "Multics", + "url": "https://spdx.org/licenses/Multics.html", + "name": "Multics License" + }, + { + "id": "Naumen", + "url": "https://spdx.org/licenses/Naumen.html", + "name": "Naumen Public License" + }, + { + "id": "NCSA", + "url": "https://spdx.org/licenses/NCSA.html", + "name": "University of Illinois/NCSA Open Source License" + }, + { + "id": "Net-SNMP", + "url": "https://spdx.org/licenses/Net-SNMP.html", + "name": "Net-SNMP License" + }, + { + "id": "NetCDF", + "url": "https://spdx.org/licenses/NetCDF.html", + "name": "NetCDF license" + }, + { + "name": "NICTA Public Software License, Version 1.0", + "id": "NICTA-1.0", + "url": "https://spdx.org/licenses/NICTA-1.0" + }, + { + "name": "NIST Software License", + "id": "NIST-Software", + "url": "https://spdx.org/licenses/NIST-Software" + }, + { + "id": "NTP", + "url": "https://spdx.org/licenses/NTP.html", + "name": "NTP License" + }, + { + "name": "Open Government Licence - Canada", + "id": "OGL-Canada-2.0", + "url": "https://spdx.org/licenses/OGL-Canada-2.0" + }, + { + "id": "OLDAP-2.0", + "url": "https://spdx.org/licenses/OLDAP-2.0.html", + "name": "Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)" + }, + { + "id": "OLDAP-2.0.1", + "url": "https://spdx.org/licenses/OLDAP-2.0.1.html", + "name": "Open LDAP Public License v2.0.1" + }, + { + "id": "OLDAP-2.1", + "url": "https://spdx.org/licenses/OLDAP-2.1.html", + "name": "Open LDAP Public License v2.1" + }, + { + "id": "OLDAP-2.2", + "url": "https://spdx.org/licenses/OLDAP-2.2.html", + "name": "Open LDAP Public License v2.2" + }, + { + "id": "OLDAP-2.2.1", + "url": "https://spdx.org/licenses/OLDAP-2.2.1.html", + "name": "Open LDAP Public License v2.2.1" + }, + { + "id": "OLDAP-2.2.2", + "url": "https://spdx.org/licenses/OLDAP-2.2.2.html", + "name": "Open LDAP Public License 2.2.2" + }, + { + "id": "OLDAP-2.3", + "url": "https://spdx.org/licenses/OLDAP-2.3.html", + "name": "Open LDAP Public License v2.3" + }, + { + "id": "OLDAP-2.4", + "url": "https://spdx.org/licenses/OLDAP-2.4.html", + "name": "Open LDAP Public License v2.4" + }, + { + "id": "OLDAP-2.5", + "url": "https://spdx.org/licenses/OLDAP-2.5.html", + "name": "Open LDAP Public License v2.5" + }, + { + "id": "OLDAP-2.6", + "url": "https://spdx.org/licenses/OLDAP-2.6.html", + "name": "Open LDAP Public License v2.6" + }, + { + "id": "OLDAP-2.7", + "url": "https://spdx.org/licenses/OLDAP-2.7.html", + "name": "Open LDAP Public License v2.7" + }, + { + "id": "OLDAP-2.8", + "url": "https://spdx.org/licenses/OLDAP-2.8.html", + "name": "Open LDAP Public License v2.8" + }, + { + "id": "OML", + "url": "https://spdx.org/licenses/OML.html", + "name": "Open Market License" + }, + { + "id": "OpenSSL", + "url": "https://spdx.org/licenses/OpenSSL.html", + "name": "OpenSSL License" + }, + { + "id": "PHP-3.0", + "url": "https://spdx.org/licenses/PHP-3.0.html", + "name": "PHP License v3.0" + }, + { + "id": "PHP-3.01", + "url": "https://spdx.org/licenses/PHP-3.01.html", + "name": "PHP License v3.01" + }, + { + "id": "Plexus", + "url": "https://spdx.org/licenses/Plexus.html", + "name": "Plexus Classworlds License" + }, + { + "id": "PSF-2.0", + "url": "https://spdx.org/licenses/PSF-2.0.html", + "name": "Python Software Foundation License 2.0" + }, + { + "id": "Python-2.0", + "url": "https://spdx.org/licenses/Python-2.0.html", + "name": "Python License 2.0" + }, + { + "id": "Ruby", + "url": "https://spdx.org/licenses/Ruby.html", + "name": "Ruby License" + }, + { + "id": "Saxpath", + "url": "https://spdx.org/licenses/Saxpath.html", + "name": "Saxpath License" + }, + { + "id": "SGI-B-2.0", + "url": "https://spdx.org/licenses/SGI-B-2.0.html", + "name": "SGI Free Software License B v2.0" + }, + { + "id": "SMLNJ", + "url": "https://spdx.org/licenses/SMLNJ.html", + "name": "Standard ML of New Jersey License" + }, + { + "name": "SunPro License", + "id": "SunPro", + "url": "https://spdx.org/licenses/SunPro" + }, + { + "id": "SWL", + "url": "https://spdx.org/licenses/SWL.html", + "name": "Scheme Widget Library (SWL) Software License Agreement" + }, + { + "name": "Symlinks License", + "id": "Symlinks", + "url": "https://spdx.org/licenses/Symlinks" + }, + { + "id": "TCL", + "url": "https://spdx.org/licenses/TCL.html", + "name": "TCL/TK License" + }, + { + "id": "TCP-wrappers", + "url": "https://spdx.org/licenses/TCP-wrappers.html", + "name": "TCP Wrappers License" + }, + { + "name": "UCAR License", + "id": "UCAR", + "url": "https://spdx.org/licenses/UCAR" + }, + { + "id": "Unicode-DFS-2015", + "url": "https://spdx.org/licenses/Unicode-DFS-2015.html", + "name": "Unicode License Agreement - Data Files and Software (2015)" + }, + { + "id": "Unicode-DFS-2016", + "url": "https://spdx.org/licenses/Unicode-DFS-2016.html", + "name": "Unicode License Agreement - Data Files and Software (2016)" + }, + { + "name": "UnixCrypt License", + "id": "UnixCrypt", + "url": "https://spdx.org/licenses/UnixCrypt" + }, + { + "id": "Unlicense", + "url": "https://spdx.org/licenses/Unlicense.html", + "name": "The Unlicense" + }, + { + "id": "VSL-1.0", + "url": "https://spdx.org/licenses/VSL-1.0.html", + "name": "Vovida Software License v1.0" + }, + { + "id": "W3C", + "url": "https://spdx.org/licenses/W3C.html", + "name": "W3C Software Notice and License (2002-12-31)" + }, + { + "id": "X11", + "url": "https://spdx.org/licenses/X11.html", + "name": "X11 License" + }, + { + "id": "XFree86-1.1", + "url": "https://spdx.org/licenses/XFree86-1.1.html", + "name": "XFree86 License 1.1" + }, + { + "name": "xlock License", + "id": "xlock", + "url": "https://spdx.org/licenses/xlock" + }, + { + "id": "Xnet", + "url": "https://spdx.org/licenses/Xnet.html", + "name": "X.Net License" + }, + { + "id": "xpp", + "url": "https://spdx.org/licenses/xpp.html", + "name": "XPP License" + }, + { + "id": "Zlib", + "url": "https://spdx.org/licenses/Zlib.html", + "name": "zlib License" + }, + { + "id": "zlib-acknowledgement", + "url": "https://spdx.org/licenses/zlib-acknowledgement.html", + "name": "zlib/libpng License with Acknowledgement" + }, + { + "id": "ZPL-2.0", + "url": "https://spdx.org/licenses/ZPL-2.0.html", + "name": "Zope Public License 2.0" + }, + { + "id": "ZPL-2.1", + "url": "https://spdx.org/licenses/ZPL-2.1.html", + "name": "Zope Public License 2.1" + } + ] + }, + { + "name": "Lead", + "notes": "These licenses lack one or more essential elements of permissive open software licenses or impose unusually burdensome requirements. Many use unclear, jocular, or incomplete language.", + "licenses": [ + { + "id": "AAL", + "url": "https://spdx.org/licenses/AAL.html", + "name": "Attribution Assurance License" + }, + { + "id": "Adobe-2006", + "url": "https://spdx.org/licenses/Adobe-2006", + "name": "Adobe Systems Incorporated Source Code License Agreement" + }, + { + "id": "Afmparse", + "url": "https://spdx.org/licenses/Afmparse.html", + "name": "Afmparse License" + }, + { + "id": "Artistic-1.0", + "url": "https://spdx.org/licenses/Artistic-1.0.html", + "name": "Artistic License 1.0" + }, + { + "id": "Artistic-1.0-cl8", + "url": "https://spdx.org/licenses/Artistic-1.0-cl8.html", + "name": "Artistic License 1.0 w/clause 8" + }, + { + "id": "Artistic-1.0-Perl", + "url": "https://spdx.org/licenses/Artistic-1.0-Perl.html", + "name": "Artistic License 1.0 (Perl)" + }, + { + "id": "Beerware", + "url": "https://spdx.org/licenses/Beerware.html", + "name": "Beerware License" + }, + { + "id": "blessing", + "url": "https://spdx.org/licenses/blessing.html", + "name": "SQLite Blessing" + }, + { + "id": "Borceux", + "url": "https://spdx.org/licenses/Borceux.html", + "name": "Borceux license" + }, + { + "name": "BSD 2-Clause - Ian Darwin variant", + "id": "BSD-2-Clause-Darwin", + "url": "https://spdx.org/licenses/BSD-2-Clause-Darwin" + }, + { + "id": "CECILL-B", + "url": "https://spdx.org/licenses/CECILL-B.html", + "name": "CeCILL-B Free Software License Agreement" + }, + { + "name": "check-cvs License", + "id": "check-cvs", + "url": "https://spdx.org/licenses/check-cvs" + }, + { + "id": "ClArtistic", + "url": "https://spdx.org/licenses/ClArtistic.html", + "name": "Clarified Artistic License" + }, + { + "id": "Condor-1.1", + "url": "https://spdx.org/licenses/Condor-1.1.html", + "name": "Condor Public License v1.1" + }, + { + "id": "Crossword", + "url": "https://spdx.org/licenses/Crossword.html", + "name": "Crossword License" + }, + { + "id": "CrystalStacker", + "url": "https://spdx.org/licenses/CrystalStacker.html", + "name": "CrystalStacker License" + }, + { + "id": "diffmark", + "url": "https://spdx.org/licenses/diffmark.html", + "name": "diffmark license" + }, + { + "id": "DOC", + "url": "https://spdx.org/licenses/DOC.html", + "name": "DOC License" + }, + { + "id": "EFL-1.0", + "url": "https://spdx.org/licenses/EFL-1.0.html", + "name": "Eiffel Forum License v1.0" + }, + { + "id": "EFL-2.0", + "url": "https://spdx.org/licenses/EFL-2.0.html", + "name": "Eiffel Forum License v2.0" + }, + { + "id": "Fair", + "url": "https://spdx.org/licenses/Fair.html", + "name": "Fair License" + }, + { + "id": "FSFAP", + "url": "https://spdx.org/licenses/FSFAP.html", + "name": "FSF All Permissive License" + }, + { + "id": "FSFUL", + "url": "https://spdx.org/licenses/FSFUL.html", + "name": "FSF Unlimited License" + }, + { + "id": "FSFULLR", + "url": "https://spdx.org/licenses/FSFULLR.html", + "name": "FSF Unlimited License (with License Retention)" + }, + { + "id": "Giftware", + "url": "https://spdx.org/licenses/Giftware.html", + "name": "Giftware License" + }, + { + "name": "Good Luck With That Public License", + "id": "GLWTPL", + "url": "https://spdx.org/licenses/GLWTPL" + }, + { + "id": "HPND", + "url": "https://spdx.org/licenses/HPND.html", + "name": "Historical Permission Notice and Disclaimer" + }, + { + "name": "HPND with US Government export control warning", + "id": "HPND-export-US", + "url": "https://spdx.org/licenses/HPND-export-US" + }, + { + "id": "IJG", + "url": "https://spdx.org/licenses/IJG.html", + "name": "Independent JPEG Group License" + }, + { + "name": "Independent JPEG Group License - short", + "id": "IJG-short", + "url": "https://spdx.org/licenses/IJG-short" + }, + { + "name": "Jam License", + "id": "Jam", + "url": "https://spdx.org/licenses/Jam" + }, + { + "name": "Kazlib License", + "id": "Kazlib", + "url": "https://spdx.org/licenses/Kazlib" + }, + { + "id": "Leptonica", + "url": "https://spdx.org/licenses/Leptonica.html", + "name": "Leptonica License" + }, + { + "id": "LPL-1.0", + "url": "https://spdx.org/licenses/LPL-1.0.html", + "name": "Lucent Public License Version 1.0" + }, + { + "id": "LPL-1.02", + "url": "https://spdx.org/licenses/LPL-1.02.html", + "name": "Lucent Public License v1.02" + }, + { + "name": "McPhee Slideshow License", + "id": "McPhee-slideshow", + "url": "https://spdx.org/licenses/McPhee-slideshow" + }, + { + "id": "MirOS", + "url": "https://spdx.org/licenses/MirOS.html", + "name": "MirOS License" + }, + { + "id": "mpich2", + "url": "https://spdx.org/licenses/mpich2.html", + "name": "mpich2 License" + }, + { + "name": "Nara Institute of Science and Technology License (2003)", + "id": "NAIST-2003", + "url": "https://spdx.org/licenses/NAIST-2003" + }, + { + "id": "NASA-1.3", + "url": "https://spdx.org/licenses/NASA-1.3.html", + "name": "NASA Open Source Agreement 1.3" + }, + { + "id": "NBPL-1.0", + "url": "https://spdx.org/licenses/NBPL-1.0.html", + "name": "Net Boolean Public License v1" + }, + { + "id": "Newsletr", + "url": "https://spdx.org/licenses/Newsletr.html", + "name": "Newsletr License" + }, + { + "id": "NLPL", + "url": "https://spdx.org/licenses/NLPL.html", + "name": "No Limit Public License" + }, + { + "id": "NRL", + "url": "https://spdx.org/licenses/NRL.html", + "name": "NRL License" + }, + { + "name": "NTP No Attribution", + "id": "NTP-0", + "url": "https://spdx.org/licenses/NTP-0" + }, + { + "name": "OFFIS License", + "id": "OFFIS", + "url": "https://spdx.org/licenses/OFFIS" + }, + { + "id": "OGTSL", + "url": "https://spdx.org/licenses/OGTSL.html", + "name": "Open Group Test Suite License" + }, + { + "id": "OLDAP-1.1", + "url": "https://spdx.org/licenses/OLDAP-1.1.html", + "name": "Open LDAP Public License v1.1" + }, + { + "id": "OLDAP-1.2", + "url": "https://spdx.org/licenses/OLDAP-1.2.html", + "name": "Open LDAP Public License v1.2" + }, + { + "id": "OLDAP-1.3", + "url": "https://spdx.org/licenses/OLDAP-1.3.html", + "name": "Open LDAP Public License v1.3" + }, + { + "id": "OLDAP-1.4", + "url": "https://spdx.org/licenses/OLDAP-1.4.html", + "name": "Open LDAP Public License v1.4" + }, + { + "id": "psutils", + "url": "https://spdx.org/licenses/psutils.html", + "name": "psutils License" + }, + { + "name": "Python ldap License", + "id": "python-ldap", + "url": "https://spdx.org/licenses/python-ldap" + }, + { + "id": "Qhull", + "url": "https://spdx.org/licenses/Qhull.html", + "name": "Qhull License" + }, + { + "id": "Rdisc", + "url": "https://spdx.org/licenses/Rdisc.html", + "name": "Rdisc License" + }, + { + "id": "RSA-MD", + "url": "https://spdx.org/licenses/RSA-MD.html", + "name": "RSA Message-Digest License " + }, + { + "name": "snprintf License", + "id": "snprintf", + "url": "https://spdx.org/licenses/snprintf" + }, + { + "id": "Spencer-86", + "url": "https://spdx.org/licenses/Spencer-86.html", + "name": "Spencer License 86" + }, + { + "id": "Spencer-94", + "url": "https://spdx.org/licenses/Spencer-94.html", + "name": "Spencer License 94" + }, + { + "name": "SSH short notice", + "id": "SSH-short", + "url": "https://spdx.org/licenses/SSH-short" + }, + { + "id": "TU-Berlin-1.0", + "url": "https://spdx.org/licenses/TU-Berlin-1.0.html", + "name": "Technische Universitaet Berlin License 1.0" + }, + { + "id": "TU-Berlin-2.0", + "url": "https://spdx.org/licenses/TU-Berlin-2.0.html", + "name": "Technische Universitaet Berlin License 2.0" + }, + { + "id": "Vim", + "url": "https://spdx.org/licenses/Vim.html", + "name": "Vim License" + }, + { + "id": "W3C-19980720", + "url": "https://spdx.org/licenses/W3C-19980720.html", + "name": "W3C Software Notice and License (1998-07-20)" + }, + { + "id": "W3C-20150513", + "url": "https://spdx.org/licenses/W3C-20150513.html", + "name": "W3C Software Notice and Document License (2015-05-13)" + }, + { + "id": "Wsuipa", + "url": "https://spdx.org/licenses/Wsuipa.html", + "name": "Wsuipa License" + }, + { + "id": "WTFPL", + "url": "https://spdx.org/licenses/WTFPL.html", + "name": "Do What The F*ck You Want To Public License" + }, + { + "id": "xinetd", + "url": "https://spdx.org/licenses/xinetd.html", + "name": "xinetd License" + }, + { + "name": "XSkat License", + "id": "XSkat", + "url": "https://spdx.org/licenses/XSkat" + }, + { + "id": "Zed", + "url": "https://spdx.org/licenses/Zed.html", + "name": "Zed License" + }, + { + "id": "Zend-2.0", + "url": "https://spdx.org/licenses/Zend-2.0.html", + "name": "Zend License v2.0" + }, + { + "id": "ZPL-1.1", + "url": "https://spdx.org/licenses/ZPL-1.1.html", + "name": "Zope Public License 1.1" + } + ] + } +]; +//#endregion +//#region index.ts +const ALLOWED_STATUSES = /* @__PURE__ */ new Set([ + "Model", + "Gold", + "Silver", + "Bronze" +]); +const ADDITIONAL_ALLOWED = /* @__PURE__ */ new Set([ + "(BSD-3-Clause OR GPL-2.0)", + "CC-BY-3.0", + "CC-BY-4.0" +]); +const ALLOWED_LICENSES = new Set(list_default.filter(({ name }) => ALLOWED_STATUSES.has(name)).flatMap(({ licenses }) => licenses).map(({ id }) => id)).union(ADDITIONAL_ALLOWED); +const ALLOWED_UNKNOWN = ["spawndamnit", "callsite"]; +function packageInfoToString(pkg) { + const suffix = pkg.versions.length > 1 ? `{${pkg.versions.join(", ")}}` : pkg.versions[0] || ""; + return `${pkg.name}@${suffix}`; +} +function isSapDependency(dependency) { + const [scope] = dependency.split("/"); + return scope === "@sap" || scope === "@sap-cloud-sdk" || scope === "@sap-ai-sdk"; +} +function isAllowedPackage(license, pkg) { + return isSapDependency(pkg.name) || license === "Unknown" && ALLOWED_UNKNOWN.includes(pkg.name) || ALLOWED_LICENSES.has(license); +} +function getDisallowedPackages(licenseMap) { + return Object.entries(licenseMap).flatMap(([license, packages]) => packages.filter((pkg) => !isAllowedPackage(license, pkg)).map((pkg) => ({ + license, + pkg + }))); +} +function buildErrorMessage(disallowedPackages) { + const disallowedLicenseMessages = disallowedPackages.map(({ license, pkg }) => `Disallowed license "${license}" used by: ${packageInfoToString(pkg)}`); + return `Found ${disallowedPackages.length} disallowed licenses:\n${disallowedLicenseMessages.join("\n")}`; +} +function checkLicenses() { + const json = execFileSync("pnpm", [ + "licenses", + "list", + "--prod", + "--json" + ], { + encoding: "utf8", + maxBuffer: 10 * 1024 * 1024 + }); + const disallowedPackages = getDisallowedPackages(JSON.parse(json)); + if (disallowedPackages.length) { + setFailed(buildErrorMessage(disallowedPackages)); + return; + } + info("All production dependency licenses are acceptable."); +} +checkLicenses(); +//#endregion +export {}; diff --git a/.github/actions/check-license/index.js b/.github/actions/check-license/index.js deleted file mode 100644 index 1392598b0c..0000000000 --- a/.github/actions/check-license/index.js +++ /dev/null @@ -1,30989 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* unused reexport */ __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -__webpack_unused_export__ = httpOverHttp; -__webpack_unused_export__ = httpsOverHttp; -__webpack_unused_export__ = httpOverHttps; -__webpack_unused_export__ = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -__webpack_unused_export__ = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -__webpack_unused_export__ = Dispatcher -__webpack_unused_export__ = Client -__webpack_unused_export__ = Pool -__webpack_unused_export__ = BalancedPool -__webpack_unused_export__ = Agent -__webpack_unused_export__ = ProxyAgent -__webpack_unused_export__ = EnvHttpProxyAgent -__webpack_unused_export__ = RetryAgent -__webpack_unused_export__ = RetryHandler - -__webpack_unused_export__ = DecoratorHandler -__webpack_unused_export__ = RedirectHandler -__webpack_unused_export__ = createRedirectInterceptor -__webpack_unused_export__ = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -__webpack_unused_export__ = buildConnector -__webpack_unused_export__ = errors -__webpack_unused_export__ = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -__webpack_unused_export__ = setGlobalDispatcher -__webpack_unused_export__ = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -__webpack_unused_export__ = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -/* unused reexport */ __nccwpck_require__(9822).Headers -/* unused reexport */ __nccwpck_require__(8661).Response -/* unused reexport */ __nccwpck_require__(6465).Request -/* unused reexport */ __nccwpck_require__(9976).FormData -__webpack_unused_export__ = globalThis.File ?? (__nccwpck_require__(4573).File) -/* unused reexport */ __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -__webpack_unused_export__ = setGlobalOrigin -__webpack_unused_export__ = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -__webpack_unused_export__ = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -__webpack_unused_export__ = deleteCookie -__webpack_unused_export__ = getCookies -__webpack_unused_export__ = getSetCookies -__webpack_unused_export__ = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -__webpack_unused_export__ = parseMIMEType -__webpack_unused_export__ = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -/* unused reexport */ __nccwpck_require__(7976).WebSocket -__webpack_unused_export__ = CloseEvent -__webpack_unused_export__ = ErrorEvent -__webpack_unused_export__ = MessageEvent - -__webpack_unused_export__ = makeDispatcher(api.request) -__webpack_unused_export__ = makeDispatcher(api.stream) -__webpack_unused_export__ = makeDispatcher(api.pipeline) -__webpack_unused_export__ = makeDispatcher(api.connect) -__webpack_unused_export__ = makeDispatcher(api.upgrade) - -__webpack_unused_export__ = MockClient -__webpack_unused_export__ = MockPool -__webpack_unused_export__ = MockAgent -__webpack_unused_export__ = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -__webpack_unused_export__ = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAA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gELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMB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EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl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gcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAF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ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcE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WohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFq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AgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw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ACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTY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AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; - -;// CONCATENATED MODULE: external "node:child_process" -const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:child_process"); -;// CONCATENATED MODULE: external "os" -const external_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_namespaceObject.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -;// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); -;// CONCATENATED MODULE: external "fs" -const external_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -;// CONCATENATED MODULE: external "path" -const external_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_namespaceObject.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_namespaceObject.constants.R_OK | external_fs_namespaceObject.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_namespaceObject.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -;// CONCATENATED MODULE: external "child_process" -const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_namespaceObject.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_namespaceObject.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_namespaceObject.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_namespaceObject.dirname(filePath); - const upperName = external_path_namespaceObject.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_namespaceObject.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_namespaceObject.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_namespaceObject.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_namespaceObject.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_namespaceObject.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_namespaceObject.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_namespaceObject.EOL.length); - n = s.indexOf(external_os_namespaceObject.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_namespaceObject.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_namespaceObject.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_namespaceObject.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_namespaceObject.platform(); -const arch = external_os_namespaceObject.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - issueCommand('set-output', { name }, toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + external_os_namespaceObject.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@blueoak+list@15.0.0/node_modules/@blueoak/list/index.json -const list_namespaceObject = /*#__PURE__*/JSON.parse('[{"name":"Model","notes":"The model license demonstrates all the characteristics the council looks for in a permissive open software license.","licenses":[{"name":"Blue Oak Model License 1.0.0","id":"BlueOak-1.0.0","url":"https://blueoakcouncil.org/license/1.0.0"}]},{"name":"Gold","notes":"These licenses address patents explicitly, use robust language, and require only simple notice of license terms and copyright notices.","licenses":[{"name":"BSD-2-Clause Plus Patent License","id":"BSD-2-Clause-Patent","url":"https://spdx.org/licenses/BSD-2-Clause-Patent.html"}]},{"name":"Silver","notes":"These licenses use robust language but either fail to address patents explicitly or require more than simple notice of license terms and copyright notices.","licenses":[{"name":"Amazon Digital Services License","id":"ADSL","url":"https://spdx.org/licenses/ADSL.html"},{"name":"Apache License 2.0","id":"Apache-2.0","url":"https://spdx.org/licenses/Apache-2.0.html"},{"name":"Adobe Postscript AFM License","id":"APAFML","url":"https://spdx.org/licenses/APAFML.html"},{"name":"BSD 1-Clause License","id":"BSD-1-Clause","url":"https://spdx.org/licenses/BSD-1-Clause.html"},{"name":"BSD 2-Clause \\"Simplified\\" License","id":"BSD-2-Clause","url":"https://spdx.org/licenses/BSD-2-Clause.html"},{"name":"BSD 2-Clause FreeBSD License","id":"BSD-2-Clause-FreeBSD","url":"https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html"},{"name":"BSD 2-Clause NetBSD License","id":"BSD-2-Clause-NetBSD","url":"https://spdx.org/licenses/BSD-2-Clause-NetBSD.html"},{"name":"BSD 2-Clause with Views Sentence","id":"BSD-2-Clause-Views","url":"https://spdx.org/licenses/BSD-2-Clause-Views.html"},{"name":"Boost Software License 1.0","id":"BSL-1.0","url":"https://spdx.org/licenses/BSL-1.0.html"},{"name":"DSDP License","id":"DSDP","url":"https://spdx.org/licenses/DSDP.html"},{"name":"Educational Community License v1.0","id":"ECL-1.0","url":"https://spdx.org/licenses/ECL-1.0.html"},{"name":"Educational Community License v2.0","id":"ECL-2.0","url":"https://spdx.org/licenses/ECL-2.0.html"},{"name":"hdparm License","id":"hdparm","url":"https://spdx.org/licenses/hdparm"},{"name":"ImageMagick License","id":"ImageMagick","url":"https://spdx.org/licenses/ImageMagick.html"},{"name":"Intel ACPI Software License Agreement","id":"Intel-ACPI","url":"https://spdx.org/licenses/Intel-ACPI"},{"name":"ISC License","id":"ISC","url":"https://spdx.org/licenses/ISC.html"},{"name":"Linux Kernel Variant of OpenIB.org license","id":"Linux-OpenIB","url":"https://spdx.org/licenses/Linux-OpenIB.html"},{"name":"MIT License","id":"MIT","url":"https://spdx.org/licenses/MIT.html"},{"name":"MIT License Modern Variant","id":"MIT-Modern-Variant","url":"https://spdx.org/licenses/MIT-Modern-Variant.html"},{"name":"MIT testregex Variant","id":"MIT-testregex","url":"https://spdx.org/licenses/MIT-testregex"},{"name":"MIT Tom Wu Variant","id":"MIT-Wu","url":"https://spdx.org/licenses/MIT-Wu"},{"name":"Microsoft Public License","id":"MS-PL","url":"https://spdx.org/licenses/MS-PL.html"},{"id":"MulanPSL-1.0","url":"https://spdx.org/licenses/MulanPSL-1.0.html","name":"Mulan Permissive Software License, Version 1"},{"name":"Mup License","id":"Mup","url":"https://spdx.org/licenses/Mup.html"},{"name":"PostgreSQL License","id":"PostgreSQL","url":"https://spdx.org/licenses/PostgreSQL.html"},{"name":"Solderpad Hardware License v0.5","id":"SHL-0.5","url":"https://spdx.org/licenses/SHL-0.5"},{"name":"Spencer License 99","id":"Spencer-99","url":"https://spdx.org/licenses/Spencer-99.html"},{"name":"Universal Permissive License v1.0","id":"UPL-1.0","url":"https://spdx.org/licenses/UPL-1.0.html"},{"name":"Xerox License","id":"Xerox","url":"https://spdx.org/licenses/Xerox.html"},{"name":"Xfig License","id":"Xfig","url":"https://spdx.org/licenses/Xfig"}]},{"name":"Bronze","notes":"These licenses lack important but nonessential elements of permissive open software licenses or impose additional requirements or restrictions, such as BSD-style prohibitions against endorsement and promotion.","licenses":[{"id":"0BSD","url":"https://spdx.org/licenses/0BSD.html","name":"BSD Zero Clause License"},{"id":"AFL-1.1","url":"https://spdx.org/licenses/AFL-1.1.html","name":"Academic Free License v1.1"},{"id":"AFL-1.2","url":"https://spdx.org/licenses/AFL-1.2.html","name":"Academic Free License v1.2"},{"id":"AFL-2.0","url":"https://spdx.org/licenses/AFL-2.0.html","name":"Academic Free License v2.0"},{"id":"AFL-2.1","url":"https://spdx.org/licenses/AFL-2.1.html","name":"Academic Free License v2.1"},{"id":"AFL-3.0","url":"https://spdx.org/licenses/AFL-3.0.html","name":"Academic Free License v3.0"},{"id":"AMDPLPA","url":"https://spdx.org/licenses/AMDPLPA.html","name":"AMD\'s plpa_map.c License"},{"id":"AML","url":"https://spdx.org/licenses/AML.html","name":"Apple MIT License"},{"id":"AMPAS","url":"https://spdx.org/licenses/AMPAS.html","name":"Academy of Motion Picture Arts and Sciences BSD"},{"id":"ANTLR-PD","url":"https://spdx.org/licenses/ANTLR-PD.html","name":"ANTLR Software Rights Notice"},{"id":"ANTLR-PD-fallback","url":"https://spdx.org/licenses/ANTLR-PD-fallback.html","name":"ANTLR Software Rights Notice with license fallback"},{"id":"Apache-1.0","url":"https://spdx.org/licenses/Apache-1.0.html","name":"Apache License 1.0"},{"id":"Apache-1.1","url":"https://spdx.org/licenses/Apache-1.1.html","name":"Apache License 1.1"},{"id":"Artistic-2.0","url":"https://spdx.org/licenses/Artistic-2.0.html","name":"Artistic License 2.0"},{"id":"Bahyph","url":"https://spdx.org/licenses/Bahyph","name":"Bahyph License"},{"id":"Barr","url":"https://spdx.org/licenses/Barr.html","name":"Barr License"},{"name":"bcrypt Solar Designer License","id":"bcrypt-Solar-Designer","url":"https://spdx.org/licenses/bcrypt-Solar-Designer"},{"id":"BSD-3-Clause","url":"https://spdx.org/licenses/BSD-3-Clause.html","name":"BSD 3-Clause \\"New\\" or \\"Revised\\" License"},{"id":"BSD-3-Clause-Attribution","url":"https://spdx.org/licenses/BSD-3-Clause-Attribution.html","name":"BSD with attribution"},{"id":"BSD-3-Clause-Clear","url":"https://spdx.org/licenses/BSD-3-Clause-Clear.html","name":"BSD 3-Clause Clear License"},{"name":"Hewlett-Packard BSD variant license","id":"BSD-3-Clause-HP","url":"https://spdx.org/licenses/BSD-3-Clause-HP"},{"id":"BSD-3-Clause-LBNL","url":"https://spdx.org/licenses/BSD-3-Clause-LBNL.html","name":"Lawrence Berkeley National Labs BSD variant license"},{"id":"BSD-3-Clause-Modification","url":"https://spdx.org/licenses/BSD-3-Clause-Modification.html","name":"BSD 3-Clause Modification"},{"id":"BSD-3-Clause-No-Nuclear-License-2014","url":"https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-License-2014.html","name":"BSD 3-Clause No Nuclear License 2014"},{"id":"BSD-3-Clause-No-Nuclear-Warranty","url":"https://spdx.org/licenses/BSD-3-Clause-No-Nuclear-Warranty.html","name":"BSD 3-Clause No Nuclear Warranty"},{"id":"BSD-3-Clause-Open-MPI","url":"https://spdx.org/licenses/BSD-3-Clause-Open-MPI","name":"BSD 3-Clause Open MPI Variant"},{"name":"BSD 3-Clause Sun Microsystems","id":"BSD-3-Clause-Sun","url":"https://spdx.org/licenses/BSD-3-Clause-Sun"},{"id":"BSD-4-Clause","url":"https://spdx.org/licenses/BSD-4-Clause.html","name":"BSD 4-Clause \\"Original\\" or \\"Old\\" License"},{"id":"BSD-4-Clause-Shortened","url":"https://spdx.org/licenses/BSD-4-Clause-Shortened.html","name":"BSD 4-Clause Shortened"},{"id":"BSD-4-Clause-UC","url":"https://spdx.org/licenses/BSD-4-Clause-UC.html","name":"BSD-4-Clause (University of California-Specific)"},{"id":"BSD-Source-Code","url":"https://spdx.org/licenses/BSD-Source-Code.html","name":"BSD Source Code Attribution"},{"id":"bzip2-1.0.5","url":"https://spdx.org/licenses/bzip2-1.0.5.html","name":"bzip2 and libbzip2 License v1.0.5"},{"id":"bzip2-1.0.6","url":"https://spdx.org/licenses/bzip2-1.0.6.html","name":"bzip2 and libbzip2 License v1.0.6"},{"id":"CC0-1.0","url":"https://spdx.org/licenses/CC0-1.0.html","name":"Creative Commons Zero v1.0 Universal"},{"name":"CFITSIO License","id":"CFITSIO","url":"https://spdx.org/licenses/CFITSIO"},{"name":"Clips License","id":"Clips","url":"https://spdx.org/licenses/Clips"},{"id":"CNRI-Jython","url":"https://spdx.org/licenses/CNRI-Jython.html","name":"CNRI Jython License"},{"id":"CNRI-Python","url":"https://spdx.org/licenses/CNRI-Python.html","name":"CNRI Python License"},{"id":"CNRI-Python-GPL-Compatible","url":"https://spdx.org/licenses/CNRI-Python-GPL-Compatible.html","name":"CNRI Python Open Source GPL Compatible License Agreement"},{"id":"Cube","url":"https://spdx.org/licenses/Cube.html","name":"Cube License"},{"id":"curl","url":"https://spdx.org/licenses/curl.html","name":"curl License"},{"id":"eGenix","url":"https://spdx.org/licenses/eGenix.html","name":"eGenix.com Public License 1.1.0"},{"id":"Entessa","url":"https://spdx.org/licenses/Entessa.html","name":"Entessa Public License v1.0"},{"id":"FTL","url":"https://spdx.org/licenses/FTL.html","name":"Freetype Project License"},{"name":"fwlw License","id":"fwlw","url":"https://spdx.org/licenses/fwlw"},{"name":"Historical Permission Notice and Disclaimer - Fenneberg-Livingston variant","id":"HPND-Fenneberg-Livingston","url":"https://spdx.org/licenses/HPND-Fenneberg-Livingston"},{"name":"Historical Permission Notice and Disclaimer - sell regexpr variant","id":"HPND-sell-regexpr","url":"https://spdx.org/licenses/HPND-sell-regexpr"},{"id":"HTMLTIDY","url":"https://spdx.org/licenses/HTMLTIDY.html","name":"HTML Tidy License"},{"id":"IBM-pibs","url":"https://spdx.org/licenses/IBM-pibs.html","name":"IBM PowerPC Initialization and Boot Software"},{"id":"ICU","url":"https://spdx.org/licenses/ICU.html","name":"ICU License"},{"id":"Info-ZIP","url":"https://spdx.org/licenses/Info-ZIP.html","name":"Info-ZIP License"},{"id":"Intel","url":"https://spdx.org/licenses/Intel.html","name":"Intel Open Source License"},{"id":"JasPer-2.0","url":"https://spdx.org/licenses/JasPer-2.0.html","name":"JasPer License"},{"id":"Libpng","url":"https://spdx.org/licenses/Libpng.html","name":"libpng License"},{"id":"libpng-2.0","url":"https://spdx.org/licenses/libpng-2.0.html","name":"PNG Reference Library version 2"},{"id":"libtiff","url":"https://spdx.org/licenses/libtiff.html","name":"libtiff License"},{"id":"LPPL-1.3c","url":"https://spdx.org/licenses/LPPL-1.3c.html","name":"LaTeX Project Public License v1.3c"},{"name":"LZMA SDK License (versions 9.22 and beyond)","id":"LZMA-SDK-9.22","url":"https://spdx.org/licenses/LZMA-SDK-9.22"},{"id":"MIT-0","url":"https://spdx.org/licenses/MIT-0.html","name":"MIT No Attribution"},{"id":"MIT-advertising","url":"https://spdx.org/licenses/MIT-advertising.html","name":"Enlightenment License (e16)"},{"id":"MIT-CMU","url":"https://spdx.org/licenses/MIT-CMU.html","name":"CMU License"},{"id":"MIT-enna","url":"https://spdx.org/licenses/MIT-enna.html","name":"enna License"},{"id":"MIT-feh","url":"https://spdx.org/licenses/MIT-feh.html","name":"feh License"},{"id":"MIT-open-group","url":"https://spdx.org/licenses/MIT-open-group.html","name":"MIT Open Group Variant"},{"id":"MITNFA","url":"https://spdx.org/licenses/MITNFA.html","name":"MIT +no-false-attribs license"},{"id":"MTLL","url":"https://spdx.org/licenses/MTLL.html","name":"Matrix Template Library License"},{"id":"MulanPSL-2.0","url":"https://spdx.org/licenses/MulanPSL-2.0.html","name":"Mulan Permissive Software License, Version 2"},{"id":"Multics","url":"https://spdx.org/licenses/Multics.html","name":"Multics License"},{"id":"Naumen","url":"https://spdx.org/licenses/Naumen.html","name":"Naumen Public License"},{"id":"NCSA","url":"https://spdx.org/licenses/NCSA.html","name":"University of Illinois/NCSA Open Source License"},{"id":"Net-SNMP","url":"https://spdx.org/licenses/Net-SNMP.html","name":"Net-SNMP License"},{"id":"NetCDF","url":"https://spdx.org/licenses/NetCDF.html","name":"NetCDF license"},{"name":"NICTA Public Software License, Version 1.0","id":"NICTA-1.0","url":"https://spdx.org/licenses/NICTA-1.0"},{"name":"NIST Software License","id":"NIST-Software","url":"https://spdx.org/licenses/NIST-Software"},{"id":"NTP","url":"https://spdx.org/licenses/NTP.html","name":"NTP License"},{"name":"Open Government Licence - Canada","id":"OGL-Canada-2.0","url":"https://spdx.org/licenses/OGL-Canada-2.0"},{"id":"OLDAP-2.0","url":"https://spdx.org/licenses/OLDAP-2.0.html","name":"Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B)"},{"id":"OLDAP-2.0.1","url":"https://spdx.org/licenses/OLDAP-2.0.1.html","name":"Open LDAP Public License v2.0.1"},{"id":"OLDAP-2.1","url":"https://spdx.org/licenses/OLDAP-2.1.html","name":"Open LDAP Public License v2.1"},{"id":"OLDAP-2.2","url":"https://spdx.org/licenses/OLDAP-2.2.html","name":"Open LDAP Public License v2.2"},{"id":"OLDAP-2.2.1","url":"https://spdx.org/licenses/OLDAP-2.2.1.html","name":"Open LDAP Public License v2.2.1"},{"id":"OLDAP-2.2.2","url":"https://spdx.org/licenses/OLDAP-2.2.2.html","name":"Open LDAP Public License 2.2.2"},{"id":"OLDAP-2.3","url":"https://spdx.org/licenses/OLDAP-2.3.html","name":"Open LDAP Public License v2.3"},{"id":"OLDAP-2.4","url":"https://spdx.org/licenses/OLDAP-2.4.html","name":"Open LDAP Public License v2.4"},{"id":"OLDAP-2.5","url":"https://spdx.org/licenses/OLDAP-2.5.html","name":"Open LDAP Public License v2.5"},{"id":"OLDAP-2.6","url":"https://spdx.org/licenses/OLDAP-2.6.html","name":"Open LDAP Public License v2.6"},{"id":"OLDAP-2.7","url":"https://spdx.org/licenses/OLDAP-2.7.html","name":"Open LDAP Public License v2.7"},{"id":"OLDAP-2.8","url":"https://spdx.org/licenses/OLDAP-2.8.html","name":"Open LDAP Public License v2.8"},{"id":"OML","url":"https://spdx.org/licenses/OML.html","name":"Open Market License"},{"id":"OpenSSL","url":"https://spdx.org/licenses/OpenSSL.html","name":"OpenSSL License"},{"id":"PHP-3.0","url":"https://spdx.org/licenses/PHP-3.0.html","name":"PHP License v3.0"},{"id":"PHP-3.01","url":"https://spdx.org/licenses/PHP-3.01.html","name":"PHP License v3.01"},{"id":"Plexus","url":"https://spdx.org/licenses/Plexus.html","name":"Plexus Classworlds License"},{"id":"PSF-2.0","url":"https://spdx.org/licenses/PSF-2.0.html","name":"Python Software Foundation License 2.0"},{"id":"Python-2.0","url":"https://spdx.org/licenses/Python-2.0.html","name":"Python License 2.0"},{"id":"Ruby","url":"https://spdx.org/licenses/Ruby.html","name":"Ruby License"},{"id":"Saxpath","url":"https://spdx.org/licenses/Saxpath.html","name":"Saxpath License"},{"id":"SGI-B-2.0","url":"https://spdx.org/licenses/SGI-B-2.0.html","name":"SGI Free Software License B v2.0"},{"id":"SMLNJ","url":"https://spdx.org/licenses/SMLNJ.html","name":"Standard ML of New Jersey License"},{"name":"SunPro License","id":"SunPro","url":"https://spdx.org/licenses/SunPro"},{"id":"SWL","url":"https://spdx.org/licenses/SWL.html","name":"Scheme Widget Library (SWL) Software License Agreement"},{"name":"Symlinks License","id":"Symlinks","url":"https://spdx.org/licenses/Symlinks"},{"id":"TCL","url":"https://spdx.org/licenses/TCL.html","name":"TCL/TK License"},{"id":"TCP-wrappers","url":"https://spdx.org/licenses/TCP-wrappers.html","name":"TCP Wrappers License"},{"name":"UCAR License","id":"UCAR","url":"https://spdx.org/licenses/UCAR"},{"id":"Unicode-DFS-2015","url":"https://spdx.org/licenses/Unicode-DFS-2015.html","name":"Unicode License Agreement - Data Files and Software (2015)"},{"id":"Unicode-DFS-2016","url":"https://spdx.org/licenses/Unicode-DFS-2016.html","name":"Unicode License Agreement - Data Files and Software (2016)"},{"name":"UnixCrypt License","id":"UnixCrypt","url":"https://spdx.org/licenses/UnixCrypt"},{"id":"Unlicense","url":"https://spdx.org/licenses/Unlicense.html","name":"The Unlicense"},{"id":"VSL-1.0","url":"https://spdx.org/licenses/VSL-1.0.html","name":"Vovida Software License v1.0"},{"id":"W3C","url":"https://spdx.org/licenses/W3C.html","name":"W3C Software Notice and License (2002-12-31)"},{"id":"X11","url":"https://spdx.org/licenses/X11.html","name":"X11 License"},{"id":"XFree86-1.1","url":"https://spdx.org/licenses/XFree86-1.1.html","name":"XFree86 License 1.1"},{"name":"xlock License","id":"xlock","url":"https://spdx.org/licenses/xlock"},{"id":"Xnet","url":"https://spdx.org/licenses/Xnet.html","name":"X.Net License"},{"id":"xpp","url":"https://spdx.org/licenses/xpp.html","name":"XPP License"},{"id":"Zlib","url":"https://spdx.org/licenses/Zlib.html","name":"zlib License"},{"id":"zlib-acknowledgement","url":"https://spdx.org/licenses/zlib-acknowledgement.html","name":"zlib/libpng License with Acknowledgement"},{"id":"ZPL-2.0","url":"https://spdx.org/licenses/ZPL-2.0.html","name":"Zope Public License 2.0"},{"id":"ZPL-2.1","url":"https://spdx.org/licenses/ZPL-2.1.html","name":"Zope Public License 2.1"}]},{"name":"Lead","notes":"These licenses lack one or more essential elements of permissive open software licenses or impose unusually burdensome requirements. Many use unclear, jocular, or incomplete language.","licenses":[{"id":"AAL","url":"https://spdx.org/licenses/AAL.html","name":"Attribution Assurance License"},{"id":"Adobe-2006","url":"https://spdx.org/licenses/Adobe-2006","name":"Adobe Systems Incorporated Source Code License Agreement"},{"id":"Afmparse","url":"https://spdx.org/licenses/Afmparse.html","name":"Afmparse License"},{"id":"Artistic-1.0","url":"https://spdx.org/licenses/Artistic-1.0.html","name":"Artistic License 1.0"},{"id":"Artistic-1.0-cl8","url":"https://spdx.org/licenses/Artistic-1.0-cl8.html","name":"Artistic License 1.0 w/clause 8"},{"id":"Artistic-1.0-Perl","url":"https://spdx.org/licenses/Artistic-1.0-Perl.html","name":"Artistic License 1.0 (Perl)"},{"id":"Beerware","url":"https://spdx.org/licenses/Beerware.html","name":"Beerware License"},{"id":"blessing","url":"https://spdx.org/licenses/blessing.html","name":"SQLite Blessing"},{"id":"Borceux","url":"https://spdx.org/licenses/Borceux.html","name":"Borceux license"},{"name":"BSD 2-Clause - Ian Darwin variant","id":"BSD-2-Clause-Darwin","url":"https://spdx.org/licenses/BSD-2-Clause-Darwin"},{"id":"CECILL-B","url":"https://spdx.org/licenses/CECILL-B.html","name":"CeCILL-B Free Software License Agreement"},{"name":"check-cvs License","id":"check-cvs","url":"https://spdx.org/licenses/check-cvs"},{"id":"ClArtistic","url":"https://spdx.org/licenses/ClArtistic.html","name":"Clarified Artistic License"},{"id":"Condor-1.1","url":"https://spdx.org/licenses/Condor-1.1.html","name":"Condor Public License v1.1"},{"id":"Crossword","url":"https://spdx.org/licenses/Crossword.html","name":"Crossword License"},{"id":"CrystalStacker","url":"https://spdx.org/licenses/CrystalStacker.html","name":"CrystalStacker License"},{"id":"diffmark","url":"https://spdx.org/licenses/diffmark.html","name":"diffmark license"},{"id":"DOC","url":"https://spdx.org/licenses/DOC.html","name":"DOC License"},{"id":"EFL-1.0","url":"https://spdx.org/licenses/EFL-1.0.html","name":"Eiffel Forum License v1.0"},{"id":"EFL-2.0","url":"https://spdx.org/licenses/EFL-2.0.html","name":"Eiffel Forum License v2.0"},{"id":"Fair","url":"https://spdx.org/licenses/Fair.html","name":"Fair License"},{"id":"FSFAP","url":"https://spdx.org/licenses/FSFAP.html","name":"FSF All Permissive License"},{"id":"FSFUL","url":"https://spdx.org/licenses/FSFUL.html","name":"FSF Unlimited License"},{"id":"FSFULLR","url":"https://spdx.org/licenses/FSFULLR.html","name":"FSF Unlimited License (with License Retention)"},{"id":"Giftware","url":"https://spdx.org/licenses/Giftware.html","name":"Giftware License"},{"name":"Good Luck With That Public License","id":"GLWTPL","url":"https://spdx.org/licenses/GLWTPL"},{"id":"HPND","url":"https://spdx.org/licenses/HPND.html","name":"Historical Permission Notice and Disclaimer"},{"name":"HPND with US Government export control warning","id":"HPND-export-US","url":"https://spdx.org/licenses/HPND-export-US"},{"id":"IJG","url":"https://spdx.org/licenses/IJG.html","name":"Independent JPEG Group License"},{"name":"Independent JPEG Group License - short","id":"IJG-short","url":"https://spdx.org/licenses/IJG-short"},{"name":"Jam License","id":"Jam","url":"https://spdx.org/licenses/Jam"},{"name":"Kazlib License","id":"Kazlib","url":"https://spdx.org/licenses/Kazlib"},{"id":"Leptonica","url":"https://spdx.org/licenses/Leptonica.html","name":"Leptonica License"},{"id":"LPL-1.0","url":"https://spdx.org/licenses/LPL-1.0.html","name":"Lucent Public License Version 1.0"},{"id":"LPL-1.02","url":"https://spdx.org/licenses/LPL-1.02.html","name":"Lucent Public License v1.02"},{"name":"McPhee Slideshow License","id":"McPhee-slideshow","url":"https://spdx.org/licenses/McPhee-slideshow"},{"id":"MirOS","url":"https://spdx.org/licenses/MirOS.html","name":"MirOS License"},{"id":"mpich2","url":"https://spdx.org/licenses/mpich2.html","name":"mpich2 License"},{"name":"Nara Institute of Science and Technology License (2003)","id":"NAIST-2003","url":"https://spdx.org/licenses/NAIST-2003"},{"id":"NASA-1.3","url":"https://spdx.org/licenses/NASA-1.3.html","name":"NASA Open Source Agreement 1.3"},{"id":"NBPL-1.0","url":"https://spdx.org/licenses/NBPL-1.0.html","name":"Net Boolean Public License v1"},{"id":"Newsletr","url":"https://spdx.org/licenses/Newsletr.html","name":"Newsletr License"},{"id":"NLPL","url":"https://spdx.org/licenses/NLPL.html","name":"No Limit Public License"},{"id":"NRL","url":"https://spdx.org/licenses/NRL.html","name":"NRL License"},{"name":"NTP No Attribution","id":"NTP-0","url":"https://spdx.org/licenses/NTP-0"},{"name":"OFFIS License","id":"OFFIS","url":"https://spdx.org/licenses/OFFIS"},{"id":"OGTSL","url":"https://spdx.org/licenses/OGTSL.html","name":"Open Group Test Suite License"},{"id":"OLDAP-1.1","url":"https://spdx.org/licenses/OLDAP-1.1.html","name":"Open LDAP Public License v1.1"},{"id":"OLDAP-1.2","url":"https://spdx.org/licenses/OLDAP-1.2.html","name":"Open LDAP Public License v1.2"},{"id":"OLDAP-1.3","url":"https://spdx.org/licenses/OLDAP-1.3.html","name":"Open LDAP Public License v1.3"},{"id":"OLDAP-1.4","url":"https://spdx.org/licenses/OLDAP-1.4.html","name":"Open LDAP Public License v1.4"},{"id":"psutils","url":"https://spdx.org/licenses/psutils.html","name":"psutils License"},{"name":"Python ldap License","id":"python-ldap","url":"https://spdx.org/licenses/python-ldap"},{"id":"Qhull","url":"https://spdx.org/licenses/Qhull.html","name":"Qhull License"},{"id":"Rdisc","url":"https://spdx.org/licenses/Rdisc.html","name":"Rdisc License"},{"id":"RSA-MD","url":"https://spdx.org/licenses/RSA-MD.html","name":"RSA Message-Digest License "},{"name":"snprintf License","id":"snprintf","url":"https://spdx.org/licenses/snprintf"},{"id":"Spencer-86","url":"https://spdx.org/licenses/Spencer-86.html","name":"Spencer License 86"},{"id":"Spencer-94","url":"https://spdx.org/licenses/Spencer-94.html","name":"Spencer License 94"},{"name":"SSH short notice","id":"SSH-short","url":"https://spdx.org/licenses/SSH-short"},{"id":"TU-Berlin-1.0","url":"https://spdx.org/licenses/TU-Berlin-1.0.html","name":"Technische Universitaet Berlin License 1.0"},{"id":"TU-Berlin-2.0","url":"https://spdx.org/licenses/TU-Berlin-2.0.html","name":"Technische Universitaet Berlin License 2.0"},{"id":"Vim","url":"https://spdx.org/licenses/Vim.html","name":"Vim License"},{"id":"W3C-19980720","url":"https://spdx.org/licenses/W3C-19980720.html","name":"W3C Software Notice and License (1998-07-20)"},{"id":"W3C-20150513","url":"https://spdx.org/licenses/W3C-20150513.html","name":"W3C Software Notice and Document License (2015-05-13)"},{"id":"Wsuipa","url":"https://spdx.org/licenses/Wsuipa.html","name":"Wsuipa License"},{"id":"WTFPL","url":"https://spdx.org/licenses/WTFPL.html","name":"Do What The F*ck You Want To Public License"},{"id":"xinetd","url":"https://spdx.org/licenses/xinetd.html","name":"xinetd License"},{"name":"XSkat License","id":"XSkat","url":"https://spdx.org/licenses/XSkat"},{"id":"Zed","url":"https://spdx.org/licenses/Zed.html","name":"Zed License"},{"id":"Zend-2.0","url":"https://spdx.org/licenses/Zend-2.0.html","name":"Zend License v2.0"},{"id":"ZPL-1.1","url":"https://spdx.org/licenses/ZPL-1.1.html","name":"Zope Public License 1.1"}]}]'); -;// CONCATENATED MODULE: ./lib/build-packages/check-license/index.js - - -// eslint-disable-next-line import-x/no-internal-modules - -// Permissive FLOSS licenses are ok, see https://blueoakcouncil.org/list for details. -const ALLOWED_STATUSES = new Set(['Model', 'Gold', 'Silver', 'Bronze']); -// Some packages have multiple licenses, and as long as one of them is acceptable, we allow it. -const ADDITIONAL_ALLOWED = new Set([ - '(BSD-3-Clause OR GPL-2.0)', - 'CC-BY-3.0', - 'CC-BY-4.0' -]); -const ALLOWED_LICENSES = new Set(list_namespaceObject - .filter(({ name }) => ALLOWED_STATUSES.has(name)) - .flatMap(({ licenses }) => licenses) - .map(({ id }) => id)).union(ADDITIONAL_ALLOWED); -// Packages whose license field is missing/undetectable but are known-good. -// They will still be flagged if they appear under a *disallowed* license. -const ALLOWED_UNKNOWN = [ - 'spawndamnit', // MIT - 'callsite' // MIT -]; -function packageInfoToString(pkg) { - const suffix = pkg.versions.length > 1 - ? `{${pkg.versions.join(', ')}}` - : pkg.versions[0] || ''; - return `${pkg.name}@${suffix}`; -} -function isSapDependency(dependency) { - const [scope] = dependency.split('/'); - return (scope === '@sap' || scope === '@sap-cloud-sdk' || scope === '@sap-ai-sdk'); -} -function isAllowedPackage(license, pkg) { - return (isSapDependency(pkg.name) || - (license === 'Unknown' && ALLOWED_UNKNOWN.includes(pkg.name)) || - ALLOWED_LICENSES.has(license)); -} -function getDisallowedPackages(licenseMap) { - return Object.entries(licenseMap).flatMap(([license, packages]) => packages - .filter(pkg => !isAllowedPackage(license, pkg)) - .map(pkg => ({ license, pkg }))); -} -function buildErrorMessage(disallowedPackages) { - const disallowedLicenseMessages = disallowedPackages.map(({ license, pkg }) => `Disallowed license "${license}" used by: ${packageInfoToString(pkg)}`); - return `Found ${disallowedPackages.length} disallowed licenses:\n${disallowedLicenseMessages.join('\n')}`; -} -function checkLicenses() { - const json = (0,external_node_child_process_namespaceObject.execFileSync)('pnpm', ['licenses', 'list', '--prod', '--json'], { - encoding: 'utf8', - maxBuffer: 10 * 1024 * 1024 - }); - const licenseMap = JSON.parse(json); - const disallowedPackages = getDisallowedPackages(licenseMap); - if (disallowedPackages.length) { - setFailed(buildErrorMessage(disallowedPackages)); - return; - } - info('All production dependency licenses are acceptable.'); -} -checkLicenses(); - diff --git a/.github/actions/check-pr/action.yml b/.github/actions/check-pr/action.yml index 0609d8b1b5..2632936071 100644 --- a/.github/actions/check-pr/action.yml +++ b/.github/actions/check-pr/action.yml @@ -6,4 +6,4 @@ inputs: required: true runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/check-pr/dist/index.js b/.github/actions/check-pr/dist/index.js new file mode 100644 index 0000000000..d680b5442c --- /dev/null +++ b/.github/actions/check-pr/dist/index.js @@ -0,0 +1,19548 @@ +import { createRequire } from "node:module"; +import * as os$1 from "os"; +import os, { EOL } from "os"; +import * as fs from "fs"; +import { constants, existsSync, promises, readFileSync } from "fs"; +import * as path from "path"; +import * as events from "events"; +import "child_process"; +import "timers"; +import { readFile } from "node:fs/promises"; +import { resolve } from "node:path"; +//#region \0rolldown/runtime.js +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js +/** +* Sanitizes an input into a string so it can be passed into issueCommand safely +* @param input input to sanitize into a string +*/ +function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); +} +/** +* +* @param annotationProperties +* @returns The command properties to send with the actual annotation command +* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 +*/ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js +/** +* Issues a command to the GitHub Actions runner +* +* @param command - The command name to issue +* @param properties - Additional properties for the command (key-value pairs) +* @param message - The message to include with the command +* @remarks +* This function outputs a specially formatted string to stdout that the Actions +* runner interprets as a command. These commands can control workflow behavior, +* set outputs, create annotations, mask values, and more. +* +* Command Format: +* ::name key=value,key=value::message +* +* @example +* ```typescript +* // Issue a warning annotation +* issueCommand('warning', {}, 'This is a warning message'); +* // Output: ::warning::This is a warning message +* +* // Set an environment variable +* issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); +* // Output: ::set-env name=MY_VAR::some value +* +* // Add a secret mask +* issueCommand('add-mask', {}, 'secretValue123'); +* // Output: ::add-mask::secretValue123 +* ``` +* +* @internal +* This is an internal utility function that powers the public API functions +* such as setSecret, warning, error, and exportVariable. +*/ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$1.EOL); +} +const CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + __require("net"); + var tls = __require("tls"); + var http$2 = __require("http"); + var https$1 = __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$2 = __require("util"); + exports.httpOverHttp = httpOverHttp; + exports.httpsOverHttp = httpsOverHttp; + exports.httpOverHttps = httpOverHttps; + exports.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + return agent; + } + function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http$2.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + return agent; + } + function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https$1.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$2.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$2.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host + }); + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; + exports.debug = debug; +})); +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_tunnel$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + const kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"); + var MessageSizeExceededError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + get [kMessageSizeExceededError]() { + return true; + } + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$4(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$26 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$2 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$26(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$26(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$2.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$26(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$26(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$26(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$1 = __require("node:util"); + const undiciDebugLog = util$1.debuglog("undici"); + const fetchDebuglog = util$1.debuglog("fetch"); + const websocketDebuglog = util$1.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$25 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (upgrade && !isValidHeaderValue(upgrade)) throw new InvalidArgumentError("invalid upgrade header"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$25(!this.aborted); + assert$25(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$25(!this.aborted); + assert$25(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$25(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (headerName === "host") { + if (request.host !== null) throw new InvalidArgumentError("duplicate host header"); + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) throw new InvalidArgumentError("duplicate content-length header"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const EventEmitter = __require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + var DispatcherBase = class extends Dispatcher { + constructor(opts) { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 }; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = 499; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const net$1 = __require("node:net"); + const assert$24 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$24(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$24(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"); + module.exports = Buffer$2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGx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ASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQ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AwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHl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ASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1oIAFBAWohAQxgC0GHASEDIAEgBEYNpQIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBiM8Aai0AAEcNaCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpgILIAJBADYCACAGQQFqIQFBLQxpC0GIASEDIAEgBEYNpAIgAigCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABB0M8Aai0AAEcNZyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMpQILIAJBADYCACAGQQFqIQFBKQxoCyABIARGBEBBiQEhAwykAgtBASABLQAAQd8ARw1nGiABQQFqIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCAB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AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2AhwgAiABNgIUIAJB0wk2AhAgAkEINgIMQQAhAwycAQtB0QAhAwyCAQsgAS0AAEEwayIAQf8Bc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AAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet: new Set(subresource), + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$23 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$23(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$23(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$23(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$23(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { types: types$3, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$3.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$3.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$2(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$22 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$22(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$22(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$22(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$22(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$2 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$22(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject: new EnvironmentSettingsObject() + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/file.js +var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file(); + const { makeEntry } = require_formdata(); + const assert$21 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$21(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$21(isUSVString(name)); + assert$21(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$21(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$20 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$20(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$20(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$20(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$19 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$3(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$19(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 3; + const TIMEOUT_BODY = 5; + const TIMEOUT_KEEP_ALIVE = 8; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$19(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$19(this.ptr != null); + assert$19(currentParser == null); + assert$19(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$19(upgrade); + assert$19(client[kSocket] === socket); + assert$19(!socket.destroyed); + assert$19(!this.paused); + assert$19((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$19(!this.upgrade); + assert$19(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$19(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$19((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$19(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$19(statusCode >= 100); + assert$19((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$19(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$19(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$19(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$19(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$19(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$19(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$19(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$19(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$19(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$19(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$18 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$18(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$18(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$18(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$18(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$18(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$17 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$1 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$17(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$17(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$17(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$16 = __require("node:assert"); + const net = __require("node:net"); + const http$1 = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, webSocket } = {}) { + super({ webSocket }); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http$1.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$16(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$16(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$16(!client[kConnecting]); + assert$16(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$16(idx !== -1); + const ip = hostname.substring(1, idx); + assert$16(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$16(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$16(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$16(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + super(options); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + super(options); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$15 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + module.exports = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$15(this.start === start, "content-range mismatch"); + assert$15(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$15(start != null && Number.isFinite(start), "content-range mismatch"); + assert$15(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$15(Number.isFinite(this.start)); + assert$15(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$14 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$14(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$14(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return /* @__PURE__ */ new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$13 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$13(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$12 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$11 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$1 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$11(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$1(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$10 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$10(!res, "pipeline cannot be retried"); + assert$10(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module.exports = pipeline; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$9 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$9(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$9(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$8 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$8(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + module.exports = { MockNotMatchedError: class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + } }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify: promisify$1 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$1(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$1({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$7 = __require("node:assert"); + const util = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$7(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$7(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$7(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$2(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$6 = __require("node:assert"); + const { types: types$2 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$6(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$6(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$6(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$2.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$2(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$5 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$5(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$4 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$2(); + const EE = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$4(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$4(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$4(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$4(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$4(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$4(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$1 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$1.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$3 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$3(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$2 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$2(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$1 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$1(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { parseSetCookie } = require_parse(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 2 ** 16 - 1, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxUnsigned16Bit } = require_constants(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const { MessageSizeExceededError } = require_errors(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; + } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + const { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {number} */ + #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { maxPayloadSize }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); +require_tunnel(); +var import_undici = require_undici(); +var HttpCodes; +(function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect; +HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout; +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js +var __awaiter$7 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { access, appendFile, writeFile } = promises; +const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$7(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$7(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$7(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +new Summary(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js +var __awaiter$6 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs.promises; +const IS_WINDOWS$1 = process.platform === "win32"; +fs.constants.O_RDONLY; +/** +* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: +* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). +*/ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (IS_WINDOWS$1) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); +} +/** +* Best effort attempt to determine whether a file exists and is executable. +* @param filePath file path to check +* @param extensions additional file extensions to try +* @return if file exists and is executable, returns the file path. otherwise empty string. +*/ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter$6(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); +} +function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$1) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js +var __awaiter$5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/** +* Returns path of a tool had the tool actually been invoked. Resolves via paths. +* If you check and the tool does not exist, it will throw. +* +* @param tool name of the tool +* @param check whether to check if tool exists +* @returns Promise path to tool +*/ +function which(tool, check) { + return __awaiter$5(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (IS_WINDOWS$1) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); +} +/** +* Returns a list of all occurrences of the given tool on the system path. +* +* @returns Promise the paths of the tool +*/ +function findInPath(tool) { + return __awaiter$5(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (IS_WINDOWS$1 && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path.delimiter)) if (extension) extensions.push(extension); + } + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); +} +process.platform; +events.EventEmitter; +events.EventEmitter; +os.platform(); +os.arch(); +/** +* The code to exit an action +*/ +var ExitCode; +(function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +/** +* Gets the value of an input. +* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. +* Returns an empty string if the value is not defined. +* +* @param name name of the input to get +* @param options optional. See InputOptions. +* @returns string +*/ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) throw new Error(`Input required and not supplied: ${name}`); + if (options && options.trimWhitespace === false) return val; + return val.trim(); +} +/** +* Sets the action status to failed. +* When the action exits it will be with an exit code of 1 +* @param message add error issue message +*/ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +/** +* Adds an error issue +* @param message error issue message. Errors will be converted to string via toString() +* @param properties optional properties to add to the annotation. +*/ +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +/** +* Writes info to log with console.log. +* @param message info message +*/ +function info(message) { + process.stdout.write(message + os$1.EOL); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/context.js +var Context = class { + /** + * Hydrate the context from the environment + */ + constructor() { + var _a, _b, _c; + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) if (existsSync(process.env.GITHUB_EVENT_PATH)) this.payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); + else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${EOL}`); + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); + this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + return { + owner, + repo + }; + } + if (this.payload.repository) return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +}; +//#endregion +//#region ../../node_modules/.pnpm/@actions+http-client@3.0.2/node_modules/@actions/http-client/lib/proxy.js +var require_proxy = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getProxyUrl = getProxyUrl; + exports.checkBypass = checkBypass; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) return; + const proxyVar = (() => { + if (usingSsl) return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; + else return process.env["http_proxy"] || process.env["HTTP_PROXY"]; + })(); + if (proxyVar) try { + return new DecodedURL(proxyVar); + } catch (_a) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); + } + else return; + } + function checkBypass(reqUrl) { + if (!reqUrl.hostname) return false; + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) return true; + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) return false; + let reqPort; + if (reqUrl.port) reqPort = Number(reqUrl.port); + else if (reqUrl.protocol === "http:") reqPort = 80; + else if (reqUrl.protocol === "https:") reqPort = 443; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) return true; + return false; + } + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); + } + var DecodedURL = class extends URL { + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/internal/utils.js +var import_lib = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => { + var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { + enumerable: true, + get: function() { + return m[k]; + } + }; + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports && exports.__importStar || (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + } + __setModuleDefault(result, mod); + return result; + }; + })(); + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; + exports.getProxyUrl = getProxyUrl; + exports.isHttps = isHttps; + const http = __importStar(__require("http")); + const https = __importStar(__require("https")); + const pm = __importStar(require_proxy()); + const tunnel = __importStar(require_tunnel()); + const undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports.HttpCodes = HttpCodes = {})); + var Headers; + (function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; + })(Headers || (exports.Headers = Headers = {})); + var MediaTypes; + (function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports.MediaTypes = MediaTypes = {})); + /** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + const RetryableHttpVerbs = [ + "OPTIONS", + "GET", + "DELETE", + "HEAD" + ]; + const ExponentialBackoffCeiling = 10; + const ExponentialBackoffTimeSlice = 5; + var HttpClientError = class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } + }; + exports.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on("data", (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on("end", () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + })); + }); + } + }; + exports.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + return new URL(requestUrl).protocol === "https:"; + } + var HttpClient = class { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) this._ignoreSslError = requestOptions.ignoreSslError; + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) this._allowRedirects = requestOptions.allowRedirects; + if (requestOptions.allowRedirectDowngrade != null) this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + if (requestOptions.maxRedirects != null) this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + if (requestOptions.keepAlive != null) this._keepAlive = requestOptions.keepAlive; + if (requestOptions.allowRetries != null) this._allowRetries = requestOptions.allowRetries; + if (requestOptions.maxRetries != null) this._maxRetries = requestOptions.maxRetries; + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl_1, obj_1) { + return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) throw new Error("Client has already been disposed."); + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + if (authenticationHandler) return authenticationHandler.handleAuthentication(this, info, data); + else return response; + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) break; + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) if (header.toLowerCase() === "authorization") delete headers[header]; + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) return response; + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) this._agent.destroy(); + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) reject(err); + else if (!res) reject(/* @__PURE__ */ new Error("Unknown error")); + else resolve(res); + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === "string") { + if (!info.options.headers) info.options.headers = {}; + info.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + handleResult(void 0, new HttpClientResponse(msg)); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) socket.end(); + handleResult(/* @__PURE__ */ new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function(err) { + handleResult(err); + }); + if (data && typeof data === "string") req.write(data, "utf8"); + if (data && typeof data !== "string") { + data.on("close", function() { + req.end(); + }); + data.pipe(req); + } else req.end(); + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + if (!(proxyUrl && proxyUrl.hostname)) return; + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === "https:"; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || "") + (info.parsedUrl.search || ""); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) info.options.headers["user-agent"] = this.userAgent; + info.options.agent = this._getAgent(info.parsedUrl); + if (this.handlers) for (const handler of this.handlers) handler.prepareRequest(info.options); + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + return lowercaseKeys(headers || {}); + } + /** + * Gets an existing header value or returns a default. + * Handles converting number header values to strings since HTTP headers must be strings. + * Note: This returns string | string[] since some headers can have multiple values. + * For headers that must always be a single string (like Content-Type), use the + * specialized _getExistingOrDefaultContentTypeHeader method instead. + */ + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; + if (headerValue) clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; + } + const additionalValue = additionalHeaders[header]; + if (additionalValue !== void 0) return typeof additionalValue === "number" ? additionalValue.toString() : additionalValue; + if (clientHeader !== void 0) return clientHeader; + return _default; + } + /** + * Specialized version of _getExistingOrDefaultHeader for Content-Type header. + * Always returns a single string (not an array) since Content-Type should be a single value. + * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. + * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers + * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). + */ + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; + if (headerValue) if (typeof headerValue === "number") clientHeader = String(headerValue); + else if (Array.isArray(headerValue)) clientHeader = headerValue.join(", "); + else clientHeader = headerValue; + } + const additionalValue = additionalHeaders[Headers.ContentType]; + if (additionalValue !== void 0) if (typeof additionalValue === "number") return String(additionalValue); + else if (Array.isArray(additionalValue)) return additionalValue.join(", "); + else return additionalValue; + if (clientHeader !== void 0) return clientHeader; + return _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) agent = this._proxyAgent; + if (!useProxy) agent = this._agent; + if (agent) return agent; + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { + host: proxyUrl.hostname, + port: proxyUrl.port + }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === "https:"; + if (usingSsl) tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + else tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options = { + keepAlive: this._keepAlive, + maxSockets + }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) proxyAgent = this._proxyAgentDispatcher; + if (proxyAgent) return proxyAgent; + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ + uri: proxyUrl.href, + pipelining: !this._keepAlive ? 0 : 1 + }, (proxyUrl.username || proxyUrl.password) && { token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` })); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { rejectUnauthorized: false }); + return proxyAgent; + } + _getUserAgentWithOrchestrationId(userAgent) { + const baseUserAgent = userAgent || "actions/http-client"; + const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; + if (orchId) return `${baseUserAgent} actions_orchestration_id/${orchId.replace(/[^a-z0-9_.-]/gi, "_")}`; + return baseUserAgent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve) => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) resolve(response); + function dateTimeDeserializer(key, value) { + if (typeof value === "string") { + const a = new Date(value); + if (!isNaN(a.valueOf())) return a; + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) obj = JSON.parse(contents, dateTimeDeserializer); + else obj = JSON.parse(contents); + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) {} + if (statusCode > 299) { + let msg; + if (obj && obj.message) msg = obj.message; + else if (contents && contents.length > 0) msg = contents; + else msg = `Failed request: (${statusCode})`; + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else resolve(response); + })); + }); + } + }; + exports.HttpClient = HttpClient; + const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); +})))(), 1); +var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +function getProxyAgent(destinationUrl) { + return new import_lib.HttpClient().getAgent(destinationUrl); +} +function getProxyAgentDispatcher(destinationUrl) { + return new import_lib.HttpClient().getAgentDispatcher(destinationUrl); +} +function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { + return (0, import_undici.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + }); + return proxyFetch; +} +function getApiBaseUrl() { + return process.env["GITHUB_API_URL"] || "https://api.github.com"; +} +//#endregion +//#region ../../node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) return navigator.userAgent; + if (typeof process === "object" && process.version !== void 0) return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + return ""; +} +//#endregion +//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js +function register(state, name, method, options) { + if (typeof method !== "function") throw new Error("method for before hook must be a function"); + if (!options) options = {}; + if (Array.isArray(name)) return name.reverse().reduce((callback, name) => { + return register.bind(null, state, name, callback, options); + }, method)(); + return Promise.resolve().then(() => { + if (!state.registry[name]) return method(options); + return state.registry[name].reduce((method, registered) => { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} +//#endregion +//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js +function addHook(state, kind, name, hook) { + const orig = hook; + if (!state.registry[name]) state.registry[name] = []; + if (kind === "before") hook = (method, options) => { + return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options)); + }; + if (kind === "after") hook = (method, options) => { + let result; + return Promise.resolve().then(method.bind(null, options)).then((result_) => { + result = result_; + return orig(result, options); + }).then(() => { + return result; + }); + }; + if (kind === "error") hook = (method, options) => { + return Promise.resolve().then(method.bind(null, options)).catch((error) => { + return orig(error, options); + }); + }; + state.registry[name].push({ + hook, + orig + }); +} +//#endregion +//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js +function removeHook(state, name, method) { + if (!state.registry[name]) return; + const index = state.registry[name].map((registered) => { + return registered.orig; + }).indexOf(method); + if (index === -1) return; + state.registry[name].splice(index, 1); +} +//#endregion +//#region ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js +const bind = Function.bind; +const bindable = bind.bind(bind); +function bindApi(hook, state, name) { + const removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + [ + "before", + "error", + "after", + "wrap" + ].forEach((kind) => { + const args = name ? [ + state, + kind, + name + ] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} +function Singular() { + const singularHookName = Symbol("Singular"); + const singularHookState = { registry: {} }; + const singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} +function Collection() { + const state = { registry: {} }; + const hook = register.bind(null, state); + bindApi(hook, state); + return hook; +} +var before_after_hook_default = { + Singular, + Collection +}; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+endpoint@11.0.3/node_modules/@octokit/endpoint/dist-bundle/index.js +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": `octokit-endpoint.js/0.0.0-development ${getUserAgent()}` + }, + mediaType: { format: "" } +}; +function lowercaseKeys(object) { + if (!object) return {}; + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} +function isPlainObject$1(value) { + if (typeof value !== "object" || value === null) return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject$1(options[key])) if (!(key in defaults)) Object.assign(result, { [key]: options[key] }); + else result[key] = mergeDeep(defaults[key], options[key]); + else Object.assign(result, { [key]: options[key] }); + }); + return result; +} +function removeUndefinedProperties(obj) { + for (const key in obj) if (obj[key] === void 0) delete obj[key]; + return obj; +} +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { url: method }, options); + } else options = Object.assign({}, route); + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) mergedOptions.mediaType.previews = defaults.mediaType.previews.filter((preview) => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; +} +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) return url; + return url + separator + names.map((name) => { + if (name === "q") return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} +var urlVariableRegex = /\{[^{}}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); +} +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) if (keysToOmit.indexOf(key) === -1) result[key] = object[key]; + return result; +} +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) return encodeUnreserved(key) + "=" + value; + else return value; +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") value = value.substring(0, parseInt(modifier, 10)); + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else if (modifier === "*") if (Array.isArray(value)) value.filter(isDefined).forEach(function(value2) { + result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : "")); + }); + else Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) result.push(encodeValue(operator, value[k], k)); + }); + else { + const tmp = []; + if (Array.isArray(value)) value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + else Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + if (isKeyOperator(operator)) result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + else if (tmp.length !== 0) result.push(tmp.join(",")); + } + else if (operator === ";") { + if (isDefined(value)) result.push(encodeUnreserved(key)); + } else if (value === "" && (operator === "&" || operator === "?")) result.push(encodeUnreserved(key) + "="); + else if (value === "") result.push(""); + return result; +} +function parseUrl(template) { + return { expand: expand.bind(null, template) }; +} +function expand(template, context) { + var operators = [ + "+", + "#", + ".", + "/", + ";", + "?", + "&" + ]; + template = template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") separator = "&"; + else if (operator !== "#") separator = operator; + return (values.length !== 0 ? operator : "") + values.join(separator); + } else return values.join(","); + } else return encodeReserved(literal); + }); + if (template === "/") return template; + else return template.replace(/\/$/, ""); +} +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) url = options.baseUrl + url; + const remainingParameters = omit(parameters, Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl")); + if (!/application\/octet-stream/i.test(headers.accept)) { + if (options.mediaType.format) headers.accept = headers.accept.split(/,/).map((format) => format.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) headers.accept = (headers.accept.match(/(? { + return `application/vnd.github.${preview}-preview${options.mediaType.format ? `.${options.mediaType.format}` : "+json"}`; + }).join(","); + } + } + if (["GET", "HEAD"].includes(method)) url = addQueryParameters(url, remainingParameters); + else if ("data" in remainingParameters) body = remainingParameters.data; + else if (Object.keys(remainingParameters).length) body = remainingParameters; + if (!headers["content-type"] && typeof body !== "undefined") headers["content-type"] = "application/json; charset=utf-8"; + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") body = ""; + return Object.assign({ + method, + url, + headers + }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); +} +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} +function withDefaults$2(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults$2.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); +} +var endpoint = withDefaults$2(null, DEFAULTS); +//#endregion +//#region ../../node_modules/.pnpm/json-with-bigint@3.5.8/node_modules/json-with-bigint/json-with-bigint.js +var import_fast_content_type_parse = (/* @__PURE__ */ __commonJSMin(((exports, module) => { + const NullObject = function NullObject() {}; + NullObject.prototype = Object.create(null); + /** + * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 + * + * parameter = token "=" ( token / quoted-string ) + * token = 1*tchar + * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" + * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" + * / DIGIT / ALPHA + * ; any VCHAR, except delimiters + * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE + * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text + * obs-text = %x80-FF + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + */ + const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu; + /** + * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 + * + * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) + * obs-text = %x80-FF + */ + const quotedPairRE = /\\([\v\u0020-\u00ff])/gu; + /** + * RegExp to match type in RFC 7231 sec 3.1.1.1 + * + * media-type = type "/" subtype + * type = token + * subtype = token + */ + const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u; + const defaultContentType = { + type: "", + parameters: new NullObject() + }; + Object.freeze(defaultContentType.parameters); + Object.freeze(defaultContentType); + /** + * Parse media type to object. + * + * @param {string|object} header + * @return {Object} + * @public + */ + function parse(header) { + if (typeof header !== "string") throw new TypeError("argument header is required and must be a string"); + let index = header.indexOf(";"); + const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); + if (mediaTypeRE.test(type) === false) throw new TypeError("invalid media type"); + const result = { + type: type.toLowerCase(), + parameters: new NullObject() + }; + if (index === -1) return result; + let key; + let match; + let value; + paramRE.lastIndex = index; + while (match = paramRE.exec(header)) { + if (match.index !== index) throw new TypeError("invalid parameter format"); + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (value[0] === "\"") { + value = value.slice(1, value.length - 1); + quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + } + result.parameters[key] = value; + } + if (index !== header.length) throw new TypeError("invalid parameter format"); + return result; + } + function safeParse(header) { + if (typeof header !== "string") return defaultContentType; + let index = header.indexOf(";"); + const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); + if (mediaTypeRE.test(type) === false) return defaultContentType; + const result = { + type: type.toLowerCase(), + parameters: new NullObject() + }; + if (index === -1) return result; + let key; + let match; + let value; + paramRE.lastIndex = index; + while (match = paramRE.exec(header)) { + if (match.index !== index) return defaultContentType; + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (value[0] === "\"") { + value = value.slice(1, value.length - 1); + quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + } + result.parameters[key] = value; + } + if (index !== header.length) return defaultContentType; + return result; + } + module.exports.default = { + parse, + safeParse + }; + module.exports.parse = parse; + module.exports.safeParse = safeParse; + module.exports.defaultContentType = defaultContentType; +})))(); +const intRegex = /^-?\d+$/; +const noiseValue = /^-?\d+n+$/; +const originalStringify = JSON.stringify; +const originalParse = JSON.parse; +const customFormat = /^-?\d+n$/; +const bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; +const noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; +/** +* @typedef {(this: any, key: string | number | undefined, value: any) => any} Replacer +* @typedef {(key: string | number | undefined, value: any, context?: { source: string }) => any} Reviver +*/ +/** +* Converts a JavaScript value to a JSON string. +* +* Supports serialization of BigInt values using two strategies: +* 1. Custom format "123n" → "123" (universal fallback) +* 2. Native JSON.rawJSON() (Node.js 22+, fastest) when available +* +* All other values are serialized exactly like native JSON.stringify(). +* +* @param {*} value The value to convert to a JSON string. +* @param {Replacer | Array | null} [replacer] +* A function that alters the behavior of the stringification process, +* or an array of strings/numbers to indicate properties to exclude. +* @param {string | number} [space] +* A string or number to specify indentation or pretty-printing. +* @returns {string} The JSON string representation. +*/ +const JSONStringify = (value, replacer, space) => { + if ("rawJSON" in JSON) return originalStringify(value, (key, value) => { + if (typeof value === "bigint") return JSON.rawJSON(value.toString()); + if (typeof replacer === "function") return replacer(key, value); + if (Array.isArray(replacer) && replacer.includes(key)) return value; + return value; + }, space); + if (!value) return originalStringify(value, replacer, space); + return originalStringify(value, (key, value) => { + if (typeof value === "string" && noiseValue.test(value)) return value.toString() + "n"; + if (typeof value === "bigint") return value.toString() + "n"; + if (typeof replacer === "function") return replacer(key, value); + if (Array.isArray(replacer) && replacer.includes(key)) return value; + return value; + }, space).replace(bigIntsStringify, "$1$2$3").replace(noiseStringify, "$1$2$3"); +}; +const featureCache = /* @__PURE__ */ new Map(); +/** +* Detects if the current JSON.parse implementation supports the context.source feature. +* +* Uses toString() fingerprinting to cache results and automatically detect runtime +* replacements of JSON.parse (polyfills, mocks, etc.). +* +* @returns {boolean} true if context.source is supported, false otherwise. +*/ +const isContextSourceSupported = () => { + const parseFingerprint = JSON.parse.toString(); + if (featureCache.has(parseFingerprint)) return featureCache.get(parseFingerprint); + try { + const result = JSON.parse("1", (_, __, context) => !!context?.source && context.source === "1"); + featureCache.set(parseFingerprint, result); + return result; + } catch { + featureCache.set(parseFingerprint, false); + return false; + } +}; +/** +* Reviver function that converts custom-format BigInt strings back to BigInt values. +* Also handles "noise" strings that accidentally match the BigInt format. +* +* @param {string | number | undefined} key The object key. +* @param {*} value The value being parsed. +* @param {object} [context] Parse context (if supported by JSON.parse). +* @param {Reviver} [userReviver] User's custom reviver function. +* @returns {any} The transformed value. +*/ +const convertMarkedBigIntsReviver = (key, value, context, userReviver) => { + if (typeof value === "string" && customFormat.test(value)) return BigInt(value.slice(0, -1)); + if (typeof value === "string" && noiseValue.test(value)) return value.slice(0, -1); + if (typeof userReviver !== "function") return value; + return userReviver(key, value, context); +}; +/** +* Fast JSON.parse implementation (~2x faster than classic fallback). +* Uses JSON.parse's context.source feature to detect integers and convert +* large numbers directly to BigInt without string manipulation. +* +* Does not support legacy custom format from v1 of this library. +* +* @param {string} text JSON string to parse. +* @param {Reviver} [reviver] Transform function to apply to each value. +* @returns {any} Parsed JavaScript value. +*/ +const JSONParseV2 = (text, reviver) => { + return JSON.parse(text, (key, value, context) => { + const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER); + const isInt = context && intRegex.test(context.source); + if (isBigNumber && isInt) return BigInt(context.source); + if (typeof reviver !== "function") return value; + return reviver(key, value, context); + }); +}; +const MAX_INT = Number.MAX_SAFE_INTEGER.toString(); +const MAX_DIGITS = MAX_INT.length; +const stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; +const noiseValueWithQuotes = /^"-?\d+n+"$/; +/** +* Converts a JSON string into a JavaScript value. +* +* Supports parsing of large integers using two strategies: +* 1. Classic fallback: Marks large numbers with "123n" format, then converts to BigInt +* 2. Fast path (JSONParseV2): Uses context.source feature (~2x faster) when available +* +* All other JSON values are parsed exactly like native JSON.parse(). +* +* @param {string} text A valid JSON string. +* @param {Reviver} [reviver] +* A function that transforms the results. This function is called for each member +* of the object. If a member contains nested objects, the nested objects are +* transformed before the parent object is. +* @returns {any} The parsed JavaScript value. +* @throws {SyntaxError} If text is not valid JSON. +*/ +const JSONParse = (text, reviver) => { + if (!text) return originalParse(text, reviver); + if (isContextSourceSupported()) return JSONParseV2(text, reviver); + return originalParse(text.replace(stringsOrLargeNumbers, (text, digits, fractional, exponential) => { + const isString = text[0] === "\""; + if (isString && noiseValueWithQuotes.test(text)) return text.substring(0, text.length - 1) + "n\""; + const isFractionalOrExponential = fractional || exponential; + const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT); + if (isString || isFractionalOrExponential || isLessThanMaxSafeInt) return text; + return "\"" + text + "n\""; + }), (key, value, context) => convertMarkedBigIntsReviver(key, value, context, reviver)); +}; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+request-error@7.1.0/node_modules/@octokit/request-error/dist-src/index.js +var RequestError = class extends Error { + name; + /** + * http status code + */ + status; + /** + * Request options that lead to the error. + */ + request; + /** + * Response object if a response was received + */ + response; + constructor(message, statusCode, options) { + super(message, { cause: options.cause }); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) this.status = 0; + /* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */ + if ("response" in options) this.response = options.response; + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) requestCopy.headers = Object.assign({}, options.request.headers, { authorization: options.request.headers.authorization.replace(/(? ""; +async function fetchWrapper(requestOptions) { + const fetch = requestOptions.request?.fetch || globalThis.fetch; + if (!fetch) throw new Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"); + const log = requestOptions.request?.log || console; + const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; + const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body; + const requestHeaders = Object.fromEntries(Object.entries(requestOptions.headers).map(([name, value]) => [name, String(value)])); + let fetchResponse; + try { + fetchResponse = await fetch(requestOptions.url, { + method: requestOptions.method, + body, + redirect: requestOptions.request?.redirect, + headers: requestHeaders, + signal: requestOptions.request?.signal, + ...requestOptions.body && { duplex: "half" } + }); + } catch (error) { + let message = "Unknown Error"; + if (error instanceof Error) { + if (error.name === "AbortError") { + error.status = 500; + throw error; + } + message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) message = error.cause.message; + else if (typeof error.cause === "string") message = error.cause; + } + } + const requestError = new RequestError(message, 500, { request: requestOptions }); + requestError.cause = error; + throw requestError; + } + const status = fetchResponse.status; + const url = fetchResponse.url; + const responseHeaders = {}; + for (const [key, value] of fetchResponse.headers) responseHeaders[key] = value; + const octokitResponse = { + url, + status, + headers: responseHeaders, + data: "" + }; + if ("deprecation" in responseHeaders) { + const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) return octokitResponse; + if (requestOptions.method === "HEAD") { + if (status < 400) return octokitResponse; + throw new RequestError(fetchResponse.statusText, status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status === 304) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError("Not modified", status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status >= 400) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError(toErrorMessage(octokitResponse.data), status, { + response: octokitResponse, + request: requestOptions + }); + } + octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; + return octokitResponse; +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (!contentType) return response.text().catch(noop$1); + const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType); + if (isJSONResponse(mimetype)) { + let text = ""; + try { + text = await response.text(); + return JSONParse(text); + } catch (err) { + return text; + } + } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") return response.text().catch(noop$1); + else return response.arrayBuffer().catch( + /* v8 ignore next -- @preserve */ + () => /* @__PURE__ */ new ArrayBuffer(0) + ); +} +function isJSONResponse(mimetype) { + return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; +} +function toErrorMessage(data) { + if (typeof data === "string") return data; + if (data instanceof ArrayBuffer) return "Unknown error"; + if ("message" in data) { + const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; + return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} +function withDefaults$1(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) return fetchWrapper(endpoint2.parse(endpointOptions)); + const request2 = (route2, parameters2) => { + return fetchWrapper(endpoint2.parse(endpoint2.merge(route2, parameters2))); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults$1.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults$1.bind(null, endpoint2) + }); +} +var request = withDefaults$1(endpoint, defaults_default); +/* v8 ignore next -- @preserve */ +/* v8 ignore else -- @preserve */ +//#endregion +//#region ../../node_modules/.pnpm/@octokit+graphql@9.0.3/node_modules/@octokit/graphql/dist-bundle/index.js +var VERSION$3 = "0.0.0-development"; +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + } + name = "GraphqlResponseError"; + errors; + data; +}; +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", + "operationName" +]; +var FORBIDDEN_VARIABLE_OPTIONS = [ + "query", + "method", + "url" +]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) return Promise.reject(/* @__PURE__ */ new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject(/* @__PURE__ */ new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) result.variables = {}; + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) headers[key] = response.headers[key]; + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + return response.data.data; + }); +} +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} +withDefaults(request, { + headers: { "user-agent": `octokit-graphql.js/${VERSION$3} ${getUserAgent()}` }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +//#endregion +//#region ../../node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js +var b64url = "(?:[a-zA-Z0-9_-]+)"; +var sep = "\\."; +var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); +var isJWT = jwtRE.test.bind(jwtRE); +async function auth(token) { + const isApp = isJWT(token); + const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_"); + const isUserToServer = token.startsWith("ghu_"); + return { + type: "token", + token, + tokenType: isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth" + }; +} +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) return `bearer ${token}`; + return `token ${token}`; +} +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} +var createTokenAuth = function createTokenAuth2(token) { + if (!token) throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + if (typeof token !== "string") throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { hook: hook.bind(null, token) }); +}; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+core@7.0.6/node_modules/@octokit/core/dist-src/version.js +const VERSION$2 = "7.0.6"; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+core@7.0.6/node_modules/@octokit/core/dist-src/index.js +const noop = () => {}; +const consoleWarn = console.warn.bind(console); +const consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") logger.debug = noop; + if (typeof logger.info !== "function") logger.info = noop; + if (typeof logger.warn !== "function") logger.warn = consoleWarn; + if (typeof logger.error !== "function") logger.error = consoleError; + return logger; +} +const userAgentTrail = `octokit-core.js/${VERSION$2} ${getUserAgent()}`; +var Octokit = class { + static VERSION = VERSION$2; + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { userAgent: `${options.userAgent} ${defaults.userAgent}` } : null)); + } + }; + return OctokitWithDefaults; + } + static plugins = []; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))); + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new before_after_hook_default.Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { hook: hook.bind(null, "request") }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) requestDefaults.baseUrl = options.baseUrl; + if (options.previews) requestDefaults.mediaType.previews = options.previews; + if (options.timeZone) requestDefaults.headers["time-zone"] = options.timeZone; + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = createLogger(options.log); + this.hook = hook; + if (!options.authStrategy) if (!options.auth) this.auth = async () => ({ type: "unauthenticated" }); + else { + const auth = createTokenAuth(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + octokit: this, + octokitOptions: otherOptions + }, options.auth)); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) Object.assign(this, classConstructor.plugins[i](this, options)); + } + request; + graphql; + log; + hook; + auth; +}; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +const VERSION$1 = "17.0.0"; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +var endpoints_default = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], + addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + addRepoAccessToSelfHostedRunnerGroupInOrg: ["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"], + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + addSelectedRepoToOrgVariable: ["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"], + approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"], + cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], + createEnvironmentVariable: ["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"], + createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"], + createOrUpdateEnvironmentSecret: ["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], + createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], + deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"], + deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"], + deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + deleteCustomImageFromOrg: ["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"], + deleteCustomImageVersionFromOrg: ["DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"], + deleteEnvironmentSecret: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"], + deleteEnvironmentVariable: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"], + deleteHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + deleteRepoVariable: ["DELETE /repos/{owner}/{repo}/actions/variables/{name}"], + deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], + deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], + disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"], + disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"], + downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"], + downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"], + downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"], + downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], + enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"], + enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"], + forceCancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"], + generateRunnerJitconfigForOrg: ["POST /orgs/{org}/actions/runners/generate-jitconfig"], + generateRunnerJitconfigForRepo: ["POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: ["GET /orgs/{org}/actions/cache/usage-by-repository"], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"], + getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getCustomImageForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"], + getCustomImageVersionForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"], + getCustomOidcSubClaimForRepo: ["GET /repos/{owner}/{repo}/actions/oidc/customization/sub"], + getEnvironmentPublicKey: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key"], + getEnvironmentSecret: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"], + getEnvironmentVariable: ["GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"], + getGithubActionsDefaultWorkflowPermissionsOrganization: ["GET /orgs/{org}/actions/permissions/workflow"], + getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"], + getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"], + getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"], + getHostedRunnerForOrg: ["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"], + getHostedRunnersGithubOwnedImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/github-owned"], + getHostedRunnersLimitsForOrg: ["GET /orgs/{org}/actions/hosted-runners/limits"], + getHostedRunnersMachineSpecsForOrg: ["GET /orgs/{org}/actions/hosted-runners/machine-sizes"], + getHostedRunnersPartnerImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/partner"], + getHostedRunnersPlatformsForOrg: ["GET /orgs/{org}/actions/hosted-runners/platforms"], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"], + getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"], + getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listCustomImageVersionsForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"], + listCustomImagesForOrg: ["GET /orgs/{org}/actions/hosted-runners/images/custom"], + listEnvironmentSecrets: ["GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"], + listEnvironmentVariables: ["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"], + listGithubHostedRunnersInGroupForOrg: ["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"], + listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"], + listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"], + listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"], + listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"], + listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: ["GET /repos/{owner}/{repo}/actions/organization-secrets"], + listRepoOrganizationVariables: ["GET /repos/{owner}/{repo}/actions/organization-variables"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"], + listSelectedReposForOrgVariable: ["GET /orgs/{org}/actions/variables/{name}/repositories"], + listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], + listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + removeCustomLabelFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"], + removeCustomLabelFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + removeSelectedRepoFromOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"], + reviewCustomGatesForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"], + reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], + setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"], + setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"], + setCustomLabelsForSelfHostedRunnerForOrg: ["PUT /orgs/{org}/actions/runners/{runner_id}/labels"], + setCustomLabelsForSelfHostedRunnerForRepo: ["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + setCustomOidcSubClaimForRepo: ["PUT /repos/{owner}/{repo}/actions/oidc/customization/sub"], + setGithubActionsDefaultWorkflowPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions/workflow"], + setGithubActionsDefaultWorkflowPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/workflow"], + setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"], + setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"], + setSelectedReposForOrgVariable: ["PUT /orgs/{org}/actions/variables/{name}/repositories"], + setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"], + setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"], + updateEnvironmentVariable: ["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"], + updateHostedRunnerForOrg: ["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: ["PATCH /repos/{owner}/{repo}/actions/variables/{name}"] + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"], + getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], + listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], + listInstallationRequestsForAuthenticatedApp: ["GET /app/installation-requests"], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], + getGithubBillingPremiumRequestUsageReportOrg: ["GET /organizations/{org}/settings/billing/premium_request/usage"], + getGithubBillingPremiumRequestUsageReportUser: ["GET /users/{username}/settings/billing/premium_request/usage"], + getGithubBillingUsageReportOrg: ["GET /organizations/{org}/settings/billing/usage"], + getGithubBillingUsageReportUser: ["GET /users/{username}/settings/billing/usage"], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], + getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], + getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"] + }, + campaigns: { + createCampaign: ["POST /orgs/{org}/campaigns"], + deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"], + getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"], + listOrgCampaigns: ["GET /orgs/{org}/campaigns"], + updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"], + rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"], + setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + commitAutofix: ["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits"], + createAutofix: ["POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"], + createVariantAnalysis: ["POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses"], + deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"], + deleteCodeqlDatabase: ["DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"], + getAutofix: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix"], + getCodeqlDatabase: ["GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + getVariantAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}"], + getVariantAnalysisRepoTask: ["GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}"], + listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: ["GET /repos/{owner}/{repo}/code-scanning/codeql/databases"], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], + updateDefaultSetup: ["PATCH /repos/{owner}/{repo}/code-scanning/default-setup"], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codeSecurity: { + attachConfiguration: ["POST /orgs/{org}/code-security/configurations/{configuration_id}/attach"], + attachEnterpriseConfiguration: ["POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach"], + createConfiguration: ["POST /orgs/{org}/code-security/configurations"], + createConfigurationForEnterprise: ["POST /enterprises/{enterprise}/code-security/configurations"], + deleteConfiguration: ["DELETE /orgs/{org}/code-security/configurations/{configuration_id}"], + deleteConfigurationForEnterprise: ["DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}"], + detachConfiguration: ["DELETE /orgs/{org}/code-security/configurations/detach"], + getConfiguration: ["GET /orgs/{org}/code-security/configurations/{configuration_id}"], + getConfigurationForRepository: ["GET /repos/{owner}/{repo}/code-security-configuration"], + getConfigurationsForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations"], + getConfigurationsForOrg: ["GET /orgs/{org}/code-security/configurations"], + getDefaultConfigurations: ["GET /orgs/{org}/code-security/configurations/defaults"], + getDefaultConfigurationsForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations/defaults"], + getRepositoriesForConfiguration: ["GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories"], + getRepositoriesForEnterpriseConfiguration: ["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories"], + getSingleConfigurationForEnterprise: ["GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}"], + setConfigurationAsDefault: ["PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults"], + setConfigurationAsDefaultForEnterprise: ["PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults"], + updateConfiguration: ["PATCH /orgs/{org}/code-security/configurations/{configuration_id}"], + updateEnterpriseConfiguration: ["PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}"] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + checkPermissionsForDevcontainer: ["GET /repos/{owner}/{repo}/codespaces/permissions_check"], + codespaceMachinesForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/machines"], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + createOrUpdateSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}"], + createWithPrForAuthenticatedUser: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"], + createWithRepoForAuthenticatedUser: ["POST /repos/{owner}/{repo}/codespaces"], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: ["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + deleteSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}"], + exportForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/exports"], + getCodespacesForUserInOrg: ["GET /orgs/{org}/members/{username}/codespaces"], + getExportDetailsForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/exports/{export_id}"], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: ["GET /user/codespaces/secrets/public-key"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + getSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}"], + listDevcontainersInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/devcontainers"], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces"], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}/repositories"], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"], + preFlightWithRepoForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/new"], + publishForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/publish"], + removeRepositoryForSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + repoMachinesForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/machines"], + setRepositoriesForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: ["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + copilot: { + addCopilotSeatsForTeams: ["POST /orgs/{org}/copilot/billing/selected_teams"], + addCopilotSeatsForUsers: ["POST /orgs/{org}/copilot/billing/selected_users"], + cancelCopilotSeatAssignmentForTeams: ["DELETE /orgs/{org}/copilot/billing/selected_teams"], + cancelCopilotSeatAssignmentForUsers: ["DELETE /orgs/{org}/copilot/billing/selected_users"], + copilotMetricsForOrganization: ["GET /orgs/{org}/copilot/metrics"], + copilotMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/metrics"], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: ["GET /orgs/{org}/members/{username}/copilot"], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + credentials: { revoke: ["POST /credentials/revoke"] }, + dependabot: { + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + listAlertsForEnterprise: ["GET /enterprises/{enterprise}/dependabot/alerts"], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + repositoryAccessForOrg: ["GET /organizations/{org}/dependabot/repository-access"], + setRepositoryAccessDefaultLevel: ["PUT /organizations/{org}/dependabot/repository-access/default-level"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"], + updateAlert: ["PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + updateRepositoryAccessForOrg: ["PATCH /organizations/{org}/dependabot/repository-access"] + }, + dependencyGraph: { + createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"], + diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, + enterpriseTeamMemberships: { + add: ["PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"], + bulkAdd: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"], + bulkRemove: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"], + get: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"], + list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"], + remove: ["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"] + }, + enterpriseTeamOrganizations: { + add: ["PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"], + bulkAdd: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"], + bulkRemove: ["POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"], + delete: ["DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"], + getAssignment: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"], + getAssignments: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"] + }, + enterpriseTeams: { + create: ["POST /enterprises/{enterprise}/teams"], + delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"], + get: ["GET /enterprises/{enterprise}/teams/{team_slug}"], + list: ["GET /enterprises/{enterprise}/teams"], + update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"] + }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + hostedCompute: { + createNetworkConfigurationForOrg: ["POST /orgs/{org}/settings/network-configurations"], + deleteNetworkConfigurationFromOrg: ["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"], + getNetworkConfigurationForOrg: ["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"], + getNetworkSettingsForOrg: ["GET /orgs/{org}/settings/network-settings/{network_settings_id}"], + listNetworkConfigurationsForOrg: ["GET /orgs/{org}/settings/network-configurations"], + updateNetworkConfigurationForOrg: ["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] + }, + issues: { + addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + addBlockedByDependency: ["POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + addSubIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listDependenciesBlockedBy: ["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by"], + listDependenciesBlocking: ["GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + listSubIssues: ["GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"], + removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + removeDependencyBlockedBy: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}"], + removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"], + removeSubIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue"], + reprioritizeSubIssue: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority"], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: ["POST /markdown/raw", { headers: { "content-type": "text/plain; charset=utf-8" } }] + }, + meta: { + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"], + deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"], + downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"], + getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"], + unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"] + }, + oidc: { + getOidcCustomSubTemplateForOrg: ["GET /orgs/{org}/actions/oidc/customization/sub"], + updateOidcCustomSubTemplateForOrg: ["PUT /orgs/{org}/actions/oidc/customization/sub"] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}", + {}, + { deprecated: "octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team" } + ], + assignTeamToOrgRole: ["PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"], + assignUserToOrgRole: ["PUT /orgs/{org}/organization-roles/users/{username}/{role_id}"], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"], + createArtifactStorageRecord: ["POST /orgs/{org}/artifacts/metadata/storage-record"], + createInvitation: ["POST /orgs/{org}/invitations"], + createIssueType: ["POST /orgs/{org}/issue-types"], + createWebhook: ["POST /orgs/{org}/hooks"], + customPropertiesForOrgsCreateOrUpdateOrganizationValues: ["PATCH /organizations/{org}/org-properties/values"], + customPropertiesForOrgsGetOrganizationValues: ["GET /organizations/{org}/org-properties/values"], + customPropertiesForReposCreateOrUpdateOrganizationDefinition: ["PUT /orgs/{org}/properties/schema/{custom_property_name}"], + customPropertiesForReposCreateOrUpdateOrganizationDefinitions: ["PATCH /orgs/{org}/properties/schema"], + customPropertiesForReposCreateOrUpdateOrganizationValues: ["PATCH /orgs/{org}/properties/values"], + customPropertiesForReposDeleteOrganizationDefinition: ["DELETE /orgs/{org}/properties/schema/{custom_property_name}"], + customPropertiesForReposGetOrganizationDefinition: ["GET /orgs/{org}/properties/schema/{custom_property_name}"], + customPropertiesForReposGetOrganizationDefinitions: ["GET /orgs/{org}/properties/schema"], + customPropertiesForReposGetOrganizationValues: ["GET /orgs/{org}/properties/values"], + delete: ["DELETE /orgs/{org}"], + deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"], + deleteAttestationsById: ["DELETE /orgs/{org}/attestations/{attestation_id}"], + deleteAttestationsBySubjectDigest: ["DELETE /orgs/{org}/attestations/digest/{subject_digest}"], + deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + disableSelectedRepositoryImmutableReleasesOrganization: ["DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"], + enableSelectedRepositoryImmutableReleasesOrganization: ["PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"], + get: ["GET /orgs/{org}"], + getImmutableReleasesSettings: ["GET /orgs/{org}/settings/immutable-releases"], + getImmutableReleasesSettingsRepositories: ["GET /orgs/{org}/settings/immutable-releases/repositories"], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], + getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"], + getOrgRulesetVersion: ["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listArtifactStorageRecords: ["GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"], + listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"], + listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"], + listAttestationsBulk: ["POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listIssueTypes: ["GET /orgs/{org}/issue-types"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: ["GET /orgs/{org}/organization-fine-grained-permissions"], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: ["GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"], + listPatGrantRequestRepositories: ["GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: [ + "GET /orgs/{org}/security-managers", + {}, + { deprecated: "octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams" } + ], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], + removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}", + {}, + { deprecated: "octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team" } + ], + reviewPatGrantRequest: ["POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"], + reviewPatGrantRequestsInBulk: ["POST /orgs/{org}/personal-access-token-requests"], + revokeAllOrgRolesTeam: ["DELETE /orgs/{org}/organization-roles/teams/{team_slug}"], + revokeAllOrgRolesUser: ["DELETE /orgs/{org}/organization-roles/users/{username}"], + revokeOrgRoleTeam: ["DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}"], + revokeOrgRoleUser: ["DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"], + setImmutableReleasesSettings: ["PUT /orgs/{org}/settings/immutable-releases"], + setImmutableReleasesSettingsRepositories: ["PUT /orgs/{org}/settings/immutable-releases/repositories"], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"], + updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"], + deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"], + deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"], + deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], + deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"] } + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"], + getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"], + getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"], + getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"], + getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"], + getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"], + getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + listDockerMigrationConflictingPackagesForAuthenticatedUser: ["GET /user/docker/conflicts"], + listDockerMigrationConflictingPackagesForOrganization: ["GET /orgs/{org}/docker/conflicts"], + listDockerMigrationConflictingPackagesForUser: ["GET /users/{username}/docker/conflicts"], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], + restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], + restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] + }, + privateRegistries: { + createOrgPrivateRegistry: ["POST /orgs/{org}/private-registries"], + deleteOrgPrivateRegistry: ["DELETE /orgs/{org}/private-registries/{secret_name}"], + getOrgPrivateRegistry: ["GET /orgs/{org}/private-registries/{secret_name}"], + getOrgPublicKey: ["GET /orgs/{org}/private-registries/public-key"], + listOrgPrivateRegistries: ["GET /orgs/{org}/private-registries"], + updateOrgPrivateRegistry: ["PATCH /orgs/{org}/private-registries/{secret_name}"] + }, + projects: { + addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"], + addItemForUser: ["POST /users/{username}/projectsV2/{project_number}/items"], + deleteItemForOrg: ["DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], + deleteItemForUser: ["DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"], + getFieldForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"], + getFieldForUser: ["GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"], + getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"], + getForUser: ["GET /users/{username}/projectsV2/{project_number}"], + getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], + getUserItem: ["GET /users/{username}/projectsV2/{project_number}/items/{item_id}"], + listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"], + listFieldsForUser: ["GET /users/{username}/projectsV2/{project_number}/fields"], + listForOrg: ["GET /orgs/{org}/projectsV2"], + listForUser: ["GET /users/{username}/projectsV2"], + listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"], + listItemsForUser: ["GET /users/{username}/projectsV2/{project_number}/items"], + updateItemForOrg: ["PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], + updateItemForUser: ["PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"], + updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"], + createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"], + deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"], + deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"], + deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"], + deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"], + deleteForRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"], + deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"], + deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"], + listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + listForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"], + listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + cancelPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"], + checkAutomatedSecurityFixes: ["GET /repos/{owner}/{repo}/automated-security-fixes"], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"], + checkPrivateVulnerabilityReporting: ["GET /repos/{owner}/{repo}/private-vulnerability-reporting"], + checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"], + createAttestation: ["POST /repos/{owner}/{repo}/attestations"], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentBranchPolicy: ["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"], + createDeploymentProtectionRule: ["POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"], + createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + customPropertiesForReposCreateOrUpdateRepositoryValues: ["PATCH /repos/{owner}/{repo}/properties/values"], + customPropertiesForReposGetRepositoryValues: ["GET /repos/{owner}/{repo}/properties/values"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], + deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], + deleteDeploymentBranchPolicy: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"], + disableDeploymentProtectionRule: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"], + disableImmutableReleases: ["DELETE /repos/{owner}/{repo}/immutable-releases"], + disablePrivateVulnerabilityReporting: ["DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"], + disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"], + enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"], + enablePrivateVulnerabilityReporting: ["PUT /repos/{owner}/{repo}/private-vulnerability-reporting"], + enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"], + generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], + getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + getAllDeploymentProtectionRules: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentBranchPolicy: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"], + getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], + getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesDeployment: ["GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getRepoRuleSuite: ["GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesetHistory: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"], + getRepoRulesetVersion: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAttestations: ["GET /repos/{owner}/{repo}/attestations/{subject_digest}"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentBranchPolicies: ["GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"], + listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"], + listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: ["PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"], + uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { baseUrl: "https://uploads.github.com" }] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + createPushProtectionBypass: ["POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses"], + getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], + getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"], + listOrgPatternConfigs: ["GET /orgs/{org}/secret-scanning/pattern-configurations"], + updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], + updateOrgPatternConfigs: ["PATCH /orgs/{org}/secret-scanning/pattern-configurations"] + }, + securityAdvisories: { + createFork: ["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks"], + createPrivateVulnerabilityReport: ["POST /repos/{owner}/{repo}/security-advisories/reports"], + createRepositoryAdvisory: ["POST /repos/{owner}/{repo}/security-advisories"], + createRepositoryAdvisoryCveRequest: ["POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: ["GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: ["PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"] + }, + teams: { + addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"], + addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], + removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteAttestationsBulk: ["POST /users/{username}/attestations/delete-request"], + deleteAttestationsById: ["DELETE /users/{username}/attestations/{attestation_id}"], + deleteAttestationsBySubjectDigest: ["DELETE /users/{username}/attestations/digest/{subject_digest}"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: ["DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getById: ["GET /user/{account_id}"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: ["GET /user/ssh_signing_keys/{ssh_signing_key_id}"], + list: ["GET /users"], + listAttestations: ["GET /users/{username}/attestations/{subject_digest}"], + listAttestationsBulk: ["POST /users/{username}/attestations/bulk-list{?per_page,before,after}"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] + } +}; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +const endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign({ + method, + url + }, defaults); + if (!endpointMethodsMap.has(scope)) endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); +} +const handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) return cache[methodName]; + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) return; + const { endpointDefaults, decorations } = method; + if (decorations) cache[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); + else cache[methodName] = octokit.request.defaults(endpointDefaults); + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) newMethods[scope] = new Proxy({ + octokit, + scope, + cache: {} + }, handler); + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + } + if (decorations.deprecated) octokit.log.warn(decorations.deprecated); + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries(decorations.renamedParameters)) if (name in options2) { + octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); + if (!(alias in options2)) options2[alias] = options2[name]; + delete options2[name]; + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} +//#endregion +//#region ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +function restEndpointMethods(octokit) { + return { rest: endpointsToMethods(octokit) }; +} +restEndpointMethods.VERSION = VERSION$1; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION$1; +//#endregion +//#region ../../node_modules/.pnpm/@octokit+plugin-paginate-rest@14.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +var VERSION = "0.0.0-development"; +function normalizePaginatedListResponse(response) { + if (!response.data) return { + ...response, + data: [] + }; + if (!(("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data))) return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + const totalCommits = response.data.total_commits; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + delete response.data.total_commits; + const namespaceKey = Object.keys(response.data)[0]; + response.data = response.data[namespaceKey]; + if (typeof incompleteResults !== "undefined") response.data.incomplete_results = incompleteResults; + if (typeof repositorySelection !== "undefined") response.data.repository_selection = repositorySelection; + response.data.total_count = totalCount; + response.data.total_commits = totalCommits; + return response; +} +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { [Symbol.asyncIterator]: () => ({ async next() { + if (!url) return { done: true }; + try { + const normalizedResponse = normalizePaginatedListResponse(await requestMethod({ + method, + url, + headers + })); + url = ((normalizedResponse.headers.link || "").match(/<([^<>]+)>;\s*rel="next"/) || [])[1]; + if (!url && "total_commits" in normalizedResponse.data) { + const parsedUrl = new URL(normalizedResponse.url); + const params = parsedUrl.searchParams; + const page = parseInt(params.get("page") || "1", 10); + if (page * parseInt(params.get("per_page") || "250", 10) < normalizedResponse.data.total_commits) { + params.set("page", String(page + 1)); + url = parsedUrl.toString(); + } + } + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) throw error; + url = ""; + return { value: { + status: 200, + headers: {}, + data: [] + } }; + } + } }) }; +} +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) return results; + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); + if (earlyExit) return results; + return gather(octokit, results, iterator2, mapFn); + }); +} +Object.assign(paginate, { iterator }); +function paginateRest(octokit) { + return { paginate: Object.assign(paginate.bind(null, octokit), { iterator: iterator.bind(null, octokit) }) }; +} +paginateRest.VERSION = VERSION; +new Context(); +const baseUrl = getApiBaseUrl(); +const defaults = { + baseUrl, + request: { + agent: getProxyAgent(baseUrl), + fetch: getProxyFetch(baseUrl) + } +}; +Octokit.plugin(restEndpointMethods, paginateRest).defaults(defaults); +//#endregion +//#region ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/github.js +const context = new Context(); +//#endregion +//#region ../changeset-types.ts +const messageTypes = [ + { + name: "compat", + title: "Compatibility Notes", + alternatives: [ + "compatibility", + "compatibility note", + "compat" + ] + }, + { + name: "feat", + title: "New Features", + alternatives: [ + "new", + "new functionality", + "feat" + ] + }, + { + name: "fix", + title: "Fixed Issues", + alternatives: [ + "bug", + "bug fix", + "fixed issue", + "fix", + "fix issue" + ] + }, + { + name: "known-issue", + title: "Known Issues", + alternatives: ["known issue"] + }, + { + name: "impr", + title: "Improvements", + alternatives: ["improvement", "improv"] + }, + { + name: "dep", + title: "Updated Dependencies", + alternatives: ["dependency", "dependency update"] + } +]; +//#endregion +//#region validators.ts +const validCommitTypes = [ + "feat", + "fix", + "chore" +]; +const allAllowedChangeTypes = new Set(messageTypes.flatMap(({ name, alternatives }) => [name, ...alternatives])); +async function validateTitle(title) { + if (!title || !title.includes(":")) return setFailed("PR title does not adhere to conventional commit guidelines. No preamble found."); + const [preamble, postamble] = title.split(":"); + await validatePreamble(preamble); + validatePostamble(postamble); +} +async function validatePreamble(preamble) { + const groups = preamble.match(/(?\w+)?(\((?\w+)\))?(?!)?/)?.groups; + if (!groups) return setFailed("Could not parse preamble. Ensure it follows the conventional commit guidelines."); + const { commitType, isBreaking } = groups; + validateCommitType(commitType); + validateChangesets(preamble, commitType, !!isBreaking, await extractChangesetFileContents()); +} +function validateCommitType(commitType) { + if (!commitType || !validCommitTypes.includes(commitType)) return setFailed(`PR title does not adhere to conventional commit guidelines. Commit type found: ${commitType}. Must be one of ${validCommitTypes.join(", ")}.`); + info("✓ Commit type: OK"); +} +function validatePostamble(title) { + if (!title || !title.trim().length) return setFailed("PR title does not have a title after conventional commit preamble."); + if (title[0] !== " ") return setFailed("Space missing after conventional commit preamble."); + info("✓ Title: OK"); +} +function getAllowedBumps(preamble, isBreaking) { + if (isBreaking) return ["major"]; + if (preamble === "feat") return ["minor"]; + if (preamble === "fix") return ["minor", "patch"]; + return []; +} +function hasMatchingChangeset(allowedBumps, changedFileContents) { + if (allowedBumps.length) return changedFileContents.some((fileContent) => allowedBumps.some((bump) => new RegExp(`("|')(@sap-cloud-sdk|@sap-ai-sdk)/.*("|'): ${bump}`).test(fileContent))); + return true; +} +async function extractChangesetFileContents() { + const changeSetFilesStr = getInput("changed-files").trim(); + const changeSetFiles = changeSetFilesStr ? changeSetFilesStr.split(" ") : []; + return await Promise.all(changeSetFiles.map((file) => readFile(file, "utf-8"))); +} +function validateChangesets(preamble, commitType, isBreaking, fileContents) { + const allowedBumps = getAllowedBumps(commitType, isBreaking); + if (!hasMatchingChangeset(allowedBumps, fileContents)) return setFailed(`Preamble '${preamble}' requires a changeset file with bump ${allowedBumps.map((bump) => `'${bump}'`).join(" or ")}.`); + const changeTypes = fileContents.flatMap((content) => { + const matches = content.match(/\[([^\]]+)\](?!\([^\]]*\))/g); + return matches ? matches.map((match) => match.slice(1, -1)) : []; + }); + if (!preamble.startsWith("chore") && !changeTypes.length) return setFailed("Missing change type in changeset."); + if (!changeTypes.every((type) => allAllowedChangeTypes.has(type.toLowerCase()))) return setFailed(`All change types must be one of: ${messageTypes.map(({ name }) => `'${name}'`).join(", ")} (or their aliases).`); + info("✓ Changesets: OK"); +} +async function validateBody(body) { + const template = await readFile(resolve(".github", "PULL_REQUEST_TEMPLATE.md"), "utf-8"); + if (!body || body === template) return setFailed("PR must have a description."); + if (body.includes(template)) return setFailed("PR template must not be ignored."); + info("✓ Body: OK"); +} +//#endregion +//#region index.ts +try { + validateTitle(context.payload.pull_request?.title); + validateBody(context.payload.pull_request?.body?.replace(/\r\n/g, "\n")); +} catch (err) { + setFailed(err); +} +//#endregion +export {}; diff --git a/.github/actions/check-pr/index.js b/.github/actions/check-pr/index.js deleted file mode 100644 index 3396f6acf7..0000000000 --- a/.github/actions/check-pr/index.js +++ /dev/null @@ -1,36404 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 3864: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.HttpClientResponse = exports.HttpClientError = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -exports.getProxyUrl = getProxyUrl; -exports.isHttps = isHttps; -const http = __importStar(__nccwpck_require__(8611)); -const https = __importStar(__nccwpck_require__(5692)); -const pm = __importStar(__nccwpck_require__(6424)); -const tunnel = __importStar(__nccwpck_require__(7285)); -const undici_1 = __nccwpck_require__(9422); -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (exports.Headers = Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (exports.MediaTypes = MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 6424: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getProxyUrl = getProxyUrl; -exports.checkBypass = checkBypass; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -module.exports.Dispatcher = Dispatcher -module.exports.Client = Client -module.exports.Pool = Pool -module.exports.BalancedPool = BalancedPool -module.exports.Agent = Agent -module.exports.ProxyAgent = ProxyAgent -module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent -module.exports.RetryAgent = RetryAgent -module.exports.RetryHandler = RetryHandler - -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor -module.exports.interceptors = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -module.exports.buildConnector = buildConnector -module.exports.errors = errors -module.exports.util = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -module.exports.setGlobalDispatcher = setGlobalDispatcher -module.exports.getGlobalDispatcher = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -module.exports.fetch = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -module.exports.Headers = __nccwpck_require__(9822).Headers -module.exports.Response = __nccwpck_require__(8661).Response -module.exports.Request = __nccwpck_require__(6465).Request -module.exports.FormData = __nccwpck_require__(9976).FormData -module.exports.File = globalThis.File ?? (__nccwpck_require__(4573).File) -module.exports.FileReader = __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -module.exports.setGlobalOrigin = setGlobalOrigin -module.exports.getGlobalOrigin = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -module.exports.caches = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -module.exports.deleteCookie = deleteCookie -module.exports.getCookies = getCookies -module.exports.getSetCookies = getSetCookies -module.exports.setCookie = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -module.exports.parseMIMEType = parseMIMEType -module.exports.serializeAMimeType = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -module.exports.WebSocket = __nccwpck_require__(7976).WebSocket -module.exports.CloseEvent = CloseEvent -module.exports.ErrorEvent = ErrorEvent -module.exports.MessageEvent = MessageEvent - -module.exports.request = makeDispatcher(api.request) -module.exports.stream = makeDispatcher(api.stream) -module.exports.pipeline = makeDispatcher(api.pipeline) -module.exports.connect = makeDispatcher(api.connect) -module.exports.upgrade = makeDispatcher(api.upgrade) - -module.exports.MockClient = MockClient -module.exports.MockPool = MockPool -module.exports.MockAgent = MockAgent -module.exports.mockErrors = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -module.exports.EventSource = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5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wgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ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BAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQA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IgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASA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BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }), - -/***/ 5723: -/***/ ((module) => { - -var __webpack_unused_export__; - - -const NullObject = function NullObject () { } -NullObject.prototype = Object.create(null) - -/** - * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 - * - * parameter = token "=" ( token / quoted-string ) - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE - * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text - * obs-text = %x80-FF - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - */ -const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu - -/** - * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 - * - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - * obs-text = %x80-FF - */ -const quotedPairRE = /\\([\v\u0020-\u00ff])/gu - -/** - * RegExp to match type in RFC 7231 sec 3.1.1.1 - * - * media-type = type "/" subtype - * type = token - * subtype = token - */ -const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u - -// default ContentType to prevent repeated object creation -const defaultContentType = { type: '', parameters: new NullObject() } -Object.freeze(defaultContentType.parameters) -Object.freeze(defaultContentType) - -/** - * Parse media type to object. - * - * @param {string|object} header - * @return {Object} - * @public - */ - -function parse (header) { - if (typeof header !== 'string') { - throw new TypeError('argument header is required and must be a string') - } - - let index = header.indexOf(';') - const type = index !== -1 - ? header.slice(0, index).trim() - : header.trim() - - if (mediaTypeRE.test(type) === false) { - throw new TypeError('invalid media type') - } - - const result = { - type: type.toLowerCase(), - parameters: new NullObject() - } - - // parse parameters - if (index === -1) { - return result - } - - let key - let match - let value - - paramRE.lastIndex = index - - while ((match = paramRE.exec(header))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .slice(1, value.length - 1) - - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1')) - } - - result.parameters[key] = value - } - - if (index !== header.length) { - throw new TypeError('invalid parameter format') - } - - return result -} - -function safeParse (header) { - if (typeof header !== 'string') { - return defaultContentType - } - - let index = header.indexOf(';') - const type = index !== -1 - ? header.slice(0, index).trim() - : header.trim() - - if (mediaTypeRE.test(type) === false) { - return defaultContentType - } - - const result = { - type: type.toLowerCase(), - parameters: new NullObject() - } - - // parse parameters - if (index === -1) { - return result - } - - let key - let match - let value - - paramRE.lastIndex = index - - while ((match = paramRE.exec(header))) { - if (match.index !== index) { - return defaultContentType - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .slice(1, value.length - 1) - - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1')) - } - - result.parameters[key] = value - } - - if (index !== header.length) { - return defaultContentType - } - - return result -} - -__webpack_unused_export__ = { parse, safeParse } -__webpack_unused_export__ = parse -module.exports.xL = safeParse -__webpack_unused_export__ = defaultContentType - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; - -;// CONCATENATED MODULE: external "os" -const external_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_namespaceObject.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -;// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); -;// CONCATENATED MODULE: external "fs" -const external_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -;// CONCATENATED MODULE: external "path" -const external_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_namespaceObject.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_namespaceObject.constants.R_OK | external_fs_namespaceObject.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_namespaceObject.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -;// CONCATENATED MODULE: external "child_process" -const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_namespaceObject.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_namespaceObject.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_namespaceObject.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_namespaceObject.dirname(filePath); - const upperName = external_path_namespaceObject.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_namespaceObject.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_namespaceObject.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_namespaceObject.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_namespaceObject.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_namespaceObject.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_namespaceObject.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_namespaceObject.EOL.length); - n = s.indexOf(external_os_namespaceObject.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_namespaceObject.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_namespaceObject.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_namespaceObject.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_namespaceObject.platform(); -const arch = external_os_namespaceObject.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - issueCommand('set-output', { name }, toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + external_os_namespaceObject.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/context.js - - -class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - var _a, _b, _c; - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if ((0,external_fs_namespaceObject.existsSync)(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse((0,external_fs_namespaceObject.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); - } - else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${external_os_namespaceObject.EOL}`); - } - } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - this.job = process.env.GITHUB_JOB; - this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); - this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); - this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; - this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; - this.graphqlUrl = - (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); - } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - return { owner, repo }; - } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; - } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); - } -} -//# sourceMappingURL=context.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/@actions+http-client@3.0.2/node_modules/@actions/http-client/lib/index.js -var lib = __nccwpck_require__(3864); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/internal/utils.js -var utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -function getAuthString(token, options) { - if (!token && !options.auth) { - throw new Error('Parameter token or opts.auth is required'); - } - else if (token && options.auth) { - throw new Error('Parameters token and opts.auth may not both be specified'); - } - return typeof options.auth === 'string' ? options.auth : `token ${token}`; -} -function getProxyAgent(destinationUrl) { - const hc = new lib.HttpClient(); - return hc.getAgent(destinationUrl); -} -function getProxyAgentDispatcher(destinationUrl) { - const hc = new lib.HttpClient(); - return hc.getAgentDispatcher(destinationUrl); -} -function getProxyFetch(destinationUrl) { - const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => utils_awaiter(this, void 0, void 0, function* () { - return (0,undici.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); - }); - return proxyFetch; -} -function getApiBaseUrl() { - return process.env['GITHUB_API_URL'] || 'https://api.github.com'; -} -function getUserAgentWithOrchestrationId(baseUserAgent) { - var _a; - const orchId = (_a = process.env['ACTIONS_ORCHESTRATION_ID']) === null || _a === void 0 ? void 0 : _a.trim(); - if (orchId) { - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - const tag = `actions_orchestration_id/${sanitizedId}`; - if (baseUserAgent === null || baseUserAgent === void 0 ? void 0 : baseUserAgent.includes(tag)) - return baseUserAgent; - const ua = baseUserAgent ? `${baseUserAgent} ` : ''; - return `${ua}${tag}`; - } - return baseUserAgent; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.js -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && process.version !== undefined) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${ - process.arch - })`; - } - - return ""; -} - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.js -// @ts-check - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } - - if (Array.isArray(name)) { - return name.reverse().reduce((callback, name) => { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(() => { - if (!state.registry[name]) { - return method(options); - } - - return state.registry[name].reduce((method, registered) => { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.js -// @ts-check - -function addHook(state, kind, name, hook) { - const orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = (method, options) => { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } - - if (kind === "after") { - hook = (method, options) => { - let result; - return Promise.resolve() - .then(method.bind(null, options)) - .then((result_) => { - result = result_; - return orig(result, options); - }) - .then(() => { - return result; - }); - }; - } - - if (kind === "error") { - hook = (method, options) => { - return Promise.resolve() - .then(method.bind(null, options)) - .catch((error) => { - return orig(error, options); - }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.js -// @ts-check - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - const index = state.registry[name] - .map((registered) => { - return registered.orig; - }) - .indexOf(method); - - if (index === -1) { - return; - } - - state.registry[name].splice(index, 1); -} - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.js -// @ts-check - - - - - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -const bind = Function.bind; -const bindable = bind.bind(bind); - -function bindApi(hook, state, name) { - const removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach((kind) => { - const args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} - -function Singular() { - const singularHookName = Symbol("Singular"); - const singularHookState = { - registry: {}, - }; - const singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} - -function Collection() { - const state = { - registry: {}, - }; - - const hook = register.bind(null, state); - bindApi(hook, state); - - return hook; -} - -/* harmony default export */ const before_after_hook = ({ Singular, Collection }); - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+endpoint@11.0.3/node_modules/@octokit/endpoint/dist-bundle/index.js -// pkg/dist-src/defaults.js - - -// pkg/dist-src/version.js -var VERSION = "0.0.0-development"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function dist_bundle_lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) return false; - if (Object.prototype.toString.call(value) !== "[object Object]") return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { [key]: options[key] }); - else result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = dist_bundle_lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^{}}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); -} - -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} - -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/(? { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); - - -// EXTERNAL MODULE: ../../node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js -var fast_content_type_parse = __nccwpck_require__(5723); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/json-with-bigint@3.5.8/node_modules/json-with-bigint/json-with-bigint.js -const intRegex = /^-?\d+$/; -const noiseValue = /^-?\d+n+$/; // Noise - strings that match the custom format before being converted to it -const originalStringify = JSON.stringify; -const originalParse = JSON.parse; -const customFormat = /^-?\d+n$/; - -const bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; -const noiseStringify = - /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; - -/** - * @typedef {(this: any, key: string | number | undefined, value: any) => any} Replacer - * @typedef {(key: string | number | undefined, value: any, context?: { source: string }) => any} Reviver - */ - -/** - * Converts a JavaScript value to a JSON string. - * - * Supports serialization of BigInt values using two strategies: - * 1. Custom format "123n" → "123" (universal fallback) - * 2. Native JSON.rawJSON() (Node.js 22+, fastest) when available - * - * All other values are serialized exactly like native JSON.stringify(). - * - * @param {*} value The value to convert to a JSON string. - * @param {Replacer | Array | null} [replacer] - * A function that alters the behavior of the stringification process, - * or an array of strings/numbers to indicate properties to exclude. - * @param {string | number} [space] - * A string or number to specify indentation or pretty-printing. - * @returns {string} The JSON string representation. - */ -const JSONStringify = (value, replacer, space) => { - if ("rawJSON" in JSON) { - return originalStringify( - value, - (key, value) => { - if (typeof value === "bigint") return JSON.rawJSON(value.toString()); - - if (typeof replacer === "function") return replacer(key, value); - - if (Array.isArray(replacer) && replacer.includes(key)) return value; - - return value; - }, - space, - ); - } - - if (!value) return originalStringify(value, replacer, space); - - const convertedToCustomJSON = originalStringify( - value, - (key, value) => { - const isNoise = typeof value === "string" && noiseValue.test(value); - - if (isNoise) return value.toString() + "n"; // Mark noise values with additional "n" to offset the deletion of one "n" during the processing - - if (typeof value === "bigint") return value.toString() + "n"; - - if (typeof replacer === "function") return replacer(key, value); - - if (Array.isArray(replacer) && replacer.includes(key)) return value; - - return value; - }, - space, - ); - const processedJSON = convertedToCustomJSON.replace( - bigIntsStringify, - "$1$2$3", - ); // Delete one "n" off the end of every BigInt value - const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3"); // Remove one "n" off the end of every noisy string - - return denoisedJSON; -}; - -const featureCache = new Map(); - -/** - * Detects if the current JSON.parse implementation supports the context.source feature. - * - * Uses toString() fingerprinting to cache results and automatically detect runtime - * replacements of JSON.parse (polyfills, mocks, etc.). - * - * @returns {boolean} true if context.source is supported, false otherwise. - */ -const isContextSourceSupported = () => { - const parseFingerprint = JSON.parse.toString(); - - if (featureCache.has(parseFingerprint)) { - return featureCache.get(parseFingerprint); - } - - try { - const result = JSON.parse( - "1", - (_, __, context) => !!context?.source && context.source === "1", - ); - featureCache.set(parseFingerprint, result); - - return result; - } catch { - featureCache.set(parseFingerprint, false); - - return false; - } -}; - -/** - * Reviver function that converts custom-format BigInt strings back to BigInt values. - * Also handles "noise" strings that accidentally match the BigInt format. - * - * @param {string | number | undefined} key The object key. - * @param {*} value The value being parsed. - * @param {object} [context] Parse context (if supported by JSON.parse). - * @param {Reviver} [userReviver] User's custom reviver function. - * @returns {any} The transformed value. - */ -const convertMarkedBigIntsReviver = (key, value, context, userReviver) => { - const isCustomFormatBigInt = - typeof value === "string" && customFormat.test(value); - if (isCustomFormatBigInt) return BigInt(value.slice(0, -1)); - - const isNoiseValue = typeof value === "string" && noiseValue.test(value); - if (isNoiseValue) return value.slice(0, -1); - - if (typeof userReviver !== "function") return value; - - return userReviver(key, value, context); -}; - -/** - * Fast JSON.parse implementation (~2x faster than classic fallback). - * Uses JSON.parse's context.source feature to detect integers and convert - * large numbers directly to BigInt without string manipulation. - * - * Does not support legacy custom format from v1 of this library. - * - * @param {string} text JSON string to parse. - * @param {Reviver} [reviver] Transform function to apply to each value. - * @returns {any} Parsed JavaScript value. - */ -const JSONParseV2 = (text, reviver) => { - return JSON.parse(text, (key, value, context) => { - const isBigNumber = - typeof value === "number" && - (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER); - const isInt = context && intRegex.test(context.source); - const isBigInt = isBigNumber && isInt; - - if (isBigInt) return BigInt(context.source); - - if (typeof reviver !== "function") return value; - - return reviver(key, value, context); - }); -}; - -const MAX_INT = Number.MAX_SAFE_INTEGER.toString(); -const MAX_DIGITS = MAX_INT.length; -const stringsOrLargeNumbers = - /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; -const noiseValueWithQuotes = /^"-?\d+n+"$/; // Noise - strings that match the custom format before being converted to it - -/** - * Converts a JSON string into a JavaScript value. - * - * Supports parsing of large integers using two strategies: - * 1. Classic fallback: Marks large numbers with "123n" format, then converts to BigInt - * 2. Fast path (JSONParseV2): Uses context.source feature (~2x faster) when available - * - * All other JSON values are parsed exactly like native JSON.parse(). - * - * @param {string} text A valid JSON string. - * @param {Reviver} [reviver] - * A function that transforms the results. This function is called for each member - * of the object. If a member contains nested objects, the nested objects are - * transformed before the parent object is. - * @returns {any} The parsed JavaScript value. - * @throws {SyntaxError} If text is not valid JSON. - */ -const JSONParse = (text, reviver) => { - if (!text) return originalParse(text, reviver); - - if (isContextSourceSupported()) return JSONParseV2(text, reviver); // Shortcut to a faster (2x) and simpler version - - // Find and mark big numbers with "n" - const serializedData = text.replace( - stringsOrLargeNumbers, - (text, digits, fractional, exponential) => { - const isString = text[0] === '"'; - const isNoise = isString && noiseValueWithQuotes.test(text); - - if (isNoise) return text.substring(0, text.length - 1) + 'n"'; // Mark noise values with additional "n" to offset the deletion of one "n" during the processing - - const isFractionalOrExponential = fractional || exponential; - const isLessThanMaxSafeInt = - digits && - (digits.length < MAX_DIGITS || - (digits.length === MAX_DIGITS && digits <= MAX_INT)); // With a fixed number of digits, we can correctly use lexicographical comparison to do a numeric comparison - - if (isString || isFractionalOrExponential || isLessThanMaxSafeInt) - return text; - - return '"' + text + 'n"'; - }, - ); - - return originalParse(serializedData, (key, value, context) => - convertMarkedBigIntsReviver(key, value, context, reviver), - ); -}; - - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+request-error@7.1.0/node_modules/@octokit/request-error/dist-src/index.js -class RequestError extends Error { - name; - /** - * http status code - */ - status; - /** - * Request options that lead to the error. - */ - request; - /** - * Response object if a response was received - */ - response; - constructor(message, statusCode, options) { - super(message, { cause: options.cause }); - this.name = "HttpError"; - this.status = Number.parseInt(statusCode); - if (Number.isNaN(this.status)) { - this.status = 0; - } - /* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */ - if ("response" in options) { - this.response = options.response; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? ""; -async function fetchWrapper(requestOptions) { - const fetch = requestOptions.request?.fetch || globalThis.fetch; - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - const log = requestOptions.request?.log || console; - const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = dist_bundle_isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body; - const requestHeaders = Object.fromEntries( - Object.entries(requestOptions.headers).map(([name, value]) => [ - name, - String(value) - ]) - ); - let fetchResponse; - try { - fetchResponse = await fetch(requestOptions.url, { - method: requestOptions.method, - body, - redirect: requestOptions.request?.redirect, - headers: requestHeaders, - signal: requestOptions.request?.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }); - } catch (error) { - let message = "Unknown Error"; - if (error instanceof Error) { - if (error.name === "AbortError") { - error.status = 500; - throw error; - } - message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; - } - } - } - const requestError = new RequestError(message, 500, { - request: requestOptions - }); - requestError.cause = error; - throw requestError; - } - const status = fetchResponse.status; - const url = fetchResponse.url; - const responseHeaders = {}; - for (const [key, value] of fetchResponse.headers) { - responseHeaders[key] = value; - } - const octokitResponse = { - url, - status, - headers: responseHeaders, - data: "" - }; - if ("deprecation" in responseHeaders) { - const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return octokitResponse; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return octokitResponse; - } - throw new RequestError(fetchResponse.statusText, status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status === 304) { - octokitResponse.data = await getResponseData(fetchResponse); - throw new RequestError("Not modified", status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status >= 400) { - octokitResponse.data = await getResponseData(fetchResponse); - throw new RequestError(toErrorMessage(octokitResponse.data), status, { - response: octokitResponse, - request: requestOptions - }); - } - octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; - return octokitResponse; -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (!contentType) { - return response.text().catch(noop); - } - const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType); - if (isJSONResponse(mimetype)) { - let text = ""; - try { - text = await response.text(); - return JSONParse(text); - } catch (err) { - return text; - } - } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { - return response.text().catch(noop); - } else { - return response.arrayBuffer().catch( - /* v8 ignore next -- @preserve */ - () => new ArrayBuffer(0) - ); - } -} -function isJSONResponse(mimetype) { - return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; -} -function toErrorMessage(data) { - if (typeof data === "string") { - return data; - } - if (data instanceof ArrayBuffer) { - return "Unknown error"; - } - if ("message" in data) { - const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; - return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} - -// pkg/dist-src/with-defaults.js -function dist_bundle_withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: dist_bundle_withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: dist_bundle_withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = dist_bundle_withDefaults(endpoint, defaults_default); - -/* v8 ignore next -- @preserve */ -/* v8 ignore else -- @preserve */ - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+graphql@9.0.3/node_modules/@octokit/graphql/dist-bundle/index.js -// pkg/dist-src/index.js - - - -// pkg/dist-src/version.js -var graphql_dist_bundle_VERSION = "0.0.0-development"; - -// pkg/dist-src/with-defaults.js - - -// pkg/dist-src/graphql.js - - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } - name = "GraphqlResponseError"; - errors; - data; -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType", - "operationName" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function graphql_dist_bundle_withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: graphql_dist_bundle_withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = graphql_dist_bundle_withDefaults(request, { - headers: { - "user-agent": `octokit-graphql.js/${graphql_dist_bundle_VERSION} ${getUserAgent()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return graphql_dist_bundle_withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.js -// pkg/dist-src/is-jwt.js -var b64url = "(?:[a-zA-Z0-9_-]+)"; -var sep = "\\."; -var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); -var isJWT = jwtRE.test.bind(jwtRE); - -// pkg/dist-src/auth.js -async function auth(token) { - const isApp = isJWT(token); - const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_"); - const isUserToServer = token.startsWith("ghu_"); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+core@7.0.6/node_modules/@octokit/core/dist-src/version.js -const version_VERSION = "7.0.6"; - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+core@7.0.6/node_modules/@octokit/core/dist-src/index.js - - - - - - -const dist_src_noop = () => { -}; -const consoleWarn = console.warn.bind(console); -const consoleError = console.error.bind(console); -function createLogger(logger = {}) { - if (typeof logger.debug !== "function") { - logger.debug = dist_src_noop; - } - if (typeof logger.info !== "function") { - logger.info = dist_src_noop; - } - if (typeof logger.warn !== "function") { - logger.warn = consoleWarn; - } - if (typeof logger.error !== "function") { - logger.error = consoleError; - } - return logger; -} -const userAgentTrail = `octokit-core.js/${version_VERSION} ${getUserAgent()}`; -class Octokit { - static VERSION = version_VERSION; - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); - } - }; - return OctokitWithDefaults; - } - static plugins = []; - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - }; - return NewOctokit; - } - constructor(options = {}) { - const hook = new before_after_hook.Collection(); - const requestDefaults = { - baseUrl: request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - this.request = request.defaults(requestDefaults); - this.graphql = withCustomRequest(this.request).defaults(requestDefaults); - this.log = createLogger(options.log); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth = createTokenAuth(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; - } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); - } - } - // assigned during constructor - request; - graphql; - log; - hook; - // TODO: type `octokit.auth` based on passed options.authStrategy - auth; -} - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js -const dist_src_version_VERSION = "17.0.0"; - -//# sourceMappingURL=version.js.map - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js -const Endpoints = { - actions: { - addCustomLabelsToSelfHostedRunnerForOrg: [ - "POST /orgs/{org}/actions/runners/{runner_id}/labels" - ], - addCustomLabelsToSelfHostedRunnerForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - addRepoAccessToSelfHostedRunnerGroupInOrg: [ - "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - approveWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" - ], - cancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" - ], - createEnvironmentVariable: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/variables" - ], - createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"], - createOrUpdateEnvironmentSecret: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - createOrgVariable: ["POST /orgs/{org}/actions/variables"], - createRegistrationTokenForOrg: [ - "POST /orgs/{org}/actions/runners/registration-token" - ], - createRegistrationTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/registration-token" - ], - createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], - createRemoveTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/remove-token" - ], - createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], - createWorkflowDispatch: [ - "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" - ], - deleteActionsCacheById: [ - "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" - ], - deleteActionsCacheByKey: [ - "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" - ], - deleteArtifact: [ - "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" - ], - deleteCustomImageFromOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" - ], - deleteCustomImageVersionFromOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" - ], - deleteEnvironmentSecret: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - deleteEnvironmentVariable: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - deleteHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - deleteRepoVariable: [ - "DELETE /repos/{owner}/{repo}/actions/variables/{name}" - ], - deleteSelfHostedRunnerFromOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}" - ], - deleteSelfHostedRunnerFromRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], - deleteWorkflowRunLogs: [ - "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - disableSelectedRepositoryGithubActionsOrganization: [ - "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - disableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" - ], - downloadArtifact: [ - "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" - ], - downloadJobLogsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" - ], - downloadWorkflowRunAttemptLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" - ], - downloadWorkflowRunLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - enableSelectedRepositoryGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - enableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" - ], - forceCancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" - ], - generateRunnerJitconfigForOrg: [ - "POST /orgs/{org}/actions/runners/generate-jitconfig" - ], - generateRunnerJitconfigForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" - ], - getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], - getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], - getActionsCacheUsageByRepoForOrg: [ - "GET /orgs/{org}/actions/cache/usage-by-repository" - ], - getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], - getAllowedActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/selected-actions" - ], - getAllowedActionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], - getCustomImageForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" - ], - getCustomImageVersionForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" - ], - getCustomOidcSubClaimForRepo: [ - "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - getEnvironmentPublicKey: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key" - ], - getEnvironmentSecret: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - getEnvironmentVariable: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - getGithubActionsDefaultWorkflowPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions/workflow" - ], - getGithubActionsDefaultWorkflowPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/workflow" - ], - getGithubActionsPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions" - ], - getGithubActionsPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions" - ], - getHostedRunnerForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - getHostedRunnersGithubOwnedImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/github-owned" - ], - getHostedRunnersLimitsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/limits" - ], - getHostedRunnersMachineSpecsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/machine-sizes" - ], - getHostedRunnersPartnerImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/partner" - ], - getHostedRunnersPlatformsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/platforms" - ], - getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], - getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], - getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], - getPendingDeploymentsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - getRepoPermissions: [ - "GET /repos/{owner}/{repo}/actions/permissions", - {}, - { renamed: ["actions", "getGithubActionsPermissionsRepository"] } - ], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], - getReviewsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" - ], - getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], - getWorkflowAccessToRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/access" - ], - getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], - getWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" - ], - getWorkflowRunUsage: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" - ], - getWorkflowUsage: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" - ], - listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], - listCustomImageVersionsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions" - ], - listCustomImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom" - ], - listEnvironmentSecrets: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets" - ], - listEnvironmentVariables: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/variables" - ], - listGithubHostedRunnersInGroupForOrg: [ - "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners" - ], - listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"], - listJobsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" - ], - listJobsForWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" - ], - listLabelsForSelfHostedRunnerForOrg: [ - "GET /orgs/{org}/actions/runners/{runner_id}/labels" - ], - listLabelsForSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], - listOrgVariables: ["GET /orgs/{org}/actions/variables"], - listRepoOrganizationSecrets: [ - "GET /repos/{owner}/{repo}/actions/organization-secrets" - ], - listRepoOrganizationVariables: [ - "GET /repos/{owner}/{repo}/actions/organization-variables" - ], - listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], - listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], - listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], - listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/downloads" - ], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - listSelectedReposForOrgVariable: [ - "GET /orgs/{org}/actions/variables/{name}/repositories" - ], - listSelectedRepositoriesEnabledGithubActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/repositories" - ], - listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], - listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" - ], - listWorkflowRuns: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" - ], - listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], - reRunJobForWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" - ], - reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], - reRunWorkflowFailedJobs: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" - ], - removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" - ], - removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - removeCustomLabelFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" - ], - removeCustomLabelFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgVariable: [ - "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - reviewCustomGatesForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" - ], - reviewPendingDeploymentsForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - setAllowedActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/selected-actions" - ], - setAllowedActionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - setCustomLabelsForSelfHostedRunnerForOrg: [ - "PUT /orgs/{org}/actions/runners/{runner_id}/labels" - ], - setCustomLabelsForSelfHostedRunnerForRepo: [ - "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - setCustomOidcSubClaimForRepo: [ - "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - setGithubActionsDefaultWorkflowPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/workflow" - ], - setGithubActionsDefaultWorkflowPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/workflow" - ], - setGithubActionsPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions" - ], - setGithubActionsPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories" - ], - setSelectedRepositoriesEnabledGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories" - ], - setWorkflowAccessToRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/access" - ], - updateEnvironmentVariable: [ - "PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - updateHostedRunnerForOrg: [ - "PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], - updateRepoVariable: [ - "PATCH /repos/{owner}/{repo}/actions/variables/{name}" - ] - }, - activity: { - checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], - deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: [ - "DELETE /notifications/threads/{thread_id}/subscription" - ], - getFeeds: ["GET /feeds"], - getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], - getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: [ - "GET /notifications/threads/{thread_id}/subscription" - ], - listEventsForAuthenticatedUser: ["GET /users/{username}/events"], - listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: [ - "GET /users/{username}/events/orgs/{org}" - ], - listPublicEvents: ["GET /events"], - listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], - listPublicEventsForUser: ["GET /users/{username}/events/public"], - listPublicOrgEvents: ["GET /orgs/{org}/events"], - listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: [ - "GET /users/{username}/received_events/public" - ], - listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/notifications" - ], - listReposStarredByAuthenticatedUser: ["GET /user/starred"], - listReposStarredByUser: ["GET /users/{username}/starred"], - listReposWatchedByUser: ["GET /users/{username}/subscriptions"], - listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], - listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], - listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], - markNotificationsAsRead: ["PUT /notifications"], - markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], - markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], - markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], - setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: [ - "PUT /notifications/threads/{thread_id}/subscription" - ], - starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], - unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] - }, - apps: { - addRepoToInstallation: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } - ], - addRepoToInstallationForAuthenticatedUser: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}" - ], - checkToken: ["POST /applications/{client_id}/token"], - createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: [ - "POST /app/installations/{installation_id}/access_tokens" - ], - deleteAuthorization: ["DELETE /applications/{client_id}/grant"], - deleteInstallation: ["DELETE /app/installations/{installation_id}"], - deleteToken: ["DELETE /applications/{client_id}/token"], - getAuthenticated: ["GET /app"], - getBySlug: ["GET /apps/{app_slug}"], - getInstallation: ["GET /app/installations/{installation_id}"], - getOrgInstallation: ["GET /orgs/{org}/installation"], - getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: [ - "GET /marketplace_listing/accounts/{account_id}" - ], - getSubscriptionPlanForAccountStubbed: [ - "GET /marketplace_listing/stubbed/accounts/{account_id}" - ], - getUserInstallation: ["GET /users/{username}/installation"], - getWebhookConfigForApp: ["GET /app/hook/config"], - getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], - listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: [ - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" - ], - listInstallationReposForAuthenticatedUser: [ - "GET /user/installations/{installation_id}/repositories" - ], - listInstallationRequestsForAuthenticatedApp: [ - "GET /app/installation-requests" - ], - listInstallations: ["GET /app/installations"], - listInstallationsForAuthenticatedUser: ["GET /user/installations"], - listPlans: ["GET /marketplace_listing/plans"], - listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], - listReposAccessibleToInstallation: ["GET /installation/repositories"], - listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], - listSubscriptionsForAuthenticatedUserStubbed: [ - "GET /user/marketplace_purchases/stubbed" - ], - listWebhookDeliveries: ["GET /app/hook/deliveries"], - redeliverWebhookDelivery: [ - "POST /app/hook/deliveries/{delivery_id}/attempts" - ], - removeRepoFromInstallation: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } - ], - removeRepoFromInstallationForAuthenticatedUser: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}" - ], - resetToken: ["PATCH /applications/{client_id}/token"], - revokeInstallationAccessToken: ["DELETE /installation/token"], - scopeToken: ["POST /applications/{client_id}/token/scoped"], - suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: [ - "DELETE /app/installations/{installation_id}/suspended" - ], - updateWebhookConfigForApp: ["PATCH /app/hook/config"] - }, - billing: { - getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], - getGithubActionsBillingUser: [ - "GET /users/{username}/settings/billing/actions" - ], - getGithubBillingPremiumRequestUsageReportOrg: [ - "GET /organizations/{org}/settings/billing/premium_request/usage" - ], - getGithubBillingPremiumRequestUsageReportUser: [ - "GET /users/{username}/settings/billing/premium_request/usage" - ], - getGithubBillingUsageReportOrg: [ - "GET /organizations/{org}/settings/billing/usage" - ], - getGithubBillingUsageReportUser: [ - "GET /users/{username}/settings/billing/usage" - ], - getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: [ - "GET /users/{username}/settings/billing/packages" - ], - getSharedStorageBillingOrg: [ - "GET /orgs/{org}/settings/billing/shared-storage" - ], - getSharedStorageBillingUser: [ - "GET /users/{username}/settings/billing/shared-storage" - ] - }, - campaigns: { - createCampaign: ["POST /orgs/{org}/campaigns"], - deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"], - getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"], - listOrgCampaigns: ["GET /orgs/{org}/campaigns"], - updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"] - }, - checks: { - create: ["POST /repos/{owner}/{repo}/check-runs"], - createSuite: ["POST /repos/{owner}/{repo}/check-suites"], - get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], - getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], - listAnnotations: [ - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" - ], - listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], - listForSuite: [ - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" - ], - listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], - rerequestRun: [ - "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" - ], - rerequestSuite: [ - "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" - ], - setSuitesPreferences: [ - "PATCH /repos/{owner}/{repo}/check-suites/preferences" - ], - update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] - }, - codeScanning: { - commitAutofix: [ - "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits" - ], - createAutofix: [ - "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" - ], - createVariantAnalysis: [ - "POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses" - ], - deleteAnalysis: [ - "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" - ], - deleteCodeqlDatabase: [ - "DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" - ], - getAlert: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", - {}, - { renamedParameters: { alert_id: "alert_number" } } - ], - getAnalysis: [ - "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" - ], - getAutofix: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" - ], - getCodeqlDatabase: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" - ], - getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], - getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], - getVariantAnalysis: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}" - ], - getVariantAnalysisRepoTask: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}" - ], - listAlertInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" - ], - listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - {}, - { renamed: ["codeScanning", "listAlertInstances"] } - ], - listCodeqlDatabases: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" - ], - listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" - ], - updateDefaultSetup: [ - "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" - ], - uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] - }, - codeSecurity: { - attachConfiguration: [ - "POST /orgs/{org}/code-security/configurations/{configuration_id}/attach" - ], - attachEnterpriseConfiguration: [ - "POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach" - ], - createConfiguration: ["POST /orgs/{org}/code-security/configurations"], - createConfigurationForEnterprise: [ - "POST /enterprises/{enterprise}/code-security/configurations" - ], - deleteConfiguration: [ - "DELETE /orgs/{org}/code-security/configurations/{configuration_id}" - ], - deleteConfigurationForEnterprise: [ - "DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ], - detachConfiguration: [ - "DELETE /orgs/{org}/code-security/configurations/detach" - ], - getConfiguration: [ - "GET /orgs/{org}/code-security/configurations/{configuration_id}" - ], - getConfigurationForRepository: [ - "GET /repos/{owner}/{repo}/code-security-configuration" - ], - getConfigurationsForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations" - ], - getConfigurationsForOrg: ["GET /orgs/{org}/code-security/configurations"], - getDefaultConfigurations: [ - "GET /orgs/{org}/code-security/configurations/defaults" - ], - getDefaultConfigurationsForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations/defaults" - ], - getRepositoriesForConfiguration: [ - "GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories" - ], - getRepositoriesForEnterpriseConfiguration: [ - "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories" - ], - getSingleConfigurationForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ], - setConfigurationAsDefault: [ - "PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults" - ], - setConfigurationAsDefaultForEnterprise: [ - "PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults" - ], - updateConfiguration: [ - "PATCH /orgs/{org}/code-security/configurations/{configuration_id}" - ], - updateEnterpriseConfiguration: [ - "PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ] - }, - codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct"], - getConductCode: ["GET /codes_of_conduct/{key}"] - }, - codespaces: { - addRepositoryForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - checkPermissionsForDevcontainer: [ - "GET /repos/{owner}/{repo}/codespaces/permissions_check" - ], - codespaceMachinesForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/machines" - ], - createForAuthenticatedUser: ["POST /user/codespaces"], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - createOrUpdateSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}" - ], - createWithPrForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" - ], - createWithRepoForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/codespaces" - ], - deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], - deleteFromOrganization: [ - "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - deleteSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}" - ], - exportForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/exports" - ], - getCodespacesForUserInOrg: [ - "GET /orgs/{org}/members/{username}/codespaces" - ], - getExportDetailsForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/exports/{export_id}" - ], - getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], - getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], - getPublicKeyForAuthenticatedUser: [ - "GET /user/codespaces/secrets/public-key" - ], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - getSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}" - ], - listDevcontainersInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/devcontainers" - ], - listForAuthenticatedUser: ["GET /user/codespaces"], - listInOrganization: [ - "GET /orgs/{org}/codespaces", - {}, - { renamedParameters: { org_id: "org" } } - ], - listInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces" - ], - listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], - listRepositoriesForSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}/repositories" - ], - listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - preFlightWithRepoForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/new" - ], - publishForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/publish" - ], - removeRepositoryForSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - repoMachinesForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/machines" - ], - setRepositoriesForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], - stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], - stopInOrganization: [ - "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" - ], - updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] - }, - copilot: { - addCopilotSeatsForTeams: [ - "POST /orgs/{org}/copilot/billing/selected_teams" - ], - addCopilotSeatsForUsers: [ - "POST /orgs/{org}/copilot/billing/selected_users" - ], - cancelCopilotSeatAssignmentForTeams: [ - "DELETE /orgs/{org}/copilot/billing/selected_teams" - ], - cancelCopilotSeatAssignmentForUsers: [ - "DELETE /orgs/{org}/copilot/billing/selected_users" - ], - copilotMetricsForOrganization: ["GET /orgs/{org}/copilot/metrics"], - copilotMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/metrics"], - getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], - getCopilotSeatDetailsForUser: [ - "GET /orgs/{org}/members/{username}/copilot" - ], - listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] - }, - credentials: { revoke: ["POST /credentials/revoke"] }, - dependabot: { - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], - getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - listAlertsForEnterprise: [ - "GET /enterprises/{enterprise}/dependabot/alerts" - ], - listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], - listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - repositoryAccessForOrg: [ - "GET /organizations/{org}/dependabot/repository-access" - ], - setRepositoryAccessDefaultLevel: [ - "PUT /organizations/{org}/dependabot/repository-access/default-level" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" - ], - updateRepositoryAccessForOrg: [ - "PATCH /organizations/{org}/dependabot/repository-access" - ] - }, - dependencyGraph: { - createRepositorySnapshot: [ - "POST /repos/{owner}/{repo}/dependency-graph/snapshots" - ], - diffRange: [ - "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" - ], - exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] - }, - emojis: { get: ["GET /emojis"] }, - enterpriseTeamMemberships: { - add: [ - "PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ], - bulkAdd: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add" - ], - bulkRemove: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove" - ], - get: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ], - list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"], - remove: [ - "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ] - }, - enterpriseTeamOrganizations: { - add: [ - "PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - bulkAdd: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add" - ], - bulkRemove: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove" - ], - delete: [ - "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - getAssignment: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - getAssignments: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations" - ] - }, - enterpriseTeams: { - create: ["POST /enterprises/{enterprise}/teams"], - delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"], - get: ["GET /enterprises/{enterprise}/teams/{team_slug}"], - list: ["GET /enterprises/{enterprise}/teams"], - update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"] - }, - gists: { - checkIsStarred: ["GET /gists/{gist_id}/star"], - create: ["POST /gists"], - createComment: ["POST /gists/{gist_id}/comments"], - delete: ["DELETE /gists/{gist_id}"], - deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], - fork: ["POST /gists/{gist_id}/forks"], - get: ["GET /gists/{gist_id}"], - getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], - getRevision: ["GET /gists/{gist_id}/{sha}"], - list: ["GET /gists"], - listComments: ["GET /gists/{gist_id}/comments"], - listCommits: ["GET /gists/{gist_id}/commits"], - listForUser: ["GET /users/{username}/gists"], - listForks: ["GET /gists/{gist_id}/forks"], - listPublic: ["GET /gists/public"], - listStarred: ["GET /gists/starred"], - star: ["PUT /gists/{gist_id}/star"], - unstar: ["DELETE /gists/{gist_id}/star"], - update: ["PATCH /gists/{gist_id}"], - updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] - }, - git: { - createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], - createCommit: ["POST /repos/{owner}/{repo}/git/commits"], - createRef: ["POST /repos/{owner}/{repo}/git/refs"], - createTag: ["POST /repos/{owner}/{repo}/git/tags"], - createTree: ["POST /repos/{owner}/{repo}/git/trees"], - deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], - getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], - getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], - getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], - getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], - getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], - listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], - updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] - }, - gitignore: { - getAllTemplates: ["GET /gitignore/templates"], - getTemplate: ["GET /gitignore/templates/{name}"] - }, - hostedCompute: { - createNetworkConfigurationForOrg: [ - "POST /orgs/{org}/settings/network-configurations" - ], - deleteNetworkConfigurationFromOrg: [ - "DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ], - getNetworkConfigurationForOrg: [ - "GET /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ], - getNetworkSettingsForOrg: [ - "GET /orgs/{org}/settings/network-settings/{network_settings_id}" - ], - listNetworkConfigurationsForOrg: [ - "GET /orgs/{org}/settings/network-configurations" - ], - updateNetworkConfigurationForOrg: [ - "PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ] - }, - interactions: { - getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], - getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], - getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], - getRestrictionsForYourPublicRepos: [ - "GET /user/interaction-limits", - {}, - { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } - ], - removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], - removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], - removeRestrictionsForRepo: [ - "DELETE /repos/{owner}/{repo}/interaction-limits" - ], - removeRestrictionsForYourPublicRepos: [ - "DELETE /user/interaction-limits", - {}, - { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } - ], - setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], - setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], - setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], - setRestrictionsForYourPublicRepos: [ - "PUT /user/interaction-limits", - {}, - { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } - ] - }, - issues: { - addAssignees: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - addBlockedByDependency: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" - ], - addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], - addSubIssue: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" - ], - checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], - checkUserCanBeAssignedToIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" - ], - create: ["POST /repos/{owner}/{repo}/issues"], - createComment: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" - ], - createLabel: ["POST /repos/{owner}/{repo}/labels"], - createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" - ], - deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: [ - "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" - ], - get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], - getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], - getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], - getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], - getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], - getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"], - list: ["GET /issues"], - listAssignees: ["GET /repos/{owner}/{repo}/assignees"], - listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], - listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], - listDependenciesBlockedBy: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" - ], - listDependenciesBlocking: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking" - ], - listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], - listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" - ], - listForAuthenticatedUser: ["GET /user/issues"], - listForOrg: ["GET /orgs/{org}/issues"], - listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: [ - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" - ], - listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - listMilestones: ["GET /repos/{owner}/{repo}/milestones"], - listSubIssues: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" - ], - lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - removeAssignees: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - removeDependencyBlockedBy: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}" - ], - removeLabel: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" - ], - removeSubIssue: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue" - ], - reprioritizeSubIssue: [ - "PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority" - ], - setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], - unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], - update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], - updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], - updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: [ - "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" - ] - }, - licenses: { - get: ["GET /licenses/{license}"], - getAllCommonlyUsed: ["GET /licenses"], - getForRepo: ["GET /repos/{owner}/{repo}/license"] - }, - markdown: { - render: ["POST /markdown"], - renderRaw: [ - "POST /markdown/raw", - { headers: { "content-type": "text/plain; charset=utf-8" } } - ] - }, - meta: { - get: ["GET /meta"], - getAllVersions: ["GET /versions"], - getOctocat: ["GET /octocat"], - getZen: ["GET /zen"], - root: ["GET /"] - }, - migrations: { - deleteArchiveForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/archive" - ], - deleteArchiveForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/archive" - ], - downloadArchiveForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}/archive" - ], - getArchiveForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/archive" - ], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], - listForAuthenticatedUser: ["GET /user/migrations"], - listForOrg: ["GET /orgs/{org}/migrations"], - listReposForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/repositories" - ], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], - listReposForUser: [ - "GET /user/migrations/{migration_id}/repositories", - {}, - { renamed: ["migrations", "listReposForAuthenticatedUser"] } - ], - startForAuthenticatedUser: ["POST /user/migrations"], - startForOrg: ["POST /orgs/{org}/migrations"], - unlockRepoForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" - ], - unlockRepoForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" - ] - }, - oidc: { - getOidcCustomSubTemplateForOrg: [ - "GET /orgs/{org}/actions/oidc/customization/sub" - ], - updateOidcCustomSubTemplateForOrg: [ - "PUT /orgs/{org}/actions/oidc/customization/sub" - ] - }, - orgs: { - addSecurityManagerTeam: [ - "PUT /orgs/{org}/security-managers/teams/{team_slug}", - {}, - { - deprecated: "octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team" - } - ], - assignTeamToOrgRole: [ - "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - assignUserToOrgRole: [ - "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - blockUser: ["PUT /orgs/{org}/blocks/{username}"], - cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], - checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], - checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], - checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: [ - "PUT /orgs/{org}/outside_collaborators/{username}" - ], - createArtifactStorageRecord: [ - "POST /orgs/{org}/artifacts/metadata/storage-record" - ], - createInvitation: ["POST /orgs/{org}/invitations"], - createIssueType: ["POST /orgs/{org}/issue-types"], - createWebhook: ["POST /orgs/{org}/hooks"], - customPropertiesForOrgsCreateOrUpdateOrganizationValues: [ - "PATCH /organizations/{org}/org-properties/values" - ], - customPropertiesForOrgsGetOrganizationValues: [ - "GET /organizations/{org}/org-properties/values" - ], - customPropertiesForReposCreateOrUpdateOrganizationDefinition: [ - "PUT /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposCreateOrUpdateOrganizationDefinitions: [ - "PATCH /orgs/{org}/properties/schema" - ], - customPropertiesForReposCreateOrUpdateOrganizationValues: [ - "PATCH /orgs/{org}/properties/values" - ], - customPropertiesForReposDeleteOrganizationDefinition: [ - "DELETE /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposGetOrganizationDefinition: [ - "GET /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposGetOrganizationDefinitions: [ - "GET /orgs/{org}/properties/schema" - ], - customPropertiesForReposGetOrganizationValues: [ - "GET /orgs/{org}/properties/values" - ], - delete: ["DELETE /orgs/{org}"], - deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"], - deleteAttestationsById: [ - "DELETE /orgs/{org}/attestations/{attestation_id}" - ], - deleteAttestationsBySubjectDigest: [ - "DELETE /orgs/{org}/attestations/digest/{subject_digest}" - ], - deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"], - deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], - disableSelectedRepositoryImmutableReleasesOrganization: [ - "DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" - ], - enableSelectedRepositoryImmutableReleasesOrganization: [ - "PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" - ], - get: ["GET /orgs/{org}"], - getImmutableReleasesSettings: [ - "GET /orgs/{org}/settings/immutable-releases" - ], - getImmutableReleasesSettingsRepositories: [ - "GET /orgs/{org}/settings/immutable-releases/repositories" - ], - getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], - getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], - getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], - getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"], - getOrgRulesetVersion: [ - "GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}" - ], - getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], - getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], - getWebhookDelivery: [ - "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - list: ["GET /organizations"], - listAppInstallations: ["GET /orgs/{org}/installations"], - listArtifactStorageRecords: [ - "GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records" - ], - listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"], - listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"], - listAttestationsBulk: [ - "POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}" - ], - listBlockedUsers: ["GET /orgs/{org}/blocks"], - listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], - listForAuthenticatedUser: ["GET /user/orgs"], - listForUser: ["GET /users/{username}/orgs"], - listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], - listIssueTypes: ["GET /orgs/{org}/issue-types"], - listMembers: ["GET /orgs/{org}/members"], - listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], - listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], - listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], - listOrgRoles: ["GET /orgs/{org}/organization-roles"], - listOrganizationFineGrainedPermissions: [ - "GET /orgs/{org}/organization-fine-grained-permissions" - ], - listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], - listPatGrantRepositories: [ - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" - ], - listPatGrantRequestRepositories: [ - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" - ], - listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], - listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], - listPendingInvitations: ["GET /orgs/{org}/invitations"], - listPublicMembers: ["GET /orgs/{org}/public_members"], - listSecurityManagerTeams: [ - "GET /orgs/{org}/security-managers", - {}, - { - deprecated: "octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams" - } - ], - listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /orgs/{org}/hooks"], - pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeMember: ["DELETE /orgs/{org}/members/{username}"], - removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: [ - "DELETE /orgs/{org}/outside_collaborators/{username}" - ], - removePublicMembershipForAuthenticatedUser: [ - "DELETE /orgs/{org}/public_members/{username}" - ], - removeSecurityManagerTeam: [ - "DELETE /orgs/{org}/security-managers/teams/{team_slug}", - {}, - { - deprecated: "octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team" - } - ], - reviewPatGrantRequest: [ - "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" - ], - reviewPatGrantRequestsInBulk: [ - "POST /orgs/{org}/personal-access-token-requests" - ], - revokeAllOrgRolesTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" - ], - revokeAllOrgRolesUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}" - ], - revokeOrgRoleTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - revokeOrgRoleUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - setImmutableReleasesSettings: [ - "PUT /orgs/{org}/settings/immutable-releases" - ], - setImmutableReleasesSettingsRepositories: [ - "PUT /orgs/{org}/settings/immutable-releases/repositories" - ], - setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: [ - "PUT /orgs/{org}/public_members/{username}" - ], - unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], - update: ["PATCH /orgs/{org}"], - updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"], - updateMembershipForAuthenticatedUser: [ - "PATCH /user/memberships/orgs/{org}" - ], - updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], - updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], - updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], - updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] - }, - packages: { - deletePackageForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}" - ], - deletePackageForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}" - ], - deletePackageForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}" - ], - deletePackageVersionForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getAllPackageVersionsForAPackageOwnedByAnOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - {}, - { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } - ], - getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions", - {}, - { - renamed: [ - "packages", - "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" - ] - } - ], - getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions" - ], - getPackageForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}" - ], - getPackageForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}" - ], - getPackageForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}" - ], - getPackageVersionForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - listDockerMigrationConflictingPackagesForAuthenticatedUser: [ - "GET /user/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForOrganization: [ - "GET /orgs/{org}/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForUser: [ - "GET /users/{username}/docker/conflicts" - ], - listPackagesForAuthenticatedUser: ["GET /user/packages"], - listPackagesForOrganization: ["GET /orgs/{org}/packages"], - listPackagesForUser: ["GET /users/{username}/packages"], - restorePackageForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageVersionForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ] - }, - privateRegistries: { - createOrgPrivateRegistry: ["POST /orgs/{org}/private-registries"], - deleteOrgPrivateRegistry: [ - "DELETE /orgs/{org}/private-registries/{secret_name}" - ], - getOrgPrivateRegistry: ["GET /orgs/{org}/private-registries/{secret_name}"], - getOrgPublicKey: ["GET /orgs/{org}/private-registries/public-key"], - listOrgPrivateRegistries: ["GET /orgs/{org}/private-registries"], - updateOrgPrivateRegistry: [ - "PATCH /orgs/{org}/private-registries/{secret_name}" - ] - }, - projects: { - addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"], - addItemForUser: [ - "POST /users/{username}/projectsV2/{project_number}/items" - ], - deleteItemForOrg: [ - "DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}" - ], - deleteItemForUser: [ - "DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}" - ], - getFieldForOrg: [ - "GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}" - ], - getFieldForUser: [ - "GET /users/{username}/projectsV2/{project_number}/fields/{field_id}" - ], - getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"], - getForUser: ["GET /users/{username}/projectsV2/{project_number}"], - getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], - getUserItem: [ - "GET /users/{username}/projectsV2/{project_number}/items/{item_id}" - ], - listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"], - listFieldsForUser: [ - "GET /users/{username}/projectsV2/{project_number}/fields" - ], - listForOrg: ["GET /orgs/{org}/projectsV2"], - listForUser: ["GET /users/{username}/projectsV2"], - listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"], - listItemsForUser: [ - "GET /users/{username}/projectsV2/{project_number}/items" - ], - updateItemForOrg: [ - "PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}" - ], - updateItemForUser: [ - "PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}" - ] - }, - pulls: { - checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" - ], - createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - deletePendingReview: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - deleteReviewComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ], - dismissReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" - ], - get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" - ], - listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], - listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - listReviewComments: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], - listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - requestReviewers: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - submitReview: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" - ], - update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" - ], - updateReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - updateReviewComment: [ - "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ] - }, - rateLimit: { get: ["GET /rate_limit"] }, - reactions: { - createForCommitComment: [ - "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - createForIssue: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" - ], - createForIssueComment: [ - "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - createForPullRequestReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - createForRelease: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - createForTeamDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - createForTeamDiscussionInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ], - deleteForCommitComment: [ - "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForIssue: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" - ], - deleteForIssueComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForPullRequestComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForRelease: [ - "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" - ], - deleteForTeamDiscussion: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" - ], - deleteForTeamDiscussionComment: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" - ], - listForCommitComment: [ - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], - listForIssueComment: [ - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - listForPullRequestReviewComment: [ - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - listForRelease: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - listForTeamDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - listForTeamDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ] - }, - repos: { - acceptInvitation: [ - "PATCH /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } - ], - acceptInvitationForAuthenticatedUser: [ - "PATCH /user/repository_invitations/{invitation_id}" - ], - addAppAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - addTeamAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - addUserAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - cancelPagesDeployment: [ - "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" - ], - checkAutomatedSecurityFixes: [ - "GET /repos/{owner}/{repo}/automated-security-fixes" - ], - checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"], - checkPrivateVulnerabilityReporting: [ - "GET /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - checkVulnerabilityAlerts: [ - "GET /repos/{owner}/{repo}/vulnerability-alerts" - ], - codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], - compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], - compareCommitsWithBasehead: [ - "GET /repos/{owner}/{repo}/compare/{basehead}" - ], - createAttestation: ["POST /repos/{owner}/{repo}/attestations"], - createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], - createCommitComment: [ - "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - createCommitSignatureProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], - createDeployKey: ["POST /repos/{owner}/{repo}/keys"], - createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentBranchPolicy: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - createDeploymentProtectionRule: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - createDeploymentStatus: [ - "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], - createForAuthenticatedUser: ["POST /user/repos"], - createFork: ["POST /repos/{owner}/{repo}/forks"], - createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateEnvironment: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}" - ], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createOrgRuleset: ["POST /orgs/{org}/rulesets"], - createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages"], - createRelease: ["POST /repos/{owner}/{repo}/releases"], - createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], - createUsingTemplate: [ - "POST /repos/{template_owner}/{template_repo}/generate" - ], - createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - customPropertiesForReposCreateOrUpdateRepositoryValues: [ - "PATCH /repos/{owner}/{repo}/properties/values" - ], - customPropertiesForReposGetRepositoryValues: [ - "GET /repos/{owner}/{repo}/properties/values" - ], - declineInvitation: [ - "DELETE /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } - ], - declineInvitationForAuthenticatedUser: [ - "DELETE /user/repository_invitations/{invitation_id}" - ], - delete: ["DELETE /repos/{owner}/{repo}"], - deleteAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - deleteAdminBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - deleteAnEnvironment: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}" - ], - deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], - deleteBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" - ], - deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: [ - "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" - ], - deleteDeploymentBranchPolicy: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], - deleteInvitation: [ - "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], - deletePullRequestReviewProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], - deleteReleaseAsset: [ - "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: [ - "DELETE /repos/{owner}/{repo}/automated-security-fixes" - ], - disableDeploymentProtectionRule: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - disableImmutableReleases: [ - "DELETE /repos/{owner}/{repo}/immutable-releases" - ], - disablePrivateVulnerabilityReporting: [ - "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - disableVulnerabilityAlerts: [ - "DELETE /repos/{owner}/{repo}/vulnerability-alerts" - ], - downloadArchive: [ - "GET /repos/{owner}/{repo}/zipball/{ref}", - {}, - { renamed: ["repos", "downloadZipballArchive"] } - ], - downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], - downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], - enableAutomatedSecurityFixes: [ - "PUT /repos/{owner}/{repo}/automated-security-fixes" - ], - enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"], - enablePrivateVulnerabilityReporting: [ - "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - enableVulnerabilityAlerts: [ - "PUT /repos/{owner}/{repo}/vulnerability-alerts" - ], - generateReleaseNotes: [ - "POST /repos/{owner}/{repo}/releases/generate-notes" - ], - get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - getAdminBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - getAllDeploymentProtectionRules: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], - getAllStatusCheckContexts: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" - ], - getAllTopics: ["GET /repos/{owner}/{repo}/topics"], - getAppsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" - ], - getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], - getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection" - ], - getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], - getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], - getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: [ - "GET /repos/{owner}/{repo}/collaborators/{username}/permission" - ], - getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], - getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], - getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], - getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], - getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], - getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], - getCustomDeploymentProtectionRule: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], - getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentBranchPolicy: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - getDeploymentStatus: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" - ], - getEnvironment: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}" - ], - getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], - getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], - getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], - getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], - getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], - getOrgRulesets: ["GET /orgs/{org}/rulesets"], - getPages: ["GET /repos/{owner}/{repo}/pages"], - getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], - getPagesDeployment: [ - "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" - ], - getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], - getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], - getReadme: ["GET /repos/{owner}/{repo}/readme"], - getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], - getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], - getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], - getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getRepoRuleSuite: [ - "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" - ], - getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], - getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - getRepoRulesetHistory: [ - "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history" - ], - getRepoRulesetVersion: [ - "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}" - ], - getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], - getStatusChecksProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - getTeamsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" - ], - getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], - getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" - ], - getViews: ["GET /repos/{owner}/{repo}/traffic/views"], - getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], - getWebhookConfigForRepo: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - getWebhookDelivery: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - listActivities: ["GET /repos/{owner}/{repo}/activity"], - listAttestations: [ - "GET /repos/{owner}/{repo}/attestations/{subject_digest}" - ], - listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], - listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" - ], - listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: [ - "GET /repos/{owner}/{repo}/commits/{ref}/statuses" - ], - listCommits: ["GET /repos/{owner}/{repo}/commits"], - listContributors: ["GET /repos/{owner}/{repo}/contributors"], - listCustomDeploymentRuleIntegrations: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" - ], - listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentBranchPolicies: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - listDeploymentStatuses: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - listDeployments: ["GET /repos/{owner}/{repo}/deployments"], - listForAuthenticatedUser: ["GET /user/repos"], - listForOrg: ["GET /orgs/{org}/repos"], - listForUser: ["GET /users/{username}/repos"], - listForks: ["GET /repos/{owner}/{repo}/forks"], - listInvitations: ["GET /repos/{owner}/{repo}/invitations"], - listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], - listLanguages: ["GET /repos/{owner}/{repo}/languages"], - listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], - listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" - ], - listReleaseAssets: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/assets" - ], - listReleases: ["GET /repos/{owner}/{repo}/releases"], - listTags: ["GET /repos/{owner}/{repo}/tags"], - listTeams: ["GET /repos/{owner}/{repo}/teams"], - listWebhookDeliveries: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" - ], - listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], - merge: ["POST /repos/{owner}/{repo}/merges"], - mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], - pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeAppAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - removeCollaborator: [ - "DELETE /repos/{owner}/{repo}/collaborators/{username}" - ], - removeStatusCheckContexts: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - removeStatusCheckProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - removeTeamAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - removeUserAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], - requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - setAppAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - setStatusCheckContexts: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - setTeamAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - setUserAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], - transfer: ["POST /repos/{owner}/{repo}/transfer"], - update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection" - ], - updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], - updateDeploymentBranchPolicy: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: [ - "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], - updatePullRequestReviewProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: [ - "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - updateStatusCheckPotection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", - {}, - { renamed: ["repos", "updateStatusCheckProtection"] } - ], - updateStatusCheckProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - updateWebhookConfigForRepo: [ - "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - uploadReleaseAsset: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", - { baseUrl: "https://uploads.github.com" } - ] - }, - search: { - code: ["GET /search/code"], - commits: ["GET /search/commits"], - issuesAndPullRequests: ["GET /search/issues"], - labels: ["GET /search/labels"], - repos: ["GET /search/repositories"], - topics: ["GET /search/topics"], - users: ["GET /search/users"] - }, - secretScanning: { - createPushProtectionBypass: [ - "POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses" - ], - getAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"], - listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], - listLocationsForAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" - ], - listOrgPatternConfigs: [ - "GET /orgs/{org}/secret-scanning/pattern-configurations" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - updateOrgPatternConfigs: [ - "PATCH /orgs/{org}/secret-scanning/pattern-configurations" - ] - }, - securityAdvisories: { - createFork: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" - ], - createPrivateVulnerabilityReport: [ - "POST /repos/{owner}/{repo}/security-advisories/reports" - ], - createRepositoryAdvisory: [ - "POST /repos/{owner}/{repo}/security-advisories" - ], - createRepositoryAdvisoryCveRequest: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" - ], - getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], - getRepositoryAdvisory: [ - "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ], - listGlobalAdvisories: ["GET /advisories"], - listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], - listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], - updateRepositoryAdvisory: [ - "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ] - }, - teams: { - addOrUpdateMembershipForUserInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - addOrUpdateRepoPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - checkPermissionsForRepoInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - deleteDiscussionInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], - getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - getDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - getMembershipForUserInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - list: ["GET /orgs/{org}/teams"], - listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], - listForAuthenticatedUser: ["GET /user/teams"], - listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], - listPendingInvitationsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/invitations" - ], - listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - removeRepoInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - updateDiscussionCommentInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - updateDiscussionInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] - }, - users: { - addEmailForAuthenticated: [ - "POST /user/emails", - {}, - { renamed: ["users", "addEmailForAuthenticatedUser"] } - ], - addEmailForAuthenticatedUser: ["POST /user/emails"], - addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], - block: ["PUT /user/blocks/{username}"], - checkBlocked: ["GET /user/blocks/{username}"], - checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], - checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: [ - "POST /user/gpg_keys", - {}, - { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } - ], - createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: [ - "POST /user/keys", - {}, - { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } - ], - createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], - createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], - deleteAttestationsBulk: [ - "POST /users/{username}/attestations/delete-request" - ], - deleteAttestationsById: [ - "DELETE /users/{username}/attestations/{attestation_id}" - ], - deleteAttestationsBySubjectDigest: [ - "DELETE /users/{username}/attestations/digest/{subject_digest}" - ], - deleteEmailForAuthenticated: [ - "DELETE /user/emails", - {}, - { renamed: ["users", "deleteEmailForAuthenticatedUser"] } - ], - deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: [ - "DELETE /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } - ], - deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: [ - "DELETE /user/keys/{key_id}", - {}, - { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } - ], - deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], - deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], - deleteSshSigningKeyForAuthenticatedUser: [ - "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - follow: ["PUT /user/following/{username}"], - getAuthenticated: ["GET /user"], - getById: ["GET /user/{account_id}"], - getByUsername: ["GET /users/{username}"], - getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: [ - "GET /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } - ], - getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: [ - "GET /user/keys/{key_id}", - {}, - { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } - ], - getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], - getSshSigningKeyForAuthenticatedUser: [ - "GET /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - list: ["GET /users"], - listAttestations: ["GET /users/{username}/attestations/{subject_digest}"], - listAttestationsBulk: [ - "POST /users/{username}/attestations/bulk-list{?per_page,before,after}" - ], - listBlockedByAuthenticated: [ - "GET /user/blocks", - {}, - { renamed: ["users", "listBlockedByAuthenticatedUser"] } - ], - listBlockedByAuthenticatedUser: ["GET /user/blocks"], - listEmailsForAuthenticated: [ - "GET /user/emails", - {}, - { renamed: ["users", "listEmailsForAuthenticatedUser"] } - ], - listEmailsForAuthenticatedUser: ["GET /user/emails"], - listFollowedByAuthenticated: [ - "GET /user/following", - {}, - { renamed: ["users", "listFollowedByAuthenticatedUser"] } - ], - listFollowedByAuthenticatedUser: ["GET /user/following"], - listFollowersForAuthenticatedUser: ["GET /user/followers"], - listFollowersForUser: ["GET /users/{username}/followers"], - listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: [ - "GET /user/gpg_keys", - {}, - { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } - ], - listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], - listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: [ - "GET /user/public_emails", - {}, - { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } - ], - listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], - listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: [ - "GET /user/keys", - {}, - { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } - ], - listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], - listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], - listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], - listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], - listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], - setPrimaryEmailVisibilityForAuthenticated: [ - "PATCH /user/email/visibility", - {}, - { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } - ], - setPrimaryEmailVisibilityForAuthenticatedUser: [ - "PATCH /user/email/visibility" - ], - unblock: ["DELETE /user/blocks/{username}"], - unfollow: ["DELETE /user/following/{username}"], - updateAuthenticated: ["PATCH /user"] - } -}; -var endpoints_default = Endpoints; - -//# sourceMappingURL=endpoints.js.map - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js - -const endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign( - { - method, - url - }, - defaults - ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); - } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations - }); - } -} -const handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true - }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; - return true; - }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; - }, - set(target, methodName, value) { - return target.cache[methodName] = value; - }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; - } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; - } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); - } - return cache[methodName]; - } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); - } - return newMethods; -} -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); - } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); - } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); - } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; - } - delete options2[name]; - } - } - return requestWithDefaults(options2); - } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} - -//# sourceMappingURL=endpoints-to-methods.js.map - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@17.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js - - -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = dist_src_version_VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = dist_src_version_VERSION; - -//# sourceMappingURL=index.js.map - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@octokit+plugin-paginate-rest@14.0.0_@octokit+core@7.0.6/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js -// pkg/dist-src/version.js -var plugin_paginate_rest_dist_bundle_VERSION = "0.0.0-development"; - -// pkg/dist-src/normalize-paginated-list-response.js -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = ("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data); - if (!responseNeedsNormalization) return response; - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - const totalCommits = response.data.total_commits; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - delete response.data.total_commits; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - response.data.total_count = totalCount; - response.data.total_commits = totalCommits; - return response; -} - -// pkg/dist-src/iterator.js -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) return { done: true }; - try { - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( - /<([^<>]+)>;\s*rel="next"/ - ) || [])[1]; - if (!url && "total_commits" in normalizedResponse.data) { - const parsedUrl = new URL(normalizedResponse.url); - const params = parsedUrl.searchParams; - const page = parseInt(params.get("page") || "1", 10); - const per_page = parseInt(params.get("per_page") || "250", 10); - if (page * per_page < normalizedResponse.data.total_commits) { - params.set("page", String(page + 1)); - url = parsedUrl.toString(); - } - } - return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - }) - }; -} - -// pkg/dist-src/paginate.js -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = void 0; - } - return gather( - octokit, - [], - iterator(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); -} -function gather(octokit, results, iterator2, mapFn) { - return iterator2.next().then((result) => { - if (result.done) { - return results; - } - let earlyExit = false; - function done() { - earlyExit = true; - } - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); - if (earlyExit) { - return results; - } - return gather(octokit, results, iterator2, mapFn); - }); -} - -// pkg/dist-src/compose-paginate.js -var composePaginateRest = Object.assign(paginate, { - iterator -}); - -// pkg/dist-src/generated/paginating-endpoints.js -var paginatingEndpoints = (/* unused pure expression or super */ null && ([ - "GET /advisories", - "GET /app/hook/deliveries", - "GET /app/installation-requests", - "GET /app/installations", - "GET /assignments/{assignment_id}/accepted_assignments", - "GET /classrooms", - "GET /classrooms/{classroom_id}/assignments", - "GET /enterprises/{enterprise}/code-security/configurations", - "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories", - "GET /enterprises/{enterprise}/dependabot/alerts", - "GET /enterprises/{enterprise}/teams", - "GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships", - "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations", - "GET /events", - "GET /gists", - "GET /gists/public", - "GET /gists/starred", - "GET /gists/{gist_id}/comments", - "GET /gists/{gist_id}/commits", - "GET /gists/{gist_id}/forks", - "GET /installation/repositories", - "GET /issues", - "GET /licenses", - "GET /marketplace_listing/plans", - "GET /marketplace_listing/plans/{plan_id}/accounts", - "GET /marketplace_listing/stubbed/plans", - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", - "GET /networks/{owner}/{repo}/events", - "GET /notifications", - "GET /organizations", - "GET /organizations/{org}/dependabot/repository-access", - "GET /orgs/{org}/actions/cache/usage-by-repository", - "GET /orgs/{org}/actions/hosted-runners", - "GET /orgs/{org}/actions/permissions/repositories", - "GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories", - "GET /orgs/{org}/actions/runner-groups", - "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners", - "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", - "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", - "GET /orgs/{org}/actions/runners", - "GET /orgs/{org}/actions/secrets", - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", - "GET /orgs/{org}/actions/variables", - "GET /orgs/{org}/actions/variables/{name}/repositories", - "GET /orgs/{org}/attestations/repositories", - "GET /orgs/{org}/attestations/{subject_digest}", - "GET /orgs/{org}/blocks", - "GET /orgs/{org}/campaigns", - "GET /orgs/{org}/code-scanning/alerts", - "GET /orgs/{org}/code-security/configurations", - "GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories", - "GET /orgs/{org}/codespaces", - "GET /orgs/{org}/codespaces/secrets", - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", - "GET /orgs/{org}/copilot/billing/seats", - "GET /orgs/{org}/copilot/metrics", - "GET /orgs/{org}/dependabot/alerts", - "GET /orgs/{org}/dependabot/secrets", - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", - "GET /orgs/{org}/events", - "GET /orgs/{org}/failed_invitations", - "GET /orgs/{org}/hooks", - "GET /orgs/{org}/hooks/{hook_id}/deliveries", - "GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}", - "GET /orgs/{org}/insights/api/subject-stats", - "GET /orgs/{org}/insights/api/user-stats/{user_id}", - "GET /orgs/{org}/installations", - "GET /orgs/{org}/invitations", - "GET /orgs/{org}/invitations/{invitation_id}/teams", - "GET /orgs/{org}/issues", - "GET /orgs/{org}/members", - "GET /orgs/{org}/members/{username}/codespaces", - "GET /orgs/{org}/migrations", - "GET /orgs/{org}/migrations/{migration_id}/repositories", - "GET /orgs/{org}/organization-roles/{role_id}/teams", - "GET /orgs/{org}/organization-roles/{role_id}/users", - "GET /orgs/{org}/outside_collaborators", - "GET /orgs/{org}/packages", - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - "GET /orgs/{org}/personal-access-token-requests", - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", - "GET /orgs/{org}/personal-access-tokens", - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", - "GET /orgs/{org}/private-registries", - "GET /orgs/{org}/projects", - "GET /orgs/{org}/projectsV2", - "GET /orgs/{org}/projectsV2/{project_number}/fields", - "GET /orgs/{org}/projectsV2/{project_number}/items", - "GET /orgs/{org}/properties/values", - "GET /orgs/{org}/public_members", - "GET /orgs/{org}/repos", - "GET /orgs/{org}/rulesets", - "GET /orgs/{org}/rulesets/rule-suites", - "GET /orgs/{org}/rulesets/{ruleset_id}/history", - "GET /orgs/{org}/secret-scanning/alerts", - "GET /orgs/{org}/security-advisories", - "GET /orgs/{org}/settings/immutable-releases/repositories", - "GET /orgs/{org}/settings/network-configurations", - "GET /orgs/{org}/team/{team_slug}/copilot/metrics", - "GET /orgs/{org}/teams", - "GET /orgs/{org}/teams/{team_slug}/discussions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/invitations", - "GET /orgs/{org}/teams/{team_slug}/members", - "GET /orgs/{org}/teams/{team_slug}/projects", - "GET /orgs/{org}/teams/{team_slug}/repos", - "GET /orgs/{org}/teams/{team_slug}/teams", - "GET /projects/{project_id}/collaborators", - "GET /repos/{owner}/{repo}/actions/artifacts", - "GET /repos/{owner}/{repo}/actions/caches", - "GET /repos/{owner}/{repo}/actions/organization-secrets", - "GET /repos/{owner}/{repo}/actions/organization-variables", - "GET /repos/{owner}/{repo}/actions/runners", - "GET /repos/{owner}/{repo}/actions/runs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", - "GET /repos/{owner}/{repo}/actions/secrets", - "GET /repos/{owner}/{repo}/actions/variables", - "GET /repos/{owner}/{repo}/actions/workflows", - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", - "GET /repos/{owner}/{repo}/activity", - "GET /repos/{owner}/{repo}/assignees", - "GET /repos/{owner}/{repo}/attestations/{subject_digest}", - "GET /repos/{owner}/{repo}/branches", - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", - "GET /repos/{owner}/{repo}/code-scanning/alerts", - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - "GET /repos/{owner}/{repo}/code-scanning/analyses", - "GET /repos/{owner}/{repo}/codespaces", - "GET /repos/{owner}/{repo}/codespaces/devcontainers", - "GET /repos/{owner}/{repo}/codespaces/secrets", - "GET /repos/{owner}/{repo}/collaborators", - "GET /repos/{owner}/{repo}/comments", - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/commits", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", - "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", - "GET /repos/{owner}/{repo}/commits/{ref}/status", - "GET /repos/{owner}/{repo}/commits/{ref}/statuses", - "GET /repos/{owner}/{repo}/compare/{basehead}", - "GET /repos/{owner}/{repo}/compare/{base}...{head}", - "GET /repos/{owner}/{repo}/contributors", - "GET /repos/{owner}/{repo}/dependabot/alerts", - "GET /repos/{owner}/{repo}/dependabot/secrets", - "GET /repos/{owner}/{repo}/deployments", - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", - "GET /repos/{owner}/{repo}/environments", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets", - "GET /repos/{owner}/{repo}/environments/{environment_name}/variables", - "GET /repos/{owner}/{repo}/events", - "GET /repos/{owner}/{repo}/forks", - "GET /repos/{owner}/{repo}/hooks", - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", - "GET /repos/{owner}/{repo}/invitations", - "GET /repos/{owner}/{repo}/issues", - "GET /repos/{owner}/{repo}/issues/comments", - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/issues/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by", - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking", - "GET /repos/{owner}/{repo}/issues/{issue_number}/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - "GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues", - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - "GET /repos/{owner}/{repo}/keys", - "GET /repos/{owner}/{repo}/labels", - "GET /repos/{owner}/{repo}/milestones", - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", - "GET /repos/{owner}/{repo}/notifications", - "GET /repos/{owner}/{repo}/pages/builds", - "GET /repos/{owner}/{repo}/projects", - "GET /repos/{owner}/{repo}/pulls", - "GET /repos/{owner}/{repo}/pulls/comments", - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", - "GET /repos/{owner}/{repo}/releases", - "GET /repos/{owner}/{repo}/releases/{release_id}/assets", - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", - "GET /repos/{owner}/{repo}/rules/branches/{branch}", - "GET /repos/{owner}/{repo}/rulesets", - "GET /repos/{owner}/{repo}/rulesets/rule-suites", - "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history", - "GET /repos/{owner}/{repo}/secret-scanning/alerts", - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", - "GET /repos/{owner}/{repo}/security-advisories", - "GET /repos/{owner}/{repo}/stargazers", - "GET /repos/{owner}/{repo}/subscribers", - "GET /repos/{owner}/{repo}/tags", - "GET /repos/{owner}/{repo}/teams", - "GET /repos/{owner}/{repo}/topics", - "GET /repositories", - "GET /search/code", - "GET /search/commits", - "GET /search/issues", - "GET /search/labels", - "GET /search/repositories", - "GET /search/topics", - "GET /search/users", - "GET /teams/{team_id}/discussions", - "GET /teams/{team_id}/discussions/{discussion_number}/comments", - "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /teams/{team_id}/discussions/{discussion_number}/reactions", - "GET /teams/{team_id}/invitations", - "GET /teams/{team_id}/members", - "GET /teams/{team_id}/projects", - "GET /teams/{team_id}/repos", - "GET /teams/{team_id}/teams", - "GET /user/blocks", - "GET /user/codespaces", - "GET /user/codespaces/secrets", - "GET /user/emails", - "GET /user/followers", - "GET /user/following", - "GET /user/gpg_keys", - "GET /user/installations", - "GET /user/installations/{installation_id}/repositories", - "GET /user/issues", - "GET /user/keys", - "GET /user/marketplace_purchases", - "GET /user/marketplace_purchases/stubbed", - "GET /user/memberships/orgs", - "GET /user/migrations", - "GET /user/migrations/{migration_id}/repositories", - "GET /user/orgs", - "GET /user/packages", - "GET /user/packages/{package_type}/{package_name}/versions", - "GET /user/public_emails", - "GET /user/repos", - "GET /user/repository_invitations", - "GET /user/social_accounts", - "GET /user/ssh_signing_keys", - "GET /user/starred", - "GET /user/subscriptions", - "GET /user/teams", - "GET /users", - "GET /users/{username}/attestations/{subject_digest}", - "GET /users/{username}/events", - "GET /users/{username}/events/orgs/{org}", - "GET /users/{username}/events/public", - "GET /users/{username}/followers", - "GET /users/{username}/following", - "GET /users/{username}/gists", - "GET /users/{username}/gpg_keys", - "GET /users/{username}/keys", - "GET /users/{username}/orgs", - "GET /users/{username}/packages", - "GET /users/{username}/projects", - "GET /users/{username}/projectsV2", - "GET /users/{username}/projectsV2/{project_number}/fields", - "GET /users/{username}/projectsV2/{project_number}/items", - "GET /users/{username}/received_events", - "GET /users/{username}/received_events/public", - "GET /users/{username}/repos", - "GET /users/{username}/social_accounts", - "GET /users/{username}/ssh_signing_keys", - "GET /users/{username}/starred", - "GET /users/{username}/subscriptions" -])); - -// pkg/dist-src/paginating-endpoints.js -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -// pkg/dist-src/index.js -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = plugin_paginate_rest_dist_bundle_VERSION; - - -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/utils.js - - -// octokit + plugins - - - -const context = new Context(); -const baseUrl = getApiBaseUrl(); -const defaults = { - baseUrl, - request: { - agent: getProxyAgent(baseUrl), - fetch: getProxyFetch(baseUrl) - } -}; -const utils_GitHub = Octokit.plugin(restEndpointMethods, paginateRest).defaults(defaults); - -/** - * Convience function to correctly format Octokit Options to pass into the constructor. - * - * @param token the repo PAT or GITHUB_TOKEN - * @param options other options to set - */ -function utils_getOctokitOptions(token, options) { - const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller - // Auth - const auth = Utils.getAuthString(token, opts); - if (auth) { - opts.auth = auth; - } - // Orchestration ID - const userAgent = Utils.getUserAgentWithOrchestrationId(opts.userAgent); - if (userAgent) { - opts.userAgent = userAgent; - } - return opts; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+github@9.1.1/node_modules/@actions/github/lib/github.js - - -const github_context = new Context(); -/** - * Returns a hydrated octokit ready to use for GitHub Actions - * - * @param token the repo PAT or GITHUB_TOKEN - * @param options other options to set - */ -function getOctokit(token, options, ...additionalPlugins) { - const GitHubWithPlugins = GitHub.plugin(...additionalPlugins); - return new GitHubWithPlugins(getOctokitOptions(token, options)); -} -//# sourceMappingURL=github.js.map -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -;// CONCATENATED MODULE: external "node:path" -const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); -;// CONCATENATED MODULE: ./lib/changeset-types.js -/* eslint-disable jsdoc/require-jsdoc */ -const messageTypes = [ - { - name: 'compat', - title: 'Compatibility Notes', - alternatives: ['compatibility', 'compatibility note', 'compat'] - }, - { - name: 'feat', - title: 'New Features', - alternatives: ['new', 'new functionality', 'feat'] - }, - { - name: 'fix', - title: 'Fixed Issues', - alternatives: ['bug', 'bug fix', 'fixed issue', 'fix', 'fix issue'] - }, - { - name: 'known-issue', - title: 'Known Issues', - alternatives: ['known issue'] - }, - { - name: 'impr', - title: 'Improvements', - alternatives: ['improvement', 'improv'] - }, - { - name: 'dep', - title: 'Updated Dependencies', - alternatives: ['dependency', 'dependency update'] - } -]; - -;// CONCATENATED MODULE: ./lib/check-pr/validators.js -/* eslint-disable jsdoc/require-jsdoc */ - - - - -const validCommitTypes = ['feat', 'fix', 'chore']; -const allAllowedChangeTypes = new Set(messageTypes.flatMap(({ name, alternatives }) => [name, ...alternatives])); -// Expected format: preamble(topic)!: Title text -async function validateTitle(title) { - if (!title || !title.includes(':')) { - return setFailed('PR title does not adhere to conventional commit guidelines. No preamble found.'); - } - const [preamble, postamble] = title.split(':'); - await validatePreamble(preamble); - validatePostamble(postamble); -} -async function validatePreamble(preamble) { - const groups = preamble.match(/(?\w+)?(\((?\w+)\))?(?!)?/)?.groups; - if (!groups) { - return setFailed('Could not parse preamble. Ensure it follows the conventional commit guidelines.'); - } - const { commitType, isBreaking } = groups; - validateCommitType(commitType); - validateChangesets(preamble, commitType, !!isBreaking, await extractChangesetFileContents()); -} -function validateCommitType(commitType) { - if (!commitType || !validCommitTypes.includes(commitType)) { - return setFailed(`PR title does not adhere to conventional commit guidelines. Commit type found: ${commitType}. Must be one of ${validCommitTypes.join(', ')}.`); - } - info('✓ Commit type: OK'); -} -function validatePostamble(title) { - if (!title || !title.trim().length) { - return setFailed('PR title does not have a title after conventional commit preamble.'); - } - if (title[0] !== ' ') { - return setFailed('Space missing after conventional commit preamble.'); - } - info('✓ Title: OK'); -} -function getAllowedBumps(preamble, isBreaking) { - if (isBreaking) { - return ['major']; - } - if (preamble === 'feat') { - return ['minor']; - } - if (preamble === 'fix') { - return ['minor', 'patch']; - } - return []; -} -function hasMatchingChangeset(allowedBumps, changedFileContents) { - if (allowedBumps.length) { - return changedFileContents.some(fileContent => allowedBumps.some(bump => new RegExp(`("|')(@sap-cloud-sdk|@sap-ai-sdk)/.*("|'): ${bump}`).test(fileContent))); - } - return true; -} -async function extractChangesetFileContents() { - const changeSetFilesStr = getInput('changed-files').trim(); - const changeSetFiles = changeSetFilesStr ? changeSetFilesStr.split(' ') : []; - const fileContents = await Promise.all(changeSetFiles.map(file => (0,promises_namespaceObject.readFile)(file, 'utf-8'))); - return fileContents; -} -function validateChangesets(preamble, commitType, isBreaking, fileContents) { - const allowedBumps = getAllowedBumps(commitType, isBreaking); - if (!hasMatchingChangeset(allowedBumps, fileContents)) { - return setFailed(`Preamble '${preamble}' requires a changeset file with bump ${allowedBumps - .map(bump => `'${bump}'`) - .join(' or ')}.`); - } - const changeTypes = fileContents.flatMap(content => { - const matches = content.match(/\[([^\]]+)\](?!\([^\]]*\))/g); - return matches ? matches.map(match => match.slice(1, -1)) : []; - }); - if (!preamble.startsWith('chore') && !changeTypes.length) { - return setFailed('Missing change type in changeset.'); - } - const allChangeTypesMatch = changeTypes.every(type => allAllowedChangeTypes.has(type.toLowerCase())); - if (!allChangeTypesMatch) { - return setFailed(`All change types must be one of: ${messageTypes.map(({ name }) => `'${name}'`).join(', ')} (or their aliases).`); - } - info('✓ Changesets: OK'); -} -async function validateBody(body) { - const template = await (0,promises_namespaceObject.readFile)((0,external_node_path_namespaceObject.resolve)('.github', 'PULL_REQUEST_TEMPLATE.md'), 'utf-8'); - if (!body || body === template) { - return setFailed('PR must have a description.'); - } - if (body.includes(template)) { - return setFailed('PR template must not be ignored.'); - } - info('✓ Body: OK'); -} - -;// CONCATENATED MODULE: ./lib/check-pr/index.js - - - -try { - validateTitle(github_context.payload.pull_request?.title); - validateBody(github_context.payload.pull_request?.body?.replace(/\r\n/g, '\n')); -} -catch (err) { - setFailed(err); -} - diff --git a/.github/actions/check-public-api/action.yml b/.github/actions/check-public-api/action.yml index 0dca031f5b..f9502edd49 100644 --- a/.github/actions/check-public-api/action.yml +++ b/.github/actions/check-public-api/action.yml @@ -11,4 +11,4 @@ inputs: runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/check-public-api/dist/acorn-Lo8hV0QE.js b/.github/actions/check-public-api/dist/acorn-Lo8hV0QE.js new file mode 100644 index 0000000000..42d8fc2cf3 --- /dev/null +++ b/.github/actions/check-public-api/dist/acorn-Lo8hV0QE.js @@ -0,0 +1,4972 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/acorn.mjs +function je(e, t) { + for (var i = 65536, s = 0; s < t.length; s += 2) { + if (i += t[s], i > e) return !1; + if (i += t[s + 1], i >= e) return !0; + } + return !1; +} +function j(e, t) { + return e < 65 ? e === 36 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Ui.test(String.fromCharCode(e)) : t === !1 ? !1 : je(e, dt); +} +function X(e, t) { + return e < 48 ? e === 36 : e < 58 ? !0 : e < 65 ? !1 : e < 91 ? !0 : e < 97 ? e === 95 : e < 123 ? !0 : e <= 65535 ? e >= 170 && Gi.test(String.fromCharCode(e)) : t === !1 ? !1 : je(e, dt) || je(e, Di); +} +function V(e, t) { + return new C(e, { + beforeExpr: !0, + binop: t + }); +} +function _(e, t) { + return t === void 0 && (t = {}), t.keyword = e, Je[e] = new C(e, t); +} +function Y(e) { + return e === 10 || e === 13 || e === 8232 || e === 8233; +} +function xt(e, t, i) { + i === void 0 && (i = e.length); + for (var s = t; s < i; s++) { + var r = e.charCodeAt(s); + if (Y(r)) return s < i - 1 && r === 13 && e.charCodeAt(s + 1) === 10 ? s + 2 : s + 1; + } + return -1; +} +function H(e) { + return pt[e] || (pt[e] = new RegExp("^(?:" + e.replace(/ /g, "|") + ")$")); +} +function q(e) { + return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode((e >> 10) + 55296, (e & 1023) + 56320)); +} +function vt(e, t) { + for (var i = 1, s = 0;;) { + var r = xt(e, s, t); + if (r < 0) return new ne(i, t - s); + ++i, s = r; + } +} +function Xi(e) { + var t = {}; + for (var i in Ue) t[i] = e && $(e, i) ? e[i] : Ue[i]; + if (t.ecmaVersion === "latest" ? t.ecmaVersion = 1e8 : t.ecmaVersion == null ? (!ct && typeof console == "object" && console.warn && (ct = !0, console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)), t.ecmaVersion = 11) : t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), t.allowReserved ??= t.ecmaVersion < 5, (!e || e.allowHashBang == null) && (t.allowHashBang = t.ecmaVersion >= 14), ht(t.onToken)) { + var s = t.onToken; + t.onToken = function(r) { + return s.push(r); + }; + } + return ht(t.onComment) && (t.onComment = Wi(t, t.onComment)), t; +} +function Wi(e, t) { + return function(i, s, r, o, u, p) { + var h = { + type: i ? "Block" : "Line", + value: s, + start: r, + end: o + }; + e.locations && (h.loc = new be(this, u, p)), e.ranges && (h.range = [r, o]), t.push(h); + }; +} +function Xe(e, t) { + return Z | (e ? Ke : 0) | (t ? bt : 0); +} +function $i(e, t) { + var i = t.key.name, s = e[i], r = "true"; + return t.type === "MethodDefinition" && (t.kind === "get" || t.kind === "set") && (r = (t.static ? "s" : "i") + t.kind), s === "iget" && r === "iset" || s === "iset" && r === "iget" || s === "sget" && r === "sset" || s === "sset" && r === "sget" ? (e[i] = "true", !1) : s ? !0 : (e[i] = r, !1); +} +function ye(e, t) { + var i = e.computed, s = e.key; + return !i && (s.type === "Identifier" && s.name === t || s.type === "Literal" && s.value === t); +} +function kt(e) { + return e.type === "Identifier" || e.type === "ParenthesizedExpression" && kt(e.expression); +} +function qe(e) { + return e.type === "MemberExpression" && e.property.type === "PrivateIdentifier" || e.type === "ChainExpression" && qe(e.expression) || e.type === "ParenthesizedExpression" && qe(e.expression); +} +function wt(e, t, i, s) { + return e.type = t, e.end = i, this.options.locations && (e.loc.end = s), this.options.ranges && (e.range[1] = i), e; +} +function us(e) { + var t = Ft[e] = { + binary: H(ss[e] + " " + lt), + binaryOfStrings: H(as[e]), + nonBinary: { + General_Category: H(lt), + Script: H(os[e]) + } + }; + t.nonBinary.Script_Extensions = t.nonBinary.Script, t.nonBinary.gc = t.nonBinary.General_Category, t.nonBinary.sc = t.nonBinary.Script, t.nonBinary.scx = t.nonBinary.Script_Extensions; +} +function hs(e) { + for (var t in e) return !0; + return !1; +} +function ps(e) { + return e === 105 || e === 109 || e === 115; +} +function jt(e) { + return e === 36 || e >= 40 && e <= 43 || e === 46 || e === 63 || e >= 91 && e <= 94 || e >= 123 && e <= 125; +} +function cs(e) { + return j(e, !0) || e === 36 || e === 95; +} +function ls(e) { + return X(e, !0) || e === 36 || e === 95 || e === 8204 || e === 8205; +} +function Ut(e) { + return e >= 65 && e <= 90 || e >= 97 && e <= 122; +} +function fs(e) { + return e >= 0 && e <= 1114111; +} +function ds(e) { + return e === 100 || e === 68 || e === 115 || e === 83 || e === 119 || e === 87; +} +function qt(e) { + return Ut(e) || e === 95; +} +function ms(e) { + return qt(e) || Ee(e); +} +function xs(e) { + return e === 33 || e >= 35 && e <= 38 || e >= 42 && e <= 44 || e === 46 || e >= 58 && e <= 64 || e === 94 || e === 96 || e === 126; +} +function ys(e) { + return e === 40 || e === 41 || e === 45 || e === 47 || e >= 91 && e <= 93 || e >= 123 && e <= 125; +} +function gs(e) { + return e === 33 || e === 35 || e === 37 || e === 38 || e === 44 || e === 45 || e >= 58 && e <= 62 || e === 64 || e === 96 || e === 126; +} +function Ee(e) { + return e >= 48 && e <= 57; +} +function Jt(e) { + return e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102; +} +function Kt(e) { + return e >= 65 && e <= 70 ? 10 + (e - 65) : e >= 97 && e <= 102 ? 10 + (e - 97) : e - 48; +} +function Ht(e) { + return e >= 48 && e <= 55; +} +function vs(e, t) { + return t ? parseInt(e, 8) : parseFloat(e.replace(/_/g, "")); +} +function Xt(e) { + return typeof BigInt != "function" ? null : BigInt(e.replace(/_/g, "")); +} +function As(e, t) { + let i = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(i, t); +} +function ke(e) { + let t = []; + for (let i of e) try { + return i(); + } catch (s) { + t.push(s); + } + throw Object.assign(/* @__PURE__ */ new Error("All combinations failed"), { errors: t }); +} +function Ps(e) { + return this[e < 0 ? this.length + e : e]; +} +function M(e) { + let t = e.range?.[0] ?? e.start, i = (e.declaration?.decorators ?? e.decorators)?.[0]; + return i ? Math.min(M(i), t) : t; +} +function R(e) { + return e.range?.[1] ?? e.end; +} +function Ns(e) { + let t = new Set(e); + return (i) => t.has(i?.type); +} +function Vs(e) { + return Ze.has(e) || Ze.set(e, re(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), Ze.get(e); +} +function Os(e) { + if (!re(e)) return !1; + let t = `*${e.value}*`.split(` +`); + return t.length > 1 && t.every((i) => i.trimStart()[0] === "*"); +} +function Bs(e) { + return et.has(e) || et.set(e, Os(e)), et.get(e); +} +function Ds(e) { + if (e.length < 2) return; + let t; + for (let i = e.length - 1; i >= 0; i--) { + let s = e[i]; + if (t && R(s) === M(t) && tt(s) && tt(t) && (e.splice(i + 1, 1), s.value += "*//*" + t.value, s.range = [M(s), R(t)]), !ei(s) && !re(s)) throw new TypeError(`Unknown comment type: "${s.type}".`); + t = s; + } +} +function Ms(e) { + return e !== null && typeof e == "object"; +} +function le(e) { + if (ce !== null && typeof ce.property) { + let t = ce; + return ce = le.prototype = null, t; + } + return ce = le.prototype = e ?? Object.create(null), new le(); +} +function it(e) { + return le(e); +} +function js(e, t = "type") { + it(e); + function i(s) { + let r = s[t], o = e[r]; + if (!Array.isArray(o)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${r}'.`), { node: s }); + return o; + } + return i; +} +function we(e, t) { + if (!si(e)) return e; + if (Array.isArray(e)) { + for (let s = 0; s < e.length; s++) e[s] = we(e[s], t); + return e; + } + if (t.onEnter) { + let s = t.onEnter(e) ?? e; + if (s !== e) return we(s, t); + e = s; + } + let i = ni(e); + for (let s = 0; s < i.length; s++) e[i[s]] = we(e[i[s]], t); + return t.onLeave && (e = t.onLeave(e) || e), e; +} +function Gs(e, t) { + let { parser: i, text: s } = t, { comments: r } = e, o = i === "oxc" && t.oxcAstType === "ts"; + ii(r); + let u = e.type === "File" ? e.program : e; + u.interpreter && (r.unshift(u.interpreter), delete u.interpreter), o && e.hashbang && (r.unshift(e.hashbang), delete e.hashbang), e.type === "Program" && (e.range = [0, s.length]); + let p; + return e = oi(e, { + onEnter(h) { + switch (h.type) { + case "ParenthesizedExpression": { + let { expression: l } = h, m = M(h); + if (l.type === "TypeCastExpression") return l.range = [m, R(h)], l; + let S = !1; + if (!o) { + if (!p) { + p = []; + for (let c of r) ti(c) && p.push(R(c)); + } + let E = Zt(0, p, (c) => c <= m); + S = E && s.slice(E, m).trim().length === 0; + } + return S ? void 0 : (l.extra = { + ...l.extra, + parenthesized: !0 + }, l); + } + case "TemplateLiteral": + if (h.expressions.length !== h.quasis.length - 1) throw new Error("Malformed template literal."); + break; + case "TemplateElement": + if (i === "flow" || i === "hermes" || i === "espree" || i === "typescript" || o) h.range = [M(h) + 1, R(h) - (h.tail ? 1 : 2)]; + break; + case "VariableDeclaration": { + let l = ie(0, h.declarations, -1); + l?.init && s[R(l)] !== ";" && (h.range = [M(h), R(l)]); + break; + } + case "TSParenthesizedType": return h.typeAnnotation; + case "TopicReference": + e.extra = { + ...e.extra, + __isUsingHackPipeline: !0 + }; + break; + case "TSUnionType": + case "TSIntersectionType": + if (h.types.length === 1) return h.types[0]; + break; + case "ImportExpression": + i === "hermes" && h.attributes && !h.options && (h.options = h.attributes); + break; + } + }, + onLeave(h) { + switch (h.type) { + case "LogicalExpression": + if (ui(h)) return st(h); + break; + case "TSImportType": + !h.source && h.argument.type === "TSLiteralType" && (h.source = h.argument.literal, delete h.argument); + break; + } + } + }), e; +} +function ui(e) { + return e.type === "LogicalExpression" && e.right.type === "LogicalExpression" && e.operator === e.right.operator; +} +function st(e) { + return ui(e) ? st({ + type: "LogicalExpression", + operator: e.operator, + left: st({ + type: "LogicalExpression", + operator: e.operator, + left: e.left, + right: e.right.left, + range: [M(e.left), R(e.right.left)] + }), + right: e.right.right, + range: [M(e), R(e)] + }) : e; +} +function ci(e) { + let t = e.match(Xs); + return t ? t[0].trimStart() : ""; +} +function li(e) { + e = fe(0, e.replace(Hs, "").replace(Ks, ""), Qs, "$1"); + let i = ""; + for (; i !== e;) i = e, e = fe(0, e, zs, ` +$1 $2 +`); + e = e.replace(hi, "").trimEnd(); + let s = Object.create(null), r = fe(0, e, pi, "").replace(hi, "").trimEnd(), o; + for (; o = pi.exec(e);) { + let u = fe(0, o[2], Ws, ""); + if (typeof s[o[1]] == "string" || Array.isArray(s[o[1]])) { + let p = s[o[1]]; + s[o[1]] = [ + ...Ys, + ...Array.isArray(p) ? p : [p], + u + ]; + } else s[o[1]] = u; + } + return { + comments: r, + pragmas: s + }; +} +function $s(e) { + if (!e.startsWith("#!")) return ""; + let t = e.indexOf(` +`); + return t === -1 ? e : e.slice(0, t); +} +function xi(e) { + let t = mi(e); + t && (e = e.slice(t.length + 1)); + let { pragmas: s, comments: r } = li(ci(e)); + return { + shebang: t, + text: e, + pragmas: s, + comments: r + }; +} +function yi(e) { + let { pragmas: t } = xi(e); + return di.some((i) => Object.prototype.hasOwnProperty.call(t, i)); +} +function gi(e) { + let { pragmas: t } = xi(e); + return fi.some((i) => Object.prototype.hasOwnProperty.call(t, i)); +} +function Zs(e) { + return e = typeof e == "function" ? { parse: e } : e, { + astFormat: "estree", + hasPragma: yi, + hasIgnorePragma: gi, + locStart: M, + locEnd: R, + ...e + }; +} +function Ve(e) { + if (typeof e == "string") { + if (e = e.toLowerCase(), /\.(?:mjs|mts)$/iu.test(e)) return Ne; + if (/\.(?:cjs|cts)$/iu.test(e)) return Le; + } +} +function tr(e) { + let { message: t, loc: i } = e; + if (!i) return e; + let { line: s, column: r } = i; + return Ae(t.replace(/ \(\d+:\d+\)$/u, ""), { + loc: { start: { + line: s, + column: r + 1 + } }, + cause: e + }); +} +function sr(e, t) { + let i = ir(), s = [], r = i.parse(e, { + ...er, + sourceType: t === Le ? vi : t, + allowImportExportEverywhere: t === Ne, + onComment: s + }); + return r.comments = s, r; +} +function rr(e, t) { + let i = Ve(t?.filepath), s = (i ? [i] : Re).map((o) => () => sr(e, o)), r; + try { + r = ke(s); + } catch ({ errors: [o] }) { + throw tr(o); + } + return Pe(r, { text: e }); +} +function ar(e, t) { + let i = e[0], s = ie(0, e, -1), r = { + type: P.Template, + value: t.slice(i.start, s.end) + }; + return i.loc && (r.loc = { + start: i.loc.start, + end: s.loc.end + }), i.range && (r.start = i.range[0], r.end = s.range[1], r.range = [r.start, r.end]), r; +} +function rt(e, t) { + this._acornTokTypes = e, this._tokens = [], this._curlyBrace = null, this._code = t; +} +function nr() { + return ie(0, Ti, -1); +} +function or(e = 5) { + let t = e === "latest" ? nr() : e; + if (typeof t != "number") throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`); + if (t >= 2015 && (t -= 2009), !Ti.includes(t)) throw new Error("Invalid ecmaVersion."); + return t; +} +function ur(e = "script") { + if (e === "script" || e === "module") return e; + if (e === "commonjs") return "script"; + throw new Error("Invalid sourceType."); +} +function Ei(e) { + let t = or(e.ecmaVersion), i = ur(e.sourceType), s = e.range === !0, r = e.loc === !0; + if (t !== 3 && e.allowReserved) throw new Error("`allowReserved` is only supported when ecmaVersion is 3"); + if (typeof e.allowReserved < "u" && typeof e.allowReserved != "boolean") throw new Error("`allowReserved`, when present, must be `true` or `false`"); + let o = t === 3 ? e.allowReserved || "never" : !1, u = e.ecmaFeatures || {}, p = e.sourceType === "commonjs" || !!u.globalReturn; + if (i === "module" && t < 6) throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options."); + return Object.assign({}, e, { + ecmaVersion: t, + sourceType: i, + ranges: s, + locations: r, + allowReserved: o, + allowReturnOutsideFunction: p + }); +} +function hr(e, t, i, s, r, o, u) { + let p; + e ? p = "Block" : u.slice(i, i + 2) === "#!" ? p = "Hashbang" : p = "Line"; + let h = { + type: p, + value: t + }; + return typeof i == "number" && (h.start = i, h.end = s, h.range = [i, s]), typeof r == "object" && (h.loc = { + start: r, + end: o + }), h; +} +function ki(e, t) { + return new (pr.get(t))(t, e).parse(); +} +function lr(e) { + let { message: t, lineNumber: i, column: s } = e; + return typeof i != "number" ? e : Ae(t, { + loc: { start: { + line: i, + column: s + } }, + cause: e + }); +} +function fr(e, t) { + let i = Ve(t?.filepath), s = (i ? [i] : Re).map((o) => () => ki(e, { + ...cr, + sourceType: o + })), r; + try { + r = ke(s); + } catch ({ errors: [o] }) { + throw lr(o); + } + return Pe(r, { + parser: "espree", + text: e + }); +} +var Ii, Be, Ni, Li, Ri, Vi, ot, Oi, Bi, ut, Qt, $e, Pi, Di, dt, Mi, mt, De, Me, Fi, ji, Ui, Gi, C, O, N, Je, a, L, qi, yt, k, gt, Ji, Ki, $, ht, pt, Hi, ne, be, Ue, ct, oe, Z, Ke, bt, He, St, Se, _t, z, ue, _e, xe, We, K, Ct, Tt, Et, A, U, w, zi, Ce, d, ze, Qi, Yi, ae, Ge, At, D, F, T, ee, g, Zi, ge, W, es, Te, he, ts, Pt, It, Nt, Lt, Rt, ss, as, lt, Vt, Ot, Bt, Dt, Mt, os, Ft, ft, me, Fe, f, ve, G, Gt, J, B, Qe, b, Wt, Si, Ae, te, ks, Zt, ie, se, re, ei, Ze, ti, et, tt, ii, si, ce, Fs, ri, n, ni, oi, Pe, qs, fe, Ks, Hs, Xs, Ws, hi, zs, pi, Qs, Ys, fi, di, mi, Ie, Ne, vi, Le, Re, er, bi, ir, _i, Ai, P, Ci, Ti, Q, at, nt, pr, cr, dr; +//#endregion +__esmMin((() => { + Ii = Object.create; + Be = Object.defineProperty; + Ni = Object.getOwnPropertyDescriptor; + Li = Object.getOwnPropertyNames; + Ri = Object.getPrototypeOf, Vi = Object.prototype.hasOwnProperty; + ot = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Oi = (e, t) => { + for (var i in t) Be(e, i, { + get: t[i], + enumerable: !0 + }); + }, Bi = (e, t, i, s) => { + if (t && typeof t == "object" || typeof t == "function") for (let r of Li(t)) !Vi.call(e, r) && r !== i && Be(e, r, { + get: () => t[r], + enumerable: !(s = Ni(t, r)) || s.enumerable + }); + return e; + }; + ut = (e, t, i) => (i = e != null ? Ii(Ri(e)) : {}, Bi(t || !e || !e.__esModule ? Be(i, "default", { + value: e, + enumerable: !0 + }) : i, e)); + Qt = ot((xr, zt) => { + zt.exports = {}; + }); + $e = ot((yr, Ye) => { + "use strict"; + var _s = Qt(), Cs = /^[\da-fA-F]+$/, Ts = /^\d+$/, Yt = /* @__PURE__ */ new WeakMap(); + function $t(e) { + e = e.Parser.acorn || e; + let t = Yt.get(e); + if (!t) { + let i = e.tokTypes, s = e.TokContext, r = e.TokenType, o = new s("...", !0, !0), h = { + tc_oTag: o, + tc_cTag: u, + tc_expr: p + }, l = { + jsxName: new r("jsxName"), + jsxText: new r("jsxText", { beforeExpr: !0 }), + jsxTagStart: new r("jsxTagStart", { startsExpr: !0 }), + jsxTagEnd: new r("jsxTagEnd") + }; + l.jsxTagStart.updateContext = function() { + this.context.push(p), this.context.push(o), this.exprAllowed = !1; + }, l.jsxTagEnd.updateContext = function(m) { + let S = this.context.pop(); + S === o && m === i.slash || S === u ? (this.context.pop(), this.exprAllowed = this.curContext() === p) : this.exprAllowed = !0; + }, t = { + tokContexts: h, + tokTypes: l + }, Yt.set(e, t); + } + return t; + } + function pe(e) { + if (!e) return e; + if (e.type === "JSXIdentifier") return e.name; + if (e.type === "JSXNamespacedName") return e.namespace.name + ":" + e.name.name; + if (e.type === "JSXMemberExpression") return pe(e.object) + "." + pe(e.property); + } + Ye.exports = function(e) { + return e = e || {}, function(t) { + return Es({ + allowNamespaces: e.allowNamespaces !== !1, + allowNamespacedObjects: !!e.allowNamespacedObjects + }, t); + }; + }; + Object.defineProperty(Ye.exports, "tokTypes", { + get: function() { + return $t(void 0).tokTypes; + }, + configurable: !0, + enumerable: !0 + }); + function Es(e, t) { + let i = t.acorn || void 0, s = $t(i), r = i.tokTypes, o = s.tokTypes, u = i.tokContexts, p = s.tokContexts.tc_oTag, h = s.tokContexts.tc_cTag, l = s.tokContexts.tc_expr, m = i.isNewLine, S = i.isIdentifierStart, E = i.isIdentifierChar; + return class extends t { + static get acornJsx() { + return s; + } + jsx_readToken() { + let c = "", x = this.pos; + for (;;) { + this.pos >= this.input.length && this.raise(this.start, "Unterminated JSX contents"); + let y = this.input.charCodeAt(this.pos); + switch (y) { + case 60: + case 123: return this.pos === this.start ? y === 60 && this.exprAllowed ? (++this.pos, this.finishToken(o.jsxTagStart)) : this.getTokenFromCode(y) : (c += this.input.slice(x, this.pos), this.finishToken(o.jsxText, c)); + case 38: + c += this.input.slice(x, this.pos), c += this.jsx_readEntity(), x = this.pos; + break; + case 62: + case 125: this.raise(this.pos, "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (y === 62 ? ">" : "}") + "` or `{\"" + this.input[this.pos] + "\"}`?"); + default: m(y) ? (c += this.input.slice(x, this.pos), c += this.jsx_readNewLine(!0), x = this.pos) : ++this.pos; + } + } + } + jsx_readNewLine(c) { + let x = this.input.charCodeAt(this.pos), y; + return ++this.pos, x === 13 && this.input.charCodeAt(this.pos) === 10 ? (++this.pos, y = c ? ` +` : `\r +`) : y = String.fromCharCode(x), this.options.locations && (++this.curLine, this.lineStart = this.pos), y; + } + jsx_readString(c) { + let x = "", y = ++this.pos; + for (;;) { + this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant"); + let v = this.input.charCodeAt(this.pos); + if (v === c) break; + v === 38 ? (x += this.input.slice(y, this.pos), x += this.jsx_readEntity(), y = this.pos) : m(v) ? (x += this.input.slice(y, this.pos), x += this.jsx_readNewLine(!1), y = this.pos) : ++this.pos; + } + return x += this.input.slice(y, this.pos++), this.finishToken(r.string, x); + } + jsx_readEntity() { + let c = "", x = 0, y, v = this.input[this.pos]; + v !== "&" && this.raise(this.pos, "Entity must start with an ampersand"); + let I = ++this.pos; + for (; this.pos < this.input.length && x++ < 10;) { + if (v = this.input[this.pos++], v === ";") { + c[0] === "#" ? c[1] === "x" ? (c = c.substr(2), Cs.test(c) && (y = String.fromCharCode(parseInt(c, 16)))) : (c = c.substr(1), Ts.test(c) && (y = String.fromCharCode(parseInt(c, 10)))) : y = _s[c]; + break; + } + c += v; + } + return y || (this.pos = I, "&"); + } + jsx_readWord() { + let c, x = this.pos; + do + c = this.input.charCodeAt(++this.pos); + while (E(c) || c === 45); + return this.finishToken(o.jsxName, this.input.slice(x, this.pos)); + } + jsx_parseIdentifier() { + let c = this.startNode(); + return this.type === o.jsxName ? c.name = this.value : this.type.keyword ? c.name = this.type.keyword : this.unexpected(), this.next(), this.finishNode(c, "JSXIdentifier"); + } + jsx_parseNamespacedName() { + let c = this.start, x = this.startLoc, y = this.jsx_parseIdentifier(); + if (!e.allowNamespaces || !this.eat(r.colon)) return y; + var v = this.startNodeAt(c, x); + return v.namespace = y, v.name = this.jsx_parseIdentifier(), this.finishNode(v, "JSXNamespacedName"); + } + jsx_parseElementName() { + if (this.type === o.jsxTagEnd) return ""; + let c = this.start, x = this.startLoc, y = this.jsx_parseNamespacedName(); + for (this.type === r.dot && y.type === "JSXNamespacedName" && !e.allowNamespacedObjects && this.unexpected(); this.eat(r.dot);) { + let v = this.startNodeAt(c, x); + v.object = y, v.property = this.jsx_parseIdentifier(), y = this.finishNode(v, "JSXMemberExpression"); + } + return y; + } + jsx_parseAttributeValue() { + switch (this.type) { + case r.braceL: + let c = this.jsx_parseExpressionContainer(); + return c.expression.type === "JSXEmptyExpression" && this.raise(c.start, "JSX attributes must only be assigned a non-empty expression"), c; + case o.jsxTagStart: + case r.string: return this.parseExprAtom(); + default: this.raise(this.start, "JSX value should be either an expression or a quoted JSX text"); + } + } + jsx_parseEmptyExpression() { + let c = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); + return this.finishNodeAt(c, "JSXEmptyExpression", this.start, this.startLoc); + } + jsx_parseExpressionContainer() { + let c = this.startNode(); + return this.next(), c.expression = this.type === r.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(), this.expect(r.braceR), this.finishNode(c, "JSXExpressionContainer"); + } + jsx_parseAttribute() { + let c = this.startNode(); + return this.eat(r.braceL) ? (this.expect(r.ellipsis), c.argument = this.parseMaybeAssign(), this.expect(r.braceR), this.finishNode(c, "JSXSpreadAttribute")) : (c.name = this.jsx_parseNamespacedName(), c.value = this.eat(r.eq) ? this.jsx_parseAttributeValue() : null, this.finishNode(c, "JSXAttribute")); + } + jsx_parseOpeningElementAt(c, x) { + let y = this.startNodeAt(c, x); + y.attributes = []; + let v = this.jsx_parseElementName(); + for (v && (y.name = v); this.type !== r.slash && this.type !== o.jsxTagEnd;) y.attributes.push(this.jsx_parseAttribute()); + return y.selfClosing = this.eat(r.slash), this.expect(o.jsxTagEnd), this.finishNode(y, v ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + jsx_parseClosingElementAt(c, x) { + let y = this.startNodeAt(c, x), v = this.jsx_parseElementName(); + return v && (y.name = v), this.expect(o.jsxTagEnd), this.finishNode(y, v ? "JSXClosingElement" : "JSXClosingFragment"); + } + jsx_parseElementAt(c, x) { + let y = this.startNodeAt(c, x), v = [], I = this.jsx_parseOpeningElementAt(c, x), de = null; + if (!I.selfClosing) { + e: for (;;) switch (this.type) { + case o.jsxTagStart: + if (c = this.start, x = this.startLoc, this.next(), this.eat(r.slash)) { + de = this.jsx_parseClosingElementAt(c, x); + break e; + } + v.push(this.jsx_parseElementAt(c, x)); + break; + case o.jsxText: + v.push(this.parseExprAtom()); + break; + case r.braceL: + v.push(this.jsx_parseExpressionContainer()); + break; + default: this.unexpected(); + } + pe(de.name) !== pe(I.name) && this.raise(de.start, "Expected corresponding JSX closing tag for <" + pe(I.name) + ">"); + } + let Oe = I.name ? "Element" : "Fragment"; + return y["opening" + Oe] = I, y["closing" + Oe] = de, y.children = v, this.type === r.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(y, "JSX" + Oe); + } + jsx_parseText() { + let c = this.parseLiteral(this.value); + return c.type = "JSXText", c; + } + jsx_parseElement() { + let c = this.start, x = this.startLoc; + return this.next(), this.jsx_parseElementAt(c, x); + } + parseExprAtom(c) { + return this.type === o.jsxText ? this.jsx_parseText() : this.type === o.jsxTagStart ? this.jsx_parseElement() : super.parseExprAtom(c); + } + readToken(c) { + let x = this.curContext(); + if (x === l) return this.jsx_readToken(); + if (x === p || x === h) { + if (S(c)) return this.jsx_readWord(); + if (c == 62) return ++this.pos, this.finishToken(o.jsxTagEnd); + if ((c === 34 || c === 39) && x == p) return this.jsx_readString(c); + } + return c === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33 ? (++this.pos, this.finishToken(o.jsxTagStart)) : super.readToken(c); + } + updateContext(c) { + if (this.type == r.braceL) { + var x = this.curContext(); + x == p ? this.context.push(u.b_expr) : x == l ? this.context.push(u.b_tmpl) : super.updateContext(c), this.exprAllowed = !0; + } else if (this.type === r.slash && c === o.jsxTagStart) this.context.length -= 2, this.context.push(h), this.exprAllowed = !1; + else return super.updateContext(c); + } + }; + } + }); + Pi = {}; + Oi(Pi, { parsers: () => dr }); + Di = [ + 509, + 0, + 227, + 0, + 150, + 4, + 294, + 9, + 1368, + 2, + 2, + 1, + 6, + 3, + 41, + 2, + 5, + 0, + 166, + 1, + 574, + 3, + 9, + 9, + 7, + 9, + 32, + 4, + 318, + 1, + 80, + 3, + 71, + 10, + 50, + 3, + 123, + 2, + 54, + 14, + 32, + 10, + 3, + 1, + 11, + 3, + 46, + 10, + 8, + 0, + 46, + 9, + 7, + 2, + 37, + 13, + 2, + 9, + 6, + 1, + 45, + 0, + 13, + 2, + 49, + 13, + 9, + 3, + 2, + 11, + 83, + 11, + 7, + 0, + 3, + 0, + 158, + 11, + 6, + 9, + 7, + 3, + 56, + 1, + 2, + 6, + 3, + 1, + 3, + 2, + 10, + 0, + 11, + 1, + 3, + 6, + 4, + 4, + 68, + 8, + 2, + 0, + 3, + 0, + 2, + 3, + 2, + 4, + 2, + 0, + 15, + 1, + 83, + 17, + 10, + 9, + 5, + 0, + 82, + 19, + 13, + 9, + 214, + 6, + 3, + 8, + 28, + 1, + 83, + 16, + 16, + 9, + 82, + 12, + 9, + 9, + 7, + 19, + 58, + 14, + 5, + 9, + 243, + 14, + 166, + 9, + 71, + 5, + 2, + 1, + 3, + 3, + 2, + 0, + 2, + 1, + 13, + 9, + 120, + 6, + 3, + 6, + 4, + 0, + 29, + 9, + 41, + 6, + 2, + 3, + 9, + 0, + 10, + 10, + 47, + 15, + 343, + 9, + 54, + 7, + 2, + 7, + 17, + 9, + 57, + 21, + 2, + 13, + 123, + 5, + 4, + 0, + 2, + 1, + 2, + 6, + 2, + 0, + 9, + 9, + 49, + 4, + 2, + 1, + 2, + 4, + 9, + 9, + 330, + 3, + 10, + 1, + 2, + 0, + 49, + 6, + 4, + 4, + 14, + 10, + 5350, + 0, + 7, + 14, + 11465, + 27, + 2343, + 9, + 87, + 9, + 39, + 4, + 60, + 6, + 26, + 9, + 535, + 9, + 470, + 0, + 2, + 54, + 8, + 3, + 82, + 0, + 12, + 1, + 19628, + 1, + 4178, + 9, + 519, + 45, + 3, + 22, + 543, + 4, + 4, + 5, + 9, + 7, + 3, + 6, + 31, + 3, + 149, + 2, + 1418, + 49, + 513, + 54, + 5, + 49, + 9, + 0, + 15, + 0, + 23, + 4, + 2, + 14, + 1361, + 6, + 2, + 16, + 3, + 6, + 2, + 1, + 2, + 4, + 101, + 0, + 161, + 6, + 10, + 9, + 357, + 0, + 62, + 13, + 499, + 13, + 245, + 1, + 2, + 9, + 726, + 6, + 110, + 6, + 6, + 9, + 4759, + 9, + 787719, + 239 + ], dt = [ + 0, + 11, + 2, + 25, + 2, + 18, + 2, + 1, + 2, + 14, + 3, + 13, + 35, + 122, + 70, + 52, + 268, + 28, + 4, + 48, + 48, + 31, + 14, + 29, + 6, + 37, + 11, + 29, + 3, + 35, + 5, + 7, + 2, + 4, + 43, + 157, + 19, + 35, + 5, + 35, + 5, + 39, + 9, + 51, + 13, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 2, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 4, + 51, + 13, + 310, + 10, + 21, + 11, + 7, + 25, + 5, + 2, + 41, + 2, + 8, + 70, + 5, + 3, + 0, + 2, + 43, + 2, + 1, + 4, + 0, + 3, + 22, + 11, + 22, + 10, + 30, + 66, + 18, + 2, + 1, + 11, + 21, + 11, + 25, + 71, + 55, + 7, + 1, + 65, + 0, + 16, + 3, + 2, + 2, + 2, + 28, + 43, + 28, + 4, + 28, + 36, + 7, + 2, + 27, + 28, + 53, + 11, + 21, + 11, + 18, + 14, + 17, + 111, + 72, + 56, + 50, + 14, + 50, + 14, + 35, + 39, + 27, + 10, + 22, + 251, + 41, + 7, + 1, + 17, + 2, + 60, + 28, + 11, + 0, + 9, + 21, + 43, + 17, + 47, + 20, + 28, + 22, + 13, + 52, + 58, + 1, + 3, + 0, + 14, + 44, + 33, + 24, + 27, + 35, + 30, + 0, + 3, + 0, + 9, + 34, + 4, + 0, + 13, + 47, + 15, + 3, + 22, + 0, + 2, + 0, + 36, + 17, + 2, + 24, + 20, + 1, + 64, + 6, + 2, + 0, + 2, + 3, + 2, + 14, + 2, + 9, + 8, + 46, + 39, + 7, + 3, + 1, + 3, + 21, + 2, + 6, + 2, + 1, + 2, + 4, + 4, + 0, + 19, + 0, + 13, + 4, + 31, + 9, + 2, + 0, + 3, + 0, + 2, + 37, + 2, + 0, + 26, + 0, + 2, + 0, + 45, + 52, + 19, + 3, + 21, + 2, + 31, + 47, + 21, + 1, + 2, + 0, + 185, + 46, + 42, + 3, + 37, + 47, + 21, + 0, + 60, + 42, + 14, + 0, + 72, + 26, + 38, + 6, + 186, + 43, + 117, + 63, + 32, + 7, + 3, + 0, + 3, + 7, + 2, + 1, + 2, + 23, + 16, + 0, + 2, + 0, + 95, + 7, + 3, + 38, + 17, + 0, + 2, + 0, + 29, + 0, + 11, + 39, + 8, + 0, + 22, + 0, + 12, + 45, + 20, + 0, + 19, + 72, + 200, + 32, + 32, + 8, + 2, + 36, + 18, + 0, + 50, + 29, + 113, + 6, + 2, + 1, + 2, + 37, + 22, + 0, + 26, + 5, + 2, + 1, + 2, + 31, + 15, + 0, + 328, + 18, + 16, + 0, + 2, + 12, + 2, + 33, + 125, + 0, + 80, + 921, + 103, + 110, + 18, + 195, + 2637, + 96, + 16, + 1071, + 18, + 5, + 26, + 3994, + 6, + 582, + 6842, + 29, + 1763, + 568, + 8, + 30, + 18, + 78, + 18, + 29, + 19, + 47, + 17, + 3, + 32, + 20, + 6, + 18, + 433, + 44, + 212, + 63, + 129, + 74, + 6, + 0, + 67, + 12, + 65, + 1, + 2, + 0, + 29, + 6135, + 9, + 1237, + 42, + 9, + 8936, + 3, + 2, + 6, + 2, + 1, + 2, + 290, + 16, + 0, + 30, + 2, + 3, + 0, + 15, + 3, + 9, + 395, + 2309, + 106, + 6, + 12, + 4, + 8, + 8, + 9, + 5991, + 84, + 2, + 70, + 2, + 1, + 3, + 0, + 3, + 1, + 3, + 3, + 2, + 11, + 2, + 0, + 2, + 6, + 2, + 64, + 2, + 3, + 3, + 7, + 2, + 6, + 2, + 27, + 2, + 3, + 2, + 4, + 2, + 0, + 4, + 6, + 2, + 339, + 3, + 24, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 7, + 1845, + 30, + 7, + 5, + 262, + 61, + 147, + 44, + 11, + 6, + 17, + 0, + 322, + 29, + 19, + 43, + 485, + 27, + 229, + 29, + 3, + 0, + 496, + 6, + 2, + 3, + 2, + 1, + 2, + 14, + 2, + 196, + 60, + 67, + 8, + 0, + 1205, + 3, + 2, + 26, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 9, + 2, + 3, + 2, + 0, + 2, + 0, + 7, + 0, + 5, + 0, + 2, + 0, + 2, + 0, + 2, + 2, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 1, + 2, + 0, + 3, + 3, + 2, + 6, + 2, + 3, + 2, + 3, + 2, + 0, + 2, + 9, + 2, + 16, + 6, + 2, + 2, + 4, + 2, + 16, + 4421, + 42719, + 33, + 4153, + 7, + 221, + 3, + 5761, + 15, + 7472, + 16, + 621, + 2467, + 541, + 1507, + 4938, + 6, + 4191 + ], Mi = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", mt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", De = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }, Me = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", Fi = { + 5: Me, + "5module": Me + " export import", + 6: Me + " const class extends export import super" + }, ji = /^in(stanceof)?$/, Ui = new RegExp("[" + mt + "]"), Gi = new RegExp("[" + mt + Mi + "]"); + C = function(t, i) { + i === void 0 && (i = {}), this.label = t, this.keyword = i.keyword, this.beforeExpr = !!i.beforeExpr, this.startsExpr = !!i.startsExpr, this.isLoop = !!i.isLoop, this.isAssign = !!i.isAssign, this.prefix = !!i.prefix, this.postfix = !!i.postfix, this.binop = i.binop || null, this.updateContext = null; + }; + O = { beforeExpr: !0 }, N = { startsExpr: !0 }, Je = {}; + a = { + num: new C("num", N), + regexp: new C("regexp", N), + string: new C("string", N), + name: new C("name", N), + privateId: new C("privateId", N), + eof: new C("eof"), + bracketL: new C("[", { + beforeExpr: !0, + startsExpr: !0 + }), + bracketR: new C("]"), + braceL: new C("{", { + beforeExpr: !0, + startsExpr: !0 + }), + braceR: new C("}"), + parenL: new C("(", { + beforeExpr: !0, + startsExpr: !0 + }), + parenR: new C(")"), + comma: new C(",", O), + semi: new C(";", O), + colon: new C(":", O), + dot: new C("."), + question: new C("?", O), + questionDot: new C("?."), + arrow: new C("=>", O), + template: new C("template"), + invalidTemplate: new C("invalidTemplate"), + ellipsis: new C("...", O), + backQuote: new C("`", N), + dollarBraceL: new C("${", { + beforeExpr: !0, + startsExpr: !0 + }), + eq: new C("=", { + beforeExpr: !0, + isAssign: !0 + }), + assign: new C("_=", { + beforeExpr: !0, + isAssign: !0 + }), + incDec: new C("++/--", { + prefix: !0, + postfix: !0, + startsExpr: !0 + }), + prefix: new C("!/~", { + beforeExpr: !0, + prefix: !0, + startsExpr: !0 + }), + logicalOR: V("||", 1), + logicalAND: V("&&", 2), + bitwiseOR: V("|", 3), + bitwiseXOR: V("^", 4), + bitwiseAND: V("&", 5), + equality: V("==/!=/===/!==", 6), + relational: V("/<=/>=", 7), + bitShift: V("<>/>>>", 8), + plusMin: new C("+/-", { + beforeExpr: !0, + binop: 9, + prefix: !0, + startsExpr: !0 + }), + modulo: V("%", 10), + star: V("*", 10), + slash: V("/", 10), + starstar: new C("**", { beforeExpr: !0 }), + coalesce: V("??", 1), + _break: _("break"), + _case: _("case", O), + _catch: _("catch"), + _continue: _("continue"), + _debugger: _("debugger"), + _default: _("default", O), + _do: _("do", { + isLoop: !0, + beforeExpr: !0 + }), + _else: _("else", O), + _finally: _("finally"), + _for: _("for", { isLoop: !0 }), + _function: _("function", N), + _if: _("if"), + _return: _("return", O), + _switch: _("switch"), + _throw: _("throw", O), + _try: _("try"), + _var: _("var"), + _const: _("const"), + _while: _("while", { isLoop: !0 }), + _with: _("with"), + _new: _("new", { + beforeExpr: !0, + startsExpr: !0 + }), + _this: _("this", N), + _super: _("super", N), + _class: _("class", N), + _extends: _("extends", O), + _export: _("export"), + _import: _("import", N), + _null: _("null", N), + _true: _("true", N), + _false: _("false", N), + _in: _("in", { + beforeExpr: !0, + binop: 7 + }), + _instanceof: _("instanceof", { + beforeExpr: !0, + binop: 7 + }), + _typeof: _("typeof", { + beforeExpr: !0, + prefix: !0, + startsExpr: !0 + }), + _void: _("void", { + beforeExpr: !0, + prefix: !0, + startsExpr: !0 + }), + _delete: _("delete", { + beforeExpr: !0, + prefix: !0, + startsExpr: !0 + }) + }, L = /\r\n?|\n|\u2028|\u2029/, qi = new RegExp(L.source, "g"); + yt = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, k = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, gt = Object.prototype, Ji = gt.hasOwnProperty, Ki = gt.toString, $ = Object.hasOwn || (function(e, t) { + return Ji.call(e, t); + }), ht = Array.isArray || (function(e) { + return Ki.call(e) === "[object Array]"; + }), pt = Object.create(null); + Hi = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, ne = function(t, i) { + this.line = t, this.column = i; + }; + ne.prototype.offset = function(t) { + return new ne(this.line, this.column + t); + }; + be = function(t, i, s) { + this.start = i, this.end = s, t.sourceFile !== null && (this.source = t.sourceFile); + }; + Ue = { + ecmaVersion: null, + sourceType: "script", + onInsertedSemicolon: null, + onTrailingComma: null, + allowReserved: null, + allowReturnOutsideFunction: !1, + allowImportExportEverywhere: !1, + allowAwaitOutsideFunction: null, + allowSuperOutsideMethod: null, + allowHashBang: !1, + checkPrivateFields: !0, + locations: !1, + onToken: null, + onComment: null, + ranges: !1, + program: null, + sourceFile: null, + directSourceFile: null, + preserveParens: !1 + }, ct = !1; + oe = 1, Z = 2, Ke = 4, bt = 8, He = 16, St = 32, Se = 64, _t = 128, z = 256, ue = 512, _e = oe | Z | z; + xe = 0, We = 1, K = 2, Ct = 3, Tt = 4, Et = 5, A = function(t, i, s) { + this.options = t = Xi(t), this.sourceFile = t.sourceFile, this.keywords = H(Fi[t.ecmaVersion >= 6 ? 6 : t.sourceType === "module" ? "5module" : 5]); + var r = ""; + t.allowReserved !== !0 && (r = De[t.ecmaVersion >= 6 ? 6 : t.ecmaVersion === 5 ? 5 : 3], t.sourceType === "module" && (r += " await")), this.reservedWords = H(r); + var o = (r ? r + " " : "") + De.strict; + this.reservedWordsStrict = H(o), this.reservedWordsStrictBind = H(o + " " + De.strictBind), this.input = String(i), this.containsEsc = !1, s ? (this.pos = s, this.lineStart = this.input.lastIndexOf(` +`, s - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(L).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = a.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(oe), this.regexpState = null, this.privateNameStack = []; + }, U = { + inFunction: { configurable: !0 }, + inGenerator: { configurable: !0 }, + inAsync: { configurable: !0 }, + canAwait: { configurable: !0 }, + allowSuper: { configurable: !0 }, + allowDirectSuper: { configurable: !0 }, + treatFunctionsAsVar: { configurable: !0 }, + allowNewDotTarget: { configurable: !0 }, + inClassStaticBlock: { configurable: !0 } + }; + A.prototype.parse = function() { + var t = this.options.program || this.startNode(); + return this.nextToken(), this.parseTopLevel(t); + }; + U.inFunction.get = function() { + return (this.currentVarScope().flags & Z) > 0; + }; + U.inGenerator.get = function() { + return (this.currentVarScope().flags & bt) > 0; + }; + U.inAsync.get = function() { + return (this.currentVarScope().flags & Ke) > 0; + }; + U.canAwait.get = function() { + for (var e = this.scopeStack.length - 1; e >= 0; e--) { + var i = this.scopeStack[e].flags; + if (i & (z | ue)) return !1; + if (i & Z) return (i & Ke) > 0; + } + return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction; + }; + U.allowSuper.get = function() { + return (this.currentThisScope().flags & Se) > 0 || this.options.allowSuperOutsideMethod; + }; + U.allowDirectSuper.get = function() { + return (this.currentThisScope().flags & _t) > 0; + }; + U.treatFunctionsAsVar.get = function() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + }; + U.allowNewDotTarget.get = function() { + for (var e = this.scopeStack.length - 1; e >= 0; e--) { + var i = this.scopeStack[e].flags; + if (i & (z | ue) || i & Z && !(i & He)) return !0; + } + return !1; + }; + U.inClassStaticBlock.get = function() { + return (this.currentVarScope().flags & z) > 0; + }; + A.extend = function() { + for (var t = [], i = arguments.length; i--;) t[i] = arguments[i]; + for (var s = this, r = 0; r < t.length; r++) s = t[r](s); + return s; + }; + A.parse = function(t, i) { + return new this(i, t).parse(); + }; + A.parseExpressionAt = function(t, i, s) { + var r = new this(s, t, i); + return r.nextToken(), r.parseExpression(); + }; + A.tokenizer = function(t, i) { + return new this(i, t); + }; + Object.defineProperties(A.prototype, U); + w = A.prototype, zi = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; + w.strictDirective = function(e) { + if (this.options.ecmaVersion < 5) return !1; + for (;;) { + k.lastIndex = e, e += k.exec(this.input)[0].length; + var t = zi.exec(this.input.slice(e)); + if (!t) return !1; + if ((t[1] || t[2]) === "use strict") { + k.lastIndex = e + t[0].length; + var i = k.exec(this.input), s = i.index + i[0].length, r = this.input.charAt(s); + return r === ";" || r === "}" || L.test(i[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(r) || r === "!" && this.input.charAt(s + 1) === "="); + } + e += t[0].length, k.lastIndex = e, e += k.exec(this.input)[0].length, this.input[e] === ";" && e++; + } + }; + w.eat = function(e) { + return this.type === e ? (this.next(), !0) : !1; + }; + w.isContextual = function(e) { + return this.type === a.name && this.value === e && !this.containsEsc; + }; + w.eatContextual = function(e) { + return this.isContextual(e) ? (this.next(), !0) : !1; + }; + w.expectContextual = function(e) { + this.eatContextual(e) || this.unexpected(); + }; + w.canInsertSemicolon = function() { + return this.type === a.eof || this.type === a.braceR || L.test(this.input.slice(this.lastTokEnd, this.start)); + }; + w.insertSemicolon = function() { + if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc), !0; + }; + w.semicolon = function() { + !this.eat(a.semi) && !this.insertSemicolon() && this.unexpected(); + }; + w.afterTrailingComma = function(e, t) { + if (this.type === e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc), t || this.next(), !0; + }; + w.expect = function(e) { + this.eat(e) || this.unexpected(); + }; + w.unexpected = function(e) { + this.raise(e ?? this.start, "Unexpected token"); + }; + Ce = function() { + this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; + }; + w.checkPatternErrors = function(e, t) { + if (e) { + e.trailingComma > -1 && this.raiseRecoverable(e.trailingComma, "Comma is not permitted after the rest element"); + var i = t ? e.parenthesizedAssign : e.parenthesizedBind; + i > -1 && this.raiseRecoverable(i, t ? "Assigning to rvalue" : "Parenthesized pattern"); + } + }; + w.checkExpressionErrors = function(e, t) { + if (!e) return !1; + var i = e.shorthandAssign, s = e.doubleProto; + if (!t) return i >= 0 || s >= 0; + i >= 0 && this.raise(i, "Shorthand property assignments are valid only in destructuring patterns"), s >= 0 && this.raiseRecoverable(s, "Redefinition of __proto__ property"); + }; + w.checkYieldAwaitInDefaultParams = function() { + this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, "Yield expression cannot be a default value"), this.awaitPos && this.raise(this.awaitPos, "Await expression cannot be a default value"); + }; + w.isSimpleAssignTarget = function(e) { + return e.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(e.expression) : e.type === "Identifier" || e.type === "MemberExpression"; + }; + d = A.prototype; + d.parseTopLevel = function(e) { + var t = Object.create(null); + for (e.body || (e.body = []); this.type !== a.eof;) { + var i = this.parseStatement(null, !0, t); + e.body.push(i); + } + if (this.inModule) for (var s = 0, r = Object.keys(this.undefinedExports); s < r.length; s += 1) { + var o = r[s]; + this.raiseRecoverable(this.undefinedExports[o].start, "Export '" + o + "' is not defined"); + } + return this.adaptDirectivePrologue(e.body), this.next(), e.sourceType = this.options.sourceType, this.finishNode(e, "Program"); + }; + ze = { kind: "loop" }, Qi = { kind: "switch" }; + d.isLet = function(e) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1; + k.lastIndex = this.pos; + var t = k.exec(this.input), i = this.pos + t[0].length, s = this.input.charCodeAt(i); + if (s === 91 || s === 92) return !0; + if (e) return !1; + if (s === 123 || s > 55295 && s < 56320) return !0; + if (j(s, !0)) { + for (var r = i + 1; X(s = this.input.charCodeAt(r), !0);) ++r; + if (s === 92 || s > 55295 && s < 56320) return !0; + var o = this.input.slice(i, r); + if (!ji.test(o)) return !0; + } + return !1; + }; + d.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1; + k.lastIndex = this.pos; + var e = k.exec(this.input), t = this.pos + e[0].length, i; + return !L.test(this.input.slice(this.pos, t)) && this.input.slice(t, t + 8) === "function" && (t + 8 === this.input.length || !(X(i = this.input.charCodeAt(t + 8)) || i > 55295 && i < 56320)); + }; + d.isUsingKeyword = function(e, t) { + if (this.options.ecmaVersion < 17 || !this.isContextual(e ? "await" : "using")) return !1; + k.lastIndex = this.pos; + var i = k.exec(this.input), s = this.pos + i[0].length; + if (L.test(this.input.slice(this.pos, s))) return !1; + if (e) { + var r = s + 5, o; + if (this.input.slice(s, r) !== "using" || r === this.input.length || X(o = this.input.charCodeAt(r)) || o > 55295 && o < 56320) return !1; + k.lastIndex = r; + var u = k.exec(this.input); + if (u && L.test(this.input.slice(r, r + u[0].length))) return !1; + } + if (t) { + var p = s + 2, h; + if (this.input.slice(s, p) === "of" && (p === this.input.length || !X(h = this.input.charCodeAt(p)) && !(h > 55295 && h < 56320))) return !1; + } + var l = this.input.charCodeAt(s); + return j(l, !0) || l === 92; + }; + d.isAwaitUsing = function(e) { + return this.isUsingKeyword(!0, e); + }; + d.isUsing = function(e) { + return this.isUsingKeyword(!1, e); + }; + d.parseStatement = function(e, t, i) { + var s = this.type, r = this.startNode(), o; + switch (this.isLet(e) && (s = a._var, o = "let"), s) { + case a._break: + case a._continue: return this.parseBreakContinueStatement(r, s.keyword); + case a._debugger: return this.parseDebuggerStatement(r); + case a._do: return this.parseDoStatement(r); + case a._for: return this.parseForStatement(r); + case a._function: return e && (this.strict || e !== "if" && e !== "label") && this.options.ecmaVersion >= 6 && this.unexpected(), this.parseFunctionStatement(r, !1, !e); + case a._class: return e && this.unexpected(), this.parseClass(r, !0); + case a._if: return this.parseIfStatement(r); + case a._return: return this.parseReturnStatement(r); + case a._switch: return this.parseSwitchStatement(r); + case a._throw: return this.parseThrowStatement(r); + case a._try: return this.parseTryStatement(r); + case a._const: + case a._var: return o = o || this.value, e && o !== "var" && this.unexpected(), this.parseVarStatement(r, o); + case a._while: return this.parseWhileStatement(r); + case a._with: return this.parseWithStatement(r); + case a.braceL: return this.parseBlock(!0, r); + case a.semi: return this.parseEmptyStatement(r); + case a._export: + case a._import: + if (this.options.ecmaVersion > 10 && s === a._import) { + k.lastIndex = this.pos; + var u = k.exec(this.input), p = this.pos + u[0].length, h = this.input.charCodeAt(p); + if (h === 40 || h === 46) return this.parseExpressionStatement(r, this.parseExpression()); + } + return this.options.allowImportExportEverywhere || (t || this.raise(this.start, "'import' and 'export' may only appear at the top level"), this.inModule || this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")), s === a._import ? this.parseImport(r) : this.parseExport(r, i); + default: + if (this.isAsyncFunction()) return e && this.unexpected(), this.next(), this.parseFunctionStatement(r, !0, !e); + var l = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null; + if (l) return t && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), l === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(r, !1, l), this.semicolon(), this.finishNode(r, "VariableDeclaration"); + var m = this.value, S = this.parseExpression(); + return s === a.name && S.type === "Identifier" && this.eat(a.colon) ? this.parseLabeledStatement(r, m, S, e) : this.parseExpressionStatement(r, S); + } + }; + d.parseBreakContinueStatement = function(e, t) { + var i = t === "break"; + this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.label = null : this.type !== a.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon()); + for (var s = 0; s < this.labels.length; ++s) { + var r = this.labels[s]; + if ((e.label == null || r.name === e.label.name) && (r.kind != null && (i || r.kind === "loop") || e.label && i)) break; + } + return s === this.labels.length && this.raise(e.start, "Unsyntactic " + t), this.finishNode(e, i ? "BreakStatement" : "ContinueStatement"); + }; + d.parseDebuggerStatement = function(e) { + return this.next(), this.semicolon(), this.finishNode(e, "DebuggerStatement"); + }; + d.parseDoStatement = function(e) { + return this.next(), this.labels.push(ze), e.body = this.parseStatement("do"), this.labels.pop(), this.expect(a._while), e.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(a.semi) : this.semicolon(), this.finishNode(e, "DoWhileStatement"); + }; + d.parseForStatement = function(e) { + this.next(); + var t = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1; + if (this.labels.push(ze), this.enterScope(0), this.expect(a.parenL), this.type === a.semi) return t > -1 && this.unexpected(t), this.parseFor(e, null); + var i = this.isLet(); + if (this.type === a._var || this.type === a._const || i) { + var s = this.startNode(), r = i ? "let" : this.value; + return this.next(), this.parseVar(s, !0, r), this.finishNode(s, "VariableDeclaration"), this.parseForAfterInit(e, s, t); + } + var o = this.isContextual("let"), u = !1, p = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null; + if (p) { + var h = this.startNode(); + return this.next(), p === "await using" && this.next(), this.parseVar(h, !0, p), this.finishNode(h, "VariableDeclaration"), this.parseForAfterInit(e, h, t); + } + var l = this.containsEsc, m = new Ce(), S = this.start, E = t > -1 ? this.parseExprSubscripts(m, "await") : this.parseExpression(!0, m); + return this.type === a._in || (u = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t > -1 ? (this.type === a._in && this.unexpected(t), e.await = !0) : u && this.options.ecmaVersion >= 8 && (E.start === S && !l && E.type === "Identifier" && E.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (e.await = !1)), o && u && this.raise(E.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(E, !1, m), this.checkLValPattern(E), this.parseForIn(e, E)) : (this.checkExpressionErrors(m, !0), t > -1 && this.unexpected(t), this.parseFor(e, E)); + }; + d.parseForAfterInit = function(e, t, i) { + return (this.type === a._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && t.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === a._in ? i > -1 && this.unexpected(i) : e.await = i > -1), this.parseForIn(e, t)) : (i > -1 && this.unexpected(i), this.parseFor(e, t)); + }; + d.parseFunctionStatement = function(e, t, i) { + return this.next(), this.parseFunction(e, ae | (i ? 0 : Ge), !1, t); + }; + d.parseIfStatement = function(e) { + return this.next(), e.test = this.parseParenExpression(), e.consequent = this.parseStatement("if"), e.alternate = this.eat(a._else) ? this.parseStatement("if") : null, this.finishNode(e, "IfStatement"); + }; + d.parseReturnStatement = function(e) { + return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(a.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()), this.finishNode(e, "ReturnStatement"); + }; + d.parseSwitchStatement = function(e) { + this.next(), e.discriminant = this.parseParenExpression(), e.cases = [], this.expect(a.braceL), this.labels.push(Qi), this.enterScope(0); + for (var t, i = !1; this.type !== a.braceR;) if (this.type === a._case || this.type === a._default) { + var s = this.type === a._case; + t && this.finishNode(t, "SwitchCase"), e.cases.push(t = this.startNode()), t.consequent = [], this.next(), s ? t.test = this.parseExpression() : (i && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), i = !0, t.test = null), this.expect(a.colon); + } else t || this.unexpected(), t.consequent.push(this.parseStatement(null)); + return this.exitScope(), t && this.finishNode(t, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(e, "SwitchStatement"); + }; + d.parseThrowStatement = function(e) { + return this.next(), L.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), e.argument = this.parseExpression(), this.semicolon(), this.finishNode(e, "ThrowStatement"); + }; + Yi = []; + d.parseCatchClauseParam = function() { + var e = this.parseBindingAtom(), t = e.type === "Identifier"; + return this.enterScope(t ? St : 0), this.checkLValPattern(e, t ? Tt : K), this.expect(a.parenR), e; + }; + d.parseTryStatement = function(e) { + if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === a._catch) { + var t = this.startNode(); + this.next(), this.eat(a.parenL) ? t.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), t.param = null, this.enterScope(0)), t.body = this.parseBlock(!1), this.exitScope(), e.handler = this.finishNode(t, "CatchClause"); + } + return e.finalizer = this.eat(a._finally) ? this.parseBlock() : null, !e.handler && !e.finalizer && this.raise(e.start, "Missing catch or finally clause"), this.finishNode(e, "TryStatement"); + }; + d.parseVarStatement = function(e, t, i) { + return this.next(), this.parseVar(e, !1, t, i), this.semicolon(), this.finishNode(e, "VariableDeclaration"); + }; + d.parseWhileStatement = function(e) { + return this.next(), e.test = this.parseParenExpression(), this.labels.push(ze), e.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(e, "WhileStatement"); + }; + d.parseWithStatement = function(e) { + return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), e.object = this.parseParenExpression(), e.body = this.parseStatement("with"), this.finishNode(e, "WithStatement"); + }; + d.parseEmptyStatement = function(e) { + return this.next(), this.finishNode(e, "EmptyStatement"); + }; + d.parseLabeledStatement = function(e, t, i, s) { + for (var r = 0, o = this.labels; r < o.length; r += 1) o[r].name === t && this.raise(i.start, "Label '" + t + "' is already declared"); + for (var p = this.type.isLoop ? "loop" : this.type === a._switch ? "switch" : null, h = this.labels.length - 1; h >= 0; h--) { + var l = this.labels[h]; + if (l.statementStart === e.start) l.statementStart = this.start, l.kind = p; + else break; + } + return this.labels.push({ + name: t, + kind: p, + statementStart: this.start + }), e.body = this.parseStatement(s ? s.indexOf("label") === -1 ? s + "label" : s : "label"), this.labels.pop(), e.label = i, this.finishNode(e, "LabeledStatement"); + }; + d.parseExpressionStatement = function(e, t) { + return e.expression = t, this.semicolon(), this.finishNode(e, "ExpressionStatement"); + }; + d.parseBlock = function(e, t, i) { + for (e === void 0 && (e = !0), t === void 0 && (t = this.startNode()), t.body = [], this.expect(a.braceL), e && this.enterScope(0); this.type !== a.braceR;) { + var s = this.parseStatement(null); + t.body.push(s); + } + return i && (this.strict = !1), this.next(), e && this.exitScope(), this.finishNode(t, "BlockStatement"); + }; + d.parseFor = function(e, t) { + return e.init = t, this.expect(a.semi), e.test = this.type === a.semi ? null : this.parseExpression(), this.expect(a.semi), e.update = this.type === a.parenR ? null : this.parseExpression(), this.expect(a.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, "ForStatement"); + }; + d.parseForIn = function(e, t) { + var i = this.type === a._in; + return this.next(), t.type === "VariableDeclaration" && t.declarations[0].init != null && (!i || this.options.ecmaVersion < 8 || this.strict || t.kind !== "var" || t.declarations[0].id.type !== "Identifier") && this.raise(t.start, (i ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), e.left = t, e.right = i ? this.parseExpression() : this.parseMaybeAssign(), this.expect(a.parenR), e.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(e, i ? "ForInStatement" : "ForOfStatement"); + }; + d.parseVar = function(e, t, i, s) { + for (e.declarations = [], e.kind = i;;) { + var r = this.startNode(); + if (this.parseVarId(r, i), this.eat(a.eq) ? r.init = this.parseMaybeAssign(t) : !s && i === "const" && !(this.type === a._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !s && (i === "using" || i === "await using") && this.options.ecmaVersion >= 17 && this.type !== a._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + i + " declaration") : !s && r.id.type !== "Identifier" && !(t && (this.type === a._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : r.init = null, e.declarations.push(this.finishNode(r, "VariableDeclarator")), !this.eat(a.comma)) break; + } + return e; + }; + d.parseVarId = function(e, t) { + e.id = t === "using" || t === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(e.id, t === "var" ? We : K, !1); + }; + ae = 1, Ge = 2, At = 4; + d.parseFunction = function(e, t, i, s, r) { + this.initFunction(e), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !s) && (this.type === a.star && t & Ge && this.unexpected(), e.generator = this.eat(a.star)), this.options.ecmaVersion >= 8 && (e.async = !!s), t & ae && (e.id = t & At && this.type !== a.name ? null : this.parseIdent(), e.id && !(t & Ge) && this.checkLValSimple(e.id, this.strict || e.generator || e.async ? this.treatFunctionsAsVar ? We : K : Ct)); + var o = this.yieldPos, u = this.awaitPos, p = this.awaitIdentPos; + return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Xe(e.async, e.generator)), t & ae || (e.id = this.type === a.name ? this.parseIdent() : null), this.parseFunctionParams(e), this.parseFunctionBody(e, i, !1, r), this.yieldPos = o, this.awaitPos = u, this.awaitIdentPos = p, this.finishNode(e, t & ae ? "FunctionDeclaration" : "FunctionExpression"); + }; + d.parseFunctionParams = function(e) { + this.expect(a.parenL), e.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(); + }; + d.parseClass = function(e, t) { + this.next(); + var i = this.strict; + this.strict = !0, this.parseClassId(e, t), this.parseClassSuper(e); + var s = this.enterClassBody(), r = this.startNode(), o = !1; + for (r.body = [], this.expect(a.braceL); this.type !== a.braceR;) { + var u = this.parseClassElement(e.superClass !== null); + u && (r.body.push(u), u.type === "MethodDefinition" && u.kind === "constructor" ? (o && this.raiseRecoverable(u.start, "Duplicate constructor in the same class"), o = !0) : u.key && u.key.type === "PrivateIdentifier" && $i(s, u) && this.raiseRecoverable(u.key.start, "Identifier '#" + u.key.name + "' has already been declared")); + } + return this.strict = i, this.next(), e.body = this.finishNode(r, "ClassBody"), this.exitClassBody(), this.finishNode(e, t ? "ClassDeclaration" : "ClassExpression"); + }; + d.parseClassElement = function(e) { + if (this.eat(a.semi)) return null; + var t = this.options.ecmaVersion, i = this.startNode(), s = "", r = !1, o = !1, u = "method", p = !1; + if (this.eatContextual("static")) { + if (t >= 13 && this.eat(a.braceL)) return this.parseClassStaticBlock(i), i; + this.isClassElementNameStart() || this.type === a.star ? p = !0 : s = "static"; + } + if (i.static = p, !s && t >= 8 && this.eatContextual("async") && ((this.isClassElementNameStart() || this.type === a.star) && !this.canInsertSemicolon() ? o = !0 : s = "async"), !s && (t >= 9 || !o) && this.eat(a.star) && (r = !0), !s && !o && !r) { + var h = this.value; + (this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? u = h : s = h); + } + if (s ? (i.computed = !1, i.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i.key.name = s, this.finishNode(i.key, "Identifier")) : this.parseClassElementName(i), t < 13 || this.type === a.parenL || u !== "method" || r || o) { + var l = !i.static && ye(i, "constructor"), m = l && e; + l && u !== "method" && this.raise(i.key.start, "Constructor can't have get/set modifier"), i.kind = l ? "constructor" : u, this.parseClassMethod(i, r, o, m); + } else this.parseClassField(i); + return i; + }; + d.isClassElementNameStart = function() { + return this.type === a.name || this.type === a.privateId || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword; + }; + d.parseClassElementName = function(e) { + this.type === a.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), e.computed = !1, e.key = this.parsePrivateIdent()) : this.parsePropertyName(e); + }; + d.parseClassMethod = function(e, t, i, s) { + var r = e.key; + e.kind === "constructor" ? (t && this.raise(r.start, "Constructor can't be a generator"), i && this.raise(r.start, "Constructor can't be an async method")) : e.static && ye(e, "prototype") && this.raise(r.start, "Classes may not have a static property named prototype"); + var o = e.value = this.parseMethod(t, i, s); + return e.kind === "get" && o.params.length !== 0 && this.raiseRecoverable(o.start, "getter should have no params"), e.kind === "set" && o.params.length !== 1 && this.raiseRecoverable(o.start, "setter should have exactly one param"), e.kind === "set" && o.params[0].type === "RestElement" && this.raiseRecoverable(o.params[0].start, "Setter cannot use rest params"), this.finishNode(e, "MethodDefinition"); + }; + d.parseClassField = function(e) { + return ye(e, "constructor") ? this.raise(e.key.start, "Classes can't have a field named 'constructor'") : e.static && ye(e, "prototype") && this.raise(e.key.start, "Classes can't have a static field named 'prototype'"), this.eat(a.eq) ? (this.enterScope(ue | Se), e.value = this.parseMaybeAssign(), this.exitScope()) : e.value = null, this.semicolon(), this.finishNode(e, "PropertyDefinition"); + }; + d.parseClassStaticBlock = function(e) { + e.body = []; + var t = this.labels; + for (this.labels = [], this.enterScope(z | Se); this.type !== a.braceR;) { + var i = this.parseStatement(null); + e.body.push(i); + } + return this.next(), this.exitScope(), this.labels = t, this.finishNode(e, "StaticBlock"); + }; + d.parseClassId = function(e, t) { + this.type === a.name ? (e.id = this.parseIdent(), t && this.checkLValSimple(e.id, K, !1)) : (t === !0 && this.unexpected(), e.id = null); + }; + d.parseClassSuper = function(e) { + e.superClass = this.eat(a._extends) ? this.parseExprSubscripts(null, !1) : null; + }; + d.enterClassBody = function() { + var e = { + declared: Object.create(null), + used: [] + }; + return this.privateNameStack.push(e), e.declared; + }; + d.exitClassBody = function() { + var e = this.privateNameStack.pop(), t = e.declared, i = e.used; + if (this.options.checkPrivateFields) for (var s = this.privateNameStack.length, r = s === 0 ? null : this.privateNameStack[s - 1], o = 0; o < i.length; ++o) { + var u = i[o]; + $(t, u.name) || (r ? r.used.push(u) : this.raiseRecoverable(u.start, "Private field '#" + u.name + "' must be declared in an enclosing class")); + } + }; + d.parseExportAllDeclaration = function(e, t) { + return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (e.exported = this.parseModuleExportName(), this.checkExport(t, e.exported, this.lastTokStart)) : e.exported = null), this.expectContextual("from"), this.type !== a.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ExportAllDeclaration"); + }; + d.parseExport = function(e, t) { + if (this.next(), this.eat(a.star)) return this.parseExportAllDeclaration(e, t); + if (this.eat(a._default)) return this.checkExport(t, "default", this.lastTokStart), e.declaration = this.parseExportDefaultDeclaration(), this.finishNode(e, "ExportDefaultDeclaration"); + if (this.shouldParseExportStatement()) e.declaration = this.parseExportDeclaration(e), e.declaration.type === "VariableDeclaration" ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id, e.declaration.id.start), e.specifiers = [], e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []); + else { + if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual("from")) this.type !== a.string && this.unexpected(), e.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()); + else { + for (var i = 0, s = e.specifiers; i < s.length; i += 1) { + var r = s[i]; + this.checkUnreserved(r.local), this.checkLocalExport(r.local), r.local.type === "Literal" && this.raise(r.local.start, "A string literal cannot be used as an exported binding without `from`."); + } + e.source = null, this.options.ecmaVersion >= 16 && (e.attributes = []); + } + this.semicolon(); + } + return this.finishNode(e, "ExportNamedDeclaration"); + }; + d.parseExportDeclaration = function(e) { + return this.parseStatement(null); + }; + d.parseExportDefaultDeclaration = function() { + var e; + if (this.type === a._function || (e = this.isAsyncFunction())) { + var t = this.startNode(); + return this.next(), e && this.next(), this.parseFunction(t, ae | At, !1, e); + } else if (this.type === a._class) { + var i = this.startNode(); + return this.parseClass(i, "nullableID"); + } else { + var s = this.parseMaybeAssign(); + return this.semicolon(), s; + } + }; + d.checkExport = function(e, t, i) { + e && (typeof t != "string" && (t = t.type === "Identifier" ? t.name : t.value), $(e, t) && this.raiseRecoverable(i, "Duplicate export '" + t + "'"), e[t] = !0); + }; + d.checkPatternExport = function(e, t) { + var i = t.type; + if (i === "Identifier") this.checkExport(e, t, t.start); + else if (i === "ObjectPattern") for (var s = 0, r = t.properties; s < r.length; s += 1) { + var o = r[s]; + this.checkPatternExport(e, o); + } + else if (i === "ArrayPattern") for (var u = 0, p = t.elements; u < p.length; u += 1) { + var h = p[u]; + h && this.checkPatternExport(e, h); + } + else i === "Property" ? this.checkPatternExport(e, t.value) : i === "AssignmentPattern" ? this.checkPatternExport(e, t.left) : i === "RestElement" && this.checkPatternExport(e, t.argument); + }; + d.checkVariableExport = function(e, t) { + if (e) for (var i = 0, s = t; i < s.length; i += 1) { + var r = s[i]; + this.checkPatternExport(e, r.id); + } + }; + d.shouldParseExportStatement = function() { + return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction(); + }; + d.parseExportSpecifier = function(e) { + var t = this.startNode(); + return t.local = this.parseModuleExportName(), t.exported = this.eatContextual("as") ? this.parseModuleExportName() : t.local, this.checkExport(e, t.exported, t.exported.start), this.finishNode(t, "ExportSpecifier"); + }; + d.parseExportSpecifiers = function(e) { + var t = [], i = !0; + for (this.expect(a.braceL); !this.eat(a.braceR);) { + if (i) i = !1; + else if (this.expect(a.comma), this.afterTrailingComma(a.braceR)) break; + t.push(this.parseExportSpecifier(e)); + } + return t; + }; + d.parseImport = function(e) { + return this.next(), this.type === a.string ? (e.specifiers = Yi, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), e.source = this.type === a.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (e.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(e, "ImportDeclaration"); + }; + d.parseImportSpecifier = function() { + var e = this.startNode(); + return e.imported = this.parseModuleExportName(), this.eatContextual("as") ? e.local = this.parseIdent() : (this.checkUnreserved(e.imported), e.local = e.imported), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportSpecifier"); + }; + d.parseImportDefaultSpecifier = function() { + var e = this.startNode(); + return e.local = this.parseIdent(), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportDefaultSpecifier"); + }; + d.parseImportNamespaceSpecifier = function() { + var e = this.startNode(); + return this.next(), this.expectContextual("as"), e.local = this.parseIdent(), this.checkLValSimple(e.local, K), this.finishNode(e, "ImportNamespaceSpecifier"); + }; + d.parseImportSpecifiers = function() { + var e = [], t = !0; + if (this.type === a.name && (e.push(this.parseImportDefaultSpecifier()), !this.eat(a.comma))) return e; + if (this.type === a.star) return e.push(this.parseImportNamespaceSpecifier()), e; + for (this.expect(a.braceL); !this.eat(a.braceR);) { + if (t) t = !1; + else if (this.expect(a.comma), this.afterTrailingComma(a.braceR)) break; + e.push(this.parseImportSpecifier()); + } + return e; + }; + d.parseWithClause = function() { + var e = []; + if (!this.eat(a._with)) return e; + this.expect(a.braceL); + for (var t = {}, i = !0; !this.eat(a.braceR);) { + if (i) i = !1; + else if (this.expect(a.comma), this.afterTrailingComma(a.braceR)) break; + var s = this.parseImportAttribute(), r = s.key.type === "Identifier" ? s.key.name : s.key.value; + $(t, r) && this.raiseRecoverable(s.key.start, "Duplicate attribute key '" + r + "'"), t[r] = !0, e.push(s); + } + return e; + }; + d.parseImportAttribute = function() { + var e = this.startNode(); + return e.key = this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(a.colon), this.type !== a.string && this.unexpected(), e.value = this.parseExprAtom(), this.finishNode(e, "ImportAttribute"); + }; + d.parseModuleExportName = function() { + if (this.options.ecmaVersion >= 13 && this.type === a.string) { + var e = this.parseLiteral(this.value); + return Hi.test(e.value) && this.raise(e.start, "An export name cannot include a lone surrogate."), e; + } + return this.parseIdent(!0); + }; + d.adaptDirectivePrologue = function(e) { + for (var t = 0; t < e.length && this.isDirectiveCandidate(e[t]); ++t) e[t].directive = e[t].expression.raw.slice(1, -1); + }; + d.isDirectiveCandidate = function(e) { + return this.options.ecmaVersion >= 5 && e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && (this.input[e.start] === "\"" || this.input[e.start] === "'"); + }; + D = A.prototype; + D.toAssignable = function(e, t, i) { + if (this.options.ecmaVersion >= 6 && e) switch (e.type) { + case "Identifier": + this.inAsync && e.name === "await" && this.raise(e.start, "Cannot use 'await' as identifier inside an async function"); + break; + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": break; + case "ObjectExpression": + e.type = "ObjectPattern", i && this.checkPatternErrors(i, !0); + for (var s = 0, r = e.properties; s < r.length; s += 1) { + var o = r[s]; + this.toAssignable(o, t), o.type === "RestElement" && (o.argument.type === "ArrayPattern" || o.argument.type === "ObjectPattern") && this.raise(o.argument.start, "Unexpected token"); + } + break; + case "Property": + e.kind !== "init" && this.raise(e.key.start, "Object pattern can't contain getter or setter"), this.toAssignable(e.value, t); + break; + case "ArrayExpression": + e.type = "ArrayPattern", i && this.checkPatternErrors(i, !0), this.toAssignableList(e.elements, t); + break; + case "SpreadElement": + e.type = "RestElement", this.toAssignable(e.argument, t), e.argument.type === "AssignmentPattern" && this.raise(e.argument.start, "Rest elements cannot have a default value"); + break; + case "AssignmentExpression": + e.operator !== "=" && this.raise(e.left.end, "Only '=' operator can be used for specifying default value."), e.type = "AssignmentPattern", delete e.operator, this.toAssignable(e.left, t); + break; + case "ParenthesizedExpression": + this.toAssignable(e.expression, t, i); + break; + case "ChainExpression": + this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side"); + break; + case "MemberExpression": if (!t) break; + default: this.raise(e.start, "Assigning to rvalue"); + } + else i && this.checkPatternErrors(i, !0); + return e; + }; + D.toAssignableList = function(e, t) { + for (var i = e.length, s = 0; s < i; s++) { + var r = e[s]; + r && this.toAssignable(r, t); + } + if (i) { + var o = e[i - 1]; + this.options.ecmaVersion === 6 && t && o && o.type === "RestElement" && o.argument.type !== "Identifier" && this.unexpected(o.argument.start); + } + return e; + }; + D.parseSpread = function(e) { + var t = this.startNode(); + return this.next(), t.argument = this.parseMaybeAssign(!1, e), this.finishNode(t, "SpreadElement"); + }; + D.parseRestBinding = function() { + var e = this.startNode(); + return this.next(), this.options.ecmaVersion === 6 && this.type !== a.name && this.unexpected(), e.argument = this.parseBindingAtom(), this.finishNode(e, "RestElement"); + }; + D.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) switch (this.type) { + case a.bracketL: + var e = this.startNode(); + return this.next(), e.elements = this.parseBindingList(a.bracketR, !0, !0), this.finishNode(e, "ArrayPattern"); + case a.braceL: return this.parseObj(!0); + } + return this.parseIdent(); + }; + D.parseBindingList = function(e, t, i, s) { + for (var r = [], o = !0; !this.eat(e);) if (o ? o = !1 : this.expect(a.comma), t && this.type === a.comma) r.push(null); + else { + if (i && this.afterTrailingComma(e)) break; + if (this.type === a.ellipsis) { + var u = this.parseRestBinding(); + this.parseBindingListItem(u), r.push(u), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.expect(e); + break; + } else r.push(this.parseAssignableListItem(s)); + } + return r; + }; + D.parseAssignableListItem = function(e) { + var t = this.parseMaybeDefault(this.start, this.startLoc); + return this.parseBindingListItem(t), t; + }; + D.parseBindingListItem = function(e) { + return e; + }; + D.parseMaybeDefault = function(e, t, i) { + if (i = i || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(a.eq)) return i; + var s = this.startNodeAt(e, t); + return s.left = i, s.right = this.parseMaybeAssign(), this.finishNode(s, "AssignmentPattern"); + }; + D.checkLValSimple = function(e, t, i) { + t === void 0 && (t = xe); + var s = t !== xe; + switch (e.type) { + case "Identifier": + this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (s ? "Binding " : "Assigning to ") + e.name + " in strict mode"), s && (t === K && e.name === "let" && this.raiseRecoverable(e.start, "let is disallowed as a lexically bound name"), i && ($(i, e.name) && this.raiseRecoverable(e.start, "Argument name clash"), i[e.name] = !0), t !== Et && this.declareName(e.name, t, e.start)); + break; + case "ChainExpression": + this.raiseRecoverable(e.start, "Optional chaining cannot appear in left-hand side"); + break; + case "MemberExpression": + s && this.raiseRecoverable(e.start, "Binding member expression"); + break; + case "ParenthesizedExpression": return s && this.raiseRecoverable(e.start, "Binding parenthesized expression"), this.checkLValSimple(e.expression, t, i); + default: this.raise(e.start, (s ? "Binding" : "Assigning to") + " rvalue"); + } + }; + D.checkLValPattern = function(e, t, i) { + switch (t === void 0 && (t = xe), e.type) { + case "ObjectPattern": + for (var s = 0, r = e.properties; s < r.length; s += 1) { + var o = r[s]; + this.checkLValInnerPattern(o, t, i); + } + break; + case "ArrayPattern": + for (var u = 0, p = e.elements; u < p.length; u += 1) { + var h = p[u]; + h && this.checkLValInnerPattern(h, t, i); + } + break; + default: this.checkLValSimple(e, t, i); + } + }; + D.checkLValInnerPattern = function(e, t, i) { + switch (t === void 0 && (t = xe), e.type) { + case "Property": + this.checkLValInnerPattern(e.value, t, i); + break; + case "AssignmentPattern": + this.checkLValPattern(e.left, t, i); + break; + case "RestElement": + this.checkLValPattern(e.argument, t, i); + break; + default: this.checkLValPattern(e, t, i); + } + }; + F = function(t, i, s, r, o) { + this.token = t, this.isExpr = !!i, this.preserveSpace = !!s, this.override = r, this.generator = !!o; + }, T = { + b_stat: new F("{", !1), + b_expr: new F("{", !0), + b_tmpl: new F("${", !1), + p_stat: new F("(", !1), + p_expr: new F("(", !0), + q_tmpl: new F("`", !0, !0, function(e) { + return e.tryReadTemplateToken(); + }), + f_stat: new F("function", !1), + f_expr: new F("function", !0), + f_expr_gen: new F("function", !0, !1, null, !0), + f_gen: new F("function", !1, !1, null, !0) + }, ee = A.prototype; + ee.initialContext = function() { + return [T.b_stat]; + }; + ee.curContext = function() { + return this.context[this.context.length - 1]; + }; + ee.braceIsBlock = function(e) { + var t = this.curContext(); + return t === T.f_expr || t === T.f_stat ? !0 : e === a.colon && (t === T.b_stat || t === T.b_expr) ? !t.isExpr : e === a._return || e === a.name && this.exprAllowed ? L.test(this.input.slice(this.lastTokEnd, this.start)) : e === a._else || e === a.semi || e === a.eof || e === a.parenR || e === a.arrow ? !0 : e === a.braceL ? t === T.b_stat : e === a._var || e === a._const || e === a.name ? !1 : !this.exprAllowed; + }; + ee.inGeneratorContext = function() { + for (var e = this.context.length - 1; e >= 1; e--) { + var t = this.context[e]; + if (t.token === "function") return t.generator; + } + return !1; + }; + ee.updateContext = function(e) { + var t, i = this.type; + i.keyword && e === a.dot ? this.exprAllowed = !1 : (t = i.updateContext) ? t.call(this, e) : this.exprAllowed = i.beforeExpr; + }; + ee.overrideContext = function(e) { + this.curContext() !== e && (this.context[this.context.length - 1] = e); + }; + a.parenR.updateContext = a.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = !0; + return; + } + var e = this.context.pop(); + e === T.b_stat && this.curContext().token === "function" && (e = this.context.pop()), this.exprAllowed = !e.isExpr; + }; + a.braceL.updateContext = function(e) { + this.context.push(this.braceIsBlock(e) ? T.b_stat : T.b_expr), this.exprAllowed = !0; + }; + a.dollarBraceL.updateContext = function() { + this.context.push(T.b_tmpl), this.exprAllowed = !0; + }; + a.parenL.updateContext = function(e) { + var t = e === a._if || e === a._for || e === a._with || e === a._while; + this.context.push(t ? T.p_stat : T.p_expr), this.exprAllowed = !0; + }; + a.incDec.updateContext = function() {}; + a._function.updateContext = a._class.updateContext = function(e) { + e.beforeExpr && e !== a._else && !(e === a.semi && this.curContext() !== T.p_stat) && !(e === a._return && L.test(this.input.slice(this.lastTokEnd, this.start))) && !((e === a.colon || e === a.braceL) && this.curContext() === T.b_stat) ? this.context.push(T.f_expr) : this.context.push(T.f_stat), this.exprAllowed = !1; + }; + a.colon.updateContext = function() { + this.curContext().token === "function" && this.context.pop(), this.exprAllowed = !0; + }; + a.backQuote.updateContext = function() { + this.curContext() === T.q_tmpl ? this.context.pop() : this.context.push(T.q_tmpl), this.exprAllowed = !1; + }; + a.star.updateContext = function(e) { + if (e === a._function) { + var t = this.context.length - 1; + this.context[t] === T.f_expr ? this.context[t] = T.f_expr_gen : this.context[t] = T.f_gen; + } + this.exprAllowed = !0; + }; + a.name.updateContext = function(e) { + var t = !1; + this.options.ecmaVersion >= 6 && e !== a.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (t = !0), this.exprAllowed = t; + }; + g = A.prototype; + g.checkPropClash = function(e, t, i) { + if (!(this.options.ecmaVersion >= 9 && e.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) { + var s = e.key, r; + switch (s.type) { + case "Identifier": + r = s.name; + break; + case "Literal": + r = String(s.value); + break; + default: return; + } + var o = e.kind; + if (this.options.ecmaVersion >= 6) { + r === "__proto__" && o === "init" && (t.proto && (i ? i.doubleProto < 0 && (i.doubleProto = s.start) : this.raiseRecoverable(s.start, "Redefinition of __proto__ property")), t.proto = !0); + return; + } + r = "$" + r; + var u = t[r]; + if (u) { + var p; + o === "init" ? p = this.strict && u.init || u.get || u.set : p = u.init || u[o], p && this.raiseRecoverable(s.start, "Redefinition of property"); + } else u = t[r] = { + init: !1, + get: !1, + set: !1 + }; + u[o] = !0; + } + }; + g.parseExpression = function(e, t) { + var i = this.start, s = this.startLoc, r = this.parseMaybeAssign(e, t); + if (this.type === a.comma) { + var o = this.startNodeAt(i, s); + for (o.expressions = [r]; this.eat(a.comma);) o.expressions.push(this.parseMaybeAssign(e, t)); + return this.finishNode(o, "SequenceExpression"); + } + return r; + }; + g.parseMaybeAssign = function(e, t, i) { + if (this.isContextual("yield")) { + if (this.inGenerator) return this.parseYield(e); + this.exprAllowed = !1; + } + var s = !1, r = -1, o = -1, u = -1; + t ? (r = t.parenthesizedAssign, o = t.trailingComma, u = t.doubleProto, t.parenthesizedAssign = t.trailingComma = -1) : (t = new Ce(), s = !0); + var p = this.start, h = this.startLoc; + (this.type === a.parenL || this.type === a.name) && (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = e === "await"); + var l = this.parseMaybeConditional(e, t); + if (i && (l = i.call(this, l, p, h)), this.type.isAssign) { + var m = this.startNodeAt(p, h); + return m.operator = this.value, this.type === a.eq && (l = this.toAssignable(l, !1, t)), s || (t.parenthesizedAssign = t.trailingComma = t.doubleProto = -1), t.shorthandAssign >= l.start && (t.shorthandAssign = -1), this.type === a.eq ? this.checkLValPattern(l) : this.checkLValSimple(l), m.left = l, this.next(), m.right = this.parseMaybeAssign(e), u > -1 && (t.doubleProto = u), this.finishNode(m, "AssignmentExpression"); + } else s && this.checkExpressionErrors(t, !0); + return r > -1 && (t.parenthesizedAssign = r), o > -1 && (t.trailingComma = o), l; + }; + g.parseMaybeConditional = function(e, t) { + var i = this.start, s = this.startLoc, r = this.parseExprOps(e, t); + if (this.checkExpressionErrors(t)) return r; + if (this.eat(a.question)) { + var o = this.startNodeAt(i, s); + return o.test = r, o.consequent = this.parseMaybeAssign(), this.expect(a.colon), o.alternate = this.parseMaybeAssign(e), this.finishNode(o, "ConditionalExpression"); + } + return r; + }; + g.parseExprOps = function(e, t) { + var i = this.start, s = this.startLoc, r = this.parseMaybeUnary(t, !1, !1, e); + return this.checkExpressionErrors(t) || r.start === i && r.type === "ArrowFunctionExpression" ? r : this.parseExprOp(r, i, s, -1, e); + }; + g.parseExprOp = function(e, t, i, s, r) { + var o = this.type.binop; + if (o != null && (!r || this.type !== a._in) && o > s) { + var u = this.type === a.logicalOR || this.type === a.logicalAND, p = this.type === a.coalesce; + p && (o = a.logicalAND.binop); + var h = this.value; + this.next(); + var l = this.start, m = this.startLoc, S = this.parseExprOp(this.parseMaybeUnary(null, !1, !1, r), l, m, o, r), E = this.buildBinary(t, i, e, S, h, u || p); + return (u && this.type === a.coalesce || p && (this.type === a.logicalOR || this.type === a.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(E, t, i, s, r); + } + return e; + }; + g.buildBinary = function(e, t, i, s, r, o) { + s.type === "PrivateIdentifier" && this.raise(s.start, "Private identifier can only be left side of binary expression"); + var u = this.startNodeAt(e, t); + return u.left = i, u.operator = r, u.right = s, this.finishNode(u, o ? "LogicalExpression" : "BinaryExpression"); + }; + g.parseMaybeUnary = function(e, t, i, s) { + var r = this.start, o = this.startLoc, u; + if (this.isContextual("await") && this.canAwait) u = this.parseAwait(s), t = !0; + else if (this.type.prefix) { + var p = this.startNode(), h = this.type === a.incDec; + p.operator = this.value, p.prefix = !0, this.next(), p.argument = this.parseMaybeUnary(null, !0, h, s), this.checkExpressionErrors(e, !0), h ? this.checkLValSimple(p.argument) : this.strict && p.operator === "delete" && kt(p.argument) ? this.raiseRecoverable(p.start, "Deleting local variable in strict mode") : p.operator === "delete" && qe(p.argument) ? this.raiseRecoverable(p.start, "Private fields can not be deleted") : t = !0, u = this.finishNode(p, h ? "UpdateExpression" : "UnaryExpression"); + } else if (!t && this.type === a.privateId) (s || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), u = this.parsePrivateIdent(), this.type !== a._in && this.unexpected(); + else { + if (u = this.parseExprSubscripts(e, s), this.checkExpressionErrors(e)) return u; + for (; this.type.postfix && !this.canInsertSemicolon();) { + var l = this.startNodeAt(r, o); + l.operator = this.value, l.prefix = !1, l.argument = u, this.checkLValSimple(u), this.next(), u = this.finishNode(l, "UpdateExpression"); + } + } + if (!i && this.eat(a.starstar)) if (t) this.unexpected(this.lastTokStart); + else return this.buildBinary(r, o, u, this.parseMaybeUnary(null, !1, !1, s), "**", !1); + else return u; + }; + g.parseExprSubscripts = function(e, t) { + var i = this.start, s = this.startLoc, r = this.parseExprAtom(e, t); + if (r.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") return r; + var o = this.parseSubscripts(r, i, s, !1, t); + return e && o.type === "MemberExpression" && (e.parenthesizedAssign >= o.start && (e.parenthesizedAssign = -1), e.parenthesizedBind >= o.start && (e.parenthesizedBind = -1), e.trailingComma >= o.start && (e.trailingComma = -1)), o; + }; + g.parseSubscripts = function(e, t, i, s, r) { + for (var o = this.options.ecmaVersion >= 8 && e.type === "Identifier" && e.name === "async" && this.lastTokEnd === e.end && !this.canInsertSemicolon() && e.end - e.start === 5 && this.potentialArrowAt === e.start, u = !1;;) { + var p = this.parseSubscript(e, t, i, s, o, u, r); + if (p.optional && (u = !0), p === e || p.type === "ArrowFunctionExpression") { + if (u) { + var h = this.startNodeAt(t, i); + h.expression = p, p = this.finishNode(h, "ChainExpression"); + } + return p; + } + e = p; + } + }; + g.shouldParseAsyncArrow = function() { + return !this.canInsertSemicolon() && this.eat(a.arrow); + }; + g.parseSubscriptAsyncArrow = function(e, t, i, s) { + return this.parseArrowExpression(this.startNodeAt(e, t), i, !0, s); + }; + g.parseSubscript = function(e, t, i, s, r, o, u) { + var p = this.options.ecmaVersion >= 11, h = p && this.eat(a.questionDot); + s && h && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); + var l = this.eat(a.bracketL); + if (l || h && this.type !== a.parenL && this.type !== a.backQuote || this.eat(a.dot)) { + var m = this.startNodeAt(t, i); + m.object = e, l ? (m.property = this.parseExpression(), this.expect(a.bracketR)) : this.type === a.privateId && e.type !== "Super" ? m.property = this.parsePrivateIdent() : m.property = this.parseIdent(this.options.allowReserved !== "never"), m.computed = !!l, p && (m.optional = h), e = this.finishNode(m, "MemberExpression"); + } else if (!s && this.eat(a.parenL)) { + var S = new Ce(), E = this.yieldPos, c = this.awaitPos, x = this.awaitIdentPos; + this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0; + var y = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1, S); + if (r && !h && this.shouldParseAsyncArrow()) return this.checkPatternErrors(S, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = E, this.awaitPos = c, this.awaitIdentPos = x, this.parseSubscriptAsyncArrow(t, i, y, u); + this.checkExpressionErrors(S, !0), this.yieldPos = E || this.yieldPos, this.awaitPos = c || this.awaitPos, this.awaitIdentPos = x || this.awaitIdentPos; + var v = this.startNodeAt(t, i); + v.callee = e, v.arguments = y, p && (v.optional = h), e = this.finishNode(v, "CallExpression"); + } else if (this.type === a.backQuote) { + (h || o) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + var I = this.startNodeAt(t, i); + I.tag = e, I.quasi = this.parseTemplate({ isTagged: !0 }), e = this.finishNode(I, "TaggedTemplateExpression"); + } + return e; + }; + g.parseExprAtom = function(e, t, i) { + this.type === a.slash && this.readRegexp(); + var s, r = this.potentialArrowAt === this.start; + switch (this.type) { + case a._super: return this.allowSuper || this.raise(this.start, "'super' keyword outside a method"), s = this.startNode(), this.next(), this.type === a.parenL && !this.allowDirectSuper && this.raise(s.start, "super() call outside constructor of a subclass"), this.type !== a.dot && this.type !== a.bracketL && this.type !== a.parenL && this.unexpected(), this.finishNode(s, "Super"); + case a._this: return s = this.startNode(), this.next(), this.finishNode(s, "ThisExpression"); + case a.name: + var o = this.start, u = this.startLoc, p = this.containsEsc, h = this.parseIdent(!1); + if (this.options.ecmaVersion >= 8 && !p && h.name === "async" && !this.canInsertSemicolon() && this.eat(a._function)) return this.overrideContext(T.f_expr), this.parseFunction(this.startNodeAt(o, u), 0, !1, !0, t); + if (r && !this.canInsertSemicolon()) { + if (this.eat(a.arrow)) return this.parseArrowExpression(this.startNodeAt(o, u), [h], !1, t); + if (this.options.ecmaVersion >= 8 && h.name === "async" && this.type === a.name && !p && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) return h = this.parseIdent(!1), (this.canInsertSemicolon() || !this.eat(a.arrow)) && this.unexpected(), this.parseArrowExpression(this.startNodeAt(o, u), [h], !0, t); + } + return h; + case a.regexp: + var l = this.value; + return s = this.parseLiteral(l.value), s.regex = { + pattern: l.pattern, + flags: l.flags + }, s; + case a.num: + case a.string: return this.parseLiteral(this.value); + case a._null: + case a._true: + case a._false: return s = this.startNode(), s.value = this.type === a._null ? null : this.type === a._true, s.raw = this.type.keyword, this.next(), this.finishNode(s, "Literal"); + case a.parenL: + var m = this.start, S = this.parseParenAndDistinguishExpression(r, t); + return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(S) && (e.parenthesizedAssign = m), e.parenthesizedBind < 0 && (e.parenthesizedBind = m)), S; + case a.bracketL: return s = this.startNode(), this.next(), s.elements = this.parseExprList(a.bracketR, !0, !0, e), this.finishNode(s, "ArrayExpression"); + case a.braceL: return this.overrideContext(T.b_expr), this.parseObj(!1, e); + case a._function: return s = this.startNode(), this.next(), this.parseFunction(s, 0); + case a._class: return this.parseClass(this.startNode(), !1); + case a._new: return this.parseNew(); + case a.backQuote: return this.parseTemplate(); + case a._import: return this.options.ecmaVersion >= 11 ? this.parseExprImport(i) : this.unexpected(); + default: return this.parseExprAtomDefault(); + } + }; + g.parseExprAtomDefault = function() { + this.unexpected(); + }; + g.parseExprImport = function(e) { + var t = this.startNode(); + if (this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword import"), this.next(), this.type === a.parenL && !e) return this.parseDynamicImport(t); + if (this.type === a.dot) { + var i = this.startNodeAt(t.start, t.loc && t.loc.start); + return i.name = "import", t.meta = this.finishNode(i, "Identifier"), this.parseImportMeta(t); + } else this.unexpected(); + }; + g.parseDynamicImport = function(e) { + if (this.next(), e.source = this.parseMaybeAssign(), this.options.ecmaVersion >= 16) this.eat(a.parenR) ? e.options = null : (this.expect(a.comma), this.afterTrailingComma(a.parenR) ? e.options = null : (e.options = this.parseMaybeAssign(), this.eat(a.parenR) || (this.expect(a.comma), this.afterTrailingComma(a.parenR) || this.unexpected()))); + else if (!this.eat(a.parenR)) { + var t = this.start; + this.eat(a.comma) && this.eat(a.parenR) ? this.raiseRecoverable(t, "Trailing comma is not allowed in import()") : this.unexpected(t); + } + return this.finishNode(e, "ImportExpression"); + }; + g.parseImportMeta = function(e) { + this.next(); + var t = this.containsEsc; + return e.property = this.parseIdent(!0), e.property.name !== "meta" && this.raiseRecoverable(e.property.start, "The only valid meta property for import is 'import.meta'"), t && this.raiseRecoverable(e.start, "'import.meta' must not contain escaped characters"), this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere && this.raiseRecoverable(e.start, "Cannot use 'import.meta' outside a module"), this.finishNode(e, "MetaProperty"); + }; + g.parseLiteral = function(e) { + var t = this.startNode(); + return t.value = e, t.raw = this.input.slice(this.start, this.end), t.raw.charCodeAt(t.raw.length - 1) === 110 && (t.bigint = t.value != null ? t.value.toString() : t.raw.slice(0, -1).replace(/_/g, "")), this.next(), this.finishNode(t, "Literal"); + }; + g.parseParenExpression = function() { + this.expect(a.parenL); + var e = this.parseExpression(); + return this.expect(a.parenR), e; + }; + g.shouldParseArrow = function(e) { + return !this.canInsertSemicolon(); + }; + g.parseParenAndDistinguishExpression = function(e, t) { + var i = this.start, s = this.startLoc, r, o = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + var u = this.start, p = this.startLoc, h = [], l = !0, m = !1, S = new Ce(), E = this.yieldPos, c = this.awaitPos, x; + for (this.yieldPos = 0, this.awaitPos = 0; this.type !== a.parenR;) if (l ? l = !1 : this.expect(a.comma), o && this.afterTrailingComma(a.parenR, !0)) { + m = !0; + break; + } else if (this.type === a.ellipsis) { + x = this.start, h.push(this.parseParenItem(this.parseRestBinding())), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + break; + } else h.push(this.parseMaybeAssign(!1, S, this.parseParenItem)); + var y = this.lastTokEnd, v = this.lastTokEndLoc; + if (this.expect(a.parenR), e && this.shouldParseArrow(h) && this.eat(a.arrow)) return this.checkPatternErrors(S, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = E, this.awaitPos = c, this.parseParenArrowList(i, s, h, t); + (!h.length || m) && this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(S, !0), this.yieldPos = E || this.yieldPos, this.awaitPos = c || this.awaitPos, h.length > 1 ? (r = this.startNodeAt(u, p), r.expressions = h, this.finishNodeAt(r, "SequenceExpression", y, v)) : r = h[0]; + } else r = this.parseParenExpression(); + if (this.options.preserveParens) { + var I = this.startNodeAt(i, s); + return I.expression = r, this.finishNode(I, "ParenthesizedExpression"); + } else return r; + }; + g.parseParenItem = function(e) { + return e; + }; + g.parseParenArrowList = function(e, t, i, s) { + return this.parseArrowExpression(this.startNodeAt(e, t), i, !1, s); + }; + Zi = []; + g.parseNew = function() { + this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword new"); + var e = this.startNode(); + if (this.next(), this.options.ecmaVersion >= 6 && this.type === a.dot) { + var t = this.startNodeAt(e.start, e.loc && e.loc.start); + t.name = "new", e.meta = this.finishNode(t, "Identifier"), this.next(); + var i = this.containsEsc; + return e.property = this.parseIdent(!0), e.property.name !== "target" && this.raiseRecoverable(e.property.start, "The only valid meta property for new is 'new.target'"), i && this.raiseRecoverable(e.start, "'new.target' must not contain escaped characters"), this.allowNewDotTarget || this.raiseRecoverable(e.start, "'new.target' can only be used in functions and class static block"), this.finishNode(e, "MetaProperty"); + } + var s = this.start, r = this.startLoc; + return e.callee = this.parseSubscripts(this.parseExprAtom(null, !1, !0), s, r, !0, !1), this.eat(a.parenL) ? e.arguments = this.parseExprList(a.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = Zi, this.finishNode(e, "NewExpression"); + }; + g.parseTemplateElement = function(e) { + var t = e.isTagged, i = this.startNode(); + return this.type === a.invalidTemplate ? (t || this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"), i.value = { + raw: this.value.replace(/\r\n?/g, ` +`), + cooked: null + }) : i.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, ` +`), + cooked: this.value + }, this.next(), i.tail = this.type === a.backQuote, this.finishNode(i, "TemplateElement"); + }; + g.parseTemplate = function(e) { + e === void 0 && (e = {}); + var t = e.isTagged; + t === void 0 && (t = !1); + var i = this.startNode(); + this.next(), i.expressions = []; + var s = this.parseTemplateElement({ isTagged: t }); + for (i.quasis = [s]; !s.tail;) this.type === a.eof && this.raise(this.pos, "Unterminated template literal"), this.expect(a.dollarBraceL), i.expressions.push(this.parseExpression()), this.expect(a.braceR), i.quasis.push(s = this.parseTemplateElement({ isTagged: t })); + return this.next(), this.finishNode(i, "TemplateLiteral"); + }; + g.isAsyncProp = function(e) { + return !e.computed && e.key.type === "Identifier" && e.key.name === "async" && (this.type === a.name || this.type === a.num || this.type === a.string || this.type === a.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === a.star) && !L.test(this.input.slice(this.lastTokEnd, this.start)); + }; + g.parseObj = function(e, t) { + var i = this.startNode(), s = !0, r = {}; + for (i.properties = [], this.next(); !this.eat(a.braceR);) { + if (s) s = !1; + else if (this.expect(a.comma), this.options.ecmaVersion >= 5 && this.afterTrailingComma(a.braceR)) break; + var o = this.parseProperty(e, t); + e || this.checkPropClash(o, r, t), i.properties.push(o); + } + return this.finishNode(i, e ? "ObjectPattern" : "ObjectExpression"); + }; + g.parseProperty = function(e, t) { + var i = this.startNode(), s, r, o, u; + if (this.options.ecmaVersion >= 9 && this.eat(a.ellipsis)) return e ? (i.argument = this.parseIdent(!1), this.type === a.comma && this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"), this.finishNode(i, "RestElement")) : (i.argument = this.parseMaybeAssign(!1, t), this.type === a.comma && t && t.trailingComma < 0 && (t.trailingComma = this.start), this.finishNode(i, "SpreadElement")); + this.options.ecmaVersion >= 6 && (i.method = !1, i.shorthand = !1, (e || t) && (o = this.start, u = this.startLoc), e || (s = this.eat(a.star))); + var p = this.containsEsc; + return this.parsePropertyName(i), !e && !p && this.options.ecmaVersion >= 8 && !s && this.isAsyncProp(i) ? (r = !0, s = this.options.ecmaVersion >= 9 && this.eat(a.star), this.parsePropertyName(i)) : r = !1, this.parsePropertyValue(i, e, s, r, o, u, t, p), this.finishNode(i, "Property"); + }; + g.parseGetterSetter = function(e) { + var t = e.key.name; + this.parsePropertyName(e), e.value = this.parseMethod(!1), e.kind = t; + var i = e.kind === "get" ? 0 : 1; + if (e.value.params.length !== i) { + var s = e.value.start; + e.kind === "get" ? this.raiseRecoverable(s, "getter should have no params") : this.raiseRecoverable(s, "setter should have exactly one param"); + } else e.kind === "set" && e.value.params[0].type === "RestElement" && this.raiseRecoverable(e.value.params[0].start, "Setter cannot use rest params"); + }; + g.parsePropertyValue = function(e, t, i, s, r, o, u, p) { + (i || s) && this.type === a.colon && this.unexpected(), this.eat(a.colon) ? (e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, u), e.kind = "init") : this.options.ecmaVersion >= 6 && this.type === a.parenL ? (t && this.unexpected(), e.method = !0, e.value = this.parseMethod(i, s), e.kind = "init") : !t && !p && this.options.ecmaVersion >= 5 && !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.type !== a.comma && this.type !== a.braceR && this.type !== a.eq ? ((i || s) && this.unexpected(), this.parseGetterSetter(e)) : this.options.ecmaVersion >= 6 && !e.computed && e.key.type === "Identifier" ? ((i || s) && this.unexpected(), this.checkUnreserved(e.key), e.key.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = r), t ? e.value = this.parseMaybeDefault(r, o, this.copyNode(e.key)) : this.type === a.eq && u ? (u.shorthandAssign < 0 && (u.shorthandAssign = this.start), e.value = this.parseMaybeDefault(r, o, this.copyNode(e.key))) : e.value = this.copyNode(e.key), e.kind = "init", e.shorthand = !0) : this.unexpected(); + }; + g.parsePropertyName = function(e) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(a.bracketL)) return e.computed = !0, e.key = this.parseMaybeAssign(), this.expect(a.bracketR), e.key; + e.computed = !1; + } + return e.key = this.type === a.num || this.type === a.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); + }; + g.initFunction = function(e) { + e.id = null, this.options.ecmaVersion >= 6 && (e.generator = e.expression = !1), this.options.ecmaVersion >= 8 && (e.async = !1); + }; + g.parseMethod = function(e, t, i) { + var s = this.startNode(), r = this.yieldPos, o = this.awaitPos, u = this.awaitIdentPos; + return this.initFunction(s), this.options.ecmaVersion >= 6 && (s.generator = e), this.options.ecmaVersion >= 8 && (s.async = !!t), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Xe(t, s.generator) | Se | (i ? _t : 0)), this.expect(a.parenL), s.params = this.parseBindingList(a.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(s, !1, !0, !1), this.yieldPos = r, this.awaitPos = o, this.awaitIdentPos = u, this.finishNode(s, "FunctionExpression"); + }; + g.parseArrowExpression = function(e, t, i, s) { + var r = this.yieldPos, o = this.awaitPos, u = this.awaitIdentPos; + return this.enterScope(Xe(i, !1) | He), this.initFunction(e), this.options.ecmaVersion >= 8 && (e.async = !!i), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, e.params = this.toAssignableList(t, !0), this.parseFunctionBody(e, !0, !1, s), this.yieldPos = r, this.awaitPos = o, this.awaitIdentPos = u, this.finishNode(e, "ArrowFunctionExpression"); + }; + g.parseFunctionBody = function(e, t, i, s) { + var r = t && this.type !== a.braceL, o = this.strict, u = !1; + if (r) e.body = this.parseMaybeAssign(s), e.expression = !0, this.checkParams(e, !1); + else { + var p = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params); + (!o || p) && (u = this.strictDirective(this.end), u && p && this.raiseRecoverable(e.start, "Illegal 'use strict' directive in function with non-simple parameter list")); + var h = this.labels; + this.labels = [], u && (this.strict = !0), this.checkParams(e, !o && !u && !t && !i && this.isSimpleParamList(e.params)), this.strict && e.id && this.checkLValSimple(e.id, Et), e.body = this.parseBlock(!1, void 0, u && !o), e.expression = !1, this.adaptDirectivePrologue(e.body.body), this.labels = h; + } + this.exitScope(); + }; + g.isSimpleParamList = function(e) { + for (var t = 0, i = e; t < i.length; t += 1) if (i[t].type !== "Identifier") return !1; + return !0; + }; + g.checkParams = function(e, t) { + for (var i = Object.create(null), s = 0, r = e.params; s < r.length; s += 1) { + var o = r[s]; + this.checkLValInnerPattern(o, We, t ? null : i); + } + }; + g.parseExprList = function(e, t, i, s) { + for (var r = [], o = !0; !this.eat(e);) { + if (o) o = !1; + else if (this.expect(a.comma), t && this.afterTrailingComma(e)) break; + var u = void 0; + i && this.type === a.comma ? u = null : this.type === a.ellipsis ? (u = this.parseSpread(s), s && this.type === a.comma && s.trailingComma < 0 && (s.trailingComma = this.start)) : u = this.parseMaybeAssign(!1, s), r.push(u); + } + return r; + }; + g.checkUnreserved = function(e) { + var t = e.start, i = e.end, s = e.name; + if (this.inGenerator && s === "yield" && this.raiseRecoverable(t, "Cannot use 'yield' as identifier inside a generator"), this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use 'await' as identifier inside an async function"), !(this.currentThisScope().flags & _e) && s === "arguments" && this.raiseRecoverable(t, "Cannot use 'arguments' in class field initializer"), this.inClassStaticBlock && (s === "arguments" || s === "await") && this.raise(t, "Cannot use " + s + " in class static initialization block"), this.keywords.test(s) && this.raise(t, "Unexpected keyword '" + s + "'"), !(this.options.ecmaVersion < 6 && this.input.slice(t, i).indexOf("\\") !== -1)) (this.strict ? this.reservedWordsStrict : this.reservedWords).test(s) && (!this.inAsync && s === "await" && this.raiseRecoverable(t, "Cannot use keyword 'await' outside an async function"), this.raiseRecoverable(t, "The keyword '" + s + "' is reserved")); + }; + g.parseIdent = function(e) { + var t = this.parseIdentNode(); + return this.next(!!e), this.finishNode(t, "Identifier"), e || (this.checkUnreserved(t), t.name === "await" && !this.awaitIdentPos && (this.awaitIdentPos = t.start)), t; + }; + g.parseIdentNode = function() { + var e = this.startNode(); + return this.type === a.name ? e.name = this.value : this.type.keyword ? (e.name = this.type.keyword, (e.name === "class" || e.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46) && this.context.pop(), this.type = a.name) : this.unexpected(), e; + }; + g.parsePrivateIdent = function() { + var e = this.startNode(); + return this.type === a.privateId ? e.name = this.value : this.unexpected(), this.next(), this.finishNode(e, "PrivateIdentifier"), this.options.checkPrivateFields && (this.privateNameStack.length === 0 ? this.raise(e.start, "Private field '#" + e.name + "' must be declared in an enclosing class") : this.privateNameStack[this.privateNameStack.length - 1].used.push(e)), e; + }; + g.parseYield = function(e) { + this.yieldPos || (this.yieldPos = this.start); + var t = this.startNode(); + return this.next(), this.type === a.semi || this.canInsertSemicolon() || this.type !== a.star && !this.type.startsExpr ? (t.delegate = !1, t.argument = null) : (t.delegate = this.eat(a.star), t.argument = this.parseMaybeAssign(e)), this.finishNode(t, "YieldExpression"); + }; + g.parseAwait = function(e) { + this.awaitPos || (this.awaitPos = this.start); + var t = this.startNode(); + return this.next(), t.argument = this.parseMaybeUnary(null, !0, !1, e), this.finishNode(t, "AwaitExpression"); + }; + ge = A.prototype; + ge.raise = function(e, t) { + var i = vt(this.input, e); + t += " (" + i.line + ":" + i.column + ")", this.sourceFile && (t += " in " + this.sourceFile); + var s = new SyntaxError(t); + throw s.pos = e, s.loc = i, s.raisedAt = this.pos, s; + }; + ge.raiseRecoverable = ge.raise; + ge.curPosition = function() { + if (this.options.locations) return new ne(this.curLine, this.pos - this.lineStart); + }; + W = A.prototype, es = function(t) { + this.flags = t, this.var = [], this.lexical = [], this.functions = []; + }; + W.enterScope = function(e) { + this.scopeStack.push(new es(e)); + }; + W.exitScope = function() { + this.scopeStack.pop(); + }; + W.treatFunctionsAsVarInScope = function(e) { + return e.flags & Z || !this.inModule && e.flags & oe; + }; + W.declareName = function(e, t, i) { + var s = !1; + if (t === K) { + var r = this.currentScope(); + s = r.lexical.indexOf(e) > -1 || r.functions.indexOf(e) > -1 || r.var.indexOf(e) > -1, r.lexical.push(e), this.inModule && r.flags & oe && delete this.undefinedExports[e]; + } else if (t === Tt) this.currentScope().lexical.push(e); + else if (t === Ct) { + var u = this.currentScope(); + this.treatFunctionsAsVar ? s = u.lexical.indexOf(e) > -1 : s = u.lexical.indexOf(e) > -1 || u.var.indexOf(e) > -1, u.functions.push(e); + } else for (var p = this.scopeStack.length - 1; p >= 0; --p) { + var h = this.scopeStack[p]; + if (h.lexical.indexOf(e) > -1 && !(h.flags & St && h.lexical[0] === e) || !this.treatFunctionsAsVarInScope(h) && h.functions.indexOf(e) > -1) { + s = !0; + break; + } + if (h.var.push(e), this.inModule && h.flags & oe && delete this.undefinedExports[e], h.flags & _e) break; + } + s && this.raiseRecoverable(i, "Identifier '" + e + "' has already been declared"); + }; + W.checkLocalExport = function(e) { + this.scopeStack[0].lexical.indexOf(e.name) === -1 && this.scopeStack[0].var.indexOf(e.name) === -1 && (this.undefinedExports[e.name] = e); + }; + W.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1]; + }; + W.currentVarScope = function() { + for (var e = this.scopeStack.length - 1;; e--) { + var t = this.scopeStack[e]; + if (t.flags & (_e | ue | z)) return t; + } + }; + W.currentThisScope = function() { + for (var e = this.scopeStack.length - 1;; e--) { + var t = this.scopeStack[e]; + if (t.flags & (_e | ue | z) && !(t.flags & He)) return t; + } + }; + Te = function(t, i, s) { + this.type = "", this.start = i, this.end = 0, t.options.locations && (this.loc = new be(t, s)), t.options.directSourceFile && (this.sourceFile = t.options.directSourceFile), t.options.ranges && (this.range = [i, 0]); + }, he = A.prototype; + he.startNode = function() { + return new Te(this, this.start, this.startLoc); + }; + he.startNodeAt = function(e, t) { + return new Te(this, e, t); + }; + he.finishNode = function(e, t) { + return wt.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc); + }; + he.finishNodeAt = function(e, t, i, s) { + return wt.call(this, e, t, i, s); + }; + he.copyNode = function(e) { + var t = new Te(this, e.start, this.startLoc); + for (var i in e) t[i] = e[i]; + return t; + }; + ts = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", Pt = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", It = Pt + " Extended_Pictographic", Nt = It, Lt = Nt + " EBase EComp EMod EPres ExtPict", Rt = Lt, ss = { + 9: Pt, + 10: It, + 11: Nt, + 12: Lt, + 13: Rt, + 14: Rt + }, as = { + 9: "", + 10: "", + 11: "", + 12: "", + 13: "", + 14: "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji" + }, lt = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Vt = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Ot = Vt + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", Bt = Ot + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Dt = Bt + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Mt = Dt + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", os = { + 9: Vt, + 10: Ot, + 11: Bt, + 12: Dt, + 13: Mt, + 14: Mt + " " + ts + }, Ft = {}; + for (me = 0, Fe = [ + 9, + 10, + 11, + 12, + 13, + 14 + ]; me < Fe.length; me += 1) ft = Fe[me], us(ft); + f = A.prototype, ve = function(t, i) { + this.parent = t, this.base = i || this; + }; + ve.prototype.separatedFrom = function(t) { + for (var i = this; i; i = i.parent) for (var s = t; s; s = s.parent) if (i.base === s.base && i !== s) return !0; + return !1; + }; + ve.prototype.sibling = function() { + return new ve(this.parent, this.base); + }; + G = function(t) { + this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Ft[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = Object.create(null), this.backReferenceNames = [], this.branchID = null; + }; + G.prototype.reset = function(t, i, s) { + var r = s.indexOf("v") !== -1, o = s.indexOf("u") !== -1; + this.start = t | 0, this.source = i + "", this.flags = s, r && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = o && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = o && this.parser.options.ecmaVersion >= 9); + }; + G.prototype.raise = function(t) { + this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t); + }; + G.prototype.at = function(t, i) { + i === void 0 && (i = !1); + var s = this.source, r = s.length; + if (t >= r) return -1; + var o = s.charCodeAt(t); + if (!(i || this.switchU) || o <= 55295 || o >= 57344 || t + 1 >= r) return o; + var u = s.charCodeAt(t + 1); + return u >= 56320 && u <= 57343 ? (o << 10) + u - 56613888 : o; + }; + G.prototype.nextIndex = function(t, i) { + i === void 0 && (i = !1); + var s = this.source, r = s.length; + if (t >= r) return r; + var o = s.charCodeAt(t), u; + return !(i || this.switchU) || o <= 55295 || o >= 57344 || t + 1 >= r || (u = s.charCodeAt(t + 1)) < 56320 || u > 57343 ? t + 1 : t + 2; + }; + G.prototype.current = function(t) { + return t === void 0 && (t = !1), this.at(this.pos, t); + }; + G.prototype.lookahead = function(t) { + return t === void 0 && (t = !1), this.at(this.nextIndex(this.pos, t), t); + }; + G.prototype.advance = function(t) { + t === void 0 && (t = !1), this.pos = this.nextIndex(this.pos, t); + }; + G.prototype.eat = function(t, i) { + return i === void 0 && (i = !1), this.current(i) === t ? (this.advance(i), !0) : !1; + }; + G.prototype.eatChars = function(t, i) { + i === void 0 && (i = !1); + for (var s = this.pos, r = 0, o = t; r < o.length; r += 1) { + var u = o[r], p = this.at(s, i); + if (p === -1 || p !== u) return !1; + s = this.nextIndex(s, i); + } + return this.pos = s, !0; + }; + f.validateRegExpFlags = function(e) { + for (var t = e.validFlags, i = e.flags, s = !1, r = !1, o = 0; o < i.length; o++) { + var u = i.charAt(o); + t.indexOf(u) === -1 && this.raise(e.start, "Invalid regular expression flag"), i.indexOf(u, o + 1) > -1 && this.raise(e.start, "Duplicate regular expression flag"), u === "u" && (s = !0), u === "v" && (r = !0); + } + this.options.ecmaVersion >= 15 && s && r && this.raise(e.start, "Invalid regular expression flag"); + }; + f.validateRegExpPattern = function(e) { + this.regexp_pattern(e), !e.switchN && this.options.ecmaVersion >= 9 && hs(e.groupNames) && (e.switchN = !0, this.regexp_pattern(e)); + }; + f.regexp_pattern = function(e) { + e.pos = 0, e.lastIntValue = 0, e.lastStringValue = "", e.lastAssertionIsQuantifiable = !1, e.numCapturingParens = 0, e.maxBackReference = 0, e.groupNames = Object.create(null), e.backReferenceNames.length = 0, e.branchID = null, this.regexp_disjunction(e), e.pos !== e.source.length && (e.eat(41) && e.raise("Unmatched ')'"), (e.eat(93) || e.eat(125)) && e.raise("Lone quantifier brackets")), e.maxBackReference > e.numCapturingParens && e.raise("Invalid escape"); + for (var t = 0, i = e.backReferenceNames; t < i.length; t += 1) { + var s = i[t]; + e.groupNames[s] || e.raise("Invalid named capture referenced"); + } + }; + f.regexp_disjunction = function(e) { + var t = this.options.ecmaVersion >= 16; + for (t && (e.branchID = new ve(e.branchID, null)), this.regexp_alternative(e); e.eat(124);) t && (e.branchID = e.branchID.sibling()), this.regexp_alternative(e); + t && (e.branchID = e.branchID.parent), this.regexp_eatQuantifier(e, !0) && e.raise("Nothing to repeat"), e.eat(123) && e.raise("Lone quantifier brackets"); + }; + f.regexp_alternative = function(e) { + for (; e.pos < e.source.length && this.regexp_eatTerm(e);); + }; + f.regexp_eatTerm = function(e) { + return this.regexp_eatAssertion(e) ? (e.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(e) && e.switchU && e.raise("Invalid quantifier"), !0) : (e.switchU ? this.regexp_eatAtom(e) : this.regexp_eatExtendedAtom(e)) ? (this.regexp_eatQuantifier(e), !0) : !1; + }; + f.regexp_eatAssertion = function(e) { + var t = e.pos; + if (e.lastAssertionIsQuantifiable = !1, e.eat(94) || e.eat(36)) return !0; + if (e.eat(92)) { + if (e.eat(66) || e.eat(98)) return !0; + e.pos = t; + } + if (e.eat(40) && e.eat(63)) { + var i = !1; + if (this.options.ecmaVersion >= 9 && (i = e.eat(60)), e.eat(61) || e.eat(33)) return this.regexp_disjunction(e), e.eat(41) || e.raise("Unterminated group"), e.lastAssertionIsQuantifiable = !i, !0; + } + return e.pos = t, !1; + }; + f.regexp_eatQuantifier = function(e, t) { + return t === void 0 && (t = !1), this.regexp_eatQuantifierPrefix(e, t) ? (e.eat(63), !0) : !1; + }; + f.regexp_eatQuantifierPrefix = function(e, t) { + return e.eat(42) || e.eat(43) || e.eat(63) || this.regexp_eatBracedQuantifier(e, t); + }; + f.regexp_eatBracedQuantifier = function(e, t) { + var i = e.pos; + if (e.eat(123)) { + var s = 0, r = -1; + if (this.regexp_eatDecimalDigits(e) && (s = e.lastIntValue, e.eat(44) && this.regexp_eatDecimalDigits(e) && (r = e.lastIntValue), e.eat(125))) return r !== -1 && r < s && !t && e.raise("numbers out of order in {} quantifier"), !0; + e.switchU && !t && e.raise("Incomplete quantifier"), e.pos = i; + } + return !1; + }; + f.regexp_eatAtom = function(e) { + return this.regexp_eatPatternCharacters(e) || e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e); + }; + f.regexp_eatReverseSolidusAtomEscape = function(e) { + var t = e.pos; + if (e.eat(92)) { + if (this.regexp_eatAtomEscape(e)) return !0; + e.pos = t; + } + return !1; + }; + f.regexp_eatUncapturingGroup = function(e) { + var t = e.pos; + if (e.eat(40)) { + if (e.eat(63)) { + if (this.options.ecmaVersion >= 16) { + var i = this.regexp_eatModifiers(e), s = e.eat(45); + if (i || s) { + for (var r = 0; r < i.length; r++) { + var o = i.charAt(r); + i.indexOf(o, r + 1) > -1 && e.raise("Duplicate regular expression modifiers"); + } + if (s) { + var u = this.regexp_eatModifiers(e); + !i && !u && e.current() === 58 && e.raise("Invalid regular expression modifiers"); + for (var p = 0; p < u.length; p++) { + var h = u.charAt(p); + (u.indexOf(h, p + 1) > -1 || i.indexOf(h) > -1) && e.raise("Duplicate regular expression modifiers"); + } + } + } + } + if (e.eat(58)) { + if (this.regexp_disjunction(e), e.eat(41)) return !0; + e.raise("Unterminated group"); + } + } + e.pos = t; + } + return !1; + }; + f.regexp_eatCapturingGroup = function(e) { + if (e.eat(40)) { + if (this.options.ecmaVersion >= 9 ? this.regexp_groupSpecifier(e) : e.current() === 63 && e.raise("Invalid group"), this.regexp_disjunction(e), e.eat(41)) return e.numCapturingParens += 1, !0; + e.raise("Unterminated group"); + } + return !1; + }; + f.regexp_eatModifiers = function(e) { + for (var t = "", i = 0; (i = e.current()) !== -1 && ps(i);) t += q(i), e.advance(); + return t; + }; + f.regexp_eatExtendedAtom = function(e) { + return e.eat(46) || this.regexp_eatReverseSolidusAtomEscape(e) || this.regexp_eatCharacterClass(e) || this.regexp_eatUncapturingGroup(e) || this.regexp_eatCapturingGroup(e) || this.regexp_eatInvalidBracedQuantifier(e) || this.regexp_eatExtendedPatternCharacter(e); + }; + f.regexp_eatInvalidBracedQuantifier = function(e) { + return this.regexp_eatBracedQuantifier(e, !0) && e.raise("Nothing to repeat"), !1; + }; + f.regexp_eatSyntaxCharacter = function(e) { + var t = e.current(); + return jt(t) ? (e.lastIntValue = t, e.advance(), !0) : !1; + }; + f.regexp_eatPatternCharacters = function(e) { + for (var t = e.pos, i = 0; (i = e.current()) !== -1 && !jt(i);) e.advance(); + return e.pos !== t; + }; + f.regexp_eatExtendedPatternCharacter = function(e) { + var t = e.current(); + return t !== -1 && t !== 36 && !(t >= 40 && t <= 43) && t !== 46 && t !== 63 && t !== 91 && t !== 94 && t !== 124 ? (e.advance(), !0) : !1; + }; + f.regexp_groupSpecifier = function(e) { + if (e.eat(63)) { + this.regexp_eatGroupName(e) || e.raise("Invalid group"); + var t = this.options.ecmaVersion >= 16, i = e.groupNames[e.lastStringValue]; + if (i) if (t) for (var s = 0, r = i; s < r.length; s += 1) r[s].separatedFrom(e.branchID) || e.raise("Duplicate capture group name"); + else e.raise("Duplicate capture group name"); + t ? (i || (e.groupNames[e.lastStringValue] = [])).push(e.branchID) : e.groupNames[e.lastStringValue] = !0; + } + }; + f.regexp_eatGroupName = function(e) { + if (e.lastStringValue = "", e.eat(60)) { + if (this.regexp_eatRegExpIdentifierName(e) && e.eat(62)) return !0; + e.raise("Invalid capture group name"); + } + return !1; + }; + f.regexp_eatRegExpIdentifierName = function(e) { + if (e.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(e)) { + for (e.lastStringValue += q(e.lastIntValue); this.regexp_eatRegExpIdentifierPart(e);) e.lastStringValue += q(e.lastIntValue); + return !0; + } + return !1; + }; + f.regexp_eatRegExpIdentifierStart = function(e) { + var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i); + return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), cs(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1); + }; + f.regexp_eatRegExpIdentifierPart = function(e) { + var t = e.pos, i = this.options.ecmaVersion >= 11, s = e.current(i); + return e.advance(i), s === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(e, i) && (s = e.lastIntValue), ls(s) ? (e.lastIntValue = s, !0) : (e.pos = t, !1); + }; + f.regexp_eatAtomEscape = function(e) { + return this.regexp_eatBackReference(e) || this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e) || e.switchN && this.regexp_eatKGroupName(e) ? !0 : (e.switchU && (e.current() === 99 && e.raise("Invalid unicode escape"), e.raise("Invalid escape")), !1); + }; + f.regexp_eatBackReference = function(e) { + var t = e.pos; + if (this.regexp_eatDecimalEscape(e)) { + var i = e.lastIntValue; + if (e.switchU) return i > e.maxBackReference && (e.maxBackReference = i), !0; + if (i <= e.numCapturingParens) return !0; + e.pos = t; + } + return !1; + }; + f.regexp_eatKGroupName = function(e) { + if (e.eat(107)) { + if (this.regexp_eatGroupName(e)) return e.backReferenceNames.push(e.lastStringValue), !0; + e.raise("Invalid named reference"); + } + return !1; + }; + f.regexp_eatCharacterEscape = function(e) { + return this.regexp_eatControlEscape(e) || this.regexp_eatCControlLetter(e) || this.regexp_eatZero(e) || this.regexp_eatHexEscapeSequence(e) || this.regexp_eatRegExpUnicodeEscapeSequence(e, !1) || !e.switchU && this.regexp_eatLegacyOctalEscapeSequence(e) || this.regexp_eatIdentityEscape(e); + }; + f.regexp_eatCControlLetter = function(e) { + var t = e.pos; + if (e.eat(99)) { + if (this.regexp_eatControlLetter(e)) return !0; + e.pos = t; + } + return !1; + }; + f.regexp_eatZero = function(e) { + return e.current() === 48 && !Ee(e.lookahead()) ? (e.lastIntValue = 0, e.advance(), !0) : !1; + }; + f.regexp_eatControlEscape = function(e) { + var t = e.current(); + return t === 116 ? (e.lastIntValue = 9, e.advance(), !0) : t === 110 ? (e.lastIntValue = 10, e.advance(), !0) : t === 118 ? (e.lastIntValue = 11, e.advance(), !0) : t === 102 ? (e.lastIntValue = 12, e.advance(), !0) : t === 114 ? (e.lastIntValue = 13, e.advance(), !0) : !1; + }; + f.regexp_eatControlLetter = function(e) { + var t = e.current(); + return Ut(t) ? (e.lastIntValue = t % 32, e.advance(), !0) : !1; + }; + f.regexp_eatRegExpUnicodeEscapeSequence = function(e, t) { + t === void 0 && (t = !1); + var i = e.pos, s = t || e.switchU; + if (e.eat(117)) { + if (this.regexp_eatFixedHexDigits(e, 4)) { + var r = e.lastIntValue; + if (s && r >= 55296 && r <= 56319) { + var o = e.pos; + if (e.eat(92) && e.eat(117) && this.regexp_eatFixedHexDigits(e, 4)) { + var u = e.lastIntValue; + if (u >= 56320 && u <= 57343) return e.lastIntValue = (r - 55296) * 1024 + (u - 56320) + 65536, !0; + } + e.pos = o, e.lastIntValue = r; + } + return !0; + } + if (s && e.eat(123) && this.regexp_eatHexDigits(e) && e.eat(125) && fs(e.lastIntValue)) return !0; + s && e.raise("Invalid unicode escape"), e.pos = i; + } + return !1; + }; + f.regexp_eatIdentityEscape = function(e) { + if (e.switchU) return this.regexp_eatSyntaxCharacter(e) ? !0 : e.eat(47) ? (e.lastIntValue = 47, !0) : !1; + var t = e.current(); + return t !== 99 && (!e.switchN || t !== 107) ? (e.lastIntValue = t, e.advance(), !0) : !1; + }; + f.regexp_eatDecimalEscape = function(e) { + e.lastIntValue = 0; + var t = e.current(); + if (t >= 49 && t <= 57) { + do + e.lastIntValue = 10 * e.lastIntValue + (t - 48), e.advance(); + while ((t = e.current()) >= 48 && t <= 57); + return !0; + } + return !1; + }; + Gt = 0, J = 1, B = 2; + f.regexp_eatCharacterClassEscape = function(e) { + var t = e.current(); + if (ds(t)) return e.lastIntValue = -1, e.advance(), J; + var i = !1; + if (e.switchU && this.options.ecmaVersion >= 9 && ((i = t === 80) || t === 112)) { + e.lastIntValue = -1, e.advance(); + var s; + if (e.eat(123) && (s = this.regexp_eatUnicodePropertyValueExpression(e)) && e.eat(125)) return i && s === B && e.raise("Invalid property name"), s; + e.raise("Invalid property name"); + } + return Gt; + }; + f.regexp_eatUnicodePropertyValueExpression = function(e) { + var t = e.pos; + if (this.regexp_eatUnicodePropertyName(e) && e.eat(61)) { + var i = e.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(e)) { + var s = e.lastStringValue; + return this.regexp_validateUnicodePropertyNameAndValue(e, i, s), J; + } + } + if (e.pos = t, this.regexp_eatLoneUnicodePropertyNameOrValue(e)) { + var r = e.lastStringValue; + return this.regexp_validateUnicodePropertyNameOrValue(e, r); + } + return Gt; + }; + f.regexp_validateUnicodePropertyNameAndValue = function(e, t, i) { + $(e.unicodeProperties.nonBinary, t) || e.raise("Invalid property name"), e.unicodeProperties.nonBinary[t].test(i) || e.raise("Invalid property value"); + }; + f.regexp_validateUnicodePropertyNameOrValue = function(e, t) { + if (e.unicodeProperties.binary.test(t)) return J; + if (e.switchV && e.unicodeProperties.binaryOfStrings.test(t)) return B; + e.raise("Invalid property name"); + }; + f.regexp_eatUnicodePropertyName = function(e) { + var t = 0; + for (e.lastStringValue = ""; qt(t = e.current());) e.lastStringValue += q(t), e.advance(); + return e.lastStringValue !== ""; + }; + f.regexp_eatUnicodePropertyValue = function(e) { + var t = 0; + for (e.lastStringValue = ""; ms(t = e.current());) e.lastStringValue += q(t), e.advance(); + return e.lastStringValue !== ""; + }; + f.regexp_eatLoneUnicodePropertyNameOrValue = function(e) { + return this.regexp_eatUnicodePropertyValue(e); + }; + f.regexp_eatCharacterClass = function(e) { + if (e.eat(91)) { + var t = e.eat(94), i = this.regexp_classContents(e); + return e.eat(93) || e.raise("Unterminated character class"), t && i === B && e.raise("Negated character class may contain strings"), !0; + } + return !1; + }; + f.regexp_classContents = function(e) { + return e.current() === 93 ? J : e.switchV ? this.regexp_classSetExpression(e) : (this.regexp_nonEmptyClassRanges(e), J); + }; + f.regexp_nonEmptyClassRanges = function(e) { + for (; this.regexp_eatClassAtom(e);) { + var t = e.lastIntValue; + if (e.eat(45) && this.regexp_eatClassAtom(e)) { + var i = e.lastIntValue; + e.switchU && (t === -1 || i === -1) && e.raise("Invalid character class"), t !== -1 && i !== -1 && t > i && e.raise("Range out of order in character class"); + } + } + }; + f.regexp_eatClassAtom = function(e) { + var t = e.pos; + if (e.eat(92)) { + if (this.regexp_eatClassEscape(e)) return !0; + if (e.switchU) { + var i = e.current(); + (i === 99 || Ht(i)) && e.raise("Invalid class escape"), e.raise("Invalid escape"); + } + e.pos = t; + } + var s = e.current(); + return s !== 93 ? (e.lastIntValue = s, e.advance(), !0) : !1; + }; + f.regexp_eatClassEscape = function(e) { + var t = e.pos; + if (e.eat(98)) return e.lastIntValue = 8, !0; + if (e.switchU && e.eat(45)) return e.lastIntValue = 45, !0; + if (!e.switchU && e.eat(99)) { + if (this.regexp_eatClassControlLetter(e)) return !0; + e.pos = t; + } + return this.regexp_eatCharacterClassEscape(e) || this.regexp_eatCharacterEscape(e); + }; + f.regexp_classSetExpression = function(e) { + var t = J, i; + if (!this.regexp_eatClassSetRange(e)) if (i = this.regexp_eatClassSetOperand(e)) { + i === B && (t = B); + for (var s = e.pos; e.eatChars([38, 38]);) { + if (e.current() !== 38 && (i = this.regexp_eatClassSetOperand(e))) { + i !== B && (t = J); + continue; + } + e.raise("Invalid character in character class"); + } + if (s !== e.pos) return t; + for (; e.eatChars([45, 45]);) this.regexp_eatClassSetOperand(e) || e.raise("Invalid character in character class"); + if (s !== e.pos) return t; + } else e.raise("Invalid character in character class"); + for (;;) if (!this.regexp_eatClassSetRange(e)) { + if (i = this.regexp_eatClassSetOperand(e), !i) return t; + i === B && (t = B); + } + }; + f.regexp_eatClassSetRange = function(e) { + var t = e.pos; + if (this.regexp_eatClassSetCharacter(e)) { + var i = e.lastIntValue; + if (e.eat(45) && this.regexp_eatClassSetCharacter(e)) { + var s = e.lastIntValue; + return i !== -1 && s !== -1 && i > s && e.raise("Range out of order in character class"), !0; + } + e.pos = t; + } + return !1; + }; + f.regexp_eatClassSetOperand = function(e) { + return this.regexp_eatClassSetCharacter(e) ? J : this.regexp_eatClassStringDisjunction(e) || this.regexp_eatNestedClass(e); + }; + f.regexp_eatNestedClass = function(e) { + var t = e.pos; + if (e.eat(91)) { + var i = e.eat(94), s = this.regexp_classContents(e); + if (e.eat(93)) return i && s === B && e.raise("Negated character class may contain strings"), s; + e.pos = t; + } + if (e.eat(92)) { + var r = this.regexp_eatCharacterClassEscape(e); + if (r) return r; + e.pos = t; + } + return null; + }; + f.regexp_eatClassStringDisjunction = function(e) { + var t = e.pos; + if (e.eatChars([92, 113])) { + if (e.eat(123)) { + var i = this.regexp_classStringDisjunctionContents(e); + if (e.eat(125)) return i; + } else e.raise("Invalid escape"); + e.pos = t; + } + return null; + }; + f.regexp_classStringDisjunctionContents = function(e) { + for (var t = this.regexp_classString(e); e.eat(124);) this.regexp_classString(e) === B && (t = B); + return t; + }; + f.regexp_classString = function(e) { + for (var t = 0; this.regexp_eatClassSetCharacter(e);) t++; + return t === 1 ? J : B; + }; + f.regexp_eatClassSetCharacter = function(e) { + var t = e.pos; + if (e.eat(92)) return this.regexp_eatCharacterEscape(e) || this.regexp_eatClassSetReservedPunctuator(e) ? !0 : e.eat(98) ? (e.lastIntValue = 8, !0) : (e.pos = t, !1); + var i = e.current(); + return i < 0 || i === e.lookahead() && xs(i) || ys(i) ? !1 : (e.advance(), e.lastIntValue = i, !0); + }; + f.regexp_eatClassSetReservedPunctuator = function(e) { + var t = e.current(); + return gs(t) ? (e.lastIntValue = t, e.advance(), !0) : !1; + }; + f.regexp_eatClassControlLetter = function(e) { + var t = e.current(); + return Ee(t) || t === 95 ? (e.lastIntValue = t % 32, e.advance(), !0) : !1; + }; + f.regexp_eatHexEscapeSequence = function(e) { + var t = e.pos; + if (e.eat(120)) { + if (this.regexp_eatFixedHexDigits(e, 2)) return !0; + e.switchU && e.raise("Invalid escape"), e.pos = t; + } + return !1; + }; + f.regexp_eatDecimalDigits = function(e) { + var t = e.pos, i = 0; + for (e.lastIntValue = 0; Ee(i = e.current());) e.lastIntValue = 10 * e.lastIntValue + (i - 48), e.advance(); + return e.pos !== t; + }; + f.regexp_eatHexDigits = function(e) { + var t = e.pos, i = 0; + for (e.lastIntValue = 0; Jt(i = e.current());) e.lastIntValue = 16 * e.lastIntValue + Kt(i), e.advance(); + return e.pos !== t; + }; + f.regexp_eatLegacyOctalEscapeSequence = function(e) { + if (this.regexp_eatOctalDigit(e)) { + var t = e.lastIntValue; + if (this.regexp_eatOctalDigit(e)) { + var i = e.lastIntValue; + t <= 3 && this.regexp_eatOctalDigit(e) ? e.lastIntValue = t * 64 + i * 8 + e.lastIntValue : e.lastIntValue = t * 8 + i; + } else e.lastIntValue = t; + return !0; + } + return !1; + }; + f.regexp_eatOctalDigit = function(e) { + var t = e.current(); + return Ht(t) ? (e.lastIntValue = t - 48, e.advance(), !0) : (e.lastIntValue = 0, !1); + }; + f.regexp_eatFixedHexDigits = function(e, t) { + var i = e.pos; + e.lastIntValue = 0; + for (var s = 0; s < t; ++s) { + var r = e.current(); + if (!Jt(r)) return e.pos = i, !1; + e.lastIntValue = 16 * e.lastIntValue + Kt(r), e.advance(); + } + return !0; + }; + Qe = function(t) { + this.type = t.type, this.value = t.value, this.start = t.start, this.end = t.end, t.options.locations && (this.loc = new be(t, t.startLoc, t.endLoc)), t.options.ranges && (this.range = [t.start, t.end]); + }, b = A.prototype; + b.next = function(e) { + !e && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new Qe(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken(); + }; + b.getToken = function() { + return this.next(), new Qe(this); + }; + typeof Symbol < "u" && (b[Symbol.iterator] = function() { + var e = this; + return { next: function() { + var t = e.getToken(); + return { + done: t.type === a.eof, + value: t + }; + } }; + }); + b.nextToken = function() { + var e = this.curContext(); + if ((!e || !e.preserveSpace) && this.skipSpace(), this.start = this.pos, this.options.locations && (this.startLoc = this.curPosition()), this.pos >= this.input.length) return this.finishToken(a.eof); + if (e.override) return e.override(this); + this.readToken(this.fullCharCodeAtPos()); + }; + b.readToken = function(e) { + return j(e, this.options.ecmaVersion >= 6) || e === 92 ? this.readWord() : this.getTokenFromCode(e); + }; + b.fullCharCodeAtPos = function() { + var e = this.input.charCodeAt(this.pos); + if (e <= 55295 || e >= 56320) return e; + var t = this.input.charCodeAt(this.pos + 1); + return t <= 56319 || t >= 57344 ? e : (e << 10) + t - 56613888; + }; + b.skipBlockComment = function() { + var e = this.options.onComment && this.curPosition(), t = this.pos, i = this.input.indexOf("*/", this.pos += 2); + if (i === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = i + 2, this.options.locations) for (var s = void 0, r = t; (s = xt(this.input, r, this.pos)) > -1;) ++this.curLine, r = this.lineStart = s; + this.options.onComment && this.options.onComment(!0, this.input.slice(t + 2, i), t, this.pos, e, this.curPosition()); + }; + b.skipLineComment = function(e) { + for (var t = this.pos, i = this.options.onComment && this.curPosition(), s = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && !Y(s);) s = this.input.charCodeAt(++this.pos); + this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, i, this.curPosition()); + }; + b.skipSpace = function() { + e: for (; this.pos < this.input.length;) { + var e = this.input.charCodeAt(this.pos); + switch (e) { + case 32: + case 160: + ++this.pos; + break; + case 13: this.input.charCodeAt(this.pos + 1) === 10 && ++this.pos; + case 10: + case 8232: + case 8233: + ++this.pos, this.options.locations && (++this.curLine, this.lineStart = this.pos); + break; + case 47: + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: + this.skipBlockComment(); + break; + case 47: + this.skipLineComment(2); + break; + default: break e; + } + break; + default: if (e > 8 && e < 14 || e >= 5760 && yt.test(String.fromCharCode(e))) ++this.pos; + else break e; + } + } + }; + b.finishToken = function(e, t) { + this.end = this.pos, this.options.locations && (this.endLoc = this.curPosition()); + var i = this.type; + this.type = e, this.value = t, this.updateContext(i); + }; + b.readToken_dot = function() { + var e = this.input.charCodeAt(this.pos + 1); + if (e >= 48 && e <= 57) return this.readNumber(!0); + var t = this.input.charCodeAt(this.pos + 2); + return this.options.ecmaVersion >= 6 && e === 46 && t === 46 ? (this.pos += 3, this.finishToken(a.ellipsis)) : (++this.pos, this.finishToken(a.dot)); + }; + b.readToken_slash = function() { + var e = this.input.charCodeAt(this.pos + 1); + return this.exprAllowed ? (++this.pos, this.readRegexp()) : e === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.slash, 1); + }; + b.readToken_mult_modulo_exp = function(e) { + var t = this.input.charCodeAt(this.pos + 1), i = 1, s = e === 42 ? a.star : a.modulo; + return this.options.ecmaVersion >= 7 && e === 42 && t === 42 && (++i, s = a.starstar, t = this.input.charCodeAt(this.pos + 2)), t === 61 ? this.finishOp(a.assign, i + 1) : this.finishOp(s, i); + }; + b.readToken_pipe_amp = function(e) { + var t = this.input.charCodeAt(this.pos + 1); + if (t === e) { + if (this.options.ecmaVersion >= 12) { + if (this.input.charCodeAt(this.pos + 2) === 61) return this.finishOp(a.assign, 3); + } + return this.finishOp(e === 124 ? a.logicalOR : a.logicalAND, 2); + } + return t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(e === 124 ? a.bitwiseOR : a.bitwiseAND, 1); + }; + b.readToken_caret = function() { + return this.input.charCodeAt(this.pos + 1) === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.bitwiseXOR, 1); + }; + b.readToken_plus_min = function(e) { + var t = this.input.charCodeAt(this.pos + 1); + return t === e ? t === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || L.test(this.input.slice(this.lastTokEnd, this.pos))) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(a.incDec, 2) : t === 61 ? this.finishOp(a.assign, 2) : this.finishOp(a.plusMin, 1); + }; + b.readToken_lt_gt = function(e) { + var t = this.input.charCodeAt(this.pos + 1), i = 1; + return t === e ? (i = e === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2, this.input.charCodeAt(this.pos + i) === 61 ? this.finishOp(a.assign, i + 1) : this.finishOp(a.bitShift, i)) : t === 33 && e === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45 ? (this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (t === 61 && (i = 2), this.finishOp(a.relational, i)); + }; + b.readToken_eq_excl = function(e) { + var t = this.input.charCodeAt(this.pos + 1); + return t === 61 ? this.finishOp(a.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2) : e === 61 && t === 62 && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(a.arrow)) : this.finishOp(e === 61 ? a.eq : a.prefix, 1); + }; + b.readToken_question = function() { + var e = this.options.ecmaVersion; + if (e >= 11) { + var t = this.input.charCodeAt(this.pos + 1); + if (t === 46) { + var i = this.input.charCodeAt(this.pos + 2); + if (i < 48 || i > 57) return this.finishOp(a.questionDot, 2); + } + if (t === 63) { + if (e >= 12) { + if (this.input.charCodeAt(this.pos + 2) === 61) return this.finishOp(a.assign, 3); + } + return this.finishOp(a.coalesce, 2); + } + } + return this.finishOp(a.question, 1); + }; + b.readToken_numberSign = function() { + var e = this.options.ecmaVersion, t = 35; + if (e >= 13 && (++this.pos, t = this.fullCharCodeAtPos(), j(t, !0) || t === 92)) return this.finishToken(a.privateId, this.readWord1()); + this.raise(this.pos, "Unexpected character '" + q(t) + "'"); + }; + b.getTokenFromCode = function(e) { + switch (e) { + case 46: return this.readToken_dot(); + case 40: return ++this.pos, this.finishToken(a.parenL); + case 41: return ++this.pos, this.finishToken(a.parenR); + case 59: return ++this.pos, this.finishToken(a.semi); + case 44: return ++this.pos, this.finishToken(a.comma); + case 91: return ++this.pos, this.finishToken(a.bracketL); + case 93: return ++this.pos, this.finishToken(a.bracketR); + case 123: return ++this.pos, this.finishToken(a.braceL); + case 125: return ++this.pos, this.finishToken(a.braceR); + case 58: return ++this.pos, this.finishToken(a.colon); + case 96: + if (this.options.ecmaVersion < 6) break; + return ++this.pos, this.finishToken(a.backQuote); + case 48: + var t = this.input.charCodeAt(this.pos + 1); + if (t === 120 || t === 88) return this.readRadixNumber(16); + if (this.options.ecmaVersion >= 6) { + if (t === 111 || t === 79) return this.readRadixNumber(8); + if (t === 98 || t === 66) return this.readRadixNumber(2); + } + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: return this.readNumber(!1); + case 34: + case 39: return this.readString(e); + case 47: return this.readToken_slash(); + case 37: + case 42: return this.readToken_mult_modulo_exp(e); + case 124: + case 38: return this.readToken_pipe_amp(e); + case 94: return this.readToken_caret(); + case 43: + case 45: return this.readToken_plus_min(e); + case 60: + case 62: return this.readToken_lt_gt(e); + case 61: + case 33: return this.readToken_eq_excl(e); + case 63: return this.readToken_question(); + case 126: return this.finishOp(a.prefix, 1); + case 35: return this.readToken_numberSign(); + } + this.raise(this.pos, "Unexpected character '" + q(e) + "'"); + }; + b.finishOp = function(e, t) { + var i = this.input.slice(this.pos, this.pos + t); + return this.pos += t, this.finishToken(e, i); + }; + b.readRegexp = function() { + for (var e, t, i = this.pos;;) { + this.pos >= this.input.length && this.raise(i, "Unterminated regular expression"); + var s = this.input.charAt(this.pos); + if (L.test(s) && this.raise(i, "Unterminated regular expression"), e) e = !1; + else { + if (s === "[") t = !0; + else if (s === "]" && t) t = !1; + else if (s === "/" && !t) break; + e = s === "\\"; + } + ++this.pos; + } + var r = this.input.slice(i, this.pos); + ++this.pos; + var o = this.pos, u = this.readWord1(); + this.containsEsc && this.unexpected(o); + var p = this.regexpState || (this.regexpState = new G(this)); + p.reset(i, r, u), this.validateRegExpFlags(p), this.validateRegExpPattern(p); + var h = null; + try { + h = new RegExp(r, u); + } catch {} + return this.finishToken(a.regexp, { + pattern: r, + flags: u, + value: h + }); + }; + b.readInt = function(e, t, i) { + for (var s = this.options.ecmaVersion >= 12 && t === void 0, r = i && this.input.charCodeAt(this.pos) === 48, o = this.pos, u = 0, p = 0, h = 0, l = t ?? Infinity; h < l; ++h, ++this.pos) { + var m = this.input.charCodeAt(this.pos), S = void 0; + if (s && m === 95) { + r && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), p === 95 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), h === 0 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), p = m; + continue; + } + if (m >= 97 ? S = m - 97 + 10 : m >= 65 ? S = m - 65 + 10 : m >= 48 && m <= 57 ? S = m - 48 : S = Infinity, S >= e) break; + p = m, u = u * e + S; + } + return s && p === 95 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === o || t != null && this.pos - o !== t ? null : u; + }; + b.readRadixNumber = function(e) { + var t = this.pos; + this.pos += 2; + var i = this.readInt(e); + return i ?? this.raise(this.start + 2, "Expected number in radix " + e), this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110 ? (i = Xt(this.input.slice(t, this.pos)), ++this.pos) : j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, i); + }; + b.readNumber = function(e) { + var t = this.pos; + !e && this.readInt(10, void 0, !0) === null && this.raise(t, "Invalid number"); + var i = this.pos - t >= 2 && this.input.charCodeAt(t) === 48; + i && this.strict && this.raise(t, "Invalid number"); + var s = this.input.charCodeAt(this.pos); + if (!i && !e && this.options.ecmaVersion >= 11 && s === 110) { + var r = Xt(this.input.slice(t, this.pos)); + return ++this.pos, j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"), this.finishToken(a.num, r); + } + i && /[89]/.test(this.input.slice(t, this.pos)) && (i = !1), s === 46 && !i && (++this.pos, this.readInt(10), s = this.input.charCodeAt(this.pos)), (s === 69 || s === 101) && !i && (s = this.input.charCodeAt(++this.pos), (s === 43 || s === 45) && ++this.pos, this.readInt(10) === null && this.raise(t, "Invalid number")), j(this.fullCharCodeAtPos()) && this.raise(this.pos, "Identifier directly after number"); + var o = vs(this.input.slice(t, this.pos), i); + return this.finishToken(a.num, o); + }; + b.readCodePoint = function() { + var e = this.input.charCodeAt(this.pos), t; + if (e === 123) { + this.options.ecmaVersion < 6 && this.unexpected(); + var i = ++this.pos; + t = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos), ++this.pos, t > 1114111 && this.invalidStringToken(i, "Code point out of bounds"); + } else t = this.readHexChar(4); + return t; + }; + b.readString = function(e) { + for (var t = "", i = ++this.pos;;) { + this.pos >= this.input.length && this.raise(this.start, "Unterminated string constant"); + var s = this.input.charCodeAt(this.pos); + if (s === e) break; + s === 92 ? (t += this.input.slice(i, this.pos), t += this.readEscapedChar(!1), i = this.pos) : s === 8232 || s === 8233 ? (this.options.ecmaVersion < 10 && this.raise(this.start, "Unterminated string constant"), ++this.pos, this.options.locations && (this.curLine++, this.lineStart = this.pos)) : (Y(s) && this.raise(this.start, "Unterminated string constant"), ++this.pos); + } + return t += this.input.slice(i, this.pos++), this.finishToken(a.string, t); + }; + Wt = {}; + b.tryReadTemplateToken = function() { + this.inTemplateElement = !0; + try { + this.readTmplToken(); + } catch (e) { + if (e === Wt) this.readInvalidTemplateToken(); + else throw e; + } + this.inTemplateElement = !1; + }; + b.invalidStringToken = function(e, t) { + if (this.inTemplateElement && this.options.ecmaVersion >= 9) throw Wt; + this.raise(e, t); + }; + b.readTmplToken = function() { + for (var e = "", t = this.pos;;) { + this.pos >= this.input.length && this.raise(this.start, "Unterminated template"); + var i = this.input.charCodeAt(this.pos); + if (i === 96 || i === 36 && this.input.charCodeAt(this.pos + 1) === 123) return this.pos === this.start && (this.type === a.template || this.type === a.invalidTemplate) ? i === 36 ? (this.pos += 2, this.finishToken(a.dollarBraceL)) : (++this.pos, this.finishToken(a.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(a.template, e)); + if (i === 92) e += this.input.slice(t, this.pos), e += this.readEscapedChar(!0), t = this.pos; + else if (Y(i)) { + switch (e += this.input.slice(t, this.pos), ++this.pos, i) { + case 13: this.input.charCodeAt(this.pos) === 10 && ++this.pos; + case 10: + e += ` +`; + break; + default: + e += String.fromCharCode(i); + break; + } + this.options.locations && (++this.curLine, this.lineStart = this.pos), t = this.pos; + } else ++this.pos; + } + }; + b.readInvalidTemplateToken = function() { + for (; this.pos < this.input.length; this.pos++) switch (this.input[this.pos]) { + case "\\": + ++this.pos; + break; + case "$": if (this.input[this.pos + 1] !== "{") break; + case "`": return this.finishToken(a.invalidTemplate, this.input.slice(this.start, this.pos)); + case "\r": this.input[this.pos + 1] === ` +` && ++this.pos; + case ` +`: + case "\u2028": + case "\u2029": + ++this.curLine, this.lineStart = this.pos + 1; + break; + } + this.raise(this.start, "Unterminated template"); + }; + b.readEscapedChar = function(e) { + var t = this.input.charCodeAt(++this.pos); + switch (++this.pos, t) { + case 110: return ` +`; + case 114: return "\r"; + case 120: return String.fromCharCode(this.readHexChar(2)); + case 117: return q(this.readCodePoint()); + case 116: return " "; + case 98: return "\b"; + case 118: return "\v"; + case 102: return "\f"; + case 13: this.input.charCodeAt(this.pos) === 10 && ++this.pos; + case 10: return this.options.locations && (this.lineStart = this.pos, ++this.curLine), ""; + case 56: + case 57: if (this.strict && this.invalidStringToken(this.pos - 1, "Invalid escape sequence"), e) { + var i = this.pos - 1; + this.invalidStringToken(i, "Invalid escape sequence in template string"); + } + default: + if (t >= 48 && t <= 55) { + var s = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0], r = parseInt(s, 8); + return r > 255 && (s = s.slice(0, -1), r = parseInt(s, 8)), this.pos += s.length - 1, t = this.input.charCodeAt(this.pos), (s !== "0" || t === 56 || t === 57) && (this.strict || e) && this.invalidStringToken(this.pos - 1 - s.length, e ? "Octal literal in template string" : "Octal literal in strict mode"), String.fromCharCode(r); + } + return Y(t) ? (this.options.locations && (this.lineStart = this.pos, ++this.curLine), "") : String.fromCharCode(t); + } + }; + b.readHexChar = function(e) { + var t = this.pos, i = this.readInt(16, e); + return i === null && this.invalidStringToken(t, "Bad character escape sequence"), i; + }; + b.readWord1 = function() { + this.containsEsc = !1; + for (var e = "", t = !0, i = this.pos, s = this.options.ecmaVersion >= 6; this.pos < this.input.length;) { + var r = this.fullCharCodeAtPos(); + if (X(r, s)) this.pos += r <= 65535 ? 1 : 2; + else if (r === 92) { + this.containsEsc = !0, e += this.input.slice(i, this.pos); + var o = this.pos; + this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos; + var u = this.readCodePoint(); + (t ? j : X)(u, s) || this.invalidStringToken(o, "Invalid Unicode escape"), e += q(u), i = this.pos; + } else break; + t = !1; + } + return e + this.input.slice(i, this.pos); + }; + b.readWord = function() { + var e = this.readWord1(), t = a.name; + return this.keywords.test(e) && (t = Je[e]), this.finishToken(t, e); + }; + A.acorn = { + Parser: A, + version: "8.15.0", + defaultOptions: Ue, + Position: ne, + SourceLocation: be, + getLineInfo: vt, + Node: Te, + TokenType: C, + tokTypes: a, + keywordTypes: Je, + TokContext: F, + tokContexts: T, + isIdentifierChar: X, + isIdentifierStart: j, + Token: Qe, + isNewLine: Y, + lineBreak: L, + lineBreakG: qi, + nonASCIIwhitespace: yt + }; + Si = ut($e(), 1); + Ae = As; + te = (e, t) => (i, s, ...r) => i | 1 && s == null ? void 0 : (t.call(s) ?? s[e]).apply(s, r); + ks = Array.prototype.findLast ?? function(e) { + for (let t = this.length - 1; t >= 0; t--) { + let i = this[t]; + if (e(i, t, this)) return i; + } + }, Zt = te("findLast", function() { + if (Array.isArray(this)) return ks; + }); + ie = te("at", function() { + if (Array.isArray(this) || typeof this == "string") return Ps; + }); + se = Ns; + re = se([ + "Block", + "CommentBlock", + "MultiLine" + ]); + ei = se([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + Ze = /* @__PURE__ */ new WeakMap(); + ti = Vs; + et = /* @__PURE__ */ new WeakMap(); + tt = Bs; + ii = Ds; + si = Ms; + ce = null; + Fs = 10; + for (let e = 0; e <= Fs; e++) le(); + ri = js; + n = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + ni = ri({ + AccessorProperty: n[0], + AnyTypeAnnotation: n[1], + ArgumentPlaceholder: n[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: n[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: n[3], + AsExpression: n[4], + AssignmentExpression: n[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: n[6], + BigIntLiteral: n[1], + BigIntLiteralTypeAnnotation: n[1], + BigIntTypeAnnotation: n[1], + BinaryExpression: n[5], + BindExpression: ["object", "callee"], + BlockStatement: n[7], + BooleanLiteral: n[1], + BooleanLiteralTypeAnnotation: n[1], + BooleanTypeAnnotation: n[1], + BreakStatement: n[8], + CallExpression: n[9], + CatchClause: ["param", "body"], + ChainExpression: n[3], + ClassAccessorProperty: n[0], + ClassBody: n[10], + ClassDeclaration: n[11], + ClassExpression: n[11], + ClassImplements: n[12], + ClassMethod: n[13], + ClassPrivateMethod: n[13], + ClassPrivateProperty: n[14], + ClassProperty: n[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: n[15], + ConditionalExpression: n[16], + ConditionalTypeAnnotation: n[17], + ContinueStatement: n[8], + DebuggerStatement: n[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: n[18], + DeclareEnum: n[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: n[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: n[21], + DeclareInterface: n[22], + DeclareModule: n[19], + DeclareModuleExports: n[23], + DeclareNamespace: n[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: n[24], + DeclareVariable: n[21], + Decorator: n[3], + Directive: n[18], + DirectiveLiteral: n[1], + DoExpression: n[10], + DoWhileStatement: n[25], + EmptyStatement: n[1], + EmptyTypeAnnotation: n[1], + EnumBigIntBody: n[26], + EnumBigIntMember: n[27], + EnumBooleanBody: n[26], + EnumBooleanMember: n[27], + EnumDeclaration: n[19], + EnumDefaultedMember: n[21], + EnumNumberBody: n[26], + EnumNumberMember: n[27], + EnumStringBody: n[26], + EnumStringMember: n[27], + EnumSymbolBody: n[26], + ExistsTypeAnnotation: n[1], + ExperimentalRestProperty: n[6], + ExperimentalSpreadProperty: n[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: n[28], + ExportNamedDeclaration: n[20], + ExportNamespaceSpecifier: n[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: n[3], + File: ["program"], + ForInStatement: n[29], + ForOfStatement: n[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: n[30], + FunctionExpression: n[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: n[15], + GenericTypeAnnotation: n[12], + HookDeclaration: n[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: n[16], + ImportAttribute: n[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: n[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: n[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: n[34], + InferredPredicate: n[1], + InferTypeAnnotation: n[35], + InterfaceDeclaration: n[22], + InterfaceExtends: n[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: n[1], + IntersectionTypeAnnotation: n[36], + JsExpressionRoot: n[37], + JsonRoot: n[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: n[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: n[1], + JSXExpressionContainer: n[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: n[1], + JSXMemberExpression: n[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: n[1], + JSXSpreadAttribute: n[6], + JSXSpreadChild: n[3], + JSXText: n[1], + KeyofTypeAnnotation: n[6], + LabeledStatement: ["label", "body"], + Literal: n[1], + LogicalExpression: n[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: n[21], + MatchExpression: n[39], + MatchExpressionCase: n[40], + MatchIdentifierPattern: n[21], + MatchLiteralPattern: n[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: n[6], + MatchStatement: n[39], + MatchStatementCase: n[40], + MatchUnaryPattern: n[6], + MatchWildcardPattern: n[1], + MemberExpression: n[38], + MetaProperty: ["meta", "property"], + MethodDefinition: n[42], + MixedTypeAnnotation: n[1], + ModuleExpression: n[10], + NeverTypeAnnotation: n[1], + NewExpression: n[9], + NGChainedExpression: n[43], + NGEmptyExpression: n[1], + NGMicrosyntax: n[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: n[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: n[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: n[37], + NullableTypeAnnotation: n[23], + NullLiteral: n[1], + NullLiteralTypeAnnotation: n[1], + NumberLiteralTypeAnnotation: n[1], + NumberTypeAnnotation: n[1], + NumericLiteral: n[1], + ObjectExpression: ["properties"], + ObjectMethod: n[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: n[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: n[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: n[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: n[9], + OptionalIndexedAccessType: n[34], + OptionalMemberExpression: n[38], + ParenthesizedExpression: n[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: n[1], + PipelineTopicExpression: n[3], + Placeholder: n[1], + PrivateIdentifier: n[1], + PrivateName: n[21], + Program: n[7], + Property: n[32], + PropertyDefinition: n[14], + QualifiedTypeIdentifier: n[44], + QualifiedTypeofIdentifier: n[44], + RegExpLiteral: n[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: n[6], + SatisfiesExpression: n[4], + SequenceExpression: n[43], + SpreadElement: n[6], + StaticBlock: n[10], + StringLiteral: n[1], + StringLiteralTypeAnnotation: n[1], + StringTypeAnnotation: n[1], + Super: n[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: n[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: n[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: n[1], + ThisTypeAnnotation: n[1], + ThrowStatement: n[6], + TopicReference: n[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: n[45], + TSAbstractKeyword: n[1], + TSAbstractMethodDefinition: n[32], + TSAbstractPropertyDefinition: n[45], + TSAnyKeyword: n[1], + TSArrayType: n[2], + TSAsExpression: n[4], + TSAsyncKeyword: n[1], + TSBigIntKeyword: n[1], + TSBooleanKeyword: n[1], + TSCallSignatureDeclaration: n[46], + TSClassImplements: n[47], + TSConditionalType: n[17], + TSConstructorType: n[46], + TSConstructSignatureDeclaration: n[46], + TSDeclareFunction: n[31], + TSDeclareKeyword: n[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: n[26], + TSEnumDeclaration: n[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: n[3], + TSExportKeyword: n[1], + TSExternalModuleReference: n[3], + TSFunctionType: n[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: n[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: n[35], + TSInstantiationExpression: n[47], + TSInterfaceBody: n[10], + TSInterfaceDeclaration: n[22], + TSInterfaceHeritage: n[47], + TSIntersectionType: n[36], + TSIntrinsicKeyword: n[1], + TSJSDocAllType: n[1], + TSJSDocNonNullableType: n[23], + TSJSDocNullableType: n[23], + TSJSDocUnknownType: n[1], + TSLiteralType: n[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: n[10], + TSModuleDeclaration: n[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: n[21], + TSNeverKeyword: n[1], + TSNonNullExpression: n[3], + TSNullKeyword: n[1], + TSNumberKeyword: n[1], + TSObjectKeyword: n[1], + TSOptionalType: n[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: n[23], + TSPrivateKeyword: n[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: n[1], + TSPublicKeyword: n[1], + TSQualifiedName: n[5], + TSReadonlyKeyword: n[1], + TSRestType: n[23], + TSSatisfiesExpression: n[4], + TSStaticKeyword: n[1], + TSStringKeyword: n[1], + TSSymbolKeyword: n[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: n[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: n[23], + TSTypeAssertion: n[4], + TSTypeLiteral: n[26], + TSTypeOperator: n[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: n[48], + TSTypeParameterInstantiation: n[48], + TSTypePredicate: n[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: n[1], + TSUnionType: n[36], + TSUnknownKeyword: n[1], + TSVoidKeyword: n[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: n[24], + TypeAnnotation: n[23], + TypeCastExpression: n[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: n[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: n[48], + TypeParameterInstantiation: n[48], + TypePredicate: n[49], + UnaryExpression: n[6], + UndefinedTypeAnnotation: n[1], + UnionTypeAnnotation: n[36], + UnknownTypeAnnotation: n[1], + UpdateExpression: n[6], + V8IntrinsicIdentifier: n[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: n[27], + Variance: n[1], + VoidPattern: n[1], + VoidTypeAnnotation: n[1], + WhileStatement: n[25], + WithStatement: ["object", "body"], + YieldExpression: n[6] + }); + oi = we; + se([ + "RegExpLiteral", + "BigIntLiteral", + "NumericLiteral", + "StringLiteral", + "DirectiveLiteral", + "Literal", + "JSXText", + "TemplateElement", + "StringLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation" + ]); + Pe = Gs; + qs = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, fe = te("replaceAll", function() { + if (typeof this == "string") return qs; + }); + Ks = /\*\/$/, Hs = /^\/\*\*?/, Xs = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, Ws = /(^|\s+)\/\/([^\n\r]*)/g, hi = /^(\r?\n)+/, zs = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, pi = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, Qs = /(\r?\n|^) *\* ?/g, Ys = []; + fi = ["noformat", "noprettier"], di = ["format", "prettier"]; + mi = $s; + Ie = Zs; + Ne = "module", vi = "script", Le = "commonjs", Re = [Ne, Le]; + er = { + ecmaVersion: "latest", + allowReserved: !0, + allowReturnOutsideFunction: !0, + allowSuperOutsideMethod: !0, + checkPrivateFields: !1, + locations: !1, + ranges: !0, + preserveParens: !0 + }; + ir = () => (bi ?? (bi = A.extend((0, Si.default)())), bi); + _i = Ie(rr); + Ai = ut($e(), 1); + P = { + Boolean: "Boolean", + EOF: "", + Identifier: "Identifier", + PrivateIdentifier: "PrivateIdentifier", + Keyword: "Keyword", + Null: "Null", + Numeric: "Numeric", + Punctuator: "Punctuator", + String: "String", + RegularExpression: "RegularExpression", + Template: "Template", + JSXIdentifier: "JSXIdentifier", + JSXText: "JSXText" + }; + rt.prototype = { + constructor: rt, + translate(e, t) { + let i = e.type, s = this._acornTokTypes; + if (i === s.name) e.type = P.Identifier, e.value === "static" && (e.type = P.Keyword), t.ecmaVersion > 5 && (e.value === "yield" || e.value === "let") && (e.type = P.Keyword); + else if (i === s.privateId) e.type = P.PrivateIdentifier; + else if (i === s.semi || i === s.comma || i === s.parenL || i === s.parenR || i === s.braceL || i === s.braceR || i === s.dot || i === s.bracketL || i === s.colon || i === s.question || i === s.bracketR || i === s.ellipsis || i === s.arrow || i === s.jsxTagStart || i === s.incDec || i === s.starstar || i === s.jsxTagEnd || i === s.prefix || i === s.questionDot || i.binop && !i.keyword || i.isAssign) e.type = P.Punctuator, e.value = this._code.slice(e.start, e.end); + else if (i === s.jsxName) e.type = P.JSXIdentifier; + else if (i.label === "jsxText" || i === s.jsxAttrValueToken) e.type = P.JSXText; + else if (i.keyword) i.keyword === "true" || i.keyword === "false" ? e.type = P.Boolean : i.keyword === "null" ? e.type = P.Null : e.type = P.Keyword; + else if (i === s.num) e.type = P.Numeric, e.value = this._code.slice(e.start, e.end); + else if (i === s.string) t.jsxAttrValueToken ? (t.jsxAttrValueToken = !1, e.type = P.JSXText) : e.type = P.String, e.value = this._code.slice(e.start, e.end); + else if (i === s.regexp) { + e.type = P.RegularExpression; + let r = e.value; + e.regex = { + flags: r.flags, + pattern: r.pattern + }, e.value = `/${r.pattern}/${r.flags}`; + } + return e; + }, + onToken(e, t) { + let i = this._acornTokTypes, s = t.tokens, r = this._tokens, o = () => { + s.push(ar(this._tokens, this._code)), this._tokens = []; + }; + if (e.type === i.eof) { + this._curlyBrace && s.push(this.translate(this._curlyBrace, t)); + return; + } + if (e.type === i.backQuote) { + this._curlyBrace && (s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = null), r.push(e), r.length > 1 && o(); + return; + } + if (e.type === i.dollarBraceL) { + r.push(e), o(); + return; + } + if (e.type === i.braceR) { + this._curlyBrace && s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = e; + return; + } + if (e.type === i.template || e.type === i.invalidTemplate) { + this._curlyBrace && (r.push(this._curlyBrace), this._curlyBrace = null), r.push(e); + return; + } + this._curlyBrace && (s.push(this.translate(this._curlyBrace, t)), this._curlyBrace = null), s.push(this.translate(e, t)); + } + }; + Ci = rt; + Ti = [ + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17 + ]; + Q = Symbol("espree's internal state"), at = Symbol("espree's esprimaFinishNode"); + nt = () => (e) => { + let t = Object.assign({}, e.acorn.tokTypes); + return e.acornJsx && Object.assign(t, e.acornJsx.tokTypes), class extends e { + constructor(s, r) { + (typeof s != "object" || s === null) && (s = {}), typeof r != "string" && !(r instanceof String) && (r = String(r)); + let o = s.sourceType, u = Ei(s), p = u.ecmaFeatures || {}, h = u.tokens === !0 ? new Ci(t, r) : null, l = { + originalSourceType: o || u.sourceType, + tokens: h ? [] : null, + comments: u.comment === !0 ? [] : null, + impliedStrict: p.impliedStrict === !0 && u.ecmaVersion >= 5, + ecmaVersion: u.ecmaVersion, + jsxAttrValueToken: !1, + lastToken: null, + templateElements: [] + }; + super({ + ecmaVersion: u.ecmaVersion, + sourceType: u.sourceType, + ranges: u.ranges, + locations: u.locations, + allowReserved: u.allowReserved, + allowReturnOutsideFunction: u.allowReturnOutsideFunction, + onToken(m) { + h && h.onToken(m, l), m.type !== t.eof && (l.lastToken = m); + }, + onComment(m, S, E, c, x, y) { + if (l.comments) { + let v = hr(m, S, E, c, x, y, r); + l.comments.push(v); + } + } + }, r), this[Q] = l; + } + tokenize() { + do + this.next(); + while (this.type !== t.eof); + this.next(); + let s = this[Q], r = s.tokens; + return s.comments && (r.comments = s.comments), r; + } + finishNode(...s) { + let r = super.finishNode(...s); + return this[at](r); + } + finishNodeAt(...s) { + let r = super.finishNodeAt(...s); + return this[at](r); + } + parse() { + let s = this[Q], r = super.parse(); + return r.sourceType = s.originalSourceType, s.comments && (r.comments = s.comments), s.tokens && (r.tokens = s.tokens), this[Q].templateElements.forEach((o) => { + let p = o.tail ? 1 : 2; + o.start += -1, o.end += p, o.range && (o.range[0] += -1, o.range[1] += p), o.loc && (o.loc.start.column += -1, o.loc.end.column += p); + }), r; + } + parseTopLevel(s) { + return this[Q].impliedStrict && (this.strict = !0), super.parseTopLevel(s); + } + raise(s, r) { + let o = e.acorn.getLineInfo(this.input, s), u = new SyntaxError(r); + throw u.index = s, u.lineNumber = o.line, u.column = o.column + 1, u; + } + raiseRecoverable(s, r) { + this.raise(s, r); + } + unexpected(s) { + let r = "Unexpected token"; + if (s != null) { + if (this.pos = s, this.options.locations) for (; this.pos < this.lineStart;) this.lineStart = this.input.lastIndexOf(` +`, this.lineStart - 2) + 1, --this.curLine; + this.nextToken(); + } + this.end > this.start && (r += ` ${this.input.slice(this.start, this.end)}`), this.raise(this.start, r); + } + jsx_readString(s) { + let r = super.jsx_readString(s); + return this.type === t.string && (this[Q].jsxAttrValueToken = !0), r; + } + [at](s) { + return s.type === "TemplateElement" && this[Q].templateElements.push(s), s.type.includes("Function") && !s.generator && (s.generator = !1), s; + } + }; + }; + pr = { + _regular: null, + _jsx: null, + get regular() { + return this._regular === null && (this._regular = A.extend(nt())), this._regular; + }, + get jsx() { + return this._jsx === null && (this._jsx = A.extend((0, Ai.default)(), nt())), this._jsx; + }, + get(e) { + return !!(e && e.ecmaFeatures && e.ecmaFeatures.jsx) ? this.jsx : this.regular; + } + }; + cr = { + ecmaVersion: "latest", + range: !0, + loc: !1, + comment: !0, + tokens: !1, + ecmaFeatures: { + jsx: !0, + impliedStrict: !1 + } + }; + dr = { + acorn: _i, + espree: Ie(fr) + }; +}))(); +export { Pi as default, dr as parsers }; diff --git a/.github/actions/check-public-api/dist/angular-BDq8CpSH.js b/.github/actions/check-public-api/dist/angular-BDq8CpSH.js new file mode 100644 index 0000000000..384124dfa9 --- /dev/null +++ b/.github/actions/check-public-api/dist/angular-BDq8CpSH.js @@ -0,0 +1,3811 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/angular.mjs +function Fr(t) { + return typeof t == "string" ? (e) => e === t : (e) => t.test(e); +} +function Sn(t, e, n) { + let s = Fr(e); + for (let r = n; r < t.length; r++) { + let i = t[r]; + if (s(i)) return r; + } + throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`); +} +function En(t) { + return t.slice(0, 1).toLowerCase() + t.slice(1); +} +function Re(t) { + let { start: e, end: n } = t; + return { + start: e, + end: n, + range: [e, n] + }; +} +function xn(t) { + return !!t.extra?.parenthesized; +} +function ve(t) { + return t.type === "TSNonNullExpression" && !xn(t) ? ve(t.expression) : (t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression") && !xn(t); +} +function Vr(t, e) { + return t == null || e == null ? t == e : t.isEquivalent(e); +} +function Ur(t, e, n) { + let s = t.length; + if (s !== e.length) return !1; + for (let r = 0; r < s; r++) if (!n(t[r], e[r])) return !1; + return !0; +} +function oe(t, e) { + return Ur(t, e, (n, s) => n.isEquivalent(s)); +} +function li(t) { + return t >= vs && t <= ws || t == ks; +} +function G(t) { + return Qr <= t && t <= Kr; +} +function jt(t) { + return t >= Cs && t <= _s || t >= en && t <= tn; +} +function Wn(t) { + return t === Ss || t === xs || t === qt; +} +function xe(t, e, n) { + return new b(t, e, f.Character, n, String.fromCharCode(n)); +} +function ki(t, e, n) { + return new b(t, e, f.Identifier, 0, n); +} +function Ti(t, e, n) { + return new b(t, e, f.PrivateIdentifier, 0, n); +} +function bi(t, e, n) { + return new b(t, e, f.Keyword, 0, n); +} +function B(t, e, n) { + return new b(t, e, f.Operator, 0, n); +} +function Ai(t, e, n) { + return new b(t, e, f.Number, n, ""); +} +function Ii(t, e, n) { + return new b(t, e, f.Error, 0, n); +} +function Ni(t, e, n) { + return new b(t, e, f.RegExpBody, 0, n); +} +function Pi(t, e, n) { + return new b(t, e, f.RegExpFlags, 0, n); +} +function cs(t) { + return Cs <= t && t <= _s || en <= t && t <= tn || t == Ze || t == Zt; +} +function us(t) { + return jt(t) || G(t) || t == Ze || t == Zt; +} +function Li(t) { + return t == ti || t == Zr; +} +function Mi(t) { + return t == ys || t == Es; +} +function Ri(t) { + switch (t) { + case si: return $e; + case ni: return jr; + case ri: return zr; + case ii: return vs; + case ai: return qr; + default: return t; + } +} +function $i(t) { + let e = parseInt(t); + if (isNaN(e)) throw new Error("Invalid integer literal when parsing " + t); + return e; +} +function V(t) { + return t.start.toString() || "(unknown)"; +} +function re(t, e, n, s) { + n.length > 0 && (n = ` ${n} `); + let r = V(s); + return new Pe(s, `Parser Error: ${t}${n}[${e}] in ${r}`); +} +function Oi(t) { + let e = /* @__PURE__ */ new Map(), n = 0, s = 0, r = 0; + for (; r < t.length;) { + let i = t[r]; + if (i.type === 9) { + let [a, p] = i.parts; + n += p.length, s += a.length; + } else { + let a = i.parts.reduce((p, h) => p + h.length, 0); + s += a, n += a; + } + e.set(s, n), r++; + } + return e; +} +function Ps(t) { + let e = new Xe(t, Fi), n = new Ge(e, 0, 0, 0), s = n.moveBy(t.length); + return { + text: t, + file: e, + start: n, + end: s, + sourceSpan: new Je(n, s) + }; +} +function Ls() { + return Vi ?? (Vi = new he(new Le())); +} +function Hi(t) { + let e = Ui(t); + return e === null ? [] : [{ + type: "CommentLine", + value: t.slice(e + 2), + ...Re({ + start: e, + end: t.length + }) + }]; +} +function Ms(t) { + let { result: e } = t; + if (e.errors.length !== 0) { + let [n] = e.errors; + if (!(n instanceof Pe)) throw n; + let { message: s } = n; + { + let a = s.match(/ in .*?@\d+:\d+$/); + a && (s = s.slice(0, a.index)); + } + let r = t.start; + { + let a = s.match(/at column (?\d+)/); + a && (s = s.slice(0, a.index), r = r.moveBy(Number(a.groups.index))); + } + let i = new SyntaxError(s.trim(), { cause: n }); + throw Object.assign(i, { + location: r, + span: n.span + }), i.cause ?? (i.cause = n), i; + } + return t; +} +function Ki(t) { + return this[t < 0 ? this.length + t : t]; +} +function kr(t) { + return t instanceof Ne; +} +function Tr(t) { + return t instanceof ue; +} +function Lr(t, e) { + return new eo(t, e).expressions; +} +function hn(t) { + let e = t.range?.[0] ?? t.start, n = (t.declaration?.decorators ?? t.decorators)?.[0]; + return n ? Math.min(hn(n), e) : e; +} +function Mr(t) { + return t.range?.[1] ?? t.end; +} +function at(t) { + return { + astFormat: "estree", + parse(e) { + let n = t(e), { comments: s } = n; + return delete n.comments, t === ot && n.type !== "NGChainedExpression" && (n = { + ...n, + type: "NGChainedExpression", + expressions: [n] + }), { + type: "NGRoot", + node: n, + comments: s + }; + }, + locStart: hn, + locEnd: Mr + }; +} +var Or, Dr, Br, gn, vn, lt, j, Me, ct, v, wn, Rr, fn, yn, Cn, _n, P, kn, Tn, bn, An, In, Nn, Pn, Ln, u, S, ht, ft, dt, mt, gt, Oe, vt, wt, w, xt, St, Et, yt, Ct, _t, ae, le, De, o, c, bt, Rn, K, g, Ae, A, ce, At, It, Nt, ye, Pt, Fe, Lt, Ce, Mt, I, Rt, $t, Ot, Hr, E, _e, Ve, Ue, He, Dt, Bt, Ft, We, qe, je, Ie, Vt, Ut, Ht, O, U, ue, Ne, Wt, $n, On, M, Dn, we, vs, $e, qr, jr, zr, ws, Gr, xs, Xr, Zt, Jr, Bn, Ss, X, N, Fn, Es, F, ys, z, ze, J, Ee, Yr, y, Vn, Un, Qr, Kr, en, Zr, tn, ie, ut, Q, ei, Ze, Cs, ti, ni, si, ri, ii, oi, ai, _s, ke, Hn, ne, ks, qt, Ge, Xe, Je, Ye, Pe, qn, jn, zn, ci, Ts, ui, zt, nn, fi, di, bs, mi, gi, vi, l, Z, Gn, Xn, R, Jn, Yn, Qn, Kn, $, Zn, es, W, os, as, yi, ls, Is, f, H, _i, Le, b, Te, Se, Jt, Yt, Qt, he, se, ps, Y, Kt, Di, hs, fs, ds, Ns, ms, gs, Fi, Vi, Ui, tt, Rs, $s, Ds, Bs, nt, Fs, Vs, Us, Wi, Hs, Ws, qi, qs, ji, zi, js, zs, Gs, Xs, Js, Ys, Qs, Ks, Zs, Gi, Xi, Ji, Yi, st, er, tr, nr, sr, rr, ir, or, ar, lr, cr, ur, pr, hr, sn, fr, dr, mr, gr, Qi, vr, xr, rt, Sr, Er, yr, Cr, _r, de, te, m, br, _, on, an, ln, Ar, Ir, Nr, Pr, me, eo, it, ot, cn, un, pn, no, so, ro, io; +//#endregion +__esmMin((() => { + Or = Object.defineProperty; + Dr = Object.getPrototypeOf; + Br = Reflect.get; + gn = (t) => { + throw TypeError(t); + }; + vn = (t, e) => { + for (var n in e) Or(t, n, { + get: e[n], + enumerable: !0 + }); + }; + lt = (t, e, n) => e.has(t) || gn("Cannot " + n); + j = (t, e, n) => (lt(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Me = (t, e, n) => e.has(t) ? gn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), ct = (t, e, n, s) => (lt(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n), v = (t, e, n) => (lt(t, e, "access private method"), n); + wn = (t, e, n) => Br(Dr(t), n, e); + Rr = {}; + vn(Rr, { parsers: () => fn }); + fn = {}; + vn(fn, { + __ng_action: () => no, + __ng_binding: () => so, + __ng_directive: () => io, + __ng_interpolation: () => ro + }); + new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`, "g"); + (function(t) { + t[t.Emulated = 0] = "Emulated", t[t.None = 2] = "None", t[t.ShadowDom = 3] = "ShadowDom", t[t.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom"; + })(yn || (yn = {})); + (function(t) { + t[t.OnPush = 0] = "OnPush", t[t.Default = 1] = "Default", t[t.Eager = 1] = "Eager"; + })(Cn || (Cn = {})); + (function(t) { + t[t.None = 0] = "None", t[t.SignalBased = 1] = "SignalBased", t[t.HasDecoratorInputTransform = 2] = "HasDecoratorInputTransform"; + })(_n || (_n = {})); + (function(t) { + t[t.NONE = 0] = "NONE", t[t.HTML = 1] = "HTML", t[t.STYLE = 2] = "STYLE", t[t.SCRIPT = 3] = "SCRIPT", t[t.URL = 4] = "URL", t[t.RESOURCE_URL = 5] = "RESOURCE_URL", t[t.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING"; + })(P || (P = {})); + (function(t) { + t[t.Error = 0] = "Error", t[t.Warning = 1] = "Warning", t[t.Ignore = 2] = "Ignore"; + })(kn || (kn = {})); + (function(t) { + t[t.Directive = 0] = "Directive", t[t.Component = 1] = "Component", t[t.Injectable = 2] = "Injectable", t[t.Pipe = 3] = "Pipe", t[t.NgModule = 4] = "NgModule"; + })(Tn || (Tn = {})); + (function(t) { + t[t.Directive = 0] = "Directive", t[t.Pipe = 1] = "Pipe", t[t.NgModule = 2] = "NgModule"; + })(bn || (bn = {})); + (function(t) { + t[t.Emulated = 0] = "Emulated", t[t.None = 2] = "None", t[t.ShadowDom = 3] = "ShadowDom", t[t.ExperimentalIsolatedShadowDom = 4] = "ExperimentalIsolatedShadowDom"; + })(An || (An = {})); + (function(t) { + t[t.Little = 0] = "Little", t[t.Big = 1] = "Big"; + })(In || (In = {})); + (function(t) { + t[t.None = 0] = "None", t[t.Const = 1] = "Const"; + })(Nn || (Nn = {})); + (function(t) { + t[t.Dynamic = 0] = "Dynamic", t[t.Bool = 1] = "Bool", t[t.String = 2] = "String", t[t.Int = 3] = "Int", t[t.Number = 4] = "Number", t[t.Function = 5] = "Function", t[t.Inferred = 6] = "Inferred", t[t.None = 7] = "None"; + })(Pn || (Pn = {})); + (function(t) { + t[t.Minus = 0] = "Minus", t[t.Plus = 1] = "Plus"; + })(Ln || (Ln = {})); + (function(t) { + t[t.Equals = 0] = "Equals", t[t.NotEquals = 1] = "NotEquals", t[t.Assign = 2] = "Assign", t[t.Identical = 3] = "Identical", t[t.NotIdentical = 4] = "NotIdentical", t[t.Minus = 5] = "Minus", t[t.Plus = 6] = "Plus", t[t.Divide = 7] = "Divide", t[t.Multiply = 8] = "Multiply", t[t.Modulo = 9] = "Modulo", t[t.And = 10] = "And", t[t.Or = 11] = "Or", t[t.BitwiseOr = 12] = "BitwiseOr", t[t.BitwiseAnd = 13] = "BitwiseAnd", t[t.Lower = 14] = "Lower", t[t.LowerEquals = 15] = "LowerEquals", t[t.Bigger = 16] = "Bigger", t[t.BiggerEquals = 17] = "BiggerEquals", t[t.NullishCoalesce = 18] = "NullishCoalesce", t[t.Exponentiation = 19] = "Exponentiation", t[t.In = 20] = "In", t[t.InstanceOf = 21] = "InstanceOf", t[t.AdditionAssignment = 22] = "AdditionAssignment", t[t.SubtractionAssignment = 23] = "SubtractionAssignment", t[t.MultiplicationAssignment = 24] = "MultiplicationAssignment", t[t.DivisionAssignment = 25] = "DivisionAssignment", t[t.RemainderAssignment = 26] = "RemainderAssignment", t[t.ExponentiationAssignment = 27] = "ExponentiationAssignment", t[t.AndAssignment = 28] = "AndAssignment", t[t.OrAssignment = 29] = "OrAssignment", t[t.NullishCoalesceAssignment = 30] = "NullishCoalesceAssignment"; + })(u || (u = {})); + S = class { + type; + sourceSpan; + constructor(e, n) { + this.type = e || null, this.sourceSpan = n || null; + } + prop(e, n) { + return new xt(this, e, null, n); + } + key(e, n, s) { + return new St(this, e, n, s); + } + callFn(e, n, s) { + return new dt(this, e, null, n, s); + } + instantiate(e, n, s) { + return new mt(this, e, n, s); + } + conditional(e, n = null, s) { + return new wt(this, e, n, null, s); + } + equals(e, n) { + return new w(u.Equals, this, e, null, n); + } + notEquals(e, n) { + return new w(u.NotEquals, this, e, null, n); + } + identical(e, n) { + return new w(u.Identical, this, e, null, n); + } + notIdentical(e, n) { + return new w(u.NotIdentical, this, e, null, n); + } + minus(e, n) { + return new w(u.Minus, this, e, null, n); + } + plus(e, n) { + return new w(u.Plus, this, e, null, n); + } + divide(e, n) { + return new w(u.Divide, this, e, null, n); + } + multiply(e, n) { + return new w(u.Multiply, this, e, null, n); + } + modulo(e, n) { + return new w(u.Modulo, this, e, null, n); + } + power(e, n) { + return new w(u.Exponentiation, this, e, null, n); + } + and(e, n) { + return new w(u.And, this, e, null, n); + } + bitwiseOr(e, n) { + return new w(u.BitwiseOr, this, e, null, n); + } + bitwiseAnd(e, n) { + return new w(u.BitwiseAnd, this, e, null, n); + } + or(e, n) { + return new w(u.Or, this, e, null, n); + } + lower(e, n) { + return new w(u.Lower, this, e, null, n); + } + lowerEquals(e, n) { + return new w(u.LowerEquals, this, e, null, n); + } + bigger(e, n) { + return new w(u.Bigger, this, e, null, n); + } + biggerEquals(e, n) { + return new w(u.BiggerEquals, this, e, null, n); + } + isBlank(e) { + return this.equals(TYPED_NULL_EXPR, e); + } + nullishCoalesce(e, n) { + return new w(u.NullishCoalesce, this, e, null, n); + } + toStmt() { + return new De(this, null); + } + }, ht = class t extends S { + name; + constructor(e, n, s) { + super(n, s), this.name = e; + } + isEquivalent(e) { + return e instanceof t && this.name === e.name; + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitReadVarExpr(this, n); + } + clone() { + return new t(this.name, this.type, this.sourceSpan); + } + set(e) { + return new w(u.Assign, this, e, null, this.sourceSpan); + } + }, ft = class t extends S { + expr; + constructor(e, n, s) { + super(n, s), this.expr = e; + } + visitExpression(e, n) { + return e.visitTypeofExpr(this, n); + } + isEquivalent(e) { + return e instanceof t && e.expr.isEquivalent(this.expr); + } + isConstant() { + return this.expr.isConstant(); + } + clone() { + return new t(this.expr.clone()); + } + }; + dt = class t extends S { + fn; + args; + pure; + constructor(e, n, s, r, i = !1) { + super(s, r), this.fn = e, this.args = n, this.pure = i; + } + get receiver() { + return this.fn; + } + isEquivalent(e) { + return e instanceof t && this.fn.isEquivalent(e.fn) && oe(this.args, e.args) && this.pure === e.pure; + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitInvokeFunctionExpr(this, n); + } + clone() { + return new t(this.fn.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan, this.pure); + } + }; + mt = class t extends S { + classExpr; + args; + constructor(e, n, s, r) { + super(s, r), this.classExpr = e, this.args = n; + } + isEquivalent(e) { + return e instanceof t && this.classExpr.isEquivalent(e.classExpr) && oe(this.args, e.args); + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitInstantiateExpr(this, n); + } + clone() { + return new t(this.classExpr.clone(), this.args.map((e) => e.clone()), this.type, this.sourceSpan); + } + }, gt = class t extends S { + body; + flags; + constructor(e, n, s) { + super(null, s), this.body = e, this.flags = n; + } + isEquivalent(e) { + return e instanceof t && this.body === e.body && this.flags === e.flags; + } + isConstant() { + return !0; + } + visitExpression(e, n) { + return e.visitRegularExpressionLiteral(this, n); + } + clone() { + return new t(this.body, this.flags, this.sourceSpan); + } + }, Oe = class t extends S { + value; + constructor(e, n, s) { + super(n, s), this.value = e; + } + isEquivalent(e) { + return e instanceof t && this.value === e.value; + } + isConstant() { + return !0; + } + visitExpression(e, n) { + return e.visitLiteralExpr(this, n); + } + clone() { + return new t(this.value, this.type, this.sourceSpan); + } + }; + vt = class t extends S { + value; + typeParams; + constructor(e, n, s = null, r) { + super(n, r), this.value = e, this.typeParams = s; + } + isEquivalent(e) { + return e instanceof t && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName; + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitExternalExpr(this, n); + } + clone() { + return new t(this.value, this.type, this.typeParams, this.sourceSpan); + } + }; + wt = class t extends S { + condition; + falseCase; + trueCase; + constructor(e, n, s = null, r, i) { + super(r || n.type, i), this.condition = e, this.falseCase = s, this.trueCase = n; + } + isEquivalent(e) { + return e instanceof t && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && Vr(this.falseCase, e.falseCase); + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitConditionalExpr(this, n); + } + clone() { + return new t(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan); + } + }; + w = class t extends S { + operator; + rhs; + lhs; + constructor(e, n, s, r, i) { + super(r || n.type, i), this.operator = e, this.rhs = s, this.lhs = n; + } + isEquivalent(e) { + return e instanceof t && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs); + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitBinaryOperatorExpr(this, n); + } + clone() { + return new t(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan); + } + isAssignment() { + let e = this.operator; + return e === u.Assign || e === u.AdditionAssignment || e === u.SubtractionAssignment || e === u.MultiplicationAssignment || e === u.DivisionAssignment || e === u.RemainderAssignment || e === u.ExponentiationAssignment || e === u.AndAssignment || e === u.OrAssignment || e === u.NullishCoalesceAssignment; + } + }, xt = class t extends S { + receiver; + name; + constructor(e, n, s, r) { + super(s, r), this.receiver = e, this.name = n; + } + get index() { + return this.name; + } + isEquivalent(e) { + return e instanceof t && this.receiver.isEquivalent(e.receiver) && this.name === e.name; + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitReadPropExpr(this, n); + } + set(e) { + return new w(u.Assign, this.receiver.prop(this.name), e, null, this.sourceSpan); + } + clone() { + return new t(this.receiver.clone(), this.name, this.type, this.sourceSpan); + } + }, St = class t extends S { + receiver; + index; + constructor(e, n, s, r) { + super(s, r), this.receiver = e, this.index = n; + } + isEquivalent(e) { + return e instanceof t && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index); + } + isConstant() { + return !1; + } + visitExpression(e, n) { + return e.visitReadKeyExpr(this, n); + } + set(e) { + return new w(u.Assign, this.receiver.key(this.index), e, null, this.sourceSpan); + } + clone() { + return new t(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan); + } + }, Et = class t extends S { + entries; + constructor(e, n, s) { + super(n, s), this.entries = e; + } + isConstant() { + return this.entries.every((e) => e.isConstant()); + } + isEquivalent(e) { + return e instanceof t && oe(this.entries, e.entries); + } + visitExpression(e, n) { + return e.visitLiteralArrayExpr(this, n); + } + clone() { + return new t(this.entries.map((e) => e.clone()), this.type, this.sourceSpan); + } + }; + yt = class t { + expression; + constructor(e) { + this.expression = e; + } + isEquivalent(e) { + return e instanceof t && this.expression.isEquivalent(e.expression); + } + clone() { + return new t(this.expression.clone()); + } + isConstant() { + return this.expression.isConstant(); + } + }, Ct = class t extends S { + entries; + valueType = null; + constructor(e, n, s) { + super(n, s), this.entries = e, n && (this.valueType = n.valueType); + } + isEquivalent(e) { + return e instanceof t && oe(this.entries, e.entries); + } + isConstant() { + return this.entries.every((e) => e.isConstant()); + } + visitExpression(e, n) { + return e.visitLiteralMapExpr(this, n); + } + clone() { + return new t(this.entries.map((n) => n.clone()), this.type, this.sourceSpan); + } + }; + _t = class t extends S { + expression; + constructor(e, n) { + super(null, n), this.expression = e; + } + isEquivalent(e) { + return e instanceof t && this.expression.isEquivalent(e.expression); + } + isConstant() { + return this.expression.isConstant(); + } + visitExpression(e, n) { + return e.visitSpreadElementExpr(this, n); + } + clone() { + return new t(this.expression.clone(), this.sourceSpan); + } + }; + (function(t) { + t[t.None = 0] = "None", t[t.Final = 1] = "Final", t[t.Private = 2] = "Private", t[t.Exported = 4] = "Exported", t[t.Static = 8] = "Static"; + })(ae || (ae = {})); + le = class { + modifiers; + sourceSpan; + leadingComments; + constructor(e = ae.None, n = null, s) { + this.modifiers = e, this.sourceSpan = n, this.leadingComments = s; + } + hasModifier(e) { + return (this.modifiers & e) !== 0; + } + addLeadingComment(e) { + this.leadingComments = this.leadingComments ?? [], this.leadingComments.push(e); + } + }; + De = class t extends le { + expr; + constructor(e, n, s) { + super(ae.None, n, s), this.expr = e; + } + isEquivalent(e) { + return e instanceof t && this.expr.isEquivalent(e.expr); + } + visitStatement(e, n) { + return e.visitExpressionStmt(this, n); + } + }; + (class t { + static INSTANCE = new t(); + keyOf(e) { + if (e instanceof Oe && typeof e.value == "string") return `"${e.value}"`; + if (e instanceof Oe) return String(e.value); + if (e instanceof gt) return `/${e.body}/${e.flags ?? ""}`; + if (e instanceof Et) { + let n = []; + for (let s of e.entries) n.push(this.keyOf(s)); + return `[${n.join(",")}]`; + } else if (e instanceof Ct) { + let n = []; + for (let s of e.entries) if (s instanceof yt) n.push("..." + this.keyOf(s.expression)); + else { + let r = s.key; + s.quoted && (r = `"${r}"`), n.push(r + ":" + this.keyOf(s.value)); + } + return `{${n.join(",")}}`; + } else { + if (e instanceof vt) return `import("${e.value.moduleName}", ${e.value.name})`; + if (e instanceof ht) return `read(${e.name})`; + if (e instanceof ft) return `typeof(${this.keyOf(e.expr)})`; + if (e instanceof _t) return `...${this.keyOf(e.expression)}`; + throw new Error(`${this.constructor.name} does not handle expressions of type ${e.constructor.name}`); + } + } + }); + o = "@angular/core", c = class { + static core = { + name: null, + moduleName: o + }; + static namespaceHTML = { + name: "ɵɵnamespaceHTML", + moduleName: o + }; + static namespaceMathML = { + name: "ɵɵnamespaceMathML", + moduleName: o + }; + static namespaceSVG = { + name: "ɵɵnamespaceSVG", + moduleName: o + }; + static element = { + name: "ɵɵelement", + moduleName: o + }; + static elementStart = { + name: "ɵɵelementStart", + moduleName: o + }; + static elementEnd = { + name: "ɵɵelementEnd", + moduleName: o + }; + static domElement = { + name: "ɵɵdomElement", + moduleName: o + }; + static domElementStart = { + name: "ɵɵdomElementStart", + moduleName: o + }; + static domElementEnd = { + name: "ɵɵdomElementEnd", + moduleName: o + }; + static domElementContainer = { + name: "ɵɵdomElementContainer", + moduleName: o + }; + static domElementContainerStart = { + name: "ɵɵdomElementContainerStart", + moduleName: o + }; + static domElementContainerEnd = { + name: "ɵɵdomElementContainerEnd", + moduleName: o + }; + static domTemplate = { + name: "ɵɵdomTemplate", + moduleName: o + }; + static domListener = { + name: "ɵɵdomListener", + moduleName: o + }; + static advance = { + name: "ɵɵadvance", + moduleName: o + }; + static syntheticHostProperty = { + name: "ɵɵsyntheticHostProperty", + moduleName: o + }; + static syntheticHostListener = { + name: "ɵɵsyntheticHostListener", + moduleName: o + }; + static attribute = { + name: "ɵɵattribute", + moduleName: o + }; + static classProp = { + name: "ɵɵclassProp", + moduleName: o + }; + static elementContainerStart = { + name: "ɵɵelementContainerStart", + moduleName: o + }; + static elementContainerEnd = { + name: "ɵɵelementContainerEnd", + moduleName: o + }; + static elementContainer = { + name: "ɵɵelementContainer", + moduleName: o + }; + static styleMap = { + name: "ɵɵstyleMap", + moduleName: o + }; + static classMap = { + name: "ɵɵclassMap", + moduleName: o + }; + static styleProp = { + name: "ɵɵstyleProp", + moduleName: o + }; + static interpolate = { + name: "ɵɵinterpolate", + moduleName: o + }; + static interpolate1 = { + name: "ɵɵinterpolate1", + moduleName: o + }; + static interpolate2 = { + name: "ɵɵinterpolate2", + moduleName: o + }; + static interpolate3 = { + name: "ɵɵinterpolate3", + moduleName: o + }; + static interpolate4 = { + name: "ɵɵinterpolate4", + moduleName: o + }; + static interpolate5 = { + name: "ɵɵinterpolate5", + moduleName: o + }; + static interpolate6 = { + name: "ɵɵinterpolate6", + moduleName: o + }; + static interpolate7 = { + name: "ɵɵinterpolate7", + moduleName: o + }; + static interpolate8 = { + name: "ɵɵinterpolate8", + moduleName: o + }; + static interpolateV = { + name: "ɵɵinterpolateV", + moduleName: o + }; + static nextContext = { + name: "ɵɵnextContext", + moduleName: o + }; + static resetView = { + name: "ɵɵresetView", + moduleName: o + }; + static templateCreate = { + name: "ɵɵtemplate", + moduleName: o + }; + static defer = { + name: "ɵɵdefer", + moduleName: o + }; + static deferWhen = { + name: "ɵɵdeferWhen", + moduleName: o + }; + static deferOnIdle = { + name: "ɵɵdeferOnIdle", + moduleName: o + }; + static deferOnImmediate = { + name: "ɵɵdeferOnImmediate", + moduleName: o + }; + static deferOnTimer = { + name: "ɵɵdeferOnTimer", + moduleName: o + }; + static deferOnHover = { + name: "ɵɵdeferOnHover", + moduleName: o + }; + static deferOnInteraction = { + name: "ɵɵdeferOnInteraction", + moduleName: o + }; + static deferOnViewport = { + name: "ɵɵdeferOnViewport", + moduleName: o + }; + static deferPrefetchWhen = { + name: "ɵɵdeferPrefetchWhen", + moduleName: o + }; + static deferPrefetchOnIdle = { + name: "ɵɵdeferPrefetchOnIdle", + moduleName: o + }; + static deferPrefetchOnImmediate = { + name: "ɵɵdeferPrefetchOnImmediate", + moduleName: o + }; + static deferPrefetchOnTimer = { + name: "ɵɵdeferPrefetchOnTimer", + moduleName: o + }; + static deferPrefetchOnHover = { + name: "ɵɵdeferPrefetchOnHover", + moduleName: o + }; + static deferPrefetchOnInteraction = { + name: "ɵɵdeferPrefetchOnInteraction", + moduleName: o + }; + static deferPrefetchOnViewport = { + name: "ɵɵdeferPrefetchOnViewport", + moduleName: o + }; + static deferHydrateWhen = { + name: "ɵɵdeferHydrateWhen", + moduleName: o + }; + static deferHydrateNever = { + name: "ɵɵdeferHydrateNever", + moduleName: o + }; + static deferHydrateOnIdle = { + name: "ɵɵdeferHydrateOnIdle", + moduleName: o + }; + static deferHydrateOnImmediate = { + name: "ɵɵdeferHydrateOnImmediate", + moduleName: o + }; + static deferHydrateOnTimer = { + name: "ɵɵdeferHydrateOnTimer", + moduleName: o + }; + static deferHydrateOnHover = { + name: "ɵɵdeferHydrateOnHover", + moduleName: o + }; + static deferHydrateOnInteraction = { + name: "ɵɵdeferHydrateOnInteraction", + moduleName: o + }; + static deferHydrateOnViewport = { + name: "ɵɵdeferHydrateOnViewport", + moduleName: o + }; + static deferEnableTimerScheduling = { + name: "ɵɵdeferEnableTimerScheduling", + moduleName: o + }; + static conditionalCreate = { + name: "ɵɵconditionalCreate", + moduleName: o + }; + static conditionalBranchCreate = { + name: "ɵɵconditionalBranchCreate", + moduleName: o + }; + static conditional = { + name: "ɵɵconditional", + moduleName: o + }; + static repeater = { + name: "ɵɵrepeater", + moduleName: o + }; + static repeaterCreate = { + name: "ɵɵrepeaterCreate", + moduleName: o + }; + static repeaterTrackByIndex = { + name: "ɵɵrepeaterTrackByIndex", + moduleName: o + }; + static repeaterTrackByIdentity = { + name: "ɵɵrepeaterTrackByIdentity", + moduleName: o + }; + static componentInstance = { + name: "ɵɵcomponentInstance", + moduleName: o + }; + static text = { + name: "ɵɵtext", + moduleName: o + }; + static enableBindings = { + name: "ɵɵenableBindings", + moduleName: o + }; + static disableBindings = { + name: "ɵɵdisableBindings", + moduleName: o + }; + static getCurrentView = { + name: "ɵɵgetCurrentView", + moduleName: o + }; + static textInterpolate = { + name: "ɵɵtextInterpolate", + moduleName: o + }; + static textInterpolate1 = { + name: "ɵɵtextInterpolate1", + moduleName: o + }; + static textInterpolate2 = { + name: "ɵɵtextInterpolate2", + moduleName: o + }; + static textInterpolate3 = { + name: "ɵɵtextInterpolate3", + moduleName: o + }; + static textInterpolate4 = { + name: "ɵɵtextInterpolate4", + moduleName: o + }; + static textInterpolate5 = { + name: "ɵɵtextInterpolate5", + moduleName: o + }; + static textInterpolate6 = { + name: "ɵɵtextInterpolate6", + moduleName: o + }; + static textInterpolate7 = { + name: "ɵɵtextInterpolate7", + moduleName: o + }; + static textInterpolate8 = { + name: "ɵɵtextInterpolate8", + moduleName: o + }; + static textInterpolateV = { + name: "ɵɵtextInterpolateV", + moduleName: o + }; + static restoreView = { + name: "ɵɵrestoreView", + moduleName: o + }; + static pureFunction0 = { + name: "ɵɵpureFunction0", + moduleName: o + }; + static pureFunction1 = { + name: "ɵɵpureFunction1", + moduleName: o + }; + static pureFunction2 = { + name: "ɵɵpureFunction2", + moduleName: o + }; + static pureFunction3 = { + name: "ɵɵpureFunction3", + moduleName: o + }; + static pureFunction4 = { + name: "ɵɵpureFunction4", + moduleName: o + }; + static pureFunction5 = { + name: "ɵɵpureFunction5", + moduleName: o + }; + static pureFunction6 = { + name: "ɵɵpureFunction6", + moduleName: o + }; + static pureFunction7 = { + name: "ɵɵpureFunction7", + moduleName: o + }; + static pureFunction8 = { + name: "ɵɵpureFunction8", + moduleName: o + }; + static pureFunctionV = { + name: "ɵɵpureFunctionV", + moduleName: o + }; + static pipeBind1 = { + name: "ɵɵpipeBind1", + moduleName: o + }; + static pipeBind2 = { + name: "ɵɵpipeBind2", + moduleName: o + }; + static pipeBind3 = { + name: "ɵɵpipeBind3", + moduleName: o + }; + static pipeBind4 = { + name: "ɵɵpipeBind4", + moduleName: o + }; + static pipeBindV = { + name: "ɵɵpipeBindV", + moduleName: o + }; + static domProperty = { + name: "ɵɵdomProperty", + moduleName: o + }; + static ariaProperty = { + name: "ɵɵariaProperty", + moduleName: o + }; + static property = { + name: "ɵɵproperty", + moduleName: o + }; + static control = { + name: "ɵɵcontrol", + moduleName: o + }; + static controlCreate = { + name: "ɵɵcontrolCreate", + moduleName: o + }; + static animationEnterListener = { + name: "ɵɵanimateEnterListener", + moduleName: o + }; + static animationLeaveListener = { + name: "ɵɵanimateLeaveListener", + moduleName: o + }; + static animationEnter = { + name: "ɵɵanimateEnter", + moduleName: o + }; + static animationLeave = { + name: "ɵɵanimateLeave", + moduleName: o + }; + static i18n = { + name: "ɵɵi18n", + moduleName: o + }; + static i18nAttributes = { + name: "ɵɵi18nAttributes", + moduleName: o + }; + static i18nExp = { + name: "ɵɵi18nExp", + moduleName: o + }; + static i18nStart = { + name: "ɵɵi18nStart", + moduleName: o + }; + static i18nEnd = { + name: "ɵɵi18nEnd", + moduleName: o + }; + static i18nApply = { + name: "ɵɵi18nApply", + moduleName: o + }; + static i18nPostprocess = { + name: "ɵɵi18nPostprocess", + moduleName: o + }; + static pipe = { + name: "ɵɵpipe", + moduleName: o + }; + static projection = { + name: "ɵɵprojection", + moduleName: o + }; + static projectionDef = { + name: "ɵɵprojectionDef", + moduleName: o + }; + static reference = { + name: "ɵɵreference", + moduleName: o + }; + static inject = { + name: "ɵɵinject", + moduleName: o + }; + static injectAttribute = { + name: "ɵɵinjectAttribute", + moduleName: o + }; + static directiveInject = { + name: "ɵɵdirectiveInject", + moduleName: o + }; + static invalidFactory = { + name: "ɵɵinvalidFactory", + moduleName: o + }; + static invalidFactoryDep = { + name: "ɵɵinvalidFactoryDep", + moduleName: o + }; + static templateRefExtractor = { + name: "ɵɵtemplateRefExtractor", + moduleName: o + }; + static forwardRef = { + name: "forwardRef", + moduleName: o + }; + static resolveForwardRef = { + name: "resolveForwardRef", + moduleName: o + }; + static replaceMetadata = { + name: "ɵɵreplaceMetadata", + moduleName: o + }; + static getReplaceMetadataURL = { + name: "ɵɵgetReplaceMetadataURL", + moduleName: o + }; + static ɵɵdefineInjectable = { + name: "ɵɵdefineInjectable", + moduleName: o + }; + static declareInjectable = { + name: "ɵɵngDeclareInjectable", + moduleName: o + }; + static InjectableDeclaration = { + name: "ɵɵInjectableDeclaration", + moduleName: o + }; + static resolveWindow = { + name: "ɵɵresolveWindow", + moduleName: o + }; + static resolveDocument = { + name: "ɵɵresolveDocument", + moduleName: o + }; + static resolveBody = { + name: "ɵɵresolveBody", + moduleName: o + }; + static getComponentDepsFactory = { + name: "ɵɵgetComponentDepsFactory", + moduleName: o + }; + static defineComponent = { + name: "ɵɵdefineComponent", + moduleName: o + }; + static declareComponent = { + name: "ɵɵngDeclareComponent", + moduleName: o + }; + static setComponentScope = { + name: "ɵɵsetComponentScope", + moduleName: o + }; + static ChangeDetectionStrategy = { + name: "ChangeDetectionStrategy", + moduleName: o + }; + static ViewEncapsulation = { + name: "ViewEncapsulation", + moduleName: o + }; + static ComponentDeclaration = { + name: "ɵɵComponentDeclaration", + moduleName: o + }; + static FactoryDeclaration = { + name: "ɵɵFactoryDeclaration", + moduleName: o + }; + static declareFactory = { + name: "ɵɵngDeclareFactory", + moduleName: o + }; + static FactoryTarget = { + name: "ɵɵFactoryTarget", + moduleName: o + }; + static defineDirective = { + name: "ɵɵdefineDirective", + moduleName: o + }; + static declareDirective = { + name: "ɵɵngDeclareDirective", + moduleName: o + }; + static DirectiveDeclaration = { + name: "ɵɵDirectiveDeclaration", + moduleName: o + }; + static InjectorDef = { + name: "ɵɵInjectorDef", + moduleName: o + }; + static InjectorDeclaration = { + name: "ɵɵInjectorDeclaration", + moduleName: o + }; + static defineInjector = { + name: "ɵɵdefineInjector", + moduleName: o + }; + static declareInjector = { + name: "ɵɵngDeclareInjector", + moduleName: o + }; + static NgModuleDeclaration = { + name: "ɵɵNgModuleDeclaration", + moduleName: o + }; + static ModuleWithProviders = { + name: "ModuleWithProviders", + moduleName: o + }; + static defineNgModule = { + name: "ɵɵdefineNgModule", + moduleName: o + }; + static declareNgModule = { + name: "ɵɵngDeclareNgModule", + moduleName: o + }; + static setNgModuleScope = { + name: "ɵɵsetNgModuleScope", + moduleName: o + }; + static registerNgModuleType = { + name: "ɵɵregisterNgModuleType", + moduleName: o + }; + static PipeDeclaration = { + name: "ɵɵPipeDeclaration", + moduleName: o + }; + static definePipe = { + name: "ɵɵdefinePipe", + moduleName: o + }; + static declarePipe = { + name: "ɵɵngDeclarePipe", + moduleName: o + }; + static declareClassMetadata = { + name: "ɵɵngDeclareClassMetadata", + moduleName: o + }; + static declareClassMetadataAsync = { + name: "ɵɵngDeclareClassMetadataAsync", + moduleName: o + }; + static setClassMetadata = { + name: "ɵsetClassMetadata", + moduleName: o + }; + static setClassMetadataAsync = { + name: "ɵsetClassMetadataAsync", + moduleName: o + }; + static setClassDebugInfo = { + name: "ɵsetClassDebugInfo", + moduleName: o + }; + static queryRefresh = { + name: "ɵɵqueryRefresh", + moduleName: o + }; + static viewQuery = { + name: "ɵɵviewQuery", + moduleName: o + }; + static loadQuery = { + name: "ɵɵloadQuery", + moduleName: o + }; + static contentQuery = { + name: "ɵɵcontentQuery", + moduleName: o + }; + static viewQuerySignal = { + name: "ɵɵviewQuerySignal", + moduleName: o + }; + static contentQuerySignal = { + name: "ɵɵcontentQuerySignal", + moduleName: o + }; + static queryAdvance = { + name: "ɵɵqueryAdvance", + moduleName: o + }; + static twoWayProperty = { + name: "ɵɵtwoWayProperty", + moduleName: o + }; + static twoWayBindingSet = { + name: "ɵɵtwoWayBindingSet", + moduleName: o + }; + static twoWayListener = { + name: "ɵɵtwoWayListener", + moduleName: o + }; + static declareLet = { + name: "ɵɵdeclareLet", + moduleName: o + }; + static storeLet = { + name: "ɵɵstoreLet", + moduleName: o + }; + static readContextLet = { + name: "ɵɵreadContextLet", + moduleName: o + }; + static arrowFunction = { + name: "ɵɵarrowFunction", + moduleName: o + }; + static attachSourceLocations = { + name: "ɵɵattachSourceLocations", + moduleName: o + }; + static NgOnChangesFeature = { + name: "ɵɵNgOnChangesFeature", + moduleName: o + }; + static ControlFeature = { + name: "ɵɵControlFeature", + moduleName: o + }; + static InheritDefinitionFeature = { + name: "ɵɵInheritDefinitionFeature", + moduleName: o + }; + static ProvidersFeature = { + name: "ɵɵProvidersFeature", + moduleName: o + }; + static HostDirectivesFeature = { + name: "ɵɵHostDirectivesFeature", + moduleName: o + }; + static ExternalStylesFeature = { + name: "ɵɵExternalStylesFeature", + moduleName: o + }; + static listener = { + name: "ɵɵlistener", + moduleName: o + }; + static getInheritedFactory = { + name: "ɵɵgetInheritedFactory", + moduleName: o + }; + static sanitizeHtml = { + name: "ɵɵsanitizeHtml", + moduleName: o + }; + static sanitizeStyle = { + name: "ɵɵsanitizeStyle", + moduleName: o + }; + static validateAttribute = { + name: "ɵɵvalidateAttribute", + moduleName: o + }; + static sanitizeResourceUrl = { + name: "ɵɵsanitizeResourceUrl", + moduleName: o + }; + static sanitizeScript = { + name: "ɵɵsanitizeScript", + moduleName: o + }; + static sanitizeUrl = { + name: "ɵɵsanitizeUrl", + moduleName: o + }; + static sanitizeUrlOrResourceUrl = { + name: "ɵɵsanitizeUrlOrResourceUrl", + moduleName: o + }; + static trustConstantHtml = { + name: "ɵɵtrustConstantHtml", + moduleName: o + }; + static trustConstantResourceUrl = { + name: "ɵɵtrustConstantResourceUrl", + moduleName: o + }; + static inputDecorator = { + name: "Input", + moduleName: o + }; + static outputDecorator = { + name: "Output", + moduleName: o + }; + static viewChildDecorator = { + name: "ViewChild", + moduleName: o + }; + static viewChildrenDecorator = { + name: "ViewChildren", + moduleName: o + }; + static contentChildDecorator = { + name: "ContentChild", + moduleName: o + }; + static contentChildrenDecorator = { + name: "ContentChildren", + moduleName: o + }; + static InputSignalBrandWriteType = { + name: "ɵINPUT_SIGNAL_BRAND_WRITE_TYPE", + moduleName: o + }; + static UnwrapDirectiveSignalInputs = { + name: "ɵUnwrapDirectiveSignalInputs", + moduleName: o + }; + static unwrapWritableSignal = { + name: "ɵunwrapWritableSignal", + moduleName: o + }; + static assertType = { + name: "ɵassertType", + moduleName: o + }; + }; + bt = class { + full; + major; + minor; + patch; + constructor(e) { + this.full = e; + let n = e.split("."); + this.major = n[0], this.minor = n[1], this.patch = n.slice(2).join("."); + } + }; + u.And, u.Bigger, u.BiggerEquals, u.BitwiseOr, u.BitwiseAnd, u.Divide, u.Assign, u.Equals, u.Identical, u.Lower, u.LowerEquals, u.Minus, u.Modulo, u.Exponentiation, u.Multiply, u.NotEquals, u.NotIdentical, u.NullishCoalesce, u.Or, u.Plus, u.In, u.InstanceOf, u.AdditionAssignment, u.SubtractionAssignment, u.MultiplicationAssignment, u.DivisionAssignment, u.RemainderAssignment, u.ExponentiationAssignment, u.AndAssignment, u.OrAssignment, u.NullishCoalesceAssignment; + (function(t) { + t[t.Class = 0] = "Class", t[t.Function = 1] = "Function"; + })(Rn || (Rn = {})); + K = class { + start; + end; + constructor(e, n) { + this.start = e, this.end = n; + } + toAbsolute(e) { + return new O(e + this.start, e + this.end); + } + }, g = class { + span; + sourceSpan; + constructor(e, n) { + this.span = e, this.sourceSpan = n; + } + toString() { + return "AST"; + } + }, Ae = class extends g { + nameSpan; + constructor(e, n, s) { + super(e, n), this.nameSpan = s; + } + }, A = class extends g { + visit(e, n = null) { + return e.visitEmptyExpr?.(this, n); + } + }, ce = class extends g { + visit(e, n = null) { + return e.visitImplicitReceiver(this, n); + } + }, At = class extends g { + visit(e, n = null) { + return e.visitThisReceiver?.(this, n); + } + }, It = class extends g { + expressions; + constructor(e, n, s) { + super(e, n), this.expressions = s; + } + visit(e, n = null) { + return e.visitChain(this, n); + } + }, Nt = class extends g { + condition; + trueExp; + falseExp; + constructor(e, n, s, r, i) { + super(e, n), this.condition = s, this.trueExp = r, this.falseExp = i; + } + visit(e, n = null) { + return e.visitConditional(this, n); + } + }, ye = class extends Ae { + receiver; + name; + constructor(e, n, s, r, i) { + super(e, n, s), this.receiver = r, this.name = i; + } + visit(e, n = null) { + return e.visitPropertyRead(this, n); + } + }, Pt = class extends Ae { + receiver; + name; + constructor(e, n, s, r, i) { + super(e, n, s), this.receiver = r, this.name = i; + } + visit(e, n = null) { + return e.visitSafePropertyRead(this, n); + } + }, Fe = class extends g { + receiver; + key; + constructor(e, n, s, r) { + super(e, n), this.receiver = s, this.key = r; + } + visit(e, n = null) { + return e.visitKeyedRead(this, n); + } + }, Lt = class extends g { + receiver; + key; + constructor(e, n, s, r) { + super(e, n), this.receiver = s, this.key = r; + } + visit(e, n = null) { + return e.visitSafeKeyedRead(this, n); + } + }; + (function(t) { + t[t.ReferencedByName = 0] = "ReferencedByName", t[t.ReferencedDirectly = 1] = "ReferencedDirectly"; + })(Ce || (Ce = {})); + Mt = class extends Ae { + exp; + name; + args; + type; + constructor(e, n, s, r, i, a, p) { + super(e, n, p), this.exp = s, this.name = r, this.args = i, this.type = a; + } + visit(e, n = null) { + return e.visitPipe(this, n); + } + }, I = class extends g { + value; + constructor(e, n, s) { + super(e, n), this.value = s; + } + visit(e, n = null) { + return e.visitLiteralPrimitive(this, n); + } + }, Rt = class extends g { + expressions; + constructor(e, n, s) { + super(e, n), this.expressions = s; + } + visit(e, n = null) { + return e.visitLiteralArray(this, n); + } + }, $t = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n = null) { + return e.visitSpreadElement(this, n); + } + }, Ot = class extends g { + keys; + values; + constructor(e, n, s, r) { + super(e, n), this.keys = s, this.values = r; + } + visit(e, n = null) { + return e.visitLiteralMap(this, n); + } + }, Hr = class extends g { + strings; + expressions; + constructor(e, n, s, r) { + super(e, n), this.strings = s, this.expressions = r; + } + visit(e, n = null) { + return e.visitInterpolation(this, n); + } + }, E = class extends g { + operation; + left; + right; + constructor(e, n, s, r, i) { + super(e, n), this.operation = s, this.left = r, this.right = i; + } + visit(e, n = null) { + return e.visitBinary(this, n); + } + static isAssignmentOperation(e) { + return e === "=" || e === "+=" || e === "-=" || e === "*=" || e === "/=" || e === "%=" || e === "**=" || e === "&&=" || e === "||=" || e === "??="; + } + }, _e = class t extends E { + operator; + expr; + left = null; + right = null; + operation = null; + static createMinus(e, n, s) { + return new t(e, n, "-", s, "-", new I(e, n, 0), s); + } + static createPlus(e, n, s) { + return new t(e, n, "+", s, "-", s, new I(e, n, 0)); + } + constructor(e, n, s, r, i, a, p) { + super(e, n, i, a, p), this.operator = s, this.expr = r; + } + visit(e, n = null) { + return e.visitUnary !== void 0 ? e.visitUnary(this, n) : e.visitBinary(this, n); + } + }, Ve = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n = null) { + return e.visitPrefixNot(this, n); + } + }, Ue = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n = null) { + return e.visitTypeofExpression(this, n); + } + }, He = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n = null) { + return e.visitVoidExpression(this, n); + } + }, Dt = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n = null) { + return e.visitNonNullAssert(this, n); + } + }, Bt = class extends g { + receiver; + args; + argumentSpan; + constructor(e, n, s, r, i) { + super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i; + } + visit(e, n = null) { + return e.visitCall(this, n); + } + }, Ft = class extends g { + receiver; + args; + argumentSpan; + constructor(e, n, s, r, i) { + super(e, n), this.receiver = s, this.args = r, this.argumentSpan = i; + } + visit(e, n = null) { + return e.visitSafeCall(this, n); + } + }, We = class extends g { + tag; + template; + constructor(e, n, s, r) { + super(e, n), this.tag = s, this.template = r; + } + visit(e, n) { + return e.visitTaggedTemplateLiteral(this, n); + } + }, qe = class extends g { + elements; + expressions; + constructor(e, n, s, r) { + super(e, n), this.elements = s, this.expressions = r; + } + visit(e, n) { + return e.visitTemplateLiteral(this, n); + } + }, je = class extends g { + text; + constructor(e, n, s) { + super(e, n), this.text = s; + } + visit(e, n) { + return e.visitTemplateLiteralElement(this, n); + } + }, Ie = class extends g { + expression; + constructor(e, n, s) { + super(e, n), this.expression = s; + } + visit(e, n) { + return e.visitParenthesizedExpression(this, n); + } + }, Vt = class { + name; + span; + sourceSpan; + constructor(e, n, s) { + this.name = e, this.span = n, this.sourceSpan = s; + } + }, Ut = class extends g { + parameters; + body; + constructor(e, n, s, r) { + super(e, n), this.parameters = s, this.body = r; + } + visit(e, n) { + return e.visitArrowFunction(this, n); + } + }, Ht = class extends g { + body; + flags; + constructor(e, n, s, r) { + super(e, n), this.body = s, this.flags = r; + } + visit(e, n) { + return e.visitRegularExpressionLiteral(this, n); + } + }, O = class { + start; + end; + constructor(e, n) { + this.start = e, this.end = n; + } + }, U = class extends g { + ast; + source; + location; + errors; + constructor(e, n, s, r, i) { + super(new K(0, n === null ? 0 : n.length), new O(r, n === null ? r : r + n.length)), this.ast = e, this.source = n, this.location = s, this.errors = i; + } + visit(e, n = null) { + return e.visitASTWithSource ? e.visitASTWithSource(this, n) : this.ast.visit(e, n); + } + toString() { + return `${this.source} in ${this.location}`; + } + }, ue = class { + sourceSpan; + key; + value; + constructor(e, n, s) { + this.sourceSpan = e, this.key = n, this.value = s; + } + }, Ne = class { + sourceSpan; + key; + value; + constructor(e, n, s) { + this.sourceSpan = e, this.key = n, this.value = s; + } + }, Wt = class { + visit(e, n) { + e.visit(this, n); + } + visitUnary(e, n) { + this.visit(e.expr, n); + } + visitBinary(e, n) { + this.visit(e.left, n), this.visit(e.right, n); + } + visitChain(e, n) { + this.visitAll(e.expressions, n); + } + visitConditional(e, n) { + this.visit(e.condition, n), this.visit(e.trueExp, n), this.visit(e.falseExp, n); + } + visitPipe(e, n) { + this.visit(e.exp, n), this.visitAll(e.args, n); + } + visitImplicitReceiver(e, n) {} + visitThisReceiver(e, n) {} + visitInterpolation(e, n) { + this.visitAll(e.expressions, n); + } + visitKeyedRead(e, n) { + this.visit(e.receiver, n), this.visit(e.key, n); + } + visitLiteralArray(e, n) { + this.visitAll(e.expressions, n); + } + visitLiteralMap(e, n) { + this.visitAll(e.values, n); + } + visitLiteralPrimitive(e, n) {} + visitPrefixNot(e, n) { + this.visit(e.expression, n); + } + visitTypeofExpression(e, n) { + this.visit(e.expression, n); + } + visitVoidExpression(e, n) { + this.visit(e.expression, n); + } + visitNonNullAssert(e, n) { + this.visit(e.expression, n); + } + visitPropertyRead(e, n) { + this.visit(e.receiver, n); + } + visitSafePropertyRead(e, n) { + this.visit(e.receiver, n); + } + visitSafeKeyedRead(e, n) { + this.visit(e.receiver, n), this.visit(e.key, n); + } + visitCall(e, n) { + this.visit(e.receiver, n), this.visitAll(e.args, n); + } + visitSafeCall(e, n) { + this.visit(e.receiver, n), this.visitAll(e.args, n); + } + visitTemplateLiteral(e, n) { + for (let s = 0; s < e.elements.length; s++) { + this.visit(e.elements[s], n); + let r = s < e.expressions.length ? e.expressions[s] : null; + r !== null && this.visit(r, n); + } + } + visitTemplateLiteralElement(e, n) {} + visitTaggedTemplateLiteral(e, n) { + this.visit(e.tag, n), this.visit(e.template, n); + } + visitParenthesizedExpression(e, n) { + this.visit(e.expression, n); + } + visitArrowFunction(e, n) { + this.visit(e.body, n); + } + visitRegularExpressionLiteral(e, n) {} + visitSpreadElement(e, n) { + this.visit(e.expression, n); + } + visitEmptyExpr(e, n) {} + visitAll(e, n) { + for (let s of e) this.visit(s, n); + } + }; + (function(t) { + t[t.DEFAULT = 0] = "DEFAULT", t[t.LITERAL_ATTR = 1] = "LITERAL_ATTR", t[t.LEGACY_ANIMATION = 2] = "LEGACY_ANIMATION", t[t.TWO_WAY = 3] = "TWO_WAY", t[t.ANIMATION = 4] = "ANIMATION"; + })($n || ($n = {})); + (function(t) { + t[t.Regular = 0] = "Regular", t[t.LegacyAnimation = 1] = "LegacyAnimation", t[t.TwoWay = 2] = "TwoWay", t[t.Animation = 3] = "Animation"; + })(On || (On = {})); + (function(t) { + t[t.Property = 0] = "Property", t[t.Attribute = 1] = "Attribute", t[t.Class = 2] = "Class", t[t.Style = 3] = "Style", t[t.LegacyAnimation = 4] = "LegacyAnimation", t[t.TwoWay = 5] = "TwoWay", t[t.Animation = 6] = "Animation"; + })(M || (M = {})); + (function(t) { + t[t.RAW_TEXT = 0] = "RAW_TEXT", t[t.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", t[t.PARSABLE_DATA = 2] = "PARSABLE_DATA"; + })(Dn || (Dn = {})); + we = 0; + vs = 9, $e = 10, qr = 11, jr = 12, zr = 13, ws = 32, Gr = 33, xs = 34, Xr = 35, Zt = 36, Jr = 37, Bn = 38, Ss = 39, X = 40, N = 41, Fn = 42, Es = 43, F = 44, ys = 45, z = 46, ze = 47, J = 58, Ee = 59, Yr = 60, y = 61, Vn = 62, Un = 63, Qr = 48; + Kr = 57, en = 65, Zr = 69; + tn = 90, ie = 91, ut = 92, Q = 93, ei = 94, Ze = 95, Cs = 97; + ti = 101, ni = 102, si = 110, ri = 114, ii = 116, oi = 117, ai = 118; + _s = 122, ke = 123, Hn = 124, ne = 125, ks = 160; + qt = 96; + Ge = class t { + file; + offset; + line; + col; + constructor(e, n, s, r) { + this.file = e, this.offset = n, this.line = s, this.col = r; + } + toString() { + return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url; + } + moveBy(e) { + let n = this.file.content, s = n.length, r = this.offset, i = this.line, a = this.col; + for (; r > 0 && e < 0;) if (r--, e++, n.charCodeAt(r) == $e) { + i--; + let h = n.substring(0, r - 1).lastIndexOf(String.fromCharCode($e)); + a = h > 0 ? r - h : r; + } else a--; + for (; r < s && e > 0;) { + let p = n.charCodeAt(r); + r++, e--, p == $e ? (i++, a = 0) : a++; + } + return new t(this.file, r, i, a); + } + getContext(e, n) { + let s = this.file.content, r = this.offset; + if (r != null) { + r > s.length - 1 && (r = s.length - 1); + let i = r, a = 0, p = 0; + for (; a < e && r > 0 && (r--, a++, !(s[r] == ` +` && ++p == n));); + for (a = 0, p = 0; a < e && i < s.length - 1 && (i++, a++, !(s[i] == ` +` && ++p == n));); + return { + before: s.substring(r, this.offset), + after: s.substring(this.offset, i + 1) + }; + } + return null; + } + }, Xe = class { + content; + url; + constructor(e, n) { + this.content = e, this.url = n; + } + }, Je = class { + start; + end; + fullStart; + details; + constructor(e, n, s = e, r = null) { + this.start = e, this.end = n, this.fullStart = s, this.details = r; + } + toString() { + return this.start.file.content.substring(this.start.offset, this.end.offset); + } + }; + (function(t) { + t[t.WARNING = 0] = "WARNING", t[t.ERROR = 1] = "ERROR"; + })(Ye || (Ye = {})); + Pe = class extends Error { + span; + msg; + level; + relatedError; + constructor(e, n, s = Ye.ERROR, r) { + super(n), this.span = e, this.msg = n, this.level = s, this.relatedError = r, Object.setPrototypeOf(this, new.target.prototype); + } + contextualMessage() { + let e = this.span.start.getContext(100, 3); + return e ? `${this.msg} ("${e.before}[${Ye[this.level]} ->]${e.after}")` : this.msg; + } + toString() { + let e = this.span.details ? `, ${this.span.details}` : ""; + return `${this.contextualMessage()}: ${this.span.start}${e}`; + } + }; + (function(t) { + t[t.Inline = 0] = "Inline", t[t.SideEffect = 1] = "SideEffect", t[t.Omit = 2] = "Omit"; + })(qn || (qn = {})); + (function(t) { + t[t.Global = 0] = "Global", t[t.Local = 1] = "Local"; + })(jn || (jn = {})); + (function(t) { + t[t.Directive = 0] = "Directive", t[t.Pipe = 1] = "Pipe", t[t.NgModule = 2] = "NgModule"; + })(zn || (zn = {})); + ci = "(:(where|is)\\()?", Ts = "-shadowcsshost", ui = "-shadowcsscontext", zt = "[^)(]*", nn = `(?:\\((${`(?:\\(${`(?:\\(${zt}\\)|${zt})+?`}\\)|${zt})+?`})\\))`; + new RegExp("(:nth-[-\\w]+)" + nn, "g"); + new RegExp(Ts + nn + "?([^,{]*)", "gim"); + fi = ui + nn + "?([^{]*)"; + new RegExp(`${ci}(${fi})`, "gim"); + di = Ts + "-no-combinator"; + new RegExp(`${di}(?![^(]*\\))`, "g"); + bs = "%COMMENT%"; + new RegExp(bs, "g"); + new RegExp(`(\\s*(?:${bs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, "g"); + mi = "%COMMA_IN_PLACEHOLDER%", gi = "%SEMI_IN_PLACEHOLDER%", vi = "%COLON_IN_PLACEHOLDER%"; + new RegExp(mi, "g"); + new RegExp(gi, "g"); + new RegExp(vi, "g"); + (function(t) { + t[t.ListEnd = 0] = "ListEnd", t[t.Statement = 1] = "Statement", t[t.Variable = 2] = "Variable", t[t.ElementStart = 3] = "ElementStart", t[t.Element = 4] = "Element", t[t.Template = 5] = "Template", t[t.ElementEnd = 6] = "ElementEnd", t[t.ContainerStart = 7] = "ContainerStart", t[t.Container = 8] = "Container", t[t.ContainerEnd = 9] = "ContainerEnd", t[t.DisableBindings = 10] = "DisableBindings", t[t.ConditionalCreate = 11] = "ConditionalCreate", t[t.ConditionalBranchCreate = 12] = "ConditionalBranchCreate", t[t.Conditional = 13] = "Conditional", t[t.EnableBindings = 14] = "EnableBindings", t[t.Text = 15] = "Text", t[t.Listener = 16] = "Listener", t[t.InterpolateText = 17] = "InterpolateText", t[t.Binding = 18] = "Binding", t[t.Property = 19] = "Property", t[t.StyleProp = 20] = "StyleProp", t[t.ClassProp = 21] = "ClassProp", t[t.StyleMap = 22] = "StyleMap", t[t.ClassMap = 23] = "ClassMap", t[t.Advance = 24] = "Advance", t[t.Pipe = 25] = "Pipe", t[t.Attribute = 26] = "Attribute", t[t.ExtractedAttribute = 27] = "ExtractedAttribute", t[t.Defer = 28] = "Defer", t[t.DeferOn = 29] = "DeferOn", t[t.DeferWhen = 30] = "DeferWhen", t[t.I18nMessage = 31] = "I18nMessage", t[t.DomProperty = 32] = "DomProperty", t[t.Namespace = 33] = "Namespace", t[t.ProjectionDef = 34] = "ProjectionDef", t[t.Projection = 35] = "Projection", t[t.RepeaterCreate = 36] = "RepeaterCreate", t[t.Repeater = 37] = "Repeater", t[t.TwoWayProperty = 38] = "TwoWayProperty", t[t.TwoWayListener = 39] = "TwoWayListener", t[t.DeclareLet = 40] = "DeclareLet", t[t.StoreLet = 41] = "StoreLet", t[t.I18nStart = 42] = "I18nStart", t[t.I18n = 43] = "I18n", t[t.I18nEnd = 44] = "I18nEnd", t[t.I18nExpression = 45] = "I18nExpression", t[t.I18nApply = 46] = "I18nApply", t[t.IcuStart = 47] = "IcuStart", t[t.IcuEnd = 48] = "IcuEnd", t[t.IcuPlaceholder = 49] = "IcuPlaceholder", t[t.I18nContext = 50] = "I18nContext", t[t.I18nAttributes = 51] = "I18nAttributes", t[t.SourceLocation = 52] = "SourceLocation", t[t.Animation = 53] = "Animation", t[t.AnimationString = 54] = "AnimationString", t[t.AnimationBinding = 55] = "AnimationBinding", t[t.AnimationListener = 56] = "AnimationListener", t[t.Control = 57] = "Control", t[t.ControlCreate = 58] = "ControlCreate"; + })(l || (l = {})); + (function(t) { + t[t.LexicalRead = 0] = "LexicalRead", t[t.Context = 1] = "Context", t[t.TrackContext = 2] = "TrackContext", t[t.ReadVariable = 3] = "ReadVariable", t[t.NextContext = 4] = "NextContext", t[t.Reference = 5] = "Reference", t[t.StoreLet = 6] = "StoreLet", t[t.ContextLetReference = 7] = "ContextLetReference", t[t.GetCurrentView = 8] = "GetCurrentView", t[t.RestoreView = 9] = "RestoreView", t[t.ResetView = 10] = "ResetView", t[t.PureFunctionExpr = 11] = "PureFunctionExpr", t[t.PureFunctionParameterExpr = 12] = "PureFunctionParameterExpr", t[t.PipeBinding = 13] = "PipeBinding", t[t.PipeBindingVariadic = 14] = "PipeBindingVariadic", t[t.SafePropertyRead = 15] = "SafePropertyRead", t[t.SafeKeyedRead = 16] = "SafeKeyedRead", t[t.SafeInvokeFunction = 17] = "SafeInvokeFunction", t[t.SafeTernaryExpr = 18] = "SafeTernaryExpr", t[t.EmptyExpr = 19] = "EmptyExpr", t[t.AssignTemporaryExpr = 20] = "AssignTemporaryExpr", t[t.ReadTemporaryExpr = 21] = "ReadTemporaryExpr", t[t.SlotLiteralExpr = 22] = "SlotLiteralExpr", t[t.ConditionalCase = 23] = "ConditionalCase", t[t.ConstCollected = 24] = "ConstCollected", t[t.TwoWayBindingSet = 25] = "TwoWayBindingSet", t[t.ArrowFunction = 26] = "ArrowFunction"; + })(Z || (Z = {})); + (function(t) { + t[t.None = 0] = "None", t[t.AlwaysInline = 1] = "AlwaysInline"; + })(Gn || (Gn = {})); + (function(t) { + t[t.Context = 0] = "Context", t[t.Identifier = 1] = "Identifier", t[t.SavedView = 2] = "SavedView", t[t.Alias = 3] = "Alias"; + })(Xn || (Xn = {})); + (function(t) { + t[t.Attribute = 0] = "Attribute", t[t.ClassName = 1] = "ClassName", t[t.StyleProperty = 2] = "StyleProperty", t[t.Property = 3] = "Property", t[t.Template = 4] = "Template", t[t.I18n = 5] = "I18n", t[t.LegacyAnimation = 6] = "LegacyAnimation", t[t.TwoWayProperty = 7] = "TwoWayProperty", t[t.Animation = 8] = "Animation"; + })(R || (R = {})); + (function(t) { + t[t.Creation = 0] = "Creation", t[t.Postproccessing = 1] = "Postproccessing"; + })(Jn || (Jn = {})); + (function(t) { + t[t.I18nText = 0] = "I18nText", t[t.I18nAttribute = 1] = "I18nAttribute"; + })(Yn || (Yn = {})); + (function(t) { + t[t.None = 0] = "None", t[t.ElementTag = 1] = "ElementTag", t[t.TemplateTag = 2] = "TemplateTag", t[t.OpenTag = 4] = "OpenTag", t[t.CloseTag = 8] = "CloseTag", t[t.ExpressionIndex = 16] = "ExpressionIndex"; + })(Qn || (Qn = {})); + (function(t) { + t[t.HTML = 0] = "HTML", t[t.SVG = 1] = "SVG", t[t.Math = 2] = "Math"; + })(Kn || (Kn = {})); + (function(t) { + t[t.Idle = 0] = "Idle", t[t.Immediate = 1] = "Immediate", t[t.Timer = 2] = "Timer", t[t.Hover = 3] = "Hover", t[t.Interaction = 4] = "Interaction", t[t.Viewport = 5] = "Viewport", t[t.Never = 6] = "Never"; + })($ || ($ = {})); + (function(t) { + t[t.RootI18n = 0] = "RootI18n", t[t.Icu = 1] = "Icu", t[t.Attr = 2] = "Attr"; + })(Zn || (Zn = {})); + (function(t) { + t[t.NgTemplate = 0] = "NgTemplate", t[t.Structural = 1] = "Structural", t[t.Block = 2] = "Block"; + })(es || (es = {})); + (function(t) { + t[t.None = 0] = "None", t[t.InChildOperation = 1] = "InChildOperation", t[t.InArrowFunctionOperation = 2] = "InArrowFunctionOperation"; + })(W || (W = {})); + l.Element, l.ElementStart, l.Container, l.ContainerStart, l.Template, l.RepeaterCreate, l.ConditionalCreate, l.ConditionalBranchCreate; + (function(t) { + t[t.Tmpl = 0] = "Tmpl", t[t.Host = 1] = "Host", t[t.Both = 2] = "Both"; + })(os || (os = {})); + (function(t) { + t[t.Full = 0] = "Full", t[t.DomOnly = 1] = "DomOnly"; + })(as || (as = {})); + c.ariaProperty, c.ariaProperty, c.attribute, c.attribute, c.classProp, c.classProp, c.element, c.element, c.elementContainer, c.elementContainer, c.elementContainerEnd, c.elementContainerEnd, c.elementContainerStart, c.elementContainerStart, c.elementEnd, c.elementEnd, c.elementStart, c.elementStart, c.domProperty, c.domProperty, c.i18nExp, c.i18nExp, c.listener, c.listener, c.listener, c.listener, c.property, c.property, c.styleProp, c.styleProp, c.syntheticHostListener, c.syntheticHostListener, c.syntheticHostProperty, c.syntheticHostProperty, c.templateCreate, c.templateCreate, c.twoWayProperty, c.twoWayProperty, c.twoWayListener, c.twoWayListener, c.declareLet, c.declareLet, c.conditionalCreate, c.conditionalBranchCreate, c.conditionalBranchCreate, c.conditionalBranchCreate, c.domElement, c.domElement, c.domElementStart, c.domElementStart, c.domElementEnd, c.domElementEnd, c.domElementContainer, c.domElementContainer, c.domElementContainerStart, c.domElementContainerStart, c.domElementContainerEnd, c.domElementContainerEnd, c.domListener, c.domListener, c.domTemplate, c.domTemplate, c.animationEnter, c.animationEnter, c.animationLeave, c.animationLeave, c.animationEnterListener, c.animationEnterListener, c.animationLeaveListener, c.animationLeaveListener; + u.And, u.Bigger, u.BiggerEquals, u.BitwiseOr, u.BitwiseAnd, u.Divide, u.Assign, u.Equals, u.Identical, u.Lower, u.LowerEquals, u.Minus, u.Modulo, u.Exponentiation, u.Multiply, u.NotEquals, u.NotIdentical, u.NullishCoalesce, u.Or, u.Plus, u.In, u.InstanceOf, u.AdditionAssignment, u.SubtractionAssignment, u.MultiplicationAssignment, u.DivisionAssignment, u.RemainderAssignment, u.ExponentiationAssignment, u.AndAssignment, u.OrAssignment, u.NullishCoalesceAssignment; + Object.freeze([]); + l.ElementEnd, l.ElementStart, l.Element, l.ContainerEnd, l.ContainerStart, l.Container, l.I18nEnd, l.I18nStart, l.I18n; + l.Pipe; + yi = {}; + yi.ngsp = ""; + (function(t) { + t.HEX = "hexadecimal", t.DEC = "decimal"; + })(ls || (ls = {})); + Is = ` \f +\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`; + new RegExp(`[^${Is}]`); + new RegExp(`[${Is}]{2,}`, "g"); + (function(t) { + t[t.Character = 0] = "Character", t[t.Identifier = 1] = "Identifier", t[t.PrivateIdentifier = 2] = "PrivateIdentifier", t[t.Keyword = 3] = "Keyword", t[t.String = 4] = "String", t[t.Operator = 5] = "Operator", t[t.Number = 6] = "Number", t[t.RegExpBody = 7] = "RegExpBody", t[t.RegExpFlags = 8] = "RegExpFlags", t[t.Error = 9] = "Error"; + })(f || (f = {})); + (function(t) { + t[t.Plain = 0] = "Plain", t[t.TemplateLiteralPart = 1] = "TemplateLiteralPart", t[t.TemplateLiteralEnd = 2] = "TemplateLiteralEnd"; + })(H || (H = {})); + _i = [ + "var", + "let", + "as", + "null", + "undefined", + "true", + "false", + "if", + "else", + "this", + "typeof", + "void", + "in", + "instanceof" + ], Le = class { + tokenize(e) { + return new Jt(e).scan(); + } + }, b = class { + index; + end; + type; + numValue; + strValue; + constructor(e, n, s, r, i) { + this.index = e, this.end = n, this.type = s, this.numValue = r, this.strValue = i; + } + isCharacter(e) { + return this.type === f.Character && this.numValue === e; + } + isNumber() { + return this.type === f.Number; + } + isString() { + return this.type === f.String; + } + isOperator(e) { + return this.type === f.Operator && this.strValue === e; + } + isIdentifier() { + return this.type === f.Identifier; + } + isPrivateIdentifier() { + return this.type === f.PrivateIdentifier; + } + isKeyword() { + return this.type === f.Keyword; + } + isKeywordLet() { + return this.type === f.Keyword && this.strValue === "let"; + } + isKeywordAs() { + return this.type === f.Keyword && this.strValue === "as"; + } + isKeywordNull() { + return this.type === f.Keyword && this.strValue === "null"; + } + isKeywordUndefined() { + return this.type === f.Keyword && this.strValue === "undefined"; + } + isKeywordTrue() { + return this.type === f.Keyword && this.strValue === "true"; + } + isKeywordFalse() { + return this.type === f.Keyword && this.strValue === "false"; + } + isKeywordThis() { + return this.type === f.Keyword && this.strValue === "this"; + } + isKeywordTypeof() { + return this.type === f.Keyword && this.strValue === "typeof"; + } + isKeywordVoid() { + return this.type === f.Keyword && this.strValue === "void"; + } + isKeywordIn() { + return this.type === f.Keyword && this.strValue === "in"; + } + isKeywordInstanceOf() { + return this.type === f.Keyword && this.strValue === "instanceof"; + } + isError() { + return this.type === f.Error; + } + isRegExpBody() { + return this.type === f.RegExpBody; + } + isRegExpFlags() { + return this.type === f.RegExpFlags; + } + toNumber() { + return this.type === f.Number ? this.numValue : -1; + } + isTemplateLiteralPart() { + return this.isString() && this.kind === H.TemplateLiteralPart; + } + isTemplateLiteralEnd() { + return this.isString() && this.kind === H.TemplateLiteralEnd; + } + isTemplateLiteralInterpolationStart() { + return this.isOperator("${"); + } + toString() { + switch (this.type) { + case f.Character: + case f.Identifier: + case f.Keyword: + case f.Operator: + case f.PrivateIdentifier: + case f.String: + case f.Error: + case f.RegExpBody: + case f.RegExpFlags: return this.strValue; + case f.Number: return this.numValue.toString(); + default: return null; + } + } + }, Te = class extends b { + kind; + constructor(e, n, s, r) { + super(e, n, f.String, 0, s), this.kind = r; + } + }; + Se = new b(-1, -1, f.Character, 0, ""), Jt = class { + input; + tokens = []; + length; + peek = 0; + index = -1; + braceStack = []; + constructor(e) { + this.input = e, this.length = e.length, this.advance(); + } + scan() { + let e = this.scanToken(); + for (; e !== null;) this.tokens.push(e), e = this.scanToken(); + return this.tokens; + } + advance() { + this.peek = ++this.index >= this.length ? we : this.input.charCodeAt(this.index); + } + scanToken() { + let e = this.input, n = this.length, s = this.peek, r = this.index; + for (; s <= ws;) if (++r >= n) { + s = we; + break; + } else s = e.charCodeAt(r); + if (this.peek = s, this.index = r, r >= n) return null; + if (cs(s)) return this.scanIdentifier(); + if (G(s)) return this.scanNumber(r); + let i = r; + switch (s) { + case z: return this.advance(), G(this.peek) ? this.scanNumber(i) : this.peek !== z ? xe(i, this.index, z) : (this.advance(), this.peek === z ? (this.advance(), B(i, this.index, "...")) : this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0)); + case X: + case N: + case ie: + case Q: + case F: + case J: + case Ee: return this.scanCharacter(i, s); + case ke: return this.scanOpenBrace(i, s); + case ne: return this.scanCloseBrace(i, s); + case Ss: + case xs: return this.scanString(); + case qt: return this.advance(), this.scanTemplateLiteralPart(i); + case Xr: return this.scanPrivateIdentifier(); + case Es: return this.scanComplexOperator(i, "+", y, "="); + case ys: return this.scanComplexOperator(i, "-", y, "="); + case ze: return this.isStartOfRegex() ? this.scanRegex(r) : this.scanComplexOperator(i, "/", y, "="); + case Jr: return this.scanComplexOperator(i, "%", y, "="); + case ei: return this.scanOperator(i, "^"); + case Fn: return this.scanStar(i); + case Un: return this.scanQuestion(i); + case Yr: + case Vn: return this.scanComplexOperator(i, String.fromCharCode(s), y, "="); + case Gr: return this.scanComplexOperator(i, "!", y, "=", y, "="); + case y: return this.scanEquals(i); + case Bn: return this.scanComplexOperator(i, "&", Bn, "&", y, "="); + case Hn: return this.scanComplexOperator(i, "|", Hn, "|", y, "="); + case ks: + for (; li(this.peek);) this.advance(); + return this.scanToken(); + } + return this.advance(), this.error(`Unexpected character [${String.fromCharCode(s)}]`, 0); + } + scanCharacter(e, n) { + return this.advance(), xe(e, this.index, n); + } + scanOperator(e, n) { + return this.advance(), B(e, this.index, n); + } + scanOpenBrace(e, n) { + return this.braceStack.push("expression"), this.advance(), xe(e, this.index, n); + } + scanCloseBrace(e, n) { + return this.advance(), this.braceStack.pop() === "interpolation" ? (this.tokens.push(xe(e, this.index, ne)), this.scanTemplateLiteralPart(this.index)) : xe(e, this.index, n); + } + scanComplexOperator(e, n, s, r, i, a) { + this.advance(); + let p = n; + return this.peek == s && (this.advance(), p += r), i != null && this.peek == i && (this.advance(), p += a), B(e, this.index, p); + } + scanEquals(e) { + this.advance(); + let n = "="; + if (this.peek === y) this.advance(), n += "="; + else if (this.peek === Vn) return this.advance(), n += ">", B(e, this.index, n); + return this.peek === y && (this.advance(), n += "="), B(e, this.index, n); + } + scanIdentifier() { + let e = this.index; + for (this.advance(); us(this.peek);) this.advance(); + let n = this.input.substring(e, this.index); + return _i.indexOf(n) > -1 ? bi(e, this.index, n) : ki(e, this.index, n); + } + scanPrivateIdentifier() { + let e = this.index; + if (this.advance(), !cs(this.peek)) return this.error("Invalid character [#]", -1); + for (; us(this.peek);) this.advance(); + let n = this.input.substring(e, this.index); + return Ti(e, this.index, n); + } + scanNumber(e) { + let n = this.index === e, s = !1; + for (this.advance();;) { + if (!G(this.peek)) if (this.peek === Ze) { + if (!G(this.input.charCodeAt(this.index - 1)) || !G(this.input.charCodeAt(this.index + 1))) return this.error("Invalid numeric separator", 0); + s = !0; + } else if (this.peek === z) n = !1; + else if (Li(this.peek)) { + if (this.advance(), Mi(this.peek) && this.advance(), !G(this.peek)) return this.error("Invalid exponent", -1); + n = !1; + } else break; + this.advance(); + } + let r = this.input.substring(e, this.index); + s && (r = r.replace(/_/g, "")); + let i = n ? $i(r) : parseFloat(r); + return Ai(e, this.index, i); + } + scanString() { + let e = this.index, n = this.peek; + this.advance(); + let s = "", r = this.index, i = this.input; + for (; this.peek != n;) if (this.peek == ut) { + let p = this.scanStringBackslash(s, r); + if (typeof p != "string") return p; + s = p, r = this.index; + } else { + if (this.peek == we) return this.error("Unterminated quote", 0); + this.advance(); + } + let a = i.substring(r, this.index); + return this.advance(), new Te(e, this.index, s + a, H.Plain); + } + scanQuestion(e) { + this.advance(); + let n = "?"; + return this.peek === Un ? (n += "?", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === z && (n += ".", this.advance()), B(e, this.index, n); + } + scanTemplateLiteralPart(e) { + let n = "", s = this.index; + for (; this.peek !== qt;) if (this.peek === ut) { + let i = this.scanStringBackslash(n, s); + if (typeof i != "string") return i; + n = i, s = this.index; + } else if (this.peek === Zt) { + let i = this.index; + if (this.advance(), this.peek === ke) return this.braceStack.push("interpolation"), this.tokens.push(new Te(e, i, n + this.input.substring(s, i), H.TemplateLiteralPart)), this.advance(), B(i, this.index, this.input.substring(i, this.index)); + } else { + if (this.peek === we) return this.error("Unterminated template literal", 0); + this.advance(); + } + let r = this.input.substring(s, this.index); + return this.advance(), new Te(e, this.index, n + r, H.TemplateLiteralEnd); + } + error(e, n) { + let s = this.index + n; + return Ii(s, this.index, `Lexer Error: ${e} at column ${s} in expression [${this.input}]`); + } + scanStringBackslash(e, n) { + e += this.input.substring(n, this.index); + let s; + if (this.advance(), this.peek === oi) { + let r = this.input.substring(this.index + 1, this.index + 5); + if (/^[0-9a-f]+$/i.test(r)) s = parseInt(r, 16); + else return this.error(`Invalid unicode escape [\\u${r}]`, 0); + for (let i = 0; i < 5; i++) this.advance(); + } else s = Ri(this.peek), this.advance(); + return e += String.fromCharCode(s), e; + } + scanStar(e) { + this.advance(); + let n = "*"; + return this.peek === Fn ? (n += "*", this.advance(), this.peek === y && (n += "=", this.advance())) : this.peek === y && (n += "=", this.advance()), B(e, this.index, n); + } + isStartOfRegex() { + if (this.tokens.length === 0) return !0; + let e = this.tokens[this.tokens.length - 1]; + if (e.isOperator("!")) { + let n = this.tokens.length > 1 ? this.tokens[this.tokens.length - 2] : null; + return n === null || n.type !== f.Identifier && !n.isCharacter(N) && !n.isCharacter(Q); + } + return e.type === f.Operator || e.isCharacter(X) || e.isCharacter(ie) || e.isCharacter(F) || e.isCharacter(J); + } + scanRegex(e) { + this.advance(); + let n = this.index, s = !1, r = !1; + for (;;) { + let h = this.peek; + if (h === we) return this.error("Unterminated regular expression", 0); + if (s) s = !1; + else if (h === ut) s = !0; + else if (h === ie) r = !0; + else if (h === Q) r = !1; + else if (h === ze && !r) break; + this.advance(); + } + let i = this.input.substring(n, this.index); + this.advance(); + let a = Ni(e, this.index, i), p = this.scanRegexFlags(this.index); + return p !== null ? (this.tokens.push(a), p) : a; + } + scanRegexFlags(e) { + if (!jt(this.peek)) return null; + for (; jt(this.peek);) this.advance(); + return Pi(e, this.index, this.input.substring(e, this.index)); + } + }; + Yt = class { + strings; + expressions; + offsets; + constructor(e, n, s) { + this.strings = e, this.expressions = n, this.offsets = s; + } + }, Qt = class { + templateBindings; + warnings; + errors; + constructor(e, n, s) { + this.templateBindings = e, this.warnings = n, this.errors = s; + } + }; + he = class { + _lexer; + _supportsDirectPipeReferences; + constructor(e, n = !1) { + this._lexer = e, this._supportsDirectPipeReferences = n; + } + parseAction(e, n, s) { + let r = []; + this._checkNoInterpolation(r, e, n); + let { stripped: i } = this._stripComments(e); + return new U(new Y(e, n, s, this._lexer.tokenize(i), 1, r, 0, this._supportsDirectPipeReferences).parseChain(), e, V(n), s, r); + } + parseBinding(e, n, s) { + let r = []; + return new U(this._parseBindingAst(e, n, s, r), e, V(n), s, r); + } + checkSimpleExpression(e) { + let n = new Kt(); + return e.visit(n), n.errors; + } + parseSimpleBinding(e, n, s) { + let r = [], i = this._parseBindingAst(e, n, s, r), a = this.checkSimpleExpression(i); + return a.length > 0 && r.push(re(`Host binding expression cannot contain ${a.join(" ")}`, e, "", n)), new U(i, e, V(n), s, r); + } + _parseBindingAst(e, n, s, r) { + this._checkNoInterpolation(r, e, n); + let { stripped: i } = this._stripComments(e); + return new Y(e, n, s, this._lexer.tokenize(i), 0, r, 0, this._supportsDirectPipeReferences).parseChain(); + } + parseTemplateBindings(e, n, s, r, i) { + return new Y(n, s, i, this._lexer.tokenize(n), 0, [], 0, this._supportsDirectPipeReferences).parseTemplateBindings({ + source: e, + span: new O(r, r + e.length) + }); + } + parseInterpolation(e, n, s, r) { + let i = [], { strings: a, expressions: p, offsets: h } = this.splitInterpolation(e, n, i, r); + if (p.length === 0) return null; + let d = []; + for (let x = 0; x < p.length; ++x) { + let D = r?.[x * 2 + 1]?.sourceSpan, k = p[x].text, { stripped: T, hasComments: C } = this._stripComments(k), q = this._lexer.tokenize(T); + if (C && T.trim().length === 0 && q.length === 0) { + i.push(re("Interpolation expression cannot only contain a comment", e, `at column ${p[x].start} in`, n)); + continue; + } + let ge = new Y(D ? k : e, D || n, s, q, 0, i, h[x], this._supportsDirectPipeReferences).parseChain(); + d.push(ge); + } + return this.createInterpolationAst(a.map((x) => x.text), d, e, V(n), s, i); + } + parseInterpolationExpression(e, n, s) { + let { stripped: r } = this._stripComments(e), i = this._lexer.tokenize(r), a = [], p = new Y(e, n, s, i, 0, a, 0, this._supportsDirectPipeReferences).parseChain(); + return this.createInterpolationAst(["", ""], [p], e, V(n), s, a); + } + createInterpolationAst(e, n, s, r, i, a) { + let p = new K(0, s.length); + return new U(new Hr(p, p.toAbsolute(i), e, n), s, r, i, a); + } + splitInterpolation(e, n, s, r) { + let i = [], a = [], p = [], h = r ? Oi(r) : null, d = 0, x = !1, D = !1, k = "{{", T = "}}"; + for (; d < e.length;) if (x) { + let C = d, q = C + 2, ge = this._getInterpolationEndIndex(e, T, q); + if (ge === -1) { + x = !1, D = !0; + break; + } + let dn = ge + 2, mn = e.substring(q, ge); + mn.trim().length === 0 && s.push(re("Blank expressions are not allowed in interpolated strings", e, `at column ${d} in`, n)), a.push({ + text: mn, + start: C, + end: dn + }); + let $r = (h?.get(C) ?? C) + 2; + p.push($r), d = dn, x = !1; + } else { + let C = d; + d = e.indexOf(k, d), d === -1 && (d = e.length); + let q = e.substring(C, d); + i.push({ + text: q, + start: C, + end: d + }), x = !0; + } + if (!x) if (D) { + let C = i[i.length - 1]; + C.text += e.substring(d), C.end = e.length; + } else i.push({ + text: e.substring(d), + start: d, + end: e.length + }); + return new Yt(i, a, p); + } + wrapLiteralPrimitive(e, n, s) { + let r = new K(0, e == null ? 0 : e.length); + return new U(new I(r, r.toAbsolute(s), e), e, typeof n == "string" ? n : V(n), s, []); + } + _stripComments(e) { + let n = this._commentStart(e); + return n != null ? { + stripped: e.substring(0, n), + hasComments: !0 + } : { + stripped: e, + hasComments: !1 + }; + } + _commentStart(e) { + let n = null; + for (let s = 0; s < e.length - 1; s++) { + let r = e.charCodeAt(s), i = e.charCodeAt(s + 1); + if (r === ze && i == ze && n == null) return s; + n === r ? n = null : n == null && Wn(r) && (n = r); + } + return null; + } + _checkNoInterpolation(e, n, s) { + let r = -1, i = -1; + for (let a of this._forEachUnquotedChar(n, 0)) if (r === -1) n.startsWith("{{") && (r = a); + else if (i = this._getInterpolationEndIndex(n, "}}", a), i > -1) break; + r > -1 && i > -1 && e.push(re("Got interpolation ({{}}) where expression was expected", n, `at column ${r} in`, s)); + } + _getInterpolationEndIndex(e, n, s) { + for (let r of this._forEachUnquotedChar(e, s)) { + if (e.startsWith(n, r)) return r; + if (e.startsWith("//", r)) return e.indexOf(n, r); + } + return -1; + } + *_forEachUnquotedChar(e, n) { + let s = null, r = 0; + for (let i = n; i < e.length; i++) { + let a = e[i]; + Wn(e.charCodeAt(i)) && (s === null || s === a) && r % 2 === 0 ? s = s === null ? a : null : s === null && (yield i), r = a === "\\" ? r + 1 : 0; + } + } + }; + (function(t) { + t[t.None = 0] = "None", t[t.Writable = 1] = "Writable"; + })(se || (se = {})); + ps = /* @__PURE__ */ new Set([ + "d", + "g", + "i", + "m", + "s", + "u", + "v", + "y" + ]), Y = class { + input; + parseSourceSpan; + absoluteOffset; + tokens; + parseFlags; + errors; + offset; + supportsDirectPipeReferences; + rparensExpected = 0; + rbracketsExpected = 0; + rbracesExpected = 0; + context = se.None; + sourceSpanCache = /* @__PURE__ */ new Map(); + index = 0; + constructor(e, n, s, r, i, a, p, h) { + this.input = e, this.parseSourceSpan = n, this.absoluteOffset = s, this.tokens = r, this.parseFlags = i, this.errors = a, this.offset = p, this.supportsDirectPipeReferences = h; + } + peek(e) { + let n = this.index + e; + return n < this.tokens.length ? this.tokens[n] : Se; + } + get next() { + return this.peek(0); + } + get atEOF() { + return this.index >= this.tokens.length; + } + get inputIndex() { + return this.atEOF ? this.currentEndIndex : this.next.index + this.offset; + } + get currentEndIndex() { + return this.index > 0 ? this.peek(-1).end + this.offset : this.tokens.length === 0 ? this.input.length + this.offset : this.next.index + this.offset; + } + get currentAbsoluteOffset() { + return this.absoluteOffset + this.inputIndex; + } + span(e, n) { + let s = this.currentEndIndex; + if (n !== void 0 && n > this.currentEndIndex && (s = n), e > s) { + let r = s; + s = e, e = r; + } + return new K(e, s); + } + sourceSpan(e, n) { + let s = `${e}@${this.inputIndex}:${n}`; + return this.sourceSpanCache.has(s) || this.sourceSpanCache.set(s, this.span(e, n).toAbsolute(this.absoluteOffset)), this.sourceSpanCache.get(s); + } + advance() { + this.index++; + } + withContext(e, n) { + this.context |= e; + let s = n(); + return this.context ^= e, s; + } + consumeOptionalCharacter(e) { + return this.next.isCharacter(e) ? (this.advance(), !0) : !1; + } + peekKeywordLet() { + return this.next.isKeywordLet(); + } + peekKeywordAs() { + return this.next.isKeywordAs(); + } + expectCharacter(e) { + this.consumeOptionalCharacter(e) || this.error(`Missing expected ${String.fromCharCode(e)}`); + } + consumeOptionalOperator(e) { + return this.next.isOperator(e) ? (this.advance(), !0) : !1; + } + isAssignmentOperator(e) { + return e.type === f.Operator && E.isAssignmentOperation(e.strValue); + } + expectOperator(e) { + this.consumeOptionalOperator(e) || this.error(`Missing expected operator ${e}`); + } + prettyPrintToken(e) { + return e === Se ? "end of input" : `token ${e}`; + } + expectIdentifierOrKeyword() { + let e = this.next; + return !e.isIdentifier() && !e.isKeyword() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier or keyword") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`), null) : (this.advance(), e.toString()); + } + expectIdentifierOrKeywordOrString() { + let e = this.next; + return !e.isIdentifier() && !e.isKeyword() && !e.isString() ? (e.isPrivateIdentifier() ? this._reportErrorForPrivateIdentifier(e, "expected identifier, keyword or string") : this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`), "") : (this.advance(), e.toString()); + } + parseChain() { + let e = [], n = this.inputIndex; + for (; this.index < this.tokens.length;) { + let s = this.parsePipe(); + if (e.push(s), this.consumeOptionalCharacter(Ee)) for (this.parseFlags & 1 || this.error("Binding expression cannot contain chained expression"); this.consumeOptionalCharacter(Ee);); + else if (this.index < this.tokens.length) { + let r = this.index; + if (this.error(`Unexpected token '${this.next}'`), this.index === r) break; + } + } + if (e.length === 0) { + let s = this.offset, r = this.offset + this.input.length; + return new A(this.span(s, r), this.sourceSpan(s, r)); + } + return e.length == 1 ? e[0] : new It(this.span(n), this.sourceSpan(n), e); + } + parsePipe() { + let e = this.inputIndex, n = this.parseExpression(); + if (this.consumeOptionalOperator("|")) { + this.parseFlags & 1 && this.error("Cannot have a pipe in an action expression"); + do { + let s = this.inputIndex, r = this.expectIdentifierOrKeyword(), i, a; + r !== null ? i = this.sourceSpan(s) : (r = "", a = this.next.index !== -1 ? this.next.index : this.input.length + this.offset, i = new K(a, a).toAbsolute(this.absoluteOffset)); + let p = []; + for (; this.consumeOptionalCharacter(J);) p.push(this.parseExpression()); + let h; + if (this.supportsDirectPipeReferences) { + let d = r.charCodeAt(0); + h = d === Ze || d >= en && d <= tn ? Ce.ReferencedDirectly : Ce.ReferencedByName; + } else h = Ce.ReferencedByName; + n = new Mt(this.span(e), this.sourceSpan(e, a), n, r, p, h, i); + } while (this.consumeOptionalOperator("|")); + } + return n; + } + parseExpression() { + return this.parseConditional(); + } + parseConditional() { + let e = this.inputIndex, n = this.parseLogicalOr(); + if (this.consumeOptionalOperator("?")) { + let s = this.parsePipe(), r; + if (this.consumeOptionalCharacter(J)) r = this.parsePipe(); + else { + let i = this.inputIndex, a = this.input.substring(e, i); + this.error(`Conditional expression ${a} requires all 3 expressions`), r = new A(this.span(e), this.sourceSpan(e)); + } + return new Nt(this.span(e), this.sourceSpan(e), n, s, r); + } else return n; + } + parseLogicalOr() { + let e = this.inputIndex, n = this.parseLogicalAnd(); + for (; this.consumeOptionalOperator("||");) { + let s = this.parseLogicalAnd(); + n = new E(this.span(e), this.sourceSpan(e), "||", n, s); + } + return n; + } + parseLogicalAnd() { + let e = this.inputIndex, n = this.parseNullishCoalescing(); + for (; this.consumeOptionalOperator("&&");) { + let s = this.parseNullishCoalescing(); + n = new E(this.span(e), this.sourceSpan(e), "&&", n, s); + } + return n; + } + parseNullishCoalescing() { + let e = this.inputIndex, n = this.parseEquality(); + for (; this.consumeOptionalOperator("??");) { + let s = this.parseEquality(); + n = new E(this.span(e), this.sourceSpan(e), "??", n, s); + } + return n; + } + parseEquality() { + let e = this.inputIndex, n = this.parseRelational(); + for (; this.next.type == f.Operator;) { + let s = this.next.strValue; + switch (s) { + case "==": + case "===": + case "!=": + case "!==": + this.advance(); + let r = this.parseRelational(); + n = new E(this.span(e), this.sourceSpan(e), s, n, r); + continue; + } + break; + } + return n; + } + parseRelational() { + let e = this.inputIndex, n = this.parseAdditive(); + for (; this.next.type == f.Operator || this.next.isKeywordIn() || this.next.isKeywordInstanceOf();) { + let s = this.next.strValue; + switch (s) { + case "<": + case ">": + case "<=": + case ">=": + case "in": + case "instanceof": + this.advance(); + let r = this.parseAdditive(); + n = new E(this.span(e), this.sourceSpan(e), s, n, r); + continue; + } + break; + } + return n; + } + parseAdditive() { + let e = this.inputIndex, n = this.parseMultiplicative(); + for (; this.next.type == f.Operator;) { + let s = this.next.strValue; + switch (s) { + case "+": + case "-": + this.advance(); + let r = this.parseMultiplicative(); + n = new E(this.span(e), this.sourceSpan(e), s, n, r); + continue; + } + break; + } + return n; + } + parseMultiplicative() { + let e = this.inputIndex, n = this.parseExponentiation(); + for (; this.next.type == f.Operator;) { + let s = this.next.strValue; + switch (s) { + case "*": + case "%": + case "/": + this.advance(); + let r = this.parseExponentiation(); + n = new E(this.span(e), this.sourceSpan(e), s, n, r); + continue; + } + break; + } + return n; + } + parseExponentiation() { + let e = this.inputIndex, n = this.parsePrefix(); + for (; this.next.type == f.Operator && this.next.strValue === "**";) { + (n instanceof _e || n instanceof Ve || n instanceof Ue || n instanceof He) && this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"), this.advance(); + let s = this.parseExponentiation(); + n = new E(this.span(e), this.sourceSpan(e), "**", n, s); + } + return n; + } + parsePrefix() { + if (this.next.type == f.Operator) { + let e = this.inputIndex, n = this.next.strValue, s; + switch (n) { + case "+": return this.advance(), s = this.parsePrefix(), _e.createPlus(this.span(e), this.sourceSpan(e), s); + case "-": return this.advance(), s = this.parsePrefix(), _e.createMinus(this.span(e), this.sourceSpan(e), s); + case "!": return this.advance(), s = this.parsePrefix(), new Ve(this.span(e), this.sourceSpan(e), s); + } + } else if (this.next.isKeywordTypeof()) { + let e = this.inputIndex; + this.advance(); + let n = this.parsePrefix(); + return new Ue(this.span(e), this.sourceSpan(e), n); + } else if (this.next.isKeywordVoid()) { + let e = this.inputIndex; + this.advance(); + let n = this.parsePrefix(); + return new He(this.span(e), this.sourceSpan(e), n); + } + return this.parseCallChain(); + } + parseCallChain() { + let e = this.inputIndex, n = this.parsePrimary(); + for (;;) if (this.consumeOptionalCharacter(z)) n = this.parseAccessMember(n, e, !1); + else if (this.consumeOptionalOperator("?.")) this.consumeOptionalCharacter(X) ? n = this.parseCall(n, e, !0) : n = this.consumeOptionalCharacter(ie) ? this.parseKeyedReadOrWrite(n, e, !0) : this.parseAccessMember(n, e, !0); + else if (this.consumeOptionalCharacter(ie)) n = this.parseKeyedReadOrWrite(n, e, !1); + else if (this.consumeOptionalCharacter(X)) n = this.parseCall(n, e, !1); + else if (this.consumeOptionalOperator("!")) n = new Dt(this.span(e), this.sourceSpan(e), n); + else if (this.next.isTemplateLiteralEnd()) n = this.parseNoInterpolationTaggedTemplateLiteral(n, e); + else if (this.next.isTemplateLiteralPart()) n = this.parseTaggedTemplateLiteral(n, e); + else return n; + } + parsePrimary() { + let e = this.inputIndex; + if (this.isArrowFunction()) return this.parseArrowFunction(e); + if (this.consumeOptionalCharacter(X)) { + this.rparensExpected++; + let n = this.parsePipe(); + return this.consumeOptionalCharacter(N) || (this.error("Missing closing parentheses"), this.consumeOptionalCharacter(N)), this.rparensExpected--, new Ie(this.span(e), this.sourceSpan(e), n); + } else { + if (this.next.isKeywordNull()) return this.advance(), new I(this.span(e), this.sourceSpan(e), null); + if (this.next.isKeywordUndefined()) return this.advance(), new I(this.span(e), this.sourceSpan(e), void 0); + if (this.next.isKeywordTrue()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !0); + if (this.next.isKeywordFalse()) return this.advance(), new I(this.span(e), this.sourceSpan(e), !1); + if (this.next.isKeywordIn()) return this.advance(), new I(this.span(e), this.sourceSpan(e), "in"); + if (this.next.isKeywordThis()) return this.advance(), new At(this.span(e), this.sourceSpan(e)); + if (this.consumeOptionalCharacter(ie)) return this.parseLiteralArray(e); + if (this.next.isCharacter(ke)) return this.parseLiteralMap(); + if (this.next.isIdentifier()) return this.parseAccessMember(new ce(this.span(e), this.sourceSpan(e)), e, !1); + if (this.next.isNumber()) { + let n = this.next.toNumber(); + return this.advance(), new I(this.span(e), this.sourceSpan(e), n); + } else { + if (this.next.isTemplateLiteralEnd()) return this.parseNoInterpolationTemplateLiteral(); + if (this.next.isTemplateLiteralPart()) return this.parseTemplateLiteral(); + if (this.next.isString() && this.next.kind === H.Plain) { + let n = this.next.toString(); + return this.advance(), new I(this.span(e), this.sourceSpan(e), n); + } else return this.next.isPrivateIdentifier() ? (this._reportErrorForPrivateIdentifier(this.next, null), new A(this.span(e), this.sourceSpan(e))) : this.next.isRegExpBody() ? this.parseRegularExpressionLiteral() : this.index >= this.tokens.length ? (this.error(`Unexpected end of expression: ${this.input}`), new A(this.span(e), this.sourceSpan(e))) : (this.error(`Unexpected token ${this.next}`), new A(this.span(e), this.sourceSpan(e))); + } + } + } + parseLiteralArray(e) { + this.rbracketsExpected++; + let n = []; + do + if (this.next.isOperator("...")) n.push(this.parseSpreadElement()); + else if (!this.next.isCharacter(Q)) n.push(this.parsePipe()); + else break; + while (this.consumeOptionalCharacter(F)); + return this.rbracketsExpected--, this.expectCharacter(Q), new Rt(this.span(e), this.sourceSpan(e), n); + } + parseLiteralMap() { + let e = [], n = [], s = this.inputIndex; + if (this.expectCharacter(ke), !this.consumeOptionalCharacter(ne)) { + this.rbracesExpected++; + do { + let r = this.inputIndex; + if (this.next.isOperator("...")) { + this.advance(), e.push({ + kind: "spread", + span: this.span(r), + sourceSpan: this.sourceSpan(r) + }), n.push(this.parsePipe()); + continue; + } + let i = this.next.isString(), a = this.expectIdentifierOrKeywordOrString(), p = this.span(r), h = this.sourceSpan(r), d = { + kind: "property", + key: a, + quoted: i, + span: p, + sourceSpan: h + }; + e.push(d), i ? (this.expectCharacter(J), n.push(this.parsePipe())) : this.consumeOptionalCharacter(J) ? n.push(this.parsePipe()) : (d.isShorthandInitialized = !0, n.push(new ye(p, h, h, new ce(p, h), a))); + } while (this.consumeOptionalCharacter(F) && !this.next.isCharacter(ne)); + this.rbracesExpected--, this.expectCharacter(ne); + } + return new Ot(this.span(s), this.sourceSpan(s), e, n); + } + parseAccessMember(e, n, s) { + let r = this.inputIndex, i = this.withContext(se.Writable, () => { + let p = this.expectIdentifierOrKeyword() ?? ""; + return p.length === 0 && this.error("Expected identifier for property access", e.span.end), p; + }), a = this.sourceSpan(r); + if (s) return this.isAssignmentOperator(this.next) ? (this.advance(), this.error("The '?.' operator cannot be used in the assignment"), new A(this.span(n), this.sourceSpan(n))) : new Pt(this.span(n), this.sourceSpan(n), a, e, i); + if (this.isAssignmentOperator(this.next)) { + let p = this.next.strValue; + if (!(this.parseFlags & 1)) return this.advance(), this.error("Bindings cannot contain assignments"), new A(this.span(n), this.sourceSpan(n)); + let h = new ye(this.span(n), this.sourceSpan(n), a, e, i); + this.advance(); + let d = this.parseConditional(); + return new E(this.span(n), this.sourceSpan(n), p, h, d); + } else return new ye(this.span(n), this.sourceSpan(n), a, e, i); + } + parseCall(e, n, s) { + let r = this.inputIndex; + this.rparensExpected++; + let i = this.parseCallArguments(), a = this.span(r, this.inputIndex).toAbsolute(this.absoluteOffset); + this.expectCharacter(N), this.rparensExpected--; + let p = this.span(n), h = this.sourceSpan(n); + return s ? new Ft(p, h, e, i, a) : new Bt(p, h, e, i, a); + } + parseCallArguments() { + if (this.next.isCharacter(N)) return []; + let e = []; + do + e.push(this.next.isOperator("...") ? this.parseSpreadElement() : this.parsePipe()); + while (this.consumeOptionalCharacter(F)); + return e; + } + parseSpreadElement() { + this.next.isOperator("...") || this.error("Spread element must start with '...' operator"); + let e = this.inputIndex; + this.advance(); + let n = this.parsePipe(); + return new $t(this.span(e), this.sourceSpan(e), n); + } + expectTemplateBindingKey() { + let e = "", n = !1, s = this.currentAbsoluteOffset; + do + e += this.expectIdentifierOrKeywordOrString(), n = this.consumeOptionalOperator("-"), n && (e += "-"); + while (n); + return { + source: e, + span: new O(s, s + e.length) + }; + } + parseTemplateBindings(e) { + let n = []; + for (n.push(...this.parseDirectiveKeywordBindings(e)); this.index < this.tokens.length;) { + let s = this.parseLetBinding(); + if (s) n.push(s); + else { + let r = this.expectTemplateBindingKey(), i = this.parseAsBinding(r); + i ? n.push(i) : (r.source = e.source + r.source.charAt(0).toUpperCase() + r.source.substring(1), n.push(...this.parseDirectiveKeywordBindings(r))); + } + this.consumeStatementTerminator(); + } + return new Qt(n, [], this.errors); + } + parseKeyedReadOrWrite(e, n, s) { + return this.withContext(se.Writable, () => { + this.rbracketsExpected++; + let r = this.parsePipe(); + if (r instanceof A && this.error("Key access cannot be empty"), this.rbracketsExpected--, this.expectCharacter(Q), this.isAssignmentOperator(this.next)) { + let i = this.next.strValue; + if (s) this.advance(), this.error("The '?.' operator cannot be used in the assignment"); + else { + let a = new Fe(this.span(n), this.sourceSpan(n), e, r); + this.advance(); + let p = this.parseConditional(); + return new E(this.span(n), this.sourceSpan(n), i, a, p); + } + } else return s ? new Lt(this.span(n), this.sourceSpan(n), e, r) : new Fe(this.span(n), this.sourceSpan(n), e, r); + return new A(this.span(n), this.sourceSpan(n)); + }); + } + parseDirectiveKeywordBindings(e) { + let n = []; + this.consumeOptionalCharacter(J); + let s = this.getDirectiveBoundTarget(), r = this.currentAbsoluteOffset, i = this.parseAsBinding(e); + i || (this.consumeStatementTerminator(), r = this.currentAbsoluteOffset); + let a = new O(e.span.start, r); + return n.push(new Ne(a, e, s)), i && n.push(i), n; + } + getDirectiveBoundTarget() { + if (this.next === Se || this.peekKeywordAs() || this.peekKeywordLet()) return null; + let e = this.parsePipe(), { start: n, end: s } = e.span; + return new U(e, this.input.substring(n, s), V(this.parseSourceSpan), this.absoluteOffset + n, this.errors); + } + parseAsBinding(e) { + if (!this.peekKeywordAs()) return null; + this.advance(); + let n = this.expectTemplateBindingKey(); + this.consumeStatementTerminator(); + return new ue(new O(e.span.start, this.currentAbsoluteOffset), n, e); + } + parseLetBinding() { + if (!this.peekKeywordLet()) return null; + let e = this.currentAbsoluteOffset; + this.advance(); + let n = this.expectTemplateBindingKey(), s = null; + this.consumeOptionalOperator("=") && (s = this.expectTemplateBindingKey()), this.consumeStatementTerminator(); + return new ue(new O(e, this.currentAbsoluteOffset), n, s); + } + parseNoInterpolationTaggedTemplateLiteral(e, n) { + let s = this.parseNoInterpolationTemplateLiteral(); + return new We(this.span(n), this.sourceSpan(n), e, s); + } + parseNoInterpolationTemplateLiteral() { + let e = this.next.strValue, n = this.inputIndex; + this.advance(); + let s = this.span(n), r = this.sourceSpan(n); + return new qe(s, r, [new je(s, r, e)], []); + } + parseTaggedTemplateLiteral(e, n) { + let s = this.parseTemplateLiteral(); + return new We(this.span(n), this.sourceSpan(n), e, s); + } + parseTemplateLiteral() { + let e = [], n = [], s = this.inputIndex; + for (; this.next !== Se;) { + let r = this.next; + if (r.isTemplateLiteralPart() || r.isTemplateLiteralEnd()) { + let i = this.inputIndex; + if (this.advance(), e.push(new je(this.span(i), this.sourceSpan(i), r.strValue)), r.isTemplateLiteralEnd()) break; + } else if (r.isTemplateLiteralInterpolationStart()) { + this.advance(), this.rbracesExpected++; + let i = this.parsePipe(); + i instanceof A ? this.error("Template literal interpolation cannot be empty") : n.push(i), this.rbracesExpected--; + } else this.advance(); + } + return new qe(this.span(s), this.sourceSpan(s), e, n); + } + parseRegularExpressionLiteral() { + let e = this.next; + if (this.advance(), !e.isRegExpBody()) return new A(this.span(this.inputIndex), this.sourceSpan(this.inputIndex)); + let n = null; + if (this.next.isRegExpFlags()) { + n = this.next, this.advance(); + let i = /* @__PURE__ */ new Set(); + for (let a = 0; a < n.strValue.length; a++) { + let p = n.strValue[a]; + ps.has(p) ? i.has(p) ? this.error(`Duplicate regular expression flag "${p}"`, n.index + a) : i.add(p) : this.error(`Unsupported regular expression flag "${p}". The supported flags are: ` + Array.from(ps, (h) => `"${h}"`).join(", "), n.index + a); + } + } + let s = e.index, r = n ? n.end : e.end; + return new Ht(this.span(s, r), this.sourceSpan(s, r), e.strValue, n ? n.strValue : null); + } + parseArrowFunction(e) { + let n; + if (this.next.isIdentifier()) { + let r = this.next; + this.advance(), n = [this.getArrowFunctionIdentifierArg(r)]; + } else this.next.isCharacter(X) ? (this.rparensExpected++, this.advance(), n = this.parseArrowFunctionParameters(), this.rparensExpected--) : (n = [], this.error(`Unexpected token ${this.next}`)); + this.expectOperator("=>"); + let s; + if (this.next.isCharacter(ke)) this.error("Multi-line arrow functions are not supported. If you meant to return an object literal, wrap it with parentheses."), s = new A(this.span(e), this.sourceSpan(e)); + else { + let r = this.parseFlags; + this.parseFlags = 1, s = this.parseExpression(), this.parseFlags = r; + } + return new Ut(this.span(e), this.sourceSpan(e), n, s); + } + parseArrowFunctionParameters() { + let e = []; + if (!this.consumeOptionalCharacter(N)) for (; this.next !== Se;) if (this.next.isIdentifier()) { + let n = this.next; + if (this.advance(), e.push(this.getArrowFunctionIdentifierArg(n)), this.consumeOptionalCharacter(N)) break; + this.expectCharacter(F); + } else { + this.error(`Unexpected token ${this.next}`); + break; + } + return e; + } + getArrowFunctionIdentifierArg(e) { + return new Vt(e.strValue, this.span(e.index), this.sourceSpan(e.index)); + } + isArrowFunction() { + let e = this.index, n = this.tokens; + if (e > n.length - 2) return !1; + if (n[e].isIdentifier() && n[e + 1].isOperator("=>")) return !0; + if (n[e].isCharacter(X)) { + let s = e + 1; + for (; s < n.length && !(!n[s].isIdentifier() && !n[s].isCharacter(F)); s++); + return s < n.length - 1 && n[s].isCharacter(N) && n[s + 1].isOperator("=>"); + } + return !1; + } + consumeStatementTerminator() { + this.consumeOptionalCharacter(Ee) || this.consumeOptionalCharacter(F); + } + error(e, n = this.index) { + this.errors.push(re(e, this.input, this.getErrorLocationText(n), this.parseSourceSpan)), this.skip(); + } + getErrorLocationText(e) { + return e < this.tokens.length ? `at column ${this.tokens[e].index + 1} in` : "at the end of the expression"; + } + _reportErrorForPrivateIdentifier(e, n) { + let s = `Private identifiers are not supported. Unexpected private identifier: ${e}`; + n !== null && (s += `, ${n}`), this.error(s); + } + skip() { + let e = this.next; + for (; this.index < this.tokens.length && !e.isCharacter(Ee) && !e.isOperator("|") && (this.rparensExpected <= 0 || !e.isCharacter(N)) && (this.rbracesExpected <= 0 || !e.isCharacter(ne)) && (this.rbracketsExpected <= 0 || !e.isCharacter(Q)) && (!(this.context & se.Writable) || !this.isAssignmentOperator(e));) this.next.isError() && this.errors.push(re(this.next.toString(), this.input, this.getErrorLocationText(this.next.index), this.parseSourceSpan)), this.advance(), e = this.next; + } + }; + Kt = class extends Wt { + errors = []; + visitPipe() { + this.errors.push("pipes"); + } + }; + Di = new Map(Object.entries({ + class: "className", + for: "htmlFor", + formaction: "formAction", + innerHtml: "innerHTML", + readonly: "readOnly", + tabindex: "tabIndex", + "aria-activedescendant": "ariaActiveDescendantElement", + "aria-atomic": "ariaAtomic", + "aria-autocomplete": "ariaAutoComplete", + "aria-busy": "ariaBusy", + "aria-checked": "ariaChecked", + "aria-colcount": "ariaColCount", + "aria-colindex": "ariaColIndex", + "aria-colindextext": "ariaColIndexText", + "aria-colspan": "ariaColSpan", + "aria-controls": "ariaControlsElements", + "aria-current": "ariaCurrent", + "aria-describedby": "ariaDescribedByElements", + "aria-description": "ariaDescription", + "aria-details": "ariaDetailsElements", + "aria-disabled": "ariaDisabled", + "aria-errormessage": "ariaErrorMessageElements", + "aria-expanded": "ariaExpanded", + "aria-flowto": "ariaFlowToElements", + "aria-haspopup": "ariaHasPopup", + "aria-hidden": "ariaHidden", + "aria-invalid": "ariaInvalid", + "aria-keyshortcuts": "ariaKeyShortcuts", + "aria-label": "ariaLabel", + "aria-labelledby": "ariaLabelledByElements", + "aria-level": "ariaLevel", + "aria-live": "ariaLive", + "aria-modal": "ariaModal", + "aria-multiline": "ariaMultiLine", + "aria-multiselectable": "ariaMultiSelectable", + "aria-orientation": "ariaOrientation", + "aria-owns": "ariaOwnsElements", + "aria-placeholder": "ariaPlaceholder", + "aria-posinset": "ariaPosInSet", + "aria-pressed": "ariaPressed", + "aria-readonly": "ariaReadOnly", + "aria-required": "ariaRequired", + "aria-roledescription": "ariaRoleDescription", + "aria-rowcount": "ariaRowCount", + "aria-rowindex": "ariaRowIndex", + "aria-rowindextext": "ariaRowIndexText", + "aria-rowspan": "ariaRowSpan", + "aria-selected": "ariaSelected", + "aria-setsize": "ariaSetSize", + "aria-sort": "ariaSort", + "aria-valuemax": "ariaValueMax", + "aria-valuemin": "ariaValueMin", + "aria-valuenow": "ariaValueNow", + "aria-valuetext": "ariaValueText" + })); + Array.from(Di).reduce((t, [e, n]) => (t.set(e, n), t), /* @__PURE__ */ new Map()); + new he(new Le()); + l.StyleMap, l.ClassMap, l.StyleProp, l.ClassProp, l.Attribute, l.Property, l.Attribute, l.Control; + l.DomProperty, l.DomProperty, l.Attribute, l.StyleMap, l.ClassMap, l.StyleProp, l.ClassProp; + l.Listener, l.TwoWayListener, l.AnimationListener, l.StyleMap, l.ClassMap, l.StyleProp, l.ClassProp, l.Property, l.TwoWayProperty, l.DomProperty, l.Attribute, l.Animation, l.Control; + $.Idle, c.deferOnIdle, c.deferPrefetchOnIdle, c.deferHydrateOnIdle, $.Immediate, c.deferOnImmediate, c.deferPrefetchOnImmediate, c.deferHydrateOnImmediate, $.Timer, c.deferOnTimer, c.deferPrefetchOnTimer, c.deferHydrateOnTimer, $.Hover, c.deferOnHover, c.deferPrefetchOnHover, c.deferHydrateOnHover, $.Interaction, c.deferOnInteraction, c.deferPrefetchOnInteraction, c.deferHydrateOnInteraction, $.Viewport, c.deferOnViewport, c.deferPrefetchOnViewport, c.deferHydrateOnViewport, $.Never, c.deferHydrateNever, c.deferHydrateNever, c.deferHydrateNever; + c.pipeBind1, c.pipeBind2, c.pipeBind3, c.pipeBind4; + c.interpolate, c.interpolate1, c.interpolate2, c.interpolate3, c.interpolate4, c.interpolate5, c.interpolate6, c.interpolate7, c.interpolate8, c.interpolateV; + c.resolveWindow, c.resolveDocument, c.resolveBody; + P.HTML, c.sanitizeHtml, P.RESOURCE_URL, c.sanitizeResourceUrl, P.SCRIPT, c.sanitizeScript, P.STYLE, c.sanitizeStyle, P.URL, c.sanitizeUrl, P.ATTRIBUTE_NO_BINDING, c.validateAttribute; + P.HTML, c.trustConstantHtml, P.RESOURCE_URL, c.trustConstantResourceUrl; + (function(t) { + t[t.None = 0] = "None", t[t.ViewContextRead = 1] = "ViewContextRead", t[t.ViewContextWrite = 2] = "ViewContextWrite", t[t.SideEffectful = 4] = "SideEffectful"; + })(hs || (hs = {})); + l.Container, l.ContainerStart, l.ContainerEnd, l.Element, l.ElementStart, l.ElementEnd, l.Template; + M.Property, R.Property, M.TwoWay, R.TwoWayProperty, M.Attribute, R.Attribute, M.Class, R.ClassName, M.Style, R.StyleProperty, M.LegacyAnimation, R.LegacyAnimation, M.Animation, R.Animation; + (function(t) { + t[t.NG_CONTENT = 0] = "NG_CONTENT", t[t.STYLE = 1] = "STYLE", t[t.STYLESHEET = 2] = "STYLESHEET", t[t.SCRIPT = 3] = "SCRIPT", t[t.OTHER = 4] = "OTHER"; + })(fs || (fs = {})); + (function(t) { + t.IDLE = "idle", t.TIMER = "timer", t.INTERACTION = "interaction", t.IMMEDIATE = "immediate", t.HOVER = "hover", t.VIEWPORT = "viewport", t.NEVER = "never"; + })(ds || (ds = {})); + Ns = "%COMP%"; + `${Ns}`; + `${Ns}`; + (function(t) { + t[t.Extract = 0] = "Extract", t[t.Merge = 1] = "Merge"; + })(ms || (ms = {})); + (function(t) { + t[t.Selector = 0] = "Selector", t[t.HostDirective = 1] = "HostDirective"; + })(gs || (gs = {})); + new bt("21.2.8"); + Fi = "test.html"; + Ui = (t) => he.prototype._commentStart(t); + tt = (t) => (e) => { + let n = Ps(e); + return Ms({ + ...n, + result: Ls()[t](e, n.sourceSpan, 0), + comments: Hi(e) + }); + }, Rs = tt("parseAction"), $s = tt("parseBinding"), Ds = tt("parseInterpolationExpression"), Bs = (t) => { + let e = Ps(t); + return Ms({ + ...e, + result: Ls().parseTemplateBindings("", t, e.sourceSpan, 0, 0), + comments: [] + }); + }; + nt = class { + text; + constructor(t) { + this.text = t; + } + getCharacterIndex(t, e) { + return Sn(this.text, t, e); + } + transformSpan(t) { + return Re(t); + } + createNode(t, e) { + let n = t.start, s = t.end, r = t.range; + e && (Array.isArray(e) ? ([n, s] = e, r = e) : ({start: n, end: s} = e.sourceSpan ?? e, r = [n, s])); + r ? [n, s] = r : typeof n == "number" && typeof s == "number" && (r = [n, s]); + if (!(typeof n == "number" && typeof s == "number" && r)) throw new Error("Missing location information"); + let i = { + ...t, + start: n, + end: s, + range: r + }; + switch (i.type) { + case "NumericLiteral": + case "StringLiteral": + case "RegExpLiteral": { + let a = this.text.slice(n, s), { value: p } = i; + i.extra = { + ...i.extra, + raw: a, + rawValue: p + }; + break; + } + } + return i; + } + }; + Fs = Object.defineProperty, Vs = (t, e) => { + let n = {}; + for (var s in t) Fs(n, s, { + get: t[s], + enumerable: !0 + }); + return e && Fs(n, Symbol.toStringTag, { value: "Module" }), n; + }; + Us = (t, e) => ({ + type: "ArrayExpression", + elements: e.transformChildren(t.expressions) + }); + Wi = { + id: null, + generator: !1, + async: !1, + expression: !0 + }, Hs = (t, e) => ({ + type: "ArrowFunctionExpression", + params: t.parameters.map((n) => e.createNode({ + type: "Identifier", + name: n.name + }, n.sourceSpan)), + body: e.transformChild(t.body), + ...Wi + }); + Ws = (t, e) => e.transformChild(t.ast); + qi = (t) => t === "&&" || t === "||" || t === "??", qs = (t, e) => { + let { operation: n } = t, [s, r] = e.transformChildren([t.left, t.right]); + return qi(n) ? { + type: "LogicalExpression", + operator: n, + left: s, + right: r + } : E.isAssignmentOperation(n) ? { + type: "AssignmentExpression", + left: s, + right: r, + operator: n + } : { + left: s, + right: r, + type: "BinaryExpression", + operator: n + }; + }; + ji = { optional: !1 }, zi = { optional: !0 }, js = ({ optional: t }) => (e, n) => { + let s = n.transformChildren(e.args), r = n.transformChild(e.receiver); + return t || ve(r) ? { + type: "OptionalCallExpression", + callee: r, + arguments: s, + optional: t + } : { + type: "CallExpression", + callee: r, + arguments: s + }; + }, zs = js(ji), Gs = js(zi); + Xs = (t, e) => ({ + type: "NGChainedExpression", + expressions: e.transformChildren(t.expressions) + }); + Js = (t, e) => { + let [n, s, r] = e.transformChildren([ + t.condition, + t.trueExp, + t.falseExp + ]); + return { + type: "ConditionalExpression", + test: n, + consequent: s, + alternate: r + }; + }; + Ys = () => ({ type: "NGEmptyExpression" }); + Qs = (t, e) => { + let { expressions: n } = t; + if (n.length !== 1) throw new Error("Unexpected 'Interpolation'"); + return e.transformChild(n[0]); + }; + Ks = (t) => { + let { value: e } = t; + switch (typeof e) { + case "boolean": return { + type: "BooleanLiteral", + value: e + }; + case "number": return { + type: "NumericLiteral", + value: e + }; + case "object": return { type: "NullLiteral" }; + case "string": return { + type: "StringLiteral", + value: e + }; + case "undefined": return { + type: "Identifier", + name: "undefined" + }; + default: throw new Error(`Unexpected 'LiteralPrimitive' value type ${typeof e}`); + } + }, Zs = (t) => ({ + type: "RegExpLiteral", + pattern: t.body, + flags: t.flags ?? "" + }); + Gi = { + computed: !0, + optional: !1 + }, Xi = { + computed: !0, + optional: !0 + }, Ji = { + computed: !1, + optional: !1 + }, Yi = { + computed: !1, + optional: !0 + }, st = ({ computed: t, optional: e }) => (n, s) => { + let { receiver: r } = n, i; + if (t) { + let { key: p } = n; + i = s.transformChild(p); + } else { + let p = r instanceof ce, { name: h, nameSpan: d } = n; + if (i = s.create({ + type: "Identifier", + name: h + }, d, p ? s.ancestors : []), p) return i; + } + let a = s.transformChild(r); + return e || ve(a) ? { + type: "OptionalMemberExpression", + optional: e, + property: i, + object: a, + computed: t + } : { + type: "MemberExpression", + property: i, + object: a, + computed: t + }; + }, er = st(Gi), tr = st(Xi), nr = st(Ji), sr = st(Yi); + rr = (t, e) => ({ + type: "TSNonNullExpression", + expression: e.transformChild(t.expression) + }); + ir = (t, e) => { + let { keys: n, values: s } = t, r = (i, a = t) => e.create(i, a, [t, ...e.ancestors]); + return { + type: "ObjectExpression", + properties: n.map((i, a) => { + let p = s[a], h = [i.sourceSpan.start, p.sourceSpan.end]; + if (i.kind === "spread") return r({ + type: "SpreadElement", + argument: e.transformChild(p) + }, h); + let d = !!i.isShorthandInitialized; + return r({ + type: "ObjectProperty", + key: r(i.quoted ? { + type: "StringLiteral", + value: i.key + } : { + type: "Identifier", + name: i.key + }, i.sourceSpan), + value: e.transformChild(p), + shorthand: d, + computed: !1, + method: !1 + }, h); + }) + }; + }; + or = (t, e) => e.transformChild(t.expression); + ar = (t, e) => ({ + type: "NGPipeExpression", + left: e.transformChild(t.exp), + right: e.create({ + type: "Identifier", + name: t.name + }, t.nameSpan), + arguments: e.transformChildren(t.args) + }); + lr = (t, e) => ({ + type: "SpreadElement", + argument: e.transformChild(t.expression) + }); + cr = (t, e) => ({ + type: "TaggedTemplateExpression", + tag: e.transformChild(t.tag), + quasi: e.transformChild(t.template) + }), ur = (t, e) => ({ + type: "TemplateLiteral", + quasis: e.transformChildren(t.elements), + expressions: e.transformChildren(t.expressions) + }), pr = (t, e) => { + let [n] = e.ancestors, { elements: s } = n, r = s.indexOf(t), i = r === 0, a = r === s.length - 1, p = t.sourceSpan.end - (a ? 1 : 0), h = t.sourceSpan.start + (i ? 1 : 0), d = e.text.slice(h, p); + return { + type: "TemplateElement", + value: { + cooked: t.text, + raw: d + }, + tail: a, + range: [h, p] + }; + }; + hr = () => ({ type: "ThisExpression" }); + sn = (t) => (e, n) => ({ + type: "UnaryExpression", + prefix: !0, + operator: t, + argument: n.transformChild(e.expression) + }), fr = sn("!"), dr = sn("typeof"), mr = sn("void"), gr = (t, e) => ({ + type: "UnaryExpression", + prefix: !0, + argument: e.transformChild(t.expr), + operator: t.operator + }); + Qi = (t) => { + throw new Error(`Unexpected node type '${t.constructor.name}'`); + }, vr = Qi; + xr = Vs({ + visitASTWithSource: () => Ws, + visitArrowFunction: () => Hs, + visitBinary: () => qs, + visitCall: () => zs, + visitChain: () => Xs, + visitConditional: () => Js, + visitEmptyExpr: () => Ys, + visitImplicitReceiver: () => vr, + visitInterpolation: () => Qs, + visitKeyedRead: () => er, + visitLiteralArray: () => Us, + visitLiteralMap: () => ir, + visitLiteralPrimitive: () => Ks, + visitNonNullAssert: () => rr, + visitParenthesizedExpression: () => or, + visitPipe: () => ar, + visitPrefixNot: () => fr, + visitPropertyRead: () => nr, + visitRegularExpressionLiteral: () => Zs, + visitSafeCall: () => Gs, + visitSafeKeyedRead: () => tr, + visitSafePropertyRead: () => sr, + visitSpreadElement: () => lr, + visitTaggedTemplateLiteral: () => cr, + visitTemplateLiteral: () => ur, + visitTemplateLiteralElement: () => pr, + visitThisReceiver: () => hr, + visitTypeofExpression: () => dr, + visitUnary: () => gr, + visitVoidExpression: () => mr + }); + rt = class rn extends nt { + node; + ancestors; + constructor({ node: e, text: n, ancestors: s = [] }) { + super(n), this.node = e, this.ancestors = s; + } + create(e, n, s = this.ancestors) { + return s[0] instanceof Ie && (e.extra = { + ...e.extra, + parenthesized: !0 + }), super.createNode(e, e.range ?? n ?? this.node); + } + transformChild(e) { + return new rn({ + node: e, + ancestors: [this.node, ...this.ancestors], + text: this.text + }).transform(); + } + transformChildren(e) { + return e.map((n) => this.transformChild(n)); + } + transform() { + let { node: e } = this, n = e.visit(xr, this); + return this.create(n, this.node); + } + static transform(e, n) { + return new rn({ + node: e, + text: n, + ancestors: [] + }).transform(); + } + }; + Sr = class extends rt { + constructor(t) { + super({ + node: t, + text: t.source + }); + } + }; + Er = (t, e) => rt.transform(t, e), yr = (t) => new Sr(t).transform(); + Cr = (t, e) => (n, s, ...r) => n | 1 && s == null ? void 0 : (e.call(s) ?? s[t]).apply(s, r); + _r = Cr("at", function() { + if (Array.isArray(this) || typeof this == "string") return Ki; + }); + eo = (me = class extends nt { + constructor(n, s) { + super(s); + Me(this, m); + Me(this, de); + Me(this, te); + ct(this, de, n), ct(this, te, s); + for (let r of n) v(this, m, Ar).call(this, r); + } + get expressions() { + return v(this, m, Nr).call(this); + } + }, de = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakSet(), br = function() { + return j(this, de)[0].key; + }, _ = function(n, s) { + return wn(me.prototype, this, "createNode").call(this, n, s); + }, on = function(n) { + return Er(n, this.text); + }, an = function(n) { + return En(n.slice(j(this, m, br).source.length)); + }, ln = function(n) { + let s = j(this, te); + if (s[n.start] !== "\"" && s[n.start] !== "'") return; + let r = s[n.start], i = !1; + for (let a = n.start + 1; a < s.length; a++) switch (s[a]) { + case r: if (!i) { + n.end = a + 1; + return; + } + default: + i = !1; + break; + case "\\": + i = !i; + break; + } + }, Ar = function(n) { + v(this, m, ln).call(this, n.key.span), Tr(n) && n.value && v(this, m, ln).call(this, n.value.span); + }, Ir = function(n) { + if (!n.value || n.value.source) return n.value; + let s = this.getCharacterIndex(/\S/, n.sourceSpan.start); + return { + source: "$implicit", + span: { + start: s, + end: s + } + }; + }, Nr = function() { + let n = j(this, de), [s] = n, r = j(this, te).slice(s.sourceSpan.start, s.sourceSpan.end).trim().length === 0 ? n.slice(1) : n, i = [], a = null; + for (let [p, h] of r.entries()) { + if (a && kr(a) && Tr(h) && h.value && h.value.source === a.key.source) { + let d = v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: h.key.source + }, h.key.span), x = (T, C) => ({ + ...T, + ...this.transformSpan({ + start: T.start, + end: C + }) + }), D = (T) => ({ + ...x(T, d.end), + alias: d + }), k = i.pop(); + if (k.type === "NGMicrosyntaxExpression") i.push(D(k)); + else if (k.type === "NGMicrosyntaxKeyedExpression") { + let T = D(k.expression); + i.push(x({ + ...k, + expression: T + }, T.end)); + } else throw new Error(`Unexpected type ${k.type}`); + } else i.push(v(this, m, Pr).call(this, h, p)); + a = h; + } + return v(this, m, _).call(this, { + type: "NGMicrosyntax", + body: i + }, i.length === 0 ? n[0].sourceSpan : { + start: i[0].start, + end: _r(0, i, -1).end + }); + }, Pr = function(n, s) { + if (kr(n)) { + let { key: r, value: i } = n; + return i ? s === 0 ? v(this, m, _).call(this, { + type: "NGMicrosyntaxExpression", + expression: v(this, m, on).call(this, i.ast), + alias: null + }, i) : v(this, m, _).call(this, { + type: "NGMicrosyntaxKeyedExpression", + key: v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: v(this, m, an).call(this, r.source) + }, r.span), + expression: v(this, m, _).call(this, { + type: "NGMicrosyntaxExpression", + expression: v(this, m, on).call(this, i.ast), + alias: null + }, i) + }, [r.span.start, i.sourceSpan.end]) : v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: v(this, m, an).call(this, r.source) + }, r.span); + } else { + let { key: r, sourceSpan: i } = n; + if (/^let\s$/.test(j(this, te).slice(i.start, i.start + 4))) { + let { value: a } = n; + return v(this, m, _).call(this, { + type: "NGMicrosyntaxLet", + key: v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: r.source + }, r.span), + value: a ? v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: a.source + }, a.span) : null + }, [i.start, a ? a.span.end : r.span.end]); + } else { + let a = v(this, m, Ir).call(this, n); + return v(this, m, _).call(this, { + type: "NGMicrosyntaxAs", + key: v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: a.source + }, a.span), + alias: v(this, m, _).call(this, { + type: "NGMicrosyntaxKey", + name: r.source + }, r.span) + }, [a.span.start, r.span.end]); + } + } + }, me); + it = (t) => (e) => { + let { result: n, comments: s } = t(e); + return Object.assign(yr(n), { comments: s }); + }, ot = it(Rs), cn = it($s), un = it(Ds), pn = (t) => Lr(Bs(t).result.templateBindings, t); + no = at(ot), so = at(cn), ro = at(un), io = at(pn); +}))(); +export { Rr as default, fn as parsers }; diff --git a/.github/actions/check-public-api/dist/babel-CZV-nXip.js b/.github/actions/check-public-api/dist/babel-CZV-nXip.js new file mode 100644 index 0000000000..eaf31d7e4a --- /dev/null +++ b/.github/actions/check-public-api/dist/babel-CZV-nXip.js @@ -0,0 +1,9879 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/babel.mjs +function Ws(a, t) { + if (a == null) return {}; + var e = {}; + for (var s in a) if ({}.hasOwnProperty.call(a, s)) { + if (t.indexOf(s) !== -1) continue; + e[s] = a[s]; + } + return e; +} +function D(a, t) { + let { line: e, column: s, index: i } = a; + return new R(e, s + t, i + t); +} +function Ot(a, t, e) { + Object.defineProperty(a, t, { + enumerable: !1, + configurable: !0, + value: e + }); +} +function ti({ toMessage: a, code: t, reasonCode: e, syntaxPlugin: s }) { + let i = e === "MissingPlugin" || e === "MissingOneOfPlugins"; + return function r(n, o) { + let h = /* @__PURE__ */ new SyntaxError(); + return h.code = t, h.reasonCode = e, h.loc = n, h.pos = n.index, h.syntaxPlugin = s, i && (h.missingPlugin = o.missingPlugin), Ot(h, "clone", function(u = {}) { + let { line: f, column: d, index: x } = u.loc ?? n; + return r(new R(f, d, x), Object.assign({}, o, u.details)); + }), Ot(h, "details", o), Object.defineProperty(h, "message", { + configurable: !0, + get() { + let l = `${a(o)} (${n.line}:${n.column})`; + return this.message = l, l; + }, + set(l) { + Object.defineProperty(this, "message", { + value: l, + writable: !0 + }); + } + }), h; + }; +} +function F(a, t) { + if (Array.isArray(a)) return (s) => F(s, a[0]); + let e = {}; + for (let s of Object.keys(a)) { + let i = a[s], r = typeof i == "string" ? { message: () => i } : typeof i == "function" ? { message: i } : i, { message: n } = r, o = Ws(r, ei); + e[s] = ti(Object.assign({ + code: "BABEL_PARSER_SYNTAX_ERROR", + reasonCode: s, + toMessage: typeof n == "string" ? () => n : n + }, t ? { syntaxPlugin: t } : {}, o)); + } + return e; +} +function si() { + return { + sourceType: "script", + sourceFilename: void 0, + startIndex: 0, + startColumn: 0, + startLine: 1, + allowAwaitOutsideFunction: !1, + allowReturnOutsideFunction: !1, + allowNewTargetOutsideFunction: !1, + allowImportExportEverywhere: !1, + allowSuperOutsideMethod: !1, + allowUndeclaredExports: !1, + allowYieldOutsideFunction: !1, + plugins: [], + strictMode: void 0, + ranges: !1, + tokens: !1, + createImportExpressions: !0, + createParenthesizedExpressions: !1, + errorRecovery: !1, + attachComment: !0, + annexB: !0 + }; +} +function ii(a) { + let t = si(); + if (a == null) return t; + if (a.annexB != null && a.annexB !== !1) throw new Error("The `annexB` option can only be set to `false`."); + for (let e of Object.keys(t)) a[e] != null && (t[e] = a[e]); + if (t.startLine === 1) a.startIndex == null && t.startColumn > 0 ? t.startIndex = t.startColumn : a.startColumn == null && t.startIndex > 0 && (t.startColumn = t.startIndex); + else if (a.startColumn == null || a.startIndex == null) throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`."); + if (t.sourceType === "commonjs") { + if (a.allowAwaitOutsideFunction != null) throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`."); + if (a.allowReturnOutsideFunction != null) throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`."); + if (a.allowNewTargetOutsideFunction != null) throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`."); + } + return t; +} +function ne(a) { + return Ft(a.loc.start, "index"), Ft(a.loc.end, "index"), a; +} +function S(a, t = {}) { + t.keyword = a; + let e = P(a, t); + return ft.set(a, e), e; +} +function v(a, t) { + return P(a, { + beforeExpr: T, + binop: t + }); +} +function P(a, t = {}) { + return ++pe, mt.push(a), yt.push(t.binop ?? -1), xt.push(t.beforeExpr ?? !1), Pt.push(t.startsExpr ?? !1), gt.push(t.prefix ?? !1), dt.push(new we(a, t)), pe; +} +function b(a, t = {}) { + return ++pe, ft.set(a, pe), mt.push(a), yt.push(t.binop ?? -1), xt.push(t.beforeExpr ?? !1), Pt.push(t.startsExpr ?? !1), gt.push(t.prefix ?? !1), dt.push(new we("name", t)), pe; +} +function w(a) { + return a >= 93 && a <= 133; +} +function hi(a) { + return a <= 92; +} +function O(a) { + return a >= 58 && a <= 133; +} +function Jt(a) { + return a >= 58 && a <= 137; +} +function ci(a) { + return xt[a]; +} +function ce(a) { + return Pt[a]; +} +function li(a) { + return a >= 29 && a <= 33; +} +function Bt(a) { + return a >= 129 && a <= 131; +} +function pi(a) { + return a >= 90 && a <= 92; +} +function Tt(a) { + return a >= 58 && a <= 92; +} +function ui(a) { + return a >= 39 && a <= 59; +} +function fi(a) { + return a === 34; +} +function di(a) { + return gt[a]; +} +function mi(a) { + return a >= 121 && a <= 123; +} +function yi(a) { + return a >= 124 && a <= 130; +} +function z(a) { + return mt[a]; +} +function Ae(a) { + return yt[a]; +} +function xi(a) { + return a === 57; +} +function $e(a) { + return a >= 24 && a <= 25; +} +function Gt(a) { + return dt[a]; +} +function Ke(a, t) { + let e = 65536; + for (let s = 0, i = t.length; s < i; s += 2) { + if (e += t[s], e > a) return !1; + if (e += t[s + 1], e >= a) return !0; + } + return !1; +} +function B(a) { + return a < 65 ? a === 36 : a <= 90 ? !0 : a < 97 ? a === 95 : a <= 122 ? !0 : a <= 65535 ? a >= 170 && Pi.test(String.fromCharCode(a)) : Ke(a, Yt); +} +function K(a) { + return a < 48 ? a === 36 : a < 58 ? !0 : a < 65 ? !1 : a <= 90 ? !0 : a < 97 ? a === 95 : a <= 122 ? !0 : a <= 65535 ? a >= 170 && gi.test(String.fromCharCode(a)) : Ke(a, Yt) || Ke(a, Ti); +} +function Qt(a, t) { + return t && a === "await" || a === "enum"; +} +function Zt(a, t) { + return Qt(a, t) || Ai.has(a); +} +function es(a) { + return Si.has(a); +} +function ts(a, t) { + return Zt(a, t) || es(a); +} +function wi(a) { + return bi.has(a); +} +function Ci(a, t, e) { + return a === 64 && t === 64 && B(e); +} +function Ii(a) { + return Ei.has(a); +} +function ki(a) { + return a.type === "DeclareExportAllDeclaration" || a.type === "DeclareExportDeclaration" && (!a.declaration || a.declaration.type !== "TypeAlias" && a.declaration.type !== "InterfaceDeclaration"); +} +function Rt(a) { + return a.importKind === "type" || a.importKind === "typeof"; +} +function Li(a, t) { + let e = [], s = []; + for (let i = 0; i < a.length; i++) (t(a[i], i, a) ? e : s).push(a[i]); + return [e, s]; +} +function G(a) { + switch (a) { + case 10: + case 13: + case 8232: + case 8233: return !0; + default: return !1; + } +} +function Ut(a, t, e) { + for (let s = t; s < e; s++) if (G(a.charCodeAt(s))) return !0; + return !1; +} +function Fi(a) { + switch (a) { + case 9: + case 11: + case 12: + case 32: + case 160: + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8239: + case 8287: + case 12288: + case 65279: return !0; + default: return !1; + } +} +function V(a) { + return a ? a.type === "JSXOpeningFragment" || a.type === "JSXClosingFragment" : !1; +} +function J(a) { + if (a.type === "JSXIdentifier") return a.name; + if (a.type === "JSXNamespacedName") return a.namespace.name + ":" + a.name.name; + if (a.type === "JSXMemberExpression") return J(a.object) + "." + J(a.property); + throw new Error("Node had unexpected type: " + a.type); +} +function Se(a, t) { + return (a ? 2 : 0) | (t ? 1 : 0); +} +function ss(a, t) { + a.trailingComments === void 0 ? a.trailingComments = t : a.trailingComments.unshift(...t); +} +function Ri(a, t) { + a.leadingComments === void 0 ? a.leadingComments = t : a.leadingComments.unshift(...t); +} +function X(a, t) { + a.innerComments === void 0 ? a.innerComments = t : a.innerComments.unshift(...t); +} +function $(a, t, e) { + let s = null, i = t.length; + for (; s === null && i > 0;) s = t[--i]; + s === null || s.start > e.start ? X(a, e.comments) : ss(s, e.comments); +} +function jt(a, t, e, s, i, r) { + let n = e, o = s, h = i, l = "", u = null, f = e, { length: d } = t; + for (;;) { + if (e >= d) { + r.unterminated(n, o, h), l += t.slice(f, e); + break; + } + let x = t.charCodeAt(e); + if (_i(a, x, t, e)) { + l += t.slice(f, e); + break; + } + if (x === 92) { + l += t.slice(f, e); + let A = ji(t, e, s, i, a === "template", r); + A.ch === null && !u ? u = { + pos: e, + lineStart: s, + curLine: i + } : l += A.ch, {pos: e, lineStart: s, curLine: i} = A, f = e; + } else x === 8232 || x === 8233 ? (++e, ++i, s = e) : x === 10 || x === 13 ? a === "template" ? (l += t.slice(f, e) + ` +`, ++e, x === 13 && t.charCodeAt(e) === 10 && ++e, ++i, f = s = e) : r.unterminated(n, o, h) : ++e; + } + return { + pos: e, + str: l, + firstInvalidLoc: u, + lineStart: s, + curLine: i + }; +} +function _i(a, t, e, s) { + return a === "template" ? t === 96 || t === 36 && e.charCodeAt(s + 1) === 123 : t === (a === "double" ? 34 : 39); +} +function ji(a, t, e, s, i, r) { + let n = !i; + t++; + let o = (l) => ({ + pos: t, + ch: l, + lineStart: e, + curLine: s + }), h = a.charCodeAt(t++); + switch (h) { + case 110: return o(` +`); + case 114: return o("\r"); + case 120: { + let l; + return {code: l, pos: t} = et(a, t, e, s, 2, !1, n, r), o(l === null ? null : String.fromCharCode(l)); + } + case 117: { + let l; + return {code: l, pos: t} = rs(a, t, e, s, n, r), o(l === null ? null : String.fromCodePoint(l)); + } + case 116: return o(" "); + case 98: return o("\b"); + case 118: return o("\v"); + case 102: return o("\f"); + case 13: a.charCodeAt(t) === 10 && ++t; + case 10: e = t, ++s; + case 8232: + case 8233: return o(""); + case 56: + case 57: + if (i) return o(null); + r.strictNumericEscape(t - 1, e, s); + default: + if (h >= 48 && h <= 55) { + let l = t - 1, f = /^[0-7]+/.exec(a.slice(l, t + 2))[0], d = parseInt(f, 8); + d > 255 && (f = f.slice(0, -1), d = parseInt(f, 8)), t += f.length - 1; + let x = a.charCodeAt(t); + if (f !== "0" || x === 56 || x === 57) { + if (i) return o(null); + r.strictNumericEscape(l, e, s); + } + return o(String.fromCharCode(d)); + } + return o(String.fromCharCode(h)); + } +} +function et(a, t, e, s, i, r, n, o) { + let h = t, l; + return {n: l, pos: t} = is(a, t, e, s, 16, i, r, !1, o, !n), l === null && (n ? o.invalidEscapeSequence(h, e, s) : t = h - 1), { + code: l, + pos: t + }; +} +function is(a, t, e, s, i, r, n, o, h, l) { + let u = t, f = i === 16 ? _t.hex : _t.decBinOct, d = i === 16 ? Te.hex : i === 10 ? Te.dec : i === 8 ? Te.oct : Te.bin, x = !1, A = 0; + for (let k = 0, N = r ?? Infinity; k < N; ++k) { + let C = a.charCodeAt(t), I; + if (C === 95 && o !== "bail") { + let Pe = a.charCodeAt(t - 1), ae = a.charCodeAt(t + 1); + if (o) { + if (Number.isNaN(ae) || !d(ae) || f.has(Pe) || f.has(ae)) { + if (l) return { + n: null, + pos: t + }; + h.unexpectedNumericSeparator(t, e, s); + } + } else { + if (l) return { + n: null, + pos: t + }; + h.numericSeparatorInEscapeSequence(t, e, s); + } + ++t; + continue; + } + if (C >= 97 ? I = C - 97 + 10 : C >= 65 ? I = C - 65 + 10 : Ui(C) ? I = C - 48 : I = Infinity, I >= i) { + if (I <= 9 && l) return { + n: null, + pos: t + }; + if (I <= 9 && h.invalidDigit(t, e, s, i)) I = 0; + else if (n) I = 0, x = !0; + else break; + } + ++t, A = A * i + I; + } + return t === u || r != null && t - u !== r || x ? { + n: null, + pos: t + } : { + n: A, + pos: t + }; +} +function rs(a, t, e, s, i, r) { + let n = a.charCodeAt(t), o; + if (n === 123) { + if (++t, {code: o, pos: t} = et(a, t, e, s, a.indexOf("}", t) - t, !0, i, r), ++t, o !== null && o > 1114111) if (i) r.invalidCodePoint(t, e, s); + else return { + code: null, + pos: t + }; + } else ({code: o, pos: t} = et(a, t, e, s, 4, !1, i, r)); + return { + code: o, + pos: t + }; +} +function he(a, t, e) { + return new R(e, a - t, a); +} +function zi() { + return new Z(3); +} +function qi() { + return new Ce(1); +} +function $i() { + return new Ce(2); +} +function as() { + return new Z(); +} +function Ki(a) { + if (a == null) throw new Error(`Unexpected ${a} value.`); + return a; +} +function zt(a) { + if (!a) throw new Error("Assert fail"); +} +function Hi(a) { + switch (a) { + case "any": return "TSAnyKeyword"; + case "boolean": return "TSBooleanKeyword"; + case "bigint": return "TSBigIntKeyword"; + case "never": return "TSNeverKeyword"; + case "number": return "TSNumberKeyword"; + case "object": return "TSObjectKeyword"; + case "string": return "TSStringKeyword"; + case "symbol": return "TSSymbolKeyword"; + case "undefined": return "TSUndefinedKeyword"; + case "unknown": return "TSUnknownKeyword"; + default: return; + } +} +function qt(a) { + return a === "private" || a === "public" || a === "protected"; +} +function Wi(a) { + return a === "in" || a === "out"; +} +function lt(a) { + if (a.extra?.parenthesized) return !1; + switch (a.type) { + case "Identifier": return !0; + case "MemberExpression": return !a.computed && lt(a.object); + case "TSInstantiationExpression": return lt(a.expression); + default: return !1; + } +} +function Gi(a) { + if (a.type !== "MemberExpression") return !1; + let { computed: t, property: e } = a; + return t && e.type !== "StringLiteral" && (e.type !== "TemplateLiteral" || e.expressions.length > 0) ? !1 : os(a.object); +} +function Xi(a, t) { + let { type: e } = a; + if (a.extra?.parenthesized) return !1; + if (t) { + if (e === "Literal") { + let { value: s } = a; + if (typeof s == "string" || typeof s == "boolean") return !0; + } + } else if (e === "StringLiteral" || e === "BooleanLiteral") return !0; + return !!(ns(a, t) || Yi(a, t) || e === "TemplateLiteral" && a.expressions.length === 0 || Gi(a)); +} +function ns(a, t) { + return t ? a.type === "Literal" && (typeof a.value == "number" || "bigint" in a) : a.type === "NumericLiteral" || a.type === "BigIntLiteral"; +} +function Yi(a, t) { + if (a.type === "UnaryExpression") { + let { operator: e, argument: s } = a; + if (e === "-" && ns(s, t)) return !0; + } + return !1; +} +function os(a) { + return a.type === "Identifier" ? !0 : a.type !== "MemberExpression" || a.computed ? !1 : os(a.object); +} +function er(a) { + if (a.has("decorators")) { + if (a.has("decorators-legacy")) throw new Error("Cannot use the decorators and decorators-legacy plugin together"); + let t = a.get("decorators").decoratorsBeforeExport; + if (t != null && typeof t != "boolean") throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); + let e = a.get("decorators").allowCallParenthesized; + if (e != null && typeof e != "boolean") throw new Error("'allowCallParenthesized' must be a boolean."); + } + if (a.has("flow") && a.has("typescript")) throw new Error("Cannot combine flow and typescript plugins."); + if (a.has("placeholders") && a.has("v8intrinsic")) throw new Error("Cannot combine placeholders and v8intrinsic plugins."); + if (a.has("pipelineOperator")) { + let t = a.get("pipelineOperator").proposal; + if (!Kt.includes(t)) { + let e = Kt.map((s) => `"${s}"`).join(", "); + throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`); + } + if (t === "hack") { + if (a.has("placeholders")) throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); + if (a.has("v8intrinsic")) throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); + let e = a.get("pipelineOperator").topicToken; + if (!Ht.includes(e)) { + let s = Ht.map((i) => `"${i}"`).join(", "); + throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`); + } + } + } + if (a.has("moduleAttributes")) throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead."); + if (a.has("importAssertions")) throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead. To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin."); + if (!a.has("deprecatedImportAssert") && a.has("importAttributes") && a.get("importAttributes").deprecatedAssertSyntax) throw new Error("The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin."); + if (a.has("recordAndTuple")) throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration."); + if (a.has("asyncDoExpressions") && !a.has("doExpressions")) { + let t = /* @__PURE__ */ new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); + throw t.missingPlugins = "doExpressions", t; + } + if (a.has("optionalChainingAssign") && a.get("optionalChainingAssign").version !== "2023-07") throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'."); + if (a.has("discardBinding") && a.get("discardBinding").syntaxType !== "void") throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'."); + if (a.has("decimal")) throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration."); + if (a.has("importReflection")) throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code."); +} +function rr(a, t, e) { + for (let s = 0; s < a.length; s++) { + let i = a[s], { type: r } = i; + typeof r == "number" && (i.type = Gt(r)); + } + return a; +} +function Ie(a, t) { + if (t?.sourceType === "unambiguous") { + t = Object.assign({}, t); + try { + t.sourceType = "module"; + let e = le(t, a), s = e.parse(); + if (e.sawUnambiguousESM) return s; + if (e.ambiguousScriptDifferentAst) try { + return t.sourceType = "script", le(t, a).parse(); + } catch {} + else s.program.sourceType = "script"; + return s; + } catch (e) { + try { + return t.sourceType = "script", le(t, a).parse(); + } catch {} + throw e; + } + } else return le(t, a).parse(); +} +function Ne(a, t) { + let e = le(t, a); + return e.options.strictMode && (e.state.strict = !0), e.getExpression(); +} +function ar(a) { + let t = {}; + for (let e of Object.keys(a)) t[e] = Gt(a[e]); + return t; +} +function le(a, t) { + let e = Ee, s = /* @__PURE__ */ new Map(); + if (a?.plugins) { + for (let i of a.plugins) { + let r, n; + typeof i == "string" ? r = i : [r, n] = i, s.has(r) || s.set(r, n || {}); + } + er(s), e = nr(s); + } + return new e(a, t, s); +} +function nr(a) { + let t = []; + for (let i of tr) a.has(i) && t.push(i); + let e = t.join("|"), s = Wt.get(e); + if (!s) { + s = Ee; + for (let i of t) s = hs[i](s); + Wt.set(e, s); + } + return s; +} +function ke(a) { + return (t, e, s) => { + let i = !!s?.backwards; + if (e === !1) return !1; + let { length: r } = t, n = e; + for (; n >= 0 && n < r;) { + let o = t.charAt(n); + if (a instanceof RegExp) { + if (!a.test(o)) return n; + } else if (!a.includes(o)) return n; + i ? n-- : n++; + } + return n === -1 || n === r ? n : !1; + }; +} +function or(a, t) { + if (t === !1) return !1; + if (a.charAt(t) === "/" && a.charAt(t + 1) === "*") { + for (let e = t + 2; e < a.length; ++e) if (a.charAt(e) === "*" && a.charAt(e + 1) === "/") return e + 2; + } + return t; +} +function hr(a, t, e) { + let s = !!e?.backwards; + if (t === !1) return !1; + let i = a.charAt(t); + if (s) { + if (a.charAt(t - 1) === "\r" && i === ` +`) return t - 2; + if (us(i)) return t - 1; + } else { + if (i === "\r" && a.charAt(t + 1) === ` +`) return t + 2; + if (us(i)) return t + 1; + } + return t; +} +function cr(a, t) { + return t === !1 ? !1 : a.charAt(t) === "/" && a.charAt(t + 1) === "/" ? ls(a, t) : t; +} +function lr(a, t) { + let e = null, s = t; + for (; s !== e;) e = s, s = cs(a, s), s = ps(a, s), s = ds(a, s), s = fs(a, s); + return s; +} +function ys(a) { + let t = []; + for (let e of a) try { + return e(); + } catch (s) { + t.push(s); + } + throw Object.assign(/* @__PURE__ */ new Error("All combinations failed"), { errors: t }); +} +function pr(a) { + if (!a.startsWith("#!")) return ""; + let t = a.indexOf(` +`); + return t === -1 ? a : a.slice(0, t); +} +function dr(a) { + return this[a < 0 ? this.length + a : a]; +} +function M(a) { + let t = a.range?.[0] ?? a.start, e = (a.declaration?.decorators ?? a.decorators)?.[0]; + return e ? Math.min(M(e), t) : t; +} +function L(a) { + return a.range?.[1] ?? a.end; +} +function yr(a) { + let t = new Set(a); + return (e) => t.has(e?.type); +} +function gr(a) { + return St.has(a) || St.set(a, se(a) && a.value[0] === "*" && /@(?:type|satisfies)\b/u.test(a.value)), St.get(a); +} +function Tr(a) { + if (!se(a)) return !1; + let t = `*${a.value}*`.split(` +`); + return t.length > 1 && t.every((e) => e.trimStart()[0] === "*"); +} +function br(a) { + return wt.has(a) || wt.set(a, Tr(a)), wt.get(a); +} +function Ar(a) { + if (a.length < 2) return; + let t; + for (let e = a.length - 1; e >= 0; e--) { + let s = a[e]; + if (t && L(s) === M(t) && Ct(s) && Ct(t) && (a.splice(e + 1, 1), s.value += "*//*" + t.value, s.range = [M(s), L(t)]), !gs(s) && !se(s)) throw new TypeError(`Unknown comment type: "${s.type}".`); + t = s; + } +} +function Sr(a) { + return a !== null && typeof a == "object"; +} +function ye(a) { + if (me !== null && typeof me.property) { + let t = me; + return me = ye.prototype = null, t; + } + return me = ye.prototype = a ?? Object.create(null), new ye(); +} +function Et(a) { + return ye(a); +} +function Cr(a, t = "type") { + Et(a); + function e(s) { + let i = s[t], r = a[i]; + if (!Array.isArray(r)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: s }); + return r; + } + return e; +} +function Le(a, t) { + if (!As(a)) return a; + if (Array.isArray(a)) { + for (let s = 0; s < a.length; s++) a[s] = Le(a[s], t); + return a; + } + if (t.onEnter) { + let s = t.onEnter(a) ?? a; + if (s !== a) return Le(s, t); + a = s; + } + let e = Cs(a); + for (let s = 0; s < e.length; s++) a[e[s]] = Le(a[e[s]], t); + return t.onLeave && (a = t.onLeave(a) || a), a; +} +function Ir(a, t) { + let { parser: e, text: s } = t, { comments: i } = a, r = e === "oxc" && t.oxcAstType === "ts"; + bs(i); + let n = a.type === "File" ? a.program : a; + n.interpreter && (i.unshift(n.interpreter), delete n.interpreter), r && a.hashbang && (i.unshift(a.hashbang), delete a.hashbang), a.type === "Program" && (a.range = [0, s.length]); + let o; + return a = Es(a, { + onEnter(h) { + switch (h.type) { + case "ParenthesizedExpression": { + let { expression: l } = h, u = M(h); + if (l.type === "TypeCastExpression") return l.range = [u, L(h)], l; + let f = !1; + if (!r) { + if (!o) { + o = []; + for (let x of i) Ts(x) && o.push(L(x)); + } + let d = xs(0, o, (x) => x <= u); + f = d && s.slice(d, u).trim().length === 0; + } + return f ? void 0 : (l.extra = { + ...l.extra, + parenthesized: !0 + }, l); + } + case "TemplateLiteral": + if (h.expressions.length !== h.quasis.length - 1) throw new Error("Malformed template literal."); + break; + case "TemplateElement": + if (e === "flow" || e === "hermes" || e === "espree" || e === "typescript" || r) h.range = [M(h) + 1, L(h) - (h.tail ? 1 : 2)]; + break; + case "VariableDeclaration": { + let l = Ps(0, h.declarations, -1); + l?.init && s[L(l)] !== ";" && (h.range = [M(h), L(l)]); + break; + } + case "TSParenthesizedType": return h.typeAnnotation; + case "TopicReference": + a.extra = { + ...a.extra, + __isUsingHackPipeline: !0 + }; + break; + case "TSUnionType": + case "TSIntersectionType": + if (h.types.length === 1) return h.types[0]; + break; + case "ImportExpression": + e === "hermes" && h.attributes && !h.options && (h.options = h.attributes); + break; + } + }, + onLeave(h) { + switch (h.type) { + case "LogicalExpression": + if (Is(h)) return It(h); + break; + case "TSImportType": + !h.source && h.argument.type === "TSLiteralType" && (h.source = h.argument.literal, delete h.argument); + break; + } + } + }), a; +} +function Is(a) { + return a.type === "LogicalExpression" && a.right.type === "LogicalExpression" && a.operator === a.right.operator; +} +function It(a) { + return Is(a) ? It({ + type: "LogicalExpression", + operator: a.operator, + left: It({ + type: "LogicalExpression", + operator: a.operator, + left: a.left, + right: a.right.left, + range: [M(a.left), L(a.right.left)] + }), + right: a.right.right, + range: [M(a), L(a)] + }) : a; +} +function Nr(a, t) { + let e = /* @__PURE__ */ new SyntaxError(a + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(e, t); +} +function kr(a) { + let { message: t, loc: e, reasonCode: s } = a; + if (!e) return a; + let { line: i, column: r } = e, n = a; + (s === "MissingPlugin" || s === "MissingOneOfPlugins") && (t = "Unexpected token.", n = void 0); + let o = ` (${i}:${r})`; + return t.endsWith(o) && (t = t.slice(0, -o.length)), t.startsWith(ks) && (t = t.slice(ks.length)), De(t, { + loc: { start: { + line: i, + column: r + 1 + } }, + cause: n + }); +} +function Ds(a) { + let t = a.match(Or); + return t ? t[0].trimStart() : ""; +} +function Ms(a) { + a = xe(0, a.replace(Mr, "").replace(Dr, ""), Rr, "$1"); + let e = ""; + for (; e !== a;) e = a, a = xe(0, a, Br, ` +$1 $2 +`); + a = a.replace(vs, "").trimEnd(); + let s = Object.create(null), i = xe(0, a, Ls, "").replace(vs, "").trimEnd(), r; + for (; r = Ls.exec(a);) { + let n = xe(0, r[2], Fr, ""); + if (typeof s[r[1]] == "string" || Array.isArray(s[r[1]])) { + let o = s[r[1]]; + s[r[1]] = [ + ...Ur, + ...Array.isArray(o) ? o : [o], + n + ]; + } else s[r[1]] = n; + } + return { + comments: i, + pragmas: s + }; +} +function Bs(a) { + let t = ve(a); + t && (a = a.slice(t.length + 1)); + let { pragmas: s, comments: i } = Ms(Ds(a)); + return { + shebang: t, + text: a, + pragmas: s, + comments: i + }; +} +function Rs(a) { + let { pragmas: t } = Bs(a); + return Fs.some((e) => Object.prototype.hasOwnProperty.call(t, e)); +} +function Us(a) { + let { pragmas: t } = Bs(a); + return Os.some((e) => Object.prototype.hasOwnProperty.call(t, e)); +} +function _r(a) { + return a = typeof a == "function" ? { parse: a } : a, { + astFormat: "estree", + hasPragma: Rs, + hasIgnorePragma: Us, + locStart: M, + locEnd: L, + ...a + }; +} +function _s(a) { + if (typeof a == "string") { + if (a = a.toLowerCase(), /\.(?:mjs|mts)$/iu.test(a)) return Oe; + if (/\.(?:cjs|cts)$/iu.test(a)) return Nt; + } +} +function jr(a, t) { + let { type: e = "JsExpressionRoot", rootMarker: s, text: i } = t, { tokens: r, comments: n } = a; + return delete a.tokens, delete a.comments, { + tokens: r, + comments: n, + type: e, + node: a, + range: [0, i.length], + rootMarker: s + }; +} +function qr(a, t) { + if (t?.endsWith(".js.flow")) return !0; + let e = ve(a); + e && (a = a.slice(e.length)); + let s = ms(a, 0); + return s !== !1 && (a = a.slice(0, s)), zr.test(a); +} +function $r(a, t, e) { + let s = a(t, e), i = s.errors.find((r) => !Hr.has(r.reasonCode)); + if (i) throw i; + return s; +} +function Kr({ isExpression: a = !1, optionsCombinations: t }) { + return (e, s = {}) => { + let { filepath: i } = s; + if (typeof i != "string" && (i = void 0), (s.parser === "babel" || s.parser === "__babel_estree") && qr(e, i)) return s.parser = "babel-flow", qs.parse(e, s); + let r = t, n = s.__babelSourceType ?? _s(i); + n && n !== Oe && (r = r.map((u) => ({ + ...u, + sourceType: n, + ...n === Nt ? { + allowReturnOutsideFunction: void 0, + allowNewTargetOutsideFunction: void 0 + } : void 0 + }))); + let o = /%[A-Z]/u.test(e); + e.includes("|>") ? r = (o ? [...Vs, js] : Vs).flatMap((f) => r.map((d) => _([f], d))) : o && (r = r.map((u) => _([js], u))); + let h = a ? Ne : Ie, l; + try { + l = ys(r.map((u) => () => $r(h, e, u))); + } catch ({ errors: [u] }) { + throw Me(u); + } + return a && (l = Fe(l, { + text: e, + rootMarker: s.rootMarker + })), Ns(l, { text: e }); + }; +} +function Qr(a) { + return Array.isArray(a) && a.length > 0; +} +function Zr(a) { + let t = Ie(a, $s), { program: e } = t; + if (e.body.length === 0 && e.directives.length === 0 && !e.interpreter) return t; +} +function Be(a, t = {}) { + let { allowComments: e = !0, allowEmpty: s = !1 } = t, i; + try { + i = Ne(a, $s); + } catch (r) { + if (s && r.code === "BABEL_PARSER_SYNTAX_ERROR" && r.reasonCode === "ParseExpressionEmptyInput") try { + i = Zr(a); + } catch {} + if (!i) throw Me(r); + } + if (!e && vt(i.comments)) throw q(i.comments[0], "Comment"); + return i = Fe(i, { + type: "JsonRoot", + text: a + }), i.node.type === "File" ? delete i.node : re(i.node), i; +} +function q(a, t) { + let [e, s] = [a.loc.start, a.loc.end].map(({ line: i, column: r }) => ({ + line: i, + column: r + 1 + })); + return De(`${t} is not allowed in JSON.`, { loc: { + start: e, + end: s + } }); +} +function re(a) { + switch (a.type) { + case "ArrayExpression": + for (let t of a.elements) t !== null && re(t); + return; + case "ObjectExpression": + for (let t of a.properties) re(t); + return; + case "ObjectProperty": + if (a.computed) throw q(a.key, "Computed key"); + if (a.shorthand) throw q(a.key, "Shorthand property"); + a.key.type !== "Identifier" && re(a.key), re(a.value); + return; + case "UnaryExpression": { + let { operator: t, argument: e } = a; + if (t !== "+" && t !== "-") throw q(a, `Operator '${a.operator}'`); + if (e.type === "NumericLiteral" || e.type === "Identifier" && (e.name === "Infinity" || e.name === "NaN")) return; + throw q(e, `Operator '${t}' before '${e.type}'`); + } + case "Identifier": + if (a.name !== "Infinity" && a.name !== "NaN" && a.name !== "undefined") throw q(a, `Identifier '${a.name}'`); + return; + case "TemplateLiteral": + if (vt(a.expressions)) throw q(a.expressions[0], "'TemplateLiteral' with expression"); + for (let t of a.quasis) re(t); + return; + case "NullLiteral": + case "BooleanLiteral": + case "NumericLiteral": + case "StringLiteral": + case "TemplateElement": return; + default: throw q(a, `'${a.type}'`); + } +} +var Hs, Re, Ks, kt, R, Q, Dt, Js, Mt, be, Gs, Xs, Ys, Qs, Zs, ei, p, ri, Ft, ai, W, E, T, m, Ue, oe, j, ni, we, ft, pe, dt, mt, yt, xt, Pt, gt, oi, bt, Xt, Pi, gi, Yt, Ti, At, bi, Ai, Si, Ei, ue, fe, He, We, Ni, g, vi, Di, Mi, ge, _e, je, U, Bi, Je, Ge, Xe, Ye, Qe, Ze, Ui, _t, Te, Vi, tt, st, it, rt, Z, Ce, at, nt, Y, de, Vt, ot, ht, ct, Ve, y, Ji, $t, Qi, Zi, Kt, Ht, hs, tr, pt, ze, sr, ir, qe, ut, Ee, Wt, cs, ls, ps, us, fs, ds, ms, ve, ee, ur, xs, Ps, te, se, gs, St, Ts, wt, Ct, bs, As, me, wr, Ss, c, Cs, Es, Ns, De, ks, Me, vr, xe, Dr, Mr, Or, Fr, vs, Br, Ls, Rr, Ur, Os, Fs, H, Oe, Nt, Fe, ie, Vr, js, Vs, _, zr, Hr, zs, Wr, Jr, Gr, Xr, qs, Yr, Lt, vt, $s, ea, ta, sa, ia, ra; +//#endregion +__esmMin((() => { + Hs = Object.defineProperty; + Re = (a, t) => { + for (var e in t) Hs(a, e, { + get: t[e], + enumerable: !0 + }); + }; + Ks = {}; + Re(Ks, { parsers: () => ra }); + kt = {}; + Re(kt, { + __babel_estree: () => Yr, + __js_expression: () => Gr, + __ts_expression: () => Xr, + __vue_event_binding: () => Wr, + __vue_expression: () => Gr, + __vue_ts_event_binding: () => Jr, + __vue_ts_expression: () => Xr, + babel: () => Wr, + "babel-flow": () => qs, + "babel-ts": () => Jr + }); + R = class { + line; + column; + index; + constructor(t, e, s) { + this.line = t, this.column = e, this.index = s; + } + }, Q = class { + start; + end; + filename; + identifierName; + constructor(t, e) { + this.start = t, this.end = e; + } + }; + Dt = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED", Js = { + ImportMetaOutsideModule: { + message: `import.meta may appear only with 'sourceType: "module"'`, + code: Dt + }, + ImportOutsideModule: { + message: `'import' and 'export' may appear only with 'sourceType: "module"'`, + code: Dt + } + }, Mt = { + ArrayPattern: "array destructuring pattern", + AssignmentExpression: "assignment expression", + AssignmentPattern: "assignment expression", + ArrowFunctionExpression: "arrow function expression", + ConditionalExpression: "conditional expression", + CatchClause: "catch clause", + ForOfStatement: "for-of statement", + ForInStatement: "for-in statement", + ForStatement: "for-loop", + FormalParameters: "function parameter list", + Identifier: "identifier", + ImportSpecifier: "import specifier", + ImportDefaultSpecifier: "import default specifier", + ImportNamespaceSpecifier: "import namespace specifier", + ObjectPattern: "object destructuring pattern", + ParenthesizedExpression: "parenthesized expression", + RestElement: "rest element", + UpdateExpression: { + true: "prefix operation", + false: "postfix operation" + }, + VariableDeclarator: "variable declaration", + YieldExpression: "yield expression" + }, be = (a) => a.type === "UpdateExpression" ? Mt.UpdateExpression[`${a.prefix}`] : Mt[a.type], Gs = { + AccessorIsGenerator: ({ kind: a }) => `A ${a}ter cannot be a generator.`, + ArgumentsInClass: "'arguments' is only allowed in functions and class methods.", + AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.", + AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.", + AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.", + AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.", + AwaitUsingNotInAsyncContext: "'await using' is only allowed within async functions and at the top levels of modules.", + AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.", + BadGetterArity: "A 'get' accessor must not have any formal parameters.", + BadSetterArity: "A 'set' accessor must have exactly one formal parameter.", + BadSetterRestParameter: "A 'set' accessor function argument must not be a rest parameter.", + ConstructorClassField: "Classes may not have a field named 'constructor'.", + ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.", + ConstructorIsAccessor: "Class constructor may not be an accessor.", + ConstructorIsAsync: "Constructor can't be an async function.", + ConstructorIsGenerator: "Constructor can't be a generator.", + DeclarationMissingInitializer: ({ kind: a }) => `Missing initializer in ${a} declaration.`, + DecoratorArgumentsOutsideParentheses: "Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.", + DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.", + DecoratorsBeforeAfterExport: "Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + DecoratorExportClass: "Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.", + DecoratorSemicolon: "Decorators must not be followed by a semicolon.", + DecoratorStaticBlock: "Decorators can't be used with a static block.", + DeferImportRequiresNamespace: "Only `import defer * as x from \"./module\"` is valid.", + DeletePrivateField: "Deleting a private field is not allowed.", + DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.", + DuplicateConstructor: "Duplicate constructor in the same class.", + DuplicateDefaultExport: "Only one default export allowed per module.", + DuplicateExport: ({ exportName: a }) => `\`${a}\` has already been exported. Exported identifiers must be unique.`, + DuplicateProto: "Redefinition of __proto__ property.", + DuplicateRegExpFlags: "Duplicate regular expression flag.", + ElementAfterRest: "Rest element must be last element.", + EscapedCharNotAnIdentifier: "Invalid Unicode escape.", + ExportBindingIsString: ({ localName: a, exportName: t }) => `A string literal cannot be used as an exported binding without \`from\`. +- Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`, + ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", + ForInOfLoopInitializer: ({ type: a }) => `'${a === "ForInStatement" ? "for-in" : "for-of"}' loop variable declaration may not have an initializer.`, + ForInUsing: "For-in loop may not start with 'using' declaration.", + ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.", + ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.", + GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.", + IllegalBreakContinue: ({ type: a }) => `Unsyntactic ${a === "BreakStatement" ? "break" : "continue"}.`, + IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", + IllegalReturn: "'return' outside of function.", + ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.", + ImportBindingIsString: ({ importName: a }) => `A string literal cannot be used as an imported binding. +- Did you mean \`import { "${a}" as foo }\`?`, + ImportCallArity: "`import()` requires exactly one or two arguments.", + ImportCallNotNewExpression: "Cannot use new with import(...).", + ImportCallSpreadArgument: "`...` is not allowed in `import()`.", + ImportJSONBindingNotDefault: "A JSON module can only be imported with `default`.", + ImportReflectionHasAssertion: "`import module x` cannot have assertions.", + ImportReflectionNotBinding: "Only `import module x from \"./module\"` is valid.", + IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.", + InvalidBigIntLiteral: "Invalid BigIntLiteral.", + InvalidCodePoint: "Code point out of bounds.", + InvalidCoverDiscardElement: "'void' must be followed by an expression when not used in a binding position.", + InvalidCoverInitializedName: "Invalid shorthand property initializer.", + InvalidDecimal: "Invalid decimal.", + InvalidDigit: ({ radix: a }) => `Expected number in radix ${a}.`, + InvalidEscapeSequence: "Bad character escape sequence.", + InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", + InvalidEscapedReservedWord: ({ reservedWord: a }) => `Escape sequence in keyword ${a}.`, + InvalidIdentifier: ({ identifierName: a }) => `Invalid identifier ${a}.`, + InvalidLhs: ({ ancestor: a }) => `Invalid left-hand side in ${be(a)}.`, + InvalidLhsBinding: ({ ancestor: a }) => `Binding invalid left-hand side in ${be(a)}.`, + InvalidLhsOptionalChaining: ({ ancestor: a }) => `Invalid optional chaining in the left-hand side of ${be(a)}.`, + InvalidNumber: "Invalid number.", + InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", + InvalidOrUnexpectedToken: ({ unexpected: a }) => `Unexpected character '${a}'.`, + InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", + InvalidPrivateFieldResolution: ({ identifierName: a }) => `Private name #${a} is not defined.`, + InvalidPropertyBindingPattern: "Binding member expression.", + InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.", + InvalidRestAssignmentPattern: "Invalid rest operator's argument.", + LabelRedeclaration: ({ labelName: a }) => `Label '${a}' is already declared.`, + LetInLexicalBinding: "'let' is disallowed as a lexically bound name.", + LineTerminatorBeforeArrow: "No line break is allowed before '=>'.", + MalformedRegExpFlags: "Invalid regular expression flag.", + MissingClassName: "A class name is required.", + MissingEqInAssignment: "Only '=' operator can be used for specifying default value.", + MissingSemicolon: "Missing semicolon.", + MissingPlugin: ({ missingPlugin: a }) => `This experimental syntax requires enabling the parser plugin: ${a.map((t) => JSON.stringify(t)).join(", ")}.`, + MissingOneOfPlugins: ({ missingPlugin: a }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${a.map((t) => JSON.stringify(t)).join(", ")}.`, + MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.", + MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.", + ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.", + ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.", + ModuleAttributesWithDuplicateKeys: ({ key: a }) => `Duplicate key "${a}" is not allowed in module attributes.`, + ModuleExportNameHasLoneSurrogate: ({ surrogateCharCode: a }) => `An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`, + ModuleExportUndefined: ({ localName: a }) => `Export '${a}' is not defined.`, + MultipleDefaultsInSwitch: "Multiple default clauses.", + NewlineAfterThrow: "Illegal newline after throw.", + NoCatchOrFinally: "Missing catch or finally clause.", + NumberIdentifier: "Identifier directly after number.", + NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.", + ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.", + OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.", + OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.", + OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.", + ParamDupe: "Argument name clash.", + PatternHasAccessor: "Object pattern can't contain getter or setter.", + PatternHasMethod: "Object pattern can't contain methods.", + PrivateInExpectedIn: ({ identifierName: a }) => `Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`, + PrivateNameRedeclaration: ({ identifierName: a }) => `Duplicate private name #${a}.`, + RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + RecordNoProto: "'__proto__' is not allowed in Record expressions.", + RestTrailingComma: "Unexpected trailing comma after rest element.", + SloppyFunction: "In non-strict mode code, functions can only be declared at top level or inside a block.", + SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.", + SourcePhaseImportRequiresDefault: "Only `import source x from \"./module\"` is valid.", + StaticPrototype: "Classes may not have static property named prototype.", + SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?", + SuperPrivateField: "Private fields can't be accessed on super.", + TrailingDecorator: "Decorators must be attached to a class element.", + TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.", + TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.", + UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.", + UnexpectedAwaitAfterPipelineBody: "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.", + UnexpectedDigitAfterHash: "Unexpected digit after hash token.", + UnexpectedImportExport: "'import' and 'export' may only appear at the top level.", + UnexpectedKeyword: ({ keyword: a }) => `Unexpected keyword '${a}'.`, + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.", + UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.", + UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.", + UnexpectedPrivateField: "Unexpected private name.", + UnexpectedReservedWord: ({ reservedWord: a }) => `Unexpected reserved word '${a}'.`, + UnexpectedSuper: "'super' is only allowed in object methods and classes.", + UnexpectedToken: ({ expected: a, unexpected: t }) => `Unexpected token${t ? ` '${t}'.` : ""}${a ? `, expected "${a}"` : ""}`, + UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.", + UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.", + UnexpectedVoidPattern: "Unexpected void binding.", + UnsupportedBind: "Binding should be performed on object property.", + UnsupportedDecoratorExport: "A decorated export must export a class declaration.", + UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.", + UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.", + UnsupportedMetaProperty: ({ target: a, onlyValidPropertyName: t }) => `The only valid meta property for ${a} is ${a}.${t}.`, + UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.", + UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.", + UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).", + UnterminatedComment: "Unterminated comment.", + UnterminatedRegExp: "Unterminated regular expression.", + UnterminatedString: "Unterminated string constant.", + UnterminatedTemplate: "Unterminated template.", + UsingDeclarationExport: "Using declaration cannot be exported.", + UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", + VarRedeclaration: ({ identifierName: a }) => `Identifier '${a}' has already been declared.`, + VoidPatternCatchClauseParam: "A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.", + VoidPatternInitializer: "A void binding may not have an initializer.", + YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", + YieldInParameter: "Yield expression is not allowed in formal parameters.", + YieldNotInGeneratorFunction: "'yield' is only allowed within generator functions.", + ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." + }, Xs = { + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: ({ referenceName: a }) => `Assigning to '${a}' in strict mode.`, + StrictEvalArgumentsBinding: ({ bindingName: a }) => `Binding '${a}' in strict mode.`, + StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.", + StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.", + StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.", + StrictWith: "'with' in strict mode." + }, Ys = { + ParseExpressionEmptyInput: "Unexpected parseExpression() input: The input is empty or contains only comments.", + ParseExpressionExpectsEOF: ({ unexpected: a }) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(a)}\`.` + }, Qs = /* @__PURE__ */ new Set([ + "ArrowFunctionExpression", + "AssignmentExpression", + "ConditionalExpression", + "YieldExpression" + ]), Zs = Object.assign({ + PipeBodyIsTighter: "Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.", + PipeTopicRequiresHackPipes: "Topic references are only supported when using the `\"proposal\": \"hack\"` version of the pipeline proposal.", + PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.", + PipeTopicUnconfiguredToken: ({ token: a }) => `Invalid topic token ${a}. In order to use ${a} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${a}" }.`, + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: ({ type: a }) => `Hack-style pipe body cannot be an unparenthesized ${be({ type: a })}; please wrap it in parentheses.` + }, {}), ei = ["message"]; + p = Object.assign({}, F(Js), F(Gs), F(Xs), F(Ys), F`pipelineOperator`(Zs)); + ({defineProperty: ri} = Object), Ft = (a, t) => { + a && ri(a, t, { + enumerable: !1, + value: a[t] + }); + }; + ai = (a) => class extends a { + parse() { + let e = ne(super.parse()); + return this.optionFlags & 256 && (e.tokens = e.tokens.map(ne)), e; + } + parseRegExpLiteral({ pattern: e, flags: s }) { + let i = null; + try { + i = new RegExp(e, s); + } catch {} + let r = this.estreeParseLiteral(i); + return r.regex = { + pattern: e, + flags: s + }, r; + } + parseBigIntLiteral(e) { + let s; + try { + s = BigInt(e); + } catch { + s = null; + } + let i = this.estreeParseLiteral(s); + return i.bigint = String(i.value || e), i; + } + parseDecimalLiteral(e) { + let i = this.estreeParseLiteral(null); + return i.decimal = String(i.value || e), i; + } + estreeParseLiteral(e) { + return this.parseLiteral(e, "Literal"); + } + parseStringLiteral(e) { + return this.estreeParseLiteral(e); + } + parseNumericLiteral(e) { + return this.estreeParseLiteral(e); + } + parseNullLiteral() { + return this.estreeParseLiteral(null); + } + parseBooleanLiteral(e) { + return this.estreeParseLiteral(e); + } + estreeParseChainExpression(e, s) { + let i = this.startNodeAtNode(e); + return i.expression = e, this.finishNodeAt(i, "ChainExpression", s); + } + directiveToStmt(e) { + let s = e.value; + delete e.value, this.castNodeTo(s, "Literal"), s.raw = s.extra.raw, s.value = s.extra.expressionValue; + let i = this.castNodeTo(e, "ExpressionStatement"); + return i.expression = s, i.directive = s.extra.rawValue, delete s.extra, i; + } + fillOptionalPropertiesForTSESLint(e) {} + cloneEstreeStringLiteral(e) { + let { start: s, end: i, loc: r, range: n, raw: o, value: h } = e, l = Object.create(e.constructor.prototype); + return l.type = "Literal", l.start = s, l.end = i, l.loc = r, l.range = n, l.raw = o, l.value = h, l; + } + initFunction(e, s) { + super.initFunction(e, s), e.expression = !1; + } + checkDeclaration(e) { + e != null && this.isObjectProperty(e) ? this.checkDeclaration(e.value) : super.checkDeclaration(e); + } + getObjectOrClassMethodParams(e) { + return e.value.params; + } + isValidDirective(e) { + return e.type === "ExpressionStatement" && e.expression.type === "Literal" && typeof e.expression.value == "string" && !e.expression.extra?.parenthesized; + } + parseBlockBody(e, s, i, r, n) { + super.parseBlockBody(e, s, i, r, n); + e.body = e.directives.map((h) => this.directiveToStmt(h)).concat(e.body), delete e.directives; + } + parsePrivateName() { + let e = super.parsePrivateName(); + return this.convertPrivateNameToPrivateIdentifier(e); + } + convertPrivateNameToPrivateIdentifier(e) { + let s = super.getPrivateNameSV(e); + return delete e.id, e.name = s, this.castNodeTo(e, "PrivateIdentifier"); + } + isPrivateName(e) { + return e.type === "PrivateIdentifier"; + } + getPrivateNameSV(e) { + return e.name; + } + parseLiteral(e, s) { + let i = super.parseLiteral(e, s); + return i.raw = i.extra.raw, delete i.extra, i; + } + parseFunctionBody(e, s, i = !1) { + super.parseFunctionBody(e, s, i), e.expression = e.body.type !== "BlockStatement"; + } + parseMethod(e, s, i, r, n, o, h = !1) { + let l = this.startNode(); + l.kind = e.kind, l = super.parseMethod(l, s, i, r, n, o, h), delete l.kind; + let { typeParameters: u } = e; + u && (delete e.typeParameters, l.typeParameters = u, this.resetStartLocationFromNode(l, u)); + return e.value = this.castNodeTo(l, this.hasPlugin("typescript") && !l.body ? "TSEmptyBodyFunctionExpression" : "FunctionExpression"), o === "ClassPrivateMethod" && (e.computed = !1), this.hasPlugin("typescript") && e.abstract ? (delete e.abstract, this.finishNode(e, "TSAbstractMethodDefinition")) : o === "ObjectMethod" ? (e.kind === "method" && (e.kind = "init"), e.shorthand = !1, this.finishNode(e, "Property")) : this.finishNode(e, "MethodDefinition"); + } + nameIsConstructor(e) { + return e.type === "Literal" ? e.value === "constructor" : super.nameIsConstructor(e); + } + parseClassProperty(...e) { + let s = super.parseClassProperty(...e); + return s.abstract && this.hasPlugin("typescript") ? (delete s.abstract, this.castNodeTo(s, "TSAbstractPropertyDefinition")) : this.castNodeTo(s, "PropertyDefinition"), s; + } + parseClassPrivateProperty(...e) { + let s = super.parseClassPrivateProperty(...e); + return s.abstract && this.hasPlugin("typescript") ? this.castNodeTo(s, "TSAbstractPropertyDefinition") : this.castNodeTo(s, "PropertyDefinition"), s.computed = !1, s; + } + parseClassAccessorProperty(e) { + let s = super.parseClassAccessorProperty(e); + return s.abstract && this.hasPlugin("typescript") ? (delete s.abstract, this.castNodeTo(s, "TSAbstractAccessorProperty")) : this.castNodeTo(s, "AccessorProperty"), s; + } + parseObjectProperty(e, s, i, r) { + let n = super.parseObjectProperty(e, s, i, r); + return n && (n.kind = "init", this.castNodeTo(n, "Property")), n; + } + finishObjectProperty(e) { + return e.kind = "init", this.finishNode(e, "Property"); + } + isValidLVal(e, s, i, r) { + return e === "Property" ? "value" : super.isValidLVal(e, s, i, r); + } + isAssignable(e, s) { + return e != null && this.isObjectProperty(e) ? this.isAssignable(e.value, s) : super.isAssignable(e, s); + } + toAssignable(e, s = !1) { + if (e != null && this.isObjectProperty(e)) { + let { key: i, value: r } = e; + this.isPrivateName(i) && this.classScope.usePrivateName(this.getPrivateNameSV(i), i.loc.start), this.toAssignable(r, s); + } else super.toAssignable(e, s); + } + toAssignableObjectExpressionProp(e, s, i) { + e.type === "Property" && (e.kind === "get" || e.kind === "set") ? this.raise(p.PatternHasAccessor, e.key) : e.type === "Property" && e.method ? this.raise(p.PatternHasMethod, e.key) : super.toAssignableObjectExpressionProp(e, s, i); + } + finishCallExpression(e, s) { + let i = super.finishCallExpression(e, s); + return i.callee.type === "Import" ? (this.castNodeTo(i, "ImportExpression"), i.source = i.arguments[0], i.options = i.arguments[1] ?? null, delete i.arguments, delete i.callee) : i.type === "OptionalCallExpression" ? this.castNodeTo(i, "CallExpression") : i.optional = !1, i; + } + toReferencedArguments(e) { + e.type !== "ImportExpression" && super.toReferencedArguments(e); + } + parseExport(e, s) { + let i = this.state.lastTokStartLoc, r = super.parseExport(e, s); + switch (r.type) { + case "ExportAllDeclaration": + r.exported = null; + break; + case "ExportNamedDeclaration": r.specifiers.length === 1 && r.specifiers[0].type === "ExportNamespaceSpecifier" && (this.castNodeTo(r, "ExportAllDeclaration"), r.exported = r.specifiers[0].exported, delete r.specifiers); + case "ExportDefaultDeclaration": + { + let { declaration: n } = r; + n?.type === "ClassDeclaration" && n.decorators?.length > 0 && n.start === r.start && this.resetStartLocation(r, i); + } + break; + } + return r; + } + stopParseSubscript(e, s) { + let i = super.stopParseSubscript(e, s); + return s.optionalChainMember ? this.estreeParseChainExpression(i, e.loc.end) : i; + } + parseMember(e, s, i, r, n) { + let o = super.parseMember(e, s, i, r, n); + return o.type === "OptionalMemberExpression" ? this.castNodeTo(o, "MemberExpression") : o.optional = !1, o; + } + isOptionalMemberExpression(e) { + return e.type === "ChainExpression" ? e.expression.type === "MemberExpression" : super.isOptionalMemberExpression(e); + } + hasPropertyAsPrivateName(e) { + return e.type === "ChainExpression" && (e = e.expression), super.hasPropertyAsPrivateName(e); + } + isObjectProperty(e) { + return e.type === "Property" && e.kind === "init" && !e.method; + } + isObjectMethod(e) { + return e.type === "Property" && (e.method || e.kind === "get" || e.kind === "set"); + } + castNodeTo(e, s) { + let i = super.castNodeTo(e, s); + return this.fillOptionalPropertiesForTSESLint(i), i; + } + cloneIdentifier(e) { + let s = super.cloneIdentifier(e); + return this.fillOptionalPropertiesForTSESLint(s), s; + } + cloneStringLiteral(e) { + return e.type === "Literal" ? this.cloneEstreeStringLiteral(e) : super.cloneStringLiteral(e); + } + finishNodeAt(e, s, i) { + return ne(super.finishNodeAt(e, s, i)); + } + finishNode(e, s) { + let i = super.finishNode(e, s); + return this.fillOptionalPropertiesForTSESLint(i), i; + } + resetStartLocation(e, s) { + super.resetStartLocation(e, s), ne(e); + } + resetEndLocation(e, s = this.state.lastTokEndLoc) { + super.resetEndLocation(e, s), ne(e); + } + }, W = class { + constructor(t, e) { + this.token = t, this.preserveSpace = !!e; + } + token; + preserveSpace; + }, E = { + brace: new W("{"), + j_oTag: new W("...", !0) + }, T = !0, m = !0, Ue = !0, oe = !0, j = !0, ni = !0, we = class { + label; + keyword; + beforeExpr; + startsExpr; + rightAssociative; + isLoop; + isAssign; + prefix; + postfix; + binop; + constructor(t, e = {}) { + this.label = t, this.keyword = e.keyword, this.beforeExpr = !!e.beforeExpr, this.startsExpr = !!e.startsExpr, this.rightAssociative = !!e.rightAssociative, this.isLoop = !!e.isLoop, this.isAssign = !!e.isAssign, this.prefix = !!e.prefix, this.postfix = !!e.postfix, this.binop = e.binop != null ? e.binop : null; + } + }, ft = /* @__PURE__ */ new Map(); + pe = -1, dt = [], mt = [], yt = [], xt = [], Pt = [], gt = []; + oi = { + bracketL: P("[", { + beforeExpr: T, + startsExpr: m + }), + bracketHashL: P("#[", { + beforeExpr: T, + startsExpr: m + }), + bracketBarL: P("[|", { + beforeExpr: T, + startsExpr: m + }), + bracketR: P("]"), + bracketBarR: P("|]"), + braceL: P("{", { + beforeExpr: T, + startsExpr: m + }), + braceBarL: P("{|", { + beforeExpr: T, + startsExpr: m + }), + braceHashL: P("#{", { + beforeExpr: T, + startsExpr: m + }), + braceR: P("}"), + braceBarR: P("|}"), + parenL: P("(", { + beforeExpr: T, + startsExpr: m + }), + parenR: P(")"), + comma: P(",", { beforeExpr: T }), + semi: P(";", { beforeExpr: T }), + colon: P(":", { beforeExpr: T }), + doubleColon: P("::", { beforeExpr: T }), + dot: P("."), + question: P("?", { beforeExpr: T }), + questionDot: P("?."), + arrow: P("=>", { beforeExpr: T }), + template: P("template"), + ellipsis: P("...", { beforeExpr: T }), + backQuote: P("`", { startsExpr: m }), + dollarBraceL: P("${", { + beforeExpr: T, + startsExpr: m + }), + templateTail: P("...`", { startsExpr: m }), + templateNonTail: P("...${", { + beforeExpr: T, + startsExpr: m + }), + at: P("@"), + hash: P("#", { startsExpr: m }), + interpreterDirective: P("#!..."), + eq: P("=", { + beforeExpr: T, + isAssign: oe + }), + assign: P("_=", { + beforeExpr: T, + isAssign: oe + }), + slashAssign: P("_=", { + beforeExpr: T, + isAssign: oe + }), + xorAssign: P("_=", { + beforeExpr: T, + isAssign: oe + }), + moduloAssign: P("_=", { + beforeExpr: T, + isAssign: oe + }), + incDec: P("++/--", { + prefix: j, + postfix: ni, + startsExpr: m + }), + bang: P("!", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + tilde: P("~", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + doubleCaret: P("^^", { startsExpr: m }), + doubleAt: P("@@", { startsExpr: m }), + pipeline: v("|>", 0), + nullishCoalescing: v("??", 1), + logicalOR: v("||", 1), + logicalAND: v("&&", 2), + bitwiseOR: v("|", 3), + bitwiseXOR: v("^", 4), + bitwiseAND: v("&", 5), + equality: v("==/!=/===/!==", 6), + lt: v("/<=/>=", 7), + gt: v("/<=/>=", 7), + relational: v("/<=/>=", 7), + bitShift: v("<>/>>>", 8), + bitShiftL: v("<>/>>>", 8), + bitShiftR: v("<>/>>>", 8), + plusMin: P("+/-", { + beforeExpr: T, + binop: 9, + prefix: j, + startsExpr: m + }), + modulo: P("%", { + binop: 10, + startsExpr: m + }), + star: P("*", { binop: 10 }), + slash: v("/", 10), + exponent: P("**", { + beforeExpr: T, + binop: 11, + rightAssociative: !0 + }), + _in: S("in", { + beforeExpr: T, + binop: 7 + }), + _instanceof: S("instanceof", { + beforeExpr: T, + binop: 7 + }), + _break: S("break"), + _case: S("case", { beforeExpr: T }), + _catch: S("catch"), + _continue: S("continue"), + _debugger: S("debugger"), + _default: S("default", { beforeExpr: T }), + _else: S("else", { beforeExpr: T }), + _finally: S("finally"), + _function: S("function", { startsExpr: m }), + _if: S("if"), + _return: S("return", { beforeExpr: T }), + _switch: S("switch"), + _throw: S("throw", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + _try: S("try"), + _var: S("var"), + _const: S("const"), + _with: S("with"), + _new: S("new", { + beforeExpr: T, + startsExpr: m + }), + _this: S("this", { startsExpr: m }), + _super: S("super", { startsExpr: m }), + _class: S("class", { startsExpr: m }), + _extends: S("extends", { beforeExpr: T }), + _export: S("export"), + _import: S("import", { startsExpr: m }), + _null: S("null", { startsExpr: m }), + _true: S("true", { startsExpr: m }), + _false: S("false", { startsExpr: m }), + _typeof: S("typeof", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + _void: S("void", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + _delete: S("delete", { + beforeExpr: T, + prefix: j, + startsExpr: m + }), + _do: S("do", { + isLoop: Ue, + beforeExpr: T + }), + _for: S("for", { isLoop: Ue }), + _while: S("while", { isLoop: Ue }), + _as: b("as", { startsExpr: m }), + _assert: b("assert", { startsExpr: m }), + _async: b("async", { startsExpr: m }), + _await: b("await", { startsExpr: m }), + _defer: b("defer", { startsExpr: m }), + _from: b("from", { startsExpr: m }), + _get: b("get", { startsExpr: m }), + _let: b("let", { startsExpr: m }), + _meta: b("meta", { startsExpr: m }), + _of: b("of", { startsExpr: m }), + _sent: b("sent", { startsExpr: m }), + _set: b("set", { startsExpr: m }), + _source: b("source", { startsExpr: m }), + _static: b("static", { startsExpr: m }), + _using: b("using", { startsExpr: m }), + _yield: b("yield", { startsExpr: m }), + _asserts: b("asserts", { startsExpr: m }), + _checks: b("checks", { startsExpr: m }), + _exports: b("exports", { startsExpr: m }), + _global: b("global", { startsExpr: m }), + _implements: b("implements", { startsExpr: m }), + _intrinsic: b("intrinsic", { startsExpr: m }), + _infer: b("infer", { startsExpr: m }), + _is: b("is", { startsExpr: m }), + _mixins: b("mixins", { startsExpr: m }), + _proto: b("proto", { startsExpr: m }), + _require: b("require", { startsExpr: m }), + _satisfies: b("satisfies", { startsExpr: m }), + _keyof: b("keyof", { startsExpr: m }), + _readonly: b("readonly", { startsExpr: m }), + _unique: b("unique", { startsExpr: m }), + _abstract: b("abstract", { startsExpr: m }), + _declare: b("declare", { startsExpr: m }), + _enum: b("enum", { startsExpr: m }), + _module: b("module", { startsExpr: m }), + _namespace: b("namespace", { startsExpr: m }), + _interface: b("interface", { startsExpr: m }), + _type: b("type", { startsExpr: m }), + _opaque: b("opaque", { startsExpr: m }), + name: P("name", { startsExpr: m }), + placeholder: P("%%", { startsExpr: m }), + string: P("string", { startsExpr: m }), + num: P("num", { startsExpr: m }), + bigint: P("bigint", { startsExpr: m }), + decimal: P("decimal", { startsExpr: m }), + regexp: P("regexp", { startsExpr: m }), + privateName: P("#name", { startsExpr: m }), + eof: P("eof"), + jsxName: P("jsxName"), + jsxText: P("jsxText", { beforeExpr: T }), + jsxTagStart: P("jsxTagStart", { startsExpr: m }), + jsxTagEnd: P("jsxTagEnd") + }; + bt = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", Xt = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", Pi = new RegExp("[" + bt + "]"), gi = new RegExp("[" + bt + Xt + "]"); + bt = Xt = null; + Yt = [ + 0, + 11, + 2, + 25, + 2, + 18, + 2, + 1, + 2, + 14, + 3, + 13, + 35, + 122, + 70, + 52, + 268, + 28, + 4, + 48, + 48, + 31, + 14, + 29, + 6, + 37, + 11, + 29, + 3, + 35, + 5, + 7, + 2, + 4, + 43, + 157, + 19, + 35, + 5, + 35, + 5, + 39, + 9, + 51, + 13, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 2, + 10, + 2, + 14, + 2, + 6, + 2, + 1, + 4, + 51, + 13, + 310, + 10, + 21, + 11, + 7, + 25, + 5, + 2, + 41, + 2, + 8, + 70, + 5, + 3, + 0, + 2, + 43, + 2, + 1, + 4, + 0, + 3, + 22, + 11, + 22, + 10, + 30, + 66, + 18, + 2, + 1, + 11, + 21, + 11, + 25, + 7, + 25, + 39, + 55, + 7, + 1, + 65, + 0, + 16, + 3, + 2, + 2, + 2, + 28, + 43, + 28, + 4, + 28, + 36, + 7, + 2, + 27, + 28, + 53, + 11, + 21, + 11, + 18, + 14, + 17, + 111, + 72, + 56, + 50, + 14, + 50, + 14, + 35, + 39, + 27, + 10, + 22, + 251, + 41, + 7, + 1, + 17, + 5, + 57, + 28, + 11, + 0, + 9, + 21, + 43, + 17, + 47, + 20, + 28, + 22, + 13, + 52, + 58, + 1, + 3, + 0, + 14, + 44, + 33, + 24, + 27, + 35, + 30, + 0, + 3, + 0, + 9, + 34, + 4, + 0, + 13, + 47, + 15, + 3, + 22, + 0, + 2, + 0, + 36, + 17, + 2, + 24, + 20, + 1, + 64, + 6, + 2, + 0, + 2, + 3, + 2, + 14, + 2, + 9, + 8, + 46, + 39, + 7, + 3, + 1, + 3, + 21, + 2, + 6, + 2, + 1, + 2, + 4, + 4, + 0, + 19, + 0, + 13, + 4, + 31, + 9, + 2, + 0, + 3, + 0, + 2, + 37, + 2, + 0, + 26, + 0, + 2, + 0, + 45, + 52, + 19, + 3, + 21, + 2, + 31, + 47, + 21, + 1, + 2, + 0, + 185, + 46, + 42, + 3, + 37, + 47, + 21, + 0, + 60, + 42, + 14, + 0, + 72, + 26, + 38, + 6, + 186, + 43, + 117, + 63, + 32, + 7, + 3, + 0, + 3, + 7, + 2, + 1, + 2, + 23, + 16, + 0, + 2, + 0, + 95, + 7, + 3, + 38, + 17, + 0, + 2, + 0, + 29, + 0, + 11, + 39, + 8, + 0, + 22, + 0, + 12, + 45, + 20, + 0, + 19, + 72, + 200, + 32, + 32, + 8, + 2, + 36, + 18, + 0, + 50, + 29, + 113, + 6, + 2, + 1, + 2, + 37, + 22, + 0, + 26, + 5, + 2, + 1, + 2, + 31, + 15, + 0, + 24, + 43, + 261, + 18, + 16, + 0, + 2, + 12, + 2, + 33, + 125, + 0, + 80, + 921, + 103, + 110, + 18, + 195, + 2637, + 96, + 16, + 1071, + 18, + 5, + 26, + 3994, + 6, + 582, + 6842, + 29, + 1763, + 568, + 8, + 30, + 18, + 78, + 18, + 29, + 19, + 47, + 17, + 3, + 32, + 20, + 6, + 18, + 433, + 44, + 212, + 63, + 33, + 24, + 3, + 24, + 45, + 74, + 6, + 0, + 67, + 12, + 65, + 1, + 2, + 0, + 15, + 4, + 10, + 7381, + 42, + 31, + 98, + 114, + 8702, + 3, + 2, + 6, + 2, + 1, + 2, + 290, + 16, + 0, + 30, + 2, + 3, + 0, + 15, + 3, + 9, + 395, + 2309, + 106, + 6, + 12, + 4, + 8, + 8, + 9, + 5991, + 84, + 2, + 70, + 2, + 1, + 3, + 0, + 3, + 1, + 3, + 3, + 2, + 11, + 2, + 0, + 2, + 6, + 2, + 64, + 2, + 3, + 3, + 7, + 2, + 6, + 2, + 27, + 2, + 3, + 2, + 4, + 2, + 0, + 4, + 6, + 2, + 339, + 3, + 24, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 7, + 1845, + 30, + 7, + 5, + 262, + 61, + 147, + 44, + 11, + 6, + 17, + 0, + 322, + 29, + 19, + 43, + 485, + 27, + 229, + 29, + 3, + 0, + 208, + 30, + 2, + 2, + 2, + 1, + 2, + 6, + 3, + 4, + 10, + 1, + 225, + 6, + 2, + 3, + 2, + 1, + 2, + 14, + 2, + 196, + 60, + 67, + 8, + 0, + 1205, + 3, + 2, + 26, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 9, + 2, + 3, + 2, + 0, + 2, + 0, + 7, + 0, + 5, + 0, + 2, + 0, + 2, + 0, + 2, + 2, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 1, + 2, + 0, + 3, + 3, + 2, + 6, + 2, + 3, + 2, + 3, + 2, + 0, + 2, + 9, + 2, + 16, + 6, + 2, + 2, + 4, + 2, + 16, + 4421, + 42719, + 33, + 4381, + 3, + 5773, + 3, + 7472, + 16, + 621, + 2467, + 541, + 1507, + 4938, + 6, + 8489 + ], Ti = [ + 509, + 0, + 227, + 0, + 150, + 4, + 294, + 9, + 1368, + 2, + 2, + 1, + 6, + 3, + 41, + 2, + 5, + 0, + 166, + 1, + 574, + 3, + 9, + 9, + 7, + 9, + 32, + 4, + 318, + 1, + 78, + 5, + 71, + 10, + 50, + 3, + 123, + 2, + 54, + 14, + 32, + 10, + 3, + 1, + 11, + 3, + 46, + 10, + 8, + 0, + 46, + 9, + 7, + 2, + 37, + 13, + 2, + 9, + 6, + 1, + 45, + 0, + 13, + 2, + 49, + 13, + 9, + 3, + 2, + 11, + 83, + 11, + 7, + 0, + 3, + 0, + 158, + 11, + 6, + 9, + 7, + 3, + 56, + 1, + 2, + 6, + 3, + 1, + 3, + 2, + 10, + 0, + 11, + 1, + 3, + 6, + 4, + 4, + 68, + 8, + 2, + 0, + 3, + 0, + 2, + 3, + 2, + 4, + 2, + 0, + 15, + 1, + 83, + 17, + 10, + 9, + 5, + 0, + 82, + 19, + 13, + 9, + 214, + 6, + 3, + 8, + 28, + 1, + 83, + 16, + 16, + 9, + 82, + 12, + 9, + 9, + 7, + 19, + 58, + 14, + 5, + 9, + 243, + 14, + 166, + 9, + 71, + 5, + 2, + 1, + 3, + 3, + 2, + 0, + 2, + 1, + 13, + 9, + 120, + 6, + 3, + 6, + 4, + 0, + 29, + 9, + 41, + 6, + 2, + 3, + 9, + 0, + 10, + 10, + 47, + 15, + 199, + 7, + 137, + 9, + 54, + 7, + 2, + 7, + 17, + 9, + 57, + 21, + 2, + 13, + 123, + 5, + 4, + 0, + 2, + 1, + 2, + 6, + 2, + 0, + 9, + 9, + 49, + 4, + 2, + 1, + 2, + 4, + 9, + 9, + 55, + 9, + 266, + 3, + 10, + 1, + 2, + 0, + 49, + 6, + 4, + 4, + 14, + 10, + 5350, + 0, + 7, + 14, + 11465, + 27, + 2343, + 9, + 87, + 9, + 39, + 4, + 60, + 6, + 26, + 9, + 535, + 9, + 470, + 0, + 2, + 54, + 8, + 3, + 82, + 0, + 12, + 1, + 19628, + 1, + 4178, + 9, + 519, + 45, + 3, + 22, + 543, + 4, + 4, + 5, + 9, + 7, + 3, + 6, + 31, + 3, + 149, + 2, + 1418, + 49, + 513, + 54, + 5, + 49, + 9, + 0, + 15, + 0, + 23, + 4, + 2, + 14, + 1361, + 6, + 2, + 16, + 3, + 6, + 2, + 1, + 2, + 4, + 101, + 0, + 161, + 6, + 10, + 9, + 357, + 0, + 62, + 13, + 499, + 13, + 245, + 1, + 2, + 9, + 233, + 0, + 3, + 0, + 8, + 1, + 6, + 0, + 475, + 6, + 110, + 6, + 6, + 9, + 4759, + 9, + 787719, + 239 + ]; + At = { + keyword: [ + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "do", + "else", + "finally", + "for", + "function", + "if", + "return", + "switch", + "throw", + "try", + "var", + "const", + "while", + "with", + "new", + "this", + "super", + "class", + "extends", + "export", + "import", + "null", + "true", + "false", + "in", + "instanceof", + "typeof", + "void", + "delete" + ], + strict: [ + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "yield" + ], + strictBind: ["eval", "arguments"] + }, bi = new Set(At.keyword), Ai = new Set(At.strict), Si = new Set(At.strictBind); + Ei = /* @__PURE__ */ new Set([ + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "do", + "else", + "finally", + "for", + "function", + "if", + "return", + "switch", + "throw", + "try", + "var", + "const", + "while", + "with", + "new", + "this", + "super", + "class", + "extends", + "export", + "import", + "null", + "true", + "false", + "in", + "instanceof", + "typeof", + "void", + "delete", + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "yield", + "eval", + "arguments", + "enum", + "await" + ]); + ue = class { + flags = 0; + names = /* @__PURE__ */ new Map(); + firstLexicalName = ""; + constructor(t) { + this.flags = t; + } + }, fe = class { + parser; + scopeStack = []; + inModule; + undefinedExports = /* @__PURE__ */ new Map(); + constructor(t, e) { + this.parser = t, this.inModule = e; + } + get inTopLevel() { + return (this.currentScope().flags & 1) > 0; + } + get inFunction() { + return (this.currentVarScopeFlags() & 2) > 0; + } + get allowSuper() { + return (this.currentThisScopeFlags() & 16) > 0; + } + get allowDirectSuper() { + return (this.currentThisScopeFlags() & 32) > 0; + } + get allowNewTarget() { + return (this.currentThisScopeFlags() & 512) > 0; + } + get inClass() { + return (this.currentThisScopeFlags() & 64) > 0; + } + get inClassAndNotInNonArrowFunction() { + let t = this.currentThisScopeFlags(); + return (t & 64) > 0 && (t & 2) === 0; + } + get inStaticBlock() { + for (let t = this.scopeStack.length - 1;; t--) { + let { flags: e } = this.scopeStack[t]; + if (e & 128) return !0; + if (e & 1731) return !1; + } + } + get inNonArrowFunction() { + return (this.currentThisScopeFlags() & 2) > 0; + } + get inBareCaseStatement() { + return (this.currentScope().flags & 256) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + createScope(t) { + return new ue(t); + } + enter(t) { + this.scopeStack.push(this.createScope(t)); + } + exit() { + return this.scopeStack.pop().flags; + } + treatFunctionsAsVarInScope(t) { + return !!(t.flags & 130 || !this.parser.inModule && t.flags & 1); + } + declareName(t, e, s) { + let i = this.currentScope(); + if (e & 8 || e & 16) { + this.checkRedeclarationInScope(i, t, e, s); + let r = i.names.get(t) || 0; + e & 16 ? r = r | 4 : (i.firstLexicalName || (i.firstLexicalName = t), r = r | 2), i.names.set(t, r), e & 8 && this.maybeExportDefined(i, t); + } else if (e & 4) for (let r = this.scopeStack.length - 1; r >= 0 && (i = this.scopeStack[r], this.checkRedeclarationInScope(i, t, e, s), i.names.set(t, (i.names.get(t) || 0) | 1), this.maybeExportDefined(i, t), !(i.flags & 1667)); --r); + this.parser.inModule && i.flags & 1 && this.undefinedExports.delete(t); + } + maybeExportDefined(t, e) { + this.parser.inModule && t.flags & 1 && this.undefinedExports.delete(e); + } + checkRedeclarationInScope(t, e, s, i) { + this.isRedeclaredInScope(t, e, s) && this.parser.raise(p.VarRedeclaration, i, { identifierName: e }); + } + isRedeclaredInScope(t, e, s) { + if (!(s & 1)) return !1; + if (s & 8) return t.names.has(e); + let i = t.names.get(e) || 0; + return s & 16 ? (i & 2) > 0 || !this.treatFunctionsAsVarInScope(t) && (i & 1) > 0 : (i & 2) > 0 && !(t.flags & 8 && t.firstLexicalName === e) || !this.treatFunctionsAsVarInScope(t) && (i & 4) > 0; + } + checkLocalExport(t) { + let { name: e } = t; + this.scopeStack[0].names.has(e) || this.undefinedExports.set(e, t.loc.start); + } + currentScope() { + return this.scopeStack[this.scopeStack.length - 1]; + } + currentVarScopeFlags() { + for (let t = this.scopeStack.length - 1;; t--) { + let { flags: e } = this.scopeStack[t]; + if (e & 1667) return e; + } + } + currentThisScopeFlags() { + for (let t = this.scopeStack.length - 1;; t--) { + let { flags: e } = this.scopeStack[t]; + if (e & 1731 && !(e & 4)) return e; + } + } + }, He = class extends ue { + declareFunctions = /* @__PURE__ */ new Set(); + }, We = class extends fe { + createScope(t) { + return new He(t); + } + declareName(t, e, s) { + let i = this.currentScope(); + if (e & 2048) { + this.checkRedeclarationInScope(i, t, e, s), this.maybeExportDefined(i, t), i.declareFunctions.add(t); + return; + } + super.declareName(t, e, s); + } + isRedeclaredInScope(t, e, s) { + if (super.isRedeclaredInScope(t, e, s)) return !0; + if (s & 2048 && !t.declareFunctions.has(e)) { + let i = t.names.get(e); + return (i & 4) > 0 || (i & 2) > 0; + } + return !1; + } + checkLocalExport(t) { + this.scopeStack[0].declareFunctions.has(t.name) || super.checkLocalExport(t); + } + }, Ni = /* @__PURE__ */ new Set([ + "_", + "any", + "bool", + "boolean", + "empty", + "extends", + "false", + "interface", + "mixed", + "null", + "number", + "static", + "string", + "true", + "typeof", + "void" + ]), g = F`flow`({ + AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.", + AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.", + AssignReservedType: ({ reservedType: a }) => `Cannot overwrite reserved type ${a}.`, + DeclareClassElement: "The `declare` modifier can only appear on class fields.", + DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.", + DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.", + EnumBooleanMemberNotInitialized: ({ memberName: a, enumName: t }) => `Boolean enum members need to be initialized. Use either \`${a} = true,\` or \`${a} = false,\` in enum \`${t}\`.`, + EnumDuplicateMemberName: ({ memberName: a, enumName: t }) => `Enum member names need to be unique, but the name \`${a}\` has already been used before in enum \`${t}\`.`, + EnumInconsistentMemberValues: ({ enumName: a }) => `Enum \`${a}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, + EnumInvalidExplicitType: ({ invalidEnumType: a, enumName: t }) => `Enum type \`${a}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`, + EnumInvalidExplicitTypeUnknownSupplied: ({ enumName: a }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`, + EnumInvalidMemberInitializerPrimaryType: ({ enumName: a, memberName: t, explicitType: e }) => `Enum \`${a}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`, + EnumInvalidMemberInitializerSymbolType: ({ enumName: a, memberName: t }) => `Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${a}\`.`, + EnumInvalidMemberInitializerUnknownType: ({ enumName: a, memberName: t }) => `The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${a}\`.`, + EnumInvalidMemberName: ({ enumName: a, memberName: t, suggestion: e }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${a}\`.`, + EnumNumberMemberNotInitialized: ({ enumName: a, memberName: t }) => `Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${a}\`.`, + EnumStringMemberInconsistentlyInitialized: ({ enumName: a }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${a}\`.`, + GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` or `typeof` keyword.", + ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.", + InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.", + InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.", + InexactVariance: "Explicit inexact syntax cannot have variance.", + InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.", + MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", + NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.", + NestedFlowComment: "Cannot have a flow comment inside another flow comment.", + PatternIsOptional: Object.assign({ message: "A binding pattern parameter cannot be optional in an implementation signature." }, {}), + SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.", + SpreadVariance: "Spread properties cannot have variance.", + ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.", + ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", + ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.", + ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.", + ThisParamNoDefault: "The `this` parameter may not have a default value.", + TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.", + UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.", + UnexpectedReservedType: ({ reservedType: a }) => `Unexpected reserved type ${a}.`, + UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.", + UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.", + UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.", + UnexpectedSubtractionOperand: "Unexpected token, expected \"number\" or \"bigint\".", + UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.", + UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.", + UnsupportedDeclareExportKind: ({ unsupportedExportKind: a, suggestion: t }) => `\`declare export ${a}\` is not supported. Use \`${t}\` instead.`, + UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", + UnterminatedFlowComment: "Unterminated flow-comment." + }); + vi = { + const: "declare export var", + let: "declare export var", + type: "export type", + interface: "export interface" + }; + Di = /\*?\s*@((?:no)?flow)\b/, Mi = (a) => class extends a { + flowPragma = void 0; + getScopeHandler() { + return We; + } + shouldParseTypes() { + return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; + } + finishToken(e, s) { + e !== 134 && e !== 13 && e !== 28 && this.flowPragma === void 0 && (this.flowPragma = null), super.finishToken(e, s); + } + addComment(e) { + if (this.flowPragma === void 0) { + let s = Di.exec(e.value); + if (s) if (s[1] === "flow") this.flowPragma = "flow"; + else if (s[1] === "noflow") this.flowPragma = "noflow"; + else throw new Error("Unexpected flow pragma"); + } + super.addComment(e); + } + flowParseTypeInitialiser(e) { + let s = this.state.inType; + this.state.inType = !0, this.expect(e || 14); + let i = this.flowParseType(); + return this.state.inType = s, i; + } + flowParsePredicate() { + let e = this.startNode(), s = this.state.startLoc; + return this.next(), this.expectContextual(110), this.state.lastTokStartLoc.index > s.index + 1 && this.raise(g.UnexpectedSpaceBetweenModuloChecks, s), this.eat(10) ? (e.value = super.parseExpression(), this.expect(11), this.finishNode(e, "DeclaredPredicate")) : this.finishNode(e, "InferredPredicate"); + } + flowParseTypeAndPredicateInitialiser() { + let e = this.state.inType; + this.state.inType = !0, this.expect(14); + let s = null, i = null; + return this.match(54) ? (this.state.inType = e, i = this.flowParsePredicate()) : (s = this.flowParseType(), this.state.inType = e, this.match(54) && (i = this.flowParsePredicate())), [s, i]; + } + flowParseDeclareClass(e) { + return this.next(), this.flowParseInterfaceish(e, !0), this.finishNode(e, "DeclareClass"); + } + flowParseDeclareFunction(e) { + this.next(); + let s = e.id = this.parseIdentifier(), i = this.startNode(), r = this.startNode(); + this.match(47) ? i.typeParameters = this.flowParseTypeParameterDeclaration() : i.typeParameters = null, this.expect(10); + let n = this.flowParseFunctionTypeParams(); + return i.params = n.params, i.rest = n.rest, i.this = n._this, this.expect(11), [i.returnType, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), r.typeAnnotation = this.finishNode(i, "FunctionTypeAnnotation"), s.typeAnnotation = this.finishNode(r, "TypeAnnotation"), this.resetEndLocation(s), this.semicolon(), this.scope.declareName(e.id.name, 2048, e.id.loc.start), this.finishNode(e, "DeclareFunction"); + } + flowParseDeclare(e, s) { + if (this.match(80)) return this.flowParseDeclareClass(e); + if (this.match(68)) return this.flowParseDeclareFunction(e); + if (this.match(74)) return this.flowParseDeclareVariable(e); + if (this.eatContextual(127)) return this.match(16) ? this.flowParseDeclareModuleExports(e) : (s && this.raise(g.NestedDeclareModule, this.state.lastTokStartLoc), this.flowParseDeclareModule(e)); + if (this.isContextual(130)) return this.flowParseDeclareTypeAlias(e); + if (this.isContextual(131)) return this.flowParseDeclareOpaqueType(e); + if (this.isContextual(129)) return this.flowParseDeclareInterface(e); + if (this.match(82)) return this.flowParseDeclareExportDeclaration(e, s); + throw this.unexpected(); + } + flowParseDeclareVariable(e) { + return this.next(), e.id = this.flowParseTypeAnnotatableIdentifier(!0), this.scope.declareName(e.id.name, 5, e.id.loc.start), this.semicolon(), this.finishNode(e, "DeclareVariable"); + } + flowParseDeclareModule(e) { + this.scope.enter(0), this.match(134) ? e.id = super.parseExprAtom() : e.id = this.parseIdentifier(); + let s = e.body = this.startNode(), i = s.body = []; + for (this.expect(5); !this.match(8);) { + let o = this.startNode(); + this.match(83) ? (this.next(), !this.isContextual(130) && !this.match(87) && this.raise(g.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc), i.push(super.parseImport(o))) : (this.expectContextual(125, g.UnsupportedStatementInDeclareModule), i.push(this.flowParseDeclare(o, !0))); + } + this.scope.exit(), this.expect(8), this.finishNode(s, "BlockStatement"); + let r = null, n = !1; + return i.forEach((o) => { + ki(o) ? (r === "CommonJS" && this.raise(g.AmbiguousDeclareModuleKind, o), r = "ES") : o.type === "DeclareModuleExports" && (n && this.raise(g.DuplicateDeclareModuleExports, o), r === "ES" && this.raise(g.AmbiguousDeclareModuleKind, o), r = "CommonJS", n = !0); + }), e.kind = r || "CommonJS", this.finishNode(e, "DeclareModule"); + } + flowParseDeclareExportDeclaration(e, s) { + if (this.expect(82), this.eat(65)) return this.match(68) || this.match(80) ? e.declaration = this.flowParseDeclare(this.startNode()) : (e.declaration = this.flowParseType(), this.semicolon()), e.default = !0, this.finishNode(e, "DeclareExportDeclaration"); + if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !s) { + let i = this.state.value; + throw this.raise(g.UnsupportedDeclareExportKind, this.state.startLoc, { + unsupportedExportKind: i, + suggestion: vi[i] + }); + } + if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) return e.declaration = this.flowParseDeclare(this.startNode()), e.default = !1, this.finishNode(e, "DeclareExportDeclaration"); + if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) return e = this.parseExport(e, null), e.type === "ExportNamedDeclaration" ? (e.default = !1, delete e.exportKind, this.castNodeTo(e, "DeclareExportDeclaration")) : this.castNodeTo(e, "DeclareExportAllDeclaration"); + throw this.unexpected(); + } + flowParseDeclareModuleExports(e) { + return this.next(), this.expectContextual(111), e.typeAnnotation = this.flowParseTypeAnnotation(), this.semicolon(), this.finishNode(e, "DeclareModuleExports"); + } + flowParseDeclareTypeAlias(e) { + this.next(); + let s = this.flowParseTypeAlias(e); + return this.castNodeTo(s, "DeclareTypeAlias"), s; + } + flowParseDeclareOpaqueType(e) { + this.next(); + let s = this.flowParseOpaqueType(e, !0); + return this.castNodeTo(s, "DeclareOpaqueType"), s; + } + flowParseDeclareInterface(e) { + return this.next(), this.flowParseInterfaceish(e, !1), this.finishNode(e, "DeclareInterface"); + } + flowParseInterfaceish(e, s) { + if (e.id = this.flowParseRestrictedIdentifier(!s, !0), this.scope.declareName(e.id.name, s ? 17 : 8201, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.extends = [], this.eat(81)) do + e.extends.push(this.flowParseInterfaceExtends()); + while (!s && this.eat(12)); + if (s) { + if (e.implements = [], e.mixins = [], this.eatContextual(117)) do + e.mixins.push(this.flowParseInterfaceExtends()); + while (this.eat(12)); + if (this.eatContextual(113)) do + e.implements.push(this.flowParseInterfaceExtends()); + while (this.eat(12)); + } + e.body = this.flowParseObjectType({ + allowStatic: s, + allowExact: !1, + allowSpread: !1, + allowProto: s, + allowInexact: !1 + }); + } + flowParseInterfaceExtends() { + let e = this.startNode(); + return e.id = this.flowParseQualifiedTypeIdentifier(), this.match(47) ? e.typeParameters = this.flowParseTypeParameterInstantiation() : e.typeParameters = null, this.finishNode(e, "InterfaceExtends"); + } + flowParseInterface(e) { + return this.flowParseInterfaceish(e, !1), this.finishNode(e, "InterfaceDeclaration"); + } + checkNotUnderscore(e) { + e === "_" && this.raise(g.UnexpectedReservedUnderscore, this.state.startLoc); + } + checkReservedType(e, s, i) { + Ni.has(e) && this.raise(i ? g.AssignReservedType : g.UnexpectedReservedType, s, { reservedType: e }); + } + flowParseRestrictedIdentifier(e, s) { + return this.checkReservedType(this.state.value, this.state.startLoc, s), this.parseIdentifier(e); + } + flowParseTypeAlias(e) { + return e.id = this.flowParseRestrictedIdentifier(!1, !0), this.scope.declareName(e.id.name, 8201, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.right = this.flowParseTypeInitialiser(29), this.semicolon(), this.finishNode(e, "TypeAlias"); + } + flowParseOpaqueType(e, s) { + return this.expectContextual(130), e.id = this.flowParseRestrictedIdentifier(!0, !0), this.scope.declareName(e.id.name, 8201, e.id.loc.start), this.match(47) ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.supertype = null, this.match(14) && (e.supertype = this.flowParseTypeInitialiser(14)), e.impltype = null, s || (e.impltype = this.flowParseTypeInitialiser(29)), this.semicolon(), this.finishNode(e, "OpaqueType"); + } + flowParseTypeParameter(e = !1) { + let s = this.state.startLoc, i = this.startNode(), r = this.flowParseVariance(), n = this.flowParseTypeAnnotatableIdentifier(); + return i.name = n.name, i.variance = r, i.bound = n.typeAnnotation, this.match(29) ? (this.eat(29), i.default = this.flowParseType()) : e && this.raise(g.MissingTypeParamDefault, s), this.finishNode(i, "TypeParameter"); + } + flowParseTypeParameterDeclaration() { + let e = this.state.inType, s = this.startNode(); + s.params = [], this.state.inType = !0, this.match(47) || this.match(143) ? this.next() : this.unexpected(); + let i = !1; + do { + let r = this.flowParseTypeParameter(i); + s.params.push(r), r.default && (i = !0), this.match(48) || this.expect(12); + } while (!this.match(48)); + return this.expect(48), this.state.inType = e, this.finishNode(s, "TypeParameterDeclaration"); + } + flowInTopLevelContext(e) { + if (this.curContext() !== E.brace) { + let s = this.state.context; + this.state.context = [s[0]]; + try { + return e(); + } finally { + this.state.context = s; + } + } else return e(); + } + flowParseTypeParameterInstantiationInExpression() { + if (this.reScan_lt() === 47) return this.flowParseTypeParameterInstantiation(); + } + flowParseTypeParameterInstantiation() { + let e = this.startNode(), s = this.state.inType; + return this.state.inType = !0, e.params = [], this.flowInTopLevelContext(() => { + this.expect(47); + let i = this.state.noAnonFunctionType; + for (this.state.noAnonFunctionType = !1; !this.match(48);) e.params.push(this.flowParseType()), this.match(48) || this.expect(12); + this.state.noAnonFunctionType = i; + }), this.state.inType = s, !this.state.inType && this.curContext() === E.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TypeParameterInstantiation"); + } + flowParseTypeParameterInstantiationCallOrNew() { + if (this.reScan_lt() !== 47) return null; + let e = this.startNode(), s = this.state.inType; + for (e.params = [], this.state.inType = !0, this.expect(47); !this.match(48);) e.params.push(this.flowParseTypeOrImplicitInstantiation()), this.match(48) || this.expect(12); + return this.expect(48), this.state.inType = s, this.finishNode(e, "TypeParameterInstantiation"); + } + flowParseInterfaceType() { + let e = this.startNode(); + if (this.expectContextual(129), e.extends = [], this.eat(81)) do + e.extends.push(this.flowParseInterfaceExtends()); + while (this.eat(12)); + return e.body = this.flowParseObjectType({ + allowStatic: !1, + allowExact: !1, + allowSpread: !1, + allowProto: !1, + allowInexact: !1 + }), this.finishNode(e, "InterfaceTypeAnnotation"); + } + flowParseObjectPropertyKey() { + return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(!0); + } + flowParseObjectTypeIndexer(e, s, i) { + return e.static = s, this.lookahead().type === 14 ? (e.id = this.flowParseObjectPropertyKey(), e.key = this.flowParseTypeInitialiser()) : (e.id = null, e.key = this.flowParseType()), this.expect(3), e.value = this.flowParseTypeInitialiser(), e.variance = i, this.finishNode(e, "ObjectTypeIndexer"); + } + flowParseObjectTypeInternalSlot(e, s) { + return e.static = s, e.id = this.flowParseObjectPropertyKey(), this.expect(3), this.expect(3), this.match(47) || this.match(10) ? (e.method = !0, e.optional = !1, e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))) : (e.method = !1, this.eat(17) && (e.optional = !0), e.value = this.flowParseTypeInitialiser()), this.finishNode(e, "ObjectTypeInternalSlot"); + } + flowParseObjectTypeMethodish(e) { + for (e.params = [], e.rest = null, e.typeParameters = null, e.this = null, this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(10), this.match(78) && (e.this = this.flowParseFunctionTypeParam(!0), e.this.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21);) e.params.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12); + return this.eat(21) && (e.rest = this.flowParseFunctionTypeParam(!1)), this.expect(11), e.returnType = this.flowParseTypeInitialiser(), this.finishNode(e, "FunctionTypeAnnotation"); + } + flowParseObjectTypeCallProperty(e, s) { + let i = this.startNode(); + return e.static = s, e.value = this.flowParseObjectTypeMethodish(i), this.finishNode(e, "ObjectTypeCallProperty"); + } + flowParseObjectType({ allowStatic: e, allowExact: s, allowSpread: i, allowProto: r, allowInexact: n }) { + let o = this.state.inType; + this.state.inType = !0; + let h = this.startNode(); + h.callProperties = [], h.properties = [], h.indexers = [], h.internalSlots = []; + let l, u, f = !1; + for (s && this.match(6) ? (this.expect(6), l = 9, u = !0) : (this.expect(5), l = 8, u = !1), h.exact = u; !this.match(l);) { + let x = !1, A = null, k = null, N = this.startNode(); + if (r && this.isContextual(118)) { + let I = this.lookahead(); + I.type !== 14 && I.type !== 17 && (this.next(), A = this.state.startLoc, e = !1); + } + if (e && this.isContextual(106)) { + let I = this.lookahead(); + I.type !== 14 && I.type !== 17 && (this.next(), x = !0); + } + let C = this.flowParseVariance(); + if (this.eat(0)) A != null && this.unexpected(A), this.eat(0) ? (C && this.unexpected(C.loc.start), h.internalSlots.push(this.flowParseObjectTypeInternalSlot(N, x))) : h.indexers.push(this.flowParseObjectTypeIndexer(N, x, C)); + else if (this.match(10) || this.match(47)) A != null && this.unexpected(A), C && this.unexpected(C.loc.start), h.callProperties.push(this.flowParseObjectTypeCallProperty(N, x)); + else { + let I = "init"; + if (this.isContextual(99) || this.isContextual(104)) Jt(this.lookahead().type) && (I = this.state.value, this.next()); + let Pe = this.flowParseObjectTypeProperty(N, x, A, C, I, i, n ?? !u); + Pe === null ? (f = !0, k = this.state.lastTokStartLoc) : h.properties.push(Pe); + } + this.flowObjectTypeSemicolon(), k && !this.match(8) && !this.match(9) && this.raise(g.UnexpectedExplicitInexactInObject, k); + } + this.expect(l), i && (h.inexact = f); + let d = this.finishNode(h, "ObjectTypeAnnotation"); + return this.state.inType = o, d; + } + flowParseObjectTypeProperty(e, s, i, r, n, o, h) { + if (this.eat(21)) return this.match(12) || this.match(13) || this.match(8) || this.match(9) ? (o ? h || this.raise(g.InexactInsideExact, this.state.lastTokStartLoc) : this.raise(g.InexactInsideNonObject, this.state.lastTokStartLoc), r && this.raise(g.InexactVariance, r), null) : (o || this.raise(g.UnexpectedSpreadType, this.state.lastTokStartLoc), i != null && this.unexpected(i), r && this.raise(g.SpreadVariance, r), e.argument = this.flowParseType(), this.finishNode(e, "ObjectTypeSpreadProperty")); + { + e.key = this.flowParseObjectPropertyKey(), e.static = s, e.proto = i != null, e.kind = n; + let l = !1; + return this.match(47) || this.match(10) ? (e.method = !0, i != null && this.unexpected(i), r && this.unexpected(r.loc.start), e.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)), (n === "get" || n === "set") && this.flowCheckGetterSetterParams(e), !o && e.key.name === "constructor" && e.value.this && this.raise(g.ThisParamBannedInConstructor, e.value.this)) : (n !== "init" && this.unexpected(), e.method = !1, this.eat(17) && (l = !0), e.value = this.flowParseTypeInitialiser(), e.variance = r), e.optional = l, this.finishNode(e, "ObjectTypeProperty"); + } + } + flowCheckGetterSetterParams(e) { + let s = e.kind === "get" ? 0 : 1, i = e.value.params.length + (e.value.rest ? 1 : 0); + e.value.this && this.raise(e.kind === "get" ? g.GetterMayNotHaveThisParam : g.SetterMayNotHaveThisParam, e.value.this), i !== s && this.raise(e.kind === "get" ? p.BadGetterArity : p.BadSetterArity, e), e.kind === "set" && e.value.rest && this.raise(p.BadSetterRestParameter, e); + } + flowObjectTypeSemicolon() { + !this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9) && this.unexpected(); + } + flowParseQualifiedTypeIdentifier(e, s) { + e ?? (e = this.state.startLoc); + let i = s || this.flowParseRestrictedIdentifier(!0); + for (; this.eat(16);) { + let r = this.startNodeAt(e); + r.qualification = i, r.id = this.flowParseRestrictedIdentifier(!0), i = this.finishNode(r, "QualifiedTypeIdentifier"); + } + return i; + } + flowParseGenericType(e, s) { + let i = this.startNodeAt(e); + return i.typeParameters = null, i.id = this.flowParseQualifiedTypeIdentifier(e, s), this.match(47) && (i.typeParameters = this.flowParseTypeParameterInstantiation()), this.finishNode(i, "GenericTypeAnnotation"); + } + flowParseTypeofType() { + let e = this.startNode(); + return this.expect(87), e.argument = this.flowParsePrimaryType(), this.finishNode(e, "TypeofTypeAnnotation"); + } + flowParseTupleType() { + let e = this.startNode(); + for (e.types = [], this.expect(0); this.state.pos < this.length && !this.match(3) && (e.types.push(this.flowParseType()), !this.match(3));) this.expect(12); + return this.expect(3), this.finishNode(e, "TupleTypeAnnotation"); + } + flowParseFunctionTypeParam(e) { + let s = null, i = !1, r = null, n = this.startNode(), o = this.lookahead(), h = this.state.type === 78; + return o.type === 14 || o.type === 17 ? (h && !e && this.raise(g.ThisParamMustBeFirst, n), s = this.parseIdentifier(h), this.eat(17) && (i = !0, h && this.raise(g.ThisParamMayNotBeOptional, n)), r = this.flowParseTypeInitialiser()) : r = this.flowParseType(), n.name = s, n.optional = i, n.typeAnnotation = r, this.finishNode(n, "FunctionTypeParam"); + } + reinterpretTypeAsFunctionTypeParam(e) { + let s = this.startNodeAt(e.loc.start); + return s.name = null, s.optional = !1, s.typeAnnotation = e, this.finishNode(s, "FunctionTypeParam"); + } + flowParseFunctionTypeParams(e = []) { + let s = null, i = null; + for (this.match(78) && (i = this.flowParseFunctionTypeParam(!0), i.name = null, this.match(11) || this.expect(12)); !this.match(11) && !this.match(21);) e.push(this.flowParseFunctionTypeParam(!1)), this.match(11) || this.expect(12); + return this.eat(21) && (s = this.flowParseFunctionTypeParam(!1)), { + params: e, + rest: s, + _this: i + }; + } + flowIdentToTypeAnnotation(e, s, i) { + switch (i.name) { + case "any": return this.finishNode(s, "AnyTypeAnnotation"); + case "bool": + case "boolean": return this.finishNode(s, "BooleanTypeAnnotation"); + case "mixed": return this.finishNode(s, "MixedTypeAnnotation"); + case "empty": return this.finishNode(s, "EmptyTypeAnnotation"); + case "number": return this.finishNode(s, "NumberTypeAnnotation"); + case "string": return this.finishNode(s, "StringTypeAnnotation"); + case "symbol": return this.finishNode(s, "SymbolTypeAnnotation"); + default: return this.checkNotUnderscore(i.name), this.flowParseGenericType(e, i); + } + } + flowParsePrimaryType() { + let e = this.state.startLoc, s = this.startNode(), i, r, n = !1, o = this.state.noAnonFunctionType; + switch (this.state.type) { + case 5: return this.flowParseObjectType({ + allowStatic: !1, + allowExact: !1, + allowSpread: !0, + allowProto: !1, + allowInexact: !0 + }); + case 6: return this.flowParseObjectType({ + allowStatic: !1, + allowExact: !0, + allowSpread: !0, + allowProto: !1, + allowInexact: !1 + }); + case 0: return this.state.noAnonFunctionType = !1, r = this.flowParseTupleType(), this.state.noAnonFunctionType = o, r; + case 47: { + let h = this.startNode(); + return h.typeParameters = this.flowParseTypeParameterDeclaration(), this.expect(10), i = this.flowParseFunctionTypeParams(), h.params = i.params, h.rest = i.rest, h.this = i._this, this.expect(11), this.expect(19), h.returnType = this.flowParseType(), this.finishNode(h, "FunctionTypeAnnotation"); + } + case 10: { + let h = this.startNode(); + if (this.next(), !this.match(11) && !this.match(21)) if (w(this.state.type) || this.match(78)) { + let l = this.lookahead().type; + n = l !== 17 && l !== 14; + } else n = !0; + if (n) { + if (this.state.noAnonFunctionType = !1, r = this.flowParseType(), this.state.noAnonFunctionType = o, this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) return this.expect(11), r; + this.eat(12); + } + return r ? i = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]) : i = this.flowParseFunctionTypeParams(), h.params = i.params, h.rest = i.rest, h.this = i._this, this.expect(11), this.expect(19), h.returnType = this.flowParseType(), h.typeParameters = null, this.finishNode(h, "FunctionTypeAnnotation"); + } + case 134: return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); + case 85: + case 86: return s.value = this.match(85), this.next(), this.finishNode(s, "BooleanLiteralTypeAnnotation"); + case 53: + if (this.state.value === "-") { + if (this.next(), this.match(135)) return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", s); + if (this.match(136)) return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", s); + throw this.raise(g.UnexpectedSubtractionOperand, this.state.startLoc); + } + throw this.unexpected(); + case 135: return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); + case 136: return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); + case 88: return this.next(), this.finishNode(s, "VoidTypeAnnotation"); + case 84: return this.next(), this.finishNode(s, "NullLiteralTypeAnnotation"); + case 78: return this.next(), this.finishNode(s, "ThisTypeAnnotation"); + case 55: return this.next(), this.finishNode(s, "ExistsTypeAnnotation"); + case 87: return this.flowParseTypeofType(); + default: if (Tt(this.state.type)) { + let h = z(this.state.type); + return this.next(), super.createIdentifier(s, h); + } else if (w(this.state.type)) return this.isContextual(129) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(e, s, this.parseIdentifier()); + } + throw this.unexpected(); + } + flowParsePostfixType() { + let e = this.state.startLoc, s = this.flowParsePrimaryType(), i = !1; + for (; (this.match(0) || this.match(18)) && !this.canInsertSemicolon();) { + let r = this.startNodeAt(e), n = this.eat(18); + i = i || n, this.expect(0), !n && this.match(3) ? (r.elementType = s, this.next(), s = this.finishNode(r, "ArrayTypeAnnotation")) : (r.objectType = s, r.indexType = this.flowParseType(), this.expect(3), i ? (r.optional = n, s = this.finishNode(r, "OptionalIndexedAccessType")) : s = this.finishNode(r, "IndexedAccessType")); + } + return s; + } + flowParsePrefixType() { + let e = this.startNode(); + return this.eat(17) ? (e.typeAnnotation = this.flowParsePrefixType(), this.finishNode(e, "NullableTypeAnnotation")) : this.flowParsePostfixType(); + } + flowParseAnonFunctionWithoutParens() { + let e = this.flowParsePrefixType(); + if (!this.state.noAnonFunctionType && this.eat(19)) { + let s = this.startNodeAt(e.loc.start); + return s.params = [this.reinterpretTypeAsFunctionTypeParam(e)], s.rest = null, s.this = null, s.returnType = this.flowParseType(), s.typeParameters = null, this.finishNode(s, "FunctionTypeAnnotation"); + } + return e; + } + flowParseIntersectionType() { + let e = this.startNode(); + this.eat(45); + let s = this.flowParseAnonFunctionWithoutParens(); + for (e.types = [s]; this.eat(45);) e.types.push(this.flowParseAnonFunctionWithoutParens()); + return e.types.length === 1 ? s : this.finishNode(e, "IntersectionTypeAnnotation"); + } + flowParseUnionType() { + let e = this.startNode(); + this.eat(43); + let s = this.flowParseIntersectionType(); + for (e.types = [s]; this.eat(43);) e.types.push(this.flowParseIntersectionType()); + return e.types.length === 1 ? s : this.finishNode(e, "UnionTypeAnnotation"); + } + flowParseType() { + let e = this.state.inType; + this.state.inType = !0; + let s = this.flowParseUnionType(); + return this.state.inType = e, s; + } + flowParseTypeOrImplicitInstantiation() { + if (this.state.type === 132 && this.state.value === "_") { + let e = this.state.startLoc, s = this.parseIdentifier(); + return this.flowParseGenericType(e, s); + } else return this.flowParseType(); + } + flowParseTypeAnnotation() { + let e = this.startNode(); + return e.typeAnnotation = this.flowParseTypeInitialiser(), this.finishNode(e, "TypeAnnotation"); + } + flowParseTypeAnnotatableIdentifier(e) { + let s = e ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); + return this.match(14) && (s.typeAnnotation = this.flowParseTypeAnnotation(), this.resetEndLocation(s)), s; + } + typeCastToParameter(e) { + return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.loc.end), e.expression; + } + flowParseVariance() { + let e = null; + return this.match(53) ? (e = this.startNode(), this.state.value === "+" ? e.kind = "plus" : e.kind = "minus", this.next(), this.finishNode(e, "Variance")) : e; + } + parseFunctionBody(e, s, i = !1) { + if (s) { + this.forwardNoArrowParamsConversionAt(e, () => super.parseFunctionBody(e, !0, i)); + return; + } + super.parseFunctionBody(e, !1, i); + } + parseFunctionBodyAndFinish(e, s, i = !1) { + if (this.match(14)) { + let r = this.startNode(); + [r.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), e.returnType = r.typeAnnotation ? this.finishNode(r, "TypeAnnotation") : null; + } + return super.parseFunctionBodyAndFinish(e, s, i); + } + parseStatementLike(e) { + if (this.state.strict && this.isContextual(129)) { + if (O(this.lookahead().type)) { + let r = this.startNode(); + return this.next(), this.flowParseInterface(r); + } + } else if (this.isContextual(126)) { + let i = this.startNode(); + return this.next(), this.flowParseEnumDeclaration(i); + } + let s = super.parseStatementLike(e); + return this.flowPragma === void 0 && !this.isValidDirective(s) && (this.flowPragma = null), s; + } + parseExpressionStatement(e, s, i) { + if (s.type === "Identifier") { + if (s.name === "declare") { + if (this.match(80) || w(this.state.type) || this.match(68) || this.match(74) || this.match(82)) return this.flowParseDeclare(e); + } else if (w(this.state.type)) { + if (s.name === "interface") return this.flowParseInterface(e); + if (s.name === "type") return this.flowParseTypeAlias(e); + if (s.name === "opaque") return this.flowParseOpaqueType(e, !1); + } + } + return super.parseExpressionStatement(e, s, i); + } + shouldParseExportDeclaration() { + let { type: e } = this.state; + return e === 126 || Bt(e) ? !this.state.containsEsc : super.shouldParseExportDeclaration(); + } + isExportDefaultSpecifier() { + let { type: e } = this.state; + return e === 126 || Bt(e) ? this.state.containsEsc : super.isExportDefaultSpecifier(); + } + parseExportDefaultExpression() { + if (this.isContextual(126)) { + let e = this.startNode(); + return this.next(), this.flowParseEnumDeclaration(e); + } + return super.parseExportDefaultExpression(); + } + parseConditional(e, s, i) { + if (!this.match(17)) return e; + if (this.state.maybeInArrowParameters) { + let d = this.lookaheadCharCode(); + if (d === 44 || d === 61 || d === 58 || d === 41) return this.setOptionalParametersError(i), e; + } + this.expect(17); + let r = this.state.clone(), n = this.state.noArrowAt, o = this.startNodeAt(s), { consequent: h, failed: l } = this.tryParseConditionalConsequent(), [u, f] = this.getArrowLikeExpressions(h); + if (l || f.length > 0) { + let d = [...n]; + if (f.length > 0) { + this.state = r, this.state.noArrowAt = d; + for (let x = 0; x < f.length; x++) d.push(f[x].start); + ({consequent: h, failed: l} = this.tryParseConditionalConsequent()), [u, f] = this.getArrowLikeExpressions(h); + } + l && u.length > 1 && this.raise(g.AmbiguousConditionalArrow, r.startLoc), l && u.length === 1 && (this.state = r, d.push(u[0].start), this.state.noArrowAt = d, {consequent: h, failed: l} = this.tryParseConditionalConsequent()); + } + return this.getArrowLikeExpressions(h, !0), this.state.noArrowAt = n, this.expect(14), o.test = e, o.consequent = h, o.alternate = this.forwardNoArrowParamsConversionAt(o, () => this.parseMaybeAssign(void 0, void 0)), this.finishNode(o, "ConditionalExpression"); + } + tryParseConditionalConsequent() { + this.state.noArrowParamsConversionAt.push(this.state.start); + let e = this.parseMaybeAssignAllowIn(), s = !this.match(14); + return this.state.noArrowParamsConversionAt.pop(), { + consequent: e, + failed: s + }; + } + getArrowLikeExpressions(e, s) { + let i = [e], r = []; + for (; i.length !== 0;) { + let n = i.pop(); + n.type === "ArrowFunctionExpression" && n.body.type !== "BlockStatement" ? (n.typeParameters || !n.returnType ? this.finishArrowValidation(n) : r.push(n), i.push(n.body)) : n.type === "ConditionalExpression" && (i.push(n.consequent), i.push(n.alternate)); + } + return s ? (r.forEach((n) => this.finishArrowValidation(n)), [r, []]) : Li(r, (n) => n.params.every((o) => this.isAssignable(o, !0))); + } + finishArrowValidation(e) { + this.toAssignableList(e.params, e.extra?.trailingCommaLoc, !1), this.scope.enter(518), super.checkParams(e, !1, !0), this.scope.exit(); + } + forwardNoArrowParamsConversionAt(e, s) { + let i; + return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)) ? (this.state.noArrowParamsConversionAt.push(this.state.start), i = s(), this.state.noArrowParamsConversionAt.pop()) : i = s(), i; + } + parseParenItem(e, s) { + let i = super.parseParenItem(e, s); + if (this.eat(17) && (i.optional = !0, this.resetEndLocation(e)), this.match(14)) { + let r = this.startNodeAt(s); + return r.expression = i, r.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(r, "TypeCastExpression"); + } + return i; + } + assertModuleNodeAllowed(e) { + e.type === "ImportDeclaration" && (e.importKind === "type" || e.importKind === "typeof") || e.type === "ExportNamedDeclaration" && e.exportKind === "type" || e.type === "ExportAllDeclaration" && e.exportKind === "type" || super.assertModuleNodeAllowed(e); + } + parseExportDeclaration(e) { + if (this.isContextual(130)) { + e.exportKind = "type"; + let s = this.startNode(); + return this.next(), this.match(5) ? (e.specifiers = this.parseExportSpecifiers(!0), super.parseExportFrom(e), null) : this.flowParseTypeAlias(s); + } else if (this.isContextual(131)) { + e.exportKind = "type"; + let s = this.startNode(); + return this.next(), this.flowParseOpaqueType(s, !1); + } else if (this.isContextual(129)) { + e.exportKind = "type"; + let s = this.startNode(); + return this.next(), this.flowParseInterface(s); + } else if (this.isContextual(126)) { + e.exportKind = "value"; + let s = this.startNode(); + return this.next(), this.flowParseEnumDeclaration(s); + } else return super.parseExportDeclaration(e); + } + eatExportStar(e) { + return super.eatExportStar(e) ? !0 : this.isContextual(130) && this.lookahead().type === 55 ? (e.exportKind = "type", this.next(), this.next(), !0) : !1; + } + maybeParseExportNamespaceSpecifier(e) { + let { startLoc: s } = this.state, i = super.maybeParseExportNamespaceSpecifier(e); + return i && e.exportKind === "type" && this.unexpected(s), i; + } + parseClassId(e, s, i) { + super.parseClassId(e, s, i), this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()); + } + parseClassMember(e, s, i) { + let { startLoc: r } = this.state; + if (this.isContextual(125)) { + if (super.parseClassMemberFromModifier(e, s)) return; + s.declare = !0; + } + super.parseClassMember(e, s, i), s.declare && (s.type !== "ClassProperty" && s.type !== "ClassPrivateProperty" && s.type !== "PropertyDefinition" ? this.raise(g.DeclareClassElement, r) : s.value && this.raise(g.DeclareClassFieldInitializer, s.value)); + } + isIterator(e) { + return e === "iterator" || e === "asyncIterator"; + } + readIterator() { + let e = super.readWord1(), s = "@@" + e; + (!this.isIterator(e) || !this.state.inType) && this.raise(p.InvalidIdentifier, this.state.curPosition(), { identifierName: s }), this.finishToken(132, s); + } + getTokenFromCode(e) { + let s = this.input.charCodeAt(this.state.pos + 1); + e === 123 && s === 124 ? this.finishOp(6, 2) : this.state.inType && (e === 62 || e === 60) ? this.finishOp(e === 62 ? 48 : 47, 1) : this.state.inType && e === 63 ? s === 46 ? this.finishOp(18, 2) : this.finishOp(17, 1) : Ci(e, s, this.input.charCodeAt(this.state.pos + 2)) ? (this.state.pos += 2, this.readIterator()) : super.getTokenFromCode(e); + } + isAssignable(e, s) { + return e.type === "TypeCastExpression" ? this.isAssignable(e.expression, s) : super.isAssignable(e, s); + } + toAssignable(e, s = !1) { + !s && e.type === "AssignmentExpression" && e.left.type === "TypeCastExpression" && (e.left = this.typeCastToParameter(e.left)), super.toAssignable(e, s); + } + toAssignableList(e, s, i) { + for (let r = 0; r < e.length; r++) { + let n = e[r]; + n?.type === "TypeCastExpression" && (e[r] = this.typeCastToParameter(n)); + } + super.toAssignableList(e, s, i); + } + toReferencedList(e, s) { + for (let i = 0; i < e.length; i++) { + let r = e[i]; + r && r.type === "TypeCastExpression" && !r.extra?.parenthesized && (e.length > 1 || !s) && this.raise(g.TypeCastInPattern, r.typeAnnotation); + } + return e; + } + parseArrayLike(e, s, i) { + let r = super.parseArrayLike(e, s, i); + return i != null && !this.state.maybeInArrowParameters && this.toReferencedList(r.elements), r; + } + isValidLVal(e, s, i, r) { + return e === "TypeCastExpression" || super.isValidLVal(e, s, i, r); + } + parseClassProperty(e) { + return this.match(14) && (e.typeAnnotation = this.flowParseTypeAnnotation()), super.parseClassProperty(e); + } + parseClassPrivateProperty(e) { + return this.match(14) && (e.typeAnnotation = this.flowParseTypeAnnotation()), super.parseClassPrivateProperty(e); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(14) || super.isClassProperty(); + } + isNonstaticConstructor(e) { + return !this.match(14) && super.isNonstaticConstructor(e); + } + pushClassMethod(e, s, i, r, n, o) { + if (s.variance && this.unexpected(s.variance.loc.start), delete s.variance, this.match(47) && (s.typeParameters = this.flowParseTypeParameterDeclaration()), super.pushClassMethod(e, s, i, r, n, o), s.params && n) { + let h = s.params; + h.length > 0 && this.isThisParam(h[0]) && this.raise(g.ThisParamBannedInConstructor, s); + } else if (s.type === "MethodDefinition" && n && s.value.params) { + let h = s.value.params; + h.length > 0 && this.isThisParam(h[0]) && this.raise(g.ThisParamBannedInConstructor, s); + } + } + pushClassPrivateMethod(e, s, i, r) { + s.variance && this.unexpected(s.variance.loc.start), delete s.variance, this.match(47) && (s.typeParameters = this.flowParseTypeParameterDeclaration()), super.pushClassPrivateMethod(e, s, i, r); + } + parseClassSuper(e) { + if (super.parseClassSuper(e), e.superClass && (this.match(47) || this.match(51)) && (e.superTypeArguments = this.flowParseTypeParameterInstantiationInExpression()), this.isContextual(113)) { + this.next(); + let s = e.implements = []; + do { + let i = this.startNode(); + i.id = this.flowParseRestrictedIdentifier(!0), this.match(47) ? i.typeParameters = this.flowParseTypeParameterInstantiation() : i.typeParameters = null, s.push(this.finishNode(i, "ClassImplements")); + } while (this.eat(12)); + } + } + checkGetterSetterParams(e) { + super.checkGetterSetterParams(e); + let s = this.getObjectOrClassMethodParams(e); + if (s.length > 0) { + let i = s[0]; + this.isThisParam(i) && e.kind === "get" ? this.raise(g.GetterMayNotHaveThisParam, i) : this.isThisParam(i) && this.raise(g.SetterMayNotHaveThisParam, i); + } + } + parsePropertyNamePrefixOperator(e) { + e.variance = this.flowParseVariance(); + } + parseObjPropValue(e, s, i, r, n, o, h) { + e.variance && this.unexpected(e.variance.loc.start), delete e.variance; + let l; + this.match(47) && !o && (l = this.flowParseTypeParameterDeclaration(), this.match(10) || this.unexpected()); + let u = super.parseObjPropValue(e, s, i, r, n, o, h); + return l && ((u.value || u).typeParameters = l), u; + } + parseFunctionParamType(e) { + return this.eat(17) && (e.type !== "Identifier" && this.raise(g.PatternIsOptional, e), this.isThisParam(e) && this.raise(g.ThisParamMayNotBeOptional, e), e.optional = !0), this.match(14) ? e.typeAnnotation = this.flowParseTypeAnnotation() : this.isThisParam(e) && this.raise(g.ThisParamAnnotationRequired, e), this.match(29) && this.isThisParam(e) && this.raise(g.ThisParamNoDefault, e), this.resetEndLocation(e), e; + } + parseMaybeDefault(e, s) { + let i = super.parseMaybeDefault(e, s); + return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(g.TypeBeforeInitializer, i.typeAnnotation), i; + } + checkImportReflection(e) { + super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(g.ImportReflectionHasImportType, e.specifiers[0].loc.start); + } + parseImportSpecifierLocal(e, s, i) { + s.local = Rt(e) ? this.flowParseRestrictedIdentifier(!0, !0) : this.parseIdentifier(), e.specifiers.push(this.finishImportSpecifier(s, i)); + } + isPotentialImportPhase(e) { + if (super.isPotentialImportPhase(e)) return !0; + if (this.isContextual(130)) { + if (!e) return !0; + let s = this.lookaheadCharCode(); + return s === 123 || s === 42; + } + return !e && this.isContextual(87); + } + applyImportPhase(e, s, i, r) { + if (super.applyImportPhase(e, s, i, r), s) { + if (!i && this.match(65)) return; + e.exportKind = i === "type" ? i : "value"; + } else i === "type" && this.match(55) && this.unexpected(), e.importKind = i === "type" || i === "typeof" ? i : "value"; + } + parseImportSpecifier(e, s, i, r, n) { + let o = e.imported, h = null; + o.type === "Identifier" && (o.name === "type" ? h = "type" : o.name === "typeof" && (h = "typeof")); + let l = !1; + if (this.isContextual(93) && !this.isLookaheadContextual("as")) { + let f = this.parseIdentifier(!0); + h !== null && !O(this.state.type) ? (e.imported = f, e.importKind = h, e.local = this.cloneIdentifier(f)) : (e.imported = o, e.importKind = null, e.local = this.parseIdentifier()); + } else { + if (h !== null && O(this.state.type)) e.imported = this.parseIdentifier(!0), e.importKind = h; + else { + if (s) throw this.raise(p.ImportBindingIsString, e, { importName: o.value }); + e.imported = o, e.importKind = null; + } + this.eatContextual(93) ? e.local = this.parseIdentifier() : (l = !0, e.local = this.cloneIdentifier(e.imported)); + } + let u = Rt(e); + return i && u && this.raise(g.ImportTypeShorthandOnlyInPureImport, e), (i || u) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !i && !u && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier"); + } + parseBindingAtom() { + switch (this.state.type) { + case 78: return this.parseIdentifier(!0); + default: return super.parseBindingAtom(); + } + } + parseFunctionParams(e, s) { + let i = e.kind; + i !== "get" && i !== "set" && this.match(47) && (e.typeParameters = this.flowParseTypeParameterDeclaration()), super.parseFunctionParams(e, s); + } + parseVarId(e, s) { + super.parseVarId(e, s), this.match(14) && (e.id.typeAnnotation = this.flowParseTypeAnnotation(), this.resetEndLocation(e.id)); + } + parseAsyncArrowFromCallExpression(e, s) { + if (this.match(14)) { + let i = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = !0, e.returnType = this.flowParseTypeAnnotation(), this.state.noAnonFunctionType = i; + } + return super.parseAsyncArrowFromCallExpression(e, s); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + parseMaybeAssign(e, s) { + let i = null, r; + if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { + if (i = this.state.clone(), r = this.tryParse(() => super.parseMaybeAssign(e, s), i), !r.error) return r.node; + let { context: n } = this.state, o = n[n.length - 1]; + (o === E.j_oTag || o === E.j_expr) && n.pop(); + } + if (r?.error || this.match(47)) { + i = i || this.state.clone(); + let n, o = this.tryParse((l) => { + n = this.flowParseTypeParameterDeclaration(); + let u = this.forwardNoArrowParamsConversionAt(n, () => { + let d = super.parseMaybeAssign(e, s); + return this.resetStartLocationFromNode(d, n), d; + }); + u.extra?.parenthesized && l(); + let f = this.maybeUnwrapTypeCastExpression(u); + return f.type !== "ArrowFunctionExpression" && l(), f.typeParameters = n, this.resetStartLocationFromNode(f, n), u; + }, i), h = null; + if (o.node && this.maybeUnwrapTypeCastExpression(o.node).type === "ArrowFunctionExpression") { + if (!o.error && !o.aborted) return o.node.async && this.raise(g.UnexpectedTypeParameterBeforeAsyncArrowFunction, n), o.node; + h = o.node; + } + if (r?.node) return this.state = r.failState, r.node; + if (h) return this.state = o.failState, h; + throw r?.thrown ? r.error : o.thrown ? o.error : this.raise(g.UnexpectedTokenAfterTypeParameter, n); + } + return super.parseMaybeAssign(e, s); + } + parseArrow(e) { + if (this.match(14)) { + let s = this.tryParse(() => { + let i = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = !0; + let r = this.startNode(); + return [r.typeAnnotation, e.predicate] = this.flowParseTypeAndPredicateInitialiser(), this.state.noAnonFunctionType = i, this.canInsertSemicolon() && this.unexpected(), this.match(19) || this.unexpected(), r; + }); + if (s.thrown) return null; + s.error && (this.state = s.failState), e.returnType = s.node.typeAnnotation ? this.finishNode(s.node, "TypeAnnotation") : null; + } + return super.parseArrow(e); + } + shouldParseArrow(e) { + return this.match(14) || super.shouldParseArrow(e); + } + setArrowFunctionParameters(e, s) { + this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)) ? e.params = s : super.setArrowFunctionParameters(e, s); + } + checkParams(e, s, i, r = !0) { + if (!(i && this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))) { + for (let n = 0; n < e.params.length; n++) this.isThisParam(e.params[n]) && n > 0 && this.raise(g.ThisParamMustBeFirst, e.params[n]); + super.checkParams(e, s, i, r); + } + } + parseParenAndDistinguishExpression(e) { + return super.parseParenAndDistinguishExpression(e && !this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start))); + } + parseSubscripts(e, s, i) { + if (e.type === "Identifier" && e.name === "async" && this.state.noArrowAt.includes(s.index)) { + this.next(); + let r = this.startNodeAt(s); + r.callee = e, r.arguments = super.parseCallExpressionArguments(), e = this.finishNode(r, "CallExpression"); + } else if (e.type === "Identifier" && e.name === "async" && this.match(47)) { + let r = this.state.clone(), n = this.tryParse((h) => this.parseAsyncArrowWithTypeParameters(s) || h(), r); + if (!n.error && !n.aborted) return n.node; + let o = this.tryParse(() => super.parseSubscripts(e, s, i), r); + if (o.node && !o.error) return o.node; + if (n.node) return this.state = n.failState, n.node; + if (o.node) return this.state = o.failState, o.node; + throw n.error || o.error; + } + return super.parseSubscripts(e, s, i); + } + parseSubscript(e, s, i, r) { + if (this.match(18) && this.isLookaheadToken_lt()) { + if (r.optionalChainMember = !0, i) return r.stop = !0, e; + this.next(); + let n = this.startNodeAt(s); + return n.callee = e, n.typeArguments = this.flowParseTypeParameterInstantiationInExpression(), this.expect(10), n.arguments = this.parseCallExpressionArguments(), n.optional = !0, this.finishCallExpression(n, !0); + } else if (!i && this.shouldParseTypes() && (this.match(47) || this.match(51))) { + let n = this.startNodeAt(s); + n.callee = e; + let o = this.tryParse(() => (n.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(), this.expect(10), n.arguments = super.parseCallExpressionArguments(), r.optionalChainMember && (n.optional = !1), this.finishCallExpression(n, r.optionalChainMember))); + if (o.node) return o.error && (this.state = o.failState), o.node; + } + return super.parseSubscript(e, s, i, r); + } + parseNewCallee(e) { + super.parseNewCallee(e); + let s = null; + this.shouldParseTypes() && this.match(47) && (s = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node), e.typeArguments = s; + } + parseAsyncArrowWithTypeParameters(e) { + let s = this.startNodeAt(e); + if (this.parseFunctionParams(s, !1), !!this.parseArrow(s)) return super.parseArrowExpression(s, void 0, !0); + } + readToken_mult_modulo(e) { + let s = this.input.charCodeAt(this.state.pos + 1); + if (e === 42 && s === 47 && this.state.hasFlowComment) { + this.state.hasFlowComment = !1, this.state.pos += 2, this.nextToken(); + return; + } + super.readToken_mult_modulo(e); + } + readToken_pipe_amp(e) { + let s = this.input.charCodeAt(this.state.pos + 1); + if (e === 124 && s === 125) { + this.finishOp(9, 2); + return; + } + super.readToken_pipe_amp(e); + } + parseTopLevel(e, s) { + let i = super.parseTopLevel(e, s); + return this.state.hasFlowComment && this.raise(g.UnterminatedFlowComment, this.state.curPosition()), i; + } + skipBlockComment() { + if (this.hasPlugin("flowComments") && this.skipFlowComment()) { + if (this.state.hasFlowComment) throw this.raise(g.NestedFlowComment, this.state.startLoc); + this.hasFlowCommentCompletion(); + let e = this.skipFlowComment(); + e && (this.state.pos += e, this.state.hasFlowComment = !0); + return; + } + return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); + } + skipFlowComment() { + let { pos: e } = this.state, s = 2; + for (; [32, 9].includes(this.input.charCodeAt(e + s));) s++; + let i = this.input.charCodeAt(s + e), r = this.input.charCodeAt(s + e + 1); + return i === 58 && r === 58 ? s + 2 : this.input.slice(s + e, s + e + 12) === "flow-include" ? s + 12 : i === 58 && r !== 58 ? s : !1; + } + hasFlowCommentCompletion() { + if (this.input.indexOf("*/", this.state.pos) === -1) throw this.raise(p.UnterminatedComment, this.state.curPosition()); + } + flowEnumErrorBooleanMemberNotInitialized(e, { enumName: s, memberName: i }) { + this.raise(g.EnumBooleanMemberNotInitialized, e, { + memberName: i, + enumName: s + }); + } + flowEnumErrorInvalidMemberInitializer(e, s) { + return this.raise(s.explicitType ? s.explicitType === "symbol" ? g.EnumInvalidMemberInitializerSymbolType : g.EnumInvalidMemberInitializerPrimaryType : g.EnumInvalidMemberInitializerUnknownType, e, s); + } + flowEnumErrorNumberMemberNotInitialized(e, s) { + this.raise(g.EnumNumberMemberNotInitialized, e, s); + } + flowEnumErrorStringMemberInconsistentlyInitialized(e, s) { + this.raise(g.EnumStringMemberInconsistentlyInitialized, e, s); + } + flowEnumMemberInit() { + let e = this.state.startLoc, s = () => this.match(12) || this.match(8); + switch (this.state.type) { + case 135: { + let i = this.parseNumericLiteral(this.state.value); + return s() ? { + type: "number", + loc: i.loc.start, + value: i + } : { + type: "invalid", + loc: e + }; + } + case 134: { + let i = this.parseStringLiteral(this.state.value); + return s() ? { + type: "string", + loc: i.loc.start, + value: i + } : { + type: "invalid", + loc: e + }; + } + case 85: + case 86: { + let i = this.parseBooleanLiteral(this.match(85)); + return s() ? { + type: "boolean", + loc: i.loc.start, + value: i + } : { + type: "invalid", + loc: e + }; + } + default: return { + type: "invalid", + loc: e + }; + } + } + flowEnumMemberRaw() { + let e = this.state.startLoc; + return { + id: this.parseIdentifier(!0), + init: this.eat(29) ? this.flowEnumMemberInit() : { + type: "none", + loc: e + } + }; + } + flowEnumCheckExplicitTypeMismatch(e, s, i) { + let { explicitType: r } = s; + r !== null && r !== i && this.flowEnumErrorInvalidMemberInitializer(e, s); + } + flowEnumMembers({ enumName: e, explicitType: s }) { + let i = /* @__PURE__ */ new Set(), r = { + booleanMembers: [], + numberMembers: [], + stringMembers: [], + defaultedMembers: [] + }, n = !1; + for (; !this.match(8);) { + if (this.eat(21)) { + n = !0; + break; + } + let o = this.startNode(), { id: h, init: l } = this.flowEnumMemberRaw(), u = h.name; + if (u === "") continue; + /^[a-z]/.test(u) && this.raise(g.EnumInvalidMemberName, h, { + memberName: u, + suggestion: u[0].toUpperCase() + u.slice(1), + enumName: e + }), i.has(u) && this.raise(g.EnumDuplicateMemberName, h, { + memberName: u, + enumName: e + }), i.add(u); + let f = { + enumName: e, + explicitType: s, + memberName: u + }; + switch (o.id = h, l.type) { + case "boolean": + this.flowEnumCheckExplicitTypeMismatch(l.loc, f, "boolean"), o.init = l.value, r.booleanMembers.push(this.finishNode(o, "EnumBooleanMember")); + break; + case "number": + this.flowEnumCheckExplicitTypeMismatch(l.loc, f, "number"), o.init = l.value, r.numberMembers.push(this.finishNode(o, "EnumNumberMember")); + break; + case "string": + this.flowEnumCheckExplicitTypeMismatch(l.loc, f, "string"), o.init = l.value, r.stringMembers.push(this.finishNode(o, "EnumStringMember")); + break; + case "invalid": throw this.flowEnumErrorInvalidMemberInitializer(l.loc, f); + case "none": switch (s) { + case "boolean": + this.flowEnumErrorBooleanMemberNotInitialized(l.loc, f); + break; + case "number": + this.flowEnumErrorNumberMemberNotInitialized(l.loc, f); + break; + default: r.defaultedMembers.push(this.finishNode(o, "EnumDefaultedMember")); + } + } + this.match(8) || this.expect(12); + } + return { + members: r, + hasUnknownMembers: n + }; + } + flowEnumStringMembers(e, s, { enumName: i }) { + if (e.length === 0) return s; + if (s.length === 0) return e; + if (s.length > e.length) { + for (let r of e) this.flowEnumErrorStringMemberInconsistentlyInitialized(r, { enumName: i }); + return s; + } else { + for (let r of s) this.flowEnumErrorStringMemberInconsistentlyInitialized(r, { enumName: i }); + return e; + } + } + flowEnumParseExplicitType({ enumName: e }) { + if (!this.eatContextual(102)) return null; + if (!w(this.state.type)) throw this.raise(g.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { enumName: e }); + let { value: s } = this.state; + return this.next(), s !== "boolean" && s !== "number" && s !== "string" && s !== "symbol" && this.raise(g.EnumInvalidExplicitType, this.state.startLoc, { + enumName: e, + invalidEnumType: s + }), s; + } + flowEnumBody(e, s) { + let i = s.name, r = s.loc.start, n = this.flowEnumParseExplicitType({ enumName: i }); + this.expect(5); + let { members: o, hasUnknownMembers: h } = this.flowEnumMembers({ + enumName: i, + explicitType: n + }); + switch (e.hasUnknownMembers = h, n) { + case "boolean": return e.explicitType = !0, e.members = o.booleanMembers, this.expect(8), this.finishNode(e, "EnumBooleanBody"); + case "number": return e.explicitType = !0, e.members = o.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody"); + case "string": return e.explicitType = !0, e.members = this.flowEnumStringMembers(o.stringMembers, o.defaultedMembers, { enumName: i }), this.expect(8), this.finishNode(e, "EnumStringBody"); + case "symbol": return e.members = o.defaultedMembers, this.expect(8), this.finishNode(e, "EnumSymbolBody"); + default: { + let l = () => (e.members = [], this.expect(8), this.finishNode(e, "EnumStringBody")); + e.explicitType = !1; + let u = o.booleanMembers.length, f = o.numberMembers.length, d = o.stringMembers.length, x = o.defaultedMembers.length; + if (!u && !f && !d && !x) return l(); + if (!u && !f) return e.members = this.flowEnumStringMembers(o.stringMembers, o.defaultedMembers, { enumName: i }), this.expect(8), this.finishNode(e, "EnumStringBody"); + if (!f && !d && u >= x) { + for (let A of o.defaultedMembers) this.flowEnumErrorBooleanMemberNotInitialized(A.loc.start, { + enumName: i, + memberName: A.id.name + }); + return e.members = o.booleanMembers, this.expect(8), this.finishNode(e, "EnumBooleanBody"); + } else if (!u && !d && f >= x) { + for (let A of o.defaultedMembers) this.flowEnumErrorNumberMemberNotInitialized(A.loc.start, { + enumName: i, + memberName: A.id.name + }); + return e.members = o.numberMembers, this.expect(8), this.finishNode(e, "EnumNumberBody"); + } else return this.raise(g.EnumInconsistentMemberValues, r, { enumName: i }), l(); + } + } + } + flowParseEnumDeclaration(e) { + let s = this.parseIdentifier(); + return e.id = s, e.body = this.flowEnumBody(this.startNode(), s), this.finishNode(e, "EnumDeclaration"); + } + jsxParseOpeningElementAfterName(e) { + return this.shouldParseTypes() && (this.match(47) || this.match(51)) && (e.typeArguments = this.flowParseTypeParameterInstantiationInExpression()), super.jsxParseOpeningElementAfterName(e); + } + isLookaheadToken_lt() { + let e = this.nextTokenStart(); + if (this.input.charCodeAt(e) === 60) { + let s = this.input.charCodeAt(e + 1); + return s !== 60 && s !== 61; + } + return !1; + } + reScan_lt_gt() { + let { type: e } = this.state; + e === 47 ? (this.state.pos -= 1, this.readToken_lt()) : e === 48 && (this.state.pos -= 1, this.readToken_gt()); + } + reScan_lt() { + let { type: e } = this.state; + return e === 51 ? (this.state.pos -= 2, this.finishOp(47, 1), 47) : e; + } + maybeUnwrapTypeCastExpression(e) { + return e.type === "TypeCastExpression" ? e.expression : e; + } + }; + ge = new RegExp(/\r\n|[\r\n\u2028\u2029]/.source, "g"); + _e = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g, je = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; + U = F`jsx`({ + AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", + MissingClosingTagElement: ({ openingTagName: a }) => `Expected corresponding JSX closing tag for <${a}>.`, + MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.", + UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?", + UnexpectedToken: ({ unexpected: a, HTMLEntity: t }) => `Unexpected token \`${a}\`. Did you mean \`${t}\` or \`{'${a}'}\`?`, + UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.", + UnterminatedJsxContent: "Unterminated JSX contents.", + UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?" + }); + Bi = (a) => class extends a { + jsxReadToken() { + let e = "", s = this.state.pos; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(U.UnterminatedJsxContent, this.state.startLoc); + let i = this.input.charCodeAt(this.state.pos); + switch (i) { + case 60: + case 123: + if (this.state.pos === this.state.start) { + i === 60 && this.state.canStartJSXElement ? (++this.state.pos, this.finishToken(143)) : super.getTokenFromCode(i); + return; + } + e += this.input.slice(s, this.state.pos), this.finishToken(142, e); + return; + case 38: + e += this.input.slice(s, this.state.pos), e += this.jsxReadEntity(), s = this.state.pos; + break; + case 62: + case 125: this.raise(U.UnexpectedToken, this.state.curPosition(), { + unexpected: this.input[this.state.pos], + HTMLEntity: i === 125 ? "}" : ">" + }); + default: G(i) ? (e += this.input.slice(s, this.state.pos), e += this.jsxReadNewLine(!0), s = this.state.pos) : ++this.state.pos; + } + } + } + jsxReadNewLine(e) { + let s = this.input.charCodeAt(this.state.pos), i; + return ++this.state.pos, s === 13 && this.input.charCodeAt(this.state.pos) === 10 ? (++this.state.pos, i = e ? ` +` : `\r +`) : i = String.fromCharCode(s), ++this.state.curLine, this.state.lineStart = this.state.pos, i; + } + jsxReadString(e) { + let s = "", i = ++this.state.pos; + for (;;) { + if (this.state.pos >= this.length) throw this.raise(p.UnterminatedString, this.state.startLoc); + let r = this.input.charCodeAt(this.state.pos); + if (r === e) break; + r === 38 ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadEntity(), i = this.state.pos) : G(r) ? (s += this.input.slice(i, this.state.pos), s += this.jsxReadNewLine(!1), i = this.state.pos) : ++this.state.pos; + } + s += this.input.slice(i, this.state.pos++), this.finishToken(134, s); + } + jsxReadEntity() { + let e = ++this.state.pos; + if (this.codePointAtPos(this.state.pos) === 35) { + ++this.state.pos; + let s = 10; + this.codePointAtPos(this.state.pos) === 120 && (s = 16, ++this.state.pos); + let i = this.readInt(s, void 0, !1, "bail"); + if (i !== null && this.codePointAtPos(this.state.pos) === 59) return ++this.state.pos, String.fromCodePoint(i); + } else { + let s = 0, i = !1; + for (; s++ < 10 && this.state.pos < this.length && !(i = this.codePointAtPos(this.state.pos) === 59);) ++this.state.pos; + if (i) { + this.input.slice(e, this.state.pos); + if (++this.state.pos, void 0); + } + } + return this.state.pos = e, "&"; + } + jsxReadWord() { + let e, s = this.state.pos; + do + e = this.input.charCodeAt(++this.state.pos); + while (K(e) || e === 45); + this.finishToken(141, this.input.slice(s, this.state.pos)); + } + jsxParseIdentifier() { + let e = this.startNode(); + return this.match(141) ? e.name = this.state.value : Tt(this.state.type) ? e.name = z(this.state.type) : this.unexpected(), this.next(), this.finishNode(e, "JSXIdentifier"); + } + jsxParseNamespacedName() { + let e = this.state.startLoc, s = this.jsxParseIdentifier(); + if (!this.eat(14)) return s; + let i = this.startNodeAt(e); + return i.namespace = s, i.name = this.jsxParseIdentifier(), this.finishNode(i, "JSXNamespacedName"); + } + jsxParseElementName() { + let e = this.state.startLoc, s = this.jsxParseNamespacedName(); + if (s.type === "JSXNamespacedName") return s; + for (; this.eat(16);) { + let i = this.startNodeAt(e); + i.object = s, i.property = this.jsxParseIdentifier(), s = this.finishNode(i, "JSXMemberExpression"); + } + return s; + } + jsxParseAttributeValue() { + let e; + switch (this.state.type) { + case 5: return e = this.startNode(), this.setContext(E.brace), this.next(), e = this.jsxParseExpressionContainer(e, E.j_oTag), e.expression.type === "JSXEmptyExpression" && this.raise(U.AttributeIsEmpty, e), e; + case 143: + case 134: return this.parseExprAtom(); + default: throw this.raise(U.UnsupportedJsxValue, this.state.startLoc); + } + } + jsxParseEmptyExpression() { + let e = this.startNodeAt(this.state.lastTokEndLoc); + return this.finishNodeAt(e, "JSXEmptyExpression", this.state.startLoc); + } + jsxParseSpreadChild(e) { + return this.next(), e.expression = this.parseExpression(), this.setContext(E.j_expr), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(e, "JSXSpreadChild"); + } + jsxParseExpressionContainer(e, s) { + if (this.match(8)) e.expression = this.jsxParseEmptyExpression(); + else { + let i = this.parseExpression(); + i.type === "SequenceExpression" && !i.extra?.parenthesized && this.raise(U.UnexpectedSequenceExpression, i.expressions[1]), e.expression = i; + } + return this.setContext(s), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(e, "JSXExpressionContainer"); + } + jsxParseAttribute() { + let e = this.startNode(); + return this.match(5) ? (this.setContext(E.brace), this.next(), this.expect(21), e.argument = this.parseMaybeAssignAllowIn(), this.setContext(E.j_oTag), this.state.canStartJSXElement = !0, this.expect(8), this.finishNode(e, "JSXSpreadAttribute")) : (e.name = this.jsxParseNamespacedName(), e.value = this.eat(29) ? this.jsxParseAttributeValue() : null, this.finishNode(e, "JSXAttribute")); + } + jsxParseOpeningElementAt(e) { + let s = this.startNodeAt(e); + return this.eat(144) ? this.finishNode(s, "JSXOpeningFragment") : (s.name = this.jsxParseElementName(), this.jsxParseOpeningElementAfterName(s)); + } + jsxParseOpeningElementAfterName(e) { + let s = []; + for (; !this.match(56) && !this.match(144);) s.push(this.jsxParseAttribute()); + return e.attributes = s, e.selfClosing = this.eat(56), this.expect(144), this.finishNode(e, "JSXOpeningElement"); + } + jsxParseClosingElementAt(e) { + let s = this.startNodeAt(e); + return this.eat(144) ? this.finishNode(s, "JSXClosingFragment") : (s.name = this.jsxParseElementName(), this.expect(144), this.finishNode(s, "JSXClosingElement")); + } + jsxParseElementAt(e) { + let s = this.startNodeAt(e), i = [], r = this.jsxParseOpeningElementAt(e), n = null; + if (!r.selfClosing) { + e: for (;;) switch (this.state.type) { + case 143: + if (e = this.state.startLoc, this.next(), this.eat(56)) { + n = this.jsxParseClosingElementAt(e); + break e; + } + i.push(this.jsxParseElementAt(e)); + break; + case 142: + i.push(this.parseLiteral(this.state.value, "JSXText")); + break; + case 5: { + let o = this.startNode(); + this.setContext(E.brace), this.next(), this.match(21) ? i.push(this.jsxParseSpreadChild(o)) : i.push(this.jsxParseExpressionContainer(o, E.j_expr)); + break; + } + default: this.unexpected(); + } + V(r) && !V(n) && n !== null ? this.raise(U.MissingClosingTagFragment, n) : !V(r) && V(n) ? this.raise(U.MissingClosingTagElement, n, { openingTagName: J(r.name) }) : !V(r) && !V(n) && J(n.name) !== J(r.name) && this.raise(U.MissingClosingTagElement, n, { openingTagName: J(r.name) }); + } + if (V(r) ? (s.openingFragment = r, s.closingFragment = n) : (s.openingElement = r, s.closingElement = n), s.children = i, this.match(47)) throw this.raise(U.UnwrappedAdjacentJSXElements, this.state.startLoc); + return V(r) ? this.finishNode(s, "JSXFragment") : this.finishNode(s, "JSXElement"); + } + jsxParseElement() { + let e = this.state.startLoc; + return this.next(), this.jsxParseElementAt(e); + } + setContext(e) { + let { context: s } = this.state; + s[s.length - 1] = e; + } + parseExprAtom(e) { + return this.match(143) ? this.jsxParseElement() : this.match(47) && this.input.charCodeAt(this.state.pos) !== 33 ? (this.replaceToken(143), this.jsxParseElement()) : super.parseExprAtom(e); + } + skipSpace() { + this.curContext().preserveSpace || super.skipSpace(); + } + getTokenFromCode(e) { + let s = this.curContext(); + if (s === E.j_expr) { + this.jsxReadToken(); + return; + } + if (s === E.j_oTag || s === E.j_cTag) { + if (B(e)) { + this.jsxReadWord(); + return; + } + if (e === 62) { + ++this.state.pos, this.finishToken(144); + return; + } + if ((e === 34 || e === 39) && s === E.j_oTag) { + this.jsxReadString(e); + return; + } + } + if (e === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { + ++this.state.pos, this.finishToken(143); + return; + } + super.getTokenFromCode(e); + } + updateContext(e) { + let { context: s, type: i } = this.state; + if (i === 56 && e === 143) s.splice(-2, 2, E.j_cTag), this.state.canStartJSXElement = !1; + else if (i === 143) s.push(E.j_oTag); + else if (i === 144) { + let r = s[s.length - 1]; + r === E.j_oTag && e === 56 || r === E.j_cTag ? (s.pop(), this.state.canStartJSXElement = s[s.length - 1] === E.j_expr) : (this.setContext(E.j_expr), this.state.canStartJSXElement = !0); + } else this.state.canStartJSXElement = ci(i); + } + }, Je = class extends ue { + tsNames = /* @__PURE__ */ new Map(); + }, Ge = class extends fe { + importsStack = []; + createScope(t) { + return this.importsStack.push(/* @__PURE__ */ new Set()), new Je(t); + } + enter(t) { + t === 1024 && this.importsStack.push(/* @__PURE__ */ new Set()), super.enter(t); + } + exit() { + let t = super.exit(); + return t === 1024 && this.importsStack.pop(), t; + } + hasImport(t, e) { + let s = this.importsStack.length; + if (this.importsStack[s - 1].has(t)) return !0; + if (!e && s > 1) { + for (let i = 0; i < s - 1; i++) if (this.importsStack[i].has(t)) return !0; + } + return !1; + } + declareName(t, e, s) { + if (e & 4096) { + this.hasImport(t, !0) && this.parser.raise(p.VarRedeclaration, s, { identifierName: t }), this.importsStack[this.importsStack.length - 1].add(t); + return; + } + let i = this.currentScope(), r = i.tsNames.get(t) || 0; + if (e & 1024) { + this.maybeExportDefined(i, t), i.tsNames.set(t, r | 16); + return; + } + super.declareName(t, e, s), e & 2 && (e & 1 || (this.checkRedeclarationInScope(i, t, e, s), this.maybeExportDefined(i, t)), r = r | 1), e & 256 && (r = r | 2), e & 512 && (r = r | 4), e & 128 && (r = r | 8), r && i.tsNames.set(t, r); + } + isRedeclaredInScope(t, e, s) { + let i = t.tsNames.get(e); + if ((i & 2) > 0) { + if (s & 256) return !!(s & 512) !== (i & 4) > 0; + return !0; + } + return s & 128 && (i & 8) > 0 ? t.names.get(e) & 2 ? !!(s & 1) : !1 : s & 2 && (i & 1) > 0 ? !0 : super.isRedeclaredInScope(t, e, s); + } + checkLocalExport(t) { + let { name: e } = t; + if (this.hasImport(e)) return; + let s = this.scopeStack.length; + for (let i = s - 1; i >= 0; i--) { + let n = this.scopeStack[i].tsNames.get(e); + if ((n & 1) > 0 || (n & 16) > 0) return; + } + super.checkLocalExport(t); + } + }, Xe = class { + stacks = []; + enter(t) { + this.stacks.push(t); + } + exit() { + this.stacks.pop(); + } + currentFlags() { + return this.stacks[this.stacks.length - 1]; + } + get hasAwait() { + return (this.currentFlags() & 2) > 0; + } + get hasYield() { + return (this.currentFlags() & 1) > 0; + } + get hasReturn() { + return (this.currentFlags() & 4) > 0; + } + get hasIn() { + return (this.currentFlags() & 8) > 0; + } + }; + Ye = class { + sawUnambiguousESM = !1; + ambiguousScriptDifferentAst = !1; + sourceToOffsetPos(t) { + return t + this.startIndex; + } + offsetToSourcePos(t) { + return t - this.startIndex; + } + hasPlugin(t) { + if (typeof t == "string") return this.plugins.has(t); + { + let [e, s] = t; + if (!this.hasPlugin(e)) return !1; + let i = this.plugins.get(e); + for (let r of Object.keys(s)) if (i?.[r] !== s[r]) return !1; + return !0; + } + } + getPluginOption(t, e) { + return this.plugins.get(t)?.[e]; + } + }; + Qe = class extends Ye { + addComment(t) { + this.filename && (t.loc.filename = this.filename); + let { commentsLen: e } = this.state; + this.comments.length !== e && (this.comments.length = e), this.comments.push(t), this.state.commentsLen++; + } + processComment(t) { + let { commentStack: e } = this.state, s = e.length; + if (s === 0) return; + let i = s - 1, r = e[i]; + r.start === t.end && (r.leadingNode = t, i--); + let { start: n } = t; + for (; i >= 0; i--) { + let o = e[i], h = o.end; + if (h > n) o.containingNode = t, this.finalizeComment(o), e.splice(i, 1); + else { + h === n && (o.trailingNode = t); + break; + } + } + } + finalizeComment(t) { + let { comments: e } = t; + if (t.leadingNode !== null || t.trailingNode !== null) t.leadingNode !== null && ss(t.leadingNode, e), t.trailingNode !== null && Ri(t.trailingNode, e); + else { + let s = t.containingNode, i = t.start; + if (this.input.charCodeAt(this.offsetToSourcePos(i) - 1) === 44) switch (s.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + $(s, s.properties, t); + break; + case "CallExpression": + case "OptionalCallExpression": + $(s, s.arguments, t); + break; + case "ImportExpression": + $(s, [s.source, s.options ?? null], t); + break; + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + $(s, s.params, t); + break; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + $(s, s.elements, t); + break; + case "ExportNamedDeclaration": + case "ImportDeclaration": + $(s, s.specifiers, t); + break; + case "TSEnumDeclaration": + X(s, e); + break; + case "TSEnumBody": + $(s, s.members, t); + break; + default: X(s, e); + } + else X(s, e); + } + } + finalizeRemainingComments() { + let { commentStack: t } = this.state; + for (let e = t.length - 1; e >= 0; e--) this.finalizeComment(t[e]); + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(t) { + let { commentStack: e } = this.state, { length: s } = e; + if (s === 0) return; + let i = e[s - 1]; + i.leadingNode === t && (i.leadingNode = null); + } + takeSurroundingComments(t, e, s) { + let { commentStack: i } = this.state, r = i.length; + if (r === 0) return; + let n = r - 1; + for (; n >= 0; n--) { + let o = i[n], h = o.end; + if (o.start === s) o.leadingNode = t; + else if (h === e) o.trailingNode = t; + else if (h < e) break; + } + } + }, Ze = class a { + flags = 1024; + get strict() { + return (this.flags & 1) > 0; + } + set strict(t) { + t ? this.flags |= 1 : this.flags &= -2; + } + startIndex; + curLine; + lineStart; + startLoc; + endLoc; + init({ strictMode: t, sourceType: e, startIndex: s, startLine: i, startColumn: r }) { + this.strict = t === !1 ? !1 : t === !0 ? !0 : e === "module", this.startIndex = s, this.curLine = i, this.lineStart = -r, this.startLoc = this.endLoc = new R(i, r, s); + } + errors = []; + potentialArrowAt = -1; + noArrowAt = []; + noArrowParamsConversionAt = []; + get maybeInArrowParameters() { + return (this.flags & 2) > 0; + } + set maybeInArrowParameters(t) { + t ? this.flags |= 2 : this.flags &= -3; + } + get inType() { + return (this.flags & 4) > 0; + } + set inType(t) { + t ? this.flags |= 4 : this.flags &= -5; + } + get noAnonFunctionType() { + return (this.flags & 8) > 0; + } + set noAnonFunctionType(t) { + t ? this.flags |= 8 : this.flags &= -9; + } + get hasFlowComment() { + return (this.flags & 16) > 0; + } + set hasFlowComment(t) { + t ? this.flags |= 16 : this.flags &= -17; + } + get isAmbientContext() { + return (this.flags & 32) > 0; + } + set isAmbientContext(t) { + t ? this.flags |= 32 : this.flags &= -33; + } + get inAbstractClass() { + return (this.flags & 64) > 0; + } + set inAbstractClass(t) { + t ? this.flags |= 64 : this.flags &= -65; + } + get inDisallowConditionalTypesContext() { + return (this.flags & 128) > 0; + } + set inDisallowConditionalTypesContext(t) { + t ? this.flags |= 128 : this.flags &= -129; + } + topicContext = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null + }; + get soloAwait() { + return (this.flags & 256) > 0; + } + set soloAwait(t) { + t ? this.flags |= 256 : this.flags &= -257; + } + get inFSharpPipelineDirectBody() { + return (this.flags & 512) > 0; + } + set inFSharpPipelineDirectBody(t) { + t ? this.flags |= 512 : this.flags &= -513; + } + labels = []; + commentsLen = 0; + commentStack = []; + pos = 0; + type = 140; + value = null; + start = 0; + end = 0; + lastTokEndLoc = null; + lastTokStartLoc = null; + context = [E.brace]; + get canStartJSXElement() { + return (this.flags & 1024) > 0; + } + set canStartJSXElement(t) { + t ? this.flags |= 1024 : this.flags &= -1025; + } + get containsEsc() { + return (this.flags & 2048) > 0; + } + set containsEsc(t) { + t ? this.flags |= 2048 : this.flags &= -2049; + } + firstInvalidTemplateEscapePos = null; + get hasTopLevelAwait() { + return (this.flags & 4096) > 0; + } + set hasTopLevelAwait(t) { + t ? this.flags |= 4096 : this.flags &= -4097; + } + strictErrors = /* @__PURE__ */ new Map(); + tokensLength = 0; + curPosition() { + return new R(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex); + } + clone() { + let t = new a(); + return t.flags = this.flags, t.startIndex = this.startIndex, t.curLine = this.curLine, t.lineStart = this.lineStart, t.startLoc = this.startLoc, t.endLoc = this.endLoc, t.errors = this.errors.slice(), t.potentialArrowAt = this.potentialArrowAt, t.noArrowAt = this.noArrowAt.slice(), t.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice(), t.topicContext = this.topicContext, t.labels = this.labels.slice(), t.commentsLen = this.commentsLen, t.commentStack = this.commentStack.slice(), t.pos = this.pos, t.type = this.type, t.value = this.value, t.start = this.start, t.end = this.end, t.lastTokEndLoc = this.lastTokEndLoc, t.lastTokStartLoc = this.lastTokStartLoc, t.context = this.context.slice(), t.firstInvalidTemplateEscapePos = this.firstInvalidTemplateEscapePos, t.strictErrors = this.strictErrors, t.tokensLength = this.tokensLength, t; + } + }, Ui = function(t) { + return t >= 48 && t <= 57; + }, _t = { + decBinOct: /* @__PURE__ */ new Set([ + 46, + 66, + 69, + 79, + 95, + 98, + 101, + 111 + ]), + hex: /* @__PURE__ */ new Set([ + 46, + 88, + 95, + 120 + ]) + }, Te = { + bin: (a) => a === 48 || a === 49, + oct: (a) => a >= 48 && a <= 55, + dec: (a) => a >= 48 && a <= 57, + hex: (a) => a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102 + }; + Vi = /* @__PURE__ */ new Set([ + 103, + 109, + 115, + 105, + 121, + 117, + 100, + 118 + ]), tt = class { + constructor(t) { + let e = t.startIndex || 0; + this.type = t.type, this.value = t.value, this.start = e + t.start, this.end = e + t.end, this.loc = new Q(t.startLoc, t.endLoc); + } + }, st = class extends Qe { + isLookahead; + tokens = []; + constructor(t, e) { + super(), this.state = new Ze(), this.state.init(t), this.input = e, this.length = e.length, this.comments = [], this.isLookahead = !1; + } + pushToken(t) { + this.tokens.length = this.state.tokensLength, this.tokens.push(t), ++this.state.tokensLength; + } + next() { + this.checkKeywordEscapes(), this.optionFlags & 256 && this.pushToken(new tt(this.state)), this.state.lastTokEndLoc = this.state.endLoc, this.state.lastTokStartLoc = this.state.startLoc, this.nextToken(); + } + eat(t) { + return this.match(t) ? (this.next(), !0) : !1; + } + match(t) { + return this.state.type === t; + } + createLookaheadState(t) { + return { + pos: t.pos, + value: null, + type: t.type, + start: t.start, + end: t.end, + context: [this.curContext()], + inType: t.inType, + startLoc: t.startLoc, + lastTokEndLoc: t.lastTokEndLoc, + curLine: t.curLine, + lineStart: t.lineStart, + curPosition: t.curPosition + }; + } + lookahead() { + let t = this.state; + this.state = this.createLookaheadState(t), this.isLookahead = !0, this.nextToken(), this.isLookahead = !1; + let e = this.state; + return this.state = t, e; + } + nextTokenStart() { + return this.nextTokenStartSince(this.state.pos); + } + nextTokenStartSince(t) { + return _e.lastIndex = t, _e.test(this.input) ? _e.lastIndex : t; + } + lookaheadCharCode() { + return this.lookaheadCharCodeSince(this.state.pos); + } + lookaheadCharCodeSince(t) { + return this.input.charCodeAt(this.nextTokenStartSince(t)); + } + nextTokenInLineStart() { + return this.nextTokenInLineStartSince(this.state.pos); + } + nextTokenInLineStartSince(t) { + return je.lastIndex = t, je.test(this.input) ? je.lastIndex : t; + } + lookaheadInLineCharCode() { + return this.input.charCodeAt(this.nextTokenInLineStart()); + } + codePointAtPos(t) { + let e = this.input.charCodeAt(t); + if ((e & 64512) === 55296 && ++t < this.input.length) { + let s = this.input.charCodeAt(t); + (s & 64512) === 56320 && (e = 65536 + ((e & 1023) << 10) + (s & 1023)); + } + return e; + } + setStrict(t) { + this.state.strict = t, t && (this.state.strictErrors.forEach(([e, s]) => this.raise(e, s)), this.state.strictErrors.clear()); + } + curContext() { + return this.state.context[this.state.context.length - 1]; + } + nextToken() { + if (this.skipSpace(), this.state.start = this.state.pos, this.isLookahead || (this.state.startLoc = this.state.curPosition()), this.state.pos >= this.length) { + this.finishToken(140); + return; + } + this.getTokenFromCode(this.codePointAtPos(this.state.pos)); + } + skipBlockComment(t) { + let e; + this.isLookahead || (e = this.state.curPosition()); + let s = this.state.pos, i = this.input.indexOf(t, s + 2); + if (i === -1) throw this.raise(p.UnterminatedComment, this.state.curPosition()); + for (this.state.pos = i + t.length, ge.lastIndex = s + 2; ge.test(this.input) && ge.lastIndex <= i;) ++this.state.curLine, this.state.lineStart = ge.lastIndex; + if (this.isLookahead) return; + let r = { + type: "CommentBlock", + value: this.input.slice(s + 2, i), + start: this.sourceToOffsetPos(s), + end: this.sourceToOffsetPos(i + t.length), + loc: new Q(e, this.state.curPosition()) + }; + return this.optionFlags & 256 && this.pushToken(r), r; + } + skipLineComment(t) { + let e = this.state.pos, s; + this.isLookahead || (s = this.state.curPosition()); + let i = this.input.charCodeAt(this.state.pos += t); + if (this.state.pos < this.length) for (; !G(i) && ++this.state.pos < this.length;) i = this.input.charCodeAt(this.state.pos); + if (this.isLookahead) return; + let r = this.state.pos, o = { + type: "CommentLine", + value: this.input.slice(e + t, r), + start: this.sourceToOffsetPos(e), + end: this.sourceToOffsetPos(r), + loc: new Q(s, this.state.curPosition()) + }; + return this.optionFlags & 256 && this.pushToken(o), o; + } + skipSpace() { + let t = this.state.pos, e = this.optionFlags & 4096 ? [] : null; + e: for (; this.state.pos < this.length;) { + let s = this.input.charCodeAt(this.state.pos); + switch (s) { + case 32: + case 160: + case 9: + ++this.state.pos; + break; + case 13: this.input.charCodeAt(this.state.pos + 1) === 10 && ++this.state.pos; + case 10: + case 8232: + case 8233: + ++this.state.pos, ++this.state.curLine, this.state.lineStart = this.state.pos; + break; + case 47: + switch (this.input.charCodeAt(this.state.pos + 1)) { + case 42: { + let i = this.skipBlockComment("*/"); + i !== void 0 && (this.addComment(i), e?.push(i)); + break; + } + case 47: { + let i = this.skipLineComment(2); + i !== void 0 && (this.addComment(i), e?.push(i)); + break; + } + default: break e; + } + break; + default: if (Fi(s)) ++this.state.pos; + else if (s === 45 && !this.inModule && this.optionFlags & 8192) { + let i = this.state.pos; + if (this.input.charCodeAt(i + 1) === 45 && this.input.charCodeAt(i + 2) === 62 && (t === 0 || this.state.lineStart > t)) { + let r = this.skipLineComment(3); + r !== void 0 && (this.addComment(r), e?.push(r)); + } else break e; + } else if (s === 60 && !this.inModule && this.optionFlags & 8192) { + let i = this.state.pos; + if (this.input.charCodeAt(i + 1) === 33 && this.input.charCodeAt(i + 2) === 45 && this.input.charCodeAt(i + 3) === 45) { + let r = this.skipLineComment(4); + r !== void 0 && (this.addComment(r), e?.push(r)); + } else break e; + } else break e; + } + } + if (e?.length > 0) { + let s = this.state.pos, i = { + start: this.sourceToOffsetPos(t), + end: this.sourceToOffsetPos(s), + comments: e, + leadingNode: null, + trailingNode: null, + containingNode: null + }; + this.state.commentStack.push(i); + } + } + finishToken(t, e) { + this.state.end = this.state.pos, this.state.endLoc = this.state.curPosition(); + let s = this.state.type; + this.state.type = t, this.state.value = e, this.isLookahead || this.updateContext(s); + } + replaceToken(t) { + this.state.type = t, this.updateContext(); + } + readToken_numberSign() { + if (this.state.pos === 0 && this.readToken_interpreter()) return; + let t = this.state.pos + 1, e = this.codePointAtPos(t); + if (e >= 48 && e <= 57) throw this.raise(p.UnexpectedDigitAfterHash, this.state.curPosition()); + B(e) ? (++this.state.pos, this.finishToken(139, this.readWord1(e))) : e === 92 ? (++this.state.pos, this.finishToken(139, this.readWord1())) : this.finishOp(27, 1); + } + readToken_dot() { + let t = this.input.charCodeAt(this.state.pos + 1); + if (t >= 48 && t <= 57) { + this.readNumber(!0); + return; + } + t === 46 && this.input.charCodeAt(this.state.pos + 2) === 46 ? (this.state.pos += 3, this.finishToken(21)) : (++this.state.pos, this.finishToken(16)); + } + readToken_slash() { + this.input.charCodeAt(this.state.pos + 1) === 61 ? this.finishOp(31, 2) : this.finishOp(56, 1); + } + readToken_interpreter() { + if (this.state.pos !== 0 || this.length < 2) return !1; + let t = this.input.charCodeAt(this.state.pos + 1); + if (t !== 33) return !1; + let e = this.state.pos; + for (this.state.pos += 1; !G(t) && ++this.state.pos < this.length;) t = this.input.charCodeAt(this.state.pos); + let s = this.input.slice(e + 2, this.state.pos); + return this.finishToken(28, s), !0; + } + readToken_mult_modulo(t) { + let e = t === 42 ? 55 : 54, s = 1, i = this.input.charCodeAt(this.state.pos + 1); + t === 42 && i === 42 && (s++, i = this.input.charCodeAt(this.state.pos + 2), e = 57), i === 61 && !this.state.inType && (s++, e = t === 37 ? 33 : 30), this.finishOp(e, s); + } + readToken_pipe_amp(t) { + let e = this.input.charCodeAt(this.state.pos + 1); + if (e === t) { + this.input.charCodeAt(this.state.pos + 2) === 61 ? this.finishOp(30, 3) : this.finishOp(t === 124 ? 41 : 42, 2); + return; + } + if (t === 124 && e === 62) { + this.finishOp(39, 2); + return; + } + if (e === 61) { + this.finishOp(30, 2); + return; + } + this.finishOp(t === 124 ? 43 : 45, 1); + } + readToken_caret() { + let t = this.input.charCodeAt(this.state.pos + 1); + t === 61 && !this.state.inType ? this.finishOp(32, 2) : t === 94 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "^^" + }]) ? (this.finishOp(37, 2), this.input.codePointAt(this.state.pos) === 94 && this.unexpected()) : this.finishOp(44, 1); + } + readToken_atSign() { + this.input.charCodeAt(this.state.pos + 1) === 64 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "@@" + }]) ? this.finishOp(38, 2) : this.finishOp(26, 1); + } + readToken_plus_min(t) { + let e = this.input.charCodeAt(this.state.pos + 1); + if (e === t) { + this.finishOp(34, 2); + return; + } + e === 61 ? this.finishOp(30, 2) : this.finishOp(53, 1); + } + readToken_lt() { + let { pos: t } = this.state, e = this.input.charCodeAt(t + 1); + if (e === 60) { + if (this.input.charCodeAt(t + 2) === 61) { + this.finishOp(30, 3); + return; + } + this.finishOp(51, 2); + return; + } + if (e === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(47, 1); + } + readToken_gt() { + let { pos: t } = this.state, e = this.input.charCodeAt(t + 1); + if (e === 62) { + let s = this.input.charCodeAt(t + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(t + s) === 61) { + this.finishOp(30, s + 1); + return; + } + this.finishOp(52, s); + return; + } + if (e === 61) { + this.finishOp(49, 2); + return; + } + this.finishOp(48, 1); + } + readToken_eq_excl(t) { + let e = this.input.charCodeAt(this.state.pos + 1); + if (e === 61) { + this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + return; + } + if (t === 61 && e === 62) { + this.state.pos += 2, this.finishToken(19); + return; + } + this.finishOp(t === 61 ? 29 : 35, 1); + } + readToken_question() { + let t = this.input.charCodeAt(this.state.pos + 1), e = this.input.charCodeAt(this.state.pos + 2); + t === 63 ? e === 61 ? this.finishOp(30, 3) : this.finishOp(40, 2) : t === 46 && !(e >= 48 && e <= 57) ? (this.state.pos += 2, this.finishToken(18)) : (++this.state.pos, this.finishToken(17)); + } + getTokenFromCode(t) { + switch (t) { + case 46: + this.readToken_dot(); + return; + case 40: + ++this.state.pos, this.finishToken(10); + return; + case 41: + ++this.state.pos, this.finishToken(11); + return; + case 59: + ++this.state.pos, this.finishToken(13); + return; + case 44: + ++this.state.pos, this.finishToken(12); + return; + case 91: + ++this.state.pos, this.finishToken(0); + return; + case 93: + ++this.state.pos, this.finishToken(3); + return; + case 123: + ++this.state.pos, this.finishToken(5); + return; + case 125: + ++this.state.pos, this.finishToken(8); + return; + case 58: + this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58 ? this.finishOp(15, 2) : (++this.state.pos, this.finishToken(14)); + return; + case 63: + this.readToken_question(); + return; + case 96: + this.readTemplateToken(); + return; + case 48: { + let e = this.input.charCodeAt(this.state.pos + 1); + if (e === 120 || e === 88) { + this.readRadixNumber(16); + return; + } + if (e === 111 || e === 79) { + this.readRadixNumber(8); + return; + } + if (e === 98 || e === 66) { + this.readRadixNumber(2); + return; + } + } + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + this.readNumber(!1); + return; + case 34: + case 39: + this.readString(t); + return; + case 47: + this.readToken_slash(); + return; + case 37: + case 42: + this.readToken_mult_modulo(t); + return; + case 124: + case 38: + this.readToken_pipe_amp(t); + return; + case 94: + this.readToken_caret(); + return; + case 43: + case 45: + this.readToken_plus_min(t); + return; + case 60: + this.readToken_lt(); + return; + case 62: + this.readToken_gt(); + return; + case 61: + case 33: + this.readToken_eq_excl(t); + return; + case 126: + this.finishOp(36, 1); + return; + case 64: + this.readToken_atSign(); + return; + case 35: + this.readToken_numberSign(); + return; + case 92: + this.readWord(); + return; + default: if (B(t)) { + this.readWord(t); + return; + } + } + throw this.raise(p.InvalidOrUnexpectedToken, this.state.curPosition(), { unexpected: String.fromCodePoint(t) }); + } + finishOp(t, e) { + let s = this.input.slice(this.state.pos, this.state.pos + e); + this.state.pos += e, this.finishToken(t, s); + } + readRegexp() { + let t = this.state.startLoc, e = this.state.start + 1, s, i, { pos: r } = this.state; + for (;; ++r) { + if (r >= this.length) throw this.raise(p.UnterminatedRegExp, D(t, 1)); + let l = this.input.charCodeAt(r); + if (G(l)) throw this.raise(p.UnterminatedRegExp, D(t, 1)); + if (s) s = !1; + else { + if (l === 91) i = !0; + else if (l === 93 && i) i = !1; + else if (l === 47 && !i) break; + s = l === 92; + } + } + let n = this.input.slice(e, r); + ++r; + let o = "", h = () => D(t, r + 2 - e); + for (; r < this.length;) { + let l = this.codePointAtPos(r), u = String.fromCharCode(l); + if (Vi.has(l)) l === 118 ? o.includes("u") && this.raise(p.IncompatibleRegExpUVFlags, h()) : l === 117 && o.includes("v") && this.raise(p.IncompatibleRegExpUVFlags, h()), o.includes(u) && this.raise(p.DuplicateRegExpFlags, h()); + else if (K(l) || l === 92) this.raise(p.MalformedRegExpFlags, h()); + else break; + ++r, o += u; + } + this.state.pos = r, this.finishToken(138, { + pattern: n, + flags: o + }); + } + readInt(t, e, s = !1, i = !0) { + let { n: r, pos: n } = is(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, e, s, i, this.errorHandlers_readInt, !1); + return this.state.pos = n, r; + } + readRadixNumber(t) { + let e = this.state.pos, s = this.state.curPosition(), i = !1; + this.state.pos += 2; + let r = this.readInt(t); + r ?? this.raise(p.InvalidDigit, D(s, 2), { radix: t }); + let n = this.input.charCodeAt(this.state.pos); + if (n === 110) ++this.state.pos, i = !0; + else if (n === 109) throw this.raise(p.InvalidDecimal, s); + if (B(this.codePointAtPos(this.state.pos))) throw this.raise(p.NumberIdentifier, this.state.curPosition()); + if (i) { + let o = this.input.slice(e, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(136, o); + return; + } + this.finishToken(135, r); + } + readNumber(t) { + let e = this.state.pos, s = this.state.curPosition(), i = !1, r = !1, n = !1; + !t && this.readInt(10) === null && this.raise(p.InvalidNumber, this.state.curPosition()); + let o = this.state.pos - e >= 2 && this.input.charCodeAt(e) === 48; + if (o) { + let f = this.input.slice(e, this.state.pos); + if (this.recordStrictModeErrors(p.StrictOctalLiteral, s), !this.state.strict) { + let d = f.indexOf("_"); + d > 0 && this.raise(p.ZeroDigitNumericSeparator, D(s, d)); + } + n = o && !/[89]/.test(f); + } + let h = this.input.charCodeAt(this.state.pos); + if (h === 46 && !n && (++this.state.pos, this.readInt(10), i = !0, h = this.input.charCodeAt(this.state.pos)), (h === 69 || h === 101) && !n && (h = this.input.charCodeAt(++this.state.pos), (h === 43 || h === 45) && ++this.state.pos, this.readInt(10) === null && this.raise(p.InvalidOrMissingExponent, s), i = !0, h = this.input.charCodeAt(this.state.pos)), h === 110 && ((i || o) && this.raise(p.InvalidBigIntLiteral, s), ++this.state.pos, r = !0), B(this.codePointAtPos(this.state.pos))) throw this.raise(p.NumberIdentifier, this.state.curPosition()); + let l = this.input.slice(e, this.state.pos).replace(/[_mn]/g, ""); + if (r) { + this.finishToken(136, l); + return; + } + let u = n ? parseInt(l, 8) : parseFloat(l); + this.finishToken(135, u); + } + readCodePoint(t) { + let { code: e, pos: s } = rs(this.input, this.state.pos, this.state.lineStart, this.state.curLine, t, this.errorHandlers_readCodePoint); + return this.state.pos = s, e; + } + readString(t) { + let { str: e, pos: s, curLine: i, lineStart: r } = jt(t === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); + this.state.pos = s + 1, this.state.lineStart = r, this.state.curLine = i, this.finishToken(134, e); + } + readTemplateContinuation() { + this.match(8) || this.unexpected(null, 8), this.state.pos--, this.readTemplateToken(); + } + readTemplateToken() { + let t = this.input[this.state.pos], { str: e, firstInvalidLoc: s, pos: i, curLine: r, lineStart: n } = jt("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); + this.state.pos = i + 1, this.state.lineStart = n, this.state.curLine = r, s && (this.state.firstInvalidTemplateEscapePos = new R(s.curLine, s.pos - s.lineStart, this.sourceToOffsetPos(s.pos))), this.input.codePointAt(i) === 96 ? this.finishToken(24, s ? null : t + e + "`") : (this.state.pos++, this.finishToken(25, s ? null : t + e + "${")); + } + recordStrictModeErrors(t, e) { + let s = e.index; + this.state.strict && !this.state.strictErrors.has(s) ? this.raise(t, e) : this.state.strictErrors.set(s, [t, e]); + } + readWord1(t) { + this.state.containsEsc = !1; + let e = "", s = this.state.pos, i = this.state.pos; + for (t !== void 0 && (this.state.pos += t <= 65535 ? 1 : 2); this.state.pos < this.length;) { + let r = this.codePointAtPos(this.state.pos); + if (K(r)) this.state.pos += r <= 65535 ? 1 : 2; + else if (r === 92) { + this.state.containsEsc = !0, e += this.input.slice(i, this.state.pos); + let n = this.state.curPosition(), o = this.state.pos === s ? B : K; + if (this.input.charCodeAt(++this.state.pos) !== 117) { + this.raise(p.MissingUnicodeEscape, this.state.curPosition()), i = this.state.pos - 1; + continue; + } + ++this.state.pos; + let h = this.readCodePoint(!0); + h !== null && (o(h) || this.raise(p.EscapedCharNotAnIdentifier, n), e += String.fromCodePoint(h)), i = this.state.pos; + } else break; + } + return e + this.input.slice(i, this.state.pos); + } + readWord(t) { + let e = this.readWord1(t), s = ft.get(e); + s !== void 0 ? this.finishToken(s, z(s)) : this.finishToken(132, e); + } + checkKeywordEscapes() { + let { type: t } = this.state; + Tt(t) && this.state.containsEsc && this.raise(p.InvalidEscapedReservedWord, this.state.startLoc, { reservedWord: z(t) }); + } + raise(t, e, s = {}) { + let r = t(e instanceof R ? e : e.loc.start, s); + if (!(this.optionFlags & 2048)) throw r; + return this.isLookahead || this.state.errors.push(r), r; + } + raiseOverwrite(t, e, s = {}) { + let i = e instanceof R ? e : e.loc.start, r = i.index, n = this.state.errors; + for (let o = n.length - 1; o >= 0; o--) { + let h = n[o]; + if (h.loc.index === r) return n[o] = t(i, s); + if (h.loc.index < r) break; + } + return this.raise(t, e, s); + } + updateContext(t) {} + unexpected(t, e) { + throw this.raise(p.UnexpectedToken, t ?? this.state.startLoc, { expected: e ? z(e) : null }); + } + expectPlugin(t, e) { + if (this.hasPlugin(t)) return !0; + throw this.raise(p.MissingPlugin, e ?? this.state.startLoc, { missingPlugin: [t] }); + } + expectOnePlugin(t) { + if (!t.some((e) => this.hasPlugin(e))) throw this.raise(p.MissingOneOfPlugins, this.state.startLoc, { missingPlugin: t }); + } + errorBuilder(t) { + return (e, s, i) => { + this.raise(t, he(e, s, i)); + }; + } + errorHandlers_readInt = { + invalidDigit: (t, e, s, i) => this.optionFlags & 2048 ? (this.raise(p.InvalidDigit, he(t, e, s), { radix: i }), !0) : !1, + numericSeparatorInEscapeSequence: this.errorBuilder(p.NumericSeparatorInEscapeSequence), + unexpectedNumericSeparator: this.errorBuilder(p.UnexpectedNumericSeparator) + }; + errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { + invalidEscapeSequence: this.errorBuilder(p.InvalidEscapeSequence), + invalidCodePoint: this.errorBuilder(p.InvalidCodePoint) + }); + errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: (t, e, s) => { + this.recordStrictModeErrors(p.StrictNumericEscape, he(t, e, s)); + }, + unterminated: (t, e, s) => { + throw this.raise(p.UnterminatedString, he(t - 1, e, s)); + } + }); + errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: this.errorBuilder(p.StrictNumericEscape), + unterminated: (t, e, s) => { + throw this.raise(p.UnterminatedTemplate, he(t, e, s)); + } + }); + }, it = class { + privateNames = /* @__PURE__ */ new Set(); + loneAccessors = /* @__PURE__ */ new Map(); + undefinedPrivateNames = /* @__PURE__ */ new Map(); + }, rt = class { + parser; + stack = []; + undefinedPrivateNames = /* @__PURE__ */ new Map(); + constructor(t) { + this.parser = t; + } + current() { + return this.stack[this.stack.length - 1]; + } + enter() { + this.stack.push(new it()); + } + exit() { + let t = this.stack.pop(), e = this.current(); + for (let [s, i] of Array.from(t.undefinedPrivateNames)) e ? e.undefinedPrivateNames.has(s) || e.undefinedPrivateNames.set(s, i) : this.parser.raise(p.InvalidPrivateFieldResolution, i, { identifierName: s }); + } + declarePrivateName(t, e, s) { + let { privateNames: i, loneAccessors: r, undefinedPrivateNames: n } = this.current(), o = i.has(t); + if (e & 3) { + let h = o && r.get(t); + if (h) { + let l = h & 4, u = e & 4; + o = (h & 3) === (e & 3) || l !== u, o || r.delete(t); + } else o || r.set(t, e); + } + o && this.parser.raise(p.PrivateNameRedeclaration, s, { identifierName: t }), i.add(t), n.delete(t); + } + usePrivateName(t, e) { + let s; + for (s of this.stack) if (s.privateNames.has(t)) return; + s ? s.undefinedPrivateNames.set(t, e) : this.parser.raise(p.InvalidPrivateFieldResolution, e, { identifierName: t }); + } + }, Z = class { + constructor(t = 0) { + this.type = t; + } + canBeArrowParameterDeclaration() { + return this.type === 2 || this.type === 1; + } + isCertainlyParameterDeclaration() { + return this.type === 3; + } + }, Ce = class extends Z { + declarationErrors = /* @__PURE__ */ new Map(); + constructor(t) { + super(t); + } + recordDeclarationError(t, e) { + let s = e.index; + this.declarationErrors.set(s, [t, e]); + } + clearDeclarationError(t) { + this.declarationErrors.delete(t); + } + iterateErrors(t) { + this.declarationErrors.forEach(t); + } + }, at = class { + parser; + stack = [new Z()]; + constructor(t) { + this.parser = t; + } + enter(t) { + this.stack.push(t); + } + exit() { + this.stack.pop(); + } + recordParameterInitializerError(t, e) { + let s = e.loc.start, { stack: i } = this, r = i.length - 1, n = i[r]; + for (; !n.isCertainlyParameterDeclaration();) { + if (n.canBeArrowParameterDeclaration()) n.recordDeclarationError(t, s); + else return; + n = i[--r]; + } + this.parser.raise(t, s); + } + recordArrowParameterBindingError(t, e) { + let { stack: s } = this, i = s[s.length - 1], r = e.loc.start; + if (i.isCertainlyParameterDeclaration()) this.parser.raise(t, r); + else if (i.canBeArrowParameterDeclaration()) i.recordDeclarationError(t, r); + else return; + } + recordAsyncArrowParametersError(t) { + let { stack: e } = this, s = e.length - 1, i = e[s]; + for (; i.canBeArrowParameterDeclaration();) i.type === 2 && i.recordDeclarationError(p.AwaitBindingIdentifier, t), i = e[--s]; + } + validateAsPattern() { + let { stack: t } = this, e = t[t.length - 1]; + e.canBeArrowParameterDeclaration() && e.iterateErrors(([s, i]) => { + this.parser.raise(s, i); + let r = t.length - 2, n = t[r]; + for (; n.canBeArrowParameterDeclaration();) n.clearDeclarationError(i.index), n = t[--r]; + }); + } + }; + nt = class extends st { + addExtra(t, e, s, i = !0) { + if (!t) return; + let { extra: r } = t; + r ?? (r = {}, t.extra = r), i ? r[e] = s : Object.defineProperty(r, e, { + enumerable: i, + value: s + }); + } + isContextual(t) { + return this.state.type === t && !this.state.containsEsc; + } + isUnparsedContextual(t, e) { + if (this.input.startsWith(e, t)) { + let s = this.input.charCodeAt(t + e.length); + return !(K(s) || (s & 64512) === 55296); + } + return !1; + } + isLookaheadContextual(t) { + let e = this.nextTokenStart(); + return this.isUnparsedContextual(e, t); + } + eatContextual(t) { + return this.isContextual(t) ? (this.next(), !0) : !1; + } + expectContextual(t, e) { + if (!this.eatContextual(t)) { + if (e != null) throw this.raise(e, this.state.startLoc); + this.unexpected(null, t); + } + } + canInsertSemicolon() { + return this.match(140) || this.match(8) || this.hasPrecedingLineBreak(); + } + hasPrecedingLineBreak() { + return Ut(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start); + } + hasFollowingLineBreak() { + return Ut(this.input, this.state.end, this.nextTokenStart()); + } + isLineTerminator() { + return this.eat(13) || this.canInsertSemicolon(); + } + semicolon(t = !0) { + (t ? this.isLineTerminator() : this.eat(13)) || this.raise(p.MissingSemicolon, this.state.lastTokEndLoc); + } + expect(t, e) { + this.eat(t) || this.unexpected(e, t); + } + tryParse(t, e = this.state.clone()) { + let s = { node: null }; + try { + let i = t((r = null) => { + throw s.node = r, s; + }); + if (this.state.errors.length > e.errors.length) { + let r = this.state; + return this.state = e, this.state.tokensLength = r.tokensLength, { + node: i, + error: r.errors[e.errors.length], + thrown: !1, + aborted: !1, + failState: r + }; + } + return { + node: i, + error: null, + thrown: !1, + aborted: !1, + failState: null + }; + } catch (i) { + let r = this.state; + if (this.state = e, i instanceof SyntaxError) return { + node: null, + error: i, + thrown: !0, + aborted: !1, + failState: r + }; + if (i === s) return { + node: s.node, + error: null, + thrown: !1, + aborted: !0, + failState: r + }; + throw i; + } + } + checkExpressionErrors(t, e) { + if (!t) return !1; + let { shorthandAssignLoc: s, doubleProtoLoc: i, privateKeyLoc: r, optionalParametersLoc: n, voidPatternLoc: o } = t, h = !!s || !!i || !!n || !!r || !!o; + if (!e) return h; + s != null && this.raise(p.InvalidCoverInitializedName, s), i != null && this.raise(p.DuplicateProto, i), r != null && this.raise(p.UnexpectedPrivateField, r), n != null && this.unexpected(n), o != null && this.raise(p.InvalidCoverDiscardElement, o); + } + isLiteralPropertyName() { + return Jt(this.state.type); + } + isPrivateName(t) { + return t.type === "PrivateName"; + } + getPrivateNameSV(t) { + return t.id.name; + } + hasPropertyAsPrivateName(t) { + return (t.type === "MemberExpression" || t.type === "OptionalMemberExpression") && this.isPrivateName(t.property); + } + isObjectProperty(t) { + return t.type === "ObjectProperty"; + } + isObjectMethod(t) { + return t.type === "ObjectMethod"; + } + initializeScopes(t = this.options.sourceType === "module") { + let e = this.state.labels; + this.state.labels = []; + let s = this.exportedIdentifiers; + this.exportedIdentifiers = /* @__PURE__ */ new Set(); + let i = this.inModule; + this.inModule = t; + let r = this.scope, n = this.getScopeHandler(); + this.scope = new n(this, t); + let o = this.prodParam; + this.prodParam = new Xe(); + let h = this.classScope; + this.classScope = new rt(this); + let l = this.expressionScope; + return this.expressionScope = new at(this), () => { + this.state.labels = e, this.exportedIdentifiers = s, this.inModule = i, this.scope = r, this.prodParam = o, this.classScope = h, this.expressionScope = l; + }; + } + enterInitialScopes() { + let t = 0; + (this.inModule || this.optionFlags & 1) && (t |= 2), this.optionFlags & 32 && (t |= 1); + let e = !this.inModule && this.options.sourceType === "commonjs"; + (e || this.optionFlags & 2) && (t |= 4), this.prodParam.enter(t); + let s = e ? 514 : 1; + this.optionFlags & 4 && (s |= 512), this.optionFlags & 16 && (s |= 48), this.scope.enter(s); + } + checkDestructuringPrivate(t) { + let { privateKeyLoc: e } = t; + e !== null && this.expectPlugin("destructuringPrivate", e); + } + }, Y = class { + shorthandAssignLoc = null; + doubleProtoLoc = null; + privateKeyLoc = null; + optionalParametersLoc = null; + voidPatternLoc = null; + }, de = class { + constructor(t, e, s) { + this.start = e, this.end = 0, this.loc = new Q(s), t?.optionFlags & 128 && (this.range = [e, 0]), t?.filename && (this.loc.filename = t.filename); + } + type = ""; + }, Vt = de.prototype, ot = class extends nt { + startNode() { + let t = this.state.startLoc; + return new de(this, t.index, t); + } + startNodeAt(t) { + return new de(this, t.index, t); + } + startNodeAtNode(t) { + return this.startNodeAt(t.loc.start); + } + finishNode(t, e) { + return this.finishNodeAt(t, e, this.state.lastTokEndLoc); + } + finishNodeAt(t, e, s) { + return t.type = e, t.end = s.index, t.loc.end = s, this.optionFlags & 128 && (t.range[1] = s.index), this.optionFlags & 4096 && this.processComment(t), t; + } + resetStartLocation(t, e) { + t.start = e.index, t.loc.start = e, this.optionFlags & 128 && (t.range[0] = e.index); + } + resetEndLocation(t, e = this.state.lastTokEndLoc) { + t.end = e.index, t.loc.end = e, this.optionFlags & 128 && (t.range[1] = e.index); + } + resetStartLocationFromNode(t, e) { + this.resetStartLocation(t, e.loc.start); + } + castNodeTo(t, e) { + return t.type = e, t; + } + cloneIdentifier(t) { + let { type: e, start: s, end: i, loc: r, range: n, name: o } = t, h = Object.create(Vt); + return h.type = e, h.start = s, h.end = i, h.loc = r, h.range = n, h.name = o, t.extra && (h.extra = t.extra), h; + } + cloneStringLiteral(t) { + let { type: e, start: s, end: i, loc: r, range: n, extra: o } = t, h = Object.create(Vt); + return h.type = e, h.start = s, h.end = i, h.loc = r, h.range = n, h.extra = o, h.value = t.value, h; + } + }, ht = (a) => a.type === "ParenthesizedExpression" ? ht(a.expression) : a, ct = class extends ot { + toAssignable(t, e = !1) { + let s; + switch ((t.type === "ParenthesizedExpression" || t.extra?.parenthesized) && (s = ht(t), e ? s.type === "Identifier" ? this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment, t) : s.type !== "CallExpression" && s.type !== "MemberExpression" && !this.isOptionalMemberExpression(s) && this.raise(p.InvalidParenthesizedAssignment, t) : this.raise(p.InvalidParenthesizedAssignment, t)), t.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + case "VoidPattern": break; + case "ObjectExpression": + this.castNodeTo(t, "ObjectPattern"); + for (let i = 0, r = t.properties.length, n = r - 1; i < r; i++) { + let o = t.properties[i], h = i === n; + this.toAssignableObjectExpressionProp(o, h, e), h && o.type === "RestElement" && t.extra?.trailingCommaLoc && this.raise(p.RestTrailingComma, t.extra.trailingCommaLoc); + } + break; + case "ObjectProperty": { + let { key: i, value: r } = t; + this.isPrivateName(i) && this.classScope.usePrivateName(this.getPrivateNameSV(i), i.loc.start), this.toAssignable(r, e); + break; + } + case "SpreadElement": throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller."); + case "ArrayExpression": + this.castNodeTo(t, "ArrayPattern"), this.toAssignableList(t.elements, t.extra?.trailingCommaLoc, e); + break; + case "AssignmentExpression": + t.operator !== "=" && this.raise(p.MissingEqInAssignment, t.left.loc.end), this.castNodeTo(t, "AssignmentPattern"), delete t.operator, t.left.type === "VoidPattern" && this.raise(p.VoidPatternInitializer, t.left), this.toAssignable(t.left, e); + break; + case "ParenthesizedExpression": + this.toAssignable(s, e); + break; + } + } + toAssignableObjectExpressionProp(t, e, s) { + if (t.type === "ObjectMethod") this.raise(t.kind === "get" || t.kind === "set" ? p.PatternHasAccessor : p.PatternHasMethod, t.key); + else if (t.type === "SpreadElement") { + this.castNodeTo(t, "RestElement"); + let i = t.argument; + this.checkToRestConversion(i, !1), this.toAssignable(i, s), e || this.raise(p.RestTrailingComma, t); + } else this.toAssignable(t, s); + } + toAssignableList(t, e, s) { + let i = t.length - 1; + for (let r = 0; r <= i; r++) { + let n = t[r]; + n && (this.toAssignableListItem(t, r, s), n.type === "RestElement" && (r < i ? this.raise(p.RestTrailingComma, n) : e && this.raise(p.RestTrailingComma, e))); + } + } + toAssignableListItem(t, e, s) { + let i = t[e]; + if (i.type === "SpreadElement") { + this.castNodeTo(i, "RestElement"); + let r = i.argument; + this.checkToRestConversion(r, !0), this.toAssignable(r, s); + } else this.toAssignable(i, s); + } + isAssignable(t, e) { + switch (t.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + case "VoidPattern": return !0; + case "ObjectExpression": { + let s = t.properties.length - 1; + return t.properties.every((i, r) => i.type !== "ObjectMethod" && (r === s || i.type !== "SpreadElement") && this.isAssignable(i)); + } + case "ObjectProperty": return this.isAssignable(t.value); + case "SpreadElement": return this.isAssignable(t.argument); + case "ArrayExpression": return t.elements.every((s) => s === null || this.isAssignable(s)); + case "AssignmentExpression": return t.operator === "="; + case "ParenthesizedExpression": return this.isAssignable(t.expression); + case "MemberExpression": + case "OptionalMemberExpression": return !e; + default: return !1; + } + } + toReferencedList(t, e) { + return t; + } + toReferencedListDeep(t, e) { + this.toReferencedList(t, e); + for (let s of t) s?.type === "ArrayExpression" && this.toReferencedListDeep(s.elements); + } + parseSpread(t) { + let e = this.startNode(); + return this.next(), e.argument = this.parseMaybeAssignAllowIn(t, void 0), this.finishNode(e, "SpreadElement"); + } + parseRestBinding() { + let t = this.startNode(); + this.next(); + let e = this.parseBindingAtom(); + return e.type === "VoidPattern" && this.raise(p.UnexpectedVoidPattern, e), t.argument = e, this.finishNode(t, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 0: { + let t = this.startNode(); + return this.next(), t.elements = this.parseBindingList(3, 93, 1), this.finishNode(t, "ArrayPattern"); + } + case 5: return this.parseObjectLike(8, !0); + case 88: return this.parseVoidPattern(null); + } + return this.parseIdentifier(); + } + parseBindingList(t, e, s) { + let i = s & 1, r = [], n = !0; + for (; !this.eat(t);) if (n ? n = !1 : this.expect(12), i && this.match(12)) r.push(null); + else { + if (this.eat(t)) break; + if (this.match(21)) { + let o = this.parseRestBinding(); + if (s & 2 && (o = this.parseFunctionParamType(o)), r.push(o), !this.checkCommaAfterRest(e)) { + this.expect(t); + break; + } + } else { + let o = []; + if (s & 2) for (this.match(26) && this.hasPlugin("decorators") && this.raise(p.UnsupportedParameterDecorator, this.state.startLoc); this.match(26);) o.push(this.parseDecorator()); + r.push(this.parseBindingElement(s, o)); + } + } + return r; + } + parseBindingRestProperty(t) { + return this.next(), this.hasPlugin("discardBinding") && this.match(88) ? (t.argument = this.parseVoidPattern(null), this.raise(p.UnexpectedVoidPattern, t.argument)) : t.argument = this.parseIdentifier(), this.checkCommaAfterRest(125), this.finishNode(t, "RestElement"); + } + parseBindingProperty() { + let { type: t, startLoc: e } = this.state; + if (t === 21) return this.parseBindingRestProperty(this.startNode()); + let s = this.startNode(); + return t === 139 ? (this.expectPlugin("destructuringPrivate", e), this.classScope.usePrivateName(this.state.value, e), s.key = this.parsePrivateName()) : this.parsePropertyName(s), s.method = !1, this.parseObjPropValue(s, e, !1, !1, !0, !1); + } + parseBindingElement(t, e) { + let s = this.parseMaybeDefault(); + return t & 2 && this.parseFunctionParamType(s), e.length && (s.decorators = e, this.resetStartLocationFromNode(s, e[0])), this.parseMaybeDefault(s.loc.start, s); + } + parseFunctionParamType(t) { + return t; + } + parseMaybeDefault(t, e) { + if (t ?? (t = this.state.startLoc), e = e ?? this.parseBindingAtom(), !this.eat(29)) return e; + let s = this.startNodeAt(t); + return e.type === "VoidPattern" && this.raise(p.VoidPatternInitializer, e), s.left = e, s.right = this.parseMaybeAssignAllowIn(), this.finishNode(s, "AssignmentPattern"); + } + isValidLVal(t, e, s, i) { + switch (t) { + case "AssignmentPattern": return "left"; + case "RestElement": return "argument"; + case "ObjectProperty": return "value"; + case "ParenthesizedExpression": return "expression"; + case "ArrayPattern": return "elements"; + case "ObjectPattern": return "properties"; + case "VoidPattern": return !0; + case "CallExpression": if (!e && !this.state.strict && this.optionFlags & 8192) return !0; + } + return !1; + } + isOptionalMemberExpression(t) { + return t.type === "OptionalMemberExpression"; + } + checkLVal(t, e, s = 64, i = !1, r = !1, n = !1, o = !1) { + let h = t.type; + if (this.isObjectMethod(t)) return; + let l = this.isOptionalMemberExpression(t); + if (l || h === "MemberExpression") { + l && (this.expectPlugin("optionalChainingAssign", t.loc.start), e.type !== "AssignmentExpression" && this.raise(p.InvalidLhsOptionalChaining, t, { ancestor: e })), s !== 64 && this.raise(p.InvalidPropertyBindingPattern, t); + return; + } + if (h === "Identifier") { + this.checkIdentifier(t, s, r); + let { name: N } = t; + i && (i.has(N) ? this.raise(p.ParamDupe, t) : i.add(N)); + return; + } else h === "VoidPattern" && e.type === "CatchClause" && this.raise(p.VoidPatternCatchClauseParam, t); + let u = ht(t); + o || (o = u.type === "CallExpression" && (u.callee.type === "Import" || u.callee.type === "Super")); + let f = this.isValidLVal(h, o, !(n || t.extra?.parenthesized) && e.type === "AssignmentExpression", s); + if (f === !0) return; + if (f === !1) { + let N = s === 64 ? p.InvalidLhs : p.InvalidLhsBinding; + this.raise(N, t, { ancestor: e }); + return; + } + let d, x; + typeof f == "string" ? (d = f, x = h === "ParenthesizedExpression") : [d, x] = f; + let A = h === "ArrayPattern" || h === "ObjectPattern" ? { type: h } : e, k = t[d]; + if (Array.isArray(k)) for (let N of k) N && this.checkLVal(N, A, s, i, r, x, !0); + else k && this.checkLVal(k, A, s, i, r, x, o); + } + checkIdentifier(t, e, s = !1) { + this.state.strict && (s ? ts(t.name, this.inModule) : es(t.name)) && (e === 64 ? this.raise(p.StrictEvalArguments, t, { referenceName: t.name }) : this.raise(p.StrictEvalArgumentsBinding, t, { bindingName: t.name })), e & 8192 && t.name === "let" && this.raise(p.LetInLexicalBinding, t), e & 64 || this.declareNameFromIdentifier(t, e); + } + declareNameFromIdentifier(t, e) { + this.scope.declareName(t.name, e, t.loc.start); + } + checkToRestConversion(t, e) { + switch (t.type) { + case "ParenthesizedExpression": + this.checkToRestConversion(t.expression, e); + break; + case "Identifier": + case "MemberExpression": break; + case "ArrayExpression": + case "ObjectExpression": if (e) break; + default: this.raise(p.InvalidRestAssignmentPattern, t); + } + } + checkCommaAfterRest(t) { + return this.match(12) ? (this.raise(this.lookaheadCharCode() === t ? p.RestTrailingComma : p.ElementAfterRest, this.state.startLoc), !0) : !1; + } + }, Ve = /in(?:stanceof)?|as|satisfies/y; + y = F`typescript`({ + AbstractMethodHasImplementation: ({ methodName: a }) => `Method '${a}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ propertyName: a }) => `Property '${a}' cannot have an initializer because it is marked abstract.`, + AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", + AccessorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccessorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ kind: a }) => `'declare' is not allowed in ${a}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ({ modifier: a }) => `Accessibility modifier already seen: '${a}'.`, + DuplicateModifier: ({ modifier: a }) => `Duplicate modifier: '${a}'.`, + EmptyHeritageClauseType: ({ token: a }) => `'${a}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", + IncompatibleModifiers: ({ modifiers: a }) => `'${a[0]}' modifier cannot be used with '${a[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ modifier: a }) => `Index signatures cannot have an accessibility modifier ('${a}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidHeritageClauseType: ({ token: a }) => `'${a}' list can only include identifiers or qualified-names with optional type arguments.`, + InvalidModifierOnAwaitUsingDeclaration: (a) => `'${a}' modifier cannot appear on an await using declaration.`, + InvalidModifierOnTypeMember: ({ modifier: a }) => `'${a}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ modifier: a }) => `'${a}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ modifier: a }) => `'${a}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifierOnUsingDeclaration: (a) => `'${a}' modifier cannot appear on a using declaration.`, + InvalidModifiersOrder: ({ orderedModifiers: a }) => `'${a[0]}' modifier must precede '${a[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifier: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ modifier: a }) => `Private elements cannot have an accessibility modifier ('${a}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccessorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccessorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccessorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ typeParameterName: a }) => `Single type parameter ${a} should have a trailing comma. Example usage: <${a},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TupleOptionalAfterType: "A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ type: a }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${a}.`, + UsingDeclarationInAmbientContext: (a) => `'${a}' declarations are not allowed in ambient contexts.` + }); + Ji = (a) => class extends a { + getScopeHandler() { + return Ge; + } + tsIsIdentifier() { + return w(this.state.type); + } + tsTokenCanFollowModifier() { + return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName(); + } + tsNextTokenOnSameLineAndCanFollowModifier() { + return this.next(), this.hasPrecedingLineBreak() ? !1 : this.tsTokenCanFollowModifier(); + } + tsNextTokenCanFollowModifier() { + return this.match(106) ? (this.next(), this.tsTokenCanFollowModifier()) : this.tsNextTokenOnSameLineAndCanFollowModifier(); + } + tsParseModifier(e, s, i) { + if (!w(this.state.type) && this.state.type !== 58 && this.state.type !== 75) return; + let r = this.state.value; + if (e.includes(r)) { + if (i && this.match(106) || s && this.tsIsStartOfStaticBlocks()) return; + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return r; + } + } + tsParseModifiers({ allowedModifiers: e, disallowedModifiers: s, stopOnStartOfClassStaticBlock: i, errorTemplate: r = y.InvalidModifierOnTypeMember }, n) { + let o = (l, u, f, d) => { + u === f && n[d] && this.raise(y.InvalidModifiersOrder, l, { orderedModifiers: [f, d] }); + }, h = (l, u, f, d) => { + (n[f] && u === d || n[d] && u === f) && this.raise(y.IncompatibleModifiers, l, { modifiers: [f, d] }); + }; + for (;;) { + let { startLoc: l } = this.state, u = this.tsParseModifier(e.concat(s ?? []), i, n.static); + if (!u) break; + qt(u) ? n.accessibility ? this.raise(y.DuplicateAccessibilityModifier, l, { modifier: u }) : (o(l, u, u, "override"), o(l, u, u, "static"), o(l, u, u, "readonly"), n.accessibility = u) : Wi(u) ? (n[u] && this.raise(y.DuplicateModifier, l, { modifier: u }), n[u] = !0, o(l, u, "in", "out")) : (Object.prototype.hasOwnProperty.call(n, u) ? this.raise(y.DuplicateModifier, l, { modifier: u }) : (o(l, u, "static", "readonly"), o(l, u, "static", "override"), o(l, u, "override", "readonly"), o(l, u, "abstract", "override"), h(l, u, "declare", "override"), h(l, u, "static", "abstract")), n[u] = !0), s?.includes(u) && this.raise(r, l, { modifier: u }); + } + } + tsIsListTerminator(e) { + switch (e) { + case "EnumMembers": + case "TypeMembers": return this.match(8); + case "HeritageClauseElement": return this.match(5); + case "TupleElementTypes": return this.match(3); + case "TypeParametersOrArguments": return this.match(48); + } + } + tsParseList(e, s) { + let i = []; + for (; !this.tsIsListTerminator(e);) i.push(s()); + return i; + } + tsParseDelimitedList(e, s, i) { + return Ki(this.tsParseDelimitedListWorker(e, s, !0, i)); + } + tsParseDelimitedListWorker(e, s, i, r) { + let n = [], o = -1; + for (; !this.tsIsListTerminator(e);) { + o = -1; + let h = s(); + if (h == null) return; + if (n.push(h), this.eat(12)) { + o = this.state.lastTokStartLoc.index; + continue; + } + if (this.tsIsListTerminator(e)) break; + i && this.expect(12); + return; + } + return r && (r.value = o), n; + } + tsParseBracketedList(e, s, i, r, n) { + r || (i ? this.expect(0) : this.expect(47)); + let o = this.tsParseDelimitedList(e, s, n); + return i ? this.expect(3) : this.expect(48), o; + } + tsParseImportType() { + let e = this.startNode(); + return this.expect(83), this.expect(10), this.match(134) ? e.argument = this.tsParseLiteralTypeNode() : (this.raise(y.UnsupportedImportTypeArgument, this.state.startLoc), e.argument = this.tsParseNonConditionalType()), this.eat(12) ? e.options = this.tsParseImportTypeOptions() : e.options = null, this.expect(11), this.eat(16) && (e.qualifier = this.tsParseEntityName(3)), this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSImportType"); + } + tsParseImportTypeOptions() { + let e = this.startNode(); + this.expect(5); + let s = this.startNode(); + return this.isContextual(76) ? (s.method = !1, s.key = this.parseIdentifier(!0), s.computed = !1, s.shorthand = !1) : this.unexpected(null, 76), this.expect(14), s.value = this.tsParseImportTypeWithPropertyValue(), e.properties = [this.finishObjectProperty(s)], this.eat(12), this.expect(8), this.finishNode(e, "ObjectExpression"); + } + tsParseImportTypeWithPropertyValue() { + let e = this.startNode(), s = []; + for (this.expect(5); !this.match(8);) { + let i = this.state.type; + w(i) || i === 134 ? s.push(super.parsePropertyDefinition(null)) : this.unexpected(), this.eat(12); + } + return e.properties = s, this.next(), this.finishNode(e, "ObjectExpression"); + } + tsParseEntityName(e) { + let s; + if (e & 1 && this.match(78)) if (e & 2) s = this.parseIdentifier(!0); + else { + let i = this.startNode(); + this.next(), s = this.finishNode(i, "ThisExpression"); + } + else s = this.parseIdentifier(!!(e & 1)); + for (; this.eat(16);) { + let i = this.startNodeAtNode(s); + i.left = s, i.right = this.parseIdentifier(!!(e & 1)), s = this.finishNode(i, "TSQualifiedName"); + } + return s; + } + tsParseTypeReference() { + let e = this.startNode(); + return e.typeName = this.tsParseEntityName(1), !this.hasPrecedingLineBreak() && this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeReference"); + } + tsParseThisTypePredicate(e) { + this.next(); + let s = this.startNodeAtNode(e); + return s.parameterName = e, s.typeAnnotation = this.tsParseTypeAnnotation(!1), s.asserts = !1, this.finishNode(s, "TSTypePredicate"); + } + tsParseThisTypeNode() { + let e = this.startNode(); + return this.next(), this.finishNode(e, "TSThisType"); + } + tsParseTypeQuery() { + let e = this.startNode(); + return this.expect(87), this.match(83) ? e.exprName = this.tsParseImportType() : e.exprName = this.tsParseEntityName(1), !this.hasPrecedingLineBreak() && this.match(47) && (e.typeArguments = this.tsParseTypeArguments()), this.finishNode(e, "TSTypeQuery"); + } + tsParseInOutModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out"], + disallowedModifiers: [ + "const", + "public", + "private", + "protected", + "readonly", + "declare", + "abstract", + "override" + ], + errorTemplate: y.InvalidModifierOnTypeParameter + }); + tsParseConstModifier = this.tsParseModifiers.bind(this, { + allowedModifiers: ["const"], + disallowedModifiers: ["in", "out"], + errorTemplate: y.InvalidModifierOnTypeParameterPositions + }); + tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: [ + "in", + "out", + "const" + ], + disallowedModifiers: [ + "public", + "private", + "protected", + "readonly", + "declare", + "abstract", + "override" + ], + errorTemplate: y.InvalidModifierOnTypeParameter + }); + tsParseTypeParameter(e) { + let s = this.startNode(); + return e(s), s.name = this.tsParseTypeParameterName(), s.constraint = this.tsEatThenParseType(81), s.default = this.tsEatThenParseType(29), this.finishNode(s, "TSTypeParameter"); + } + tsTryParseTypeParameters(e) { + if (this.match(47)) return this.tsParseTypeParameters(e); + } + tsParseTypeParameters(e) { + let s = this.startNode(); + this.match(47) || this.match(143) ? this.next() : this.unexpected(); + let i = { value: -1 }; + return s.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, e), !1, !0, i), s.params.length === 0 && this.raise(y.EmptyTypeParameters, s), i.value !== -1 && this.addExtra(s, "trailingComma", i.value), this.finishNode(s, "TSTypeParameterDeclaration"); + } + tsFillSignature(e, s) { + let i = e === 19, r = "params", n = "returnType"; + s.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier), this.expect(10), s[r] = this.tsParseBindingListForSignature(), i ? s[n] = this.tsParseTypeOrTypePredicateAnnotation(e) : this.match(e) && (s[n] = this.tsParseTypeOrTypePredicateAnnotation(e)); + } + tsParseBindingListForSignature() { + let e = super.parseBindingList(11, 41, 2); + for (let s of e) { + let { type: i } = s; + (i === "AssignmentPattern" || i === "TSParameterProperty") && this.raise(y.UnsupportedSignatureParameterKind, s, { type: i }); + } + return e; + } + tsParseTypeMemberSemicolon() { + !this.eat(12) && !this.isLineTerminator() && this.expect(13); + } + tsParseSignatureMember(e, s) { + return this.tsFillSignature(14, s), this.tsParseTypeMemberSemicolon(), this.finishNode(s, e); + } + tsIsUnambiguouslyIndexSignature() { + return this.next(), w(this.state.type) ? (this.next(), this.match(14)) : !1; + } + tsTryParseIndexSignature(e) { + if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) return; + this.expect(0); + let s = this.parseIdentifier(); + s.typeAnnotation = this.tsParseTypeAnnotation(), this.resetEndLocation(s), this.expect(3), e.parameters = [s]; + let i = this.tsTryParseTypeAnnotation(); + return i && (e.typeAnnotation = i), this.tsParseTypeMemberSemicolon(), this.finishNode(e, "TSIndexSignature"); + } + tsParsePropertyOrMethodSignature(e, s) { + if (this.eat(17) && (e.optional = !0), this.match(10) || this.match(47)) { + s && this.raise(y.ReadonlyForMethodSignature, e); + let i = e; + i.kind && this.match(47) && this.raise(y.AccessorCannotHaveTypeParameters, this.state.curPosition()), this.tsFillSignature(14, i), this.tsParseTypeMemberSemicolon(); + let r = "params", n = "returnType"; + if (i.kind === "get") i[r].length > 0 && (this.raise(p.BadGetterArity, this.state.curPosition()), this.isThisParam(i[r][0]) && this.raise(y.AccessorCannotDeclareThisParameter, this.state.curPosition())); + else if (i.kind === "set") { + if (i[r].length !== 1) this.raise(p.BadSetterArity, this.state.curPosition()); + else { + let o = i[r][0]; + this.isThisParam(o) && this.raise(y.AccessorCannotDeclareThisParameter, this.state.curPosition()), o.type === "Identifier" && o.optional && this.raise(y.SetAccessorCannotHaveOptionalParameter, this.state.curPosition()), o.type === "RestElement" && this.raise(y.SetAccessorCannotHaveRestParameter, this.state.curPosition()); + } + i[n] && this.raise(y.SetAccessorCannotHaveReturnType, i[n]); + } else i.kind = "method"; + return this.finishNode(i, "TSMethodSignature"); + } else { + let i = e; + s && (i.readonly = !0); + let r = this.tsTryParseTypeAnnotation(); + return r && (i.typeAnnotation = r), this.tsParseTypeMemberSemicolon(), this.finishNode(i, "TSPropertySignature"); + } + } + tsParseTypeMember() { + let e = this.startNode(); + if (this.match(10) || this.match(47)) return this.tsParseSignatureMember("TSCallSignatureDeclaration", e); + if (this.match(77)) { + let i = this.startNode(); + return this.next(), this.match(10) || this.match(47) ? this.tsParseSignatureMember("TSConstructSignatureDeclaration", e) : (e.key = this.createIdentifier(i, "new"), this.tsParsePropertyOrMethodSignature(e, !1)); + } + this.tsParseModifiers({ + allowedModifiers: ["readonly"], + disallowedModifiers: [ + "declare", + "abstract", + "private", + "protected", + "public", + "static", + "override" + ] + }, e); + return this.tsTryParseIndexSignature(e) || (super.parsePropertyName(e), !e.computed && e.key.type === "Identifier" && (e.key.name === "get" || e.key.name === "set") && this.tsTokenCanFollowModifier() && (e.kind = e.key.name, super.parsePropertyName(e), !this.match(10) && !this.match(47) && this.unexpected(null, 10)), this.tsParsePropertyOrMethodSignature(e, !!e.readonly)); + } + tsParseTypeLiteral() { + let e = this.startNode(); + return e.members = this.tsParseObjectTypeMembers(), this.finishNode(e, "TSTypeLiteral"); + } + tsParseObjectTypeMembers() { + this.expect(5); + let e = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + return this.expect(8), e; + } + tsIsStartOfMappedType() { + return this.next(), this.eat(53) ? this.isContextual(122) : (this.isContextual(122) && this.next(), !this.match(0) || (this.next(), !this.tsIsIdentifier()) ? !1 : (this.next(), this.match(58))); + } + tsParseMappedType() { + let e = this.startNode(); + return this.expect(5), this.match(53) ? (e.readonly = this.state.value, this.next(), this.expectContextual(122)) : this.eatContextual(122) && (e.readonly = !0), this.expect(0), e.key = this.tsParseTypeParameterName(), e.constraint = this.tsExpectThenParseType(58), e.nameType = this.eatContextual(93) ? this.tsParseType() : null, this.expect(3), this.match(53) ? (e.optional = this.state.value, this.next(), this.expect(17)) : this.eat(17) && (e.optional = !0), e.typeAnnotation = this.tsTryParseType(), this.semicolon(), this.expect(8), this.finishNode(e, "TSMappedType"); + } + tsParseTupleType() { + let e = this.startNode(); + e.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), !0, !1); + let s = !1; + return e.elementTypes.forEach((i) => { + let { type: r } = i; + s && r !== "TSRestType" && r !== "TSOptionalType" && !(r === "TSNamedTupleMember" && i.optional) && this.raise(y.OptionalTypeBeforeRequired, i), s || (s = r === "TSNamedTupleMember" && i.optional || r === "TSOptionalType"); + }), this.finishNode(e, "TSTupleType"); + } + tsParseTupleElementType() { + let e = this.state.startLoc, s = this.eat(21), { startLoc: i } = this.state, r, n, o, h, u = O(this.state.type) ? this.lookaheadCharCode() : null; + if (u === 58) r = !0, o = !1, n = this.parseIdentifier(!0), this.expect(14), h = this.tsParseType(); + else if (u === 63) { + o = !0; + let f = this.state.value, d = this.tsParseNonArrayType(); + this.lookaheadCharCode() === 58 ? (r = !0, n = this.createIdentifier(this.startNodeAt(i), f), this.expect(17), this.expect(14), h = this.tsParseType()) : (r = !1, h = d, this.expect(17)); + } else h = this.tsParseType(), o = this.eat(17), r = this.eat(14); + if (r) { + let f; + n ? (f = this.startNodeAt(i), f.optional = o, f.label = n, f.elementType = h, this.eat(17) && (f.optional = !0, this.raise(y.TupleOptionalAfterType, this.state.lastTokStartLoc))) : (f = this.startNodeAt(i), f.optional = o, this.raise(y.InvalidTupleMemberLabel, h), f.label = h, f.elementType = this.tsParseType()), h = this.finishNode(f, "TSNamedTupleMember"); + } else if (o) { + let f = this.startNodeAt(i); + f.typeAnnotation = h, h = this.finishNode(f, "TSOptionalType"); + } + if (s) { + let f = this.startNodeAt(e); + f.typeAnnotation = h, h = this.finishNode(f, "TSRestType"); + } + return h; + } + tsParseParenthesizedType() { + let e = this.startNode(); + return this.expect(10), e.typeAnnotation = this.tsParseType(), this.expect(11), this.finishNode(e, "TSParenthesizedType"); + } + tsParseFunctionOrConstructorType(e, s) { + let i = this.startNode(); + return e === "TSConstructorType" && (i.abstract = !!s, s && this.next(), this.next()), this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, i)), this.finishNode(i, e); + } + tsParseLiteralTypeNode() { + let e = this.startNode(); + switch (this.state.type) { + case 135: + case 136: + case 134: + case 85: + case 86: + e.literal = super.parseExprAtom(); + break; + default: this.unexpected(); + } + return this.finishNode(e, "TSLiteralType"); + } + tsParseTemplateLiteralType() { + { + let e = this.state.startLoc, s = this.parseTemplateElement(!1), i = [s]; + if (s.tail) { + let r = this.startNodeAt(e), n = this.startNodeAt(e); + return n.expressions = [], n.quasis = i, r.literal = this.finishNode(n, "TemplateLiteral"), this.finishNode(r, "TSLiteralType"); + } else { + let r = []; + for (; !s.tail;) r.push(this.tsParseType()), this.readTemplateContinuation(), i.push(s = this.parseTemplateElement(!1)); + let n = this.startNodeAt(e); + return n.types = r, n.quasis = i, this.finishNode(n, "TSTemplateLiteralType"); + } + } + } + parseTemplateSubstitution() { + return this.state.inType ? this.tsParseType() : super.parseTemplateSubstitution(); + } + tsParseThisTypeOrThisTypePredicate() { + let e = this.tsParseThisTypeNode(); + return this.isContextual(116) && !this.hasPrecedingLineBreak() ? this.tsParseThisTypePredicate(e) : e; + } + tsParseNonArrayType() { + switch (this.state.type) { + case 134: + case 135: + case 136: + case 85: + case 86: return this.tsParseLiteralTypeNode(); + case 53: + if (this.state.value === "-") { + let e = this.startNode(), s = this.lookahead(); + return s.type !== 135 && s.type !== 136 && this.unexpected(), e.literal = this.parseMaybeUnary(), this.finishNode(e, "TSLiteralType"); + } + break; + case 78: return this.tsParseThisTypeOrThisTypePredicate(); + case 87: return this.tsParseTypeQuery(); + case 83: return this.tsParseImportType(); + case 5: return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case 0: return this.tsParseTupleType(); + case 10: + if (!(this.optionFlags & 1024)) { + let e = this.state.startLoc; + this.next(); + let s = this.tsParseType(); + return this.expect(11), this.addExtra(s, "parenthesized", !0), this.addExtra(s, "parenStart", e.index), s; + } + return this.tsParseParenthesizedType(); + case 25: + case 24: return this.tsParseTemplateLiteralType(); + default: { + let { type: e } = this.state; + if (w(e) || e === 88 || e === 84) { + let s = e === 88 ? "TSVoidKeyword" : e === 84 ? "TSNullKeyword" : Hi(this.state.value); + if (s !== void 0 && this.lookaheadCharCode() !== 46) { + let i = this.startNode(); + return this.next(), this.finishNode(i, s); + } + return this.tsParseTypeReference(); + } + } + } + throw this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let { startLoc: e } = this.state, s = this.tsParseNonArrayType(); + for (; !this.hasPrecedingLineBreak() && this.eat(0);) if (this.match(3)) { + let i = this.startNodeAt(e); + i.elementType = s, this.expect(3), s = this.finishNode(i, "TSArrayType"); + } else { + let i = this.startNodeAt(e); + i.objectType = s, i.indexType = this.tsParseType(), this.expect(3), s = this.finishNode(i, "TSIndexedAccessType"); + } + return s; + } + tsParseTypeOperator() { + let e = this.startNode(), s = this.state.value; + return this.next(), e.operator = s, e.typeAnnotation = this.tsParseTypeOperatorOrHigher(), s === "readonly" && this.tsCheckTypeAnnotationForReadOnly(e), this.finishNode(e, "TSTypeOperator"); + } + tsCheckTypeAnnotationForReadOnly(e) { + switch (e.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": return; + default: this.raise(y.UnexpectedReadonly, e); + } + } + tsParseInferType() { + let e = this.startNode(); + this.expectContextual(115); + let s = this.startNode(); + return s.name = this.tsParseTypeParameterName(), s.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()), e.typeParameter = this.finishNode(s, "TSTypeParameter"), this.finishNode(e, "TSInferType"); + } + tsParseConstraintForInferType() { + if (this.eat(81)) { + let e = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.state.inDisallowConditionalTypesContext || !this.match(17)) return e; + } + } + tsParseTypeOperatorOrHigher() { + return mi(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseUnionOrIntersectionType(e, s, i) { + let r = this.startNode(), n = this.eat(i), o = []; + do + o.push(s()); + while (this.eat(i)); + return o.length === 1 && !n ? o[0] : (r.types = o, this.finishNode(r, e)); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); + } + tsIsStartOfFunctionType() { + return this.match(47) ? !0 : this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsSkipParameterStart() { + if (w(this.state.type) || this.match(78)) return this.next(), !0; + if (this.match(5)) { + let { errors: e } = this.state, s = e.length; + try { + return this.parseObjectLike(8, !0), e.length === s; + } catch { + return !1; + } + } + if (this.match(0)) { + this.next(); + let { errors: e } = this.state, s = e.length; + try { + return super.parseBindingList(3, 93, 1), e.length === s; + } catch { + return !1; + } + } + return !1; + } + tsIsUnambiguouslyStartOfFunctionType() { + return this.next(), !!(this.match(11) || this.match(21) || this.tsSkipParameterStart() && (this.match(14) || this.match(12) || this.match(17) || this.match(29) || this.match(11) && (this.next(), this.match(19)))); + } + tsParseTypeOrTypePredicateAnnotation(e) { + return this.tsInType(() => { + let s = this.startNode(); + this.expect(e); + let i = this.startNode(), r = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (r && this.match(78)) { + let h = this.tsParseThisTypeOrThisTypePredicate(); + return h.type === "TSThisType" ? (i.parameterName = h, i.asserts = !0, i.typeAnnotation = null, h = this.finishNode(i, "TSTypePredicate")) : (this.resetStartLocationFromNode(h, i), h.asserts = !0), s.typeAnnotation = h, this.finishNode(s, "TSTypeAnnotation"); + } + let n = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!n) return r ? (i.parameterName = this.parseIdentifier(), i.asserts = r, i.typeAnnotation = null, s.typeAnnotation = this.finishNode(i, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation")) : this.tsParseTypeAnnotation(!1, s); + let o = this.tsParseTypeAnnotation(!1); + return i.parameterName = n, i.typeAnnotation = o, i.asserts = r, s.typeAnnotation = this.finishNode(i, "TSTypePredicate"), this.finishNode(s, "TSTypeAnnotation"); + }); + } + tsTryParseTypeOrTypePredicateAnnotation() { + if (this.match(14)) return this.tsParseTypeOrTypePredicateAnnotation(14); + } + tsTryParseTypeAnnotation() { + if (this.match(14)) return this.tsParseTypeAnnotation(); + } + tsTryParseType() { + return this.tsEatThenParseType(14); + } + tsParseTypePredicatePrefix() { + let e = this.parseIdentifier(); + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) return this.next(), e; + } + tsParseTypePredicateAsserts() { + if (this.state.type !== 109) return !1; + let e = this.state.containsEsc; + return this.next(), !w(this.state.type) && !this.match(78) ? !1 : (e && this.raise(p.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { reservedWord: "asserts" }), !0); + } + tsParseTypeAnnotation(e = !0, s = this.startNode()) { + return this.tsInType(() => { + e && this.expect(14), s.typeAnnotation = this.tsParseType(); + }), this.finishNode(s, "TSTypeAnnotation"); + } + tsParseType() { + zt(this.state.inType); + let e = this.tsParseNonConditionalType(); + if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) return e; + let s = this.startNodeAtNode(e); + return s.checkType = e, s.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()), this.expect(17), s.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()), this.expect(14), s.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()), this.finishNode(s, "TSConditionalType"); + } + isAbstractConstructorSignature() { + return this.isContextual(124) && this.isLookaheadContextual("new"); + } + tsParseNonConditionalType() { + return this.tsIsStartOfFunctionType() ? this.tsParseFunctionOrConstructorType("TSFunctionType") : this.match(77) ? this.tsParseFunctionOrConstructorType("TSConstructorType") : this.isAbstractConstructorSignature() ? this.tsParseFunctionOrConstructorType("TSConstructorType", !0) : this.tsParseUnionTypeOrHigher(); + } + tsParseTypeAssertion() { + this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(y.ReservedTypeAssertion, this.state.startLoc); + let e = this.startNode(); + return e.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? this.tsParseTypeReference() : this.tsParseType())), this.expect(48), e.expression = this.parseMaybeUnary(), this.finishNode(e, "TSTypeAssertion"); + } + tsParseHeritageClause(e) { + let s = this.state.startLoc, i = this.tsParseDelimitedList("HeritageClauseElement", () => { + { + let r = super.parseExprSubscripts(); + lt(r) || this.raise(y.InvalidHeritageClauseType, r.loc.start, { token: e }); + let n = e === "extends" ? "TSInterfaceHeritage" : "TSClassImplements"; + if (r.type === "TSInstantiationExpression") return r.type = n, r; + let o = this.startNodeAtNode(r); + return o.expression = r, (this.match(47) || this.match(51)) && (o.typeArguments = this.tsParseTypeArgumentsInExpression()), this.finishNode(o, n); + } + }); + return i.length || this.raise(y.EmptyHeritageClauseType, s, { token: e }), i; + } + tsParseInterfaceDeclaration(e, s = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual(129), s.declare && (e.declare = !0), w(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(y.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(81) && (e.extends = this.tsParseHeritageClause("extends")); + let i = this.startNode(); + return i.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(i, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration"); + } + tsParseTypeAliasDeclaration(e) { + return e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 2), e.typeAnnotation = this.tsInType(() => { + if (e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers), this.expect(29), this.isContextual(114) && this.lookaheadCharCode() !== 46) { + let s = this.startNode(); + return this.next(), this.finishNode(s, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }), this.semicolon(), this.finishNode(e, "TSTypeAliasDeclaration"); + } + tsInTopLevelContext(e) { + if (this.curContext() !== E.brace) { + let s = this.state.context; + this.state.context = [s[0]]; + try { + return e(); + } finally { + this.state.context = s; + } + } else return e(); + } + tsInType(e) { + let s = this.state.inType; + this.state.inType = !0; + try { + return e(); + } finally { + this.state.inType = s; + } + } + tsInDisallowConditionalTypesContext(e) { + let s = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = !0; + try { + return e(); + } finally { + this.state.inDisallowConditionalTypesContext = s; + } + } + tsInAllowConditionalTypesContext(e) { + let s = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = !1; + try { + return e(); + } finally { + this.state.inDisallowConditionalTypesContext = s; + } + } + tsEatThenParseType(e) { + if (this.match(e)) return this.tsNextThenParseType(); + } + tsExpectThenParseType(e) { + return this.tsInType(() => (this.expect(e), this.tsParseType())); + } + tsNextThenParseType() { + return this.tsInType(() => (this.next(), this.tsParseType())); + } + tsParseEnumMember() { + let e = this.startNode(); + return e.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(!0), this.eat(29) && (e.initializer = super.parseMaybeAssignAllowIn()), this.finishNode(e, "TSEnumMember"); + } + tsParseEnumDeclaration(e, s = {}) { + return s.const && (e.const = !0), s.declare && (e.declare = !0), this.expectContextual(126), e.id = this.parseIdentifier(), this.checkIdentifier(e.id, e.const ? 8971 : 8459), e.body = this.tsParseEnumBody(), this.finishNode(e, "TSEnumDeclaration"); + } + tsParseEnumBody() { + let e = this.startNode(); + return this.expect(5), e.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)), this.expect(8), this.finishNode(e, "TSEnumBody"); + } + tsParseModuleBlock() { + let e = this.startNode(); + return this.scope.enter(0), this.expect(5), super.parseBlockOrModuleBlockBody(e.body = [], void 0, !0, 8), this.scope.exit(), this.finishNode(e, "TSModuleBlock"); + } + tsParseModuleOrNamespaceDeclaration(e, s = !1) { + return e.id = this.tsParseEntityName(1), e.id.type === "Identifier" && this.checkIdentifier(e.id, 1024), this.scope.enter(1024), this.prodParam.enter(0), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit(), this.finishNode(e, "TSModuleDeclaration"); + } + tsParseAmbientExternalModuleDeclaration(e) { + return this.isContextual(112) ? (e.kind = "global", e.id = this.parseIdentifier()) : this.match(134) ? (e.kind = "module", e.id = super.parseStringLiteral(this.state.value)) : this.unexpected(), this.match(5) ? (this.scope.enter(1024), this.prodParam.enter(0), e.body = this.tsParseModuleBlock(), this.prodParam.exit(), this.scope.exit()) : this.semicolon(), this.finishNode(e, "TSModuleDeclaration"); + } + tsParseImportEqualsDeclaration(e, s, i) { + e.id = s || this.parseIdentifier(), this.checkIdentifier(e.id, 4096), this.expect(29); + let r = this.tsParseModuleReference(); + return e.importKind === "type" && r.type !== "TSExternalModuleReference" && this.raise(y.ImportAliasHasImportType, r), e.moduleReference = r, this.semicolon(), this.finishNode(e, "TSImportEqualsDeclaration"); + } + tsIsExternalModuleReference() { + return this.isContextual(119) && this.lookaheadCharCode() === 40; + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(0); + } + tsParseExternalModuleReference() { + let e = this.startNode(); + return this.expectContextual(119), this.expect(10), this.match(134) || this.unexpected(), e.expression = super.parseExprAtom(), this.expect(11), this.sawUnambiguousESM = !0, this.finishNode(e, "TSExternalModuleReference"); + } + tsLookAhead(e) { + let s = this.state.clone(), i = e(); + return this.state = s, i; + } + tsTryParseAndCatch(e) { + let s = this.tryParse((i) => e() || i()); + if (!(s.aborted || !s.node)) return s.error && (this.state = s.failState), s.node; + } + tsTryParse(e) { + let s = this.state.clone(), i = e(); + if (i !== void 0 && i !== !1) return i; + this.state = s; + } + tsTryParseDeclare(e) { + if (this.isLineTerminator()) return; + let s = this.state.type; + return this.tsInAmbientContext(() => { + switch (s) { + case 68: return e.declare = !0, super.parseFunctionStatement(e, !1, !1); + case 80: return e.declare = !0, this.parseClass(e, !0, !1); + case 126: return this.tsParseEnumDeclaration(e, { declare: !0 }); + case 112: return this.tsParseAmbientExternalModuleDeclaration(e); + case 100: if (this.state.containsEsc) return; + case 75: + case 74: return !this.match(75) || !this.isLookaheadContextual("enum") ? (e.declare = !0, this.parseVarStatement(e, this.state.value, !0)) : (this.expect(75), this.tsParseEnumDeclaration(e, { + const: !0, + declare: !0 + })); + case 107: + if (this.isUsing()) return this.raise(y.InvalidModifierOnUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.parseVarStatement(e, "using", !0); + break; + case 96: + if (this.isAwaitUsing()) return this.raise(y.InvalidModifierOnAwaitUsingDeclaration, this.state.startLoc, "declare"), e.declare = !0, this.next(), this.parseVarStatement(e, "await using", !0); + break; + case 129: { + let i = this.tsParseInterfaceDeclaration(e, { declare: !0 }); + if (i) return i; + } + default: if (w(s)) return this.tsParseDeclaration(e, this.state.type, !0, null); + } + }); + } + tsTryParseExportDeclaration() { + return this.tsParseDeclaration(this.startNode(), this.state.type, !0, null); + } + tsParseDeclaration(e, s, i, r) { + switch (s) { + case 124: + if (this.tsCheckLineTerminator(i) && (this.match(80) || w(this.state.type))) return this.tsParseAbstractDeclaration(e, r); + break; + case 127: + if (this.tsCheckLineTerminator(i)) { + if (this.match(134)) return this.tsParseAmbientExternalModuleDeclaration(e); + if (w(this.state.type)) return e.kind = "module", this.tsParseModuleOrNamespaceDeclaration(e); + } + break; + case 128: + if (this.tsCheckLineTerminator(i) && w(this.state.type)) return e.kind = "namespace", this.tsParseModuleOrNamespaceDeclaration(e); + break; + case 130: + if (this.tsCheckLineTerminator(i) && w(this.state.type)) return this.tsParseTypeAliasDeclaration(e); + break; + } + } + tsCheckLineTerminator(e) { + return e ? this.hasFollowingLineBreak() ? !1 : (this.next(), !0) : !this.isLineTerminator(); + } + tsTryParseGenericAsyncArrowFunction(e) { + if (!this.match(47)) return; + let s = this.state.maybeInArrowParameters; + this.state.maybeInArrowParameters = !0; + let i = this.tsTryParseAndCatch(() => { + let r = this.startNodeAt(e); + return r.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier), super.parseFunctionParams(r), r.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(), this.expect(19), r; + }); + if (this.state.maybeInArrowParameters = s, !!i) return super.parseArrowExpression(i, null, !0); + } + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() === 47) return this.tsParseTypeArguments(); + } + tsParseTypeArguments() { + let e = this.startNode(); + return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(47), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(y.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === E.brace && this.reScan_lt_gt(), this.expect(48), this.finishNode(e, "TSTypeParameterInstantiation"); + } + tsIsDeclarationStart() { + return yi(this.state.type); + } + isExportDefaultSpecifier() { + return this.tsIsDeclarationStart() ? !1 : super.isExportDefaultSpecifier(); + } + parseBindingElement(e, s) { + let i = s.length ? s[0].loc.start : this.state.startLoc, r = {}; + this.tsParseModifiers({ allowedModifiers: [ + "public", + "private", + "protected", + "override", + "readonly" + ] }, r); + let n = r.accessibility, o = r.override, h = r.readonly; + !(e & 4) && (n || h || o) && this.raise(y.UnexpectedParameterModifier, i); + let l = this.parseMaybeDefault(); + e & 2 && this.parseFunctionParamType(l); + let u = this.parseMaybeDefault(l.loc.start, l); + if (n || h || o) { + let f = this.startNodeAt(i); + return s.length && (f.decorators = s), n && (f.accessibility = n), h && (f.readonly = h), o && (f.override = o), u.type !== "Identifier" && u.type !== "AssignmentPattern" && this.raise(y.UnsupportedParameterPropertyKind, f), f.parameter = u, this.finishNode(f, "TSParameterProperty"); + } + return s.length && (l.decorators = s), u; + } + isSimpleParameter(e) { + return e.type === "TSParameterProperty" && super.isSimpleParameter(e.parameter) || super.isSimpleParameter(e); + } + tsDisallowOptionalPattern(e) { + for (let s of e.params) s.type !== "Identifier" && s.optional && !this.state.isAmbientContext && this.raise(y.PatternIsOptional, s); + } + setArrowFunctionParameters(e, s, i) { + super.setArrowFunctionParameters(e, s, i), this.tsDisallowOptionalPattern(e); + } + parseFunctionBodyAndFinish(e, s, i = !1) { + this.match(14) && (e.returnType = this.tsParseTypeOrTypePredicateAnnotation(14)); + let r = s === "FunctionDeclaration" ? "TSDeclareFunction" : s === "ClassMethod" || s === "ClassPrivateMethod" ? "TSDeclareMethod" : void 0; + return r && !this.match(5) && this.isLineTerminator() ? this.finishNode(e, r) : r === "TSDeclareFunction" && this.state.isAmbientContext && (this.raise(y.DeclareFunctionHasImplementation, e), e.declare) ? super.parseFunctionBodyAndFinish(e, r, i) : (this.tsDisallowOptionalPattern(e), super.parseFunctionBodyAndFinish(e, s, i)); + } + registerFunctionStatementId(e) { + !e.body && e.id ? this.checkIdentifier(e.id, 1024) : super.registerFunctionStatementId(e); + } + tsCheckForInvalidTypeCasts(e) { + e.forEach((s) => { + s?.type === "TSTypeCastExpression" && this.raise(y.UnexpectedTypeAnnotation, s.typeAnnotation); + }); + } + toReferencedList(e, s) { + return this.tsCheckForInvalidTypeCasts(e), e; + } + parseArrayLike(e, s, i) { + let r = super.parseArrayLike(e, s, i); + return r.type === "ArrayExpression" && this.tsCheckForInvalidTypeCasts(r.elements), r; + } + parseSubscript(e, s, i, r) { + if (!this.hasPrecedingLineBreak() && this.match(35)) { + this.state.canStartJSXElement = !1, this.next(); + let o = this.startNodeAt(s); + return o.expression = e, this.finishNode(o, "TSNonNullExpression"); + } + let n = !1; + if (this.match(18) && this.lookaheadCharCode() === 60) { + if (i) return r.stop = !0, e; + r.optionalChainMember = n = !0, this.next(); + } + if (this.match(47) || this.match(51)) { + let o, h = this.tsTryParseAndCatch(() => { + if (!i && this.atPossibleAsyncArrow(e)) { + let d = this.tsTryParseGenericAsyncArrowFunction(s); + if (d) return r.stop = !0, d; + } + let l = this.tsParseTypeArgumentsInExpression(); + if (!l) return; + if (n && !this.match(10)) { + o = this.state.curPosition(); + return; + } + if ($e(this.state.type)) { + let d = super.parseTaggedTemplateExpression(e, s, r); + return d.typeArguments = l, d; + } + if (!i && this.eat(10)) { + let d = this.startNodeAt(s); + return d.callee = e, d.arguments = this.parseCallExpressionArguments(), this.tsCheckForInvalidTypeCasts(d.arguments), d.typeArguments = l, r.optionalChainMember && (d.optional = n), this.finishCallExpression(d, r.optionalChainMember); + } + let u = this.state.type; + if (u === 48 || u === 52 || u !== 10 && ce(u) && !this.hasPrecedingLineBreak()) return; + let f = this.startNodeAt(s); + return f.expression = e, f.typeArguments = l, this.finishNode(f, "TSInstantiationExpression"); + }); + if (o && this.unexpected(o, 10), h) return h.type === "TSInstantiationExpression" && ((this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40) && this.raise(y.InvalidPropertyAccessAfterInstantiationExpression, this.state.startLoc), !this.match(16) && !this.match(18) && (h.expression = super.stopParseSubscript(e, r))), h; + } + return super.parseSubscript(e, s, i, r); + } + parseNewCallee(e) { + super.parseNewCallee(e); + let { callee: s } = e; + s.type === "TSInstantiationExpression" && !s.extra?.parenthesized && (e.typeArguments = s.typeArguments, e.callee = s.expression); + } + parseExprOp(e, s, i) { + let r; + if (Ae(58) > i && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (r = this.isContextual(120)))) { + let n = this.startNodeAt(s); + return n.expression = e, n.typeAnnotation = this.tsInType(() => (this.next(), this.match(75) ? (r && this.raise(p.UnexpectedKeyword, this.state.startLoc, { keyword: "const" }), this.tsParseTypeReference()) : this.tsParseType())), this.finishNode(n, r ? "TSSatisfiesExpression" : "TSAsExpression"), this.reScan_lt_gt(), this.parseExprOp(n, s, i); + } + return super.parseExprOp(e, s, i); + } + checkReservedWord(e, s, i, r) { + this.state.isAmbientContext || super.checkReservedWord(e, s, i, r); + } + checkImportReflection(e) { + super.checkImportReflection(e), e.module && e.importKind !== "value" && this.raise(y.ImportReflectionHasImportType, e.specifiers[0].loc.start); + } + checkDuplicateExports() {} + isPotentialImportPhase(e) { + if (super.isPotentialImportPhase(e)) return !0; + if (this.isContextual(130)) { + let s = this.lookaheadCharCode(); + return e ? s === 123 || s === 42 : s !== 61; + } + return !e && this.isContextual(87); + } + applyImportPhase(e, s, i, r) { + super.applyImportPhase(e, s, i, r), s ? e.exportKind = i === "type" ? "type" : "value" : e.importKind = i === "type" || i === "typeof" ? i : "value"; + } + parseImport(e) { + if (this.match(134)) return e.importKind = "value", super.parseImport(e); + let s; + if (w(this.state.type) && this.lookaheadCharCode() === 61) return e.importKind = "value", this.tsParseImportEqualsDeclaration(e); + if (this.isContextual(130)) { + let i = this.parseMaybeImportPhase(e, !1); + if (this.lookaheadCharCode() === 61) return this.tsParseImportEqualsDeclaration(e, i); + s = super.parseImportSpecifiersAndAfter(e, i); + } else s = super.parseImport(e); + return s.importKind === "type" && s.specifiers.length > 1 && s.specifiers[0].type === "ImportDefaultSpecifier" && this.raise(y.TypeImportCannotSpecifyDefaultAndNamed, s), s; + } + parseExport(e, s) { + if (this.match(83)) { + let i = this.startNode(); + this.next(); + let r = null; + this.isContextual(130) && this.isPotentialImportPhase(!1) ? r = this.parseMaybeImportPhase(i, !1) : i.importKind = "value"; + let n = this.tsParseImportEqualsDeclaration(i, r, !0); + return e.attributes = [], e.declaration = n, e.exportKind = "value", e.source = null, e.specifiers = [], this.finishNode(e, "ExportNamedDeclaration"); + } else if (this.eat(29)) { + let i = e; + return i.expression = super.parseExpression(), this.semicolon(), this.sawUnambiguousESM = !0, this.finishNode(i, "TSExportAssignment"); + } else if (this.eatContextual(93)) { + let i = e; + return this.expectContextual(128), i.id = this.parseIdentifier(), this.semicolon(), this.finishNode(i, "TSNamespaceExportDeclaration"); + } else return super.parseExport(e, s); + } + isAbstractClass() { + return this.isContextual(124) && this.isLookaheadContextual("class"); + } + parseExportDefaultExpression() { + if (this.isAbstractClass()) { + let e = this.startNode(); + return this.next(), e.abstract = !0, this.parseClass(e, !0, !0); + } + if (this.match(129)) { + let e = this.tsParseInterfaceDeclaration(this.startNode()); + if (e) return e; + } + return super.parseExportDefaultExpression(); + } + parseVarStatement(e, s, i = !1) { + let { isAmbientContext: r } = this.state, n = super.parseVarStatement(e, s, i || r); + if (!r) return n; + if (!e.declare && (s === "using" || s === "await using")) return this.raiseOverwrite(y.UsingDeclarationInAmbientContext, e, s), n; + for (let { id: o, init: h } of n.declarations) h && (s === "var" || s === "let" || o.typeAnnotation ? this.raise(y.InitializerNotAllowedInAmbientContext, h) : Xi(h, this.hasPlugin("estree")) || this.raise(y.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, h)); + return n; + } + parseStatementContent(e, s) { + if (!this.state.containsEsc) switch (this.state.type) { + case 75: + if (this.isLookaheadContextual("enum")) { + let i = this.startNode(); + return this.expect(75), this.tsParseEnumDeclaration(i, { const: !0 }); + } + break; + case 124: + case 125: + if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) { + let i = this.state.type, r = this.startNode(); + this.next(); + let n = i === 125 ? this.tsTryParseDeclare(r) : this.tsParseAbstractDeclaration(r, s); + return n ? (i === 125 && (n.declare = !0), n) : (r.expression = this.createIdentifier(this.startNodeAt(r.loc.start), i === 125 ? "declare" : "abstract"), this.semicolon(!1), this.finishNode(r, "ExpressionStatement")); + } + break; + case 126: return this.tsParseEnumDeclaration(this.startNode()); + case 112: + if (this.lookaheadCharCode() === 123) { + let r = this.startNode(); + return this.tsParseAmbientExternalModuleDeclaration(r); + } + break; + case 129: { + let i = this.tsParseInterfaceDeclaration(this.startNode()); + if (i) return i; + break; + } + case 127: + if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) { + let i = this.startNode(); + return this.next(), this.tsParseDeclaration(i, 127, !1, s); + } + break; + case 128: + if (this.nextTokenIsIdentifierOnSameLine()) { + let i = this.startNode(); + return this.next(), this.tsParseDeclaration(i, 128, !1, s); + } + break; + case 130: + if (this.nextTokenIsIdentifierOnSameLine()) { + let i = this.startNode(); + return this.next(), this.tsParseTypeAliasDeclaration(i); + } + break; + } + return super.parseStatementContent(e, s); + } + parseAccessModifier() { + return this.tsParseModifier([ + "public", + "protected", + "private" + ]); + } + tsHasSomeModifiers(e, s) { + return s.some((i) => qt(i) ? e.accessibility === i : !!e[i]); + } + tsIsStartOfStaticBlocks() { + return this.isContextual(106) && this.lookaheadCharCode() === 123; + } + parseClassMember(e, s, i) { + let r = [ + "declare", + "private", + "public", + "protected", + "override", + "abstract", + "readonly", + "static" + ]; + this.tsParseModifiers({ + allowedModifiers: r, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: !0, + errorTemplate: y.InvalidModifierOnTypeParameterPositions + }, s); + let n = () => { + this.tsIsStartOfStaticBlocks() ? (this.next(), this.next(), this.tsHasSomeModifiers(s, r) && this.raise(y.StaticBlockCannotHaveModifier, this.state.curPosition()), super.parseClassStaticBlock(e, s)) : this.parseClassMemberWithIsStatic(e, s, i, !!s.static); + }; + s.declare ? this.tsInAmbientContext(n) : n(); + } + parseClassMemberWithIsStatic(e, s, i, r) { + let n = this.tsTryParseIndexSignature(s); + if (n) { + e.body.push(n), s.abstract && this.raise(y.IndexSignatureHasAbstract, s), s.accessibility && this.raise(y.IndexSignatureHasAccessibility, s, { modifier: s.accessibility }), s.declare && this.raise(y.IndexSignatureHasDeclare, s), s.override && this.raise(y.IndexSignatureHasOverride, s); + return; + } + !this.state.inAbstractClass && s.abstract && this.raise(y.NonAbstractClassHasAbstractMethod, s), s.override && (i.hadSuperClass || this.raise(y.OverrideNotInSubClass, s)), super.parseClassMemberWithIsStatic(e, s, i, r); + } + parsePostMemberNameModifiers(e) { + this.eat(17) && (e.optional = !0), e.readonly && this.match(10) && this.raise(y.ClassMethodHasReadonly, e), e.declare && this.match(10) && this.raise(y.ClassMethodHasDeclare, e); + } + shouldParseExportDeclaration() { + return this.tsIsDeclarationStart() ? !0 : super.shouldParseExportDeclaration(); + } + parseConditional(e, s, i) { + if (!this.match(17)) return e; + if (this.state.maybeInArrowParameters) { + let r = this.lookaheadCharCode(); + if (r === 44 || r === 61 || r === 58 || r === 41) return this.setOptionalParametersError(i), e; + } + return super.parseConditional(e, s, i); + } + parseParenItem(e, s) { + let i = super.parseParenItem(e, s); + if (this.eat(17) && (i.optional = !0, this.resetEndLocation(e)), this.match(14)) { + let r = this.startNodeAt(s); + return r.expression = e, r.typeAnnotation = this.tsParseTypeAnnotation(), this.finishNode(r, "TSTypeCastExpression"); + } + return e; + } + parseExportDeclaration(e) { + if (!this.state.isAmbientContext && this.isContextual(125)) return this.tsInAmbientContext(() => this.parseExportDeclaration(e)); + let s = this.state.startLoc, i = this.eatContextual(125); + if (i && (this.isContextual(125) || !this.shouldParseExportDeclaration())) throw this.raise(y.ExpectedAmbientAfterExportDeclare, this.state.startLoc); + let n = w(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e); + return n ? ((n.type === "TSInterfaceDeclaration" || n.type === "TSTypeAliasDeclaration" || i) && (e.exportKind = "type"), i && n.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(n, s), n.declare = !0), n) : null; + } + parseClassId(e, s, i, r) { + if ((!s || i) && this.isContextual(113)) return; + super.parseClassId(e, s, i, e.declare ? 1024 : 8331); + let n = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + n && (e.typeParameters = n); + } + parseClassPropertyAnnotation(e) { + e.optional || (this.eat(35) ? e.definite = !0 : this.eat(17) && (e.optional = !0)); + let s = this.tsTryParseTypeAnnotation(); + s && (e.typeAnnotation = s); + } + parseClassProperty(e) { + if (this.parseClassPropertyAnnotation(e), this.state.isAmbientContext && !(e.readonly && !e.typeAnnotation) && this.match(29) && this.raise(y.DeclareClassFieldHasInitializer, this.state.startLoc), e.abstract && this.match(29)) { + let { key: s } = e; + this.raise(y.AbstractPropertyHasInitializer, this.state.startLoc, { propertyName: s.type === "Identifier" && !e.computed ? s.name : `[${this.input.slice(this.offsetToSourcePos(s.start), this.offsetToSourcePos(s.end))}]` }); + } + return super.parseClassProperty(e); + } + parseClassPrivateProperty(e) { + return e.abstract && this.raise(y.PrivateElementHasAbstract, e), e.accessibility && this.raise(y.PrivateElementHasAccessibility, e, { modifier: e.accessibility }), this.parseClassPropertyAnnotation(e), super.parseClassPrivateProperty(e); + } + parseClassAccessorProperty(e) { + return this.parseClassPropertyAnnotation(e), e.optional && this.raise(y.AccessorCannotBeOptional, e), super.parseClassAccessorProperty(e); + } + pushClassMethod(e, s, i, r, n, o) { + let h = this.tsTryParseTypeParameters(this.tsParseConstModifier); + h && n && this.raise(y.ConstructorHasTypeParameters, h); + let { declare: l = !1, kind: u } = s; + l && (u === "get" || u === "set") && this.raise(y.DeclareAccessor, s, { kind: u }), h && (s.typeParameters = h), super.pushClassMethod(e, s, i, r, n, o); + } + pushClassPrivateMethod(e, s, i, r) { + let n = this.tsTryParseTypeParameters(this.tsParseConstModifier); + n && (s.typeParameters = n), super.pushClassPrivateMethod(e, s, i, r); + } + declareClassPrivateMethodInScope(e, s) { + e.type !== "TSDeclareMethod" && (e.type === "MethodDefinition" && e.value.body == null || super.declareClassPrivateMethodInScope(e, s)); + } + parseClassSuper(e) { + super.parseClassSuper(e), e.superClass && (this.match(47) || this.match(51)) && (e.superTypeArguments = this.tsParseTypeArgumentsInExpression()), this.eatContextual(113) && (e.implements = this.tsParseHeritageClause("implements")); + } + parseObjPropValue(e, s, i, r, n, o, h) { + let l = this.tsTryParseTypeParameters(this.tsParseConstModifier); + return l && (e.typeParameters = l), super.parseObjPropValue(e, s, i, r, n, o, h); + } + parseFunctionParams(e, s) { + let i = this.tsTryParseTypeParameters(this.tsParseConstModifier); + i && (e.typeParameters = i), super.parseFunctionParams(e, s); + } + parseVarId(e, s) { + super.parseVarId(e, s), e.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35) && (e.definite = !0); + let i = this.tsTryParseTypeAnnotation(); + i && (e.id.typeAnnotation = i, this.resetEndLocation(e.id)); + } + parseAsyncArrowFromCallExpression(e, s) { + return this.match(14) && (e.returnType = this.tsParseTypeAnnotation()), super.parseAsyncArrowFromCallExpression(e, s); + } + parseMaybeAssign(e, s) { + let i, r, n; + if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) { + if (i = this.state.clone(), r = this.tryParse(() => super.parseMaybeAssign(e, s), i), !r.error) return r.node; + let { context: l } = this.state, u = l[l.length - 1]; + (u === E.j_oTag || u === E.j_expr) && l.pop(); + } + if (!r?.error && !this.match(47)) return super.parseMaybeAssign(e, s); + (!i || i === this.state) && (i = this.state.clone()); + let o, h = this.tryParse((l) => { + o = this.tsParseTypeParameters(this.tsParseConstModifier); + let u = super.parseMaybeAssign(e, s); + if ((u.type !== "ArrowFunctionExpression" || u.extra?.parenthesized) && l(), o?.params.length !== 0 && this.resetStartLocationFromNode(u, o), u.typeParameters = o, this.hasPlugin("jsx") && u.typeParameters.params.length === 1 && !u.typeParameters.extra?.trailingComma) { + let f = u.typeParameters.params[0]; + f.constraint || this.raise(y.SingleTypeParameterWithoutTrailingComma, D(f.loc.end, 1), { typeParameterName: f.name.name }); + } + return u; + }, i); + if (!h.error && !h.aborted) return o && this.reportReservedArrowTypeParam(o), h.node; + if (!r && (zt(!this.hasPlugin("jsx")), n = this.tryParse(() => super.parseMaybeAssign(e, s), i), !n.error)) return n.node; + if (r?.node) return this.state = r.failState, r.node; + if (h.node) return this.state = h.failState, o && this.reportReservedArrowTypeParam(o), h.node; + if (n?.node) return this.state = n.failState, n.node; + throw r?.error || h.error || n?.error; + } + reportReservedArrowTypeParam(e) { + e.params.length === 1 && !e.params[0].constraint && !e.extra?.trailingComma && this.getPluginOption("typescript", "disallowAmbiguousJSXLike") && this.raise(y.ReservedArrowTypeParam, e); + } + parseMaybeUnary(e, s) { + return !this.hasPlugin("jsx") && this.match(47) ? this.tsParseTypeAssertion() : super.parseMaybeUnary(e, s); + } + parseArrow(e) { + if (this.match(14)) { + let s = this.tryParse((i) => { + let r = this.tsParseTypeOrTypePredicateAnnotation(14); + return (this.canInsertSemicolon() || !this.match(19)) && i(), r; + }); + if (s.aborted) return; + s.thrown || (s.error && (this.state = s.failState), e.returnType = s.node); + } + return super.parseArrow(e); + } + parseFunctionParamType(e) { + this.eat(17) && (e.optional = !0); + let s = this.tsTryParseTypeAnnotation(); + return s && (e.typeAnnotation = s), this.resetEndLocation(e), e; + } + isAssignable(e, s) { + switch (e.type) { + case "TSTypeCastExpression": return this.isAssignable(e.expression, s); + case "TSParameterProperty": return !0; + default: return super.isAssignable(e, s); + } + } + toAssignable(e, s = !1) { + switch (e.type) { + case "ParenthesizedExpression": + this.toAssignableParenthesizedExpression(e, s); + break; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + s ? this.expressionScope.recordArrowParameterBindingError(y.UnexpectedTypeCastInParameter, e) : this.raise(y.UnexpectedTypeCastInParameter, e), this.toAssignable(e.expression, s); + break; + case "AssignmentExpression": !s && e.left.type === "TSTypeCastExpression" && (e.left = this.typeCastToParameter(e.left)); + default: super.toAssignable(e, s); + } + } + toAssignableParenthesizedExpression(e, s) { + switch (e.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + this.toAssignable(e.expression, s); + break; + default: super.toAssignable(e, s); + } + } + checkToRestConversion(e, s) { + switch (e.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": + case "TSNonNullExpression": + this.checkToRestConversion(e.expression, !1); + break; + default: super.checkToRestConversion(e, s); + } + } + isValidLVal(e, s, i, r) { + switch (e) { + case "TSTypeCastExpression": return !0; + case "TSParameterProperty": return "parameter"; + case "TSNonNullExpression": return "expression"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSTypeAssertion": return (r !== 64 || !i) && ["expression", !0]; + default: return super.isValidLVal(e, s, i, r); + } + } + parseBindingAtom() { + return this.state.type === 78 ? this.parseIdentifier(!0) : super.parseBindingAtom(); + } + parseMaybeDecoratorArguments(e, s) { + if (this.match(47) || this.match(51)) { + let i = this.tsParseTypeArgumentsInExpression(); + if (this.match(10)) { + let r = super.parseMaybeDecoratorArguments(e, s); + return r.typeArguments = i, r; + } + this.unexpected(null, 10); + } + return super.parseMaybeDecoratorArguments(e, s); + } + checkCommaAfterRest(e) { + return this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === e ? (this.next(), !1) : super.checkCommaAfterRest(e); + } + isClassMethod() { + return this.match(47) || super.isClassMethod(); + } + isClassProperty() { + return this.match(35) || this.match(14) || super.isClassProperty(); + } + parseMaybeDefault(e, s) { + let i = super.parseMaybeDefault(e, s); + return i.type === "AssignmentPattern" && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(y.TypeAnnotationAfterAssign, i.typeAnnotation), i; + } + getTokenFromCode(e) { + if (this.state.inType) { + if (e === 62) { + this.finishOp(48, 1); + return; + } + if (e === 60) { + this.finishOp(47, 1); + return; + } + } + super.getTokenFromCode(e); + } + reScan_lt_gt() { + let { type: e } = this.state; + e === 47 ? (this.state.pos -= 1, this.readToken_lt()) : e === 48 && (this.state.pos -= 1, this.readToken_gt()); + } + reScan_lt() { + let { type: e } = this.state; + return e === 51 ? (this.state.pos -= 2, this.finishOp(47, 1), 47) : e; + } + toAssignableListItem(e, s, i) { + let r = e[s]; + r.type === "TSTypeCastExpression" && (e[s] = this.typeCastToParameter(r)), super.toAssignableListItem(e, s, i); + } + typeCastToParameter(e) { + return e.expression.typeAnnotation = e.typeAnnotation, this.resetEndLocation(e.expression, e.typeAnnotation.loc.end), e.expression; + } + shouldParseArrow(e) { + return this.match(14) ? e.every((s) => this.isAssignable(s, !0)) : super.shouldParseArrow(e); + } + shouldParseAsyncArrow() { + return this.match(14) || super.shouldParseAsyncArrow(); + } + canHaveLeadingDecorator() { + return super.canHaveLeadingDecorator() || this.isAbstractClass(); + } + jsxParseOpeningElementAfterName(e) { + if (this.match(47) || this.match(51)) { + let s = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); + s && (e.typeArguments = s); + } + return super.jsxParseOpeningElementAfterName(e); + } + getGetterSetterExpectedParamCount(e) { + let s = super.getGetterSetterExpectedParamCount(e), r = this.getObjectOrClassMethodParams(e)[0]; + return r && this.isThisParam(r) ? s + 1 : s; + } + parseCatchClauseParam() { + let e = super.parseCatchClauseParam(), s = this.tsTryParseTypeAnnotation(); + return s && (e.typeAnnotation = s, this.resetEndLocation(e)), e; + } + tsInAmbientContext(e) { + let { isAmbientContext: s, strict: i } = this.state; + this.state.isAmbientContext = !0, this.state.strict = !1; + try { + return e(); + } finally { + this.state.isAmbientContext = s, this.state.strict = i; + } + } + parseClass(e, s, i) { + let r = this.state.inAbstractClass; + this.state.inAbstractClass = !!e.abstract; + try { + return super.parseClass(e, s, i); + } finally { + this.state.inAbstractClass = r; + } + } + tsParseAbstractDeclaration(e, s) { + if (this.match(80)) return e.abstract = !0, this.maybeTakeDecorators(s, this.parseClass(e, !0, !1)); + if (this.isContextual(129)) return this.hasFollowingLineBreak() ? null : (e.abstract = !0, this.raise(y.NonClassMethodPropertyHasAbstractModifier, e), this.tsParseInterfaceDeclaration(e)); + throw this.unexpected(null, 80); + } + parseMethod(e, s, i, r, n, o, h) { + let l = super.parseMethod(e, s, i, r, n, o, h); + if ((l.abstract || l.type === "TSAbstractMethodDefinition") && (this.hasPlugin("estree") ? l.value : l).body) { + let { key: d } = l; + this.raise(y.AbstractMethodHasImplementation, l, { methodName: d.type === "Identifier" && !l.computed ? d.name : `[${this.input.slice(this.offsetToSourcePos(d.start), this.offsetToSourcePos(d.end))}]` }); + } + return l; + } + tsParseTypeParameterName() { + return this.parseIdentifier(); + } + shouldParseAsAmbientContext() { + return !!this.getPluginOption("typescript", "dts"); + } + parse() { + return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0), super.parse(); + } + getExpression() { + return this.shouldParseAsAmbientContext() && (this.state.isAmbientContext = !0), super.getExpression(); + } + parseExportSpecifier(e, s, i, r) { + return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e, !1, i), this.finishNode(e, "ExportSpecifier")) : (e.exportKind = "value", super.parseExportSpecifier(e, s, i, r)); + } + parseImportSpecifier(e, s, i, r, n) { + return !s && r ? (this.parseTypeOnlyImportExportSpecifier(e, !0, i), this.finishNode(e, "ImportSpecifier")) : (e.importKind = "value", super.parseImportSpecifier(e, s, i, r, i ? 4098 : 4096)); + } + parseTypeOnlyImportExportSpecifier(e, s, i) { + let r = s ? "imported" : "local", n = s ? "local" : "exported", o = e[r], h, l = !1, u = !0, f = o.loc.start; + if (this.isContextual(93)) { + let x = this.parseIdentifier(); + if (this.isContextual(93)) { + let A = this.parseIdentifier(); + O(this.state.type) ? (l = !0, o = x, h = s ? this.parseIdentifier() : this.parseModuleExportName(), u = !1) : (h = A, u = !1); + } else O(this.state.type) ? (u = !1, h = s ? this.parseIdentifier() : this.parseModuleExportName()) : (l = !0, o = x); + } else O(this.state.type) && (l = !0, s ? (o = this.parseIdentifier(!0), this.isContextual(93) || this.checkReservedWord(o.name, o.loc.start, !0, !0)) : o = this.parseModuleExportName()); + l && i && this.raise(s ? y.TypeModifierIsUsedInTypeImports : y.TypeModifierIsUsedInTypeExports, f), e[r] = o, e[n] = h; + let d = s ? "importKind" : "exportKind"; + e[d] = l ? "type" : "value", u && this.eatContextual(93) && (e[n] = s ? this.parseIdentifier() : this.parseModuleExportName()), e[n] || (e[n] = this.cloneIdentifier(e[r])), s && this.checkIdentifier(e[n], l ? 4098 : 4096); + } + fillOptionalPropertiesForTSESLint(e) { + switch (e.type) { + case "ExpressionStatement": + e.directive ?? (e.directive = void 0); + return; + case "RestElement": e.value = void 0; + case "Identifier": + case "ArrayPattern": + case "AssignmentPattern": + case "ObjectPattern": + e.decorators ?? (e.decorators = []), e.optional ?? (e.optional = !1), e.typeAnnotation ?? (e.typeAnnotation = void 0); + return; + case "TSParameterProperty": + e.accessibility ?? (e.accessibility = void 0), e.decorators ?? (e.decorators = []), e.override ?? (e.override = !1), e.readonly ?? (e.readonly = !1), e.static ?? (e.static = !1); + return; + case "TSEmptyBodyFunctionExpression": e.body = null; + case "TSDeclareFunction": + case "FunctionDeclaration": + case "FunctionExpression": + case "ClassMethod": + case "ClassPrivateMethod": + e.declare ?? (e.declare = !1), e.returnType ?? (e.returnType = void 0), e.typeParameters ?? (e.typeParameters = void 0); + return; + case "Property": + e.optional ?? (e.optional = !1); + return; + case "TSMethodSignature": + case "TSPropertySignature": e.optional ?? (e.optional = !1); + case "TSIndexSignature": + e.accessibility ?? (e.accessibility = void 0), e.readonly ?? (e.readonly = !1), e.static ?? (e.static = !1); + return; + case "TSAbstractPropertyDefinition": + case "PropertyDefinition": + case "TSAbstractAccessorProperty": + case "AccessorProperty": e.declare ?? (e.declare = !1), e.definite ?? (e.definite = !1), e.readonly ?? (e.readonly = !1), e.typeAnnotation ?? (e.typeAnnotation = void 0); + case "TSAbstractMethodDefinition": + case "MethodDefinition": + e.accessibility ?? (e.accessibility = void 0), e.decorators ?? (e.decorators = []), e.override ?? (e.override = !1), e.optional ?? (e.optional = !1); + return; + case "ClassExpression": e.id ?? (e.id = null); + case "ClassDeclaration": + e.abstract ?? (e.abstract = !1), e.declare ?? (e.declare = !1), e.decorators ?? (e.decorators = []), e.implements ?? (e.implements = []), e.superTypeArguments ?? (e.superTypeArguments = void 0), e.typeParameters ?? (e.typeParameters = void 0); + return; + case "TSTypeAliasDeclaration": + case "VariableDeclaration": + e.declare ?? (e.declare = !1); + return; + case "VariableDeclarator": + e.definite ?? (e.definite = !1); + return; + case "TSEnumDeclaration": + e.const ?? (e.const = !1), e.declare ?? (e.declare = !1); + return; + case "TSEnumMember": + e.computed ?? (e.computed = !1); + return; + case "TSImportType": + e.qualifier ?? (e.qualifier = null), e.options ?? (e.options = null), e.typeArguments ?? (e.typeArguments = null); + return; + case "TSInterfaceDeclaration": + e.declare ?? (e.declare = !1), e.extends ?? (e.extends = []); + return; + case "TSMappedType": + e.optional ?? (e.optional = !1), e.readonly ?? (e.readonly = void 0); + return; + case "TSModuleDeclaration": + e.declare ?? (e.declare = !1), e.global ?? (e.global = e.kind === "global"); + return; + case "TSTypeParameter": + e.const ?? (e.const = !1), e.in ?? (e.in = !1), e.out ?? (e.out = !1); + return; + } + } + chStartsBindingIdentifierAndNotRelationalOperator(e, s) { + if (B(e)) { + if (Ve.lastIndex = s, Ve.test(this.input)) { + let i = this.codePointAtPos(Ve.lastIndex); + if (!K(i) && i !== 92) return !1; + } + return !0; + } else return e === 92; + } + nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() { + let e = this.nextTokenInLineStart(), s = this.codePointAtPos(e); + return this.chStartsBindingIdentifierAndNotRelationalOperator(s, e); + } + nextTokenIsIdentifierOrStringLiteralOnSameLine() { + let e = this.nextTokenInLineStart(), s = this.codePointAtPos(e); + return this.chStartsBindingIdentifier(s, e) || s === 34 || s === 39; + } + }; + $t = F`placeholders`({ + ClassNameIsRequired: "A class name is required.", + UnexpectedSpace: "Unexpected space in placeholder." + }), Qi = (a) => class extends a { + parsePlaceholder(e) { + if (this.match(133)) { + let s = this.startNode(); + return this.next(), this.assertNoSpace(), s.name = super.parseIdentifier(!0), this.assertNoSpace(), this.expect(133), this.finishPlaceholder(s, e); + } + } + finishPlaceholder(e, s) { + let i = e; + return (!i.expectedNode || !i.type) && (i = this.finishNode(i, "Placeholder")), i.expectedNode = s, i; + } + getTokenFromCode(e) { + e === 37 && this.input.charCodeAt(this.state.pos + 1) === 37 ? this.finishOp(133, 2) : super.getTokenFromCode(e); + } + parseExprAtom(e) { + return this.parsePlaceholder("Expression") || super.parseExprAtom(e); + } + parseIdentifier(e) { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(e); + } + checkReservedWord(e, s, i, r) { + e !== void 0 && super.checkReservedWord(e, s, i, r); + } + cloneIdentifier(e) { + let s = super.cloneIdentifier(e); + return s.type === "Placeholder" && (s.expectedNode = e.expectedNode), s; + } + cloneStringLiteral(e) { + return e.type === "Placeholder" ? this.cloneIdentifier(e) : super.cloneStringLiteral(e); + } + parseBindingAtom() { + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); + } + isValidLVal(e, s, i, r) { + return e === "Placeholder" || super.isValidLVal(e, s, i, r); + } + toAssignable(e, s) { + e && e.type === "Placeholder" && e.expectedNode === "Expression" ? e.expectedNode = "Pattern" : super.toAssignable(e, s); + } + chStartsBindingIdentifier(e, s) { + if (super.chStartsBindingIdentifier(e, s)) return !0; + let i = this.nextTokenStart(); + return this.input.charCodeAt(i) === 37 && this.input.charCodeAt(i + 1) === 37; + } + verifyBreakContinue(e, s) { + e.label && e.label.type === "Placeholder" || super.verifyBreakContinue(e, s); + } + parseExpressionStatement(e, s) { + if (s.type !== "Placeholder" || s.extra?.parenthesized) return super.parseExpressionStatement(e, s); + if (this.match(14)) { + let r = e; + return r.label = this.finishPlaceholder(s, "Identifier"), this.next(), r.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(), this.finishNode(r, "LabeledStatement"); + } + this.semicolon(); + let i = e; + return i.name = s.name, this.finishPlaceholder(i, "Statement"); + } + parseBlock(e, s, i) { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(e, s, i); + } + parseFunctionId(e) { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(e); + } + parseClass(e, s, i) { + let r = s ? "ClassDeclaration" : "ClassExpression"; + this.next(); + let n = this.state.strict, o = this.parsePlaceholder("Identifier"); + if (o) if (this.match(81) || this.match(133) || this.match(5)) e.id = o; + else { + if (i || !s) return e.id = null, e.body = this.finishPlaceholder(o, "ClassBody"), this.finishNode(e, r); + throw this.raise($t.ClassNameIsRequired, this.state.startLoc); + } + else this.parseClassId(e, s, i); + return super.parseClassSuper(e), e.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!e.superClass, n), this.finishNode(e, r); + } + parseExport(e, s) { + let i = this.parsePlaceholder("Identifier"); + if (!i) return super.parseExport(e, s); + let r = e; + if (!this.isContextual(98) && !this.match(12)) return r.specifiers = [], r.source = null, r.declaration = this.finishPlaceholder(i, "Declaration"), this.finishNode(r, "ExportNamedDeclaration"); + this.expectPlugin("exportDefaultFrom"); + let n = this.startNode(); + return n.exported = i, r.specifiers = [this.finishNode(n, "ExportDefaultSpecifier")], super.parseExport(r, s); + } + isExportDefaultSpecifier() { + if (this.match(65)) { + let e = this.nextTokenStart(); + if (this.isUnparsedContextual(e, "from") && this.input.startsWith(z(133), this.nextTokenStartSince(e + 4))) return !0; + } + return super.isExportDefaultSpecifier(); + } + maybeParseExportDefaultSpecifier(e, s) { + return e.specifiers?.length ? !0 : super.maybeParseExportDefaultSpecifier(e, s); + } + checkExport(e) { + let { specifiers: s } = e; + s?.length && (e.specifiers = s.filter((i) => i.exported.type === "Placeholder")), super.checkExport(e), e.specifiers = s; + } + parseImport(e) { + let s = this.parsePlaceholder("Identifier"); + if (!s) return super.parseImport(e); + if (e.specifiers = [], !this.isContextual(98) && !this.match(12)) return e.source = this.finishPlaceholder(s, "StringLiteral"), this.semicolon(), this.finishNode(e, "ImportDeclaration"); + let i = this.startNodeAtNode(s); + return i.local = s, e.specifiers.push(this.finishNode(i, "ImportDefaultSpecifier")), this.eat(12) && (this.maybeParseStarImportSpecifier(e) || this.parseNamedImportSpecifiers(e)), this.expectContextual(98), e.source = this.parseImportSource(), this.semicolon(), this.finishNode(e, "ImportDeclaration"); + } + parseImportSource() { + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); + } + assertNoSpace() { + this.state.start > this.offsetToSourcePos(this.state.lastTokEndLoc.index) && this.raise($t.UnexpectedSpace, this.state.lastTokEndLoc); + } + }, Zi = (a) => class extends a { + parseV8Intrinsic() { + if (this.match(54)) { + let e = this.state.startLoc, s = this.startNode(); + if (this.next(), w(this.state.type)) { + let i = this.parseIdentifierName(), r = this.createIdentifier(s, i); + if (this.castNodeTo(r, "V8IntrinsicIdentifier"), this.match(10)) return r; + } + this.unexpected(e); + } + } + parseExprAtom(e) { + return this.parseV8Intrinsic() || super.parseExprAtom(e); + } + }, Kt = ["fsharp", "hack"], Ht = [ + "^^", + "@@", + "^", + "%", + "#" + ]; + hs = { + estree: ai, + jsx: Bi, + flow: Mi, + typescript: Ji, + v8intrinsic: Zi, + placeholders: Qi + }, tr = Object.keys(hs), pt = class extends ct { + checkProto(t, e, s, i) { + if (t.type === "SpreadElement" || this.isObjectMethod(t) || t.computed || t.shorthand) return s; + let r = t.key; + return (r.type === "Identifier" ? r.name : r.value) === "__proto__" ? e ? (this.raise(p.RecordNoProto, r), !0) : (s && (i ? i.doubleProtoLoc === null && (i.doubleProtoLoc = r.loc.start) : this.raise(p.DuplicateProto, r)), !0) : s; + } + shouldExitDescending(t, e) { + return t.type === "ArrowFunctionExpression" && this.offsetToSourcePos(t.start) === e; + } + getExpression() { + if (this.enterInitialScopes(), this.nextToken(), this.match(140)) throw this.raise(p.ParseExpressionEmptyInput, this.state.startLoc); + let t = this.parseExpression(); + if (!this.match(140)) throw this.raise(p.ParseExpressionExpectsEOF, this.state.startLoc, { unexpected: this.input.codePointAt(this.state.start) }); + return this.finalizeRemainingComments(), t.comments = this.comments, t.errors = this.state.errors, this.optionFlags & 256 && (t.tokens = this.tokens), t; + } + parseExpression(t, e) { + return t ? this.disallowInAnd(() => this.parseExpressionBase(e)) : this.allowInAnd(() => this.parseExpressionBase(e)); + } + parseExpressionBase(t) { + let e = this.state.startLoc, s = this.parseMaybeAssign(t); + if (this.match(12)) { + let i = this.startNodeAt(e); + for (i.expressions = [s]; this.eat(12);) i.expressions.push(this.parseMaybeAssign(t)); + return this.toReferencedList(i.expressions), this.finishNode(i, "SequenceExpression"); + } + return s; + } + parseMaybeAssignDisallowIn(t, e) { + return this.disallowInAnd(() => this.parseMaybeAssign(t, e)); + } + parseMaybeAssignAllowIn(t, e) { + return this.allowInAnd(() => this.parseMaybeAssign(t, e)); + } + setOptionalParametersError(t) { + t.optionalParametersLoc = this.state.startLoc; + } + parseMaybeAssign(t, e) { + let s = this.state.startLoc, i = this.isContextual(108); + if (i && this.prodParam.hasYield) { + this.next(); + let h = this.parseYield(s); + return e && (h = e.call(this, h, s)), h; + } + let r; + t ? r = !1 : (t = new Y(), r = !0); + let { type: n } = this.state; + (n === 10 || w(n)) && (this.state.potentialArrowAt = this.state.start); + let o = this.parseMaybeConditional(t); + if (e && (o = e.call(this, o, s)), li(this.state.type)) { + let h = this.startNodeAt(s), l = this.state.value; + if (h.operator = l, this.match(29)) { + this.toAssignable(o, !0), h.left = o; + let u = s.index; + t.doubleProtoLoc != null && t.doubleProtoLoc.index >= u && (t.doubleProtoLoc = null), t.shorthandAssignLoc != null && t.shorthandAssignLoc.index >= u && (t.shorthandAssignLoc = null), t.privateKeyLoc != null && t.privateKeyLoc.index >= u && (this.checkDestructuringPrivate(t), t.privateKeyLoc = null), t.voidPatternLoc != null && t.voidPatternLoc.index >= u && (t.voidPatternLoc = null); + } else h.left = o; + return this.next(), h.right = this.parseMaybeAssign(), this.checkLVal(o, this.finishNode(h, "AssignmentExpression"), void 0, void 0, void 0, void 0, l === "||=" || l === "&&=" || l === "??="), h; + } else r && this.checkExpressionErrors(t, !0); + if (i) { + let { type: h } = this.state; + if ((this.hasPlugin("v8intrinsic") ? ce(h) : ce(h) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(p.YieldNotInGeneratorFunction, s), this.parseYield(s); + } + return o; + } + parseMaybeConditional(t) { + let e = this.state.startLoc, s = this.state.potentialArrowAt, i = this.parseExprOps(t); + return this.shouldExitDescending(i, s) ? i : this.parseConditional(i, e, t); + } + parseConditional(t, e, s) { + if (this.eat(17)) { + let i = this.startNodeAt(e); + return i.test = t, i.consequent = this.parseMaybeAssignAllowIn(), this.expect(14), i.alternate = this.parseMaybeAssign(), this.finishNode(i, "ConditionalExpression"); + } + return t; + } + parseMaybeUnaryOrPrivate(t) { + return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(t); + } + parseExprOps(t) { + let e = this.state.startLoc, s = this.state.potentialArrowAt, i = this.parseMaybeUnaryOrPrivate(t); + return this.shouldExitDescending(i, s) ? i : this.parseExprOp(i, e, -1); + } + parseExprOp(t, e, s) { + if (this.isPrivateName(t)) { + let r = this.getPrivateNameSV(t); + (s >= Ae(58) || !this.prodParam.hasIn || !this.match(58)) && this.raise(p.PrivateInExpectedIn, t, { identifierName: r }), this.classScope.usePrivateName(r, t.loc.start); + } + let i = this.state.type; + if (ui(i) && (this.prodParam.hasIn || !this.match(58))) { + let r = Ae(i); + if (r > s) { + if (i === 39) { + if (this.expectPlugin("pipelineOperator"), this.state.inFSharpPipelineDirectBody) return t; + this.checkPipelineAtInfixOperator(t, e); + } + let n = this.startNodeAt(e); + n.left = t, n.operator = this.state.value; + let o = i === 41 || i === 42, h = i === 40; + h && (r = Ae(42)), this.next(), n.right = this.parseExprOpRightExpr(i, r); + let l = this.finishNode(n, o || h ? "LogicalExpression" : "BinaryExpression"), u = this.state.type; + if (h && (u === 41 || u === 42) || o && u === 40) throw this.raise(p.MixingCoalesceWithLogical, this.state.startLoc); + return this.parseExprOp(l, e, s); + } + } + return t; + } + parseExprOpRightExpr(t, e) { + switch (this.state.startLoc, t) { + case 39: switch (this.getPluginOption("pipelineOperator", "proposal")) { + case "hack": return this.withTopicBindingContext(() => this.parseHackPipeBody()); + case "fsharp": return this.withSoloAwaitPermittingContext(() => this.parseFSharpPipelineBody(e)); + } + default: return this.parseExprOpBaseRightExpr(t, e); + } + } + parseExprOpBaseRightExpr(t, e) { + let s = this.state.startLoc; + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), s, xi(t) ? e - 1 : e); + } + parseHackPipeBody() { + let { startLoc: t } = this.state, e = this.parseMaybeAssign(); + return Qs.has(e.type) && !e.extra?.parenthesized && this.raise(p.PipeUnparenthesizedBody, t, { type: e.type }), this.topicReferenceWasUsedInCurrentContext() || this.raise(p.PipeTopicUnused, t), e; + } + checkExponentialAfterUnary(t) { + this.match(57) && this.raise(p.UnexpectedTokenUnaryExponentiation, t.argument); + } + parseMaybeUnary(t, e) { + let s = this.state.startLoc, i = this.isContextual(96); + if (i && this.recordAwaitIfAllowed()) { + this.next(); + let h = this.parseAwait(s); + return e || this.checkExponentialAfterUnary(h), h; + } + let r = this.match(34), n = this.startNode(); + if (di(this.state.type)) { + n.operator = this.state.value, n.prefix = !0, this.match(72) && this.expectPlugin("throwExpressions"); + let h = this.match(89); + if (this.next(), n.argument = this.parseMaybeUnary(null, !0), this.checkExpressionErrors(t, !0), this.state.strict && h) { + let l = n.argument; + l.type === "Identifier" ? this.raise(p.StrictDelete, n) : this.hasPropertyAsPrivateName(l) && this.raise(p.DeletePrivateField, n); + } + if (!r) return e || this.checkExponentialAfterUnary(n), this.finishNode(n, "UnaryExpression"); + } + let o = this.parseUpdate(n, r, t); + if (i) { + let { type: h } = this.state; + if ((this.hasPlugin("v8intrinsic") ? ce(h) : ce(h) && !this.match(54)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(p.AwaitNotInAsyncContext, s), this.parseAwait(s); + } + return o; + } + parseUpdate(t, e, s) { + if (e) { + let n = t; + return this.checkLVal(n.argument, this.finishNode(n, "UpdateExpression")), t; + } + let i = this.state.startLoc, r = this.parseExprSubscripts(s); + if (this.checkExpressionErrors(s, !1)) return r; + for (; fi(this.state.type) && !this.canInsertSemicolon();) { + let n = this.startNodeAt(i); + n.operator = this.state.value, n.prefix = !1, n.argument = r, this.next(), this.checkLVal(r, r = this.finishNode(n, "UpdateExpression")); + } + return r; + } + parseExprSubscripts(t) { + let e = this.state.startLoc, s = this.state.potentialArrowAt, i = this.parseExprAtom(t); + return this.shouldExitDescending(i, s) ? i : this.parseSubscripts(i, e); + } + parseSubscripts(t, e, s) { + let i = { + optionalChainMember: !1, + maybeAsyncArrow: this.atPossibleAsyncArrow(t), + stop: !1 + }; + do + t = this.parseSubscript(t, e, s, i), i.maybeAsyncArrow = !1; + while (!i.stop); + return t; + } + parseSubscript(t, e, s, i) { + let { type: r } = this.state; + if (!s && r === 15) return this.parseBind(t, e, s, i); + if ($e(r)) return this.parseTaggedTemplateExpression(t, e, i); + let n = !1; + if (r === 18) { + if (s && (this.raise(p.OptionalChainingNoNew, this.state.startLoc), this.lookaheadCharCode() === 40)) return this.stopParseSubscript(t, i); + i.optionalChainMember = n = !0, this.next(); + } + if (!s && this.match(10)) return this.parseCoverCallAndAsyncArrowHead(t, e, i, n); + { + let o = this.eat(0); + return o || n || this.eat(16) ? this.parseMember(t, e, i, o, n) : this.stopParseSubscript(t, i); + } + } + stopParseSubscript(t, e) { + return e.stop = !0, t; + } + parseMember(t, e, s, i, r) { + let n = this.startNodeAt(e); + return n.object = t, n.computed = i, i ? (n.property = this.parseExpression(), this.expect(3)) : this.match(139) ? (t.type === "Super" && this.raise(p.SuperPrivateField, e), this.classScope.usePrivateName(this.state.value, this.state.startLoc), n.property = this.parsePrivateName()) : n.property = this.parseIdentifier(!0), s.optionalChainMember ? (n.optional = r, this.finishNode(n, "OptionalMemberExpression")) : this.finishNode(n, "MemberExpression"); + } + parseBind(t, e, s, i) { + let r = this.startNodeAt(e); + return r.object = t, this.next(), r.callee = this.parseNoCallExpr(), i.stop = !0, this.parseSubscripts(this.finishNode(r, "BindExpression"), e, s); + } + parseCoverCallAndAsyncArrowHead(t, e, s, i) { + let r = this.state.maybeInArrowParameters, n = null; + this.state.maybeInArrowParameters = !0, this.next(); + let o = this.startNodeAt(e); + o.callee = t; + let { maybeAsyncArrow: h, optionalChainMember: l } = s; + h && (this.expressionScope.enter($i()), n = new Y()), l && (o.optional = i), i ? o.arguments = this.parseCallExpressionArguments() : o.arguments = this.parseCallExpressionArguments(t.type !== "Super", o, n); + let u = this.finishCallExpression(o, l); + return h && this.shouldParseAsyncArrow() && !i ? (s.stop = !0, this.checkDestructuringPrivate(n), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), u = this.parseAsyncArrowFromCallExpression(this.startNodeAt(e), u)) : (h && (this.checkExpressionErrors(n, !0), this.expressionScope.exit()), this.toReferencedArguments(u)), this.state.maybeInArrowParameters = r, u; + } + toReferencedArguments(t, e) { + this.toReferencedListDeep(t.arguments, e); + } + parseTaggedTemplateExpression(t, e, s) { + let i = this.startNodeAt(e); + return i.tag = t, i.quasi = this.parseTemplate(!0), s.optionalChainMember && this.raise(p.OptionalChainingNoTemplate, e), this.finishNode(i, "TaggedTemplateExpression"); + } + atPossibleAsyncArrow(t) { + return t.type === "Identifier" && t.name === "async" && this.state.lastTokEndLoc.index === t.end && !this.canInsertSemicolon() && t.end - t.start === 5 && this.offsetToSourcePos(t.start) === this.state.potentialArrowAt; + } + finishCallExpression(t, e) { + if (t.callee.type === "Import") if (t.arguments.length === 0 || t.arguments.length > 2) this.raise(p.ImportCallArity, t); + else for (let s of t.arguments) s.type === "SpreadElement" && this.raise(p.ImportCallSpreadArgument, s); + return this.finishNode(t, e ? "OptionalCallExpression" : "CallExpression"); + } + parseCallExpressionArguments(t, e, s) { + let i = [], r = !0, n = this.state.inFSharpPipelineDirectBody; + for (this.state.inFSharpPipelineDirectBody = !1; !this.eat(11);) { + if (r) r = !1; + else if (this.expect(12), this.match(11)) { + e && this.addTrailingCommaExtraToNode(e), this.next(); + break; + } + i.push(this.parseExprListItem(11, !1, s, t)); + } + return this.state.inFSharpPipelineDirectBody = n, i; + } + shouldParseAsyncArrow() { + return this.match(19) && !this.canInsertSemicolon(); + } + parseAsyncArrowFromCallExpression(t, e) { + return this.resetPreviousNodeTrailingComments(e), this.expect(19), this.parseArrowExpression(t, e.arguments, !0, e.extra?.trailingCommaLoc), e.innerComments && X(t, e.innerComments), e.callee.trailingComments && X(t, e.callee.trailingComments), t; + } + parseNoCallExpr() { + let t = this.state.startLoc; + return this.parseSubscripts(this.parseExprAtom(), t, !0); + } + parseExprAtom(t) { + let e, s = null, { type: i } = this.state; + switch (i) { + case 79: return this.parseSuper(); + case 83: return e = this.startNode(), this.next(), this.match(16) ? this.parseImportMetaPropertyOrPhaseCall(e) : this.match(10) ? this.optionFlags & 512 ? this.parseImportCall(e) : this.finishNode(e, "Import") : (this.raise(p.UnsupportedImport, this.state.lastTokStartLoc), this.finishNode(e, "Import")); + case 78: return e = this.startNode(), this.next(), this.finishNode(e, "ThisExpression"); + case 90: return this.parseDo(this.startNode(), !1); + case 56: + case 31: return this.readRegexp(), this.parseRegExpLiteral(this.state.value); + case 135: return this.parseNumericLiteral(this.state.value); + case 136: return this.parseBigIntLiteral(this.state.value); + case 134: return this.parseStringLiteral(this.state.value); + case 84: return this.parseNullLiteral(); + case 85: return this.parseBooleanLiteral(!0); + case 86: return this.parseBooleanLiteral(!1); + case 10: { + let r = this.state.potentialArrowAt === this.state.start; + return this.parseParenAndDistinguishExpression(r); + } + case 0: return this.parseArrayLike(3, !1, t); + case 5: return this.parseObjectLike(8, !1, !1, t); + case 68: return this.parseFunctionOrFunctionSent(); + case 26: s = this.parseDecorators(); + case 80: return this.parseClass(this.maybeTakeDecorators(s, this.startNode()), !1); + case 77: return this.parseNewOrNewTarget(); + case 25: + case 24: return this.parseTemplate(!1); + case 15: { + e = this.startNode(), this.next(), e.object = null; + let r = e.callee = this.parseNoCallExpr(); + if (r.type === "MemberExpression") return this.finishNode(e, "BindExpression"); + throw this.raise(p.UnsupportedBind, r); + } + case 139: return this.raise(p.PrivateInExpectedIn, this.state.startLoc, { identifierName: this.state.value }), this.parsePrivateName(); + case 33: return this.parseTopicReferenceThenEqualsSign(54, "%"); + case 32: return this.parseTopicReferenceThenEqualsSign(44, "^"); + case 37: + case 38: return this.parseTopicReference("hack"); + case 44: + case 54: + case 27: { + let r = this.getPluginOption("pipelineOperator", "proposal"); + if (r) return this.parseTopicReference(r); + throw this.unexpected(); + } + case 47: { + let r = this.input.codePointAt(this.nextTokenStart()); + throw B(r) || r === 62 ? this.expectOnePlugin([ + "jsx", + "flow", + "typescript" + ]) : this.unexpected(); + } + default: if (w(i)) { + if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression(); + let r = this.state.potentialArrowAt === this.state.start, n = this.state.containsEsc, o = this.parseIdentifier(); + if (!n && o.name === "async" && !this.canInsertSemicolon()) { + let { type: h } = this.state; + if (h === 68) return this.resetPreviousNodeTrailingComments(o), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(o)); + if (w(h)) return this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)) : o; + if (h === 90) return this.resetPreviousNodeTrailingComments(o), this.parseDo(this.startNodeAtNode(o), !0); + } + return r && this.match(19) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(o), [o], !1)) : o; + } else throw this.unexpected(); + } + } + parseTopicReferenceThenEqualsSign(t, e) { + let s = this.getPluginOption("pipelineOperator", "proposal"); + if (s) return this.state.type = t, this.state.value = e, this.state.pos--, this.state.end--, this.state.endLoc = D(this.state.endLoc, -1), this.parseTopicReference(s); + throw this.unexpected(); + } + parseTopicReference(t) { + let e = this.startNode(), s = this.state.startLoc, i = this.state.type; + return this.next(), this.finishTopicReference(e, s, t, i); + } + finishTopicReference(t, e, s, i) { + if (this.testTopicReferenceConfiguration(s, e, i)) return this.topicReferenceIsAllowedInCurrentContext() || this.raise(p.PipeTopicUnbound, e), this.registerTopicReference(), this.finishNode(t, "TopicReference"); + throw this.raise(p.PipeTopicUnconfiguredToken, e, { token: z(i) }); + } + testTopicReferenceConfiguration(t, e, s) { + switch (t) { + case "hack": return this.hasPlugin(["pipelineOperator", { topicToken: z(s) }]); + case "smart": return s === 27; + default: throw this.raise(p.PipeTopicRequiresHackPipes, e); + } + } + parseAsyncArrowUnaryFunction(t) { + this.prodParam.enter(Se(!0, this.prodParam.hasYield)); + let e = [this.parseIdentifier()]; + return this.prodParam.exit(), this.hasPrecedingLineBreak() && this.raise(p.LineTerminatorBeforeArrow, this.state.curPosition()), this.expect(19), this.parseArrowExpression(t, e, !0); + } + parseDo(t, e) { + this.expectPlugin("doExpressions"), e && this.expectPlugin("asyncDoExpressions"), t.async = e, this.next(); + let s = this.state.labels; + return this.state.labels = [], e ? (this.prodParam.enter(2), t.body = this.parseBlock(), this.prodParam.exit()) : t.body = this.parseBlock(), this.state.labels = s, this.finishNode(t, "DoExpression"); + } + parseSuper() { + let t = this.startNode(); + return this.next(), this.match(10) && !this.scope.allowDirectSuper ? this.raise(p.SuperNotAllowed, t) : this.scope.allowSuper || this.raise(p.UnexpectedSuper, t), !this.match(10) && !this.match(0) && !this.match(16) && this.raise(p.UnsupportedSuper, t), this.finishNode(t, "Super"); + } + parsePrivateName() { + let t = this.startNode(), e = this.startNodeAt(D(this.state.startLoc, 1)), s = this.state.value; + return this.next(), t.id = this.createIdentifier(e, s), this.finishNode(t, "PrivateName"); + } + parseFunctionOrFunctionSent() { + let t = this.startNode(); + if (this.next(), this.prodParam.hasYield && this.match(16)) { + let e = this.createIdentifier(this.startNodeAtNode(t), "function"); + return this.next(), this.match(103) ? this.expectPlugin("functionSent") : this.hasPlugin("functionSent") || this.unexpected(), this.parseMetaProperty(t, e, "sent"); + } + return this.parseFunction(t); + } + parseMetaProperty(t, e, s) { + t.meta = e; + let i = this.state.containsEsc; + return t.property = this.parseIdentifier(!0), (t.property.name !== s || i) && this.raise(p.UnsupportedMetaProperty, t.property, { + target: e.name, + onlyValidPropertyName: s + }), this.finishNode(t, "MetaProperty"); + } + parseImportMetaPropertyOrPhaseCall(t) { + if (this.next(), this.isContextual(105) || this.isContextual(97)) { + let e = this.isContextual(105); + return this.expectPlugin(e ? "sourcePhaseImports" : "deferredImportEvaluation"), this.next(), t.phase = e ? "source" : "defer", this.parseImportCall(t); + } else { + let e = this.createIdentifierAt(this.startNodeAtNode(t), "import", this.state.lastTokStartLoc); + return this.isContextual(101) && (this.inModule || this.raise(p.ImportMetaOutsideModule, e), this.sawUnambiguousESM = !0), this.parseMetaProperty(t, e, "meta"); + } + } + parseLiteralAtNode(t, e, s) { + return this.addExtra(s, "rawValue", t), this.addExtra(s, "raw", this.input.slice(this.offsetToSourcePos(s.start), this.state.end)), s.value = t, this.next(), this.finishNode(s, e); + } + parseLiteral(t, e) { + let s = this.startNode(); + return this.parseLiteralAtNode(t, e, s); + } + parseStringLiteral(t) { + return this.parseLiteral(t, "StringLiteral"); + } + parseNumericLiteral(t) { + return this.parseLiteral(t, "NumericLiteral"); + } + parseBigIntLiteral(t) { + { + let e; + try { + e = BigInt(t); + } catch { + e = null; + } + return this.parseLiteral(e, "BigIntLiteral"); + } + } + parseDecimalLiteral(t) { + return this.parseLiteral(t, "DecimalLiteral"); + } + parseRegExpLiteral(t) { + let e = this.startNode(); + return this.addExtra(e, "raw", this.input.slice(this.offsetToSourcePos(e.start), this.state.end)), e.pattern = t.pattern, e.flags = t.flags, this.next(), this.finishNode(e, "RegExpLiteral"); + } + parseBooleanLiteral(t) { + let e = this.startNode(); + return e.value = t, this.next(), this.finishNode(e, "BooleanLiteral"); + } + parseNullLiteral() { + let t = this.startNode(); + return this.next(), this.finishNode(t, "NullLiteral"); + } + parseParenAndDistinguishExpression(t) { + let e = this.state.startLoc, s; + this.next(), this.expressionScope.enter(qi()); + let i = this.state.maybeInArrowParameters, r = this.state.inFSharpPipelineDirectBody; + this.state.maybeInArrowParameters = !0, this.state.inFSharpPipelineDirectBody = !1; + let n = this.state.startLoc, o = [], h = new Y(), l = !0, u, f; + for (; !this.match(11);) { + if (l) l = !1; + else if (this.expect(12, h.optionalParametersLoc === null ? null : h.optionalParametersLoc), this.match(11)) { + f = this.state.startLoc; + break; + } + if (this.match(21)) { + let A = this.state.startLoc; + if (u = this.state.startLoc, o.push(this.parseParenItem(this.parseRestBinding(), A)), !this.checkCommaAfterRest(41)) break; + } else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11, h, this.parseParenItem)); + } + let d = this.state.lastTokEndLoc; + this.expect(11), this.state.maybeInArrowParameters = i, this.state.inFSharpPipelineDirectBody = r; + let x = this.startNodeAt(e); + return t && this.shouldParseArrow(o) && (x = this.parseArrow(x)) ? (this.checkDestructuringPrivate(h), this.expressionScope.validateAsPattern(), this.expressionScope.exit(), this.parseArrowExpression(x, o, !1), x) : (this.expressionScope.exit(), o.length || this.unexpected(this.state.lastTokStartLoc), f && this.unexpected(f), u && this.unexpected(u), this.checkExpressionErrors(h, !0), this.toReferencedListDeep(o, !0), o.length > 1 ? (s = this.startNodeAt(n), s.expressions = o, this.finishNode(s, "SequenceExpression"), this.resetEndLocation(s, d)) : s = o[0], this.wrapParenthesis(e, s)); + } + wrapParenthesis(t, e) { + if (!(this.optionFlags & 1024)) return this.addExtra(e, "parenthesized", !0), this.addExtra(e, "parenStart", t.index), this.takeSurroundingComments(e, t.index, this.state.lastTokEndLoc.index), e; + let s = this.startNodeAt(t); + return s.expression = e, this.finishNode(s, "ParenthesizedExpression"); + } + shouldParseArrow(t) { + return !this.canInsertSemicolon(); + } + parseArrow(t) { + if (this.eat(19)) return t; + } + parseParenItem(t, e) { + return t; + } + parseNewOrNewTarget() { + let t = this.startNode(); + if (this.next(), this.match(16)) { + let e = this.createIdentifier(this.startNodeAtNode(t), "new"); + this.next(); + let s = this.parseMetaProperty(t, e, "target"); + return this.scope.allowNewTarget || this.raise(p.UnexpectedNewTarget, s), s; + } + return this.parseNew(t); + } + parseNew(t) { + if (this.parseNewCallee(t), this.eat(10)) { + let e = this.parseExprList(11); + this.toReferencedList(e), t.arguments = e; + } else t.arguments = []; + return this.finishNode(t, "NewExpression"); + } + parseNewCallee(t) { + let e = this.match(83), s = this.parseNoCallExpr(); + t.callee = s, e && (s.type === "Import" || s.type === "ImportExpression") && this.raise(p.ImportCallNotNewExpression, s); + } + parseTemplateElement(t) { + let { start: e, startLoc: s, end: i, value: r } = this.state, n = e + 1, o = this.startNodeAt(D(s, 1)); + r === null && (t || this.raise(p.InvalidEscapeSequenceTemplate, D(this.state.firstInvalidTemplateEscapePos, 1))); + let h = this.match(24), l = h ? -1 : -2, u = i + l; + o.value = { + raw: this.input.slice(n, u).replace(/\r\n?/g, ` +`), + cooked: r === null ? null : r.slice(1, l) + }, o.tail = h, this.next(); + let f = this.finishNode(o, "TemplateElement"); + return this.resetEndLocation(f, D(this.state.lastTokEndLoc, l)), f; + } + parseTemplate(t) { + let e = this.startNode(), s = this.parseTemplateElement(t), i = [s], r = []; + for (; !s.tail;) r.push(this.parseTemplateSubstitution()), this.readTemplateContinuation(), i.push(s = this.parseTemplateElement(t)); + return e.expressions = r, e.quasis = i, this.finishNode(e, "TemplateLiteral"); + } + parseTemplateSubstitution() { + return this.parseExpression(); + } + parseObjectLike(t, e, s, i) { + s && this.expectPlugin("recordAndTuple"); + let r = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !1; + let n = !1, o = !0, h = this.startNode(); + for (h.properties = [], this.next(); !this.match(t);) { + if (o) o = !1; + else if (this.expect(12), this.match(t)) { + this.addTrailingCommaExtraToNode(h); + break; + } + let u; + e ? u = this.parseBindingProperty() : (u = this.parsePropertyDefinition(i), n = this.checkProto(u, s, n, i)), s && !this.isObjectProperty(u) && u.type !== "SpreadElement" && this.raise(p.InvalidRecordProperty, u), h.properties.push(u); + } + this.next(), this.state.inFSharpPipelineDirectBody = r; + let l = "ObjectExpression"; + return e ? l = "ObjectPattern" : s && (l = "RecordExpression"), this.finishNode(h, l); + } + addTrailingCommaExtraToNode(t) { + this.addExtra(t, "trailingComma", this.state.lastTokStartLoc.index), this.addExtra(t, "trailingCommaLoc", this.state.lastTokStartLoc, !1); + } + maybeAsyncOrAccessorProp(t) { + return !t.computed && t.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); + } + parsePropertyDefinition(t) { + let e = []; + if (this.match(26)) for (this.hasPlugin("decorators") && this.raise(p.UnsupportedPropertyDecorator, this.state.startLoc); this.match(26);) e.push(this.parseDecorator()); + let s = this.startNode(), i = !1, r = !1, n; + if (this.match(21)) return e.length && this.unexpected(), this.parseSpread(); + e.length && (s.decorators = e, e = []), s.method = !1, t && (n = this.state.startLoc); + let o = this.eat(55); + this.parsePropertyNamePrefixOperator(s); + let h = this.state.containsEsc; + if (this.parsePropertyName(s, t), !o && !h && this.maybeAsyncOrAccessorProp(s)) { + let { key: l } = s, u = l.name; + u === "async" && !this.hasPrecedingLineBreak() && (i = !0, this.resetPreviousNodeTrailingComments(l), o = this.eat(55), this.parsePropertyName(s)), (u === "get" || u === "set") && (r = !0, this.resetPreviousNodeTrailingComments(l), s.kind = u, this.match(55) && (o = !0, this.raise(p.AccessorIsGenerator, this.state.curPosition(), { kind: u }), this.next()), this.parsePropertyName(s)); + } + return this.parseObjPropValue(s, n, o, i, !1, r, t); + } + getGetterSetterExpectedParamCount(t) { + return t.kind === "get" ? 0 : 1; + } + getObjectOrClassMethodParams(t) { + return t.params; + } + checkGetterSetterParams(t) { + let e = this.getGetterSetterExpectedParamCount(t), s = this.getObjectOrClassMethodParams(t); + s.length !== e && this.raise(t.kind === "get" ? p.BadGetterArity : p.BadSetterArity, t), t.kind === "set" && s[s.length - 1]?.type === "RestElement" && this.raise(p.BadSetterRestParameter, t); + } + parseObjectMethod(t, e, s, i, r) { + if (r) { + let n = this.parseMethod(t, e, !1, !1, !1, "ObjectMethod"); + return this.checkGetterSetterParams(n), n; + } + if (s || e || this.match(10)) return i && this.unexpected(), t.kind = "method", t.method = !0, this.parseMethod(t, e, s, !1, !1, "ObjectMethod"); + } + parseObjectProperty(t, e, s, i) { + if (t.shorthand = !1, this.eat(14)) return t.value = s ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowInOrVoidPattern(8, i), this.finishObjectProperty(t); + if (!t.computed && t.key.type === "Identifier") { + if (this.checkReservedWord(t.key.name, t.key.loc.start, !0, !1), s) t.value = this.parseMaybeDefault(e, this.cloneIdentifier(t.key)); + else if (this.match(29)) { + let r = this.state.startLoc; + i != null ? i.shorthandAssignLoc === null && (i.shorthandAssignLoc = r) : this.raise(p.InvalidCoverInitializedName, r), t.value = this.parseMaybeDefault(e, this.cloneIdentifier(t.key)); + } else t.value = this.cloneIdentifier(t.key); + return t.shorthand = !0, this.finishObjectProperty(t); + } + } + finishObjectProperty(t) { + return this.finishNode(t, "ObjectProperty"); + } + parseObjPropValue(t, e, s, i, r, n, o) { + let h = this.parseObjectMethod(t, s, i, r, n) || this.parseObjectProperty(t, e, r, o); + return h || this.unexpected(), h; + } + parsePropertyName(t, e) { + if (this.eat(0)) t.computed = !0, t.key = this.parseMaybeAssignAllowIn(), this.expect(3); + else { + let { type: s, value: i } = this.state, r; + if (O(s)) r = this.parseIdentifier(!0); + else switch (s) { + case 135: + r = this.parseNumericLiteral(i); + break; + case 134: + r = this.parseStringLiteral(i); + break; + case 136: + r = this.parseBigIntLiteral(i); + break; + case 139: { + let n = this.state.startLoc; + e != null ? e.privateKeyLoc === null && (e.privateKeyLoc = n) : this.raise(p.UnexpectedPrivateField, n), r = this.parsePrivateName(); + break; + } + default: this.unexpected(); + } + t.key = r, s !== 139 && (t.computed = !1); + } + } + initFunction(t, e) { + t.id = null, t.generator = !1, t.async = e; + } + parseMethod(t, e, s, i, r, n, o = !1) { + this.initFunction(t, s), t.generator = e, this.scope.enter(530 | (o ? 576 : 0) | (r ? 32 : 0)), this.prodParam.enter(Se(s, t.generator)), this.parseFunctionParams(t, i); + let h = this.parseFunctionBodyAndFinish(t, n, !0); + return this.prodParam.exit(), this.scope.exit(), h; + } + parseArrayLike(t, e, s) { + e && this.expectPlugin("recordAndTuple"); + let i = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !1; + let r = this.startNode(); + return this.next(), r.elements = this.parseExprList(t, !e, s, r), this.state.inFSharpPipelineDirectBody = i, this.finishNode(r, e ? "TupleExpression" : "ArrayExpression"); + } + parseArrowExpression(t, e, s, i) { + this.scope.enter(518); + let r = Se(s, !1); + !this.match(5) && this.prodParam.hasIn && (r |= 8), this.prodParam.enter(r), this.initFunction(t, s); + let n = this.state.maybeInArrowParameters; + return e && (this.state.maybeInArrowParameters = !0, this.setArrowFunctionParameters(t, e, i)), this.state.maybeInArrowParameters = !1, this.parseFunctionBody(t, !0), this.prodParam.exit(), this.scope.exit(), this.state.maybeInArrowParameters = n, this.finishNode(t, "ArrowFunctionExpression"); + } + setArrowFunctionParameters(t, e, s) { + this.toAssignableList(e, s, !1), t.params = e; + } + parseFunctionBodyAndFinish(t, e, s = !1) { + return this.parseFunctionBody(t, !1, s), this.finishNode(t, e); + } + parseFunctionBody(t, e, s = !1) { + let i = e && !this.match(5); + if (this.expressionScope.enter(as()), i) t.body = this.parseMaybeAssign(), this.checkParams(t, !1, e, !1); + else { + let r = this.state.strict, n = this.state.labels; + this.state.labels = [], this.prodParam.enter(this.prodParam.currentFlags() | 4), t.body = this.parseBlock(!0, !1, (o) => { + let h = !this.isSimpleParamList(t.params); + o && h && this.raise(p.IllegalLanguageModeDirective, (t.kind === "method" || t.kind === "constructor") && t.key ? t.key.loc.end : t); + let l = !r && this.state.strict; + this.checkParams(t, !this.state.strict && !e && !s && !h, e, l), this.state.strict && t.id && this.checkIdentifier(t.id, 65, l); + }), this.prodParam.exit(), this.state.labels = n; + } + this.expressionScope.exit(); + } + isSimpleParameter(t) { + return t.type === "Identifier"; + } + isSimpleParamList(t) { + for (let e = 0, s = t.length; e < s; e++) if (!this.isSimpleParameter(t[e])) return !1; + return !0; + } + checkParams(t, e, s, i = !0) { + let r = !e && /* @__PURE__ */ new Set(), n = { type: "FormalParameters" }; + for (let o of t.params) this.checkLVal(o, n, 5, r, i); + } + parseExprList(t, e, s, i) { + let r = [], n = !0; + for (; !this.eat(t);) { + if (n) n = !1; + else if (this.expect(12), this.match(t)) { + i && this.addTrailingCommaExtraToNode(i), this.next(); + break; + } + r.push(this.parseExprListItem(t, e, s)); + } + return r; + } + parseExprListItem(t, e, s, i) { + let r; + if (this.match(12)) e || this.raise(p.UnexpectedToken, this.state.curPosition(), { unexpected: "," }), r = null; + else if (this.match(21)) { + let n = this.state.startLoc; + r = this.parseParenItem(this.parseSpread(s), n); + } else if (this.match(17)) { + this.expectPlugin("partialApplication"), i || this.raise(p.UnexpectedArgumentPlaceholder, this.state.startLoc); + let n = this.startNode(); + this.next(), r = this.finishNode(n, "ArgumentPlaceholder"); + } else r = this.parseMaybeAssignAllowInOrVoidPattern(t, s, this.parseParenItem); + return r; + } + parseIdentifier(t) { + let e = this.startNode(), s = this.parseIdentifierName(t); + return this.createIdentifier(e, s); + } + createIdentifier(t, e) { + return t.name = e, t.loc.identifierName = e, this.finishNode(t, "Identifier"); + } + createIdentifierAt(t, e, s) { + return t.name = e, t.loc.identifierName = e, this.finishNodeAt(t, "Identifier", s); + } + parseIdentifierName(t) { + let e, { startLoc: s, type: i } = this.state; + O(i) ? e = this.state.value : this.unexpected(); + let r = hi(i); + return t ? r && this.replaceToken(132) : this.checkReservedWord(e, s, r, !1), this.next(), e; + } + checkReservedWord(t, e, s, i) { + if (t.length > 10 || !Ii(t)) return; + if (s && wi(t)) { + this.raise(p.UnexpectedKeyword, e, { keyword: t }); + return; + } + if ((this.state.strict ? i ? ts : Zt : Qt)(t, this.inModule)) { + this.raise(p.UnexpectedReservedWord, e, { reservedWord: t }); + return; + } else if (t === "yield") { + if (this.prodParam.hasYield) { + this.raise(p.YieldBindingIdentifier, e); + return; + } + } else if (t === "await") { + if (this.prodParam.hasAwait) { + this.raise(p.AwaitBindingIdentifier, e); + return; + } + if (this.scope.inStaticBlock) { + this.raise(p.AwaitBindingIdentifierInStaticBlock, e); + return; + } + this.expressionScope.recordAsyncArrowParametersError(e); + } else if (t === "arguments" && this.scope.inClassAndNotInNonArrowFunction) { + this.raise(p.ArgumentsInClass, e); + return; + } + } + recordAwaitIfAllowed() { + let t = this.prodParam.hasAwait; + return t && !this.scope.inFunction && (this.state.hasTopLevelAwait = !0), t; + } + parseAwait(t) { + let e = this.startNodeAt(t); + return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter, e), this.eat(55) && this.raise(p.ObsoleteAwaitStar, e), !this.scope.inFunction && !(this.optionFlags & 1) && (this.isAmbiguousPrefixOrIdentifier() ? this.ambiguousScriptDifferentAst = !0 : this.sawUnambiguousESM = !0), this.state.soloAwait || (e.argument = this.parseMaybeUnary(null, !0)), this.finishNode(e, "AwaitExpression"); + } + isAmbiguousPrefixOrIdentifier() { + if (this.hasPrecedingLineBreak()) return !0; + let { type: t } = this.state; + return t === 53 || t === 10 || t === 0 || $e(t) || t === 102 && !this.state.containsEsc || t === 138 || t === 56 || this.hasPlugin("v8intrinsic") && t === 54; + } + parseYield(t) { + let e = this.startNodeAt(t); + this.expressionScope.recordParameterInitializerError(p.YieldInParameter, e); + let s = !1, i = null; + if (!this.hasPrecedingLineBreak()) switch (s = this.eat(55), this.state.type) { + case 13: + case 140: + case 8: + case 11: + case 3: + case 9: + case 14: + case 12: if (!s) break; + default: i = this.parseMaybeAssign(); + } + return e.delegate = s, e.argument = i, this.finishNode(e, "YieldExpression"); + } + parseImportCall(t) { + if (this.next(), t.source = this.parseMaybeAssignAllowIn(), t.options = null, this.eat(12)) { + if (this.match(11)) this.addTrailingCommaExtraToNode(t.source); + else if (t.options = this.parseMaybeAssignAllowIn(), this.eat(12) && (this.addTrailingCommaExtraToNode(t.options), !this.match(11))) { + do + this.parseMaybeAssignAllowIn(); + while (this.eat(12) && !this.match(11)); + this.raise(p.ImportCallArity, t); + } + } + return this.expect(11), this.finishNode(t, "ImportExpression"); + } + checkPipelineAtInfixOperator(t, e) { + this.hasPlugin(["pipelineOperator", { proposal: "smart" }]) && t.type === "SequenceExpression" && this.raise(p.PipelineHeadSequenceExpression, e); + } + parseSmartPipelineBodyInStyle(t, e) { + if (this.isSimpleReference(t)) { + let s = this.startNodeAt(e); + return s.callee = t, this.finishNode(s, "PipelineBareFunction"); + } else { + let s = this.startNodeAt(e); + return this.checkSmartPipeTopicBodyEarlyErrors(e), s.expression = t, this.finishNode(s, "PipelineTopicExpression"); + } + } + isSimpleReference(t) { + switch (t.type) { + case "MemberExpression": return !t.computed && this.isSimpleReference(t.object); + case "Identifier": return !0; + default: return !1; + } + } + checkSmartPipeTopicBodyEarlyErrors(t) { + if (this.match(19)) throw this.raise(p.PipelineBodyNoArrow, this.state.startLoc); + this.topicReferenceWasUsedInCurrentContext() || this.raise(p.PipelineTopicUnused, t); + } + withTopicBindingContext(t) { + let e = this.state.topicContext; + this.state.topicContext = { + maxNumOfResolvableTopics: 1, + maxTopicIndex: null + }; + try { + return t(); + } finally { + this.state.topicContext = e; + } + } + withSmartMixTopicForbiddingContext(t) { + return t(); + } + withSoloAwaitPermittingContext(t) { + let e = this.state.soloAwait; + this.state.soloAwait = !0; + try { + return t(); + } finally { + this.state.soloAwait = e; + } + } + allowInAnd(t) { + let e = this.prodParam.currentFlags(); + if (8 & ~e) { + this.prodParam.enter(e | 8); + try { + return t(); + } finally { + this.prodParam.exit(); + } + } + return t(); + } + disallowInAnd(t) { + let e = this.prodParam.currentFlags(); + if (8 & e) { + this.prodParam.enter(e & -9); + try { + return t(); + } finally { + this.prodParam.exit(); + } + } + return t(); + } + registerTopicReference() { + this.state.topicContext.maxTopicIndex = 0; + } + topicReferenceIsAllowedInCurrentContext() { + return this.state.topicContext.maxNumOfResolvableTopics >= 1; + } + topicReferenceWasUsedInCurrentContext() { + return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; + } + parseFSharpPipelineBody(t) { + let e = this.state.startLoc; + this.state.potentialArrowAt = this.state.start; + let s = this.state.inFSharpPipelineDirectBody; + this.state.inFSharpPipelineDirectBody = !0; + let i = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), e, t); + return this.state.inFSharpPipelineDirectBody = s, i; + } + parseModuleExpression() { + this.expectPlugin("moduleBlocks"); + let t = this.startNode(); + this.next(), this.match(5) || this.unexpected(null, 5); + let e = this.startNodeAt(this.state.endLoc); + this.next(); + let s = this.initializeScopes(!0); + this.enterInitialScopes(); + try { + t.body = this.parseProgram(e, 8, "module"); + } finally { + s(); + } + return this.finishNode(t, "ModuleExpression"); + } + parseVoidPattern(t) { + this.expectPlugin("discardBinding"); + let e = this.startNode(); + return t != null && (t.voidPatternLoc = this.state.startLoc), this.next(), this.finishNode(e, "VoidPattern"); + } + parseMaybeAssignAllowInOrVoidPattern(t, e, s) { + if (e != null && this.match(88)) { + let i = this.lookaheadCharCode(); + if (i === 44 || i === (t === 3 ? 93 : t === 8 ? 125 : 41) || i === 61) return this.parseMaybeDefault(this.state.startLoc, this.parseVoidPattern(e)); + } + return this.parseMaybeAssignAllowIn(e, s); + } + parsePropertyNamePrefixOperator(t) {} + }, ze = { kind: 1 }, sr = { kind: 2 }, ir = /[\uD800-\uDFFF]/u, qe = /in(?:stanceof)?/y; + ut = class extends pt { + parseTopLevel(t, e) { + return t.program = this.parseProgram(e, 140, this.options.sourceType === "module" ? "module" : "script"), t.comments = this.comments, this.optionFlags & 256 && (t.tokens = rr(this.tokens, this.input, this.startIndex)), this.finishNode(t, "File"); + } + parseProgram(t, e, s) { + if (t.sourceType = s, t.interpreter = this.parseInterpreterDirective(), this.parseBlockBody(t, !0, !0, e), this.inModule) { + if (!(this.optionFlags & 64) && this.scope.undefinedExports.size > 0) for (let [r, n] of Array.from(this.scope.undefinedExports)) this.raise(p.ModuleExportUndefined, n, { localName: r }); + this.addExtra(t, "topLevelAwait", this.state.hasTopLevelAwait); + } + let i; + return e === 140 ? i = this.finishNode(t, "Program") : i = this.finishNodeAt(t, "Program", D(this.state.startLoc, -1)), i; + } + stmtToDirective(t) { + let e = this.castNodeTo(t, "Directive"), s = this.castNodeTo(t.expression, "DirectiveLiteral"), i = s.value, r = this.input.slice(this.offsetToSourcePos(s.start), this.offsetToSourcePos(s.end)), n = s.value = r.slice(1, -1); + return this.addExtra(s, "raw", r), this.addExtra(s, "rawValue", n), this.addExtra(s, "expressionValue", i), e.value = s, delete t.expression, e; + } + parseInterpreterDirective() { + if (!this.match(28)) return null; + let t = this.startNode(); + return t.value = this.state.value, this.next(), this.finishNode(t, "InterpreterDirective"); + } + isLet() { + return this.isContextual(100) ? this.hasFollowingBindingAtom() : !1; + } + isUsing() { + return this.isContextual(107) ? this.nextTokenIsIdentifierOnSameLine() : !1; + } + isForUsing() { + if (!this.isContextual(107)) return !1; + let t = this.nextTokenInLineStart(), e = this.codePointAtPos(t); + if (this.isUnparsedContextual(t, "of")) { + let s = this.lookaheadCharCodeSince(t + 2); + if (s !== 61 && s !== 58 && s !== 59) return !1; + } + return !!(this.chStartsBindingIdentifier(e, t) || this.isUnparsedContextual(t, "void")); + } + nextTokenIsIdentifierOnSameLine() { + let t = this.nextTokenInLineStart(), e = this.codePointAtPos(t); + return this.chStartsBindingIdentifier(e, t); + } + isAwaitUsing() { + if (!this.isContextual(96)) return !1; + let t = this.nextTokenInLineStart(); + if (this.isUnparsedContextual(t, "using")) { + t = this.nextTokenInLineStartSince(t + 5); + let e = this.codePointAtPos(t); + if (this.chStartsBindingIdentifier(e, t)) return !0; + } + return !1; + } + chStartsBindingIdentifier(t, e) { + if (B(t)) { + if (qe.lastIndex = e, qe.test(this.input)) { + let s = this.codePointAtPos(qe.lastIndex); + if (!K(s) && s !== 92) return !1; + } + return !0; + } else return t === 92; + } + chStartsBindingPattern(t) { + return t === 91 || t === 123; + } + hasFollowingBindingAtom() { + let t = this.nextTokenStart(), e = this.codePointAtPos(t); + return this.chStartsBindingPattern(e) || this.chStartsBindingIdentifier(e, t); + } + hasInLineFollowingBindingIdentifierOrBrace() { + let t = this.nextTokenInLineStart(), e = this.codePointAtPos(t); + return e === 123 || this.chStartsBindingIdentifier(e, t); + } + allowsUsing() { + return (this.scope.inModule || !this.scope.inTopLevel) && !this.scope.inBareCaseStatement; + } + parseModuleItem() { + return this.parseStatementLike(15); + } + parseStatementListItem() { + return this.parseStatementLike(6 | (!this.options.annexB || this.state.strict ? 0 : 8)); + } + parseStatementOrSloppyAnnexBFunctionDeclaration(t = !1) { + let e = 0; + return this.options.annexB && !this.state.strict && (e |= 4, t && (e |= 8)), this.parseStatementLike(e); + } + parseStatement() { + return this.parseStatementLike(0); + } + parseStatementLike(t) { + let e = null; + return this.match(26) && (e = this.parseDecorators(!0)), this.parseStatementContent(t, e); + } + parseStatementContent(t, e) { + let s = this.state.type, i = this.startNode(), r = !!(t & 2), n = !!(t & 4), o = t & 1; + switch (s) { + case 60: return this.parseBreakContinueStatement(i, !0); + case 63: return this.parseBreakContinueStatement(i, !1); + case 64: return this.parseDebuggerStatement(i); + case 90: return this.parseDoWhileStatement(i); + case 91: return this.parseForStatement(i); + case 68: + if (this.lookaheadCharCode() === 46) break; + return n || this.raise(this.state.strict ? p.StrictFunction : this.options.annexB ? p.SloppyFunctionAnnexB : p.SloppyFunction, this.state.startLoc), this.parseFunctionStatement(i, !1, !r && n); + case 80: return r || this.unexpected(), this.parseClass(this.maybeTakeDecorators(e, i), !0); + case 69: return this.parseIfStatement(i); + case 70: return this.parseReturnStatement(i); + case 71: return this.parseSwitchStatement(i); + case 72: return this.parseThrowStatement(i); + case 73: return this.parseTryStatement(i); + case 96: + if (this.isAwaitUsing()) return this.allowsUsing() ? r ? this.recordAwaitIfAllowed() || this.raise(p.AwaitUsingNotInAsyncContext, i) : this.raise(p.UnexpectedLexicalDeclaration, i) : this.raise(p.UnexpectedUsingDeclaration, i), this.next(), this.parseVarStatement(i, "await using"); + break; + case 107: + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifierOrBrace()) break; + return this.allowsUsing() ? r || this.raise(p.UnexpectedLexicalDeclaration, this.state.startLoc) : this.raise(p.UnexpectedUsingDeclaration, this.state.startLoc), this.parseVarStatement(i, "using"); + case 100: { + if (this.state.containsEsc) break; + let u = this.nextTokenStart(), f = this.codePointAtPos(u); + if (f !== 91 && (!r && this.hasFollowingLineBreak() || !this.chStartsBindingIdentifier(f, u) && f !== 123)) break; + } + case 75: r || this.raise(p.UnexpectedLexicalDeclaration, this.state.startLoc); + case 74: { + let u = this.state.value; + return this.parseVarStatement(i, u); + } + case 92: return this.parseWhileStatement(i); + case 76: return this.parseWithStatement(i); + case 5: return this.parseBlock(); + case 13: return this.parseEmptyStatement(i); + case 83: { + let u = this.lookaheadCharCode(); + if (u === 40 || u === 46) break; + } + case 82: { + !(this.optionFlags & 8) && !o && this.raise(p.UnexpectedImportExport, this.state.startLoc), this.next(); + let u; + return s === 83 ? u = this.parseImport(i) : u = this.parseExport(i, e), this.assertModuleNodeAllowed(u), u; + } + default: if (this.isAsyncFunction()) return r || this.raise(p.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(i, !0, !r && n); + } + let h = this.state.value, l = this.parseExpression(); + return w(s) && l.type === "Identifier" && this.eat(14) ? this.parseLabeledStatement(i, h, l, t) : this.parseExpressionStatement(i, l, e); + } + assertModuleNodeAllowed(t) { + !(this.optionFlags & 8) && !this.inModule && this.raise(p.ImportOutsideModule, t); + } + decoratorsEnabledBeforeExport() { + return this.hasPlugin("decorators-legacy") ? !0 : this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== !1; + } + maybeTakeDecorators(t, e, s) { + return t && (e.decorators?.length ? (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") != "boolean" && this.raise(p.DecoratorsBeforeAfterExport, e.decorators[0]), e.decorators.unshift(...t)) : e.decorators = t, this.resetStartLocationFromNode(e, t[0]), s && this.resetStartLocationFromNode(s, e)), e; + } + canHaveLeadingDecorator() { + return this.match(80); + } + parseDecorators(t) { + let e = []; + do + e.push(this.parseDecorator()); + while (this.match(26)); + if (this.match(82)) t || this.unexpected(), this.decoratorsEnabledBeforeExport() || this.raise(p.DecoratorExportClass, this.state.startLoc); + else if (!this.canHaveLeadingDecorator()) throw this.raise(p.UnexpectedLeadingDecorator, this.state.startLoc); + return e; + } + parseDecorator() { + this.expectOnePlugin(["decorators", "decorators-legacy"]); + let t = this.startNode(); + if (this.next(), this.hasPlugin("decorators")) { + let e = this.state.startLoc, s; + if (this.match(10)) { + let i = this.state.startLoc; + this.next(), s = this.parseExpression(), this.expect(11), s = this.wrapParenthesis(i, s); + let r = this.state.startLoc; + t.expression = this.parseMaybeDecoratorArguments(s, i), this.getPluginOption("decorators", "allowCallParenthesized") === !1 && t.expression !== s && this.raise(p.DecoratorArgumentsOutsideParentheses, r); + } else { + for (s = this.parseIdentifier(!1); this.eat(16);) { + let i = this.startNodeAt(e); + i.object = s, this.match(139) ? (this.classScope.usePrivateName(this.state.value, this.state.startLoc), i.property = this.parsePrivateName()) : i.property = this.parseIdentifier(!0), i.computed = !1, s = this.finishNode(i, "MemberExpression"); + } + t.expression = this.parseMaybeDecoratorArguments(s, e); + } + } else t.expression = this.parseExprSubscripts(); + return this.finishNode(t, "Decorator"); + } + parseMaybeDecoratorArguments(t, e) { + if (this.eat(10)) { + let s = this.startNodeAt(e); + return s.callee = t, s.arguments = this.parseCallExpressionArguments(), this.toReferencedList(s.arguments), this.finishNode(s, "CallExpression"); + } + return t; + } + parseBreakContinueStatement(t, e) { + return this.next(), this.isLineTerminator() ? t.label = null : (t.label = this.parseIdentifier(), this.semicolon()), this.verifyBreakContinue(t, e), this.finishNode(t, e ? "BreakStatement" : "ContinueStatement"); + } + verifyBreakContinue(t, e) { + let s; + for (s = 0; s < this.state.labels.length; ++s) { + let i = this.state.labels[s]; + if ((t.label == null || i.name === t.label.name) && (i.kind != null && (e || i.kind === 1) || t.label && e)) break; + } + if (s === this.state.labels.length) { + let i = e ? "BreakStatement" : "ContinueStatement"; + this.raise(p.IllegalBreakContinue, t, { type: i }); + } + } + parseDebuggerStatement(t) { + return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement"); + } + parseHeaderExpression() { + this.expect(10); + let t = this.parseExpression(); + return this.expect(11), t; + } + parseDoWhileStatement(t) { + return this.next(), this.state.labels.push(ze), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.expect(92), t.test = this.parseHeaderExpression(), this.eat(13), this.finishNode(t, "DoWhileStatement"); + } + parseForStatement(t) { + this.next(), this.state.labels.push(ze); + let e = null; + if (this.isContextual(96) && this.recordAwaitIfAllowed() && (e = this.state.startLoc, this.next()), this.scope.enter(0), this.expect(10), this.match(13)) return e !== null && this.unexpected(e), this.parseFor(t, null); + let s = this.isContextual(100); + { + let h = this.isAwaitUsing(), l = h || this.isForUsing(), u = s && this.hasFollowingBindingAtom() || l; + if (this.match(74) || this.match(75) || u) { + let f = this.startNode(), d; + h ? (d = "await using", this.recordAwaitIfAllowed() || this.raise(p.AwaitUsingNotInAsyncContext, this.state.startLoc), this.next()) : d = this.state.value, this.next(), this.parseVar(f, !0, d); + let x = this.finishNode(f, "VariableDeclaration"), A = this.match(58); + return A && l && this.raise(p.ForInUsing, x), (A || this.isContextual(102)) && x.declarations.length === 1 ? this.parseForIn(t, x, e) : (e !== null && this.unexpected(e), this.parseFor(t, x)); + } + } + let i = this.isContextual(95), r = new Y(), n = this.parseExpression(!0, r), o = this.isContextual(102); + if (o && (s && this.raise(p.ForOfLet, n), e === null && i && n.type === "Identifier" && this.raise(p.ForOfAsync, n)), o || this.match(58)) { + this.checkDestructuringPrivate(r), this.toAssignable(n, !0); + let h = o ? "ForOfStatement" : "ForInStatement"; + return this.checkLVal(n, { type: h }), this.parseForIn(t, n, e); + } else this.checkExpressionErrors(r, !0); + return e !== null && this.unexpected(e), this.parseFor(t, n); + } + parseFunctionStatement(t, e, s) { + return this.next(), this.parseFunction(t, 1 | (s ? 2 : 0) | (e ? 8 : 0)); + } + parseIfStatement(t) { + return this.next(), t.test = this.parseHeaderExpression(), t.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(), t.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null, this.finishNode(t, "IfStatement"); + } + parseReturnStatement(t) { + return this.prodParam.hasReturn || this.raise(p.IllegalReturn, this.state.startLoc), this.next(), this.isLineTerminator() ? t.argument = null : (t.argument = this.parseExpression(), this.semicolon()), this.finishNode(t, "ReturnStatement"); + } + parseSwitchStatement(t) { + this.next(), t.discriminant = this.parseHeaderExpression(); + let e = t.cases = []; + this.expect(5), this.state.labels.push(sr), this.scope.enter(256); + let s; + for (let i; !this.match(8);) if (this.match(61) || this.match(65)) { + let r = this.match(61); + s && this.finishNode(s, "SwitchCase"), e.push(s = this.startNode()), s.consequent = [], this.next(), r ? s.test = this.parseExpression() : (i && this.raise(p.MultipleDefaultsInSwitch, this.state.lastTokStartLoc), i = !0, s.test = null), this.expect(14); + } else s ? s.consequent.push(this.parseStatementListItem()) : this.unexpected(); + return this.scope.exit(), s && this.finishNode(s, "SwitchCase"), this.next(), this.state.labels.pop(), this.finishNode(t, "SwitchStatement"); + } + parseThrowStatement(t) { + return this.next(), this.hasPrecedingLineBreak() && this.raise(p.NewlineAfterThrow, this.state.lastTokEndLoc), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement"); + } + parseCatchClauseParam() { + let t = this.parseBindingAtom(); + return this.scope.enter(this.options.annexB && t.type === "Identifier" ? 8 : 0), this.checkLVal(t, { type: "CatchClause" }, 9), t; + } + parseTryStatement(t) { + if (this.next(), t.block = this.parseBlock(), t.handler = null, this.match(62)) { + let e = this.startNode(); + this.next(), this.match(10) ? (this.expect(10), e.param = this.parseCatchClauseParam(), this.expect(11)) : (e.param = null, this.scope.enter(0)), e.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(!1, !1)), this.scope.exit(), t.handler = this.finishNode(e, "CatchClause"); + } + return t.finalizer = this.eat(67) ? this.parseBlock() : null, !t.handler && !t.finalizer && this.raise(p.NoCatchOrFinally, t), this.finishNode(t, "TryStatement"); + } + parseVarStatement(t, e, s = !1) { + return this.next(), this.parseVar(t, !1, e, s), this.semicolon(), this.finishNode(t, "VariableDeclaration"); + } + parseWhileStatement(t) { + return this.next(), t.test = this.parseHeaderExpression(), this.state.labels.push(ze), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.state.labels.pop(), this.finishNode(t, "WhileStatement"); + } + parseWithStatement(t) { + return this.state.strict && this.raise(p.StrictWith, this.state.startLoc), this.next(), t.object = this.parseHeaderExpression(), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.finishNode(t, "WithStatement"); + } + parseEmptyStatement(t) { + return this.next(), this.finishNode(t, "EmptyStatement"); + } + parseLabeledStatement(t, e, s, i) { + for (let n of this.state.labels) n.name === e && this.raise(p.LabelRedeclaration, s, { labelName: e }); + let r = pi(this.state.type) ? 1 : this.match(71) ? 2 : null; + for (let n = this.state.labels.length - 1; n >= 0; n--) { + let o = this.state.labels[n]; + if (o.statementStart === t.start) o.statementStart = this.sourceToOffsetPos(this.state.start), o.kind = r; + else break; + } + return this.state.labels.push({ + name: e, + kind: r, + statementStart: this.sourceToOffsetPos(this.state.start) + }), t.body = i & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0) : this.parseStatement(), this.state.labels.pop(), t.label = s, this.finishNode(t, "LabeledStatement"); + } + parseExpressionStatement(t, e, s) { + return t.expression = e, this.semicolon(), this.finishNode(t, "ExpressionStatement"); + } + parseBlock(t = !1, e = !0, s) { + let i = this.startNode(); + return t && this.state.strictErrors.clear(), this.expect(5), e && this.scope.enter(0), this.parseBlockBody(i, t, !1, 8, s), e && this.scope.exit(), this.finishNode(i, "BlockStatement"); + } + isValidDirective(t) { + return t.type === "ExpressionStatement" && t.expression.type === "StringLiteral" && !t.expression.extra.parenthesized; + } + parseBlockBody(t, e, s, i, r) { + let n = t.body = [], o = t.directives = []; + this.parseBlockOrModuleBlockBody(n, e ? o : void 0, s, i, r); + } + parseBlockOrModuleBlockBody(t, e, s, i, r) { + let n = this.state.strict, o = !1, h = !1; + for (; !this.match(i);) { + let l = s ? this.parseModuleItem() : this.parseStatementListItem(); + if (e && !h) { + if (this.isValidDirective(l)) { + let u = this.stmtToDirective(l); + e.push(u), !o && u.value.value === "use strict" && (o = !0, this.setStrict(!0)); + continue; + } + h = !0, this.state.strictErrors.clear(); + } + t.push(l); + } + r?.call(this, o), n || this.setStrict(!1), this.next(); + } + parseFor(t, e) { + return t.init = e, this.semicolon(!1), t.test = this.match(13) ? null : this.parseExpression(), this.semicolon(!1), t.update = this.match(11) ? null : this.parseExpression(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.scope.exit(), this.state.labels.pop(), this.finishNode(t, "ForStatement"); + } + parseForIn(t, e, s) { + let i = this.match(58); + return this.next(), i ? s !== null && this.unexpected(s) : t.await = s !== null, e.type === "VariableDeclaration" && e.declarations[0].init != null && (!i || !this.options.annexB || this.state.strict || e.kind !== "var" || e.declarations[0].id.type !== "Identifier") && this.raise(p.ForInOfLoopInitializer, e, { type: i ? "ForInStatement" : "ForOfStatement" }), e.type === "AssignmentPattern" && this.raise(p.InvalidLhs, e, { ancestor: { type: "ForStatement" } }), t.left = e, t.right = i ? this.parseExpression() : this.parseMaybeAssignAllowIn(), this.expect(11), t.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()), this.scope.exit(), this.state.labels.pop(), this.finishNode(t, i ? "ForInStatement" : "ForOfStatement"); + } + parseVar(t, e, s, i = !1) { + let r = t.declarations = []; + for (t.kind = s;;) { + let n = this.startNode(); + if (this.parseVarId(n, s), n.init = this.eat(29) ? e ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn() : null, n.init === null && !i && (n.id.type !== "Identifier" && !(e && (this.match(58) || this.isContextual(102))) ? this.raise(p.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: "destructuring" }) : (s === "const" || s === "using" || s === "await using") && !(this.match(58) || this.isContextual(102)) && this.raise(p.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: s })), r.push(this.finishNode(n, "VariableDeclarator")), !this.eat(12)) break; + } + return t; + } + parseVarId(t, e) { + let s = this.parseBindingAtom(); + e === "using" || e === "await using" ? (s.type === "ArrayPattern" || s.type === "ObjectPattern") && this.raise(p.UsingDeclarationHasBindingPattern, s.loc.start) : s.type === "VoidPattern" && this.raise(p.UnexpectedVoidPattern, s.loc.start), this.checkLVal(s, { type: "VariableDeclarator" }, e === "var" ? 5 : 8201), t.id = s; + } + parseAsyncFunctionExpression(t) { + return this.parseFunction(t, 8); + } + parseFunction(t, e = 0) { + let s = e & 2, i = !!(e & 1), r = i && !(e & 4), n = !!(e & 8); + this.initFunction(t, n), this.match(55) && (s && this.raise(p.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), t.generator = !0), i && (t.id = this.parseFunctionId(r)); + let o = this.state.maybeInArrowParameters; + return this.state.maybeInArrowParameters = !1, this.scope.enter(514), this.prodParam.enter(Se(n, t.generator)), i || (t.id = this.parseFunctionId()), this.parseFunctionParams(t, !1), this.withSmartMixTopicForbiddingContext(() => { + this.parseFunctionBodyAndFinish(t, i ? "FunctionDeclaration" : "FunctionExpression"); + }), this.prodParam.exit(), this.scope.exit(), i && !s && this.registerFunctionStatementId(t), this.state.maybeInArrowParameters = o, t; + } + parseFunctionId(t) { + return t || w(this.state.type) ? this.parseIdentifier() : null; + } + parseFunctionParams(t, e) { + this.expect(10), this.expressionScope.enter(zi()), t.params = this.parseBindingList(11, 41, 2 | (e ? 4 : 0)), this.expressionScope.exit(); + } + registerFunctionStatementId(t) { + t.id && this.scope.declareName(t.id.name, !this.options.annexB || this.state.strict || t.generator || t.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, t.id.loc.start); + } + parseClass(t, e, s) { + this.next(); + let i = this.state.strict; + return this.state.strict = !0, this.parseClassId(t, e, s), this.parseClassSuper(t), t.body = this.parseClassBody(!!t.superClass, i), this.finishNode(t, e ? "ClassDeclaration" : "ClassExpression"); + } + isClassProperty() { + return this.match(29) || this.match(13) || this.match(8); + } + isClassMethod() { + return this.match(10); + } + nameIsConstructor(t) { + return t.type === "Identifier" && t.name === "constructor" || t.type === "StringLiteral" && t.value === "constructor"; + } + isNonstaticConstructor(t) { + return !t.computed && !t.static && this.nameIsConstructor(t.key); + } + parseClassBody(t, e) { + this.classScope.enter(); + let s = { + hadConstructor: !1, + hadSuperClass: t + }, i = [], r = this.startNode(); + if (r.body = [], this.expect(5), this.withSmartMixTopicForbiddingContext(() => { + for (; !this.match(8);) { + if (this.eat(13)) { + if (i.length > 0) throw this.raise(p.DecoratorSemicolon, this.state.lastTokEndLoc); + continue; + } + if (this.match(26)) { + i.push(this.parseDecorator()); + continue; + } + let n = this.startNode(); + i.length && (n.decorators = i, this.resetStartLocationFromNode(n, i[0]), i = []), this.parseClassMember(r, n, s), n.kind === "constructor" && n.decorators && n.decorators.length > 0 && this.raise(p.DecoratorConstructor, n); + } + }), this.state.strict = e, this.next(), i.length) throw this.raise(p.TrailingDecorator, this.state.startLoc); + return this.classScope.exit(), this.finishNode(r, "ClassBody"); + } + parseClassMemberFromModifier(t, e) { + let s = this.parseIdentifier(!0); + if (this.isClassMethod()) { + let i = e; + return i.kind = "method", i.computed = !1, i.key = s, i.static = !1, this.pushClassMethod(t, i, !1, !1, !1, !1), !0; + } else if (this.isClassProperty()) { + let i = e; + return i.computed = !1, i.key = s, i.static = !1, t.body.push(this.parseClassProperty(i)), !0; + } + return this.resetPreviousNodeTrailingComments(s), !1; + } + parseClassMember(t, e, s) { + let i = this.isContextual(106); + if (i) { + if (this.parseClassMemberFromModifier(t, e)) return; + if (this.eat(5)) { + this.parseClassStaticBlock(t, e); + return; + } + } + this.parseClassMemberWithIsStatic(t, e, s, i); + } + parseClassMemberWithIsStatic(t, e, s, i) { + let r = e, n = e, o = e, h = e, l = e, u = r, f = r; + if (e.static = i, this.parsePropertyNamePrefixOperator(e), this.eat(55)) { + u.kind = "method"; + let C = this.match(139); + if (this.parseClassElementName(u), this.parsePostMemberNameModifiers(u), C) { + this.pushClassPrivateMethod(t, n, !0, !1); + return; + } + this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsGenerator, r.key), this.pushClassMethod(t, r, !0, !1, !1, !1); + return; + } + let d = !this.state.containsEsc && w(this.state.type), x = this.parseClassElementName(e), A = d ? x.name : null, k = this.isPrivateName(x), N = this.state.startLoc; + if (this.parsePostMemberNameModifiers(f), this.isClassMethod()) { + if (u.kind = "method", k) { + this.pushClassPrivateMethod(t, n, !1, !1); + return; + } + let C = this.isNonstaticConstructor(r), I = !1; + C && (r.kind = "constructor", s.hadConstructor && !this.hasPlugin("typescript") && this.raise(p.DuplicateConstructor, x), C && this.hasPlugin("typescript") && e.override && this.raise(p.OverrideOnConstructor, x), s.hadConstructor = !0, I = s.hadSuperClass), this.pushClassMethod(t, r, !1, !1, C, I); + } else if (this.isClassProperty()) k ? this.pushClassPrivateProperty(t, h) : this.pushClassProperty(t, o); + else if (A === "async" && !this.isLineTerminator()) { + this.resetPreviousNodeTrailingComments(x); + let C = this.eat(55); + f.optional && this.unexpected(N), u.kind = "method"; + let I = this.match(139); + this.parseClassElementName(u), this.parsePostMemberNameModifiers(f), I ? this.pushClassPrivateMethod(t, n, C, !0) : (this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsAsync, r.key), this.pushClassMethod(t, r, C, !0, !1, !1)); + } else if ((A === "get" || A === "set") && !(this.match(55) && this.isLineTerminator())) { + this.resetPreviousNodeTrailingComments(x), u.kind = A; + let C = this.match(139); + this.parseClassElementName(r), C ? this.pushClassPrivateMethod(t, n, !1, !1) : (this.isNonstaticConstructor(r) && this.raise(p.ConstructorIsAccessor, r.key), this.pushClassMethod(t, r, !1, !1, !1, !1)), this.checkGetterSetterParams(r); + } else if (A === "accessor" && !this.isLineTerminator()) { + this.expectPlugin("decoratorAutoAccessors"), this.resetPreviousNodeTrailingComments(x); + let C = this.match(139); + this.parseClassElementName(o), this.pushClassAccessorProperty(t, l, C); + } else this.isLineTerminator() ? k ? this.pushClassPrivateProperty(t, h) : this.pushClassProperty(t, o) : this.unexpected(); + } + parseClassElementName(t) { + let { type: e, value: s } = this.state; + if ((e === 132 || e === 134) && t.static && s === "prototype" && this.raise(p.StaticPrototype, this.state.startLoc), e === 139) { + s === "constructor" && this.raise(p.ConstructorClassPrivateField, this.state.startLoc); + let i = this.parsePrivateName(); + return t.key = i, i; + } + return this.parsePropertyName(t), t.key; + } + parseClassStaticBlock(t, e) { + this.scope.enter(720); + let s = this.state.labels; + this.state.labels = [], this.prodParam.enter(0); + let i = e.body = []; + this.parseBlockOrModuleBlockBody(i, void 0, !1, 8), this.prodParam.exit(), this.scope.exit(), this.state.labels = s, t.body.push(this.finishNode(e, "StaticBlock")), e.decorators?.length && this.raise(p.DecoratorStaticBlock, e); + } + pushClassProperty(t, e) { + !e.computed && this.nameIsConstructor(e.key) && this.raise(p.ConstructorClassField, e.key), t.body.push(this.parseClassProperty(e)); + } + pushClassPrivateProperty(t, e) { + let s = this.parseClassPrivateProperty(e); + t.body.push(s), this.classScope.declarePrivateName(this.getPrivateNameSV(s.key), 0, s.key.loc.start); + } + pushClassAccessorProperty(t, e, s) { + !s && !e.computed && this.nameIsConstructor(e.key) && this.raise(p.ConstructorClassField, e.key); + let i = this.parseClassAccessorProperty(e); + t.body.push(i), s && this.classScope.declarePrivateName(this.getPrivateNameSV(i.key), 0, i.key.loc.start); + } + pushClassMethod(t, e, s, i, r, n) { + t.body.push(this.parseMethod(e, s, i, r, n, "ClassMethod", !0)); + } + pushClassPrivateMethod(t, e, s, i) { + let r = this.parseMethod(e, s, i, !1, !1, "ClassPrivateMethod", !0); + t.body.push(r); + let n = r.kind === "get" ? r.static ? 6 : 2 : r.kind === "set" ? r.static ? 5 : 1 : 0; + this.declareClassPrivateMethodInScope(r, n); + } + declareClassPrivateMethodInScope(t, e) { + this.classScope.declarePrivateName(this.getPrivateNameSV(t.key), e, t.key.loc.start); + } + parsePostMemberNameModifiers(t) {} + parseClassPrivateProperty(t) { + return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassPrivateProperty"); + } + parseClassProperty(t) { + return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassProperty"); + } + parseClassAccessorProperty(t) { + return this.parseInitializer(t), this.semicolon(), this.finishNode(t, "ClassAccessorProperty"); + } + parseInitializer(t) { + this.scope.enter(592), this.expressionScope.enter(as()), this.prodParam.enter(0), t.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null, this.expressionScope.exit(), this.prodParam.exit(), this.scope.exit(); + } + parseClassId(t, e, s, i = 8331) { + if (w(this.state.type)) t.id = this.parseIdentifier(), e && this.declareNameFromIdentifier(t.id, i); + else if (s || !e) t.id = null; + else throw this.raise(p.MissingClassName, this.state.startLoc); + } + parseClassSuper(t) { + t.superClass = this.eat(81) ? this.parseExprSubscripts() : null; + } + parseExport(t, e) { + let s = this.parseMaybeImportPhase(t, !0), i = this.maybeParseExportDefaultSpecifier(t, s), r = !i || this.eat(12), n = r && this.eatExportStar(t), o = n && this.maybeParseExportNamespaceSpecifier(t), h = r && (!o || this.eat(12)), l = i || n; + if (n && !o) { + if (i && this.unexpected(), e) throw this.raise(p.UnsupportedDecoratorExport, t); + return this.parseExportFrom(t, !0), this.sawUnambiguousESM = !0, this.finishNode(t, "ExportAllDeclaration"); + } + let u = this.maybeParseExportNamedSpecifiers(t); + i && r && !n && !u && this.unexpected(null, 5), o && h && this.unexpected(null, 98); + let f; + if (l || u) { + if (f = !1, e) throw this.raise(p.UnsupportedDecoratorExport, t); + this.parseExportFrom(t, l); + } else f = this.maybeParseExportDeclaration(t); + if (l || u || f) { + let d = t; + if (this.checkExport(d, !0, !1, !!d.source), d.declaration?.type === "ClassDeclaration") this.maybeTakeDecorators(e, d.declaration, d); + else if (e) throw this.raise(p.UnsupportedDecoratorExport, t); + return this.sawUnambiguousESM = !0, this.finishNode(d, "ExportNamedDeclaration"); + } + if (this.eat(65)) { + let d = t, x = this.parseExportDefaultExpression(); + if (d.declaration = x, x.type === "ClassDeclaration") this.maybeTakeDecorators(e, x, d); + else if (e) throw this.raise(p.UnsupportedDecoratorExport, t); + return this.checkExport(d, !0, !0), this.sawUnambiguousESM = !0, this.finishNode(d, "ExportDefaultDeclaration"); + } + throw this.unexpected(null, 5); + } + eatExportStar(t) { + return this.eat(55); + } + maybeParseExportDefaultSpecifier(t, e) { + if (e || this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom", e?.loc.start); + let s = e || this.parseIdentifier(!0), i = this.startNodeAtNode(s); + return i.exported = s, t.specifiers = [this.finishNode(i, "ExportDefaultSpecifier")], !0; + } + return !1; + } + maybeParseExportNamespaceSpecifier(t) { + if (this.isContextual(93)) { + t.specifiers ?? (t.specifiers = []); + let e = this.startNodeAt(this.state.lastTokStartLoc); + return this.next(), e.exported = this.parseModuleExportName(), t.specifiers.push(this.finishNode(e, "ExportNamespaceSpecifier")), !0; + } + return !1; + } + maybeParseExportNamedSpecifiers(t) { + if (this.match(5)) { + let e = t; + e.specifiers || (e.specifiers = []); + let s = e.exportKind === "type"; + return e.specifiers.push(...this.parseExportSpecifiers(s)), e.source = null, e.attributes = [], e.declaration = null, !0; + } + return !1; + } + maybeParseExportDeclaration(t) { + return this.shouldParseExportDeclaration() ? (t.specifiers = [], t.source = null, t.attributes = [], t.declaration = this.parseExportDeclaration(t), !0) : !1; + } + isAsyncFunction() { + if (!this.isContextual(95)) return !1; + let t = this.nextTokenInLineStart(); + return this.isUnparsedContextual(t, "function"); + } + parseExportDefaultExpression() { + let t = this.startNode(); + if (this.match(68)) return this.next(), this.parseFunction(t, 5); + if (this.isAsyncFunction()) return this.next(), this.next(), this.parseFunction(t, 13); + if (this.match(80)) return this.parseClass(t, !0, !0); + if (this.match(26)) return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(p.DecoratorBeforeExport, this.state.startLoc), this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1), this.startNode()), !0, !0); + if (this.match(75) || this.match(74) || this.isLet() || this.isUsing() || this.isAwaitUsing()) throw this.raise(p.UnsupportedDefaultExport, this.state.startLoc); + let e = this.parseMaybeAssignAllowIn(); + return this.semicolon(), e; + } + parseExportDeclaration(t) { + return this.match(80) ? this.parseClass(this.startNode(), !0, !1) : this.parseStatementListItem(); + } + isExportDefaultSpecifier() { + let { type: t } = this.state; + if (w(t)) { + if (t === 95 && !this.state.containsEsc || t === 100) return !1; + if ((t === 130 || t === 129) && !this.state.containsEsc) { + let i = this.nextTokenStart(), r = this.input.charCodeAt(i); + if (r === 123 || this.chStartsBindingIdentifier(r, i) && !this.input.startsWith("from", i)) return this.expectOnePlugin(["flow", "typescript"]), !1; + } + } else if (!this.match(65)) return !1; + let e = this.nextTokenStart(), s = this.isUnparsedContextual(e, "from"); + if (this.input.charCodeAt(e) === 44 || w(this.state.type) && s) return !0; + if (this.match(65) && s) { + let i = this.input.charCodeAt(this.nextTokenStartSince(e + 4)); + return i === 34 || i === 39; + } + return !1; + } + parseExportFrom(t, e) { + this.eatContextual(98) ? (t.source = this.parseImportSource(), this.checkExport(t), this.maybeParseImportAttributes(t), this.checkJSONModuleImport(t)) : e && this.unexpected(), this.semicolon(); + } + shouldParseExportDeclaration() { + let { type: t } = this.state; + return t === 26 && (this.expectOnePlugin(["decorators", "decorators-legacy"]), this.hasPlugin("decorators")) ? (this.getPluginOption("decorators", "decoratorsBeforeExport") === !0 && this.raise(p.DecoratorBeforeExport, this.state.startLoc), !0) : this.isUsing() ? (this.raise(p.UsingDeclarationExport, this.state.startLoc), !0) : this.isAwaitUsing() ? (this.raise(p.UsingDeclarationExport, this.state.startLoc), !0) : t === 74 || t === 75 || t === 68 || t === 80 || this.isLet() || this.isAsyncFunction(); + } + checkExport(t, e, s, i) { + if (e) { + if (s) { + if (this.checkDuplicateExports(t, "default"), this.hasPlugin("exportDefaultFrom")) { + let r = t.declaration; + r.type === "Identifier" && r.name === "from" && r.end - r.start === 4 && !r.extra?.parenthesized && this.raise(p.ExportDefaultFromAsIdentifier, r); + } + } else if (t.specifiers?.length) for (let r of t.specifiers) { + let { exported: n } = r, o = n.type === "Identifier" ? n.name : n.value; + if (this.checkDuplicateExports(r, o), !i && r.local) { + let { local: h } = r; + h.type !== "Identifier" ? this.raise(p.ExportBindingIsString, r, { + localName: h.value, + exportName: o + }) : (this.checkReservedWord(h.name, h.loc.start, !0, !1), this.scope.checkLocalExport(h)); + } + } + else if (t.declaration) { + let r = t.declaration; + if (r.type === "FunctionDeclaration" || r.type === "ClassDeclaration") { + let { id: n } = r; + if (!n) throw new Error("Assertion failure"); + this.checkDuplicateExports(t, n.name); + } else if (r.type === "VariableDeclaration") for (let n of r.declarations) this.checkDeclaration(n.id); + } + } + } + checkDeclaration(t) { + if (t.type === "Identifier") this.checkDuplicateExports(t, t.name); + else if (t.type === "ObjectPattern") for (let e of t.properties) this.checkDeclaration(e); + else if (t.type === "ArrayPattern") for (let e of t.elements) e && this.checkDeclaration(e); + else t.type === "ObjectProperty" ? this.checkDeclaration(t.value) : t.type === "RestElement" ? this.checkDeclaration(t.argument) : t.type === "AssignmentPattern" && this.checkDeclaration(t.left); + } + checkDuplicateExports(t, e) { + this.exportedIdentifiers.has(e) && (e === "default" ? this.raise(p.DuplicateDefaultExport, t) : this.raise(p.DuplicateExport, t, { exportName: e })), this.exportedIdentifiers.add(e); + } + parseExportSpecifiers(t) { + let e = [], s = !0; + for (this.expect(5); !this.eat(8);) { + if (s) s = !1; + else if (this.expect(12), this.eat(8)) break; + let i = this.isContextual(130), r = this.match(134), n = this.startNode(); + n.local = this.parseModuleExportName(), e.push(this.parseExportSpecifier(n, r, t, i)); + } + return e; + } + parseExportSpecifier(t, e, s, i) { + return this.eatContextual(93) ? t.exported = this.parseModuleExportName() : e ? t.exported = this.cloneStringLiteral(t.local) : t.exported || (t.exported = this.cloneIdentifier(t.local)), this.finishNode(t, "ExportSpecifier"); + } + parseModuleExportName() { + if (this.match(134)) { + let t = this.parseStringLiteral(this.state.value), e = ir.exec(t.value); + return e && this.raise(p.ModuleExportNameHasLoneSurrogate, t, { surrogateCharCode: e[0].charCodeAt(0) }), t; + } + return this.parseIdentifier(!0); + } + isJSONModuleImport(t) { + return t.assertions != null ? t.assertions.some(({ key: e, value: s }) => s.value === "json" && (e.type === "Identifier" ? e.name === "type" : e.value === "type")) : !1; + } + checkImportReflection(t) { + let { specifiers: e } = t, s = e.length === 1 ? e[0].type : null; + t.phase === "source" ? s !== "ImportDefaultSpecifier" && this.raise(p.SourcePhaseImportRequiresDefault, e[0].loc.start) : t.phase === "defer" ? s !== "ImportNamespaceSpecifier" && this.raise(p.DeferImportRequiresNamespace, e[0].loc.start) : t.module && (s !== "ImportDefaultSpecifier" && this.raise(p.ImportReflectionNotBinding, e[0].loc.start), t.assertions?.length > 0 && this.raise(p.ImportReflectionHasAssertion, e[0].loc.start)); + } + checkJSONModuleImport(t) { + if (this.isJSONModuleImport(t) && t.type !== "ExportAllDeclaration") { + let { specifiers: e } = t; + if (e != null) { + let s = e.find((i) => { + let r; + if (i.type === "ExportSpecifier" ? r = i.local : i.type === "ImportSpecifier" && (r = i.imported), r !== void 0) return r.type === "Identifier" ? r.name !== "default" : r.value !== "default"; + }); + s !== void 0 && this.raise(p.ImportJSONBindingNotDefault, s.loc.start); + } + } + } + isPotentialImportPhase(t) { + return t ? !1 : this.isContextual(105) || this.isContextual(97); + } + applyImportPhase(t, e, s, i) { + e || (this.hasPlugin("importReflection") && (t.module = !1), s === "source" ? (this.expectPlugin("sourcePhaseImports", i), t.phase = "source") : s === "defer" ? (this.expectPlugin("deferredImportEvaluation", i), t.phase = "defer") : this.hasPlugin("sourcePhaseImports") && (t.phase = null)); + } + parseMaybeImportPhase(t, e) { + if (!this.isPotentialImportPhase(e)) return this.applyImportPhase(t, e, null), null; + let s = this.startNode(), i = this.parseIdentifierName(!0), { type: r } = this.state; + return (O(r) ? r !== 98 || this.lookaheadCharCode() === 102 : r !== 12) ? (this.applyImportPhase(t, e, i, s.loc.start), null) : (this.applyImportPhase(t, e, null), this.createIdentifier(s, i)); + } + isPrecedingIdImportPhase(t) { + let { type: e } = this.state; + return w(e) ? e !== 98 || this.lookaheadCharCode() === 102 : e !== 12; + } + parseImport(t) { + return this.match(134) ? this.parseImportSourceAndAttributes(t) : this.parseImportSpecifiersAndAfter(t, this.parseMaybeImportPhase(t, !1)); + } + parseImportSpecifiersAndAfter(t, e) { + t.specifiers = []; + let i = !this.maybeParseDefaultImportSpecifier(t, e) || this.eat(12), r = i && this.maybeParseStarImportSpecifier(t); + return i && !r && this.parseNamedImportSpecifiers(t), this.expectContextual(98), this.parseImportSourceAndAttributes(t); + } + parseImportSourceAndAttributes(t) { + return t.specifiers ?? (t.specifiers = []), t.source = this.parseImportSource(), this.maybeParseImportAttributes(t), this.checkImportReflection(t), this.checkJSONModuleImport(t), this.semicolon(), this.sawUnambiguousESM = !0, this.finishNode(t, "ImportDeclaration"); + } + parseImportSource() { + return this.match(134) || this.unexpected(), this.parseExprAtom(); + } + parseImportSpecifierLocal(t, e, s) { + e.local = this.parseIdentifier(), t.specifiers.push(this.finishImportSpecifier(e, s)); + } + finishImportSpecifier(t, e, s = 8201) { + return this.checkLVal(t.local, { type: e }, s), this.finishNode(t, e); + } + parseImportAttributes() { + this.expect(5); + let t = [], e = /* @__PURE__ */ new Set(); + do { + if (this.match(8)) break; + let s = this.startNode(), i = this.state.value; + if (e.has(i) && this.raise(p.ModuleAttributesWithDuplicateKeys, this.state.startLoc, { key: i }), e.add(i), this.match(134) ? s.key = this.parseStringLiteral(i) : s.key = this.parseIdentifier(!0), this.expect(14), !this.match(134)) throw this.raise(p.ModuleAttributeInvalidValue, this.state.startLoc); + s.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(s, "ImportAttribute")); + } while (this.eat(12)); + return this.expect(8), t; + } + parseModuleAttributes() { + let t = [], e = /* @__PURE__ */ new Set(); + do { + let s = this.startNode(); + if (s.key = this.parseIdentifier(!0), s.key.name !== "type" && this.raise(p.ModuleAttributeDifferentFromType, s.key), e.has(s.key.name) && this.raise(p.ModuleAttributesWithDuplicateKeys, s.key, { key: s.key.name }), e.add(s.key.name), this.expect(14), !this.match(134)) throw this.raise(p.ModuleAttributeInvalidValue, this.state.startLoc); + s.value = this.parseStringLiteral(this.state.value), t.push(this.finishNode(s, "ImportAttribute")); + } while (this.eat(12)); + return t; + } + maybeParseImportAttributes(t) { + let e; + if (this.match(76)) { + if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) return; + this.next(), e = this.parseImportAttributes(); + } else this.isContextual(94) && !this.hasPrecedingLineBreak() ? (this.hasPlugin("deprecatedImportAssert") || this.raise(p.ImportAttributesUseAssert, this.state.startLoc), this.addExtra(t, "deprecatedAssertSyntax", !0), this.next(), e = this.parseImportAttributes()) : e = []; + t.attributes = e; + } + maybeParseDefaultImportSpecifier(t, e) { + if (e) { + let s = this.startNodeAtNode(e); + return s.local = e, t.specifiers.push(this.finishImportSpecifier(s, "ImportDefaultSpecifier")), !0; + } else if (O(this.state.type)) return this.parseImportSpecifierLocal(t, this.startNode(), "ImportDefaultSpecifier"), !0; + return !1; + } + maybeParseStarImportSpecifier(t) { + if (this.match(55)) { + let e = this.startNode(); + return this.next(), this.expectContextual(93), this.parseImportSpecifierLocal(t, e, "ImportNamespaceSpecifier"), !0; + } + return !1; + } + parseNamedImportSpecifiers(t) { + let e = !0; + for (this.expect(5); !this.eat(8);) { + if (e) e = !1; + else { + if (this.eat(14)) throw this.raise(p.DestructureNamedImport, this.state.startLoc); + if (this.expect(12), this.eat(8)) break; + } + let s = this.startNode(), i = this.match(134), r = this.isContextual(130); + s.imported = this.parseModuleExportName(); + let n = this.parseImportSpecifier(s, i, t.importKind === "type" || t.importKind === "typeof", r, void 0); + t.specifiers.push(n); + } + } + parseImportSpecifier(t, e, s, i, r) { + if (this.eatContextual(93)) t.local = this.parseIdentifier(); + else { + let { imported: n } = t; + if (e) throw this.raise(p.ImportBindingIsString, t, { importName: n.value }); + this.checkReservedWord(n.name, t.loc.start, !0, !0), t.local || (t.local = this.cloneIdentifier(n)); + } + return this.finishImportSpecifier(t, "ImportSpecifier", r); + } + isThisParam(t) { + return t.type === "Identifier" && t.name === "this"; + } + }, Ee = class extends ut { + constructor(t, e, s) { + let i = ii(t); + super(i, e), this.options = i, this.initializeScopes(), this.plugins = s, this.filename = i.sourceFilename, this.startIndex = i.startIndex; + let r = 0; + i.allowAwaitOutsideFunction && (r |= 1), i.allowReturnOutsideFunction && (r |= 2), i.allowImportExportEverywhere && (r |= 8), i.allowSuperOutsideMethod && (r |= 16), i.allowUndeclaredExports && (r |= 64), i.allowNewTargetOutsideFunction && (r |= 4), i.allowYieldOutsideFunction && (r |= 32), i.ranges && (r |= 128), i.tokens && (r |= 256), i.createImportExpressions && (r |= 512), i.createParenthesizedExpressions && (r |= 1024), i.errorRecovery && (r |= 2048), i.attachComment && (r |= 4096), i.annexB && (r |= 8192), this.optionFlags = r; + } + getScopeHandler() { + return fe; + } + parse() { + this.enterInitialScopes(); + let t = this.startNode(), e = this.startNode(); + this.nextToken(), t.errors = null; + let s = this.parseTopLevel(t, e); + return s.errors = this.state.errors, s.comments.length = this.state.commentsLen, s; + } + }; + ar(oi); + Wt = /* @__PURE__ */ new Map(); + cs = ke(" "), ls = ke(/[^\n\r]/u); + ps = or; + us = (a) => a === ` +` || a === "\r" || a === "\u2028" || a === "\u2029"; + fs = hr; + ds = cr; + ms = lr; + ve = pr; + ee = (a, t) => (e, s, ...i) => e | 1 && s == null ? void 0 : (t.call(s) ?? s[a]).apply(s, i); + ur = Array.prototype.findLast ?? function(a) { + for (let t = this.length - 1; t >= 0; t--) { + let e = this[t]; + if (a(e, t, this)) return e; + } + }, xs = ee("findLast", function() { + if (Array.isArray(this)) return ur; + }); + Ps = ee("at", function() { + if (Array.isArray(this) || typeof this == "string") return dr; + }); + te = yr; + se = te([ + "Block", + "CommentBlock", + "MultiLine" + ]); + gs = te([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + St = /* @__PURE__ */ new WeakMap(); + Ts = gr; + wt = /* @__PURE__ */ new WeakMap(); + Ct = br; + bs = Ar; + As = Sr; + me = null; + wr = 10; + for (let a = 0; a <= wr; a++) ye(); + Ss = Cr; + c = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + Cs = Ss({ + AccessorProperty: c[0], + AnyTypeAnnotation: c[1], + ArgumentPlaceholder: c[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: c[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: c[3], + AsExpression: c[4], + AssignmentExpression: c[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: c[6], + BigIntLiteral: c[1], + BigIntLiteralTypeAnnotation: c[1], + BigIntTypeAnnotation: c[1], + BinaryExpression: c[5], + BindExpression: ["object", "callee"], + BlockStatement: c[7], + BooleanLiteral: c[1], + BooleanLiteralTypeAnnotation: c[1], + BooleanTypeAnnotation: c[1], + BreakStatement: c[8], + CallExpression: c[9], + CatchClause: ["param", "body"], + ChainExpression: c[3], + ClassAccessorProperty: c[0], + ClassBody: c[10], + ClassDeclaration: c[11], + ClassExpression: c[11], + ClassImplements: c[12], + ClassMethod: c[13], + ClassPrivateMethod: c[13], + ClassPrivateProperty: c[14], + ClassProperty: c[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: c[15], + ConditionalExpression: c[16], + ConditionalTypeAnnotation: c[17], + ContinueStatement: c[8], + DebuggerStatement: c[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: c[18], + DeclareEnum: c[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: c[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: c[21], + DeclareInterface: c[22], + DeclareModule: c[19], + DeclareModuleExports: c[23], + DeclareNamespace: c[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: c[24], + DeclareVariable: c[21], + Decorator: c[3], + Directive: c[18], + DirectiveLiteral: c[1], + DoExpression: c[10], + DoWhileStatement: c[25], + EmptyStatement: c[1], + EmptyTypeAnnotation: c[1], + EnumBigIntBody: c[26], + EnumBigIntMember: c[27], + EnumBooleanBody: c[26], + EnumBooleanMember: c[27], + EnumDeclaration: c[19], + EnumDefaultedMember: c[21], + EnumNumberBody: c[26], + EnumNumberMember: c[27], + EnumStringBody: c[26], + EnumStringMember: c[27], + EnumSymbolBody: c[26], + ExistsTypeAnnotation: c[1], + ExperimentalRestProperty: c[6], + ExperimentalSpreadProperty: c[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: c[28], + ExportNamedDeclaration: c[20], + ExportNamespaceSpecifier: c[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: c[3], + File: ["program"], + ForInStatement: c[29], + ForOfStatement: c[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: c[30], + FunctionExpression: c[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: c[15], + GenericTypeAnnotation: c[12], + HookDeclaration: c[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: c[16], + ImportAttribute: c[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: c[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: c[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: c[34], + InferredPredicate: c[1], + InferTypeAnnotation: c[35], + InterfaceDeclaration: c[22], + InterfaceExtends: c[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: c[1], + IntersectionTypeAnnotation: c[36], + JsExpressionRoot: c[37], + JsonRoot: c[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: c[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: c[1], + JSXExpressionContainer: c[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: c[1], + JSXMemberExpression: c[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: c[1], + JSXSpreadAttribute: c[6], + JSXSpreadChild: c[3], + JSXText: c[1], + KeyofTypeAnnotation: c[6], + LabeledStatement: ["label", "body"], + Literal: c[1], + LogicalExpression: c[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: c[21], + MatchExpression: c[39], + MatchExpressionCase: c[40], + MatchIdentifierPattern: c[21], + MatchLiteralPattern: c[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: c[6], + MatchStatement: c[39], + MatchStatementCase: c[40], + MatchUnaryPattern: c[6], + MatchWildcardPattern: c[1], + MemberExpression: c[38], + MetaProperty: ["meta", "property"], + MethodDefinition: c[42], + MixedTypeAnnotation: c[1], + ModuleExpression: c[10], + NeverTypeAnnotation: c[1], + NewExpression: c[9], + NGChainedExpression: c[43], + NGEmptyExpression: c[1], + NGMicrosyntax: c[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: c[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: c[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: c[37], + NullableTypeAnnotation: c[23], + NullLiteral: c[1], + NullLiteralTypeAnnotation: c[1], + NumberLiteralTypeAnnotation: c[1], + NumberTypeAnnotation: c[1], + NumericLiteral: c[1], + ObjectExpression: ["properties"], + ObjectMethod: c[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: c[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: c[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: c[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: c[9], + OptionalIndexedAccessType: c[34], + OptionalMemberExpression: c[38], + ParenthesizedExpression: c[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: c[1], + PipelineTopicExpression: c[3], + Placeholder: c[1], + PrivateIdentifier: c[1], + PrivateName: c[21], + Program: c[7], + Property: c[32], + PropertyDefinition: c[14], + QualifiedTypeIdentifier: c[44], + QualifiedTypeofIdentifier: c[44], + RegExpLiteral: c[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: c[6], + SatisfiesExpression: c[4], + SequenceExpression: c[43], + SpreadElement: c[6], + StaticBlock: c[10], + StringLiteral: c[1], + StringLiteralTypeAnnotation: c[1], + StringTypeAnnotation: c[1], + Super: c[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: c[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: c[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: c[1], + ThisTypeAnnotation: c[1], + ThrowStatement: c[6], + TopicReference: c[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: c[45], + TSAbstractKeyword: c[1], + TSAbstractMethodDefinition: c[32], + TSAbstractPropertyDefinition: c[45], + TSAnyKeyword: c[1], + TSArrayType: c[2], + TSAsExpression: c[4], + TSAsyncKeyword: c[1], + TSBigIntKeyword: c[1], + TSBooleanKeyword: c[1], + TSCallSignatureDeclaration: c[46], + TSClassImplements: c[47], + TSConditionalType: c[17], + TSConstructorType: c[46], + TSConstructSignatureDeclaration: c[46], + TSDeclareFunction: c[31], + TSDeclareKeyword: c[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: c[26], + TSEnumDeclaration: c[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: c[3], + TSExportKeyword: c[1], + TSExternalModuleReference: c[3], + TSFunctionType: c[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: c[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: c[35], + TSInstantiationExpression: c[47], + TSInterfaceBody: c[10], + TSInterfaceDeclaration: c[22], + TSInterfaceHeritage: c[47], + TSIntersectionType: c[36], + TSIntrinsicKeyword: c[1], + TSJSDocAllType: c[1], + TSJSDocNonNullableType: c[23], + TSJSDocNullableType: c[23], + TSJSDocUnknownType: c[1], + TSLiteralType: c[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: c[10], + TSModuleDeclaration: c[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: c[21], + TSNeverKeyword: c[1], + TSNonNullExpression: c[3], + TSNullKeyword: c[1], + TSNumberKeyword: c[1], + TSObjectKeyword: c[1], + TSOptionalType: c[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: c[23], + TSPrivateKeyword: c[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: c[1], + TSPublicKeyword: c[1], + TSQualifiedName: c[5], + TSReadonlyKeyword: c[1], + TSRestType: c[23], + TSSatisfiesExpression: c[4], + TSStaticKeyword: c[1], + TSStringKeyword: c[1], + TSSymbolKeyword: c[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: c[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: c[23], + TSTypeAssertion: c[4], + TSTypeLiteral: c[26], + TSTypeOperator: c[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: c[48], + TSTypeParameterInstantiation: c[48], + TSTypePredicate: c[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: c[1], + TSUnionType: c[36], + TSUnknownKeyword: c[1], + TSVoidKeyword: c[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: c[24], + TypeAnnotation: c[23], + TypeCastExpression: c[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: c[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: c[48], + TypeParameterInstantiation: c[48], + TypePredicate: c[49], + UnaryExpression: c[6], + UndefinedTypeAnnotation: c[1], + UnionTypeAnnotation: c[36], + UnknownTypeAnnotation: c[1], + UpdateExpression: c[6], + V8IntrinsicIdentifier: c[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: c[27], + Variance: c[1], + VoidPattern: c[1], + VoidTypeAnnotation: c[1], + WhileStatement: c[25], + WithStatement: ["object", "body"], + YieldExpression: c[6] + }); + Es = Le; + te([ + "RegExpLiteral", + "BigIntLiteral", + "NumericLiteral", + "StringLiteral", + "DirectiveLiteral", + "Literal", + "JSXText", + "TemplateElement", + "StringLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation" + ]); + Ns = Ir; + De = Nr; + ks = "Unexpected parseExpression() input: "; + Me = kr; + vr = String.prototype.replaceAll ?? function(a, t) { + return a.global ? this.replace(a, t) : this.split(a).join(t); + }, xe = ee("replaceAll", function() { + if (typeof this == "string") return vr; + }); + Dr = /\*\/$/, Mr = /^\/\*\*?/, Or = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, Fr = /(^|\s+)\/\/([^\n\r]*)/g, vs = /^(\r?\n)+/, Br = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, Ls = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, Rr = /(\r?\n|^) *\* ?/g, Ur = []; + Os = ["noformat", "noprettier"], Fs = ["format", "prettier"]; + H = _r; + Oe = "module"; + Nt = "commonjs"; + Fe = jr; + ie = (a) => H(Kr(a)), Vr = { + sourceType: Oe, + allowImportExportEverywhere: !0, + allowReturnOutsideFunction: !0, + allowNewTargetOutsideFunction: !0, + allowSuperOutsideMethod: !0, + allowUndeclaredExports: !0, + errorRecovery: !0, + createParenthesizedExpressions: !0, + attachComment: !1, + plugins: [ + "doExpressions", + "exportDefaultFrom", + "functionBind", + "functionSent", + "throwExpressions", + "partialApplication", + "decorators", + "moduleBlocks", + "asyncDoExpressions", + "destructuringPrivate", + "decoratorAutoAccessors", + "sourcePhaseImports", + "deferredImportEvaluation", + ["optionalChainingAssign", { version: "2023-07" }], + ["discardBinding", { syntaxType: "void" }] + ], + tokens: !1, + ranges: !1 + }, js = "v8intrinsic", Vs = [["pipelineOperator", { + proposal: "hack", + topicToken: "%" + }], ["pipelineOperator", { proposal: "fsharp" }]], _ = (a, t = Vr) => ({ + ...t, + plugins: [...t.plugins, ...a] + }), zr = /@(?:no)?flow\b/u; + Hr = /* @__PURE__ */ new Set([ + "StrictNumericEscape", + "StrictWith", + "StrictOctalLiteral", + "StrictDelete", + "StrictEvalArguments", + "StrictEvalArgumentsBinding", + "StrictFunction", + "ForInOfLoopInitializer", + "ConstructorHasTypeParameters", + "UnsupportedParameterPropertyKind", + "DecoratorExportClass", + "ParamDupe", + "InvalidDecimal", + "RestTrailingComma", + "UnsupportedParameterDecorator", + "UnterminatedJsxContent", + "UnexpectedReservedWord", + "ModuleAttributesWithDuplicateKeys", + "InvalidEscapeSequenceTemplate", + "NonAbstractClassHasAbstractMethod", + "OptionalTypeBeforeRequired", + "PatternIsOptional", + "DeclareClassFieldHasInitializer", + "TypeImportCannotSpecifyDefaultAndNamed", + "VarRedeclaration", + "InvalidPrivateFieldResolution", + "DuplicateExport", + "ImportAttributesUseAssert", + "DeclarationMissingInitializer" + ]), zs = [_(["jsx"])], Wr = ie({ optionsCombinations: zs }), Jr = ie({ optionsCombinations: [_(["jsx", "typescript"]), _(["typescript"])] }), Gr = ie({ + isExpression: !0, + optionsCombinations: [_(["jsx"])] + }), Xr = ie({ + isExpression: !0, + optionsCombinations: [_(["typescript"])] + }), qs = ie({ optionsCombinations: [_([ + "jsx", + ["flow", { all: !0 }], + "flowComments" + ])] }), Yr = ie({ optionsCombinations: zs.map((a) => _(["estree"], a)) }); + Lt = {}; + Re(Lt, { + json: () => ea, + "json-stringify": () => ia, + json5: () => ta, + jsonc: () => sa + }); + vt = Qr; + $s = { + tokens: !1, + ranges: !1, + attachComment: !1, + createParenthesizedExpressions: !0 + }; + ea = H({ + parse: (a) => Be(a), + hasPragma: () => !0, + hasIgnorePragma: () => !1 + }), ta = H((a) => Be(a)), sa = H((a) => Be(a, { allowEmpty: !0 })), ia = H({ + parse: (a) => Be(a, { allowComments: !1 }), + astFormat: "estree-json" + }); + ra = { + ...kt, + ...Lt + }; +}))(); +export { Ks as default, ra as parsers }; diff --git a/.github/actions/check-public-api/dist/estree-D3wK6kDg.js b/.github/actions/check-public-api/dist/estree-D3wK6kDg.js new file mode 100644 index 0000000000..8048d65bf1 --- /dev/null +++ b/.github/actions/check-public-api/dist/estree-D3wK6kDg.js @@ -0,0 +1,7269 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/estree.mjs +function ka(e) { + return this[e < 0 ? this.length + e : e]; +} +function La(e) { + return e !== null && typeof e == "object"; +} +function* Oa(e, t) { + let { getVisitorKeys: r, filter: n = () => !0 } = t, s = (i) => Lr(i) && n(i); + for (let i of r(e)) { + let o = e[i]; + if (Array.isArray(o)) for (let u of o) s(u) && (yield u); + else s(o) && (yield o); + } +} +function* wa(e, t) { + let r = [e]; + for (let n = 0; n < r.length; n++) { + let s = r[n]; + for (let i of Oa(s, t)) yield i, r.push(i); + } +} +function zs(e, { getVisitorKeys: t, predicate: r }) { + for (let n of wa(e, { getVisitorKeys: t })) if (r(n)) return !0; + return !1; +} +function vn(e) { + return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510; +} +function Rn(e) { + return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e >= 94192 && e <= 94198 || e >= 94208 && e <= 101589 || e >= 101631 && e <= 101662 || e >= 101760 && e <= 101874 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128728 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129674 || e >= 129678 && e <= 129734 || e === 129736 || e >= 129741 && e <= 129756 || e >= 129759 && e <= 129770 || e >= 129775 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141; +} +function Na(e) { + if (!e) return 0; + if (!_a.test(e)) return e.length; + e = e.replace(Zs(), (r) => Ma.has(r) ? " " : " "); + let t = 0; + for (let r of e) { + let n = r.codePointAt(0); + n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || n >= 65024 && n <= 65039 || (t += vn(n) || Rn(n) ? 2 : 1); + } + return t; +} +function Or(e) { + return (t, r, n) => { + let s = !!n?.backwards; + if (r === !1) return !1; + let { length: i } = t, o = r; + for (; o >= 0 && o < i;) { + let u = t.charAt(o); + if (e instanceof RegExp) { + if (!e.test(u)) return o; + } else if (!e.includes(u)) return o; + s ? o-- : o++; + } + return o === -1 || o === i ? o : !1; + }; +} +function ja(e, t, r) { + let n = !!r?.backwards; + if (t === !1) return !1; + let s = e.charAt(t); + if (n) { + if (e.charAt(t - 1) === "\r" && s === ` +`) return t - 2; + if (ni(s)) return t - 1; + } else { + if (s === "\r" && e.charAt(t + 1) === ` +`) return t + 2; + if (ni(s)) return t + 1; + } + return t; +} +function va(e, t, r = {}) { + let n = ze(e, r.backwards ? t - 1 : t, r); + return n !== Ze(e, n, r); +} +function Ra(e, t) { + if (t === !1) return !1; + if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") { + for (let r = t + 2; r < e.length; ++r) if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2; + } + return t; +} +function Ja(e, t) { + return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ri(e, t) : t; +} +function Ga(e, t) { + let r = null, n = t; + for (; n !== r;) r = n, n = ti(e, n), n = qt(e, n), n = ze(e, n); + return n = Ut(e, n), n = Ze(e, n), n !== !1 && Z(e, n); +} +function Wa(e) { + return Array.isArray(e) && e.length > 0; +} +function Ha(e, t) { + let { preferred: r, alternate: n } = t === !0 || t === "'" ? Ua : Ya, { length: s } = e, i = 0, o = 0; + for (let u = 0; u < s; u++) { + let p = e.charCodeAt(u); + p === r.codePoint ? i++ : p === n.codePoint && o++; + } + return (i > o ? n : r).character; +} +function Va(e, t) { + let r = t === "\"" ? "'" : "\""; + return t + W(0, e, Xa, (s, i, o) => i ? i === r ? r : s : o === t ? "\\" + o : o) + t; +} +function $a(e, t) { + Le(/^(?["']).*\k$/su.test(e)); + let r = e.slice(1, -1), n = t.parser === "json" || t.parser === "jsonc" || t.parser === "json5" && t.quoteProps === "preserve" && !t.singleQuote ? "\"" : t.__isInHtmlAttribute ? "'" : wr(r, t.singleQuote); + return e.charAt(0) === n ? e : oi(r, n); +} +function w(e) { + let t = e.range?.[0] ?? e.start, r = (e.declaration?.decorators ?? e.decorators)?.[0]; + return r ? Math.min(w(r), t) : t; +} +function I(e) { + return e.range?.[1] ?? e.end; +} +function bt(e, t) { + let r = w(e); + return ui(r) && r === w(t); +} +function Ka(e, t) { + let r = I(e); + return ui(r) && r === I(t); +} +function ai(e, t) { + return bt(e, t) && Ka(e, t); +} +function fr(e) { + if (Dr !== null && typeof Dr.property) { + let t = Dr; + return Dr = fr.prototype = null, t; + } + return Dr = fr.prototype = e ?? Object.create(null), new fr(); +} +function Gn(e) { + return fr(e); +} +function za(e, t = "type") { + Gn(e); + function r(n) { + let s = n[t], i = e[s]; + if (!Array.isArray(i)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${s}'.`), { node: n }); + return i; + } + return r; +} +function ep(e) { + let t = new Set(e); + return (r) => t.has(r?.type); +} +function tp(e) { + return e.extra?.raw ?? e.raw; +} +function ip(e, t) { + let r = t.split("."); + for (let n = r.length - 1; n >= 0; n--) { + let s = r[n]; + if (n === 0) return e.type === "Identifier" && e.name === s; + if (n === 1 && e.type === "MetaProperty" && e.property.type === "Identifier" && e.property.name === s) { + e = e.meta; + continue; + } + if (e.type === "MemberExpression" && !e.optional && !e.computed && e.property.type === "Identifier" && e.property.name === s) { + e = e.object; + continue; + } + return !1; + } +} +function op(e, t) { + return t.some((r) => ip(e, r)); +} +function up({ type: e }) { + return e.startsWith("TS") && e.endsWith("Keyword"); +} +function ap({ node: e, parent: t }) { + return e?.type !== "EmptyStatement" ? !1 : t.type === "IfStatement" ? t.consequent === e || t.alternate === e : t.type === "DoWhileStatement" || t.type === "ForInStatement" || t.type === "ForOfStatement" || t.type === "ForStatement" || t.type === "LabeledStatement" || t.type === "WithStatement" || t.type === "WhileStatement" ? t.body === e : !1; +} +function Er(e, t) { + return t(e) || zs(e, { + getVisitorKeys: Mr, + predicate: t + }); +} +function Xt(e) { + return e.type === "AssignmentExpression" || e.type === "BinaryExpression" || e.type === "LogicalExpression" || e.type === "NGPipeExpression" || e.type === "ConditionalExpression" || M(e) || J(e) || e.type === "SequenceExpression" || e.type === "TaggedTemplateExpression" || e.type === "BindExpression" || e.type === "UpdateExpression" && !e.prefix || Ae(e) || e.type === "TSNonNullExpression" || e.type === "ChainExpression"; +} +function mi(e) { + return e.expressions ? e.expressions[0] : e.left ?? e.test ?? e.callee ?? e.object ?? e.tag ?? e.argument ?? e.expression; +} +function Rr(e) { + if (e.expressions) return ["expressions", 0]; + if (e.left) return ["left"]; + if (e.test) return ["test"]; + if (e.object) return ["object"]; + if (e.callee) return ["callee"]; + if (e.tag) return ["tag"]; + if (e.argument) return ["argument"]; + if (e.expression) return ["expression"]; + throw new Error("Unexpected node has no left side."); +} +function fi(e) { + return e.type === "LogicalExpression" && e.operator === "??"; +} +function Ce(e) { + return e.type === "NumericLiteral" || e.type === "Literal" && typeof e.value == "number"; +} +function yi(e) { + return e.type === "BooleanLiteral" || e.type === "Literal" && typeof e.value == "boolean"; +} +function Hn(e) { + return e.type === "UnaryExpression" && (e.operator === "+" || e.operator === "-") && Ce(e.argument); +} +function V(e) { + return !!(e && (e.type === "StringLiteral" || e.type === "Literal" && typeof e.value == "string")); +} +function Xn(e) { + return e.type === "RegExpLiteral" || e.type === "Literal" && !!e.regex; +} +function cp(e) { + return e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && e.body.type === "BlockStatement"; +} +function Wn(e) { + return M(e) && e.callee.type === "Identifier" && [ + "async", + "inject", + "fakeAsync", + "waitForAsync" + ].includes(e.callee.name); +} +function mt(e) { + return e.method && e.kind === "init" || e.kind === "get" || e.kind === "set"; +} +function Gr(e) { + return (e.type === "ObjectTypeProperty" || e.type === "ObjectTypeInternalSlot") && !e.static && !e.method && e.kind !== "get" && e.kind !== "set" && e.value.type === "FunctionTypeAnnotation"; +} +function Ei(e) { + return (e.type === "TypeAnnotation" || e.type === "TSTypeAnnotation") && e.typeAnnotation.type === "FunctionTypeAnnotation" && !e.static && !bt(e, e.typeAnnotation); +} +function Tt(e) { + return J(e) || e.type === "BindExpression" && !!e.object; +} +function Vt(e) { + return jr(e) || Nr(e) || lp(e) || e.type === "GenericTypeAnnotation" && !e.typeParameters || e.type === "TSTypeReference" && !e.typeArguments; +} +function mp(e) { + return e.type === "Identifier" && (e.name === "beforeEach" || e.name === "beforeAll" || e.name === "afterEach" || e.name === "afterAll"); +} +function fp(e) { + return Pt(e, Dp); +} +function It(e, t) { + if (e?.type !== "CallExpression" || e.optional) return !1; + let r = le(e); + if (r.length === 1) { + if (Wn(e) && It(t)) return Ht(r[0]); + if (mp(e.callee)) return Wn(r[0]); + } else if ((r.length === 2 || r.length === 3) && (r[0].type === "TemplateLiteral" || V(r[0])) && fp(e.callee)) return r[2] && !Ce(r[2]) ? !1 : (r.length === 2 ? Ht(r[1]) : cp(r[1]) && K(r[1]).length <= 1) || Wn(r[1]); + return !1; +} +function Vn(e, t = 5) { + return di(e, t) <= t; +} +function di(e, t) { + let r = 0; + for (let n in e) { + let s = e[n]; + if (Lr(s) && typeof s.type == "string" && (r++, r += di(s, t - r)), r > t) return r; + } + return r; +} +function Fr(e, t) { + let { printWidth: r } = t; + if (T(e)) return !1; + let n = r * yp; + if (e.type === "ThisExpression" || e.type === "Identifier" && e.name.length <= n || Hn(e) && !T(e.argument)) return !0; + let s = e.type === "Literal" && "regex" in e && e.regex.pattern || e.type === "RegExpLiteral" && e.pattern; + return s ? s.length <= n : V(e) ? ut(pe(e), t).length <= n : e.type === "TemplateLiteral" ? e.expressions.length === 0 && e.quasis[0].value.raw.length <= n && !e.quasis[0].value.raw.includes(` +`) : e.type === "UnaryExpression" ? Fr(e.argument, { printWidth: r }) : e.type === "CallExpression" && e.arguments.length === 0 && e.callee.type === "Identifier" ? e.callee.name.length <= n - 2 : Jr(e); +} +function Ee(e, t) { + return H(t) ? Ot(t) : T(t, x.Leading, (r) => Z(e, I(r))); +} +function ci(e) { + return e.quasis.some((t) => t.value.raw.includes(` +`)); +} +function Wr(e, t) { + return (e.type === "TemplateLiteral" && ci(e) || e.type === "TaggedTemplateExpression" && ci(e.quasi)) && !Z(t, w(e), { backwards: !0 }); +} +function qr(e) { + if (!T(e)) return !1; + let t = N(0, et(e, x.Dangling), -1); + return t && !ce(t); +} +function Ci(e) { + if (e.length <= 1) return !1; + let t = 0; + for (let r of e) if (Ht(r)) { + if (t += 1, t > 1) return !0; + } else if (M(r)) { + for (let n of le(r)) if (Ht(n)) return !0; + } + return !1; +} +function Ur(e) { + let { node: t, parent: r, key: n } = e; + return n === "callee" && M(t) && M(r) && r.arguments.length > 0 && t.arguments.length > r.arguments.length; +} +function Re(e, t = 2) { + if (t <= 0) return !1; + if (e.type === "ChainExpression" || e.type === "TSNonNullExpression") return Re(e.expression, t); + let r = (n) => Re(n, t - 1); + if (Xn(e)) return ot(e.pattern ?? e.regex.pattern) <= 5; + if (Jr(e) || pp(e) || e.type === "ArgumentPlaceholder") return !0; + if (e.type === "TemplateLiteral") return e.quasis.every((n) => !n.value.raw.includes(` +`)) && e.expressions.every(r); + if (se(e)) return e.properties.every((n) => !n.computed && (n.shorthand || n.value && r(n.value))); + if (q(e)) return e.elements.every((n) => n === null || r(n)); + if (Dt(e)) { + if (e.type === "ImportExpression" || Re(e.callee, t)) { + let n = le(e); + return n.length <= t && n.every(r); + } + return !1; + } + return J(e) ? Re(e.object, t) && Re(e.property, t) : e.type === "UnaryExpression" && Ep.has(e.operator) || e.type === "UpdateExpression" ? Re(e.argument, t) : !1; +} +function ie(e, t = "es5") { + return e.trailingComma === "es5" && t === "es5" || e.trailingComma === "all" && (t === "all" || t === "es5"); +} +function ye(e, t) { + switch (e.type) { + case "BinaryExpression": + case "LogicalExpression": + case "AssignmentExpression": + case "NGPipeExpression": return ye(e.left, t); + case "MemberExpression": + case "OptionalMemberExpression": return ye(e.object, t); + case "TaggedTemplateExpression": return e.tag.type === "FunctionExpression" ? !1 : ye(e.tag, t); + case "CallExpression": + case "OptionalCallExpression": return e.callee.type === "FunctionExpression" ? !1 : ye(e.callee, t); + case "ConditionalExpression": return ye(e.test, t); + case "UpdateExpression": return !e.prefix && ye(e.argument, t); + case "BindExpression": return e.object && ye(e.object, t); + case "SequenceExpression": return ye(e.expressions[0], t); + case "ChainExpression": + case "TSSatisfiesExpression": + case "TSAsExpression": + case "TSNonNullExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": return ye(e.expression, t); + default: return t(e); + } +} +function dr(e, t) { + return !(yr(t) !== yr(e) || e === "**" || li[e] && li[t] || t === "%" && vr[e] || e === "%" && vr[t] || t !== e && vr[t] && vr[e] || Yn[e] && Yn[t]); +} +function yr(e) { + return Fp.get(e); +} +function Ai(e) { + return !!Yn[e] || e === "|" || e === "^" || e === "&"; +} +function Ti(e) { + if (e.rest) return !0; + return N(0, K(e), -1)?.type === "RestElement"; +} +function K(e) { + if (qn.has(e)) return qn.get(e); + let t = []; + return e.this && t.push(e.this), t.push(...e.params), e.rest && t.push(e.rest), qn.set(e, t), t; +} +function xi(e, t) { + let { node: r } = e, n = 0, s = () => t(e, n++); + r.this && e.call(s, "this"), e.each(s, "params"), r.rest && e.call(s, "rest"); +} +function le(e) { + if (Un.has(e)) return Un.get(e); + if (e.type === "ChainExpression") return le(e.expression); + let t; + return e.type === "ImportExpression" || e.type === "TSImportType" ? (t = [e.source], e.options && t.push(e.options)) : e.type === "TSExternalModuleReference" ? t = [e.expression] : t = e.arguments, Un.set(e, t), t; +} +function $t(e, t) { + let { node: r } = e; + if (r.type === "ChainExpression") return e.call(() => $t(e, t), "expression"); + r.type === "ImportExpression" || r.type === "TSImportType" ? (e.call(() => t(e, 0), "source"), r.options && e.call(() => t(e, 1), "options")) : r.type === "TSExternalModuleReference" ? e.call(() => t(e, 0), "expression") : e.each(t, "arguments"); +} +function $n(e, t) { + let r = []; + if (e.type === "ChainExpression" && (e = e.expression, r.push("expression")), e.type === "ImportExpression" || e.type === "TSImportType") { + if (t === 0 || t === (e.options ? -2 : -1)) return [...r, "source"]; + if (e.options && (t === 1 || t === -1)) return [...r, "options"]; + throw new RangeError("Invalid argument index"); + } else if (e.type === "TSExternalModuleReference") { + if (t === 0 || t === -1) return [...r, "expression"]; + } else if (t < 0 && (t = e.arguments.length + t), t >= 0 && t < e.arguments.length) return [ + ...r, + "arguments", + t + ]; + throw new RangeError("Invalid argument index"); +} +function Lt(e) { + return e.value.trim() === "prettier-ignore" && !e.unignore; +} +function Ot(e) { + return e?.prettierIgnore || T(e, x.PrettierIgnore); +} +function T(e, t, r) { + if (!R(e?.comments)) return !1; + let n = gi(t, r); + return n ? e.comments.some(n) : !0; +} +function et(e, t, r) { + if (!Array.isArray(e?.comments)) return []; + let n = gi(t, r); + return n ? e.comments.filter(n) : e.comments; +} +function Dt(e) { + return M(e) || e.type === "NewExpression" || e.type === "ImportExpression"; +} +function Oe(e) { + return e && (e.type === "ObjectProperty" || e.type === "Property" && !mt(e)); +} +function Yr({ key: e, parent: t }) { + return !(e === "types" && Se(t) || e === "types" && xt(t)); +} +function Si(e, t, r) { + if (e.type === "Program" && delete t.sourceType, (e.type === "BigIntLiteral" || e.type === "Literal") && e.bigint && (t.bigint = e.bigint.toLowerCase()), e.type === "EmptyStatement" && !kt({ + node: e, + parent: r + }) || e.type === "JSXText" || e.type === "JSXExpressionContainer" && (e.expression.type === "Literal" || e.expression.type === "StringLiteral") && e.expression.value === " ") return null; + if ((e.type === "Property" || e.type === "ObjectProperty" || e.type === "MethodDefinition" || e.type === "ClassProperty" || e.type === "ClassMethod" || e.type === "PropertyDefinition" || e.type === "TSDeclareMethod" || e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty" || e.type === "ImportAttribute") && e.key && !e.computed) { + let { key: s } = e; + V(s) || Ce(s) ? t.key = String(s.value) : s.type === "Identifier" && (t.key = s.name); + } + if (e.type === "JSXElement" && e.openingElement.name.name === "style" && e.openingElement.attributes.some((s) => s.type === "JSXAttribute" && s.name.name === "jsx")) for (let { type: s, expression: i } of t.children) s === "JSXExpressionContainer" && i.type === "TemplateLiteral" && Kt(i); + e.type === "JSXAttribute" && e.name.name === "css" && e.value.type === "JSXExpressionContainer" && e.value.expression.type === "TemplateLiteral" && Kt(t.value.expression), e.type === "JSXAttribute" && e.value?.type === "Literal" && /["']|"|'/u.test(e.value.value) && (t.value.value = W(0, e.value.value, /["']|"|'/gu, "\"")); + let n = e.expression || e.callee; + if (e.type === "Decorator" && n.type === "CallExpression" && n.callee.name === "Component" && n.arguments.length === 1) { + let s = e.expression.arguments[0].properties; + for (let [i, o] of t.expression.arguments[0].properties.entries()) switch (s[i].key.name) { + case "styles": + q(o.value) && Kt(o.value.elements[0]); + break; + case "template": + o.value.type === "TemplateLiteral" && Kt(o.value); + break; + } + } + e.type === "TaggedTemplateExpression" && (e.tag.type === "MemberExpression" || e.tag.type === "Identifier" && (e.tag.name === "gql" || e.tag.name === "graphql" || e.tag.name === "css" || e.tag.name === "md" || e.tag.name === "markdown" || e.tag.name === "html") || e.tag.type === "CallExpression") && Kt(t.quasi), e.type === "TemplateLiteral" && Kt(t), e.type === "ChainExpression" && e.expression.type === "TSNonNullExpression" && (t.type = "TSNonNullExpression", t.expression.type = "ChainExpression"); +} +function gp(e, t) { + return Cp(e) || Ap(e, t) || Tp(e, t) ? !1 : e.type === "EmptyStatement" ? kt({ + node: e, + parent: t[0] + }) : !(xp(e, t) || e.type === "TSTypeAnnotation" && t[0].type === "TSPropertySignature"); +} +function hp(e) { + let t = e.type || e.kind || "(unknown type)", r = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || ""); + return r.length > 20 && (r = r.slice(0, 19) + "…"), t + (r ? " " + r : ""); +} +function Kn(e, t) { + (e.comments ?? (e.comments = [])).push(t), t.printed = !1, t.nodeDescription = hp(e); +} +function te(e, t) { + t.leading = !0, t.trailing = !1, Kn(e, t); +} +function we(e, t, r) { + t.leading = !1, t.trailing = !1, r && (t.marker = r), Kn(e, t); +} +function $(e, t) { + t.leading = !1, t.trailing = !0, Kn(e, t); +} +function Sp(e, t) { + let r = null, n = t; + for (; n !== r;) r = n, n = ze(e, n), n = qt(e, n), n = Ut(e, n), n = Ze(e, n); + return n; +} +function Bp(e, t) { + let r = at(e, t); + return r === !1 ? "" : e.charAt(r); +} +function bp(e, t, r) { + for (let n = t; n < r; ++n) if (e.charAt(n) === ` +`) return !0; + return !1; +} +function Pp(e) { + return Qn.has(e) || Qn.set(e, ce(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), Qn.get(e); +} +function kp(e) { + return [ + ji, + Ii, + _i, + Jp, + wp, + es, + ts, + ki, + Li, + Yp, + Wp, + qp, + ns, + Ni, + Hp, + Oi, + Mi, + rs, + _p, + Zp, + vi, + ss + ].some((t) => t(e)); +} +function Ip(e) { + return [ + Op, + _i, + Ii, + Ni, + es, + ts, + ki, + Li, + Mi, + Gp, + Up, + ns, + $p, + rs, + Qp, + zp, + ec, + vi, + rc, + tc, + ss + ].some((t) => t(e)); +} +function Lp(e) { + return [ + ji, + es, + ts, + Rp, + Oi, + ns, + vp, + jp, + rs, + Kp, + ss + ].some((t) => t(e)); +} +function wt(e, t) { + let r = (e.body || e.properties).find(({ type: n }) => n !== "EmptyStatement"); + r ? te(r, t) : we(e, t); +} +function zn(e, t) { + e.type === "BlockStatement" ? wt(e, t) : te(e, t); +} +function Op({ comment: e, followingNode: t }) { + return t && Hr(e) ? (te(t, e), !0) : !1; +} +function es({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) { + if (r?.type !== "IfStatement" || !n) return !1; + if (_e(s, I(e)) === ")") return $(t, e), !0; + if (n.type === "BlockStatement" && n === r.consequent && w(e) >= I(t) && I(e) <= w(n)) return te(n, e), !0; + if (t === r.consequent && n === r.alternate) { + let o = at(s, I(r.consequent)); + if (n.type === "BlockStatement" && w(e) >= o && I(e) <= w(n)) return te(n, e), !0; + if (w(e) < o || r.alternate.type === "BlockStatement") return t.type === "BlockStatement" ? ($(t, e), !0) : Zn(e, s) && !ue(s, w(t), w(e)) ? ($(t, e), !0) : (we(r, e), !0); + } + return n.type === "BlockStatement" ? (wt(n, e), !0) : n.type === "IfStatement" ? (zn(n.consequent, e), !0) : r.consequent === n ? (te(n, e), !0) : !1; +} +function ts({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) { + return r?.type !== "WhileStatement" || !n ? !1 : _e(s, I(e)) === ")" ? ($(t, e), !0) : n.type === "BlockStatement" ? (wt(n, e), !0) : r.body === n ? (te(n, e), !0) : !1; +} +function ki({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) { + return r?.type !== "TryStatement" && r?.type !== "CatchClause" || !n ? !1 : r.type === "CatchClause" && t ? ($(t, e), !0) : n.type === "BlockStatement" ? (wt(n, e), !0) : n.type === "TryStatement" ? (zn(n.finalizer, e), !0) : n.type === "CatchClause" ? (zn(n.body, e), !0) : !1; +} +function wp({ comment: e, enclosingNode: t, followingNode: r }) { + return J(t) && r?.type === "Identifier" ? (te(t, e), !0) : !1; +} +function _p({ comment: e, enclosingNode: t, followingNode: r, options: n }) { + return !n.experimentalTernaries || !(t?.type === "ConditionalExpression" || Ue(t)) ? !1 : r?.type === "ConditionalExpression" || Ue(r) ? (we(t, e), !0) : !1; +} +function Ii({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s, options: i }) { + let o = t && !ue(s, I(t), w(e)); + return (!t || !o) && (r?.type === "ConditionalExpression" || Ue(r)) && n ? i.experimentalTernaries && r.alternate === n && !(ce(e) && !ue(i.originalText, w(e), I(e))) ? (we(r, e), !0) : (te(n, e), !0) : !1; +} +function Li({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) { + if (Mp(r)) { + if (R(r.decorators) && n?.type !== "Decorator") return $(N(0, r.decorators, -1), e), !0; + if (r.body && n === r.body) return wt(r.body, e), !0; + if (n) { + if (r.superClass && n === r.superClass && t && (t === r.id || t === r.typeParameters)) return $(t, e), !0; + for (let s of [ + "implements", + "extends", + "mixins" + ]) if (r[s] && n === r[s][0]) return t && (t === r.id || t === r.typeParameters || t === r.superClass) ? $(t, e) : we(r, e, s), !0; + } + } + return !1; +} +function Oi({ comment: e, precedingNode: t, enclosingNode: r, text: n }) { + return r && t && _e(n, I(e)) === "(" && (r.type === "Property" || r.type === "TSDeclareMethod" || r.type === "TSAbstractMethodDefinition") && t.type === "Identifier" && r.key === t && _e(n, I(t)) !== ":" ? ($(t, e), !0) : t?.type === "Decorator" && Np(r) && (At(e) || e.placement === "ownLine") ? ($(t, e), !0) : !1; +} +function jp({ comment: e, precedingNode: t, enclosingNode: r, text: n }) { + return _e(n, I(e)) !== "(" ? !1 : t && wi(r) ? ($(t, e), !0) : !1; +} +function vp({ comment: e, enclosingNode: t, text: r }) { + if (t?.type !== "ArrowFunctionExpression") return !1; + let n = at(r, I(e)); + return n !== !1 && r.slice(n, n + 2) === "=>" ? (we(t, e), !0) : !1; +} +function Rp({ comment: e, enclosingNode: t, text: r }) { + return _e(r, I(e)) !== ")" ? !1 : t && (Ri(t) && K(t).length === 0 || Dt(t) && le(t).length === 0) ? (we(t, e), !0) : (t?.type === "MethodDefinition" || t?.type === "TSAbstractMethodDefinition") && K(t.value).length === 0 ? (we(t.value, e), !0) : !1; +} +function Jp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) { + return t?.type === "ComponentTypeParameter" && (r?.type === "DeclareComponent" || r?.type === "ComponentTypeAnnotation") && n?.type !== "ComponentTypeParameter" ? ($(t, e), !0) : (t?.type === "ComponentParameter" || t?.type === "RestElement") && r?.type === "ComponentDeclaration" && _e(s, I(e)) === ")" ? ($(t, e), !0) : !1; +} +function _i({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) { + return t?.type === "FunctionTypeParam" && r?.type === "FunctionTypeAnnotation" && n?.type !== "FunctionTypeParam" ? ($(t, e), !0) : (t?.type === "Identifier" || t?.type === "AssignmentPattern" || t?.type === "ObjectPattern" || t?.type === "ArrayPattern" || t?.type === "RestElement" || t?.type === "TSParameterProperty") && Ri(r) && _e(s, I(e)) === ")" ? ($(t, e), !0) : !ce(e) && n?.type === "BlockStatement" && wi(r) && (r.type === "MethodDefinition" ? r.value.body : r.body) === n && at(s, I(e)) === w(n) ? (wt(n, e), !0) : !1; +} +function Mi({ comment: e, enclosingNode: t }) { + return t?.type === "LabeledStatement" ? (te(t, e), !0) : !1; +} +function rs({ comment: e, enclosingNode: t }) { + return (t?.type === "ContinueStatement" || t?.type === "BreakStatement") && !t.label ? ($(t, e), !0) : !1; +} +function Gp({ comment: e, precedingNode: t, enclosingNode: r }) { + return M(r) && t && r.callee === t && r.arguments.length > 0 ? (te(r.arguments[0], e), !0) : !1; +} +function Wp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) { + return Se(r) ? (Lt(e) && (n.prettierIgnore = !0, e.unignore = !0), t ? ($(t, e), !0) : !1) : (Se(n) && Lt(e) && (n.types[0].prettierIgnore = !0, e.unignore = !0), !1); +} +function qp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) { + return r && r.type === "MatchOrPattern" ? (Lt(e) && (n.prettierIgnore = !0, e.unignore = !0), t ? ($(t, e), !0) : !1) : (n && n.type === "MatchOrPattern" && Lt(e) && (n.types[0].prettierIgnore = !0, e.unignore = !0), !1); +} +function Up({ comment: e, enclosingNode: t }) { + return Oe(t) ? (te(t, e), !0) : !1; +} +function ns({ comment: e, enclosingNode: t, ast: r, isLastComment: n }) { + return r?.body?.length === 0 ? (n ? we(r, e) : te(r, e), !0) : t?.type === "Program" && t.body.length === 0 && !R(t.directives) ? (n ? we(t, e) : te(t, e), !0) : !1; +} +function Yp({ comment: e, enclosingNode: t, followingNode: r }) { + return (t?.type === "ForInStatement" || t?.type === "ForOfStatement") && r !== t.body ? (te(t, e), !0) : !1; +} +function Ni({ comment: e, precedingNode: t, enclosingNode: r, text: n }) { + if (r?.type === "ImportSpecifier" || r?.type === "ExportSpecifier") return te(r, e), !0; + let s = t?.type === "ImportSpecifier" && r?.type === "ImportDeclaration", i = t?.type === "ExportSpecifier" && r?.type === "ExportNamedDeclaration"; + return (s || i) && Z(n, I(e)) ? ($(t, e), !0) : !1; +} +function Hp({ comment: e, enclosingNode: t }) { + return t?.type === "AssignmentPattern" ? (te(t, e), !0) : !1; +} +function $p({ comment: e, enclosingNode: t, followingNode: r }) { + return Xp(t) && r && (Vp(r) || ce(e)) ? (te(r, e), !0) : !1; +} +function Kp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n, text: s }) { + return !n && (t?.type === "TSMethodSignature" || t?.type === "TSDeclareFunction" || t?.type === "TSAbstractMethodDefinition") && (!r || r !== t.returnType) && _e(s, I(e)) === ";" ? ($(t, e), !0) : !1; +} +function ji({ comment: e, enclosingNode: t, followingNode: r }) { + if (Lt(e) && t?.type === "TSMappedType" && r === t.key) return t.prettierIgnore = !0, e.unignore = !0, !0; +} +function vi({ comment: e, precedingNode: t, enclosingNode: r }) { + if (r?.type === "TSMappedType" && !t) return we(r, e), !0; +} +function Qp({ comment: e, enclosingNode: t, followingNode: r }) { + return !t || t.type !== "SwitchCase" || t.test || !r || r !== t.consequent[0] ? !1 : (r.type === "BlockStatement" && At(e) ? wt(r, e) : we(t, e), !0); +} +function zp({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n }) { + return Se(t) && ((r.type === "TSArrayType" || r.type === "ArrayTypeAnnotation") && !n || xt(r)) ? ($(N(0, t.types, -1), e), !0) : !1; +} +function Zp({ comment: e, enclosingNode: t, precedingNode: r, followingNode: n }) { + if ((t?.type === "ObjectPattern" || t?.type === "ArrayPattern") && n?.type === "TSTypeAnnotation") return r ? $(r, e) : we(t, e), !0; +} +function ec({ comment: e, precedingNode: t, enclosingNode: r, followingNode: n, text: s }) { + return !n && r?.type === "UnaryExpression" && (t?.type === "LogicalExpression" || t?.type === "BinaryExpression") && ue(s, w(r.argument), w(t.right)) && Zn(e, s) && !ue(s, w(t.right), w(e)) ? ($(t.right, e), !0) : !1; +} +function tc({ enclosingNode: e, followingNode: t, comment: r }) { + if (e && (e.type === "TSPropertySignature" || e.type === "ObjectTypeProperty") && (Se(t) || xt(t))) return te(t, r), !0; +} +function ss({ enclosingNode: e, precedingNode: t, followingNode: r, comment: n, text: s }) { + if (Ae(e) && t === e.expression && !Zn(n, s)) return r ? te(r, n) : $(e, n), !0; +} +function rc({ comment: e, enclosingNode: t, followingNode: r, precedingNode: n }) { + return t && r && n && t.type === "ArrowFunctionExpression" && t.returnType === n && (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") ? (te(r, e), !0) : !1; +} +function sc(e, { parser: t }) { + if (t === "flow" || t === "hermes" || t === "babel-flow") return e = W(0, e, /[\s(]/gu, ""), e === "" || e === "/*" || e === "/*::"; +} +function oc(e) { + let { key: t, parent: r } = e; + if (t === "types" && Se(r) || t === "argument" && r.type === "JSXSpreadAttribute" || t === "expression" && r.type === "JSXSpreadChild" || t === "superClass" && (r.type === "ClassDeclaration" || r.type === "ClassExpression") || (t === "id" || t === "typeParameters") && ic(r) || t === "patterns" && r.type === "MatchOrPattern") return !0; + let { node: n } = e; + return Ot(n) ? !1 : Se(n) ? Yr(e) : !!H(n); +} +function uc(e) { + if (typeof e == "string") return Ye; + if (Array.isArray(e)) return Be; + if (!e) return; + let { type: t } = e; + if (Xr.has(t)) return t; +} +function pc(e) { + let t = e === null ? "null" : typeof e; + if (t !== "string" && t !== "object") return `Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`; + if (We(e)) throw new Error("doc is valid."); + let r = Object.prototype.toString.call(e); + if (r !== "[object Object]") return `Unexpected doc '${r}'.`; + let n = ac([...Xr].map((s) => `'${s}'`)); + return `Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`; +} +function cc(e, t, r, n) { + let s = [e]; + for (; s.length > 0;) { + let i = s.pop(); + if (i === qi) { + r(s.pop()); + continue; + } + r && s.push(i, qi); + let o = We(i); + if (!o) throw new gt(i); + if (t?.(i) !== !1) switch (o) { + case Be: + case Me: { + let u = o === Be ? i : i.parts; + for (let c = u.length - 1; c >= 0; --c) s.push(u[c]); + break; + } + case be: + s.push(i.flatContents, i.breakContents); + break; + case Fe: + if (n && i.expandedStates) for (let u = i.expandedStates.length, p = u - 1; p >= 0; --p) s.push(i.expandedStates[p]); + else s.push(i.contents); + break; + case Xe: + case He: + case Ve: + case Pe: + case $e: + s.push(i.contents); + break; + case Ye: + case tt: + case rt: + case Ge: + case me: + case Ne: break; + default: throw new gt(i); + } + } +} +function ft(e, t) { + if (typeof e == "string") return t(e); + let r = /* @__PURE__ */ new Map(); + return n(e); + function n(i) { + if (r.has(i)) return r.get(i); + let o = s(i); + return r.set(i, o), o; + } + function s(i) { + switch (We(i)) { + case Be: return t(i.map(n)); + case Me: return t({ + ...i, + parts: i.parts.map(n) + }); + case be: return t({ + ...i, + breakContents: n(i.breakContents), + flatContents: n(i.flatContents) + }); + case Fe: { + let { expandedStates: o, contents: u } = i; + return o ? (o = o.map(n), u = o[0]) : u = n(u), t({ + ...i, + contents: u, + expandedStates: o + }); + } + case Xe: + case He: + case Ve: + case Pe: + case $e: return t({ + ...i, + contents: n(i.contents) + }); + case Ye: + case tt: + case rt: + case Ge: + case me: + case Ne: return t(i); + default: throw new gt(i); + } + } +} +function Yi(e, t, r) { + let n = r, s = !1; + function i(o) { + if (s) return !1; + let u = t(o); + u !== void 0 && (s = !0, n = u); + } + return Vr(e, i), n; +} +function lc(e) { + if (e.type === Fe && e.break || e.type === me && e.hard || e.type === Ne) return !0; +} +function ne(e) { + return Yi(e, lc, !1); +} +function Ui(e) { + if (e.length > 0) { + let t = N(0, e, -1); + !t.expandedStates && !t.break && (t.break = "propagated"); + } + return null; +} +function Hi(e) { + let t = /* @__PURE__ */ new Set(), r = []; + function n(i) { + if (i.type === Ne && Ui(r), i.type === Fe) { + if (r.push(i), t.has(i)) return !1; + t.add(i); + } + } + function s(i) { + i.type === Fe && r.pop().break && Ui(r); + } + Vr(e, n, s, !0); +} +function mc(e) { + return e.type === me && !e.hard ? e.soft ? "" : " " : e.type === be ? e.flatContents : e; +} +function _t(e) { + return ft(e, mc); +} +function Dc(e) { + switch (We(e)) { + case Me: + if (e.parts.every((t) => t === "")) return ""; + break; + case Fe: + if (!e.contents && !e.id && !e.break && !e.expandedStates) return ""; + if (e.contents.type === Fe && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents; + break; + case Xe: + case He: + case Ve: + case $e: + if (!e.contents) return ""; + break; + case be: + if (!e.flatContents && !e.breakContents) return ""; + break; + case Be: { + let t = []; + for (let r of e) { + if (!r) continue; + let [n, ...s] = Array.isArray(r) ? r : [r]; + typeof n == "string" && typeof N(0, t, -1) == "string" ? t[t.length - 1] += n : t.push(n), t.push(...s); + } + return t.length === 0 ? "" : t.length === 1 ? t[0] : t; + } + case Ye: + case tt: + case rt: + case Ge: + case me: + case Pe: + case Ne: break; + default: throw new gt(e); + } + return e; +} +function Qt(e) { + return ft(e, (t) => Dc(t)); +} +function qe(e, t = $r) { + return ft(e, (r) => typeof r == "string" ? L(t, r.split(` +`)) : r); +} +function fc(e) { + if (e.type === me) return !0; +} +function Xi(e) { + return Yi(e, fc, !1); +} +function Ar(e, t) { + return e.type === Pe ? { + ...e, + contents: t(e.contents) + } : t(e); +} +function Vi(e) { + let t = !0; + return Vr(e, (r) => { + switch (We(r)) { + case Ye: if (r === "") break; + case rt: + case Ge: + case me: + case Ne: return t = !1, !1; + } + }), t; +} +function m(e) { + return de(e), { + type: He, + contents: e + }; +} +function xe(e, t) { + return Ki(e), de(t), { + type: Xe, + contents: t, + n: e + }; +} +function Qi(e) { + return xe(Number.NEGATIVE_INFINITY, e); +} +function Qr(e) { + return xe(-1, e); +} +function zi(e, t, r) { + de(e); + let n = e; + if (t > 0) { + for (let s = 0; s < Math.floor(t / r); ++s) n = m(n); + n = xe(t % r, n), n = xe(Number.NEGATIVE_INFINITY, n); + } + return n; +} +function zr(e) { + return $i(e), { + type: Me, + parts: e + }; +} +function l(e, t = {}) { + return de(e), Kr(t.expandedStates, !0), { + type: Fe, + id: t.id, + contents: e, + break: !!t.shouldBreak, + expandedStates: t.expandedStates + }; +} +function nt(e, t) { + return l(e[0], { + ...t, + expandedStates: e + }); +} +function P(e, t = "", r = {}) { + return de(e), t !== "" && de(t), { + type: be, + breakContents: e, + flatContents: t, + groupId: r.groupId + }; +} +function yt(e, t) { + return de(e), { + type: Ve, + contents: e, + groupId: t.groupId, + negate: t.negate + }; +} +function L(e, t) { + de(e), Kr(t); + let r = []; + for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]); + return r; +} +function pt(e, t) { + return de(t), e ? { + type: Pe, + label: e, + contents: t + } : t; +} +function us(e) { + return de(e), { + type: $e, + contents: e + }; +} +function Zi(e) { + return e === Ec ? dc : e === Fc ? Cc : Tc; +} +function eo(e, t, r) { + let n = t.type === 1 ? e.queue.slice(0, -1) : [...e.queue, t], s = "", i = 0, o = 0, u = 0; + for (let d of n) switch (d.type) { + case 0: + y(), r.useTabs ? p(1) : c(r.tabWidth); + break; + case 3: { + let { string: b } = d; + y(), s += b, i += b.length; + break; + } + case 2: { + let { width: b } = d; + o += 1, u += b; + break; + } + default: throw new Error(`Unexpected indent comment '${d.type}'.`); + } + return F(), { + ...e, + value: s, + length: i, + queue: n + }; + function p(d) { + s += " ".repeat(d), i += r.tabWidth * d; + } + function c(d) { + s += " ".repeat(d), i += d; + } + function y() { + r.useTabs ? D() : F(); + } + function D() { + o > 0 && p(o), C(); + } + function F() { + u > 0 && c(u), C(); + } + function C() { + o = 0, u = 0; + } +} +function to(e, t, r) { + if (!t) return e; + if (t.type === "root") return { + ...e, + root: e + }; + if (t === Number.NEGATIVE_INFINITY) return e.root; + let n; + return typeof t == "number" ? t < 0 ? n = gc : n = { + type: 2, + width: t + } : n = { + type: 3, + string: t + }, eo(e, n, r); +} +function ro(e, t) { + return eo(e, xc, t); +} +function hc(e) { + let t = 0; + for (let r = e.length - 1; r >= 0; r--) { + let n = e[r]; + if (n === " " || n === " ") t++; + else break; + } + return t; +} +function ps(e) { + let t = hc(e); + return { + text: t === 0 ? e : e.slice(0, e.length - t), + count: t + }; +} +function Zr(e, t, r, n, s, i) { + if (r === Number.POSITIVE_INFINITY) return !0; + let o = t.length, u = !1, p = [e], c = ""; + for (; r >= 0;) { + if (p.length === 0) { + if (o === 0) return !0; + p.push(t[--o]); + continue; + } + let { mode: y, doc: D } = p.pop(), F = We(D); + switch (F) { + case Ye: + D && (u && (c += " ", r -= 1, u = !1), c += D, r -= ot(D)); + break; + case Be: + case Me: { + let C = F === Be ? D : D.parts, d = D[cs] ?? 0; + for (let b = C.length - 1; b >= d; b--) p.push({ + mode: y, + doc: C[b] + }); + break; + } + case He: + case Xe: + case Ve: + case Pe: + p.push({ + mode: y, + doc: D.contents + }); + break; + case rt: { + let { text: C, count: d } = ps(c); + c = C, r += d; + break; + } + case Fe: { + if (i && D.break) return !1; + let C = D.break ? ve : y, d = D.expandedStates && C === ve ? N(0, D.expandedStates, -1) : D.contents; + p.push({ + mode: C, + doc: d + }); + break; + } + case be: { + let d = (D.groupId ? s[D.groupId] || ct : y) === ve ? D.breakContents : D.flatContents; + d && p.push({ + mode: y, + doc: d + }); + break; + } + case me: + if (y === ve || D.hard) return !0; + D.soft || (u = !0); + break; + case $e: + n = !0; + break; + case Ge: + if (n) return !1; + break; + } + } + return !1; +} +function ls(e, t) { + let r = Object.create(null), n = t.printWidth, s = Zi(t.endOfLine), i = 0, o = [{ + indent: as, + mode: ve, + doc: e + }], u = "", p = !1, c = [], y = [], D = [], F = [], C = 0; + for (Hi(e); o.length > 0;) { + let { indent: h, mode: g, doc: S } = o.pop(); + switch (We(S)) { + case Ye: { + let j = s !== ` +` ? W(0, S, ` +`, s) : S; + j && (u += j, o.length > 0 && (i += ot(j))); + break; + } + case Be: + for (let j = S.length - 1; j >= 0; j--) o.push({ + indent: h, + mode: g, + doc: S[j] + }); + break; + case tt: + if (y.length >= 2) throw new Error("There are too many 'cursor' in doc."); + y.push(C + u.length); + break; + case He: + o.push({ + indent: ro(h, t), + mode: g, + doc: S.contents + }); + break; + case Xe: + o.push({ + indent: to(h, S.n, t), + mode: g, + doc: S.contents + }); + break; + case rt: + O(); + break; + case Fe: + switch (g) { + case ct: if (!p) { + o.push({ + indent: h, + mode: S.break ? ve : ct, + doc: S.contents + }); + break; + } + case ve: { + p = !1; + let j = { + indent: h, + mode: ct, + doc: S.contents + }, U = n - i, fe = c.length > 0; + if (!S.break && Zr(j, o, U, fe, r)) o.push(j); + else if (S.expandedStates) { + let Y = N(0, S.expandedStates, -1); + if (S.break) { + o.push({ + indent: h, + mode: ve, + doc: Y + }); + break; + } else for (let z = 1; z < S.expandedStates.length + 1; z++) if (z >= S.expandedStates.length) { + o.push({ + indent: h, + mode: ve, + doc: Y + }); + break; + } else { + let Ie = { + indent: h, + mode: ct, + doc: S.expandedStates[z] + }; + if (Zr(Ie, o, U, fe, r)) { + o.push(Ie); + break; + } + } + } else o.push({ + indent: h, + mode: ve, + doc: S.contents + }); + break; + } + } + S.id && (r[S.id] = N(0, o, -1).mode); + break; + case Me: { + let j = n - i, U = S[cs] ?? 0, { parts: fe } = S, Y = fe.length - U; + if (Y === 0) break; + let z = fe[U + 0], ee = fe[U + 1], Ie = { + indent: h, + mode: ct, + doc: z + }, st = { + indent: h, + mode: ve, + doc: z + }, _ = Zr(Ie, [], j, c.length > 0, r, !0); + if (Y === 1) { + _ ? o.push(Ie) : o.push(st); + break; + } + let re = { + indent: h, + mode: ct, + doc: ee + }, ae = { + indent: h, + mode: ve, + doc: ee + }; + if (Y === 2) { + _ ? o.push(re, Ie) : o.push(ae, st); + break; + } + let it = fe[U + 2], Bt = { + indent: h, + mode: g, + doc: { + ...S, + [cs]: U + 2 + } + }, Pr = Zr({ + indent: h, + mode: ct, + doc: [ + z, + ee, + it + ] + }, [], j, c.length > 0, r, !0); + o.push(Bt), Pr ? o.push(re, Ie) : _ ? o.push(ae, Ie) : o.push(ae, st); + break; + } + case be: + case Ve: { + let j = S.groupId ? r[S.groupId] : g; + if (j === ve) { + let U = S.type === be ? S.breakContents : S.negate ? S.contents : m(S.contents); + U && o.push({ + indent: h, + mode: g, + doc: U + }); + } + if (j === ct) { + let U = S.type === be ? S.flatContents : S.negate ? m(S.contents) : S.contents; + U && o.push({ + indent: h, + mode: g, + doc: U + }); + } + break; + } + case $e: + c.push({ + indent: h, + mode: g, + doc: S.contents + }); + break; + case Ge: + c.length > 0 && o.push({ + indent: h, + mode: g, + doc: os + }); + break; + case me: + switch (g) { + case ct: if (S.hard) p = !0; + else { + S.soft || (u += " ", i += 1); + break; + } + case ve: + if (c.length > 0) { + o.push({ + indent: h, + mode: g, + doc: S + }, ...c.reverse()), c.length = 0; + break; + } + S.literal ? (u += s, i = 0, h.root && (h.root.value && (u += h.root.value), i = h.root.length)) : (O(), u += s + h.value, i = h.length); + break; + } + break; + case Pe: + o.push({ + indent: h, + mode: g, + doc: S.contents + }); + break; + case Ne: break; + default: throw new gt(S); + } + o.length === 0 && c.length > 0 && (o.push(...c.reverse()), c.length = 0); + } + let d = D.join("") + u, b = [...F, ...y]; + if (b.length !== 2) return { formatted: d }; + let B = b[0]; + return { + formatted: d, + cursorNodeStart: B, + cursorNodeText: d.slice(B, N(0, b, -1)) + }; + function O() { + let { text: h, count: g } = ps(u); + h && (D.push(h), C += h.length), u = "", i -= g, y.length > 0 && (F.push(...y.map((S) => Math.min(S, C))), y.length = 0); + } +} +function Sc(e, t, r = 0) { + let n = 0; + for (let s = r; s < e.length; ++s) e[s] === " " ? n = n + t - n % t : n++; + return n; +} +function Bc(e, t) { + let r = e.lastIndexOf(` +`); + return r === -1 ? 0 : no(e.slice(r + 1).match(/^[\t ]*/u)[0], t); +} +function en(e, t, r) { + let { node: n } = e; + if (n.type === "TemplateLiteral" && kc(e)) { + let c = bc(e, t, r); + if (c) return c; + } + let i = "expressions"; + n.type === "TSTemplateLiteralType" && (i = "types"); + let o = [], u = e.map(r, i); + o.push(je, "`"); + let p = 0; + return e.each(({ index: c, node: y }) => { + if (o.push(r()), y.tail) return; + let { tabWidth: D } = t, F = y.value.raw, C = F.includes(` +`) ? so(F, D) : p; + p = C; + let d = u[c], b = n[i][c], B = ue(t.originalText, I(y), w(n.quasis[c + 1])); + if (!B) { + let h = ls(d, { + ...t, + printWidth: Number.POSITIVE_INFINITY + }).formatted; + h.includes(` +`) ? B = !0 : d = h; + } + B && (T(b) || b.type === "Identifier" || J(b) || b.type === "ConditionalExpression" || b.type === "SequenceExpression" || Ae(b) || Te(b)) && (d = [m([f, d]), f]); + let O = C === 0 && F.endsWith(` +`) ? xe(Number.NEGATIVE_INFINITY, d) : zi(d, C, D); + o.push(l([ + "${", + O, + je, + "}" + ])); + }, "quasis"), o.push("`"), o; +} +function io(e, t, r) { + let n = r("quasi"), { node: s } = e, i = "", o = et(s.quasi, x.Leading)[0]; + return o && (ue(t.originalText, I(s.typeArguments ?? s.tag), w(o)) ? i = f : i = " "), pt(n.label && { + tagged: !0, + ...n.label + }, [ + r("tag"), + r("typeArguments"), + i, + je, + n + ]); +} +function bc(e, t, r) { + let { node: n } = e, s = n.quasis[0].value.raw.trim().split(/\s*\|\s*/u); + if (s.length > 1 || s.some((i) => i.length > 0)) { + t.__inJestEach = !0; + let i = e.map(r, "expressions"); + t.__inJestEach = !1; + let o = i.map((D) => "${" + ls(D, { + ...t, + printWidth: Number.POSITIVE_INFINITY, + endOfLine: "lf" + }).formatted + "}"), u = [{ + hasLineBreak: !1, + cells: [] + }]; + for (let D = 1; D < n.quasis.length; D++) { + let F = N(0, u, -1), C = o[D - 1]; + F.cells.push(C), C.includes(` +`) && (F.hasLineBreak = !0), n.quasis[D].value.raw.includes(` +`) && u.push({ + hasLineBreak: !1, + cells: [] + }); + } + let p = Math.max(s.length, ...u.map((D) => D.cells.length)), c = Array.from({ length: p }).fill(0), y = [{ cells: s }, ...u.filter((D) => D.cells.length > 0)]; + for (let { cells: D } of y.filter((F) => !F.hasLineBreak)) for (let [F, C] of D.entries()) c[F] = Math.max(c[F], ot(C)); + return [ + je, + "`", + m([E, L(E, y.map((D) => L(" | ", D.cells.map((F, C) => D.hasLineBreak ? F : F + " ".repeat(c[C] - ot(F))))))]), + E, + "`" + ]; + } +} +function Pc(e, t) { + let { node: r } = e, n = t(); + return T(r) && (n = l([m([f, n]), f])), [ + "${", + n, + je, + "}" + ]; +} +function zt(e, t) { + return e.map(() => Pc(e, t), "expressions"); +} +function tn(e, t) { + return ft(e, (r) => typeof r == "string" ? t ? W(0, r, /(\\*)`/gu, "$1$1\\`") : ms(r) : r); +} +function ms(e) { + return W(0, e, /([\\`]|\$\{)/gu, "\\$1"); +} +function kc({ node: e, parent: t }) { + let r = /^[fx]?(?:describe|it|test)$/u; + return t.type === "TaggedTemplateExpression" && t.quasi === e && t.tag.type === "MemberExpression" && t.tag.property.type === "Identifier" && t.tag.property.name === "each" && (t.tag.object.type === "Identifier" && r.test(t.tag.object.name) || t.tag.object.type === "MemberExpression" && t.tag.object.property.type === "Identifier" && (t.tag.object.property.name === "only" || t.tag.object.property.name === "skip") && t.tag.object.object.type === "Identifier" && r.test(t.tag.object.object.name)); +} +function oo(e) { + let t = (n) => n.type === "TemplateLiteral", r = (n, s) => Oe(n) && !n.computed && n.key.type === "Identifier" && n.key.name === "styles" && s === "value"; + return e.match(t, (n, s) => q(n) && s === "elements", r, ...fs) || e.match(t, r, ...fs); +} +function ys(e) { + return e.match((t) => t.type === "TemplateLiteral", (t, r) => Oe(t) && !t.computed && t.key.type === "Identifier" && t.key.name === "template" && r === "value", ...fs); +} +function Ds(e, t) { + return T(e, x.Block | x.Leading, ({ value: r }) => r === ` ${t} `); +} +function rn({ node: e, parent: t }, r) { + return Ds(e, r) || Ic(t) && Ds(t, r) || t.type === "ExpressionStatement" && Ds(t, r); +} +function Ic(e) { + return e.type === "AsConstExpression" || e.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const"; +} +async function ao(e, t, r) { + let { node: n } = r, s = ""; + for (let [p, c] of n.quasis.entries()) { + let { raw: y } = c.value; + p > 0 && (s += "@prettier-placeholder-" + (p - 1) + "-id"), s += y; + } + let u = Lc(await e(s, { parser: "scss" }), zt(r, t)); + if (!u) throw new Error("Couldn't insert all the expressions"); + return [ + "`", + m([E, u]), + f, + "`" + ]; +} +function Lc(e, t) { + if (!R(t)) return e; + let r = 0, n = ft(Qt(e), (s) => typeof s != "string" || !s.includes("@prettier-placeholder") ? s : s.split(/@prettier-placeholder-(\d+)-id/u).map((i, o) => o % 2 === 0 ? qe(i) : (r++, t[i]))); + return t.length === r ? n : null; +} +function Oc(e) { + return e.match(void 0, (t, r) => r === "quasi" && t.type === "TaggedTemplateExpression" && Pt(t.tag, [ + "css", + "css.global", + "css.resolve" + ])) || e.match(void 0, (t, r) => r === "expression" && t.type === "JSXExpressionContainer", (t, r) => r === "children" && t.type === "JSXElement" && t.openingElement.name.type === "JSXIdentifier" && t.openingElement.name.name === "style" && t.openingElement.attributes.some((n) => n.type === "JSXAttribute" && n.name.type === "JSXIdentifier" && n.name.name === "jsx")); +} +function nn(e) { + return e.type === "Identifier" && e.name === "styled"; +} +function uo(e) { + return /^[A-Z]/u.test(e.object.name) && e.property.name === "extend"; +} +function wc({ parent: e }) { + if (!e || e.type !== "TaggedTemplateExpression") return !1; + let t = e.tag.type === "ParenthesizedExpression" ? e.tag.expression : e.tag; + switch (t.type) { + case "MemberExpression": return nn(t.object) || uo(t); + case "CallExpression": return nn(t.callee) || t.callee.type === "MemberExpression" && (t.callee.object.type === "MemberExpression" && (nn(t.callee.object.object) || uo(t.callee.object)) || t.callee.object.type === "CallExpression" && nn(t.callee.object.callee)); + case "Identifier": return t.name === "css"; + default: return !1; + } +} +function _c({ parent: e, grandparent: t }) { + return t?.type === "JSXAttribute" && e.type === "JSXExpressionContainer" && t.name.type === "JSXIdentifier" && t.name.name === "css"; +} +async function co(e, t, r) { + let { node: n } = r, s = n.quasis.length, i = zt(r, t), o = []; + for (let u = 0; u < s; u++) { + let p = n.quasis[u], c = u === 0, y = u === s - 1, D = p.value.cooked, F = D.split(` +`), C = F.length, d = i[u], b = C > 2 && F[0].trim() === "" && F[1].trim() === "", B = C > 2 && F[C - 1].trim() === "" && F[C - 2].trim() === "", O = F.every((g) => /^\s*(?:#[^\n\r]*)?$/u.test(g)); + if (!y && /#[^\n\r]*$/u.test(F[C - 1])) return null; + let h = null; + O ? h = Mc(F) : h = await e(D, { parser: "graphql" }), h ? (h = tn(h, !1), !c && b && o.push(""), o.push(h), !y && B && o.push("")) : !c && !y && b && o.push(""), d && o.push(d); + } + return [ + "`", + m([E, L(E, o)]), + E, + "`" + ]; +} +function Mc(e) { + let t = [], r = !1, n = e.map((s) => s.trim()); + for (let [s, i] of n.entries()) i !== "" && (n[s - 1] === "" && r ? t.push([E, i]) : t.push(i), r = !0); + return t.length === 0 ? null : L(E, t); +} +function lo({ node: e, parent: t }) { + return rn({ + node: e, + parent: t + }, "GraphQL") || t && (t.type === "TaggedTemplateExpression" && (t.tag.type === "MemberExpression" && t.tag.object.name === "graphql" && t.tag.property.name === "experimental" || t.tag.type === "Identifier" && (t.tag.name === "gql" || t.tag.name === "graphql")) || t.type === "CallExpression" && t.callee.type === "Identifier" && t.callee.name === "graphql"); +} +async function mo(e, t, r, n, s) { + let { node: i } = n, o = Es; + Es = Es + 1 >>> 0; + let u = (O) => `PRETTIER_HTML_PLACEHOLDER_${O}_${o}_IN_JS`, p = i.quasis.map((O, h, g) => h === g.length - 1 ? O.value.cooked : O.value.cooked + u(h)).join(""), c = zt(n, r), y = new RegExp(u("(\\d+)"), "gu"), D = 0, C = ft(await t(p, { + parser: e, + __onHtmlRoot(O) { + D = O.children.length; + } + }), (O) => { + if (typeof O != "string") return O; + let h = [], g = O.split(y); + for (let S = 0; S < g.length; S++) { + let j = g[S]; + if (S % 2 === 0) { + j && (j = ms(j), s.__embeddedInHtml && (j = W(0, j, /<\/(?=script\b)/giu, "<\\/")), h.push(j)); + continue; + } + let U = Number(j); + h.push(c[U]); + } + return h; + }), d = /^\s/u.test(p) ? " " : "", b = /\s$/u.test(p) ? " " : "", B = s.htmlWhitespaceSensitivity === "ignore" ? E : d && b ? A : null; + return B ? l([ + "`", + m([B, l(C)]), + B, + "`" + ]) : pt({ hug: !1 }, l([ + "`", + d, + D > 1 ? m(l(C)) : l(C), + b, + "`" + ])); +} +function Do(e) { + return rn(e, "HTML") || e.match((t) => t.type === "TemplateLiteral", (t, r) => t.type === "TaggedTemplateExpression" && t.tag.type === "Identifier" && t.tag.name === "html" && r === "quasi"); +} +async function Eo(e, t, r) { + let { node: n } = r, s = W(0, n.quasis[0].value.raw, /((?:\\\\)*)\\`/gu, (p, c) => "\\".repeat(c.length / 2) + "`"), i = Nc(s), o = i !== ""; + o && (s = W(0, s, new RegExp(`^${i}`, "gmu"), "")); + let u = tn(await e(s, { + parser: "markdown", + __inJsTemplate: !0 + }), !0); + return [ + "`", + o ? m([f, u]) : [$r, Qi(u)], + f, + "`" + ]; +} +function Nc(e) { + let t = e.match(/^([^\S\n]*)\S/mu); + return t === null ? "" : t[1]; +} +function Fo({ node: e, parent: t }) { + return t?.type === "TaggedTemplateExpression" && e.quasis.length === 1 && t.tag.type === "Identifier" && (t.tag.name === "md" || t.tag.name === "markdown"); +} +function vc(e) { + let { node: t } = e; + if (t.type !== "TemplateLiteral" || Jc(t)) return; + let r = jc.find(({ test: n }) => n(e)); + if (r) return t.quasis.length === 1 && t.quasis[0].value.raw.trim() === "" ? "``" : r.print; +} +function Rc(e) { + return async (...t) => { + let r = await e(...t); + return r && pt({ + embed: !0, + ...r.label + }, r); + }; +} +function Jc({ quasis: e }) { + return e.some(({ value: { cooked: t } }) => t === null); +} +function So(e) { + let t = e.match(go); + return t ? t[0].trimStart() : ""; +} +function Bo(e) { + let r = e.match(go)?.[0]; + return r == null ? e : e.slice(r.length); +} +function bo(e) { + e = W(0, e.replace(Wc, "").replace(Gc, ""), Yc, "$1"); + let r = ""; + for (; r !== e;) r = e, e = W(0, e, Uc, ` +$1 $2 +`); + e = e.replace(Ao, "").trimEnd(); + let n = Object.create(null), s = W(0, e, To, "").replace(Ao, "").trimEnd(), i; + for (; i = To.exec(e);) { + let o = W(0, i[2], qc, ""); + if (typeof n[i[1]] == "string" || Array.isArray(n[i[1]])) { + let u = n[i[1]]; + n[i[1]] = [ + ...ho, + ...Array.isArray(u) ? u : [u], + o + ]; + } else n[i[1]] = o; + } + return { + comments: s, + pragmas: n + }; +} +function Po({ comments: e = "", pragmas: t = {} }) { + let o = Object.keys(t), u = o.flatMap((c) => xo(c, t[c])).map((c) => ` * ${c} +`).join(""); + if (!e) { + if (o.length === 0) return ""; + if (o.length === 1 && !Array.isArray(t[o[0]])) { + let c = t[o[0]]; + return `/** ${xo(o[0], c)[0]} */`; + } + } + let p = e.split(` +`).map((c) => ` * ${c}`).join(` +`) + ` +`; + return `/** +` + (e ? p : "") + (e && o.length > 0 ? ` * +` : "") + u + " */"; +} +function xo(e, t) { + return [...ho, ...Array.isArray(t) ? t : [t]].map((r) => `@${e} ${r}`.trim()); +} +function Hc(e) { + if (!e.startsWith("#!")) return ""; + let t = e.indexOf(` +`); + return t === -1 ? e : e.slice(0, t); +} +function Xc(e) { + let t = Io(e); + t && (e = e.slice(t.length + 1)); + let { pragmas: n, comments: s } = bo(So(e)); + return { + shebang: t, + text: e, + pragmas: n, + comments: s + }; +} +function Lo(e) { + let { shebang: t, text: r, pragmas: n, comments: s } = Xc(e), i = Bo(r), o = Po({ + pragmas: { + [ko]: "", + ...n + }, + comments: s.trimStart() + }); + return (t ? `${t} +` : "") + o + (i.startsWith(` +`) ? ` +` : ` + +`) + i; +} +function Vc(e) { + if (!ce(e)) return !1; + let t = `*${e.value}*`.split(` +`); + return t.length > 1 && t.every((r) => r.trimStart()[0] === "*"); +} +function $c(e) { + return Fs.has(e) || Fs.set(e, Vc(e)), Fs.get(e); +} +function wo(e, t) { + let r = e.node; + if (At(r)) return t.originalText.slice(w(r), I(r)).trimEnd(); + if (Oo(r)) return Kc(r); + if (ce(r)) return [ + "/*", + qe(r.value), + "*/" + ]; + throw new Error("Not a comment: " + JSON.stringify(r)); +} +function Kc(e) { + let t = e.value.split(` +`); + return [ + "/*", + L(E, t.map((r, n) => n === 0 ? r.trimEnd() : " " + (n < t.length - 1 ? r.trim() : r.trimStart()))), + "*/" + ]; +} +function ds(e, t) { + if (e.isRoot) return !1; + let { node: r, key: n, parent: s } = e; + if (t.__isInHtmlInterpolation && !t.bracketSpacing && el(r) && xr(e)) return !0; + if (Qc(r)) return !1; + if (r.type === "Identifier") { + if (r.extra?.parenthesized && /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name) || n === "left" && (r.name === "async" && !s.await || r.name === "let") && s.type === "ForOfStatement") return !0; + if (r.name === "let") { + let i = e.findAncestor((o) => o.type === "ForOfStatement")?.left; + if (i && ye(i, (o) => o === r)) return !0; + } + if (n === "object" && r.name === "let" && s.type === "MemberExpression" && s.computed && !s.optional) { + let i = e.findAncestor((u) => u.type === "ExpressionStatement" || u.type === "ForStatement" || u.type === "ForInStatement"), o = i ? i.type === "ExpressionStatement" ? i.expression : i.type === "ForStatement" ? i.init : i.left : void 0; + if (o && ye(o, (u) => u === r)) return !0; + } + if (n === "expression") switch (r.name) { + case "await": + case "interface": + case "module": + case "using": + case "yield": + case "let": + case "component": + case "hook": + case "type": { + let i = e.findAncestor((o) => !Ae(o)); + if (i !== s && i.type === "ExpressionStatement") return !0; + } + } + return !1; + } + if (r.type === "ObjectExpression" || r.type === "FunctionExpression" || r.type === "ClassExpression" || r.type === "DoExpression") { + let i = e.findAncestor((o) => o.type === "ExpressionStatement")?.expression; + if (i && ye(i, (o) => o === r)) return !0; + } + if (r.type === "ObjectExpression") { + let i = e.findAncestor((o) => o.type === "ArrowFunctionExpression")?.body; + if (i && i.type !== "SequenceExpression" && i.type !== "AssignmentExpression" && ye(i, (o) => o === r)) return !0; + } + switch (s.type) { + case "ParenthesizedExpression": return !1; + case "ClassDeclaration": + case "ClassExpression": + if (n === "superClass" && (r.type === "ArrowFunctionExpression" || r.type === "AssignmentExpression" || r.type === "AwaitExpression" || r.type === "BinaryExpression" || r.type === "ConditionalExpression" || r.type === "LogicalExpression" || r.type === "NewExpression" || r.type === "ObjectExpression" || r.type === "SequenceExpression" || r.type === "TaggedTemplateExpression" || r.type === "UnaryExpression" || r.type === "UpdateExpression" || r.type === "YieldExpression" || r.type === "TSNonNullExpression" || r.type === "ClassExpression" && R(r.decorators))) return !0; + break; + case "ExportDefaultDeclaration": return _o(e, t) || r.type === "SequenceExpression"; + case "Decorator": + if (n === "expression" && !rl(r)) return !0; + break; + case "TypeAnnotation": + if (e.match(void 0, void 0, (i, o) => o === "returnType" && i.type === "ArrowFunctionExpression") && Zc(r)) return !0; + break; + case "BinaryExpression": + if (n === "left" && (s.operator === "in" || s.operator === "instanceof") && r.type === "UnaryExpression") return !0; + break; + case "VariableDeclarator": + if (n === "init" && e.match(void 0, void 0, (i, o) => o === "declarations" && i.type === "VariableDeclaration", (i, o) => o === "left" && i.type === "ForInStatement")) return !0; + break; + } + switch (r.type) { + case "UpdateExpression": if (s.type === "UnaryExpression") return r.prefix && (r.operator === "++" && s.operator === "+" || r.operator === "--" && s.operator === "-"); + case "UnaryExpression": switch (s.type) { + case "UnaryExpression": return r.operator === s.operator && (r.operator === "+" || r.operator === "-"); + case "BindExpression": return !0; + case "MemberExpression": + case "OptionalMemberExpression": return n === "object"; + case "TaggedTemplateExpression": return !0; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": return n === "callee"; + case "BinaryExpression": return n === "left" && s.operator === "**"; + case "TSNonNullExpression": return !0; + default: return !1; + } + case "BinaryExpression": + if (s.type === "UpdateExpression" || r.operator === "in" && zc(e)) return !0; + if (r.operator === "|>" && r.extra?.parenthesized) { + let i = e.grandparent; + if (i.type === "BinaryExpression" && i.operator === "|>") return !0; + } + case "TSTypeAssertion": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": + case "LogicalExpression": switch (s.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": return !Ae(r); + case "ConditionalExpression": return Ae(r) || fi(r); + case "CallExpression": + case "NewExpression": + case "OptionalCallExpression": return n === "callee"; + case "ClassExpression": + case "ClassDeclaration": return n === "superClass"; + case "TSTypeAssertion": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "JSXSpreadAttribute": + case "SpreadElement": + case "BindExpression": + case "AwaitExpression": + case "TSNonNullExpression": + case "UpdateExpression": return !0; + case "MemberExpression": + case "OptionalMemberExpression": return n === "object"; + case "AssignmentExpression": + case "AssignmentPattern": return n === "left" && (r.type === "TSTypeAssertion" || Ae(r)); + case "LogicalExpression": if (r.type === "LogicalExpression") return s.operator !== r.operator; + case "BinaryExpression": { + let { operator: i, type: o } = r; + if (!i && o !== "TSTypeAssertion") return !0; + let u = yr(i), p = s.operator, c = yr(p); + return !!(c > u || n === "right" && c === u || c === u && !dr(p, i) || c < u && i === "%" && (p === "+" || p === "-") || Ai(p)); + } + default: return !1; + } + case "SequenceExpression": return s.type !== "ForStatement"; + case "YieldExpression": if (s.type === "AwaitExpression" || s.type === "TSTypeAssertion") return !0; + case "AwaitExpression": switch (s.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "SpreadElement": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": + case "BindExpression": return !0; + case "MemberExpression": + case "OptionalMemberExpression": return n === "object"; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": return n === "callee"; + case "ConditionalExpression": return n === "test"; + case "BinaryExpression": return !(!r.argument && s.operator === "|>"); + default: return !1; + } + case "TSFunctionType": if (e.match((i) => i.type === "TSFunctionType", (i, o) => o === "typeAnnotation" && i.type === "TSTypeAnnotation", (i, o) => o === "returnType" && i.type === "ArrowFunctionExpression")) return !0; + case "TSConditionalType": + case "TSConstructorType": + case "ConditionalTypeAnnotation": + if (n === "extendsType" && Ue(r) && s.type === r.type || n === "checkType" && Ue(s)) return !0; + if (n === "extendsType" && s.type === "TSConditionalType") { + let { typeAnnotation: i } = r.returnType || r.typeAnnotation; + if (i.type === "TSTypePredicate" && i.typeAnnotation && (i = i.typeAnnotation.typeAnnotation), i.type === "TSInferType" && i.typeParameter.constraint) return !0; + } + case "TSUnionType": + case "TSIntersectionType": if (Se(s) || xt(s)) return !0; + case "TSInferType": if (r.type === "TSInferType") { + if (s.type === "TSRestType") return !1; + if (n === "types" && (s.type === "TSUnionType" || s.type === "TSIntersectionType") && r.typeParameter.type === "TSTypeParameter" && r.typeParameter.constraint) return !0; + } + case "TSTypeOperator": return s.type === "TSArrayType" || s.type === "TSOptionalType" || s.type === "TSRestType" || n === "objectType" && s.type === "TSIndexedAccessType" || s.type === "TSTypeOperator" || s.type === "TSTypeAnnotation" && e.grandparent.type.startsWith("TSJSDoc"); + case "TSTypeQuery": return n === "objectType" && s.type === "TSIndexedAccessType" || n === "elementType" && s.type === "TSArrayType"; + case "TypeOperator": return s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || s.type === "TypeOperator"; + case "TypeofTypeAnnotation": return n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType") || n === "elementType" && s.type === "ArrayTypeAnnotation"; + case "ArrayTypeAnnotation": return s.type === "NullableTypeAnnotation"; + case "IntersectionTypeAnnotation": + case "UnionTypeAnnotation": return s.type === "TypeOperator" || s.type === "KeyofTypeAnnotation" || s.type === "ArrayTypeAnnotation" || s.type === "NullableTypeAnnotation" || s.type === "IntersectionTypeAnnotation" || s.type === "UnionTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType"); + case "InferTypeAnnotation": + case "NullableTypeAnnotation": return s.type === "ArrayTypeAnnotation" || n === "objectType" && (s.type === "IndexedAccessType" || s.type === "OptionalIndexedAccessType"); + case "ComponentTypeAnnotation": + case "FunctionTypeAnnotation": { + if (r.type === "ComponentTypeAnnotation" && (r.rendersType === null || r.rendersType === void 0)) return !1; + if (e.match(void 0, (o, u) => u === "typeAnnotation" && o.type === "TypeAnnotation", (o, u) => u === "returnType" && o.type === "ArrowFunctionExpression") || e.match(void 0, (o, u) => u === "typeAnnotation" && o.type === "TypePredicate", (o, u) => u === "typeAnnotation" && o.type === "TypeAnnotation", (o, u) => u === "returnType" && o.type === "ArrowFunctionExpression")) return !0; + let i = s.type === "NullableTypeAnnotation" ? e.grandparent : s; + return i.type === "UnionTypeAnnotation" || i.type === "IntersectionTypeAnnotation" || i.type === "ArrayTypeAnnotation" || n === "objectType" && (i.type === "IndexedAccessType" || i.type === "OptionalIndexedAccessType") || n === "checkType" && s.type === "ConditionalTypeAnnotation" || n === "extendsType" && s.type === "ConditionalTypeAnnotation" && r.returnType?.type === "InferTypeAnnotation" && r.returnType?.typeParameter.bound || i.type === "NullableTypeAnnotation" || s.type === "FunctionTypeParam" && s.name === null && K(r).some((o) => o.typeAnnotation?.type === "NullableTypeAnnotation"); + } + case "OptionalIndexedAccessType": return n === "objectType" && s.type === "IndexedAccessType"; + case "StringLiteral": + case "NumericLiteral": + case "Literal": + if (typeof r.value == "string" && s.type === "ExpressionStatement" && typeof s.directive != "string") { + let i = e.grandparent; + return i.type === "Program" || i.type === "BlockStatement"; + } + return n === "object" && J(s) && Ce(r); + case "AssignmentExpression": return !((n === "init" || n === "update") && s.type === "ForStatement" || n === "expression" && r.left.type !== "ObjectPattern" && s.type === "ExpressionStatement" || n === "key" && s.type === "TSPropertySignature" || s.type === "AssignmentExpression" || n === "expressions" && s.type === "SequenceExpression" && e.match(void 0, void 0, (i, o) => (o === "init" || o === "update") && i.type === "ForStatement") || n === "value" && s.type === "Property" && e.match(void 0, void 0, (i, o) => o === "properties" && i.type === "ObjectPattern") || s.type === "NGChainedExpression" || n === "node" && s.type === "JsExpressionRoot"); + case "ConditionalExpression": switch (s.type) { + case "TaggedTemplateExpression": + case "UnaryExpression": + case "SpreadElement": + case "BinaryExpression": + case "LogicalExpression": + case "NGPipeExpression": + case "ExportDefaultDeclaration": + case "AwaitExpression": + case "JSXSpreadAttribute": + case "TSTypeAssertion": + case "TypeCastExpression": + case "TSAsExpression": + case "TSSatisfiesExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": + case "TSNonNullExpression": return !0; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": return n === "callee"; + case "ConditionalExpression": return t.experimentalTernaries ? !1 : n === "test"; + case "MemberExpression": + case "OptionalMemberExpression": return n === "object"; + default: return !1; + } + case "FunctionExpression": switch (s.type) { + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": return n === "callee"; + case "TaggedTemplateExpression": return !0; + default: return !1; + } + case "ArrowFunctionExpression": switch (s.type) { + case "BinaryExpression": return s.operator !== "|>" || r.extra?.parenthesized; + case "NewExpression": + case "CallExpression": + case "OptionalCallExpression": return n === "callee"; + case "MemberExpression": + case "OptionalMemberExpression": return n === "object"; + case "TSAsExpression": + case "TSSatisfiesExpression": + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": + case "TSNonNullExpression": + case "BindExpression": + case "TaggedTemplateExpression": + case "UnaryExpression": + case "LogicalExpression": + case "AwaitExpression": + case "TSTypeAssertion": + case "MatchExpressionCase": return !0; + case "TSInstantiationExpression": return n === "expression"; + case "ConditionalExpression": return n === "test"; + default: return !1; + } + case "ClassExpression": switch (s.type) { + case "NewExpression": return n === "callee"; + default: return !1; + } + case "OptionalMemberExpression": + case "OptionalCallExpression": + case "CallExpression": + case "MemberExpression": if (tl(e)) return !0; + case "TaggedTemplateExpression": + case "TSNonNullExpression": + if (n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression")) { + let i = r; + for (; i;) switch (i.type) { + case "CallExpression": + case "OptionalCallExpression": return !0; + case "MemberExpression": + case "OptionalMemberExpression": + case "BindExpression": + i = i.object; + break; + case "TaggedTemplateExpression": + i = i.tag; + break; + case "TSNonNullExpression": + i = i.expression; + break; + default: return !1; + } + } + return !1; + case "BindExpression": return n === "callee" && (s.type === "BindExpression" || s.type === "NewExpression") || n === "object" && J(s); + case "NGPipeExpression": return !(s.type === "NGRoot" || s.type === "NGMicrosyntaxExpression" || s.type === "ObjectProperty" && !r.extra?.parenthesized || q(s) || n === "arguments" && M(s) || n === "right" && s.type === "NGPipeExpression" || n === "property" && s.type === "MemberExpression" || s.type === "AssignmentExpression"); + case "JSXFragment": + case "JSXElement": return n === "callee" || n === "left" && s.type === "BinaryExpression" && s.operator === "<" || !q(s) && s.type !== "ArrowFunctionExpression" && s.type !== "AssignmentExpression" && s.type !== "AssignmentPattern" && s.type !== "BinaryExpression" && s.type !== "NewExpression" && s.type !== "ConditionalExpression" && s.type !== "ExpressionStatement" && s.type !== "JsExpressionRoot" && s.type !== "JSXAttribute" && s.type !== "JSXElement" && s.type !== "JSXExpressionContainer" && s.type !== "JSXFragment" && s.type !== "LogicalExpression" && !M(s) && !Oe(s) && s.type !== "ReturnStatement" && s.type !== "ThrowStatement" && s.type !== "TypeCastExpression" && s.type !== "VariableDeclarator" && s.type !== "YieldExpression" && s.type !== "MatchExpressionCase"; + case "TSInstantiationExpression": return n === "object" && J(s); + case "MatchOrPattern": return s.type === "MatchAsPattern"; + } + return !1; +} +function zc(e) { + let t = 0, { node: r } = e; + for (; r;) { + let n = e.getParentNode(t++); + if (n?.type === "ForStatement" && n.init === r) return !0; + r = n; + } + return !1; +} +function Zc(e) { + return Er(e, (t) => t.type === "ObjectTypeAnnotation" && Er(t, (r) => r.type === "FunctionTypeAnnotation")); +} +function el(e) { + return se(e); +} +function xr(e) { + let { parent: t, key: r } = e; + switch (t.type) { + case "NGPipeExpression": + if (r === "arguments" && e.isLast) return e.callParent(xr); + break; + case "ObjectProperty": + if (r === "value") return e.callParent(() => e.key === "properties" && e.isLast); + break; + case "BinaryExpression": + case "LogicalExpression": + if (r === "right") return e.callParent(xr); + break; + case "ConditionalExpression": + if (r === "alternate") return e.callParent(xr); + break; + case "UnaryExpression": + if (t.prefix) return e.callParent(xr); + break; + } + return !1; +} +function _o(e, t) { + let { node: r, parent: n } = e; + return r.type === "FunctionExpression" || r.type === "ClassExpression" ? n.type === "ExportDefaultDeclaration" || !ds(e, t) : !Xt(r) || n.type !== "ExportDefaultDeclaration" && ds(e, t) ? !1 : e.call(() => _o(e, t), ...Rr(r)); +} +function tl(e) { + return !!(e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalCallExpression" || t.type === "OptionalMemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match(void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "tag" && t.type === "TaggedTemplateExpression") || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && (t.type === "CallExpression" || t.type === "NewExpression")) || e.match((t) => t.type === "OptionalMemberExpression" || t.type === "OptionalCallExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression") || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "ChainExpression") && (e.match(void 0, void 0, (t, r) => r === "callee" && (t.type === "CallExpression" && !t.optional || t.type === "NewExpression") || r === "object" && t.type === "MemberExpression" && !t.optional) || e.match(void 0, void 0, (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression")) || e.match((t) => t.type === "CallExpression" || t.type === "MemberExpression", (t, r) => r === "expression" && t.type === "TSNonNullExpression", (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "object" && t.type === "MemberExpression" || r === "callee" && t.type === "CallExpression")); +} +function Cs(e) { + return e.type === "Identifier" ? !0 : J(e) ? !e.computed && !e.optional && e.property.type === "Identifier" && Cs(e.object) : !1; +} +function rl(e) { + return e.type === "ChainExpression" && (e = e.expression), Cs(e) || M(e) && !e.optional && Cs(e.callee); +} +function nl(e, t) { + let r = t - 1; + r = ze(e, r, { backwards: !0 }), r = Ze(e, r, { backwards: !0 }), r = ze(e, r, { backwards: !0 }); + let n = Ze(e, r, { backwards: !0 }); + return r !== n; +} +function As(e, t) { + let r = e.node; + return r.printed = !0, t.printer.printComment(e, t); +} +function il(e, t) { + let r = e.node, n = [As(e, t)], { printer: s, originalText: i, locStart: o, locEnd: u } = t; + if (s.isBlockComment?.(r)) { + let y = Z(i, u(r)) ? Z(i, o(r), { backwards: !0 }) ? E : A : " "; + n.push(y); + } else n.push(E); + let c = Ze(i, ze(i, u(r))); + return c !== !1 && Z(i, c) && n.push(E), n; +} +function ol(e, t, r) { + let n = e.node, s = As(e, t), { printer: i, originalText: o, locStart: u } = t, p = i.isBlockComment?.(n); + if (r?.hasLineSuffix && !r?.isBlock || Z(o, u(n), { backwards: !0 })) return { + doc: us([ + E, + Mo(o, u(n)) ? E : "", + s + ]), + isBlock: p, + hasLineSuffix: !0 + }; + return !p || r?.hasLineSuffix ? { + doc: [us([" ", s]), ke], + isBlock: p, + hasLineSuffix: !0 + } : { + doc: [" ", s], + isBlock: p, + hasLineSuffix: !1 + }; +} +function v(e, t, r = {}) { + let { node: n } = e; + if (!R(n?.comments)) return ""; + let { indent: s = !1, marker: i, filter: o = sl } = r, u = []; + if (e.each(({ node: c }) => { + c.leading || c.trailing || c.marker !== i || !o(c) || u.push(As(e, t)); + }, "comments"), u.length === 0) return ""; + let p = L(E, u); + return s ? m([E, p]) : p; +} +function Mt(e, t) { + let r = e.node; + if (!r) return {}; + let n = t[Symbol.for("printedComments")]; + if ((r.comments || []).filter((p) => !n.has(p)).length === 0) return { + leading: "", + trailing: "" + }; + let i = [], o = [], u; + return e.each(() => { + let p = e.node; + if (n?.has(p)) return; + let { leading: c, trailing: y } = p; + c ? i.push(il(e, t)) : y && (u = ol(e, t, u), o.push(u.doc)); + }, "comments"), { + leading: i, + trailing: o + }; +} +function De(e, t, r) { + let { leading: n, trailing: s } = Mt(e, r); + return !n && !s ? t : Ar(t, (i) => [ + n, + i, + s + ]); +} +function Ke(e, t, r, n, s) { + let i = e.node, o = K(i), u = s && i.typeParameters ? r("typeParameters") : ""; + if (o.length === 0) return [ + u, + "(", + v(e, t, { filter: (d) => _e(t.originalText, I(d)) === ")" }), + ")" + ]; + let { parent: p } = e, c = It(p), y = No(i), D = []; + if (xi(e, (d, b) => { + let B = b === o.length - 1; + B && i.rest && D.push("..."), D.push(r()), !B && (D.push(","), c || y ? D.push(" ") : oe(o[b], t) ? D.push(E, E) : D.push(A)); + }), n && !al(e)) { + if (ne(u) || ne(D)) throw new Et(); + return l([ + _t(u), + "(", + _t(D), + ")" + ]); + } + let F = o.every((d) => !R(d.decorators)); + return y && F ? [ + u, + "(", + ...D, + ")" + ] : c ? [ + u, + "(", + ...D, + ")" + ] : (Gr(p) || Ei(p) || p.type === "TypeAlias" || p.type === "UnionTypeAnnotation" || p.type === "IntersectionTypeAnnotation" || p.type === "FunctionTypeAnnotation" && p.returnType === i) && o.length === 1 && o[0].name === null && i.this !== o[0] && o[0].typeAnnotation && i.typeParameters === null && Vt(o[0].typeAnnotation) && !i.rest ? t.arrowParens === "always" || i.type === "HookTypeAnnotation" ? [ + "(", + ...D, + ")" + ] : D : [ + u, + "(", + m([f, ...D]), + P(!Ti(i) && ie(t, "all") && e.root.type !== "NGRoot" ? "," : ""), + f, + ")" + ]; +} +function No(e) { + if (!e) return !1; + let t = K(e); + if (t.length !== 1) return !1; + let [r] = t; + return !T(r) && (r.type === "ObjectPattern" || r.type === "ArrayPattern" || r.type === "Identifier" && r.typeAnnotation && (r.typeAnnotation.type === "TypeAnnotation" || r.typeAnnotation.type === "TSTypeAnnotation") && Je(r.typeAnnotation.typeAnnotation) || r.type === "FunctionTypeParam" && Je(r.typeAnnotation) && r !== e.rest || r.type === "AssignmentPattern" && (r.left.type === "ObjectPattern" || r.left.type === "ArrayPattern") && (r.right.type === "Identifier" || se(r.right) && r.right.properties.length === 0 || q(r.right) && r.right.elements.length === 0)); +} +function ul(e) { + let t; + return e.returnType ? (t = e.returnType, t.typeAnnotation && (t = t.typeAnnotation)) : e.typeAnnotation && (t = e.typeAnnotation), t; +} +function lt(e, t) { + let r = ul(e); + if (!r) return !1; + let n = e.typeParameters?.params; + if (n) { + if (n.length > 1) return !1; + if (n.length === 1) { + let s = n[0]; + if (s.constraint || s.default) return !1; + } + } + return K(e).length === 1 && (Je(r) || ne(t)); +} +function al(e) { + return e.match((t) => t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement", (t, r) => { + if (t.type === "CallExpression" && r === "arguments" && t.arguments.length === 1 && t.callee.type === "CallExpression") { + let n = t.callee.callee; + return n.type === "Identifier" || n.type === "MemberExpression" && !n.computed && n.object.type === "Identifier" && n.property.type === "Identifier"; + } + return !1; + }, (t, r) => t.type === "VariableDeclarator" && r === "init" || t.type === "ExportDefaultDeclaration" && r === "declaration" || t.type === "TSExportAssignment" && r === "expression" || t.type === "AssignmentExpression" && r === "right" && t.left.type === "MemberExpression" && t.left.object.type === "Identifier" && t.left.object.name === "module" && t.left.property.type === "Identifier" && t.left.property.name === "exports", (t) => t.type !== "VariableDeclaration" || t.kind === "const" && t.declarations.length === 1); +} +function jo(e) { + let t = K(e); + return t.length > 1 && t.some((r) => r.type === "TSParameterProperty"); +} +function Nt(e, t) { + return (t === "params" || t === "this" || t === "rest") && No(e); +} +function X(e) { + let { node: t } = e; + return !t.optional || t.type === "Identifier" && t === e.parent.key ? "" : M(t) || J(t) && t.computed || t.type === "OptionalIndexedAccessType" ? "?." : "?"; +} +function sn(e) { + return e.node.definite || e.match(void 0, (t, r) => r === "id" && t.type === "VariableDeclarator" && t.definite) ? "!" : ""; +} +function Q(e) { + let { node: t } = e; + return t.declare || pl(t) && e.parent.type !== "DeclareExportDeclaration" ? "declare " : ""; +} +function Zt({ node: e }) { + return e.abstract || cl(e) ? "abstract " : ""; +} +function Ft(e, t, r) { + return e.type === "EmptyStatement" ? T(e, x.Leading) ? [" ", t] : t : e.type === "BlockStatement" || r ? [" ", t] : m([A, t]); +} +function jt(e) { + return e.accessibility ? e.accessibility + " " : ""; +} +function Dl(e) { + return e.length === 1 ? e : e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, ""); +} +function on(e, t, r) { + let { node: n, parent: s, grandparent: i, key: o } = e, u = o !== "body" && (s.type === "IfStatement" || s.type === "WhileStatement" || s.type === "SwitchStatement" || s.type === "DoWhileStatement"), p = n.operator === "|>" && e.root.extra?.__isUsingHackPipeline, c = Ts(e, t, r, !1, u); + if (u) return c; + if (p) return l(c); + if (o === "callee" && (M(s) || s.type === "NewExpression") || s.type === "UnaryExpression" || J(s) && !s.computed) return l([m([f, ...c]), f]); + let y = s.type === "ReturnStatement" || s.type === "ThrowStatement" || s.type === "JSXExpressionContainer" && i.type === "JSXAttribute" || n.operator !== "|" && s.type === "JsExpressionRoot" || n.type !== "NGPipeExpression" && (s.type === "NGRoot" && t.parser === "__ng_binding" || s.type === "NGMicrosyntaxExpression" && i.type === "NGMicrosyntax" && i.body.length === 1) || n === s.body && s.type === "ArrowFunctionExpression" || n !== s.body && s.type === "ForStatement" || s.type === "ConditionalExpression" && i.type !== "ReturnStatement" && i.type !== "ThrowStatement" && !M(i) && i.type !== "NewExpression" || s.type === "TemplateLiteral" || El(e), D = s.type === "AssignmentExpression" || s.type === "VariableDeclarator" || s.type === "ClassProperty" || s.type === "PropertyDefinition" || s.type === "TSAbstractPropertyDefinition" || s.type === "ClassPrivateProperty" || Oe(s), F = Te(n.left) && dr(n.operator, n.left.operator); + if (y || er(n) && !F || !er(n) && D) return l(c); + if (c.length === 0) return ""; + let C = H(n.right), d = c.findIndex((S) => typeof S != "string" && !Array.isArray(S) && S.type === Fe), b = c.slice(0, d === -1 ? 1 : d + 1), B = c.slice(b.length, C ? -1 : void 0), O = Symbol("logicalChain-" + ++fl), h = l([...b, m(B)], { id: O }); + if (!C) return h; + return l([h, yt(N(0, c, -1), { groupId: O })]); +} +function Ts(e, t, r, n, s) { + let { node: i } = e; + if (!Te(i)) return [l(r())]; + let o = []; + dr(i.operator, i.left.operator) ? o = e.call(() => Ts(e, t, r, !0, s), "left") : o.push(l(r("left"))); + let u = er(i), p = i.right.type === "ChainExpression" ? i.right.expression : i.right, c = (i.operator === "|>" || i.type === "NGPipeExpression" || yl(e, t)) && !Ee(t.originalText, p), D = !T(p, x.Leading, Hr) && Ee(t.originalText, p), F = i.type === "NGPipeExpression" ? "|" : i.operator, C = i.type === "NGPipeExpression" && i.arguments.length > 0 ? l(m([ + f, + ": ", + L([A, ": "], e.map(() => xe(2, l(r())), "arguments")) + ])) : "", d; + if (u) d = [F, Ee(t.originalText, p) ? m([ + A, + r("right"), + C + ]) : [ + " ", + r("right"), + C + ]]; + else { + let g = F === "|>" && e.root.extra?.__isUsingHackPipeline ? e.call(() => Ts(e, t, r, !0, s), "right") : r("right"); + if (t.experimentalOperatorPosition === "start") { + let S = ""; + if (D) switch (We(g)) { + case Be: + S = g.splice(0, 1)[0]; + break; + case Pe: + S = g.contents.splice(0, 1)[0]; + break; + } + d = [ + A, + S, + F, + " ", + g, + C + ]; + } else d = [ + c ? A : "", + F, + c ? " " : A, + g, + C + ]; + } + let { parent: b } = e, B = T(i.left, x.Trailing | x.Line); + if ((B || !(s && i.type === "LogicalExpression") && b.type !== i.type && i.left.type !== i.type && i.right.type !== i.type) && (d = l(d, { shouldBreak: B })), t.experimentalOperatorPosition === "start" ? o.push(u || D ? " " : "", d) : o.push(c ? "" : " ", d), n && T(i)) { + let h = Qt(De(e, o, t)); + return h.type === Me ? h.parts : Array.isArray(h) ? h : [h]; + } + return o; +} +function er(e) { + return e.type !== "LogicalExpression" ? !1 : !!(se(e.right) && e.right.properties.length > 0 || q(e.right) && e.right.elements.length > 0 || H(e.right)); +} +function yl(e, t) { + return (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression") && Ro(e.node) && !e.hasAncestor((r) => !Ro(r) && r.type !== "JsExpressionRoot"); +} +function El(e) { + if (e.key !== "arguments") return !1; + let { parent: t } = e; + if (!(M(t) && !t.optional && t.arguments.length === 1)) return !1; + let { callee: r } = t; + return r.type === "Identifier" && r.name === "Boolean"; +} +function un(e, t, r) { + let { node: n } = e, { parent: s } = e, i = s.type !== "TypeParameterInstantiation" && (!Ue(s) || !t.experimentalTernaries) && s.type !== "TSTypeParameterInstantiation" && s.type !== "GenericTypeAnnotation" && s.type !== "TSTypeReference" && s.type !== "TSTypeAssertion" && s.type !== "TupleTypeAnnotation" && s.type !== "TSTupleType" && !(s.type === "FunctionTypeParam" && !s.name && e.grandparent.this !== s) && !((Cr(s) || s.type === "VariableDeclarator") && Ee(t.originalText, n)) && !(Cr(s) && T(s.id, x.Trailing | x.Line)), o = xs(n), u = e.map(() => { + let C = r(); + return o || (C = xe(2, C)), De(e, C, t); + }, "types"), p = "", c = ""; + if (Yr(e) && ({leading: p, trailing: c} = Mt(e, t)), o) return [ + p, + L(" | ", u), + c + ]; + let D = [P([i && !Ee(t.originalText, n) ? A : "", "| "]), L([A, "| "], u)]; + if (ge(e, t)) return [ + p, + l([m(D), f]), + c + ]; + let F = [p, l(D)]; + return (s.type === "TupleTypeAnnotation" || s.type === "TSTupleType") && s[s.type === "TupleTypeAnnotation" && s.types ? "types" : "elementTypes"].length > 1 ? [l([ + m([P(["(", f]), F]), + f, + P(")") + ]), c] : [l(i ? m(F) : F), c]; +} +function xs(e) { + let { types: t } = e; + if (t.some((n) => T(n))) return !1; + let r = t.find((n) => dl(n)); + return r ? t.every((n) => n === r || Fl(n)) : !1; +} +function Jo(e) { + return Vt(e) || Je(e) ? !0 : Se(e) ? xs(e) : !1; +} +function G(e, t, r = "typeAnnotation") { + let { node: { [r]: n } } = e; + if (!n) return ""; + let s = !1; + if (n.type === "TSTypeAnnotation" || n.type === "TypeAnnotation") { + let i = e.call(Go, r); + (i === "=>" || i === ":" && T(n, x.Leading)) && (s = !0), Cl.add(n); + } + return s ? [" ", t(r)] : t(r); +} +function an(e, t, r) { + let n = Go(e); + return n ? [ + n, + " ", + r("typeAnnotation") + ] : r("typeAnnotation"); +} +function Al(e, t, r, n) { + let { node: s } = e, i = s.inexact ? "..." : ""; + return T(s, x.Dangling) ? l([ + r, + i, + v(e, t, { indent: !0 }), + f, + n + ]) : [ + r, + i, + n + ]; +} +function tr(e, t, r) { + let { node: n } = e, s = [], i = "[", o = "]", u = n.type === "TupleTypeAnnotation" && n.types ? "types" : n.type === "TSTupleType" || n.type === "TupleTypeAnnotation" ? "elementTypes" : "elements", p = n[u]; + if (p.length === 0) s.push(Al(e, t, i, o)); + else { + let c = N(0, p, -1), y = c?.type !== "RestElement" && !n.inexact, D = c === null, F = Symbol("array"), C = !t.__inJestEach && p.length > 1 && p.every((B, O, h) => { + let g = B?.type; + if (!q(B) && !se(B)) return !1; + let S = h[O + 1]; + if (S && g !== S.type) return !1; + let j = q(B) ? "elements" : "properties"; + return B[j] && B[j].length > 1; + }), d = gs(n, t), b = y ? D ? "," : ie(t) ? d ? P(",", "", { groupId: F }) : P(",") : "" : ""; + s.push(l([ + i, + m([ + f, + d ? xl(e, t, r, b) : [Tl(e, t, r, u, n.inexact), b], + v(e, t) + ]), + f, + o + ], { + shouldBreak: C, + id: F + })); + } + return s.push(X(e), G(e, r)), s; +} +function gs(e, t) { + return q(e) && e.elements.length > 0 && e.elements.every((r) => r && (Ce(r) || Hn(r) && !T(r.argument)) && !T(r, x.Trailing | x.Line, (n) => !Z(t.originalText, w(n), { backwards: !0 }))); +} +function Wo({ node: e }, { originalText: t }) { + let r = I(e); + if (r === w(e)) return !1; + let { length: n } = t; + for (; r < n && t[r] !== ",";) r = qt(t, Ut(t, r + 1)); + return Yt(t, r); +} +function Tl(e, t, r, n, s) { + let i = []; + return e.each(({ node: o, isLast: u }) => { + i.push(o ? l(r()) : ""), (!u || s) && i.push([ + ",", + A, + o && Wo(e, t) ? f : "" + ]); + }, n), s && i.push("..."), i; +} +function xl(e, t, r, n) { + let s = []; + return e.each(({ isLast: i, next: o }) => { + s.push([r(), i ? n : ","]), i || s.push(Wo(e, t) ? [E, E] : T(o, x.Leading | x.Line) ? E : A); + }, "elements"), zr(s); +} +function gl(e, t, r) { + let { node: n } = e, s = le(n); + if (s.length === 0) return [ + "(", + v(e, t), + ")" + ]; + let i = s.length - 1; + if (Bl(s)) { + let D = ["("]; + return $t(e, (F, C) => { + D.push(r()), C !== i && D.push(", "); + }), D.push(")"), D; + } + let o = !1, u = []; + $t(e, ({ node: D }, F) => { + let C = r(); + F === i || (oe(D, t) ? (o = !0, C = [ + C, + ",", + E, + E + ]) : C = [ + C, + ",", + A + ]), u.push(C); + }); + let p = !t.parser.startsWith("__ng_") && n.type !== "ImportExpression" && n.type !== "TSImportType" && n.type !== "TSExternalModuleReference" && ie(t, "all") ? "," : ""; + function c() { + return l([ + "(", + m([A, ...u]), + p, + A, + ")" + ], { shouldBreak: !0 }); + } + if (o || e.parent.type !== "Decorator" && Ci(s)) return c(); + if (Sl(s)) { + let D = u.slice(1); + if (D.some(ne)) return c(); + let F; + try { + F = r($n(n, 0), { expandFirstArg: !0 }); + } catch (C) { + if (C instanceof Et) return c(); + throw C; + } + return ne(F) ? [ke, nt([[ + "(", + l(F, { shouldBreak: !0 }), + ", ", + ...D, + ")" + ], c()])] : nt([ + [ + "(", + F, + ", ", + ...D, + ")" + ], + [ + "(", + l(F, { shouldBreak: !0 }), + ", ", + ...D, + ")" + ], + c() + ]); + } + if (hl(s, u, t)) { + let D = u.slice(0, -1); + if (D.some(ne)) return c(); + let F; + try { + F = r($n(n, -1), { expandLastArg: !0 }); + } catch (C) { + if (C instanceof Et) return c(); + throw C; + } + return ne(F) ? [ke, nt([[ + "(", + ...D, + l(F, { shouldBreak: !0 }), + ")" + ], c()])] : nt([ + [ + "(", + ...D, + F, + ")" + ], + [ + "(", + ...D, + l(F, { shouldBreak: !0 }), + ")" + ], + c() + ]); + } + let y = [ + "(", + m([f, ...u]), + P(p), + f, + ")" + ]; + return Ur(e) ? y : l(y, { shouldBreak: u.some(ne) || o }); +} +function gr(e, t = !1) { + return se(e) && (e.properties.length > 0 || T(e)) || q(e) && (e.elements.length > 0 || T(e)) || e.type === "TSTypeAssertion" && gr(e.expression) || Ae(e) && gr(e.expression) || e.type === "FunctionExpression" || e.type === "ArrowFunctionExpression" && (!e.returnType || !e.returnType.typeAnnotation || e.returnType.typeAnnotation.type !== "TSTypeReference" || bl(e.body)) && (e.body.type === "BlockStatement" || e.body.type === "ArrowFunctionExpression" && gr(e.body, !0) || se(e.body) || q(e.body) || !t && (M(e.body) || e.body.type === "ConditionalExpression") || H(e.body)) || e.type === "DoExpression" || e.type === "ModuleExpression"; +} +function hl(e, t, r) { + let n = N(0, e, -1); + if (e.length === 1) { + let i = N(0, t, -1); + if (i.label?.embed && i.label?.hug !== !1) return !0; + } + let s = N(0, e, -2); + return !T(n, x.Leading) && !T(n, x.Trailing) && gr(n) && (!s || s.type !== n.type) && (e.length !== 2 || s.type !== "ArrowFunctionExpression" || !q(n)) && !(e.length > 1 && gs(n, r)); +} +function Sl(e) { + if (e.length !== 2) return !1; + let [t, r] = e; + return t.type === "ModuleExpression" && Pl(r) ? !0 : !T(t) && (t.type === "FunctionExpression" || t.type === "ArrowFunctionExpression" && t.body.type === "BlockStatement") && r.type !== "FunctionExpression" && r.type !== "ArrowFunctionExpression" && r.type !== "ConditionalExpression" && Uo(r) && !gr(r); +} +function Uo(e) { + if (e.type === "ParenthesizedExpression") return Uo(e.expression); + if (Ae(e) || e.type === "TypeCastExpression") { + let { typeAnnotation: t } = e; + if (t.type === "TypeAnnotation" && (t = t.typeAnnotation), t.type === "TSArrayType" && (t = t.elementType, t.type === "TSArrayType" && (t = t.elementType)), t.type === "GenericTypeAnnotation" || t.type === "TSTypeReference") { + let r = t.type === "GenericTypeAnnotation" ? t.typeParameters : t.typeArguments; + r?.params.length === 1 && (t = r.params[0]); + } + return Vt(t) && Re(e.expression, 1); + } + return Dt(e) && le(e).length > 1 ? !1 : Te(e) ? Re(e.left, 1) && Re(e.right, 1) : Xn(e) || Re(e); +} +function Bl(e) { + return e.length === 2 ? qo(e, 0) : e.length === 3 ? e[0].type === "Identifier" && qo(e, 1) : !1; +} +function qo(e, t) { + let r = e[t], n = e[t + 1]; + return r.type === "ArrowFunctionExpression" && K(r).length === 0 && r.body.type === "BlockStatement" && n.type === "ArrayExpression" && !e.some((s) => T(s)); +} +function bl(e) { + return e.type === "BlockStatement" && (e.body.some((t) => t.type !== "EmptyStatement") || T(e, x.Dangling)); +} +function Pl(e) { + if (!(e.type === "ObjectExpression" && e.properties.length === 1)) return !1; + let [t] = e.properties; + return Oe(t) ? !t.computed && (t.key.type === "Identifier" && t.key.name === "type" || V(t.key) && t.key.value === "type") && V(t.value) && t.value.value === "module" : !1; +} +function Yo(e, t, r) { + return [r("object"), l(m([f, hs(e, t, r)]))]; +} +function hs(e, t, r) { + return ["::", r("callee")]; +} +function Il(e) { + let { node: t, ancestors: r } = e; + for (let n of r) { + if (!(J(n) && n.object === t || n.type === "TSNonNullExpression" && n.expression === t)) return n.type === "NewExpression" && n.callee === t; + t = n; + } + return !1; +} +function Ho(e, t, r) { + let n = r("object"), s = Ss(e, t, r), { node: i } = e, o = e.findAncestor((c) => !(J(c) || c.type === "TSNonNullExpression")), u = e.findAncestor((c) => !(c.type === "ChainExpression" || c.type === "TSNonNullExpression")), p = o.type === "BindExpression" || o.type === "AssignmentExpression" && o.left.type !== "Identifier" || Il(e) || i.computed || i.object.type === "Identifier" && i.property.type === "Identifier" && !J(u) || (u.type === "AssignmentExpression" || u.type === "VariableDeclarator") && (kl(i.object) || n.label?.memberChain); + return pt(n.label, [n, p ? s : l(m([f, s]))]); +} +function Ss(e, t, r) { + let n = r("property"), { node: s } = e, i = X(e); + return s.computed ? !s.property || Ce(s.property) ? [ + i, + "[", + n, + "]" + ] : l([ + i, + "[", + m([f, n]), + f, + "]" + ]) : [ + i, + ".", + n + ]; +} +function Xo(e, t, r) { + if (e.node.type === "ChainExpression") return e.call(() => Xo(e, t, r), "expression"); + let n = (e.parent.type === "ChainExpression" ? e.grandparent : e.parent).type === "ExpressionStatement", s = []; + function i(_) { + let { originalText: re } = t, ae = at(re, I(_)); + return re.charAt(ae) === ")" ? ae !== !1 && Yt(re, ae + 1) : oe(_, t); + } + function o() { + let { node: _ } = e; + if (_.type === "ChainExpression") return e.call(o, "expression"); + if (M(_) && (Tt(_.callee) || M(_.callee))) { + let re = i(_); + s.unshift({ + node: _, + hasTrailingEmptyLine: re, + printed: [De(e, [ + X(e), + r("typeArguments"), + hr(e, t, r) + ], t), re ? E : ""] + }), e.call(o, "callee"); + } else Tt(_) ? (s.unshift({ + node: _, + needsParens: ge(e, t), + printed: De(e, J(_) ? Ss(e, t, r) : hs(e, t, r), t) + }), e.call(o, "object")) : _.type === "TSNonNullExpression" ? (s.unshift({ + node: _, + printed: De(e, "!", t) + }), e.call(o, "expression")) : s.unshift({ + node: _, + printed: r() + }); + } + let { node: u } = e; + s.unshift({ + node: u, + printed: [ + X(e), + r("typeArguments"), + hr(e, t, r) + ] + }), u.callee && e.call(o, "callee"); + let p = [], c = [s[0]], y = 1; + for (; y < s.length && (s[y].node.type === "TSNonNullExpression" || M(s[y].node) || J(s[y].node) && s[y].node.computed && Ce(s[y].node.property)); ++y) c.push(s[y]); + if (!M(s[0].node)) for (; y + 1 < s.length && Tt(s[y].node) && Tt(s[y + 1].node); ++y) c.push(s[y]); + p.push(c), c = []; + let D = !1; + for (; y < s.length; ++y) { + if (D && Tt(s[y].node)) { + if (s[y].node.computed && Ce(s[y].node.property)) { + c.push(s[y]); + continue; + } + p.push(c), c = [], D = !1; + } + (M(s[y].node) || s[y].node.type === "ImportExpression") && (D = !0), c.push(s[y]), T(s[y].node, x.Trailing) && (p.push(c), c = [], D = !1); + } + c.length > 0 && p.push(c); + function F(_) { + return /^[A-Z]|^[$_]+$/u.test(_); + } + function C(_) { + return _.length <= t.tabWidth; + } + function d(_) { + let re = _[1][0]?.node.computed; + if (_[0].length === 1) { + let it = _[0][0].node; + return it.type === "ThisExpression" || it.type === "Identifier" && (F(it.name) || n && C(it.name) || re); + } + let ae = N(0, _[0], -1).node; + return J(ae) && ae.property.type === "Identifier" && (F(ae.property.name) || re); + } + let b = p.length >= 2 && !T(p[1][0].node) && d(p); + function B(_) { + let re = _.map((ae) => ae.printed); + return _.length > 0 && N(0, _, -1).needsParens ? [ + "(", + ...re, + ")" + ] : re; + } + function O(_) { + return _.length === 0 ? "" : m([E, L(E, _.map(B))]); + } + let h = p.map(B), g = h, S = b ? 3 : 2, j = p.flat(), U = j.slice(1, -1).some((_) => T(_.node, x.Leading)) || j.slice(0, -1).some((_) => T(_.node, x.Trailing)) || p[S] && T(p[S][0].node, x.Leading); + if (p.length <= S && !U && !p.some((_) => N(0, _, -1).hasTrailingEmptyLine)) return Ur(e) ? g : l(g); + let fe = N(0, p[b ? 1 : 0], -1).node, Y = !M(fe) && i(fe), z = [ + B(p[0]), + b ? p.slice(1, 2).map(B) : "", + Y ? E : "", + O(p.slice(b ? 2 : 1)) + ], ee = s.map(({ node: _ }) => _).filter(M); + function Ie() { + let _ = N(0, N(0, p, -1), -1).node, re = N(0, h, -1); + return M(_) && ne(re) && ee.slice(0, -1).some((ae) => ae.arguments.some(Ht)); + } + let st; + return U || ee.length > 2 && ee.some((_) => !_.arguments.every((re) => Re(re))) || h.slice(0, -1).some(ne) || Ie() ? st = l(z) : st = [ne(g) || Y ? ke : "", nt([g, z])], pt({ memberChain: !0 }, st); +} +function vt(e, t, r) { + let { node: n } = e, s = n.type === "NewExpression", i = X(e), o = le(n), u = n.type !== "TSImportType" && n.typeArguments ? r("typeArguments") : "", p = o.length === 1 && Wr(o[0], t.originalText); + if (p || Ol(e) || wl(e) || It(n, e.parent)) { + let D = []; + if ($t(e, () => { + D.push(r()); + }), !(p && D[0].label?.embed)) return [ + s ? "new " : "", + $o(e, r), + i, + u, + "(", + L(", ", D), + ")" + ]; + } + let c = n.type === "ImportExpression" || n.type === "TSImportType" || n.type === "TSExternalModuleReference"; + if (!c && !s && Tt(n.callee) && !e.call(() => ge(e, t), "callee", ...n.callee.type === "ChainExpression" ? ["expression"] : [])) return Vo(e, t, r); + let y = [ + s ? "new " : "", + $o(e, r), + i, + u, + hr(e, t, r) + ]; + return c || M(n.callee) ? l(y) : y; +} +function $o(e, t) { + let { node: r } = e; + return r.type === "ImportExpression" ? `import${r.phase ? `.${r.phase}` : ""}` : r.type === "TSImportType" ? "import" : r.type === "TSExternalModuleReference" ? "require" : t("callee"); +} +function Ol(e) { + let { node: t } = e; + if (!(t.type === "ImportExpression" || t.type === "TSImportType" || t.type === "TSExternalModuleReference" || t.type === "CallExpression" && !t.optional && Pt(t.callee, Ll))) return !1; + let r = le(t); + return r.length === 1 && V(r[0]) && !T(r[0]); +} +function wl(e) { + let { node: t } = e; + if (t.type !== "CallExpression" || t.optional || t.callee.type !== "Identifier") return !1; + let r = le(t); + return t.callee.name === "require" ? (r.length === 1 && V(r[0]) || r.length > 1) && !T(r[0]) : t.callee.name === "define" && e.parent.type === "ExpressionStatement" ? r.length === 1 || r.length === 2 && r[0].type === "ArrayExpression" || r.length === 3 && V(r[0]) && r[1].type === "ArrayExpression" : !1; +} +function ht(e, t, r, n, s, i) { + let o = _l(e, t, r, n, i), u = i ? r(i, { assignmentLayout: o }) : ""; + switch (o) { + case "break-after-operator": return l([ + l(n), + s, + l(m([A, u])) + ]); + case "never-break-after-operator": return l([ + l(n), + s, + " ", + u + ]); + case "fluid": { + let p = Symbol("assignment"); + return l([ + l(n), + s, + l(m(A), { id: p }), + je, + yt(u, { groupId: p }) + ]); + } + case "break-lhs": return l([ + n, + s, + " ", + l(u) + ]); + case "chain": return [ + l(n), + s, + A, + u + ]; + case "chain-tail": return [ + l(n), + s, + m([A, u]) + ]; + case "chain-tail-arrow-chain": return [ + l(n), + s, + u + ]; + case "only-left": return n; + } +} +function zo(e, t, r) { + let { node: n } = e; + return ht(e, t, r, r("left"), [" ", n.operator], "right"); +} +function Zo(e, t, r) { + return ht(e, t, r, r("id"), " =", "init"); +} +function _l(e, t, r, n, s) { + let { node: i } = e, o = i[s]; + if (!o) return "only-left"; + let u = !pn(o); + if (e.match(pn, eu, (F) => !u || F.type !== "ExpressionStatement" && F.type !== "VariableDeclaration")) return u ? o.type === "ArrowFunctionExpression" && o.body.type === "ArrowFunctionExpression" ? "chain-tail-arrow-chain" : "chain-tail" : "chain"; + if (!u && pn(o.right) || Ee(t.originalText, o)) return "break-after-operator"; + if (i.type === "ImportAttribute" || o.type === "CallExpression" && o.callee.name === "require" || t.parser === "json5" || t.parser === "jsonc" || t.parser === "json") return "never-break-after-operator"; + let y = Xi(n); + if (Nl(i) || Rl(i) || Bs(i) && y) return "break-lhs"; + let D = Jl(i, n, t); + return e.call(() => Ml(e, t, r, D), s) ? "break-after-operator" : jl(i) ? "break-lhs" : !y && (D || o.type === "TemplateLiteral" || o.type === "TaggedTemplateExpression" || yi(o) || Ce(o) || o.type === "ClassExpression") ? "never-break-after-operator" : "fluid"; +} +function Ml(e, t, r, n) { + let s = e.node; + if (Te(s) && !er(s)) return !0; + switch (s.type) { + case "StringLiteralTypeAnnotation": + case "SequenceExpression": return !0; + case "TSConditionalType": + case "ConditionalTypeAnnotation": + if (!t.experimentalTernaries && !ql(s)) break; + return !0; + case "ConditionalExpression": { + if (!t.experimentalTernaries) { + let { test: c } = s; + return Te(c) && !er(c); + } + let { consequent: u, alternate: p } = s; + return u.type === "ConditionalExpression" || p.type === "ConditionalExpression"; + } + case "ClassExpression": return R(s.decorators); + } + if (n) return !1; + let i = s, o = []; + for (;;) if (i.type === "UnaryExpression" || i.type === "AwaitExpression" || i.type === "YieldExpression" && i.argument !== null) i = i.argument, o.push("argument"); + else if (i.type === "TSNonNullExpression") i = i.expression, o.push("expression"); + else break; + return !!(V(i) || e.call(() => tu(e, t, r), ...o)); +} +function Nl(e) { + if (eu(e)) { + let t = e.left || e.id; + return t.type === "ObjectPattern" && t.properties.length > 2 && t.properties.some((r) => Oe(r) && (!r.shorthand || r.value?.type === "AssignmentPattern")); + } + return !1; +} +function pn(e) { + return e.type === "AssignmentExpression"; +} +function eu(e) { + return pn(e) || e.type === "VariableDeclarator"; +} +function jl(e) { + let t = vl(e); + if (R(t)) { + let r = e.type === "TSTypeAliasDeclaration" ? "constraint" : "bound"; + if (t.length > 1 && t.some((n) => n[r] || n.default)) return !0; + } + return !1; +} +function vl(e) { + if (Cr(e)) return e.typeParameters?.params; +} +function Rl(e) { + if (e.type !== "VariableDeclarator") return !1; + let { typeAnnotation: t } = e.id; + if (!t || !t.typeAnnotation) return !1; + let r = Ko(t.typeAnnotation); + return R(r) && r.length > 1 && r.some((n) => R(Ko(n)) || n.type === "TSConditionalType"); +} +function Bs(e) { + return e.type === "VariableDeclarator" && e.init?.type === "ArrowFunctionExpression"; +} +function Ko(e) { + let t; + switch (e.type) { + case "GenericTypeAnnotation": + t = e.typeParameters; + break; + case "TSTypeReference": + t = e.typeArguments; + break; + } + return t?.params; +} +function tu(e, t, r, n = !1) { + let { node: s } = e, i = () => tu(e, t, r, !0); + if (s.type === "ChainExpression" || s.type === "TSNonNullExpression") return e.call(i, "expression"); + if (M(s)) { + if (vt(e, t, r).label?.memberChain) return !1; + let u = le(s); + return !(u.length === 0 || u.length === 1 && Fr(u[0], t)) || Gl(s, r) ? !1 : e.call(i, "callee"); + } + return J(s) ? e.call(i, "object") : n && (s.type === "Identifier" || s.type === "ThisExpression"); +} +function Jl(e, t, r) { + return Oe(e) ? (t = Qt(t), typeof t == "string" && ot(t) < r.tabWidth + 3) : !1; +} +function Gl(e, t) { + let r = Wl(e); + if (R(r)) { + if (r.length > 1) return !0; + if (r.length === 1) { + let s = r[0]; + if (Se(s) || xt(s) || s.type === "TSTypeLiteral" || s.type === "ObjectTypeAnnotation") return !0; + } + if (ne(t(e.typeParameters ? "typeParameters" : "typeArguments"))) return !0; + } + return !1; +} +function Wl(e) { + return (e.typeParameters ?? e.typeArguments)?.params; +} +function Qo(e) { + switch (e.type) { + case "FunctionTypeAnnotation": + case "GenericTypeAnnotation": + case "TSFunctionType": return !!e.typeParameters; + case "TSTypeReference": return !!e.typeArguments; + default: return !1; + } +} +function ql(e) { + return Qo(e.checkType) || Qo(e.extendsType); +} +function nu(e) { + return /^(?:\d+|\d+\.\d+)$/u.test(e); +} +function ru(e, t) { + return t.parser === "json" || t.parser === "jsonc" || !V(e.key) || ut(pe(e.key), t).slice(1, -1) !== e.key.value ? !1 : !!(vo(e.key.value) && !(t.parser === "babel-ts" && e.type === "ClassProperty" || (t.parser === "typescript" || t.parser === "oxc-ts") && e.type === "PropertyDefinition") || nu(e.key.value) && String(Number(e.key.value)) === e.key.value && e.type !== "ImportAttribute" && (t.parser === "babel" || t.parser === "acorn" || t.parser === "oxc" || t.parser === "espree" || t.parser === "meriyah" || t.parser === "__babel_estree")); +} +function Ul(e, t) { + let { key: r } = e.node; + return (r.type === "Identifier" || Ce(r) && nu(dt(pe(r))) && String(r.value) === dt(pe(r)) && !(t.parser === "typescript" || t.parser === "babel-ts" || t.parser === "oxc-ts")) && (t.parser === "json" || t.parser === "jsonc" || t.quoteProps === "consistent" && cn.get(e.parent)); +} +function Ct(e, t, r) { + let { node: n } = e; + if (n.computed) return [ + "[", + r("key"), + "]" + ]; + let { parent: s } = e, { key: i } = n; + if (t.quoteProps === "consistent" && !cn.has(s)) { + let o = e.siblings.some((u) => !u.computed && V(u.key) && !ru(u, t)); + cn.set(s, o); + } + if (Ul(e, t)) { + let o = ut(JSON.stringify(i.type === "Identifier" ? i.name : i.value.toString()), t); + return e.call(() => De(e, o, t), "key"); + } + return ru(n, t) && (t.quoteProps === "as-needed" || t.quoteProps === "consistent" && !cn.get(s)) ? e.call(() => De(e, /^\d/u.test(i.value) ? dt(i.value) : i.value, t), "key") : r("key"); +} +function ln(e, t, r) { + let { node: n } = e; + return n.shorthand ? r("value") : ht(e, t, r, Ct(e, t, r), ":", "value"); +} +function mn(e, t, r, n) { + if (Yl(e)) return Dn(e, t, r); + let { node: s } = e, i = !1; + if ((s.type === "FunctionDeclaration" || s.type === "FunctionExpression") && n?.expandLastArg) { + let { parent: y } = e; + M(y) && (le(y).length > 1 || K(s).every((D) => D.type === "Identifier" && !D.typeAnnotation)) && (i = !0); + } + let o = [ + Q(e), + s.async ? "async " : "", + `function${s.generator ? "*" : ""} `, + s.id ? r("id") : "" + ], u = Ke(e, t, r, i), p = rr(e, r), c = lt(s, p); + return o.push(r("typeParameters"), l([c ? l(u) : u, p]), s.body ? " " : "", r("body")), t.semi && (s.declare || !s.body) && o.push(";"), o; +} +function Sr(e, t, r) { + let { node: n } = e, { kind: s } = n, i = n.value || n, o = []; + return !s || s === "init" || s === "method" || s === "constructor" ? i.async && o.push("async ") : (Le(s === "get" || s === "set"), o.push(s, " ")), i.generator && o.push("*"), o.push(Ct(e, t, r), n.optional ? "?" : "", n === i ? Dn(e, t, r) : r("value")), o; +} +function Dn(e, t, r) { + let { node: n } = e, s = Ke(e, t, r), i = rr(e, r), o = jo(n), u = lt(n, i), p = [r("typeParameters"), l([o ? l(s, { shouldBreak: !0 }) : u ? l(s) : s, i])]; + return n.body ? p.push(" ", r("body")) : p.push(t.semi ? ";" : ""), p; +} +function Hl(e) { + let t = K(e); + return t.length === 1 && !e.typeParameters && !T(e, x.Dangling) && t[0].type === "Identifier" && !t[0].typeAnnotation && !T(t[0]) && !t[0].optional && !e.predicate && !e.returnType; +} +function fn(e, t) { + if (t.arrowParens === "always") return !1; + if (t.arrowParens === "avoid") { + let { node: r } = e; + return Hl(r); + } + return !1; +} +function rr(e, t) { + let { node: r } = e, s = [G(e, t, "returnType")]; + return r.predicate && s.push(t("predicate")), s; +} +function su(e, t, r) { + let { node: n } = e, s = []; + if (n.argument) { + let u = r("argument"); + Xl(t, n.argument) ? u = [ + "(", + m([E, u]), + E, + ")" + ] : (Te(n.argument) || t.experimentalTernaries && n.argument.type === "ConditionalExpression" && (n.argument.consequent.type === "ConditionalExpression" || n.argument.alternate.type === "ConditionalExpression")) && (u = l([ + P("("), + m([f, u]), + f, + P(")") + ])), s.push(" ", u); + } + let i = T(n, x.Dangling), o = t.semi && i && T(n, x.Last | x.Line); + return o && s.push(";"), i && s.push(" ", v(e, t)), !o && t.semi && s.push(";"), s; +} +function iu(e, t, r) { + return ["return", su(e, t, r)]; +} +function ou(e, t, r) { + return ["throw", su(e, t, r)]; +} +function Xl(e, t) { + if (Ee(e.originalText, t) || T(t, x.Leading, (r) => ue(e.originalText, w(r), I(r))) && !H(t)) return !0; + if (Xt(t)) { + let r = t, n; + for (; n = mi(r);) if (r = n, Ee(e.originalText, r)) return !0; + } + return !1; +} +function uu(e, t) { + if (t.semi || Ps(e, t) || Is(e, t) || ks(e, t)) return !1; + let { node: r, key: n, parent: s } = e; + return !!(r.type === "ExpressionStatement" && (n === "body" && (s.type === "Program" || s.type === "BlockStatement" || s.type === "StaticBlock" || s.type === "TSModuleBlock") || n === "consequent" && s.type === "SwitchCase") && e.call(() => au(e, t), "expression")); +} +function au(e, t) { + let { node: r } = e; + switch (r.type) { + case "ParenthesizedExpression": + case "TypeCastExpression": + case "ArrayExpression": + case "ArrayPattern": + case "TemplateLiteral": + case "TemplateElement": + case "RegExpLiteral": return !0; + case "ArrowFunctionExpression": + if (!fn(e, t)) return !0; + break; + case "UnaryExpression": { + let { prefix: n, operator: s } = r; + if (n && (s === "+" || s === "-")) return !0; + break; + } + case "BindExpression": + if (!r.object) return !0; + break; + case "Literal": + if (r.regex) return !0; + break; + default: if (H(r)) return !0; + } + return ge(e, t) ? !0 : Xt(r) ? e.call(() => au(e, t), ...Rr(r)) : !1; +} +function Ps(e, t) { + return (t.parentParser === "markdown" || t.parentParser === "mdx") && bs(e) && H(e.node.expression); +} +function ks(e, t) { + return t.__isHtmlInlineEventHandler && bs(e); +} +function Is(e, t) { + return (t.parser === "__vue_event_binding" || t.parser === "__vue_ts_event_binding") && bs(e); +} +function Os(e) { + if (typeof e != "string") throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +function Vl(e, t, r) { + let { node: n } = e; + if (n.type === "JSXElement" && pm(n)) return [r("openingElement"), r("closingElement")]; + let s = n.type === "JSXElement" ? r("openingElement") : r("openingFragment"), i = n.type === "JSXElement" ? r("closingElement") : r("closingFragment"); + if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) return [ + s, + ...e.map(r, "children"), + i + ]; + n.children = n.children.map((g) => cm(g) ? { + type: "JSXText", + value: " ", + raw: " " + } : g); + let o = n.children.some(H), u = n.children.filter((g) => g.type === "JSXExpressionContainer").length > 1, p = n.type === "JSXElement" && n.openingElement.attributes.length > 1, c = ne(s) || o || p || u, y = e.parent.rootMarker === "mdx", D = t.singleQuote ? "{' '}" : "{\" \"}", F = y ? A : P([D, f], " "), d = $l(e, t, r, F, n.openingElement?.name?.name === "fbt"), b = n.children.some((g) => Br(g)); + for (let g = d.length - 2; g >= 0; g--) { + let S = d[g] === "" && d[g + 1] === "", j = d[g] === E && d[g + 1] === "" && d[g + 2] === E, U = (d[g] === f || d[g] === E) && d[g + 1] === "" && d[g + 2] === F, fe = d[g] === F && d[g + 1] === "" && (d[g + 2] === f || d[g + 2] === E), Y = d[g] === F && d[g + 1] === "" && d[g + 2] === F, z = d[g] === f && d[g + 1] === "" && d[g + 2] === E || d[g] === E && d[g + 1] === "" && d[g + 2] === f; + j && b || S || U || Y || z ? d.splice(g, 2) : fe && d.splice(g + 1, 2); + } + for (; d.length > 0 && _s(N(0, d, -1));) d.pop(); + for (; d.length > 1 && _s(d[0]) && _s(d[1]);) d.shift(), d.shift(); + let B = [""]; + for (let [g, S] of d.entries()) { + if (S === F) { + if (g === 1 && Vi(d[g - 1])) { + if (d.length === 2) { + B.push([B.pop(), D]); + continue; + } + B.push([D, E], ""); + continue; + } else if (g === d.length - 1) { + B.push([B.pop(), D]); + continue; + } else if (d[g - 1] === "" && d[g - 2] === E) { + B.push([B.pop(), D]); + continue; + } + } + g % 2 === 0 ? B.push([B.pop(), S]) : B.push(S, ""), ne(S) && (c = !0); + } + let O = b ? zr(B) : l(B, { shouldBreak: !0 }); + if (t.cursorNode?.type === "JSXText" && n.children.includes(t.cursorNode) ? O = [ + Tr, + O, + Tr + ] : t.nodeBeforeCursor?.type === "JSXText" && n.children.includes(t.nodeBeforeCursor) ? O = [Tr, O] : t.nodeAfterCursor?.type === "JSXText" && n.children.includes(t.nodeAfterCursor) && (O = [O, Tr]), y) return O; + let h = l([ + s, + m([E, O]), + E, + i + ]); + return c ? h : nt([l([ + s, + ...d, + i + ]), h]); +} +function $l(e, t, r, n, s) { + let i = "", o = [i]; + function u(c) { + i = c, o.push([o.pop(), c]); + } + function p(c) { + c !== "" && (i = c, o.push(c, "")); + } + return e.each(({ node: c, next: y }) => { + if (c.type === "JSXText") { + let D = pe(c); + if (Br(c)) { + let F = yn.split(D, !0); + F[0] === "" && (F.shift(), /\n/u.test(F[0]) ? p(lu(s, F[1], c, y)) : p(n), F.shift()); + let C; + if (N(0, F, -1) === "" && (F.pop(), C = F.pop()), F.length === 0) return; + for (let [d, b] of F.entries()) d % 2 === 1 ? p(A) : u(b); + C !== void 0 ? /\n/u.test(C) ? p(lu(s, i, c, y)) : p(n) : p(cu(s, i, c, y)); + } else /\n/u.test(D) ? D.match(/\n/gu).length > 1 && p(E) : p(n); + } else if (u(r()), y && Br(y)) { + let C = yn.trim(pe(y)), [d] = yn.split(C); + p(cu(s, d, c, y)); + } else p(E); + }, "children"), o; +} +function cu(e, t, r, n) { + return e ? "" : r.type === "JSXElement" && !r.closingElement || n?.type === "JSXElement" && !n.closingElement ? t.length === 1 ? f : E : f; +} +function lu(e, t, r, n) { + return e ? E : t.length === 1 ? r.type === "JSXElement" && !r.closingElement || n?.type === "JSXElement" && !n.closingElement ? E : f : E; +} +function Ql(e, t, r) { + let { parent: n } = e; + if (Kl(n)) return t; + let s = zl(e), i = ge(e, r); + return l([ + i ? "" : P("("), + m([f, t]), + f, + i ? "" : P(")") + ], { shouldBreak: s }); +} +function zl(e) { + return e.match(void 0, (t, r) => r === "body" && t.type === "ArrowFunctionExpression", (t, r) => r === "arguments" && M(t)) && (e.match(void 0, void 0, void 0, (t, r) => r === "expression" && t.type === "JSXExpressionContainer") || e.match(void 0, void 0, void 0, (t, r) => r === "expression" && t.type === "ChainExpression", (t, r) => r === "expression" && t.type === "JSXExpressionContainer")); +} +function Zl(e, t, r) { + let { node: n } = e, s = [r("name")]; + if (n.value) { + let i; + if (V(n.value)) { + let u = W(0, W(0, pe(n.value).slice(1, -1), "'", "'"), """, "\""), p = wr(u, t.jsxSingleQuote); + u = p === "\"" ? W(0, u, "\"", """) : W(0, u, "'", "'"), i = e.call(() => De(e, qe(p + u + p), t), "value"); + } else i = r("value"); + s.push("=", i); + } + return s; +} +function em(e, t, r) { + let { node: n } = e, s = (i, o) => i.type === "JSXEmptyExpression" || !T(i) && (q(i) || se(i) || i.type === "ArrowFunctionExpression" || i.type === "AwaitExpression" && (s(i.argument, i) || i.argument.type === "JSXElement") || M(i) || i.type === "ChainExpression" && M(i.expression) || i.type === "FunctionExpression" || i.type === "TemplateLiteral" || i.type === "TaggedTemplateExpression" || i.type === "DoExpression" || H(o) && (i.type === "ConditionalExpression" || Te(i))); + return s(n.expression, e.parent) ? l([ + "{", + r("expression"), + je, + "}" + ]) : l([ + "{", + m([f, r("expression")]), + f, + je, + "}" + ]); +} +function tm(e, t, r) { + let { node: n } = e, s = T(n.name) || T(n.typeArguments); + if (n.selfClosing && n.attributes.length === 0 && !s) return [ + "<", + r("name"), + r("typeArguments"), + " />" + ]; + if (n.attributes?.length === 1 && V(n.attributes[0].value) && !n.attributes[0].value.value.includes(` +`) && !s && !T(n.attributes[0])) return l([ + "<", + r("name"), + r("typeArguments"), + " ", + ...e.map(r, "attributes"), + n.selfClosing ? " />" : ">" + ]); + let i = n.attributes?.some((u) => V(u.value) && u.value.value.includes(` +`)), o = t.singleAttributePerLine && n.attributes.length > 1 ? E : A; + return l([ + "<", + r("name"), + r("typeArguments"), + m(e.map(() => [o, r()], "attributes")), + ...rm(n, t, s) + ], { shouldBreak: i }); +} +function rm(e, t, r) { + return e.selfClosing ? [A, "/>"] : nm(e, t, r) ? [">"] : [f, ">"]; +} +function nm(e, t, r) { + let n = e.attributes.length > 0 && T(N(0, e.attributes, -1), x.Trailing); + return e.attributes.length === 0 && !r || (t.bracketSameLine || t.jsxBracketSameLine) && (!r || e.attributes.length > 0) && !n; +} +function sm(e, t, r) { + let { node: n } = e, s = [""), s; +} +function im(e, t) { + let { node: r } = e, n = T(r), s = T(r, x.Line), i = r.type === "JSXOpeningFragment"; + return [ + i ? "<" : "" + ]; +} +function om(e, t, r) { + return Ql(e, De(e, Vl(e, t, r), t), t); +} +function um(e, t) { + let { node: r } = e, n = T(r, x.Line); + return [v(e, t, { indent: n }), n ? E : ""]; +} +function am(e, t, r) { + let { node: n } = e; + return [ + "{", + e.call(({ node: s }) => { + let i = ["...", r()]; + return T(s) ? [m([f, De(e, i, t)]), f] : i; + }, n.type === "JSXSpreadAttribute" ? "argument" : "expression"), + "}" + ]; +} +function mu(e, t, r) { + let { node: n } = e; + if (n.type.startsWith("JSX")) switch (n.type) { + case "JSXAttribute": return Zl(e, t, r); + case "JSXIdentifier": return n.name; + case "JSXNamespacedName": return L(":", [r("namespace"), r("name")]); + case "JSXMemberExpression": return L(".", [r("object"), r("property")]); + case "JSXSpreadAttribute": + case "JSXSpreadChild": return am(e, t, r); + case "JSXExpressionContainer": return em(e, t, r); + case "JSXFragment": + case "JSXElement": return om(e, t, r); + case "JSXOpeningElement": return tm(e, t, r); + case "JSXClosingElement": return sm(e, t, r); + case "JSXOpeningFragment": + case "JSXClosingFragment": return im(e, t); + case "JSXEmptyExpression": return um(e, t); + case "JSXText": throw new Error("JSXText should be handled by JSXElement"); + default: throw new Qe(n, "JSX"); + } +} +function pm(e) { + if (e.children.length === 0) return !0; + if (e.children.length > 1) return !1; + let t = e.children[0]; + return t.type === "JSXText" && !Br(t); +} +function Br(e) { + return e.type === "JSXText" && (yn.hasNonWhitespaceCharacter(pe(e)) || !/\n/u.test(pe(e))); +} +function cm(e) { + return e.type === "JSXExpressionContainer" && V(e.expression) && e.expression.value === " " && !T(e.expression); +} +function Du(e) { + let { node: t, parent: r } = e; + if (!H(t) || !H(r)) return !1; + let { index: n, siblings: s } = e, i; + for (let o = n; o > 0; o--) { + let u = s[o - 1]; + if (!(u.type === "JSXText" && !Br(u))) { + i = u; + break; + } + } + return i?.type === "JSXExpressionContainer" && i.expression.type === "JSXEmptyExpression" && Ot(i.expression); +} +function lm(e) { + return Ot(e.node) || Du(e); +} +function yu(e, t, r) { + let { node: n } = e; + if (n.type.startsWith("NG")) switch (n.type) { + case "NGRoot": return r("node"); + case "NGPipeExpression": return on(e, t, r); + case "NGChainedExpression": return l(L([";", A], e.map(() => fm(e) ? r() : [ + "(", + r(), + ")" + ], "expressions"))); + case "NGEmptyExpression": return ""; + case "NGMicrosyntax": return e.map(() => [e.isFirst ? "" : fu(e) ? " " : [";", A], r()], "body"); + case "NGMicrosyntaxKey": return /^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(n.name) ? n.name : JSON.stringify(n.name); + case "NGMicrosyntaxExpression": return [r("expression"), n.alias === null ? "" : [" as ", r("alias")]]; + case "NGMicrosyntaxKeyedExpression": { + let { index: s, parent: i } = e, o = fu(e) || mm(e) || (s === 1 && (n.key.name === "then" || n.key.name === "else" || n.key.name === "as") || s === 2 && (n.key.name === "else" && i.body[s - 1].type === "NGMicrosyntaxKeyedExpression" && i.body[s - 1].key.name === "then" || n.key.name === "track")) && i.body[0].type === "NGMicrosyntaxExpression"; + return [ + r("key"), + o ? " " : ": ", + r("expression") + ]; + } + case "NGMicrosyntaxLet": return [ + "let ", + r("key"), + n.value === null ? "" : [" = ", r("value")] + ]; + case "NGMicrosyntaxAs": return [ + r("key"), + " as ", + r("alias") + ]; + default: throw new Qe(n, "Angular"); + } +} +function fu({ node: e, index: t }) { + return e.type === "NGMicrosyntaxKeyedExpression" && e.key.name === "of" && t === 1; +} +function mm(e) { + let { node: t } = e; + return e.parent.body[1].key.name === "of" && t.type === "NGMicrosyntaxKeyedExpression" && t.key.name === "track" && t.key.type === "NGMicrosyntaxKey"; +} +function fm({ node: e }) { + return Er(e, Dm); +} +function Ms(e, t, r) { + let { node: n } = e; + return l([L(A, e.map(r, "decorators")), du(n, t) ? E : A]); +} +function Eu(e, t, r) { + return Cu(e.node) ? [L(E, e.map(r, "declaration", "decorators")), E] : ""; +} +function Fu(e, t, r) { + let { node: n, parent: s } = e, { decorators: i } = n; + if (!R(i) || Cu(s) || nr(e)) return ""; + let o = n.type === "ClassExpression" || n.type === "ClassDeclaration" || du(n, t); + return [ + e.key === "declaration" && Di(s) ? E : o ? ke : "", + L(A, e.map(r, "decorators")), + A + ]; +} +function du(e, t) { + return e.decorators.some((r) => Z(t.originalText, I(r))); +} +function Cu(e) { + if (e.type !== "ExportDefaultDeclaration" && e.type !== "ExportNamedDeclaration" && e.type !== "DeclareExportDeclaration") return !1; + let t = e.declaration?.decorators; + return R(t) && bt(e, t[0]); +} +function Au(e) { + return Ns.has(e) || Ns.set(e, e.type === "ConditionalExpression" && !ye(e, (t) => t.type === "ObjectExpression")), Ns.get(e); +} +function Tu(e, t, r, n = {}) { + let s = [], i, o = [], u = !1, p = !n.expandLastArg && e.node.body.type === "ArrowFunctionExpression", c; + (function O() { + let { node: h } = e, g = Em(e, t, r, n); + if (s.length === 0) s.push(g); + else { + let { leading: S, trailing: j } = Mt(e, t); + s.push([S, g]), o.unshift(j); + } + p && (u || (u = h.returnType && K(h).length > 0 || h.typeParameters || K(h).some((S) => S.type !== "Identifier"))), !p || h.body.type !== "ArrowFunctionExpression" ? (i = r("body", n), c = h.body) : e.call(O, "body"); + })(); + let y = !Ee(t.originalText, c) && (ym(c) || Fm(c, i, t) || !u && Au(c)), D = e.key === "callee" && Dt(e.parent), F = Symbol("arrow-chain"), C = dm(e, n, { + signatureDocs: s, + shouldBreak: u + }), d = !1, b = !1, B = !1; + return p && (D || n.assignmentLayout) && (b = !0, B = !T(e.node, x.Leading & x.Line), d = n.assignmentLayout === "chain-tail-arrow-chain" || D && !y), i = Cm(e, t, n, { + bodyDoc: i, + bodyComments: o, + functionBody: c, + shouldPutBodyOnSameLine: y + }), l([ + l(b ? m([B ? f : "", C]) : C, { + shouldBreak: d, + id: F + }), + " =>", + p ? yt(i, { groupId: F }) : l(i), + p && D ? P(f, "", { groupId: F }) : "" + ]); +} +function Em(e, t, r, n) { + let { node: s } = e, i = []; + if (s.async && i.push("async "), fn(e, t)) i.push(r(["params", 0])); + else { + let u = n.expandLastArg || n.expandFirstArg, p = rr(e, r); + if (u) { + if (ne(p)) throw new Et(); + p = l(_t(p)); + } + i.push(l([Ke(e, t, r, u, !0), p])); + } + let o = v(e, t, { filter(u) { + let p = at(t.originalText, I(u)); + return p !== !1 && t.originalText.slice(p, p + 2) === "=>"; + } }); + return o && i.push(" ", o), i; +} +function Fm(e, t, r) { + return q(e) || se(e) || e.type === "ArrowFunctionExpression" || e.type === "DoExpression" || e.type === "BlockStatement" || H(e) || t.label?.hug !== !1 && (t.label?.embed || Wr(e, r.originalText)); +} +function dm(e, t, { signatureDocs: r, shouldBreak: n }) { + if (r.length === 1) return r[0]; + let { parent: s, key: i } = e; + return i !== "callee" && Dt(s) || Te(s) ? l([ + r[0], + " =>", + m([A, L([" =>", A], r.slice(1))]) + ], { shouldBreak: n }) : i === "callee" && Dt(s) || t.assignmentLayout ? l(L([" =>", A], r), { shouldBreak: n }) : l(m(L([" =>", A], r)), { shouldBreak: n }); +} +function Cm(e, t, r, { bodyDoc: n, bodyComments: s, functionBody: i, shouldPutBodyOnSameLine: o }) { + let { node: u, parent: p } = e, c = r.expandLastArg && ie(t, "all") ? P(",") : "", y = (r.expandLastArg || p.type === "JSXExpressionContainer") && !T(u) ? f : ""; + return o && Au(i) ? [ + " ", + l([ + P("", "("), + m([f, n]), + P("", ")"), + c, + y + ]), + s + ] : o ? [ + " ", + n, + s + ] : [ + m([ + A, + n, + s + ]), + c, + y + ]; +} +function br(e, t, r, n) { + let { node: s } = e, i = [], o = xu(0, s[n], (u) => u.type !== "EmptyStatement"); + return e.each(({ node: u }) => { + u.type !== "EmptyStatement" && (i.push(r()), u !== o && (i.push(E), oe(u, t) && i.push(E))); + }, n), i; +} +function En(e, t, r) { + let n = xm(e, t, r), { node: s, parent: i } = e; + if (s.type === "Program" && i?.type !== "ModuleExpression") return n ? [n, E] : ""; + let o = []; + if (s.type === "StaticBlock" && o.push("static "), o.push("{"), n) o.push(m([E, n]), E); + else { + let u = e.grandparent; + i.type === "ArrowFunctionExpression" || i.type === "FunctionExpression" || i.type === "FunctionDeclaration" || i.type === "ComponentDeclaration" || i.type === "HookDeclaration" || i.type === "ObjectMethod" || i.type === "ClassMethod" || i.type === "ClassPrivateMethod" || i.type === "ForStatement" || i.type === "WhileStatement" || i.type === "DoWhileStatement" || i.type === "DoExpression" || i.type === "ModuleExpression" || i.type === "CatchClause" && !u.finalizer || i.type === "TSModuleDeclaration" || i.type === "MatchStatementCase" || s.type === "StaticBlock" || o.push(E); + } + return o.push("}"), o; +} +function xm(e, t, r) { + let { node: n } = e, s = R(n.directives), i = n.body.some((p) => p.type !== "EmptyStatement"), o = T(n, x.Dangling); + if (!s && !i && !o) return ""; + let u = []; + return s && (u.push(br(e, t, r, "directives")), (i || o) && (u.push(E), oe(N(0, n.directives, -1), t) && u.push(E))), i && u.push(br(e, t, r, "body")), o && u.push(v(e, t)), u; +} +function gm(e) { + let t = /* @__PURE__ */ new WeakMap(); + return function(r) { + return t.has(r) || t.set(r, Symbol(e)), t.get(r); + }; +} +function Rt(e, t, r) { + let { node: n } = e, s = [], i = n.type === "ObjectTypeAnnotation", o = !Su(e), u = o ? A : E, p = T(n, x.Dangling), [c, y] = i && n.exact ? ["{|", "|}"] : "{}", D; + if (hm(e, ({ node: F, next: C, isLast: d }) => { + if (D ?? (D = F), s.push(r()), o && i) { + let { parent: b } = e; + b.inexact || !d ? s.push(",") : ie(t) && s.push(P(",")); + } + !o && (Sm({ + node: F, + next: C + }, t) || bu({ + node: F, + next: C + }, t)) && s.push(";"), d || (s.push(u), oe(F, t) && s.push(E)); + }), p && s.push(v(e, t)), n.type === "ObjectTypeAnnotation" && n.inexact) { + let F; + T(n, x.Dangling) ? F = [T(n, x.Line) || Z(t.originalText, I(N(0, et(n), -1))) ? E : A, "..."] : F = [D ? A : "", "..."], s.push(F); + } + if (o) { + let F = p || t.objectWrap === "preserve" && D && ue(t.originalText, w(n), w(D)), C; + if (s.length === 0) C = c + y; + else { + let d = t.bracketSpacing ? A : f; + C = [ + c, + m([d, ...s]), + d, + y + ]; + } + return e.match(void 0, (d, b) => b === "typeAnnotation", (d, b) => b === "typeAnnotation", Nt) || e.match(void 0, (d, b) => d.type === "FunctionTypeParam" && b === "typeAnnotation", Nt) ? C : l(C, { shouldBreak: F }); + } + return [ + c, + s.length > 0 ? [m([E, s]), E] : "", + y + ]; +} +function Su(e) { + let { node: t } = e; + if (t.type === "ObjectTypeAnnotation") { + let { key: r, parent: n } = e; + return r === "body" && (n.type === "InterfaceDeclaration" || n.type === "DeclareInterface" || n.type === "DeclareClass"); + } + return t.type === "ClassBody" || t.type === "TSInterfaceBody"; +} +function hm(e, t) { + let { node: r } = e; + if (r.type === "ClassBody" || r.type === "TSInterfaceBody") { + e.each(t, "body"); + return; + } + if (r.type === "TSTypeLiteral") { + e.each(t, "members"); + return; + } + if (r.type === "ObjectTypeAnnotation") { + let n = [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ].flatMap((s) => e.map(({ node: i, index: o }) => ({ + node: i, + loc: w(i), + selector: [s, o] + }), s)).sort((s, i) => s.loc - i.loc); + for (let [s, { node: i, selector: o }] of n.entries()) e.call(() => t({ + node: i, + next: n[s + 1]?.node, + isLast: s === n.length - 1 + }), ...o); + } +} +function he(e, t) { + let { parent: r } = e; + return e.callParent(Su) ? t.semi || r.type === "ObjectTypeAnnotation" ? ";" : "" : r.type === "TSTypeLiteral" ? e.isLast ? t.semi ? P(";") : "" : t.semi || bu({ + node: e.node, + next: e.next + }, t) ? ";" : P("", ";") : ""; +} +function Sm({ node: e, next: t }, r) { + if (r.semi || !hu(e)) return !1; + if (!e.value && Bu(e)) return !0; + if (!t || t.static || t.accessibility || t.readonly) return !1; + if (!t.computed) { + let n = t.key?.name; + if (n === "in" || n === "instanceof") return !0; + } + if (hu(t) && t.variance && !t.static && !t.declare) return !0; + switch (t.type) { + case "ClassProperty": + case "PropertyDefinition": + case "TSAbstractPropertyDefinition": return t.computed; + case "MethodDefinition": + case "TSAbstractMethodDefinition": + case "ClassMethod": + case "ClassPrivateMethod": { + if ((t.value ? t.value.async : t.async) || t.kind === "get" || t.kind === "set") return !1; + let s = t.value ? t.value.generator : t.generator; + return !!(t.computed || s); + } + case "TSIndexSignature": return !0; + } + return !1; +} +function bu({ node: e, next: t }, r) { + if (r.semi || !Bm(e)) return !1; + if (Bu(e)) return !0; + if (!t) return !1; + switch (t.type) { + case "TSCallSignatureDeclaration": return !0; + } + return !1; +} +function sr(e, t, r) { + let { node: n } = e, s = Pm(n), i = [ + Q(e), + Zt(e), + s ? "interface" : "class" + ], o = ku(e), u = [], p = []; + if (n.type !== "InterfaceTypeAnnotation") { + n.id && u.push(" "); + for (let y of ["id", "typeParameters"]) if (n[y]) { + let { leading: D, trailing: F } = e.call(() => Mt(e, t), y); + u.push(D, r(y), m(F)); + } + } + if (n.superClass) { + let y = [Lm(e, t, r), r(n.superTypeArguments ? "superTypeArguments" : "superTypeParameters")], D = e.call(() => ["extends ", De(e, y, t)], "superClass"); + o ? p.push(A, l(D)) : p.push(" ", D); + } else p.push(vs(e, t, r, "extends")); + p.push(vs(e, t, r, "mixins"), vs(e, t, r, "implements")); + let c; + return o ? (c = bm(n), i.push(l([...u, m(p)], { id: c }))) : i.push(...u, ...p), !s && o && km(n.body) ? i.push(P(E, " ", { groupId: c })) : i.push(" "), i.push(r("body")), i; +} +function km(e) { + return e.type === "ObjectTypeAnnotation" ? [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ].some((t) => R(e[t])) : R(e.body); +} +function Pu(e) { + let t = e.superClass ? 1 : 0; + for (let r of [ + "extends", + "mixins", + "implements" + ]) if (Array.isArray(e[r]) && (t += e[r].length), t > 1) return !0; + return t > 1; +} +function Im(e) { + let { node: t } = e; + if (T(t.id, x.Trailing) || T(t.typeParameters, x.Trailing) || T(t.superClass) || Pu(t)) return !0; + if (t.superClass) return e.parent.type === "AssignmentExpression" ? !1 : !(t.superTypeArguments ?? t.superTypeParameters) && J(t.superClass); + let r = t.extends?.[0] ?? t.mixins?.[0] ?? t.implements?.[0]; + return r ? r.type === "InterfaceExtends" && r.id.type === "QualifiedTypeIdentifier" && !r.typeParameters || (r.type === "TSClassImplements" || r.type === "TSInterfaceHeritage") && J(r.expression) && !r.typeArguments : !1; +} +function ku(e) { + let { node: t } = e; + return js.has(t) || js.set(t, Im(e)), js.get(t); +} +function vs(e, t, r, n) { + let { node: s } = e; + if (!R(s[n])) return ""; + let i = v(e, t, { marker: n }), o = L([",", A], e.map(r, n)); + if (!Pu(s)) { + let u = [ + `${n} `, + i, + o + ]; + return ku(e) ? [A, l(u)] : [" ", u]; + } + return [ + A, + i, + i && E, + n, + l(m([A, o])) + ]; +} +function Lm(e, t, r) { + let n = r("superClass"), { parent: s } = e; + return s.type === "AssignmentExpression" ? l(P([ + "(", + m([f, n]), + f, + ")" + ], n)) : n; +} +function Fn(e, t, r) { + let { node: n } = e, s = []; + return R(n.decorators) && s.push(Ms(e, t, r)), s.push(jt(n)), n.static && s.push("static "), s.push(Zt(e)), n.override && s.push("override "), s.push(Sr(e, t, r)), s; +} +function dn(e, t, r) { + let { node: n } = e, s = []; + R(n.decorators) && s.push(Ms(e, t, r)), s.push(Q(e), jt(n)), n.static && s.push("static "), s.push(Zt(e)), n.override && s.push("override "), n.readonly && s.push("readonly "), n.variance && s.push(r("variance")), (n.type === "ClassAccessorProperty" || n.type === "AccessorProperty" || n.type === "TSAbstractAccessorProperty") && s.push("accessor "), s.push(Ct(e, t, r), X(e), sn(e), G(e, r)); + return [ht(e, t, r, s, " =", n.type === "TSAbstractPropertyDefinition" || n.type === "TSAbstractAccessorProperty" ? void 0 : "value"), t.semi ? ";" : ""]; +} +function Rs(e) { + return Om(e) ? Rs(e.expression) : e; +} +function Lu(e) { + return e.type === "MemberExpression" || e.type === "OptionalMemberExpression" || e.type === "Identifier" && e.name !== "undefined"; +} +function wm(e, t) { + if (Is(e, t)) { + let r = Rs(e.node.expression); + return Iu(r) || Lu(r); + } + return !(!t.semi || Ps(e, t) || ks(e, t)); +} +function Ou(e, t, r) { + return [r("expression"), wm(e, t) ? ";" : ""]; +} +function wu(e, t, r) { + if (t.__isVueBindings || t.__isVueForBindingLeft) { + let n = e.map(r, "program", "body", 0, "params"); + if (n.length === 1) return n[0]; + let s = L([",", A], n); + return t.__isVueForBindingLeft ? [ + "(", + m([f, l(s)]), + f, + ")" + ] : s; + } + if (t.__isEmbeddedTypescriptGenericParameters) { + let n = e.map(r, "program", "body", 0, "typeParameters", "params"); + return L([",", A], n); + } +} +function Nu(e, t) { + let { node: r } = e; + switch (r.type) { + case "RegExpLiteral": return _u(r); + case "BigIntLiteral": return Cn(r.extra.raw); + case "NumericLiteral": return dt(r.extra.raw); + case "StringLiteral": return qe(ut(r.extra.raw, t)); + case "NullLiteral": return "null"; + case "BooleanLiteral": return String(r.value); + case "DirectiveLiteral": return Mu(r.extra.raw, t); + case "Literal": { + if (r.regex) return _u(r.regex); + if (r.bigint) return Cn(r.raw); + let { value: n } = r; + return typeof n == "number" ? dt(r.raw) : typeof n == "string" ? _m(e) ? Mu(r.raw, t) : qe(ut(r.raw, t)) : String(n); + } + } +} +function _m(e) { + if (e.key !== "expression") return; + let { parent: t } = e; + return t.type === "ExpressionStatement" && typeof t.directive == "string"; +} +function Cn(e) { + return e.toLowerCase(); +} +function _u({ pattern: e, flags: t }) { + return t = [...t].sort().join(""), `/${e}/${t}`; +} +function Mu(e, t) { + let r = e.slice(1, -1); + if (r === Mm || !(r.includes("\"") || r.includes("'"))) { + let n = t.singleQuote ? "'" : "\""; + return n + r + n; + } + return e; +} +function Nm(e, t, r) { + let n = e.originalText.slice(t, r); + for (let s of e[Symbol.for("comments")]) { + let i = w(s); + if (i > r) break; + let o = I(s); + if (o < t) continue; + let u = i - t, p = o - t; + n = n.slice(0, u) + W(0, n.slice(u, p), /[^\n]/gu, " ") + n.slice(p); + } + return n; +} +function ir(e, t, r) { + let { node: n, parent: s } = e, i = jm(n), o = n.type === "TSEnumBody" || i, u = ju(n), p = i && n.hasUnknownMembers, c = o ? "members" : u ? "attributes" : "properties", y = n[c], D = o || n.type === "ObjectPattern" && s.type !== "FunctionDeclaration" && s.type !== "FunctionExpression" && s.type !== "ArrowFunctionExpression" && s.type !== "ObjectMethod" && s.type !== "ClassMethod" && s.type !== "ClassPrivateMethod" && s.type !== "AssignmentPattern" && s.type !== "CatchClause" && n.properties.some((B) => B.value && (B.value.type === "ObjectPattern" || B.value.type === "ArrayPattern")) || n.type !== "ObjectPattern" && t.objectWrap === "preserve" && y.length > 0 && vm(n, y[0], t), F = [], C = e.map(({ node: B }) => { + let O = [...F, l(r())]; + return F = [",", A], oe(B, t) && F.push(E), O; + }, c); + if (p) { + let B; + if (T(n, x.Dangling)) { + let O = T(n, x.Line); + B = [ + v(e, t), + O || Z(t.originalText, I(N(0, et(n), -1))) ? E : A, + "..." + ]; + } else B = ["..."]; + C.push([...F, ...B]); + } + let d = !(p || N(0, y, -1)?.type === "RestElement"), b; + if (C.length === 0) { + if (!T(n, x.Dangling)) return ["{}", G(e, r)]; + b = l([ + "{", + v(e, t, { indent: !0 }), + f, + "}", + X(e), + G(e, r) + ]); + } else { + let B = t.bracketSpacing ? A : f; + b = [ + "{", + m([B, ...C]), + P(d && ie(t) ? "," : ""), + B, + "}", + X(e), + G(e, r) + ]; + } + return e.match((B) => B.type === "ObjectPattern" && !R(B.decorators), Nt) || Je(n) && (e.match(void 0, (B, O) => O === "typeAnnotation", (B, O) => O === "typeAnnotation", Nt) || e.match(void 0, (B, O) => B.type === "FunctionTypeParam" && O === "typeAnnotation", Nt)) || !D && e.match((B) => B.type === "ObjectPattern", (B) => B.type === "AssignmentExpression" || B.type === "VariableDeclarator") ? b : l(b, { shouldBreak: D }); +} +function vm(e, t, r) { + let n = r.originalText, s = w(e), i = w(t); + if (ju(e)) { + let o = w(e); + s = o + Jt(r, o, i).lastIndexOf("{"); + } + return ue(n, s, i); +} +function vu(e, t, r) { + let { node: n } = e; + return [ + "import", + n.phase ? ` ${n.phase}` : "", + Gs(n), + Gu(e, t, r), + Ju(e, t, r), + qu(e, t, r), + t.semi ? ";" : "" + ]; +} +function An(e, t, r) { + let { node: n } = e, s = [ + Eu(e, t, r), + Q(e), + "export", + Ru(n) ? " default" : "" + ], { declaration: i, exported: o } = n; + return T(n, x.Dangling) && (s.push(" ", v(e, t)), qr(n) && s.push(E)), i ? s.push(" ", r("declaration")) : (s.push(Gm(n)), n.type === "ExportAllDeclaration" || n.type === "DeclareExportAllDeclaration" ? (s.push(" *"), o && s.push(" as ", r("exported"))) : s.push(Gu(e, t, r)), s.push(Ju(e, t, r), qu(e, t, r))), s.push(Jm(n, t)), s; +} +function Jm(e, t) { + return t.semi && (!e.declaration || Ru(e) && !Rm(e.declaration)) ? ";" : ""; +} +function Js(e, t = !0) { + return e && e !== "value" ? `${t ? " " : ""}${e}${t ? "" : " "}` : ""; +} +function Gs(e, t) { + return Js(e.importKind, t); +} +function Gm(e) { + return Js(e.exportKind); +} +function Ju(e, t, r) { + let { node: n } = e; + return n.source ? [ + Wu(n, t) ? " from" : "", + " ", + r("source") + ] : ""; +} +function Gu(e, t, r) { + let { node: n } = e; + if (!Wu(n, t)) return ""; + let s = [" "]; + if (R(n.specifiers)) { + let i = [], o = []; + e.each(() => { + let u = e.node.type; + if (u === "ExportNamespaceSpecifier" || u === "ExportDefaultSpecifier" || u === "ImportNamespaceSpecifier" || u === "ImportDefaultSpecifier") i.push(r()); + else if (u === "ExportSpecifier" || u === "ImportSpecifier") o.push(r()); + else throw new Qe(n, "specifier"); + }, "specifiers"), s.push(L(", ", i)), o.length > 0 && (i.length > 0 && s.push(", "), o.length > 1 || i.length > 0 || n.specifiers.some((p) => T(p)) ? s.push(l([ + "{", + m([t.bracketSpacing ? A : f, L([",", A], o)]), + P(ie(t) ? "," : ""), + t.bracketSpacing ? A : f, + "}" + ])) : s.push([ + "{", + t.bracketSpacing ? " " : "", + ...o, + t.bracketSpacing ? " " : "", + "}" + ])); + } else s.push("{}"); + return s; +} +function Wu(e, t) { + return e.type !== "ImportDeclaration" || R(e.specifiers) || e.importKind === "type" ? !0 : Jt(t, w(e), w(e.source)).trimEnd().endsWith("from"); +} +function Wm(e, t) { + if (e.extra?.deprecatedAssertSyntax) return "assert"; + let r = Jt(t, I(e.source), e.attributes?.[0] ? w(e.attributes[0]) : I(e)).trimStart(); + return r.startsWith("assert") ? "assert" : r.startsWith("with") || R(e.attributes) ? "with" : void 0; +} +function qu(e, t, r) { + let { node: n } = e; + if (!n.source) return ""; + let s = Wm(n, t); + if (!s) return ""; + let i = ir(e, t, r); + return qm(n) && (i = _t(i)), [` ${s} `, i]; +} +function Uu(e, t, r) { + let { node: n } = e, { type: s } = n, i = s.startsWith("Import"), o = i ? "imported" : "local", u = i ? "local" : "exported", p = n[o], c = n[u], y = "", D = ""; + return s === "ExportNamespaceSpecifier" || s === "ImportNamespaceSpecifier" ? y = "*" : p && (y = r(o)), c && !Um(n) && (D = r(u)), [ + Js(s === "ImportSpecifier" ? n.importKind : n.exportKind, !1), + y, + y && D ? " as " : "", + D + ]; +} +function Um(e) { + if (e.type !== "ImportSpecifier" && e.type !== "ExportSpecifier") return !1; + let { local: t, [e.type === "ImportSpecifier" ? "imported" : "exported"]: r } = e; + if (t.type !== r.type || !ai(t, r)) return !1; + if (V(t)) return t.value === r.value && pe(t) === pe(r); + switch (t.type) { + case "Identifier": return t.name === r.name; + default: return !1; + } +} +function or(e, t) { + return [ + "...", + t("argument"), + G(e, t) + ]; +} +function Ym(e) { + let t = [e]; + for (let r = 0; r < t.length; r++) { + let n = t[r]; + for (let s of [ + "test", + "consequent", + "alternate" + ]) { + let i = n[s]; + if (H(i)) return !0; + i.type === "ConditionalExpression" && t.push(i); + } + } + return !1; +} +function Hm(e, t, r) { + let { node: n } = e, s = n.type === "ConditionalExpression", i = s ? "alternate" : "falseType", { parent: o } = e, u = s ? r("test") : [ + r("checkType"), + " ", + "extends", + " ", + r("extendsType") + ]; + return o.type === n.type && o[i] === n ? xe(2, u) : u; +} +function Vm(e) { + let { node: t } = e; + if (t.type !== "ConditionalExpression") return !1; + let r, n = t; + for (let s = 0; !r; s++) { + let i = e.getParentNode(s); + if (i.type === "ChainExpression" && i.expression === n || M(i) && i.callee === n || J(i) && i.object === n || i.type === "TSNonNullExpression" && i.expression === n) { + n = i; + continue; + } + i.type === "NewExpression" && i.callee === n || Ae(i) && i.expression === n ? (r = e.getParentNode(s + 1), n = i) : r = i; + } + return n === t ? !1 : r[Xm.get(r.type)] === n; +} +function Yu(e, t, r) { + let { node: n } = e, s = n.type === "ConditionalExpression", i = s ? "consequent" : "trueType", o = s ? "alternate" : "falseType", u = s ? ["test"] : ["checkType", "extendsType"], p = n[i], c = n[o], y = [], D = !1, { parent: F } = e, C = F.type === n.type && u.some((Y) => F[Y] === n), d = F.type === n.type && !C, b, B, O = 0; + do + B = b || n, b = e.getParentNode(O), O++; + while (b && b.type === n.type && u.every((Y) => b[Y] !== B)); + let h = b || F, g = B; + if (s && (H(n[u[0]]) || H(p) || H(c) || Ym(g))) { + D = !0, d = !0; + let Y = (ee) => [ + P("("), + m([f, ee]), + f, + P(")") + ], z = (ee) => ee.type === "NullLiteral" || ee.type === "Literal" && ee.value === null || ee.type === "Identifier" && ee.name === "undefined"; + y.push(" ? ", z(p) ? r(i) : Y(r(i)), " : ", c.type === n.type || z(c) ? r(o) : Y(r(o))); + } else { + let Y = (ee) => t.useTabs ? m(r(ee)) : xe(2, r(ee)), z = [ + A, + "? ", + p.type === n.type ? P("", "(") : "", + Y(i), + p.type === n.type ? P("", ")") : "", + A, + ": ", + Y(o) + ]; + y.push(F.type !== n.type || F[o] === n || C ? z : t.useTabs ? Qr(m(z)) : xe(Math.max(0, t.tabWidth - 2), z)); + } + let S = (Y) => F === h ? l(Y) : Y, j = !D && (J(F) || F.type === "NGPipeExpression" && F.left === n) && !F.computed, U = Vm(e), fe = S([ + Hm(e, t, r), + d ? y : m(y), + s && j && !U ? f : "" + ]); + return C || U ? l([m([f, fe]), f]) : fe; +} +function $m(e, t) { + return (J(t) || t.type === "NGPipeExpression" && t.left === e) && !t.computed; +} +function Km(e, t, r, n) { + return [ + ...e.map((i) => et(i)), + et(t), + et(r) + ].flat().some((i) => ce(i) && ue(n.originalText, w(i), I(i))); +} +function zm(e) { + let { node: t } = e; + if (t.type !== "ConditionalExpression") return !1; + let r, n = t; + for (let s = 0; !r; s++) { + let i = e.getParentNode(s); + if (i.type === "ChainExpression" && i.expression === n || M(i) && i.callee === n || J(i) && i.object === n || i.type === "TSNonNullExpression" && i.expression === n) { + n = i; + continue; + } + i.type === "NewExpression" && i.callee === n || Ae(i) && i.expression === n ? (r = e.getParentNode(s + 1), n = i) : r = i; + } + return n === t ? !1 : r[Qm.get(r.type)] === n; +} +function ur(e, t, r, n) { + if (!t.experimentalTernaries) return Yu(e, t, r); + let { node: s } = e, i = s.type === "ConditionalExpression", o = Ue(s), u = i ? "consequent" : "trueType", p = i ? "alternate" : "falseType", c = i ? ["test"] : ["checkType", "extendsType"], y = s[u], D = s[p], F = c.map((mr) => s[mr]), { parent: C } = e, d = C.type === s.type, b = d && c.some((mr) => C[mr] === s), B = d && C[p] === s, O = y.type === s.type, h = D.type === s.type, g = h || B, S = t.tabWidth > 2 || t.useTabs, j, U, fe = 0; + do + U = j || s, j = e.getParentNode(fe), fe++; + while (j && j.type === s.type && c.every((mr) => j[mr] !== U)); + let Y = j || C, z = n && n.assignmentLayout && n.assignmentLayout !== "break-after-operator" && (C.type === "AssignmentExpression" || C.type === "VariableDeclarator" || C.type === "ClassProperty" || C.type === "PropertyDefinition" || C.type === "ClassPrivateProperty" || C.type === "ObjectProperty" || C.type === "Property"), ee = (C.type === "ReturnStatement" || C.type === "ThrowStatement") && !(O || h), Ie = i && Y.type === "JSXExpressionContainer" && e.grandparent.type !== "JSXAttribute", st = zm(e), _ = $m(s, C), re = o && ge(e, t), ae = S ? t.useTabs ? " " : " ".repeat(t.tabWidth - 1) : "", it = Km(F, y, D, t) || O || h, Bt = !g && !d && !o && (Ie ? y.type === "NullLiteral" || y.type === "Literal" && y.value === null : Fr(y, t) && Vn(s.test, 3)), Mn = g || B || o && !d || d && i && Vn(s.test, 1) || Bt, Pr = []; + !O && T(y, x.Dangling) && e.call(() => { + Pr.push(v(e, t), E); + }, "consequent"); + let cr = []; + T(s.test, x.Dangling) && e.call(() => { + cr.push(v(e, t)); + }, "test"), !h && T(D, x.Dangling) && e.call(() => { + cr.push(v(e, t)); + }, "alternate"), T(s, x.Dangling) && cr.push(v(e, t)); + let Vs = Symbol("test"), xa = Symbol("consequent"), kr = Symbol("test-and-consequent"), $s = l([i ? [Ws(r("test")), s.test.type === "ConditionalExpression" ? ke : ""] : [ + r("checkType"), + " ", + "extends", + " ", + Ue(s.extendsType) || s.extendsType.type === "TSMappedType" ? r("extendsType") : l(Ws(r("extendsType"))) + ], " ?"], { id: Vs }), ha = r(u), Ir = m([ + O || Ie && (H(y) || d || g) ? E : A, + Pr, + ha + ]), Sa = Mn ? l([$s, g ? Ir : P(Ir, l(Ir, { id: xa }), { groupId: Vs })], { id: kr }) : [$s, Ir], Nn = r(p), Ks = Bt ? P(Nn, Qr(Ws(Nn)), { groupId: kr }) : Nn, lr = [ + Sa, + cr.length > 0 ? [m([E, cr]), E] : h ? E : Bt ? P(A, " ", { groupId: kr }) : A, + ":", + h ? " " : S ? Mn ? P(ae, P(g || Bt ? " " : ae, " "), { groupId: kr }) : P(ae, " ") : " ", + h ? Ks : l([m(Ks), Ie && !Bt ? f : ""]), + _ && !st ? f : "", + it ? ke : "" + ]; + return z && !it ? l(m([f, l(lr)])) : z || ee ? l(m(lr)) : st || o && b ? l([m([f, lr]), re ? f : ""]) : C === Y ? l(lr) : lr; +} +function Hu(e, t, r, n) { + let { node: s } = e; + if (Jr(s)) return Nu(e, t); + switch (s.type) { + case "JsExpressionRoot": return r("node"); + case "JsonRoot": return [ + v(e, t), + r("node"), + E + ]; + case "File": return wu(e, t, r) ?? r("program"); + case "ExpressionStatement": return Ou(e, t, r); + case "ChainExpression": return r("expression"); + case "ParenthesizedExpression": return !T(s.expression) && (se(s.expression) || q(s.expression)) ? [ + "(", + r("expression"), + ")" + ] : l([ + "(", + m([f, r("expression")]), + f, + ")" + ]); + case "AssignmentExpression": return zo(e, t, r); + case "VariableDeclarator": return Zo(e, t, r); + case "BinaryExpression": + case "LogicalExpression": return on(e, t, r); + case "AssignmentPattern": return [ + r("left"), + " = ", + r("right") + ]; + case "OptionalMemberExpression": + case "MemberExpression": return Ho(e, t, r); + case "MetaProperty": return [ + r("meta"), + ".", + r("property") + ]; + case "BindExpression": return Yo(e, t, r); + case "Identifier": return [ + s.name, + X(e), + sn(e), + G(e, r) + ]; + case "V8IntrinsicIdentifier": return ["%", s.name]; + case "SpreadElement": return or(e, r); + case "RestElement": return or(e, r); + case "FunctionDeclaration": + case "FunctionExpression": return mn(e, t, r, n); + case "ArrowFunctionExpression": return Tu(e, t, r, n); + case "YieldExpression": return [`yield${s.delegate ? "*" : ""}`, s.argument ? [" ", r("argument")] : ""]; + case "AwaitExpression": { + let i = ["await"]; + if (s.argument) { + i.push(" ", r("argument")); + let { parent: o } = e; + if (M(o) && o.callee === s || J(o) && o.object === s) { + i = [m([f, ...i]), f]; + let u = e.findAncestor((p) => p.type === "AwaitExpression" || p.type === "BlockStatement"); + if (u?.type !== "AwaitExpression" || !ye(u.argument, (p) => p === s)) return l(i); + } + } + return i; + } + case "ExportDefaultDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": return An(e, t, r); + case "ImportDeclaration": return vu(e, t, r); + case "ImportSpecifier": + case "ExportSpecifier": + case "ImportNamespaceSpecifier": + case "ExportNamespaceSpecifier": + case "ImportDefaultSpecifier": + case "ExportDefaultSpecifier": return Uu(e, t, r); + case "ImportAttribute": return ln(e, t, r); + case "Program": + case "BlockStatement": + case "StaticBlock": return En(e, t, r); + case "ClassBody": return Rt(e, t, r); + case "ThrowStatement": return ou(e, t, r); + case "ReturnStatement": return iu(e, t, r); + case "NewExpression": + case "ImportExpression": + case "OptionalCallExpression": + case "CallExpression": return vt(e, t, r); + case "ObjectExpression": + case "ObjectPattern": return ir(e, t, r); + case "Property": return mt(s) ? Sr(e, t, r) : ln(e, t, r); + case "ObjectProperty": return ln(e, t, r); + case "ObjectMethod": return Sr(e, t, r); + case "Decorator": return ["@", r("expression")]; + case "ArrayExpression": + case "ArrayPattern": return tr(e, t, r); + case "SequenceExpression": { + let { parent: i } = e; + if (i.type === "ExpressionStatement" || i.type === "ForStatement") { + let u = []; + return e.each(({ isFirst: p }) => { + p ? u.push(r()) : u.push(",", m([A, r()])); + }, "expressions"), l(u); + } + let o = L([",", A], e.map(r, "expressions")); + return (i.type === "ReturnStatement" || i.type === "ThrowStatement") && e.key === "argument" || i.type === "ArrowFunctionExpression" && e.key === "body" ? l(P([m([f, o]), f], o)) : l(o); + } + case "ThisExpression": return "this"; + case "Super": return "super"; + case "Directive": return [r("value"), t.semi ? ";" : ""]; + case "UnaryExpression": { + let i = [s.operator]; + return /[a-z]$/u.test(s.operator) && i.push(" "), T(s.argument) ? i.push(l([ + "(", + m([f, r("argument")]), + f, + ")" + ])) : i.push(r("argument")), i; + } + case "UpdateExpression": return [ + s.prefix ? s.operator : "", + r("argument"), + s.prefix ? "" : s.operator + ]; + case "ConditionalExpression": return ur(e, t, r, n); + case "VariableDeclaration": { + let i = e.map(r, "declarations"), o = e.parent, u = o.type === "ForStatement" || o.type === "ForInStatement" || o.type === "ForOfStatement", p = s.declarations.some((y) => y.init), c; + return i.length === 1 && !T(s.declarations[0]) ? c = i[0] : i.length > 0 && (c = m(i[0])), l([ + Q(e), + s.kind, + c ? [" ", c] : "", + m(i.slice(1).map((y) => [ + ",", + p && !u ? E : A, + y + ])), + t.semi && !(u && o.body !== s) ? ";" : "" + ]); + } + case "WithStatement": return l([ + "with (", + r("object"), + ")", + Ft(s.body, r("body")) + ]); + case "IfStatement": { + let i = Ft(s.consequent, r("consequent")), u = [l([ + "if (", + l([m([f, r("test")]), f]), + ")", + i + ])]; + if (s.alternate) { + let p = T(s.consequent, x.Trailing | x.Line) || qr(s), c = s.consequent.type === "BlockStatement" && !p; + u.push(c ? " " : E), T(s, x.Dangling) && u.push(v(e, t), p ? E : " "), u.push("else", l(Ft(s.alternate, r("alternate"), s.alternate.type === "IfStatement"))); + } + return u; + } + case "ForStatement": { + let i = Ft(s.body, r("body")), o = v(e, t), u = o ? [o, f] : ""; + return !s.init && !s.test && !s.update ? [u, l(["for (;;)", i])] : [u, l([ + "for (", + l([m([ + f, + r("init"), + ";", + A, + r("test"), + ";", + s.update ? [A, r("update")] : P("", A) + ]), f]), + ")", + i + ])]; + } + case "WhileStatement": return l([ + "while (", + l([m([f, r("test")]), f]), + ")", + Ft(s.body, r("body")) + ]); + case "ForInStatement": return l([ + "for (", + r("left"), + " in ", + r("right"), + ")", + Ft(s.body, r("body")) + ]); + case "ForOfStatement": return l([ + "for", + s.await ? " await" : "", + " (", + r("left"), + " of ", + r("right"), + ")", + Ft(s.body, r("body")) + ]); + case "DoWhileStatement": return [ + l(["do", Ft(s.body, r("body"))]), + s.body.type === "BlockStatement" ? " " : E, + "while (", + l([m([f, r("test")]), f]), + ")", + t.semi ? ";" : "" + ]; + case "DoExpression": return [ + s.async ? "async " : "", + "do ", + r("body") + ]; + case "BreakStatement": + case "ContinueStatement": return [ + s.type === "BreakStatement" ? "break" : "continue", + s.label ? [" ", r("label")] : "", + t.semi ? ";" : "" + ]; + case "LabeledStatement": return [ + r("label"), + `:${s.body.type === "EmptyStatement" && !T(s.body, x.Leading) ? "" : " "}`, + r("body") + ]; + case "TryStatement": return [ + "try ", + r("block"), + s.handler ? [" ", r("handler")] : "", + s.finalizer ? [" finally ", r("finalizer")] : "" + ]; + case "CatchClause": + if (s.param) { + let i = T(s.param, (u) => !ce(u) || u.leading && Z(t.originalText, I(u)) || u.trailing && Z(t.originalText, w(u), { backwards: !0 })), o = r("param"); + return [ + "catch ", + i ? [ + "(", + m([f, o]), + f, + ") " + ] : [ + "(", + o, + ") " + ], + r("body") + ]; + } + return ["catch ", r("body")]; + case "SwitchStatement": return [ + l([ + "switch (", + m([f, r("discriminant")]), + f, + ")" + ]), + " {", + s.cases.length > 0 ? m([E, L(E, e.map(({ node: i, isLast: o }) => [r(), !o && oe(i, t) ? E : ""], "cases"))]) : "", + E, + "}" + ]; + case "SwitchCase": { + let i = []; + s.test ? i.push("case ", r("test"), ":") : i.push("default:"), T(s, x.Dangling) && i.push(" ", v(e, t)); + let o = s.consequent.filter((u) => u.type !== "EmptyStatement"); + if (o.length > 0) { + let u = br(e, t, r, "consequent"); + i.push(o.length === 1 && o[0].type === "BlockStatement" ? [" ", u] : m([E, u])); + } + return i; + } + case "DebuggerStatement": return ["debugger", t.semi ? ";" : ""]; + case "ClassDeclaration": + case "ClassExpression": return sr(e, t, r); + case "ClassMethod": + case "ClassPrivateMethod": + case "MethodDefinition": return Fn(e, t, r); + case "ClassProperty": + case "PropertyDefinition": + case "ClassPrivateProperty": + case "ClassAccessorProperty": + case "AccessorProperty": return dn(e, t, r); + case "TemplateElement": return qe(s.value.raw); + case "TemplateLiteral": return en(e, t, r); + case "TaggedTemplateExpression": return io(e, t, r); + case "PrivateIdentifier": return ["#", s.name]; + case "PrivateName": return ["#", r("id")]; + case "TopicReference": return "%"; + case "ArgumentPlaceholder": return "?"; + case "ModuleExpression": return ["module ", r("body")]; + case "VoidPattern": return "void"; + case "EmptyStatement": if (kt(e)) return ";"; + default: throw new Qe(s, "ESTree"); + } +} +function Tn(e) { + return [e("elementType"), "[]"]; +} +function xn(e, t, r) { + let { parent: n, node: s, key: i } = e, u = s.type === "AsConstExpression" ? "const" : r("typeAnnotation"), p = [ + r("expression"), + " ", + Zm(s) ? "satisfies" : "as", + " ", + u + ]; + return i === "callee" && M(n) || i === "object" && J(n) ? l([m([f, ...p]), f]) : p; +} +function Xu(e, t, r) { + let { node: n } = e, s = [Q(e), "component"]; + n.id && s.push(" ", r("id")), s.push(r("typeParameters")); + let i = eD(e, t, r); + return n.rendersType ? s.push(l([ + i, + " ", + r("rendersType") + ])) : s.push(l([i])), n.body && s.push(" ", r("body")), t.semi && n.type === "DeclareComponent" && s.push(";"), s; +} +function eD(e, t, r) { + let { node: n } = e, s = n.params; + if (n.rest && (s = [...s, n.rest]), s.length === 0) return [ + "(", + v(e, t, { filter: (o) => _e(t.originalText, I(o)) === ")" }), + ")" + ]; + let i = []; + return rD(e, (o, u) => { + let p = u === s.length - 1; + p && n.rest && i.push("..."), i.push(r()), !p && (i.push(","), oe(s[u], t) ? i.push(E, E) : i.push(A)); + }), [ + "(", + m([f, ...i]), + P(ie(t, "all") && !tD(n, s) ? "," : ""), + f, + ")" + ]; +} +function tD(e, t) { + return e.rest || N(0, t, -1)?.type === "RestElement"; +} +function rD(e, t) { + let { node: r } = e, n = 0, s = (i) => t(i, n++); + e.each(s, "params"), r.rest && e.call(s, "rest"); +} +function Vu(e, t, r) { + let { node: n } = e; + return n.shorthand ? r("local") : [ + r("name"), + " as ", + r("local") + ]; +} +function $u(e, t, r) { + let { node: n } = e, s = []; + return n.name && s.push(r("name"), n.optional ? "?: " : ": "), s.push(r("typeAnnotation")), s; +} +function qs(e, t, r) { + return ir(e, t, r); +} +function Ku(e, t, r) { + let { node: n } = e; + return [n.type === "EnumSymbolBody" || n.explicitType ? `of ${n.type.slice(4, -4).toLowerCase()} ` : "", qs(e, t, r)]; +} +function gn(e, t) { + let { node: r } = e, n = t("id"); + r.computed && (n = [ + "[", + n, + "]" + ]); + let s = ""; + return r.initializer && (s = t("initializer")), r.init && (s = t("init")), s ? [ + n, + " = ", + s + ] : n; +} +function hn(e, t) { + let { node: r } = e; + return [ + Q(e), + r.const ? "const " : "", + "enum ", + t("id"), + " ", + t("body") + ]; +} +function Sn(e, t, r) { + let { node: n } = e, s = [Zt(e)]; + (n.type === "TSConstructorType" || n.type === "TSConstructSignatureDeclaration") && s.push("new "); + let i = Ke(e, t, r, !1, !0), o = []; + return n.type === "FunctionTypeAnnotation" ? o.push(nD(e) ? " => " : ": ", r("returnType")) : o.push(G(e, r, "returnType")), lt(n, o) && (i = l(i)), s.push(i, o), [l(s), n.type === "TSConstructSignatureDeclaration" || n.type === "TSCallSignatureDeclaration" ? he(e, t) : ""]; +} +function nD(e) { + let { node: t, parent: r } = e; + return t.type === "FunctionTypeAnnotation" && (Gr(r) || !((r.type === "ObjectTypeProperty" || r.type === "ObjectTypeInternalSlot") && !r.variance && !r.optional && bt(r, t) || r.type === "ObjectTypeCallProperty" || e.getParentNode(2)?.type === "DeclareFunction")); +} +function zu(e, t, r) { + let { node: n } = e, s = ["hook"]; + n.id && s.push(" ", r("id")); + let i = Ke(e, t, r, !1, !0), o = rr(e, r), u = lt(n, o); + return s.push(l([u ? l(i) : i, o]), n.body ? " " : "", r("body")), s; +} +function Zu(e, t, r) { + let { node: n } = e, s = [Q(e), "hook"]; + return n.id && s.push(" ", r("id")), t.semi && s.push(";"), s; +} +function Qu(e) { + let { node: t } = e; + return t.type === "HookTypeAnnotation" && e.getParentNode(2)?.type === "DeclareHook"; +} +function ea(e, t, r) { + let { node: n } = e, s = Ke(e, t, r, !1, !0), i = [Qu(e) ? ": " : " => ", r("returnType")]; + return l([ + Qu(e) ? "" : "hook ", + lt(n, i) ? l(s) : s, + i + ]); +} +function Bn(e, t, r) { + return [ + r("objectType"), + X(e), + "[", + r("indexType"), + "]" + ]; +} +function bn(e, t, r) { + return ["infer ", r("typeParameter")]; +} +function Pn(e, t, r) { + let n = !1; + return l(e.map(({ isFirst: s, previous: i, node: o, index: u }) => { + let p = r(); + if (s) return p; + let c = Je(o), y = Je(i); + return y && c ? [" & ", n ? m(p) : p] : !y && !c || Ee(t.originalText, o) ? t.experimentalOperatorPosition === "start" ? m([ + A, + "& ", + p + ]) : m([ + " &", + A, + p + ]) : (u > 1 && (n = !0), [" & ", u > 1 ? m(p) : p]); + }, "types")); +} +function sD(e) { + switch (e) { + case null: return ""; + case "PlusOptional": return "+?"; + case "MinusOptional": return "-?"; + case "Optional": return "?"; + } +} +function ra(e, t, r) { + let { node: n } = e; + return [l([ + n.variance ? r("variance") : "", + "[", + m([ + r("keyTparam"), + " in ", + r("sourceType") + ]), + "]", + sD(n.optional), + ": ", + r("propType") + ]), he(e, t)]; +} +function ta(e, t) { + return e === "+" || e === "-" ? e + t : t; +} +function na(e, t, r) { + let { node: n } = e, s = !1; + if (t.objectWrap === "preserve") { + let i = w(n), o = Jt(t, i + 1, w(n.key)), u = i + 1 + o.search(/\S/u); + ue(t.originalText, i, u) && (s = !0); + } + return l([ + "{", + m([ + t.bracketSpacing ? A : f, + T(n, x.Dangling) ? l([v(e, t), E]) : "", + l([ + n.readonly ? [ta(n.readonly, "readonly"), " "] : "", + "[", + r("key"), + " in ", + r("constraint"), + n.nameType ? [" as ", r("nameType")] : "", + "]", + n.optional ? ta(n.optional, "?") : "", + n.typeAnnotation ? ": " : "", + r("typeAnnotation") + ]), + t.semi ? P(";") : "" + ]), + t.bracketSpacing ? A : f, + "}" + ], { shouldBreak: s }); +} +function sa(e, t, r) { + let { node: n } = e; + return [ + l([ + "match (", + m([f, r("argument")]), + f, + ")" + ]), + " {", + n.cases.length > 0 ? m([E, L(E, e.map(({ node: s, isLast: i }) => [r(), !i && oe(s, t) ? E : ""], "cases"))]) : "", + E, + "}" + ]; +} +function ia(e, t, r) { + let { node: n } = e, s = T(n, x.Dangling) ? [" ", v(e, t)] : [], i = n.type === "MatchStatementCase" ? [" ", r("body")] : m([ + A, + r("body"), + "," + ]); + return [ + r("pattern"), + n.guard ? l([m([ + A, + "if (", + r("guard"), + ")" + ])]) : "", + l([ + " =>", + s, + i + ]) + ]; +} +function oa(e, t, r) { + let { node: n } = e; + switch (n.type) { + case "MatchOrPattern": return uD(e, t, r); + case "MatchAsPattern": return [ + r("pattern"), + " as ", + r("target") + ]; + case "MatchWildcardPattern": return ["_"]; + case "MatchLiteralPattern": return r("literal"); + case "MatchUnaryPattern": return [n.operator, r("argument")]; + case "MatchIdentifierPattern": return r("id"); + case "MatchMemberPattern": { + let s = n.property.type === "Identifier" ? [".", r("property")] : [ + "[", + m([f, r("property")]), + f, + "]" + ]; + return l([r("base"), s]); + } + case "MatchBindingPattern": return [ + n.kind, + " ", + r("id") + ]; + case "MatchObjectPattern": { + let s = e.map(r, "properties"); + return n.rest && s.push(r("rest")), l([ + "{", + m([f, L([",", A], s)]), + n.rest ? "" : P(","), + f, + "}" + ]); + } + case "MatchArrayPattern": { + let s = e.map(r, "elements"); + return n.rest && s.push(r("rest")), l([ + "[", + m([f, L([",", A], s)]), + n.rest ? "" : P(","), + f, + "]" + ]); + } + case "MatchObjectPatternProperty": return n.shorthand ? r("pattern") : l([ + r("key"), + ":", + m([A, r("pattern")]) + ]); + case "MatchRestPattern": { + let s = ["..."]; + return n.argument && s.push(r("argument")), s; + } + } +} +function iD(e) { + let { patterns: t } = e; + if (t.some((n) => T(n))) return !1; + let r = t.find((n) => n.type === "MatchObjectPattern"); + return r ? t.every((n) => n === r || ua(n)) : !1; +} +function oD(e) { + return ua(e) || e.type === "MatchObjectPattern" ? !0 : e.type === "MatchOrPattern" ? iD(e) : !1; +} +function uD(e, t, r) { + let { node: n } = e, { parent: s } = e, i = s.type !== "MatchStatementCase" && s.type !== "MatchExpressionCase" && s.type !== "MatchArrayPattern" && s.type !== "MatchObjectPatternProperty" && !Ee(t.originalText, n), o = oD(n), u = e.map(() => { + let c = r(); + return o || (c = xe(2, c)), De(e, c, t); + }, "patterns"); + if (o) return L(" | ", u); + let p = [P(["| "]), L([A, "| "], u)]; + return ge(e, t) ? l([m([P([f]), p]), f]) : s.type === "MatchArrayPattern" && s.elements.length > 1 ? l([ + m([P(["(", f]), p]), + f, + P(")") + ]) : l(i ? m(p) : p); +} +function aa(e, t, r) { + let { node: n } = e, s = [ + Q(e), + "opaque type ", + r("id"), + r("typeParameters") + ]; + if (n.supertype && s.push(": ", r("supertype")), n.lowerBound || n.upperBound) { + let i = []; + n.lowerBound && i.push(m([ + A, + "super ", + r("lowerBound") + ])), n.upperBound && i.push(m([ + A, + "extends ", + r("upperBound") + ])), s.push(l(i)); + } + return n.impltype && s.push(" = ", r("impltype")), s.push(t.semi ? ";" : ""), s; +} +function kn(e, t, r) { + let { node: n } = e; + return [ + "...", + ...n.type === "TupleTypeSpreadElement" && n.label ? [r("label"), ": "] : [], + r("typeAnnotation") + ]; +} +function In(e, t, r) { + let { node: n } = e; + return [ + n.variance ? r("variance") : "", + r("label"), + n.optional ? "?" : "", + ": ", + r("elementType") + ]; +} +function Ln(e, t, r) { + let { node: n } = e; + return [ht(e, t, r, [ + Q(e), + "type ", + r("id"), + r("typeParameters") + ], " =", n.type === "TSTypeAliasDeclaration" ? "typeAnnotation" : "right"), t.semi ? ";" : ""]; +} +function aD(e, t, r) { + let { node: n } = e; + return K(n).length === 1 && n.type.startsWith("TS") && !n[r][0].constraint && e.parent.type === "ArrowFunctionExpression" && !(t.filepath && /\.ts$/u.test(t.filepath)); +} +function Gt(e, t, r, n) { + let { node: s } = e; + if (!s[n]) return ""; + if (!Array.isArray(s[n])) return r(n); + let i = It(e.grandparent), o = e.match((c) => !(c[n].length === 1 && Je(c[n][0])), void 0, (c, y) => y === "typeAnnotation", (c) => c.type === "Identifier", Bs); + if (s[n].length === 0 || !o && (i || s[n].length === 1 && (s[n][0].type === "NullableTypeAnnotation" || Jo(s[n][0])))) return [ + "<", + L(", ", e.map(r, n)), + pD(e, t), + ">" + ]; + let p = s.type === "TSTypeParameterInstantiation" ? "" : aD(e, t, n) ? "," : ie(t) ? P(",") : ""; + return l([ + "<", + m([f, L([",", A], e.map(r, n))]), + p, + f, + ">" + ]); +} +function pD(e, t) { + let { node: r } = e; + if (!T(r, x.Dangling)) return ""; + let n = !T(r, x.Line), s = v(e, t, { indent: !n }); + return n ? s : [s, E]; +} +function On(e, t, r) { + let { node: n } = e, s = [n.const ? "const " : ""], i = n.type === "TSTypeParameter" ? r("name") : n.name; + if (n.variance && s.push(r("variance")), n.in && s.push("in "), n.out && s.push("out "), s.push(i), n.bound && (n.usesExtendsBound && s.push(" extends "), s.push(G(e, r, "bound"))), n.constraint) { + let o = Symbol("constraint"); + s.push(" extends", l(m(A), { id: o }), je, yt(r("constraint"), { groupId: o })); + } + if (n.default) { + let o = Symbol("default"); + s.push(" =", l(m(A), { id: o }), je, yt(r("default"), { groupId: o })); + } + return l(s); +} +function wn(e, t) { + let { node: r } = e; + return [ + r.type === "TSTypePredicate" && r.asserts ? "asserts " : r.type === "TypePredicate" && r.kind ? `${r.kind} ` : "", + t("parameterName"), + r.typeAnnotation ? [" is ", G(e, t)] : "" + ]; +} +function _n({ node: e }, t) { + return [ + "typeof ", + t(e.type === "TSTypeQuery" ? "exprName" : "argument"), + t("typeArguments") + ]; +} +function pa(e, t, r) { + let { node: n } = e; + if (Nr(n)) return n.type.slice(0, -14).toLowerCase(); + switch (n.type) { + case "ComponentDeclaration": + case "DeclareComponent": + case "ComponentTypeAnnotation": return Xu(e, t, r); + case "ComponentParameter": return Vu(e, t, r); + case "ComponentTypeParameter": return $u(e, t, r); + case "HookDeclaration": return zu(e, t, r); + case "DeclareHook": return Zu(e, t, r); + case "HookTypeAnnotation": return ea(e, t, r); + case "DeclareFunction": return [ + Q(e), + "function ", + r("id"), + r("predicate"), + t.semi ? ";" : "" + ]; + case "DeclareModule": return [ + "declare module ", + r("id"), + " ", + r("body") + ]; + case "DeclareModuleExports": return [ + "declare module.exports", + G(e, r), + t.semi ? ";" : "" + ]; + case "DeclareNamespace": return [ + "declare namespace ", + r("id"), + " ", + r("body") + ]; + case "DeclareVariable": return [ + Q(e), + n.kind ?? "var", + " ", + r("id"), + t.semi ? ";" : "" + ]; + case "DeclareExportDeclaration": + case "DeclareExportAllDeclaration": return An(e, t, r); + case "DeclareOpaqueType": + case "OpaqueType": return aa(e, t, r); + case "DeclareTypeAlias": + case "TypeAlias": return Ln(e, t, r); + case "IntersectionTypeAnnotation": return Pn(e, t, r); + case "UnionTypeAnnotation": return un(e, t, r); + case "ConditionalTypeAnnotation": return ur(e, t, r); + case "InferTypeAnnotation": return bn(e, t, r); + case "FunctionTypeAnnotation": return Sn(e, t, r); + case "TupleTypeAnnotation": return tr(e, t, r); + case "TupleTypeLabeledElement": return In(e, t, r); + case "TupleTypeSpreadElement": return kn(e, t, r); + case "GenericTypeAnnotation": return [r("id"), Gt(e, t, r, "typeParameters")]; + case "IndexedAccessType": + case "OptionalIndexedAccessType": return Bn(e, t, r); + case "TypeAnnotation": return an(e, t, r); + case "TypeParameter": return On(e, t, r); + case "TypeofTypeAnnotation": return _n(e, r); + case "ExistsTypeAnnotation": return "*"; + case "ArrayTypeAnnotation": return Tn(r); + case "DeclareEnum": + case "EnumDeclaration": return hn(e, r); + case "EnumBooleanBody": + case "EnumNumberBody": + case "EnumBigIntBody": + case "EnumStringBody": + case "EnumSymbolBody": return Ku(e, t, r); + case "EnumBooleanMember": + case "EnumNumberMember": + case "EnumBigIntMember": + case "EnumStringMember": + case "EnumDefaultedMember": return gn(e, r); + case "FunctionTypeParam": { + let s = n.name ? r("name") : e.parent.this === n ? "this" : ""; + return [ + s, + X(e), + s ? ": " : "", + r("typeAnnotation") + ]; + } + case "DeclareClass": + case "DeclareInterface": + case "InterfaceDeclaration": + case "InterfaceTypeAnnotation": return sr(e, t, r); + case "ObjectTypeAnnotation": return Rt(e, t, r); + case "ClassImplements": + case "InterfaceExtends": return [r("id"), r("typeParameters")]; + case "NullableTypeAnnotation": return ["?", r("typeAnnotation")]; + case "Variance": { + let { kind: s } = n; + return Le(s === "plus" || s === "minus"), s === "plus" ? "+" : "-"; + } + case "KeyofTypeAnnotation": return ["keyof ", r("argument")]; + case "ObjectTypeCallProperty": return [ + n.static ? "static " : "", + r("value"), + he(e, t) + ]; + case "ObjectTypeMappedTypeProperty": return ra(e, t, r); + case "ObjectTypeIndexer": return [ + n.static ? "static " : "", + n.variance ? r("variance") : "", + "[", + r("id"), + n.id ? ": " : "", + r("key"), + "]: ", + r("value"), + he(e, t) + ]; + case "ObjectTypeProperty": { + let s = ""; + return n.proto ? s = "proto " : n.static && (s = "static "), [ + s, + n.kind !== "init" ? n.kind + " " : "", + n.variance ? r("variance") : "", + Ct(e, t, r), + X(e), + mt(n) ? "" : ": ", + r("value"), + he(e, t) + ]; + } + case "ObjectTypeInternalSlot": return [ + n.static ? "static " : "", + "[[", + r("id"), + "]]", + X(e), + n.method ? "" : ": ", + r("value"), + he(e, t) + ]; + case "ObjectTypeSpreadProperty": return or(e, r); + case "QualifiedTypeofIdentifier": + case "QualifiedTypeIdentifier": return [ + r("qualification"), + ".", + r("id") + ]; + case "NullLiteralTypeAnnotation": return "null"; + case "BooleanLiteralTypeAnnotation": return String(n.value); + case "StringLiteralTypeAnnotation": return qe(ut(pe(n), t)); + case "NumberLiteralTypeAnnotation": return dt(pe(n)); + case "BigIntLiteralTypeAnnotation": return Cn(pe(n)); + case "TypeCastExpression": return [ + "(", + r("expression"), + G(e, r), + ")" + ]; + case "TypePredicate": return wn(e, r); + case "TypeOperator": return [ + n.operator, + " ", + r("typeAnnotation") + ]; + case "TypeParameterDeclaration": + case "TypeParameterInstantiation": return Gt(e, t, r, "params"); + case "InferredPredicate": + case "DeclaredPredicate": return [ + e.key === "predicate" && e.parent.type !== "DeclareFunction" && !e.parent.returnType ? ": " : " ", + "%checks", + ...n.type === "DeclaredPredicate" ? [ + "(", + r("value"), + ")" + ] : [] + ]; + case "AsExpression": + case "AsConstExpression": + case "SatisfiesExpression": return xn(e, t, r); + case "MatchExpression": + case "MatchStatement": return sa(e, t, r); + case "MatchExpressionCase": + case "MatchStatementCase": return ia(e, t, r); + case "MatchOrPattern": + case "MatchAsPattern": + case "MatchWildcardPattern": + case "MatchLiteralPattern": + case "MatchUnaryPattern": + case "MatchIdentifierPattern": + case "MatchMemberPattern": + case "MatchBindingPattern": + case "MatchObjectPattern": + case "MatchObjectPatternProperty": + case "MatchRestPattern": + case "MatchArrayPattern": return oa(e, t, r); + } +} +function ca(e, t, r) { + let { node: n } = e, s = n.parameters.length > 1 ? P(ie(t) ? "," : "") : "", i = l([ + m([f, L([", ", f], e.map(r, "parameters"))]), + s, + f + ]); + return [ + e.key === "body" && e.parent.type === "ClassBody" && n.static ? "static " : "", + n.readonly ? "readonly " : "", + "[", + n.parameters ? i : "", + "]", + G(e, r), + he(e, t) + ]; +} +function Us(e, t, r) { + let { node: n } = e; + return [ + n.postfix ? "" : r, + G(e, t), + n.postfix ? r : "" + ]; +} +function la(e, t, r) { + let { node: n } = e, s = [], i = n.kind && n.kind !== "method" ? `${n.kind} ` : ""; + s.push(jt(n), i, n.computed ? "[" : "", r("key"), n.computed ? "]" : "", X(e)); + let o = Ke(e, t, r, !1, !0), u = G(e, r, "returnType"), p = lt(n, u); + return s.push(p ? l(o) : o), n.returnType && s.push(l(u)), [l(s), he(e, t)]; +} +function ma(e, t, r) { + let { node: n } = e; + return [ + Q(e), + n.kind === "global" ? "" : `${n.kind} `, + r("id"), + n.body ? [" ", l(r("body"))] : t.semi ? ";" : "" + ]; +} +function Da(e, t, r) { + let { node: n } = e, s = !(q(n.expression) || se(n.expression)), i = l([ + "<", + m([f, r("typeAnnotation")]), + f, + ">" + ]), o = [ + P("("), + m([f, r("expression")]), + f, + P(")") + ]; + return s ? nt([ + [i, r("expression")], + [i, l(o, { shouldBreak: !0 })], + [i, r("expression")] + ]) : l([i, r("expression")]); +} +function fa(e, t, r) { + let { node: n } = e; + if (n.type.startsWith("TS")) { + if (jr(n)) return n.type.slice(2, -7).toLowerCase(); + switch (n.type) { + case "TSThisType": return "this"; + case "TSTypeAssertion": return Da(e, t, r); + case "TSDeclareFunction": return mn(e, t, r); + case "TSExportAssignment": return [ + "export = ", + r("expression"), + t.semi ? ";" : "" + ]; + case "TSModuleBlock": return En(e, t, r); + case "TSInterfaceBody": + case "TSTypeLiteral": return Rt(e, t, r); + case "TSTypeAliasDeclaration": return Ln(e, t, r); + case "TSQualifiedName": return [ + r("left"), + ".", + r("right") + ]; + case "TSAbstractMethodDefinition": + case "TSDeclareMethod": return Fn(e, t, r); + case "TSAbstractAccessorProperty": + case "TSAbstractPropertyDefinition": return dn(e, t, r); + case "TSInterfaceHeritage": + case "TSClassImplements": + case "TSInstantiationExpression": return [r("expression"), r("typeArguments")]; + case "TSTemplateLiteralType": return en(e, t, r); + case "TSNamedTupleMember": return In(e, t, r); + case "TSRestType": return kn(e, t, r); + case "TSOptionalType": return [r("typeAnnotation"), "?"]; + case "TSInterfaceDeclaration": return sr(e, t, r); + case "TSTypeParameterDeclaration": + case "TSTypeParameterInstantiation": return Gt(e, t, r, "params"); + case "TSTypeParameter": return On(e, t, r); + case "TSAsExpression": + case "TSSatisfiesExpression": return xn(e, t, r); + case "TSArrayType": return Tn(r); + case "TSPropertySignature": return [ + n.readonly ? "readonly " : "", + Ct(e, t, r), + X(e), + G(e, r), + he(e, t) + ]; + case "TSParameterProperty": return [ + jt(n), + n.static ? "static " : "", + n.override ? "override " : "", + n.readonly ? "readonly " : "", + r("parameter") + ]; + case "TSTypeQuery": return _n(e, r); + case "TSIndexSignature": return ca(e, t, r); + case "TSTypePredicate": return wn(e, r); + case "TSNonNullExpression": return [r("expression"), "!"]; + case "TSImportType": return [ + vt(e, t, r), + n.qualifier ? [".", r("qualifier")] : "", + Gt(e, t, r, "typeArguments") + ]; + case "TSLiteralType": return r("literal"); + case "TSIndexedAccessType": return Bn(e, t, r); + case "TSTypeOperator": return [ + n.operator, + " ", + r("typeAnnotation") + ]; + case "TSMappedType": return na(e, t, r); + case "TSMethodSignature": return la(e, t, r); + case "TSNamespaceExportDeclaration": return [ + "export as namespace ", + r("id"), + t.semi ? ";" : "" + ]; + case "TSEnumDeclaration": return hn(e, r); + case "TSEnumBody": return qs(e, t, r); + case "TSEnumMember": return gn(e, r); + case "TSImportEqualsDeclaration": return [ + "import ", + Gs(n, !1), + r("id"), + " = ", + r("moduleReference"), + t.semi ? ";" : "" + ]; + case "TSExternalModuleReference": return vt(e, t, r); + case "TSModuleDeclaration": return ma(e, t, r); + case "TSConditionalType": return ur(e, t, r); + case "TSInferType": return bn(e, t, r); + case "TSIntersectionType": return Pn(e, t, r); + case "TSUnionType": return un(e, t, r); + case "TSFunctionType": + case "TSCallSignatureDeclaration": + case "TSConstructorType": + case "TSConstructSignatureDeclaration": return Sn(e, t, r); + case "TSTupleType": return tr(e, t, r); + case "TSTypeReference": return [r("typeName"), Gt(e, t, r, "typeArguments")]; + case "TSTypeAnnotation": return an(e, t, r); + case "TSEmptyBodyFunctionExpression": return Dn(e, t, r); + case "TSJSDocAllType": return "*"; + case "TSJSDocUnknownType": return "?"; + case "TSJSDocNullableType": return Us(e, r, "?"); + case "TSJSDocNonNullableType": return Us(e, r, "!"); + default: throw new Qe(n, "TypeScript"); + } + } +} +function cD(e, t, r, n) { + for (let s of [ + yu, + mu, + pa, + fa, + Hu + ]) { + let i = s(e, t, r, n); + if (i !== void 0) return i; + } +} +function mD(e, t, r, n) { + e.isRoot && t.__onHtmlBindingRoot?.(e.node, t); + let { node: s } = e, i = nr(e) ? t.originalText.slice(w(s), I(s)) : cD(e, t, r, n); + if (!i) return ""; + if (lD(s)) return i; + let o = R(s.decorators), u = Fu(e, t, r), p = s.type === "ClassExpression"; + if (o && !p) return Ar(i, (D) => l([u, D])); + let c = ge(e, t), y = uu(e, t); + return !u && !c && !y ? i : Ar(i, (D) => [ + y ? ";" : "", + c ? "(" : "", + c && p && o ? [m([ + A, + u, + D + ]), A] : [u, D], + c ? ")" : "" + ]); +} +function yD(e, t, r) { + let { node: n } = e; + switch (n.type) { + case "JsonRoot": return [r("node"), E]; + case "ArrayExpression": { + if (n.elements.length === 0) return "[]"; + let s = e.map(() => e.node === null ? "null" : r(), "elements"); + return [ + "[", + m([E, L([",", E], s)]), + E, + "]" + ]; + } + case "ObjectExpression": return n.properties.length === 0 ? "{}" : [ + "{", + m([E, L([",", E], e.map(r, "properties"))]), + E, + "}" + ]; + case "ObjectProperty": return [ + r("key"), + ": ", + r("value") + ]; + case "UnaryExpression": return [n.operator === "+" ? "" : n.operator, r("argument")]; + case "NullLiteral": return "null"; + case "BooleanLiteral": return n.value ? "true" : "false"; + case "StringLiteral": return JSON.stringify(n.value); + case "NumericLiteral": return da(e) ? JSON.stringify(String(n.value)) : JSON.stringify(n.value); + case "Identifier": return da(e) ? JSON.stringify(n.name) : n.name; + case "TemplateLiteral": return r(["quasis", 0]); + case "TemplateElement": return JSON.stringify(n.value.cooked); + default: throw new Qe(n, "JSON"); + } +} +function da(e) { + return e.key === "key" && e.parent.type === "ObjectProperty"; +} +function Ca(e, t) { + let { type: r } = e; + if (r === "ObjectProperty") { + let { key: n } = e; + n.type === "Identifier" ? t.key = { + type: "StringLiteral", + value: n.name + } : n.type === "NumericLiteral" && (t.key = { + type: "StringLiteral", + value: String(n.value) + }); + return; + } + if (r === "UnaryExpression" && e.operator === "+") return t.argument; + if (r === "ArrayExpression") { + for (let [n, s] of e.elements.entries()) s === null && t.elements.splice(n, 0, { type: "NullLiteral" }); + return; + } + if (r === "TemplateLiteral") return { + type: "StringLiteral", + value: e.quasis[0].value.cooked + }; +} +var Ba, jn, Ta, Qs, Hs, Wt, ba, W, N, Lr, Zs, ei, _a, Ma, ot, ze, ti, ri, ni, Ze, Z, qt, Ut, Yt, R, qa, Le, si, ii, Ua, Ya, wr, Xa, oi, ut, ui, Dr, Qa, _r, a, Mr, k, pe, ce, Nr, At, Pt, jr, kt, Di, q, se, Jr, pp, Je, Ht, H, Te, lp, Dp, Fi, M, J, yp, Ep, li, vr, Yn, Fp, qn, Un, x, gi, oe, Ae, Se, xt, Ue, hi, Cr, dp, Kt, Bi, Cp, Ap, Tp, bi, xp, Pi, at, _e, ue, Qn, Hr, Zn, Mp, Np, wi, Xp, Vp, Ri, Ji, Gi, ic, Wi, Ye, Be, tt, He, Xe, rt, Fe, Me, be, Ve, $e, Ge, me, Pe, Ne, Xr, We, ac, is, gt, qi, Vr, de, Kr, $i, Ki, ke, Tr, A, f, os, E, $r, je, Ec, Fc, dc, Cc, Tc, xc, gc, as, ve, ct, cs, no, so, fs, po, Es, fo, yo, jc, Co, Gc, Wc, go, qc, Ao, Uc, To, Yc, ho, ko, Io, Fs, Oo, Qc, ge, Mo, sl, Et, pl, cl, ll, ml, vo, dt, fl, Ro, Fl, dl, Cl, Go, hr, kl, Vo, Ll, cn, Yl, bs, Ls, Qe, ws, yn, _s, Kl, nr, Dm, Ns, ym, Am, xu, gu, hu, Bu, Bm, bm, Pm, js, Om, Iu, Mm, Jt, ju, jm, Ru, Rm, qm, Xm, Qm, Ws, Zm, ua, lD, Ys, DD, ya, Xs, ar, Fa, ED, pr, St, Aa, dD, CD; +//#endregion +__esmMin((() => { + Ba = Object.defineProperty; + jn = (e, t) => { + for (var r in t) Ba(e, r, { + get: t[r], + enumerable: !0 + }); + }; + Ta = {}; + jn(Ta, { + languages: () => CD, + options: () => Aa, + printers: () => dD + }); + Qs = [ + { + name: "JavaScript", + type: "programming", + aceMode: "javascript", + extensions: [ + ".js", + "._js", + ".bones", + ".cjs", + ".es", + ".es6", + ".gs", + ".jake", + ".javascript", + ".jsb", + ".jscad", + ".jsfl", + ".jslib", + ".jsm", + ".jspre", + ".jss", + ".mjs", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".xsjs", + ".xsjslib", + ".start.frag", + ".end.frag", + ".wxs" + ], + filenames: [ + "Jakefile", + "start.frag", + "end.frag" + ], + tmScope: "source.js", + aliases: ["js", "node"], + codemirrorMode: "javascript", + codemirrorMimeType: "text/javascript", + interpreters: [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell", + "zx" + ], + parsers: [ + "babel", + "acorn", + "espree", + "meriyah", + "babel-flow", + "babel-ts", + "flow", + "typescript" + ], + vscodeLanguageIds: ["javascript", "mongo"], + linguistLanguageId: 183 + }, + { + name: "Flow", + type: "programming", + aceMode: "javascript", + extensions: [".js.flow"], + filenames: [], + tmScope: "source.js", + aliases: [], + codemirrorMode: "javascript", + codemirrorMimeType: "text/javascript", + interpreters: [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell" + ], + parsers: ["flow", "babel-flow"], + vscodeLanguageIds: ["javascript"], + linguistLanguageId: 183 + }, + { + name: "JSX", + type: "programming", + aceMode: "javascript", + extensions: [".jsx"], + filenames: void 0, + tmScope: "source.js.jsx", + aliases: void 0, + codemirrorMode: "jsx", + codemirrorMimeType: "text/jsx", + interpreters: void 0, + parsers: [ + "babel", + "babel-flow", + "babel-ts", + "flow", + "typescript", + "espree", + "meriyah" + ], + vscodeLanguageIds: ["javascriptreact"], + group: "JavaScript", + linguistLanguageId: 183 + }, + { + name: "TypeScript", + type: "programming", + aceMode: "typescript", + extensions: [ + ".ts", + ".cts", + ".mts" + ], + tmScope: "source.ts", + aliases: ["ts"], + codemirrorMode: "javascript", + codemirrorMimeType: "application/typescript", + interpreters: [ + "bun", + "deno", + "ts-node", + "tsx" + ], + parsers: ["typescript", "babel-ts"], + vscodeLanguageIds: ["typescript"], + linguistLanguageId: 378 + }, + { + name: "TSX", + type: "programming", + aceMode: "tsx", + extensions: [".tsx"], + tmScope: "source.tsx", + codemirrorMode: "jsx", + codemirrorMimeType: "text/typescript-jsx", + group: "TypeScript", + parsers: ["typescript", "babel-ts"], + vscodeLanguageIds: ["typescriptreact"], + linguistLanguageId: 94901924 + } + ]; + Hs = {}; + jn(Hs, { + canAttachComment: () => Pi, + embed: () => Co, + features: () => DD, + getVisitorKeys: () => Mr, + handleComments: () => Ji, + hasPrettierIgnore: () => nr, + insertPragma: () => Lo, + isBlockComment: () => ce, + isGap: () => Gi, + massageAstNode: () => Bi, + print: () => Ys, + printComment: () => wo, + printPrettierIgnored: () => Ys, + willPrintOwnComments: () => Wi + }); + Wt = (e, t) => (r, n, ...s) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, s); + ba = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, W = Wt("replaceAll", function() { + if (typeof this == "string") return ba; + }); + N = Wt("at", function() { + if (Array.isArray(this) || typeof this == "string") return ka; + }); + Lr = La; + Zs = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70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642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; + ei = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇"; + _a = /[^\x20-\x7F]/u, Ma = new Set(ei); + ot = Na; + ze = Or(" "), ti = Or(",; "), ri = Or(/[^\n\r]/u); + ni = (e) => e === ` +` || e === "\r" || e === "\u2028" || e === "\u2029"; + Ze = ja; + Z = va; + qt = Ra; + Ut = Ja; + Yt = Ga; + R = Wa; + qa = () => {}, Le = qa; + si = Object.freeze({ + character: "'", + codePoint: 39 + }), ii = Object.freeze({ + character: "\"", + codePoint: 34 + }), Ua = Object.freeze({ + preferred: si, + alternate: ii + }), Ya = Object.freeze({ + preferred: ii, + alternate: si + }); + wr = Ha; + Xa = /\\(["'\\])|(["'])/gu; + oi = Va; + ut = $a; + ui = (e) => Number.isInteger(e) && e >= 0; + Dr = null; + Qa = 10; + for (let e = 0; e <= Qa; e++) fr(); + _r = za; + a = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + Mr = _r({ + AccessorProperty: a[0], + AnyTypeAnnotation: a[1], + ArgumentPlaceholder: a[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: a[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: a[3], + AsExpression: a[4], + AssignmentExpression: a[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: a[6], + BigIntLiteral: a[1], + BigIntLiteralTypeAnnotation: a[1], + BigIntTypeAnnotation: a[1], + BinaryExpression: a[5], + BindExpression: ["object", "callee"], + BlockStatement: a[7], + BooleanLiteral: a[1], + BooleanLiteralTypeAnnotation: a[1], + BooleanTypeAnnotation: a[1], + BreakStatement: a[8], + CallExpression: a[9], + CatchClause: ["param", "body"], + ChainExpression: a[3], + ClassAccessorProperty: a[0], + ClassBody: a[10], + ClassDeclaration: a[11], + ClassExpression: a[11], + ClassImplements: a[12], + ClassMethod: a[13], + ClassPrivateMethod: a[13], + ClassPrivateProperty: a[14], + ClassProperty: a[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: a[15], + ConditionalExpression: a[16], + ConditionalTypeAnnotation: a[17], + ContinueStatement: a[8], + DebuggerStatement: a[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: a[18], + DeclareEnum: a[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: a[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: a[21], + DeclareInterface: a[22], + DeclareModule: a[19], + DeclareModuleExports: a[23], + DeclareNamespace: a[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: a[24], + DeclareVariable: a[21], + Decorator: a[3], + Directive: a[18], + DirectiveLiteral: a[1], + DoExpression: a[10], + DoWhileStatement: a[25], + EmptyStatement: a[1], + EmptyTypeAnnotation: a[1], + EnumBigIntBody: a[26], + EnumBigIntMember: a[27], + EnumBooleanBody: a[26], + EnumBooleanMember: a[27], + EnumDeclaration: a[19], + EnumDefaultedMember: a[21], + EnumNumberBody: a[26], + EnumNumberMember: a[27], + EnumStringBody: a[26], + EnumStringMember: a[27], + EnumSymbolBody: a[26], + ExistsTypeAnnotation: a[1], + ExperimentalRestProperty: a[6], + ExperimentalSpreadProperty: a[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: a[28], + ExportNamedDeclaration: a[20], + ExportNamespaceSpecifier: a[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: a[3], + File: ["program"], + ForInStatement: a[29], + ForOfStatement: a[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: a[30], + FunctionExpression: a[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: a[15], + GenericTypeAnnotation: a[12], + HookDeclaration: a[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: a[16], + ImportAttribute: a[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: a[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: a[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: a[34], + InferredPredicate: a[1], + InferTypeAnnotation: a[35], + InterfaceDeclaration: a[22], + InterfaceExtends: a[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: a[1], + IntersectionTypeAnnotation: a[36], + JsExpressionRoot: a[37], + JsonRoot: a[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: a[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: a[1], + JSXExpressionContainer: a[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: a[1], + JSXMemberExpression: a[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: a[1], + JSXSpreadAttribute: a[6], + JSXSpreadChild: a[3], + JSXText: a[1], + KeyofTypeAnnotation: a[6], + LabeledStatement: ["label", "body"], + Literal: a[1], + LogicalExpression: a[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: a[21], + MatchExpression: a[39], + MatchExpressionCase: a[40], + MatchIdentifierPattern: a[21], + MatchLiteralPattern: a[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: a[6], + MatchStatement: a[39], + MatchStatementCase: a[40], + MatchUnaryPattern: a[6], + MatchWildcardPattern: a[1], + MemberExpression: a[38], + MetaProperty: ["meta", "property"], + MethodDefinition: a[42], + MixedTypeAnnotation: a[1], + ModuleExpression: a[10], + NeverTypeAnnotation: a[1], + NewExpression: a[9], + NGChainedExpression: a[43], + NGEmptyExpression: a[1], + NGMicrosyntax: a[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: a[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: a[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: a[37], + NullableTypeAnnotation: a[23], + NullLiteral: a[1], + NullLiteralTypeAnnotation: a[1], + NumberLiteralTypeAnnotation: a[1], + NumberTypeAnnotation: a[1], + NumericLiteral: a[1], + ObjectExpression: ["properties"], + ObjectMethod: a[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: a[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: a[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: a[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: a[9], + OptionalIndexedAccessType: a[34], + OptionalMemberExpression: a[38], + ParenthesizedExpression: a[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: a[1], + PipelineTopicExpression: a[3], + Placeholder: a[1], + PrivateIdentifier: a[1], + PrivateName: a[21], + Program: a[7], + Property: a[32], + PropertyDefinition: a[14], + QualifiedTypeIdentifier: a[44], + QualifiedTypeofIdentifier: a[44], + RegExpLiteral: a[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: a[6], + SatisfiesExpression: a[4], + SequenceExpression: a[43], + SpreadElement: a[6], + StaticBlock: a[10], + StringLiteral: a[1], + StringLiteralTypeAnnotation: a[1], + StringTypeAnnotation: a[1], + Super: a[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: a[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: a[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: a[1], + ThisTypeAnnotation: a[1], + ThrowStatement: a[6], + TopicReference: a[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: a[45], + TSAbstractKeyword: a[1], + TSAbstractMethodDefinition: a[32], + TSAbstractPropertyDefinition: a[45], + TSAnyKeyword: a[1], + TSArrayType: a[2], + TSAsExpression: a[4], + TSAsyncKeyword: a[1], + TSBigIntKeyword: a[1], + TSBooleanKeyword: a[1], + TSCallSignatureDeclaration: a[46], + TSClassImplements: a[47], + TSConditionalType: a[17], + TSConstructorType: a[46], + TSConstructSignatureDeclaration: a[46], + TSDeclareFunction: a[31], + TSDeclareKeyword: a[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: a[26], + TSEnumDeclaration: a[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: a[3], + TSExportKeyword: a[1], + TSExternalModuleReference: a[3], + TSFunctionType: a[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: a[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: a[35], + TSInstantiationExpression: a[47], + TSInterfaceBody: a[10], + TSInterfaceDeclaration: a[22], + TSInterfaceHeritage: a[47], + TSIntersectionType: a[36], + TSIntrinsicKeyword: a[1], + TSJSDocAllType: a[1], + TSJSDocNonNullableType: a[23], + TSJSDocNullableType: a[23], + TSJSDocUnknownType: a[1], + TSLiteralType: a[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: a[10], + TSModuleDeclaration: a[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: a[21], + TSNeverKeyword: a[1], + TSNonNullExpression: a[3], + TSNullKeyword: a[1], + TSNumberKeyword: a[1], + TSObjectKeyword: a[1], + TSOptionalType: a[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: a[23], + TSPrivateKeyword: a[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: a[1], + TSPublicKeyword: a[1], + TSQualifiedName: a[5], + TSReadonlyKeyword: a[1], + TSRestType: a[23], + TSSatisfiesExpression: a[4], + TSStaticKeyword: a[1], + TSStringKeyword: a[1], + TSSymbolKeyword: a[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: a[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: a[23], + TSTypeAssertion: a[4], + TSTypeLiteral: a[26], + TSTypeOperator: a[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: a[48], + TSTypeParameterInstantiation: a[48], + TSTypePredicate: a[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: a[1], + TSUnionType: a[36], + TSUnknownKeyword: a[1], + TSVoidKeyword: a[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: a[24], + TypeAnnotation: a[23], + TypeCastExpression: a[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: a[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: a[48], + TypeParameterInstantiation: a[48], + TypePredicate: a[49], + UnaryExpression: a[6], + UndefinedTypeAnnotation: a[1], + UnionTypeAnnotation: a[36], + UnknownTypeAnnotation: a[1], + UpdateExpression: a[6], + V8IntrinsicIdentifier: a[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: a[27], + Variance: a[1], + VoidPattern: a[1], + VoidTypeAnnotation: a[1], + WhileStatement: a[25], + WithStatement: ["object", "body"], + YieldExpression: a[6] + }); + k = ep; + pe = tp; + ce = k([ + "Block", + "CommentBlock", + "MultiLine" + ]); + Nr = k([ + "AnyTypeAnnotation", + "ThisTypeAnnotation", + "NumberTypeAnnotation", + "VoidTypeAnnotation", + "BooleanTypeAnnotation", + "BigIntTypeAnnotation", + "SymbolTypeAnnotation", + "StringTypeAnnotation", + "NeverTypeAnnotation", + "UndefinedTypeAnnotation", + "UnknownTypeAnnotation", + "EmptyTypeAnnotation", + "MixedTypeAnnotation" + ]); + At = k([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + Pt = op; + jr = up; + kt = ap; + Di = k([ + "ExportDefaultDeclaration", + "DeclareExportDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "DeclareExportAllDeclaration" + ]), q = k(["ArrayExpression"]), se = k(["ObjectExpression"]); + Jr = k([ + "Literal", + "BooleanLiteral", + "BigIntLiteral", + "DirectiveLiteral", + "NullLiteral", + "NumericLiteral", + "RegExpLiteral", + "StringLiteral" + ]), pp = k([ + "Identifier", + "ThisExpression", + "Super", + "PrivateName", + "PrivateIdentifier" + ]), Je = k([ + "ObjectTypeAnnotation", + "TSTypeLiteral", + "TSMappedType" + ]), Ht = k(["FunctionExpression", "ArrowFunctionExpression"]); + H = k(["JSXElement", "JSXFragment"]); + Te = k([ + "BinaryExpression", + "LogicalExpression", + "NGPipeExpression" + ]); + lp = k([ + "TSThisType", + "NullLiteralTypeAnnotation", + "BooleanLiteralTypeAnnotation", + "StringLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "TSLiteralType", + "TSTemplateLiteralType" + ]); + Dp = [ + "it", + "it.only", + "it.skip", + "describe", + "describe.only", + "describe.skip", + "test", + "test.only", + "test.skip", + "test.fixme", + "test.step", + "test.describe", + "test.describe.only", + "test.describe.skip", + "test.describe.fixme", + "test.describe.parallel", + "test.describe.parallel.only", + "test.describe.serial", + "test.describe.serial.only", + "skip", + "xit", + "xdescribe", + "xtest", + "fit", + "fdescribe", + "ftest" + ]; + Fi = (e) => (t) => (t?.type === "ChainExpression" && (t = t.expression), e(t)), M = Fi(k(["CallExpression", "OptionalCallExpression"])), J = Fi(k(["MemberExpression", "OptionalMemberExpression"])); + yp = .25; + Ep = /* @__PURE__ */ new Set([ + "!", + "-", + "+", + "~" + ]); + li = { + "==": !0, + "!=": !0, + "===": !0, + "!==": !0 + }, vr = { + "*": !0, + "/": !0, + "%": !0 + }, Yn = { + ">>": !0, + ">>>": !0, + "<<": !0 + }; + Fp = new Map([ + ["|>"], + ["??"], + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + [ + "==", + "===", + "!=", + "!==" + ], + [ + "<", + ">", + "<=", + ">=", + "in", + "instanceof" + ], + [ + ">>", + "<<", + ">>>" + ], + ["+", "-"], + [ + "*", + "/", + "%" + ], + ["**"] + ].flatMap((e, t) => e.map((r) => [r, t]))); + qn = /* @__PURE__ */ new WeakMap(); + Un = /* @__PURE__ */ new WeakMap(); + x = { + Leading: 2, + Trailing: 4, + Dangling: 8, + Block: 16, + Line: 32, + PrettierIgnore: 64, + First: 128, + Last: 256 + }, gi = (e, t) => { + if (typeof e == "function" && (t = e, e = 0), e || t) return (r, n, s) => !(e & x.Leading && !r.leading || e & x.Trailing && !r.trailing || e & x.Dangling && (r.leading || r.trailing) || e & x.Block && !ce(r) || e & x.Line && !At(r) || e & x.First && n !== 0 || e & x.Last && n !== s.length - 1 || e & x.PrettierIgnore && !Lt(r) || t && !t(r)); + }; + oe = (e, { originalText: t }) => Yt(t, I(e)); + Ae = k([ + "TSAsExpression", + "TSSatisfiesExpression", + "AsExpression", + "AsConstExpression", + "SatisfiesExpression" + ]), Se = k(["TSUnionType", "UnionTypeAnnotation"]), xt = k(["TSIntersectionType", "IntersectionTypeAnnotation"]), Ue = k(["TSConditionalType", "ConditionalTypeAnnotation"]), hi = (e) => e?.type === "TSAsExpression" && e.typeAnnotation.type === "TSTypeReference" && e.typeAnnotation.typeName.type === "Identifier" && e.typeAnnotation.typeName.name === "const", Cr = k(["TSTypeAliasDeclaration", "TypeAlias"]); + dp = /* @__PURE__ */ new Set([ + "range", + "raw", + "comments", + "leadingComments", + "trailingComments", + "innerComments", + "extra", + "start", + "end", + "loc", + "flags", + "errors", + "tokens" + ]), Kt = (e) => { + for (let t of e.quasis) delete t.value; + }; + Si.ignoredProperties = dp; + Bi = Si; + Cp = k([ + "File", + "TemplateElement", + "TSEmptyBodyFunctionExpression", + "ChainExpression" + ]), Ap = (e, [t]) => t?.type === "ComponentParameter" && t.shorthand && t.name === e && t.local !== t.name || t?.type === "MatchObjectPatternProperty" && t.shorthand && t.key === e && t.value !== t.key || t?.type === "ObjectProperty" && t.shorthand && t.key === e && t.value !== t.key || t?.type === "Property" && t.shorthand && t.key === e && !mt(t) && t.value !== t.key, Tp = (e, [t]) => !!(e.type === "FunctionExpression" && t.type === "MethodDefinition" && t.value === e && K(e).length === 0 && !e.returnType && !R(e.typeParameters) && e.body), bi = (e, [t]) => t?.typeAnnotation === e && hi(t), xp = (e, [t, ...r]) => bi(e, [t]) || t?.typeName === e && bi(t, r); + Pi = gp; + at = Sp; + _e = Bp; + ue = bp; + Qn = /* @__PURE__ */ new WeakMap(); + Hr = Pp; + Zn = (e, t) => At(e) || !ue(t, w(e), I(e)); + Mp = k([ + "ClassDeclaration", + "ClassExpression", + "DeclareClass", + "DeclareInterface", + "InterfaceDeclaration", + "TSInterfaceDeclaration" + ]); + Np = k([ + "ClassMethod", + "ClassProperty", + "PropertyDefinition", + "TSAbstractPropertyDefinition", + "TSAbstractMethodDefinition", + "TSDeclareMethod", + "MethodDefinition", + "ClassAccessorProperty", + "AccessorProperty", + "TSAbstractAccessorProperty", + "TSParameterProperty" + ]); + wi = k([ + "FunctionDeclaration", + "FunctionExpression", + "ClassMethod", + "MethodDefinition", + "ObjectMethod" + ]); + Xp = k([ + "VariableDeclarator", + "AssignmentExpression", + "TypeAlias", + "TSTypeAliasDeclaration" + ]), Vp = k([ + "ObjectExpression", + "ArrayExpression", + "TemplateLiteral", + "TaggedTemplateExpression", + "ObjectTypeAnnotation", + "TSTypeLiteral" + ]); + Ri = k([ + "ArrowFunctionExpression", + "FunctionExpression", + "FunctionDeclaration", + "ObjectMethod", + "ClassMethod", + "TSDeclareFunction", + "TSCallSignatureDeclaration", + "TSConstructSignatureDeclaration", + "TSMethodSignature", + "TSConstructorType", + "TSFunctionType", + "TSDeclareMethod" + ]), Ji = { + endOfLine: Ip, + ownLine: kp, + remaining: Lp + }; + Gi = sc; + ic = k([ + "ClassDeclaration", + "ClassExpression", + "DeclareClass", + "DeclareInterface", + "InterfaceDeclaration", + "TSInterfaceDeclaration" + ]); + Wi = oc; + Ye = "string", Be = "array", tt = "cursor", He = "indent", Xe = "align", rt = "trim", Fe = "group", Me = "fill", be = "if-break", Ve = "indent-if-break", $e = "line-suffix", Ge = "line-suffix-boundary", me = "line", Pe = "label", Ne = "break-parent", Xr = /* @__PURE__ */ new Set([ + tt, + He, + Xe, + rt, + Fe, + Me, + be, + Ve, + $e, + Ge, + me, + Pe, + Ne + ]); + We = uc; + ac = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e); + is = class extends Error { + name = "InvalidDocError"; + constructor(t) { + super(pc(t)), this.doc = t; + } + }, gt = is; + qi = {}; + Vr = cc; + de = Le, Kr = Le, $i = Le, Ki = Le; + ke = { type: Ne }; + Tr = { type: tt }; + A = { type: me }, f = { + type: me, + soft: !0 + }, os = { + type: me, + hard: !0 + }, E = [os, ke], $r = [{ + type: me, + hard: !0, + literal: !0 + }, ke]; + je = { type: Ge }; + Ec = "cr", Fc = "crlf"; + dc = "\r", Cc = `\r +`, Tc = ` +`; + xc = { type: 0 }, gc = { type: 1 }, as = { + value: "", + length: 0, + queue: [], + get root() { + return as; + } + }; + ve = Symbol("MODE_BREAK"), ct = Symbol("MODE_FLAT"), cs = Symbol("DOC_FILL_PRINTED_LENGTH"); + no = Sc; + so = Bc; + fs = [ + (e, t) => e.type === "ObjectExpression" && t === "properties", + (e, t) => e.type === "CallExpression" && e.callee.type === "Identifier" && e.callee.name === "Component" && t === "arguments", + (e, t) => e.type === "Decorator" && t === "expression" + ]; + po = (e) => Oc(e) || wc(e) || _c(e) || oo(e); + Es = 0; + fo = mo.bind(void 0, "html"), yo = mo.bind(void 0, "angular"); + jc = [ + { + test: po, + print: ao + }, + { + test: lo, + print: co + }, + { + test: Do, + print: fo + }, + { + test: ys, + print: yo + }, + { + test: Fo, + print: Eo + } + ].map(({ test: e, print: t }) => ({ + test: e, + print: Rc(t) + })); + Co = vc; + Gc = /\*\/$/, Wc = /^\/\*\*?/, go = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, qc = /(^|\s+)\/\/([^\n\r]*)/g, Ao = /^(\r?\n)+/, Uc = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, To = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, Yc = /(\r?\n|^) *\* ?/g, ho = []; + ko = "format"; + Io = Hc; + Fs = /* @__PURE__ */ new WeakMap(); + Oo = $c; + Qc = k([ + "BlockStatement", + "BreakStatement", + "ComponentDeclaration", + "ClassBody", + "ClassDeclaration", + "ClassMethod", + "ClassProperty", + "PropertyDefinition", + "ClassPrivateProperty", + "ContinueStatement", + "DebuggerStatement", + "DeclareComponent", + "DeclareClass", + "DeclareExportAllDeclaration", + "DeclareExportDeclaration", + "DeclareFunction", + "DeclareHook", + "DeclareInterface", + "DeclareModule", + "DeclareModuleExports", + "DeclareNamespace", + "DeclareVariable", + "DeclareEnum", + "DoWhileStatement", + "EnumDeclaration", + "ExportAllDeclaration", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExpressionStatement", + "ForInStatement", + "ForOfStatement", + "ForStatement", + "FunctionDeclaration", + "HookDeclaration", + "IfStatement", + "ImportDeclaration", + "InterfaceDeclaration", + "LabeledStatement", + "MethodDefinition", + "ReturnStatement", + "SwitchStatement", + "ThrowStatement", + "TryStatement", + "TSDeclareFunction", + "TSEnumDeclaration", + "TSImportEqualsDeclaration", + "TSInterfaceDeclaration", + "TSModuleDeclaration", + "TSNamespaceExportDeclaration", + "TypeAlias", + "VariableDeclaration", + "WhileStatement", + "WithStatement" + ]); + ge = ds; + Mo = nl; + sl = () => !0; + Et = class extends Error { + name = "ArgExpansionBailout"; + }; + pl = k([ + "DeclareClass", + "DeclareComponent", + "DeclareFunction", + "DeclareHook", + "DeclareVariable", + "DeclareExportDeclaration", + "DeclareExportAllDeclaration", + "DeclareOpaqueType", + "DeclareTypeAlias", + "DeclareEnum", + "DeclareInterface" + ]); + cl = k([ + "TSAbstractMethodDefinition", + "TSAbstractPropertyDefinition", + "TSAbstractAccessorProperty" + ]); + ll = /^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/, ml = (e) => ll.test(e), vo = ml; + dt = Dl; + fl = 0; + Ro = (e) => e.type === "BinaryExpression" && e.operator === "|"; + Fl = k([ + "VoidTypeAnnotation", + "TSVoidKeyword", + "NullLiteralTypeAnnotation", + "TSNullKeyword" + ]), dl = k([ + "ObjectTypeAnnotation", + "TSTypeLiteral", + "GenericTypeAnnotation", + "TSTypeReference" + ]); + Cl = /* @__PURE__ */ new WeakSet(); + Go = (e) => e.match((t) => t.type === "TSTypeAnnotation", (t, r) => (r === "returnType" || r === "typeAnnotation") && (t.type === "TSFunctionType" || t.type === "TSConstructorType")) ? "=>" : e.match((t) => t.type === "TSTypeAnnotation", (t, r) => r === "typeAnnotation" && (t.type === "TSJSDocNullableType" || t.type === "TSJSDocNonNullableType" || t.type === "TSTypePredicate")) || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareFunction") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "typeAnnotation" && t.type === "Identifier", (t, r) => r === "id" && t.type === "DeclareHook") || e.match((t) => t.type === "TypeAnnotation", (t, r) => r === "bound" && t.type === "TypeParameter" && t.usesExtendsBound) ? "" : ":"; + hr = gl; + kl = (e) => ((e.type === "ChainExpression" || e.type === "TSNonNullExpression") && (e = e.expression), M(e) && le(e).length > 0); + Vo = Xo; + Ll = [ + "require", + "require.resolve", + "require.resolve.paths", + "import.meta.resolve" + ]; + cn = /* @__PURE__ */ new WeakMap(); + Yl = ({ node: e, key: t, parent: r }) => t === "value" && e.type === "FunctionExpression" && (r.type === "ObjectMethod" || r.type === "ClassMethod" || r.type === "ClassPrivateMethod" || r.type === "MethodDefinition" || r.type === "TSAbstractMethodDefinition" || r.type === "TSDeclareMethod" || r.type === "Property" && mt(r)); + bs = ({ node: e, parent: t }) => e.type === "ExpressionStatement" && t.type === "Program" && t.body.length === 1 && (Array.isArray(t.directives) && t.directives.length === 0 || !t.directives); + Ls = class extends Error { + name = "UnexpectedNodeError"; + constructor(t, r, n = "type") { + super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t; + } + }, Qe = Ls; + ws = class { + #e; + constructor(t) { + this.#e = new Set(t); + } + getLeadingWhitespaceCount(t) { + let r = this.#e, n = 0; + for (let s = 0; s < t.length && r.has(t.charAt(s)); s++) n++; + return n; + } + getTrailingWhitespaceCount(t) { + let r = this.#e, n = 0; + for (let s = t.length - 1; s >= 0 && r.has(t.charAt(s)); s--) n++; + return n; + } + getLeadingWhitespace(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(0, r); + } + getTrailingWhitespace(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(t.length - r); + } + hasLeadingWhitespace(t) { + return this.#e.has(t.charAt(0)); + } + hasTrailingWhitespace(t) { + return this.#e.has(N(0, t, -1)); + } + trimStart(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(r); + } + trimEnd(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(0, t.length - r); + } + trim(t) { + return this.trimEnd(this.trimStart(t)); + } + split(t, r = !1) { + let n = `[${Os([...this.#e].join(""))}]+`, s = new RegExp(r ? `(${n})` : n, "u"); + return t.split(s); + } + hasWhitespaceCharacter(t) { + let r = this.#e; + return Array.prototype.some.call(t, (n) => r.has(n)); + } + hasNonWhitespaceCharacter(t) { + let r = this.#e; + return Array.prototype.some.call(t, (n) => !r.has(n)); + } + isWhitespaceOnly(t) { + let r = this.#e; + return Array.prototype.every.call(t, (n) => r.has(n)); + } + #t(t) { + let r = Number.POSITIVE_INFINITY; + for (let n of t.split(` +`)) { + if (n.length === 0) continue; + let s = this.getLeadingWhitespaceCount(n); + if (s === 0) return 0; + n.length !== s && s < r && (r = s); + } + return r === Number.POSITIVE_INFINITY ? 0 : r; + } + dedentString(t) { + let r = this.#t(t); + return r === 0 ? t : t.split(` +`).map((n) => n.slice(r)).join(` +`); + } + }; + yn = new ws(` +\r `), _s = (e) => e === "" || e === A || e === E || e === f; + Kl = k([ + "ArrayExpression", + "JSXAttribute", + "JSXElement", + "JSXExpressionContainer", + "JSXFragment", + "ExpressionStatement", + "NewExpression", + "CallExpression", + "OptionalCallExpression", + "ConditionalExpression", + "JsExpressionRoot", + "MatchExpressionCase" + ]); + nr = lm; + Dm = k([ + "CallExpression", + "OptionalCallExpression", + "AssignmentExpression" + ]); + Ns = /* @__PURE__ */ new WeakMap(); + ym = (e) => e.type === "SequenceExpression"; + Am = Array.prototype.findLast ?? function(e) { + for (let t = this.length - 1; t >= 0; t--) { + let r = this[t]; + if (e(r, t, this)) return r; + } + }, xu = Wt("findLast", function() { + if (Array.isArray(this)) return Am; + }); + gu = gm; + hu = k([ + "ClassProperty", + "PropertyDefinition", + "ClassPrivateProperty", + "ClassAccessorProperty", + "AccessorProperty", + "TSAbstractPropertyDefinition", + "TSAbstractAccessorProperty" + ]), Bu = (e) => { + if (e.computed || e.typeAnnotation) return !1; + let { type: t, name: r } = e.key; + return t === "Identifier" && (r === "static" || r === "get" || r === "set"); + }; + Bm = k(["TSPropertySignature"]); + bm = gu("heritageGroup"), Pm = k([ + "TSInterfaceDeclaration", + "DeclareInterface", + "InterfaceDeclaration", + "InterfaceTypeAnnotation" + ]); + js = /* @__PURE__ */ new WeakMap(); + Om = k([ + "TSAsExpression", + "TSTypeAssertion", + "TSNonNullExpression", + "TSInstantiationExpression", + "TSSatisfiesExpression" + ]); + Iu = k(["FunctionExpression", "ArrowFunctionExpression"]); + Mm = "use strict"; + Jt = Nm; + ju = k([ + "ImportDeclaration", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "DeclareExportDeclaration", + "DeclareExportAllDeclaration" + ]), jm = k([ + "EnumBooleanBody", + "EnumNumberBody", + "EnumBigIntBody", + "EnumStringBody", + "EnumSymbolBody" + ]); + Ru = (e) => e.type === "ExportDefaultDeclaration" || e.type === "DeclareExportDeclaration" && e.default; + Rm = k([ + "ClassDeclaration", + "ComponentDeclaration", + "FunctionDeclaration", + "TSInterfaceDeclaration", + "DeclareClass", + "DeclareComponent", + "DeclareFunction", + "DeclareHook", + "HookDeclaration", + "TSDeclareFunction", + "EnumDeclaration" + ]); + qm = (e) => { + let { attributes: t } = e; + if (t.length !== 1) return !1; + let [r] = t, { type: n, key: s, value: i } = r; + return n === "ImportAttribute" && (s.type === "Identifier" && s.name === "type" || V(s) && s.value === "type") && V(i) && !T(r) && !T(s) && !T(i); + }; + Xm = /* @__PURE__ */ new Map([ + ["AssignmentExpression", "right"], + ["VariableDeclarator", "init"], + ["ReturnStatement", "argument"], + ["ThrowStatement", "argument"], + ["UnaryExpression", "argument"], + ["YieldExpression", "argument"], + ["AwaitExpression", "argument"] + ]); + Qm = /* @__PURE__ */ new Map([ + ["AssignmentExpression", "right"], + ["VariableDeclarator", "init"], + ["ReturnStatement", "argument"], + ["ThrowStatement", "argument"], + ["UnaryExpression", "argument"], + ["YieldExpression", "argument"], + ["AwaitExpression", "argument"] + ]); + Ws = (e) => [ + P("("), + m([f, e]), + f, + P(")") + ]; + Zm = k(["SatisfiesExpression", "TSSatisfiesExpression"]); + ua = k([ + "MatchWildcardPattern", + "MatchLiteralPattern", + "MatchUnaryPattern", + "MatchIdentifierPattern" + ]); + lD = k([ + "ClassMethod", + "ClassPrivateMethod", + "ClassProperty", + "ClassAccessorProperty", + "AccessorProperty", + "TSAbstractAccessorProperty", + "PropertyDefinition", + "TSAbstractPropertyDefinition", + "ClassPrivateProperty", + "MethodDefinition", + "TSAbstractMethodDefinition", + "TSDeclareMethod" + ]); + Ys = mD; + DD = { experimental_avoidAstMutation: !0 }; + ya = [ + { + name: "JSON.stringify", + type: "data", + aceMode: "json", + extensions: [".importmap"], + filenames: [ + "package.json", + "package-lock.json", + "composer.json" + ], + tmScope: "source.json", + aliases: [ + "geojson", + "jsonl", + "sarif", + "topojson" + ], + codemirrorMode: "javascript", + codemirrorMimeType: "application/json", + parsers: ["json-stringify"], + vscodeLanguageIds: ["json"], + linguistLanguageId: 174 + }, + { + name: "JSON", + type: "data", + aceMode: "json", + extensions: [ + ".json", + ".4DForm", + ".4DProject", + ".avsc", + ".geojson", + ".gltf", + ".har", + ".ice", + ".JSON-tmLanguage", + ".json.example", + ".mcmeta", + ".sarif", + ".tact", + ".tfstate", + ".tfstate.backup", + ".topojson", + ".webapp", + ".webmanifest", + ".yy", + ".yyp" + ], + filenames: [ + ".all-contributorsrc", + ".arcconfig", + ".auto-changelog", + ".c8rc", + ".htmlhintrc", + ".imgbotconfig", + ".nycrc", + ".tern-config", + ".tern-project", + ".watchmanconfig", + ".babelrc", + ".jscsrc", + ".jshintrc", + ".jslintrc", + ".swcrc" + ], + tmScope: "source.json", + aliases: [ + "geojson", + "jsonl", + "sarif", + "topojson" + ], + codemirrorMode: "javascript", + codemirrorMimeType: "application/json", + parsers: ["json"], + vscodeLanguageIds: ["json"], + linguistLanguageId: 174 + }, + { + name: "JSON with Comments", + type: "data", + aceMode: "javascript", + extensions: [ + ".jsonc", + ".code-snippets", + ".code-workspace", + ".sublime-build", + ".sublime-color-scheme", + ".sublime-commands", + ".sublime-completions", + ".sublime-keymap", + ".sublime-macro", + ".sublime-menu", + ".sublime-mousemap", + ".sublime-project", + ".sublime-settings", + ".sublime-theme", + ".sublime-workspace", + ".sublime_metrics", + ".sublime_session" + ], + filenames: [], + tmScope: "source.json.comments", + aliases: ["jsonc"], + codemirrorMode: "javascript", + codemirrorMimeType: "text/javascript", + group: "JSON", + parsers: ["jsonc"], + vscodeLanguageIds: ["jsonc"], + linguistLanguageId: 423 + }, + { + name: "JSON5", + type: "data", + aceMode: "json5", + extensions: [".json5"], + tmScope: "source.js", + codemirrorMode: "javascript", + codemirrorMimeType: "application/json", + parsers: ["json5"], + vscodeLanguageIds: ["json5"], + linguistLanguageId: 175 + } + ]; + Xs = {}; + jn(Xs, { + getVisitorKeys: () => Fa, + massageAstNode: () => Ca, + print: () => yD + }); + ar = [[]]; + Fa = _r({ + JsonRoot: ["node"], + ArrayExpression: ["elements"], + ObjectExpression: ["properties"], + ObjectProperty: ["key", "value"], + UnaryExpression: ["argument"], + NullLiteral: ar[0], + BooleanLiteral: ar[0], + StringLiteral: ar[0], + NumericLiteral: ar[0], + Identifier: ar[0], + TemplateLiteral: ["quasis"], + TemplateElement: ar[0] + }); + ED = /* @__PURE__ */ new Set([ + "start", + "end", + "extra", + "loc", + "comments", + "leadingComments", + "trailingComments", + "innerComments", + "errors", + "range", + "tokens" + ]); + Ca.ignoredProperties = ED; + pr = { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }; + St = "JavaScript", Aa = { + arrowParens: { + category: St, + type: "choice", + default: "always", + description: "Include parentheses around a sole arrow function parameter.", + choices: [{ + value: "always", + description: "Always include parens. Example: `(x) => x`" + }, { + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + }] + }, + bracketSameLine: pr.bracketSameLine, + objectWrap: pr.objectWrap, + bracketSpacing: pr.bracketSpacing, + jsxBracketSameLine: { + category: St, + type: "boolean", + description: "Put > on the last line instead of at a new line.", + deprecated: "2.4.0" + }, + semi: { + category: St, + type: "boolean", + default: !0, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + experimentalOperatorPosition: { + category: St, + type: "choice", + default: "end", + description: "Where to print operators when binary expressions wrap lines.", + choices: [{ + value: "start", + description: "Print operators at the start of new lines." + }, { + value: "end", + description: "Print operators at the end of previous lines." + }] + }, + experimentalTernaries: { + category: St, + type: "boolean", + default: !1, + description: "Use curious ternaries, with the question mark after the condition.", + oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." + }, + singleQuote: pr.singleQuote, + jsxSingleQuote: { + category: St, + type: "boolean", + default: !1, + description: "Use single quotes in JSX." + }, + quoteProps: { + category: St, + type: "choice", + default: "as-needed", + description: "Change when properties in objects are quoted.", + choices: [ + { + value: "as-needed", + description: "Only add quotes around object properties where required." + }, + { + value: "consistent", + description: "If at least one property in an object requires quotes, quote all properties." + }, + { + value: "preserve", + description: "Respect the input use of quotes in object properties." + } + ] + }, + trailingComma: { + category: St, + type: "choice", + default: "all", + description: "Print trailing commas wherever possible when multi-line.", + choices: [ + { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, + { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, + { + value: "none", + description: "No trailing commas." + } + ] + }, + singleAttributePerLine: pr.singleAttributePerLine + }; + dD = { + estree: Hs, + "estree-json": Xs + }, CD = [...Qs, ...ya]; +}))(); +export { Ta as default, CD as languages, Aa as options, dD as printers }; diff --git a/.github/actions/check-public-api/dist/flow-DKIme0c4.js b/.github/actions/check-public-api/dist/flow-DKIme0c4.js new file mode 100644 index 0000000000..8c3aa0afc6 --- /dev/null +++ b/.github/actions/check-public-api/dist/flow-DKIme0c4.js @@ -0,0 +1,52916 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/flow.mjs +function iI0(a0, ox) { + let Yx = /* @__PURE__ */ new SyntaxError(a0 + " (" + ox.loc.start.line + ":" + ox.loc.start.column + ")"); + return Object.assign(Yx, ox); +} +function sI0(a0) { + return this[a0 < 0 ? this.length + a0 : a0]; +} +function xn(a0) { + let ox = a0.range?.[0] ?? a0.start, Yx = (a0.declaration?.decorators ?? a0.decorators)?.[0]; + return Yx ? Math.min(xn(Yx), ox) : ox; +} +function bt(a0) { + return a0.range?.[1] ?? a0.end; +} +function oI0(a0) { + let ox = new Set(a0); + return (Yx) => ox.has(Yx?.type); +} +function pI0(a0) { + return Qj.has(a0) || Qj.set(a0, l6(a0) && a0.value[0] === "*" && /@(?:type|satisfies)\b/u.test(a0.value)), Qj.get(a0); +} +function kI0(a0) { + if (!l6(a0)) return !1; + let ox = `*${a0.value}*`.split(` +`); + return ox.length > 1 && ox.every((Yx) => Yx.trimStart()[0] === "*"); +} +function mI0(a0) { + return Zj.has(a0) || Zj.set(a0, kI0(a0)), Zj.get(a0); +} +function hI0(a0) { + if (a0.length < 2) return; + let ox; + for (let Yx = a0.length - 1; Yx >= 0; Yx--) { + let xr = a0[Yx]; + if (ox && bt(xr) === xn(ox) && xD(xr) && xD(ox) && (a0.splice(Yx + 1, 1), xr.value += "*//*" + ox.value, xr.range = [xn(xr), bt(ox)]), !ez(xr) && !l6(xr)) throw new TypeError(`Unknown comment type: "${xr.type}".`); + ox = xr; + } +} +function dI0(a0) { + return a0 !== null && typeof a0 == "object"; +} +function _p(a0) { + if (yp !== null && typeof yp.property) { + let ox = yp; + return yp = _p.prototype = null, ox; + } + return yp = _p.prototype = a0 ?? Object.create(null), new _p(); +} +function rD(a0) { + return _p(a0); +} +function _I0(a0, ox = "type") { + rD(a0); + function Yx(xr) { + let E1 = xr[ox], S2 = a0[E1]; + if (!Array.isArray(S2)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${E1}'.`), { node: xr }); + return S2; + } + return Yx; +} +function H5(a0, ox) { + if (!uz(a0)) return a0; + if (Array.isArray(a0)) { + for (let xr = 0; xr < a0.length; xr++) a0[xr] = H5(a0[xr], ox); + return a0; + } + if (ox.onEnter) { + let xr = ox.onEnter(a0) ?? a0; + if (xr !== a0) return H5(xr, ox); + a0 = xr; + } + let Yx = cz(a0); + for (let xr = 0; xr < Yx.length; xr++) a0[Yx[xr]] = H5(a0[Yx[xr]], ox); + return ox.onLeave && (a0 = ox.onLeave(a0) || a0), a0; +} +function gI0(a0, ox) { + let { parser: Yx, text: xr } = ox, { comments: E1 } = a0, S2 = Yx === "oxc" && ox.oxcAstType === "ts"; + nz(E1); + let da = a0.type === "File" ? a0.program : a0; + da.interpreter && (E1.unshift(da.interpreter), delete da.interpreter), S2 && a0.hashbang && (E1.unshift(a0.hashbang), delete a0.hashbang), a0.type === "Program" && (a0.range = [0, xr.length]); + let Tt; + return a0 = sz(a0, { + onEnter(Vr) { + switch (Vr.type) { + case "ParenthesizedExpression": { + let { expression: G1 } = Vr, yo = xn(Vr); + if (G1.type === "TypeCastExpression") return G1.range = [yo, bt(Vr)], G1; + let Et = !1; + if (!S2) { + if (!Tt) { + Tt = []; + for (let _o of E1) tz(_o) && Tt.push(bt(_o)); + } + let G3 = xz(0, Tt, (_o) => _o <= yo); + Et = G3 && xr.slice(G3, yo).trim().length === 0; + } + return Et ? void 0 : (G1.extra = { + ...G1.extra, + parenthesized: !0 + }, G1); + } + case "TemplateLiteral": + if (Vr.expressions.length !== Vr.quasis.length - 1) throw new Error("Malformed template literal."); + break; + case "TemplateElement": + if (Yx === "flow" || Yx === "hermes" || Yx === "espree" || Yx === "typescript" || S2) Vr.range = [xn(Vr) + 1, bt(Vr) - (Vr.tail ? 1 : 2)]; + break; + case "VariableDeclaration": { + let G1 = rz(0, Vr.declarations, -1); + G1?.init && xr[bt(G1)] !== ";" && (Vr.range = [xn(Vr), bt(G1)]); + break; + } + case "TSParenthesizedType": return Vr.typeAnnotation; + case "TopicReference": + a0.extra = { + ...a0.extra, + __isUsingHackPipeline: !0 + }; + break; + case "TSUnionType": + case "TSIntersectionType": + if (Vr.types.length === 1) return Vr.types[0]; + break; + case "ImportExpression": + Yx === "hermes" && Vr.attributes && !Vr.options && (Vr.options = Vr.attributes); + break; + } + }, + onLeave(Vr) { + switch (Vr.type) { + case "LogicalExpression": + if (az(Vr)) return eD(Vr); + break; + case "TSImportType": + !Vr.source && Vr.argument.type === "TSLiteralType" && (Vr.source = Vr.argument.literal, delete Vr.argument); + break; + } + } + }), a0; +} +function az(a0) { + return a0.type === "LogicalExpression" && a0.right.type === "LogicalExpression" && a0.operator === a0.right.operator; +} +function eD(a0) { + return az(a0) ? eD({ + type: "LogicalExpression", + operator: a0.operator, + left: eD({ + type: "LogicalExpression", + operator: a0.operator, + left: a0.left, + right: a0.right.left, + range: [xn(a0.left), bt(a0.right.left)] + }), + right: a0.right.right, + range: [xn(a0), bt(a0)] + }) : a0; +} +function pz(a0) { + let ox = a0.match(AI0); + return ox ? ox[0].trimStart() : ""; +} +function kz(a0) { + a0 = wp(0, a0.replace(SI0, "").replace(EI0, ""), CI0, "$1"); + let Yx = ""; + for (; Yx !== a0;) Yx = a0, a0 = wp(0, a0, PI0, ` +$1 $2 +`); + a0 = a0.replace(vz, "").trimEnd(); + let xr = Object.create(null), E1 = wp(0, a0, lz, "").replace(vz, "").trimEnd(), S2; + for (; S2 = lz.exec(a0);) { + let da = wp(0, S2[2], II0, ""); + if (typeof xr[S2[1]] == "string" || Array.isArray(xr[S2[1]])) { + let Tt = xr[S2[1]]; + xr[S2[1]] = [ + ...NI0, + ...Array.isArray(Tt) ? Tt : [Tt], + da + ]; + } else xr[S2[1]] = da; + } + return { + comments: E1, + pragmas: xr + }; +} +function OI0(a0) { + if (!a0.startsWith("#!")) return ""; + let ox = a0.indexOf(` +`); + return ox === -1 ? a0 : a0.slice(0, ox); +} +function yz(a0) { + let ox = dz(a0); + ox && (a0 = a0.slice(ox.length + 1)); + let { pragmas: xr, comments: E1 } = kz(pz(a0)); + return { + shebang: ox, + text: a0, + pragmas: xr, + comments: E1 + }; +} +function _z(a0) { + let { pragmas: ox } = yz(a0); + return hz.some((Yx) => Object.prototype.hasOwnProperty.call(ox, Yx)); +} +function wz(a0) { + let { pragmas: ox } = yz(a0); + return mz.some((Yx) => Object.prototype.hasOwnProperty.call(ox, Yx)); +} +function jI0(a0) { + return a0 = typeof a0 == "function" ? { parse: a0 } : a0, { + astFormat: "estree", + hasPragma: _z, + hasIgnorePragma: wz, + locStart: xn, + locEnd: bt, + ...a0 + }; +} +function RI0(a0) { + let { message: ox, loc: Yx } = a0; + if (!Yx) return a0; + let { start: xr, end: E1 } = Yx; + return ZY(ox, { + loc: { + start: { + line: xr.line, + column: xr.column + 1 + }, + end: { + line: E1.line, + column: E1.column + 1 + } + }, + cause: a0 + }); +} +function FI0(a0) { + let ox = bz.default.parse(a0, DI0), [Yx] = ox.errors; + if (Yx) throw RI0(Yx); + return oz(ox, { + parser: "flow", + text: a0 + }); +} +var QA0, Vj, ZA0, xI0, rI0, eI0, tI0, $Y, nI0, uI0, QY, Tz, tD, bz, ZY, o6, fI0, xz, rz, v6, l6, ez, Qj, tz, Zj, xD, nz, uz, yp, yI0, iz, $, cz, sz, oz, bI0, wp, EI0, SI0, AI0, II0, vz, PI0, lz, CI0, NI0, mz, hz, dz, gz, DI0, MI0; +//#endregion +__esmMin((() => { + QA0 = Object.create; + Vj = Object.defineProperty; + ZA0 = Object.getOwnPropertyDescriptor; + xI0 = Object.getOwnPropertyNames; + rI0 = Object.getPrototypeOf, eI0 = Object.prototype.hasOwnProperty; + tI0 = (a0, ox) => () => (ox || a0((ox = { exports: {} }).exports, ox), ox.exports), $Y = (a0, ox) => { + for (var Yx in ox) Vj(a0, Yx, { + get: ox[Yx], + enumerable: !0 + }); + }, nI0 = (a0, ox, Yx, xr) => { + if (ox && typeof ox == "object" || typeof ox == "function") for (let E1 of xI0(ox)) !eI0.call(a0, E1) && E1 !== Yx && Vj(a0, E1, { + get: () => ox[E1], + enumerable: !(xr = ZA0(ox, E1)) || xr.enumerable + }); + return a0; + }; + uI0 = (a0, ox, Yx) => (Yx = a0 != null ? QA0(rI0(a0)) : {}, nI0(ox || !a0 || !a0.__esModule ? Vj(Yx, "default", { + value: a0, + enumerable: !0 + }) : Yx, a0)); + QY = tI0(($j) => { + (function(a0) { + typeof globalThis != "object" && (this ? ox() : (a0.defineProperty(a0.prototype, "_T_", { + configurable: !0, + get: ox + }), _T_)); + function ox() { + var Yx = this || self; + Yx.globalThis = Yx, delete a0.prototype._T_; + } + })(Object); + (function(a0) { + "use strict"; + var ox = 320, Yx = "loc", xr = 289, E1 = 70416, S2 = 69748, da = 163, Tt = 92159, Vr = 43587, G1 = "labeled_statement", yo = "&=", Et = "int_of_string", G3 = 110591, _o = 92909, gp = 11559, nD = "regexp", W5 = 43301, bp = 11703, V5 = 122654, ya = 255, uD = "%ni", $5 = 68252, iD = 232, Q5 = 42785, qn = "declare_variable", Tp = "while", Z5 = 66938, xy = 70301, ry = 124907, Ep = 126515, fD = 218, Bn = "pattern_identifier", ey = 67643, Un = "export_source", ty = 216, ny = 64279, cD = "Out_of_memory", uy = 113788, sD = "comments", iy = 126624, aD = "win32", Xn = "object_key_bigint_literal", oD = 185, Sp = 123214, _a = "constructor", fy = 69955, Gn = "import_declaration", cy = 68437, sy = "Failure", Ap = "Unix.Unix_error", ay = 64255, oy = 42539, vy = 110579, Yn = "export_default_declaration", zn = "jsx_attribute_name", Ip = 11727, ly = 43002, Pp = 126500, Jn = "component_param_pattern", vD = "collect_comments_opt", Kn = "match_unary_pattern", lD = 321, Hn = "keyof_type", pD = "Invalid binary/octal ", kD = "range", py = 170, wa = "false", ky = 43798, mD = ", characters ", Wn = "object_type_property_getter", my = 65547, hy = 126467, dy = 65007, yy = 42237, _y = 8318, wy = 71215, Vn = "object_property_type", $n = "type_alias", gy = 67742, Qn = "function_body", hD = 304, by = 68111, Cp = 120745, Ty = 71959, Np = 43880, dD = "Match_failure", Zn = "type_cast", wo = 109, ga = "void", Ey = "generator", Sy = 125124, Ay = 101589, Op = 94179, yD = ">>>", jp = 70404, x7 = "optional_indexed_access_type", $1 = "argument", r7 = "object_property", e7 = "object_type_property", Iy = 67004, Py = 42783, Cy = 68850, _D = "@", Ny = 43741, Oy = 43487, Dp = "object", wD = "end", Rp = 126571, jy = 71956, gD = 208, Dy = 126566, Ry = 67702, bD = "EEXIST", t7 = "this_expression", TD = 203, Fy = 11507, My = 113807, Fp = 119893, Ly = 42735, p6 = "rest", n7 = "null_literal", k6 = "protected", qy = 43615, v2 = 8231, By = 68149, Uy = 73727, Xy = 72348, Gy = 92995, Sv = 224, Yy = 11686, zy = 43013, u7 = "assignment_pattern", Jy = 12329, i7 = "function_type", Y3 = 192, f7 = "jsx_element_name", Ky = 70018, ED = -57, c7 = "catch_clause_pattern", Mp = 126540, s7 = "template_literal", Hy = 120654, Wy = 68497, Vy = 67679, a7 = "readonly_type", $y = 68735, Qy = "<", Lp = ": No such file or directory", Zy = 66915, x9 = "chain", SD = "!", o7 = "object_type", r9 = 43712, qp = 64297, e9 = 183969, t9 = -105, n9 = 43503, u9 = 67591, Av = 65278, i9 = 67669, v7 = "for_of_assignment_pattern", m6 = "`", f9 = 11502, l7 = "catch_body", c9 = 42191, go = -744106340, s9 = 182, Iv = ":", AD = "a string", a9 = 65663, o9 = 66978, v9 = 71947, Bp = 43519, l9 = 71086, p9 = 125258, k9 = 12538, p7 = "expression_or_spread", ID = "Printexc.handle_uncaught_exception", Up = 69956, Xp = 120122, Gp = 247, PD = 231, m9 = " : flags Open_rdonly and Open_wronly are not compatible", k7 = "statement_fork_point", CD = 710, ND = -692038429, Ue = "static", h9 = 55203, d9 = 64324, y9 = 64111, OD = "!==", _9 = 120132, w9 = 124903, h6 = "class", jD = 222, m7 = "pattern_number_literal", ba = "kind", g9 = 71903, h7 = "variable_declarator", DD = " named `", d7 = "typeof_expression", b9 = 126627, T9 = 70084, RD = 228, Yp = 70480, y7 = "class_private_field", E9 = 239, zp = 120713, rn = 65535, z3 = -26, _7 = "private_name", S9 = 43137, w7 = "remote_identifier", A9 = 70161, g7 = "label_identifier", I9 = "src/parser/statement_parser.ml", P9 = 8335, C9 = 19903, N9 = 64310, Pv = "_", b7 = "for_init_declaration", FD = "infer", O9 = 64466, j9 = 43018, MD = "tokens", D9 = 92735, R9 = 66954, F9 = 65473, M9 = 70285, T7 = "sequence", L9 = "compare: functional value", q9 = 69890, d6 = 1e3, B9 = 65487, U9 = 42653, LD = "\\\\", qD = "%=", E7 = "match_member_pattern_base", X9 = 72367, S7 = "function_rest_param", BD = "/static/", G9 = 124911, Y9 = 65276, Jp = 126558, z9 = 11498, UD = 137, A7 = "export_default_declaration_decl", J9 = "cases", Kp = 126602, I7 = "jsx_child", Xe = "continue", K9 = 42962, XD = "importKind", e1 = 122, J3 = "Literal", P7 = "pattern_object_property_identifier_key", H9 = 42508, bo = "in", W9 = 55238, V9 = 67071, $9 = 70831, Q9 = 72161, Z9 = 67462, GD = "<<=", x_ = 43009, r_ = 66383, Hp = 67827, e_ = 72202, t_ = 69839, n_ = 66775, YD = "-=", Cv = 8202, u_ = 70105, i_ = 120538, zD = -92, C7 = "for_in_left_declaration", f_ = "rendersType", Wp = 126563, c_ = 70708, Vp = 126523, JD = 166, N7 = "match_", KD = 202, s_ = 110951, Ta = "component", $p = 126552, a_ = 66977, o_ = 213, O7 = "enum_member_identifier", HD = 210, j7 = "enum_bigint_body", WD = ">=", v_ = 126495, l_ = "specifiers", p_ = "=", k_ = 65338, y6 = "members", m_ = 123535, h_ = 43702, d_ = 72767, Nv = "get", y_ = 126633, Qp = 126536, __ = 94098, w_ = "types", g_ = 113663, VD = "Internal Error: Found private field in object props", D7 = "jsx_element", b_ = 70366, T_ = 110959, Zp = 120655, $D = "trailingComments", QD = 282, To = 24029, ZD = -100, xR = 144, H2 = "yield", R7 = "binding_pattern", F7 = "typeof_identifier", rR = "ENOTEMPTY", xk = 126468, E_ = 1255, S_ = 120628, M7 = "pattern_object_property_string_literal_key", A_ = 8521, eR = "leadingComments", tR = 8204, Eo = "@ ", I_ = 70319, Ea = "left", nR = 188, rk = "case", P_ = 19967, ek = 42622, C_ = 43492, N_ = 113770, L7 = "match_instance_pattern_constructor", O_ = 42774, j_ = 183, tk = 8468, q7 = "record_body", B7 = "class_implements", nk = 126579, K3 = "string", uR = 211, r2 = -48, D_ = 69926, R_ = 123213, U7 = "if_consequent_statement", F_ = 124927, H3 = "number", M_ = 126546, L_ = 68119, q_ = 70726, uk = 70750, B_ = 65489, iR = "SpreadElement", fR = "callee", cR = 193, U_ = 70492, X_ = 71934, sR = 164, G_ = 110580, Y_ = 12320, ik = "any", se = "/", X7 = "type_guard", w1 = "body", fk = 178, ge = "pattern", aR = "comment_bounds", oR = 297, G7 = "binding_type_identifier", z_ = 187, Y7 = "pattern_array_rest_element_pattern", ck = "@])", J_ = 12543, K_ = 11623, vR = "start", H_ = 67871, ae = "interface", W_ = 8449, V_ = 67637, $_ = 42961, sk = 120085, Q_ = 126463, lR = "alternate", pR = -1053382366, Z_ = 70143, kR = "--", xw = 68031, z7 = "jsx_expression", J7 = "type_identifier_reference", ak = 11647, rw = "proto", St = "identifier", ew = 43696, At = "raw", tw = 126529, nw = 11564, ok = 126557, uw = 64911, vk = 67592, iw = 43493, lk = 215, fw = 110588, _6 = 461894857, cw = 92927, sw = 67861, aw = 119980, ow = 43042, mR = -89, vw = 66965, lw = 67391, W3 = "computed", hR = "unreachable jsxtext", pw = 71167, kw = 42559, mw = 72966, dR = 180, hw = 197, pk = 64319, yR = 169, _R = "*", kk = 129, dw = 66335, w6 = "meta", yw = 43388, mk = 94178, ft = "optional", hk = "unknown", _w = 120121, ww = 123180, dk = 8469, gw = 68220, wR = "|", bw = 43187, Tw = 94207, Ew = 124895, yk = 120513, Sw = 42527, Ov = 8286, Aw = 94177, g6 = "var", K7 = "component_type_param", Iw = 66421, gR = 285, Pw = 92991, Cw = 68415, H7 = "comment", W7 = "match_pattern_array_element", jv = 244, _k = "^", Nw = 173791, bR = 136, Ow = 42890, jw = "ENOTDIR", Dw = "??", Rw = 43711, Fw = 66303, Mw = 113800, Lw = 42239, qw = 12703, V7 = "variance_opt", $7 = "+", TR = ">>>=", ER = 147, SR = 376, wk = "mixed", Bw = 65613, Uw = 73029, AR = 318, Xw = 68191, IR = "*=", gk = 8487, Gw = 8477, Q7 = "toplevel_statement_list", bk = "never", Tk = "do", So = 125, Yw = 72249, PR = "Pervasives.do_at_exit", CR = "visit_trailing_comment", Z7 = "jsx_closing_element", xu = "jsx_namespaced_name", zw = 124908, Jw = 126651, ru = "component_declaration", Kw = 15, eu = "interface_type", tu = "function_type_return_annotation", Hw = 64109, Ek = 65595, Sk = 126560, Ww = 110927, Ak = 65598, Ik = 8488, nu = "`.", NR = 175, Pk = "package", Ck = "else", Nk = 120771, Vw = 68023, OR = "fd ", Dv = 8238, Ok = 888960333, jk = 119965, $w = 42655, uu = "match_object_pattern", Qw = 11710, Zw = 119993, iu = "boolean_literal", jR = 290, fu = "statement_list", cu = "function_param", su = "match_as_pattern", au = "pattern_object_property_bigint_literal_key", Dk = 69959, xg = 120485, DR = 240, rg = 191456, ou = "declare_enum", Rk = 120597, Fk = 70281, vu = "type_annotation", lu = "spread_element", Mk = 126544, eg = 120069, en = "key", tg = 43583, ng = "out", ug = ` +`, RR = "**=", pu = "pattern_object_property_pattern", ig = "e", fg = 72712, FR = "Internal Error: Found object private prop", cg = "ENOENT", sg = -42, ku = "jsx_opening_attribute", ag = 67646, mu = "component_type", og = 64296, vg = 43887, MR = "Division_by_zero", LR = "EnumDefaultedMember", hu = "typeof_member_identifier", lg = 43792, du = "match_member_pattern_property", yu = "declare_export_declaration_decl", pg = 93026, _u = "type_annotation_hint", kg = 42887, mg = 43881, hg = 43761, Lk = 8526, qR = 287, b6 = 119, dg = 43866, yg = 72847, _g = 8348, k1 = 101, wg = 94026, qk = 72272, BR = "src/parser/flow_lexer.ml", gg = 120744, Rv = 8191, V3 = "implies", Bk = 255, Uk = 11711, wu = "match_unary_pattern_argument", bg = 71235, UR = 288, Xk = 68116, cr = 100, gu = "match_expression", bu = "enum_body", Gk = 1114111, Tu = "assignment", Tg = 71955, Yk = 43260, Eu = "pattern_array_e", Eg = 126583, XR = "prefix", Su = "class_body", T6 = "shorthand", Sg = 171, Ag = 66256, zk = -97, GR = " =", Ig = 94032, Pg = 42606, Au = "match_case", Cg = 71839, Jk = 120134, Ng = 55291, Og = 92862, jg = 43019, Dg = 126543, $3 = "function", Rg = 111355, Fg = 11389, Mg = 70753, Lg = 43249, qg = 64829, Kk = "line", Iu = "function_declaration", Hk = "undefined", YR = "([^/]+)", Bg = 110947, Ug = 70002, zR = "Cygwin", Pu = "as_expression", Xg = 12591, Wk = 64285, Gg = 2048, Yg = 73112, Vk = 126589, JR = 225, $k = 43259, zg = 72817, Qk = 64318, KR = 172, HR = 209, Cu = "match_binding_pattern", Nu = " ", Ou = "import_source", E6 = "delete", WR = "Enum `", Zk = 126553, Jg = 67001, Fv = "default", Kg = 11630, Hg = 206, ju = "enum_bigint_member", Wg = 67504, x8 = 67593, Vg = 113791, VR = "MatchObjectPatternProperty", $g = 69572, Du = "typeof_type", $R = 212, QR = "%i", Ru = "function_this_param", Qg = 72329, Ao = "0x", Mv = 8239, Zg = 75075, ZR = 57343, Fu = "pattern_bigint_literal", xb = 12341, xF = 201, Lv = "hook", rF = ": closedir failed", rb = 42959, r8 = 119970, eb = 43560, eF = "||=", Mu = "member_private_name", tb = 120570, Lu = "object_key_identifier", e8 = 223, tF = "Not_found", qu = "record_static_property", nF = 230, Bu = "jsx_element_name_member_expression", Uu = "string_literal", nb = 120596, ub = 43807, ib = 69687, fb = 63743, t8 = 72192, Xu = "member_property", cb = 43262, Gu = "class_declaration", uF = "renders*", iF = "%Li", sb = 126578, Yu = "jsx_attribute", Q3 = 254, be = "empty", S6 = "label", zu = "object_internal_slot_property_type", n8 = 120133, ab = 43359, Ge = "predicate", fF = "??=", ob = 43697, vb = -43, Ju = "default_opt", cF = "the start of a statement", lb = 67826, Ku = "record_element", Hu = "object_", Wu = "class_element", u8 = 11631, i8 = 70855, Vu = "opaque_type", $u = "number_literal", sF = ", ", f8 = 8319, c8 = 120004, s8 = 133, Qu = "type_params", Zu = "pattern_object_rest_property", W2 = "import", pb = 72e3, kb = 67413, mb = 12343, hb = 70080, xi = "intersection_type", l2 = -36, db = 70005, A6 = "properties", yb = 11679, _b = 8483, wb = 110587, aF = 43520, ri = "computed_key", oF = 207, ei = "class_identifier", gb = "Invalid number ", ti = "function_param_pattern", qv = 12288, bb = 113817, Tb = 70730, Eb = 178207, a8 = 71236, Sb = 167, ni = "object_indexer_property_type", Ab = 64286, vF = "TypeAnnotation", lF = 220, ui = "type_identifier", ii = "spread_property", fi = "jsx_attribute_value_expression", Ib = 126519, o8 = 70108, v8 = 126, l8 = 42999, Sa = "prototype", Pb = " : flags Open_text and Open_binary are not compatible", pF = "**", p8 = 43823, Cb = ": Not a directory", ci = "render_type", k8 = 72349, Z3 = "test", Nb = 43776, Ob = 92879, jb = 11263, kF = 241, Db = 93052, si = "nullable_type", Rb = 43704, Fb = 64321, mF = "Property", Mb = 72191, hF = 165, I6 = "instanceof", Lb = 69247, dF = 302, Ye = "name", m8 = 126634, qb = 8516, h8 = "typeArguments", Bb = 71127, ai = "jsx_spread_attribute", Ub = 66559, Xb = 44031, Gb = 43645, e2 = 8233, Yb = 71494, zb = "opaque", d8 = 72967, Jb = 70106, oi = "logical", yF = "@[%s =@ ", P6 = "0o", y8 = 126554, Kb = 71351, _8 = 8484, Hb = 72242, w8 = 120687, xl = 252, Wb = 183983, C6 = "%S", vi = "function_this_param_type", _F = 292, g8 = "decorators", Vb = 43255, li = "catch_clause", ze = "-", $b = 67711, wF = ": file descriptor already closed", b8 = 64311, pi = "record_declaration", T8 = 120539, Qb = "arguments", E8 = 73062, Zb = 173823, xT = 42124, rT = 72095, eT = 125259, tT = 42969, S8 = 70280, gF = 12520, nT = 69749, uT = 70066, ki = "binary", mi = "for_in_statement", iT = 43010, bF = "^=", fT = 126570, hi = "for_statement", A8 = 126584, di = "function_return_annotation", cT = 72144, sT = 8505, TF = -101, yi = "class_expression", aT = 120076, oT = 69807, vT = 40981, lT = -24976191, pT = 72768, kT = 126550, I8 = "\"", _i = "call_type_arg", EF = "f", Bv = "this", P8 = 126628, SF = "===", AF = 56320, wi = "declare_module_exports", mT = 120512, p2 = 105, hT = 119974, dT = 71450, yT = 71942, IF = 195, C8 = 120629, PF = "/=", CF = ">>", gi = "declare_interface", NF = 4096, bi = "pattern_array_rest_element", _T = 71338, N8 = 126520, Ti = "as_const_expression", OF = "Popping lex mode from empty stack", jF = "renders?", wT = 68405, Ei = "member", Si = "class_extends", Uv = 12287, O8 = 126590, gT = 66377, DF = "fields", Io = "async", Ai = "pattern_array_element", rl = 240, RF = 308, bT = 69864, Xv = "readonly", TT = 70460, ET = 120779, ST = 66378, Ii = "new_", j8 = 126551, Pi = "pattern_object_rest_property_pattern", Ci = "for_statement_init", AT = 43595, D8 = 68296, FF = 148, MF = "\0\0\0\0", IT = 120712, PT = 64217, CT = 69295, LF = "||", NT = ";", OT = 70461, jT = 66939, DT = "record", qF = "collect_comments", BF = 279, Ni = "generic_type", RT = 68295, FT = 44002, R8 = 72162, Oi = "object_call_property_type", F8 = 8305, M8 = 119995, L8 = "with", ji = "class_property", UF = "qualification", Di = "jsx_attribute_name_namespaced", Ri = "if_statement", Fi = "typeof_qualified_identifier", XF = 238, MT = 65615, GF = 176, t2 = "expression", q8 = 126559, Mi = "jsx_attribute_value", Li = "<2>", qi = "component_param", B8 = "Map.bal", N6 = 132, LT = 70412, qT = 70440, YF = "<<", U8 = "finally", zF = "v", Bi = "syntax_opt", Ui = "meta_property", BT = 12447, UT = 67514, X8 = 12448, Xi = "object_mapped_type_property", Gv = "operator", JF = "closedir", Gi = "unary_expression", XT = 126588, GT = 70851, Yi = "export_batch_specifier", el = "renders", KF = 226, YT = 73111, HF = 221, rx = "", zT = 66927, JT = 64967, KT = "elements", HT = 67640, WT = 43754, zi = "declare_export_declaration", G8 = -26065557, VT = 65855, O6 = "boolean", Aa = "typeof", $T = 124902, WF = 139, QT = 65629, VF = 224, ZT = 43123, Y8 = 70449, xE = 12735, Te = 107, z8 = 11719, $F = "!=", Ji = "call_type_args", tl = "asserts", Po = -46, rE = "namespace", Ki = "match_pattern", Hi = "for_of_statement_lhs", J8 = 126504, eE = 69505, K8 = "for", tE = 72703, H8 = 120127, W8 = 43471, nE = 93047, QF = "Undefined_recursive_module", ZF = 2147483647, Wi = "template_literal_element", xM = "Unexpected ", uE = 101631, iE = 65497, V8 = 68120, Vi = "import_default_specifier", tn = "array", rM = "expressions", fE = 110930, eM = 204, $i = "while_", Qi = "function_rest_param_type", Co = 63, cE = 77808, tM = "Unexpected token `", k2 = 114, Zi = "pattern_object_p", sE = 65140, aE = 123190, xf = "pattern_object_property_number_literal_key", j6 = "enum", rf = "conditional_type", ef = 113, tf = "array_type", nM = "minus", oE = 43790, nf = "do_while", vE = 11567, lE = 11694, D6 = 256, pE = 119976, uf = "component_body", nn = 111, kE = 177976, $8 = 67644, mE = 73439, R6 = 951901561, uM = "?", iM = ")", Q8 = 43867, Z8 = 65575, hE = 69445, fM = "FunctionTypeParam", xm = 119996, dE = 65019, ff = "conditional", yE = 11505, cM = 135, _E = 71295, wE = 12799, gE = 67382, cf = "type_guard_annotation", sf = "object_key_computed", un = 123, af = "pattern_object_property_key", bE = 119892, TE = 67505, EE = 66962, of = "with_", SE = 43273, vf = "interface_declaration", rm = "bool", AE = 71945, IE = "declaration", PE = 11519, F6 = ">", CE = 66771, em = "}", sM = 8472, NE = 43014, lf = "declare_function", Gr = 127, OE = "RestElement", jE = 190, DE = 8467, aM = "module", tm = 126522, oM = "Sys_blocked_io", pf = "jsx_opening_element", kf = "object_key_number_literal", mf = "match_instance_pattern", vM = "|=", lM = "mixins", RE = 205, pM = 217, nm = "if", kM = "+=", hf = "match_object_pattern_property_key", df = "match_rest_pattern", yf = "export_named_declaration_specifier", um = "try", im = "_bigarr02", FE = 70479, fn = "right", ME = 245, LE = 11718, _f = "tuple_labeled_element", mM = "TypeParameterInstantiation", qE = "mkdir", BE = 71999, UE = 870530776, hM = "@[", dM = -908856609, yM = 331416730, XE = 11670, GE = 66735, YE = 43709, fm = 43642, zE = 67002, JE = 69375, wf = "function_body_any", KE = 119807, _M = "Assert_failure", gf = "function_identifier", HE = 65479, M6 = 131, Yv = "new", bf = "for_of_left_declaration", WE = 120084, VE = 100343, $E = 73030, cm = 70452, sm = 134, QE = 253, ZE = 42954, wM = 227, Tf = "jsx_member_expression_object", Ef = "class_property_value", xS = 120144, gM = 314, rS = 66994, nl = "set", eS = 126498, Sf = "tuple_element", Af = "arg_list", tS = 65481, nS = 8511, uS = 42964, iS = 11492, am = 126555, fS = 71039, cS = "exportKind", If = "program", sS = 70187, bM = 173, It = "as", zv = 124, TM = "visit_leading_comment", aS = 110575, Pf = "class_", oS = 72440, vS = 67897, EM = 235, lS = 8543, SM = 141, Cf = 120, Nf = "match_object_pattern_property", L6 = 1024, pS = 101640, AM = 1027, IM = 236, ul = 246, PM = "(", kS = 66511, Of = "regexp_literal", mS = 65574, hS = 43513, dS = 43695, CM = "&&", om = 11558, yS = 66503, _S = 93071, jf = "pattern_expression", wS = 65381, vm = 126538, gS = 12292, Df = "import_namespace_specifier", bS = 67583, TS = 120137, ES = 69622, SS = 120770, AS = 71131, Jv = 8287, IS = 110590, PS = 65135, CS = "Fatal error: exception ", q6 = 118, NS = 181, lm = 11687, m2 = "camlinternalFormat.ml", OS = 72959, jS = 249, Rf = "union_type", NM = 8206, DS = 73064, RS = 70271, FS = 92728, pm = 65344, km = 11695, Ff = "class_decorator", OM = "the end of an expression statement (`;`)", MS = 177983, LS = 8457, jM = 931, qS = 66499, BS = 94175, DM = "#", US = "Identifier", Mf = "for_in_statement_lhs", Lf = "pattern_string_literal", mm = 70302, hm = 126496, XS = 66461, GS = 82943, dm = 8450, YS = 72271, zS = 70853, JS = "of", RM = "Stack_overflow", B6 = "hasUnknownMembers", U6 = "a", qf = "variable_declarator_pattern", KS = 73061, HS = 77711, ym = 64317, WS = 73097, FM = 269, Bf = "enum_declaration", VS = 66966, $S = 189, QS = 119964, Uf = "type_param", cn = 782176664, _m = 65535, MM = -10, ZS = 64433, wm = 43815, gm = 94031, bm = 73065, xA = 69958, LM = 145, Tm = "property", Xf = "jsx_children", Gf = "member_property_identifier", rA = 42537, No = "const", eA = 70278, Yf = "enum_string_member", X6 = "local", zf = "jsx_element_name_identifier", tA = 68223, Em = "", nA = 119967, Sm = 119994, uA = 66993, Jf = "jsx_member_expression_identifier", Am = "explicitType", iA = 67589, fA = 65597, cA = "exported", sA = 94111, aA = 113775, Kf = "object_spread_property_type", oA = 64847, Hf = "component_identifier", Wf = "class_implements_interface", qM = 162, BM = 243, vA = 12783, UM = `Fatal error: exception %s +`, Im = 120093, G6 = "column", Vf = "component_rest_param", XM = "methods", lA = 70451, pA = 70312, kA = 69967, Pm = 70279, mA = 66463, hA = 92975, Cm = 70286, $f = "pattern_object_property_computed_key", Qf = "object_key_string_literal", dA = "jsError", Zf = "type_args", yA = 8304, GM = "==", wr = 115, xc = "declare_component", _A = 120092, wA = 43638, gA = 66811, Ia = -87, bA = 43334, TA = 66863, EA = 77823, YM = 143, rc = "optional_call", SA = 126562, Nm = 70162, ec = 104, zM = "static ", AA = 66963, Kv = "await", Om = 70107, V2 = "0", IA = 72250, PA = 8507, CA = 100351, jm = "AssignmentPattern", tc = "type", JM = "%u", NA = "NonNullExpression", nc = "function_expression_or_method", OA = 43470, KM = 146, HM = 242, WM = "camlinternalMod.ml", uc = "match_or_pattern", jA = 72750, DA = 69414, RA = 65370, ic = "syntax", VM = 32752, FA = 42963, $M = "End_of_file", MA = 12294, LA = 8471, QM = "elementType", qA = 43782, ZM = "++", BA = 43641, UA = 71944, fc = "record_property", XA = 126601, GA = 78894, xL = -45, Hv = "null", rL = 177, eL = "satisfies", YA = 131071, cc = "import_specifier", sc = "class_method", ac = "type_", zA = 126514, JA = 8454, tL = "inexact", KA = 67807, HA = 8525, WA = 65470, VA = 71352, oc = "tuple_spread_element", nL = 219, $A = "abstract", QA = 73458, Je = "return", Y6 = 65536, Dm = 126548, vc = "array_element", ZA = -253313196, xI = 186, Rm = "catch", lc = "infer_type", rI = 12295, uL = "Invalid legacy octal ", eI = 69762, tI = 43311, nI = 65437, pc = "variable_declaration", iL = -696510241, kc = "function_params", uI = 64316, fL = 311, Fm = 11565, cL = "infinity", iI = "@]", fI = 65908, mc = "extends", cI = 66204, sI = 43784, aI = 11742, Mm = 126503, Ke = "debugger", oI = 70457, z6 = 912068366, vI = 68786, Lm = "keyof", qm = 69415, lI = 12686, sn = 127343600, hc = "declare_type_alias", sL = "the", aL = 233, dc = "jsx_element_name_namespaced", pI = 72283, kI = 161, yc = "class_static_block", _c = "function_param_type", Pt = 128, mI = -673950933, Bm = 126591, oL = "Sys_error", hI = 74649, dI = 74862, J6 = "is", yI = 43738, _I = 68479, vL = 196, Um = 70854, wc = "enum_boolean_member", Xm = 72163, wI = 92783, lL = 281, gc = "component_param_name", gI = 68863, an = 32768, pL = 2048, bI = 64284, kL = "@{", TI = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", Gm = 8455, bc = "update_expression", mL = 276, EI = 65500, K6 = "from", SI = 68447, Ym = 12592, AI = 92766, hL = ">>=", n2 = 110, II = 66431, PI = 43586, Tc = "jsx_identifier", CI = " : file already exists", R1 = 128, NI = 71958, OI = 66717, Ec = "enum_boolean_body", jI = 64262, Yr = "id", Sc = "component_renders_annotation", DI = 42888, RI = 8584, FI = 73008, Ac = "enum_symbol_body", Ic = "declare_namespace", zm = 72713, MI = 55215, Pc = "object_property_value_type", Cc = "match_wildcard_pattern", Nc = "for_in_assignment_pattern", Jm = 8485, LI = 43395, qI = 229, Pa = "true", BI = 43743, Oc = "enum_number_member", dL = 234, UI = 72969, yL = "expected *", Ee = 102, _L = 200, H6 = "symbol", Wv = "source", jc = "tparam_const_modifier", XI = 43714, Dc = "jsx_fragment", Rc = "jsx_attribute_name_identifier", W6 = "public", GI = 43442, Fc = "pattern_object_property", YI = 65786, zI = 70783, JI = 43713, KI = 72160, wL = "*-/", Mc = "export_named_specifier", Lc = "arrow_function", HI = 122623, Km = 70006, gL = "${", WI = 43814, qc = "generic_qualified_identifier_type", VI = 199, Bc = "jsx_spread_child", Hm = 8489, Wm = 184, bL = 2047, $I = 66955, Uc = "try_catch", QI = 70497, TL = 313, EL = 237, ZI = 67431, xP = 125183, SL = -602162310, on = "params", rP = "consequent", eP = 68029, tP = 67829, nP = 68095, Xc = "enum_string_body", uP = 93823, iP = 68351, fP = 65495, Gc = "declare_module", Yc = "match_as_pattern_target", zc = "body_expression", cP = 66175, sP = 191, Vm = 70441, $m = 65141, Qm = "&", Jc = "super_expression", Zm = 126564, aP = 72105, He = "throw", oP = 68287, vP = 67839, Ca = 116, lP = 110882, pP = 69404, kP = 123197, Vv = 65279, il = "src/parser/type_parser.ml", mP = 68115, xh = 126547, rh = 126556, hP = 73055, Kc = "member_property_expression", Hc = "enum_defaulted_member", dP = 43071, yP = 11726, Wc = "component_type_rest_param", _P = 68607, Vc = "object_key", AL = 160, $2 = "variance", wP = 70655, gP = 70414, fl = "super", bP = 123583, TP = 65594, V6 = "method", EP = 73648, $6 = 121, SP = 93951, $c = "pattern_array_element_pattern", AP = 43764, IP = 42993, eh = 120145, PP = 74879, IL = 168, th = 8486, CP = 72001, Qc = "tagged_template", Zc = "module_ref_literal", NP = 65312, Oo = "implements", OP = 43700, jP = 120003, PL = "Invalid_argument", xs = 16777215, DP = 83526, nh = 69744, uh = 12336, rs = "switch_case", CL = -61, es = "optional_member", RP = 64274, ih = 64322, fh = 126530, FP = 71998, ch = 72970, MP = 13311, LP = 73647, qP = 120074, cl = "let", NL = "global", ts = "expression_statement", ns = "component_type_params", BP = 512, UP = 69634, XP = 67461, GP = 123627, YP = 64913, OL = "children", jL = "PropertyDefinition", DL = 1026, RL = "%li", us = "declare_class", zP = 43258, is = "indexed_access_type", JP = 124926, h2 = 112, KP = "b", fs = "predicate_expression", cs = "if_alternate_statement", Q6 = "private", FL = -594953737, ML = 140, HP = "nan", WP = 72103, sh = 11735, ss = "statement", VP = "rmdir", ah = 66512, $P = "match", QP = 198, ZP = 11734, as = "import_named_specifier", xC = 69599, rC = 68799, eC = 194559, os = "match_array_pattern", LL = 174, vs = "function_", ls = "bigint_literal", t1 = 248, oh = 67638, vh = 126539, tC = 11557, qL = 214, nC = 5760, We = "break", vn = "block", ps = "match_member_pattern", uC = 123565, iC = 66815, m1 = "value", BL = 1039100673, fC = 69746, cC = 70448, sC = 74751, ks = "init", aC = 69551, lh = 65548, ms = "jsx_member_expression", ph = 68096, d2 = 108, kh = 126521, oC = 71487, hs = "match_statement", vC = 178205, lC = 12548, UL = " : is a directory", ln = ".", pC = 12348, sl = -835925911, B2 = "typeParameters", kC = 66855, Y1 = "typeAnnotation", $v = "bigint", ds = "jsx_attribute_value_literal", mh = 194, XL = "T_JSX_TEXT", mC = 68466, hh = 126537, GL = 67714067, hC = 69487, dh = "export", dC = 43822, yh = 126499, yC = 55242, ys = "member_type_identifier", YL = 138, _C = 71679, Qv = 130, wC = 12438, gC = 119969, zL = 298, _h = 12539, bC = 119972, JL = ",", TC = 71423, EC = "index out of bounds", Ct = 106, al = "%d", KL = "T_RENDERS_QUESTION", wh = 120571, gh = "returnType", SC = 69423, bh = 120070, HL = "%", Z6 = 117, AC = 179, IC = "EBADF", PC = 93759, Th = 64325, _s = "component_params", CC = 66517, NC = 67423, OC = 605857695, jC = 43518, WL = 251, ws = "for_of_statement", DC = 71983, VL = "~", RC = 12442, Ve = "switch", FC = 66207, Eh = 126535, $L = "&&=", MC = 69289, LC = 71723, gs = "generic_identifier_type", qC = 126619, bs = "object_type_property_setter", BC = 70418, QL = "<=", UC = 125251, XC = 11702, Ts = "enum_number_body", ol = 250, GC = 124910, YC = 69297, zC = 67455, JC = 42511, Es = "ts_satisfies", ZL = 268, KC = 68324, Sh = "an identifier", HC = 126534, Ss = 103, WC = 120126, jo = 449540197, x4 = "declare", VC = 68899, $C = 126502, As = "function_expression", xq = 142, QC = 123135, ZC = 67967, xN = 120487, rN = 120686, Is = "export_named_declaration", eN = 66348, Ah = 119981, tN = 12352, Ps = "tuple_type", nN = 68680, Ih = "target", Cs = "call"; + function Ez(x, r, e, t, u) { + if (t <= r) for (var i = 1; i <= u; i++) e[t + i] = x[r + i]; + else for (var i = u; i >= 1; i--) e[t + i] = x[r + i]; + return 0; + } + function Sz(x) { + for (var r = [0]; x !== 0;) { + for (var e = x[1], t = 1; t < e.length; t++) r.push(e[t]); + x = x[2]; + } + return r; + } + function Az(x, r, e) { + var t = new Array(e + 1); + t[0] = 0; + for (var u = 1, i = r + 1; u <= e; u++, i++) t[u] = x[i]; + return t; + } + function Ph(x, r, e) { + return x[1] === r ? (x[1] = e, 1) : 0; + } + function Iz(x, r) { + var e = x[1]; + return x[1] += r, e; + } + function vl(x) { + return x[1]; + } + function rq(x) { + var r = a0.process; + if (r && r.env && r.env[x] != null) return r.env[x]; + if (a0.jsoo_static_env && a0.jsoo_static_env[x]) return a0.jsoo_static_env[x]; + } + var uN = 0; + (function() { + var x = rq("OCAMLRUNPARAM"); + if (x !== void 0) for (var r = x.split(JL), e = 0; e < r.length; e++) if (r[e] == KP) { + uN = 1; + break; + } else if (r[e].startsWith("b=")) uN = +r[e].slice(2); + else continue; + })(); + var Q2 = [0]; + function Pz(x, r) { + return (!x.js_error || r || x[0] == t1) && (x.js_error = new a0.Error("Js exception containing backtrace")), x; + } + function J0(x, r) { + return uN ? Pz(x, r) : x; + } + function Cz(x, r) { + throw J0([ + 0, + x, + r + ]); + } + function iN(x, r) { + Cz(x, r); + } + function u2(x) { + iN(Q2.Invalid_argument, x); + } + function eq(x) { + switch (x) { + case 7: + case 10: + case 11: return 2; + default: return 1; + } + } + function tq(x, r) { + var e; + switch (x) { + case 0: + e = Float32Array; + break; + case 1: + e = Float64Array; + break; + case 2: + e = Int8Array; + break; + case 3: + e = Uint8Array; + break; + case 4: + e = Int16Array; + break; + case 5: + e = Uint16Array; + break; + case 6: + e = Int32Array; + break; + case 7: + e = Int32Array; + break; + case 8: + e = Int32Array; + break; + case 9: + e = Int32Array; + break; + case 10: + e = Float32Array; + break; + case 11: + e = Float64Array; + break; + case 12: + e = Uint8Array; + break; + } + e || u2("Bigarray.create: unsupported kind"); + return new e(r * eq(x)); + } + function Ch(x) { + for (var r = x.length, e = 1, t = 0; t < r; t++) x[t] < 0 && u2("Bigarray.create: negative dimension"), e = e * x[t]; + return e; + } + var nq = Math.pow(2, -24); + function uq(x) { + throw x; + } + function iq() { + uq(Q2.Division_by_zero); + } + function sr(x, r, e) { + this.lo = x & xs, this.mi = r & xs, this.hi = e & rn; + } + sr.prototype.caml_custom = "_j", sr.prototype.copy = function() { + return new sr(this.lo, this.mi, this.hi); + }, sr.prototype.ucompare = function(x) { + return this.hi > x.hi ? 1 : this.hi < x.hi ? -1 : this.mi > x.mi ? 1 : this.mi < x.mi ? -1 : this.lo > x.lo ? 1 : this.lo < x.lo ? -1 : 0; + }, sr.prototype.compare = function(x) { + var r = this.hi << 16, e = x.hi << 16; + return r > e ? 1 : r < e ? -1 : this.mi > x.mi ? 1 : this.mi < x.mi ? -1 : this.lo > x.lo ? 1 : this.lo < x.lo ? -1 : 0; + }, sr.prototype.neg = function() { + var x = -this.lo, r = -this.mi + (x >> 24); + return new sr(x, r, -this.hi + (r >> 24)); + }, sr.prototype.add = function(x) { + var r = this.lo + x.lo, e = this.mi + x.mi + (r >> 24); + return new sr(r, e, this.hi + x.hi + (e >> 24)); + }, sr.prototype.sub = function(x) { + var r = this.lo - x.lo, e = this.mi - x.mi + (r >> 24); + return new sr(r, e, this.hi - x.hi + (e >> 24)); + }, sr.prototype.mul = function(x) { + var r = this.lo * x.lo, e = (r * nq | 0) + this.mi * x.lo + this.lo * x.mi; + return new sr(r, e, (e * nq | 0) + this.hi * x.lo + this.mi * x.mi + this.lo * x.hi); + }, sr.prototype.isZero = function() { + return (this.lo | this.mi | this.hi) == 0; + }, sr.prototype.isNeg = function() { + return this.hi << 16 < 0; + }, sr.prototype.and = function(x) { + return new sr(this.lo & x.lo, this.mi & x.mi, this.hi & x.hi); + }, sr.prototype.or = function(x) { + return new sr(this.lo | x.lo, this.mi | x.mi, this.hi | x.hi); + }, sr.prototype.xor = function(x) { + return new sr(this.lo ^ x.lo, this.mi ^ x.mi, this.hi ^ x.hi); + }, sr.prototype.shift_left = function(x) { + return x = x & 63, x == 0 ? this : x < 24 ? new sr(this.lo << x, this.mi << x | this.lo >> 24 - x, this.hi << x | this.mi >> 24 - x) : x < 48 ? new sr(0, this.lo << x - 24, this.mi << x - 24 | this.lo >> 48 - x) : new sr(0, 0, this.lo << x - 48); + }, sr.prototype.shift_right_unsigned = function(x) { + return x = x & 63, x == 0 ? this : x < 24 ? new sr(this.lo >> x | this.mi << 24 - x, this.mi >> x | this.hi << 24 - x, this.hi >> x) : x < 48 ? new sr(this.mi >> x - 24 | this.hi << 48 - x, this.hi >> x - 24, 0) : new sr(this.hi >> x - 48, 0, 0); + }, sr.prototype.shift_right = function(x) { + if (x = x & 63, x == 0) return this; + var r = this.hi << 16 >> 16; + if (x < 24) return new sr(this.lo >> x | this.mi << 24 - x, this.mi >> x | r << 24 - x, this.hi << 16 >> x >>> 16); + var e = this.hi << 16 >> 31; + return x < 48 ? new sr(this.mi >> x - 24 | this.hi << 48 - x, this.hi << 16 >> x - 24 >> 16, e & rn) : new sr(this.hi << 16 >> x - 32, e, e); + }, sr.prototype.lsl1 = function() { + this.hi = this.hi << 1 | this.mi >> 23, this.mi = (this.mi << 1 | this.lo >> 23) & xs, this.lo = this.lo << 1 & xs; + }, sr.prototype.lsr1 = function() { + this.lo = (this.lo >>> 1 | this.mi << 23) & xs, this.mi = (this.mi >>> 1 | this.hi << 23) & xs, this.hi = this.hi >>> 1; + }, sr.prototype.udivmod = function(x) { + for (var r = 0, e = this.copy(), t = x.copy(), u = new sr(0, 0, 0); e.ucompare(t) > 0;) r++, t.lsl1(); + for (; r >= 0;) r--, u.lsl1(), e.ucompare(t) >= 0 && (u.lo++, e = e.sub(t)), t.lsr1(); + return { + quotient: u, + modulus: e + }; + }, sr.prototype.div = function(x) { + var r = this; + x.isZero() && iq(); + var e = r.hi ^ x.hi; + r.hi & an && (r = r.neg()), x.hi & an && (x = x.neg()); + var t = r.udivmod(x).quotient; + return e & an && (t = t.neg()), t; + }, sr.prototype.mod = function(x) { + var r = this; + x.isZero() && iq(); + var e = r.hi; + r.hi & an && (r = r.neg()), x.hi & an && (x = x.neg()); + var t = r.udivmod(x).modulus; + return e & an && (t = t.neg()), t; + }, sr.prototype.toInt = function() { + return this.lo | this.mi << 24; + }, sr.prototype.toFloat = function() { + return (this.hi << 16) * Math.pow(2, 32) + this.mi * Math.pow(2, 24) + this.lo; + }, sr.prototype.toArray = function() { + return [ + this.hi >> 8, + this.hi & ya, + this.mi >> 16, + this.mi >> 8 & ya, + this.mi & ya, + this.lo >> 16, + this.lo >> 8 & ya, + this.lo & ya + ]; + }, sr.prototype.lo32 = function() { + return this.lo | (this.mi & ya) << 24; + }, sr.prototype.hi32 = function() { + return this.mi >>> 8 & rn | this.hi << 16; + }; + function Nz(x, r) { + return new sr(x & xs, x >>> 24 & ya | (r & rn) << 8, r >>> 16 & rn); + } + function fN(x) { + return x.hi32(); + } + function cN(x) { + return x.lo32(); + } + function r4() { + u2(EC); + } + var Oz = im; + function Do(x, r, e, t) { + this.kind = x, this.layout = r, this.dims = e, this.data = t; + } + Do.prototype.caml_custom = Oz, Do.prototype.offset = function(x) { + var r = 0; + if (typeof x == "number" && (x = [x]), x instanceof Array || u2("bigarray.js: invalid offset"), this.dims.length != x.length && u2("Bigarray.get/set: bad number of dimensions"), this.layout == 0) for (var e = 0; e < this.dims.length; e++) (x[e] < 0 || x[e] >= this.dims[e]) && r4(), r = r * this.dims[e] + x[e]; + else for (var e = this.dims.length - 1; e >= 0; e--) (x[e] < 1 || x[e] > this.dims[e]) && r4(), r = r * this.dims[e] + (x[e] - 1); + return r; + }, Do.prototype.get = function(x) { + switch (this.kind) { + case 7: + var r = this.data[x * 2 + 0], e = this.data[x * 2 + 1]; + return Nz(r, e); + case 10: + case 11: return [ + Q3, + this.data[x * 2 + 0], + this.data[x * 2 + 1] + ]; + default: return this.data[x]; + } + }, Do.prototype.set = function(x, r) { + switch (this.kind) { + case 7: + this.data[x * 2 + 0] = cN(r), this.data[x * 2 + 1] = fN(r); + break; + case 10: + case 11: + this.data[x * 2 + 0] = r[1], this.data[x * 2 + 1] = r[2]; + break; + default: + this.data[x] = r; + break; + } + return 0; + }, Do.prototype.fill = function(x) { + switch (this.kind) { + case 7: + var r = cN(x), e = fN(x); + if (r == e) this.data.fill(r); + else for (var t = 0; t < this.data.length; t++) this.data[t] = t % 2 == 0 ? r : e; + break; + case 10: + case 11: + var u = x[1], i = x[2]; + if (u == i) this.data.fill(u); + else for (var t = 0; t < this.data.length; t++) this.data[t] = t % 2 == 0 ? u : i; + break; + default: + this.data.fill(x); + break; + } + }, Do.prototype.compare = function(x, r) { + if (this.layout != x.layout || this.kind != x.kind) { + var e = this.kind | this.layout << 8; + return (x.kind | x.layout << 8) - e; + } + if (this.dims.length != x.dims.length) return x.dims.length - this.dims.length; + for (var u = 0; u < this.dims.length; u++) if (this.dims[u] != x.dims[u]) return this.dims[u] < x.dims[u] ? -1 : 1; + switch (this.kind) { + case 0: + case 1: + case 10: + case 11: + for (var i, c, u = 0; u < this.data.length; u++) { + if (i = this.data[u], c = x.data[u], i < c) return -1; + if (i > c) return 1; + if (i != c) { + if (!r) return NaN; + if (i == i) return 1; + if (c == c) return -1; + } + } + break; + case 7: + for (var u = 0; u < this.data.length; u += 2) { + if (this.data[u + 1] < x.data[u + 1]) return -1; + if (this.data[u + 1] > x.data[u + 1]) return 1; + if (this.data[u] >>> 0 < x.data[u] >>> 0) return -1; + if (this.data[u] >>> 0 > x.data[u] >>> 0) return 1; + } + break; + case 2: + case 3: + case 4: + case 5: + case 6: + case 8: + case 9: + case 12: + for (var u = 0; u < this.data.length; u++) { + if (this.data[u] < x.data[u]) return -1; + if (this.data[u] > x.data[u]) return 1; + } + break; + } + return 0; + }; + function ll(x, r, e, t) { + this.kind = x, this.layout = r, this.dims = e, this.data = t; + } + ll.prototype = new Do(), ll.prototype.offset = function(x) { + return typeof x != "number" && (x instanceof Array && x.length == 1 ? x = x[0] : u2("Ml_Bigarray_c_1_1.offset")), (x < 0 || x >= this.dims[0]) && r4(), x; + }, ll.prototype.get = function(x) { + return this.data[x]; + }, ll.prototype.set = function(x, r) { + return this.data[x] = r, 0; + }, ll.prototype.fill = function(x) { + return this.data.fill(x), 0; + }; + function sN(x, r, e, t) { + var u = eq(x); + return Ch(e) * u != t.length && u2("length doesn't match dims"), r == 0 && e.length == 1 && u == 1 ? new ll(x, r, e, t) : new Do(x, r, e, t); + } + function fq(x) { + return x.slice(1); + } + function jz(x, r, e) { + var t = fq(e); + return sN(x, r, t, tq(x, Ch(t))); + } + function e4(x, r, e) { + return x.set(x.offset(r), e), 0; + } + function t4(x, r, e) { + var t = String.fromCharCode; + if (r == 0 && e <= NF && e == x.length) return t.apply(null, x); + for (var u = rx; 0 < e; r += L6, e -= L6) u += t.apply(null, x.slice(r, r + Math.min(e, L6))); + return u; + } + function Nh(x) { + for (var r = new Uint8Array(x.l), e = x.c, t = e.length, u = 0; u < t; u++) r[u] = e.charCodeAt(u); + for (t = x.l; u < t; u++) r[u] = 0; + return x.c = r, x.t = 4, r; + } + function Na(x, r, e, t, u) { + if (u == 0) return 0; + if (t == 0 && (u >= e.l || e.t == 2 && u >= e.c.length)) e.c = x.t == 4 ? t4(x.c, r, u) : r == 0 && x.c.length == u ? x.c : x.c.substr(r, u), e.t = e.c.length == e.l ? 0 : 2; + else if (e.t == 2 && t == e.c.length) e.c += x.t == 4 ? t4(x.c, r, u) : r == 0 && x.c.length == u ? x.c : x.c.substr(r, u), e.t = e.c.length == e.l ? 0 : 2; + else { + e.t != 4 && Nh(e); + var i = x.c, c = e.c; + if (x.t == 4) if (t <= r) for (var v = 0; v < u; v++) c[t + v] = i[r + v]; + else for (var v = u - 1; v >= 0; v--) c[t + v] = i[r + v]; + else { + for (var o = Math.min(u, i.length - r), v = 0; v < o; v++) c[t + v] = i.charCodeAt(r + v); + for (; v < u; v++) c[t + v] = 0; + } + } + return 0; + } + function pl(x, r) { + if (x == 0) return rx; + if (r.repeat) return r.repeat(x); + for (var e = rx, t = 0;;) { + if (x & 1 && (e += r), x >>= 1, x == 0) return e; + r += r, t++, t == 9 && r.slice(0, 1); + } + } + function Oh(x) { + x.t == 2 ? x.c += pl(x.l - x.c.length, "\0") : x.c = t4(x.c, 0, x.c.length), x.t = 0; + } + function aN(x) { + if (x.length < 24) { + for (var r = 0; r < x.length; r++) if (x.charCodeAt(r) > Gr) return !1; + return !0; + } else return !/[^\x00-\x7f]/.test(x); + } + function cq(x) { + for (var r = rx, e = rx, t, u, i, c, v = 0, o = x.length; v < o; v++) { + if (u = x.charCodeAt(v), u < Pt) { + for (var l = v + 1; l < o && (u = x.charCodeAt(l)) < Pt; l++); + if (l - v > BP ? (e.substr(0, 1), r += e, e = rx, r += x.slice(v, l)) : e += x.slice(v, l), l == o) break; + v = l; + } + c = 1, ++v < o && ((i = x.charCodeAt(v)) & -64) == R1 && (t = i + (u << 6), u < VF ? (c = t - 12416, c < Pt && (c = 1)) : (c = 2, ++v < o && ((i = x.charCodeAt(v)) & -64) == R1 && (t = i + (t << 6), u < DR ? (c = t - 925824, (c < pL || c >= 55295 && c < 57344) && (c = 2)) : (c = 3, ++v < o && ((i = x.charCodeAt(v)) & -64) == R1 && u < 245 && (c = i - 63447168 + (t << 6), (c < 65536 || c > 1114111) && (c = 3)))))), c < 4 ? (v -= c, e += "�") : c > rn ? e += String.fromCharCode(55232 + (c >> 10), AF + (c & 1023)) : e += String.fromCharCode(c), e.length > L6 && (e.substr(0, 1), r += e, e = rx); + } + return r + e; + } + function Oa(x, r, e) { + this.t = x, this.c = r, this.l = e; + } + Oa.prototype.toString = function() { + switch (this.t) { + case 9: return this.c; + default: Oh(this); + case 0: + if (aN(this.c)) return this.t = 9, this.c; + this.t = 8; + case 8: return this.c; + } + }, Oa.prototype.toUtf16 = function() { + var x = this.toString(); + return this.t == 9 ? x : cq(x); + }, Oa.prototype.slice = function() { + var x = this.t == 4 ? this.c.slice() : this.c; + return new Oa(this.t, x, this.l); + }; + function sq(x) { + return new Oa(0, x, x.length); + } + function Nt(x) { + return sq(x); + } + function Ns(x, r, e, t, u) { + return Na(Nt(x), r, e, t, u), 0; + } + function kl(x) { + return new sr(x[7] << 0 | x[6] << 8 | x[5] << 16, x[4] << 0 | x[3] << 8 | x[2] << 16, x[1] << 0 | x[0] << 8); + } + function oe(x, r) { + switch (x.t & 6) { + default: if (r >= x.c.length) return 0; + case 0: return x.c.charCodeAt(r); + case 4: return x.c[r]; + } + } + function oN() { + u2(EC); + } + function Dz(x, r) { + r >>> 0 >= x.l - 7 && oN(); + for (var e = new Array(8), t = 0; t < 8; t++) e[7 - t] = oe(x, r + t); + return kl(e); + } + function zr(x, r, e) { + if (e &= ya, x.t != 4) { + if (r == x.c.length) return x.c += String.fromCharCode(e), r + 1 == x.l && (x.t = 0), 0; + Nh(x); + } + return x.c[r] = e, 0; + } + function ja(x, r, e) { + return r >>> 0 >= x.l && oN(), zr(x, r, e); + } + function ml(x) { + return x.toArray(); + } + function Rz(x, r, e) { + r >>> 0 >= x.l - 7 && oN(); + for (var t = ml(e), u = 0; u < 8; u++) zr(x, r + 7 - u, t[u]); + return 0; + } + function Os(x, r) { + var e = x.l >= 0 ? x.l : x.l = x.length, t = r.length, u = e - t; + if (u == 0) return x.apply(null, r); + if (u < 0) { + var i = x.apply(null, r.slice(0, e)); + return typeof i != "function" ? i : Os(i, r.slice(e)); + } else { + switch (u) { + case 1: + var i = function(o) { + for (var l = new Array(t + 1), k = 0; k < t; k++) l[k] = r[k]; + return l[t] = o, x.apply(null, l); + }; + break; + case 2: + var i = function(o, l) { + for (var k = new Array(t + 2), h = 0; h < t; h++) k[h] = r[h]; + return k[t] = o, k[t + 1] = l, x.apply(null, k); + }; + break; + default: var i = function() { + for (var v = arguments.length == 0 ? 1 : arguments.length, o = new Array(r.length + v), l = 0; l < r.length; l++) o[l] = r[l]; + for (var l = 0; l < arguments.length; l++) o[r.length + l] = arguments[l]; + return Os(x, o); + }; + } + return i.l = u, i; + } + } + function S1(x, r) { + return r >>> 0 >= x.length - 1 && r4(), x; + } + function Fz(x) { + return isFinite(x) ? Math.abs(x) >= 22250738585072014e-324 ? 0 : x != 0 ? 1 : 2 : isNaN(x) ? 4 : 3; + } + function Mz(x) { + return x == ME ? 1 : 0; + } + var Lz = Math.log2 && Math.log2(11235582092889474e291) == 1020; + function qz(x) { + if (Lz) return Math.floor(Math.log2(x)); + var r = 0; + if (x == 0) return -Infinity; + if (x >= 1) for (; x >= 2;) x /= 2, r++; + else for (; x < 1;) x *= 2, r--; + return r; + } + function vN(x) { + var r = /* @__PURE__ */ new Float32Array(1); + r[0] = x; + return new Int32Array(r.buffer)[0] | 0; + } + function ct(x, r, e) { + return new sr(x, r, e); + } + function jh(x) { + if (!isFinite(x)) return isNaN(x) ? ct(1, 0, VM) : x > 0 ? ct(0, 0, VM) : ct(0, 0, 65520); + var r = x == 0 && 1 / x == -Infinity ? an : x >= 0 ? 0 : an; + r && (x = -x); + var e = qz(x) + 1023; + e <= 0 ? (e = 0, x /= Math.pow(2, -DL)) : (x /= Math.pow(2, e - AM), x < 16 && (x *= 2, e -= 1), e == 0 && (x /= 2)); + var t = Math.pow(2, 24), u = x | 0; + x = (x - u) * t; + var i = x | 0; + x = (x - i) * t; + var c = x | 0; + return u = u & Kw | r | e << 4, ct(c, i, u); + } + function aq(x, r, e) { + if (x.write(32, r.dims.length), x.write(32, r.kind | r.layout << 8), r.caml_custom == im) for (var t = 0; t < r.dims.length; t++) r.dims[t] < rn ? x.write(16, r.dims[t]) : (x.write(16, rn), x.write(32, 0), x.write(32, r.dims[t])); + else for (var t = 0; t < r.dims.length; t++) x.write(32, r.dims[t]); + switch (r.kind) { + case 2: + case 3: + case 12: + for (var t = 0; t < r.data.length; t++) x.write(8, r.data[t]); + break; + case 4: + case 5: + for (var t = 0; t < r.data.length; t++) x.write(16, r.data[t]); + break; + case 6: + for (var t = 0; t < r.data.length; t++) x.write(32, r.data[t]); + break; + case 8: + case 9: + x.write(8, 0); + for (var t = 0; t < r.data.length; t++) x.write(32, r.data[t]); + break; + case 7: + for (var t = 0; t < r.data.length / 2; t++) for (var u = ml(r.get(t)), i = 0; i < 8; i++) x.write(8, u[i]); + break; + case 1: + for (var t = 0; t < r.data.length; t++) for (var u = ml(jh(r.get(t))), i = 0; i < 8; i++) x.write(8, u[i]); + break; + case 0: + for (var t = 0; t < r.data.length; t++) { + var u = vN(r.get(t)); + x.write(32, u); + } + break; + case 10: + for (var t = 0; t < r.data.length / 2; t++) { + var i = r.get(t); + x.write(32, vN(i[1])), x.write(32, vN(i[2])); + } + break; + case 11: + for (var t = 0; t < r.data.length / 2; t++) { + for (var c = r.get(t), u = ml(jh(c[1])), i = 0; i < 8; i++) x.write(8, u[i]); + for (var u = ml(jh(c[2])), i = 0; i < 8; i++) x.write(8, u[i]); + } + break; + } + e[0] = (4 + r.dims.length) * 4, e[1] = (4 + r.dims.length) * 8; + } + function lN(x) { + var r = /* @__PURE__ */ new Int32Array(1); + r[0] = x; + return new Float32Array(r.buffer)[0]; + } + function pN(x) { + var r = x.lo, e = x.mi, t = x.hi, u = (t & 32767) >> 4; + if (u == bL) return (r | e | t & Kw) == 0 ? t & an ? -Infinity : Infinity : NaN; + var i = Math.pow(2, -24), c = (r * i + e) * i + (t & Kw); + return u > 0 ? (c += 16, c *= Math.pow(2, u - AM)) : c *= Math.pow(2, -DL), t & an && (c = -c), c; + } + function Z2(x) { + Q2.Failure || (Q2.Failure = [ + t1, + sy, + -3 + ]), iN(Q2.Failure, x); + } + function oq(x, r, e) { + var t = x.read32s(); + (t < 0 || t > 16) && Z2("input_value: wrong number of bigarray dimensions"); + var u = x.read32s(), i = u & ya, c = u >> 8 & 1, v = []; + if (e == im) for (var o = 0; o < t; o++) { + var l = x.read16u(); + if (l == rn) { + var k = x.read32u(), h = x.read32u(); + k != 0 && Z2("input_value: bigarray dimension overflow in 32bit"), l = h; + } + v.push(l); + } + else for (var o = 0; o < t; o++) v.push(x.read32u()); + var E = Ch(v), T = tq(i, E), I = sN(i, c, v, T); + switch (i) { + case 2: + for (var o = 0; o < E; o++) T[o] = x.read8s(); + break; + case 3: + case 12: + for (var o = 0; o < E; o++) T[o] = x.read8u(); + break; + case 4: + for (var o = 0; o < E; o++) T[o] = x.read16s(); + break; + case 5: + for (var o = 0; o < E; o++) T[o] = x.read16u(); + break; + case 6: + for (var o = 0; o < E; o++) T[o] = x.read32s(); + break; + case 8: + case 9: + x.read8u() && Z2("input_value: cannot read bigarray with 64-bit OCaml ints"); + for (var o = 0; o < E; o++) T[o] = x.read32s(); + break; + case 7: + for (var z = new Array(8), o = 0; o < E; o++) { + for (var P = 0; P < 8; P++) z[P] = x.read8u(); + var R = kl(z); + I.set(o, R); + } + break; + case 1: + for (var z = new Array(8), o = 0; o < E; o++) { + for (var P = 0; P < 8; P++) z[P] = x.read8u(); + var q = pN(kl(z)); + I.set(o, q); + } + break; + case 0: + for (var o = 0; o < E; o++) { + var q = lN(x.read32s()); + I.set(o, q); + } + break; + case 10: + for (var o = 0; o < E; o++) { + var X = lN(x.read32s()), B = lN(x.read32s()); + I.set(o, [ + Q3, + X, + B + ]); + } + break; + case 11: + for (var z = new Array(8), o = 0; o < E; o++) { + for (var P = 0; P < 8; P++) z[P] = x.read8u(); + for (var X = pN(kl(z)), P = 0; P < 8; P++) z[P] = x.read8u(); + var B = pN(kl(z)); + I.set(o, [ + Q3, + X, + B + ]); + } + break; + } + return r[0] = (4 + t) * 4, sN(i, c, v, T); + } + function vq(x, r, e) { + return x.compare(r, e); + } + function lq(x, r) { + return Math.imul(x, r); + } + function Da(x, r) { + return r = lq(r, -862048943), r = r << 15 | r >>> 17, r = lq(r, 461845907), x ^= r, x = x << 13 | x >>> 19, (x + (x << 2) | 0) + -430675100 | 0; + } + function Bz(x, r) { + return x = Da(x, cN(r)), x = Da(x, fN(r)), x; + } + function pq(x, r) { + return Bz(x, jh(r)); + } + function kq(x) { + var r = Ch(x.dims), e = 0; + switch (x.kind) { + case 2: + case 3: + case 12: + r > D6 && (r = D6); + var t = 0, u = 0; + for (u = 0; u + 4 <= x.data.length; u += 4) t = x.data[u + 0] | x.data[u + 1] << 8 | x.data[u + 2] << 16 | x.data[u + 3] << 24, e = Da(e, t); + switch (t = 0, r & 3) { + case 3: t = x.data[u + 2] << 16; + case 2: t |= x.data[u + 1] << 8; + case 1: t |= x.data[u + 0], e = Da(e, t); + } + break; + case 4: + case 5: + r > R1 && (r = R1); + var t = 0, u = 0; + for (u = 0; u + 2 <= x.data.length; u += 2) t = x.data[u + 0] | x.data[u + 1] << 16, e = Da(e, t); + r & 1 && (e = Da(e, x.data[u])); + break; + case 6: + r > 64 && (r = 64); + for (var u = 0; u < r; u++) e = Da(e, x.data[u]); + break; + case 8: + case 9: + r > 64 && (r = 64); + for (var u = 0; u < r; u++) e = Da(e, x.data[u]); + break; + case 7: + r > 32 && (r = 32), r *= 2; + for (var u = 0; u < r; u++) e = Da(e, x.data[u]); + break; + case 10: r *= 2; + case 0: + r > 64 && (r = 64); + for (var u = 0; u < r; u++) e = pq(e, x.data[u]); + break; + case 11: r *= 2; + case 1: + r > 32 && (r = 32); + for (var u = 0; u < r; u++) e = pq(e, x.data[u]); + break; + } + return e; + } + function Uz(x, r) { + return r[0] = 4, x.read32s(); + } + function Xz(x, r) { + switch (x.read8u()) { + case 1: return r[0] = 4, x.read32s(); + case 2: Z2("input_value: native integer value too large"); + default: Z2("input_value: ill-formed native integer"); + } + } + function Gz(x, r) { + for (var e = new Array(8), t = 0; t < 8; t++) e[t] = x.read8u(); + return r[0] = 8, kl(e); + } + function Yz(x, r, e) { + for (var t = ml(r), u = 0; u < 8; u++) x.write(8, t[u]); + e[0] = 8, e[1] = 8; + } + function zz(x, r, e) { + return x.compare(r); + } + function Jz(x) { + return x.lo32() ^ x.hi32(); + } + var mq = { + _j: { + deserialize: Gz, + serialize: Yz, + fixed_length: 8, + compare: zz, + hash: Jz + }, + _i: { + deserialize: Uz, + fixed_length: 4 + }, + _n: { + deserialize: Xz, + fixed_length: 4 + }, + _bigarray: { + deserialize: function(x, r) { + return oq(x, r, "_bigarray"); + }, + serialize: aq, + compare: vq, + hash: kq + }, + _bigarr02: { + deserialize: function(x, r) { + return oq(x, r, im); + }, + serialize: aq, + compare: vq, + hash: kq + } + }; + function kN(x) { + return mq[x.caml_custom] && mq[x.caml_custom].compare; + } + function hq(x, r, e, t) { + var u = kN(r); + if (u) { + var i = e > 0 ? u(r, x, t) : u(x, r, t); + if (t && i != i) return e; + if (+i != +i) return +i; + if ((i | 0) != 0) return i | 0; + } + return e; + } + function mN(x) { + return typeof x == "string" && !/[^\x00-\xff]/.test(x); + } + function hN(x) { + return x instanceof Oa; + } + function dq(x) { + if (typeof x == "number") return d6; + if (hN(x)) return xl; + if (mN(x)) return 1252; + if (x instanceof Array && x[0] === x[0] >>> 0 && x[0] <= Bk) { + var r = x[0] | 0; + return r == Q3 ? 0 : r; + } else { + if (x instanceof String) return gF; + if (typeof x == "string") return gF; + if (x instanceof Number) return d6; + if (x && x.caml_custom) return E_; + if (x && x.compare) return 1256; + if (typeof x == "function") return 1247; + if (typeof x == "symbol") return 1251; + } + return 1001; + } + function xe(x, r) { + return x < r ? -1 : x == r ? 0 : 1; + } + function sx(x, r) { + return x < r ? -1 : x > r ? 1 : 0; + } + function Kz(x, r) { + return x.t & 6 && Oh(x), r.t & 6 && Oh(r), x.c < r.c ? -1 : x.c > r.c ? 1 : 0; + } + function Dh(x, r, e) { + for (var t = [];;) { + if (!(e && x === r)) { + var u = dq(x); + if (u == ol) { + x = x[1]; + continue; + } + var i = dq(r); + if (i == ol) { + r = r[1]; + continue; + } + if (u !== i) return u == d6 ? i == E_ ? hq(x, r, -1, e) : -1 : i == d6 ? u == E_ ? hq(r, x, 1, e) : 1 : u < i ? -1 : 1; + switch (u) { + case 247: + u2(L9); + break; + case 248: + var v = xe(x[2], r[2]); + if (v != 0) return v | 0; + break; + case 249: + u2(L9); + break; + case 250: + u2("equal: got Forward_tag, should not happen"); + break; + case 251: + u2("equal: abstract value"); + break; + case 252: + if (x !== r) { + var v = Kz(x, r); + if (v != 0) return v | 0; + } + break; + case 253: + u2("equal: got Double_tag, should not happen"); + break; + case 254: + u2("equal: got Double_array_tag, should not happen"); + break; + case 255: + u2("equal: got Custom_tag, should not happen"); + break; + case 1247: + u2(L9); + break; + case 1255: + var c = kN(x); + if (c != kN(r)) return x.caml_custom < r.caml_custom ? -1 : 1; + c || u2("compare: abstract value"); + var v = c(x, r, e); + if (v != v) return e ? -1 : v; + if (v !== (v | 0)) return -1; + if (v != 0) return v | 0; + break; + case 1256: + var v = x.compare(r, e); + if (v != v) return e ? -1 : v; + if (v !== (v | 0)) return -1; + if (v != 0) return v | 0; + break; + case 1e3: + if (x = +x, r = +r, x < r) return -1; + if (x > r) return 1; + if (x != r) { + if (!e) return NaN; + if (x == x) return 1; + if (r == r) return -1; + } + break; + case 1001: + if (x < r) return -1; + if (x > r) return 1; + if (x != r) { + if (!e) return NaN; + if (x == x) return 1; + if (r == r) return -1; + } + break; + case 1251: + if (x !== r) return e ? 1 : NaN; + break; + case 1252: + var x = x, r = r; + if (x !== r) { + if (x < r) return -1; + if (x > r) return 1; + } + break; + case 12520: + var x = x.toString(), r = r.toString(); + if (x !== r) { + if (x < r) return -1; + if (x > r) return 1; + } + break; + default: + if (Mz(u)) { + u2("compare: continuation value"); + break; + } + if (x.length != r.length) return x.length < r.length ? -1 : 1; + x.length > 1 && t.push(x, r, 1); + break; + } + } + if (t.length == 0) return 0; + var o = t.pop(); + r = t.pop(), x = t.pop(), o + 1 < x.length && t.push(x, r, o + 1), x = x[o], r = r[o]; + } + } + function yq(x, r) { + return Dh(x, r, !0); + } + function Hz() { + return [0]; + } + function b1(x) { + return x < 0 && u2("Bytes.create"), new Oa(x ? 2 : 9, rx, x); + } + var Rh = [0]; + function Wz(x, r) { + return Rh !== x ? 0 : (Rh = r, 1); + } + function _q(x) { + return Rh; + } + function Vz(x) { + Rh = x; + } + function Ro(x, r) { + return +(Dh(x, r, !1) == 0); + } + function $z(x, r, e, t) { + if (e > 0) if (r == 0 && (e >= x.l || x.t == 2 && e >= x.c.length)) t == 0 ? (x.c = rx, x.t = 2) : (x.c = pl(e, String.fromCharCode(t)), x.t = e == x.l ? 0 : 2); + else for (x.t != 4 && Nh(x), e += r; r < e; r++) x.c[r] = t; + return 0; + } + function dN(x) { + var r; + if (x = x, r = +x, x.length > 0 && r === r || (x = x.replace(/_/g, rx), r = +x, x.length > 0 && r === r || /^[+-]?nan$/i.test(x))) return r; + var e = /^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)(p([+-]?[0-9]+))?/i.exec(x); + if (e) { + var t = e[3].replace(/0+$/, rx), u = parseInt(e[1] + e[2] + t, 16), i = (e[5] | 0) - 4 * t.length; + return r = u * Math.pow(2, i), r; + } + if (/^\+?inf(inity)?$/i.test(x)) return Infinity; + if (/^-inf(inity)?$/i.test(x)) return -Infinity; + Z2("float_of_string"); + } + function yN(x) { + x = x; + var r = x.length; + r > 31 && u2("format_int: format too long"); + for (var e = { + justify: $7, + signstyle: ze, + filler: Nu, + alternate: !1, + base: 0, + signedconv: !1, + width: 0, + uppercase: !1, + sign: 1, + prec: -1, + conv: EF + }, t = 0; t < r; t++) { + var u = x.charAt(t); + switch (u) { + case "-": + e.justify = ze; + break; + case "+": + case " ": + e.signstyle = u; + break; + case "0": + e.filler = V2; + break; + case "#": + e.alternate = !0; + break; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + for (e.width = 0; u = x.charCodeAt(t) - 48, u >= 0 && u <= 9;) e.width = e.width * 10 + u, t++; + t--; + break; + case ".": + for (e.prec = 0, t++; u = x.charCodeAt(t) - 48, u >= 0 && u <= 9;) e.prec = e.prec * 10 + u, t++; + t--; + case "d": + case "i": e.signedconv = !0; + case "u": + e.base = 10; + break; + case "x": + e.base = 16; + break; + case "X": + e.base = 16, e.uppercase = !0; + break; + case "o": + e.base = 8; + break; + case "e": + case "f": + case "g": + e.signedconv = !0, e.conv = u; + break; + case "E": + case "F": + case "G": + e.signedconv = !0, e.uppercase = !0, e.conv = u.toLowerCase(); + break; + } + } + return e; + } + function _N(x, r) { + x.uppercase && (r = r.toUpperCase()); + var e = r.length; + x.signedconv && (x.sign < 0 || x.signstyle != ze) && e++, x.alternate && (x.base == 8 && (e += 1), x.base == 16 && (e += 2)); + var t = rx; + if (x.justify == $7 && x.filler == Nu) for (var u = e; u < x.width; u++) t += Nu; + if (x.signedconv && (x.sign < 0 ? t += ze : x.signstyle != ze && (t += x.signstyle)), x.alternate && x.base == 8 && (t += V2), x.alternate && x.base == 16 && (t += x.uppercase ? "0X" : Ao), x.justify == $7 && x.filler == V2) for (var u = e; u < x.width; u++) t += V2; + if (t += r, x.justify == ze) for (var u = e; u < x.width; u++) t += Nu; + return t; + } + function wN(x, r) { + function e(k, h) { + if (Math.abs(k) < 1) return k.toFixed(h); + var E = parseInt(k.toString().split($7)[1]); + return E > 20 ? (E -= 20, k /= Math.pow(10, E), k += new Array(E + 1).join(V2), h > 0 && (k = k + ln + new Array(h + 1).join(V2)), k) : k.toFixed(h); + } + var t, u = yN(x), i = u.prec < 0 ? 6 : u.prec; + if ((r < 0 || r == 0 && 1 / r == -Infinity) && (u.sign = -1, r = -r), isNaN(r)) t = HP, u.filler = Nu; + else if (!isFinite(r)) t = "inf", u.filler = Nu; + else switch (u.conv) { + case "e": + var t = r.toExponential(i), c = t.length; + t.charAt(c - 3) == ig && (t = t.slice(0, c - 1) + V2 + t.slice(c - 1)); + break; + case "f": + t = e(r, i); + break; + case "g": + i = i || 1, t = r.toExponential(i - 1); + var v = t.indexOf(ig), o = +t.slice(v + 1); + if (o < -4 || r >= 1e21 || r.toFixed(0).length > i) { + for (var c = v - 1; t.charAt(c) == V2;) c--; + t.charAt(c) == ln && c--, t = t.slice(0, c + 1) + t.slice(v), c = t.length, t.charAt(c - 3) == ig && (t = t.slice(0, c - 1) + V2 + t.slice(c - 1)); + break; + } else { + var l = i; + if (o < 0) l -= o + 1, t = r.toFixed(l); + else for (; t = r.toFixed(l), t.length > i + 1;) l--; + if (l) { + for (var c = t.length - 1; t.charAt(c) == V2;) c--; + t.charAt(c) == ln && c--, t = t.slice(0, c + 1); + } + } + break; + } + return _N(u, t); + } + function Fh(x, r) { + if (x == al) return rx + r; + var e = yN(x); + r < 0 && (e.signedconv ? (e.sign = -1, r = -r) : r >>>= 0); + var t = r.toString(e.base); + if (e.prec >= 0) { + e.filler = Nu; + var u = e.prec - t.length; + u > 0 && (t = pl(u, V2) + t); + } + return _N(e, t); + } + var wq = 0; + function js() { + return wq++; + } + function gq() { + return [0]; + } + var Mh = []; + function zx(x, r, e) { + var t = x[1], u = Mh[e]; + if (u === void 0) for (var i = Mh.length; i < e; i++) Mh[i] = 0; + else if (t[u] === r) return t[u - 1]; + for (var c = 3, v = t[1] * 2 + 1, o; c < v;) o = c + v >> 1 | 1, r < t[o + 1] ? v = o - 2 : c = o; + return Mh[e] = c + 1, r == t[c + 1] ? t[c] : 0; + } + function Qz(x) { + for (var r = rx, e = r, t, u, i = 0, c = x.length; i < c; i++) { + if (t = x.charCodeAt(i), t < Pt) { + for (var v = i + 1; v < c && (t = x.charCodeAt(v)) < Pt; v++); + if (v - i > BP ? (e.substr(0, 1), r += e, e = rx, r += x.slice(i, v)) : e += x.slice(i, v), v == c) break; + i = v; + } + t < pL ? (e += String.fromCharCode(192 | t >> 6), e += String.fromCharCode(Pt | t & Co)) : t < 55296 || t >= ZR ? e += String.fromCharCode(VF | t >> 12, Pt | t >> 6 & Co, Pt | t & Co) : t >= 56319 || i + 1 == c || (u = x.charCodeAt(i + 1)) < AF || u > ZR ? e += "�" : (i++, t = (t << 10) + u - 56613888, e += String.fromCharCode(DR | t >> 18, Pt | t >> 12 & Co, Pt | t >> 6 & Co, Pt | t & Co)), e.length > L6 && (e.substr(0, 1), r += e, e = rx); + } + return r + e; + } + function Ot(x) { + return aN(x) ? x : Qz(x); + } + function Zz(x, r, e) { + if (!isFinite(x)) return isNaN(x) ? Ot(HP) : Ot(x > 0 ? cL : "-infinity"); + var t = x == 0 && 1 / x == -Infinity ? 1 : x >= 0 ? 0 : 1; + t && (x = -x); + var u = 0; + if (x != 0) if (x < 1) for (; x < 1 && u > -1022;) x *= 2, u--; + else for (; x >= 2;) x /= 2, u++; + var i = u < 0 ? rx : $7, c = rx; + if (t) c = ze; + else switch (e) { + case 43: + c = $7; + break; + case 32: + c = Nu; + break; + default: break; + } + if (r >= 0 && r < 13) { + var v = Math.pow(2, r * 4); + x = Math.round(x * v) / v; + } + var o = x.toString(16); + if (r >= 0) { + var l = o.indexOf(ln); + if (l < 0) o += ln + pl(r, V2); + else { + var k = l + 1 + r; + o.length < k ? o += pl(k - o.length, V2) : o = o.substr(0, k); + } + } + return Ot(c + Ao + o + "p" + i + u.toString(10)); + } + function xJ(x) { + return +x.isZero(); + } + function n4(x) { + return new sr(x & xs, x >> 24 & xs, x >> 31 & rn); + } + function rJ(x) { + return x.toInt(); + } + function eJ(x) { + return +x.isNeg(); + } + function gN(x) { + return x.neg(); + } + function bq(x, r) { + var e = yN(x); + e.signedconv && eJ(r) && (e.sign = -1, r = gN(r)); + var t = rx, u = n4(e.base), i = "0123456789abcdef"; + do { + var c = r.udivmod(u); + r = c.quotient, t = i.charAt(rJ(c.modulus)) + t; + } while (!xJ(r)); + if (e.prec >= 0) { + e.filler = Nu; + var v = e.prec - t.length; + v > 0 && (t = pl(v, V2) + t); + } + return _N(e, t); + } + function Rx(x) { + return x.length; + } + function z0(x, r) { + return x.charCodeAt(r); + } + function Tq(x, r) { + return x.add(r); + } + function Eq(x, r) { + return x.mul(r); + } + function bN(x, r) { + return x.ucompare(r) < 0; + } + function Sq(x) { + var r = 0, e = Rx(x), t = 10, u = 1; + if (e > 0) switch (z0(x, r)) { + case 45: + r++, u = -1; + break; + case 43: + r++, u = 1; + break; + } + if (r + 1 < e && z0(x, r) == 48) switch (z0(x, r + 1)) { + case 120: + case 88: + t = 16, r += 2; + break; + case 111: + case 79: + t = 8, r += 2; + break; + case 98: + case 66: + t = 2, r += 2; + break; + case 117: + case 85: + r += 2; + break; + } + return [ + r, + u, + t + ]; + } + function Lh(x) { + return x >= 48 && x <= 57 ? x - 48 : x >= 65 && x <= 90 ? x - 55 : x >= 97 && x <= e1 ? x - 87 : -1; + } + function Zv(x) { + var r = Sq(x), e = r[0], t = r[1], u = r[2], i = n4(u), c = new sr(xs, 268435455, rn).udivmod(i).quotient, v = z0(x, e), o = Lh(v); + (o < 0 || o >= u) && Z2(Et); + for (var l = n4(o);;) if (e++, v = z0(x, e), v != 95) { + if (o = Lh(v), o < 0 || o >= u) break; + bN(c, l) && Z2(Et), o = n4(o), l = Tq(Eq(i, l), o), bN(l, o) && Z2(Et); + } + return e != Rx(x) && Z2(Et), u == 10 && bN(new sr(0, 0, an), l) && Z2(Et), t < 0 && (l = gN(l)), l; + } + function Aq(x, r) { + return x.or(r); + } + function qh(x) { + return x.toFloat(); + } + function st(x) { + var r = Sq(x), e = r[0], t = r[1], u = r[2], i = Rx(x), c = -1 >>> 0, v = e < i ? z0(x, e) : 0, o = Lh(v); + (o < 0 || o >= u) && Z2(Et); + var l = o; + for (e++; e < i; e++) if (v = z0(x, e), v != 95) { + if (o = Lh(v), o < 0 || o >= u) break; + l = u * l + o, l > c && Z2(Et); + } + return e != i && Z2(Et), l = t * l, u == 10 && (l | 0) != l && Z2(Et), l | 0; + } + function Wx(x) { + return aN(x) ? x : cq(x); + } + function tJ(x) { + for (var r = {}, e = 1; e < x.length; e++) { + var t = x[e]; + r[Wx(t[1])] = t[2]; + } + return r; + } + var Bh = Os; + function nJ(x) { + return x.l >= 0 ? x.l : x.l = x.length; + } + function uJ(x) { + return function() { + for (var r = nJ(x), e = new Array(r), t = 0; t < r; t++) e[t] = arguments[t]; + return Bh(x, e); + }; + } + function TN(x, r, e) { + return x[0] == r ? (x[0] = e, 1) : 0; + } + function iJ(x) { + return TN(x, jv, ul), 0; + } + function fJ(x) { + return x instanceof Array && x[0] == x[0] >>> 0 && TN(x, ul, jv) ? 0 : 1; + } + function cJ(x) { + return TN(x, jv, ol), 0; + } + function sJ(x, r) { + return +(Dh(x, r, !1) < 0); + } + function Iq(x) { + return x; + } + function aJ(x, r) { + return x.get(x.offset(r)); + } + function oJ(x, r) { + return x.xor(r); + } + function vJ(x, r) { + return x.shift_right_unsigned(r); + } + function lJ(x, r) { + return x.shift_left(r); + } + function Uh(x) { + function r(B, z) { + return lJ(B, z); + } + function e(B, z) { + return vJ(B, z); + } + function t(B, z) { + return Aq(B, z); + } + function u(B, z) { + return oJ(B, z); + } + function i(B, z) { + return Tq(B, z); + } + function c(B, z) { + return Eq(B, z); + } + function v(B, z) { + return t(r(B, z), e(B, 64 - z)); + } + function o(B, z) { + return aJ(B, z); + } + function l(B, z, x0) { + return e4(B, z, x0); + } + var k = Zv(Iq("0xd1342543de82ef95")), h = Zv(Iq("0xdaba0b6eb09322e3")), E, q, X, T = x, I = o(T, 0), N = o(T, 1), P = o(T, 2), R = o(T, 3); + E = i(N, P), E = c(u(E, e(E, 32)), h), E = c(u(E, e(E, 32)), h), E = u(E, e(E, 32)), l(T, 1, i(c(N, k), I)); + var q = P, X = R; + return X = u(X, q), q = v(q, 24), q = u(u(q, X), r(X, 16)), X = v(X, 37), l(T, 2, q), l(T, 3, X), E; + } + function Fo(e, r) { + e < 0 && r4(); + var e = e + 1 | 0, t = new Array(e); + t[0] = 0; + for (var u = 1; u < e; u++) t[u] = r; + return t; + } + function pJ() { + var x = /* @__PURE__ */ new ArrayBuffer(64), r = new Uint32Array(x), e = new Uint8Array(x); + return { + len: 0, + w: new Uint32Array([ + 1732584193, + 4023233417, + 2562383102, + 271733878 + ]), + b32: r, + b8: e + }; + } + var Xh = (function() { + function x(c, v) { + return c + v | 0; + } + function r(c, v, o, l, k, h) { + return v = x(x(v, c), x(l, h)), x(v << k | v >>> 32 - k, o); + } + function e(c, v, o, l, k, h, E) { + return r(v & o | ~v & l, c, v, k, h, E); + } + function t(c, v, o, l, k, h, E) { + return r(v & l | o & ~l, c, v, k, h, E); + } + function u(c, v, o, l, k, h, E) { + return r(v ^ o ^ l, c, v, k, h, E); + } + function i(c, v, o, l, k, h, E) { + return r(o ^ (v | ~l), c, v, k, h, E); + } + return function(c, v) { + var o = c[0], l = c[1], k = c[2], h = c[3]; + o = e(o, l, k, h, v[0], 7, 3614090360), h = e(h, o, l, k, v[1], 12, 3905402710), k = e(k, h, o, l, v[2], 17, 606105819), l = e(l, k, h, o, v[3], 22, 3250441966), o = e(o, l, k, h, v[4], 7, 4118548399), h = e(h, o, l, k, v[5], 12, 1200080426), k = e(k, h, o, l, v[6], 17, 2821735955), l = e(l, k, h, o, v[7], 22, 4249261313), o = e(o, l, k, h, v[8], 7, 1770035416), h = e(h, o, l, k, v[9], 12, 2336552879), k = e(k, h, o, l, v[10], 17, 4294925233), l = e(l, k, h, o, v[11], 22, 2304563134), o = e(o, l, k, h, v[12], 7, 1804603682), h = e(h, o, l, k, v[13], 12, 4254626195), k = e(k, h, o, l, v[14], 17, 2792965006), l = e(l, k, h, o, v[15], 22, 1236535329), o = t(o, l, k, h, v[1], 5, 4129170786), h = t(h, o, l, k, v[6], 9, 3225465664), k = t(k, h, o, l, v[11], 14, 643717713), l = t(l, k, h, o, v[0], 20, 3921069994), o = t(o, l, k, h, v[5], 5, 3593408605), h = t(h, o, l, k, v[10], 9, 38016083), k = t(k, h, o, l, v[15], 14, 3634488961), l = t(l, k, h, o, v[4], 20, 3889429448), o = t(o, l, k, h, v[9], 5, 568446438), h = t(h, o, l, k, v[14], 9, 3275163606), k = t(k, h, o, l, v[3], 14, 4107603335), l = t(l, k, h, o, v[8], 20, 1163531501), o = t(o, l, k, h, v[13], 5, 2850285829), h = t(h, o, l, k, v[2], 9, 4243563512), k = t(k, h, o, l, v[7], 14, 1735328473), l = t(l, k, h, o, v[12], 20, 2368359562), o = u(o, l, k, h, v[5], 4, 4294588738), h = u(h, o, l, k, v[8], 11, 2272392833), k = u(k, h, o, l, v[11], 16, 1839030562), l = u(l, k, h, o, v[14], 23, 4259657740), o = u(o, l, k, h, v[1], 4, 2763975236), h = u(h, o, l, k, v[4], 11, 1272893353), k = u(k, h, o, l, v[7], 16, 4139469664), l = u(l, k, h, o, v[10], 23, 3200236656), o = u(o, l, k, h, v[13], 4, 681279174), h = u(h, o, l, k, v[0], 11, 3936430074), k = u(k, h, o, l, v[3], 16, 3572445317), l = u(l, k, h, o, v[6], 23, 76029189), o = u(o, l, k, h, v[9], 4, 3654602809), h = u(h, o, l, k, v[12], 11, 3873151461), k = u(k, h, o, l, v[15], 16, 530742520), l = u(l, k, h, o, v[2], 23, 3299628645), o = i(o, l, k, h, v[0], 6, 4096336452), h = i(h, o, l, k, v[7], 10, 1126891415), k = i(k, h, o, l, v[14], 15, 2878612391), l = i(l, k, h, o, v[5], 21, 4237533241), o = i(o, l, k, h, v[12], 6, 1700485571), h = i(h, o, l, k, v[3], 10, 2399980690), k = i(k, h, o, l, v[10], 15, 4293915773), l = i(l, k, h, o, v[1], 21, 2240044497), o = i(o, l, k, h, v[8], 6, 1873313359), h = i(h, o, l, k, v[15], 10, 4264355552), k = i(k, h, o, l, v[6], 15, 2734768916), l = i(l, k, h, o, v[13], 21, 1309151649), o = i(o, l, k, h, v[4], 6, 4149444226), h = i(h, o, l, k, v[11], 10, 3174756917), k = i(k, h, o, l, v[2], 15, 718787259), l = i(l, k, h, o, v[9], 21, 3951481745), c[0] = x(o, c[0]), c[1] = x(l, c[1]), c[2] = x(k, c[2]), c[3] = x(h, c[3]); + }; + })(); + function kJ(x, r, e) { + var t = x.len & Co, u = 0; + if (x.len += e, t) { + var i = 64 - t; + if (e < i) { + x.b8.set(r.subarray(0, e), t); + return; + } + x.b8.set(r.subarray(0, i), t), Xh(x.w, x.b32), e -= i, u += i; + } + for (; e >= 64;) x.b8.set(r.subarray(u, u + 64), 0), Xh(x.w, x.b32), e -= 64, u += 64; + e && x.b8.set(r.subarray(u, u + e), 0); + } + function mJ(x) { + var r = x.len & Co; + if (x.b8[r] = Pt, r++, r > 56) { + for (var e = r; e < 64; e++) x.b8[e] = 0; + Xh(x.w, x.b32); + for (var e = 0; e < 56; e++) x.b8[e] = 0; + } else for (var e = r; e < 56; e++) x.b8[e] = 0; + x.b32[14] = x.len << 3, x.b32[15] = x.len >> 29 & 536870911, Xh(x.w, x.b32); + for (var t = /* @__PURE__ */ new Uint8Array(16), u = 0; u < 4; u++) for (var e = 0; e < 4; e++) t[u * 4 + e] = x.w[u] >> 8 * e & 255; + return t; + } + function EN(x) { + return x.t != 4 && Nh(x), x.c; + } + function hJ(x) { + return t4(x, 0, x.length); + } + function dJ(x, r, e) { + var t = pJ(); + return kJ(t, EN(x).subarray(r, r + e), e), hJ(mJ(t)); + } + function yJ(x, r, e) { + return dJ(Nt(x), r, e); + } + function jt(x) { + return x.l; + } + function _J() { + return 0; + } + function jr(x) { + iN(Q2.Sys_error, x); + } + var Ra = new Array(); + function pn(x) { + var r = Ra[x]; + return r.opened || jr("Cannot flush a closed channel"), !r.buffer || r.buffer_curr == 0 || (r.output ? r.output(t4(r.buffer, 0, r.buffer_curr)) : r.file.write(r.offset, r.buffer, 0, r.buffer_curr), r.offset += r.buffer_curr, r.buffer_curr = 0), 0; + } + function Pq() {} + function kn(x, r) { + this.fs = {}, this.fd = x, this.flags = r; + } + kn.prototype = new Pq(), kn.prototype.constructor = kn, kn.prototype.truncate = function(x) { + try { + this.fs.ftruncateSync(this.fd, x | 0); + } catch (r) { + jr(r.toString()); + } + }, kn.prototype.length = function() { + try { + return this.fs.fstatSync(this.fd).size; + } catch (x) { + jr(x.toString()); + } + }, kn.prototype.write = function(x, r, e, t) { + try { + this.flags.isCharacterDevice ? this.fs.writeSync(this.fd, r, e, t) : this.fs.writeSync(this.fd, r, e, t, x); + } catch (u) { + jr(u.toString()); + } + return 0; + }, kn.prototype.read = function(x, r, e, t) { + try { + if (this.flags.isCharacterDevice) var u = this.fs.readSync(this.fd, r, e, t); + else var u = this.fs.readSync(this.fd, r, e, t, x); + return u; + } catch (i) { + jr(i.toString()); + } + }, kn.prototype.close = function() { + try { + return this.fs.closeSync(this.fd), 0; + } catch (x) { + jr(x.toString()); + } + }; + function wJ(x, r) { + if (r.name) try { + return new kn({}.openSync(r.name, "rs"), r); + } catch {} + return new kn(x, r); + } + var Gh = new Array(3); + function u4() { + return typeof a0.process < "u" && typeof a0.process.versions < "u" && typeof a0.process.versions.node < "u"; + } + function gJ() { + function x(e) { + if (e.charAt(0) === se) return [rx, e.substring(1)]; + } + function r(e) { + var u = /^([a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?([\\/])?([\s\S]*?)$/.exec(e), i = u[1] || rx, c = !!(i && i.charAt(1) !== Iv); + if (u[2] || c) { + var v = u[1] || rx, o = u[2] || rx; + return [v, e.substring(v.length + o.length)]; + } + } + return u4() && a0.process && a0.process.platform && a0.process.platform === aD ? r : x; + } + var SN = gJ(); + function Cq(x) { + return x.slice(-1) !== se ? x + se : x; + } + if (u4() && a0.process && a0.process.cwd) var i4 = a0.process.cwd().replace(/\\/g, se); + else var i4 = "/static"; + i4 = Cq(i4); + var TJ = [ + "E2BIG", + "EACCES", + "EAGAIN", + IC, + "EBUSY", + "ECHILD", + "EDEADLK", + "EDOM", + bD, + "EFAULT", + "EFBIG", + "EINTR", + "EINVAL", + "EIO", + "EISDIR", + "EMFILE", + "EMLINK", + "ENAMETOOLONG", + "ENFILE", + "ENODEV", + cg, + "ENOEXEC", + "ENOLCK", + "ENOMEM", + "ENOSPC", + "ENOSYS", + jw, + rR, + "ENOTTY", + "ENXIO", + "EPERM", + "EPIPE", + "ERANGE", + "EROFS", + "ESPIPE", + "ESRCH", + "EXDEV", + "EWOULDBLOCK", + "EINPROGRESS", + "EALREADY", + "ENOTSOCK", + "EDESTADDRREQ", + "EMSGSIZE", + "EPROTOTYPE", + "ENOPROTOOPT", + "EPROTONOSUPPORT", + "ESOCKTNOSUPPORT", + "EOPNOTSUPP", + "EPFNOSUPPORT", + "EAFNOSUPPORT", + "EADDRINUSE", + "EADDRNOTAVAIL", + "ENETDOWN", + "ENETUNREACH", + "ENETRESET", + "ECONNABORTED", + "ECONNRESET", + "ENOBUFS", + "EISCONN", + "ENOTCONN", + "ESHUTDOWN", + "ETOOMANYREFS", + "ETIMEDOUT", + "ECONNREFUSED", + "EHOSTDOWN", + "EHOSTUNREACH", + "ELOOP", + "EOVERFLOW" + ]; + function Fa(x, r, e, t) { + var u = TJ.indexOf(x); + u < 0 && (t ??= -9999, u = [0, t]); + return [ + u, + Ot(r || rx), + Ot(e || rx) + ]; + } + var Nq = {}; + function Mo(x) { + return Nq[x]; + } + function Ma(x, r) { + throw J0([0, x].concat(r)); + } + function AN(x) { + return x instanceof Uint8Array || (x = new Uint8Array(x)), new Oa(4, x, x.length); + } + function Oq(x) { + jr(x + Lp); + } + function ve(x) { + this.data = x; + } + ve.prototype = new Pq(), ve.prototype.constructor = ve, ve.prototype.truncate = function(x) { + var r = this.data; + this.data = b1(x | 0), Na(r, 0, this.data, 0, x); + }, ve.prototype.length = function() { + return jt(this.data); + }, ve.prototype.write = function(x, r, e, t) { + var u = this.length(); + if (x + t >= u) { + var i = b1(x + t), c = this.data; + this.data = i, Na(c, 0, this.data, 0, u); + } + return Na(AN(r), e, this.data, x, t), 0; + }, ve.prototype.read = function(x, r, e, t) { + var u = this.length(); + if (x + t >= u && (t = u - x), t) { + var i = b1(t | 0); + Na(this.data, x, i, 0, t), r.set(EN(i), e); + } + return t; + }; + function x3(x, r, e) { + this.file = r, this.name = x, this.flags = e; + } + x3.prototype.err_closed = function() { + jr(this.name + wF); + }, x3.prototype.length = function() { + if (this.file) return this.file.length(); + this.err_closed(); + }, x3.prototype.write = function(x, r, e, t) { + if (this.file) return this.file.write(x, r, e, t); + this.err_closed(); + }, x3.prototype.read = function(x, r, e, t) { + if (this.file) return this.file.read(x, r, e, t); + this.err_closed(); + }, x3.prototype.close = function() { + this.file = void 0; + }; + function A2(x, r) { + this.content = {}, this.root = x, this.lookupFun = r; + } + A2.prototype.nm = function(x) { + return this.root + x; + }, A2.prototype.create_dir_if_needed = function(x) { + for (var r = x.split(se), e = rx, t = 0; t < r.length - 1; t++) e += r[t] + se, !this.content[e] && (this.content[e] = Symbol("directory")); + }, A2.prototype.slash = function(x) { + return /\/$/.test(x) ? x : x + se; + }, A2.prototype.lookup = function(x) { + if (!this.content[x] && this.lookupFun) { + var r = this.lookupFun(this.root, x); + r !== 0 && (this.create_dir_if_needed(x), this.content[x] = new ve(Nt(r[1]))); + } + }, A2.prototype.exists = function(x) { + if (x == rx) return 1; + var r = this.slash(x); + return this.content[r] ? 1 : (this.lookup(x), this.content[x] ? 1 : 0); + }, A2.prototype.isFile = function(x) { + return this.exists(x) && !this.is_dir(x) ? 1 : 0; + }, A2.prototype.mkdir = function(x, r, e) { + var t = e && Mo(Ap); + this.exists(x) && (t ? Ma(t, Fa(bD, qE, this.nm(x))) : jr(x + ": File exists")); + var u = /^(.*)\/[^/]+/.exec(x); + u = u && u[1] || rx, this.exists(u) || (t ? Ma(t, Fa(cg, qE, this.nm(u))) : jr(u + Lp)), this.is_dir(u) || (t ? Ma(t, Fa(jw, qE, this.nm(u))) : jr(u + Cb)), this.create_dir_if_needed(this.slash(x)); + }, A2.prototype.rmdir = function(x, r) { + var e = r && Mo(Ap), t = x == rx ? rx : this.slash(x), u = new RegExp(_k + t + YR); + this.exists(x) || (e ? Ma(e, Fa(cg, VP, this.nm(x))) : jr(x + Lp)), this.is_dir(x) || (e ? Ma(e, Fa(jw, VP, this.nm(x))) : jr(x + Cb)); + for (var i in this.content) i.match(u) && (e ? Ma(e, Fa(rR, VP, this.nm(x))) : jr(this.nm(x) + ": Directory not empty")); + delete this.content[t]; + }, A2.prototype.readdir = function(x) { + var r = x == rx ? rx : this.slash(x); + this.exists(x) || jr(x + Lp), this.is_dir(x) || jr(x + Cb); + var e = new RegExp(_k + r + YR), t = {}, u = []; + for (var i in this.content) { + var c = i.match(e); + c && !t[c[1]] && (t[c[1]] = !0, u.push(c[1])); + } + return u; + }, A2.prototype.opendir = function(x, r) { + var e = r && Mo(Ap), t = this.readdir(x), u = !1, i = 0; + return { + readSync: function() { + if (u && (e ? Ma(e, Fa(IC, JF, this.nm(x))) : jr(x + rF)), i == t.length) return null; + var c = t[i]; + return i++, { name: c }; + }, + closeSync: function() { + u && (e ? Ma(e, Fa(IC, JF, this.nm(x))) : jr(x + rF)), u = !0, t = []; + } + }; + }, A2.prototype.is_dir = function(x) { + if (x == rx) return !0; + var r = this.slash(x); + return this.content[r] ? 1 : 0; + }, A2.prototype.unlink = function(x) { + var r = !!this.content[x]; + return delete this.content[x], r; + }, A2.prototype.open = function(x, r) { + var e; + return r.rdonly && r.wronly && jr(this.nm(x) + m9), r.text && r.binary && jr(this.nm(x) + Pb), this.lookup(x), this.content[x] ? (this.is_dir(x) && jr(this.nm(x) + UL), r.create && r.excl && jr(this.nm(x) + CI), e = this.content[x], r.truncate && e.truncate()) : r.create ? (this.create_dir_if_needed(x), this.content[x] = new ve(b1(0)), e = this.content[x]) : Oq(this.nm(x)), new x3(this.nm(x), e, r); + }, A2.prototype.open = function(x, r) { + var e; + return r.rdonly && r.wronly && jr(this.nm(x) + m9), r.text && r.binary && jr(this.nm(x) + Pb), this.lookup(x), this.content[x] ? (this.is_dir(x) && jr(this.nm(x) + UL), r.create && r.excl && jr(this.nm(x) + CI), e = this.content[x], r.truncate && e.truncate()) : r.create ? (this.create_dir_if_needed(x), this.content[x] = new ve(b1(0)), e = this.content[x]) : Oq(this.nm(x)), new x3(this.nm(x), e, r); + }, A2.prototype.register = function(x, r) { + var e; + if (this.content[x] && jr(this.nm(x) + CI), hN(r) && (e = new ve(r)), mN(r)) e = new ve(Nt(r)); + else if (r instanceof Array) e = new ve(AN(r)); + else if (typeof r == "string") e = new ve(sq(r)); + else if (r.toString) e = new ve(Nt(Ot(r.toString()))); + e ? (this.create_dir_if_needed(x), this.content[x] = e) : jr(this.nm(x) + " : registering file with invalid content type"); + }, A2.prototype.constructor = A2; + function i2(x) { + this.fs = {}, this.root = x; + } + i2.prototype.nm = function(x) { + return this.root + x; + }, i2.prototype.exists = function(x) { + try { + return this.fs.existsSync(this.nm(x)) ? 1 : 0; + } catch { + return 0; + } + }, i2.prototype.isFile = function(x) { + try { + return this.fs.statSync(this.nm(x)).isFile() ? 1 : 0; + } catch (r) { + jr(r.toString()); + } + }, i2.prototype.mkdir = function(x, r, e) { + try { + return this.fs.mkdirSync(this.nm(x), { mode: r }), 0; + } catch (t) { + this.raise_nodejs_error(t, e); + } + }, i2.prototype.rmdir = function(x, r) { + try { + return this.fs.rmdirSync(this.nm(x)), 0; + } catch (e) { + this.raise_nodejs_error(e, r); + } + }, i2.prototype.readdir = function(x, r) { + try { + return this.fs.readdirSync(this.nm(x)); + } catch (e) { + this.raise_nodejs_error(e, r); + } + }, i2.prototype.is_dir = function(x) { + try { + return this.fs.statSync(this.nm(x)).isDirectory() ? 1 : 0; + } catch (r) { + jr(r.toString()); + } + }, i2.prototype.unlink = function(x, r) { + try { + var e = this.fs.existsSync(this.nm(x)) ? 1 : 0; + return this.fs.unlinkSync(this.nm(x)), e; + } catch (t) { + this.raise_nodejs_error(t, r); + } + }, i2.prototype.open = function(x, r, e) { + var t = {}, u = 0; + for (var i in r) switch (i) { + case "rdonly": + u |= t.O_RDONLY; + break; + case "wronly": + u |= t.O_WRONLY; + break; + case "append": + u |= t.O_WRONLY | t.O_APPEND; + break; + case "create": + u |= t.O_CREAT; + break; + case "truncate": + u |= t.O_TRUNC; + break; + case "excl": + u |= t.O_EXCL; + break; + case "binary": + u |= t.O_BINARY; + break; + case "text": + u |= t.O_TEXT; + break; + case "nonblock": + u |= t.O_NONBLOCK; + break; + } + try { + var c = this.fs.openSync(this.nm(x), u); + return r.isCharacterDevice = this.fs.lstatSync(this.nm(x)).isCharacterDevice(), new kn(c, r); + } catch (o) { + this.raise_nodejs_error(o, e); + } + }, i2.prototype.rename = function(x, r, e) { + try { + this.fs.renameSync(this.nm(x), this.nm(r)); + } catch (t) { + this.raise_nodejs_error(t, e); + } + }, i2.prototype.stat = function(x, r) { + try { + var e = this.fs.statSync(this.nm(x)); + return this.stats_from_js(e); + } catch (t) { + this.raise_nodejs_error(t, r); + } + }, i2.prototype.lstat = function(x, r) { + try { + var e = this.fs.lstatSync(this.nm(x)); + return this.stats_from_js(e); + } catch (t) { + this.raise_nodejs_error(t, r); + } + }, i2.prototype.symlink = function(x, r, e, t) { + try { + return this.fs.symlinkSync(this.nm(r), this.nm(e), x ? "dir" : "file"), 0; + } catch (u) { + this.raise_nodejs_error(u, t); + } + }, i2.prototype.readlink = function(x, r) { + try { + return Ot(this.fs.readlinkSync(this.nm(x), "utf8")); + } catch (t) { + this.raise_nodejs_error(t, r); + } + }, i2.prototype.opendir = function(x, r) { + try { + return this.fs.opendirSync(this.nm(x)); + } catch (e) { + this.raise_nodejs_error(e, r); + } + }, i2.prototype.raise_nodejs_error = function(x, r) { + var e = Mo(Ap); + if (r && e) Ma(e, Fa(x.code, x.syscall, x.path, x.errno)); + else jr(x.toString()); + }, i2.prototype.stats_from_js = function(x) { + var r; + return x.isFile() ? r = 0 : x.isDirectory() ? r = 1 : x.isCharacterDevice() ? r = 2 : x.isBlockDevice() ? r = 3 : x.isSymbolicLink() ? r = 4 : x.isFIFO() ? r = 5 : x.isSocket() && (r = 6), [ + 0, + x.dev, + x.ino, + r, + x.mode, + x.nlink, + x.uid, + x.gid, + x.rdev, + x.size, + x.atimeMs, + x.mtimeMs, + x.ctimeMs + ]; + }, i2.prototype.constructor = i2; + function jq(x) { + var r = SN(x); + if (r) return r[0] + se; + } + var Yh = jq(i4) || Z2("unable to compute caml_root"), hl = []; + u4() ? hl.push({ + path: Yh, + device: new i2(Yh) + }) : hl.push({ + path: Yh, + device: new A2(Yh) + }), hl.push({ + path: BD, + device: new A2(BD) + }); + function f4(x, r) { + ve.call(this, b1(0)), this.log = function(e) { + return 0; + }, x == 1 && typeof console.log == "function" ? this.log = console.log : x == 2 && typeof console.error == "function" ? this.log = console.error : typeof console.log == "function" && (this.log = console.log), this.flags = r; + } + f4.prototype.length = function() { + return 0; + }, f4.prototype.write = function(x, r, e, t) { + if (this.log) { + t > 0 && e >= 0 && e + t <= r.length && r[e + t - 1] == 10 && t--; + var u = b1(t); + return Na(AN(r), e, u, 0, t), this.log(u.toUtf16()), 0; + } + jr(this.fd + wF); + }, f4.prototype.read = function(x, r, e, t) { + jr(this.fd + ": file descriptor is write only"); + }, f4.prototype.close = function() { + this.log = void 0; + }; + function zh(x, r) { + return r ??= Gh.length, Gh[r] = x, r | 0; + } + (function() { + function x(r, e) { + return u4() ? wJ(r, e) : new f4(r, e); + } + zh(x(0, { + rdonly: 1, + altname: "/dev/stdin", + isCharacterDevice: !0 + }), 0), zh(x(1, { + buffered: 2, + wronly: 1, + isCharacterDevice: !0 + }), 1), zh(x(2, { + buffered: 2, + wronly: 1, + isCharacterDevice: !0 + }), 2); + })(); + function SJ(x) { + var r = Gh[x]; + r.flags.wronly && jr(OR + x + " is writeonly"); + var t = { + file: r, + offset: r.flags.append ? r.length() : 0, + fd: x, + opened: !0, + out: !1, + buffer_curr: 0, + buffer_max: 0, + buffer: new Uint8Array(Y6), + refill: null + }; + return Ra[t.fd] = t, t.fd; + } + function Dq(x) { + var r = Gh[x]; + r.flags.rdonly && jr(OR + x + " is readonly"); + var e = r.flags.buffered !== void 0 ? r.flags.buffered : 1, t = { + file: r, + offset: r.flags.append ? r.length() : 0, + fd: x, + opened: !0, + out: !0, + buffer_curr: 0, + buffer: new Uint8Array(Y6), + buffered: e + }; + return Ra[t.fd] = t, t.fd; + } + function AJ() { + for (var x = 0, r = 0; r < Ra.length; r++) Ra[r] && Ra[r].opened && Ra[r].out && (x = [ + 0, + Ra[r].fd, + x + ]); + return x; + } + function IJ(x, r, e, t) { + var u = Ra[x]; + if (u.opened || jr("Cannot output to a closed channel"), r = r.subarray(e, e + t), u.buffer_curr + r.length > u.buffer.length) { + var i = new Uint8Array(u.buffer_curr + r.length); + i.set(u.buffer), u.buffer = i; + } + switch (u.buffered) { + case 0: + u.buffer.set(r, u.buffer_curr), u.buffer_curr += r.length, pn(x); + break; + case 1: + u.buffer.set(r, u.buffer_curr), u.buffer_curr += r.length, u.buffer_curr >= u.buffer.length && pn(x); + break; + case 2: + var c = r.lastIndexOf(10); + c < 0 ? (u.buffer.set(r, u.buffer_curr), u.buffer_curr += r.length, u.buffer_curr >= u.buffer.length && pn(x)) : (u.buffer.set(r.subarray(0, c + 1), u.buffer_curr), u.buffer_curr += c + 1, pn(x), u.buffer.set(r.subarray(c + 1), u.buffer_curr), u.buffer_curr += r.length - c - 1); + break; + } + return 0; + } + function PJ(x, u, e, t) { + var u = EN(u); + return IJ(x, u, e, t); + } + function IN(x, r, e, t) { + return PJ(x, Nt(r), e, t); + } + function Rq(x, r) { + return IN(x, String.fromCharCode(r), 0, 1), 0; + } + function r3(x, r) { + return +(Dh(x, r, !1) != 0); + } + function PN(x, r) { + var e = new Array(r + 1); + e[0] = x; + for (var t = 1; t <= r; t++) e[t] = 0; + return e; + } + function e3(x) { + return x instanceof Array && x[0] == x[0] >>> 0 ? x[0] : hN(x) || mN(x) ? xl : x instanceof Function || typeof x == "function" ? Gp : x && x.caml_custom ? Bk : d6; + } + function CJ(x) { + var r = {}; + if (x) for (var e = 1; e < x.length; e++) r[Wx(x[e][1])] = x[e][2]; + return r; + } + function Dt(x, r, e) { + if (e) { + var t = e; + if (a0.toplevelReloc) x = Bh(a0.toplevelReloc, [t]); + else if (Q2.symbols) { + Q2.symidx || (Q2.symidx = CJ(Q2.symbols)); + var u = Q2.symidx[t]; + u >= 0 ? x = u : Z2("caml_register_global: cannot locate " + t); + } + } + Q2[x + 1] = r, e && (Q2[e] = r); + } + function CN(x, r) { + return Nq[x] = r, 0; + } + function NJ(x) { + return x[2] = wq++, x; + } + function Sr(x, r) { + return x === r ? 1 : 0; + } + function OJ() { + u2(EC); + } + function F1(x, r) { + return r >>> 0 >= Rx(x) && OJ(), z0(x, r); + } + function C(x, r) { + return 1 - Sr(x, r); + } + function I2(x) { + return x.t & 6 && Oh(x), x.c; + } + function jJ() { + return 536870911; + } + var DJ = a0.process && a0.process.platform && a0.process.platform == aD ? zR : "Unix"; + function RJ() { + return [ + 0, + DJ, + 32, + 0 + ]; + } + function FJ() { + uq(Q2.Not_found); + } + function Fq(x) { + var r = rq(Wx(x)); + return r === void 0 && FJ(), Ot(r); + } + function MJ() { + if (a0.crypto) { + if (a0.crypto.getRandomValues) { + var x = a0.crypto.getRandomValues(/* @__PURE__ */ new Int32Array(4)); + return [ + 0, + x[0], + x[1], + x[2], + x[3] + ]; + } else if (a0.crypto.randomBytes) { + var x = new Int32Array(a0.crypto.randomBytes(16).buffer); + return [ + 0, + x[0], + x[1], + x[2], + x[3] + ]; + } + } + return [0, (/* @__PURE__ */ new Date()).getTime() ^ 4294967295 * Math.random()]; + } + function Jh(x) { + for (var r = 1; x && x.joo_tramp;) x = x.joo_tramp.apply(null, x.joo_args), r++; + return x; + } + function z1(x, r) { + return { + joo_tramp: x, + joo_args: r + }; + } + function Dr(x, r) { + if (r.fun) return x.fun = r.fun, 0; + if (typeof r == "function") return x.fun = r, 0; + for (var e = r.length; e--;) x[e] = r[e]; + return 0; + } + function M1(x) { + if (x instanceof Array) return x; + var r; + return a0.RangeError && x instanceof a0.RangeError && x.message && x.message.match(/maximum call stack/i) || a0.InternalError && x instanceof a0.InternalError && x.message && x.message.match(/too much recursion/i) ? r = Q2.Stack_overflow : x instanceof a0.Error && Mo(dA) ? r = [ + 0, + Mo(dA), + x + ] : r = [ + 0, + Q2.Failure, + Ot(String(x)) + ], x instanceof a0.Error && (r.js_error = x), r; + } + function LJ(x) { + switch (x[2]) { + case -8: + case -11: + case -12: return 1; + default: return 0; + } + } + function qJ(x) { + var r = rx; + if (x[0] == 0) { + if (r += x[1][1], x.length == 3 && x[2][0] == 0 && LJ(x[1])) var t = x[2], e = 1; + else var e = 2, t = x; + r += PM; + for (var u = e; u < t.length; u++) { + u > e && (r += sF); + var i = t[u]; + typeof i == "number" ? r += i.toString() : i instanceof Oa || typeof i == "string" ? r += I8 + i.toString() + I8 : r += Pv; + } + r += iM; + } else x[0] == t1 && (r += x[1]); + return r; + } + function Mq(x) { + if (x instanceof Array && (x[0] == 0 || x[0] == t1)) { + var r = Mo(ID); + if (r) Bh(r, [x, !1]); + else { + var e = qJ(x), t = Mo(PR); + if (t && Bh(t, [0]), console.error(CS + e), x.js_error) throw x.js_error; + } + } else throw x; + } + function BJ() { + var x = a0.process; + x && x.on ? x.on("uncaughtException", function(r, e) { + Mq(r), x.exit(2); + }) : a0.addEventListener && a0.addEventListener("error", function(r) { + r.error && Mq(r.error); + }); + } + BJ(); + function d(x, r) { + return (x.l >= 0 ? x.l : x.l = x.length) == 1 ? x(r) : Os(x, [r]); + } + function p(x, r, e) { + return (x.l >= 0 ? x.l : x.l = x.length) == 2 ? x(r, e) : Os(x, [r, e]); + } + function Z0(x, r, e, t) { + return (x.l >= 0 ? x.l : x.l = x.length) == 3 ? x(r, e, t) : Os(x, [ + r, + e, + t + ]); + } + function c4(x, r, e, t, u) { + return (x.l >= 0 ? x.l : x.l = x.length) == 4 ? x(r, e, t, u) : Os(x, [ + r, + e, + t, + u + ]); + } + function La(x, r, e, t, u, i) { + return (x.l >= 0 ? x.l : x.l = x.length) == 5 ? x(r, e, t, u, i) : Os(x, [ + r, + e, + t, + u, + i + ]); + } + function UJ(x, r, e, t, u, i, c) { + return (x.l >= 0 ? x.l : x.l = x.length) == 6 ? x(r, e, t, u, i, c) : Os(x, [ + r, + e, + t, + u, + i, + c + ]); + } + function XJ(x, r, e, t, u, i, c, v) { + return (x.l >= 0 ? x.l : x.l = x.length) == 7 ? x(r, e, t, u, i, c, v) : Os(x, [ + r, + e, + t, + u, + i, + c, + v + ]); + } + var D = void 0, NN = [ + t1, + cD, + -1 + ], Lq = [ + t1, + oL, + -2 + ], mn = [ + t1, + sy, + -3 + ], Kh = [ + t1, + PL, + -4 + ], Ds = [ + t1, + tF, + -7 + ], qq = [ + t1, + dD, + -8 + ], Bq = [ + t1, + RM, + -9 + ], Nr = [ + t1, + _M, + -11 + ], s4 = [ + t1, + QF, + -12 + ], GJ = [ + 4, + 0, + 0, + 0, + [ + 12, + 45, + [ + 4, + 0, + 0, + 0, + 0 + ] + ] + ], ON = [ + 0, + [ + 11, + "File \"", + [ + 2, + 0, + [ + 11, + "\", line ", + [ + 4, + 0, + 0, + 0, + [ + 11, + mD, + [ + 4, + 0, + 0, + 0, + [ + 12, + 45, + [ + 4, + 0, + 0, + 0, + [ + 11, + ": ", + [ + 2, + 0, + 0 + ] + ] + ] + ] + ] + ] + ] + ] + ] + ], + "File \"%s\", line %d, characters %d-%d: %s" + ], dl = [ + 0, + 0, + [ + 0, + 0, + 0 + ], + [ + 0, + 0, + 0 + ] + ], Lo = [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], Uq = [ + 0, + "first_leading", + "last_trailing" + ], Xq = [ + 0, + Af, + tn, + vc, + tf, + Lc, + Ti, + Pu, + Tu, + u7, + ls, + ki, + R7, + G7, + vn, + zc, + iu, + We, + Cs, + _i, + Ji, + l7, + li, + c7, + Pf, + Su, + Gu, + Ff, + Wu, + yi, + Si, + ei, + B7, + Wf, + sc, + y7, + ji, + Ef, + yc, + H7, + uf, + ru, + Hf, + qi, + gc, + Jn, + _s, + Sc, + Vf, + mu, + K7, + ns, + Wc, + ri, + ff, + rf, + Xe, + Ke, + us, + xc, + ou, + zi, + yu, + lf, + gi, + Gc, + wi, + Ic, + hc, + qn, + Ju, + nf, + be, + j7, + ju, + bu, + Ec, + wc, + Bf, + Hc, + O7, + Ts, + Oc, + Xc, + Yf, + Ac, + Yi, + Yn, + A7, + Is, + yf, + Mc, + Un, + t2, + p7, + ts, + Nc, + C7, + mi, + Mf, + b7, + v7, + bf, + ws, + Hi, + hi, + Ci, + vs, + Qn, + wf, + Iu, + As, + nc, + gf, + cu, + ti, + _c, + kc, + S7, + Qi, + di, + Ru, + vi, + i7, + tu, + gs, + qc, + Ni, + St, + cs, + U7, + Ri, + W2, + Gn, + Vi, + as, + Df, + Ou, + cc, + is, + lc, + ae, + vf, + eu, + xi, + Yu, + zn, + Rc, + Di, + Mi, + fi, + ds, + I7, + Xf, + Z7, + D7, + f7, + zf, + Bu, + dc, + z7, + Dc, + Tc, + ms, + Jf, + Tf, + xu, + ku, + pf, + ai, + Bc, + Hn, + g7, + G1, + oi, + N7, + os, + su, + Yc, + Cu, + Au, + gu, + mf, + L7, + ps, + E7, + du, + uu, + Nf, + hf, + uc, + Ki, + W7, + df, + hs, + Kn, + wu, + Cc, + Ei, + Mu, + Xu, + Kc, + Gf, + ys, + Ui, + Zc, + Ii, + n7, + si, + $u, + Hu, + Oi, + ni, + zu, + Vc, + Xn, + sf, + Lu, + kf, + Qf, + Xi, + r7, + Vn, + Pc, + Kf, + o7, + e7, + Wn, + bs, + Vu, + rc, + x7, + es, + ge, + Eu, + Ai, + $c, + bi, + Y7, + Fu, + jf, + Bn, + m7, + Zi, + Fc, + au, + $f, + P7, + af, + xf, + pu, + M7, + Zu, + Pi, + Lf, + Ge, + fs, + _7, + If, + a7, + q7, + pi, + Ku, + fc, + qu, + Of, + w7, + ci, + Je, + T7, + lu, + ii, + ss, + k7, + fu, + Uu, + Jc, + Ve, + rs, + ic, + Bi, + Qc, + s7, + Wi, + t7, + He, + Q7, + jc, + Uc, + Es, + Sf, + _f, + oc, + Ps, + ac, + $n, + vu, + _u, + Zf, + Zn, + X7, + cf, + ui, + J7, + Uf, + Qu, + d7, + F7, + hu, + Fi, + Du, + Gi, + Rf, + bc, + pc, + h7, + qf, + $2, + V7, + $i, + of, + H2 + ], hn = [ + 0, + 0, + 0 + ]; + Dt(11, s4, QF), Dt(10, Nr, _M), Dt(9, [ + t1, + oM, + MM + ], oM), Dt(8, Bq, RM), Dt(7, qq, dD), Dt(6, Ds, tF), Dt(5, [ + t1, + MR, + -6 + ], MR), Dt(4, [ + t1, + $M, + -5 + ], $M), Dt(3, Kh, PL), Dt(2, mn, sy), Dt(1, Lq, oL), Dt(0, NN, cD); + function L1(x) { + if (typeof x == "number") return 0; + switch (x[0]) { + case 0: return [0, L1(x[1])]; + case 1: return [1, L1(x[1])]; + case 2: return [2, L1(x[1])]; + case 3: return [3, L1(x[1])]; + case 4: return [4, L1(x[1])]; + case 5: return [5, L1(x[1])]; + case 6: return [6, L1(x[1])]; + case 7: return [7, L1(x[1])]; + case 8: return [ + 8, + x[1], + L1(x[2]) + ]; + case 9: + var e = x[1]; + return [ + 9, + e, + e, + L1(x[3]) + ]; + case 10: return [10, L1(x[1])]; + case 11: return [11, L1(x[1])]; + case 12: return [12, L1(x[1])]; + case 13: return [13, L1(x[1])]; + default: return [14, L1(x[1])]; + } + } + function le(x, r) { + if (typeof x == "number") return r; + switch (x[0]) { + case 0: return [0, le(x[1], r)]; + case 1: return [1, le(x[1], r)]; + case 2: return [2, le(x[1], r)]; + case 3: return [3, le(x[1], r)]; + case 4: return [4, le(x[1], r)]; + case 5: return [5, le(x[1], r)]; + case 6: return [6, le(x[1], r)]; + case 7: return [7, le(x[1], r)]; + case 8: return [ + 8, + x[1], + le(x[2], r) + ]; + case 9: + var t = x[2]; + return [ + 9, + x[1], + t, + le(x[3], r) + ]; + case 10: return [10, le(x[1], r)]; + case 11: return [11, le(x[1], r)]; + case 12: return [12, le(x[1], r)]; + case 13: return [13, le(x[1], r)]; + default: return [14, le(x[1], r)]; + } + } + function A1(x, r) { + if (typeof x == "number") return r; + switch (x[0]) { + case 0: return [0, A1(x[1], r)]; + case 1: return [1, A1(x[1], r)]; + case 2: return [ + 2, + x[1], + A1(x[2], r) + ]; + case 3: return [ + 3, + x[1], + A1(x[2], r) + ]; + case 4: + var u = x[3], i = x[2]; + return [ + 4, + x[1], + i, + u, + A1(x[4], r) + ]; + case 5: + var v = x[3], o = x[2]; + return [ + 5, + x[1], + o, + v, + A1(x[4], r) + ]; + case 6: + var k = x[3], h = x[2]; + return [ + 6, + x[1], + h, + k, + A1(x[4], r) + ]; + case 7: + var T = x[3], I = x[2]; + return [ + 7, + x[1], + I, + T, + A1(x[4], r) + ]; + case 8: + var P = x[3], R = x[2]; + return [ + 8, + x[1], + R, + P, + A1(x[4], r) + ]; + case 9: return [ + 9, + x[1], + A1(x[2], r) + ]; + case 10: return [10, A1(x[1], r)]; + case 11: return [ + 11, + x[1], + A1(x[2], r) + ]; + case 12: return [ + 12, + x[1], + A1(x[2], r) + ]; + case 13: + var x0 = x[2]; + return [ + 13, + x[1], + x0, + A1(x[3], r) + ]; + case 14: + var Z = x[2]; + return [ + 14, + x[1], + Z, + A1(x[3], r) + ]; + case 15: return [15, A1(x[1], r)]; + case 16: return [16, A1(x[1], r)]; + case 17: return [ + 17, + x[1], + A1(x[2], r) + ]; + case 18: return [ + 18, + x[1], + A1(x[2], r) + ]; + case 19: return [19, A1(x[1], r)]; + case 20: + var k0 = x[2]; + return [ + 20, + x[1], + k0, + A1(x[3], r) + ]; + case 21: return [ + 21, + x[1], + A1(x[2], r) + ]; + case 22: return [22, A1(x[1], r)]; + case 23: return [ + 23, + x[1], + A1(x[2], r) + ]; + default: + var v0 = x[2]; + return [ + 24, + x[1], + v0, + A1(x[3], r) + ]; + } + } + function Px(x) { + throw J0([ + 0, + mn, + x + ], 1); + } + function U2(x) { + throw J0([ + 0, + Kh, + x + ], 1); + } + function Hh(x) { + return 0 <= x ? x : -x | 0; + } + var YJ = Pa, zJ = wa; + function Gx(x, r) { + var e = Rx(x), t = Rx(r), u = b1(e + t | 0); + return Ns(x, 0, u, 0, e), Ns(r, 0, u, e, t), I2(u); + } + function qx(x, r) { + if (!x) return r; + var e = x[2], t = x[1]; + if (!e) return [ + 0, + t, + r + ]; + var u = e[2], i = e[1]; + if (!u) return [ + 0, + t, + [ + 0, + i, + r + ] + ]; + for (var c = [ + 0, + u[1], + To + ], v = c, o = 1, l = u[2];;) { + if (l) { + var k = l[2], h = l[1]; + if (k) { + var E = k[2], T = k[1]; + if (E) { + var I = [ + 0, + E[1], + To + ], N = E[2]; + v[1 + o] = [ + 0, + h, + [ + 0, + T, + I + ] + ]; + var v = I, o = 1, l = N; + continue; + } + v[1 + o] = [ + 0, + h, + [ + 0, + T, + r + ] + ]; + } else v[1 + o] = [ + 0, + h, + r + ]; + } else v[1 + o] = r; + return [ + 0, + t, + [ + 0, + i, + c + ] + ]; + } + } + SJ(0); + var Gq = Dq(1), dn = Dq(2), JJ = "output_substring"; + function a4(x, r) { + IN(x, r, 0, Rx(r)); + } + function Yq(x, r, e, t) { + return 0 <= e && 0 <= t && (Rx(r) - t | 0) >= e ? IN(x, r, e, t) : U2(JJ); + } + function zq(x) { + return a4(dn, x), Rq(dn, 10), pn(dn); + } + var jN = [0, function(x) { + for (var r = AJ(0);;) { + if (!r) return 0; + var e = r[2], t = r[1]; + try { + pn(t); + } catch (c) { + var u = M1(c); + if (u[1] !== Lq) throw J0(u, 0); + } + var r = e; + } + }], Jq = [0, function(x) {}]; + function DN(x) { + return d(Jq[1], 0), d(vl(jN), 0); + } + CN(PR, DN); + var Kq = RJ(0)[1], o4 = (4 * jJ(0) | 0) - 1 | 0; + function Wh(x, r) { + return r ? [0, d(x, r[1])] : 0; + } + function t3(x) { + return x ? 1 : 0; + } + function Hq(x) { + return 25 < x + zk >>> 0 ? x : x - 32 | 0; + } + var KJ = "hd", HJ = "tl", WJ = "List.iter2"; + function qa(x) { + for (var r = 0, e = x;;) { + if (!e) return r; + var r = r + 1 | 0, e = e[2]; + } + } + function v4(x) { + return x ? x[1] : Px(KJ); + } + function Wq(x) { + return x ? x[2] : Px(HJ); + } + function yl(x, r) { + for (var e = x, t = r;;) { + if (!e) return t; + var u = [ + 0, + e[1], + t + ], e = e[2], t = u; + } + } + function cx(x) { + return yl(x, 0); + } + function _l(x) { + if (!x) return 0; + var r = x[1]; + return qx(r, _l(x[2])); + } + function yn(x, r) { + if (!r) return 0; + var e = r[2], t = r[1]; + if (!e) return [ + 0, + x(t), + 0 + ]; + for (var u = e[2], i = e[1], c = x(t), v = [ + 0, + x(i), + To + ], o = v, l = 1, k = u;;) { + if (k) { + var h = k[2], E = k[1]; + if (h) { + var T = h[2], I = h[1], N = x(E), P = [ + 0, + x(I), + To + ]; + o[1 + l] = [ + 0, + N, + P + ]; + var o = P, l = 1, k = T; + continue; + } + o[1 + l] = [ + 0, + x(E), + 0 + ]; + } else o[1 + l] = 0; + return [ + 0, + c, + v + ]; + } + } + function Vh(x, r) { + for (var e = 0, t = r;;) { + if (!t) return e; + var u = t[2], e = [ + 0, + x(t[1]), + e + ], t = u; + } + } + function P2(x, r) { + for (var e = r;;) { + if (!e) return 0; + var t = e[2]; + d(x, e[1]); + var e = t; + } + } + function y2(x, r, e) { + for (var t = r, u = e;;) { + if (!u) return t; + var i = u[2], t = p(x, t, u[1]), u = i; + } + } + function RN(x, r, e) { + if (!r) return e; + var t = r[1]; + return x(t, RN(x, r[2], e)); + } + function Vq(x, r, e) { + for (var t = r, u = e;;) { + if (t) { + if (u) { + var i = u[2], c = t[2]; + x(t[1], u[1]); + var t = c, u = i; + continue; + } + } else if (!u) return; + return U2(WJ); + } + } + function wl(x, r) { + for (var e = r;;) { + if (!e) return 0; + var t = e[2], u = d(x, e[1]); + if (u) return u; + var e = t; + } + } + function FN(x, r) { + for (var e = r;;) { + if (!e) return 0; + var t = e[2], u = yq(e[1], x) === 0 ? 1 : 0; + if (u) return u; + var e = t; + } + } + function l4(x, r) { + for (var e = r;;) { + if (!e) return 0; + var t = e[2], u = e[1]; + if (x(u)) for (var i = [ + 0, + u, + To + ], c = i, v = 1, o = t;;) { + if (!o) return c[1 + v] = 0, i; + var l = o[2], k = o[1]; + if (x(k)) { + var h = [ + 0, + k, + To + ]; + c[1 + v] = h; + var c = h, v = 1, o = l; + } else var o = l; + } + else var e = t; + } + } + var VJ = "String.sub / Bytes.sub", $J = "Bytes.blit", QJ = "String.blit / Bytes.blit_string"; + function n3(x, r) { + var e = b1(x); + return $z(e, 0, x, r), e; + } + function $q(x, r, e) { + if (0 <= r && 0 <= e && (jt(x) - e | 0) >= r) { + var t = b1(e); + return Na(x, r, t, 0, e), t; + } + return U2(VJ); + } + function gl(x, r, e) { + return I2($q(x, r, e)); + } + function Qq(x, r, e, t, u) { + if (0 <= u && 0 <= r && (jt(x) - u | 0) >= r && 0 <= t && (jt(e) - u | 0) >= t) { + Na(x, r, e, t, u); + return; + } + return U2($J); + } + function _n(x, r, e, t, u) { + if (0 <= u && 0 <= r && (Rx(x) - u | 0) >= r && 0 <= t && (jt(e) - u | 0) >= t) { + Ns(x, r, e, t, u); + return; + } + return U2(QJ); + } + var ZJ = "String.concat", xK = rx; + function $h(x, r) { + return I2(n3(x, r)); + } + function C2(x, r, e) { + return I2($q(Nt(x), r, e)); + } + function Zq(x, r) { + if (!r) return xK; + var e = Rx(x); + x: { + r: { + for (var t = 0, u = r, i = 0; u;) { + var c = u[1]; + if (!u[2]) break r; + var v = (Rx(c) + e | 0) + t | 0, o = u[2], t = t <= v ? v : U2(ZJ), u = o; + } + var k = t; + break x; + } + var k = Rx(c) + t | 0; + } + for (var h = b1(k), E = i, T = r;;) { + if (T) { + var I = T[1]; + if (T[2]) { + var N = T[2]; + Ns(I, 0, h, E, Rx(I)), Ns(x, 0, h, E + Rx(I) | 0, e); + var E = (E + Rx(I) | 0) + e | 0, T = N; + continue; + } + Ns(I, 0, h, E, Rx(I)); + } + return I2(h); + } + } + function xB(x) { + var r = Nt(x); + if (jt(r) === 0) var e = r; + else { + var t = jt(r), u = b1(t); + Na(r, 0, u, 0, t), zr(u, 0, Hq(oe(r, 0))); + var e = u; + } + return I2(e); + } + function rB(x, r) { + var e = [0, 0], t = [0, Rx(r)], u = Rx(r) - 1 | 0; + if (u >= 0) for (var i = u;;) { + if (z0(r, i) === x) { + var c = e[1]; + e[1] = [ + 0, + C2(r, i + 1 | 0, (t[1] - i | 0) - 1 | 0), + c + ], t[1] = i; + } + var v = i - 1 | 0; + if (i === 0) break; + var i = v; + } + var o = e[1]; + return [ + 0, + C2(r, 0, t[1]), + o + ]; + } + function Qh(x, r) { + return Dz(Nt(x), r); + } + var rK = "Array.blit"; + function eB(x, r, e, t, u) { + if (0 <= u && 0 <= r && (x.length - 1 - u | 0) >= r && 0 <= t && (e.length - 1 - u | 0) >= t) { + Ez(x, r, e, t, u); + return; + } + return U2(rK); + } + function tB(x, r) { + var e = r.length - 1 - 1 | 0, t = 0; + if (e >= 0) for (var u = t;;) { + x(r[1 + u]); + var i = u + 1 | 0; + if (e === u) break; + var u = i; + } + } + function Zh(x, r) { + var e = r.length - 1; + if (e === 0) return [0]; + var t = Fo(e, x(r[1])), u = e - 1 | 0, i = 1; + if (u >= 1) for (var c = i;;) { + t[1 + c] = x(r[1 + c]); + var v = c + 1 | 0; + if (u === c) break; + var c = v; + } + return t; + } + function p4(x) { + if (!x) return [0]; + for (var r = 0, e = x, t = x[2], u = x[1]; e;) var r = r + 1 | 0, e = e[2]; + for (var i = Fo(r, u), c = 1, v = t;;) { + if (!v) return i; + var o = v[2]; + i[1 + c] = v[1]; + var c = c + 1 | 0, v = o; + } + } + function nB(x) { + try { + return [0, Zv(x)]; + } catch (t) { + var e = M1(t); + if (e[1] === mn) return 0; + throw J0(e, 0); + } + } + var eK = B8, tK = B8, nK = B8, uK = B8; + function MN(x) { + function r(c) { + return c ? c[5] : 0; + } + function e(c, v, o, l) { + var k = r(c), h = r(l); + return [ + 0, + c, + v, + o, + l, + h <= k ? k + 1 | 0 : h + 1 | 0 + ]; + } + function t(c, v, o, l) { + var k = c ? c[5] : 0, h = l ? l[5] : 0; + if ((h + 2 | 0) < k) { + if (!c) return U2(tK); + var E = c[4], T = c[3], I = c[2], N = c[1]; + if (r(E) <= r(N)) return e(N, I, T, e(E, v, o, l)); + if (!E) return U2(eK); + var R = E[3], q = E[2], X = E[1], B = e(E[4], v, o, l); + return e(e(N, I, T, X), q, R, B); + } + if ((k + 2 | 0) >= h) return [ + 0, + c, + v, + o, + l, + h <= k ? k + 1 | 0 : h + 1 | 0 + ]; + if (!l) return U2(uK); + var x0 = l[4], W = l[3], Z = l[2], t0 = l[1]; + if (r(t0) <= r(x0)) return e(e(c, v, o, t0), Z, W, x0); + if (!t0) return U2(nK); + var u0 = t0[3], k0 = t0[2], o0 = t0[1], S0 = e(t0[4], Z, W, x0); + return e(e(c, v, o, o0), k0, u0, S0); + } + function u(c, v, o) { + if (!o) return [ + 0, + 0, + c, + v, + 0, + 1 + ]; + var l = o[4], k = o[3], h = o[2], E = o[1], T = o[5], I = p(x[1], c, h); + if (I === 0) return k === v ? o : [ + 0, + E, + c, + v, + l, + T + ]; + if (0 <= I) { + var N = u(c, v, l); + return l === N ? o : t(E, h, k, N); + } + var P = u(c, v, E); + return E === P ? o : t(P, h, k, l); + } + function i(c, v, o) { + for (var l = v, k = o;;) { + if (!l) return k; + var h = l[4], E = l[3], T = l[2], I = c(T, E, i(c, l[1], k)), l = h, k = I; + } + } + return [ + 0, + 0, + u, + , + , + , + , + , + , + , + , + , + , + , + , + , + , + function(c, v) { + for (var o = v;;) { + if (!o) throw J0(Ds, 1); + var l = o[4], k = o[3], h = o[1], E = p(x[1], c, o[2]); + if (E === 0) return k; + var o = 0 <= E ? l : h; + } + }, + , + , + , + , + , + , + i + ]; + } + function k4(x) { + return [ + 0, + 0, + 0 + ]; + } + function m4(x) { + x[1] = 0, x[2] = 0; + } + function u3(x, r) { + r[1] = [ + 0, + x, + r[1] + ], r[2] = r[2] + 1 | 0; + } + function bl(x) { + var r = x[1]; + if (!r) return 0; + var e = r[1]; + return x[1] = r[2], x[2] = x[2] - 1 | 0, [0, e]; + } + function Tl(x) { + var r = x[1]; + return r ? [0, r[1]] : 0; + } + function uB(x) { + return [ + 0, + 0, + 0, + 0 + ]; + } + function LN(x) { + x[1] = 0, x[2] = 0, x[3] = 0; + } + function qN(x, r) { + var e = [ + 0, + x, + 0 + ], t = r[3]; + return t ? (r[1] = r[1] + 1 | 0, t[2] = e, r[3] = e, 0) : (r[1] = 1, r[2] = e, r[3] = e, 0); + } + var iK = "Buffer.add: cannot grow buffer", fK = "Buffer.add_substring/add_subbytes"; + function Kr(x) { + var r = 1 <= x ? x : 1, e = o4 < r ? o4 : r, t = b1(e); + return [ + 0, + [ + 0, + t, + e + ], + 0, + t + ]; + } + function J1(x) { + return gl(x[1][1], 0, x[2]); + } + function BN(x, r) { + for (var e = x[2], t = [0, x[1][2]]; !(t[1] >= (e + r | 0));) t[1] = 2 * t[1] | 0; + o4 < t[1] && ((e + r | 0) <= o4 ? t[1] = o4 : Px(iK)); + var u = b1(t[1]); + Qq(x[1][1], 0, u, 0, x[2]), x[1] = [ + 0, + u, + t[1] + ]; + } + function at(x, r) { + var e = x[2], t = x[1], u = t[1]; + t[2] <= e ? (BN(x, 1), ja(x[1][1], x[2], r)) : zr(u, e, r), x[2] = e + 1 | 0; + } + function UN(x, r, e, t) { + var u = e < 0 ? 1 : 0; + if (u) var c = u; + else var i = t < 0 ? 1 : 0, c = i || ((Rx(r) - t | 0) < e ? 1 : 0); + c && U2(fK); + var v = x[2], o = x[1], l = v + t | 0, k = o[1]; + return o[2] < l ? (BN(x, t), _n(r, e, x[1][1], x[2], t)) : Ns(r, e, k, v, t), x[2] = l, 0; + } + function XN(x, r, e, t) { + return UN(x, I2(r), e, t); + } + function lr(x, r) { + var e = Rx(r), t = x[2], u = x[1], i = t + e | 0, c = u[1]; + u[2] < i ? (BN(x, e), _n(r, 0, x[1][1], x[2], e)) : Ns(r, 0, c, t, e), x[2] = i; + } + var GN = [0, 0]; + function iB(x) { + return x !== GN ? 1 : 0; + } + Vz(Fo(8, GN)); + var fB = [0, 0], cK = [0, 0], sK = [ + 0, + "domain.ml", + Wm, + 13 + ]; + function Rs(x, r) { + var e = [ + 0, + Iz(cK, 1), + r + ]; + if (x) for (var t = [ + 0, + e, + x[1] + ];;) { + var u = vl(fB); + if (!(1 - Ph(fB, u, [ + 0, + t, + u + ]))) break; + } + return e; + } + function cB(x) { + for (;;) { + var r = _q(0), e = r.length - 1; + if (x < e) return r; + for (var t = e; !(x < t);) var t = 2 * t | 0; + var u = Fo(t, GN); + if (eB(r, 0, u, 0, e), Wz(r, u)) return u; + } + } + function h4(x, r) { + var e = x[1]; + S1(cB(e), e)[1 + e] = r; + } + function i3(x) { + var r = x[1], e = x[2], t = S1(cB(r), r)[1 + r]; + if (iB(t)) return t; + var u = d(e, 0), i = _q(0); + if (S1(i, r)[1 + r] === t ? (i[1 + r] = u, 1) : 0) return u; + var v = S1(i, r)[1 + r]; + if (iB(v)) return v; + throw J0([ + 0, + Nr, + sK + ], 1); + } + var YN = Rs(0, function(x) { + return function(r) { + return 0; + }; + }); + function sB(x) { + var r = i3(YN); + return h4(YN, function(e) { + return x(D), d(r, 0); + }); + } + Jq[1] = function(x) { + return d(i3(YN), 0); + }; + var aK = iI, oK = "@}", vK = "@?", lK = `@ +`, pK = "@.", kK = "@@", mK = "@%", hK = _D, dK = "%c", yK = "%s", _K = QR, wK = RL, gK = uD, bK = iF, TK = "%f", EK = "%B", SK = "%{", AK = "%}", IK = "%(", PK = "%)", CK = "%a", NK = "%t", OK = "%?", jK = "%r", DK = "%_r", RK = [ + 0, + m2, + 850, + 23 + ], FK = [ + 0, + m2, + 837, + 26 + ], MK = [ + 0, + m2, + 847, + 28 + ], LK = [ + 0, + m2, + 815, + 21 + ], qK = [ + 0, + m2, + 819, + 21 + ], BK = [ + 0, + m2, + 823, + 19 + ], UK = [ + 0, + m2, + 827, + 22 + ], XK = [ + 0, + m2, + 832, + 30 + ], GK = [ + 0, + m2, + 851, + 23 + ], YK = [ + 0, + m2, + 836, + 26 + ], zK = [ + 0, + m2, + 846, + 28 + ], JK = [ + 0, + m2, + 814, + 21 + ], KK = [ + 0, + m2, + 818, + 21 + ], HK = [ + 0, + m2, + 822, + 19 + ], WK = [ + 0, + m2, + 826, + 22 + ], VK = [ + 0, + m2, + 831, + 30 + ]; + function zN(x) { + return x[2] === 5 ? 12 : -6; + } + function aB(x) { + return [ + 0, + 0, + b1(x) + ]; + } + function oB(x, r) { + var e = jt(x[2]), t = x[1] + r | 0; + if (e < t) { + var u = e * 2 | 0, c = b1(t <= u ? u : t); + Qq(x[2], 0, c, 0, e), x[2] = c; + } + } + function El(x, r) { + oB(x, 1), ja(x[2], x[1], r), x[1] = x[1] + 1 | 0; + } + function X2(x, r) { + var e = Rx(r); + oB(x, e), _n(r, 0, x[2], x[1], e), x[1] = x[1] + e | 0; + } + function vB(x) { + return gl(x[2], 0, x[1]); + } + function lB(x) { + if (typeof x == "number") switch (x) { + case 0: return aK; + case 1: return oK; + case 2: return vK; + case 3: return lK; + case 4: return pK; + case 5: return kK; + default: return mK; + } + switch (x[0]) { + case 0: return x[1]; + case 1: return x[1]; + default: return Gx(hK, $h(1, x[1])); + } + } + function JN(x, r) { + for (var e = r;;) { + if (typeof e == "number") return; + switch (e[0]) { + case 0: + var t = e[1]; + X2(x, dK); + var e = t; + break; + case 1: + var u = e[1]; + X2(x, yK); + var e = u; + break; + case 2: + var i = e[1]; + X2(x, _K); + var e = i; + break; + case 3: + var c = e[1]; + X2(x, wK); + var e = c; + break; + case 4: + var v = e[1]; + X2(x, gK); + var e = v; + break; + case 5: + var o = e[1]; + X2(x, bK); + var e = o; + break; + case 6: + var l = e[1]; + X2(x, TK); + var e = l; + break; + case 7: + var k = e[1]; + X2(x, EK); + var e = k; + break; + case 8: + var h = e[2], E = e[1]; + X2(x, SK), JN(x, E), X2(x, AK); + var e = h; + break; + case 9: + var T = e[3], I = e[1]; + X2(x, IK), JN(x, I), X2(x, PK); + var e = T; + break; + case 10: + var N = e[1]; + X2(x, CK); + var e = N; + break; + case 11: + var P = e[1]; + X2(x, NK); + var e = P; + break; + case 12: + var R = e[1]; + X2(x, OK); + var e = R; + break; + case 13: + var q = e[1]; + X2(x, jK); + var e = q; + break; + default: + var X = e[1]; + X2(x, DK); + var e = X; + } + } + } + function f2(x) { + if (typeof x == "number") return 0; + switch (x[0]) { + case 0: return [0, f2(x[1])]; + case 1: return [1, f2(x[1])]; + case 2: return [2, f2(x[1])]; + case 3: return [3, f2(x[1])]; + case 4: return [4, f2(x[1])]; + case 5: return [5, f2(x[1])]; + case 6: return [6, f2(x[1])]; + case 7: return [7, f2(x[1])]; + case 8: return [ + 8, + x[1], + f2(x[2]) + ]; + case 9: return [ + 9, + x[2], + x[1], + f2(x[3]) + ]; + case 10: return [10, f2(x[1])]; + case 11: return [11, f2(x[1])]; + case 12: return [12, f2(x[1])]; + case 13: return [13, f2(x[1])]; + default: return [14, f2(x[1])]; + } + } + function G2(x) { + if (typeof x == "number") return [ + 0, + function(h0) {}, + function(h0) {}, + function(h0) {}, + function(h0) {} + ]; + switch (x[0]) { + case 0: + var r = G2(x[1]), e = r[2], t = r[1]; + return [ + 0, + function(h0) { + t(D); + }, + function(h0) { + e(D); + }, + r[3], + r[4] + ]; + case 1: + var u = G2(x[1]), i = u[2], c = u[1]; + return [ + 0, + function(h0) { + c(D); + }, + function(h0) { + i(D); + }, + u[3], + u[4] + ]; + case 2: + var v = G2(x[1]), o = v[2], l = v[1]; + return [ + 0, + function(h0) { + l(D); + }, + function(h0) { + o(D); + }, + v[3], + v[4] + ]; + case 3: + var k = G2(x[1]), h = k[2], E = k[1]; + return [ + 0, + function(h0) { + E(D); + }, + function(h0) { + h(D); + }, + k[3], + k[4] + ]; + case 4: + var T = G2(x[1]), I = T[2], N = T[1]; + return [ + 0, + function(h0) { + N(D); + }, + function(h0) { + I(D); + }, + T[3], + T[4] + ]; + case 5: + var P = G2(x[1]), R = P[2], q = P[1]; + return [ + 0, + function(h0) { + q(D); + }, + function(h0) { + R(D); + }, + P[3], + P[4] + ]; + case 6: + var X = G2(x[1]), B = X[2], z = X[1]; + return [ + 0, + function(h0) { + z(D); + }, + function(h0) { + B(D); + }, + X[3], + X[4] + ]; + case 7: + var x0 = G2(x[1]), W = x0[2], Z = x0[1]; + return [ + 0, + function(h0) { + Z(D); + }, + function(h0) { + W(D); + }, + x0[3], + x0[4] + ]; + case 8: + var t0 = G2(x[2]), i0 = t0[2], u0 = t0[1]; + return [ + 0, + function(h0) { + u0(D); + }, + function(h0) { + i0(D); + }, + t0[3], + t0[4] + ]; + case 9: + var k0 = x[2], o0 = x[1], S0 = G2(x[3]), s0 = S0[4], v0 = S0[3], m0 = S0[2], p0 = S0[1], E0 = G2(_2(f2(o0), k0)), b0 = E0[4], C0 = E0[3], D0 = E0[2], U0 = E0[1]; + return [ + 0, + function(h0) { + p0(D), U0(D); + }, + function(h0) { + D0(D), m0(D); + }, + function(h0) { + v0(D), C0(D); + }, + function(h0) { + b0(D), s0(D); + } + ]; + case 10: + var T0 = G2(x[1]), M0 = T0[2], y0 = T0[1]; + return [ + 0, + function(h0) { + y0(D); + }, + function(h0) { + M0(D); + }, + T0[3], + T0[4] + ]; + case 11: + var G = G2(x[1]), j0 = G[2], Q0 = G[1]; + return [ + 0, + function(h0) { + Q0(D); + }, + function(h0) { + j0(D); + }, + G[3], + G[4] + ]; + case 12: + var q0 = G2(x[1]), ix = q0[2], xx = q0[1]; + return [ + 0, + function(h0) { + xx(D); + }, + function(h0) { + ix(D); + }, + q0[3], + q0[4] + ]; + case 13: + var fx = G2(x[1]), yx = fx[4], R0 = fx[3], lx = fx[2], kx = fx[1]; + return [ + 0, + function(h0) { + kx(D); + }, + function(h0) { + lx(D); + }, + function(h0) { + R0(D); + }, + function(h0) { + yx(D); + } + ]; + default: + var Q = G2(x[1]), I0 = Q[4], M = Q[3], d0 = Q[2], g0 = Q[1]; + return [ + 0, + function(h0) { + g0(D); + }, + function(h0) { + d0(D); + }, + function(h0) { + M(D); + }, + function(h0) { + I0(D); + } + ]; + } + } + function _2(x, r) { + x: { + r: { + e: { + t: { + n: { + u: { + i: { + if (typeof x != "number") { + switch (x[0]) { + case 0: + var e = x[1]; + if (typeof r != "number") switch (r[0]) { + case 0: return [0, _2(e, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 1: + var t = x[1]; + if (typeof r != "number") switch (r[0]) { + case 1: return [1, _2(t, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 2: + var u = x[1]; + if (typeof r != "number") switch (r[0]) { + case 2: return [2, _2(u, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 3: + var i = x[1]; + if (typeof r != "number") switch (r[0]) { + case 3: return [3, _2(i, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 4: + var c = x[1]; + if (typeof r != "number") switch (r[0]) { + case 4: return [4, _2(c, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 5: + var v = x[1]; + if (typeof r != "number") switch (r[0]) { + case 5: return [5, _2(v, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 6: + var o = x[1]; + if (typeof r != "number") switch (r[0]) { + case 6: return [6, _2(o, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 7: + var l = x[1]; + if (typeof r != "number") switch (r[0]) { + case 7: return [7, _2(l, r[1])]; + case 8: break u; + case 9: break i; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + break; + case 8: + var k = x[2], h = x[1]; + if (typeof r != "number") switch (r[0]) { + case 8: + var E = r[1], T = _2(k, r[2]); + return [ + 8, + _2(h, E), + T + ]; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + throw J0([ + 0, + Nr, + YK + ], 1); + case 9: + var I = x[3], N = x[2], P = x[1]; + if (typeof r != "number") switch (r[0]) { + case 8: break u; + case 9: + var R = r[3], q = r[2], X = r[1], B = G2(_2(f2(N), X)), z = B[4]; + return B[2].call(null, D), z(D), [ + 9, + P, + q, + _2(I, R) + ]; + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + } + throw J0([ + 0, + Nr, + zK + ], 1); + case 10: + var x0 = x[1]; + if (typeof r != "number" && r[0] === 10) return [10, _2(x0, r[1])]; + throw J0([ + 0, + Nr, + JK + ], 1); + case 11: + var W = x[1]; + if (typeof r != "number") switch (r[0]) { + case 10: break x; + case 11: return [11, _2(W, r[1])]; + } + throw J0([ + 0, + Nr, + KK + ], 1); + case 12: + var Z = x[1]; + if (typeof r != "number") switch (r[0]) { + case 10: break x; + case 11: break r; + case 12: return [12, _2(Z, r[1])]; + } + throw J0([ + 0, + Nr, + HK + ], 1); + case 13: + var t0 = x[1]; + if (typeof r != "number") switch (r[0]) { + case 10: break x; + case 11: break r; + case 12: break e; + case 13: return [13, _2(t0, r[1])]; + } + throw J0([ + 0, + Nr, + WK + ], 1); + default: + var i0 = x[1]; + if (typeof r != "number") switch (r[0]) { + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: return [14, _2(i0, r[1])]; + } + throw J0([ + 0, + Nr, + VK + ], 1); + } + throw J0([ + 0, + Nr, + GK + ], 1); + } + if (typeof r == "number") return 0; + switch (r[0]) { + case 10: break x; + case 11: break r; + case 12: break e; + case 13: break t; + case 14: break n; + case 8: break u; + case 9: break; + default: throw J0([ + 0, + Nr, + RK + ], 1); + } + } + throw J0([ + 0, + Nr, + MK + ], 1); + } + throw J0([ + 0, + Nr, + FK + ], 1); + } + throw J0([ + 0, + Nr, + XK + ], 1); + } + throw J0([ + 0, + Nr, + UK + ], 1); + } + throw J0([ + 0, + Nr, + BK + ], 1); + } + throw J0([ + 0, + Nr, + qK + ], 1); + } + throw J0([ + 0, + Nr, + LK + ], 1); + } + var N2 = [ + t1, + "CamlinternalFormat.Type_mismatch", + js(0) + ]; + function $K(x) { + return x ? YJ : zJ; + } + var QK = LD, ZK = "\\'", xH = "\\b", rH = "\\t", eH = "\\n", tH = "\\r"; + function nH(x, r) { + var e = jt(r); + if (e === 0) return r; + var t = b1(e), u = e - 1 | 0, i = 0; + if (u >= 0) for (var c = i;;) { + zr(t, c, x(oe(r, c))); + var v = c + 1 | 0; + if (u === c) break; + var c = v; + } + return t; + } + var uH = al, iH = "%+d", fH = "% d", cH = QR, sH = "%+i", aH = "% i", oH = "%x", vH = "%#x", lH = "%X", pH = "%#X", kH = "%o", mH = "%#o", hH = JM, dH = "%Ld", yH = "%+Ld", _H = "% Ld", wH = iF, gH = "%+Li", bH = "% Li", TH = "%Lx", EH = "%#Lx", SH = "%LX", AH = "%#LX", IH = "%Lo", PH = "%#Lo", CH = "%Lu", NH = "%ld", OH = "%+ld", jH = "% ld", DH = RL, RH = "%+li", FH = "% li", MH = "%lx", LH = "%#lx", qH = "%lX", BH = "%#lX", UH = "%lo", XH = "%#lo", GH = "%lu", YH = "%nd", zH = "%+nd", JH = "% nd", KH = uD, HH = "%+ni", WH = "% ni", VH = "%nx", $H = "%#nx", QH = "%nX", ZH = "%#nX", xW = "%no", rW = "%#no", eW = "%nu", tW = [0, Ss], nW = ln, uW = "neg_infinity", iW = cL, fW = HP, cW = [ + 0, + m2, + 1558, + 4 + ], sW = "Printf: bad conversion %[", aW = [ + 0, + m2, + 1626, + 39 + ], oW = [ + 0, + m2, + 1649, + 31 + ], vW = [ + 0, + m2, + 1650, + 31 + ], lW = "Printf: bad conversion %_", pW = kL, kW = hM, mW = kL, hW = hM; + function xd(x, r) { + if (typeof x == "number") return [ + 0, + 0, + r + ]; + if (x[0] === 0) return [ + 0, + [ + 0, + x[1], + x[2] + ], + r + ]; + if (typeof r != "number" && r[0] === 2) return [ + 0, + [1, x[1]], + r[1] + ]; + throw J0(N2, 1); + } + function d4(x, r, e) { + var t = xd(x, e); + if (typeof r != "number") return [ + 0, + t[1], + [0, r[1]], + t[2] + ]; + if (!r) return [ + 0, + t[1], + 0, + t[2] + ]; + var u = t[2]; + if (typeof u != "number" && u[0] === 2) return [ + 0, + t[1], + 1, + u[1] + ]; + throw J0(N2, 1); + } + function h1(x, r) { + if (typeof x == "number") return [ + 0, + 0, + r + ]; + switch (x[0]) { + case 0: + if (typeof r != "number" && r[0] === 0) { + var e = h1(x[1], r[1]); + return [ + 0, + [0, e[1]], + e[2] + ]; + } + break; + case 1: + if (typeof r != "number" && r[0] === 0) { + var t = h1(x[1], r[1]); + return [ + 0, + [1, t[1]], + t[2] + ]; + } + break; + case 2: + var u = x[2], i = xd(x[1], r), c = i[2], v = i[1]; + if (typeof c != "number" && c[0] === 1) { + var o = h1(u, c[1]); + return [ + 0, + [ + 2, + v, + o[1] + ], + o[2] + ]; + } + throw J0(N2, 1); + case 3: + var l = x[2], k = xd(x[1], r), h = k[2], E = k[1]; + if (typeof h != "number" && h[0] === 1) { + var T = h1(l, h[1]); + return [ + 0, + [ + 3, + E, + T[1] + ], + T[2] + ]; + } + throw J0(N2, 1); + case 4: + var I = x[4], N = x[1], P = d4(x[2], x[3], r), R = P[3], q = P[1]; + if (typeof R != "number" && R[0] === 2) { + var X = P[2], B = h1(I, R[1]); + return [ + 0, + [ + 4, + N, + q, + X, + B[1] + ], + B[2] + ]; + } + throw J0(N2, 1); + case 5: + var z = x[4], x0 = x[1], W = d4(x[2], x[3], r), Z = W[3], t0 = W[1]; + if (typeof Z != "number" && Z[0] === 3) { + var i0 = W[2], u0 = h1(z, Z[1]); + return [ + 0, + [ + 5, + x0, + t0, + i0, + u0[1] + ], + u0[2] + ]; + } + throw J0(N2, 1); + case 6: + var k0 = x[4], o0 = x[1], S0 = d4(x[2], x[3], r), s0 = S0[3], v0 = S0[1]; + if (typeof s0 != "number" && s0[0] === 4) { + var m0 = S0[2], p0 = h1(k0, s0[1]); + return [ + 0, + [ + 6, + o0, + v0, + m0, + p0[1] + ], + p0[2] + ]; + } + throw J0(N2, 1); + case 7: + var E0 = x[4], b0 = x[1], C0 = d4(x[2], x[3], r), D0 = C0[3], U0 = C0[1]; + if (typeof D0 != "number" && D0[0] === 5) { + var T0 = C0[2], M0 = h1(E0, D0[1]); + return [ + 0, + [ + 7, + b0, + U0, + T0, + M0[1] + ], + M0[2] + ]; + } + throw J0(N2, 1); + case 8: + var y0 = x[4], G = x[1], j0 = d4(x[2], x[3], r), Q0 = j0[3], q0 = j0[1]; + if (typeof Q0 != "number" && Q0[0] === 6) { + var ix = j0[2], xx = h1(y0, Q0[1]); + return [ + 0, + [ + 8, + G, + q0, + ix, + xx[1] + ], + xx[2] + ]; + } + throw J0(N2, 1); + case 9: + var fx = x[2], yx = xd(x[1], r), R0 = yx[2], lx = yx[1]; + if (typeof R0 != "number" && R0[0] === 7) { + var kx = h1(fx, R0[1]); + return [ + 0, + [ + 9, + lx, + kx[1] + ], + kx[2] + ]; + } + throw J0(N2, 1); + case 10: + var Q = h1(x[1], r); + return [ + 0, + [10, Q[1]], + Q[2] + ]; + case 11: + var I0 = x[1], M = h1(x[2], r); + return [ + 0, + [ + 11, + I0, + M[1] + ], + M[2] + ]; + case 12: + var d0 = x[1], g0 = h1(x[2], r); + return [ + 0, + [ + 12, + d0, + g0[1] + ], + g0[2] + ]; + case 13: + if (typeof r != "number" && r[0] === 8) { + var h0 = r[1], A0 = r[2], $0 = x[3], Kx = x[1]; + if (r3([0, x[2]], [0, h0])) throw J0(N2, 1); + var J = h1($0, A0); + return [ + 0, + [ + 13, + Kx, + h0, + J[1] + ], + J[2] + ]; + } + break; + case 14: + if (typeof r != "number" && r[0] === 9) { + var tr = r[1], Zx = r[3], b = x[3], V = x[2], tx = x[1], _x = [0, L1(tr)]; + if (r3([0, L1(V)], _x)) throw J0(N2, 1); + var gx = h1(b, L1(Zx)); + return [ + 0, + [ + 14, + tx, + tr, + gx[1] + ], + gx[2] + ]; + } + break; + case 15: + if (typeof r != "number" && r[0] === 10) { + var ex = h1(x[1], r[1]); + return [ + 0, + [15, ex[1]], + ex[2] + ]; + } + break; + case 16: + if (typeof r != "number" && r[0] === 11) { + var Jx = h1(x[1], r[1]); + return [ + 0, + [16, Jx[1]], + Jx[2] + ]; + } + break; + case 17: + var Ux = x[1], hr = h1(x[2], r); + return [ + 0, + [ + 17, + Ux, + hr[1] + ], + hr[2] + ]; + case 18: + var dr = x[2], V0 = x[1]; + if (V0[0] === 0) { + var K0 = V0[1], Cx = K0[2], bx = h1(K0[1], r), Ox = bx[1], ux = h1(dr, bx[2]); + return [ + 0, + [ + 18, + [0, [ + 0, + Ox, + Cx + ]], + ux[1] + ], + ux[2] + ]; + } + var br = V0[1], nr = br[2], $r = h1(br[1], r), l1 = $r[1], C1 = h1(dr, $r[2]); + return [ + 0, + [ + 18, + [1, [ + 0, + l1, + nr + ]], + C1[1] + ], + C1[2] + ]; + case 19: + if (typeof r != "number" && r[0] === 13) { + var Qr = h1(x[1], r[1]); + return [ + 0, + [19, Qr[1]], + Qr[2] + ]; + } + break; + case 20: + if (typeof r != "number" && r[0] === 1) { + var O1 = x[2], Hr = x[1], w = h1(x[3], r[1]); + return [ + 0, + [ + 20, + Hr, + O1, + w[1] + ], + w[2] + ]; + } + break; + case 21: + if (typeof r != "number" && r[0] === 2) { + var Y = x[1], px = h1(x[2], r[1]); + return [ + 0, + [ + 21, + Y, + px[1] + ], + px[2] + ]; + } + break; + case 23: + var X0 = x[2], vx = x[1]; + if (typeof vx != "number") switch (vx[0]) { + case 0: return $e(vx, X0, r); + case 1: return $e(vx, X0, r); + case 2: return $e(vx, X0, r); + case 3: return $e(vx, X0, r); + case 4: return $e(vx, X0, r); + case 5: return $e(vx, X0, r); + case 6: return $e(vx, X0, r); + case 7: return $e(vx, X0, r); + case 8: return $e([ + 8, + vx[1], + vx[2] + ], X0, r); + case 9: + var Ix = vx[1], Cr = Se(vx[2], X0, r), Vx = Cr[2]; + return [ + 0, + [ + 23, + [ + 9, + Ix, + Cr[1] + ], + Vx[1] + ], + Vx[2] + ]; + case 10: return $e(vx, X0, r); + default: return $e(vx, X0, r); + } + switch (vx) { + case 0: return $e(vx, X0, r); + case 1: return $e(vx, X0, r); + case 2: + if (typeof r != "number" && r[0] === 14) { + var f1 = h1(X0, r[1]); + return [ + 0, + [ + 23, + 2, + f1[1] + ], + f1[2] + ]; + } + throw J0(N2, 1); + default: return $e(vx, X0, r); + } + } + throw J0(N2, 1); + } + function $e(x, r, e) { + var t = h1(r, e); + return [ + 0, + [ + 23, + x, + t[1] + ], + t[2] + ]; + } + function Se(x, r, e) { + if (typeof x == "number") return [ + 0, + 0, + h1(r, e) + ]; + switch (x[0]) { + case 0: + if (typeof e != "number" && e[0] === 0) { + var t = Se(x[1], r, e[1]); + return [ + 0, + [0, t[1]], + t[2] + ]; + } + break; + case 1: + if (typeof e != "number" && e[0] === 1) { + var u = Se(x[1], r, e[1]); + return [ + 0, + [1, u[1]], + u[2] + ]; + } + break; + case 2: + if (typeof e != "number" && e[0] === 2) { + var i = Se(x[1], r, e[1]); + return [ + 0, + [2, i[1]], + i[2] + ]; + } + break; + case 3: + if (typeof e != "number" && e[0] === 3) { + var c = Se(x[1], r, e[1]); + return [ + 0, + [3, c[1]], + c[2] + ]; + } + break; + case 4: + if (typeof e != "number" && e[0] === 4) { + var v = Se(x[1], r, e[1]); + return [ + 0, + [4, v[1]], + v[2] + ]; + } + break; + case 5: + if (typeof e != "number" && e[0] === 5) { + var o = Se(x[1], r, e[1]); + return [ + 0, + [5, o[1]], + o[2] + ]; + } + break; + case 6: + if (typeof e != "number" && e[0] === 6) { + var l = Se(x[1], r, e[1]); + return [ + 0, + [6, l[1]], + l[2] + ]; + } + break; + case 7: + if (typeof e != "number" && e[0] === 7) { + var k = Se(x[1], r, e[1]); + return [ + 0, + [7, k[1]], + k[2] + ]; + } + break; + case 8: + if (typeof e != "number" && e[0] === 8) { + var h = e[1], E = e[2], T = x[2]; + if (r3([0, x[1]], [0, h])) throw J0(N2, 1); + var I = Se(T, r, E); + return [ + 0, + [ + 8, + h, + I[1] + ], + I[2] + ]; + } + break; + case 9: + if (typeof e != "number" && e[0] === 9) { + var N = e[2], P = e[1], R = e[3], q = x[3], X = x[2], B = x[1], z = [0, L1(P)]; + if (r3([0, L1(B)], z)) throw J0(N2, 1); + var x0 = [0, L1(N)]; + if (r3([0, L1(X)], x0)) throw J0(N2, 1); + var W = G2(_2(f2(P), N)), Z = W[4]; + W[2].call(null, D), Z(D); + var t0 = Se(L1(q), r, R), i0 = t0[2]; + return [ + 0, + [ + 9, + P, + N, + f2(t0[1]) + ], + i0 + ]; + } + break; + case 10: + if (typeof e != "number" && e[0] === 10) { + var u0 = Se(x[1], r, e[1]); + return [ + 0, + [10, u0[1]], + u0[2] + ]; + } + break; + case 11: + if (typeof e != "number" && e[0] === 11) { + var k0 = Se(x[1], r, e[1]); + return [ + 0, + [11, k0[1]], + k0[2] + ]; + } + break; + case 13: + if (typeof e != "number" && e[0] === 13) { + var o0 = Se(x[1], r, e[1]); + return [ + 0, + [13, o0[1]], + o0[2] + ]; + } + break; + case 14: + if (typeof e != "number" && e[0] === 14) { + var S0 = Se(x[1], r, e[1]); + return [ + 0, + [14, S0[1]], + S0[2] + ]; + } + break; + } + throw J0(N2, 1); + } + function Qe(x, r, e) { + var t = Rx(e), u = 0 <= r ? x : 0, i = Hh(r); + if (i <= t) return e; + var v = n3(i, u === 2 ? 48 : 32); + switch (u) { + case 0: + _n(e, 0, v, 0, t); + break; + case 1: + _n(e, 0, v, i - t | 0, t); + break; + default: + x: if (0 < t) { + if (F1(e, 0) !== 43 && F1(e, 0) !== 45 && F1(e, 0) !== 32) break x; + ja(v, 0, F1(e, 0)), _n(e, 1, v, (i - t | 0) + 1 | 0, t - 1 | 0); + break; + } + x: if (1 < t && F1(e, 0) === 48) { + if (Cf !== F1(e, 1) && F1(e, 1) !== 88) break x; + ja(v, 1, F1(e, 1)), _n(e, 2, v, (i - t | 0) + 2 | 0, t - 2 | 0); + break; + } + _n(e, 0, v, i - t | 0, t); + } + return I2(v); + } + function Sl(x, r) { + var e = Hh(x), t = Rx(r), u = F1(r, 0); + x: { + r: { + if (58 > u) { + if (u !== 32) { + if (43 > u) break x; + switch (u + vb | 0) { + case 5: + e: if (t < (e + 2 | 0) && 1 < t) { + if (Cf !== F1(r, 1) && F1(r, 1) !== 88) break e; + var i = n3(e + 2 | 0, 48); + return ja(i, 1, F1(r, 1)), _n(r, 2, i, (e - t | 0) + 4 | 0, t - 2 | 0), I2(i); + } + break r; + case 0: + case 2: break; + case 1: + case 3: + case 4: break x; + default: break r; + } + } + if (t >= (e + 1 | 0)) break x; + var c = n3(e + 1 | 0, 48); + return ja(c, 0, u), _n(r, 1, c, (e - t | 0) + 2 | 0, t - 1 | 0), I2(c); + } + if (71 <= u) { + if (5 < u + zk >>> 0) break x; + } else if (65 > u) break x; + } + if (t < e) { + var v = n3(e, 48); + return _n(r, 0, v, e - t | 0, t), I2(v); + } + } + return r; + } + function dW(x) { + var r = Nt(x), e = [0, 0], t = jt(r) - 1 | 0, u = 0; + if (t >= 0) for (var i = u;;) { + var c = oe(r, i); + x: { + r: { + e: { + if (32 <= c) { + var v = c - 34 | 0; + if (58 < v >>> 0) { + if (93 <= v) break e; + } else if (56 < v - 1 >>> 0) break r; + var o = 1; + break x; + } + if (11 <= c) { + if (c === 13) break r; + } else if (8 <= c) break r; + } + var o = 4; + break x; + } + var o = 2; + } + e[1] = e[1] + o | 0; + var l = i + 1 | 0; + if (t === i) break; + var i = l; + } + if (e[1] === jt(r)) var k = r; + else { + var h = b1(e[1]); + e[1] = 0; + var E = jt(r) - 1 | 0, T = 0; + if (E >= 0) for (var I = T;;) { + var N = oe(r, I); + x: { + r: { + e: { + if (35 <= N) { + if (N !== 92) { + if (Gr <= N) break e; + break r; + } + } else { + if (32 > N) { + if (14 <= N) break e; + switch (N) { + case 8: + zr(h, e[1], 92), e[1]++, zr(h, e[1], 98); + break x; + case 9: + zr(h, e[1], 92), e[1]++, zr(h, e[1], Ca); + break x; + case 10: + zr(h, e[1], 92), e[1]++, zr(h, e[1], n2); + break x; + case 13: + zr(h, e[1], 92), e[1]++, zr(h, e[1], k2); + break x; + default: break e; + } + } + if (34 > N) break r; + } + zr(h, e[1], 92), e[1]++, zr(h, e[1], N); + break x; + } + zr(h, e[1], 92), e[1]++, zr(h, e[1], 48 + (N / cr | 0) | 0), e[1]++, zr(h, e[1], 48 + ((N / 10 | 0) % 10 | 0) | 0), e[1]++, zr(h, e[1], 48 + (N % 10 | 0) | 0); + break x; + } + zr(h, e[1], N); + } + e[1]++; + var P = I + 1 | 0; + if (E === I) break; + var I = P; + } + var k = h; + } + var R = I2(k), q = Rx(R), X = n3(q + 2 | 0, 34); + return Ns(R, 0, X, 1, q), I2(X); + } + function pB(x, r) { + var e = Hh(r), t = tW[1]; + switch (x[2]) { + case 0: + var u = Ee; + break; + case 1: + var u = k1; + break; + case 2: + var u = 69; + break; + case 3: + var u = Ss; + break; + case 4: + var u = 71; + break; + case 5: + var u = t; + break; + case 6: + var u = ec; + break; + case 7: + var u = 72; + break; + default: var u = 70; + } + var i = aB(16); + switch (El(i, 37), x[1]) { + case 0: break; + case 1: + El(i, 43); + break; + default: El(i, 32); + } + return 8 <= x[2] && El(i, 35), El(i, 46), X2(i, rx + e), El(i, u), vB(i); + } + function rd(x, r) { + if (13 > x) return r; + var e = [0, 0], t = Rx(r) - 1 | 0, u = 0; + if (t >= 0) for (var i = u;;) { + 9 >= z0(r, i) + r2 >>> 0 && e[1]++; + var c = i + 1 | 0; + if (t === i) break; + var i = c; + } + var v = e[1], o = b1(Rx(r) + ((v - 1 | 0) / 3 | 0) | 0), l = [0, 0]; + function k(R) { + ja(o, l[1], R), l[1]++; + } + var h = [0, ((v - 1 | 0) % 3 | 0) + 1 | 0], E = Rx(r) - 1 | 0, T = 0; + if (E >= 0) for (var I = T;;) { + var N = z0(r, I); + 9 < N + r2 >>> 0 || (h[1] === 0 && (k(95), h[1] = 3), h[1] += -1), k(N); + var P = I + 1 | 0; + if (E === I) break; + var I = P; + } + return I2(o); + } + function yW(x, r) { + switch (x) { + case 1: + var e = iH; + break; + case 2: + var e = fH; + break; + case 4: + var e = sH; + break; + case 5: + var e = aH; + break; + case 6: + var e = oH; + break; + case 7: + var e = vH; + break; + case 8: + var e = lH; + break; + case 9: + var e = pH; + break; + case 10: + var e = kH; + break; + case 11: + var e = mH; + break; + case 0: + case 13: + var e = uH; + break; + case 3: + case 14: + var e = cH; + break; + default: var e = hH; + } + return rd(x, Fh(e, r)); + } + function _W(x, r) { + switch (x) { + case 1: + var e = OH; + break; + case 2: + var e = jH; + break; + case 4: + var e = RH; + break; + case 5: + var e = FH; + break; + case 6: + var e = MH; + break; + case 7: + var e = LH; + break; + case 8: + var e = qH; + break; + case 9: + var e = BH; + break; + case 10: + var e = UH; + break; + case 11: + var e = XH; + break; + case 0: + case 13: + var e = NH; + break; + case 3: + case 14: + var e = DH; + break; + default: var e = GH; + } + return rd(x, Fh(e, r)); + } + function wW(x, r) { + switch (x) { + case 1: + var e = zH; + break; + case 2: + var e = JH; + break; + case 4: + var e = HH; + break; + case 5: + var e = WH; + break; + case 6: + var e = VH; + break; + case 7: + var e = $H; + break; + case 8: + var e = QH; + break; + case 9: + var e = ZH; + break; + case 10: + var e = xW; + break; + case 11: + var e = rW; + break; + case 0: + case 13: + var e = YH; + break; + case 3: + case 14: + var e = KH; + break; + default: var e = eW; + } + return rd(x, Fh(e, r)); + } + function gW(x, r) { + switch (x) { + case 1: + var e = yH; + break; + case 2: + var e = _H; + break; + case 4: + var e = gH; + break; + case 5: + var e = bH; + break; + case 6: + var e = TH; + break; + case 7: + var e = EH; + break; + case 8: + var e = SH; + break; + case 9: + var e = AH; + break; + case 10: + var e = IH; + break; + case 11: + var e = PH; + break; + case 0: + case 13: + var e = dH; + break; + case 3: + case 14: + var e = wH; + break; + default: var e = CH; + } + return rd(x, bq(e, r)); + } + function Ba(x, r, e) { + function t(h) { + switch (x[1]) { + case 0: + var E = 45; + break; + case 1: + var E = 43; + break; + default: var E = 32; + } + return Zz(e, r, E); + } + function u(h) { + var E = Fz(e); + return E === 3 ? e < 0 ? uW : iW : 4 <= E ? fW : h; + } + switch (x[2]) { + case 5: for (var i = wN(pB(x, r), e), c = 0, v = Rx(i);;) { + if (c === v) var o = 0; + else { + var l = F1(i, c) + Po | 0; + x: { + if (23 < l >>> 0) { + if (l === 55) break x; + } else if (21 < l - 1 >>> 0) break x; + var c = c + 1 | 0; + continue; + } + var o = 1; + } + return u(o ? i : Gx(i, nW)); + } + case 6: return t(D); + case 7: return I2(nH(Hq, Nt(t(D)))); + case 8: return u(t(D)); + default: return wN(pB(x, r), e); + } + } + function y4(x, r, e, t) { + for (var u = r, i = e, c = t;;) { + if (typeof c == "number") return u(i); + switch (c[0]) { + case 0: + var v = c[1]; + return function(T0) { + return qr(u, [ + 5, + i, + T0 + ], v); + }; + case 1: + var o = c[1]; + return function(T0) { + x: { + r: { + if (40 <= T0) { + if (T0 === 92) { + var G = QK; + break x; + } + if (Gr > T0) break r; + } else { + if (32 <= T0) { + if (39 > T0) break r; + var G = ZK; + break x; + } + if (14 > T0) switch (T0) { + case 8: + var G = xH; + break x; + case 9: + var G = rH; + break x; + case 10: + var G = eH; + break x; + case 13: + var G = tH; + break x; + } + } + var M0 = b1(4); + zr(M0, 0, 92), zr(M0, 1, 48 + (T0 / cr | 0) | 0), zr(M0, 2, 48 + ((T0 / 10 | 0) % 10 | 0) | 0), zr(M0, 3, 48 + (T0 % 10 | 0) | 0); + var G = I2(M0); + break x; + } + var y0 = b1(1); + zr(y0, 0, T0); + var G = I2(y0); + } + var j0 = Rx(G), Q0 = n3(j0 + 2 | 0, 39); + return Ns(G, 0, Q0, 1, j0), qr(u, [ + 4, + i, + I2(Q0) + ], o); + }; + case 2: return HN(u, i, c[2], c[1], function(T0) { + return T0; + }); + case 3: return HN(u, i, c[2], c[1], dW); + case 4: return ed(u, i, c[4], c[2], c[3], yW, c[1]); + case 5: return ed(u, i, c[4], c[2], c[3], _W, c[1]); + case 6: return ed(u, i, c[4], c[2], c[3], wW, c[1]); + case 7: return ed(u, i, c[4], c[2], c[3], gW, c[1]); + case 8: + var l = c[4], k = c[3], h = c[2], E = c[1]; + if (typeof h == "number") { + if (typeof k == "number") return k ? function(T0, M0) { + return qr(u, [ + 4, + i, + Ba(E, T0, M0) + ], l); + } : function(T0) { + return qr(u, [ + 4, + i, + Ba(E, zN(E), T0) + ], l); + }; + var T = k[1]; + return function(T0) { + return qr(u, [ + 4, + i, + Ba(E, T, T0) + ], l); + }; + } + if (h[0] === 0) { + var I = h[2], N = h[1]; + if (typeof k == "number") return k ? function(T0, M0) { + return qr(u, [ + 4, + i, + Qe(N, I, Ba(E, T0, M0)) + ], l); + } : function(T0) { + return qr(u, [ + 4, + i, + Qe(N, I, Ba(E, zN(E), T0)) + ], l); + }; + var P = k[1]; + return function(T0) { + return qr(u, [ + 4, + i, + Qe(N, I, Ba(E, P, T0)) + ], l); + }; + } + var R = h[1]; + if (typeof k == "number") return k ? function(T0, M0, y0) { + return qr(u, [ + 4, + i, + Qe(R, T0, Ba(E, M0, y0)) + ], l); + } : function(T0, M0) { + return qr(u, [ + 4, + i, + Qe(R, T0, Ba(E, zN(E), M0)) + ], l); + }; + var q = k[1]; + return function(T0, M0) { + return qr(u, [ + 4, + i, + Qe(R, T0, Ba(E, q, M0)) + ], l); + }; + case 9: return HN(u, i, c[2], c[1], $K); + case 10: + var i = [7, i], c = c[1]; + break; + case 11: + var i = [ + 2, + i, + c[1] + ], c = c[2]; + break; + case 12: + var i = [ + 3, + i, + c[1] + ], c = c[2]; + break; + case 13: + var X = c[3], B = c[2], z = aB(16); + JN(z, B); + var x0 = vB(z); + return function(T0) { + return qr(u, [ + 4, + i, + x0 + ], X); + }; + case 14: + var W = c[3], Z = c[2]; + return function(T0) { + var M0 = T0[1], y0 = h1(M0, L1(f2(Z))); + if (typeof y0[2] == "number") return qr(u, i, A1(y0[1], W)); + throw J0(N2, 1); + }; + case 15: + var t0 = c[1]; + return function(T0, M0) { + return qr(u, [ + 6, + i, + function(y0) { + return p(T0, y0, M0); + } + ], t0); + }; + case 16: + var i0 = c[1]; + return function(T0) { + return qr(u, [ + 6, + i, + T0 + ], i0); + }; + case 17: + var i = [ + 0, + i, + c[1] + ], c = c[2]; + break; + case 18: + var u0 = c[1]; + if (u0[0] === 0) { + let T0 = i, M0 = u, y0 = c[2]; + var u = function(q0) { + return qr(M0, [ + 1, + T0, + [0, q0] + ], y0); + }, i = 0, c = u0[1][1]; + } else { + let T0 = i, M0 = u, y0 = c[2]; + var u = function(q0) { + return qr(M0, [ + 1, + T0, + [1, q0] + ], y0); + }, i = 0, c = u0[1][1]; + } + break; + case 19: throw J0([ + 0, + Nr, + cW + ], 1); + case 20: + var k0 = c[3], o0 = [ + 8, + i, + sW + ]; + return function(T0) { + return qr(u, o0, k0); + }; + case 21: + var S0 = c[2]; + return function(T0) { + return qr(u, [ + 4, + i, + Fh(JM, T0) + ], S0); + }; + case 22: + var s0 = c[1]; + return function(T0) { + return qr(u, [ + 5, + i, + T0 + ], s0); + }; + case 23: + var v0 = c[2], m0 = c[1]; + if (typeof m0 == "number") switch (m0) { + case 0: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 1: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 2: throw J0([ + 0, + Nr, + aW + ], 1); + default: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + } + switch (m0[0]) { + case 0: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 1: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 2: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 3: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 4: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 5: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 6: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 7: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 8: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + case 9: + var p0 = m0[2]; + return x < 50 ? KN(x + 1 | 0, u, i, p0, v0) : z1(KN, [ + 0, + u, + i, + p0, + v0 + ]); + case 10: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + default: return x < 50 ? a1(x + 1 | 0, u, i, v0) : z1(a1, [ + 0, + u, + i, + v0 + ]); + } + default: + var E0 = c[3], b0 = c[1], C0 = d(c[2], 0); + return x < 50 ? WN(x + 1 | 0, u, i, E0, b0, C0) : z1(WN, [ + 0, + u, + i, + E0, + b0, + C0 + ]); + } + } + } + function qr(x, r, e) { + return Jh(y4(0, x, r, e)); + } + function KN(x, r, e, t, u) { + if (typeof t == "number") return x < 50 ? a1(x + 1 | 0, r, e, u) : z1(a1, [ + 0, + r, + e, + u + ]); + switch (t[0]) { + case 0: + var i = t[1]; + return function(B) { + return ot(r, e, i, u); + }; + case 1: + var c = t[1]; + return function(B) { + return ot(r, e, c, u); + }; + case 2: + var v = t[1]; + return function(B) { + return ot(r, e, v, u); + }; + case 3: + var o = t[1]; + return function(B) { + return ot(r, e, o, u); + }; + case 4: + var l = t[1]; + return function(B) { + return ot(r, e, l, u); + }; + case 5: + var k = t[1]; + return function(B) { + return ot(r, e, k, u); + }; + case 6: + var h = t[1]; + return function(B) { + return ot(r, e, h, u); + }; + case 7: + var E = t[1]; + return function(B) { + return ot(r, e, E, u); + }; + case 8: + var T = t[2]; + return function(B) { + return ot(r, e, T, u); + }; + case 9: + var I = t[3], N = t[2], P = _2(f2(t[1]), N); + return function(B) { + return ot(r, e, le(P, I), u); + }; + case 10: + var R = t[1]; + return function(B, z) { + return ot(r, e, R, u); + }; + case 11: + var q = t[1]; + return function(B) { + return ot(r, e, q, u); + }; + case 12: + var X = t[1]; + return function(B) { + return ot(r, e, X, u); + }; + case 13: throw J0([ + 0, + Nr, + oW + ], 1); + default: throw J0([ + 0, + Nr, + vW + ], 1); + } + } + function ot(x, r, e, t) { + return Jh(KN(0, x, r, e, t)); + } + function a1(x, r, e, t) { + var u = [ + 8, + e, + lW + ]; + return x < 50 ? y4(x + 1 | 0, r, u, t) : z1(y4, [ + 0, + r, + u, + t + ]); + } + function HN(x, r, e, t, u) { + if (typeof t == "number") return function(o) { + return qr(x, [ + 4, + r, + u(o) + ], e); + }; + if (t[0] === 0) { + var i = t[2], c = t[1]; + return function(o) { + return qr(x, [ + 4, + r, + Qe(c, i, u(o)) + ], e); + }; + } + var v = t[1]; + return function(o, l) { + return qr(x, [ + 4, + r, + Qe(v, o, u(l)) + ], e); + }; + } + function ed(x, r, e, t, u, i, c) { + if (typeof t == "number") { + if (typeof u == "number") return u ? function(T, I) { + return qr(x, [ + 4, + r, + Sl(T, i(c, I)) + ], e); + } : function(T) { + return qr(x, [ + 4, + r, + i(c, T) + ], e); + }; + var v = u[1]; + return function(T) { + return qr(x, [ + 4, + r, + Sl(v, i(c, T)) + ], e); + }; + } + if (t[0] === 0) { + var o = t[2], l = t[1]; + if (typeof u == "number") return u ? function(T, I) { + return qr(x, [ + 4, + r, + Qe(l, o, Sl(T, i(c, I))) + ], e); + } : function(T) { + return qr(x, [ + 4, + r, + Qe(l, o, i(c, T)) + ], e); + }; + var k = u[1]; + return function(T) { + return qr(x, [ + 4, + r, + Qe(l, o, Sl(k, i(c, T))) + ], e); + }; + } + var h = t[1]; + if (typeof u == "number") return u ? function(T, I, N) { + return qr(x, [ + 4, + r, + Qe(h, T, Sl(I, i(c, N))) + ], e); + } : function(T, I) { + return qr(x, [ + 4, + r, + Qe(h, T, i(c, I)) + ], e); + }; + var E = u[1]; + return function(T, I) { + return qr(x, [ + 4, + r, + Qe(h, T, Sl(E, i(c, I))) + ], e); + }; + } + function WN(x, r, e, t, u, i) { + if (u) { + var c = u[1]; + return function(o) { + return bW(r, e, t, c, d(i, o)); + }; + } + var v = [ + 4, + e, + i + ]; + return x < 50 ? y4(x + 1 | 0, r, v, t) : z1(y4, [ + 0, + r, + v, + t + ]); + } + function bW(x, r, e, t, u) { + return Jh(WN(0, x, r, e, t, u)); + } + function Ua(x, r) { + for (var e = r;;) { + if (typeof e == "number") return; + switch (e[0]) { + case 0: + var t = e[1], u = lB(e[2]); + return Ua(x, t), a4(x, u); + case 1: + var i = e[2], c = e[1]; + if (i[0] === 0) { + var v = i[1]; + Ua(x, c), a4(x, pW); + var e = v; + } else { + var o = i[1]; + Ua(x, c), a4(x, kW); + var e = o; + } + break; + case 6: + var l = e[2]; + return Ua(x, e[1]), d(l, x); + case 7: + Ua(x, e[1]), pn(x); + return; + case 8: + var k = e[2]; + return Ua(x, e[1]), U2(k); + case 2: + case 4: + var h = e[2]; + return Ua(x, e[1]), a4(x, h); + default: + var E = e[2]; + Ua(x, e[1]), Rq(x, E); + return; + } + } + } + function Xa(x, r) { + for (var e = r;;) { + if (typeof e == "number") return; + switch (e[0]) { + case 0: + var t = e[1], u = lB(e[2]); + return Xa(x, t), lr(x, u); + case 1: + var i = e[2], c = e[1]; + if (i[0] === 0) { + var v = i[1]; + Xa(x, c), lr(x, mW); + var e = v; + } else { + var o = i[1]; + Xa(x, c), lr(x, hW); + var e = o; + } + break; + case 6: + var l = e[2]; + return Xa(x, e[1]), lr(x, d(l, 0)); + case 7: + var e = e[1]; + break; + case 8: + var k = e[2]; + return Xa(x, e[1]), U2(k); + case 2: + case 4: + var h = e[2]; + return Xa(x, e[1]), lr(x, h); + default: + var E = e[2]; + return Xa(x, e[1]), at(x, E); + } + } + } + function kB(x, r) { + return qr(function(e) { + return Ua(x, e), 0; + }, 0, r[1]); + } + function VN(x) { + return kB(dn, x); + } + function vr(x) { + return qr(function(r) { + var e = Kr(64); + return Xa(e, r), J1(e); + }, 0, x[1]); + } + var $N = [0, 0], TW = ln, EW = [ + 0, + [ + 3, + 0, + 0 + ], + C6 + ], SW = Pv, AW = [ + 0, + [ + 4, + 0, + 0, + 0, + 0 + ], + al + ], IW = rx, PW = [ + 0, + [ + 11, + sF, + [ + 2, + 0, + [ + 2, + 0, + 0 + ] + ] + ], + ", %s%s" + ], CW = [ + 0, + [ + 12, + 40, + [ + 2, + 0, + [ + 2, + 0, + [ + 12, + 41, + 0 + ] + ] + ] + ], + "(%s%s)" + ], NW = rx, OW = rx, jW = [ + 0, + [ + 12, + 40, + [ + 2, + 0, + [ + 12, + 41, + 0 + ] + ] + ], + "(%s)" + ], DW = "Out of memory", RW = "Stack overflow", FW = "Pattern matching failed", MW = "Assertion failed", LW = "Undefined recursive module", qW = "Raised at", BW = "Re-raised at", UW = "Raised by primitive operation at", XW = "Called from", GW = [ + 0, + [ + 12, + 32, + [ + 4, + 0, + 0, + 0, + 0 + ] + ], + " %d" + ], YW = " (inlined)", zW = [ + 0, + [ + 2, + 0, + [ + 12, + 32, + [ + 2, + 0, + [ + 11, + " in file \"", + [ + 2, + 0, + [ + 12, + 34, + [ + 2, + 0, + [ + 11, + ", line", + [ + 2, + 0, + [ + 11, + mD, + GJ + ] + ] + ] + ] + ] + ] + ] + ] + ] + ], + "%s %s in file \"%s\"%s, line%s, characters %d-%d" + ], JW = rx, KW = [ + 0, + [ + 11, + "s ", + [ + 4, + 0, + 0, + 0, + [ + 12, + 45, + [ + 4, + 0, + 0, + 0, + 0 + ] + ] + ] + ], + "s %d-%d" + ], HW = [ + 0, + [ + 2, + 0, + [ + 11, + " unknown location", + 0 + ] + ], + "%s unknown location" + ], WW = [ + 0, + [ + 2, + 0, + [ + 12, + 10, + 0 + ] + ], + `%s +` + ]; + function QN(x, r) { + var e = x[1 + r]; + if (!(1 - (typeof e == "number" ? 1 : 0))) return d(vr(AW), e); + if (e3(e) === xl) return d(vr(EW), e); + if (e3(e) !== QE) return SW; + for (var t = wN("%.12g", e), u = 0, i = Rx(t);;) { + if (i <= u) return Gx(t, TW); + var c = F1(t, u); + x: { + if (48 <= c) { + if (58 > c) break x; + } else if (c === 45) break x; + return t; + } + var u = u + 1 | 0; + } + } + function mB(x, r) { + if (x.length - 1 <= r) return IW; + var e = mB(x, r + 1 | 0), t = QN(x, r); + return p(vr(PW), t, e); + } + function _4(x) { + x: { + r: { + for (var r = vl($N); r;) { + e: { + var e = r[2], t = r[1]; + try { + var u = d(t, x); + } catch { + break e; + } + if (u) break r; + } + var r = e; + } + var i = 0; + break x; + } + var i = [0, u[1]]; + } + if (i) return i[1]; + if (x === NN) return DW; + if (x === Bq) return RW; + if (x[1] === qq) { + var c = x[2], v = c[3], o = c[2], l = c[1]; + return La(vr(ON), l, o, v, v + 5 | 0, FW); + } + if (x[1] === Nr) { + var k = x[2], h = k[3], E = k[2], T = k[1]; + return La(vr(ON), T, E, h, h + 6 | 0, MW); + } + if (x[1] === s4) { + var I = x[2], N = I[3], P = I[2], R = I[1]; + return La(vr(ON), R, P, N, N + 6 | 0, LW); + } + if (e3(x) === 0) { + var q = x.length - 1, X = x[1][1]; + if (2 < q >>> 0) var B = mB(x, 2), z = QN(x, 1), x0 = p(vr(CW), z, B); + else switch (q) { + case 0: + var x0 = NW; + break; + case 1: + var x0 = OW; + break; + default: var W = QN(x, 1), x0 = d(vr(jW), W); + } + var Z = [ + 0, + X, + [0, x0] + ]; + } else var Z = [ + 0, + x[1], + 0 + ]; + var t0 = Z[2], i0 = Z[1]; + return t0 ? Gx(i0, t0[1]) : i0; + } + function ZN(x, r) { + var e = Hz(r), t = e.length - 1 - 1 | 0, u = 0; + if (t >= 0) for (var i = u;;) { + var c = S1(e, i)[1 + i]; + let x0 = i; + var v = function(Z) { + return Z ? x0 === 0 ? qW : BW : x0 === 0 ? UW : XW; + }; + if (c[0] === 0) { + if (c[3] === c[6]) var o = c[3], h = d(vr(GW), o); + else var l = c[6], k = c[3], h = p(vr(KW), k, l); + var E = c[7], T = c[4], I = c[8] ? YW : JW, N = c[2], P = c[9], R = v(c[1]), X = [0, XJ(vr(zW), R, P, N, I, h, T, E)]; + } else if (c[1]) var X = 0; + else var q = v(0), X = [0, d(vr(HW), q)]; + if (X) { + var B = X[1]; + d(kB(x, WW), B); + } + var z = i + 1 | 0; + if (t === i) break; + var i = z; + } + } + function xO(x) { + for (;;) { + var r = vl($N), e = 1 - Ph($N, r, [ + 0, + x, + r + ]); + if (!e) return e; + } + } + var VW = [ + 0, + rx, + `(Cannot print locations: + bytecode executable program file not found)`, + `(Cannot print locations: + bytecode executable program file appears to be corrupt)`, + `(Cannot print locations: + bytecode executable program file has wrong magic number)`, + `(Cannot print locations: + bytecode executable program file cannot be opened; + -- too many open files. Try running with OCAMLRUNPARAM=b=2)` + ].slice(), $W = [ + 0, + [ + 11, + CS, + [ + 2, + 0, + [ + 12, + 10, + 0 + ] + ] + ], + UM + ], QW = [0], ZW = "Fatal error: out of memory in uncaught exception handler", xV = [ + 0, + [ + 11, + CS, + [ + 2, + 0, + [ + 12, + 10, + 0 + ] + ] + ], + UM + ], rV = [ + 0, + [ + 11, + "Fatal error in uncaught exception handler: exception ", + [ + 2, + 0, + [ + 12, + 10, + 0 + ] + ] + ], + `Fatal error in uncaught exception handler: exception %s +` + ]; + CN(ID, function(x, r) { + try { + try { + var e = r ? QW : gq(0); + try { + DN(D); + } catch {} + try { + var t = _4(x); + d(VN($W), t), ZN(dn, e); + var u = _J(0); + if (u < 0) { + var i = Hh(u); + zq(S1(VW, i)[1 + i]); + } + var v = pn(dn); + } catch (T) { + var o = M1(T), l = _4(x); + d(VN(xV), l), ZN(dn, e); + var k = _4(o); + d(VN(rV), k), ZN(dn, gq(0)); + var v = pn(dn); + } + var h = v; + } catch (T) { + var E = M1(T); + if (E !== NN) throw J0(E, 0); + var h = zq(ZW); + } + return h; + } catch { + return 0; + } + }); + var eV = [ + t1, + "Stdlib.Fun.Finally_raised", + js(0) + ], tV = "Fun.Finally_raised: "; + xO(function(x) { + return x[1] === eV ? [0, Gx(tV, _4(x[2]))] : 0; + }); + var nV = "Digest.BLAKE2: wrong hash size"; + function rO(x) { + (x[1] < 1 || 64 < x[1]) && U2(nV); + } + rO([0, 16]), rO([0, 32]), rO([0, 64]); + function hB(x) { + var r = I2(x); + return yJ(r, 0, Rx(r)); + } + var uV = ct(1, 0, 0), iV = ct(0, 0, 0), fV = ct(0, 0, 0), cV = ct(2, 0, 0), sV = ct(1, 0, 0); + function dB(x) { + return jz(7, 0, [0, 4]); + } + function yB(x, r, e, t, u) { + e4(x, 0, Aq(r, uV)), e4(x, 1, e); + e4(x, 2, r3(t, iV) ? t : sV); + e4(x, 3, r3(u, fV) ? u : cV); + } + function _B(x, r, e, t) { + var u = dB(D); + return yB(u, x, r, e, t), u; + } + var aV = ct(14371852, 15349651, 22696), oV = ct(12230193, 11438743, 35013), vV = ct(1424933, 15549263, 2083), lV = ct(9492471, 4696708, aF); + Rs([0, function(x) { + return _B(Uh(x), Uh(x), Uh(x), Uh(x)); + }], function(x) { + return _B(lV, vV, oV, aV); + }); + var td = 0, wB = -1, eO = [ + t1, + "Stdlib.Format.String_tag", + js(0) + ]; + function w4(x, r) { + return x[13] = x[13] + r[3] | 0, qN(r, x[28]); + } + var gB = 1000000010; + function pV(x, r) { + return x <= r ? x : r; + } + var kV = [ + t1, + "Stdlib.Queue.Empty", + js(0) + ], mV = [ + 0, + rx, + 0, + rx + ], hV = rx, dV = rx, yV = rx, _V = rx, wV = [0, rx], gV = ug; + function tO(x, r) { + return Z0(x[17], r, 0, Rx(r)); + } + function nd(x) { + return d(x[19], 0); + } + function bB(x, r, e) { + x[9] = x[9] - r | 0, tO(x, e), x[11] = 0; + } + function ud(x, r) { + return C(r, rx) && bB(x, Rx(r), r); + } + function f3(x, r, e) { + var t = r[3], u = r[2]; + return ud(x, r[1]), nd(x), x[11] = 1, x[10] = pV(x[8], (x[6] - e | 0) + u | 0), x[9] = x[6] - x[10] | 0, d(x[21], x[10]), ud(x, t); + } + function TB(x, r) { + return f3(x, mV, r); + } + function Al(x, r) { + var e = r[2], t = r[3]; + return ud(x, r[1]), x[9] = x[9] - e | 0, d(x[20], e), ud(x, t); + } + function bV(x, r, e) { + if (typeof e == "number") switch (e) { + case 0: + var t = Tl(x[3]); + if (!t) return; + var u = t[1][1], i = function(Q0, q0) { + if (!q0) return [ + 0, + Q0, + 0 + ]; + var ix = q0[1], xx = q0[2]; + return sJ(Q0, ix) ? [ + 0, + Q0, + q0 + ] : [ + 0, + ix, + i(Q0, xx) + ]; + }; + u[1] = i(x[6] - x[9] | 0, u[1]); + return; + case 1: + bl(x[2]); + return; + case 2: + bl(x[3]); + return; + case 3: + var c = Tl(x[2]); + return c ? TB(x, c[1][2]) : nd(x); + case 4: + var v = x[10] !== (x[6] - x[9] | 0) ? 1 : 0; + if (!v) return v; + var o = x[28], l = o[2]; + if (l) { + var k = l[1]; + if (l[2]) { + var h = l[2]; + o[1] = o[1] - 1 | 0, o[2] = h; + var E = [0, k]; + } else { + LN(o); + var E = [0, k]; + } + } else var E = 0; + if (!E) return; + var T = E[1], I = T[1]; + x[12] = x[12] - T[3] | 0, x[9] = x[9] + I | 0; + return; + default: + var N = bl(x[5]); + return N ? tO(x, d(x[25], N[1])) : void 0; + } + switch (e[0]) { + case 0: return bB(x, r, e[1]); + case 1: + var P = e[2], R = e[1], q = P[1], X = P[2], B = Tl(x[2]); + if (!B) return; + var z = B[1], x0 = z[2]; + switch (z[1]) { + case 0: return Al(x, R); + case 1: return f3(x, P, x0); + case 2: return f3(x, P, x0); + case 3: return x[9] < (r + Rx(q) | 0) ? f3(x, P, x0) : Al(x, R); + case 4: return x[11] ? Al(x, R) : x[9] < (r + Rx(q) | 0) || ((x[6] - x0 | 0) + X | 0) < x[10] ? f3(x, P, x0) : Al(x, R); + default: return Al(x, R); + } + case 2: + var W = x[6] - x[9] | 0, Z = e[2], t0 = e[1], i0 = Tl(x[3]); + if (!i0) return; + var u0 = i0[1][1], k0 = u0[1]; + if (k0) for (var o0 = u0[1], S0 = k0[1];;) { + if (o0) { + var s0 = o0[1], v0 = o0[2]; + if (W > s0) { + var o0 = v0; + continue; + } + var m0 = s0; + } else var m0 = S0; + var p0 = m0; + break; + } + else var p0 = W; + var E0 = p0 - W | 0; + return 0 <= E0 ? Al(x, [ + 0, + dV, + E0 + t0 | 0, + hV + ]) : f3(x, [ + 0, + _V, + p0 + Z | 0, + yV + ], x[6]); + case 3: + var b0 = e[2], C0 = e[1]; + if (x[8] < (x[6] - x[9] | 0)) { + var D0 = Tl(x[2]); + if (D0) { + var U0 = D0[1], T0 = U0[2], M0 = U0[1]; + x[9] < T0 && 3 >= M0 - 1 >>> 0 && TB(x, T0); + } else nd(x); + } + var y0 = x[9] - C0 | 0; + return u3([ + 0, + b0 === 1 ? 1 : x[9] < r ? b0 : 5, + y0 + ], x[2]); + case 4: return u3(e[1], x[3]); + default: + var j0 = e[1]; + return tO(x, d(x[24], j0)), u3(j0, x[5]); + } + } + function EB(x) { + for (;;) { + var r = x[28][2], e = r ? [0, r[1]] : 0; + if (!e) return; + var t = e[1], u = t[1], i = 0 <= u ? 1 : 0, c = t[3], v = t[2], o = x[13] - x[12] | 0, l = i || (x[9] <= o ? 1 : 0); + if (!l) return l; + var k = x[28], h = k[2]; + if (!h) throw J0(kV, 1); + if (h[2]) { + var E = h[2]; + k[1] = k[1] - 1 | 0, k[2] = E; + } else LN(k); + bV(x, 0 <= u ? u : gB, v), x[12] = c + x[12] | 0; + } + } + function SB(x, r) { + return w4(x, r), EB(x); + } + function AB(x, r, e) { + return SB(x, [ + 0, + r, + [0, e], + r + ]); + } + function nO(x) { + return m4(x), u3([ + 0, + -1, + [ + 0, + wB, + wV, + 0 + ] + ], x); + } + function uO(x, r) { + var e = Tl(x[1]); + if (e) { + var t = e[1], u = t[2], i = u[1]; + if (t[1] < x[12]) return nO(x[1]); + var c = u[2]; + if (typeof c != "number") switch (c[0]) { + case 3: + 1 - r && (u[1] = x[13] + i | 0, bl(x[1])); + return; + case 1: + case 2: + r && (u[1] = x[13] + i | 0, bl(x[1])); + return; + } + } + } + function IB(x, r, e) { + return w4(x, e), r && uO(x, 1), u3([ + 0, + x[13], + e + ], x[1]); + } + function PB(x, r, e) { + if (x[14] = x[14] + 1 | 0, x[14] < x[15]) return IB(x, 0, [ + 0, + -x[13] | 0, + [ + 3, + r, + e + ], + 0 + ]); + var t = x[14] === x[15] ? 1 : 0; + if (!t) return t; + var u = x[16]; + return AB(x, Rx(u), u); + } + function CB(x, r) { + 1 < x[14] && (x[14] < x[15] && (w4(x, [ + 0, + td, + 1, + 0 + ]), uO(x, 1), uO(x, 0)), x[14] = x[14] - 1 | 0); + } + function NB(x, r) { + if (x[23] && w4(x, [ + 0, + td, + 5, + 0 + ]), x[22]) { + var e = bl(x[4]); + if (e) return d(x[27], e[1]); + } + } + function OB(x, r) { + for (P2(function(e) { + return NB(x, D); + }, x[4][1]); !(1 >= x[14]);) CB(x, D); + return x[13] = gB, EB(x), r && nd(x), x[12] = 1, x[13] = 1, LN(x[28]), nO(x[1]), m4(x[2]), m4(x[3]), m4(x[4]), m4(x[5]), x[10] = 0, x[14] = 0, x[9] = x[6], PB(x, 0, 3); + } + function iO(x, r, e) { + return (x[14] < x[15] ? 1 : 0) && AB(x, r, e); + } + function jB(x, r, e) { + return iO(x, r, e); + } + function g4(x, r) { + return jB(x, 1, $h(1, r)); + } + function c3(x, r) { + return OB(x, 0), d(x[18], 0); + } + function fO(x, r) { + return Z0(x[17], gV, 0, 1); + } + var DB = $h(80, 32), TV = ZF, EV = F6, SV = Qy, AV = rx, IV = F6, PV = "= e) return Z0(x[17], DB, 0, e); + Z0(x[17], DB, 0, 80); + var e = e - 80 | 0; + } + } + function jV(x) { + return x[1] === eO ? Gx(SV, Gx(x[2], EV)) : AV; + } + function DV(x) { + return x[1] === eO ? Gx(PV, Gx(x[2], IV)) : CV; + } + function RV(x) { + return 0; + } + function FV(x) { + return 0; + } + function cO(x, r, e, t, u) { + var i = uB(D), c = [ + 0, + wB, + NV, + 0 + ]; + qN(c, i); + var v = k4(D); + nO(v), u3([ + 0, + 1, + c + ], v); + var o = 78, l = k4(D), k = k4(D), h = k4(D); + return [ + 0, + v, + k4(D), + h, + k, + l, + o, + 10, + 68, + o, + 0, + 1, + 1, + 1, + 1, + TV, + OV, + x, + r, + e, + t, + u, + 0, + 0, + jV, + DV, + RV, + FV, + i + ]; + } + function RB(x, r) { + var e = cO(x, r, function(t) { + return 0; + }, function(t) { + return 0; + }, function(t) { + return 0; + }); + return e[19] = function(t) { + return fO(e, D); + }, e[20] = function(t) { + return Il(e, t); + }, e[21] = function(t) { + return Il(e, t); + }, e; + } + function FB(x) { + return RB(function(r, e, t) { + return Yq(x, r, e, t); + }, function(r) { + return pn(x); + }); + } + function sO(x) { + return RB(function(r, e, t) { + return UN(x, r, e, t); + }, function(r) { + return 0; + }); + } + var aO = BP; + function MB(x) { + return Kr(aO); + } + var LB = MB(D), MV = FB(Gq), LV = FB(dn), qV = sO(LB), qB = Rs(0, MB); + h4(qB, LB), h4(Rs(0, function(x) { + return sO(i3(qB)); + }), qV); + function BB(x, r, e, t) { + return UN(i3(x), r, e, t); + } + function UB(x, r, e) { + var t = i3(r), u = t[2]; + return Yq(x, J1(t), 0, u), pn(x), t[2] = 0, 0; + } + var XB = Rs(0, function(x) { + return Kr(aO); + }), GB = Rs(0, function(x) { + return Kr(aO); + }), YB = Rs(0, function(x) { + var r = cO(function(e, t, u) { + return BB(XB, e, t, u); + }, function(e) { + return UB(Gq, XB, D); + }, function(e) { + return 0; + }, function(e) { + return 0; + }, function(e) { + return 0; + }); + return r[19] = function(e) { + return fO(r, D); + }, r[20] = function(e) { + return Il(r, e); + }, r[21] = function(e) { + return Il(r, e); + }, sB(function(e) { + return c3(r, D); + }), r; + }); + h4(YB, MV); + var zB = Rs(0, function(x) { + var r = cO(function(e, t, u) { + return BB(GB, e, t, u); + }, function(e) { + return UB(dn, GB, D); + }, function(e) { + return 0; + }, function(e) { + return 0; + }, function(e) { + return 0; + }); + return r[19] = function(e) { + return fO(r, D); + }, r[20] = function(e) { + return Il(r, e); + }, r[21] = function(e) { + return Il(r, e); + }, sB(function(e) { + return c3(r, D); + }), r; + }); + h4(zB, LV); + var BV = "Buffer.sub", UV = [ + 0, + 0, + 4 + ], XV = [ + 0, + [ + 11, + "invalid box description ", + [ + 3, + 0, + 0 + ] + ], + "invalid box description %S" + ], GV = rx, YV = rx, zV = rx, JV = rx; + function JB(x, r) { + var e = Kr(16), t = sO(e); + x(t, r), c3(t, D); + var u = e[2]; + if (2 > u) return J1(e); + var i = u - 2 | 0; + return 0 <= i && (e[2] - i | 0) >= 1 ? gl(e[1][1], 1, i) : U2(BV); + } + function vt(x, r) { + if (typeof r != "number") { + x: { + r: { + e: { + switch (r[0]) { + case 0: + var e = r[2]; + if (vt(x, r[1]), typeof e == "number") switch (e) { + case 0: return CB(x, D); + case 1: return NB(x, D); + case 2: return c3(x, D); + case 3: return (x[14] < x[15] ? 1 : 0) && SB(x, [ + 0, + td, + 3, + 0 + ]); + case 4: return OB(x, 1), d(x[18], 0); + case 5: return g4(x, 64); + default: return g4(x, 37); + } + switch (e[0]) { + case 0: + var u = [ + 0, + JV, + e[2], + zV + ], i = x[14] < x[15] ? 1 : 0, c = [ + 0, + YV, + e[3], + GV + ], v = u[3], o = u[2], l = u[1]; + return i && IB(x, 1, [ + 0, + -x[13] | 0, + [ + 1, + u, + c + ], + (Rx(l) + o | 0) + Rx(v) | 0 + ]); + case 1: return; + default: + var k = e[1]; + return g4(x, 64), g4(x, k); + } + case 1: + var h = r[2], E = r[1]; + if (h[0] === 0) { + var T = h[1]; + vt(x, E); + var I = [ + 0, + eO, + JB(vt, T) + ]; + x[22] && (u3(I, x[4]), d(x[26], I)); + return x[23] && w4(x, [ + 0, + td, + [5, I], + 0 + ]); + } + var P = h[1]; + vt(x, E); + var R = JB(vt, P); + if (Sr(R, rx)) var q = UV; + else { + var X = Rx(R), B = function(kx) { + var Q = XV[1], I0 = Kr(D6); + return d(qr(function(M) { + return Xa(I0, M), Px(J1(I0)); + }, 0, Q), R); + }, z = function(kx) { + for (var Q = kx;;) { + if (Q === X) return Q; + var I0 = F1(R, Q); + if (I0 !== 9 && I0 !== 32) return Q; + var Q = Q + 1 | 0; + } + }, x0 = z(0); + t: n: { + for (var W = x0;;) { + if (W === X) break n; + if (25 < F1(R, W) + zk >>> 0) break; + var W = W + 1 | 0; + } + break t; + } + var Z = C2(R, x0, W - x0 | 0), t0 = z(W); + t: n: { + for (var i0 = t0;;) { + if (i0 === X) break n; + var u0 = F1(R, i0); + if (48 <= u0) { + if (58 <= u0) break; + } else if (u0 !== 45) break; + var i0 = i0 + 1 | 0; + } + break t; + } + if (t0 === i0) var k0 = 0; + else try { + var k0 = st(C2(R, t0, i0 - t0 | 0)); + } catch (kx) { + var S0 = M1(kx); + if (S0[1] !== mn) throw J0(S0, 0); + var k0 = B(D); + } + z(i0) !== X && B(D); + t: { + if (C(Z, rx) && C(Z, KP)) { + if (!C(Z, "h")) { + var s0 = 0; + break t; + } + if (!C(Z, "hov")) { + var s0 = 3; + break t; + } + if (!C(Z, "hv")) { + var s0 = 2; + break t; + } + if (C(Z, zF)) { + var s0 = B(D); + break t; + } + var s0 = 1; + break t; + } + var s0 = 4; + } + var q = [ + 0, + k0, + s0 + ]; + } + return PB(x, q[1], q[2]); + case 2: + var v0 = r[1]; + if (typeof v0 != "number" && v0[0] === 0) { + var m0 = v0[2]; + if (typeof m0 != "number" && m0[0] === 1) { + var p0 = r[2], E0 = m0[2], b0 = v0[1]; + break r; + } + } + var j0 = r[2], Q0 = v0; + break x; + case 3: + var C0 = r[1]; + if (typeof C0 != "number" && C0[0] === 0) { + var D0 = C0[2]; + if (typeof D0 != "number" && D0[0] === 1) { + var U0 = r[2], T0 = D0[2], M0 = C0[1]; + break; + } + } + var xx = r[2], fx = C0; + break e; + case 4: + var y0 = r[1]; + if (typeof y0 != "number" && y0[0] === 0) { + var G = y0[2]; + if (typeof G != "number" && G[0] === 1) { + var p0 = r[2], E0 = G[2], b0 = y0[1]; + break r; + } + } + var j0 = r[2], Q0 = y0; + break x; + case 5: + var q0 = r[1]; + if (typeof q0 != "number" && q0[0] === 0) { + var ix = q0[2]; + if (typeof ix != "number" && ix[0] === 1) { + var U0 = r[2], T0 = ix[2], M0 = q0[1]; + break; + } + } + var xx = r[2], fx = q0; + break e; + case 6: + var yx = r[2]; + return vt(x, r[1]), d(yx, x); + case 7: return vt(x, r[1]), c3(x, D); + default: + var R0 = r[2]; + return vt(x, r[1]), U2(R0); + } + return vt(x, M0), iO(x, T0, $h(1, U0)); + } + return vt(x, fx), g4(x, xx); + } + return vt(x, b0), iO(x, E0, p0); + } + return vt(x, Q0), jB(x, Rx(j0), j0); + } + } + function c2(x) { + return function(r) { + return qr(function(e) { + return vt(x, e), 0; + }, 0, r[1]); + }; + } + var KV = "Array.sub", HV = "first domain already spawned", WV = [ + 0, + "camlinternalOO.ml", + BF, + 50 + ], VV = [ + 0, + WM, + 72, + 5 + ], $V = [ + 0, + WM, + 81, + 2 + ], QV = "/tmp", ZV = ln, x$ = [ + 0, + "src/wtf8.ml", + 65, + 9 + ], r$ = [ + 0, + "src/third-party/sedlex/flow_sedlexing.ml", + jS, + 4 + ], e$ = "Flow_sedlexing.MalFormed", t$ = O6, n$ = H3, u$ = K3, i$ = H6, f$ = $v, c$ = [ + 0, + [ + 12, + 40, + [ + 18, + [1, [ + 0, + [ + 11, + Li, + 0 + ], + Li + ]], + [ + 11, + "File_key.LibFile", + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + "(@[<2>File_key.LibFile@ " + ], s$ = [ + 0, + [ + 3, + 0, + 0 + ], + C6 + ], a$ = [ + 0, + [ + 17, + 0, + [ + 12, + 41, + 0 + ] + ], + ck + ], o$ = [ + 0, + [ + 12, + 40, + [ + 18, + [1, [ + 0, + [ + 11, + Li, + 0 + ], + Li + ]], + [ + 11, + "File_key.SourceFile", + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + "(@[<2>File_key.SourceFile@ " + ], v$ = [ + 0, + [ + 3, + 0, + 0 + ], + C6 + ], l$ = [ + 0, + [ + 17, + 0, + [ + 12, + 41, + 0 + ] + ], + ck + ], p$ = [ + 0, + [ + 12, + 40, + [ + 18, + [1, [ + 0, + [ + 11, + Li, + 0 + ], + Li + ]], + [ + 11, + "File_key.JsonFile", + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + "(@[<2>File_key.JsonFile@ " + ], k$ = [ + 0, + [ + 3, + 0, + 0 + ], + C6 + ], m$ = [ + 0, + [ + 17, + 0, + [ + 12, + 41, + 0 + ] + ], + ck + ], h$ = [ + 0, + [ + 12, + 40, + [ + 18, + [1, [ + 0, + [ + 11, + Li, + 0 + ], + Li + ]], + [ + 11, + "File_key.ResourceFile", + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + "(@[<2>File_key.ResourceFile@ " + ], d$ = [ + 0, + [ + 3, + 0, + 0 + ], + C6 + ], y$ = [ + 0, + [ + 17, + 0, + [ + 12, + 41, + 0 + ] + ], + ck + ], _$ = [0, 1], w$ = [0, 0], g$ = [0, 1], b$ = [0, 2], T$ = [0, 2], E$ = [0, 0], S$ = [0, 1], A$ = [0, 1], I$ = [0, 1], P$ = [0, 1], C$ = [0, 2], N$ = [0, 1], O$ = [0, 1], j$ = [ + 0, + 0, + 0 + ], D$ = [ + 0, + 0, + 0 + ], R$ = [ + 0, + ss, + fi, + _c, + Ni, + di, + Cs, + mf, + si, + sf, + z7, + eu, + zc, + _u, + e7, + Ve, + bs, + Mc, + W7, + hf, + Ff, + Es, + Xi, + Z7, + Ii, + lc, + I7, + Ec, + O7, + of, + Fu, + tu, + Ku, + jc, + hi, + m7, + pf, + Ic, + Vf, + gs, + wc, + ys, + St, + V7, + Mf, + $f, + lf, + Ji, + ti, + l7, + f7, + Ac, + Lf, + vi, + Hi, + rs, + Vc, + U7, + Au, + fu, + Kn, + Ou, + bu, + ai, + Ui, + Si, + ji, + es, + Af, + pu, + Ki, + qi, + X7, + Lu, + Zu, + ms, + Wf, + o7, + Ge, + r7, + Qi, + x7, + Gf, + dc, + D7, + qc, + G1, + ff, + $n, + Oc, + E7, + Nf, + Tc, + g7, + kc, + su, + P7, + tf, + Gc, + Yn, + Mu, + a7, + Eu, + vc, + j7, + _i, + T7, + $2, + Pi, + ou, + d7, + w7, + Ri, + wu, + ki, + Ci, + Q7, + Rc, + Wu, + Oi, + ic, + be, + v7, + vu, + H2, + Hn, + Uc, + zi, + xf, + Du, + $c, + xc, + Yc, + If, + ls, + Gi, + Ef, + yu, + $u, + pc, + du, + Xf, + Pu, + oc, + xi, + Cc, + Hc, + Nc, + Wn, + yf, + Bc, + bi, + mi, + Uf, + Ps, + Hf, + qf, + _f, + ii, + Qu, + Uu, + Rf, + B7, + is, + ws, + y7, + oi, + S7, + ru, + bc, + H7, + Hu, + xu, + Sc, + u7, + Ei, + Pf, + yi, + Jn, + L7, + ps, + Y7, + Tf, + gc, + Xu, + W2, + Je, + F7, + J7, + Jc, + jf, + He, + Ke, + n7, + cs, + Vu, + p7, + ds, + ge, + iu, + As, + Bf, + cc, + sc, + Un, + cu, + Mi, + Ru, + hu, + Ts, + q7, + fs, + fc, + Qn, + Vi, + uc, + qu, + Xc, + A7, + ns, + ni, + lu, + Xn, + Df, + Pc, + Fc, + ac, + kf, + M7, + Vn, + ui, + wi, + uu, + c7, + gi, + G7, + zn, + Bi, + ju, + Sf, + i7, + _7, + Gn, + Qf, + Su, + zu, + zf, + ei, + Cu, + vf, + nf, + Zf, + tn, + h7, + Ju, + li, + Zn, + qn, + Bu, + Di, + ri, + ku, + Zi, + Zc, + Yu, + C7, + gu, + Jf, + cf, + s7, + Tu, + df, + K7, + Bn, + Ti, + R7, + t2, + Ai, + uf, + ts, + hs, + Iu, + wf, + k7, + Xe, + gf, + _s, + af, + Yi, + hc, + yc, + Wi, + Qc, + vs, + Is, + Fi, + bf, + os, + rc, + vn, + as, + Gu, + Dc, + Kf, + nc, + us, + pi, + ci, + Yf, + We, + Lc, + ae, + N7, + rf, + $i, + mu, + Of, + b7, + Wc, + au, + t7, + Kc + ], F$ = [ + 0, + H2, + of, + $i, + V7, + $2, + qf, + h7, + pc, + bc, + Rf, + Gi, + Du, + Fi, + hu, + F7, + d7, + Qu, + Uf, + J7, + ui, + cf, + X7, + Zn, + Zf, + _u, + vu, + $n, + ac, + Ps, + oc, + _f, + Sf, + Es, + Uc, + jc, + Q7, + He, + t7, + Wi, + s7, + Qc, + Bi, + ic, + rs, + Ve, + Jc, + Uu, + fu, + k7, + ss, + ii, + lu, + T7, + Je, + ci, + w7, + Of, + qu, + fc, + Ku, + pi, + q7, + a7, + If, + _7, + fs, + Ge, + Lf, + Pi, + Zu, + M7, + pu, + xf, + af, + P7, + $f, + au, + Fc, + Zi, + m7, + Bn, + jf, + Fu, + Y7, + bi, + $c, + Ai, + Eu, + ge, + es, + x7, + rc, + Vu, + bs, + Wn, + e7, + o7, + Kf, + Pc, + Vn, + r7, + Xi, + Qf, + kf, + Lu, + sf, + Xn, + Vc, + zu, + ni, + Oi, + Hu, + $u, + si, + n7, + Ii, + Zc, + Ui, + ys, + Gf, + Kc, + Xu, + Mu, + Ei, + Cc, + wu, + Kn, + hs, + df, + W7, + Ki, + uc, + hf, + Nf, + uu, + du, + E7, + ps, + L7, + mf, + gu, + Au, + Cu, + Yc, + su, + os, + N7, + oi, + G1, + g7, + Hn, + Bc, + ai, + pf, + ku, + xu, + Tf, + Jf, + ms, + Tc, + Dc, + z7, + dc, + Bu, + zf, + f7, + D7, + Z7, + Xf, + I7, + ds, + fi, + Mi, + Di, + Rc, + zn, + Yu, + xi, + eu, + vf, + ae, + lc, + is, + cc, + Ou, + Df, + as, + Vi, + Gn, + W2, + Ri, + U7, + cs, + St, + Ni, + qc, + gs, + tu, + i7, + vi, + Ru, + di, + Qi, + S7, + kc, + _c, + ti, + cu, + gf, + nc, + As, + Iu, + wf, + Qn, + vs, + Ci, + hi, + Hi, + ws, + bf, + v7, + b7, + Mf, + mi, + C7, + Nc, + ts, + p7, + t2, + Un, + Mc, + yf, + Is, + A7, + Yn, + Yi, + Ac, + Yf, + Xc, + Oc, + Ts, + O7, + Hc, + Bf, + wc, + Ec, + bu, + ju, + j7, + be, + nf, + Ju, + qn, + hc, + Ic, + wi, + Gc, + gi, + lf, + yu, + zi, + ou, + xc, + us, + Ke, + Xe, + rf, + ff, + ri, + Wc, + ns, + K7, + mu, + Vf, + Sc, + _s, + Jn, + gc, + qi, + Hf, + ru, + uf, + H7, + yc, + Ef, + ji, + y7, + sc, + Wf, + B7, + ei, + Si, + yi, + Wu, + Ff, + Gu, + Su, + Pf, + c7, + li, + l7, + Ji, + _i, + Cs, + We, + iu, + zc, + vn, + G7, + R7, + ki, + ls, + u7, + Tu, + Pu, + Ti, + Lc, + tf, + vc, + tn, + Af + ], M$ = GM, L$ = $F, q$ = SF, B$ = OD, U$ = Qy, X$ = QL, G$ = F6, Y$ = WD, z$ = YF, J$ = CF, K$ = yD, H$ = $7, W$ = ze, V$ = _R, $$ = pF, Q$ = se, Z$ = HL, xQ = wR, rQ = _k, eQ = Qm, tQ = bo, nQ = I6, uQ = kM, iQ = YD, fQ = IR, cQ = RR, sQ = PF, aQ = qD, oQ = GD, vQ = hL, lQ = TR, pQ = vM, kQ = bF, mQ = yo, hQ = fF, dQ = $L, yQ = eF, _Q = g6, wQ = cl, gQ = No, bQ = [ + 0, + [ + 18, + [1, [ + 0, + [ + 11, + Li, + 0 + ], + Li + ]], + [ + 11, + "{ ", + 0 + ] + ], + "@[<2>{ " + ], TQ = "Loc.line", EQ = [ + 0, + [ + 18, + [1, [ + 0, + 0, + rx + ]], + [ + 2, + 0, + [ + 11, + GR, + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + yF + ], SQ = [ + 0, + [ + 4, + 0, + 0, + 0, + 0 + ], + al + ], AQ = [ + 0, + [ + 17, + 0, + 0 + ], + iI + ], IQ = [ + 0, + [ + 12, + 59, + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ], + ";@ " + ], PQ = G6, CQ = [ + 0, + [ + 18, + [1, [ + 0, + 0, + rx + ]], + [ + 2, + 0, + [ + 11, + GR, + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + 0 + ] + ] + ] + ], + yF + ], NQ = [ + 0, + [ + 4, + 0, + 0, + 0, + 0 + ], + al + ], OQ = [ + 0, + [ + 17, + 0, + 0 + ], + iI + ], jQ = [ + 0, + [ + 17, + [ + 0, + Eo, + 1, + 0 + ], + [ + 12, + So, + [ + 17, + 0, + 0 + ] + ] + ], + "@ }@]" + ], DQ = rx, RQ = "Object literal may not have data and accessor property with the same name", FQ = "Object literal may not have multiple get/set accessors with the same name", MQ = "Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tag", LQ = "`let [` is ambiguous in this position because it is either a `let` binding pattern, or a member expression.", qQ = "Async functions can only be declared at top level or immediately within another function.", BQ = "`await` is an invalid identifier in async functions", UQ = "`await` is not allowed in async function parameters.", XQ = "Computed properties must have a value.", GQ = "Constructor can't be an accessor.", YQ = "Constructor can't be an async function.", zQ = "Constructor can't be a generator.", JQ = "It is sufficient for your declare function to just have a Promise return type.", KQ = "async is an implementation detail and isn't necessary for your declare function statement. ", HQ = "`declare` modifier can only appear on class fields.", WQ = "Unexpected token `=`. Initializers are not allowed in a `declare`.", VQ = "Unexpected token `=`. Initializers are not allowed in a `declare opaque type`.", $Q = "Classes may only have one constructor", QQ = "Rest element must be final element of an array pattern", ZQ = "Cannot export an enum with `export type`, try `export enum E {}` or `module.exports = E;` instead.", xZ = "Enum members are separated with `,`. Replace `;` with `,`.", rZ = "`const` enums are not supported. Flow Enums are designed to allow for inlining, however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself.", eZ = "Expected an object pattern, array pattern, or an identifier but found an expression instead", tZ = "Missing comma between export specifiers", nZ = "Generators can only be declared at top level or immediately within another function.", uZ = "Getter should have zero parameters", iZ = "A getter cannot have a `this` parameter.", fZ = "Illegal continue statement", cZ = "Illegal return statement", sZ = "Illegal Unicode escape", aZ = "Missing comma between import specifiers", oZ = "It cannot be used with `import type` or `import typeof` statements", vZ = "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. ", lZ = "Explicit inexact syntax cannot appear inside an explicit exact object type", pZ = "Explicit inexact syntax can only appear inside an object type", kZ = "Component params must be an identifier. If you'd like to destructure, you should use `name as {destructure}`", mZ = "A bigint literal must be an integer", hZ = "JSX value should be either an expression or a quoted JSX text", dZ = "Invalid left-hand side in assignment", yZ = "Invalid left-hand side in exponentiation expression", _Z = "Invalid left-hand side in for-in", wZ = "Invalid left-hand side in for-of", gZ = "Invalid optional indexed access. Indexed access uses bracket notation. Use the format `T?.[K]`.", bZ = "Invalid regular expression", TZ = "A bigint literal cannot use exponential notation", EZ = "Tuple spread elements cannot be optional.", SZ = "Tuple variance annotations can only be used with labeled tuple elements, e.g. `[+foo: number]`", AZ = "`typeof` can only be used to get the type of variables.", IZ = "JSX attributes must only be assigned a non-empty expression", PZ = "Literals cannot be used as shorthand properties.", CZ = "Malformed unicode", NZ = "`match` argument must not be empty", OZ = "`match` argument cannot contain spread elements", jZ = "`await` is not yet supported in `match` expressions", DZ = "`yield` is not yet supported in `match` expressions", RZ = "Object pattern can't contain methods", FZ = "Expected at least one type parameter.", MZ = "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.", LZ = "More than one default clause in switch statement", qZ = "Illegal newline after throw", BZ = "Illegal newline before arrow", UZ = "Missing catch or finally after try", XZ = "Const must be initialized", GZ = "Destructuring assignment must be initialized", YZ = "An optional chain may not be used in a `new` expression.", zZ = "Template literals may not be used in an optional chain.", JZ = "Rest parameter must be final parameter of an argument list", KZ = "Private fields may not be deleted.", HZ = "Private fields can only be referenced from within a class.", WZ = "Rest property must be final property of an object pattern", VZ = "Records to not support private elements. Remove the `#`.", $Z = "Setter should have exactly one parameter", QZ = "A setter cannot have a `this` parameter.", ZZ = "Catch variable may not be eval or arguments in strict mode", x00 = "Delete of an unqualified identifier in strict mode.", r00 = "Duplicate data property in object literal not allowed in strict mode", e00 = "Function name may not be eval or arguments in strict mode", t00 = "Assignment to eval or arguments is not allowed in strict mode", n00 = "Postfix increment/decrement may not have eval or arguments operand in strict mode", u00 = "Prefix increment/decrement may not have eval or arguments operand in strict mode", i00 = "Strict mode code may not include a with statement", f00 = "Number literals with leading zeros are not allowed in strict mode.", c00 = "Octal literals are not allowed in strict mode.", s00 = "Strict mode function may not have duplicate parameter names", a00 = "Parameter name eval or arguments is not allowed in strict mode", o00 = "Illegal \"use strict\" directive in function with non-simple parameter list", v00 = "Use of reserved word in strict mode", l00 = "Variable name may not be eval or arguments in strict mode", p00 = "You may not access a private field through the `super` keyword.", k00 = "Flow does not support abstract classes.", m00 = "Flow does not support template literal types.", h00 = "A type annotation is required for the `this` parameter.", d00 = "Arrow functions cannot have a `this` parameter; arrow functions automatically bind `this` when declared.", y00 = "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.", _00 = "The `this` parameter cannot be optional.", w00 = "The `this` parameter must be the first function parameter.", g00 = "A trailing comma is not permitted after the rest element", b00 = "Unexpected end of input", T00 = "Explicit inexact syntax must come at the end of an object type", E00 = "Opaque type aliases are not allowed in untyped mode", S00 = "Unexpected proto modifier", A00 = "Unexpected reserved word", I00 = "Unexpected reserved type", P00 = "Spreading a type is only allowed inside an object type", C00 = "Unexpected static modifier", N00 = "Unexpected `super` outside of a class method", O00 = "`super()` is only valid in a class constructor", j00 = "Type aliases are not allowed in untyped mode", D00 = "Type annotations are not allowed in untyped mode", R00 = "Type declarations are not allowed in untyped mode", F00 = "Type exports are not allowed in untyped mode", M00 = "Type imports are not allowed in untyped mode", L00 = "Interfaces are not allowed in untyped mode", q00 = "Unexpected variance sigil", B00 = "Found a decorator in an unsupported position.", U00 = "Invalid regular expression: missing /", X00 = "Unexpected whitespace between `#` and identifier", G00 = "`yield` is an invalid identifier in generators", Y00 = "Yield expression not allowed in formal parameter", z00 = [ + 0, + [ + 11, + "Duplicate export for `", + [ + 2, + 0, + [ + 12, + 96, + 0 + ] + ] + ], + "Duplicate export for `%s`" + ], J00 = [ + 0, + [ + 11, + "Private fields may only be declared once. `#", + [ + 2, + 0, + [ + 11, + "` is declared more than once.", + 0 + ] + ] + ], + "Private fields may only be declared once. `#%s` is declared more than once." + ], K00 = [ + 0, + [ + 11, + "bigint enum members need to be initialized, e.g. `", + [ + 2, + 0, + [ + 11, + " = 1n,` in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ], + "bigint enum members need to be initialized, e.g. `%s = 1n,` in enum `%s`." + ], H00 = [ + 0, + [ + 11, + "Boolean enum members need to be initialized. Use either `", + [ + 2, + 0, + [ + 11, + " = true,` or `", + [ + 2, + 0, + [ + 11, + " = false,` in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ] + ] + ], + "Boolean enum members need to be initialized. Use either `%s = true,` or `%s = false,` in enum `%s`." + ], W00 = [ + 0, + [ + 11, + "Enum member names need to be unique, but the name `", + [ + 2, + 0, + [ + 11, + "` has already been used before in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ], + "Enum member names need to be unique, but the name `%s` has already been used before in enum `%s`." + ], V00 = [ + 0, + [ + 11, + WR, + [ + 2, + 0, + [ + 11, + "` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.", + 0 + ] + ] + ], + "Enum `%s` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers." + ], $00 = "The `...` must come at the end of the enum body. Remove the trailing comma.", Q00 = "The `...` must come after all enum members. Move it to the end of the enum body.", Z00 = [ + 0, + [ + 11, + "Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ], + "Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `%s`." + ], xx0 = [ + 0, + [ + 11, + "Enum type `", + [ + 2, + 0, + [ + 11, + "` is not valid. ", + [ + 2, + 0, + 0 + ] + ] + ] + ], + "Enum type `%s` is not valid. %s" + ], rx0 = [ + 0, + [ + 11, + "Supplied enum type is not valid. ", + [ + 2, + 0, + 0 + ] + ], + "Supplied enum type is not valid. %s" + ], ex0 = [ + 0, + [ + 11, + "Enum member names and initializers are separated with `=`. Replace `", + [ + 2, + 0, + [ + 11, + ":` with `", + [ + 2, + 0, + [ + 11, + " =`.", + 0 + ] + ] + ] + ] + ], + "Enum member names and initializers are separated with `=`. Replace `%s:` with `%s =`." + ], tx0 = [ + 0, + [ + 11, + WR, + [ + 2, + 0, + [ + 11, + "` has type `", + [ + 2, + 0, + [ + 11, + "`, so the initializer of `", + [ + 2, + 0, + [ + 11, + "` needs to be a ", + [ + 2, + 0, + [ + 11, + " literal.", + 0 + ] + ] + ] + ] + ] + ] + ] + ] + ], + "Enum `%s` has type `%s`, so the initializer of `%s` needs to be a %s literal." + ], nx0 = [ + 0, + [ + 11, + "Symbol enum members cannot be initialized. Use `", + [ + 2, + 0, + [ + 11, + ",` in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ], + "Symbol enum members cannot be initialized. Use `%s,` in enum `%s`." + ], ux0 = [ + 0, + [ + 11, + "The enum member initializer for `", + [ + 2, + 0, + [ + 11, + "` needs to be a literal (either a boolean, number, or string) in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ], + "The enum member initializer for `%s` needs to be a literal (either a boolean, number, or string) in enum `%s`." + ], ix0 = [ + 0, + [ + 11, + "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `", + [ + 2, + 0, + [ + 11, + "`, consider using `", + [ + 2, + 0, + [ + 11, + "`, in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ] + ] + ], + "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%s`, consider using `%s`, in enum `%s`." + ], fx0 = [ + 0, + [ + 11, + "Number enum members need to be initialized, e.g. `", + [ + 2, + 0, + [ + 11, + " = 1,` in enum `", + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ], + "Number enum members need to be initialized, e.g. `%s = 1,` in enum `%s`." + ], cx0 = [ + 0, + [ + 11, + "String enum members need to consistently either all use initializers, or use no initializers, in enum ", + [ + 2, + 0, + [ + 12, + 46, + 0 + ] + ] + ], + "String enum members need to consistently either all use initializers, or use no initializers, in enum %s." + ], sx0 = [ + 0, + [ + 11, + "Expected corresponding JSX closing tag for ", + [ + 2, + 0, + 0 + ] + ], + "Expected corresponding JSX closing tag for %s" + ], ax0 = "immediately within another function.", ox0 = "In strict mode code, functions can only be declared at top level or ", vx0 = "inside a block, or as the body of an if statement.", lx0 = "In non-strict mode code, functions can only be declared at top level, ", px0 = " `break` statements are not required in `match` statements, as unlike `switch` statements, `match` statement cases do not fall-through by default.", kx0 = rx, mx0 = [ + 0, + [ + 11, + "Illegal break statement.", + [ + 2, + 0, + 0 + ] + ], + "Illegal break statement.%s" + ], hx0 = zM, dx0 = rx, yx0 = XM, _x0 = DF, wx0 = DM, gx0 = [ + 0, + [ + 11, + "Classes may not have ", + [ + 2, + 0, + [ + 2, + 0, + [ + 11, + DD, + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ] + ], + "Classes may not have %s%s named `%s`." + ], bx0 = "Components use `renders` instead of `:` to annotate the render type of a component.", Tx0 = uM, Ex0 = rx, Sx0 = [ + 0, + [ + 11, + "String params require local bindings using `as` renaming. You can use `'", + [ + 2, + 0, + [ + 11, + "' as ", + [ + 2, + 0, + [ + 2, + 0, + [ + 11, + ": ` ", + 0 + ] + ] + ] + ] + ] + ], + "String params require local bindings using `as` renaming. You can use `'%s' as %s%s: ` " + ], Ax0 = "Remove the period.", Ix0 = "Indexed access uses bracket notation.", Px0 = [ + 0, + [ + 11, + "Invalid indexed access. ", + [ + 2, + 0, + [ + 11, + " Use the format `T[K]`.", + 0 + ] + ] + ], + "Invalid indexed access. %s Use the format `T[K]`." + ], Cx0 = [ + 0, + [ + 11, + "Invalid flags supplied to RegExp constructor '", + [ + 2, + 0, + [ + 12, + 39, + 0 + ] + ] + ], + "Invalid flags supplied to RegExp constructor '%s'" + ], Nx0 = tn, Ox0 = Dp, jx0 = [ + 0, + [ + 11, + "In match ", + [ + 2, + 0, + [ + 11, + " pattern, the rest must be the last element in the pattern", + 0 + ] + ] + ], + "In match %s pattern, the rest must be the last element in the pattern" + ], Dx0 = [ + 0, + [ + 11, + "JSX element ", + [ + 2, + 0, + [ + 11, + " has no corresponding closing tag.", + 0 + ] + ] + ], + "JSX element %s has no corresponding closing tag." + ], Rx0 = [ + 0, + [ + 11, + tM, + [ + 2, + 0, + [ + 11, + "`. Parentheses are required to combine `??` with `&&` or `||` expressions.", + 0 + ] + ] + ], + "Unexpected token `%s`. Parentheses are required to combine `??` with `&&` or `||` expressions." + ], Fx0 = zM, Mx0 = rx, Lx0 = XM, qx0 = A6, Bx0 = [ + 0, + [ + 11, + "Records may not have ", + [ + 2, + 0, + [ + 2, + 0, + [ + 11, + DD, + [ + 2, + 0, + [ + 11, + nu, + 0 + ] + ] + ] + ] + ] + ], + "Records may not have %s%s named `%s`." + ], Ux0 = [ + 0, + [ + 2, + 0, + [ + 11, + " '", + [ + 2, + 0, + [ + 11, + "' has already been declared", + 0 + ] + ] + ] + ], + "%s '%s' has already been declared" + ], Xx0 = rx, Gx0 = k6, Yx0 = " You can try using JavaScript private fields by prepending `#` to the field name.", zx0 = Q6, Jx0 = " Fields and methods are public by default. You can simply omit the `public` keyword.", Kx0 = W6, Hx0 = [ + 0, + [ + 11, + "Flow does not support using `", + [ + 2, + 0, + [ + 11, + "` in classes.", + [ + 2, + 0, + 0 + ] + ] + ] + ], + "Flow does not support using `%s` in classes.%s" + ], Wx0 = [ + 0, + [ + 11, + "Private fields must be declared before they can be referenced. `#", + [ + 2, + 0, + [ + 11, + "` has not been declared.", + 0 + ] + ] + ], + "Private fields must be declared before they can be referenced. `#%s` has not been declared." + ], Vx0 = [ + 0, + [ + 11, + xM, + [ + 2, + 0, + 0 + ] + ], + "Unexpected %s" + ], $x0 = [ + 0, + [ + 11, + tM, + [ + 2, + 0, + [ + 11, + "`. Did you mean `", + [ + 2, + 0, + [ + 11, + "`?", + 0 + ] + ] + ] + ] + ], + "Unexpected token `%s`. Did you mean `%s`?" + ], Qx0 = [ + 0, + [ + 11, + xM, + [ + 2, + 0, + [ + 11, + ", expected ", + [ + 2, + 0, + 0 + ] + ] + ] + ], + "Unexpected %s, expected %s" + ], Zx0 = [ + 0, + [ + 11, + "Undefined label '", + [ + 2, + 0, + [ + 12, + 39, + 0 + ] + ] + ], + "Undefined label '%s'" + ], xr0 = "Parse_error.Error", rr0 = [ + 0, + [ + 0, + 36, + 37 + ], + [ + 0, + 48, + 58 + ], + [ + 0, + 65, + 91 + ], + [ + 0, + 95, + 96 + ], + [ + 0, + 97, + un + ], + [ + 0, + py, + Sg + ], + [ + 0, + NS, + s9 + ], + [ + 0, + j_, + Wm + ], + [ + 0, + xI, + z_ + ], + [ + 0, + Y3, + lk + ], + [ + 0, + ty, + Gp + ], + [ + 0, + t1, + 706 + ], + [ + 0, + CD, + 722 + ], + [ + 0, + 736, + 741 + ], + [ + 0, + 748, + 749 + ], + [ + 0, + 750, + 751 + ], + [ + 0, + 768, + 885 + ], + [ + 0, + 886, + 888 + ], + [ + 0, + 890, + 894 + ], + [ + 0, + 895, + 896 + ], + [ + 0, + 902, + 907 + ], + [ + 0, + 908, + 909 + ], + [ + 0, + 910, + 930 + ], + [ + 0, + jM, + 1014 + ], + [ + 0, + 1015, + 1154 + ], + [ + 0, + 1155, + 1160 + ], + [ + 0, + 1162, + 1328 + ], + [ + 0, + 1329, + 1367 + ], + [ + 0, + 1369, + 1370 + ], + [ + 0, + 1376, + 1417 + ], + [ + 0, + 1425, + 1470 + ], + [ + 0, + 1471, + 1472 + ], + [ + 0, + 1473, + 1475 + ], + [ + 0, + 1476, + 1478 + ], + [ + 0, + 1479, + 1480 + ], + [ + 0, + 1488, + 1515 + ], + [ + 0, + 1519, + 1523 + ], + [ + 0, + 1552, + 1563 + ], + [ + 0, + 1568, + 1642 + ], + [ + 0, + 1646, + 1748 + ], + [ + 0, + 1749, + 1757 + ], + [ + 0, + 1759, + 1769 + ], + [ + 0, + 1770, + 1789 + ], + [ + 0, + 1791, + 1792 + ], + [ + 0, + 1808, + 1867 + ], + [ + 0, + 1869, + 1970 + ], + [ + 0, + 1984, + 2038 + ], + [ + 0, + 2042, + 2043 + ], + [ + 0, + 2045, + 2046 + ], + [ + 0, + Gg, + 2094 + ], + [ + 0, + 2112, + 2140 + ], + [ + 0, + 2144, + 2155 + ], + [ + 0, + 2208, + 2229 + ], + [ + 0, + 2230, + 2238 + ], + [ + 0, + 2259, + 2274 + ], + [ + 0, + 2275, + 2404 + ], + [ + 0, + 2406, + 2416 + ], + [ + 0, + 2417, + 2436 + ], + [ + 0, + 2437, + 2445 + ], + [ + 0, + 2447, + 2449 + ], + [ + 0, + 2451, + 2473 + ], + [ + 0, + 2474, + 2481 + ], + [ + 0, + 2482, + 2483 + ], + [ + 0, + 2486, + 2490 + ], + [ + 0, + 2492, + 2501 + ], + [ + 0, + 2503, + 2505 + ], + [ + 0, + 2507, + 2511 + ], + [ + 0, + 2519, + 2520 + ], + [ + 0, + 2524, + 2526 + ], + [ + 0, + 2527, + 2532 + ], + [ + 0, + 2534, + 2546 + ], + [ + 0, + 2556, + 2557 + ], + [ + 0, + 2558, + 2559 + ], + [ + 0, + 2561, + 2564 + ], + [ + 0, + 2565, + 2571 + ], + [ + 0, + 2575, + 2577 + ], + [ + 0, + 2579, + 2601 + ], + [ + 0, + 2602, + 2609 + ], + [ + 0, + 2610, + 2612 + ], + [ + 0, + 2613, + 2615 + ], + [ + 0, + 2616, + 2618 + ], + [ + 0, + 2620, + 2621 + ], + [ + 0, + 2622, + 2627 + ], + [ + 0, + 2631, + 2633 + ], + [ + 0, + 2635, + 2638 + ], + [ + 0, + 2641, + 2642 + ], + [ + 0, + 2649, + 2653 + ], + [ + 0, + 2654, + 2655 + ], + [ + 0, + 2662, + 2678 + ], + [ + 0, + 2689, + 2692 + ], + [ + 0, + 2693, + 2702 + ], + [ + 0, + 2703, + 2706 + ], + [ + 0, + 2707, + 2729 + ], + [ + 0, + 2730, + 2737 + ], + [ + 0, + 2738, + 2740 + ], + [ + 0, + 2741, + 2746 + ], + [ + 0, + 2748, + 2758 + ], + [ + 0, + 2759, + 2762 + ], + [ + 0, + 2763, + 2766 + ], + [ + 0, + 2768, + 2769 + ], + [ + 0, + 2784, + 2788 + ], + [ + 0, + 2790, + 2800 + ], + [ + 0, + 2809, + 2816 + ], + [ + 0, + 2817, + 2820 + ], + [ + 0, + 2821, + 2829 + ], + [ + 0, + 2831, + 2833 + ], + [ + 0, + 2835, + 2857 + ], + [ + 0, + 2858, + 2865 + ], + [ + 0, + 2866, + 2868 + ], + [ + 0, + 2869, + 2874 + ], + [ + 0, + 2876, + 2885 + ], + [ + 0, + 2887, + 2889 + ], + [ + 0, + 2891, + 2894 + ], + [ + 0, + 2902, + 2904 + ], + [ + 0, + 2908, + 2910 + ], + [ + 0, + 2911, + 2916 + ], + [ + 0, + 2918, + 2928 + ], + [ + 0, + 2929, + 2930 + ], + [ + 0, + 2946, + 2948 + ], + [ + 0, + 2949, + 2955 + ], + [ + 0, + 2958, + 2961 + ], + [ + 0, + 2962, + 2966 + ], + [ + 0, + 2969, + 2971 + ], + [ + 0, + 2972, + 2973 + ], + [ + 0, + 2974, + 2976 + ], + [ + 0, + 2979, + 2981 + ], + [ + 0, + 2984, + 2987 + ], + [ + 0, + 2990, + 3002 + ], + [ + 0, + 3006, + 3011 + ], + [ + 0, + 3014, + 3017 + ], + [ + 0, + 3018, + 3022 + ], + [ + 0, + 3024, + 3025 + ], + [ + 0, + 3031, + 3032 + ], + [ + 0, + 3046, + 3056 + ], + [ + 0, + 3072, + 3085 + ], + [ + 0, + 3086, + 3089 + ], + [ + 0, + 3090, + 3113 + ], + [ + 0, + 3114, + 3130 + ], + [ + 0, + 3133, + 3141 + ], + [ + 0, + 3142, + 3145 + ], + [ + 0, + 3146, + 3150 + ], + [ + 0, + 3157, + 3159 + ], + [ + 0, + 3160, + 3163 + ], + [ + 0, + 3168, + 3172 + ], + [ + 0, + 3174, + 3184 + ], + [ + 0, + 3200, + 3204 + ], + [ + 0, + 3205, + 3213 + ], + [ + 0, + 3214, + 3217 + ], + [ + 0, + 3218, + 3241 + ], + [ + 0, + 3242, + 3252 + ], + [ + 0, + 3253, + 3258 + ], + [ + 0, + 3260, + 3269 + ], + [ + 0, + 3270, + 3273 + ], + [ + 0, + 3274, + 3278 + ], + [ + 0, + 3285, + 3287 + ], + [ + 0, + 3294, + 3295 + ], + [ + 0, + 3296, + 3300 + ], + [ + 0, + 3302, + 3312 + ], + [ + 0, + 3313, + 3315 + ], + [ + 0, + 3328, + 3332 + ], + [ + 0, + 3333, + 3341 + ], + [ + 0, + 3342, + 3345 + ], + [ + 0, + 3346, + 3397 + ], + [ + 0, + 3398, + 3401 + ], + [ + 0, + 3402, + 3407 + ], + [ + 0, + 3412, + 3416 + ], + [ + 0, + 3423, + 3428 + ], + [ + 0, + 3430, + 3440 + ], + [ + 0, + 3450, + 3456 + ], + [ + 0, + 3458, + 3460 + ], + [ + 0, + 3461, + 3479 + ], + [ + 0, + 3482, + 3506 + ], + [ + 0, + 3507, + 3516 + ], + [ + 0, + 3517, + 3518 + ], + [ + 0, + 3520, + 3527 + ], + [ + 0, + 3530, + 3531 + ], + [ + 0, + 3535, + 3541 + ], + [ + 0, + 3542, + 3543 + ], + [ + 0, + 3544, + 3552 + ], + [ + 0, + 3558, + 3568 + ], + [ + 0, + 3570, + 3572 + ], + [ + 0, + 3585, + 3643 + ], + [ + 0, + 3648, + 3663 + ], + [ + 0, + 3664, + 3674 + ], + [ + 0, + 3713, + 3715 + ], + [ + 0, + 3716, + 3717 + ], + [ + 0, + 3718, + 3723 + ], + [ + 0, + 3724, + 3748 + ], + [ + 0, + 3749, + 3750 + ], + [ + 0, + 3751, + 3774 + ], + [ + 0, + 3776, + 3781 + ], + [ + 0, + 3782, + 3783 + ], + [ + 0, + 3784, + 3790 + ], + [ + 0, + 3792, + 3802 + ], + [ + 0, + 3804, + 3808 + ], + [ + 0, + 3840, + 3841 + ], + [ + 0, + 3864, + 3866 + ], + [ + 0, + 3872, + 3882 + ], + [ + 0, + 3893, + 3894 + ], + [ + 0, + 3895, + 3896 + ], + [ + 0, + 3897, + 3898 + ], + [ + 0, + 3902, + 3912 + ], + [ + 0, + 3913, + 3949 + ], + [ + 0, + 3953, + 3973 + ], + [ + 0, + 3974, + 3992 + ], + [ + 0, + 3993, + 4029 + ], + [ + 0, + 4038, + 4039 + ], + [ + 0, + NF, + 4170 + ], + [ + 0, + 4176, + 4254 + ], + [ + 0, + 4256, + 4294 + ], + [ + 0, + 4295, + 4296 + ], + [ + 0, + 4301, + 4302 + ], + [ + 0, + 4304, + 4347 + ], + [ + 0, + 4348, + 4681 + ], + [ + 0, + 4682, + 4686 + ], + [ + 0, + 4688, + 4695 + ], + [ + 0, + 4696, + 4697 + ], + [ + 0, + 4698, + 4702 + ], + [ + 0, + 4704, + 4745 + ], + [ + 0, + 4746, + 4750 + ], + [ + 0, + 4752, + 4785 + ], + [ + 0, + 4786, + 4790 + ], + [ + 0, + 4792, + 4799 + ], + [ + 0, + 4800, + 4801 + ], + [ + 0, + 4802, + 4806 + ], + [ + 0, + 4808, + 4823 + ], + [ + 0, + 4824, + 4881 + ], + [ + 0, + 4882, + 4886 + ], + [ + 0, + 4888, + 4955 + ], + [ + 0, + 4957, + 4960 + ], + [ + 0, + 4969, + 4978 + ], + [ + 0, + 4992, + 5008 + ], + [ + 0, + 5024, + 5110 + ], + [ + 0, + 5112, + 5118 + ], + [ + 0, + 5121, + 5741 + ], + [ + 0, + 5743, + nC + ], + [ + 0, + 5761, + 5787 + ], + [ + 0, + 5792, + 5867 + ], + [ + 0, + 5870, + 5881 + ], + [ + 0, + 5888, + 5901 + ], + [ + 0, + 5902, + 5909 + ], + [ + 0, + 5920, + 5941 + ], + [ + 0, + 5952, + 5972 + ], + [ + 0, + 5984, + 5997 + ], + [ + 0, + 5998, + 6001 + ], + [ + 0, + 6002, + 6004 + ], + [ + 0, + 6016, + 6100 + ], + [ + 0, + 6103, + 6104 + ], + [ + 0, + 6108, + 6110 + ], + [ + 0, + 6112, + 6122 + ], + [ + 0, + 6155, + 6158 + ], + [ + 0, + 6160, + 6170 + ], + [ + 0, + 6176, + 6265 + ], + [ + 0, + 6272, + 6315 + ], + [ + 0, + 6320, + 6390 + ], + [ + 0, + 6400, + 6431 + ], + [ + 0, + 6432, + 6444 + ], + [ + 0, + 6448, + 6460 + ], + [ + 0, + 6470, + 6510 + ], + [ + 0, + 6512, + 6517 + ], + [ + 0, + 6528, + 6572 + ], + [ + 0, + 6576, + 6602 + ], + [ + 0, + 6608, + 6619 + ], + [ + 0, + 6656, + 6684 + ], + [ + 0, + 6688, + 6751 + ], + [ + 0, + 6752, + 6781 + ], + [ + 0, + 6783, + 6794 + ], + [ + 0, + 6800, + 6810 + ], + [ + 0, + 6823, + 6824 + ], + [ + 0, + 6832, + 6846 + ], + [ + 0, + 6912, + 6988 + ], + [ + 0, + 6992, + 7002 + ], + [ + 0, + 7019, + 7028 + ], + [ + 0, + 7040, + 7156 + ], + [ + 0, + 7168, + 7224 + ], + [ + 0, + 7232, + 7242 + ], + [ + 0, + 7245, + 7294 + ], + [ + 0, + 7296, + 7305 + ], + [ + 0, + 7312, + 7355 + ], + [ + 0, + 7357, + 7360 + ], + [ + 0, + 7376, + 7379 + ], + [ + 0, + 7380, + 7419 + ], + [ + 0, + 7424, + 7674 + ], + [ + 0, + 7675, + 7958 + ], + [ + 0, + 7960, + 7966 + ], + [ + 0, + 7968, + 8006 + ], + [ + 0, + 8008, + 8014 + ], + [ + 0, + 8016, + 8024 + ], + [ + 0, + 8025, + 8026 + ], + [ + 0, + 8027, + 8028 + ], + [ + 0, + 8029, + 8030 + ], + [ + 0, + 8031, + 8062 + ], + [ + 0, + 8064, + 8117 + ], + [ + 0, + 8118, + 8125 + ], + [ + 0, + 8126, + 8127 + ], + [ + 0, + 8130, + 8133 + ], + [ + 0, + 8134, + 8141 + ], + [ + 0, + 8144, + 8148 + ], + [ + 0, + 8150, + 8156 + ], + [ + 0, + 8160, + 8173 + ], + [ + 0, + 8178, + 8181 + ], + [ + 0, + 8182, + 8189 + ], + [ + 0, + tR, + NM + ], + [ + 0, + 8255, + 8257 + ], + [ + 0, + 8276, + 8277 + ], + [ + 0, + F8, + 8306 + ], + [ + 0, + f8, + 8320 + ], + [ + 0, + 8336, + 8349 + ], + [ + 0, + 8400, + 8413 + ], + [ + 0, + 8417, + 8418 + ], + [ + 0, + 8421, + 8433 + ], + [ + 0, + dm, + 8451 + ], + [ + 0, + Gm, + 8456 + ], + [ + 0, + 8458, + tk + ], + [ + 0, + dk, + 8470 + ], + [ + 0, + sM, + 8478 + ], + [ + 0, + _8, + Jm + ], + [ + 0, + th, + gk + ], + [ + 0, + Ik, + Hm + ], + [ + 0, + 8490, + 8506 + ], + [ + 0, + 8508, + 8512 + ], + [ + 0, + 8517, + 8522 + ], + [ + 0, + Lk, + 8527 + ], + [ + 0, + 8544, + 8585 + ], + [ + 0, + 11264, + 11311 + ], + [ + 0, + 11312, + 11359 + ], + [ + 0, + 11360, + 11493 + ], + [ + 0, + 11499, + 11508 + ], + [ + 0, + 11520, + om + ], + [ + 0, + gp, + 11560 + ], + [ + 0, + Fm, + 11566 + ], + [ + 0, + 11568, + 11624 + ], + [ + 0, + u8, + 11632 + ], + [ + 0, + ak, + 11671 + ], + [ + 0, + 11680, + lm + ], + [ + 0, + 11688, + km + ], + [ + 0, + 11696, + bp + ], + [ + 0, + 11704, + Uk + ], + [ + 0, + 11712, + z8 + ], + [ + 0, + 11720, + Ip + ], + [ + 0, + 11728, + sh + ], + [ + 0, + 11736, + 11743 + ], + [ + 0, + 11744, + 11776 + ], + [ + 0, + 12293, + 12296 + ], + [ + 0, + 12321, + uh + ], + [ + 0, + 12337, + 12342 + ], + [ + 0, + 12344, + 12349 + ], + [ + 0, + 12353, + 12439 + ], + [ + 0, + 12441, + X8 + ], + [ + 0, + 12449, + _h + ], + [ + 0, + 12540, + 12544 + ], + [ + 0, + 12549, + Ym + ], + [ + 0, + 12593, + 12687 + ], + [ + 0, + 12704, + 12731 + ], + [ + 0, + 12784, + 12800 + ], + [ + 0, + 13312, + 19894 + ], + [ + 0, + 19968, + 40944 + ], + [ + 0, + 40960, + 42125 + ], + [ + 0, + 42192, + 42238 + ], + [ + 0, + 42240, + 42509 + ], + [ + 0, + 42512, + 42540 + ], + [ + 0, + 42560, + 42608 + ], + [ + 0, + 42612, + ek + ], + [ + 0, + 42623, + 42738 + ], + [ + 0, + 42775, + 42784 + ], + [ + 0, + 42786, + 42889 + ], + [ + 0, + 42891, + 42944 + ], + [ + 0, + 42946, + 42951 + ], + [ + 0, + l8, + 43048 + ], + [ + 0, + 43072, + 43124 + ], + [ + 0, + 43136, + 43206 + ], + [ + 0, + 43216, + 43226 + ], + [ + 0, + 43232, + 43256 + ], + [ + 0, + $k, + Yk + ], + [ + 0, + 43261, + 43310 + ], + [ + 0, + 43312, + 43348 + ], + [ + 0, + 43360, + 43389 + ], + [ + 0, + 43392, + 43457 + ], + [ + 0, + W8, + 43482 + ], + [ + 0, + 43488, + Bp + ], + [ + 0, + aF, + 43575 + ], + [ + 0, + 43584, + 43598 + ], + [ + 0, + 43600, + 43610 + ], + [ + 0, + 43616, + 43639 + ], + [ + 0, + fm, + 43715 + ], + [ + 0, + 43739, + 43742 + ], + [ + 0, + 43744, + 43760 + ], + [ + 0, + 43762, + 43767 + ], + [ + 0, + 43777, + 43783 + ], + [ + 0, + 43785, + 43791 + ], + [ + 0, + 43793, + 43799 + ], + [ + 0, + 43808, + wm + ], + [ + 0, + 43816, + p8 + ], + [ + 0, + 43824, + Q8 + ], + [ + 0, + 43868, + Np + ], + [ + 0, + 43888, + 44011 + ], + [ + 0, + 44012, + 44014 + ], + [ + 0, + 44016, + 44026 + ], + [ + 0, + 44032, + 55204 + ], + [ + 0, + 55216, + 55239 + ], + [ + 0, + 55243, + 55292 + ], + [ + 0, + 63744, + 64110 + ], + [ + 0, + 64112, + 64218 + ], + [ + 0, + 64256, + 64263 + ], + [ + 0, + 64275, + 64280 + ], + [ + 0, + Wk, + qp + ], + [ + 0, + 64298, + b8 + ], + [ + 0, + 64312, + ym + ], + [ + 0, + Qk, + pk + ], + [ + 0, + 64320, + ih + ], + [ + 0, + 64323, + Th + ], + [ + 0, + 64326, + 64434 + ], + [ + 0, + 64467, + 64830 + ], + [ + 0, + 64848, + 64912 + ], + [ + 0, + 64914, + 64968 + ], + [ + 0, + 65008, + 65020 + ], + [ + 0, + 65024, + 65040 + ], + [ + 0, + 65056, + 65072 + ], + [ + 0, + 65075, + 65077 + ], + [ + 0, + 65101, + 65104 + ], + [ + 0, + 65136, + $m + ], + [ + 0, + 65142, + 65277 + ], + [ + 0, + 65296, + 65306 + ], + [ + 0, + 65313, + 65339 + ], + [ + 0, + 65343, + pm + ], + [ + 0, + 65345, + 65371 + ], + [ + 0, + 65382, + 65471 + ], + [ + 0, + 65474, + 65480 + ], + [ + 0, + 65482, + 65488 + ], + [ + 0, + 65490, + 65496 + ], + [ + 0, + 65498, + 65501 + ], + [ + 0, + Y6, + lh + ], + [ + 0, + 65549, + Z8 + ], + [ + 0, + 65576, + Ek + ], + [ + 0, + 65596, + Ak + ], + [ + 0, + 65599, + 65614 + ], + [ + 0, + 65616, + 65630 + ], + [ + 0, + 65664, + 65787 + ], + [ + 0, + 65856, + 65909 + ], + [ + 0, + 66045, + 66046 + ], + [ + 0, + 66176, + 66205 + ], + [ + 0, + 66208, + 66257 + ], + [ + 0, + 66272, + 66273 + ], + [ + 0, + 66304, + 66336 + ], + [ + 0, + 66349, + 66379 + ], + [ + 0, + 66384, + 66427 + ], + [ + 0, + 66432, + 66462 + ], + [ + 0, + 66464, + 66500 + ], + [ + 0, + 66504, + ah + ], + [ + 0, + 66513, + 66518 + ], + [ + 0, + 66560, + 66718 + ], + [ + 0, + 66720, + 66730 + ], + [ + 0, + 66736, + 66772 + ], + [ + 0, + 66776, + 66812 + ], + [ + 0, + 66816, + 66856 + ], + [ + 0, + 66864, + 66916 + ], + [ + 0, + 67072, + 67383 + ], + [ + 0, + 67392, + 67414 + ], + [ + 0, + 67424, + 67432 + ], + [ + 0, + 67584, + 67590 + ], + [ + 0, + vk, + x8 + ], + [ + 0, + 67594, + oh + ], + [ + 0, + 67639, + 67641 + ], + [ + 0, + $8, + 67645 + ], + [ + 0, + 67647, + 67670 + ], + [ + 0, + 67680, + 67703 + ], + [ + 0, + 67712, + 67743 + ], + [ + 0, + 67808, + Hp + ], + [ + 0, + 67828, + 67830 + ], + [ + 0, + 67840, + 67862 + ], + [ + 0, + 67872, + 67898 + ], + [ + 0, + 67968, + 68024 + ], + [ + 0, + 68030, + 68032 + ], + [ + 0, + ph, + 68100 + ], + [ + 0, + 68101, + 68103 + ], + [ + 0, + 68108, + Xk + ], + [ + 0, + 68117, + V8 + ], + [ + 0, + 68121, + 68150 + ], + [ + 0, + 68152, + 68155 + ], + [ + 0, + 68159, + 68160 + ], + [ + 0, + 68192, + 68221 + ], + [ + 0, + 68224, + 68253 + ], + [ + 0, + 68288, + D8 + ], + [ + 0, + 68297, + 68327 + ], + [ + 0, + 68352, + 68406 + ], + [ + 0, + 68416, + 68438 + ], + [ + 0, + 68448, + 68467 + ], + [ + 0, + 68480, + 68498 + ], + [ + 0, + 68608, + 68681 + ], + [ + 0, + 68736, + 68787 + ], + [ + 0, + 68800, + 68851 + ], + [ + 0, + 68864, + 68904 + ], + [ + 0, + 68912, + 68922 + ], + [ + 0, + 69376, + 69405 + ], + [ + 0, + qm, + 69416 + ], + [ + 0, + 69424, + 69457 + ], + [ + 0, + 69600, + 69623 + ], + [ + 0, + 69632, + 69703 + ], + [ + 0, + 69734, + nh + ], + [ + 0, + 69759, + 69819 + ], + [ + 0, + 69840, + 69865 + ], + [ + 0, + 69872, + 69882 + ], + [ + 0, + 69888, + 69941 + ], + [ + 0, + 69942, + 69952 + ], + [ + 0, + Up, + Dk + ], + [ + 0, + 69968, + 70004 + ], + [ + 0, + Km, + 70007 + ], + [ + 0, + 70016, + 70085 + ], + [ + 0, + 70089, + 70093 + ], + [ + 0, + 70096, + Om + ], + [ + 0, + o8, + 70109 + ], + [ + 0, + 70144, + Nm + ], + [ + 0, + 70163, + 70200 + ], + [ + 0, + 70206, + 70207 + ], + [ + 0, + 70272, + Pm + ], + [ + 0, + S8, + Fk + ], + [ + 0, + 70282, + Cm + ], + [ + 0, + 70287, + mm + ], + [ + 0, + 70303, + 70313 + ], + [ + 0, + 70320, + 70379 + ], + [ + 0, + 70384, + 70394 + ], + [ + 0, + 70400, + jp + ], + [ + 0, + 70405, + 70413 + ], + [ + 0, + 70415, + 70417 + ], + [ + 0, + 70419, + Vm + ], + [ + 0, + 70442, + Y8 + ], + [ + 0, + 70450, + cm + ], + [ + 0, + 70453, + 70458 + ], + [ + 0, + 70459, + 70469 + ], + [ + 0, + 70471, + 70473 + ], + [ + 0, + 70475, + 70478 + ], + [ + 0, + Yp, + 70481 + ], + [ + 0, + 70487, + 70488 + ], + [ + 0, + 70493, + 70500 + ], + [ + 0, + 70502, + 70509 + ], + [ + 0, + 70512, + 70517 + ], + [ + 0, + 70656, + 70731 + ], + [ + 0, + 70736, + 70746 + ], + [ + 0, + uk, + 70752 + ], + [ + 0, + 70784, + Um + ], + [ + 0, + i8, + 70856 + ], + [ + 0, + 70864, + 70874 + ], + [ + 0, + 71040, + 71094 + ], + [ + 0, + 71096, + 71105 + ], + [ + 0, + 71128, + 71134 + ], + [ + 0, + 71168, + 71233 + ], + [ + 0, + a8, + 71237 + ], + [ + 0, + 71248, + 71258 + ], + [ + 0, + 71296, + 71353 + ], + [ + 0, + 71360, + 71370 + ], + [ + 0, + 71424, + 71451 + ], + [ + 0, + 71453, + 71468 + ], + [ + 0, + 71472, + 71482 + ], + [ + 0, + 71680, + 71739 + ], + [ + 0, + 71840, + 71914 + ], + [ + 0, + 71935, + 71936 + ], + [ + 0, + 72096, + 72104 + ], + [ + 0, + 72106, + 72152 + ], + [ + 0, + 72154, + R8 + ], + [ + 0, + Xm, + 72165 + ], + [ + 0, + t8, + 72255 + ], + [ + 0, + 72263, + 72264 + ], + [ + 0, + qk, + 72346 + ], + [ + 0, + k8, + 72350 + ], + [ + 0, + 72384, + 72441 + ], + [ + 0, + 72704, + zm + ], + [ + 0, + 72714, + 72759 + ], + [ + 0, + 72760, + 72769 + ], + [ + 0, + 72784, + 72794 + ], + [ + 0, + 72818, + 72848 + ], + [ + 0, + 72850, + 72872 + ], + [ + 0, + 72873, + 72887 + ], + [ + 0, + 72960, + d8 + ], + [ + 0, + 72968, + ch + ], + [ + 0, + 72971, + 73015 + ], + [ + 0, + 73018, + 73019 + ], + [ + 0, + 73020, + 73022 + ], + [ + 0, + 73023, + 73032 + ], + [ + 0, + 73040, + 73050 + ], + [ + 0, + 73056, + E8 + ], + [ + 0, + 73063, + bm + ], + [ + 0, + 73066, + 73103 + ], + [ + 0, + 73104, + 73106 + ], + [ + 0, + 73107, + 73113 + ], + [ + 0, + 73120, + 73130 + ], + [ + 0, + 73440, + 73463 + ], + [ + 0, + 73728, + 74650 + ], + [ + 0, + 74752, + 74863 + ], + [ + 0, + 74880, + 75076 + ], + [ + 0, + 77824, + 78895 + ], + [ + 0, + 82944, + 83527 + ], + [ + 0, + 92160, + 92729 + ], + [ + 0, + 92736, + 92767 + ], + [ + 0, + 92768, + 92778 + ], + [ + 0, + 92880, + 92910 + ], + [ + 0, + 92912, + 92917 + ], + [ + 0, + 92928, + 92983 + ], + [ + 0, + 92992, + 92996 + ], + [ + 0, + 93008, + 93018 + ], + [ + 0, + 93027, + 93048 + ], + [ + 0, + 93053, + 93072 + ], + [ + 0, + 93760, + 93824 + ], + [ + 0, + 93952, + 94027 + ], + [ + 0, + gm, + 94088 + ], + [ + 0, + 94095, + 94112 + ], + [ + 0, + 94176, + mk + ], + [ + 0, + Op, + 94180 + ], + [ + 0, + 94208, + 100344 + ], + [ + 0, + 100352, + 101107 + ], + [ + 0, + 110592, + 110879 + ], + [ + 0, + 110928, + 110931 + ], + [ + 0, + 110948, + 110952 + ], + [ + 0, + 110960, + 111356 + ], + [ + 0, + 113664, + 113771 + ], + [ + 0, + 113776, + 113789 + ], + [ + 0, + 113792, + 113801 + ], + [ + 0, + 113808, + 113818 + ], + [ + 0, + 113821, + 113823 + ], + [ + 0, + 119141, + 119146 + ], + [ + 0, + 119149, + 119155 + ], + [ + 0, + 119163, + 119171 + ], + [ + 0, + 119173, + 119180 + ], + [ + 0, + 119210, + 119214 + ], + [ + 0, + 119362, + 119365 + ], + [ + 0, + 119808, + Fp + ], + [ + 0, + 119894, + jk + ], + [ + 0, + 119966, + 119968 + ], + [ + 0, + r8, + 119971 + ], + [ + 0, + 119973, + 119975 + ], + [ + 0, + 119977, + Ah + ], + [ + 0, + 119982, + Sm + ], + [ + 0, + M8, + xm + ], + [ + 0, + 119997, + c8 + ], + [ + 0, + 120005, + bh + ], + [ + 0, + 120071, + 120075 + ], + [ + 0, + 120077, + sk + ], + [ + 0, + 120086, + Im + ], + [ + 0, + 120094, + Xp + ], + [ + 0, + 120123, + H8 + ], + [ + 0, + 120128, + n8 + ], + [ + 0, + Jk, + 120135 + ], + [ + 0, + 120138, + eh + ], + [ + 0, + 120146, + 120486 + ], + [ + 0, + 120488, + yk + ], + [ + 0, + 120514, + T8 + ], + [ + 0, + 120540, + wh + ], + [ + 0, + 120572, + Rk + ], + [ + 0, + 120598, + C8 + ], + [ + 0, + 120630, + Zp + ], + [ + 0, + 120656, + w8 + ], + [ + 0, + 120688, + zp + ], + [ + 0, + 120714, + Cp + ], + [ + 0, + 120746, + Nk + ], + [ + 0, + 120772, + 120780 + ], + [ + 0, + 120782, + 120832 + ], + [ + 0, + 121344, + 121399 + ], + [ + 0, + 121403, + 121453 + ], + [ + 0, + 121461, + 121462 + ], + [ + 0, + 121476, + 121477 + ], + [ + 0, + 121499, + 121504 + ], + [ + 0, + 121505, + 121520 + ], + [ + 0, + 122880, + 122887 + ], + [ + 0, + 122888, + 122905 + ], + [ + 0, + 122907, + 122914 + ], + [ + 0, + 122915, + 122917 + ], + [ + 0, + 122918, + 122923 + ], + [ + 0, + 123136, + 123181 + ], + [ + 0, + 123184, + 123198 + ], + [ + 0, + 123200, + 123210 + ], + [ + 0, + Sp, + 123215 + ], + [ + 0, + 123584, + 123642 + ], + [ + 0, + 124928, + 125125 + ], + [ + 0, + 125136, + 125143 + ], + [ + 0, + 125184, + 125260 + ], + [ + 0, + 125264, + 125274 + ], + [ + 0, + 126464, + xk + ], + [ + 0, + 126469, + hm + ], + [ + 0, + 126497, + yh + ], + [ + 0, + Pp, + 126501 + ], + [ + 0, + Mm, + J8 + ], + [ + 0, + 126505, + Ep + ], + [ + 0, + 126516, + N8 + ], + [ + 0, + kh, + tm + ], + [ + 0, + Vp, + 126524 + ], + [ + 0, + fh, + 126531 + ], + [ + 0, + Eh, + Qp + ], + [ + 0, + hh, + vm + ], + [ + 0, + vh, + Mp + ], + [ + 0, + 126541, + Mk + ], + [ + 0, + 126545, + xh + ], + [ + 0, + Dm, + 126549 + ], + [ + 0, + j8, + $p + ], + [ + 0, + Zk, + y8 + ], + [ + 0, + am, + rh + ], + [ + 0, + ok, + Jp + ], + [ + 0, + q8, + Sk + ], + [ + 0, + 126561, + Wp + ], + [ + 0, + Zm, + 126565 + ], + [ + 0, + 126567, + Rp + ], + [ + 0, + 126572, + nk + ], + [ + 0, + 126580, + A8 + ], + [ + 0, + 126585, + Vk + ], + [ + 0, + O8, + Bm + ], + [ + 0, + 126592, + Kp + ], + [ + 0, + 126603, + 126620 + ], + [ + 0, + 126625, + P8 + ], + [ + 0, + 126629, + m8 + ], + [ + 0, + 126635, + 126652 + ], + [ + 0, + 131072, + 173783 + ], + [ + 0, + 173824, + 177973 + ], + [ + 0, + 177984, + 178206 + ], + [ + 0, + 178208, + 183970 + ], + [ + 0, + 183984, + 191457 + ], + [ + 0, + 194560, + 195102 + ], + [ + 0, + 917760, + 918e3 + ] + ], er0 = [ + 0, + 1, + 0 + ], tr0 = [ + 0, + 0, + [ + 0, + 1, + 0 + ], + [ + 0, + 1, + 0 + ] + ], nr0 = sL, ur0 = "end of input", ir0 = U6, fr0 = "template literal part", cr0 = U6, sr0 = nD, ar0 = sL, or0 = U6, vr0 = H3, lr0 = U6, pr0 = $v, kr0 = U6, mr0 = K3, hr0 = "an", dr0 = St, yr0 = Nu, _r0 = [ + 0, + [ + 11, + "token `", + [ + 2, + 0, + [ + 12, + 96, + 0 + ] + ] + ], + "token `%s`" + ], wr0 = "{", gr0 = em, br0 = "{|", Tr0 = "|}", Er0 = PM, Sr0 = iM, Ar0 = "[", Ir0 = "]", Pr0 = NT, Cr0 = JL, Nr0 = ln, Or0 = "=>", jr0 = "...", Dr0 = _D, Rr0 = DM, Fr0 = $3, Mr0 = nm, Lr0 = bo, qr0 = I6, Br0 = Je, Ur0 = Ve, Xr0 = $P, Gr0 = DT, Yr0 = Bv, zr0 = He, Jr0 = um, Kr0 = g6, Hr0 = Tp, Wr0 = L8, Vr0 = No, $r0 = cl, Qr0 = Hv, Zr0 = wa, x10 = Pa, r10 = We, e10 = rk, t10 = Rm, n10 = Xe, u10 = Fv, i10 = Tk, f10 = U8, c10 = K8, s10 = h6, a10 = mc, o10 = Ue, v10 = Ck, l10 = Yv, p10 = E6, k10 = Aa, m10 = ga, h10 = j6, d10 = dh, y10 = W2, _10 = fl, w10 = Oo, g10 = ae, b10 = Pk, T10 = Q6, E10 = k6, S10 = W6, A10 = H2, I10 = Ke, P10 = x4, C10 = tc, N10 = zb, O10 = JS, j10 = Io, D10 = Kv, R10 = "%checks", F10 = TR, M10 = hL, L10 = GD, q10 = bF, B10 = vM, U10 = yo, X10 = qD, G10 = PF, Y10 = IR, z10 = RR, J10 = YD, K10 = kM, H10 = fF, W10 = $L, V10 = eF, $10 = p_, Q10 = "?.", Z10 = Dw, x20 = uM, r20 = Iv, e20 = LF, t20 = CM, n20 = wR, u20 = _k, i20 = Qm, f20 = GM, c20 = $F, s20 = SF, a20 = OD, o20 = QL, v20 = WD, l20 = Qy, p20 = F6, k20 = YF, m20 = CF, h20 = yD, d20 = $7, y20 = ze, _20 = se, w20 = _R, g20 = pF, b20 = HL, T20 = SD, E20 = VL, S20 = ZM, A20 = kR, I20 = rx, P20 = ik, C20 = wk, N20 = be, O20 = H3, j20 = $v, D20 = K3, R20 = ga, F20 = H6, M20 = hk, L20 = bk, q20 = Hk, B20 = Lm, U20 = Xv, X20 = FD, G20 = J6, Y20 = tl, z20 = V3, J20 = jF, K20 = uF, H20 = m6, W20 = m6, V20 = gL, $20 = m6, Q20 = m6, Z20 = em, xe0 = em, re0 = gL, ee0 = se, te0 = se, ne0 = O6, ue0 = rm, ie0 = "T_LCURLY", fe0 = "T_RCURLY", ce0 = "T_LCURLYBAR", se0 = "T_RCURLYBAR", ae0 = "T_LPAREN", oe0 = "T_RPAREN", ve0 = "T_LBRACKET", le0 = "T_RBRACKET", pe0 = "T_SEMICOLON", ke0 = "T_COMMA", me0 = "T_PERIOD", he0 = "T_ARROW", de0 = "T_ELLIPSIS", ye0 = "T_AT", _e0 = "T_POUND", we0 = "T_FUNCTION", ge0 = "T_IF", be0 = "T_IN", Te0 = "T_INSTANCEOF", Ee0 = "T_RETURN", Se0 = "T_SWITCH", Ae0 = "T_MATCH", Ie0 = "T_RECORD", Pe0 = "T_THIS", Ce0 = "T_THROW", Ne0 = "T_TRY", Oe0 = "T_VAR", je0 = "T_WHILE", De0 = "T_WITH", Re0 = "T_CONST", Fe0 = "T_LET", Me0 = "T_NULL", Le0 = "T_FALSE", qe0 = "T_TRUE", Be0 = "T_BREAK", Ue0 = "T_CASE", Xe0 = "T_CATCH", Ge0 = "T_CONTINUE", Ye0 = "T_DEFAULT", ze0 = "T_DO", Je0 = "T_FINALLY", Ke0 = "T_FOR", He0 = "T_CLASS", We0 = "T_EXTENDS", Ve0 = "T_STATIC", $e0 = "T_ELSE", Qe0 = "T_NEW", Ze0 = "T_DELETE", xt0 = "T_TYPEOF", rt0 = "T_VOID", et0 = "T_ENUM", tt0 = "T_EXPORT", nt0 = "T_IMPORT", ut0 = "T_SUPER", it0 = "T_IMPLEMENTS", ft0 = "T_INTERFACE", ct0 = "T_PACKAGE", st0 = "T_PRIVATE", at0 = "T_PROTECTED", ot0 = "T_PUBLIC", vt0 = "T_YIELD", lt0 = "T_DEBUGGER", pt0 = "T_DECLARE", kt0 = "T_TYPE", mt0 = "T_OPAQUE", ht0 = "T_OF", dt0 = "T_ASYNC", yt0 = "T_AWAIT", _t0 = "T_CHECKS", wt0 = "T_RSHIFT3_ASSIGN", gt0 = "T_RSHIFT_ASSIGN", bt0 = "T_LSHIFT_ASSIGN", Tt0 = "T_BIT_XOR_ASSIGN", Et0 = "T_BIT_OR_ASSIGN", St0 = "T_BIT_AND_ASSIGN", At0 = "T_MOD_ASSIGN", It0 = "T_DIV_ASSIGN", Pt0 = "T_MULT_ASSIGN", Ct0 = "T_EXP_ASSIGN", Nt0 = "T_MINUS_ASSIGN", Ot0 = "T_PLUS_ASSIGN", jt0 = "T_NULLISH_ASSIGN", Dt0 = "T_AND_ASSIGN", Rt0 = "T_OR_ASSIGN", Ft0 = "T_ASSIGN", Mt0 = "T_PLING_PERIOD", Lt0 = "T_PLING_PLING", qt0 = "T_PLING", Bt0 = "T_COLON", Ut0 = "T_OR", Xt0 = "T_AND", Gt0 = "T_BIT_OR", Yt0 = "T_BIT_XOR", zt0 = "T_BIT_AND", Jt0 = "T_EQUAL", Kt0 = "T_NOT_EQUAL", Ht0 = "T_STRICT_EQUAL", Wt0 = "T_STRICT_NOT_EQUAL", Vt0 = "T_LESS_THAN_EQUAL", $t0 = "T_GREATER_THAN_EQUAL", Qt0 = "T_LESS_THAN", Zt0 = "T_GREATER_THAN", xn0 = "T_LSHIFT", rn0 = "T_RSHIFT", en0 = "T_RSHIFT3", tn0 = "T_PLUS", nn0 = "T_MINUS", un0 = "T_DIV", in0 = "T_MULT", fn0 = "T_EXP", cn0 = "T_MOD", sn0 = "T_NOT", an0 = "T_BIT_NOT", on0 = "T_INCR", vn0 = "T_DECR", ln0 = "T_EOF", pn0 = "T_ANY_TYPE", kn0 = "T_MIXED_TYPE", mn0 = "T_EMPTY_TYPE", hn0 = "T_NUMBER_TYPE", dn0 = "T_BIGINT_TYPE", yn0 = "T_STRING_TYPE", _n0 = "T_VOID_TYPE", wn0 = "T_SYMBOL_TYPE", gn0 = "T_UNKNOWN_TYPE", bn0 = "T_NEVER_TYPE", Tn0 = "T_UNDEFINED_TYPE", En0 = "T_KEYOF", Sn0 = "T_READONLY", An0 = "T_INFER", In0 = "T_IS", Pn0 = "T_ASSERTS", Cn0 = "T_IMPLIES", Nn0 = KL, On0 = KL, jn0 = "T_NUMBER", Dn0 = "T_BIGINT", Rn0 = "T_STRING", Fn0 = "T_TEMPLATE_PART", Mn0 = "T_IDENTIFIER", Ln0 = "T_REGEXP", qn0 = "T_INTERPRETER", Bn0 = "T_ERROR", Un0 = "T_JSX_IDENTIFIER", Xn0 = XL, Gn0 = XL, Yn0 = "T_BOOLEAN_TYPE", zn0 = "T_NUMBER_SINGLETON_TYPE", Jn0 = "T_BIGINT_SINGLETON_TYPE", Kn0 = [ + 0, + BR, + $S, + 9 + ], Hn0 = [ + 0, + BR, + Hg, + 9 + ], Wn0 = wL, Vn0 = "*/", $n0 = wL, Qn0 = "unreachable line_comment", Zn0 = "unreachable string_quote", x70 = "\\", r70 = "unreachable template_part", e70 = `\r +`, t70 = ug, n70 = "unreachable regexp_class", u70 = LD, i70 = "unreachable regexp_body", f70 = rx, c70 = rx, s70 = rx, a70 = rx, o70 = hR, v70 = "{'>'}", l70 = F6, p70 = "{'}'}", k70 = em, m70 = Ao, h70 = NT, d70 = Qm, y70 = hR, _70 = Ao, w70 = NT, g70 = Qm, b70 = "unreachable type_token wholenumber", T70 = "unreachable type_token wholebigint", E70 = "unreachable type_token floatbigint", S70 = "unreachable type_token scinumber", A70 = "unreachable type_token scibigint", I70 = "unreachable type_token hexnumber", P70 = "unreachable type_token hexbigint", C70 = "unreachable type_token legacyoctnumber", N70 = "unreachable type_token octnumber", O70 = "unreachable type_token octbigint", j70 = "unreachable type_token binnumber", D70 = "unreachable type_token bigbigint", R70 = "unreachable type_token", F70 = yL, M70 = [11, 1], L70 = [11, 0], q70 = "unreachable template_tail", B70 = rx, U70 = rx, X70 = "unreachable jsx_child", G70 = "unreachable jsx_tag", Y70 = [0, hw], z70 = [0, 913], J70 = [0, Y3], K70 = [0, mh], H70 = [0, cR], W70 = [0, QP], V70 = [0, 8747], $70 = [0, gD], Q70 = [0, 916], Z70 = [0, 8225], xu0 = [0, 935], ru0 = [0, VI], eu0 = [0, 914], tu0 = [0, vL], nu0 = [0, IF], uu0 = [0, RE], iu0 = [0, 915], fu0 = [0, TD], cu0 = [0, 919], su0 = [0, 917], au0 = [0, _L], ou0 = [0, KD], vu0 = [0, HR], lu0 = [0, 924], pu0 = [0, 923], ku0 = [0, 922], mu0 = [0, oF], hu0 = [0, 921], du0 = [0, eM], yu0 = [0, Hg], _u0 = [0, xF], wu0 = [0, ty], gu0 = [0, 927], bu0 = [0, 937], Tu0 = [0, HD], Eu0 = [0, $R], Su0 = [0, uR], Au0 = [0, 338], Iu0 = [0, 352], Pu0 = [0, 929], Cu0 = [0, 936], Nu0 = [0, 8243], Ou0 = [0, 928], ju0 = [0, 934], Du0 = [0, qL], Ru0 = [0, o_], Fu0 = [0, 933], Mu0 = [0, pM], Lu0 = [0, nL], qu0 = [0, fD], Bu0 = [0, 920], Uu0 = [0, 932], Xu0 = [0, jD], Gu0 = [0, dR], Yu0 = [0, KF], zu0 = [0, JR], Ju0 = [0, 918], Ku0 = [0, SR], Hu0 = [0, HF], Wu0 = [0, 926], Vu0 = [0, lF], $u0 = [0, jM], Qu0 = [0, 925], Zu0 = [0, 39], xi0 = [0, 8736], ri0 = [0, 8743], ei0 = [0, 38], ti0 = [0, 945], ni0 = [0, 8501], ui0 = [0, Sv], ii0 = [0, 8226], fi0 = [0, JD], ci0 = [0, 946], si0 = [0, 8222], ai0 = [0, RD], oi0 = [0, wM], vi0 = [0, 8776], li0 = [0, qI], pi0 = [0, 8773], ki0 = [0, 9827], mi0 = [0, CD], hi0 = [0, 967], di0 = [0, qM], yi0 = [0, Wm], _i0 = [0, PD], wi0 = [0, GF], gi0 = [0, 8595], bi0 = [0, 8224], Ti0 = [0, 8659], Ei0 = [0, sR], Si0 = [0, 8746], Ai0 = [0, 8629], Ii0 = [0, yR], Pi0 = [0, 8745], Ci0 = [0, 8195], Ni0 = [0, 8709], Oi0 = [0, iD], ji0 = [0, dL], Di0 = [0, aL], Ri0 = [0, Gp], Fi0 = [0, 9830], Mi0 = [0, 8707], Li0 = [0, 8364], qi0 = [0, EM], Bi0 = [0, rl], Ui0 = [0, 951], Xi0 = [0, 8801], Gi0 = [0, 949], Yi0 = [0, 8194], zi0 = [0, 8805], Ji0 = [0, 947], Ki0 = [0, 8260], Hi0 = [0, jE], Wi0 = [0, nR], Vi0 = [0, $S], $i0 = [0, 8704], Qi0 = [0, XF], Zi0 = [0, EL], xf0 = [0, 8230], rf0 = [0, 9829], ef0 = [0, 8596], tf0 = [0, 8660], nf0 = [0, 62], uf0 = [0, 402], if0 = [0, 948], ff0 = [0, nF], cf0 = [0, E9], sf0 = [0, 8712], af0 = [0, sP], of0 = [0, 953], vf0 = [0, 8734], lf0 = [0, 8465], pf0 = [0, IM], kf0 = [0, 8220], mf0 = [0, 8968], hf0 = [0, 8592], df0 = [0, Sg], yf0 = [0, 10216], _f0 = [0, 955], wf0 = [0, 8656], gf0 = [0, 954], bf0 = [0, 60], Tf0 = [0, 8216], Ef0 = [0, 8249], Sf0 = [0, NM], Af0 = [0, 9674], If0 = [0, 8727], Pf0 = [0, 8970], Cf0 = [0, AL], Nf0 = [0, 8711], Of0 = [0, 956], jf0 = [0, 8722], Df0 = [0, j_], Rf0 = [0, NS], Ff0 = [0, 8212], Mf0 = [0, NR], Lf0 = [0, 8804], qf0 = [0, 957], Bf0 = [0, kF], Uf0 = [0, 8836], Xf0 = [0, 8713], Gf0 = [0, KR], Yf0 = [0, 8715], zf0 = [0, 8800], Jf0 = [0, 8853], Kf0 = [0, 959], Hf0 = [0, 969], Wf0 = [0, 8254], Vf0 = [0, HM], $f0 = [0, 339], Qf0 = [0, jv], Zf0 = [0, BM], xc0 = [0, s9], rc0 = [0, ul], ec0 = [0, 8855], tc0 = [0, ME], nc0 = [0, t1], uc0 = [0, xI], ic0 = [0, py], fc0 = [0, da], cc0 = [0, rL], sc0 = [0, 982], ac0 = [0, 960], oc0 = [0, 966], vc0 = [0, 8869], lc0 = [0, 8240], pc0 = [0, 8706], kc0 = [0, 8744], mc0 = [0, 8211], hc0 = [0, 10217], dc0 = [0, 8730], yc0 = [0, 8658], _c0 = [0, 34], wc0 = [0, 968], gc0 = [0, 8733], bc0 = [0, 8719], Tc0 = [0, 961], Ec0 = [0, 8971], Sc0 = [0, LL], Ac0 = [0, 8476], Ic0 = [0, 8221], Pc0 = [0, 8969], Cc0 = [0, 8594], Nc0 = [0, z_], Oc0 = [0, bM], jc0 = [0, Sb], Dc0 = [0, 8901], Rc0 = [0, 353], Fc0 = [0, 8218], Mc0 = [0, 8217], Lc0 = [0, 8250], qc0 = [0, 8835], Bc0 = [0, 8721], Uc0 = [0, 8838], Xc0 = [0, 8834], Gc0 = [0, 9824], Yc0 = [0, 8764], zc0 = [0, 962], Jc0 = [0, 963], Kc0 = [0, 8207], Hc0 = [0, 952], Wc0 = [0, 8756], Vc0 = [0, 964], $c0 = [0, e8], Qc0 = [0, 8839], Zc0 = [0, AC], xs0 = [0, fk], rs0 = [0, ol], es0 = [0, 8657], ts0 = [0, 8482], ns0 = [0, lk], us0 = [0, 732], is0 = [0, Q3], fs0 = [0, 8201], cs0 = [0, 977], ss0 = [0, sM], as0 = [0, xl], os0 = [0, 965], vs0 = [0, 978], ls0 = [0, IL], ps0 = [0, jS], ks0 = [0, WL], ms0 = [0, tR], hs0 = [0, 8205], ds0 = [0, 950], ys0 = [0, Bk], _s0 = [0, hF], ws0 = [0, QE], gs0 = [0, 958], bs0 = [0, 8593], Ts0 = [0, oD], Es0 = [0, 8242], Ss0 = [0, kI], As0 = "unreachable regexp", Is0 = "unreachable token wholenumber", Ps0 = "unreachable token wholebigint", Cs0 = "unreachable token floatbigint", Ns0 = "unreachable token scinumber", Os0 = "unreachable token scibigint", js0 = "unreachable token hexnumber", Ds0 = "unreachable token hexbigint", Rs0 = "unreachable token legacyoctnumber", Fs0 = "unreachable token legacynonoctnumber", Ms0 = "unreachable token octnumber", Ls0 = "unreachable token octbigint", qs0 = "unreachable token bignumber", Bs0 = "unreachable token bigint", Us0 = "unreachable token", Xs0 = yL, Gs0 = [7, "#!"], Ys0 = "expected ?", zs0 = "unreachable string_escape", Js0 = V2, Ks0 = P6, Hs0 = P6, Ws0 = V2, Vs0 = KP, $s0 = EF, Qs0 = "n", Zs0 = "r", xa0 = "t", ra0 = zF, ea0 = P6, ta0 = Ao, na0 = Ao, ua0 = "unreachable id_char", ia0 = Ao, fa0 = Ao, ca0 = P6, sa0 = uL, aa0 = pD, oa0 = gb, va0 = [28, "token ILLEGAL"], la0 = [ + 0, + [ + 11, + "the identifier `", + [ + 2, + 0, + [ + 12, + 96, + 0 + ] + ] + ], + "the identifier `%s`" + ], pa0 = [0, 1], ka0 = [0, 1], ma0 = OF, ha0 = OF, da0 = [ + 0, + [ + 11, + "an identifier. When exporting a ", + [ + 2, + 0, + [ + 11, + " as a named export, you must specify a ", + [ + 2, + 0, + [ + 11, + " name. Did you mean `export default ", + [ + 2, + 0, + [ + 11, + " ...`?", + 0 + ] + ] + ] + ] + ] + ] + ], + "an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `export default %s ...`?" + ], ya0 = Sh, _a0 = "Peeking current location when not available", wa0 = [ + 0, + "src/parser/parser_env.ml", + SR, + 9 + ], ga0 = "Internal Error: Tried to add_declared_private with outside of class scope.", ba0 = "Internal Error: `exit_class` called before a matching `enter_class`", Ta0 = rx, Ea0 = [ + 0, + 0, + 0 + ], Sa0 = [ + 0, + 0, + 0 + ], Aa0 = "Parser_env.Try.Rollback", Ia0 = rx, Pa0 = rx, Ca0 = [ + 0, + H2, + of, + $i, + CR, + TM, + V7, + $2, + qf, + h7, + pc, + bc, + Rf, + Gi, + Du, + Fi, + hu, + F7, + d7, + Qu, + Uf, + J7, + ui, + cf, + X7, + Zn, + Zf, + _u, + vu, + $n, + ac, + Ps, + oc, + _f, + Sf, + Es, + Uc, + jc, + Q7, + He, + t7, + Wi, + s7, + Qc, + Bi, + ic, + rs, + Ve, + Jc, + Uu, + fu, + k7, + ss, + ii, + lu, + T7, + Je, + ci, + w7, + Of, + qu, + fc, + Ku, + pi, + q7, + a7, + If, + _7, + fs, + Ge, + Lf, + Pi, + Zu, + M7, + pu, + xf, + af, + P7, + $f, + au, + Fc, + Zi, + m7, + Bn, + jf, + Fu, + Y7, + bi, + $c, + Ai, + Eu, + ge, + es, + x7, + rc, + Vu, + bs, + Wn, + e7, + o7, + Kf, + Pc, + Vn, + r7, + Xi, + Qf, + kf, + Lu, + sf, + Xn, + Vc, + zu, + ni, + Oi, + Hu, + $u, + si, + n7, + Ii, + Zc, + Ui, + ys, + Gf, + Kc, + Xu, + Mu, + Ei, + Cc, + wu, + Kn, + hs, + df, + W7, + Ki, + uc, + hf, + Nf, + uu, + du, + E7, + ps, + L7, + mf, + gu, + Au, + Cu, + Yc, + su, + os, + N7, + oi, + G1, + g7, + Hn, + Bc, + ai, + pf, + ku, + xu, + Tf, + Jf, + ms, + Tc, + Dc, + z7, + dc, + Bu, + zf, + f7, + D7, + Z7, + Xf, + I7, + ds, + fi, + Mi, + Di, + Rc, + zn, + Yu, + xi, + eu, + vf, + ae, + lc, + is, + cc, + Ou, + Df, + as, + Vi, + Gn, + W2, + Ri, + U7, + cs, + St, + Ni, + qc, + gs, + tu, + i7, + vi, + Ru, + di, + Qi, + S7, + kc, + _c, + ti, + cu, + gf, + nc, + As, + Iu, + wf, + Qn, + vs, + Ci, + hi, + Hi, + ws, + bf, + v7, + b7, + Mf, + mi, + C7, + Nc, + ts, + p7, + t2, + Un, + Mc, + yf, + Is, + A7, + Yn, + Yi, + Ac, + Yf, + Xc, + Oc, + Ts, + O7, + Hc, + Bf, + wc, + Ec, + bu, + ju, + j7, + be, + nf, + Ju, + qn, + hc, + Ic, + wi, + Gc, + gi, + lf, + yu, + zi, + ou, + xc, + us, + Ke, + Xe, + rf, + ff, + ri, + Wc, + ns, + K7, + mu, + Vf, + Sc, + _s, + Jn, + gc, + qi, + Hf, + ru, + uf, + aR, + H7, + vD, + qF, + yc, + Ef, + ji, + y7, + sc, + Wf, + B7, + ei, + Si, + yi, + Wu, + Ff, + Gu, + Su, + Pf, + c7, + li, + l7, + Ji, + _i, + Cs, + We, + iu, + zc, + vn, + G7, + R7, + ki, + ls, + u7, + Tu, + Pu, + Ti, + Lc, + tf, + vc, + tn, + Af + ], Na0 = [ + 0, + ss, + fi, + _c, + Ni, + di, + Cs, + mf, + si, + sf, + z7, + eu, + zc, + _u, + e7, + Ve, + bs, + Mc, + W7, + hf, + Ff, + Es, + Xi, + Z7, + Ii, + lc, + I7, + Ec, + O7, + of, + Fu, + tu, + Ku, + jc, + hi, + m7, + pf, + Ic, + Vf, + gs, + wc, + ys, + St, + V7, + Mf, + $f, + lf, + Ji, + ti, + l7, + f7, + Ac, + Lf, + vi, + Hi, + rs, + Vc, + U7, + Au, + fu, + Kn, + Ou, + bu, + ai, + Ui, + Si, + ji, + es, + Af, + pu, + Ki, + qi, + X7, + Lu, + Zu, + ms, + Wf, + o7, + Ge, + r7, + Qi, + x7, + Gf, + dc, + D7, + qc, + G1, + ff, + $n, + Oc, + E7, + Nf, + Tc, + g7, + kc, + su, + P7, + tf, + Gc, + Yn, + Mu, + a7, + Eu, + vc, + j7, + _i, + T7, + $2, + Pi, + ou, + d7, + w7, + Ri, + wu, + ki, + Ci, + Q7, + Rc, + Wu, + Oi, + ic, + be, + v7, + vu, + H2, + Hn, + Uc, + zi, + xf, + Du, + $c, + xc, + Yc, + If, + ls, + Gi, + Ef, + yu, + $u, + pc, + du, + Xf, + Pu, + oc, + xi, + Cc, + Hc, + Nc, + Wn, + yf, + Bc, + bi, + mi, + Uf, + Ps, + Hf, + qf, + _f, + ii, + Qu, + Uu, + Rf, + B7, + is, + ws, + y7, + oi, + S7, + ru, + bc, + H7, + Hu, + xu, + Sc, + u7, + Ei, + Pf, + yi, + Jn, + L7, + ps, + Y7, + Tf, + gc, + Xu, + W2, + Je, + F7, + J7, + Jc, + jf, + He, + Ke, + n7, + cs, + Vu, + p7, + ds, + ge, + iu, + As, + Bf, + cc, + sc, + Un, + cu, + Mi, + Ru, + hu, + Ts, + q7, + fs, + fc, + Qn, + Vi, + uc, + qu, + Xc, + A7, + ns, + ni, + lu, + Xn, + Df, + Pc, + Fc, + ac, + kf, + M7, + Vn, + ui, + wi, + uu, + c7, + gi, + G7, + zn, + Bi, + ju, + Sf, + i7, + _7, + Gn, + Qf, + Su, + zu, + zf, + ei, + Cu, + vf, + nf, + Zf, + tn, + h7, + Ju, + li, + Zn, + qn, + Bu, + Di, + ri, + ku, + Zi, + Zc, + Yu, + C7, + gu, + Jf, + cf, + s7, + Tu, + df, + K7, + Bn, + Ti, + R7, + t2, + Ai, + uf, + ts, + hs, + Iu, + wf, + k7, + Xe, + gf, + _s, + af, + Yi, + hc, + yc, + Wi, + Qc, + vs, + Is, + Fi, + bf, + os, + rc, + vn, + as, + Gu, + Dc, + Kf, + nc, + us, + pi, + ci, + Yf, + We, + Lc, + ae, + N7, + rf, + $i, + mu, + Of, + b7, + Wc, + au, + t7, + Kc + ], Oa0 = [ + 0, + ss, + fi, + _c, + Ni, + di, + Cs, + mf, + si, + sf, + z7, + eu, + zc, + _u, + e7, + Ve, + bs, + Mc, + W7, + hf, + Ff, + Es, + Xi, + Z7, + Ii, + lc, + I7, + Ec, + O7, + of, + Fu, + tu, + Ku, + jc, + hi, + m7, + pf, + Ic, + Vf, + gs, + wc, + ys, + St, + V7, + TM, + Mf, + $f, + lf, + Ji, + ti, + l7, + f7, + Ac, + Lf, + vi, + Hi, + rs, + Vc, + U7, + Au, + fu, + Kn, + Ou, + bu, + ai, + Ui, + Si, + ji, + es, + Af, + pu, + Ki, + qi, + vD, + X7, + Lu, + Zu, + ms, + Wf, + o7, + Ge, + r7, + Qi, + x7, + Gf, + dc, + D7, + qc, + G1, + ff, + $n, + Oc, + E7, + Nf, + Tc, + g7, + kc, + su, + P7, + tf, + Gc, + Yn, + Mu, + a7, + Eu, + vc, + j7, + _i, + T7, + $2, + Pi, + ou, + d7, + w7, + Ri, + wu, + ki, + Ci, + Q7, + Rc, + Wu, + Oi, + ic, + be, + v7, + vu, + H2, + Hn, + Uc, + zi, + xf, + Du, + $c, + xc, + Yc, + If, + ls, + Gi, + Ef, + yu, + $u, + pc, + du, + Xf, + Pu, + oc, + xi, + Cc, + Hc, + Nc, + Wn, + yf, + Bc, + bi, + mi, + Uf, + Ps, + Hf, + qf, + _f, + ii, + Qu, + Uu, + Rf, + B7, + is, + ws, + y7, + oi, + S7, + ru, + bc, + H7, + Hu, + xu, + Sc, + u7, + Ei, + Pf, + yi, + Jn, + L7, + ps, + Y7, + Tf, + gc, + Xu, + W2, + Je, + F7, + J7, + Jc, + jf, + He, + Ke, + n7, + cs, + Vu, + p7, + ds, + ge, + iu, + As, + Bf, + cc, + sc, + Un, + cu, + Mi, + Ru, + hu, + Ts, + q7, + fs, + fc, + Qn, + Vi, + uc, + qu, + Xc, + A7, + ns, + ni, + lu, + Xn, + Df, + Pc, + Fc, + ac, + kf, + M7, + Vn, + ui, + wi, + uu, + c7, + gi, + G7, + zn, + qF, + Bi, + ju, + Sf, + i7, + _7, + Gn, + Qf, + Su, + zu, + zf, + ei, + Cu, + vf, + nf, + Zf, + aR, + tn, + h7, + Ju, + li, + Zn, + CR, + qn, + Bu, + Di, + ri, + ku, + Zi, + Zc, + Yu, + C7, + gu, + Jf, + cf, + s7, + Tu, + df, + K7, + Bn, + Ti, + R7, + t2, + Ai, + uf, + ts, + hs, + Iu, + wf, + k7, + Xe, + gf, + _s, + af, + Yi, + hc, + yc, + Wi, + Qc, + vs, + Is, + Fi, + bf, + os, + rc, + vn, + as, + Gu, + Dc, + Kf, + nc, + us, + pi, + ci, + Yf, + We, + Lc, + ae, + N7, + rf, + $i, + mu, + Of, + b7, + Wc, + au, + t7, + Kc + ], ja0 = [ + 0, + H2, + of, + $i, + V7, + $2, + qf, + h7, + pc, + bc, + Rf, + Gi, + Du, + Fi, + hu, + F7, + d7, + Qu, + Uf, + J7, + ui, + cf, + X7, + Zn, + Zf, + _u, + vu, + $n, + ac, + Ps, + oc, + _f, + Sf, + Es, + Uc, + jc, + Q7, + He, + t7, + Wi, + s7, + Qc, + Bi, + ic, + rs, + Ve, + Jc, + Uu, + fu, + k7, + ss, + ii, + lu, + T7, + Je, + ci, + w7, + Of, + qu, + fc, + Ku, + pi, + q7, + a7, + If, + _7, + fs, + Ge, + Lf, + Pi, + Zu, + M7, + pu, + xf, + af, + P7, + $f, + au, + Fc, + Zi, + m7, + Bn, + jf, + Fu, + Y7, + bi, + $c, + Ai, + Eu, + ge, + es, + x7, + rc, + Vu, + bs, + Wn, + e7, + o7, + Kf, + Pc, + Vn, + r7, + Xi, + Qf, + kf, + Lu, + sf, + Xn, + Vc, + zu, + ni, + Oi, + Hu, + $u, + si, + n7, + Ii, + Zc, + Ui, + ys, + Gf, + Kc, + Xu, + Mu, + Ei, + Cc, + wu, + Kn, + hs, + df, + W7, + Ki, + uc, + hf, + Nf, + uu, + du, + E7, + ps, + L7, + mf, + gu, + Au, + Cu, + Yc, + su, + os, + N7, + oi, + G1, + g7, + Hn, + Bc, + ai, + pf, + ku, + xu, + Tf, + Jf, + ms, + Tc, + Dc, + z7, + dc, + Bu, + zf, + f7, + D7, + Z7, + Xf, + I7, + ds, + fi, + Mi, + Di, + Rc, + zn, + Yu, + xi, + eu, + vf, + ae, + lc, + is, + cc, + Ou, + Df, + as, + Vi, + Gn, + W2, + Ri, + U7, + cs, + St, + Ni, + qc, + gs, + tu, + i7, + vi, + Ru, + di, + Qi, + S7, + kc, + _c, + ti, + cu, + gf, + nc, + As, + Iu, + wf, + Qn, + vs, + Ci, + hi, + Hi, + ws, + bf, + v7, + b7, + Mf, + mi, + C7, + Nc, + ts, + p7, + t2, + Un, + Mc, + yf, + Is, + A7, + Yn, + Yi, + Ac, + Yf, + Xc, + Oc, + Ts, + O7, + Hc, + Bf, + wc, + Ec, + bu, + ju, + j7, + be, + nf, + Ju, + qn, + hc, + Ic, + wi, + Gc, + gi, + lf, + yu, + zi, + ou, + xc, + us, + Ke, + Xe, + rf, + ff, + ri, + Wc, + ns, + K7, + mu, + Vf, + Sc, + _s, + Jn, + gc, + qi, + Hf, + ru, + uf, + H7, + yc, + Ef, + ji, + y7, + sc, + Wf, + B7, + ei, + Si, + yi, + Wu, + Ff, + Gu, + Su, + Pf, + c7, + li, + l7, + Ji, + _i, + Cs, + We, + iu, + zc, + vn, + G7, + R7, + ki, + ls, + u7, + Tu, + Pu, + Ti, + Lc, + tf, + vc, + tn, + Af + ], Da0 = $3, Ra0 = nm, Fa0 = bo, Ma0 = I6, La0 = Je, qa0 = Ve, Ba0 = $P, Ua0 = DT, Xa0 = Bv, Ga0 = He, Ya0 = um, za0 = g6, Ja0 = Tp, Ka0 = L8, Ha0 = No, Wa0 = cl, Va0 = Hv, $a0 = wa, Qa0 = Pa, Za0 = We, xo0 = rk, ro0 = Rm, eo0 = Xe, to0 = Fv, no0 = Tk, uo0 = U8, io0 = K8, fo0 = h6, co0 = mc, so0 = Ue, ao0 = Ck, oo0 = Yv, vo0 = E6, lo0 = Aa, po0 = ga, ko0 = j6, mo0 = dh, ho0 = W2, do0 = fl, yo0 = Oo, _o0 = ae, wo0 = Pk, go0 = Q6, bo0 = k6, To0 = W6, Eo0 = H2, So0 = Ke, Ao0 = x4, Io0 = tc, Po0 = zb, Co0 = JS, No0 = Io, Oo0 = Kv, jo0 = ik, Do0 = wk, Ro0 = be, Fo0 = H3, Mo0 = $v, Lo0 = K3, qo0 = ga, Bo0 = H6, Uo0 = hk, Xo0 = bk, Go0 = Hk, Yo0 = Lm, zo0 = Xv, Jo0 = J6, Ko0 = tl, Ho0 = V3, Wo0 = O6, Vo0 = rm, $o0 = [0, Sh], Qo0 = rx, Zo0 = [19, 1], xv0 = [19, 0], rv0 = [0, 0], ev0 = Ta, tv0 = [0, 0], nv0 = [0, "a type"], uv0 = [0, 0], iv0 = [0, "a number literal type"], fv0 = [0, 0], cv0 = J6, sv0 = tl, av0 = V3, ov0 = "You should only call render_type after making sure the next token is a renders variant", vv0 = [0, [ + 0, + 0, + 0, + 0, + 0 + ]], lv0 = [ + 0, + 0, + 0, + 0 + ], pv0 = [0, 1], kv0 = [ + 0, + il, + 1466, + 6 + ], mv0 = [ + 0, + il, + 1469, + 6 + ], hv0 = [ + 0, + il, + 1572, + 8 + ], dv0 = [0, 1], yv0 = [ + 0, + il, + 1589, + 8 + ], _v0 = "Can not have both `static` and `proto`", wv0 = Ue, gv0 = rw, bv0 = [0, 0], Tv0 = [0, "the end of a tuple type (no trailing comma is allowed in inexact tuple type)."], Ev0 = [ + 0, + il, + Sv, + 15 + ], Sv0 = [ + 0, + il, + sP, + 15 + ], Av0 = ze, Iv0 = ze, Pv0 = Kk, Cv0 = G6, Nv0 = [ + 0, + [ + 11, + "Failure while looking up ", + [ + 2, + 0, + [ + 11, + ". Index: ", + [ + 4, + 0, + 0, + 0, + [ + 11, + ". Length: ", + [ + 4, + 0, + 0, + 0, + [ + 12, + 46, + 0 + ] + ] + ] + ] + ] + ] + ], + "Failure while looking up %s. Index: %d. Length: %d." + ], Ov0 = [ + 0, + 0, + 0, + 0 + ], jv0 = "Offset_utils.Offset_lookup_failed", Dv0 = m1, Rv0 = kD, Fv0 = G6, Mv0 = Kk, Lv0 = wD, qv0 = G6, Bv0 = Kk, Uv0 = vR, Xv0 = Yx, Gv0 = "normal", Yv0 = tc, zv0 = "jsxTag", Jv0 = "jsxChild", Kv0 = "template", Hv0 = nD, Wv0 = "context", Vv0 = tc, $v0 = [6, 0], Qv0 = [0, 0], Zv0 = [0, 1], x30 = [0, 4], r30 = [0, 2], e30 = [0, 3], t30 = [0, 0], n30 = ze, u30 = [ + 0, + 0, + 0, + 0, + 0, + 0 + ], i30 = [0, 0], f30 = [0, OM], c30 = [0, 1], s30 = [0, 0], a30 = Ta, o30 = [0, 73], v30 = [0, 84], l30 = aM, p30 = rE, k30 = "exports", m30 = K6, h30 = [ + 0, + rx, + rx, + 0 + ], d30 = [0, AD], y30 = [0, 84], _30 = [0, "a declaration, statement or export specifiers"], w30 = [0, 1], g30 = [ + 0, + I9, + 1971, + 21 + ], b30 = [0, "the keyword `as`"], T30 = [0, 29], E30 = [0, 29], S30 = [0, 0], A30 = [0, 1], I30 = [0, AD], P30 = [0, "the keyword `from`"], C30 = [ + 0, + rx, + rx, + 0 + ], N30 = "Label", O30 = [0, OM], j30 = [ + 0, + 0, + 0 + ], D30 = [0, 38], R30 = [ + 0, + I9, + 372, + 22 + ], F30 = [0, 37], M30 = [ + 0, + I9, + 391, + 22 + ], L30 = [0, 0], q30 = "the token `;`", B30 = [0, 0], U30 = [0, 0], X30 = FR, G30 = [0, Sh], Y30 = FR, z30 = [28, St], J30 = Ta, K30 = [0, 73], H30 = [ + 0, + rx, + 0 + ], W30 = It, V30 = [ + 0, + rx, + 0 + ], $30 = [0, 73], Q30 = [0, 73], Z30 = $3, xl0 = [ + 0, + rx, + 0 + ], rl0 = [ + 0, + 0, + 0 + ], el0 = [ + 0, + 0, + 0 + ], tl0 = [0, [0, 8]], nl0 = [0, [0, 7]], ul0 = [0, [0, 6]], il0 = [0, [0, 10]], fl0 = [0, [0, 9]], cl0 = [0, [0, 11]], sl0 = [0, [0, 5]], al0 = [0, [0, 4]], ol0 = [0, [0, 2]], vl0 = [0, [0, 3]], ll0 = [0, [0, 1]], pl0 = [0, [0, 0]], kl0 = [0, [0, 12]], ml0 = [0, [0, 13]], hl0 = [0, [0, 14]], dl0 = [0, 0], yl0 = [0, 1], _l0 = [0, 0], wl0 = [0, 2], gl0 = [0, 3], bl0 = [0, 7], Tl0 = [0, 6], El0 = [0, 4], Sl0 = [0, 5], Al0 = [0, 1], Il0 = [0, 0], Pl0 = [0, 1], Cl0 = [0, 0], Nl0 = fl, Ol0 = [0, "either a call or access of `super`"], jl0 = fl, Dl0 = W2, Rl0 = w6, Fl0 = w6, Ml0 = [0, 2], Ll0 = [0, 0], ql0 = [0, 1], Bl0 = Yv, Ul0 = [0, "the identifier `target`"], Xl0 = [0, 0], Gl0 = [0, 1], Yl0 = [0, 0], zl0 = [0, 0], Jl0 = [0, 2], Kl0 = [0, 2], Hl0 = [0, 1], Wl0 = [0, 73], Vl0 = P6, $l0 = uL, Ql0 = gb, Zl0 = gb, x60 = pD, r60 = [0, 0], e60 = [0, 1], t60 = [0, 0], n60 = se, u60 = se, i60 = [0, "a regular expression"], f60 = rx, c60 = rx, s60 = rx, a60 = [0, 81], o60 = [ + 0, + "src/parser/expression_parser.ml", + 1550, + 17 + ], v60 = [0, "a template literal part"], l60 = [ + 0, + [ + 0, + rx, + rx + ], + 1 + ], p60 = Pv, k60 = [0, 6], m60 = [0, [ + 0, + 17, + [0, 2] + ]], h60 = [0, [ + 0, + 18, + [0, 3] + ]], d60 = [0, [ + 0, + 19, + [0, 4] + ]], y60 = [0, [ + 0, + 0, + [0, 5] + ]], _60 = [0, [ + 0, + 1, + [0, 5] + ]], w60 = [0, [ + 0, + 2, + [0, 5] + ]], g60 = [0, [ + 0, + 3, + [0, 5] + ]], b60 = [0, [ + 0, + 5, + [0, 6] + ]], T60 = [0, [ + 0, + 7, + [0, 6] + ]], E60 = [0, [ + 0, + 4, + [0, 6] + ]], S60 = [0, [ + 0, + 6, + [0, 6] + ]], A60 = [0, [ + 0, + 8, + [0, 7] + ]], I60 = [0, [ + 0, + 9, + [0, 7] + ]], P60 = [0, [ + 0, + 10, + [0, 7] + ]], C60 = [0, [ + 0, + 11, + [0, 8] + ]], N60 = [0, [ + 0, + 12, + [0, 8] + ]], O60 = [0, [ + 0, + 15, + [0, 9] + ]], j60 = [0, [ + 0, + 13, + [0, 9] + ]], D60 = [0, [ + 0, + 14, + [1, 10] + ]], R60 = [0, [ + 0, + 16, + [0, 9] + ]], F60 = [0, [ + 0, + 21, + [0, 6] + ]], M60 = [0, [ + 0, + 20, + [0, 6] + ]], L60 = [23, Dw], q60 = [13, "JSX fragment"], B60 = Iv, U60 = ln, X60 = [0, sn], G60 = [1, sn], Y60 = [ + 0, + rx, + rx, + 0 + ], z60 = [0, Sh], J60 = rx, K60 = [0, "a numeric or string literal"], H60 = [ + 0, + rx, + "\"\"", + 0 + ], W60 = [0, 0], V60 = [0, "a number literal"], $60 = [0, [ + 0, + 0, + V2, + 0 + ]], Q60 = [0, 84], Z60 = [21, dM], x40 = [21, R6], r40 = [ + 0, + 0, + 0 + ], e40 = h6, t40 = [ + 0, + rx, + 0 + ], n40 = "unexpected PrivateName in Property, expected a PrivateField", u40 = [ + 0, + 0, + 0 + ], i40 = Sa, f40 = "Must be one of the above", c40 = [0, 1], s40 = [0, 1], a40 = [0, 1], o40 = Sa, v40 = Sa, l40 = p_, p40 = "Internal Error: private name found in object props", k40 = [ + 0, + 0, + 0, + 0 + ], m40 = [0, cF], h40 = [19, [0, 0]], d40 = [0, cF], y40 = ug, _40 = "Nooo: ", w40 = Fv, g40 = "Parser error: No such thing as an expression pattern!", b40 = [0, [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]], T40 = [ + 0, + "src/parser/parser_flow.ml", + fk, + 28 + ], E40 = [0, [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]], S40 = kD, A40 = Yx, I40 = $D, P40 = eR, C40 = eR, N40 = $D, O40 = tc, j40 = sD, D40 = w1, R40 = m1, F40 = "InterpreterDirective", M40 = "interpreter", L40 = "Program", q40 = w1, B40 = "RecordBody", U40 = m1, X40 = Y1, G40 = en, Y40 = "RecordStaticProperty", z40 = "defaultValue", J40 = Y1, K40 = en, H40 = "RecordProperty", W40 = S6, V40 = "BreakStatement", $40 = S6, Q40 = "ContinueStatement", Z40 = "DebuggerStatement", xp0 = Wv, rp0 = "DeclareExportAllDeclaration", ep0 = Wv, tp0 = l_, np0 = IE, up0 = Fv, ip0 = "DeclareExportDeclaration", fp0 = w1, cp0 = Yr, sp0 = "DeclareModule", ap0 = Y1, op0 = "DeclareModuleExports", vp0 = w1, lp0 = Yr, pp0 = NL, kp0 = "DeclareNamespace", mp0 = Z3, hp0 = w1, dp0 = "DoWhileStatement", yp0 = "EmptyStatement", _p0 = cS, wp0 = IE, gp0 = "ExportDefaultDeclaration", bp0 = cS, Tp0 = cA, Ep0 = Wv, Sp0 = "ExportAllDeclaration", Ap0 = cS, Ip0 = Wv, Pp0 = l_, Cp0 = IE, Np0 = "ExportNamedDeclaration", Op0 = "directive", jp0 = t2, Dp0 = "ExpressionStatement", Rp0 = w1, Fp0 = "update", Mp0 = Z3, Lp0 = ks, qp0 = "ForStatement", Bp0 = "each", Up0 = w1, Xp0 = fn, Gp0 = Ea, Yp0 = "ForInStatement", zp0 = Kv, Jp0 = w1, Kp0 = fn, Hp0 = Ea, Wp0 = "ForOfStatement", Vp0 = lR, $p0 = rP, Qp0 = Z3, Zp0 = "IfStatement", xk0 = tc, rk0 = Aa, ek0 = m1, tk0 = XD, nk0 = Wv, uk0 = l_, ik0 = "ImportDeclaration", fk0 = w1, ck0 = S6, sk0 = "LabeledStatement", ak0 = J9, ok0 = $1, vk0 = "MatchStatement", lk0 = "RecordImplements", pk0 = w1, kk0 = Oo, mk0 = B2, hk0 = Yr, dk0 = "RecordDeclaration", yk0 = $1, _k0 = "ReturnStatement", wk0 = J9, gk0 = "discriminant", bk0 = "SwitchStatement", Tk0 = $1, Ek0 = "ThrowStatement", Sk0 = "finalizer", Ak0 = "handler", Ik0 = vn, Pk0 = "TryStatement", Ck0 = w1, Nk0 = Z3, Ok0 = "WhileStatement", jk0 = w1, Dk0 = Dp, Rk0 = "WithStatement", Fk0 = x9, Mk0 = $1, Lk0 = NA, qk0 = x9, Bk0 = $1, Uk0 = NA, Xk0 = KT, Gk0 = "ArrayExpression", Yk0 = B2, zk0 = gh, Jk0 = t2, Kk0 = Ge, Hk0 = Ey, Wk0 = Io, Vk0 = w1, $k0 = on, Qk0 = Yr, Zk0 = "ArrowFunctionExpression", x80 = t2, r80 = "AsConstExpression", e80 = Y1, t80 = t2, n80 = "AsExpression", u80 = p_, i80 = fn, f80 = Ea, c80 = Gv, s80 = "AssignmentExpression", a80 = fn, o80 = Ea, v80 = Gv, l80 = "BinaryExpression", p80 = "CallExpression", k80 = lR, m80 = rP, h80 = Z3, d80 = "ConditionalExpression", y80 = Wv, _80 = "ImportExpression", w80 = LF, g80 = CM, b80 = Dw, T80 = fn, E80 = Ea, S80 = Gv, A80 = "LogicalExpression", I80 = J9, P80 = $1, C80 = "MatchExpression", N80 = "MemberExpression", O80 = Tm, j80 = w6, D80 = "MetaProperty", R80 = Qb, F80 = h8, M80 = fR, L80 = "NewExpression", q80 = A6, B80 = "ObjectExpression", U80 = ft, X80 = "OptionalCallExpression", G80 = ft, Y80 = "OptionalMemberExpression", z80 = rM, J80 = "SequenceExpression", K80 = "Super", H80 = "ThisExpression", W80 = Y1, V80 = t2, $80 = "TypeCastExpression", Q80 = Y1, Z80 = t2, xm0 = "SatisfiesExpression", rm0 = x9, em0 = $1, tm0 = NA, nm0 = ze, um0 = $7, im0 = SD, fm0 = VL, cm0 = Aa, sm0 = ga, am0 = E6, om0 = "matched above", vm0 = $1, lm0 = XR, pm0 = Gv, km0 = "UnaryExpression", mm0 = $1, hm0 = "AwaitExpression", dm0 = kR, ym0 = ZM, _m0 = XR, wm0 = $1, gm0 = Gv, bm0 = "UpdateExpression", Tm0 = "delegate", Em0 = $1, Sm0 = "YieldExpression", Am0 = "MatchExpressionCase", Im0 = "guard", Pm0 = w1, Cm0 = ge, Nm0 = "MatchStatementCase", Om0 = "literal", jm0 = "MatchLiteralPattern", Dm0 = "MatchWildcardPattern", Rm0 = ze, Fm0 = $7, Mm0 = $1, Lm0 = Gv, qm0 = "MatchUnaryPattern", Bm0 = "MatchObjectPattern", Um0 = "MatchInstanceObjectPattern", Xm0 = DF, Gm0 = _a, Ym0 = "MatchInstancePattern", zm0 = "patterns", Jm0 = "MatchOrPattern", Km0 = Ih, Hm0 = ge, Wm0 = "MatchAsPattern", Vm0 = Yr, $m0 = "MatchIdentifierPattern", Qm0 = Tm, Zm0 = "base", xh0 = "MatchMemberPattern", rh0 = ba, eh0 = Yr, th0 = "MatchBindingPattern", nh0 = p6, uh0 = KT, ih0 = "MatchArrayPattern", fh0 = T6, ch0 = ge, sh0 = en, ah0 = VR, oh0 = T6, vh0 = ge, lh0 = en, ph0 = VR, kh0 = p6, mh0 = A6, hh0 = $1, dh0 = "MatchRestPattern", yh0 = "Unexpected FunctionDeclaration with BodyExpression", _h0 = "HookDeclaration", wh0 = t2, gh0 = Ge, bh0 = Ey, Th0 = Io, Eh0 = "FunctionDeclaration", Sh0 = B2, Ah0 = gh, Ih0 = w1, Ph0 = on, Ch0 = Yr, Nh0 = "Unexpected FunctionExpression with BodyExpression", Oh0 = B2, jh0 = gh, Dh0 = t2, Rh0 = Ge, Fh0 = Ey, Mh0 = Io, Lh0 = w1, qh0 = on, Bh0 = Yr, Uh0 = "FunctionExpression", Xh0 = ft, Gh0 = Y1, Yh0 = Ye, zh0 = US, Jh0 = ft, Kh0 = Y1, Hh0 = Ye, Wh0 = "PrivateIdentifier", Vh0 = ft, $h0 = Y1, Qh0 = Ye, Zh0 = US, xd0 = rP, rd0 = Z3, ed0 = "SwitchCase", td0 = w1, nd0 = "param", ud0 = "CatchClause", id0 = w1, fd0 = "BlockStatement", cd0 = ba, sd0 = Yr, ad0 = "DeclareVariable", od0 = "DeclareHook", vd0 = Ge, ld0 = "DeclareFunction", pd0 = Yr, kd0 = lM, md0 = Oo, hd0 = mc, dd0 = w1, yd0 = B2, _d0 = Yr, wd0 = "DeclareClass", gd0 = B2, bd0 = f_, Td0 = on, Ed0 = p6, Sd0 = on, Ad0 = Yr, Id0 = "DeclareComponent", Pd0 = B2, Cd0 = f_, Nd0 = p6, Od0 = on, jd0 = "ComponentTypeAnnotation", Dd0 = ft, Rd0 = Y1, Fd0 = Ye, Md0 = "ComponentTypeParameter", Ld0 = w1, qd0 = Yr, Bd0 = "DeclareEnum", Ud0 = mc, Xd0 = w1, Gd0 = B2, Yd0 = Yr, zd0 = "DeclareInterface", Jd0 = m1, Kd0 = tc, Hd0 = cA, Wd0 = "ExportNamespaceSpecifier", Vd0 = fn, $d0 = B2, Qd0 = Yr, Zd0 = "DeclareTypeAlias", x50 = fn, r50 = B2, e50 = Yr, t50 = "TypeAlias", n50 = "DeclareOpaqueType", u50 = "OpaqueType", i50 = "supertype", f50 = "upperBound", c50 = "lowerBound", s50 = "impltype", a50 = B2, o50 = Yr, v50 = "ClassDeclaration", l50 = "ClassExpression", p50 = g8, k50 = Oo, m50 = "superTypeParameters", h50 = "superClass", d50 = B2, y50 = w1, _50 = Yr, w50 = t2, g50 = "Decorator", b50 = B2, T50 = Yr, E50 = "ClassImplements", S50 = w1, A50 = "ClassBody", I50 = w1, P50 = "StaticBlock", C50 = _a, N50 = V6, O50 = Nv, j50 = nl, D50 = g8, R50 = W3, F50 = Ue, M50 = ba, L50 = m1, q50 = en, B50 = "MethodDefinition", U50 = x4, X50 = g8, G50 = $2, Y50 = Ue, z50 = W3, J50 = Y1, K50 = m1, H50 = en, W50 = jL, V50 = "Internal Error: Private name found in class prop", $50 = x4, Q50 = g8, Z50 = $2, xy0 = Ue, ry0 = W3, ey0 = Y1, ty0 = m1, ny0 = en, uy0 = jL, iy0 = B2, fy0 = f_, cy0 = on, sy0 = Yr, ay0 = w1, oy0 = "ComponentDeclaration", vy0 = $1, ly0 = OE, py0 = fn, ky0 = Ea, my0 = jm, hy0 = T6, dy0 = X6, yy0 = Ye, _y0 = "ComponentParameter", wy0 = ks, gy0 = Yr, by0 = "EnumBigIntMember", Ty0 = Yr, Ey0 = LR, Sy0 = ks, Ay0 = Yr, Iy0 = "EnumStringMember", Py0 = Yr, Cy0 = LR, Ny0 = ks, Oy0 = Yr, jy0 = "EnumNumberMember", Dy0 = ks, Ry0 = Yr, Fy0 = "EnumBooleanMember", My0 = B6, Ly0 = Am, qy0 = y6, By0 = "EnumBooleanBody", Uy0 = B6, Xy0 = Am, Gy0 = y6, Yy0 = "EnumNumberBody", zy0 = B6, Jy0 = Am, Ky0 = y6, Hy0 = "EnumStringBody", Wy0 = B6, Vy0 = y6, $y0 = "EnumSymbolBody", Qy0 = B6, Zy0 = Am, x90 = y6, r90 = "EnumBigIntBody", e90 = w1, t90 = Yr, n90 = "EnumDeclaration", u90 = mc, i90 = w1, f90 = B2, c90 = Yr, s90 = "InterfaceDeclaration", a90 = B2, o90 = Yr, v90 = "InterfaceExtends", l90 = Y1, p90 = A6, k90 = "ObjectPattern", m90 = Y1, h90 = KT, d90 = "ArrayPattern", y90 = fn, _90 = Ea, w90 = jm, g90 = Y1, b90 = Ye, T90 = US, E90 = $1, S90 = OE, A90 = $1, I90 = OE, P90 = fn, C90 = Ea, N90 = jm, O90 = ks, j90 = ks, D90 = Nv, R90 = nl, F90 = VD, M90 = W3, L90 = T6, q90 = V6, B90 = ba, U90 = m1, X90 = en, G90 = mF, Y90 = $1, z90 = iR, J90 = fn, K90 = Ea, H90 = jm, W90 = W3, V90 = T6, $90 = V6, Q90 = ba, Z90 = m1, x_0 = en, r_0 = mF, e_0 = $1, t_0 = iR, n_0 = At, u_0 = m1, i_0 = J3, f_0 = rx, c_0 = At, s_0 = $v, a_0 = m1, o_0 = J3, v_0 = At, l_0 = m1, p_0 = J3, k_0 = Pa, m_0 = wa, h_0 = At, d_0 = m1, y_0 = J3, __0 = "flags", w_0 = ge, g_0 = "regex", b_0 = At, T_0 = m1, E_0 = J3, S_0 = At, A_0 = m1, I_0 = J3, P_0 = rM, C_0 = "quasis", N_0 = "TemplateLiteral", O_0 = "cooked", j_0 = At, D_0 = "tail", R_0 = m1, F_0 = "TemplateElement", M_0 = "quasi", L_0 = "tag", q_0 = "TaggedTemplateExpression", B_0 = ba, U_0 = "declarations", X_0 = "VariableDeclaration", G_0 = ks, Y_0 = Yr, z_0 = "VariableDeclarator", J_0 = "plus", K_0 = nM, H_0 = Xv, W_0 = bo, V_0 = ng, $_0 = "in-out", Q_0 = ba, Z_0 = "Variance", xw0 = "AnyTypeAnnotation", rw0 = "MixedTypeAnnotation", ew0 = "EmptyTypeAnnotation", tw0 = "VoidTypeAnnotation", nw0 = "NullLiteralTypeAnnotation", uw0 = "SymbolTypeAnnotation", iw0 = "NumberTypeAnnotation", fw0 = "BigIntTypeAnnotation", cw0 = "StringTypeAnnotation", sw0 = "BooleanTypeAnnotation", aw0 = Y1, ow0 = "NullableTypeAnnotation", vw0 = "UnknownTypeAnnotation", lw0 = "NeverTypeAnnotation", pw0 = "UndefinedTypeAnnotation", kw0 = ba, mw0 = Y1, hw0 = "parameterName", dw0 = "TypePredicate", yw0 = "HookTypeAnnotation", _w0 = "FunctionTypeAnnotation", ww0 = Bv, gw0 = B2, bw0 = p6, Tw0 = gh, Ew0 = on, Sw0 = ft, Aw0 = Y1, Iw0 = Ye, Pw0 = fM, Cw0 = ft, Nw0 = Y1, Ow0 = Ye, jw0 = fM, Dw0 = [ + 0, + 0, + 0, + 0, + 0 + ], Rw0 = "internalSlots", Fw0 = "callProperties", Mw0 = "indexers", Lw0 = A6, qw0 = "exact", Bw0 = tL, Uw0 = "ObjectTypeAnnotation", Xw0 = VD, Gw0 = "There should not be computed object type property keys", Yw0 = ks, zw0 = Nv, Jw0 = nl, Kw0 = ba, Hw0 = $2, Ww0 = rw, Vw0 = Ue, $w0 = ft, Qw0 = V6, Zw0 = m1, xg0 = en, rg0 = "ObjectTypeProperty", eg0 = $1, tg0 = "ObjectTypeSpreadProperty", ng0 = $2, ug0 = Ue, ig0 = m1, fg0 = en, cg0 = Yr, sg0 = "ObjectTypeIndexer", ag0 = Ue, og0 = m1, vg0 = "ObjectTypeCallProperty", lg0 = ft, pg0 = $2, kg0 = "sourceType", mg0 = "propType", hg0 = "keyTparam", dg0 = "ObjectTypeMappedTypeProperty", yg0 = m1, _g0 = V6, wg0 = Ue, gg0 = ft, bg0 = Yr, Tg0 = "ObjectTypeInternalSlot", Eg0 = w1, Sg0 = mc, Ag0 = "InterfaceTypeAnnotation", Ig0 = QM, Pg0 = "ArrayTypeAnnotation", Cg0 = "falseType", Ng0 = "trueType", Og0 = "extendsType", jg0 = "checkType", Dg0 = "ConditionalTypeAnnotation", Rg0 = "typeParameter", Fg0 = "InferTypeAnnotation", Mg0 = Yr, Lg0 = UF, qg0 = "QualifiedTypeIdentifier", Bg0 = B2, Ug0 = Yr, Xg0 = "GenericTypeAnnotation", Gg0 = "indexType", Yg0 = "objectType", zg0 = "IndexedAccessType", Jg0 = ft, Kg0 = "OptionalIndexedAccessType", Hg0 = w_, Wg0 = "UnionTypeAnnotation", Vg0 = w_, $g0 = "IntersectionTypeAnnotation", Qg0 = h8, Zg0 = $1, xb0 = "TypeofTypeAnnotation", rb0 = Yr, eb0 = UF, tb0 = "QualifiedTypeofIdentifier", nb0 = $1, ub0 = "KeyofTypeAnnotation", ib0 = el, fb0 = jF, cb0 = uF, sb0 = Y1, ab0 = Gv, ob0 = "TypeOperator", vb0 = Xv, lb0 = tL, pb0 = "elementTypes", kb0 = "TupleTypeAnnotation", mb0 = ft, hb0 = $2, db0 = QM, yb0 = S6, _b0 = "TupleTypeLabeledElement", wb0 = Y1, gb0 = S6, bb0 = "TupleTypeSpreadElement", Tb0 = At, Eb0 = m1, Sb0 = "StringLiteralTypeAnnotation", Ab0 = At, Ib0 = m1, Pb0 = "NumberLiteralTypeAnnotation", Cb0 = At, Nb0 = m1, Ob0 = "BigIntLiteralTypeAnnotation", jb0 = Pa, Db0 = wa, Rb0 = At, Fb0 = m1, Mb0 = "BooleanLiteralTypeAnnotation", Lb0 = "ExistsTypeAnnotation", qb0 = Y1, Bb0 = vF, Ub0 = Y1, Xb0 = vF, Gb0 = on, Yb0 = "TypeParameterDeclaration", zb0 = "usesExtendsBound", Jb0 = Fv, Kb0 = $2, Hb0 = No, Wb0 = "bound", Vb0 = Ye, $b0 = "TypeParameter", Qb0 = on, Zb0 = mM, xT0 = on, rT0 = mM, eT0 = Pv, tT0 = OL, nT0 = "closingElement", uT0 = "openingElement", iT0 = "JSXElement", fT0 = "closingFragment", cT0 = OL, sT0 = "openingFragment", aT0 = "JSXFragment", oT0 = h8, vT0 = "selfClosing", lT0 = "attributes", pT0 = Ye, kT0 = "JSXOpeningElement", mT0 = "JSXOpeningFragment", hT0 = Ye, dT0 = "JSXClosingElement", yT0 = "JSXClosingFragment", _T0 = m1, wT0 = Ye, gT0 = "JSXAttribute", bT0 = $1, TT0 = "JSXSpreadAttribute", ET0 = "JSXEmptyExpression", ST0 = t2, AT0 = "JSXExpressionContainer", IT0 = t2, PT0 = "JSXSpreadChild", CT0 = At, NT0 = m1, OT0 = "JSXText", jT0 = Tm, DT0 = Dp, RT0 = "JSXMemberExpression", FT0 = Ye, MT0 = rE, LT0 = "JSXNamespacedName", qT0 = Ye, BT0 = "JSXIdentifier", UT0 = cA, XT0 = X6, GT0 = "ExportSpecifier", YT0 = X6, zT0 = "ImportDefaultSpecifier", JT0 = X6, KT0 = "ImportNamespaceSpecifier", HT0 = XD, WT0 = X6, VT0 = "imported", $T0 = "ImportSpecifier", QT0 = "Line", ZT0 = "Block", xE0 = m1, rE0 = m1, eE0 = "DeclaredPredicate", tE0 = "InferredPredicate", nE0 = Qb, uE0 = h8, iE0 = fR, fE0 = W3, cE0 = Tm, sE0 = Dp, aE0 = "message", oE0 = Yx, vE0 = wD, lE0 = vR, pE0 = Wv, kE0 = G6, mE0 = Kk, hE0 = [ + 0, + ss, + fi, + _c, + Ni, + di, + Cs, + mf, + si, + sf, + z7, + eu, + zc, + _u, + e7, + Ve, + bs, + Mc, + W7, + hf, + Ff, + Es, + Xi, + Z7, + Ii, + lc, + I7, + Ec, + O7, + of, + Fu, + tu, + Ku, + jc, + hi, + m7, + pf, + Ic, + Vf, + gs, + wc, + ys, + St, + V7, + Mf, + $f, + lf, + Ji, + ti, + l7, + f7, + Ac, + Lf, + vi, + Hi, + rs, + Vc, + U7, + Au, + fu, + Kn, + Ou, + bu, + ai, + Ui, + Si, + ji, + es, + Af, + pu, + Ki, + qi, + X7, + Lu, + Zu, + ms, + Wf, + o7, + Ge, + r7, + Qi, + x7, + Gf, + dc, + D7, + qc, + G1, + ff, + $n, + Oc, + E7, + Nf, + Tc, + g7, + kc, + su, + P7, + tf, + Gc, + Yn, + Mu, + a7, + Eu, + vc, + j7, + _i, + T7, + $2, + Pi, + ou, + d7, + w7, + Ri, + wu, + ki, + Ci, + Q7, + Rc, + Wu, + Oi, + ic, + be, + v7, + vu, + H2, + Hn, + Uc, + zi, + xf, + Du, + $c, + xc, + Yc, + If, + ls, + Gi, + Ef, + yu, + $u, + pc, + du, + Xf, + Pu, + oc, + xi, + Cc, + Hc, + Nc, + Wn, + yf, + Bc, + bi, + mi, + Uf, + Ps, + Hf, + qf, + _f, + ii, + Qu, + Uu, + Rf, + B7, + is, + ws, + y7, + oi, + S7, + ru, + bc, + H7, + Hu, + xu, + Sc, + u7, + Ei, + Pf, + yi, + Jn, + L7, + ps, + Y7, + Tf, + gc, + Xu, + W2, + Je, + F7, + J7, + Jc, + jf, + He, + Ke, + n7, + cs, + Vu, + p7, + ds, + ge, + iu, + As, + Bf, + cc, + sc, + Un, + cu, + Mi, + Ru, + hu, + Ts, + q7, + fs, + fc, + Qn, + Vi, + uc, + qu, + Xc, + A7, + ns, + ni, + lu, + Xn, + Df, + Pc, + Fc, + ac, + kf, + M7, + Vn, + ui, + wi, + uu, + c7, + gi, + G7, + zn, + Bi, + ju, + Sf, + i7, + _7, + Gn, + Qf, + Su, + zu, + zf, + ei, + Cu, + vf, + nf, + Zf, + tn, + h7, + Ju, + li, + Zn, + qn, + Bu, + Di, + ri, + ku, + Zi, + Zc, + Yu, + C7, + gu, + Jf, + cf, + s7, + Tu, + df, + K7, + Bn, + Ti, + R7, + t2, + Ai, + uf, + ts, + hs, + Iu, + wf, + k7, + Xe, + gf, + _s, + af, + Yi, + hc, + yc, + Wi, + Qc, + vs, + Is, + Fi, + bf, + os, + rc, + vn, + as, + Gu, + Dc, + Kf, + nc, + us, + pi, + ci, + Yf, + We, + Lc, + ae, + N7, + rf, + $i, + mu, + Of, + b7, + Wc, + au, + t7, + Kc + ], dE0 = [ + 0, + H2, + of, + $i, + V7, + $2, + qf, + h7, + pc, + bc, + Rf, + Gi, + Du, + Fi, + hu, + F7, + d7, + Qu, + Uf, + J7, + ui, + cf, + X7, + Zn, + Zf, + _u, + vu, + $n, + ac, + Ps, + oc, + _f, + Sf, + Es, + Uc, + jc, + Q7, + He, + t7, + Wi, + s7, + Qc, + Bi, + ic, + rs, + Ve, + Jc, + Uu, + fu, + k7, + ss, + ii, + lu, + T7, + Je, + ci, + w7, + Of, + qu, + fc, + Ku, + pi, + q7, + a7, + If, + _7, + fs, + Ge, + Lf, + Pi, + Zu, + M7, + pu, + xf, + af, + P7, + $f, + au, + Fc, + Zi, + m7, + Bn, + jf, + Fu, + Y7, + bi, + $c, + Ai, + Eu, + ge, + es, + x7, + rc, + Vu, + bs, + Wn, + e7, + o7, + Kf, + Pc, + Vn, + r7, + Xi, + Qf, + kf, + Lu, + sf, + Xn, + Vc, + zu, + ni, + Oi, + Hu, + $u, + si, + n7, + Ii, + Zc, + Ui, + ys, + Gf, + Kc, + Xu, + Mu, + Ei, + Cc, + wu, + Kn, + hs, + df, + W7, + Ki, + uc, + hf, + Nf, + uu, + du, + E7, + ps, + L7, + mf, + gu, + Au, + Cu, + Yc, + su, + os, + N7, + oi, + G1, + g7, + Hn, + Bc, + ai, + pf, + ku, + xu, + Tf, + Jf, + ms, + Tc, + Dc, + z7, + dc, + Bu, + zf, + f7, + D7, + Z7, + Xf, + I7, + ds, + fi, + Mi, + Di, + Rc, + zn, + Yu, + xi, + eu, + vf, + ae, + lc, + is, + cc, + Ou, + Df, + as, + Vi, + Gn, + W2, + Ri, + U7, + cs, + St, + Ni, + qc, + gs, + tu, + i7, + vi, + Ru, + di, + Qi, + S7, + kc, + _c, + ti, + cu, + gf, + nc, + As, + Iu, + wf, + Qn, + vs, + Ci, + hi, + Hi, + ws, + bf, + v7, + b7, + Mf, + mi, + C7, + Nc, + ts, + p7, + t2, + Un, + Mc, + yf, + Is, + A7, + Yn, + Yi, + Ac, + Yf, + Xc, + Oc, + Ts, + O7, + Hc, + Bf, + wc, + Ec, + bu, + ju, + j7, + be, + nf, + Ju, + qn, + hc, + Ic, + wi, + Gc, + gi, + lf, + yu, + zi, + ou, + xc, + us, + Ke, + Xe, + rf, + ff, + ri, + Wc, + ns, + K7, + mu, + Vf, + Sc, + _s, + Jn, + gc, + qi, + Hf, + ru, + uf, + H7, + yc, + Ef, + ji, + y7, + sc, + Wf, + B7, + ei, + Si, + yi, + Wu, + Ff, + Gu, + Su, + Pf, + c7, + li, + l7, + Ji, + _i, + Cs, + We, + iu, + zc, + vn, + G7, + R7, + ki, + ls, + u7, + Tu, + Pu, + Ti, + Lc, + tf, + vc, + tn, + Af + ], yE0 = [ + 0, + Af, + tn, + vc, + tf, + Lc, + Ti, + Pu, + Tu, + u7, + ls, + ki, + R7, + G7, + vn, + zc, + iu, + We, + Cs, + _i, + Ji, + l7, + li, + c7, + Pf, + Su, + Gu, + Ff, + Wu, + yi, + Si, + ei, + B7, + Wf, + sc, + y7, + ji, + Ef, + yc, + H7, + uf, + ru, + Hf, + qi, + gc, + Jn, + _s, + Sc, + Vf, + mu, + K7, + ns, + Wc, + ri, + ff, + rf, + Xe, + Ke, + us, + xc, + ou, + zi, + yu, + lf, + gi, + Gc, + wi, + Ic, + hc, + qn, + Ju, + nf, + be, + j7, + ju, + bu, + Ec, + wc, + Bf, + Hc, + O7, + Ts, + Oc, + Xc, + Yf, + Ac, + Yi, + Yn, + A7, + Is, + yf, + Mc, + Un, + t2, + p7, + ts, + Nc, + C7, + mi, + Mf, + b7, + v7, + bf, + ws, + Hi, + hi, + Ci, + vs, + Qn, + wf, + Iu, + As, + nc, + gf, + cu, + ti, + _c, + kc, + S7, + Qi, + di, + Ru, + vi, + i7, + tu, + gs, + qc, + Ni, + St, + cs, + U7, + Ri, + W2, + Gn, + Vi, + as, + Df, + Ou, + cc, + is, + lc, + ae, + vf, + eu, + xi, + Yu, + zn, + Rc, + Di, + Mi, + fi, + ds, + I7, + Xf, + Z7, + D7, + f7, + zf, + Bu, + dc, + z7, + Dc, + Tc, + ms, + Jf, + Tf, + xu, + ku, + pf, + ai, + Bc, + Hn, + g7, + G1, + oi, + N7, + os, + su, + Yc, + Cu, + Au, + gu, + mf, + L7, + ps, + E7, + du, + uu, + Nf, + hf, + uc, + Ki, + W7, + df, + hs, + Kn, + wu, + Cc, + Ei, + Mu, + Xu, + Kc, + Gf, + ys, + Ui, + Zc, + Ii, + n7, + si, + $u, + Hu, + Oi, + ni, + zu, + Vc, + Xn, + sf, + Lu, + kf, + Qf, + Xi, + r7, + Vn, + Pc, + Kf, + o7, + e7, + Wn, + bs, + Vu, + rc, + x7, + es, + ge, + Eu, + Ai, + $c, + bi, + Y7, + Fu, + jf, + Bn, + m7, + Zi, + Fc, + au, + $f, + P7, + af, + xf, + pu, + M7, + Zu, + Pi, + Lf, + Ge, + fs, + _7, + If, + a7, + q7, + pi, + Ku, + fc, + qu, + Of, + w7, + ci, + Je, + T7, + lu, + ii, + ss, + k7, + fu, + Uu, + Jc, + Ve, + rs, + ic, + Bi, + Qc, + s7, + Wi, + t7, + He, + Q7, + jc, + Uc, + Es, + Sf, + _f, + oc, + Ps, + ac, + $n, + vu, + _u, + Zf, + Zn, + X7, + cf, + ui, + J7, + Uf, + Qu, + d7, + F7, + hu, + Fi, + Du, + Gi, + Rf, + bc, + pc, + h7, + qf, + $2, + V7, + $i, + of, + H2 + ], _E0 = "Jsoo_runtime.Error.Exn", wE0 = [0, 0], gE0 = "assert_operator", bE0 = "use_strict", TE0 = w_, EE0 = "esproposal_decorators", SE0 = "records", AE0 = "pattern_matching", IE0 = "enums", PE0 = "components", CE0 = "Internal error: ", NE0 = [ + t1, + "CamlinternalLazy.Undefined", + js(0) + ]; + function OE0(x, r) { + var e = Rx(r) - 1 | 0, t = 0; + if (e >= 0) for (var u = t;;) { + x(z0(r, u)); + var i = u + 1 | 0; + if (e === u) break; + var u = i; + } + } + var jE0 = sx, DE0 = [0, 0]; + function RE0(x) { + var r = MJ(0), e = dB(D), t = r.length - 1, u = b1((t * 8 | 0) + 1 | 0), i = t - 1 | 0, c = 0; + if (i >= 0) for (var v = c;;) { + Rz(u, v * 8 | 0, n4(S1(r, v)[1 + v])); + var o = v + 1 | 0; + if (i === v) break; + var v = o; + } + ja(u, t * 8 | 0, 1); + var l = hB(u); + ja(u, t * 8 | 0, 2); + var k = hB(u), h = Qh(k, 8), E = Qh(k, 0), T = Qh(l, 8); + return yB(e, Qh(l, 0), T, E, h), e; + } + for (;;) { + var KB = vl(jN); + let x = [0, 1], r = KB; + if (!(1 - Ph(jN, KB, function(e) { + return Ph(x, 1, 0) && (c3(i3(YB), D), c3(i3(zB), D)), d(r, 0); + }))) break; + } + if (vl(DE0)) throw J0([ + 0, + Kh, + HV + ], 1); + var Ga = MN([0, sx]), s3 = MN([0, sx]), qo = MN([0, xe]), HB = PN(0, 0), FE0 = 2, ME0 = [0, 0]; + function WB(x) { + return 2 < x ? WB((x + 1 | 0) / 2 | 0) * 2 | 0 : x; + } + function VB(x) { + ME0[1]++; + var r = x.length - 1, e = Fo((r * 2 | 0) + 2 | 0, HB); + S1(e, 0)[1] = r; + var t = ((WB(r) * 32 | 0) / 8 | 0) - 1 | 0; + S1(e, 1)[2] = t; + var u = r - 1 | 0, i = 0; + if (u >= 0) for (var c = i;;) { + var v = (c * 2 | 0) + 3 | 0, o = S1(x, c)[1 + c]; + S1(e, v)[1 + v] = o; + var l = c + 1 | 0; + if (u === c) break; + var c = l; + } + return [ + 0, + FE0, + e, + s3[1], + qo[1], + 0, + 0, + Ga[1], + 0 + ]; + } + function oO(x, r) { + var e = x[2].length - 1; + if (e < r) { + var t = Fo(r, HB); + eB(x[2], 0, t, 0, e), x[2] = t; + } + } + function LE0(x) { + var r = [0, 0], e = Rx(x) - 1 | 0, t = 0; + if (e >= 0) for (var u = t;;) { + var i = F1(x, u); + r[1] = (e8 * r[1] | 0) + i | 0; + var c = u + 1 | 0; + if (e === u) break; + var u = c; + } + r[1] = r[1] & ZF; + return 1073741823 < r[1] ? r[1] + 2147483648 | 0 : r[1]; + } + var qE0 = [0, 0]; + function vO(x) { + var r = x[2].length - 1; + return oO(x, r + 1 | 0), r; + } + function b4(x, r) { + try { + return s3[17].call(null, r, x[3]); + } catch (i) { + var t = M1(i); + if (t !== Ds) throw J0(t, 0); + var u = vO(x); + return x[3] = s3[2].call(null, r, u, x[3]), x[4] = qo[2].call(null, u, 1, x[4]), u; + } + } + function lO(x, r) { + return Zh(function(e) { + return b4(x, e); + }, r); + } + function $B(x, r, e) { + if (qE0[1]++, qo[17].call(null, r, x[4])) { + oO(x, r + 1 | 0), S1(x[2], r)[1 + r] = e; + return; + } + x[6] = [ + 0, + [ + 0, + r, + e + ], + x[6] + ]; + } + function pO(x) { + if (x === 0) return 0; + for (var r = x.length - 1 - 1 | 0, e = 0;;) { + if (0 > r) return e; + var t = [ + 0, + x[1 + r], + e + ], r = r - 1 | 0, e = t; + } + } + function kO(x, r) { + try { + return Ga[17].call(null, r, x[7]); + } catch (i) { + var t = M1(i); + if (t !== Ds) throw J0(t, 0); + var u = x[1]; + return x[1] = u + 1 | 0, C(r, rx) && (x[7] = Ga[2].call(null, r, u, x[7])), u; + } + } + function mO(x) { + return Ro(x, 0) ? [0] : x; + } + function hO(x, r, e, t, u, i) { + var c = u[2], v = u[4], o = pO(r), l = pO(e), k = pO(t), h = yn(function(Z) { + return b4(x, Z); + }, l), E = yn(function(Z) { + return b4(x, Z); + }, k); + x[5] = [ + 0, + [ + 0, + x[3], + x[4], + x[6], + x[7], + h, + o + ], + x[5] + ], x[7] = Ga[24].call(null, function(Z, t0, i0) { + return FN(Z, o) ? Ga[2].call(null, Z, t0, i0) : i0; + }, x[7], Ga[1]); + var T = [0, s3[1]], I = [0, qo[1]]; + Vq(function(Z, t0) { + T[1] = s3[2].call(null, Z, t0, T[1]); + var i0 = I[1]; + try { + var k0 = qo[17].call(null, t0, x[4]); + } catch (S0) { + var o0 = M1(S0); + if (o0 !== Ds) throw J0(o0, 0); + var k0 = 1; + } + I[1] = qo[2].call(null, t0, k0, i0); + }, k, E), Vq(function(Z, t0) { + T[1] = s3[2].call(null, Z, t0, T[1]), I[1] = qo[2].call(null, t0, 0, I[1]); + }, l, h), x[3] = T[1], x[4] = I[1], x[6] = RN(function(Z, t0) { + return FN(Z[1], h) ? t0 : [ + 0, + Z, + t0 + ]; + }, x[6], 0); + var N = i ? d(c(x), v) : c(x), P = v4(x[5]), R = P[6], q = P[5], X = P[4], B = P[3], z = P[2], x0 = P[1]; + x[5] = Wq(x[5]), x[7] = y2(function(Z, t0) { + var i0 = Ga[17].call(null, t0, x[7]); + return Ga[2].call(null, t0, i0, Z); + }, X, R), x[3] = x0, x[4] = z, x[6] = RN(function(Z, t0) { + return FN(Z[1], q) ? t0 : [ + 0, + Z, + t0 + ]; + }, x[6], B); + var W = [ + 0, + Zh(function(Z) { + var t0 = b4(x, Z); + try { + for (var i0 = x[6];;) { + if (!i0) throw J0(Ds, 1); + var u0 = i0[1], k0 = i0[2], o0 = u0[2]; + if (yq(u0[1], t0) === 0) return o0; + var i0 = k0; + } + } catch (s0) { + var S0 = M1(s0); + if (S0 === Ds) return S1(x[2], t0)[1 + t0]; + throw J0(S0, 0); + } + }, mO(t)), + 0 + ]; + return Sz([ + 0, + [0, N], + [ + 0, + Zh(function(Z) { + try { + return Ga[17].call(null, Z, x[7]); + } catch (u0) { + var i0 = M1(u0); + throw i0 === Ds ? J0([ + 0, + Nr, + WV + ], 1) : J0(i0, 0); + } + }, mO(r)), + W + ] + ]); + } + function id(x, r) { + if (x === 0) var e = VB([0]); + else { + var t = VB(Zh(LE0, x)), u = x.length - 1 - 1 | 0, i = 0; + if (u >= 0) for (var c = i;;) { + var v = (c * 2 | 0) + 2 | 0; + t[3] = s3[2].call(null, x[1 + c], v, t[3]), t[4] = qo[2].call(null, v, 1, t[4]); + var o = c + 1 | 0; + if (u === c) break; + var c = o; + } + var e = t; + } + var l = r(e); + return e[8] = cx(e[8]), oO(e, 3 + ((S1(e[2], 1)[2] * 16 | 0) / 32 | 0) | 0), [ + 0, + d(l, 0), + r, + , + 0 + ]; + } + function fd(x, r) { + if (x) return x; + var e = PN(t1, r[1]); + return e[1] = r[2], NJ(e); + } + function dO(x, r, e) { + if (x) return r; + var t = e[8]; + if (t !== 0) for (var u = t; u;) { + var i = u[2]; + d(u[1], r); + var u = i; + } + return r; + } + function cd(x) { + var r = vO(x); + x: { + if ((r % 2 | 0) !== 0 && (2 + ((S1(x[2], 1)[2] * 16 | 0) / 32 | 0) | 0) >= r) { + var e = vO(x); + break x; + } + var e = r; + } + return S1(x[2], e)[1 + e] = 0, e; + } + function yO(x, r) { + for (var e = [0, 0], t = r.length - 1;;) { + if (e[1] >= t) return; + var u = e[1], i = function(Q0) { + e[1]++; + var q0 = e[1]; + return S1(r, q0)[1 + q0]; + }, c = S1(r, u)[1 + u], v = i(D); + if (typeof v == "number") switch (v) { + case 0: + let Q0 = i(D); + var j0 = function(mx) { + return Q0; + }; + break; + case 1: + let q0 = i(D); + var j0 = function(mx) { + return mx[1 + q0]; + }; + break; + case 2: + let ix = i(D), xx = i(D); + var j0 = function(mx) { + return mx[1 + ix][1 + xx]; + }; + break; + case 3: + let fx = i(D); + var j0 = function(mx) { + return d(mx[1][1 + fx], mx); + }; + break; + case 4: + let yx = i(D); + var j0 = function(mx, Mx) { + return mx[1 + yx] = Mx, 0; + }; + break; + case 5: + let R0 = i(D), lx = i(D); + var j0 = function(mx) { + return d(R0, lx); + }; + break; + case 6: + let kx = i(D), Q = i(D); + var j0 = function(mx) { + return d(kx, mx[1 + Q]); + }; + break; + case 7: + var h = i(D), E = i(D); + let I0 = h, M = E, d0 = i(D); + var j0 = function(mx) { + return d(I0, mx[1 + M][1 + d0]); + }; + break; + case 8: + let g0 = i(D), h0 = i(D); + var j0 = function(mx) { + return d(g0, d(mx[1][1 + h0], mx)); + }; + break; + case 9: + var I = i(D), N = i(D); + let A0 = I, $0 = N, Kx = i(D); + var j0 = function(mx) { + return p(A0, $0, Kx); + }; + break; + case 10: + var P = i(D), R = i(D); + let J = P, tr = R, Zx = i(D); + var j0 = function(mx) { + return p(J, tr, mx[1 + Zx]); + }; + break; + case 11: + var q = i(D), X = i(D), B = i(D); + let b = q, V = X, tx = B, _x = i(D); + var j0 = function(mx) { + return p(b, V, mx[1 + tx][1 + _x]); + }; + break; + case 12: + var z = i(D), x0 = i(D); + let gx = z, ex = x0, Jx = i(D); + var j0 = function(mx) { + return p(gx, ex, d(mx[1][1 + Jx], mx)); + }; + break; + case 13: + var W = i(D), Z = i(D); + let Ux = W, hr = Z, dr = i(D); + var j0 = function(mx) { + return p(Ux, mx[1 + hr], dr); + }; + break; + case 14: + var t0 = i(D), i0 = i(D), u0 = i(D); + let V0 = t0, K0 = i0, Cx = u0, bx = i(D); + var j0 = function(mx) { + return p(V0, mx[1 + K0][1 + Cx], bx); + }; + break; + case 15: + var k0 = i(D), o0 = i(D); + let Ox = k0, ux = o0, br = i(D); + var j0 = function(mx) { + return p(Ox, d(mx[1][1 + ux], mx), br); + }; + break; + case 16: + let nr = i(D), $r = i(D); + var j0 = function(mx) { + return p(mx[1][1 + nr], mx, $r); + }; + break; + case 17: + let l1 = i(D), C1 = i(D); + var j0 = function(mx) { + return p(mx[1][1 + l1], mx, mx[1 + C1]); + }; + break; + case 18: + var v0 = i(D), m0 = i(D); + let Qr = v0, O1 = m0, Hr = i(D); + var j0 = function(mx) { + return p(mx[1][1 + Qr], mx, mx[1 + O1][1 + Hr]); + }; + break; + case 19: + let w = i(D), Y = i(D); + var j0 = function(mx) { + var Mx = d(mx[1][1 + Y], mx); + return p(mx[1][1 + w], mx, Mx); + }; + break; + case 20: + var E0 = i(D), b0 = i(D); + cd(x); + let px = E0, X0 = b0; + var j0 = function(mx) { + return d(zx(X0, px, 0), X0); + }; + break; + case 21: + var C0 = i(D), D0 = i(D); + cd(x); + let vx = C0, Ix = D0; + var j0 = function(mx) { + var Mx = mx[1 + Ix]; + return d(zx(Mx, vx, 0), Mx); + }; + break; + case 22: + var U0 = i(D), T0 = i(D), M0 = i(D); + cd(x); + let Cr = U0, Vx = T0, f1 = M0; + var j0 = function(mx) { + var Mx = mx[1 + Vx][1 + f1]; + return d(zx(Mx, Cr, 0), Mx); + }; + break; + default: + var y0 = i(D), G = i(D); + cd(x); + let c1 = y0, Fr = G; + var j0 = function(mx) { + var Mx = d(mx[1][1 + Fr], mx); + return d(zx(Mx, c1, 0), Mx); + }; + } + else var j0 = v; + $B(x, c, j0), e[1]++; + } + } + function QB(x, r) { + var e = r.length - 1, t = PN(0, e), u = e - 1 | 0, i = 0; + if (u >= 0) for (var c = i;;) { + var v = S1(r, c)[1 + c]; + if (typeof v == "number") switch (v) { + case 0: + let I = c; + var o = function(X) { + var B = t[1 + I]; + if (N === B) throw J0([ + 0, + s4, + x + ], 1); + return d(B, X); + }; + let N = o; + var h = o; + break; + case 1: + var l = []; + let P = l, R = c; + Dr(l, [ul, function(X) { + var B = t[1 + R]; + if (P === B) throw J0([ + 0, + s4, + x + ], 1); + var z = e3(B); + if (ol === z) return B[1]; + if (ul !== z && jv !== z) return B; + if (fJ(B) !== 0) throw J0(NE0, 1); + var x0 = B[1]; + B[1] = 0; + try { + var W = d(x0, 0); + return B[1] = W, cJ(B), W; + } catch (t0) { + var Z = M1(t0); + throw B[1] = function(i0) { + throw J0(Z, 0); + }, iJ(B), J0(Z, 0); + } + }]); + var h = l; + break; + default: var k = function(X) { + throw J0([ + 0, + s4, + x + ], 1); + }, h = [ + 0, + k, + k, + k, + 0 + ]; + } + else var h = v[0] === 0 ? QB(x, v[1]) : v[1]; + t[1 + c] = h; + var E = c + 1 | 0; + if (u === c) break; + var c = E; + } + return t; + } + function ZB(x, r, e) { + if (e3(e) === 0 && x.length - 1 <= e.length - 1) { + var t = x.length - 1 - 1 | 0, u = 0; + if (t >= 0) for (var i = u;;) { + var c = e[1 + i], v = S1(x, i)[1 + i]; + x: if (typeof v == "number") { + if (v === 2) { + if (e3(c) === 0 && c.length - 1 === 4) { + for (var o = 0, l = r[1 + i];;) { + l[1 + o] = c[1 + o]; + var k = o + 1 | 0; + if (o === 3) break; + var o = k; + } + break x; + } + throw J0([ + 0, + Nr, + VV + ], 1); + } + r[1 + i] = c; + } else v[0] === 0 && ZB(v[1], r[1 + i], c); + var h = i + 1 | 0; + if (t === i) break; + var i = h; + } + return; + } + throw J0([ + 0, + Nr, + $V + ], 1); + } + try { + var _O = Fq("TMPDIR"); + } catch (x) { + var xU = M1(x); + if (xU !== Ds) throw J0(xU, 0); + var _O = QV; + } + var UE0 = [ + 0, + , + , + , + , + , + , + , + , + , + _O + ]; + try { + var rU = Fq("TEMP"); + } catch (x) { + var eU = M1(x); + if (eU !== Ds) throw J0(eU, 0); + var rU = ZV; + } + var GE0 = [ + 0, + , + , + , + , + , + , + , + , + , + rU + ], YE0 = [ + 0, + , + , + , + , + , + , + , + , + , + _O + ], JE0 = (C(Kq, zR) ? C(Kq, "Win32") ? UE0 : GE0 : YE0)[10]; + Rs(0, RE0), Rs([0, function(x) { + return x; + }], function(x) { + return JE0; + }); + function Fs(x, r) { + function e(t) { + return at(x, t); + } + return Y6 <= r ? (e(rl | r >>> 18 | 0), e(R1 | (r >>> 12 | 0) & 63), e(R1 | (r >>> 6 | 0) & 63), e(R1 | r & 63)) : Gg <= r ? (e(Sv | r >>> 12 | 0), e(R1 | (r >>> 6 | 0) & 63), e(R1 | r & 63)) : R1 <= r ? (e(Y3 | r >>> 6 | 0), e(R1 | r & 63)) : e(r); + } + var Bo = [ + t1, + e$, + js(0) + ], tU = 0, nU = 0, uU = 0, iU = 0, fU = 0, cU = 0, sU = 0, aU = 0, oU = 0, vU = 0; + function y(x) { + if (x[3] === x[2]) return -1; + var r = x[1][1 + x[3]]; + return x[3] = x[3] + 1 | 0, r === 10 && (x[5] !== 0 && (x[5] = x[5] + 1 | 0), x[4] = x[3]), r; + } + function H(x, r) { + x[9] = x[3], x[10] = x[4], x[11] = x[5], x[12] = r; + } + function Tr(x) { + return x[6] = x[3], x[7] = x[4], x[8] = x[5], H(x, -1); + } + function g(x) { + return x[3] = x[9], x[4] = x[10], x[5] = x[11], x[12]; + } + function Pl(x) { + x[3] = x[6], x[4] = x[7], x[5] = x[8]; + } + function wO(x, r) { + x[6] = r; + } + function sd(x) { + return x[3] - x[6] | 0; + } + function o1(x) { + var r = x[3] - x[6] | 0, e = x[6], t = x[1]; + return 0 <= e && 0 <= r && (t.length - 1 - r | 0) >= e ? Az(t, e, r) : U2(KV); + } + function lU(x) { + var r = x[6]; + return S1(x[1], r)[1 + r]; + } + function T4(x, r, e, t) { + for (var u = [0, r], i = [0, e], c = [0, 0];;) { + if (0 >= i[1]) return c[1]; + var v = x[1 + u[1]]; + if (0 > v) throw J0(Bo, 1); + if (Gr < v) if (bL < v) if (_m < v) { + if (Gk < v) throw J0(Bo, 1); + zr(t, c[1], rl | v >>> 18 | 0), zr(t, c[1] + 1 | 0, R1 | (v >>> 12 | 0) & 63), zr(t, c[1] + 2 | 0, R1 | (v >>> 6 | 0) & 63), zr(t, c[1] + 3 | 0, R1 | v & 63), c[1] = c[1] + 4 | 0; + } else zr(t, c[1], Sv | v >>> 12 | 0), zr(t, c[1] + 1 | 0, R1 | (v >>> 6 | 0) & 63), zr(t, c[1] + 2 | 0, R1 | v & 63), c[1] = c[1] + 3 | 0; + else zr(t, c[1], Y3 | v >>> 6 | 0), zr(t, c[1] + 1 | 0, R1 | v & 63), c[1] = c[1] + 2 | 0; + else zr(t, c[1], v), c[1]++; + u[1]++, i[1] += -1; + } + } + function pU(x) { + for (var r = Rx(x), e = Fo(r, 0), t = [0, 0], u = [0, 0];;) { + if (t[1] >= r) return [ + 0, + e, + u[1], + vU, + oU, + aU, + sU, + cU, + fU, + iU, + uU, + nU, + tU + ]; + var i = z0(x, t[1]); + x: { + if (Y3 <= i) { + if (rl > i) { + if (Sv > i) { + var c = z0(x, t[1] + 1 | 0); + if ((c >>> 6 | 0) !== 2) throw J0(Bo, 1); + e[1 + u[1]] = (i & 31) << 6 | c & 63, t[1] = t[1] + 2 | 0; + break x; + } + var v = z0(x, t[1] + 1 | 0), o = z0(x, t[1] + 2 | 0), l = (i & 15) << 12 | (v & 63) << 6 | o & 63, h = ((v >>> 6 | 0) !== 2 ? 1 : 0) || ((o >>> 6 | 0) !== 2 ? 1 : 0); + if (h) var T = h; + else var E = 55296 <= l ? 1 : 0, T = E && (l <= 57343 ? 1 : 0); + if (T) throw J0(Bo, 1); + e[1 + u[1]] = l, t[1] = t[1] + 3 | 0; + break x; + } + if (t1 > i) { + var I = z0(x, t[1] + 1 | 0), N = z0(x, t[1] + 2 | 0), P = z0(x, t[1] + 3 | 0), R = (I >>> 6 | 0) !== 2 ? 1 : 0; + if (R) var X = R; + else var q = (N >>> 6 | 0) !== 2 ? 1 : 0, X = q || ((P >>> 6 | 0) !== 2 ? 1 : 0); + if (X) throw J0(Bo, 1); + var B = (i & 7) << 18 | (I & 63) << 12 | (N & 63) << 6 | P & 63; + if (Gk < B) throw J0(Bo, 1); + e[1 + u[1]] = B, t[1] = t[1] + 4 | 0; + break x; + } + } else if (R1 > i) { + e[1 + u[1]] = i, t[1]++; + break x; + } + throw J0(Bo, 1); + } + u[1]++; + } + } + function E4(x, r, e) { + var t = x[6] + r | 0, u = b1(e * 4 | 0), i = x[1]; + if ((t + e | 0) <= i.length - 1) return gl(u, 0, T4(i, t, e, u)); + throw J0([ + 0, + Nr, + r$ + ], 1); + } + function Fx(x) { + var r = x[6], e = x[3] - r | 0, t = b1(e * 4 | 0); + return gl(t, 0, T4(x[1], r, e, t)); + } + function ad(x, r) { + var e = x[6], t = x[3] - e | 0, u = b1(t * 4 | 0); + return XN(r, u, 0, T4(x[1], e, t, u)); + } + function S4(x) { + var r = x.length - 1, e = b1(r * 4 | 0); + return gl(e, 0, T4(x, 0, r, e)); + } + function kU(x, r) { + x[3] = x[3] - r | 0; + } + function Ms(x) { + return typeof x == "number" ? 0 : x[0] === 0 ? 1 : x[1]; + } + function a3(x, r, e, t) { + var u = Ms(x), i = Ms(t), c = i <= u ? u + 1 | 0 : i + 1 | 0; + return c === 1 ? [ + 0, + r, + e + ] : [ + 1, + c, + r, + e, + x, + t + ]; + } + function od(x, r, e, t) { + var u = Ms(x), i = Ms(t); + return [ + 1, + i <= u ? u + 1 | 0 : i + 1 | 0, + r, + e, + x, + t + ]; + } + function mU(x, r, e, t) { + var u = Ms(x), i = Ms(t); + if ((i + 2 | 0) < u) { + var c = x[5], v = x[4], o = x[3], l = x[2]; + if (Ms(c) <= Ms(v)) return od(v, l, o, a3(c, r, e, t)); + var h = c[4], E = c[3], T = c[2], I = a3(c[5], r, e, t); + return od(a3(v, l, o, h), T, E, I); + } + if ((u + 2 | 0) >= i) return a3(x, r, e, t); + var N = t[5], P = t[4], R = t[3], q = t[2]; + if (Ms(P) <= Ms(N)) return od(a3(x, r, e, P), q, R, N); + var B = P[4], z = P[3], x0 = P[2], W = a3(P[5], q, R, N); + return od(a3(x, r, e, B), x0, z, W); + } + function Uo(x) { + return typeof x == "number" ? 0 : x[0] === 0 ? 1 : x[1]; + } + function Ya(x, r, e) { + x: { + r: { + if (typeof x == "number") { + if (typeof e == "number") return [0, r]; + if (e[0] === 1) break r; + } else { + if (x[0] !== 0) { + var t = x[1]; + if (typeof e != "number" && e[0] === 1) { + var u = e[1]; + return [ + 1, + u <= t ? t + 1 | 0 : u + 1 | 0, + r, + x, + e + ]; + } + var c = t; + break x; + } + if (typeof e != "number" && e[0] === 1) break r; + } + return [ + 1, + 2, + r, + x, + e + ]; + } + var c = e[1]; + } + return [ + 1, + c + 1 | 0, + r, + x, + e + ]; + } + function vd(x, r, e) { + var t = Uo(x), u = Uo(e); + return [ + 1, + u <= t ? t + 1 | 0 : u + 1 | 0, + r, + x, + e + ]; + } + function hU(x, r, e) { + var t = Uo(x), u = Uo(e); + if ((u + 2 | 0) < t) { + var i = x[4], c = x[3], v = x[2]; + if (Uo(i) <= Uo(c)) return vd(c, v, Ya(i, r, e)); + var l = i[3], k = i[2], h = Ya(i[4], r, e); + return vd(Ya(c, v, l), k, h); + } + if ((t + 2 | 0) >= u) return Ya(x, r, e); + var E = e[4], T = e[3], I = e[2]; + if (Uo(T) <= Uo(E)) return vd(Ya(x, r, T), I, E); + var P = T[3], R = T[2], q = Ya(T[4], I, E); + return vd(Ya(x, r, P), R, q); + } + var gO = 0; + function dU(x) { + function r(e, t) { + if (typeof t == "number") return [0, e]; + if (t[0] === 0) { + var u = t[1], i = p(x[1], e, u); + return i === 0 ? t : 0 <= i ? Ya(t, e, gO) : Ya([0, e], u, gO); + } + var c = t[4], v = t[3], o = t[2], l = p(x[1], e, o); + if (l === 0) return t; + if (0 <= l) { + var k = r(e, c); + return c === k ? t : hU(v, o, k); + } + var h = r(e, v); + return v === h ? t : hU(h, o, c); + } + return [ + 0, + gO, + , + function(e, t) { + for (var u = t;;) { + if (typeof u == "number") return 0; + if (u[0] === 0) return p(x[1], e, u[1]) === 0 ? 1 : 0; + var i = u[4], c = u[3], v = p(x[1], e, u[2]), o = v === 0 ? 1 : 0; + if (o) return o; + var u = 0 <= v ? i : c; + } + }, + r + ]; + } + function yU(x) { + switch (x[0]) { + case 0: return 1; + case 1: return 2; + case 2: return 2; + default: return 3; + } + } + function Nx(x, r) { + if (!r) return r; + var e = r[1], t = d(x, e); + return e === t ? r : [0, t]; + } + function O0(x, r, e, t, u) { + var i = p(x, r, e); + return e === i ? t : u(i); + } + function P0(x, r, e, t) { + var u = d(x, r); + return r === u ? e : t(u); + } + function K1(x, r) { + var e = r[1]; + return O0(x, e, r[2], r, function(t) { + return [ + 0, + e, + t + ]; + }); + } + function A4(x, r) { + return Nx(function(e) { + var t = e[1]; + return O0(x, t, e[2], e, function(u) { + return [ + 0, + t, + u + ]; + }); + }, r); + } + function pr(x, r) { + var e = y2(function(u, i) { + var c = u[2], v = u[1], o = d(x, i); + return [ + 0, + [ + 0, + o, + v + ], + c || (o !== i ? 1 : 0) + ]; + }, D$, r), t = e[1]; + return e[2] ? cx(t) : r; + } + var bO = id(R$, function(x) { + var r = lO(x, F$), e = r[1], t = r[2], u = r[3], i = r[4], c = r[5], v = r[6], o = r[7], l = r[8], k = r[9], h = r[10], E = r[11], T = r[12], I = r[13], N = r[14], P = r[15], R = r[16], q = r[17], X = r[18], B = r[19], z = r[20], x0 = r[21], W = r[22], Z = r[23], t0 = r[24], i0 = r[25], u0 = r[26], k0 = r[27], o0 = r[28], S0 = r[29], s0 = r[30], v0 = r[31], m0 = r[32], p0 = r[33], E0 = r[34], b0 = r[35], C0 = r[36], D0 = r[37], U0 = r[38], T0 = r[39], M0 = r[40], y0 = r[41], G = r[42], j0 = r[43], Q0 = r[44], q0 = r[45], ix = r[46], xx = r[47], fx = r[48], yx = r[49], R0 = r[50], lx = r[51], kx = r[52], Q = r[53], I0 = r[54], M = r[55], d0 = r[56], g0 = r[57], h0 = r[58], A0 = r[59], $0 = r[60], Kx = r[61], J = r[62], tr = r[63], Zx = r[65], b = r[66], V = r[67], tx = r[68], _x = r[69], gx = r[70], ex = r[71], Jx = r[72], Ux = r[73], hr = r[74], dr = r[75], V0 = r[76], K0 = r[77], Cx = r[78], bx = r[79], Ox = r[80], ux = r[81], br = r[82], nr = r[83], $r = r[84], l1 = r[85], C1 = r[86], Qr = r[87], O1 = r[88], Hr = r[89], w = r[90], Y = r[91], px = r[92], X0 = r[93], vx = r[94], Ix = r[95], Cr = r[96], Vx = r[97], f1 = r[98], c1 = r[99], Fr = r[cr], Zr = r[k1], mx = r[Ee], Mx = r[Ss], rr = r[ec], Ar = r[p2], Or = r[Ct], ne = r[Te], Y2 = r[d2], je = r[wo], kt = r[n2], xo = r[nn], Tn = r[h2], ke = r[ef], ro = r[k2], Js = r[wr], eo = r[Ca], Ks = r[Z6], M2 = r[q6], L2 = r[b6], g1 = r[Cf], En = r[$6], Sn = r[e1], Hs = r[un], Ws = r[zv], mt = r[So], to = r[v8], Q1 = r[Gr], ar = r[R1], no = r[kk], Vs = r[Qv], ht = r[M6], E3 = r[N6], S3 = r[s8], An = r[sm], $s = r[cM], uo = r[bR], tv = r[UD], Qs = r[YL], nv = r[WF], io = r[ML], uv = r[SM], z2 = r[xq], Z1 = r[YM], Zs = r[xR], In = r[LM], fo = r[KM], iv = r[ER], co = r[FF], fv = r[149], Kl = r[150], D5 = r[151], rp = r[152], ep = r[153], R5 = r[154], tp = r[155], Hl = r[156], np = r[157], so = r[158], up = r[159], zt = r[AL], ip = r[kI], cv = r[qM], fp = r[da], cp = r[sR], sv = r[hF], Wl = r[JD], sp = r[Sb], F5 = r[IL], ap = r[yR], M5 = r[py], op = r[Sg], vp = r[KR], lp = r[bM], Vl = r[LL], U = r[NR], A = r[GF], j = r[rL], f0 = r[fk], _0 = r[AC], N0 = r[dR], H0 = r[NS], nx = r[s9], wx = r[j_], Sx = r[Wm], er = r[oD], Lx = r[xI], Xx = r[z_], ur = r[nR], $x = r[$S], ir = r[jE], fr = r[sP], or = r[Y3], Mr = r[cR], jx = r[mh], u1 = r[IF], p1 = r[vL], j1 = r[hw], Ur = r[QP], Wr = r[VI], s1 = r[_L], yr = r[xF], Ir = r[KD], x1 = r[TD], D1 = r[eM], X1 = r[RE], De = r[Hg], T1 = r[oF], w2 = r[gD], V1 = r[HR], i1 = r[HD], J2 = r[uR], rt = r[$R], dt = r[o_], et = r[qL], g2 = r[lk], r1 = r[ty], me = r[pM], b2 = r[fD], yt = r[nL], ue = r[lF], _t = r[HF], Jt = r[jD], Kt = r[e8], Ht = r[Sv], Pn = r[JR], Cn = r[KF], Nn = r[wM], ie = r[RD], Dx = r[qI], tt = r[nF], Re = r[PD], Wt = r[iD], Vt = r[aL], q2 = r[dL], nt = r[EM], ut = r[IM], xa = r[EL], wt = r[XF], On = r[E9], Fe = r[rl], jn = r[kF], T2 = r[HM], he = r[BM], it = r[jv], ra = r[ME], Dn = r[ul], ea = r[Gp], Me = r[t1], ta = r[jS], na = r[ol], Rn = r[WL], Le = r[xl], $t = r[QE], ao = r[Q3], $l = r[Bk], ua = r[D6], av = r[257], A3 = r[258], oo = r[259], vo = r[260], Ql = r[261], ov = r[262], I3 = r[263], P3 = r[264], C3 = r[265], vv = r[266], Zl = r[267], x6 = r[ZL], lo = r[FM], lv = r[270], po = r[271], N3 = r[272], Fn = r[273], r6 = r[274], ia = r[275], pv = r[mL], kv = r[277], O3 = r[278], mv = r[BF], j3 = r[280], fa = r[lL], hv = r[QD], ca = r[283], e6 = r[284], D3 = r[gR], t6 = r[286], dv = r[qR], R3 = r[UR], sa = r[xr], aa = r[jR], ko = r[291], yv = r[_F], _v = r[293], wv = r[294], de = r[295], mo = r[296], qe = r[oR], gv = r[zL], F3 = r[299], n6 = r[300], bv = r[301], Tv = r[dF], u6 = r[303], oa = r[hD], L5 = r[305], i6 = r[306], q5 = r[307], Mn = r[RF], Ln = r[309], M3 = r[310], pp = r[fL], Qt = r[312], f6 = r[TL], B5 = r[gM], U5 = r[315], X5 = r[316], L3 = r[317], kp = r[AR], G5 = r[319], Y5 = r[ox], mp = r[lD]; + return yO(x, [ + 0, + r[64], + function(n, s) { + var f = s[2], a = f[4], m = f[3], _ = f[1], S = f[2], O = s[1], F = p(n[1][1 + C0], n, _), n0 = p(n[1][1 + G], n, m), l0 = pr(d(n[1][1 + ca], n), a); + return _ === F && m === n0 && a === l0 ? s : [ + 0, + O, + [ + 0, + F, + S, + n0, + l0 + ] + ]; + }, + R0, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return O0(d(n[1][1 + Mn], n), a, m, s, function(ax) { + return [ + 0, + a, + [0, ax] + ]; + }); + case 1: + var _ = f[1]; + return O0(d(n[1][1 + L5], n), a, _, s, function(ax) { + return [ + 0, + a, + [1, ax] + ]; + }); + case 2: + var S = f[1]; + return O0(d(n[1][1 + mo], n), a, S, s, function(ax) { + return [ + 0, + a, + [2, ax] + ]; + }); + case 3: + var O = f[1]; + return O0(d(n[1][1 + fa], n), a, O, s, function(ax) { + return [ + 0, + a, + [3, ax] + ]; + }); + case 4: + var F = f[1]; + return O0(d(n[1][1 + vv], n), a, F, s, function(ax) { + return [ + 0, + a, + [4, ax] + ]; + }); + case 5: + var n0 = f[1]; + return O0(d(n[1][1 + C3], n), a, n0, s, function(ax) { + return [ + 0, + a, + [5, ax] + ]; + }); + case 6: + var l0 = f[1]; + return O0(d(n[1][1 + P3], n), a, l0, s, function(ax) { + return [ + 0, + a, + [6, ax] + ]; + }); + case 7: + var F0 = f[1]; + return O0(d(n[1][1 + I3], n), a, F0, s, function(ax) { + return [ + 0, + a, + [7, ax] + ]; + }); + case 8: + var W0 = f[1]; + return O0(d(n[1][1 + ov], n), a, W0, s, function(ax) { + return [ + 0, + a, + [8, ax] + ]; + }); + case 9: + var Tx = f[1]; + return O0(d(n[1][1 + Ql], n), a, Tx, s, function(ax) { + return [ + 0, + a, + [9, ax] + ]; + }); + case 10: + var Ax = f[1]; + return O0(d(n[1][1 + oo], n), a, Ax, s, function(ax) { + return [ + 0, + a, + [10, ax] + ]; + }); + case 11: + var _r = f[1]; + return O0(d(n[1][1 + A3], n), a, _r, s, function(ax) { + return [ + 0, + a, + [11, ax] + ]; + }); + case 12: + var Lr = f[1]; + return O0(d(n[1][1 + av], n), a, Lr, s, function(ax) { + return [ + 0, + a, + [12, ax] + ]; + }); + case 13: + var Xr = f[1]; + return O0(d(n[1][1 + ua], n), a, Xr, s, function(ax) { + return [ + 0, + a, + [13, ax] + ]; + }); + case 14: + var _1 = f[1]; + return O0(d(n[1][1 + $l], n), a, _1, s, function(ax) { + return [ + 0, + a, + [14, ax] + ]; + }); + case 15: + var Hx = f[1]; + return O0(d(n[1][1 + ao], n), a, Hx, s, function(ax) { + return [ + 0, + a, + [15, ax] + ]; + }); + case 16: + var x2 = f[1]; + return O0(d(n[1][1 + X0], n), a, x2, s, function(ax) { + return [ + 0, + a, + [16, ax] + ]; + }); + case 17: + var fe = f[1]; + return O0(d(n[1][1 + $t], n), a, fe, s, function(ax) { + return [ + 0, + a, + [17, ax] + ]; + }); + case 18: + var ye = f[1]; + return O0(d(n[1][1 + Rn], n), a, ye, s, function(ax) { + return [ + 0, + a, + [18, ax] + ]; + }); + case 19: + var K2 = f[1]; + return O0(d(n[1][1 + na], n), a, K2, s, function(ax) { + return [ + 0, + a, + [19, ax] + ]; + }); + case 20: + var Be = f[1]; + return O0(d(n[1][1 + it], n), a, Be, s, function(ax) { + return [ + 0, + a, + [20, ax] + ]; + }); + case 21: + var _e = f[1]; + return O0(d(n[1][1 + nt], n), a, _e, s, function(ax) { + return [ + 0, + a, + [21, ax] + ]; + }); + case 22: + var we = f[1]; + return O0(d(n[1][1 + Vt], n), a, we, s, function(ax) { + return [ + 0, + a, + [22, ax] + ]; + }); + case 23: + var E2 = f[1]; + return O0(d(n[1][1 + Nn], n), a, E2, s, function(ax) { + return [ + 0, + a, + [23, ax] + ]; + }); + case 24: + var gt = f[1]; + return O0(d(n[1][1 + me], n), a, gt, s, function(ax) { + return [ + 0, + a, + [24, ax] + ]; + }); + case 25: + var ce = f[1]; + return O0(d(n[1][1 + Ht], n), a, ce, s, function(ax) { + return [ + 0, + a, + [25, ax] + ]; + }); + case 26: + var Zt = f[1]; + return O0(d(n[1][1 + yt], n), a, Zt, s, function(ax) { + return [ + 0, + a, + [26, ax] + ]; + }); + case 27: + var va = f[1]; + return O0(d(n[1][1 + rt], n), a, va, s, function(ax) { + return [ + 0, + a, + [27, ax] + ]; + }); + case 28: + var la = f[1]; + return O0(d(n[1][1 + fr], n), a, la, s, function(ax) { + return [ + 0, + a, + [28, ax] + ]; + }); + case 29: + var pa = f[1]; + return O0(d(n[1][1 + $x], n), a, pa, s, function(ax) { + return [ + 0, + a, + [29, ax] + ]; + }); + case 30: + var ka = f[1]; + return O0(d(n[1][1 + N0], n), a, ka, s, function(ax) { + return [ + 0, + a, + [30, ax] + ]; + }); + case 31: + var ma = f[1]; + return O0(d(n[1][1 + fv], n), a, ma, s, function(ax) { + return [ + 0, + a, + [31, ax] + ]; + }); + case 32: + var Ev = f[1]; + return O0(d(n[1][1 + ar], n), a, Ev, s, function(ax) { + return [ + 0, + a, + [32, ax] + ]; + }); + case 33: + var q3 = f[1]; + return O0(d(n[1][1 + Kx], n), a, q3, s, function(ax) { + return [ + 0, + a, + [33, ax] + ]; + }); + case 34: + var B3 = f[1]; + return O0(d(n[1][1 + I0], n), a, B3, s, function(ax) { + return [ + 0, + a, + [34, ax] + ]; + }); + case 35: + var U3 = f[1]; + return O0(d(n[1][1 + q0], n), a, U3, s, function(ax) { + return [ + 0, + a, + [35, ax] + ]; + }); + case 36: + var X3 = f[1]; + return O0(d(n[1][1 + D0], n), a, X3, s, function(ax) { + return [ + 0, + a, + [36, ax] + ]; + }); + case 37: + var Ex = f[1]; + return O0(d(n[1][1 + E0], n), a, Ex, s, function(ax) { + return [ + 0, + a, + [37, ax] + ]; + }); + case 38: + var hp = f[1]; + return O0(d(n[1][1 + k0], n), a, hp, s, function(ax) { + return [ + 0, + a, + [38, ax] + ]; + }); + case 39: + var hx = f[1]; + return O0(d(n[1][1 + X0], n), a, hx, s, function(ax) { + return [ + 0, + a, + [39, ax] + ]; + }); + case 40: + var Xj = f[1]; + return O0(d(n[1][1 + l], n), a, Xj, s, function(ax) { + return [ + 0, + a, + [40, ax] + ]; + }); + case 41: + var Gj = f[1]; + return O0(d(n[1][1 + u], n), a, Gj, s, function(ax) { + return [ + 0, + a, + [41, ax] + ]; + }); + default: + var Yj = f[1]; + return O0(d(n[1][1 + t], n), a, Yj, s, function(ax) { + return [ + 0, + a, + [42, ax] + ]; + }); + } + }, + ca, + function(n, s) { + return s; + }, + G, + function(n) { + var s = d(n[1][1 + j0], n); + return function(f) { + return Nx(s, f); + }; + }, + j0, + function(n, s) { + var f = s[2], a = s[1], m = s[3], _ = pr(d(n[1][1 + ca], n), a), S = pr(d(n[1][1 + ca], n), f); + return a === _ && f === S ? s : [ + 0, + _, + S, + m + ]; + }, + Dx, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return O0(d(n[1][1 + Y5], n), a, m, s, function(hx) { + return [ + 0, + a, + [0, hx] + ]; + }); + case 1: + var _ = f[1]; + return O0(d(n[1][1 + L3], n), a, _, s, function(hx) { + return [ + 0, + a, + [1, hx] + ]; + }); + case 2: + var S = f[1]; + return O0(d(n[1][1 + X5], n), a, S, s, function(hx) { + return [ + 0, + a, + [2, hx] + ]; + }); + case 3: + var O = f[1]; + return O0(d(n[1][1 + U5], n), a, O, s, function(hx) { + return [ + 0, + a, + [3, hx] + ]; + }); + case 4: + var F = f[1]; + return O0(d(n[1][1 + B5], n), a, F, s, function(hx) { + return [ + 0, + a, + [4, hx] + ]; + }); + case 5: + var n0 = f[1]; + return O0(d(n[1][1 + pp], n), a, n0, s, function(hx) { + return [ + 0, + a, + [5, hx] + ]; + }); + case 6: + var l0 = f[1]; + return O0(d(n[1][1 + oa], n), a, l0, s, function(hx) { + return [ + 0, + a, + [6, hx] + ]; + }); + case 7: + var F0 = f[1]; + return O0(d(n[1][1 + _v], n), a, F0, s, function(hx) { + return [ + 0, + a, + [7, hx] + ]; + }); + case 8: + var W0 = f[1]; + return O0(d(n[1][1 + x6], n), a, W0, s, function(hx) { + return [ + 0, + a, + [8, hx] + ]; + }); + case 9: + var Tx = f[1]; + return O0(d(n[1][1 + J2], n), a, Tx, s, function(hx) { + return [ + 0, + a, + [9, hx] + ]; + }); + case 10: + var Ax = f[1]; + return P0(d(n[1][1 + jx], n), Ax, s, function(hx) { + return [ + 0, + a, + [10, hx] + ]; + }); + case 11: + var _r = f[1]; + return P0(p(n[1][1 + ir], n, a), _r, s, function(hx) { + return [ + 0, + a, + [11, hx] + ]; + }); + case 12: + var Lr = f[1]; + return O0(d(n[1][1 + sp], n), a, Lr, s, function(hx) { + return [ + 0, + a, + [12, hx] + ]; + }); + case 13: + var Xr = f[1]; + return O0(d(n[1][1 + ip], n), a, Xr, s, function(hx) { + return [ + 0, + a, + [13, hx] + ]; + }); + case 14: + var _1 = f[1]; + return O0(d(n[1][1 + xx], n), a, _1, s, function(hx) { + return [ + 0, + a, + [14, hx] + ]; + }); + case 15: + var Hx = f[1]; + return O0(d(n[1][1 + i6], n), a, Hx, s, function(hx) { + return [ + 0, + a, + [15, hx] + ]; + }); + case 16: + var x2 = f[1]; + return O0(d(n[1][1 + Js], n), a, x2, s, function(hx) { + return [ + 0, + a, + [16, hx] + ]; + }); + case 17: + var fe = f[1]; + return O0(d(n[1][1 + ke], n), a, fe, s, function(hx) { + return [ + 0, + a, + [17, hx] + ]; + }); + case 18: + var ye = f[1]; + return O0(d(n[1][1 + Qt], n), a, ye, s, function(hx) { + return [ + 0, + a, + [18, hx] + ]; + }); + case 19: + var K2 = f[1]; + return O0(d(n[1][1 + g0], n), a, K2, s, function(hx) { + return [ + 0, + a, + [19, hx] + ]; + }); + case 20: + var Be = f[1]; + return O0(d(n[1][1 + Ks], n), a, Be, s, function(hx) { + return [ + 0, + a, + [20, hx] + ]; + }); + case 21: + var _e = f[1]; + return O0(d(n[1][1 + co], n), a, _e, s, function(hx) { + return [ + 0, + a, + [21, hx] + ]; + }); + case 22: + var we = f[1]; + return O0(d(n[1][1 + uv], n), a, we, s, function(hx) { + return [ + 0, + a, + [22, hx] + ]; + }); + case 23: + var E2 = f[1]; + return O0(d(n[1][1 + Ws], n), a, E2, s, function(hx) { + return [ + 0, + a, + [23, hx] + ]; + }); + case 24: + var gt = f[1]; + return O0(d(n[1][1 + M2], n), a, gt, s, function(hx) { + return [ + 0, + a, + [24, hx] + ]; + }); + case 25: + var ce = f[1]; + return O0(d(n[1][1 + eo], n), a, ce, s, function(hx) { + return [ + 0, + a, + [25, hx] + ]; + }); + case 26: + var Zt = f[1]; + return O0(d(n[1][1 + Tn], n), a, Zt, s, function(hx) { + return [ + 0, + a, + [26, hx] + ]; + }); + case 27: + var va = f[1]; + return P0(p(n[1][1 + px], n, a), va, s, function(hx) { + return [ + 0, + a, + [27, hx] + ]; + }); + case 28: + var la = f[1]; + return O0(d(n[1][1 + w], n), a, la, s, function(hx) { + return [ + 0, + a, + [28, hx] + ]; + }); + case 29: + var pa = f[1]; + return O0(d(n[1][1 + Q], n), a, pa, s, function(hx) { + return [ + 0, + a, + [29, hx] + ]; + }); + case 30: + var ka = f[1]; + return O0(d(n[1][1 + ix], n), a, ka, s, function(hx) { + return [ + 0, + a, + [30, hx] + ]; + }); + case 31: + var ma = f[1]; + return O0(d(n[1][1 + y0], n), a, ma, s, function(hx) { + return [ + 0, + a, + [31, hx] + ]; + }); + case 32: + var Ev = f[1]; + return O0(d(n[1][1 + M0], n), a, Ev, s, function(hx) { + return [ + 0, + a, + [32, hx] + ]; + }); + case 33: + var q3 = f[1]; + return O0(d(n[1][1 + U0], n), a, q3, s, function(hx) { + return [ + 0, + a, + [33, hx] + ]; + }); + case 34: + var B3 = f[1]; + return O0(d(n[1][1 + Z], n), a, B3, s, function(hx) { + return [ + 0, + a, + [34, hx] + ]; + }); + case 35: + var U3 = f[1]; + return O0(d(n[1][1 + p0], n), a, U3, s, function(hx) { + return [ + 0, + a, + [35, hx] + ]; + }); + case 36: + var X3 = f[1]; + return O0(d(n[1][1 + E], n), a, X3, s, function(hx) { + return [ + 0, + a, + [36, hx] + ]; + }); + case 37: + var Ex = f[1]; + return O0(d(n[1][1 + k], n), a, Ex, s, function(hx) { + return [ + 0, + a, + [37, hx] + ]; + }); + default: + var hp = f[1]; + return O0(d(n[1][1 + e], n), a, hp, s, function(hx) { + return [ + 0, + a, + [38, hx] + ]; + }); + } + }, + Y5, + function(n, s, f) { + var a = f[2], m = f[1], _ = pr(d(n[1][1 + G5], n), m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + G5, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + Dx], n), f, s, function(m) { + return [0, m]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + kx], n), a, s, function(m) { + return [1, m]; + }); + default: return s; + } + }, + L3, + function(n, s, f) { + return Z0(n[1][1 + g2], n, s, f); + }, + X5, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return _ === m && S === a ? f : [ + 0, + _, + S + ]; + }, + U5, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + u0], n, m), F = p(n[1][1 + G], n, a); + return S === _ && O === m && F === a ? f : [ + 0, + S, + O, + F + ]; + }, + B5, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = p(n[1][1 + f6], n, _), O = p(n[1][1 + Dx], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + f[1], + S, + O, + F + ]; + }, + pp, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + Dx], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + f[1], + S, + O, + F + ]; + }, + Mn, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + fx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + L5, + function(n, s, f) { + var a = f[2], m = f[1], _ = Nx(d(n[1][1 + Kl], n), m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + oa, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + Dx], n, S), F = Nx(d(n[1][1 + Tv], n), _), n0 = p(n[1][1 + mp], n, m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + mp, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + ie], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + px, + function(n, s, f) { + var a = f[1], m = Z0(n[1][1 + oa], n, s, a); + return a === m ? f : [ + 0, + m, + f[2], + f[3] + ]; + }, + Tv, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + u6], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + u6, + function(n, s) { + if (s[0] === 0) { + var f = s[1], a = p(n[1][1 + o0], n, f); + return a === f ? s : [0, a]; + } + var m = s[1], _ = m[2][1], S = m[1], O = p(n[1][1 + G], n, _); + return _ === O ? s : [1, [ + 0, + S, + [0, O] + ]]; + }, + bv, + function(n, s) { + return K1(d(n[1][1 + Mn], n), s); + }, + n6, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = Nx(d(n[1][1 + F3], n), _), O = p(n[1][1 + bv], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + mo, + function(n, s, f) { + return Z0(n[1][1 + gv], n, s, f); + }, + _v, + function(n, s, f) { + return Z0(n[1][1 + gv], n, s, f); + }, + gv, + function(n, s, f) { + var a = f[7], m = f[6], _ = f[5], S = f[4], O = f[3], F = f[2], n0 = f[1], l0 = Nx(d(n[1][1 + ko], n), n0), F0 = Nx(p(n[1][1 + q], n, 0), O), W0 = p(n[1][1 + qe], n, F), Tx = d(n[1][1 + yv], n), Ax = Nx(function(_1) { + return K1(Tx, _1); + }, S), _r = Nx(d(n[1][1 + aa], n), _), Lr = pr(d(n[1][1 + de], n), m), Xr = p(n[1][1 + G], n, a); + return n0 === l0 && F === W0 && S === Ax && _ === _r && m === Lr && a === Xr && O === F0 ? f : [ + 0, + l0, + W0, + F0, + Ax, + _r, + Lr, + Xr + ]; + }, + yv, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = Nx(d(n[1][1 + t0], n), m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + ko, + function(n, s) { + return Z0(n[1][1 + ux], n, _$, s); + }, + qe, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + wv], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + de, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + Dx], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + wv, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1], a = f[1], m = f[2]; + return O0(d(n[1][1 + R3], n), a, m, s, function(Ax) { + return [0, [ + 0, + a, + Ax + ]]; + }); + case 1: + var _ = s[1], S = _[1], O = _[2]; + return O0(d(n[1][1 + t6], n), S, O, s, function(Ax) { + return [1, [ + 0, + S, + Ax + ]]; + }); + case 2: + var F = s[1], n0 = F[1], l0 = F[2]; + return O0(d(n[1][1 + dv], n), n0, l0, s, function(Ax) { + return [2, [ + 0, + n0, + Ax + ]]; + }); + default: + var F0 = s[1], W0 = F0[1], Tx = F0[2]; + return O0(d(n[1][1 + e6], n), W0, Tx, s, function(Ax) { + return [3, [ + 0, + W0, + Ax + ]]; + }); + } + }, + aa, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + sa], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + sa, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + B], n, m), O = Nx(d(n[1][1 + t0], n), a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + R3, + function(n, s, f) { + var a = f[6], m = f[5], _ = f[3], S = f[2], O = p(n[1][1 + Y2], n, S), F = K1(d(n[1][1 + i1], n), _), n0 = pr(d(n[1][1 + de], n), m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + f[1], + O, + F, + f[4], + n0, + l0 + ]; + }, + t6, + function(n, s, f) { + var a = f[7], m = f[6], _ = f[5], S = f[3], O = f[2], F = f[1], n0 = p(n[1][1 + Y2], n, F), l0 = p(n[1][1 + D3], n, O), F0 = p(n[1][1 + i0], n, S), W0 = p(n[1][1 + i], n, _), Tx = pr(d(n[1][1 + de], n), m), Ax = p(n[1][1 + G], n, a); + return F === n0 && O === l0 && F0 === S && W0 === _ && Tx === m && Ax === a ? f : [ + 0, + n0, + l0, + F0, + f[4], + W0, + Tx, + Ax + ]; + }, + D3, + function(n, s) { + if (typeof s == "number") return s; + var f = s[1], a = p(n[1][1 + Dx], n, f); + return f === a ? s : [0, a]; + }, + dv, + function(n, s, f) { + var a = f[7], m = f[6], _ = f[5], S = f[3], O = f[2], F = f[1], n0 = p(n[1][1 + Zx], n, F), l0 = p(n[1][1 + D3], n, O), F0 = p(n[1][1 + i0], n, S), W0 = p(n[1][1 + i], n, _), Tx = pr(d(n[1][1 + de], n), m), Ax = p(n[1][1 + G], n, a); + return F === n0 && O === l0 && F0 === S && W0 === _ && Tx === m && Ax === a ? f : [ + 0, + n0, + l0, + F0, + f[4], + W0, + Tx, + Ax + ]; + }, + e6, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + fx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + Le, + function(n, s) { + return Nx(d(n[1][1 + Dx], n), s); + }, + fa, + function(n, s, f) { + var a = f[6], m = f[5], _ = f[4], S = f[3], O = f[2], F = f[1], n0 = f[7], l0 = p(n[1][1 + j3], n, F), F0 = Nx(p(n[1][1 + q], n, 8), O), W0 = p(n[1][1 + pv], n, S), Tx = p(n[1][1 + hv], n, m), Ax = p(n[1][1 + ia], n, _), _r = p(n[1][1 + G], n, a); + return F === l0 && O === F0 && S === W0 && m === Tx && _ === Ax && a === _r ? f : [ + 0, + l0, + F0, + W0, + Ax, + Tx, + _r, + n0 + ]; + }, + j3, + function(n, s) { + return Z0(n[1][1 + ux], n, w$, s); + }, + pv, + function(n, s) { + var f = s[2], a = f[3], m = f[2], _ = f[1], S = s[1], O = pr(d(n[1][1 + mv], n), _), F = Nx(d(n[1][1 + r6], n), m), n0 = p(n[1][1 + G], n, a); + return _ === O && m === F && a === n0 ? s : [ + 0, + S, + [ + 0, + O, + F, + n0 + ] + ]; + }, + mv, + function(n, s) { + var f = s[2], a = f[3], m = f[2], _ = f[1], S = f[4], O = s[1], F = p(n[1][1 + O3], n, _), n0 = p(n[1][1 + kv], n, m), l0 = p(n[1][1 + Le], n, a); + return _ === F && m === n0 && a === l0 ? s : [ + 0, + O, + [ + 0, + F, + n0, + l0, + S + ] + ]; + }, + O3, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + jx], n), f, s, function(S) { + return [0, S]; + }); + } + var a = s[1], m = a[1], _ = a[2]; + return O0(d(n[1][1 + xx], n), m, _, s, function(S) { + return [1, [ + 0, + m, + S + ]]; + }); + }, + kv, + function(n, s) { + return Z0(n[1][1 + M3], n, g$, s); + }, + r6, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + kv], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + hv, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + Mn], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + x6, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + b], n, S), F = p(n[1][1 + Dx], n, _), n0 = p(n[1][1 + Dx], n, m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + vv, + function(n, s, f) { + var a = f[2], m = f[1], _ = Nx(d(n[1][1 + Kl], n), m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + C3, + function(n, s, f) { + var a = f[1], m = p(n[1][1 + G], n, a); + return a === m ? f : [0, m]; + }, + P3, + function(n, s, f) { + var a = f[7], m = f[6], _ = f[5], S = f[4], O = f[3], F = f[2], n0 = f[1], l0 = p(n[1][1 + ko], n, n0), F0 = Nx(p(n[1][1 + q], n, 3), F), W0 = K1(d(n[1][1 + Vx], n), O), Tx = d(n[1][1 + u1], n), Ax = Nx(function(Hx) { + return K1(Tx, Hx); + }, S), _r = d(n[1][1 + u1], n), Lr = pr(function(Hx) { + return K1(_r, Hx); + }, _), Xr = Nx(d(n[1][1 + aa], n), m), _1 = p(n[1][1 + G], n, a); + return l0 === n0 && F0 === F && W0 === O && Ax === S && Lr === _ && Xr === m && _1 === a ? f : [ + 0, + l0, + F0, + W0, + Ax, + Lr, + Xr, + _1 + ]; + }, + I3, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = p(n[1][1 + j3], n, O), n0 = Nx(p(n[1][1 + q], n, 4), S), l0 = p(n[1][1 + po], n, _), F0 = p(n[1][1 + ia], n, m), W0 = p(n[1][1 + G], n, a); + return O === F && S === n0 && _ === l0 && m === F0 && a === W0 ? f : [ + 0, + F, + n0, + l0, + F0, + W0 + ]; + }, + Fn, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = Nx(p(n[1][1 + q], n, 9), S), F = p(n[1][1 + po], n, _), n0 = p(n[1][1 + ia], n, m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + po, + function(n, s) { + var f = s[2], a = f[3], m = f[2], _ = f[1], S = s[1], O = pr(d(n[1][1 + N3], n), _), F = Nx(d(n[1][1 + lv], n), m), n0 = p(n[1][1 + G], n, a); + return _ === O && m === F && a === n0 ? s : [ + 0, + S, + [ + 0, + O, + F, + n0 + ] + ]; + }, + N3, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = f[3], S = s[1], O = p(n[1][1 + O3], n, m), F = p(n[1][1 + u0], n, a); + return m === O && a === F ? s : [ + 0, + S, + [ + 0, + O, + F, + _ + ] + ]; + }, + lv, + function(n, s) { + var f = s[2], a = f[4], m = f[2], _ = f[1], S = f[3], O = s[1], F = Nx(d(n[1][1 + jx], n), _), n0 = p(n[1][1 + o0], n, m), l0 = p(n[1][1 + G], n, a); + return _ === F && m === n0 && a === l0 ? s : [ + 0, + O, + [ + 0, + F, + n0, + S, + l0 + ] + ]; + }, + ov, + function(n, s, f) { + return Z0(n[1][1 + it], n, s, f); + }, + Ql, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = A4(d(n[1][1 + tt], n), m), n0 = Nx(d(n[1][1 + Re], n), _), l0 = Nx(d(n[1][1 + vo], n), S), F0 = p(n[1][1 + G], n, a); + return m === F && _ === n0 && S === l0 && a === F0 ? f : [ + 0, + O, + l0, + n0, + F, + F0 + ]; + }, + vo, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1], a = f[2], m = f[1], _ = Z0(n[1][1 + $t], n, m, a); + return _ === a ? s : [0, [ + 0, + m, + _ + ]]; + case 1: + var S = s[1], O = S[2], F = S[1], n0 = Z0(n[1][1 + oo], n, F, O); + return n0 === O ? s : [1, [ + 0, + F, + n0 + ]]; + case 2: + var l0 = s[1], F0 = l0[2], W0 = l0[1], Tx = Z0(n[1][1 + P3], n, W0, F0); + return Tx === F0 ? s : [2, [ + 0, + W0, + Tx + ]]; + case 3: + var Ax = s[1], _r = Ax[2], Lr = Ax[1], Xr = Z0(n[1][1 + I3], n, Lr, _r); + return Xr === _r ? s : [3, [ + 0, + Lr, + Xr + ]]; + case 4: + var _1 = s[1], Hx = p(n[1][1 + o0], n, _1); + return Hx === _1 ? s : [4, Hx]; + case 5: + var x2 = s[1], fe = x2[2], ye = x2[1], K2 = Z0(n[1][1 + k0], n, ye, fe); + return K2 === fe ? s : [5, [ + 0, + ye, + K2 + ]]; + case 6: + var Be = s[1], _e = Be[2], we = Be[1], E2 = Z0(n[1][1 + X0], n, we, _e); + return E2 === _e ? s : [6, [ + 0, + we, + E2 + ]]; + case 7: + var gt = s[1], ce = gt[2], Zt = gt[1], va = Z0(n[1][1 + H0], n, Zt, ce); + return va === ce ? s : [7, [ + 0, + Zt, + va + ]]; + default: + var la = s[1], pa = la[2], ka = la[1], ma = Z0(n[1][1 + it], n, ka, pa); + return ma === pa ? s : [8, [ + 0, + ka, + ma + ]]; + } + }, + oo, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + V1], n, S), F = p(n[1][1 + u0], n, _), n0 = Nx(d(n[1][1 + V], n), m), l0 = p(n[1][1 + G], n, a); + return O === S && F === _ && n0 === m && l0 === a ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + A3, + function(n, s, f) { + return Z0(n[1][1 + H0], n, s, f); + }, + av, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = K1(d(n[1][1 + Mn], n), m), O = p(n[1][1 + G], n, a); + return S === m && a === O ? f : [ + 0, + _, + S, + O + ]; + }, + ua, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + u0], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + $l, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1]; + if (_[0] === 0) var S = _[1], O = p(n[1][1 + jx], n, S), F = S === O ? _ : [0, O], W0 = F; + else var n0 = _[1], l0 = Z0(n[1][1 + ux], n, b$, n0), F0 = n0 === l0 ? _ : [1, l0], W0 = F0; + var Tx = K1(d(n[1][1 + Mn], n), m), Ax = p(n[1][1 + G], n, a); + return W0 === _ && Tx === m && a === Ax ? f : [ + 0, + W0, + Tx, + Ax + ]; + }, + ao, + function(n, s, f) { + return Z0(n[1][1 + k0], n, s, f); + }, + $t, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = Z0(n[1][1 + ux], n, [0, m], S), F = p(n[1][1 + u0], n, _), n0 = p(n[1][1 + G], n, a); + return O === S && F === _ && n0 === a ? f : [ + 0, + O, + F, + m, + n0 + ]; + }, + Rn, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + R0], n, _), O = p(n[1][1 + b], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + na, + function(n, s, f) { + var a = f[1], m = p(n[1][1 + G], n, a); + return a === m ? f : [0, m]; + }, + it, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = Z0(n[1][1 + ux], n, T$, _), O = p(n[1][1 + ea], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + ea, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return P0(d(n[1][1 + Dn], n), m, s, function(n0) { + return [ + 0, + a, + [0, n0] + ]; + }); + case 1: + var _ = f[1]; + return P0(d(n[1][1 + jn], n), _, s, function(n0) { + return [ + 0, + a, + [1, n0] + ]; + }); + case 2: + var S = f[1]; + return P0(d(n[1][1 + On], n), S, s, function(n0) { + return [ + 0, + a, + [2, n0] + ]; + }); + case 3: + var O = f[1]; + return P0(d(n[1][1 + xa], n), O, s, function(n0) { + return [ + 0, + a, + [3, n0] + ]; + }); + default: + var F = f[1]; + return P0(d(n[1][1 + ta], n), F, s, function(n0) { + return [ + 0, + a, + [4, n0] + ]; + }); + } + }, + Dn, + function(n, s) { + var f = s[4], a = s[1], m = pr(d(n[1][1 + ra], n), a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + s[2], + s[3], + _ + ]; + }, + jn, + function(n, s) { + var f = s[4], a = s[1], m = pr(d(n[1][1 + Fe], n), a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + s[2], + s[3], + _ + ]; + }, + On, + function(n, s) { + var f = s[4], a = s[1]; + if (a[0] === 0) var m = a[1], _ = d(n[1][1 + he], n), F = P0(function(l0) { + return pr(_, l0); + }, m, a, function(l0) { + return [0, l0]; + }); + else var S = a[1], O = d(n[1][1 + wt], n), F = P0(function(l0) { + return pr(O, l0); + }, S, a, function(l0) { + return [1, l0]; + }); + var n0 = p(n[1][1 + G], n, f); + return a === F && f === n0 ? s : [ + 0, + F, + s[2], + s[3], + n0 + ]; + }, + xa, + function(n, s) { + var f = s[3], a = s[1], m = pr(d(n[1][1 + he], n), a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + s[2], + _ + ]; + }, + ta, + function(n, s) { + var f = s[4], a = s[1], m = pr(d(n[1][1 + Me], n), a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + s[2], + s[3], + _ + ]; + }, + he, + function(n, s) { + var f = s[2][1], a = s[1], m = p(n[1][1 + T2], n, f); + return f === m ? s : [ + 0, + a, + [0, m] + ]; + }, + ra, + function(n, s) { + var f = s[2], a = f[1], m = f[2], _ = s[1], S = p(n[1][1 + T2], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + S, + m + ] + ]; + }, + Fe, + function(n, s) { + var f = s[2], a = f[1], m = f[2], _ = s[1], S = p(n[1][1 + T2], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + S, + m + ] + ]; + }, + wt, + function(n, s) { + var f = s[2], a = f[1], m = f[2], _ = s[1], S = p(n[1][1 + T2], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + S, + m + ] + ]; + }, + Me, + function(n, s) { + var f = s[2], a = f[1], m = f[2], _ = s[1], S = p(n[1][1 + T2], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + S, + m + ] + ]; + }, + T2, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + nt, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + q2], n, m), O = p(n[1][1 + G], n, a); + return S === m && O === a ? f : [ + 0, + _, + S, + O + ]; + }, + q2, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + R0], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Dx], n), a, s, function(m) { + return [1, m]; + }); + }, + Vt, + function(n, s, f) { + var a = f[5], m = f[3], _ = f[2], S = f[1], O = f[4], F = A4(d(n[1][1 + tt], n), m), n0 = Nx(d(n[1][1 + Re], n), _), l0 = Nx(d(n[1][1 + R0], n), S), F0 = p(n[1][1 + G], n, a); + return m === F && _ === n0 && S === l0 && a === F0 ? f : [ + 0, + l0, + n0, + F, + O, + F0 + ]; + }, + Wt, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = f[4], S = f[3], O = s[1], F = p(n[1][1 + jx], n, m), n0 = Nx(d(n[1][1 + jx], n), a); + return m === F && a === n0 ? s : [ + 0, + O, + [ + 0, + F, + n0, + S, + _ + ] + ]; + }, + ut, + function(n, s) { + var f = s[2], a = s[1], m = Nx(d(n[1][1 + jx], n), f); + return f === m ? s : [ + 0, + a, + m + ]; + }, + Re, + function(n, s) { + if (s[0] === 0) { + var f = s[1], a = pr(d(n[1][1 + Wt], n), f); + return f === a ? s : [0, a]; + } + var m = s[1], _ = p(n[1][1 + ut], n, m); + return m === _ ? s : [1, _]; + }, + tt, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + G], n, a); + return a === S ? f : [ + 0, + _, + m, + S + ]; + }, + Nn, + function(n, s, f) { + var a = f[3], m = f[1], _ = f[2], S = p(n[1][1 + Dx], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? f : [ + 0, + S, + _, + O + ]; + }, + ie, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + Dx], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + kx], n), a, s, function(m) { + return [1, m]; + }); + }, + Ht, + function(n, s, f) { + var a = f[5], m = f[3], _ = f[2], S = f[1], O = f[4], F = p(n[1][1 + Kt], n, S), n0 = p(n[1][1 + Dx], n, _), l0 = p(n[1][1 + R0], n, m), F0 = p(n[1][1 + G], n, a); + return S === F && _ === n0 && m === l0 && a === F0 ? f : [ + 0, + F, + n0, + l0, + O, + F0 + ]; + }, + Kt, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + Pn], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Cn], n), a, s, function(m) { + return [1, m]; + }); + }, + Pn, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + l], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + yt, + function(n, s, f) { + var a = f[5], m = f[3], _ = f[2], S = f[1], O = f[4], F = p(n[1][1 + b2], n, S), n0 = p(n[1][1 + Dx], n, _), l0 = p(n[1][1 + R0], n, m), F0 = p(n[1][1 + G], n, a); + return S === F && _ === n0 && m === l0 && a === F0 ? f : [ + 0, + F, + n0, + l0, + O, + F0 + ]; + }, + b2, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + ue], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + _t], n), a, s, function(m) { + return [1, m]; + }); + }, + ue, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + l], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + me, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = Nx(d(n[1][1 + r1], n), O), n0 = Nx(d(n[1][1 + b], n), S), l0 = Nx(d(n[1][1 + Dx], n), _), F0 = p(n[1][1 + R0], n, m), W0 = p(n[1][1 + G], n, a); + return O === F && S === n0 && _ === l0 && m === F0 && a === W0 ? f : [ + 0, + F, + n0, + l0, + F0, + W0 + ]; + }, + r1, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + Jt], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Dx], n), a, s, function(m) { + return [1, m]; + }); + }, + Jt, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + l], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + De, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = f[3], S = s[1], O = p(n[1][1 + o0], n, a), F = Nx(d(n[1][1 + jx], n), m); + return O === a && F === m ? s : [ + 0, + S, + [ + 0, + F, + O, + _ + ] + ]; + }, + x1, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + De], n, m), O = p(n[1][1 + G], n, a); + return S === m && O === a ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + s1, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + u0], n, m), O = p(n[1][1 + G], n, a); + return S === m && O === a ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + Ur, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + o0], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + W], n), a, s, function(m) { + return [1, m]; + }); + }, + Wr, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = _[2], O = S[4], F = S[3], n0 = S[2], l0 = S[1], F0 = f[1], W0 = f[5], Tx = _[1], Ax = Nx(p(n[1][1 + q], n, 10), F0), _r = Nx(d(n[1][1 + s1], n), l0), Lr = pr(d(n[1][1 + De], n), n0), Xr = Nx(d(n[1][1 + x1], n), F), _1 = p(n[1][1 + Ur], n, m), Hx = p(n[1][1 + G], n, a), x2 = p(n[1][1 + G], n, O); + return Lr === n0 && Xr === F && _1 === m && Ax === F0 && Hx === a && x2 === O && _r === l0 ? f : [ + 0, + Ax, + [ + 0, + Tx, + [ + 0, + _r, + Lr, + Xr, + x2 + ] + ], + _1, + Hx, + W0 + ]; + }, + Kl, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + c1, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + o0], n), f, s, function(_) { + return [0, _]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + Ix], n), a, s, function(_) { + return [1, _]; + }); + default: + var m = s[1]; + return P0(d(n[1][1 + vx], n), m, s, function(_) { + return [2, _]; + }); + } + }, + Ix, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + Wr], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + vx, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + Wr], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + Fr, + function(n, s) { + var f = s[2], a = f[8], m = f[7], _ = f[2], S = f[1], O = f[6], F = f[5], n0 = f[4], l0 = f[3], F0 = s[1], W0 = p(n[1][1 + Y2], n, S), Tx = p(n[1][1 + c1], n, _), Ax = p(n[1][1 + i], n, m), _r = p(n[1][1 + G], n, a); + return W0 === S && Tx === _ && Ax === m && _r === a ? s : [ + 0, + F0, + [ + 0, + W0, + Tx, + l0, + n0, + F, + O, + Ax, + _r + ] + ]; + }, + f1, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + o0], n, m), O = p(n[1][1 + G], n, a); + return S === m && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + kt, + function(n, s) { + var f = s[2], a = f[6], m = f[5], _ = f[3], S = f[2], O = f[4], F = f[1], n0 = s[1], l0 = p(n[1][1 + o0], n, S), F0 = p(n[1][1 + o0], n, _), W0 = p(n[1][1 + i], n, m), Tx = p(n[1][1 + G], n, a); + return l0 === S && F0 === _ && W0 === m && Tx === a ? s : [ + 0, + n0, + [ + 0, + F, + l0, + F0, + O, + W0, + Tx + ] + ]; + }, + je, + function(n, s) { + var f = s[2], a = f[6], m = f[2], _ = f[1], S = f[5], O = f[4], F = f[3], n0 = s[1], l0 = p(n[1][1 + jx], n, _), F0 = p(n[1][1 + o0], n, m), W0 = p(n[1][1 + G], n, a); + return _ === l0 && m === F0 && a === W0 ? s : [ + 0, + n0, + [ + 0, + l0, + F0, + F, + O, + S, + W0 + ] + ]; + }, + xo, + function(n, s) { + var f = s[2], a = f[3], m = f[1], _ = m[2], S = m[1], O = f[2], F = s[1], n0 = Z0(n[1][1 + Wr], n, S, _), l0 = p(n[1][1 + G], n, a); + return _ === n0 && a === l0 ? s : [ + 0, + F, + [ + 0, + [ + 0, + S, + n0 + ], + O, + l0 + ] + ]; + }, + mx, + function(n, s) { + var f = s[2], a = f[6], m = f[4], _ = f[3], S = f[2], O = f[1], F = f[5], n0 = s[1], l0 = Z0(n[1][1 + X], n, 12, O), F0 = p(n[1][1 + o0], n, S), W0 = p(n[1][1 + o0], n, _), Tx = p(n[1][1 + i], n, m), Ax = p(n[1][1 + G], n, a); + return l0 === O && F0 === S && W0 === _ && Tx === m && Ax === a ? s : [ + 0, + n0, + [ + 0, + l0, + F0, + W0, + Tx, + F, + Ax + ] + ]; + }, + Vx, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = pr(d(n[1][1 + Cr], n), m), F = p(n[1][1 + G], n, a); + return O === m && a === F ? f : [ + 0, + S, + _, + O, + F + ]; + }, + Cr, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + Fr], n), f, s, function(F) { + return [0, F]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + f1], n), a, s, function(F) { + return [1, F]; + }); + case 2: + var m = s[1]; + return P0(d(n[1][1 + kt], n), m, s, function(F) { + return [2, F]; + }); + case 3: + var _ = s[1]; + return P0(d(n[1][1 + xo], n), _, s, function(F) { + return [3, F]; + }); + case 4: + var S = s[1]; + return P0(d(n[1][1 + je], n), S, s, function(F) { + return [4, F]; + }); + default: + var O = s[1]; + return P0(d(n[1][1 + mx], n), O, s, function(F) { + return [5, F]; + }); + } + }, + _0, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = d(n[1][1 + u1], n), O = pr(function(l0) { + return K1(S, l0); + }, m), F = K1(d(n[1][1 + Vx], n), _), n0 = p(n[1][1 + G], n, a); + return O === m && F === _ && a === n0 ? f : [ + 0, + F, + O, + n0 + ]; + }, + j1, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + B], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + p1], n), a, s, function(m) { + return [1, m]; + }); + }, + p1, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + j1], n, m), O = p(n[1][1 + L2], n, a); + return S === m && O === a ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + L2, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + c, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + G], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + m, + S + ] + ]; + }, + i, + function(n, s) { + return Nx(d(n[1][1 + c], n), s); + }, + b0, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + G], n, f); + return f === m ? s : [ + 0, + a, + m + ]; + }, + t0, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + o0], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + q, + function(n, s, f) { + var a = f[2], m = a[2], _ = a[1], S = f[1], O = pr(p(n[1][1 + X], n, s), _), F = p(n[1][1 + G], n, m); + return O === _ && F === m ? f : [ + 0, + S, + [ + 0, + O, + F + ] + ]; + }, + X, + function(n, s, f) { + var a = f[2], m = a[6], _ = a[5], S = a[4], O = a[2], F = a[1], n0 = a[3], l0 = f[1], F0 = p(n[1][1 + i0], n, O), W0 = p(n[1][1 + i], n, S), Tx = Nx(d(n[1][1 + o0], n), _), Ax = Nx(d(n[1][1 + b0], n), m), _r = p(n[1][1 + Ln], n, F); + return _r === F && F0 === O && W0 === S && Tx === _ && Ax === m ? f : [ + 0, + l0, + [ + 0, + _r, + F0, + n0, + W0, + Tx, + Ax + ] + ]; + }, + u1, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + j1], n, _), O = Nx(d(n[1][1 + t0], n), m), F = p(n[1][1 + G], n, a); + return S === _ && O === m && F === a ? f : [ + 0, + S, + O, + F + ]; + }, + wx, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + o0], n, _), O = p(n[1][1 + o0], n, m), F = p(n[1][1 + G], n, a); + return S === _ && O === m && F === a ? f : [ + 0, + S, + O, + F + ]; + }, + Y, + function(n, s, f) { + var a = f[1], m = f[2], _ = Z0(n[1][1 + wx], n, s, a); + return _ === a ? f : [ + 0, + _, + m + ]; + }, + xx, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + G], n, a); + return a === S ? f : [ + 0, + _, + m, + S + ]; + }, + ke, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + G], n, a); + return a === S ? f : [ + 0, + _, + m, + S + ]; + }, + Qt, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + G], n, a); + return a === S ? f : [ + 0, + _, + m, + S + ]; + }, + i6, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + G], n, a); + return a === _ ? f : [ + 0, + m, + _ + ]; + }, + Js, + function(n, s, f) { + return p(n[1][1 + G], n, f); + }, + g0, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + G], n, a); + return a === O ? f : [ + 0, + S, + _, + m, + O + ]; + }, + Ks, + function(n, s, f) { + var a = f[6], m = f[5], _ = f[4], S = f[3], O = f[2], F = f[1]; + return a === p(n[1][1 + G], n, a) ? f : [ + 0, + F, + O, + S, + _, + m, + a + ]; + }, + ro, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + o0], n, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + Zl, + function(n, s) { + var f = s[5], a = s[4], m = s[3], _ = s[2], S = s[1], O = p(n[1][1 + o0], n, S), F = p(n[1][1 + o0], n, _), n0 = p(n[1][1 + o0], n, m), l0 = p(n[1][1 + o0], n, a), F0 = p(n[1][1 + G], n, f); + return S === O && _ === F && m === n0 && a === l0 && f === F0 ? s : [ + 0, + O, + F, + n0, + l0, + F0 + ]; + }, + nx, + function(n, s) { + var f = s[2], a = s[1], m = Z0(n[1][1 + X], n, 11, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + T, + function(n, s) { + var f = s[3], a = s[2], m = s[1], _ = p(n[1][1 + R], n, m), S = Nx(d(n[1][1 + t0], n), a), O = p(n[1][1 + G], n, f); + return m === _ && Ro(a, S) && f === O ? s : [ + 0, + _, + S, + O + ]; + }, + R, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + P], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + I], n), a, s, function(m) { + return [1, m]; + }); + }, + P, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + N, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + I, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + R], n, m), O = p(n[1][1 + N], n, a); + return S === m && O === a ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + D5, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + o0], n, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + M, + function(n, s) { + var f = s[3], a = s[2], m = s[4], _ = s[1], S = p(n[1][1 + o0], n, a), O = p(n[1][1 + G], n, f); + return a === S && f === O ? s : [ + 0, + _, + S, + O, + m + ]; + }, + tr, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + o0], n, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + S0, + function(n, s) { + var f = s[3], a = s[1], m = s[2], _ = pr(d(n[1][1 + m0], n), a), S = p(n[1][1 + G], n, f); + return a === _ && f === S ? s : [ + 0, + _, + m, + S + ]; + }, + m0, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return P0(d(n[1][1 + o0], n), m, s, function(O) { + return [ + 0, + a, + [0, O] + ]; + }); + case 1: + var _ = f[1]; + return P0(d(n[1][1 + v0], n), _, s, function(O) { + return [ + 0, + a, + [1, O] + ]; + }); + default: + var S = f[1]; + return P0(d(n[1][1 + s0], n), S, s, function(O) { + return [ + 0, + a, + [2, O] + ]; + }); + } + }, + v0, + function(n, s) { + var f = s[3], a = s[2], m = s[4], _ = s[1], S = p(n[1][1 + o0], n, a), O = p(n[1][1 + i], n, f); + return S === a && O === f ? s : [ + 0, + _, + S, + O, + m + ]; + }, + s0, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + o0], n, f); + return m === f ? s : [ + 0, + a, + m + ]; + }, + kp, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + o0], n, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + h, + function(n, s, f) { + var a = f[2], m = f[1], _ = m[3], S = m[2], O = m[1], F = p(n[1][1 + o0], n, O), n0 = p(n[1][1 + o0], n, S), l0 = pr(d(n[1][1 + o0], n), _), F0 = p(n[1][1 + G], n, a); + return F === O && n0 === S && l0 === _ && F0 === a ? f : [ + 0, + [ + 0, + F, + n0, + l0 + ], + F0 + ]; + }, + f0, + function(n, s, f) { + var a = f[2], m = f[1], _ = m[3], S = m[2], O = m[1], F = p(n[1][1 + o0], n, O), n0 = p(n[1][1 + o0], n, S), l0 = pr(d(n[1][1 + o0], n), _), F0 = p(n[1][1 + G], n, a); + return F === O && n0 === S && l0 === _ && F0 === a ? f : [ + 0, + [ + 0, + F, + n0, + l0 + ], + F0 + ]; + }, + o0, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return P0(d(n[1][1 + G], n), m, s, function(Ex) { + return [ + 0, + a, + [0, Ex] + ]; + }); + case 1: + var _ = f[1]; + return P0(d(n[1][1 + G], n), _, s, function(Ex) { + return [ + 0, + a, + [1, Ex] + ]; + }); + case 2: + var S = f[1]; + return P0(d(n[1][1 + G], n), S, s, function(Ex) { + return [ + 0, + a, + [2, Ex] + ]; + }); + case 3: + var O = f[1]; + return P0(d(n[1][1 + G], n), O, s, function(Ex) { + return [ + 0, + a, + [3, Ex] + ]; + }); + case 4: + var F = f[1]; + return P0(d(n[1][1 + G], n), F, s, function(Ex) { + return [ + 0, + a, + [4, Ex] + ]; + }); + case 5: + var n0 = f[1]; + return P0(d(n[1][1 + G], n), n0, s, function(Ex) { + return [ + 0, + a, + [5, Ex] + ]; + }); + case 6: + var l0 = f[1]; + return P0(d(n[1][1 + G], n), l0, s, function(Ex) { + return [ + 0, + a, + [6, Ex] + ]; + }); + case 7: + var F0 = f[1]; + return P0(d(n[1][1 + G], n), F0, s, function(Ex) { + return [ + 0, + a, + [7, Ex] + ]; + }); + case 8: + var W0 = f[1], Tx = f[2]; + return P0(d(n[1][1 + G], n), Tx, s, function(Ex) { + return [ + 0, + a, + [ + 8, + W0, + Ex + ] + ]; + }); + case 9: + var Ax = f[1]; + return P0(d(n[1][1 + G], n), Ax, s, function(Ex) { + return [ + 0, + a, + [9, Ex] + ]; + }); + case 10: + var _r = f[1]; + return P0(d(n[1][1 + G], n), _r, s, function(Ex) { + return [ + 0, + a, + [10, Ex] + ]; + }); + case 11: + var Lr = f[1]; + return P0(d(n[1][1 + ro], n), Lr, s, function(Ex) { + return [ + 0, + a, + [11, Ex] + ]; + }); + case 12: + var Xr = f[1]; + return O0(d(n[1][1 + Wr], n), a, Xr, s, function(Ex) { + return [ + 0, + a, + [12, Ex] + ]; + }); + case 13: + var _1 = f[1]; + return O0(d(n[1][1 + Fn], n), a, _1, s, function(Ex) { + return [ + 0, + a, + [13, Ex] + ]; + }); + case 14: + var Hx = f[1]; + return O0(d(n[1][1 + Vx], n), a, Hx, s, function(Ex) { + return [ + 0, + a, + [14, Ex] + ]; + }); + case 15: + var x2 = f[1]; + return O0(d(n[1][1 + _0], n), a, x2, s, function(Ex) { + return [ + 0, + a, + [15, Ex] + ]; + }); + case 16: + var fe = f[1]; + return P0(d(n[1][1 + kp], n), fe, s, function(Ex) { + return [ + 0, + a, + [16, Ex] + ]; + }); + case 17: + var ye = f[1]; + return P0(d(n[1][1 + Zl], n), ye, s, function(Ex) { + return [ + 0, + a, + [17, Ex] + ]; + }); + case 18: + var K2 = f[1]; + return P0(d(n[1][1 + nx], n), K2, s, function(Ex) { + return [ + 0, + a, + [18, Ex] + ]; + }); + case 19: + var Be = f[1]; + return O0(d(n[1][1 + u1], n), a, Be, s, function(Ex) { + return [ + 0, + a, + [19, Ex] + ]; + }); + case 20: + var _e = f[1]; + return O0(d(n[1][1 + wx], n), a, _e, s, function(Ex) { + return [ + 0, + a, + [20, Ex] + ]; + }); + case 21: + var we = f[1]; + return O0(d(n[1][1 + Y], n), a, we, s, function(Ex) { + return [ + 0, + a, + [21, Ex] + ]; + }); + case 22: + var E2 = f[1]; + return O0(d(n[1][1 + h], n), a, E2, s, function(Ex) { + return [ + 0, + a, + [22, Ex] + ]; + }); + case 23: + var gt = f[1]; + return O0(d(n[1][1 + f0], n), a, gt, s, function(Ex) { + return [ + 0, + a, + [23, Ex] + ]; + }); + case 24: + var ce = f[1]; + return P0(d(n[1][1 + T], n), ce, s, function(Ex) { + return [ + 0, + a, + [24, Ex] + ]; + }); + case 25: + var Zt = f[1]; + return P0(d(n[1][1 + D5], n), Zt, s, function(Ex) { + return [ + 0, + a, + [25, Ex] + ]; + }); + case 26: + var va = f[1]; + return P0(d(n[1][1 + M], n), va, s, function(Ex) { + return [ + 0, + a, + [26, Ex] + ]; + }); + case 27: + var la = f[1]; + return P0(d(n[1][1 + tr], n), la, s, function(Ex) { + return [ + 0, + a, + [27, Ex] + ]; + }); + case 28: + var pa = f[1]; + return P0(d(n[1][1 + S0], n), pa, s, function(Ex) { + return [ + 0, + a, + [28, Ex] + ]; + }); + case 29: + var ka = f[1]; + return O0(d(n[1][1 + xx], n), a, ka, s, function(Ex) { + return [ + 0, + a, + [29, Ex] + ]; + }); + case 30: + var ma = f[1]; + return O0(d(n[1][1 + ke], n), a, ma, s, function(Ex) { + return [ + 0, + a, + [30, Ex] + ]; + }); + case 31: + var Ev = f[1]; + return O0(d(n[1][1 + Qt], n), a, Ev, s, function(Ex) { + return [ + 0, + a, + [31, Ex] + ]; + }); + case 32: + var q3 = f[1]; + return O0(d(n[1][1 + i6], n), a, q3, s, function(Ex) { + return [ + 0, + a, + [32, Ex] + ]; + }); + case 33: + var B3 = f[1]; + return P0(d(n[1][1 + G], n), B3, s, function(Ex) { + return [ + 0, + a, + [33, Ex] + ]; + }); + case 34: + var U3 = f[1]; + return P0(d(n[1][1 + G], n), U3, s, function(Ex) { + return [ + 0, + a, + [34, Ex] + ]; + }); + default: + var X3 = f[1]; + return P0(d(n[1][1 + G], n), X3, s, function(Ex) { + return [ + 0, + a, + [35, Ex] + ]; + }); + } + }, + u0, + function(n, s) { + var f = s[1], a = s[2]; + return P0(d(n[1][1 + o0], n), a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + i0, + function(n, s) { + if (s[0] === 0) return s; + var f = s[1]; + return P0(d(n[1][1 + u0], n), f, s, function(a) { + return [1, a]; + }); + }, + ia, + function(n, s) { + if (s[0] === 0) return s; + var f = s[2], a = s[1], m = p(n[1][1 + M], n, f); + return m === f ? s : [ + 1, + a, + m + ]; + }, + rt, + function(n, s, f) { + return Z0(n[1][1 + g2], n, s, f); + }, + J2, + function(n, s, f) { + return Z0(n[1][1 + i1], n, s, f); + }, + i1, + function(n, s, f) { + return Z0(n[1][1 + g2], n, s, f); + }, + g2, + function(n, s, f) { + var a = f[10], m = f[9], _ = f[8], S = f[7], O = f[3], F = f[2], n0 = f[1], l0 = f[11], F0 = f[6], W0 = f[5], Tx = f[4], Ax = Nx(d(n[1][1 + V1], n), n0), _r = Nx(p(n[1][1 + q], n, 1), m), Lr = p(n[1][1 + X1], n, F), Xr = p(n[1][1 + Ir], n, _), _1 = p(n[1][1 + dt], n, O), Hx = Nx(d(n[1][1 + V], n), S), x2 = p(n[1][1 + G], n, a); + return n0 === Ax && F === Lr && O === _1 && S === Hx && _ === Xr && m === _r && a === x2 ? f : [ + 0, + Ax, + Lr, + _1, + Tx, + W0, + F0, + Hx, + Xr, + _r, + x2, + l0 + ]; + }, + X1, + function(n, s) { + var f = s[2], a = f[4], m = f[3], _ = f[2], S = f[1], O = s[1], F = pr(d(n[1][1 + w2], n), _), n0 = Nx(d(n[1][1 + D1], n), m), l0 = Nx(d(n[1][1 + yr], n), S), F0 = p(n[1][1 + G], n, a); + return _ === F && m === n0 && a === F0 && S === l0 ? s : [ + 0, + O, + [ + 0, + l0, + F, + n0, + F0 + ] + ]; + }, + yr, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + u0], n, m), O = p(n[1][1 + G], n, a); + return S === m && O === a ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + w2, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + T1], n, m), O = p(n[1][1 + Le], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + Ir, + function(n, s) { + switch (s[0]) { + case 0: return s; + case 1: + var f = s[1]; + return P0(d(n[1][1 + u0], n), f, s, function(m) { + return [1, m]; + }); + default: + var a = s[1]; + return P0(d(n[1][1 + x0], n), a, s, function(m) { + return [2, m]; + }); + } + }, + dt, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + et], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + q5], n), a, s, function(m) { + return [1, m]; + }); + }, + et, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + Mn], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + q5, + function(n, s) { + return p(n[1][1 + Dx], n, s); + }, + V1, + function(n, s) { + return Z0(n[1][1 + ux], n, E$, s); + }, + jx, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + G], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + m, + S + ] + ]; + }, + z, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + B, + function(n, s) { + return p(n[1][1 + z], n, s); + }, + Ln, + function(n, s) { + return p(n[1][1 + z], n, s); + }, + H0, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = p(n[1][1 + Ln], n, O), n0 = Nx(p(n[1][1 + q], n, 6), S), l0 = d(n[1][1 + u1], n), F0 = pr(function(Ax) { + return K1(l0, Ax); + }, _), W0 = K1(d(n[1][1 + Vx], n), m), Tx = p(n[1][1 + G], n, a); + return F === O && n0 === S && F0 === _ && W0 === m && Tx === a ? f : [ + 0, + F, + n0, + F0, + W0, + Tx + ]; + }, + N0, + function(n, s, f) { + return Z0(n[1][1 + H0], n, s, f); + }, + Zx, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + G], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + m, + S + ] + ]; + }, + lo, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + Dx], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + ir, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + or, + function(n, s, f) { + return p(n[1][1 + R0], n, f); + }, + Mr, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + R0], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + fr, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + b], n, S), F = Z0(n[1][1 + or], n, m !== 0 ? 1 : 0, _), n0 = d(n[1][1 + Mr], n), l0 = Nx(function(W0) { + return K1(n0, W0); + }, m), F0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === l0 && a === F0 ? f : [ + 0, + O, + F, + l0, + F0 + ]; + }, + $x, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = K1(d(n[1][1 + er], n), S), n0 = Nx(p(n[1][1 + Sx], n, O), m), l0 = Nx(function(W0) { + var Tx = W0[1], Ax = W0[2], _r = Z0(n[1][1 + ur], n, O, Tx); + return _r === Tx ? W0 : [ + 0, + _r, + Ax + ]; + }, _), F0 = p(n[1][1 + G], n, a); + return S === F && m === n0 && _ === l0 && a === F0 ? f : [ + 0, + O, + F, + l0, + n0, + F0 + ]; + }, + er, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + G], n, a); + return a === S ? f : [ + 0, + _, + m, + S + ]; + }, + Sx, + function(n, s, f) { + if (f[0] === 0) { + var a = f[1], m = pr(p(n[1][1 + Xx], n, s), a); + return a === m ? f : [0, m]; + } + var _ = f[1], S = _[1], O = _[2]; + return O0(p(n[1][1 + Lx], n, s), S, O, f, function(F) { + return [1, [ + 0, + S, + F + ]]; + }); + }, + d0, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + Xx, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1]; + x: { + r: { + var S = f[4]; + if (s) { + e: { + if (_) switch (_[1]) { + case 0: break r; + case 1: break e; + } + if (2 <= s) { + var O = 0, F = 0; + break x; + } + } + var O = 1, F = 0; + break x; + } + } + var O = 1, F = 1; + } + var n0 = m ? p(n[1][1 + d0], n, a) : F ? p(n[1][1 + Ln], n, a) : Z0(n[1][1 + ux], n, S$, a); + if (m) var l0 = m[1], F0 = O ? d(n[1][1 + Ln], n) : p(n[1][1 + ux], n, A$), W0 = P0(F0, l0, m, function(Tx) { + return [0, Tx]; + }); + else var W0 = 0; + return m === W0 && a === n0 ? f : [ + 0, + _, + W0, + n0, + S + ]; + }, + ur, + function(n, s, f) { + return d(2 <= s ? p(n[1][1 + ux], n, I$) : d(n[1][1 + Ln], n), f); + }, + Lx, + function(n, s, f, a) { + return d(2 <= s ? p(n[1][1 + ux], n, P$) : d(n[1][1 + Ln], n), a); + }, + sp, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + R5], n, S), F = Nx(d(n[1][1 + F5], n), _), n0 = p(n[1][1 + ap], n, m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + ip, + function(n, s, f) { + var a = f[4], m = f[3], _ = p(n[1][1 + ap], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + f[1], + f[2], + _, + S + ]; + }, + R5, + function(n, s) { + var f = s[2], a = f[4], m = f[2], _ = f[1], S = f[3], O = s[1], F = p(n[1][1 + Wl], n, _), n0 = Nx(d(n[1][1 + Tv], n), m), l0 = pr(d(n[1][1 + tp], n), a); + return _ === F && m === n0 && a === l0 ? s : [ + 0, + O, + [ + 0, + F, + n0, + S, + l0 + ] + ]; + }, + F5, + function(n, s) { + var f = s[2][1], a = s[1], m = p(n[1][1 + Wl], n, f); + return f === m ? s : [ + 0, + a, + [0, m] + ]; + }, + tp, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + j], n), f, s, function(S) { + return [0, S]; + }); + } + var a = s[1], m = a[1], _ = a[2]; + return O0(d(n[1][1 + ep], n), m, _, s, function(S) { + return [1, [ + 0, + m, + S + ]]; + }); + }, + ep, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + j, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + A], n, m), O = Nx(d(n[1][1 + lp], n), a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + A, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + U], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Vl], n), a, s, function(m) { + return [1, m]; + }); + }, + U, + function(n, s) { + return p(n[1][1 + zt], n, s); + }, + Vl, + function(n, s) { + return p(n[1][1 + Hl], n, s); + }, + lp, + function(n, s) { + if (s[0] === 0) { + var f = s[1], a = f[1], m = f[2]; + return O0(d(n[1][1 + op], n), a, m, s, function(F) { + return [0, [ + 0, + a, + F + ]]; + }); + } + var _ = s[1], S = _[1], O = _[2]; + return O0(d(n[1][1 + vp], n), S, O, s, function(F) { + return [1, [ + 0, + S, + F + ]]; + }); + }, + vp, + function(n, s, f) { + return Z0(n[1][1 + cv], n, s, f); + }, + op, + function(n, s, f) { + return Z0(n[1][1 + xx], n, s, f); + }, + ap, + function(n, s) { + var f = s[2], a = s[1], m = pr(d(n[1][1 + M5], n), f); + return f === m ? s : [ + 0, + a, + m + ]; + }, + M5, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return O0(d(n[1][1 + sp], n), a, m, s, function(F) { + return [ + 0, + a, + [0, F] + ]; + }); + case 1: + var _ = f[1]; + return O0(d(n[1][1 + ip], n), a, _, s, function(F) { + return [ + 0, + a, + [1, F] + ]; + }); + case 2: + var S = f[1]; + return O0(d(n[1][1 + cv], n), a, S, s, function(F) { + return [ + 0, + a, + [2, F] + ]; + }); + case 3: + var O = f[1]; + return P0(d(n[1][1 + rp], n), O, s, function(F) { + return [ + 0, + a, + [3, F] + ]; + }); + default: return s; + } + }, + cv, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + G], n, a); + if (!m) return a === _ ? f : [ + 0, + 0, + _ + ]; + var S = m[1], O = p(n[1][1 + Dx], n, S); + return S === O && a === _ ? f : [ + 0, + [0, O], + _ + ]; + }, + rp, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + Dx], n, a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + Wl, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + sv], n), f, s, function(_) { + return [0, _]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + fp], n), a, s, function(_) { + return [1, _]; + }); + default: + var m = s[1]; + return P0(d(n[1][1 + cp], n), m, s, function(_) { + return [2, _]; + }); + } + }, + sv, + function(n, s) { + return p(n[1][1 + zt], n, s); + }, + fp, + function(n, s) { + return p(n[1][1 + Hl], n, s); + }, + cp, + function(n, s) { + return p(n[1][1 + up], n, s); + }, + Hl, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + zt], n, m), O = p(n[1][1 + zt], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + up, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + np], n, m), O = p(n[1][1 + zt], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + np, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + so], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + up], n), a, s, function(m) { + return [1, m]; + }); + }, + so, + function(n, s) { + return p(n[1][1 + sv], n, s); + }, + zt, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + G], n, a); + return a === S ? s : [ + 0, + _, + [ + 0, + m, + S + ] + ]; + }, + fv, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Kl], n, _), O = p(n[1][1 + R0], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + co, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + Dx], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + f[1], + S, + O, + F + ]; + }, + iv, + function(n, s, f, a) { + var m = a[4], _ = a[2], S = a[1], O = a[3], F = p(n[1][1 + Dx], n, S), n0 = pr(p(n[1][1 + z2], n, f), _), l0 = p(n[1][1 + G], n, m); + return S === F && _ === n0 && m === l0 ? a : [ + 0, + F, + n0, + O, + l0 + ]; + }, + z2, + function(n, s, f) { + var a = f[2], m = a[4], _ = a[3], S = a[2], O = a[1], F = a[6], n0 = a[5], l0 = f[1], F0 = p(n[1][1 + ht], n, O), W0 = d(s, S), Tx = Nx(d(n[1][1 + Dx], n), _), Ax = p(n[1][1 + G], n, m); + return O === F0 && S === W0 && _ === Tx && m === Ax ? f : [ + 0, + l0, + [ + 0, + F0, + W0, + Tx, + Ax, + n0, + F + ] + ]; + }, + uv, + function(n, s, f) { + var a = d(n[1][1 + Dx], n); + return c4(n[1][1 + iv], n, s, a, f); + }, + ar, + function(n, s, f) { + var a = d(n[1][1 + R0], n); + return c4(n[1][1 + iv], n, s, a, f); + }, + ht, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[1]; + return P0(d(n[1][1 + mt], n), m, s, function(Hx) { + return [ + 0, + a, + [0, Hx] + ]; + }); + case 1: + var _ = f[1]; + return O0(d(n[1][1 + ke], n), a, _, s, function(Hx) { + return [ + 0, + a, + [1, Hx] + ]; + }); + case 2: + var S = f[1]; + return O0(d(n[1][1 + Qt], n), a, S, s, function(Hx) { + return [ + 0, + a, + [2, Hx] + ]; + }); + case 3: + var O = f[1]; + return O0(d(n[1][1 + xx], n), a, O, s, function(Hx) { + return [ + 0, + a, + [3, Hx] + ]; + }); + case 4: + var F = f[1]; + return O0(d(n[1][1 + i6], n), a, F, s, function(Hx) { + return [ + 0, + a, + [4, Hx] + ]; + }); + case 5: + var n0 = f[1]; + return P0(d(n[1][1 + G], n), n0, s, function(Hx) { + return [ + 0, + a, + [5, Hx] + ]; + }); + case 6: + var l0 = f[1]; + return P0(d(n[1][1 + Q1], n), l0, s, function(Hx) { + return [ + 0, + a, + [6, Hx] + ]; + }); + case 7: + var F0 = f[1]; + return O0(d(n[1][1 + Z1], n), a, F0, s, function(Hx) { + return [ + 0, + a, + [7, Hx] + ]; + }); + case 8: + var W0 = f[1]; + return P0(d(n[1][1 + jx], n), W0, s, function(Hx) { + return [ + 0, + a, + [8, Hx] + ]; + }); + case 9: + var Tx = f[1]; + return P0(d(n[1][1 + Qs], n), Tx, s, function(Hx) { + return [ + 0, + a, + [9, Hx] + ]; + }); + case 10: + var Ax = f[1]; + return O0(d(n[1][1 + $s], n), a, Ax, s, function(Hx) { + return [ + 0, + a, + [10, Hx] + ]; + }); + case 11: + var _r = f[1]; + return P0(d(n[1][1 + fo], n), _r, s, function(Hx) { + return [ + 0, + a, + [11, Hx] + ]; + }); + case 12: + var Lr = f[1]; + return P0(d(n[1][1 + io], n), Lr, s, function(Hx) { + return [ + 0, + a, + [12, Hx] + ]; + }); + case 13: + var Xr = f[1]; + return P0(d(n[1][1 + E3], n), Xr, s, function(Hx) { + return [ + 0, + a, + [13, Hx] + ]; + }); + default: + var _1 = f[1]; + return P0(d(n[1][1 + In], n), _1, s, function(Hx) { + return [ + 0, + a, + [14, Hx] + ]; + }); + } + }, + Q1, + function(n, s) { + var f = s[3], a = s[2], m = a[1], _ = s[1], S = a[2], O = O0(d(n[1][1 + to], n), m, S, a, function(n0) { + return [ + 0, + m, + n0 + ]; + }), F = p(n[1][1 + G], n, f); + return a === O && f === F ? s : [ + 0, + _, + O, + F + ]; + }, + to, + function(n, s, f) { + if (f[0] === 0) { + var a = f[1]; + return O0(d(n[1][1 + ke], n), s, a, f, function(_) { + return [0, _]; + }); + } + var m = f[1]; + return O0(d(n[1][1 + Qt], n), s, m, f, function(_) { + return [1, _]; + }); + }, + Qs, + function(n, s) { + var f = s[2], a = f[3], m = f[2], _ = f[1], S = s[1], O = p(n[1][1 + tv], n, _), F = p(n[1][1 + uo], n, m), n0 = p(n[1][1 + G], n, a); + return _ === O && m === F && a === n0 ? s : [ + 0, + S, + [ + 0, + O, + F, + n0 + ] + ]; + }, + tv, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + jx], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Qs], n), a, s, function(m) { + return [1, m]; + }); + }, + uo, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1], a = f[1], m = f[2]; + return O0(d(n[1][1 + xx], n), a, m, s, function(W0) { + return [0, [ + 0, + a, + W0 + ]]; + }); + case 1: + var _ = s[1], S = _[1], O = _[2]; + return O0(d(n[1][1 + ke], n), S, O, s, function(W0) { + return [1, [ + 0, + S, + W0 + ]]; + }); + case 2: + var F = s[1], n0 = F[1], l0 = F[2]; + return O0(d(n[1][1 + Qt], n), n0, l0, s, function(W0) { + return [2, [ + 0, + n0, + W0 + ]]; + }); + default: + var F0 = s[1]; + return P0(d(n[1][1 + jx], n), F0, s, function(W0) { + return [3, W0]; + }); + } + }, + Z1, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = Z0(n[1][1 + ux], n, [0, _], m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? f : [ + 0, + _, + S, + O + ]; + }, + $s, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = pr(d(n[1][1 + An], n), _), O = A4(d(n[1][1 + no], n), m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + An, + function(n, s) { + var f = s[2], a = s[1]; + if (f[0] !== 0) { + var m = f[1], _ = p(n[1][1 + jx], n, m); + return m === _ ? s : [ + 0, + a, + [1, _] + ]; + } + var S = f[1], O = S[4], F = S[2], n0 = S[1], l0 = S[3], F0 = p(n[1][1 + S3], n, n0), W0 = p(n[1][1 + ht], n, F), Tx = p(n[1][1 + G], n, O); + return n0 === F0 && F === W0 && O === Tx ? s : [ + 0, + a, + [0, [ + 0, + F0, + W0, + l0, + Tx + ]] + ]; + }, + S3, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1], a = f[1], m = f[2]; + return O0(d(n[1][1 + xx], n), a, m, s, function(W0) { + return [0, [ + 0, + a, + W0 + ]]; + }); + case 1: + var _ = s[1], S = _[1], O = _[2]; + return O0(d(n[1][1 + ke], n), S, O, s, function(W0) { + return [1, [ + 0, + S, + W0 + ]]; + }); + case 2: + var F = s[1], n0 = F[1], l0 = F[2]; + return O0(d(n[1][1 + Qt], n), n0, l0, s, function(W0) { + return [2, [ + 0, + n0, + W0 + ]]; + }); + default: + var F0 = s[1]; + return P0(d(n[1][1 + jx], n), F0, s, function(W0) { + return [3, W0]; + }); + } + }, + fo, + function(n, s) { + var f = s[3], a = s[2], m = s[1], _ = pr(d(n[1][1 + Vs], n), m), S = A4(d(n[1][1 + no], n), a), O = p(n[1][1 + G], n, f); + return m === _ && a === S && f === O ? s : [ + 0, + _, + S, + O + ]; + }, + Vs, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + ht], n, f); + return f === m ? s : [ + 0, + a, + m + ]; + }, + io, + function(n, s) { + var f = s[3], a = s[2], m = s[1], _ = p(n[1][1 + nv], n, m), S = K1(d(n[1][1 + $s], n), a), O = p(n[1][1 + G], n, f); + return _ === m && S === a && O === f ? s : [ + 0, + _, + S, + O + ]; + }, + nv, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(d(n[1][1 + jx], n), f, s, function(m) { + return [0, m]; + }); + } + var a = s[1]; + return P0(d(n[1][1 + Qs], n), a, s, function(m) { + return [1, m]; + }); + }, + no, + function(n, s, f) { + var a = f[2], m = f[1], _ = A4(d(n[1][1 + Z1], n), m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + E3, + function(n, s) { + var f = s[2], a = s[1], m = pr(d(n[1][1 + ht], n), a), _ = p(n[1][1 + G], n, f); + return a === m && f === _ ? s : [ + 0, + m, + _ + ]; + }, + In, + function(n, s) { + var f = s[3], a = s[2], m = s[1], _ = p(n[1][1 + ht], n, m), S = p(n[1][1 + Zs], n, a), O = p(n[1][1 + G], n, f); + return m === _ && a === S && f === O ? s : [ + 0, + _, + S, + O + ]; + }, + Zs, + function(n, s) { + if (s[0] === 0) { + var f = s[1]; + return P0(p(n[1][1 + ux], n, C$), f, s, function(_) { + return [0, _]; + }); + } + var a = s[1], m = s[2]; + return O0(d(n[1][1 + Z1], n), a, m, s, function(_) { + return [ + 1, + a, + _ + ]; + }); + }, + mt, + function(n, s) { + var f = s[1], a = s[2], m = p(n[1][1 + G], n, f); + return f === m ? s : [ + 0, + m, + a + ]; + }, + Ws, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + Sn], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + w, + function(n, s, f) { + var a = f[1], m = Z0(n[1][1 + Ws], n, s, a); + return a === m ? f : [ + 0, + m, + f[2], + f[3] + ]; + }, + Sn, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + g1], n), f, s, function(_) { + return [0, _]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + Hs], n), a, s, function(_) { + return [1, _]; + }); + default: + var m = s[1]; + return P0(d(n[1][1 + En], n), m, s, function(_) { + return [2, _]; + }); + } + }, + g1, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + Hs, + function(n, s) { + return p(n[1][1 + Zx], n, s); + }, + En, + function(n, s) { + return p(n[1][1 + Dx], n, s); + }, + M2, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + jx], n, _), O = p(n[1][1 + jx], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + eo, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + Dx], n, S), F = Nx(d(n[1][1 + Tv], n), _), n0 = Nx(d(n[1][1 + mp], n), m), l0 = p(n[1][1 + G], n, a); + return S === O && _ === F && m === n0 && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + Tn, + function(n, s, f) { + var a = f[2], m = f[1], _ = pr(function(O) { + if (O[0] === 0) { + var F = O[1], n0 = p(n[1][1 + Zr], n, F); + return F === n0 ? O : [0, n0]; + } + var l0 = O[1], F0 = p(n[1][1 + lx], n, l0); + return l0 === F0 ? O : [1, F0]; + }, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + Zr, + function(n, s) { + var f = s[2], a = s[1]; + switch (f[0]) { + case 0: + var m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + Y2], n, S), F = p(n[1][1 + Dx], n, _); + x: if (m) { + if (O[0] === 3) { + var n0 = F[2]; + if (n0[0] === 10) { + var F0 = Sr(O[1][2][1], n0[1][2][1]); + break x; + } + } + var F0 = (S === O ? 1 : 0) && (_ === F ? 1 : 0); + } else var F0 = m; + return S === O && _ === F && m === F0 ? s : [ + 0, + a, + [ + 0, + O, + F, + F0 + ] + ]; + case 1: + var W0 = f[2], Tx = f[1], Ax = p(n[1][1 + Y2], n, Tx), _r = K1(d(n[1][1 + i1], n), W0); + return Tx === Ax && W0 === _r ? s : [ + 0, + a, + [ + 1, + Ax, + _r + ] + ]; + case 2: + var Lr = f[3], Xr = f[2], _1 = f[1], Hx = p(n[1][1 + Y2], n, _1), x2 = K1(d(n[1][1 + i1], n), Xr), fe = p(n[1][1 + G], n, Lr); + return _1 === Hx && Xr === x2 && Lr === fe ? s : [ + 0, + a, + [ + 2, + Hx, + x2, + fe + ] + ]; + default: + var ye = f[3], K2 = f[2], Be = f[1], _e = p(n[1][1 + Y2], n, Be), we = K1(d(n[1][1 + i1], n), K2), E2 = p(n[1][1 + G], n, ye); + return Be === _e && K2 === we && ye === E2 ? s : [ + 0, + a, + [ + 3, + _e, + we, + E2 + ] + ]; + } + }, + Y2, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1]; + return P0(d(n[1][1 + Mx], n), f, s, function(F) { + return [0, F]; + }); + case 1: + var a = s[1]; + return P0(d(n[1][1 + rr], n), a, s, function(F) { + return [1, F]; + }); + case 2: + var m = s[1]; + return P0(d(n[1][1 + ne], n), m, s, function(F) { + return [2, F]; + }); + case 3: + var _ = s[1]; + return P0(d(n[1][1 + Ar], n), _, s, function(F) { + return [3, F]; + }); + case 4: + var S = s[1]; + return P0(d(n[1][1 + Zx], n), S, s, function(F) { + return [4, F]; + }); + default: + var O = s[1]; + return P0(d(n[1][1 + Or], n), O, s, function(F) { + return [5, F]; + }); + } + }, + Mx, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + xx], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + rr, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + ke], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + ne, + function(n, s) { + var f = s[1], a = s[2]; + return O0(d(n[1][1 + Qt], n), f, a, s, function(m) { + return [ + 0, + f, + m + ]; + }); + }, + Ar, + function(n, s) { + return p(n[1][1 + jx], n, s); + }, + Or, + function(n, s) { + return p(n[1][1 + lo], n, s); + }, + X0, + function(n, s, f) { + var a = f[7], m = f[6], _ = f[5], S = f[4], O = f[3], F = f[2], n0 = f[1], l0 = p(n[1][1 + Ln], n, n0), F0 = Nx(p(n[1][1 + q], n, 7), F), W0 = Nx(d(n[1][1 + o0], n), O), Tx = Nx(d(n[1][1 + o0], n), m), Ax = Nx(d(n[1][1 + o0], n), S), _r = Nx(d(n[1][1 + o0], n), _), Lr = p(n[1][1 + G], n, a); + return n0 === l0 && O === W0 && F === F0 && S === Ax && _ === _r && m === Tx && a === Lr ? f : [ + 0, + l0, + F0, + W0, + Ax, + _r, + Tx, + Lr + ]; + }, + T1, + function(n, s) { + return Z0(n[1][1 + M3], n, N$, s); + }, + v, + function(n, s, f) { + return Z0(n[1][1 + M3], n, [0, s], f); + }, + F3, + function(n, s) { + return Z0(n[1][1 + M3], n, O$, s); + }, + Cn, + function(n, s) { + return p(n[1][1 + f6], n, s); + }, + _t, + function(n, s) { + return p(n[1][1 + f6], n, s); + }, + M3, + function(n, s, f) { + var a = s ? s[1] : 0; + return Z0(n[1][1 + Hr], n, [0, a], f); + }, + f6, + function(n, s) { + return Z0(n[1][1 + Hr], n, 0, s); + }, + Hr, + function(n, s, f) { + var a = f[2], m = f[1]; + switch (a[0]) { + case 0: + var _ = a[1], S = _[3], O = _[2], F = _[1], n0 = pr(p(n[1][1 + bx], n, s), F), l0 = p(n[1][1 + i0], n, O), F0 = p(n[1][1 + G], n, S); + x: { + if (n0 === F && l0 === O && F0 === S) { + var W0 = a; + break x; + } + var W0 = [0, [ + 0, + n0, + l0, + F0 + ]]; + } + var ce = W0; + break; + case 1: + var Tx = a[1], Ax = Tx[3], _r = Tx[2], Lr = Tx[1], Xr = pr(p(n[1][1 + O1], n, s), Lr), _1 = p(n[1][1 + i0], n, _r), Hx = p(n[1][1 + G], n, Ax); + x: { + if (Ax === Hx && Xr === Lr && _1 === _r) { + var x2 = a; + break x; + } + var x2 = [1, [ + 0, + Xr, + _1, + Hx + ]]; + } + var ce = x2; + break; + case 2: + var fe = a[1], ye = fe[2], K2 = fe[1], Be = fe[3], _e = Z0(n[1][1 + ux], n, s, K2), we = p(n[1][1 + i0], n, ye); + x: { + if (K2 === _e && ye === we) { + var E2 = a; + break x; + } + var E2 = [2, [ + 0, + _e, + we, + Be + ]]; + } + var ce = E2; + break; + default: var gt = a[1], ce = P0(d(n[1][1 + br], n), gt, a, function(Zt) { + return [3, Zt]; + }); + } + return a === ce ? f : [ + 0, + m, + ce + ]; + }, + ux, + function(n, s, f) { + return p(n[1][1 + jx], n, f); + }, + tx, + function(n, s, f, a) { + return Z0(n[1][1 + xx], n, f, a); + }, + Ox, + function(n, s, f, a) { + return Z0(n[1][1 + ke], n, f, a); + }, + nr, + function(n, s, f, a) { + return Z0(n[1][1 + Qt], n, f, a); + }, + bx, + function(n, s, f) { + if (f[0] === 0) { + var a = f[1]; + return P0(p(n[1][1 + Cx], n, s), a, f, function(_) { + return [0, _]; + }); + } + var m = f[1]; + return P0(p(n[1][1 + gx], n, s), m, f, function(_) { + return [1, _]; + }); + }, + Cx, + function(n, s, f) { + var a = f[2], m = a[4], _ = a[3], S = a[2], O = a[1], F = f[1], n0 = Z0(n[1][1 + hr], n, s, O), l0 = Z0(n[1][1 + Jx], n, s, S), F0 = p(n[1][1 + Le], n, _); + x: if (m) { + if (n0[0] === 3) { + var W0 = l0[2]; + if (W0[0] === 2) { + var Ax = Sr(n0[1][2][1], W0[1][1][2][1]); + break x; + } + } + var Ax = (O === n0 ? 1 : 0) && (S === l0 ? 1 : 0); + } else var Ax = m; + return n0 === O && l0 === S && F0 === _ && m === Ax ? f : [ + 0, + F, + [ + 0, + n0, + l0, + F0, + Ax + ] + ]; + }, + hr, + function(n, s, f) { + switch (f[0]) { + case 0: + var a = f[1]; + return P0(p(n[1][1 + ex], n, s), a, f, function(F) { + return [0, F]; + }); + case 1: + var m = f[1]; + return P0(p(n[1][1 + Ux], n, s), m, f, function(F) { + return [1, F]; + }); + case 2: + var _ = f[1]; + return P0(p(n[1][1 + K0], n, s), _, f, function(F) { + return [2, F]; + }); + case 3: + var S = f[1]; + return P0(p(n[1][1 + dr], n, s), S, f, function(F) { + return [3, F]; + }); + default: + var O = f[1]; + return P0(p(n[1][1 + V0], n, s), O, f, function(F) { + return [4, F]; + }); + } + }, + ex, + function(n, s, f) { + var a = f[1], m = f[2]; + return O0(p(n[1][1 + tx], n, s), a, m, f, function(_) { + return [ + 0, + a, + _ + ]; + }); + }, + Ux, + function(n, s, f) { + var a = f[1], m = f[2]; + return O0(p(n[1][1 + Ox], n, s), a, m, f, function(_) { + return [ + 0, + a, + _ + ]; + }); + }, + K0, + function(n, s, f) { + var a = f[1], m = f[2]; + return O0(p(n[1][1 + nr], n, s), a, m, f, function(_) { + return [ + 0, + a, + _ + ]; + }); + }, + dr, + function(n, s, f) { + return Z0(n[1][1 + ux], n, s, f); + }, + V0, + function(n, s, f) { + return p(n[1][1 + lo], n, f); + }, + gx, + function(n, s, f) { + var a = f[2], m = a[2], _ = a[1], S = f[1], O = Z0(n[1][1 + _x], n, s, _), F = p(n[1][1 + G], n, m); + return O === _ && m === F ? f : [ + 0, + S, + [ + 0, + O, + F + ] + ]; + }, + Jx, + function(n, s, f) { + return Z0(n[1][1 + Hr], n, s, f); + }, + _x, + function(n, s, f) { + return Z0(n[1][1 + Hr], n, s, f); + }, + O1, + function(n, s, f) { + switch (f[0]) { + case 0: + var a = f[1]; + return P0(p(n[1][1 + Qr], n, s), a, f, function(_) { + return [0, _]; + }); + case 1: + var m = f[1]; + return P0(p(n[1][1 + l1], n, s), m, f, function(_) { + return [1, _]; + }); + default: return f; + } + }, + Qr, + function(n, s, f) { + var a = f[2], m = a[2], _ = a[1], S = f[1], O = Z0(n[1][1 + C1], n, s, _), F = p(n[1][1 + Le], n, m); + return _ === O && m === F ? f : [ + 0, + S, + [ + 0, + O, + F + ] + ]; + }, + C1, + function(n, s, f) { + return Z0(n[1][1 + Hr], n, s, f); + }, + l1, + function(n, s, f) { + var a = f[2], m = a[2], _ = a[1], S = f[1], O = Z0(n[1][1 + $r], n, s, _), F = p(n[1][1 + G], n, m); + return O === _ && m === F ? f : [ + 0, + S, + [ + 0, + O, + F + ] + ]; + }, + $r, + function(n, s, f) { + return Z0(n[1][1 + Hr], n, s, f); + }, + br, + function(n, s) { + return p(n[1][1 + Dx], n, s); + }, + V, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1]; + if (m) var S = m[1], O = P0(d(n[1][1 + Dx], n), S, m, function(n0) { + return [0, n0]; + }); + else var O = m; + var F = p(n[1][1 + G], n, a); + return m === O && a === F ? s : [ + 0, + _, + [ + 0, + O, + F + ] + ]; + }, + b, + function(n, s) { + return p(n[1][1 + Dx], n, s); + }, + x0, + function(n, s) { + var f = s[2], a = s[1], m = p(n[1][1 + W], n, f); + return Ro(m, f) ? s : [ + 0, + a, + m + ]; + }, + W, + function(n, s) { + var f = s[2], a = f[3], m = f[2], _ = m[2], S = m[1], O = f[1], F = s[1], n0 = p(n[1][1 + jx], n, S), l0 = Nx(d(n[1][1 + o0], n), _), F0 = p(n[1][1 + G], n, a); + return n0 === S && l0 === _ && F0 === a ? s : [ + 0, + F, + [ + 0, + O, + [ + 0, + n0, + l0 + ], + F0 + ] + ]; + }, + D1, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + T1], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + Kx, + function(n, s, f) { + var a = f[5], m = f[4], _ = f[3], S = f[2], O = f[1], F = p(n[1][1 + jx], n, O), n0 = Nx(p(n[1][1 + q], n, 13), S), l0 = Nx(d(n[1][1 + aa], n), _), F0 = p(n[1][1 + J], n, m), W0 = p(n[1][1 + G], n, a); + return O === F && S === n0 && _ === l0 && m === F0 && a === W0 ? f : [ + 0, + F, + n0, + l0, + F0, + W0 + ]; + }, + J, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = pr(d(n[1][1 + $0], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + $0, + function(n, s) { + switch (s[0]) { + case 0: + var f = s[1], a = f[1], m = f[2]; + return O0(d(n[1][1 + R3], n), a, m, s, function(F0) { + return [0, [ + 0, + a, + F0 + ]]; + }); + case 1: + var _ = s[1], S = _[1], O = _[2]; + return O0(d(n[1][1 + A0], n), S, O, s, function(F0) { + return [1, [ + 0, + S, + F0 + ]]; + }); + default: + var F = s[1], n0 = F[1], l0 = F[2]; + return O0(d(n[1][1 + h0], n), n0, l0, s, function(F0) { + return [2, [ + 0, + n0, + F0 + ]]; + }); + } + }, + A0, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + jx], n, S), F = p(n[1][1 + u0], n, _), n0 = Nx(d(n[1][1 + Dx], n), m), l0 = p(n[1][1 + G], n, a); + return O === S && F === _ && n0 === m && l0 === a ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + h0, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + jx], n, S), F = p(n[1][1 + u0], n, _), n0 = p(n[1][1 + Dx], n, m), l0 = p(n[1][1 + G], n, a); + return O === S && F === _ && n0 === m && l0 === a ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + I0, + function(n, s, f) { + var a = f[2], m = f[1], _ = f[3], S = Nx(d(n[1][1 + Dx], n), m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? f : [ + 0, + S, + O, + _ + ]; + }, + Q, + function(n, s, f) { + var a = f[2], m = f[1], _ = pr(d(n[1][1 + Dx], n), m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + C0, + function(n, s) { + return p(n[1][1 + fx], n, s); + }, + fx, + function(n, s) { + var f = d(n[1][1 + yx], n), a = y2(function(_, S) { + var O = _[2], F = _[1], n0 = d(f, S); + if (!n0) return [ + 0, + F, + 1 + ]; + if (n0[2]) return [ + 0, + yl(n0, F), + 1 + ]; + var l0 = n0[1]; + return [ + 0, + [ + 0, + l0, + F + ], + O || (S !== l0 ? 1 : 0) + ]; + }, j$, s), m = a[1]; + return a[2] ? cx(m) : s; + }, + yx, + function(n, s) { + return [ + 0, + p(n[1][1 + R0], n, s), + 0 + ]; + }, + kx, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + Dx], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + lx, + function(n, s) { + var f = s[2], a = f[2], m = f[1], _ = s[1], S = p(n[1][1 + Dx], n, m), O = p(n[1][1 + G], n, a); + return m === S && a === O ? s : [ + 0, + _, + [ + 0, + S, + O + ] + ]; + }, + ix, + function(n, s, f) { + var a = f[1], m = p(n[1][1 + G], n, a); + return a === m ? f : [0, m]; + }, + q0, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = f[4], O = p(n[1][1 + Dx], n, _), F = pr(d(n[1][1 + Q0], n), m), n0 = p(n[1][1 + G], n, a); + return _ === O && m === F && a === n0 ? f : [ + 0, + O, + F, + n0, + S + ]; + }, + Q0, + function(n, s) { + var f = s[2], a = f[4], m = f[3], _ = f[1], S = f[2], O = s[1], F = Nx(d(n[1][1 + Dx], n), _), n0 = p(n[1][1 + fx], n, m), l0 = p(n[1][1 + G], n, a); + return _ === F && m === n0 && a === l0 ? s : [ + 0, + O, + [ + 0, + F, + S, + n0, + l0 + ] + ]; + }, + y0, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = K1(d(n[1][1 + M0], n), m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + M0, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = pr(d(n[1][1 + T0], n), _), O = pr(d(n[1][1 + Dx], n), m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + T0, + function(n, s) { + return s; + }, + U0, + function(n, s, f) { + var a = f[1], m = p(n[1][1 + G], n, a); + return a === m ? f : [0, m]; + }, + D0, + function(n, s, f) { + var a = f[2], m = f[1], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + _, + S + ]; + }, + E0, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = K1(d(n[1][1 + Mn], n), S); + if (_) var F = _[1], n0 = F[1], l0 = F[2], F0 = O0(d(n[1][1 + n6], n), n0, l0, _, function(Xr) { + return [0, [ + 0, + n0, + Xr + ]]; + }); + else var F0 = _; + if (m) var W0 = m[1], Tx = W0[1], Ax = W0[2], _r = O0(d(n[1][1 + Mn], n), Tx, Ax, m, function(Xr) { + return [0, [ + 0, + Tx, + Xr + ]]; + }); + else var _r = m; + var Lr = p(n[1][1 + G], n, a); + return S === O && _ === F0 && m === _r && a === Lr ? f : [ + 0, + O, + F0, + _r, + Lr + ]; + }, + Z, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + u0], n, m), F = p(n[1][1 + G], n, a); + return S === _ && O === m && F === a ? f : [ + 0, + S, + O, + F + ]; + }, + p0, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + u0], n, m), F = p(n[1][1 + G], n, a); + return S === _ && Ro(O, m) && F === a ? f : [ + 0, + S, + O, + F + ]; + }, + E, + function(n, s, f) { + var a = f[3], m = f[2], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + f[1], + _, + S + ]; + }, + k, + function(n, s, f) { + var a = f[4], m = f[2], _ = p(n[1][1 + Dx], n, m), S = p(n[1][1 + G], n, a); + return m === _ && a === S ? f : [ + 0, + f[1], + _, + f[3], + S + ]; + }, + l, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = pr(p(n[1][1 + o], n, m), _), O = p(n[1][1 + G], n, a); + return _ === S && a === O ? f : [ + 0, + S, + m, + O + ]; + }, + o, + function(n, s, f) { + var a = f[2], m = a[2], _ = a[1], S = f[1], O = Z0(n[1][1 + v], n, s, _), F = Nx(d(n[1][1 + Dx], n), m); + return _ === O && m === F ? f : [ + 0, + S, + [ + 0, + O, + F + ] + ]; + }, + u, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + b], n, _), O = p(n[1][1 + R0], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + t, + function(n, s, f) { + var a = f[3], m = f[2], _ = f[1], S = p(n[1][1 + Dx], n, _), O = p(n[1][1 + R0], n, m), F = p(n[1][1 + G], n, a); + return _ === S && m === O && a === F ? f : [ + 0, + S, + O, + F + ]; + }, + k0, + function(n, s, f) { + var a = f[4], m = f[3], _ = f[2], S = f[1], O = p(n[1][1 + Ln], n, S), F = Nx(p(n[1][1 + q], n, 5), _), n0 = p(n[1][1 + o0], n, m), l0 = p(n[1][1 + G], n, a); + return S === O && m === n0 && _ === F && a === l0 ? f : [ + 0, + O, + F, + n0, + l0 + ]; + }, + e, + function(n, s, f) { + var a = f[2], m = f[1], _ = f[4], S = f[3], O = Nx(d(n[1][1 + Dx], n), m), F = p(n[1][1 + G], n, a); + return a === F && m === O ? f : [ + 0, + O, + F, + S, + _ + ]; + } + ]), function(n, s) { + return fd(s, x); + }; + }), TO = []; + function _U(x, r, e) { + var t = e[2]; + switch (t[0]) { + case 0: + var u = t[1][1]; + return y2(d(TO[1], x), r, u); + case 1: + var i = t[1][1]; + return y2(d(TO[2], x), r, i); + case 2: return p(x, r, t[1][1]); + default: return r; + } + } + Dr(TO, [ + 0, + function(x, r) { + return function(e) { + return _U(x, r, e[0] === 0 ? e[1][2][2] : e[1][2][1]); + }; + }, + function(x, r) { + return function(e) { + return e[0] === 2 ? r : _U(x, r, e[1][2][1]); + }; + } + ]); + var EO = []; + function wU(x) { + var r = x[2]; + switch (r[0]) { + case 0: return wl(EO[1], r[1][1]); + case 1: return wl(EO[2], r[1][1]); + case 2: return 1; + default: return 0; + } + } + Dr(EO, [ + 0, + function(x) { + return wU(x[0] === 0 ? x[1][2][2] : x[1][2][1]); + }, + function(x) { + return x[0] === 2 ? 0 : wU(x[1][2][1]); + } + ]); + var ld = []; + function SO(x) { + for (var r = x;;) { + var e = r[2]; + switch (e[0]) { + case 7: return 1; + case 10: + var t = e[1], u = t[1]; + return d(ld[2], t[2]) || wl(ld[1], u); + case 11: + var c = e[1], v = c[1]; + return d(ld[2], c[2]) || wl(function(k) { + return SO(k[2]); + }, v); + case 12: + var r = [ + 0, + , + [10, e[1][2][2]] + ]; + break; + case 13: return wl(SO, e[1][1]); + case 14: return 1; + default: return 0; + } + } + } + Dr(ld, [ + 0, + function(x) { + var r = x[2]; + return r[0] === 0 ? SO(r[1][2]) : 0; + }, + function(x) { + return x && x[1][2][1] ? 1 : 0; + } + ]); + function AO(x) { + switch (x) { + case 0: return _Q; + case 1: return wQ; + default: return gQ; + } + } + function wn(x, r) { + return [ + 0, + r[1], + [ + 0, + r[2], + x + ] + ]; + } + function gU(x, r, e) { + return [ + 0, + x ? x[1] : 0, + r ? r[1] : 0, + e + ]; + } + function r0(x, r, e) { + var t = x ? x[1] : 0, u = r ? r[1] : 0; + return !t && !u ? 0 : [0, gU([0, t], [0, u], 0)]; + } + function I1(x, r, e, t) { + var u = x ? x[1] : 0, i = r ? r[1] : 0; + return !u && !i && !e ? 0 : [0, gU([0, u], [0, i], e)]; + } + function O2(x, r) { + if (x) { + if (r) { + var e = r[1], t = x[1], u = [0, qx(t[2], e[2])]; + return r0([0, qx(e[1], t[1])], u, D); + } + var i = x; + } else var i = r; + return i; + } + function pd(x, r) { + if (!r) return x; + if (x) { + var e = r[1], t = x[1], u = e[1], i = t[3], c = t[1], v = [0, qx(t[2], e[2])]; + return I1([0, qx(u, c)], v, i, D); + } + var o = r[1]; + return I1([0, o[1]], [0, o[2]], 0, D); + } + function bU(x, r) { + c2(x)(bQ), d(c2(x)(EQ), TQ); + var e = r[1]; + d(c2(x)(SQ), e), c2(x)(AQ), c2(x)(IQ), d(c2(x)(CQ), PQ); + var t = r[2]; + return d(c2(x)(NQ), t), c2(x)(OQ), c2(x)(jQ); + } + Dr([], [ + 0, + bU, + bU, + function(x, r) { + switch (r[0]) { + case 0: + var e = r[1]; + return c2(x)(c$), d(c2(x)(s$), e), c2(x)(a$); + case 1: + var t = r[1]; + return c2(x)(o$), d(c2(x)(v$), t), c2(x)(l$); + case 2: + var u = r[1]; + return c2(x)(p$), d(c2(x)(k$), u), c2(x)(m$); + default: + var i = r[1]; + return c2(x)(h$), d(c2(x)(d$), i), c2(x)(y$); + } + } + ]); + function Br(x, r) { + return [ + 0, + x[1], + x[2], + r[3] + ]; + } + function za(x, r) { + var e = x[1] - r[1] | 0; + return e === 0 ? x[2] - r[2] | 0 : e; + } + function TU(x, r) { + var e = r[1], t = x[1]; + if (t) { + var u = t[1]; + if (e) var i = e[1], c = yU(i), v = yU(u) - c | 0, o = v === 0 ? sx(u[1], i[1]) : v; + else var o = -1; + } else var o = e ? 1 : 0; + if (o !== 0) return o; + var l = za(x[2], r[2]); + return l === 0 ? za(x[3], r[3]) : l; + } + function Xo(x, r) { + return TU(x, r) === 0 ? 1 : 0; + } + function EU(x) { + return [ + 0, + x[1], + x[2], + x[2] + ]; + } + var kr = []; + Dr(kr, [ + 0, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r) { + switch (x) { + case 0: + if (!r) return 0; + break; + case 1: + if (r === 1) return 0; + break; + case 2: + if (r === 2) return 0; + break; + case 3: + if (r === 3) return 0; + break; + default: if (4 <= r) return 0; + } + function e(u) { + switch (u) { + case 0: return 0; + case 1: return 1; + case 2: return 2; + case 3: return 3; + default: return 4; + } + } + var t = e(r); + return xe(e(x), t); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return xe(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + }, + function(x, r, e) { + return sx(r, e); + } + ]); + var SU = rr0.slice(); + function IO(x) { + for (var r = 0, e = SU.length - 1 - 1 | 0;;) { + if (e < r) return 0; + var t = r + ((e - r | 0) / 2 | 0) | 0, u = SU[1 + t], i = u[2]; + if (x < u[1]) var e = t - 1 | 0; + else { + if (i > x) return 1; + var r = t + 1 | 0; + } + } + } + var AU = 0; + function IU(x) { + var r = x[2]; + return [ + 0, + x[1], + [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12] + ], + x[3], + x[4], + x[5], + x[6], + x[7] + ]; + } + function PU(x) { + return x[3][1]; + } + function kd(x, r) { + return x !== r[4] ? [ + 0, + r[1], + r[2], + r[3], + x, + r[5], + r[6], + r[7] + ] : r; + } + var Ze = []; + function CU(x, r) { + if (typeof x == "number") { + var e = x; + if (68 <= e) if (Ee <= e) switch (e) { + case 102: + if (typeof r == "number" && Ee === r) return 1; + break; + case 103: + if (typeof r == "number" && Ss === r) return 1; + break; + case 104: + if (typeof r == "number" && ec === r) return 1; + break; + case 105: + if (typeof r == "number" && p2 === r) return 1; + break; + case 106: + if (typeof r == "number" && Ct === r) return 1; + break; + case 107: + if (typeof r == "number" && Te === r) return 1; + break; + case 108: + if (typeof r == "number" && d2 === r) return 1; + break; + case 109: + if (typeof r == "number" && wo === r) return 1; + break; + case 110: + if (typeof r == "number" && n2 === r) return 1; + break; + case 111: + if (typeof r == "number" && nn === r) return 1; + break; + case 112: + if (typeof r == "number" && h2 === r) return 1; + break; + case 113: + if (typeof r == "number" && ef === r) return 1; + break; + case 114: + if (typeof r == "number" && k2 === r) return 1; + break; + case 115: + if (typeof r == "number" && wr === r) return 1; + break; + case 116: + if (typeof r == "number" && Ca === r) return 1; + break; + case 117: + if (typeof r == "number" && Z6 === r) return 1; + break; + case 118: + if (typeof r == "number" && q6 === r) return 1; + break; + case 119: + if (typeof r == "number" && b6 === r) return 1; + break; + case 120: + if (typeof r == "number" && Cf === r) return 1; + break; + case 121: + if (typeof r == "number" && $6 === r) return 1; + break; + case 122: + if (typeof r == "number" && e1 === r) return 1; + break; + case 123: + if (typeof r == "number" && un === r) return 1; + break; + case 124: + if (typeof r == "number" && zv === r) return 1; + break; + case 125: + if (typeof r == "number" && So === r) return 1; + break; + case 126: + if (typeof r == "number" && v8 === r) return 1; + break; + case 127: + if (typeof r == "number" && Gr === r) return 1; + break; + case 128: + if (typeof r == "number" && R1 === r) return 1; + break; + case 129: + if (typeof r == "number" && kk === r) return 1; + break; + case 130: + if (typeof r == "number" && Qv === r) return 1; + break; + case 131: + if (typeof r == "number" && M6 === r) return 1; + break; + case 132: + if (typeof r == "number" && N6 === r) return 1; + break; + case 133: + if (typeof r == "number" && s8 === r) return 1; + break; + default: if (typeof r == "number" && sm <= r) return 1; + } + else switch (e) { + case 68: + if (typeof r == "number" && r === 68) return 1; + break; + case 69: + if (typeof r == "number" && r === 69) return 1; + break; + case 70: + if (typeof r == "number" && r === 70) return 1; + break; + case 71: + if (typeof r == "number" && r === 71) return 1; + break; + case 72: + if (typeof r == "number" && r === 72) return 1; + break; + case 73: + if (typeof r == "number" && r === 73) return 1; + break; + case 74: + if (typeof r == "number" && r === 74) return 1; + break; + case 75: + if (typeof r == "number" && r === 75) return 1; + break; + case 76: + if (typeof r == "number" && r === 76) return 1; + break; + case 77: + if (typeof r == "number" && r === 77) return 1; + break; + case 78: + if (typeof r == "number" && r === 78) return 1; + break; + case 79: + if (typeof r == "number" && r === 79) return 1; + break; + case 80: + if (typeof r == "number" && r === 80) return 1; + break; + case 81: + if (typeof r == "number" && r === 81) return 1; + break; + case 82: + if (typeof r == "number" && r === 82) return 1; + break; + case 83: + if (typeof r == "number" && r === 83) return 1; + break; + case 84: + if (typeof r == "number" && r === 84) return 1; + break; + case 85: + if (typeof r == "number" && r === 85) return 1; + break; + case 86: + if (typeof r == "number" && r === 86) return 1; + break; + case 87: + if (typeof r == "number" && r === 87) return 1; + break; + case 88: + if (typeof r == "number" && r === 88) return 1; + break; + case 89: + if (typeof r == "number" && r === 89) return 1; + break; + case 90: + if (typeof r == "number" && r === 90) return 1; + break; + case 91: + if (typeof r == "number" && r === 91) return 1; + break; + case 92: + if (typeof r == "number" && r === 92) return 1; + break; + case 93: + if (typeof r == "number" && r === 93) return 1; + break; + case 94: + if (typeof r == "number" && r === 94) return 1; + break; + case 95: + if (typeof r == "number" && r === 95) return 1; + break; + case 96: + if (typeof r == "number" && r === 96) return 1; + break; + case 97: + if (typeof r == "number" && r === 97) return 1; + break; + case 98: + if (typeof r == "number" && r === 98) return 1; + break; + case 99: + if (typeof r == "number" && r === 99) return 1; + break; + case 100: + if (typeof r == "number" && cr === r) return 1; + break; + default: if (typeof r == "number" && k1 === r) return 1; + } + else if (34 <= e) switch (e) { + case 34: + if (typeof r == "number" && r === 34) return 1; + break; + case 35: + if (typeof r == "number" && r === 35) return 1; + break; + case 36: + if (typeof r == "number" && r === 36) return 1; + break; + case 37: + if (typeof r == "number" && r === 37) return 1; + break; + case 38: + if (typeof r == "number" && r === 38) return 1; + break; + case 39: + if (typeof r == "number" && r === 39) return 1; + break; + case 40: + if (typeof r == "number" && r === 40) return 1; + break; + case 41: + if (typeof r == "number" && r === 41) return 1; + break; + case 42: + if (typeof r == "number" && r === 42) return 1; + break; + case 43: + if (typeof r == "number" && r === 43) return 1; + break; + case 44: + if (typeof r == "number" && r === 44) return 1; + break; + case 45: + if (typeof r == "number" && r === 45) return 1; + break; + case 46: + if (typeof r == "number" && r === 46) return 1; + break; + case 47: + if (typeof r == "number" && r === 47) return 1; + break; + case 48: + if (typeof r == "number" && r === 48) return 1; + break; + case 49: + if (typeof r == "number" && r === 49) return 1; + break; + case 50: + if (typeof r == "number" && r === 50) return 1; + break; + case 51: + if (typeof r == "number" && r === 51) return 1; + break; + case 52: + if (typeof r == "number" && r === 52) return 1; + break; + case 53: + if (typeof r == "number" && r === 53) return 1; + break; + case 54: + if (typeof r == "number" && r === 54) return 1; + break; + case 55: + if (typeof r == "number" && r === 55) return 1; + break; + case 56: + if (typeof r == "number" && r === 56) return 1; + break; + case 57: + if (typeof r == "number" && r === 57) return 1; + break; + case 58: + if (typeof r == "number" && r === 58) return 1; + break; + case 59: + if (typeof r == "number" && r === 59) return 1; + break; + case 60: + if (typeof r == "number" && r === 60) return 1; + break; + case 61: + if (typeof r == "number" && r === 61) return 1; + break; + case 62: + if (typeof r == "number" && r === 62) return 1; + break; + case 63: + if (typeof r == "number" && r === 63) return 1; + break; + case 64: + if (typeof r == "number" && r === 64) return 1; + break; + case 65: + if (typeof r == "number" && r === 65) return 1; + break; + case 66: + if (typeof r == "number" && r === 66) return 1; + break; + default: if (typeof r == "number" && r === 67) return 1; + } + else switch (e) { + case 0: + if (typeof r == "number" && !r) return 1; + break; + case 1: + if (typeof r == "number" && r === 1) return 1; + break; + case 2: + if (typeof r == "number" && r === 2) return 1; + break; + case 3: + if (typeof r == "number" && r === 3) return 1; + break; + case 4: + if (typeof r == "number" && r === 4) return 1; + break; + case 5: + if (typeof r == "number" && r === 5) return 1; + break; + case 6: + if (typeof r == "number" && r === 6) return 1; + break; + case 7: + if (typeof r == "number" && r === 7) return 1; + break; + case 8: + if (typeof r == "number" && r === 8) return 1; + break; + case 9: + if (typeof r == "number" && r === 9) return 1; + break; + case 10: + if (typeof r == "number" && r === 10) return 1; + break; + case 11: + if (typeof r == "number" && r === 11) return 1; + break; + case 12: + if (typeof r == "number" && r === 12) return 1; + break; + case 13: + if (typeof r == "number" && r === 13) return 1; + break; + case 14: + if (typeof r == "number" && r === 14) return 1; + break; + case 15: + if (typeof r == "number" && r === 15) return 1; + break; + case 16: + if (typeof r == "number" && r === 16) return 1; + break; + case 17: + if (typeof r == "number" && r === 17) return 1; + break; + case 18: + if (typeof r == "number" && r === 18) return 1; + break; + case 19: + if (typeof r == "number" && r === 19) return 1; + break; + case 20: + if (typeof r == "number" && r === 20) return 1; + break; + case 21: + if (typeof r == "number" && r === 21) return 1; + break; + case 22: + if (typeof r == "number" && r === 22) return 1; + break; + case 23: + if (typeof r == "number" && r === 23) return 1; + break; + case 24: + if (typeof r == "number" && r === 24) return 1; + break; + case 25: + if (typeof r == "number" && r === 25) return 1; + break; + case 26: + if (typeof r == "number" && r === 26) return 1; + break; + case 27: + if (typeof r == "number" && r === 27) return 1; + break; + case 28: + if (typeof r == "number" && r === 28) return 1; + break; + case 29: + if (typeof r == "number" && r === 29) return 1; + break; + case 30: + if (typeof r == "number" && r === 30) return 1; + break; + case 31: + if (typeof r == "number" && r === 31) return 1; + break; + case 32: + if (typeof r == "number" && r === 32) return 1; + break; + default: if (typeof r == "number" && r === 33) return 1; + } + } else switch (x[0]) { + case 0: + if (typeof r != "number" && r[0] === 0) { + var t = r[2], u = x[2]; + return p(Ze[13], x[1], r[1]) && Sr(u, t); + } + break; + case 1: + if (typeof r != "number" && r[0] === 1) { + var c = r[2], v = x[2]; + return p(Ze[12], x[1], r[1]) && Sr(v, c); + } + break; + case 2: + if (typeof r != "number" && r[0] === 2) { + var l = r[1], k = x[1], h = l[4], E = l[3], T = l[2], I = k[4], N = k[3], P = k[2]; + return p(Ze[11], k[1], l[1]) && Sr(P, T) && Sr(N, E) && (I === h ? 1 : 0); + } + break; + case 3: + if (typeof r != "number" && r[0] === 3) { + var B = r[1], z = x[1], x0 = B[5], W = B[4], Z = B[3], t0 = B[2], i0 = z[5], u0 = z[4], k0 = z[3], o0 = z[2]; + return p(Ze[10], z[1], B[1]) && Sr(o0, t0) && Sr(k0, Z) && (u0 === W ? 1 : 0) && (i0 === x0 ? 1 : 0); + } + break; + case 4: + if (typeof r != "number" && r[0] === 4) { + var p0 = r[3], E0 = r[2], b0 = x[3], C0 = x[2]; + return p(Ze[9], x[1], r[1]) && Sr(C0, E0) && Sr(b0, p0); + } + break; + case 5: + if (typeof r != "number" && r[0] === 5) { + var T0 = r[3], M0 = r[2], y0 = x[3], G = x[2]; + return p(Ze[8], x[1], r[1]) && Sr(G, M0) && Sr(y0, T0); + } + break; + case 6: + if (typeof r != "number" && r[0] === 6) { + var q0 = r[2], ix = x[2]; + return p(Ze[7], x[1], r[1]) && Sr(ix, q0); + } + break; + case 7: + if (typeof r != "number" && r[0] === 7) return Sr(x[1], r[1]); + break; + case 8: + if (typeof r != "number" && r[0] === 8) { + var fx = Sr(x[1], r[1]), yx = r[2], R0 = x[2]; + return fx && p(Ze[6], R0, yx); + } + break; + case 9: + if (typeof r != "number" && r[0] === 9) { + var lx = r[3], kx = r[2], Q = x[3], I0 = x[2]; + return p(Ze[5], x[1], r[1]) && Sr(I0, kx) && Sr(Q, lx); + } + break; + case 10: + if (typeof r != "number" && r[0] === 10) { + var g0 = r[3], h0 = r[2], A0 = x[3], $0 = x[2]; + return p(Ze[4], x[1], r[1]) && Sr($0, h0) && Sr(A0, g0); + } + break; + case 11: + if (typeof r != "number" && r[0] === 11) return p(Ze[3], x[1], r[1]); + break; + case 12: + if (typeof r != "number" && r[0] === 12) { + var tr = r[3], Zx = r[2], b = x[3], V = x[2]; + return p(Ze[2], x[1], r[1]) && (V == Zx ? 1 : 0) && Sr(b, tr); + } + break; + default: if (typeof r != "number" && r[0] === 13) { + var gx = r[2], ex = x[2], Jx = r[3], Ux = x[3], hr = p(Ze[1], x[1], r[1]); + if (hr) { + x: { + if (ex) { + if (gx) { + var dr = Ro(ex[1], gx[1]); + break x; + } + } else if (!gx) { + var dr = 1; + break x; + } + var dr = 0; + } + var V0 = dr; + } else var V0 = hr; + return V0 && Sr(Ux, Jx); + } + } + return 0; + } + function NU(x, r) { + switch (x) { + case 0: + if (!r) return 1; + break; + case 1: + if (r === 1) return 1; + break; + case 2: + if (r === 2) return 1; + break; + case 3: + if (r === 3) return 1; + break; + default: if (4 <= r) return 1; + } + return 0; + } + function OU(x, r) { + switch (x) { + case 0: + if (!r) return 1; + break; + case 1: + if (r === 1) return 1; + break; + default: if (2 <= r) return 1; + } + return 0; + } + Dr(Ze, [ + 0, + OU, + NU, + function(x, r) { + if (x) { + if (r) return 1; + } else if (!r) return 1; + return 0; + }, + Xo, + Xo, + Xo, + Xo, + Xo, + Xo, + Xo, + Xo, + OU, + NU + ]); + function jU(x) { + if (typeof x != "number") switch (x[0]) { + case 0: return jn0; + case 1: return Dn0; + case 2: return Rn0; + case 3: return Fn0; + case 4: return Mn0; + case 5: return Ln0; + case 6: return qn0; + case 7: return Bn0; + case 8: return Un0; + case 9: return Xn0; + case 10: return Gn0; + case 11: return Yn0; + case 12: return zn0; + default: return Jn0; + } + var r = x; + if (68 <= r) { + if (Ee <= r) switch (r) { + case 102: return xn0; + case 103: return rn0; + case 104: return en0; + case 105: return tn0; + case 106: return nn0; + case 107: return un0; + case 108: return in0; + case 109: return fn0; + case 110: return cn0; + case 111: return sn0; + case 112: return an0; + case 113: return on0; + case 114: return vn0; + case 115: return ln0; + case 116: return pn0; + case 117: return kn0; + case 118: return mn0; + case 119: return hn0; + case 120: return dn0; + case 121: return yn0; + case 122: return _n0; + case 123: return wn0; + case 124: return gn0; + case 125: return bn0; + case 126: return Tn0; + case 127: return En0; + case 128: return Sn0; + case 129: return An0; + case 130: return In0; + case 131: return Pn0; + case 132: return Cn0; + case 133: return Nn0; + default: return On0; + } + switch (r) { + case 68: return _t0; + case 69: return wt0; + case 70: return gt0; + case 71: return bt0; + case 72: return Tt0; + case 73: return Et0; + case 74: return St0; + case 75: return At0; + case 76: return It0; + case 77: return Pt0; + case 78: return Ct0; + case 79: return Nt0; + case 80: return Ot0; + case 81: return jt0; + case 82: return Dt0; + case 83: return Rt0; + case 84: return Ft0; + case 85: return Mt0; + case 86: return Lt0; + case 87: return qt0; + case 88: return Bt0; + case 89: return Ut0; + case 90: return Xt0; + case 91: return Gt0; + case 92: return Yt0; + case 93: return zt0; + case 94: return Jt0; + case 95: return Kt0; + case 96: return Ht0; + case 97: return Wt0; + case 98: return Vt0; + case 99: return $t0; + case 100: return Qt0; + default: return Zt0; + } + } + if (34 <= r) switch (r) { + case 34: return Be0; + case 35: return Ue0; + case 36: return Xe0; + case 37: return Ge0; + case 38: return Ye0; + case 39: return ze0; + case 40: return Je0; + case 41: return Ke0; + case 42: return He0; + case 43: return We0; + case 44: return Ve0; + case 45: return $e0; + case 46: return Qe0; + case 47: return Ze0; + case 48: return xt0; + case 49: return rt0; + case 50: return et0; + case 51: return tt0; + case 52: return nt0; + case 53: return ut0; + case 54: return it0; + case 55: return ft0; + case 56: return ct0; + case 57: return st0; + case 58: return at0; + case 59: return ot0; + case 60: return vt0; + case 61: return lt0; + case 62: return pt0; + case 63: return kt0; + case 64: return mt0; + case 65: return ht0; + case 66: return dt0; + default: return yt0; + } + switch (r) { + case 0: return ie0; + case 1: return fe0; + case 2: return ce0; + case 3: return se0; + case 4: return ae0; + case 5: return oe0; + case 6: return ve0; + case 7: return le0; + case 8: return pe0; + case 9: return ke0; + case 10: return me0; + case 11: return he0; + case 12: return de0; + case 13: return ye0; + case 14: return _e0; + case 15: return we0; + case 16: return ge0; + case 17: return be0; + case 18: return Te0; + case 19: return Ee0; + case 20: return Se0; + case 21: return Ae0; + case 22: return Ie0; + case 23: return Pe0; + case 24: return Ce0; + case 25: return Ne0; + case 26: return Oe0; + case 27: return je0; + case 28: return De0; + case 29: return Re0; + case 30: return Fe0; + case 31: return Me0; + case 32: return Le0; + default: return qe0; + } + } + function PO(x) { + if (typeof x != "number") switch (x[0]) { + case 0: return x[2]; + case 1: return x[2]; + case 2: return x[1][3]; + case 3: + var r = x[1], e = r[5], t = r[4], u = r[3]; + return t && e ? Gx(W20, Gx(u, H20)) : t ? Gx($20, Gx(u, V20)) : e ? Gx(Z20, Gx(u, Q20)) : Gx(re0, Gx(u, xe0)); + case 4: return x[3]; + case 5: + var i = x[2]; + return Gx(te0, Gx(i, Gx(ee0, x[3]))); + case 6: return x[2]; + case 7: return x[1]; + case 8: return x[1]; + case 9: return x[3]; + case 10: return x[3]; + case 11: return x[1] ? ne0 : ue0; + case 12: return x[3]; + default: return x[3]; + } + var c = x; + if (68 <= c) { + if (Ee <= c) switch (c) { + case 102: return k20; + case 103: return m20; + case 104: return h20; + case 105: return d20; + case 106: return y20; + case 107: return _20; + case 108: return w20; + case 109: return g20; + case 110: return b20; + case 111: return T20; + case 112: return E20; + case 113: return S20; + case 114: return A20; + case 115: return I20; + case 116: return P20; + case 117: return C20; + case 118: return N20; + case 119: return O20; + case 120: return j20; + case 121: return D20; + case 122: return R20; + case 123: return F20; + case 124: return M20; + case 125: return L20; + case 126: return q20; + case 127: return B20; + case 128: return U20; + case 129: return X20; + case 130: return G20; + case 131: return Y20; + case 132: return z20; + case 133: return J20; + default: return K20; + } + switch (c) { + case 68: return R10; + case 69: return F10; + case 70: return M10; + case 71: return L10; + case 72: return q10; + case 73: return B10; + case 74: return U10; + case 75: return X10; + case 76: return G10; + case 77: return Y10; + case 78: return z10; + case 79: return J10; + case 80: return K10; + case 81: return H10; + case 82: return W10; + case 83: return V10; + case 84: return $10; + case 85: return Q10; + case 86: return Z10; + case 87: return x20; + case 88: return r20; + case 89: return e20; + case 90: return t20; + case 91: return n20; + case 92: return u20; + case 93: return i20; + case 94: return f20; + case 95: return c20; + case 96: return s20; + case 97: return a20; + case 98: return o20; + case 99: return v20; + case 100: return l20; + default: return p20; + } + } + if (34 <= c) switch (c) { + case 34: return r10; + case 35: return e10; + case 36: return t10; + case 37: return n10; + case 38: return u10; + case 39: return i10; + case 40: return f10; + case 41: return c10; + case 42: return s10; + case 43: return a10; + case 44: return o10; + case 45: return v10; + case 46: return l10; + case 47: return p10; + case 48: return k10; + case 49: return m10; + case 50: return h10; + case 51: return d10; + case 52: return y10; + case 53: return _10; + case 54: return w10; + case 55: return g10; + case 56: return b10; + case 57: return T10; + case 58: return E10; + case 59: return S10; + case 60: return A10; + case 61: return I10; + case 62: return P10; + case 63: return C10; + case 64: return N10; + case 65: return O10; + case 66: return j10; + default: return D10; + } + switch (c) { + case 0: return wr0; + case 1: return gr0; + case 2: return br0; + case 3: return Tr0; + case 4: return Er0; + case 5: return Sr0; + case 6: return Ar0; + case 7: return Ir0; + case 8: return Pr0; + case 9: return Cr0; + case 10: return Nr0; + case 11: return Or0; + case 12: return jr0; + case 13: return Dr0; + case 14: return Rr0; + case 15: return Fr0; + case 16: return Mr0; + case 17: return Lr0; + case 18: return qr0; + case 19: return Br0; + case 20: return Ur0; + case 21: return Xr0; + case 22: return Gr0; + case 23: return Yr0; + case 24: return zr0; + case 25: return Jr0; + case 26: return Kr0; + case 27: return Hr0; + case 28: return Wr0; + case 29: return Vr0; + case 30: return $r0; + case 31: return Qr0; + case 32: return Zr0; + default: return x10; + } + } + function md(x) { + return d(vr(_r0), x); + } + function CO(x, r) { + var e = x ? x[1] : 0; + x: { + if (typeof r == "number") { + if (wr === r) { + var t = nr0, u = ur0; + break x; + } + } else switch (r[0]) { + case 3: + var t = ir0, u = fr0; + break x; + case 5: + var t = cr0, u = sr0; + break x; + case 0: + case 12: + var t = or0, u = vr0; + break x; + case 1: + case 13: + var t = lr0, u = pr0; + break x; + case 4: + case 8: + var t = hr0, u = dr0; + break x; + case 6: + case 7: + case 11: break; + default: + var t = kr0, u = mr0; + break x; + } + var t = ar0, u = md(PO(r)); + } + return e ? Gx(t, Gx(yr0, u)) : u; + } + function KE0(x) { + return Rv < x ? eC < x ? -1 : xC < x ? Xp < x ? YA < x ? Wb < x ? rg < x ? 1 : 8 : MS < x ? Eb < x ? e9 < x ? 1 : 8 : vC < x ? 1 : 8 : Zb < x ? kE < x ? 1 : 8 : Nw < x ? 1 : 8 : xk < x ? $p < x ? nk < x ? Kp < x ? P8 < x ? m8 < x ? Jw < x ? 1 : 8 : y_ < x ? 1 : 8 : iy < x ? b9 < x ? 1 : 8 : qC < x ? 1 : 8 : Vk < x ? Bm < x ? XA < x ? 1 : 8 : O8 < x ? 1 : 8 : A8 < x ? XT < x ? 1 : 8 : Eg < x ? 1 : 8 : Sk < x ? Dy < x ? Rp < x ? sb < x ? 1 : 8 : fT < x ? 1 : 8 : Wp < x ? Zm < x ? 1 : 8 : SA < x ? 1 : 8 : rh < x ? Jp < x ? q8 < x ? 1 : 8 : ok < x ? 1 : 8 : y8 < x ? am < x ? 1 : 8 : Zk < x ? 1 : 8 : tw < x ? Mp < x ? xh < x ? kT < x ? j8 < x ? 1 : 8 : Dm < x ? 1 : 8 : Mk < x ? M_ < x ? 1 : 8 : Dg < x ? 1 : 8 : Qp < x ? vm < x ? vh < x ? 1 : 8 : hh < x ? 1 : 8 : HC < x ? Eh < x ? 1 : 8 : fh < x ? 1 : 8 : J8 < x ? N8 < x ? tm < x ? Vp < x ? 1 : 8 : kh < x ? 1 : 8 : Ep < x ? Ib < x ? 1 : 8 : zA < x ? 1 : 8 : yh < x ? $C < x ? Mm < x ? 1 : 8 : Pp < x ? 1 : 8 : hm < x ? eS < x ? 1 : 8 : v_ < x ? 1 : 8 : HI < x ? Ew < x ? F_ < x ? p9 < x ? Q_ < x ? hy < x ? 1 : 8 : eT < x ? 1 : 8 : xP < x ? UC < x ? 1 : 8 : Sy < x ? 1 : 8 : zw < x ? G9 < x ? JP < x ? 1 : 8 : GC < x ? 1 : 8 : w9 < x ? ry < x ? 1 : 8 : $T < x ? 1 : 8 : aE < x ? m_ < x ? bP < x ? GP < x ? 1 : 8 : uC < x ? 1 : 8 : R_ < x ? Sp < x ? 1 : 8 : kP < x ? 1 : 8 : V5 < x ? QC < x ? ww < x ? 1 : 8 : 1 : 8 : wh < x ? w8 < x ? Cp < x ? Nk < x ? ET < x ? 1 : 8 : SS < x ? 1 : 8 : zp < x ? gg < x ? 1 : 8 : IT < x ? 1 : 8 : C8 < x ? Zp < x ? rN < x ? 1 : 8 : Hy < x ? 1 : 8 : Rk < x ? S_ < x ? 1 : 8 : nb < x ? 1 : 8 : eh < x ? yk < x ? T8 < x ? tb < x ? 1 : 8 : i_ < x ? 1 : 8 : xN < x ? mT < x ? 1 : 8 : xg < x ? 1 : 8 : n8 < x ? TS < x ? xS < x ? 1 : 8 : Jk < x ? 1 : 8 : H8 < x ? _9 < x ? 1 : 8 : WC < x ? 1 : 8 : Xy < x ? gm < x ? Vg < x ? Ah < x ? bh < x ? sk < x ? Im < x ? _w < x ? 1 : 8 : _A < x ? 1 : 8 : aT < x ? WE < x ? 1 : 8 : qP < x ? 1 : 8 : xm < x ? c8 < x ? eg < x ? 1 : 8 : jP < x ? 1 : 8 : Sm < x ? M8 < x ? 1 : 8 : Zw < x ? 1 : 8 : jk < x ? bC < x ? pE < x ? aw < x ? 1 : 8 : hT < x ? 1 : 8 : gC < x ? r8 < x ? 1 : 8 : nA < x ? 1 : 8 : KE < x ? Fp < x ? QS < x ? 1 : 8 : bE < x ? 1 : 8 : My < x ? bb < x ? 1 : 8 : Mw < x ? 1 : 8 : G_ < x ? Bg < x ? g_ < x ? aA < x ? uy < x ? 1 : 8 : N_ < x ? 1 : 8 : T_ < x ? Rg < x ? 1 : 8 : s_ < x ? 1 : 8 : G3 < x ? Ww < x ? fE < x ? 1 : 8 : lP < x ? 1 : 8 : fw < x ? IS < x ? 1 : 8 : wb < x ? 1 : 8 : Tw < x ? uE < x ? aS < x ? vy < x ? 1 : 8 : pS < x ? 1 : 8 : CA < x ? Ay < x ? 1 : 8 : VE < x ? 1 : 8 : BS < x ? mk < x ? Op < x ? 1 : 8 : Aw < x ? 1 : 8 : __ < x ? sA < x ? 1 : 8 : Ig < x ? 1 : 8 : Uy < x ? wI < x ? pg < x ? PC < x ? SP < x ? wg < x ? 1 : 8 : uP < x ? 1 : 8 : Db < x ? _S < x ? 1 : 8 : nE < x ? 1 : 8 : cw < x ? Pw < x ? Gy < x ? 1 : 8 : hA < x ? 1 : 8 : Ob < x ? _o < x ? 1 : 8 : Og < x ? 1 : 8 : EA < x ? Tt < x ? D9 < x ? AI < x ? 1 : 8 : FS < x ? 1 : 8 : GS < x ? DP < x ? 1 : 8 : GA < x ? 1 : 8 : PP < x ? HS < x ? cE < x ? 1 : 8 : Zg < x ? 1 : 8 : sC < x ? dI < x ? 1 : 8 : hI < x ? 1 : 8 : ch < x ? bm < x ? mE < x ? LP < x ? EP < x ? 1 : 8 : QA < x ? 1 : 8 : YT < x ? Yg < x ? 1 : 8 : WS < x ? 1 : 8 : hP < x ? E8 < x ? DS < x ? 1 : 8 : KS < x ? 1 : 8 : Uw < x ? $E < x ? 1 : 8 : FI < x ? 1 : 8 : d_ < x ? OS < x ? d8 < x ? UI < x ? 1 : 8 : mw < x ? 1 : 8 : zg < x ? yg < x ? 1 : 8 : pT < x ? 1 : 8 : tE < x ? zm < x ? jA < x ? 1 : 8 : fg < x ? 1 : 8 : X9 < x ? oS < x ? 1 : 8 : k8 < x ? 1 : 8 : wP < x ? X_ < x ? aP < x ? e_ < x ? YS < x ? pI < x ? Qg < x ? 1 : 8 : qk < x ? 1 : 8 : Yw < x ? IA < x ? 1 : 8 : Hb < x ? 1 : 8 : R8 < x ? Mb < x ? t8 < x ? 1 : 8 : Xm < x ? 1 : 8 : KI < x ? Q9 < x ? 1 : 8 : cT < x ? 1 : 8 : Ty < x ? pb < x ? rT < x ? WP < x ? 1 : 8 : CP < x ? 1 : 8 : FP < x ? BE < x ? 1 : 8 : DC < x ? 1 : 8 : v9 < x ? jy < x ? NI < x ? 1 : 8 : Tg < x ? 1 : 8 : UA < x ? AE < x ? 1 : 8 : yT < x ? 1 : 8 : pw < x ? TC < x ? _C < x ? Cg < x ? g9 < x ? 1 : 8 : LC < x ? 1 : 8 : oC < x ? Yb < x ? 1 : 8 : dT < x ? 1 : 8 : _E < x ? Kb < x ? VA < x ? 1 : 8 : _T < x ? 1 : 8 : bg < x ? a8 < x ? 1 : 8 : wy < x ? 1 : 8 : GT < x ? fS < x ? Bb < x ? AS < x ? 1 : 8 : l9 < x ? 1 : 8 : Um < x ? i8 < x ? 1 : 8 : zS < x ? 1 : 8 : uk < x ? zI < x ? $9 < x ? 1 : 8 : Mg < x ? 1 : 8 : q_ < x ? Tb < x ? 1 : 8 : c_ < x ? 1 : 8 : Nm < x ? gP < x ? cm < x ? FE < x ? U_ < x ? QI < x ? 1 : 8 : Yp < x ? 1 : 8 : TT < x ? OT < x ? 1 : 8 : oI < x ? 1 : 8 : Vm < x ? Y8 < x ? lA < x ? 1 : 8 : cC < x ? 1 : 8 : BC < x ? qT < x ? 1 : 8 : E1 < x ? 1 : 8 : Cm < x ? I_ < x ? jp < x ? LT < x ? 1 : 8 : b_ < x ? 1 : 8 : mm < x ? pA < x ? 1 : 8 : xy < x ? 1 : 8 : Pm < x ? Fk < x ? M9 < x ? 1 : 8 : S8 < x ? 1 : 8 : RS < x ? eA < x ? 1 : 8 : sS < x ? 1 : 8 : xA < x ? hb < x ? Om < x ? Z_ < x ? A9 < x ? 1 : 8 : o8 < x ? 1 : 8 : u_ < x ? Jb < x ? 1 : 8 : T9 < x ? 1 : 8 : db < x ? Ky < x ? uT < x ? 1 : 8 : Km < x ? 1 : 8 : kA < x ? Ug < x ? 1 : 8 : Dk < x ? 1 : 8 : eI < x ? q9 < x ? fy < x ? Up < x ? 1 : 8 : D_ < x ? 1 : 8 : t_ < x ? bT < x ? 1 : 8 : oT < x ? 1 : 8 : nh < x ? S2 < x ? nT < x ? 1 : 8 : fC < x ? 1 : 8 : UP < x ? ib < x ? 1 : 8 : ES < x ? 1 : 8 : Rw < x ? gT < x ? ag < x ? D8 < x ? gI < x ? DA < x ? hC < x ? aC < x ? $g < x ? 1 : 8 : eE < x ? 1 : 8 : SC < x ? hE < x ? 1 : 8 : qm < x ? 1 : 8 : CT < x ? JE < x ? pP < x ? 1 : 8 : YC < x ? 1 : 8 : Lb < x ? MC < x ? 1 : 8 : VC < x ? 1 : 8 : _I < x ? $y < x ? rC < x ? Cy < x ? 1 : 8 : vI < x ? 1 : 8 : _P < x ? nN < x ? 1 : 8 : Wy < x ? 1 : 8 : Cw < x ? SI < x ? mC < x ? 1 : 8 : cy < x ? 1 : 8 : iP < x ? wT < x ? 1 : 8 : KC < x ? 1 : 8 : eP < x ? V8 < x ? tA < x ? oP < x ? RT < x ? 1 : 8 : $5 < x ? 1 : 8 : Xw < x ? gw < x ? 1 : 8 : By < x ? 1 : 8 : by < x ? Xk < x ? L_ < x ? 1 : 8 : mP < x ? 1 : 8 : nP < x ? ph < x ? 1 : 8 : xw < x ? 1 : 8 : Hp < x ? H_ < x ? ZC < x ? Vw < x ? 1 : 8 : vS < x ? 1 : 8 : vP < x ? sw < x ? 1 : 8 : tP < x ? 1 : 8 : $b < x ? KA < x ? lb < x ? 1 : 8 : gy < x ? 1 : 8 : Vy < x ? Ry < x ? 1 : 8 : i9 < x ? 1 : 8 : AA < x ? zC < x ? u9 < x ? oh < x ? ey < x ? $8 < x ? 1 : 8 : HT < x ? 1 : 8 : x8 < x ? V_ < x ? 1 : 8 : vk < x ? 1 : 8 : TE < x ? bS < x ? iA < x ? 1 : 8 : UT < x ? 1 : 8 : Z9 < x ? Wg < x ? 1 : 8 : XP < x ? 1 : 8 : zE < x ? lw < x ? NC < x ? ZI < x ? 1 : 8 : kb < x ? 1 : 8 : V9 < x ? gE < x ? 1 : 8 : Iy < x ? 1 : 8 : o9 < x ? rS < x ? Jg < x ? 1 : 8 : uA < x ? 1 : 8 : VS < x ? a_ < x ? 1 : 8 : vw < x ? 1 : 8 : OI < x ? TA < x ? jT < x ? $I < x ? EE < x ? 1 : 8 : R9 < x ? 1 : 8 : zT < x ? Z5 < x ? 1 : 8 : Zy < x ? 1 : 8 : n_ < x ? iC < x ? kC < x ? 1 : 8 : gA < x ? 1 : 8 : GE < x ? CE < x ? 1 : 8 : 1 : mA < x ? ah < x ? Ub < x ? 8 : CC < x ? 1 : 8 : yS < x ? kS < x ? 1 : 8 : qS < x ? 1 : 8 : r_ < x ? II < x ? XS < x ? 1 : 8 : Iw < x ? 1 : 8 : ST < x ? 1 : 8 : Th < x ? tS < x ? MT < x ? FC < x ? eN < x ? 8 : Fw < x ? dw < x ? 1 : 8 : Ag < x ? 1 : 8 : VT < x ? cP < x ? cI < x ? 1 : 8 : fI < x ? 1 : 8 : a9 < x ? YI < x ? 1 : 8 : QT < x ? 1 : 8 : lh < x ? Ek < x ? Ak < x ? Bw < x ? 1 : 8 : fA < x ? 1 : 8 : Z8 < x ? TP < x ? 1 : 8 : mS < x ? 1 : 8 : iE < x ? _m < x ? my < x ? 1 : 8 : EI < x ? 1 : 8 : B_ < x ? fP < x ? 1 : 8 : B9 < x ? 1 : 8 : NP < x ? nI < x ? WA < x ? F9 < x ? HE < x ? 1 : 8 : 1 : 8 : wS < x ? 8 : pm < x ? RA < x ? 1 : 8 : k_ < x ? 1 : 8 : dy < x ? $m < x ? Av < x ? Vv < x ? 1 : 2 : Y9 < x ? 1 : 8 : PS < x ? sE < x ? 1 : 8 : dE < x ? 1 : 8 : oA < x ? YP < x ? JT < x ? 1 : 8 : uw < x ? 1 : 8 : O9 < x ? qg < x ? 1 : 8 : ZS < x ? 1 : 8 : vg < x ? RP < x ? b8 < x ? pk < x ? ih < x ? d9 < x ? 1 : 8 : Fb < x ? 1 : 8 : ym < x ? Qk < x ? 1 : 8 : uI < x ? 1 : 8 : Ab < x ? qp < x ? N9 < x ? 1 : 8 : og < x ? 1 : 8 : bI < x ? Wk < x ? 1 : 8 : ny < x ? 1 : 8 : yC < x ? y9 < x ? ay < x ? jI < x ? 1 : 8 : PT < x ? 1 : 8 : fb < x ? Hw < x ? 1 : 8 : Ng < x ? 1 : 8 : Xb < x ? MI < x ? W9 < x ? 1 : 8 : h9 < x ? 1 : 8 : FT < x ? 1 : 8 : sI < x ? p8 < x ? Np < x ? mg < x ? 1 : 8 : Q8 < x ? 8 : dg < x ? 1 : 8 : ub < x ? wm < x ? dC < x ? 1 : 8 : WI < x ? 1 : 8 : lg < x ? ky < x ? 1 : 8 : oE < x ? 1 : 8 : BI < x ? AP < x ? Nb < x ? qA < x ? 1 : 8 : 1 : hg < x ? 8 : WT < x ? 1 : 8 : yI < x ? Ny < x ? 1 : 8 : JI < x ? XI < x ? 1 : 8 : r9 < x ? 1 : 8 : qw < x ? l8 < x ? OA < x ? qy < x ? Gb < x ? OP < x ? Rb < x ? YE < x ? 1 : 8 : h_ < x ? 1 : 8 : ew < x ? ob < x ? 1 : 8 : dS < x ? 1 : 8 : wA < x ? BA < x ? fm < x ? 1 : 8 : 1 : 8 : hS < x ? tg < x ? Vr < x ? AT < x ? 1 : 8 : PI < x ? 1 : 8 : Bp < x ? eb < x ? 1 : 8 : jC < x ? 1 : 8 : iw < x ? n9 < x ? 1 : 8 : Oy < x ? C_ < x ? 1 : 8 : W8 < x ? 1 : 8 : S9 < x ? SE < x ? ab < x ? LI < x ? GI < x ? 1 : 8 : yw < x ? 1 : 8 : tI < x ? bA < x ? 1 : 8 : W5 < x ? 1 : 8 : zP < x ? Yk < x ? cb < x ? 1 : 8 : $k < x ? 1 : 8 : Lg < x ? Vb < x ? 1 : 8 : bw < x ? 1 : 8 : iT < x ? jg < x ? dP < x ? ZT < x ? 1 : 8 : ow < x ? 1 : 8 : NE < x ? j9 < x ? 1 : 8 : zy < x ? 1 : 8 : ly < x && x_ < x ? 1 : 8 : U9 < x ? Ow < x ? K9 < x ? IP < x ? 8 : uS < x ? tT < x ? 1 : 8 : FA < x ? 1 : 8 : ZE < x ? rb < x ? $_ < x ? 1 : 8 : 1 : 8 : Q5 < x ? kg < x && DI < x ? 1 : 8 : Ly < x ? O_ < x ? Py < x ? 1 : 8 : 1 : $w < x ? 8 : 1 : Lw < x ? kw < x ? ek < x ? 8 : Pg < x ? 1 : 8 : JC < x ? rA < x ? oy < x ? 1 : 8 : Sw < x ? 1 : 8 : H9 < x ? 1 : 8 : vT < x ? c9 < x ? yy < x ? 1 : 8 : xT < x ? 1 : 8 : MP < x ? P_ < x ? 8 : C9 < x ? 1 : 8 : vA < x ? wE < x ? 1 : 8 : xE < x ? 1 : 8 : PE < x ? MA < x ? RC < x ? _h < x ? lC < x ? Ym < x ? lI < x ? 1 : 8 : Xg < x ? 1 : 8 : J_ < x ? 1 : 8 : BT < x ? X8 < x ? k9 < x ? 1 : 8 : 1 : 8 : mb < x ? pC < x ? tN < x ? wC < x ? 1 : 8 : 1 : 8 : Y_ < x ? uh < x ? xb < x ? 1 : 8 : Jy < x ? 1 : 8 : rI < x ? 1 : 8 : km < x ? Ip < x ? Uv < x ? gS < x ? 8 : qv < x ? 1 : 2 : sh < x ? aI < x ? 1 : 8 : ZP < x ? 1 : 8 : Uk < x ? z8 < x ? yP < x ? 1 : 8 : LE < x ? 1 : 8 : bp < x ? Qw < x ? 1 : 8 : XC < x ? 1 : 8 : Kg < x ? yb < x ? lm < x ? lE < x ? 1 : 8 : Yy < x ? 1 : 8 : ak < x ? XE < x ? 1 : 8 : u8 < x ? 1 : 8 : nw < x ? vE < x ? K_ < x ? 1 : 8 : Fm < x ? 1 : 8 : om < x ? gp < x ? 1 : 8 : tC < x ? 1 : 8 : Hm < x ? lS < x ? Fg < x ? z9 < x ? yE < x ? Fy < x ? 1 : 8 : f9 < x ? 1 : 8 : iS < x ? 1 : 8 : RI < x ? jb < x ? 8 : 1 : 8 : sT < x ? qb < x ? HA < x ? Lk < x ? 1 : 8 : A_ < x ? 1 : 8 : PA < x ? nS < x ? 1 : 8 : 1 : 8 : JA < x ? Gw < x ? Jm < x ? gk < x ? Ik < x ? 1 : 8 : th < x ? 1 : 8 : _b < x ? _8 < x ? 1 : 8 : 1 : tk < x ? LA < x ? 8 : dk < x ? 1 : 8 : LS < x ? DE < x ? 1 : 8 : Gm < x ? 1 : 8 : yA < x ? P9 < x ? W_ < x ? dm < x ? 1 : 8 : _g < x ? 1 : 8 : _y < x ? f8 < x ? 1 : 8 : F8 < x ? 1 : 8 : Dv < x ? Ov < x ? Jv < x ? 1 : 2 : Mv < x ? 1 : 2 : v2 < x ? e2 < x ? 1 : 3 : Cv < x ? 1 : 2 : z0(`\x07\b +\v\x07\f\r\x1B  ! "#$%                                                                                                                                                                                                                                                         `, x + 1 | 0) - 1 | 0; + } + function NO(x) { + return 45 < x ? 46 < x ? -1 : 0 : -1; + } + function Ls(x) { + return 8 < x ? nC < x ? Rv < x ? Vv < x ? -1 : qv < x ? Av < x ? 0 : -1 : Mv < x ? Ov < x ? Jv < x ? Uv < x ? 0 : -1 : 0 : -1 : Cv < x ? Dv < x ? 0 : -1 : 0 : -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Er(x) { + return 47 < x ? 57 < x ? -1 : 0 : -1; + } + function Pr(x) { + return 47 < x ? Ee < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Rt(x) { + return 47 < x ? n2 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function RU(x) { + return 47 < x ? 59 < x ? -1 : z0("\0", x + r2 | 0) - 1 | 0 : -1; + } + function Ft(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function hd(x) { + return 87 < x ? Cf < x ? -1 : z0(TI, x - 88 | 0) - 1 | 0 : -1; + } + function Go(x) { + return 45 < x ? 57 < x ? -1 : z0("\0", x + Po | 0) - 1 | 0 : -1; + } + function OO(x) { + return -1 < x ? e1 < x ? un < x ? v2 < x ? e2 < x ? 0 : -1 : 0 : -1 : z0("\0\0\0\0", x) - 1 | 0 : -1; + } + function FU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function o3(x) { + return 47 < x ? So < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Cl(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function dd(x) { + return 45 < x ? k1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + Po | 0) - 1 | 0 : -1; + } + function MU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function yd(x) { + return 47 < x ? 95 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function _d(x) { + return 47 < x ? n2 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function wd(x) { + return 47 < x ? n2 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function gd(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function bd(x) { + return 8 < x ? nC < x ? Rv < x ?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0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x - 9 | 0) - 1 | 0 : -1; + } + function qs(x) { + return 47 < x ? 49 < x ? -1 : 0 : -1; + } + function Td(x) { + return 47 < x ? 95 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Yo(x) { + return 47 < x ? 57 < x ? -1 : z0("", x + r2 | 0) - 1 | 0 : -1; + } + function Ed(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function v3(x) { + return k2 < x ? wr < x ? -1 : 0 : -1; + } + function gn(x) { + return 60 < x ? 61 < x ? -1 : 0 : -1; + } + function Nl(x) { + return 47 < x ? n2 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Sd(x) { + return 47 < x ? n2 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function jO(x) { + return 60 < x ? 62 < x ? -1 : z0(Em, x + CL | 0) - 1 | 0 : -1; + } + function Ad(x) { + return 65 < x ? 98 < x ? -1 : z0(TI, x - 66 | 0) - 1 | 0 : -1; + } + function q1(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Id(x) { + return wr < x ? Ca < x ? -1 : 0 : -1; + } + function re(x) { + return 47 < x ? 55 < x ? -1 : 0 : -1; + } + function Pd(x) { + return wo < x ? n2 < x ? -1 : 0 : -1; + } + function Ol(x) { + return n2 < x ? nn < x ? -1 : 0 : -1; + } + function I4(x) { + return 98 < x ? 99 < x ? -1 : 0 : -1; + } + function Ae(x) { + return 47 < x ? 48 < x ? -1 : 0 : -1; + } + function Cd(x) { + return 45 < x ? k1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + Po | 0) - 1 | 0 : -1; + } + function Nd(x) { + return 78 < x ? nn < x ? -1 : z0(TI, x - 79 | 0) - 1 | 0 : -1; + } + function LU(x) { + return 41 < x ? 42 < x ? -1 : 0 : -1; + } + function qU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Od(x) { + return 47 < x ? k1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function zo(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function BU(x) { + return 41 < x ? 61 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + sg | 0) - 1 | 0 : -1; + } + function UU(x) { + return 44 < x ? 45 < x ? -1 : 0 : -1; + } + function jd(x) { + return ec < x ? p2 < x ? -1 : 0 : -1; + } + function Dd(x) { + return Te < x ? d2 < x ? -1 : 0 : -1; + } + function DO(x) { + return 99 < x ? cr < x ? -1 : 0 : -1; + } + function Rd(x) { + return 47 < x ? Ee < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function P4(x) { + return ef < x ? k2 < x ? -1 : 0 : -1; + } + function jl(x) { + return 45 < x ? 57 < x ? -1 : z0("\0", x + Po | 0) - 1 | 0 : -1; + } + function XU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function l3(x) { + return 47 < x ? un < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function GU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x07\b\0\0\0\0\0\0 \x07\b", x + l2 | 0) - 1 | 0 : -1; + } + function Ie(x) { + return 9 < x ? 10 < x ? -1 : 0 : -1; + } + function YU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function zU(x) { + return 96 < x ? 97 < x ? -1 : 0 : -1; + } + function Bs(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Fd(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Jo(x) { + return 47 < x ? 95 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function JU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Ja(x) { + return cr < x ? k1 < x ? -1 : 0 : -1; + } + function KU(x) { + return 58 < x ? 59 < x ? -1 : 0 : -1; + } + function HU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function Md(x) { + return 41 < x ? 47 < x ? -1 : z0(MF, x + sg | 0) - 1 | 0 : -1; + } + function Ld(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function WU(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function VU(x) { + return q6 < x ? b6 < x ? -1 : 0 : -1; + } + function qd(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function $U(x) { + return nn < x ? h2 < x ? -1 : 0 : -1; + } + function pe(x) { + return 47 < x ? k1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Bd(x) { + return 42 < x ? 57 < x ? -1 : z0("\0\0\0", x + vb | 0) - 1 | 0 : -1; + } + function QU(x) { + return 47 < x ? Ee < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + r2 | 0) - 1 | 0 : -1; + } + function Ko(x) { + return 45 < x ? 95 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + Po | 0) - 1 | 0 : -1; + } + function Ho(x) { + return Ca < x ? Z6 < x ? -1 : 0 : -1; + } + function ZU(x) { + return 46 < x ? 47 < x ? -1 : 0 : -1; + } + function xX(x) { + return 57 < x ? 58 < x ? -1 : 0 : -1; + } + function HE0(x) { + return Rv < x ? eC < x ? -1 : xC < x ? Xp < x ? YA < x ? Wb < x ? rg < x ? 1 : 6 : MS < x ? Eb < x ? e9 < x ? 1 : 6 : vC < x ? 1 : 6 : Zb < x ? kE < x ? 1 : 6 : Nw < x ? 1 : 6 : xk < x ? $p < x ? nk < x ? Kp < x ? P8 < x ? m8 < x ? Jw < x ? 1 : 6 : y_ < x ? 1 : 6 : iy < x ? b9 < x ? 1 : 6 : qC < x ? 1 : 6 : Vk < x ? Bm < x ? XA < x ? 1 : 6 : O8 < x ? 1 : 6 : A8 < x ? XT < x ? 1 : 6 : Eg < x ? 1 : 6 : Sk < x ? Dy < x ? Rp < x ? sb < x ? 1 : 6 : fT < x ? 1 : 6 : Wp < x ? Zm < x ? 1 : 6 : SA < x ? 1 : 6 : rh < x ? Jp < x ? q8 < x ? 1 : 6 : ok < x ? 1 : 6 : y8 < x ? am < x ? 1 : 6 : Zk < x ? 1 : 6 : tw < x ? Mp < x ? xh < x ? kT < x ? j8 < x ? 1 : 6 : Dm < x ? 1 : 6 : Mk < x ? M_ < x ? 1 : 6 : Dg < x ? 1 : 6 : Qp < x ? vm < x ? vh < x ? 1 : 6 : hh < x ? 1 : 6 : HC < x ? Eh < x ? 1 : 6 : fh < x ? 1 : 6 : J8 < x ? N8 < x ? tm < x ? Vp < x ? 1 : 6 : kh < x ? 1 : 6 : Ep < x ? Ib < x ? 1 : 6 : zA < x ? 1 : 6 : yh < x ? $C < x ? Mm < x ? 1 : 6 : Pp < x ? 1 : 6 : hm < x ? eS < x ? 1 : 6 : v_ < x ? 1 : 6 : HI < x ? Ew < x ? F_ < x ? p9 < x ? Q_ < x ? hy < x ? 1 : 6 : eT < x ? 1 : 6 : xP < x ? UC < x ? 1 : 6 : Sy < x ? 1 : 6 : zw < x ? G9 < x ? JP < x ? 1 : 6 : GC < x ? 1 : 6 : w9 < x ? ry < x ? 1 : 6 : $T < x ? 1 : 6 : aE < x ? m_ < x ? bP < x ? GP < x ? 1 : 6 : uC < x ? 1 : 6 : R_ < x ? Sp < x ? 1 : 6 : kP < x ? 1 : 6 : V5 < x ? QC < x ? ww < x ? 1 : 6 : 1 : 6 : wh < x ? w8 < x ? Cp < x ? Nk < x ? ET < x ? 1 : 6 : SS < x ? 1 : 6 : zp < x ? gg < x ? 1 : 6 : IT < x ? 1 : 6 : C8 < x ? Zp < x ? rN < x ? 1 : 6 : Hy < x ? 1 : 6 : Rk < x ? S_ < x ? 1 : 6 : nb < x ? 1 : 6 : eh < x ? yk < x ? T8 < x ? tb < x ? 1 : 6 : i_ < x ? 1 : 6 : xN < x ? mT < x ? 1 : 6 : xg < x ? 1 : 6 : n8 < x ? TS < x ? xS < x ? 1 : 6 : Jk < x ? 1 : 6 : H8 < x ? _9 < x ? 1 : 6 : WC < x ? 1 : 6 : Xy < x ? gm < x ? Vg < x ? Ah < x ? bh < x ? sk < x ? Im < x ? _w < x ? 1 : 6 : _A < x ? 1 : 6 : aT < x ? WE < x ? 1 : 6 : qP < x ? 1 : 6 : xm < x ? c8 < x ? eg < x ? 1 : 6 : jP < x ? 1 : 6 : Sm < x ? M8 < x ? 1 : 6 : Zw < x ? 1 : 6 : jk < x ? bC < x ? pE < x ? aw < x ? 1 : 6 : hT < x ? 1 : 6 : gC < x ? r8 < x ? 1 : 6 : nA < x ? 1 : 6 : KE < x ? Fp < x ? QS < x ? 1 : 6 : bE < x ? 1 : 6 : My < x ? bb < x ? 1 : 6 : Mw < x ? 1 : 6 : G_ < x ? Bg < x ? g_ < x ? aA < x ? uy < x ? 1 : 6 : N_ < x ? 1 : 6 : T_ < x ? Rg < x ? 1 : 6 : s_ < x ? 1 : 6 : G3 < x ? Ww < x ? fE < x ? 1 : 6 : lP < x ? 1 : 6 : fw < x ? IS < x ? 1 : 6 : wb < x ? 1 : 6 : Tw < x ? uE < x ? aS < x ? vy < x ? 1 : 6 : pS < x ? 1 : 6 : CA < x ? Ay < x ? 1 : 6 : VE < x ? 1 : 6 : BS < x ? mk < x ? Op < x ? 1 : 6 : Aw < x ? 1 : 6 : __ < x ? sA < x ? 1 : 6 : Ig < x ? 1 : 6 : Uy < x ? wI < x ? pg < x ? PC < x ? SP < x ? wg < x ? 1 : 6 : uP < x ? 1 : 6 : Db < x ? _S < x ? 1 : 6 : nE < x ? 1 : 6 : cw < x ? Pw < x ? Gy < x ? 1 : 6 : hA < x ? 1 : 6 : Ob < x ? _o < x ? 1 : 6 : Og < x ? 1 : 6 : EA < x ? Tt < x ? D9 < x ? AI < x ? 1 : 6 : FS < x ? 1 : 6 : GS < x ? DP < x ? 1 : 6 : GA < x ? 1 : 6 : PP < x ? HS < x ? cE < x ? 1 : 6 : Zg < x ? 1 : 6 : sC < x ? dI < x ? 1 : 6 : hI < x ? 1 : 6 : ch < x ? bm < x ? mE < x ? LP < x ? EP < x ? 1 : 6 : QA < x ? 1 : 6 : YT < x ? Yg < x ? 1 : 6 : WS < x ? 1 : 6 : hP < x ? E8 < x ? DS < x ? 1 : 6 : KS < x ? 1 : 6 : Uw < x ? $E < x ? 1 : 6 : FI < x ? 1 : 6 : d_ < x ? OS < x ? d8 < x ? UI < x ? 1 : 6 : mw < x ? 1 : 6 : zg < x ? yg < x ? 1 : 6 : pT < x ? 1 : 6 : tE < x ? zm < x ? jA < x ? 1 : 6 : fg < x ? 1 : 6 : X9 < x ? oS < x ? 1 : 6 : k8 < x ? 1 : 6 : wP < x ? X_ < x ? aP < x ? e_ < x ? YS < x ? pI < x ? Qg < x ? 1 : 6 : qk < x ? 1 : 6 : Yw < x ? IA < x ? 1 : 6 : Hb < x ? 1 : 6 : R8 < x ? Mb < x ? t8 < x ? 1 : 6 : Xm < x ? 1 : 6 : KI < x ? Q9 < x ? 1 : 6 : cT < x ? 1 : 6 : Ty < x ? pb < x ? rT < x ? WP < x ? 1 : 6 : CP < x ? 1 : 6 : FP < x ? BE < x ? 1 : 6 : DC < x ? 1 : 6 : v9 < x ? jy < x ? NI < x ? 1 : 6 : Tg < x ? 1 : 6 : UA < x ? AE < x ? 1 : 6 : yT < x ? 1 : 6 : pw < x ? TC < x ? _C < x ? Cg < x ? g9 < x ? 1 : 6 : LC < x ? 1 : 6 : oC < x ? Yb < x ? 1 : 6 : dT < x ? 1 : 6 : _E < x ? Kb < x ? VA < x ? 1 : 6 : _T < x ? 1 : 6 : bg < x ? a8 < x ? 1 : 6 : wy < x ? 1 : 6 : GT < x ? fS < x ? Bb < x ? AS < x ? 1 : 6 : l9 < x ? 1 : 6 : Um < x ? i8 < x ? 1 : 6 : zS < x ? 1 : 6 : uk < x ? zI < x ? $9 < x ? 1 : 6 : Mg < x ? 1 : 6 : q_ < x ? Tb < x ? 1 : 6 : c_ < x ? 1 : 6 : Nm < x ? gP < x ? cm < x ? FE < x ? U_ < x ? QI < x ? 1 : 6 : Yp < x ? 1 : 6 : TT < x ? OT < x ? 1 : 6 : oI < x ? 1 : 6 : Vm < x ? Y8 < x ? lA < x ? 1 : 6 : cC < x ? 1 : 6 : BC < x ? qT < x ? 1 : 6 : E1 < x ? 1 : 6 : Cm < x ? I_ < x ? jp < x ? LT < x ? 1 : 6 : b_ < x ? 1 : 6 : mm < x ? pA < x ? 1 : 6 : xy < x ? 1 : 6 : Pm < x ? Fk < x ? M9 < x ? 1 : 6 : S8 < x ? 1 : 6 : RS < x ? eA < x ? 1 : 6 : sS < x ? 1 : 6 : xA < x ? hb < x ? Om < x ? Z_ < x ? A9 < x ? 1 : 6 : o8 < x ? 1 : 6 : u_ < x ? Jb < x ? 1 : 6 : T9 < x ? 1 : 6 : db < x ? Ky < x ? uT < x ? 1 : 6 : Km < x ? 1 : 6 : kA < x ? Ug < x ? 1 : 6 : Dk < x ? 1 : 6 : eI < x ? q9 < x ? fy < x ? Up < x ? 1 : 6 : D_ < x ? 1 : 6 : t_ < x ? bT < x ? 1 : 6 : oT < x ? 1 : 6 : nh < x ? S2 < x ? nT < x ? 1 : 6 : fC < x ? 1 : 6 : UP < x ? ib < x ? 1 : 6 : ES < x ? 1 : 6 : Rw < x ? gT < x ? ag < x ? D8 < x ? gI < x ? DA < x ? hC < x ? aC < x ? $g < x ? 1 : 6 : eE < x ? 1 : 6 : SC < x ? hE < x ? 1 : 6 : qm < x ? 1 : 6 : CT < x ? JE < x ? pP < x ? 1 : 6 : YC < x ? 1 : 6 : Lb < x ? MC < x ? 1 : 6 : VC < x ? 1 : 6 : _I < x ? $y < x ? rC < x ? Cy < x ? 1 : 6 : vI < x ? 1 : 6 : _P < x ? nN < x ? 1 : 6 : Wy < x ? 1 : 6 : Cw < x ? SI < x ? mC < x ? 1 : 6 : cy < x ? 1 : 6 : iP < x ? wT < x ? 1 : 6 : KC < x ? 1 : 6 : eP < x ? V8 < x ? tA < x ? oP < x ? RT < x ? 1 : 6 : $5 < x ? 1 : 6 : Xw < x ? gw < x ? 1 : 6 : By < x ? 1 : 6 : by < x ? Xk < x ? L_ < x ? 1 : 6 : mP < x ? 1 : 6 : nP < x ? ph < x ? 1 : 6 : xw < x ? 1 : 6 : Hp < x ? H_ < x ? ZC < x ? Vw < x ? 1 : 6 : vS < x ? 1 : 6 : vP < x ? sw < x ? 1 : 6 : tP < x ? 1 : 6 : $b < x ? KA < x ? lb < x ? 1 : 6 : gy < x ? 1 : 6 : Vy < x ? Ry < x ? 1 : 6 : i9 < x ? 1 : 6 : AA < x ? zC < x ? u9 < x ? oh < x ? ey < x ? $8 < x ? 1 : 6 : HT < x ? 1 : 6 : x8 < x ? V_ < x ? 1 : 6 : vk < x ? 1 : 6 : TE < x ? bS < x ? iA < x ? 1 : 6 : UT < x ? 1 : 6 : Z9 < x ? Wg < x ? 1 : 6 : XP < x ? 1 : 6 : zE < x ? lw < x ? NC < x ? ZI < x ? 1 : 6 : kb < x ? 1 : 6 : V9 < x ? gE < x ? 1 : 6 : Iy < x ? 1 : 6 : o9 < x ? rS < x ? Jg < x ? 1 : 6 : uA < x ? 1 : 6 : VS < x ? a_ < x ? 1 : 6 : vw < x ? 1 : 6 : OI < x ? TA < x ? jT < x ? $I < x ? EE < x ? 1 : 6 : R9 < x ? 1 : 6 : zT < x ? Z5 < x ? 1 : 6 : Zy < x ? 1 : 6 : n_ < x ? iC < x ? kC < x ? 1 : 6 : gA < x ? 1 : 6 : GE < x ? CE < x ? 1 : 6 : 1 : mA < x ? ah < x ? Ub < x ? 6 : CC < x ? 1 : 6 : yS < x ? kS < x ? 1 : 6 : qS < x ? 1 : 6 : r_ < x ? II < x ? XS < x ? 1 : 6 : Iw < x ? 1 : 6 : ST < x ? 1 : 6 : Th < x ? tS < x ? MT < x ? FC < x ? eN < x ? 6 : Fw < x ? dw < x ? 1 : 6 : Ag < x ? 1 : 6 : VT < x ? cP < x ? cI < x ? 1 : 6 : fI < x ? 1 : 6 : a9 < x ? YI < x ? 1 : 6 : QT < x ? 1 : 6 : lh < x ? Ek < x ? Ak < x ? Bw < x ? 1 : 6 : fA < x ? 1 : 6 : Z8 < x ? TP < x ? 1 : 6 : mS < x ? 1 : 6 : iE < x ? _m < x ? my < x ? 1 : 6 : EI < x ? 1 : 6 : B_ < x ? fP < x ? 1 : 6 : B9 < x ? 1 : 6 : NP < x ? nI < x ? WA < x ? F9 < x ? HE < x ? 1 : 6 : 1 : 6 : wS < x ? 6 : pm < x ? RA < x ? 1 : 6 : k_ < x ? 1 : 6 : dy < x ? $m < x ? Av < x ? Vv < x ? 1 : 2 : Y9 < x ? 1 : 6 : PS < x ? sE < x ? 1 : 6 : dE < x ? 1 : 6 : oA < x ? YP < x ? JT < x ? 1 : 6 : uw < x ? 1 : 6 : O9 < x ? qg < x ? 1 : 6 : ZS < x ? 1 : 6 : vg < x ? RP < x ? b8 < x ? pk < x ? ih < x ? d9 < x ? 1 : 6 : Fb < x ? 1 : 6 : ym < x ? Qk < x ? 1 : 6 : uI < x ? 1 : 6 : Ab < x ? qp < x ? N9 < x ? 1 : 6 : og < x ? 1 : 6 : bI < x ? Wk < x ? 1 : 6 : ny < x ? 1 : 6 : yC < x ? y9 < x ? ay < x ? jI < x ? 1 : 6 : PT < x ? 1 : 6 : fb < x ? Hw < x ? 1 : 6 : Ng < x ? 1 : 6 : Xb < x ? MI < x ? W9 < x ? 1 : 6 : h9 < x ? 1 : 6 : FT < x ? 1 : 6 : sI < x ? p8 < x ? Np < x ? mg < x ? 1 : 6 : Q8 < x ? 6 : dg < x ? 1 : 6 : ub < x ? wm < x ? dC < x ? 1 : 6 : WI < x ? 1 : 6 : lg < x ? ky < x ? 1 : 6 : oE < x ? 1 : 6 : BI < x ? AP < x ? Nb < x ? qA < x ? 1 : 6 : 1 : hg < x ? 6 : WT < x ? 1 : 6 : yI < x ? Ny < x ? 1 : 6 : JI < x ? XI < x ? 1 : 6 : r9 < x ? 1 : 6 : qw < x ? l8 < x ? OA < x ? qy < x ? Gb < x ? OP < x ? Rb < x ? YE < x ? 1 : 6 : h_ < x ? 1 : 6 : ew < x ? ob < x ? 1 : 6 : dS < x ? 1 : 6 : wA < x ? BA < x ? fm < x ? 1 : 6 : 1 : 6 : hS < x ? tg < x ? Vr < x ? AT < x ? 1 : 6 : PI < x ? 1 : 6 : Bp < x ? eb < x ? 1 : 6 : jC < x ? 1 : 6 : iw < x ? n9 < x ? 1 : 6 : Oy < x ? C_ < x ? 1 : 6 : W8 < x ? 1 : 6 : S9 < x ? SE < x ? ab < x ? LI < x ? GI < x ? 1 : 6 : yw < x ? 1 : 6 : tI < x ? bA < x ? 1 : 6 : W5 < x ? 1 : 6 : zP < x ? Yk < x ? cb < x ? 1 : 6 : $k < x ? 1 : 6 : Lg < x ? Vb < x ? 1 : 6 : bw < x ? 1 : 6 : iT < x ? jg < x ? dP < x ? ZT < x ? 1 : 6 : ow < x ? 1 : 6 : NE < x ? j9 < x ? 1 : 6 : zy < x ? 1 : 6 : ly < x && x_ < x ? 1 : 6 : U9 < x ? Ow < x ? K9 < x ? IP < x ? 6 : uS < x ? tT < x ? 1 : 6 : FA < x ? 1 : 6 : ZE < x ? rb < x ? $_ < x ? 1 : 6 : 1 : 6 : Q5 < x ? kg < x && DI < x ? 1 : 6 : Ly < x ? O_ < x ? Py < x ? 1 : 6 : 1 : $w < x ? 6 : 1 : Lw < x ? kw < x ? ek < x ? 6 : Pg < x ? 1 : 6 : JC < x ? rA < x ? oy < x ? 1 : 6 : Sw < x ? 1 : 6 : H9 < x ? 1 : 6 : vT < x ? c9 < x ? yy < x ? 1 : 6 : xT < x ? 1 : 6 : MP < x ? P_ < x ? 6 : C9 < x ? 1 : 6 : vA < x ? wE < x ? 1 : 6 : xE < x ? 1 : 6 : PE < x ? MA < x ? RC < x ? _h < x ? lC < x ? Ym < x ? lI < x ? 1 : 6 : Xg < x ? 1 : 6 : J_ < x ? 1 : 6 : BT < x ? X8 < x ? k9 < x ? 1 : 6 : 1 : 6 : mb < x ? pC < x ? tN < x ? wC < x ? 1 : 6 : 1 : 6 : Y_ < x ? uh < x ? xb < x ? 1 : 6 : Jy < x ? 1 : 6 : rI < x ? 1 : 6 : km < x ? Ip < x ? Uv < x ? gS < x ? 6 : qv < x ? 1 : 2 : sh < x ? aI < x ? 1 : 6 : ZP < x ? 1 : 6 : Uk < x ? z8 < x ? yP < x ? 1 : 6 : LE < x ? 1 : 6 : bp < x ? Qw < x ? 1 : 6 : XC < x ? 1 : 6 : Kg < x ? yb < x ? lm < x ? lE < x ? 1 : 6 : Yy < x ? 1 : 6 : ak < x ? XE < x ? 1 : 6 : u8 < x ? 1 : 6 : nw < x ? vE < x ? K_ < x ? 1 : 6 : Fm < x ? 1 : 6 : om < x ? gp < x ? 1 : 6 : tC < x ? 1 : 6 : Hm < x ? lS < x ? Fg < x ? z9 < x ? yE < x ? Fy < x ? 1 : 6 : f9 < x ? 1 : 6 : iS < x ? 1 : 6 : RI < x ? jb < x ? 6 : 1 : 6 : sT < x ? qb < x ? HA < x ? Lk < x ? 1 : 6 : A_ < x ? 1 : 6 : PA < x ? nS < x ? 1 : 6 : 1 : 6 : JA < x ? Gw < x ? Jm < x ? gk < x ? Ik < x ? 1 : 6 : th < x ? 1 : 6 : _b < x ? _8 < x ? 1 : 6 : 1 : tk < x ? LA < x ? 6 : dk < x ? 1 : 6 : LS < x ? DE < x ? 1 : 6 : Gm < x ? 1 : 6 : yA < x ? P9 < x ? W_ < x ? dm < x ? 1 : 6 : _g < x ? 1 : 6 : _y < x ? f8 < x ? 1 : 6 : F8 < x ? 1 : 6 : Dv < x ? Ov < x ? Jv < x ? 1 : 2 : Mv < x ? 1 : 2 : v2 < x ? e2 < x ? 1 : 3 : Cv < x ? 1 : 2 : z0(`\x07\b  +\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x1B\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07 \x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07`, x + 1 | 0) - 1 | 0; + } + function mr(x) { + return 35 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x + l2 | 0) - 1 | 0 : -1; + } + function rX(x) { + return 34 < x ? e1 < x ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", x - 35 | 0) - 1 | 0 : -1; + } + function WE0(x) { + return Rv < x ? eC < x ? -1 : xC < x ? Xp < x ? YA < x ? Wb < x ? rg < x ? 1 : 6 : MS < x ? Eb < x ? e9 < x ? 1 : 6 : vC < x ? 1 : 6 : Zb < x ? kE < x ? 1 : 6 : Nw < x ? 1 : 6 : xk < x ? $p < x ? nk < x ? Kp < x ? P8 < x ? m8 < x ? Jw < x ? 1 : 6 : y_ < x ? 1 : 6 : iy < x ? b9 < x ? 1 : 6 : qC < x ? 1 : 6 : Vk < x ? Bm < x ? XA < x ? 1 : 6 : O8 < x ? 1 : 6 : A8 < x ? XT < x ? 1 : 6 : Eg < x ? 1 : 6 : Sk < x ? Dy < x ? Rp < x ? sb < x ? 1 : 6 : fT < x ? 1 : 6 : Wp < x ? Zm < x ? 1 : 6 : SA < x ? 1 : 6 : rh < x ? Jp < x ? q8 < x ? 1 : 6 : ok < x ? 1 : 6 : y8 < x ? am < x ? 1 : 6 : Zk < x ? 1 : 6 : tw < x ? Mp < x ? xh < x ? kT < x ? j8 < x ? 1 : 6 : Dm < x ? 1 : 6 : Mk < x ? M_ < x ? 1 : 6 : Dg < x ? 1 : 6 : Qp < x ? vm < x ? vh < x ? 1 : 6 : hh < x ? 1 : 6 : HC < x ? Eh < x ? 1 : 6 : fh < x ? 1 : 6 : J8 < x ? N8 < x ? tm < x ? Vp < x ? 1 : 6 : kh < x ? 1 : 6 : Ep < x ? Ib < x ? 1 : 6 : zA < x ? 1 : 6 : yh < x ? $C < x ? Mm < x ? 1 : 6 : Pp < x ? 1 : 6 : hm < x ? eS < x ? 1 : 6 : v_ < x ? 1 : 6 : HI < x ? Ew < x ? F_ < x ? p9 < x ? Q_ < x ? hy < x ? 1 : 6 : eT < x ? 1 : 6 : xP < x ? UC < x ? 1 : 6 : Sy < x ? 1 : 6 : zw < x ? G9 < x ? JP < x ? 1 : 6 : GC < x ? 1 : 6 : w9 < x ? ry < x ? 1 : 6 : $T < x ? 1 : 6 : aE < x ? m_ < x ? bP < x ? GP < x ? 1 : 6 : uC < x ? 1 : 6 : R_ < x ? Sp < x ? 1 : 6 : kP < x ? 1 : 6 : V5 < x ? QC < x ? ww < x ? 1 : 6 : 1 : 6 : wh < x ? w8 < x ? Cp < x ? Nk < x ? ET < x ? 1 : 6 : SS < x ? 1 : 6 : zp < x ? gg < x ? 1 : 6 : IT < x ? 1 : 6 : C8 < x ? Zp < x ? rN < x ? 1 : 6 : Hy < x ? 1 : 6 : Rk < x ? S_ < x ? 1 : 6 : nb < x ? 1 : 6 : eh < x ? yk < x ? T8 < x ? tb < x ? 1 : 6 : i_ < x ? 1 : 6 : xN < x ? mT < x ? 1 : 6 : xg < x ? 1 : 6 : n8 < x ? TS < x ? xS < x ? 1 : 6 : Jk < x ? 1 : 6 : H8 < x ? _9 < x ? 1 : 6 : WC < x ? 1 : 6 : Xy < x ? gm < x ? Vg < x ? Ah < x ? bh < x ? sk < x ? Im < x ? _w < x ? 1 : 6 : _A < x ? 1 : 6 : aT < x ? WE < x ? 1 : 6 : qP < x ? 1 : 6 : xm < x ? c8 < x ? eg < x ? 1 : 6 : jP < x ? 1 : 6 : Sm < x ? M8 < x ? 1 : 6 : Zw < x ? 1 : 6 : jk < x ? bC < x ? pE < x ? aw < x ? 1 : 6 : hT < x ? 1 : 6 : gC < x ? r8 < x ? 1 : 6 : nA < x ? 1 : 6 : KE < x ? Fp < x ? QS < x ? 1 : 6 : bE < x ? 1 : 6 : My < x ? bb < x ? 1 : 6 : Mw < x ? 1 : 6 : G_ < x ? Bg < x ? g_ < x ? aA < x ? uy < x ? 1 : 6 : N_ < x ? 1 : 6 : T_ < x ? Rg < x ? 1 : 6 : s_ < x ? 1 : 6 : G3 < x ? Ww < x ? fE < x ? 1 : 6 : lP < x ? 1 : 6 : fw < x ? IS < x ? 1 : 6 : wb < x ? 1 : 6 : Tw < x ? uE < x ? aS < x ? vy < x ? 1 : 6 : pS < x ? 1 : 6 : CA < x ? Ay < x ? 1 : 6 : VE < x ? 1 : 6 : BS < x ? mk < x ? Op < x ? 1 : 6 : Aw < x ? 1 : 6 : __ < x ? sA < x ? 1 : 6 : Ig < x ? 1 : 6 : Uy < x ? wI < x ? pg < x ? PC < x ? SP < x ? wg < x ? 1 : 6 : uP < x ? 1 : 6 : Db < x ? _S < x ? 1 : 6 : nE < x ? 1 : 6 : cw < x ? Pw < x ? Gy < x ? 1 : 6 : hA < x ? 1 : 6 : Ob < x ? _o < x ? 1 : 6 : Og < x ? 1 : 6 : EA < x ? Tt < x ? D9 < x ? AI < x ? 1 : 6 : FS < x ? 1 : 6 : GS < x ? DP < x ? 1 : 6 : GA < x ? 1 : 6 : PP < x ? HS < x ? cE < x ? 1 : 6 : Zg < x ? 1 : 6 : sC < x ? dI < x ? 1 : 6 : hI < x ? 1 : 6 : ch < x ? bm < x ? mE < x ? LP < x ? EP < x ? 1 : 6 : QA < x ? 1 : 6 : YT < x ? Yg < x ? 1 : 6 : WS < x ? 1 : 6 : hP < x ? E8 < x ? DS < x ? 1 : 6 : KS < x ? 1 : 6 : Uw < x ? $E < x ? 1 : 6 : FI < x ? 1 : 6 : d_ < x ? OS < x ? d8 < x ? UI < x ? 1 : 6 : mw < x ? 1 : 6 : zg < x ? yg < x ? 1 : 6 : pT < x ? 1 : 6 : tE < x ? zm < x ? jA < x ? 1 : 6 : fg < x ? 1 : 6 : X9 < x ? oS < x ? 1 : 6 : k8 < x ? 1 : 6 : wP < x ? X_ < x ? aP < x ? e_ < x ? YS < x ? pI < x ? Qg < x ? 1 : 6 : qk < x ? 1 : 6 : Yw < x ? IA < x ? 1 : 6 : Hb < x ? 1 : 6 : R8 < x ? Mb < x ? t8 < x ? 1 : 6 : Xm < x ? 1 : 6 : KI < x ? Q9 < x ? 1 : 6 : cT < x ? 1 : 6 : Ty < x ? pb < x ? rT < x ? WP < x ? 1 : 6 : CP < x ? 1 : 6 : FP < x ? BE < x ? 1 : 6 : DC < x ? 1 : 6 : v9 < x ? jy < x ? NI < x ? 1 : 6 : Tg < x ? 1 : 6 : UA < x ? AE < x ? 1 : 6 : yT < x ? 1 : 6 : pw < x ? TC < x ? _C < x ? Cg < x ? g9 < x ? 1 : 6 : LC < x ? 1 : 6 : oC < x ? Yb < x ? 1 : 6 : dT < x ? 1 : 6 : _E < x ? Kb < x ? VA < x ? 1 : 6 : _T < x ? 1 : 6 : bg < x ? a8 < x ? 1 : 6 : wy < x ? 1 : 6 : GT < x ? fS < x ? Bb < x ? AS < x ? 1 : 6 : l9 < x ? 1 : 6 : Um < x ? i8 < x ? 1 : 6 : zS < x ? 1 : 6 : uk < x ? zI < x ? $9 < x ? 1 : 6 : Mg < x ? 1 : 6 : q_ < x ? Tb < x ? 1 : 6 : c_ < x ? 1 : 6 : Nm < x ? gP < x ? cm < x ? FE < x ? U_ < x ? QI < x ? 1 : 6 : Yp < x ? 1 : 6 : TT < x ? OT < x ? 1 : 6 : oI < x ? 1 : 6 : Vm < x ? Y8 < x ? lA < x ? 1 : 6 : cC < x ? 1 : 6 : BC < x ? qT < x ? 1 : 6 : E1 < x ? 1 : 6 : Cm < x ? I_ < x ? jp < x ? LT < x ? 1 : 6 : b_ < x ? 1 : 6 : mm < x ? pA < x ? 1 : 6 : xy < x ? 1 : 6 : Pm < x ? Fk < x ? M9 < x ? 1 : 6 : S8 < x ? 1 : 6 : RS < x ? eA < x ? 1 : 6 : sS < x ? 1 : 6 : xA < x ? hb < x ? Om < x ? Z_ < x ? A9 < x ? 1 : 6 : o8 < x ? 1 : 6 : u_ < x ? Jb < x ? 1 : 6 : T9 < x ? 1 : 6 : db < x ? Ky < x ? uT < x ? 1 : 6 : Km < x ? 1 : 6 : kA < x ? Ug < x ? 1 : 6 : Dk < x ? 1 : 6 : eI < x ? q9 < x ? fy < x ? Up < x ? 1 : 6 : D_ < x ? 1 : 6 : t_ < x ? bT < x ? 1 : 6 : oT < x ? 1 : 6 : nh < x ? S2 < x ? nT < x ? 1 : 6 : fC < x ? 1 : 6 : UP < x ? ib < x ? 1 : 6 : ES < x ? 1 : 6 : Rw < x ? gT < x ? ag < x ? D8 < x ? gI < x ? DA < x ? hC < x ? aC < x ? $g < x ? 1 : 6 : eE < x ? 1 : 6 : SC < x ? hE < x ? 1 : 6 : qm < x ? 1 : 6 : CT < x ? JE < x ? pP < x ? 1 : 6 : YC < x ? 1 : 6 : Lb < x ? MC < x ? 1 : 6 : VC < x ? 1 : 6 : _I < x ? $y < x ? rC < x ? Cy < x ? 1 : 6 : vI < x ? 1 : 6 : _P < x ? nN < x ? 1 : 6 : Wy < x ? 1 : 6 : Cw < x ? SI < x ? mC < x ? 1 : 6 : cy < x ? 1 : 6 : iP < x ? wT < x ? 1 : 6 : KC < x ? 1 : 6 : eP < x ? V8 < x ? tA < x ? oP < x ? RT < x ? 1 : 6 : $5 < x ? 1 : 6 : Xw < x ? gw < x ? 1 : 6 : By < x ? 1 : 6 : by < x ? Xk < x ? L_ < x ? 1 : 6 : mP < x ? 1 : 6 : nP < x ? ph < x ? 1 : 6 : xw < x ? 1 : 6 : Hp < x ? H_ < x ? ZC < x ? Vw < x ? 1 : 6 : vS < x ? 1 : 6 : vP < x ? sw < x ? 1 : 6 : tP < x ? 1 : 6 : $b < x ? KA < x ? lb < x ? 1 : 6 : gy < x ? 1 : 6 : Vy < x ? Ry < x ? 1 : 6 : i9 < x ? 1 : 6 : AA < x ? zC < x ? u9 < x ? oh < x ? ey < x ? $8 < x ? 1 : 6 : HT < x ? 1 : 6 : x8 < x ? V_ < x ? 1 : 6 : vk < x ? 1 : 6 : TE < x ? bS < x ? iA < x ? 1 : 6 : UT < x ? 1 : 6 : Z9 < x ? Wg < x ? 1 : 6 : XP < x ? 1 : 6 : zE < x ? lw < x ? NC < x ? ZI < x ? 1 : 6 : kb < x ? 1 : 6 : V9 < x ? gE < x ? 1 : 6 : Iy < x ? 1 : 6 : o9 < x ? rS < x ? Jg < x ? 1 : 6 : uA < x ? 1 : 6 : VS < x ? a_ < x ? 1 : 6 : vw < x ? 1 : 6 : OI < x ? TA < x ? jT < x ? $I < x ? EE < x ? 1 : 6 : R9 < x ? 1 : 6 : zT < x ? Z5 < x ? 1 : 6 : Zy < x ? 1 : 6 : n_ < x ? iC < x ? kC < x ? 1 : 6 : gA < x ? 1 : 6 : GE < x ? CE < x ? 1 : 6 : 1 : mA < x ? ah < x ? Ub < x ? 6 : CC < x ? 1 : 6 : yS < x ? kS < x ? 1 : 6 : qS < x ? 1 : 6 : r_ < x ? II < x ? XS < x ? 1 : 6 : Iw < x ? 1 : 6 : ST < x ? 1 : 6 : Th < x ? tS < x ? MT < x ? FC < x ? eN < x ? 6 : Fw < x ? dw < x ? 1 : 6 : Ag < x ? 1 : 6 : VT < x ? cP < x ? cI < x ? 1 : 6 : fI < x ? 1 : 6 : a9 < x ? YI < x ? 1 : 6 : QT < x ? 1 : 6 : lh < x ? Ek < x ? Ak < x ? Bw < x ? 1 : 6 : fA < x ? 1 : 6 : Z8 < x ? TP < x ? 1 : 6 : mS < x ? 1 : 6 : iE < x ? _m < x ? my < x ? 1 : 6 : EI < x ? 1 : 6 : B_ < x ? fP < x ? 1 : 6 : B9 < x ? 1 : 6 : NP < x ? nI < x ? WA < x ? F9 < x ? HE < x ? 1 : 6 : 1 : 6 : wS < x ? 6 : pm < x ? RA < x ? 1 : 6 : k_ < x ? 1 : 6 : dy < x ? $m < x ? Av < x ? Vv < x ? 1 : 2 : Y9 < x ? 1 : 6 : PS < x ? sE < x ? 1 : 6 : dE < x ? 1 : 6 : oA < x ? YP < x ? JT < x ? 1 : 6 : uw < x ? 1 : 6 : O9 < x ? qg < x ? 1 : 6 : ZS < x ? 1 : 6 : vg < x ? RP < x ? b8 < x ? pk < x ? ih < x ? d9 < x ? 1 : 6 : Fb < x ? 1 : 6 : ym < x ? Qk < x ? 1 : 6 : uI < x ? 1 : 6 : Ab < x ? qp < x ? N9 < x ? 1 : 6 : og < x ? 1 : 6 : bI < x ? Wk < x ? 1 : 6 : ny < x ? 1 : 6 : yC < x ? y9 < x ? ay < x ? jI < x ? 1 : 6 : PT < x ? 1 : 6 : fb < x ? Hw < x ? 1 : 6 : Ng < x ? 1 : 6 : Xb < x ? MI < x ? W9 < x ? 1 : 6 : h9 < x ? 1 : 6 : FT < x ? 1 : 6 : sI < x ? p8 < x ? Np < x ? mg < x ? 1 : 6 : Q8 < x ? 6 : dg < x ? 1 : 6 : ub < x ? wm < x ? dC < x ? 1 : 6 : WI < x ? 1 : 6 : lg < x ? ky < x ? 1 : 6 : oE < x ? 1 : 6 : BI < x ? AP < x ? Nb < x ? qA < x ? 1 : 6 : 1 : hg < x ? 6 : WT < x ? 1 : 6 : yI < x ? Ny < x ? 1 : 6 : JI < x ? XI < x ? 1 : 6 : r9 < x ? 1 : 6 : qw < x ? l8 < x ? OA < x ? qy < x ? Gb < x ? OP < x ? Rb < x ? YE < x ? 1 : 6 : h_ < x ? 1 : 6 : ew < x ? ob < x ? 1 : 6 : dS < x ? 1 : 6 : wA < x ? BA < x ? fm < x ? 1 : 6 : 1 : 6 : hS < x ? tg < x ? Vr < x ? AT < x ? 1 : 6 : PI < x ? 1 : 6 : Bp < x ? eb < x ? 1 : 6 : jC < x ? 1 : 6 : iw < x ? n9 < x ? 1 : 6 : Oy < x ? C_ < x ? 1 : 6 : W8 < x ? 1 : 6 : S9 < x ? SE < x ? ab < x ? LI < x ? GI < x ? 1 : 6 : yw < x ? 1 : 6 : tI < x ? bA < x ? 1 : 6 : W5 < x ? 1 : 6 : zP < x ? Yk < x ? cb < x ? 1 : 6 : $k < x ? 1 : 6 : Lg < x ? Vb < x ? 1 : 6 : bw < x ? 1 : 6 : iT < x ? jg < x ? dP < x ? ZT < x ? 1 : 6 : ow < x ? 1 : 6 : NE < x ? j9 < x ? 1 : 6 : zy < x ? 1 : 6 : ly < x && x_ < x ? 1 : 6 : U9 < x ? Ow < x ? K9 < x ? IP < x ? 6 : uS < x ? tT < x ? 1 : 6 : FA < x ? 1 : 6 : ZE < x ? rb < x ? $_ < x ? 1 : 6 : 1 : 6 : Q5 < x ? kg < x && DI < x ? 1 : 6 : Ly < x ? O_ < x ? Py < x ? 1 : 6 : 1 : $w < x ? 6 : 1 : Lw < x ? kw < x ? ek < x ? 6 : Pg < x ? 1 : 6 : JC < x ? rA < x ? oy < x ? 1 : 6 : Sw < x ? 1 : 6 : H9 < x ? 1 : 6 : vT < x ? c9 < x ? yy < x ? 1 : 6 : xT < x ? 1 : 6 : MP < x ? P_ < x ? 6 : C9 < x ? 1 : 6 : vA < x ? wE < x ? 1 : 6 : xE < x ? 1 : 6 : PE < x ? MA < x ? RC < x ? _h < x ? lC < x ? Ym < x ? lI < x ? 1 : 6 : Xg < x ? 1 : 6 : J_ < x ? 1 : 6 : BT < x ? X8 < x ? k9 < x ? 1 : 6 : 1 : 6 : mb < x ? pC < x ? tN < x ? wC < x ? 1 : 6 : 1 : 6 : Y_ < x ? uh < x ? xb < x ? 1 : 6 : Jy < x ? 1 : 6 : rI < x ? 1 : 6 : km < x ? Ip < x ? Uv < x ? gS < x ? 6 : qv < x ? 1 : 2 : sh < x ? aI < x ? 1 : 6 : ZP < x ? 1 : 6 : Uk < x ? z8 < x ? yP < x ? 1 : 6 : LE < x ? 1 : 6 : bp < x ? Qw < x ? 1 : 6 : XC < x ? 1 : 6 : Kg < x ? yb < x ? lm < x ? lE < x ? 1 : 6 : Yy < x ? 1 : 6 : ak < x ? XE < x ? 1 : 6 : u8 < x ? 1 : 6 : nw < x ? vE < x ? K_ < x ? 1 : 6 : Fm < x ? 1 : 6 : om < x ? gp < x ? 1 : 6 : tC < x ? 1 : 6 : Hm < x ? lS < x ? Fg < x ? z9 < x ? yE < x ? Fy < x ? 1 : 6 : f9 < x ? 1 : 6 : iS < x ? 1 : 6 : RI < x ? jb < x ? 6 : 1 : 6 : sT < x ? qb < x ? HA < x ? Lk < x ? 1 : 6 : A_ < x ? 1 : 6 : PA < x ? nS < x ? 1 : 6 : 1 : 6 : JA < x ? Gw < x ? Jm < x ? gk < x ? Ik < x ? 1 : 6 : th < x ? 1 : 6 : _b < x ? _8 < x ? 1 : 6 : 1 : tk < x ? LA < x ? 6 : dk < x ? 1 : 6 : LS < x ? DE < x ? 1 : 6 : Gm < x ? 1 : 6 : yA < x ? P9 < x ? W_ < x ? dm < x ? 1 : 6 : _g < x ? 1 : 6 : _y < x ? f8 < x ? 1 : 6 : F8 < x ? 1 : 6 : Dv < x ? Ov < x ? Jv < x ? 1 : 2 : Mv < x ? 1 : 2 : v2 < x ? e2 < x ? 1 : 3 : Cv < x ? 1 : 2 : z0(`\x07\b  +\v\f\r\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07`, x + 1 | 0) - 1 | 0; + } + function eX(x) { + for (;;) { + Tr(x); + var r = y(x), e = e1 < r ? 1 : z0("", r + 1 | 0) - 1 | 0; + if (3 < e >>> 0) var t = g(x); + else switch (e) { + case 0: + var t = 1; + break; + case 1: + var t = 2; + break; + case 2: + var t = 0; + break; + default: if (H(x, 2), Ho(y(x)) === 0) { + var u = l3(y(x)); + if (u === 0) var t = Pr(y(x)) === 0 && Pr(y(x)) === 0 && Pr(y(x)) === 0 ? 0 : g(x); + else if (u === 1 && Pr(y(x)) === 0) { + for (;;) { + var i = o3(y(x)); + if (i !== 0) break; + } + var t = i === 1 ? 0 : g(x); + } else var t = g(x); + } else var t = g(x); + } + if (2 < t >>> 0) throw J0([ + 0, + Nr, + Kn0 + ], 1); + switch (t) { + case 0: break; + case 1: return; + default: if (!IO(lU(x))) { + kU(x, 1); + return; + } + } + } + } + function Ud(x, r) { + var e = r - x[3][2] | 0; + return [ + 0, + PU(x), + e + ]; + } + function C4(x, r, e) { + var t = Ud(x, e), u = Ud(x, r); + return [ + 0, + x[1], + u, + t + ]; + } + function j2(x, r) { + return Ud(x, r[6]); + } + function Pe(x, r) { + return Ud(x, r[3]); + } + function Jr(x, r) { + return C4(x, r[6], r[3]); + } + function tX(x, r) { + x: if (typeof r != "number") { + switch (r[0]) { + case 2: + var e = r[1][1]; + break; + case 3: return r[1][1]; + case 4: + var e = r[1]; + break; + case 5: return r[1]; + case 8: + var e = r[2]; + break; + case 9: return r[1]; + case 10: return r[1]; + default: break x; + } + return e; + } + return Jr(x, x[2]); + } + function D2(x, r, e) { + return [ + 0, + x[1], + x[2], + x[3], + x[4], + x[5], + [ + 0, + [ + 0, + r, + e + ], + x[6] + ], + x[7] + ]; + } + function nX(x, r, e) { + return D2(x, r, [28, md(e)]); + } + function RO(x, r, e, t) { + return D2(x, r, [ + 29, + e, + t + ]); + } + function lt(x, r) { + return D2(x, r, va0); + } + function ee(x, r) { + var e = r[3], t = [ + 0, + PU(x) + 1 | 0, + e + ]; + return [ + 0, + x[1], + x[2], + t, + x[4], + x[5], + x[6], + x[7] + ]; + } + function Mt(x, r, e, t, u) { + var i = [ + 0, + x[1], + r, + e + ], c = J1(t); + return [ + 0, + i, + [ + 0, + u ? 0 : 1, + c, + x[7][3][1] < i[2][1] ? 1 : 0 + ] + ]; + } + function Lt(x, r) { + var e = S4(r); + switch (x) { + case 1: + try { + var u = qh(Zv(Gx(ca0, e))); + } catch (k) { + var i = M1(k); + if (i[1] !== mn) throw J0(i, 0); + var u = Px(Gx(sa0, e)); + } + break; + case 0: + case 3: + try { + var u = qh(Zv(e)); + } catch (k) { + var v = M1(k); + if (v[1] !== mn) throw J0(v, 0); + var u = Px(Gx(aa0, e)); + } + break; + default: try { + var u = dN(e); + } catch (k) { + var l = M1(k); + if (l[1] !== mn) throw J0(l, 0); + var u = Px(Gx(oa0, e)); + } + } + return [ + 12, + x, + u, + e + ]; + } + function qt(x, r) { + var e = S4(r), t = Rx(e); + x: { + if (t !== 0 && n2 === F1(e, t - 1 | 0)) { + var u = C2(e, 0, t - 1 | 0); + break x; + } + var u = e; + } + return [ + 13, + x, + nB(u), + e + ]; + } + function uX(x, r, e) { + return IO(e) ? x : D2(x, r, 27); + } + function iX(x, r, e, t, u) { + return [ + 0, + C4(x, r + e[6] | 0, r + e[3] | 0), + E4(e, t, (sd(e) - t | 0) - u | 0) + ]; + } + function fX(x, r) { + for (var e = x[2][6], t = [ + 0, + r, + r.length - 1, + vU, + oU, + aU, + sU, + cU, + fU, + iU, + uU, + nU, + tU + ], u = Kr(r.length - 1), i = x;;) { + Tr(t); + var c = y(t), v = 92 < c ? 1 : z0("", c + 1 | 0) - 1 | 0; + if (2 < v >>> 0) var o = g(t); + else switch (v) { + case 0: + var o = 2; + break; + case 1: + for (;;) { + H(t, 3); + var l = y(t); + if ((-1 < l ? 91 < l ? 92 < l ? 0 : -1 : 0 : -1) !== 0) break; + } + var o = g(t); + break; + default: if (H(t, 3), Ho(y(t)) === 0) { + var h = l3(y(t)); + if (h === 0) var o = Pr(y(t)) === 0 && Pr(y(t)) === 0 && Pr(y(t)) === 0 ? 0 : g(t); + else if (h === 1 && Pr(y(t)) === 0) { + for (;;) { + var E = o3(y(t)); + if (E !== 0) break; + } + var o = E === 1 ? 1 : g(t); + } else var o = g(t); + } else var o = g(t); + } + if (3 < o >>> 0) return Px(ua0); + switch (o) { + case 0: + var T = iX(i, e, t, 2, 0), I = T[1], N = st(Gx(ia0, T[2])), R = (0 <= N ? 1 : 0) && (N <= 55295 ? 1 : 0); + if (R) var X = R; + else var q = 57344 <= N ? 1 : 0, X = q && (N <= Gk ? 1 : 0); + var B = X ? uX(i, I, N) : D2(i, I, 27); + Fs(u, N); + var i = B; + break; + case 1: + var z = iX(i, e, t, 3, 1), x0 = z[1], W = st(Gx(fa0, z[2])), Z = uX(i, x0, W); + Fs(u, W); + var i = Z; + break; + case 2: return [ + 0, + i, + J1(u) + ]; + default: ad(t, u); + } + } + } + function N1(x, r, e) { + var t = lt(x, Jr(x, r)); + return Pl(r), e(t, r); + } + function p3(x, r, e) { + for (var t = x;;) { + Tr(e); + var u = y(e), i = -1 < u ? 42 < u ? e2 < u ? 0 : v2 < u ? 1 : 0 : z0("", u) - 1 | 0 : -1; + if (3 < i >>> 0) var c = g(e); + else switch (i) { + case 0: + for (;;) { + H(e, 3); + var v = y(e); + if ((-1 < v ? 41 < v ? 42 < v ? v2 < v ? e2 < v ? 0 : -1 : 0 : -1 : z0("\0\0", v) - 1 | 0 : -1) !== 0) break; + } + var c = g(e); + break; + case 1: + var c = 0; + break; + case 2: + H(e, 0); + var c = Ie(y(e)) === 0 ? 0 : g(e); + break; + default: + H(e, 3); + var l = y(e), k = 44 < l ? 47 < l ? -1 : z0("\0", l + xL | 0) - 1 | 0 : -1, c = k === 0 ? ZU(y(e)) === 0 ? 2 : g(e) : k === 1 ? 1 : g(e); + } + if (3 < c >>> 0) { + var h = lt(t, Jr(t, e)); + return [ + 0, + h, + Pe(h, e) + ]; + } + switch (c) { + case 0: + var E = ee(t, e); + ad(e, r); + var t = E; + break; + case 1: + var T = t[4] ? RO(t, Jr(t, e), Vn0, Wn0) : t; + return [ + 0, + T, + Pe(T, e) + ]; + case 2: + if (t[4]) return [ + 0, + t, + Pe(t, e) + ]; + lr(r, $n0); + break; + default: ad(e, r); + } + } + } + function Dl(x, r, e) { + for (;;) { + Tr(e); + var t = y(e), u = 13 < t ? e2 < t ? 1 : v2 < t ? 2 : 1 : z0("", t + 1 | 0) - 1 | 0; + if (3 < u >>> 0) var i = g(e); + else switch (u) { + case 0: + var i = 0; + break; + case 1: + for (;;) { + H(e, 2); + var c = y(e); + if ((-1 < c ? 12 < c ? 13 < c ? v2 < c ? e2 < c ? 0 : -1 : 0 : -1 : z0("\0", c) - 1 | 0 : -1) !== 0) break; + } + var i = g(e); + break; + case 2: + var i = 1; + break; + default: + H(e, 1); + var i = Ie(y(e)) === 0 ? 1 : g(e); + } + if (2 < i >>> 0) return Px(Qn0); + switch (i) { + case 0: return [ + 0, + x, + Pe(x, e) + ]; + case 1: + var o = Pe(x, e), l = o[2], k = o[1]; + return [ + 0, + ee(x, e), + [ + 0, + k, + l - sd(e) | 0 + ] + ]; + default: ad(e, r); + } + } + } + function cX(x, r) { + function e(x0) { + return H(x0, 3), re(y(x0)) === 0 ? 2 : g(x0); + } + Tr(r); + var t = y(r), u = Cf < t ? e2 < t ? 1 : v2 < t ? 2 : 1 : z0(`\x07\b  +\v\f\r`, t + 1 | 0) - 1 | 0; + if (14 < u >>> 0) var i = g(r); + else switch (u) { + case 0: + var i = 0; + break; + case 1: + var i = 16; + break; + case 2: + var i = 15; + break; + case 3: + H(r, 15); + var i = Ie(y(r)) === 0 ? 15 : g(r); + break; + case 4: + H(r, 4); + var i = re(y(r)) === 0 ? e(r) : g(r); + break; + case 5: + H(r, 11); + var i = re(y(r)) === 0 ? e(r) : g(r); + break; + case 6: + var i = 0; + break; + case 7: + var i = 5; + break; + case 8: + var i = 6; + break; + case 9: + var i = 7; + break; + case 10: + var i = 8; + break; + case 11: + var i = 9; + break; + case 12: + H(r, 14); + var c = l3(y(r)); + if (c === 0) var i = Pr(y(r)) === 0 && Pr(y(r)) === 0 && Pr(y(r)) === 0 ? 12 : g(r); + else if (c === 1 && Pr(y(r)) === 0) { + for (;;) { + var v = o3(y(r)); + if (v !== 0) break; + } + var i = v === 1 ? 13 : g(r); + } else var i = g(r); + break; + case 13: + var i = 10; + break; + default: + H(r, 14); + var i = Pr(y(r)) === 0 && Pr(y(r)) === 0 ? 1 : g(r); + } + if (16 < i >>> 0) return Px(zs0); + switch (i) { + case 0: return [ + 0, + x, + Fx(r), + o1(r), + 0 + ]; + case 1: + var l = Fx(r); + return [ + 0, + x, + l, + [0, st(Gx(Js0, l))], + 0 + ]; + case 2: + var k = Fx(r), h = st(Gx(Ks0, k)); + return D6 <= h ? [ + 0, + x, + k, + [ + 0, + h >>> 3 | 0, + 48 + (h & 7) | 0 + ], + 1 + ] : [ + 0, + x, + k, + [0, h], + 1 + ]; + case 3: + var E = Fx(r); + return [ + 0, + x, + E, + [0, st(Gx(Hs0, E))], + 1 + ]; + case 4: return [ + 0, + x, + Ws0, + [0, 0], + 0 + ]; + case 5: return [ + 0, + x, + Vs0, + [0, 8], + 0 + ]; + case 6: return [ + 0, + x, + $s0, + [0, 12], + 0 + ]; + case 7: return [ + 0, + x, + Qs0, + [0, 10], + 0 + ]; + case 8: return [ + 0, + x, + Zs0, + [0, 13], + 0 + ]; + case 9: return [ + 0, + x, + xa0, + [0, 9], + 0 + ]; + case 10: return [ + 0, + x, + ra0, + [0, 11], + 0 + ]; + case 11: + var T = Fx(r); + return [ + 0, + x, + T, + [0, st(Gx(ea0, T))], + 1 + ]; + case 12: + var I = Fx(r); + return [ + 0, + x, + I, + [0, st(Gx(ta0, C2(I, 1, Rx(I) - 1 | 0)))], + 0 + ]; + case 13: + var N = Fx(r), P = st(Gx(na0, C2(N, 2, Rx(N) - 3 | 0))); + return [ + 0, + Gk < P ? lt(x, Jr(x, r)) : x, + N, + [0, P], + 0 + ]; + case 14: + var q = Fx(r), X = o1(r); + return [ + 0, + lt(x, Jr(x, r)), + q, + X, + 0 + ]; + case 15: + var B = Fx(r); + return [ + 0, + ee(x, r), + B, + [0], + 0 + ]; + default: return [ + 0, + x, + Fx(r), + o1(r), + 0 + ]; + } + } + function sX(x, r, e, t, u, i) { + for (var c = x, v = u;;) { + Tr(i); + var o = y(i), l = 92 < o ? 1 : z0("", o + 1 | 0) - 1 | 0; + if (4 < l >>> 0) var k = g(i); + else switch (l) { + case 0: + var k = 3; + break; + case 1: + for (;;) { + H(i, 4); + var h = y(i); + if ((-1 < h ? 91 < h ? 92 < h ? 0 : -1 : z0("\0\0\0", h) - 1 | 0 : -1) !== 0) break; + } + var k = g(i); + break; + case 2: + var k = 2; + break; + case 3: + var k = 0; + break; + default: var k = 1; + } + if (4 < k >>> 0) return Px(Zn0); + switch (k) { + case 0: + var T = Fx(i); + if (lr(t, T), Sr(r, T)) return [ + 0, + c, + Pe(c, i), + v + ]; + lr(e, T); + break; + case 1: + lr(t, x70); + var I = cX(c, i), N = I[4], P = I[3], R = I[2], q = I[1], X = N || v; + lr(t, R), tB(function(S0) { + return Fs(e, S0); + }, P); + var c = q, v = X; + break; + case 2: + var B = Fx(i); + lr(t, B); + var z = ee(lt(c, Jr(c, i)), i); + return lr(e, B), [ + 0, + z, + Pe(z, i), + v + ]; + case 3: + var x0 = Fx(i); + lr(t, x0); + var W = lt(c, Jr(c, i)); + return lr(e, x0), [ + 0, + W, + Pe(W, i), + v + ]; + default: + var Z = i[6], t0 = i[3] - Z | 0, i0 = b1(t0 * 4 | 0), u0 = T4(i[1], Z, t0, i0); + XN(t, i0, 0, u0), XN(e, i0, 0, u0); + } + } + } + function aX(x, r, e, t) { + for (var u = x;;) { + Tr(t); + var i = y(t), c = 96 < i ? 1 : z0("\x07", i + 1 | 0) - 1 | 0; + if (6 < c >>> 0) var v = g(t); + else switch (c) { + case 0: + var v = 0; + break; + case 1: + for (;;) { + H(t, 6); + var o = y(t); + if ((-1 < o ? 95 < o ? 96 < o ? 0 : -1 : z0("\0\0\0\0", o) - 1 | 0 : -1) !== 0) break; + } + var v = g(t); + break; + case 2: + var v = 5; + break; + case 3: + H(t, 5); + var v = Ie(y(t)) === 0 ? 4 : g(t); + break; + case 4: + H(t, 6); + var k = y(t), v = (e1 < k ? un < k ? -1 : 0 : -1) === 0 ? 2 : g(t); + break; + case 5: + var v = 3; + break; + default: var v = 1; + } + if (6 < v >>> 0) return Px(r70); + switch (v) { + case 0: return [ + 0, + lt(u, Jr(u, t)), + 1 + ]; + case 1: return [ + 0, + u, + 1 + ]; + case 2: return [ + 0, + u, + 0 + ]; + case 3: + at(e, 92); + var E = cX(u, t), T = E[3], I = E[1]; + lr(e, E[2]), tB(function(R) { + return Fs(r, R); + }, T); + var u = I; + break; + case 4: + lr(e, e70), lr(r, t70); + var u = ee(u, t); + break; + case 5: + lr(e, Fx(t)), at(r, 10); + var u = ee(u, t); + break; + default: + var N = Fx(t); + lr(e, N), lr(r, N); + } + } + } + function VE0(x, r, e) { + for (var t = x;;) { + Tr(e); + var u = y(e), i = 92 < u ? e2 < u ? 1 : v2 < u ? 2 : 1 : z0("\x07", u + 1 | 0) - 1 | 0; + if (6 < i >>> 0) var c = g(e); + else switch (i) { + case 0: + var c = 0; + break; + case 1: + for (;;) { + H(e, 7); + var v = y(e); + if ((-1 < v ? 90 < v ? 92 < v ? v2 < v ? e2 < v ? 0 : -1 : 0 : -1 : z0("\0\0\0", v) - 1 | 0 : -1) !== 0) break; + } + var c = g(e); + break; + case 2: + var c = 6; + break; + case 3: + H(e, 6); + var c = Ie(y(e)) === 0 ? 6 : g(e); + break; + case 4: + if (H(e, 4), MU(y(e)) === 0) { + for (; H(e, 3), MU(y(e)) === 0;); + var c = g(e); + } else var c = g(e); + break; + case 5: + var c = 5; + break; + default: + H(e, 7); + var l = y(e), k = -1 < l ? 13 < l ? e2 < l ? 0 : v2 < l ? 1 : 0 : z0("", l) - 1 | 0 : -1; + if (2 < k >>> 0) var c = g(e); + else switch (k) { + case 0: + var c = 2; + break; + case 1: + var c = 1; + break; + default: + H(e, 1); + var c = Ie(y(e)) === 0 ? 1 : g(e); + } + } + if (7 < c >>> 0) return Px(i70); + switch (c) { + case 0: return [ + 0, + D2(t, Jr(t, e), h2), + f70 + ]; + case 1: return [ + 0, + ee(D2(t, Jr(t, e), h2), e), + c70 + ]; + case 2: + lr(r, Fx(e)); + break; + case 3: + var h = Fx(e); + return [ + 0, + t, + C2(h, 1, Rx(h) - 1 | 0) + ]; + case 4: return [ + 0, + t, + s70 + ]; + case 5: + at(r, 91); + x: { + r: { + e: { + t: { + n: for (;;) { + Tr(e); + var E = y(e), T = 93 < E ? e2 < E ? 1 : v2 < E ? 2 : 1 : z0("", E + 1 | 0) - 1 | 0; + if (5 < T >>> 0) var I = g(e); + else switch (T) { + case 0: + var I = 0; + break; + case 1: + for (;;) { + H(e, 5); + var N = y(e); + if ((-1 < N ? 91 < N ? 93 < N ? v2 < N ? e2 < N ? 0 : -1 : 0 : -1 : z0("\0\0", N) - 1 | 0 : -1) !== 0) break; + } + var I = g(e); + break; + case 2: + var I = 4; + break; + case 3: + H(e, 4); + var I = Ie(y(e)) === 0 ? 4 : g(e); + break; + case 4: + H(e, 5); + var R = y(e), q = 91 < R ? 93 < R ? -1 : z0(Em, R + zD | 0) - 1 | 0 : -1, I = q === 0 ? 1 : q === 1 ? 2 : g(e); + break; + default: var I = 3; + } + if (5 < I >>> 0) break r; + switch (I) { + case 0: break e; + case 1: + lr(r, u70); + break; + case 2: + at(r, 92), at(r, 93); + break; + case 3: break t; + case 4: break n; + default: lr(r, Fx(e)); + } + } + var X = ee(D2(t, Jr(t, e), h2), e); + break x; + } + at(r, 93); + var X = t; + break x; + } + var X = t; + break x; + } + var X = Px(n70); + } + var t = X; + break; + case 6: return [ + 0, + ee(D2(t, Jr(t, e), h2), e), + a70 + ]; + default: lr(r, Fx(e)); + } + } + } + function oX(x) { + var r = sx(x, "iexcl"); + if (0 <= r) { + if (0 >= r) return Ss0; + var e = sx(x, "prime"); + if (0 <= e) { + if (0 >= e) return Es0; + var t = sx(x, "sup1"); + if (0 <= t) { + if (0 >= t) return Ts0; + var u = sx(x, "uarr"); + if (0 <= u) { + if (0 >= u) return bs0; + var i = sx(x, "xi"); + if (0 <= i) { + if (0 >= i) return gs0; + if (!C(x, "yacute")) return ws0; + if (!C(x, "yen")) return _s0; + if (!C(x, "yuml")) return ys0; + if (!C(x, "zeta")) return ds0; + if (!C(x, "zwj")) return hs0; + if (!C(x, "zwnj")) return ms0; + } else { + if (!C(x, "ucirc")) return ks0; + if (!C(x, "ugrave")) return ps0; + if (!C(x, "uml")) return ls0; + if (!C(x, "upsih")) return vs0; + if (!C(x, "upsilon")) return os0; + if (!C(x, "uuml")) return as0; + if (!C(x, "weierp")) return ss0; + } + } else { + var c = sx(x, "thetasym"); + if (0 <= c) { + if (0 >= c) return cs0; + if (!C(x, "thinsp")) return fs0; + if (!C(x, "thorn")) return is0; + if (!C(x, "tilde")) return us0; + if (!C(x, "times")) return ns0; + if (!C(x, "trade")) return ts0; + if (!C(x, "uArr")) return es0; + if (!C(x, "uacute")) return rs0; + } else { + if (!C(x, "sup2")) return xs0; + if (!C(x, "sup3")) return Zc0; + if (!C(x, "supe")) return Qc0; + if (!C(x, "szlig")) return $c0; + if (!C(x, "tau")) return Vc0; + if (!C(x, "there4")) return Wc0; + if (!C(x, "theta")) return Hc0; + } + } + } else { + var v = sx(x, "rlm"); + if (0 <= v) { + if (0 >= v) return Kc0; + var o = sx(x, "sigma"); + if (0 <= o) { + if (0 >= o) return Jc0; + if (!C(x, "sigmaf")) return zc0; + if (!C(x, "sim")) return Yc0; + if (!C(x, "spades")) return Gc0; + if (!C(x, "sub")) return Xc0; + if (!C(x, "sube")) return Uc0; + if (!C(x, "sum")) return Bc0; + if (!C(x, "sup")) return qc0; + } else { + if (!C(x, "rsaquo")) return Lc0; + if (!C(x, "rsquo")) return Mc0; + if (!C(x, "sbquo")) return Fc0; + if (!C(x, "scaron")) return Rc0; + if (!C(x, "sdot")) return Dc0; + if (!C(x, "sect")) return jc0; + if (!C(x, "shy")) return Oc0; + } + } else { + var l = sx(x, "raquo"); + if (0 <= l) { + if (0 >= l) return Nc0; + if (!C(x, "rarr")) return Cc0; + if (!C(x, "rceil")) return Pc0; + if (!C(x, "rdquo")) return Ic0; + if (!C(x, "real")) return Ac0; + if (!C(x, "reg")) return Sc0; + if (!C(x, "rfloor")) return Ec0; + if (!C(x, "rho")) return Tc0; + } else { + if (!C(x, "prod")) return bc0; + if (!C(x, "prop")) return gc0; + if (!C(x, "psi")) return wc0; + if (!C(x, "quot")) return _c0; + if (!C(x, "rArr")) return yc0; + if (!C(x, "radic")) return dc0; + if (!C(x, "rang")) return hc0; + } + } + } + } else { + var k = sx(x, "ndash"); + if (0 <= k) { + if (0 >= k) return mc0; + var h = sx(x, "or"); + if (0 <= h) { + if (0 >= h) return kc0; + var E = sx(x, "part"); + if (0 <= E) { + if (0 >= E) return pc0; + if (!C(x, "permil")) return lc0; + if (!C(x, "perp")) return vc0; + if (!C(x, "phi")) return oc0; + if (!C(x, "pi")) return ac0; + if (!C(x, "piv")) return sc0; + if (!C(x, "plusmn")) return cc0; + if (!C(x, "pound")) return fc0; + } else { + if (!C(x, "ordf")) return ic0; + if (!C(x, "ordm")) return uc0; + if (!C(x, "oslash")) return nc0; + if (!C(x, "otilde")) return tc0; + if (!C(x, "otimes")) return ec0; + if (!C(x, "ouml")) return rc0; + if (!C(x, "para")) return xc0; + } + } else { + var T = sx(x, "oacute"); + if (0 <= T) { + if (0 >= T) return Zf0; + if (!C(x, "ocirc")) return Qf0; + if (!C(x, "oelig")) return $f0; + if (!C(x, "ograve")) return Vf0; + if (!C(x, "oline")) return Wf0; + if (!C(x, "omega")) return Hf0; + if (!C(x, "omicron")) return Kf0; + if (!C(x, "oplus")) return Jf0; + } else { + if (!C(x, "ne")) return zf0; + if (!C(x, "ni")) return Yf0; + if (!C(x, "not")) return Gf0; + if (!C(x, "notin")) return Xf0; + if (!C(x, "nsub")) return Uf0; + if (!C(x, "ntilde")) return Bf0; + if (!C(x, "nu")) return qf0; + } + } + } else { + var I = sx(x, "le"); + if (0 <= I) { + if (0 >= I) return Lf0; + var N = sx(x, "macr"); + if (0 <= N) { + if (0 >= N) return Mf0; + if (!C(x, "mdash")) return Ff0; + if (!C(x, "micro")) return Rf0; + if (!C(x, "middot")) return Df0; + if (!C(x, nM)) return jf0; + if (!C(x, "mu")) return Of0; + if (!C(x, "nabla")) return Nf0; + if (!C(x, "nbsp")) return Cf0; + } else { + if (!C(x, "lfloor")) return Pf0; + if (!C(x, "lowast")) return If0; + if (!C(x, "loz")) return Af0; + if (!C(x, "lrm")) return Sf0; + if (!C(x, "lsaquo")) return Ef0; + if (!C(x, "lsquo")) return Tf0; + if (!C(x, "lt")) return bf0; + } + } else { + var P = sx(x, "kappa"); + if (0 <= P) { + if (0 >= P) return gf0; + if (!C(x, "lArr")) return wf0; + if (!C(x, "lambda")) return _f0; + if (!C(x, "lang")) return yf0; + if (!C(x, "laquo")) return df0; + if (!C(x, "larr")) return hf0; + if (!C(x, "lceil")) return mf0; + if (!C(x, "ldquo")) return kf0; + } else { + if (!C(x, "igrave")) return pf0; + if (!C(x, "image")) return lf0; + if (!C(x, "infin")) return vf0; + if (!C(x, "iota")) return of0; + if (!C(x, "iquest")) return af0; + if (!C(x, "isin")) return sf0; + if (!C(x, "iuml")) return cf0; + } + } + } + } + } else { + var R = sx(x, "aelig"); + if (0 <= R) { + if (0 >= R) return ff0; + var q = sx(x, "delta"); + if (0 <= q) { + if (0 >= q) return if0; + var X = sx(x, "fnof"); + if (0 <= X) { + if (0 >= X) return uf0; + var B = sx(x, "gt"); + if (0 <= B) { + if (0 >= B) return nf0; + if (!C(x, "hArr")) return tf0; + if (!C(x, "harr")) return ef0; + if (!C(x, "hearts")) return rf0; + if (!C(x, "hellip")) return xf0; + if (!C(x, "iacute")) return Zi0; + if (!C(x, "icirc")) return Qi0; + } else { + if (!C(x, "forall")) return $i0; + if (!C(x, "frac12")) return Vi0; + if (!C(x, "frac14")) return Wi0; + if (!C(x, "frac34")) return Hi0; + if (!C(x, "frasl")) return Ki0; + if (!C(x, "gamma")) return Ji0; + if (!C(x, "ge")) return zi0; + } + } else { + var z = sx(x, "ensp"); + if (0 <= z) { + if (0 >= z) return Yi0; + if (!C(x, "epsilon")) return Gi0; + if (!C(x, "equiv")) return Xi0; + if (!C(x, "eta")) return Ui0; + if (!C(x, "eth")) return Bi0; + if (!C(x, "euml")) return qi0; + if (!C(x, "euro")) return Li0; + if (!C(x, "exist")) return Mi0; + } else { + if (!C(x, "diams")) return Fi0; + if (!C(x, "divide")) return Ri0; + if (!C(x, "eacute")) return Di0; + if (!C(x, "ecirc")) return ji0; + if (!C(x, "egrave")) return Oi0; + if (!C(x, be)) return Ni0; + if (!C(x, "emsp")) return Ci0; + } + } + } else { + var x0 = sx(x, "cap"); + if (0 <= x0) { + if (0 >= x0) return Pi0; + var W = sx(x, "copy"); + if (0 <= W) { + if (0 >= W) return Ii0; + if (!C(x, "crarr")) return Ai0; + if (!C(x, "cup")) return Si0; + if (!C(x, "curren")) return Ei0; + if (!C(x, "dArr")) return Ti0; + if (!C(x, "dagger")) return bi0; + if (!C(x, "darr")) return gi0; + if (!C(x, "deg")) return wi0; + } else { + if (!C(x, "ccedil")) return _i0; + if (!C(x, "cedil")) return yi0; + if (!C(x, "cent")) return di0; + if (!C(x, "chi")) return hi0; + if (!C(x, "circ")) return mi0; + if (!C(x, "clubs")) return ki0; + if (!C(x, "cong")) return pi0; + } + } else { + var Z = sx(x, "aring"); + if (0 <= Z) { + if (0 >= Z) return li0; + if (!C(x, "asymp")) return vi0; + if (!C(x, "atilde")) return oi0; + if (!C(x, "auml")) return ai0; + if (!C(x, "bdquo")) return si0; + if (!C(x, "beta")) return ci0; + if (!C(x, "brvbar")) return fi0; + if (!C(x, "bull")) return ii0; + } else { + if (!C(x, "agrave")) return ui0; + if (!C(x, "alefsym")) return ni0; + if (!C(x, "alpha")) return ti0; + if (!C(x, "amp")) return ei0; + if (!C(x, "and")) return ri0; + if (!C(x, "ang")) return xi0; + if (!C(x, "apos")) return Zu0; + } + } + } + } else { + var t0 = sx(x, "Nu"); + if (0 <= t0) { + if (0 >= t0) return Qu0; + var i0 = sx(x, "Sigma"); + if (0 <= i0) { + if (0 >= i0) return $u0; + var u0 = sx(x, "Uuml"); + if (0 <= u0) { + if (0 >= u0) return Vu0; + if (!C(x, "Xi")) return Wu0; + if (!C(x, "Yacute")) return Hu0; + if (!C(x, "Yuml")) return Ku0; + if (!C(x, "Zeta")) return Ju0; + if (!C(x, "aacute")) return zu0; + if (!C(x, "acirc")) return Yu0; + if (!C(x, "acute")) return Gu0; + } else { + if (!C(x, "THORN")) return Xu0; + if (!C(x, "Tau")) return Uu0; + if (!C(x, "Theta")) return Bu0; + if (!C(x, "Uacute")) return qu0; + if (!C(x, "Ucirc")) return Lu0; + if (!C(x, "Ugrave")) return Mu0; + if (!C(x, "Upsilon")) return Fu0; + } + } else { + var k0 = sx(x, "Otilde"); + if (0 <= k0) { + if (0 >= k0) return Ru0; + if (!C(x, "Ouml")) return Du0; + if (!C(x, "Phi")) return ju0; + if (!C(x, "Pi")) return Ou0; + if (!C(x, "Prime")) return Nu0; + if (!C(x, "Psi")) return Cu0; + if (!C(x, "Rho")) return Pu0; + if (!C(x, "Scaron")) return Iu0; + } else { + if (!C(x, "OElig")) return Au0; + if (!C(x, "Oacute")) return Su0; + if (!C(x, "Ocirc")) return Eu0; + if (!C(x, "Ograve")) return Tu0; + if (!C(x, "Omega")) return bu0; + if (!C(x, "Omicron")) return gu0; + if (!C(x, "Oslash")) return wu0; + } + } + } else { + var o0 = sx(x, "Eacute"); + if (0 <= o0) { + if (0 >= o0) return _u0; + var S0 = sx(x, "Icirc"); + if (0 <= S0) { + if (0 >= S0) return yu0; + if (!C(x, "Igrave")) return du0; + if (!C(x, "Iota")) return hu0; + if (!C(x, "Iuml")) return mu0; + if (!C(x, "Kappa")) return ku0; + if (!C(x, "Lambda")) return pu0; + if (!C(x, "Mu")) return lu0; + if (!C(x, "Ntilde")) return vu0; + } else { + if (!C(x, "Ecirc")) return ou0; + if (!C(x, "Egrave")) return au0; + if (!C(x, "Epsilon")) return su0; + if (!C(x, "Eta")) return cu0; + if (!C(x, "Euml")) return fu0; + if (!C(x, "Gamma")) return iu0; + if (!C(x, "Iacute")) return uu0; + } + } else { + var s0 = sx(x, "Atilde"); + if (0 <= s0) { + if (0 >= s0) return nu0; + if (!C(x, "Auml")) return tu0; + if (!C(x, "Beta")) return eu0; + if (!C(x, "Ccedil")) return ru0; + if (!C(x, "Chi")) return xu0; + if (!C(x, "Dagger")) return Z70; + if (!C(x, "Delta")) return Q70; + if (!C(x, "ETH")) return $70; + } else { + if (!C(x, "'int'")) return V70; + if (!C(x, "AElig")) return W70; + if (!C(x, "Aacute")) return H70; + if (!C(x, "Acirc")) return K70; + if (!C(x, "Agrave")) return J70; + if (!C(x, "Alpha")) return z70; + if (!C(x, "Aring")) return Y70; + } + } + } + } + } + return 0; + } + function vX(x, r, e, t) { + for (var u = x;;) { + var i = function(k0) { + for (;;) if (H(k0, 8), OO(y(k0)) !== 0) return g(k0); + }; + Tr(t); + var c = y(t), v = So < c ? e2 < c ? 1 : v2 < c ? 2 : 1 : z0("\x07\b", c + 1 | 0) - 1 | 0; + if (7 < v >>> 0) var o = g(t); + else switch (v) { + case 0: + var o = 3; + break; + case 1: + var o = i(t); + break; + case 2: + var o = 4; + break; + case 3: + H(t, 4); + var o = Ie(y(t)) === 0 ? 4 : g(t); + break; + case 4: + H(t, 8); + var l = rX(y(t)); + if (l === 0) { + var k = DU(y(t)); + if (k === 0) { + for (;;) { + var h = RU(y(t)); + if (h !== 0) break; + } + var o = h === 1 ? 6 : g(t); + } else if (k === 1 && Pr(y(t)) === 0) { + for (;;) { + var E = QU(y(t)); + if (E !== 0) break; + } + var o = E === 1 ? 5 : g(t); + } else var o = g(t); + } else if (l === 1 && mr(y(t)) === 0) { + var T = Ft(y(t)); + if (T === 0) { + var I = Ft(y(t)); + if (I === 0) { + var N = Ft(y(t)); + if (N === 0) { + var P = Ft(y(t)); + if (P === 0) { + var R = Ft(y(t)); + if (R === 0) var q = Ft(y(t)), o = q === 0 ? KU(y(t)) === 0 ? 7 : g(t) : q === 1 ? 7 : g(t); + else var o = R === 1 ? 7 : g(t); + } else var o = P === 1 ? 7 : g(t); + } else var o = N === 1 ? 7 : g(t); + } else var o = I === 1 ? 7 : g(t); + } else var o = T === 1 ? 7 : g(t); + } else var o = g(t); + break; + case 5: + var o = 0; + break; + case 6: + H(t, 1); + var o = OO(y(t)) === 0 ? i(t) : g(t); + break; + default: + H(t, 2); + var o = OO(y(t)) === 0 ? i(t) : g(t); + } + if (8 < o >>> 0) return Px(o70); + switch (o) { + case 0: return Pl(t), u; + case 1: return RO(u, Jr(u, t), l70, v70); + case 2: return RO(u, Jr(u, t), k70, p70); + case 3: return lt(u, Jr(u, t)); + case 4: + var X = Fx(t); + lr(e, X), lr(r, X); + var u = ee(u, t); + break; + case 5: + var B = Fx(t), z = C2(B, 3, Rx(B) - 4 | 0); + lr(e, B), Fs(r, st(Gx(m70, z))); + break; + case 6: + var x0 = Fx(t), W = C2(x0, 2, Rx(x0) - 3 | 0); + lr(e, x0), Fs(r, st(W)); + break; + case 7: + var Z = Fx(t), t0 = C2(Z, 1, Rx(Z) - 2 | 0); + lr(e, Z); + var i0 = oX(t0); + i0 ? Fs(r, i0[1]) : lr(r, Gx(d70, Gx(t0, h70))); + break; + default: + var u0 = Fx(t); + lr(e, u0), lr(r, u0); + } + } + } + function N4(x) { + return function(r) { + var e = 0, t = r; + x: for (;;) { + var u = x(t, t[2]); + switch (u[0]) { + case 0: break x; + case 1: + var i = u[2], c = u[1], e = [ + 0, + i, + e + ], t = [ + 0, + c[1], + c[2], + c[3], + c[4], + c[5], + c[6], + i[1] + ]; + break; + default: var t = u[1]; + } + } + var v = u[2], o = u[1], l = tX(o, v), k = e === 0 ? 0 : cx(e), h = o[6]; + if (h === 0) return [ + 0, + [ + 0, + o[1], + o[2], + o[3], + o[4], + o[5], + o[6], + l + ], + [ + 0, + v, + l, + 0, + k + ] + ]; + var E = [ + 0, + v, + l, + cx(h), + k + ]; + return [ + 0, + [ + 0, + o[1], + o[2], + o[3], + o[4], + o[5], + AU, + l + ], + E + ]; + }; + } + var $E0 = N4(function(x, r) { + Tr(r); + var e = y(r), t = Rv < e ? Uv < e ? Av < e ? Vv < e ? 1 : 2 : qv < e ? 1 : 2 : Dv < e ? Ov < e ? Jv < e ? 1 : 2 : Mv < e ? 1 : 2 : v2 < e ? e2 < e ? 1 : 3 : Cv < e ? 1 : 2 : z0("", e + 1 | 0) - 1 | 0; + if (5 < t >>> 0) var u = g(r); + else switch (t) { + case 0: + var u = 0; + break; + case 1: + var u = 6; + break; + case 2: + if (H(r, 2), Ls(y(r)) === 0) { + for (; H(r, 2), Ls(y(r)) === 0;); + var u = g(r); + } else var u = g(r); + break; + case 3: + var u = 1; + break; + case 4: + H(r, 1); + var u = Ie(y(r)) === 0 ? 1 : g(r); + break; + default: + H(r, 5); + var i = Md(y(r)), u = i === 0 ? 4 : i === 1 ? 3 : g(r); + } + if (6 < u >>> 0) return Px(As0); + switch (u) { + case 0: return [ + 0, + x, + wr + ]; + case 1: return [2, ee(x, r)]; + case 2: return [2, x]; + case 3: + var c = j2(x, r), v = Kr(Gr), o = Dl(x, v, r), l = o[1]; + return [ + 1, + l, + Mt(l, c, o[2], v, 0) + ]; + case 4: + var k = j2(x, r), h = Kr(Gr), E = p3(x, h, r), T = E[1]; + return [ + 1, + T, + Mt(T, k, E[2], h, 1) + ]; + case 5: + var I = j2(x, r), N = Kr(Gr), P = VE0(x, N, r), R = P[1], q = P[2], X = Pe(R, r); + return [ + 0, + R, + [ + 5, + [ + 0, + R[1], + I, + X + ], + J1(N), + q + ] + ]; + default: return [ + 0, + lt(x, Jr(x, r)), + [7, Fx(r)] + ]; + } + }), QE0 = N4(function(x, r) { + Tr(r); + var e = WE0(y(r)); + if (14 < e >>> 0) var t = g(r); + else switch (e) { + case 0: + var t = 0; + break; + case 1: + var t = 14; + break; + case 2: + if (H(r, 2), Ls(y(r)) === 0) { + for (; H(r, 2), Ls(y(r)) === 0;); + var t = g(r); + } else var t = g(r); + break; + case 3: + var t = 1; + break; + case 4: + H(r, 1); + var t = Ie(y(r)) === 0 ? 1 : g(r); + break; + case 5: + var t = 12; + break; + case 6: + var t = 13; + break; + case 7: + var t = 10; + break; + case 8: + H(r, 6); + var u = Md(y(r)), t = u === 0 ? 4 : u === 1 ? 3 : g(r); + break; + case 9: + var t = 9; + break; + case 10: + var t = 5; + break; + case 11: + var t = 11; + break; + case 12: + var t = 7; + break; + case 13: + if (H(r, 14), Ho(y(r)) === 0) { + var i = l3(y(r)); + if (i === 0) var t = Pr(y(r)) === 0 && Pr(y(r)) === 0 && Pr(y(r)) === 0 ? 13 : g(r); + else if (i === 1 && Pr(y(r)) === 0) { + for (;;) { + var c = o3(y(r)); + if (c !== 0) break; + } + var t = c === 1 ? 13 : g(r); + } else var t = g(r); + } else var t = g(r); + break; + default: var t = 8; + } + if (14 < t >>> 0) return Px(G70); + switch (t) { + case 0: return [ + 0, + x, + wr + ]; + case 1: return [2, ee(x, r)]; + case 2: return [2, x]; + case 3: + var v = j2(x, r), o = Kr(Gr), l = Dl(x, o, r), k = l[1]; + return [ + 1, + k, + Mt(k, v, l[2], o, 0) + ]; + case 4: + var h = j2(x, r), E = Kr(Gr), T = p3(x, E, r), I = T[1]; + return [ + 1, + I, + Mt(I, h, T[2], E, 1) + ]; + case 5: return [ + 0, + x, + cr + ]; + case 6: return [ + 0, + x, + Te + ]; + case 7: return [ + 0, + x, + k1 + ]; + case 8: return [ + 0, + x, + 0 + ]; + case 9: return [ + 0, + x, + 88 + ]; + case 10: return [ + 0, + x, + 10 + ]; + case 11: return [ + 0, + x, + 84 + ]; + case 12: + var N = Fx(r), P = j2(x, r), R = Kr(Gr), q = Kr(Gr); + lr(q, N); + for (var X = Sr(N, "'"), B = x;;) { + Tr(r); + var z = y(r), x0 = 39 < z ? e2 < z ? 1 : v2 < z ? 2 : 1 : z0("\x07", z + 1 | 0) - 1 | 0; + if (6 < x0 >>> 0) var W = g(r); + else switch (x0) { + case 0: + var W = 2; + break; + case 1: + for (;;) { + H(r, 7); + var Z = y(r); + if ((-1 < Z ? 37 < Z ? 39 < Z ? v2 < Z ? e2 < Z ? 0 : -1 : 0 : -1 : z0("\0\0\0", Z) - 1 | 0 : -1) !== 0) break; + } + var W = g(r); + break; + case 2: + var W = 3; + break; + case 3: + H(r, 3); + var W = Ie(y(r)) === 0 ? 3 : g(r); + break; + case 4: + var W = 1; + break; + case 5: + H(r, 7); + var i0 = rX(y(r)); + if (i0 === 0) { + var u0 = DU(y(r)); + if (u0 === 0) { + for (;;) { + var k0 = RU(y(r)); + if (k0 !== 0) break; + } + var W = k0 === 1 ? 5 : g(r); + } else if (u0 === 1 && Pr(y(r)) === 0) { + for (;;) { + var o0 = QU(y(r)); + if (o0 !== 0) break; + } + var W = o0 === 1 ? 4 : g(r); + } else var W = g(r); + } else if (i0 === 1 && mr(y(r)) === 0) { + var S0 = Ft(y(r)); + if (S0 === 0) { + var s0 = Ft(y(r)); + if (s0 === 0) { + var v0 = Ft(y(r)); + if (v0 === 0) { + var m0 = Ft(y(r)); + if (m0 === 0) { + var p0 = Ft(y(r)); + if (p0 === 0) var E0 = Ft(y(r)), W = E0 === 0 ? KU(y(r)) === 0 ? 6 : g(r) : E0 === 1 ? 6 : g(r); + else var W = p0 === 1 ? 6 : g(r); + } else var W = m0 === 1 ? 6 : g(r); + } else var W = v0 === 1 ? 6 : g(r); + } else var W = s0 === 1 ? 6 : g(r); + } else var W = S0 === 1 ? 6 : g(r); + } else var W = g(r); + break; + default: var W = 0; + } + if (7 < W >>> 0) var b0 = Px(y70); + else switch (W) { + case 0: + if (!X) { + at(q, 39), at(R, 39); + continue; + } + var b0 = B; + break; + case 1: + if (X) { + at(q, 34), at(R, 34); + continue; + } + var b0 = B; + break; + case 2: + var b0 = lt(B, Jr(B, r)); + break; + case 3: + var C0 = Fx(r); + lr(q, C0), lr(R, C0); + var B = ee(B, r); + continue; + case 4: + var D0 = Fx(r), U0 = C2(D0, 3, Rx(D0) - 4 | 0); + lr(q, D0), Fs(R, st(Gx(_70, U0))); + continue; + case 5: + var T0 = Fx(r), M0 = C2(T0, 2, Rx(T0) - 3 | 0); + lr(q, T0), Fs(R, st(M0)); + continue; + case 6: + var y0 = Fx(r), G = C2(y0, 1, Rx(y0) - 2 | 0); + lr(q, y0); + var j0 = oX(G); + j0 ? Fs(R, j0[1]) : lr(R, Gx(g70, Gx(G, w70))); + continue; + default: + var Q0 = Fx(r); + lr(q, Q0), lr(R, Q0); + continue; + } + var q0 = Pe(b0, r); + lr(q, N); + var ix = J1(R), xx = J1(q); + return [ + 0, + b0, + [ + 10, + [ + 0, + b0[1], + P, + q0 + ], + ix, + xx + ] + ]; + } + case 13: for (var fx = r[6];;) { + Tr(r); + var yx = y(r), R0 = e1 < yx ? 1 : z0("", yx + 1 | 0) - 1 | 0; + if (3 < R0 >>> 0) var lx = g(r); + else switch (R0) { + case 0: + var lx = 1; + break; + case 1: + var lx = 2; + break; + case 2: + var lx = 0; + break; + default: if (H(r, 2), Ho(y(r)) === 0) { + var kx = l3(y(r)); + if (kx === 0) var lx = Pr(y(r)) === 0 && Pr(y(r)) === 0 && Pr(y(r)) === 0 ? 0 : g(r); + else if (kx === 1 && Pr(y(r)) === 0) { + for (;;) { + var Q = o3(y(r)); + if (Q !== 0) break; + } + var lx = Q === 1 ? 0 : g(r); + } else var lx = g(r); + } else var lx = g(r); + } + if (2 < lx >>> 0) throw J0([ + 0, + Nr, + Hn0 + ], 1); + switch (lx) { + case 0: continue; + case 1: break; + default: + if (IO(lU(r))) continue; + kU(r, 1); + } + var I0 = r[3]; + wO(r, fx); + var M = o1(r), d0 = C4(x, fx, I0); + return [ + 0, + x, + [ + 8, + S4(M), + d0 + ] + ]; + } + default: return [ + 0, + x, + [7, Fx(r)] + ]; + } + }), ZE0 = N4(function(x, r) { + Tr(r); + var e = y(r), t = -1 < e ? Rv < e ? Uv < e ? Av < e ? Vv < e ? 0 : 1 : qv < e ? 0 : 1 : Dv < e ? Ov < e ? Jv < e ? 0 : 1 : Mv < e ? 0 : 1 : v2 < e ? e2 < e ? 0 : 2 : Cv < e ? 0 : 1 : z0("", e) - 1 | 0 : -1; + if (5 < t >>> 0) var u = g(r); + else switch (t) { + case 0: + var u = 5; + break; + case 1: + if (H(r, 1), Ls(y(r)) === 0) { + for (; H(r, 1), Ls(y(r)) === 0;); + var u = g(r); + } else var u = g(r); + break; + case 2: + var u = 0; + break; + case 3: + H(r, 0); + var u = Ie(y(r)) === 0 ? 0 : g(r); + break; + case 4: + H(r, 5); + var i = Md(y(r)), u = i === 0 ? 3 : i === 1 ? 2 : g(r); + break; + default: var u = 4; + } + if (5 < u >>> 0) return Px(q70); + switch (u) { + case 0: return [2, ee(x, r)]; + case 1: return [2, x]; + case 2: + var c = j2(x, r), v = Kr(Gr), o = Dl(x, v, r), l = o[1]; + return [ + 1, + l, + Mt(l, c, o[2], v, 0) + ]; + case 3: + var k = j2(x, r), h = Kr(Gr), E = p3(x, h, r), T = E[1]; + return [ + 1, + T, + Mt(T, k, E[2], h, 1) + ]; + case 4: + var I = j2(x, r), N = Kr(Gr), P = Kr(Gr), R = aX(x, N, P, r), q = R[1], X = R[2], B = Pe(q, r), z = [ + 0, + q[1], + I, + B + ], x0 = J1(P); + return [ + 0, + q, + [3, [ + 0, + z, + J1(N), + x0, + 0, + X + ]] + ]; + default: + var W = lt(x, Jr(x, r)); + return [ + 0, + W, + [3, [ + 0, + Jr(W, r), + U70, + B70, + 0, + 1 + ]] + ]; + } + }), xS0 = N4(function(x, r) { + function e(b) { + for (;;) if (H(b, 29), mr(y(b)) !== 0) return g(b); + } + function t(b) { + H(b, 29); + var V = HU(y(b)); + if (3 < V >>> 0) return g(b); + switch (V) { + case 0: return e(b); + case 1: + var tx = Yo(y(b)); + if (tx === 0) for (;;) { + H(b, 24); + var _x = Cl(y(b)); + if (2 < _x >>> 0) return g(b); + switch (_x) { + case 0: return u(b); + case 1: break; + default: return i(b); + } + } + else { + if (tx !== 1) return g(b); + for (;;) { + H(b, 24); + var gx = Bs(y(b)); + if (3 < gx >>> 0) return g(b); + switch (gx) { + case 0: return u(b); + case 1: break; + case 2: return c(b); + default: return i(b); + } + } + } + break; + case 2: + for (;;) { + H(b, 24); + var ex = Cl(y(b)); + if (2 < ex >>> 0) return g(b); + switch (ex) { + case 0: return v(b); + case 1: break; + default: return o(b); + } + } + break; + default: for (;;) { + H(b, 24); + var Jx = Bs(y(b)); + if (3 < Jx >>> 0) return g(b); + switch (Jx) { + case 0: return v(b); + case 1: break; + case 2: return c(b); + default: return o(b); + } + } + } + } + function u(b) { + for (;;) if (H(b, 23), mr(y(b)) !== 0) return g(b); + } + function i(b) { + H(b, 22); + var V = q1(y(b)); + if (V !== 0) return V === 1 ? u(b) : g(b); + for (;;) if (H(b, 21), mr(y(b)) !== 0) return g(b); + } + function c(b) { + for (;;) { + if (Er(y(b)) !== 0) return g(b); + x: for (;;) { + H(b, 24); + var V = Bs(y(b)); + if (3 < V >>> 0) return g(b); + switch (V) { + case 0: return u(b); + case 1: break; + case 2: break x; + default: return i(b); + } + } + } + } + function v(b) { + for (;;) if (H(b, 23), mr(y(b)) !== 0) return g(b); + } + function o(b) { + H(b, 22); + var V = q1(y(b)); + if (V !== 0) return V === 1 ? v(b) : g(b); + for (;;) if (H(b, 21), mr(y(b)) !== 0) return g(b); + } + function l(b) { + H(b, 27); + var V = q1(y(b)); + if (V !== 0) return V === 1 ? e(b) : g(b); + for (;;) if (H(b, 25), mr(y(b)) !== 0) return g(b); + } + function k(b) { + return H(b, 3), xX(y(b)) === 0 ? 3 : g(b); + } + function h(b) { + return Dd(y(b)) === 0 && Ol(y(b)) === 0 && VU(y(b)) === 0 && UU(y(b)) === 0 && jd(y(b)) === 0 && Pd(y(b)) === 0 && I4(y(b)) === 0 && Dd(y(b)) === 0 && Ho(y(b)) === 0 && DO(y(b)) === 0 && Ja(y(b)) === 0 ? 3 : g(b); + } + function E(b) { + H(b, 30); + var V = qU(y(b)); + if (3 < V >>> 0) return g(b); + switch (V) { + case 0: return e(b); + case 1: + x: for (;;) { + H(b, 30); + var tx = zo(y(b)); + if (4 < tx >>> 0) return g(b); + switch (tx) { + case 0: return e(b); + case 1: break; + case 2: return t(b); + case 3: break x; + default: return l(b); + } + } + for (;;) { + if (Er(y(b)) !== 0) return g(b); + x: for (;;) { + H(b, 30); + var _x = zo(y(b)); + if (4 < _x >>> 0) return g(b); + switch (_x) { + case 0: return e(b); + case 1: break; + case 2: return t(b); + case 3: break x; + default: return l(b); + } + } + } + break; + case 2: return t(b); + default: return l(b); + } + } + function T(b) { + for (;;) if (H(b, 15), mr(y(b)) !== 0) return g(b); + } + function I(b) { + H(b, 30); + var V = Cl(y(b)); + if (2 < V >>> 0) return g(b); + switch (V) { + case 0: return e(b); + case 1: + x: for (;;) { + H(b, 30); + var tx = Bs(y(b)); + if (3 < tx >>> 0) return g(b); + switch (tx) { + case 0: return e(b); + case 1: break; + case 2: break x; + default: return l(b); + } + } + for (;;) { + if (Er(y(b)) !== 0) return g(b); + x: for (;;) { + H(b, 30); + var _x = Bs(y(b)); + if (3 < _x >>> 0) return g(b); + switch (_x) { + case 0: return e(b); + case 1: break; + case 2: break x; + default: return l(b); + } + } + } + break; + default: return l(b); + } + } + function N(b) { + H(b, 15); + var V = q1(y(b)); + if (V !== 0) return V === 1 ? T(b) : g(b); + for (;;) if (H(b, 15), mr(y(b)) !== 0) return g(b); + } + function P(b) { + H(b, 28); + var V = q1(y(b)); + if (V !== 0) return V === 1 ? e(b) : g(b); + for (;;) if (H(b, 26), mr(y(b)) !== 0) return g(b); + } + function R(b) { + for (;;) if (H(b, 9), mr(y(b)) !== 0) return g(b); + } + function q(b) { + for (;;) if (H(b, 9), mr(y(b)) !== 0) return g(b); + } + function X(b) { + for (;;) if (H(b, 13), mr(y(b)) !== 0) return g(b); + } + function B(b) { + for (;;) if (H(b, 13), mr(y(b)) !== 0) return g(b); + } + function z(b) { + for (;;) if (H(b, 19), mr(y(b)) !== 0) return g(b); + } + function x0(b) { + for (;;) if (H(b, 19), mr(y(b)) !== 0) return g(b); + } + function W(b) { + for (;;) { + if (Er(y(b)) !== 0) return g(b); + x: for (;;) { + H(b, 30); + var V = JU(y(b)); + if (4 < V >>> 0) return g(b); + switch (V) { + case 0: return e(b); + case 1: return I(b); + case 2: break; + case 3: break x; + default: return P(b); + } + } + } + } + Tr(r); + var Z = (function(b) { + var V = HE0(y(b)); + if (31 < V >>> 0) return g(b); + switch (V) { + case 0: return 66; + case 1: return 67; + case 2: + if (H(b, 1), Ls(y(b)) !== 0) return g(b); + for (;;) if (H(b, 1), Ls(y(b)) !== 0) return g(b); + break; + case 3: return 0; + case 4: return H(b, 0), Ie(y(b)) === 0 ? 0 : g(b); + case 5: return 6; + case 6: return 65; + case 7: + if (H(b, 67), I4(y(b)) !== 0) return g(b); + var tx = y(b); + if ((Ss < tx ? ec < tx ? -1 : 0 : -1) !== 0 || Ja(y(b)) !== 0 || I4(y(b)) !== 0) return g(b); + var gx = y(b); + return (Ct < gx ? Te < gx ? -1 : 0 : -1) === 0 && v3(y(b)) === 0 ? 31 : g(b); + case 8: + H(b, 58); + var Jx = y(b); + return (37 < Jx ? 38 < Jx ? -1 : 0 : -1) === 0 ? 55 : g(b); + case 9: return 38; + case 10: return 39; + case 11: return H(b, 53), ZU(y(b)) === 0 ? 4 : g(b); + case 12: return 61; + case 13: return 43; + case 14: return 62; + case 15: + H(b, 41); + var hr = jl(y(b)); + if (hr === 0) return NO(y(b)) === 0 ? 40 : g(b); + if (hr !== 1) return g(b); + x: for (;;) { + H(b, 30); + var dr = zo(y(b)); + if (4 < dr >>> 0) return g(b); + switch (dr) { + case 0: return e(b); + case 1: break; + case 2: return t(b); + case 3: break x; + default: return l(b); + } + } + for (;;) { + if (Er(y(b)) !== 0) return g(b); + x: for (;;) { + H(b, 30); + var V0 = zo(y(b)); + if (4 < V0 >>> 0) return g(b); + switch (V0) { + case 0: return e(b); + case 1: break; + case 2: return t(b); + case 3: break x; + default: return l(b); + } + } + } + break; + case 16: + H(b, 67); + var K0 = Md(y(b)); + if (K0 !== 0) return K0 === 1 ? 5 : g(b); + H(b, 2); + var Cx = bd(y(b)); + if (2 < Cx >>> 0) return g(b); + switch (Cx) { + case 0: + for (;;) { + var bx = bd(y(b)); + if (2 < bx >>> 0) return g(b); + switch (bx) { + case 0: break; + case 1: return k(b); + default: return h(b); + } + } + break; + case 1: return k(b); + default: return h(b); + } + break; + case 17: + H(b, 30); + var Ox = GU(y(b)); + if (8 < Ox >>> 0) return g(b); + switch (Ox) { + case 0: return e(b); + case 1: return E(b); + case 2: + x: for (;;) { + H(b, 16); + var ux = WU(y(b)); + if (4 < ux >>> 0) return g(b); + switch (ux) { + case 0: return T(b); + case 1: return I(b); + case 2: break; + case 3: break x; + default: return N(b); + } + } + for (;;) { + H(b, 15); + var br = gd(y(b)); + if (3 < br >>> 0) return g(b); + switch (br) { + case 0: return T(b); + case 1: return I(b); + case 2: break; + default: return N(b); + } + } + break; + case 3: + for (;;) { + H(b, 30); + var nr = gd(y(b)); + if (3 < nr >>> 0) return g(b); + switch (nr) { + case 0: return e(b); + case 1: return I(b); + case 2: break; + default: return P(b); + } + } + break; + case 4: + H(b, 29); + var $r = XU(y(b)); + if ($r === 0) return e(b); + if ($r !== 1) return g(b); + x: { + r: for (;;) { + H(b, 10); + var l1 = Ld(y(b)); + if (3 < l1 >>> 0) return g(b); + switch (l1) { + case 0: return R(b); + case 1: break; + case 2: break x; + default: break r; + } + } + H(b, 8); + var C1 = q1(y(b)); + if (C1 !== 0) return C1 === 1 ? R(b) : g(b); + for (;;) if (H(b, 7), mr(y(b)) !== 0) return g(b); + } + x: for (;;) { + if (qs(y(b)) !== 0) return g(b); + r: for (;;) { + H(b, 10); + var Qr = Ld(y(b)); + if (3 < Qr >>> 0) return g(b); + switch (Qr) { + case 0: return q(b); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(b, 8); + var O1 = q1(y(b)); + if (O1 !== 0) return O1 === 1 ? q(b) : g(b); + for (;;) if (H(b, 7), mr(y(b)) !== 0) return g(b); + break; + case 5: return t(b); + case 6: + H(b, 29); + var Hr = YU(y(b)); + if (Hr === 0) return e(b); + if (Hr !== 1) return g(b); + x: { + r: for (;;) { + H(b, 14); + var w = Fd(y(b)); + if (3 < w >>> 0) return g(b); + switch (w) { + case 0: return X(b); + case 1: break; + case 2: break x; + default: break r; + } + } + H(b, 12); + var Y = q1(y(b)); + if (Y !== 0) return Y === 1 ? X(b) : g(b); + for (;;) if (H(b, 11), mr(y(b)) !== 0) return g(b); + } + x: for (;;) { + if (re(y(b)) !== 0) return g(b); + r: for (;;) { + H(b, 14); + var px = Fd(y(b)); + if (3 < px >>> 0) return g(b); + switch (px) { + case 0: return B(b); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(b, 12); + var X0 = q1(y(b)); + if (X0 !== 0) return X0 === 1 ? B(b) : g(b); + for (;;) if (H(b, 11), mr(y(b)) !== 0) return g(b); + break; + case 7: + H(b, 29); + var vx = FU(y(b)); + if (vx === 0) return e(b); + if (vx !== 1) return g(b); + x: { + r: for (;;) { + H(b, 20); + var Ix = qd(y(b)); + if (3 < Ix >>> 0) return g(b); + switch (Ix) { + case 0: return z(b); + case 1: break; + case 2: break x; + default: break r; + } + } + H(b, 18); + var Cr = q1(y(b)); + if (Cr !== 0) return Cr === 1 ? z(b) : g(b); + for (;;) if (H(b, 17), mr(y(b)) !== 0) return g(b); + } + x: for (;;) { + if (Pr(y(b)) !== 0) return g(b); + r: for (;;) { + H(b, 20); + var Vx = qd(y(b)); + if (3 < Vx >>> 0) return g(b); + switch (Vx) { + case 0: return x0(b); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(b, 18); + var f1 = q1(y(b)); + if (f1 !== 0) return f1 === 1 ? x0(b) : g(b); + for (;;) if (H(b, 17), mr(y(b)) !== 0) return g(b); + break; + default: return P(b); + } + break; + case 18: + H(b, 30); + var c1 = Ed(y(b)); + if (5 < c1 >>> 0) return g(b); + switch (c1) { + case 0: return e(b); + case 1: return E(b); + case 2: + for (;;) { + H(b, 30); + var Fr = Ed(y(b)); + if (5 < Fr >>> 0) return g(b); + switch (Fr) { + case 0: return e(b); + case 1: return E(b); + case 2: break; + case 3: return t(b); + case 4: return W(b); + default: return P(b); + } + } + break; + case 3: return t(b); + case 4: return W(b); + default: return P(b); + } + break; + case 19: return 44; + case 20: return 42; + case 21: return 49; + case 22: + H(b, 51); + var Zr = y(b); + return (61 < Zr ? 62 < Zr ? -1 : 0 : -1) === 0 ? 59 : g(b); + case 23: return 50; + case 24: return H(b, 46), NO(y(b)) === 0 ? 45 : g(b); + case 25: return 32; + case 26: + if (H(b, 67), Ho(y(b)) !== 0) return g(b); + var Mx = l3(y(b)); + if (Mx === 0) return Pr(y(b)) === 0 && Pr(y(b)) === 0 && Pr(y(b)) === 0 ? 65 : g(b); + if (Mx !== 1 || Pr(y(b)) !== 0) return g(b); + for (;;) { + var rr = o3(y(b)); + if (rr !== 0) return rr === 1 ? 65 : g(b); + } + break; + case 27: return 33; + case 28: + if (H(b, 65), Ja(y(b)) !== 0 || Pd(y(b)) !== 0 || DO(y(b)) !== 0 || Ja(y(b)) !== 0 || P4(y(b)) !== 0 || v3(y(b)) !== 0) return g(b); + var Ar = y(b), Or = 41 < Ar ? 63 < Ar ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", Ar + sg | 0) - 1 | 0 : -1; + return Or === 0 ? 64 : Or === 1 ? 63 : g(b); + case 29: + H(b, 34); + var ne = y(b); + return (un < ne ? zv < ne ? -1 : 0 : -1) === 0 ? 36 : g(b); + case 30: + H(b, 57); + var je = y(b), kt = un < je ? So < je ? -1 : z0(Em, je - 124 | 0) - 1 | 0 : -1; + return kt === 0 ? 56 : kt === 1 ? 37 : g(b); + default: return 35; + } + })(r); + if (67 < Z >>> 0) return Px(R70); + var t0 = Z; + if (34 > t0) switch (t0) { + case 0: return [2, ee(x, r)]; + case 1: return [2, x]; + case 2: + var i0 = j2(x, r), u0 = Kr(Gr), k0 = p3(x, u0, r), o0 = k0[1]; + return [ + 1, + o0, + Mt(o0, i0, k0[2], u0, 1) + ]; + case 3: + var S0 = Fx(r); + if (!x[5]) { + var s0 = j2(x, r), v0 = Kr(Gr); + lr(v0, S0); + var m0 = p3(x, v0, r), p0 = m0[1]; + return [ + 1, + p0, + Mt(p0, s0, m0[2], v0, 1) + ]; + } + var b0 = kd(1, x[4] ? nX(x, Jr(x, r), S0) : x), C0 = sd(r); + return Sr(E4(r, C0 - 1 | 0, 1), Iv) && C(E4(r, C0 - 2 | 0, 1), Iv) ? [ + 0, + b0, + 88 + ] : [2, b0]; + case 4: + if (x[4]) return [2, kd(0, x)]; + Pl(r), Tr(r); + return (LU(y(r)) === 0 ? 0 : g(r)) === 0 ? [ + 0, + x, + d2 + ] : Px(F70); + case 5: + var U0 = j2(x, r), T0 = Kr(Gr), M0 = Dl(x, T0, r), y0 = M0[1]; + return [ + 1, + y0, + Mt(y0, U0, M0[2], T0, 0) + ]; + case 6: + var G = Fx(r), j0 = j2(x, r), Q0 = Kr(Gr), q0 = Kr(Gr); + lr(q0, G); + var ix = sX(x, G, Q0, q0, 0, r), xx = ix[1], fx = ix[3], yx = [ + 0, + xx[1], + j0, + ix[2] + ], R0 = J1(q0); + return [ + 0, + xx, + [2, [ + 0, + yx, + J1(Q0), + R0, + fx + ]] + ]; + case 7: return N1(x, r, function(b, V) { + Tr(V); + x: if (Ae(y(V)) === 0 && Ad(y(V)) === 0 && qs(y(V)) === 0) { + r: for (;;) { + var tx = _d(y(V)); + if (2 < tx >>> 0) { + var ex = g(V); + break x; + } + switch (tx) { + case 0: break; + case 1: break r; + default: + var ex = 0; + break x; + } + } + for (;;) { + r: { + if (qs(y(V)) === 0) { + e: for (;;) { + var _x = _d(y(V)); + if (2 < _x >>> 0) { + var gx = g(V); + break r; + } + switch (_x) { + case 0: break; + case 1: break e; + default: + var gx = 0; + break r; + } + } + continue; + } + var gx = g(V); + } + var ex = gx; + break; + } + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + qt(0, o1(V)) + ] : Px(D70); + }); + case 8: return [ + 0, + x, + qt(0, o1(r)) + ]; + case 9: return N1(x, r, function(b, V) { + if (Tr(V), Ae(y(V)) === 0 && Ad(y(V)) === 0 && qs(y(V)) === 0) { + for (;;) { + H(V, 0); + var tx = yd(y(V)); + if (tx !== 0) break; + } + if (tx === 1) for (;;) { + if (qs(y(V)) === 0) { + for (;;) { + H(V, 0); + var _x = yd(y(V)); + if (_x !== 0) break; + } + if (_x === 1) continue; + var gx = g(V); + } else var gx = g(V); + var ex = gx; + break; + } + else var ex = g(V); + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + Lt(0, o1(V)) + ] : Px(j70); + }); + case 10: return [ + 0, + x, + Lt(0, o1(r)) + ]; + case 11: return N1(x, r, function(b, V) { + Tr(V); + x: if (Ae(y(V)) === 0 && Nd(y(V)) === 0 && re(y(V)) === 0) { + r: for (;;) { + var tx = Sd(y(V)); + if (2 < tx >>> 0) { + var ex = g(V); + break x; + } + switch (tx) { + case 0: break; + case 1: break r; + default: + var ex = 0; + break x; + } + } + for (;;) { + r: { + if (re(y(V)) === 0) { + e: for (;;) { + var _x = Sd(y(V)); + if (2 < _x >>> 0) { + var gx = g(V); + break r; + } + switch (_x) { + case 0: break; + case 1: break e; + default: + var gx = 0; + break r; + } + } + continue; + } + var gx = g(V); + } + var ex = gx; + break; + } + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + qt(1, o1(V)) + ] : Px(O70); + }); + case 12: return [ + 0, + x, + qt(1, o1(r)) + ]; + case 13: return N1(x, r, function(b, V) { + if (Tr(V), Ae(y(V)) === 0 && Nd(y(V)) === 0 && re(y(V)) === 0) { + for (;;) { + H(V, 0); + var tx = Td(y(V)); + if (tx !== 0) break; + } + if (tx === 1) for (;;) { + if (re(y(V)) === 0) { + for (;;) { + H(V, 0); + var _x = Td(y(V)); + if (_x !== 0) break; + } + if (_x === 1) continue; + var gx = g(V); + } else var gx = g(V); + var ex = gx; + break; + } + else var ex = g(V); + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + Lt(3, o1(V)) + ] : Px(N70); + }); + case 14: return [ + 0, + x, + Lt(3, o1(r)) + ]; + case 15: return N1(x, r, function(b, V) { + if (Tr(V), Ae(y(V)) === 0 && re(y(V)) === 0) { + for (;;) if (H(V, 0), re(y(V)) !== 0) { + var tx = g(V); + break; + } + } else var tx = g(V); + return tx === 0 ? [ + 0, + b, + Lt(1, o1(V)) + ] : Px(C70); + }); + case 16: return [ + 0, + x, + Lt(1, o1(r)) + ]; + case 17: return N1(x, r, function(b, V) { + Tr(V); + x: if (Ae(y(V)) === 0 && hd(y(V)) === 0 && Pr(y(V)) === 0) { + r: for (;;) { + var tx = wd(y(V)); + if (2 < tx >>> 0) { + var ex = g(V); + break x; + } + switch (tx) { + case 0: break; + case 1: break r; + default: + var ex = 0; + break x; + } + } + for (;;) { + r: { + if (Pr(y(V)) === 0) { + e: for (;;) { + var _x = wd(y(V)); + if (2 < _x >>> 0) { + var gx = g(V); + break r; + } + switch (_x) { + case 0: break; + case 1: break e; + default: + var gx = 0; + break r; + } + } + continue; + } + var gx = g(V); + } + var ex = gx; + break; + } + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + qt(2, o1(V)) + ] : Px(P70); + }); + case 18: return [ + 0, + x, + qt(2, o1(r)) + ]; + case 19: return N1(x, r, function(b, V) { + if (Tr(V), Ae(y(V)) === 0 && hd(y(V)) === 0 && Pr(y(V)) === 0) { + for (;;) { + H(V, 0); + var tx = Rd(y(V)); + if (tx !== 0) break; + } + if (tx === 1) for (;;) { + if (Pr(y(V)) === 0) { + for (;;) { + H(V, 0); + var _x = Rd(y(V)); + if (_x !== 0) break; + } + if (_x === 1) continue; + var gx = g(V); + } else var gx = g(V); + var ex = gx; + break; + } + else var ex = g(V); + } else var ex = g(V); + return ex === 0 ? [ + 0, + b, + Lt(4, o1(V)) + ] : Px(I70); + }); + case 20: return [ + 0, + x, + Lt(4, o1(r)) + ]; + case 21: return N1(x, r, function(b, V) { + function tx(ux) { + var br = Bd(y(ux)); + if (2 < br >>> 0) return g(ux); + switch (br) { + case 0: + var nr = Yo(y(ux)); + return nr === 0 ? _x(ux) : nr === 1 ? gx(ux) : g(ux); + case 1: return _x(ux); + default: return gx(ux); + } + } + function _x(ux) { + for (;;) { + var br = Nl(y(ux)); + if (br !== 0) return br === 1 ? 0 : g(ux); + } + } + function gx(ux) { + for (;;) { + var br = Rt(y(ux)); + if (2 < br >>> 0) return g(ux); + switch (br) { + case 0: break; + case 1: + for (;;) { + if (Er(y(ux)) !== 0) return g(ux); + x: for (;;) { + var nr = Rt(y(ux)); + if (2 < nr >>> 0) return g(ux); + switch (nr) { + case 0: break; + case 1: break x; + default: return 0; + } + } + } + break; + default: return 0; + } + } + } + function ex(ux) { + var br = Od(y(ux)); + if (br !== 0) return br === 1 ? tx(ux) : g(ux); + x: for (;;) { + var nr = pe(y(ux)); + if (2 < nr >>> 0) return g(ux); + switch (nr) { + case 0: break; + case 1: return tx(ux); + default: break x; + } + } + for (;;) { + if (Er(y(ux)) !== 0) return g(ux); + x: for (;;) { + var $r = pe(y(ux)); + if (2 < $r >>> 0) return g(ux); + switch ($r) { + case 0: break; + case 1: return tx(ux); + default: break x; + } + } + } + } + Tr(V); + var Jx = Go(y(V)); + if (2 < Jx >>> 0) var Ux = g(V); + else x: switch (Jx) { + case 0: + if (Er(y(V)) === 0) { + r: for (;;) { + var hr = pe(y(V)); + if (2 < hr >>> 0) { + var Ux = g(V); + break x; + } + switch (hr) { + case 0: break; + case 1: + var Ux = tx(V); + break x; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(V)) === 0) { + e: for (;;) { + var dr = pe(y(V)); + if (2 < dr >>> 0) { + var V0 = g(V); + break r; + } + switch (dr) { + case 0: break; + case 1: + var V0 = tx(V); + break r; + default: break e; + } + } + continue; + } + var V0 = g(V); + } + var Ux = V0; + break; + } + } else var Ux = g(V); + break; + case 1: + var K0 = dd(y(V)), Ux = K0 === 0 ? ex(V) : K0 === 1 ? tx(V) : g(V); + break; + default: r: for (;;) { + var Cx = Cd(y(V)); + if (2 < Cx >>> 0) { + var Ux = g(V); + break; + } + switch (Cx) { + case 0: + var Ux = ex(V); + break r; + case 1: break; + default: + var Ux = tx(V); + break r; + } + } + } + if (Ux !== 0) return Px(A70); + var bx = o1(V); + return [ + 0, + D2(b, Jr(b, V), 41), + qt(2, bx) + ]; + }); + case 22: + var lx = o1(r); + return [ + 0, + D2(x, Jr(x, r), 41), + qt(2, lx) + ]; + case 23: return N1(x, r, function(b, V) { + function tx(bx) { + var Ox = Bd(y(bx)); + if (2 < Ox >>> 0) return g(bx); + switch (Ox) { + case 0: + var ux = Yo(y(bx)); + return ux === 0 ? _x(bx) : ux === 1 ? gx(bx) : g(bx); + case 1: return _x(bx); + default: return gx(bx); + } + } + function _x(bx) { + for (;;) if (H(bx, 0), Er(y(bx)) !== 0) return g(bx); + } + function gx(bx) { + for (;;) { + H(bx, 0); + var Ox = Jo(y(bx)); + if (Ox !== 0) { + if (Ox !== 1) return g(bx); + for (;;) { + if (Er(y(bx)) !== 0) return g(bx); + for (;;) { + H(bx, 0); + var ux = Jo(y(bx)); + if (ux !== 0) break; + } + if (ux !== 1) return g(bx); + } + } + } + } + function ex(bx) { + var Ox = Od(y(bx)); + if (Ox !== 0) return Ox === 1 ? tx(bx) : g(bx); + x: for (;;) { + var ux = pe(y(bx)); + if (2 < ux >>> 0) return g(bx); + switch (ux) { + case 0: break; + case 1: return tx(bx); + default: break x; + } + } + for (;;) { + if (Er(y(bx)) !== 0) return g(bx); + x: for (;;) { + var br = pe(y(bx)); + if (2 < br >>> 0) return g(bx); + switch (br) { + case 0: break; + case 1: return tx(bx); + default: break x; + } + } + } + } + Tr(V); + var Jx = Go(y(V)); + if (2 < Jx >>> 0) var Ux = g(V); + else x: switch (Jx) { + case 0: + if (Er(y(V)) === 0) { + r: for (;;) { + var hr = pe(y(V)); + if (2 < hr >>> 0) { + var Ux = g(V); + break x; + } + switch (hr) { + case 0: break; + case 1: + var Ux = tx(V); + break x; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(V)) === 0) { + e: for (;;) { + var dr = pe(y(V)); + if (2 < dr >>> 0) { + var V0 = g(V); + break r; + } + switch (dr) { + case 0: break; + case 1: + var V0 = tx(V); + break r; + default: break e; + } + } + continue; + } + var V0 = g(V); + } + var Ux = V0; + break; + } + } else var Ux = g(V); + break; + case 1: + var K0 = dd(y(V)), Ux = K0 === 0 ? ex(V) : K0 === 1 ? tx(V) : g(V); + break; + default: r: for (;;) { + var Cx = Cd(y(V)); + if (2 < Cx >>> 0) { + var Ux = g(V); + break; + } + switch (Cx) { + case 0: + var Ux = ex(V); + break r; + case 1: break; + default: + var Ux = tx(V); + break r; + } + } + } + return Ux === 0 ? [ + 0, + b, + Lt(4, o1(V)) + ] : Px(S70); + }); + case 24: return [ + 0, + x, + Lt(4, o1(r)) + ]; + case 25: return N1(x, r, function(b, V) { + function tx(Cx) { + for (;;) { + var bx = Rt(y(Cx)); + if (2 < bx >>> 0) return g(Cx); + switch (bx) { + case 0: break; + case 1: + for (;;) { + if (Er(y(Cx)) !== 0) return g(Cx); + x: for (;;) { + var Ox = Rt(y(Cx)); + if (2 < Ox >>> 0) return g(Cx); + switch (Ox) { + case 0: break; + case 1: break x; + default: return 0; + } + } + } + break; + default: return 0; + } + } + } + function _x(Cx) { + var bx = Nl(y(Cx)); + return bx === 0 ? tx(Cx) : bx === 1 ? 0 : g(Cx); + } + Tr(V); + var gx = Go(y(V)); + if (2 < gx >>> 0) var ex = g(V); + else x: switch (gx) { + case 0: + var ex = Er(y(V)) === 0 ? tx(V) : g(V); + break; + case 1: + for (;;) { + var Jx = jl(y(V)); + if (Jx === 0) { + var ex = _x(V); + break; + } + if (Jx !== 1) { + var ex = g(V); + break; + } + } + break; + default: + r: for (;;) { + var Ux = Ko(y(V)); + if (2 < Ux >>> 0) { + var ex = g(V); + break x; + } + switch (Ux) { + case 0: + var ex = _x(V); + break x; + case 1: break; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(V)) === 0) { + e: for (;;) { + var hr = Ko(y(V)); + if (2 < hr >>> 0) { + var dr = g(V); + break r; + } + switch (hr) { + case 0: + var dr = _x(V); + break r; + case 1: break; + default: break e; + } + } + continue; + } + var dr = g(V); + } + var ex = dr; + break; + } + } + if (ex !== 0) return Px(E70); + var V0 = o1(V); + return [ + 0, + D2(b, Jr(b, V), 33), + qt(2, V0) + ]; + }); + case 26: return N1(x, r, function(b, V) { + Tr(V); + var tx = Yo(y(V)); + x: if (tx === 0) for (;;) { + var _x = Nl(y(V)); + if (_x !== 0) { + if (_x === 1) { + var Ux = 0; + break; + } + var Ux = g(V); + break; + } + } + else if (tx === 1) { + r: for (;;) { + var gx = Rt(y(V)); + if (2 < gx >>> 0) { + var Ux = g(V); + break x; + } + switch (gx) { + case 0: break; + case 1: break r; + default: + var Ux = 0; + break x; + } + } + for (;;) { + r: { + if (Er(y(V)) === 0) { + e: for (;;) { + var ex = Rt(y(V)); + if (2 < ex >>> 0) { + var Jx = g(V); + break r; + } + switch (ex) { + case 0: break; + case 1: break e; + default: + var Jx = 0; + break r; + } + } + continue; + } + var Jx = g(V); + } + var Ux = Jx; + break; + } + } else var Ux = g(V); + return Ux === 0 ? [ + 0, + b, + qt(2, o1(V)) + ] : Px(T70); + }); + case 27: + var Q = o1(r); + return [ + 0, + D2(x, Jr(x, r), 33), + qt(2, Q) + ]; + case 28: return [ + 0, + x, + qt(2, o1(r)) + ]; + case 29: return N1(x, r, function(b, V) { + function tx(V0) { + for (;;) { + H(V0, 0); + var K0 = Jo(y(V0)); + if (K0 !== 0) { + if (K0 !== 1) return g(V0); + for (;;) { + if (Er(y(V0)) !== 0) return g(V0); + for (;;) { + H(V0, 0); + var Cx = Jo(y(V0)); + if (Cx !== 0) break; + } + if (Cx !== 1) return g(V0); + } + } + } + } + function _x(V0) { + return H(V0, 0), Er(y(V0)) === 0 ? tx(V0) : g(V0); + } + Tr(V); + var gx = Go(y(V)); + if (2 < gx >>> 0) var ex = g(V); + else x: switch (gx) { + case 0: + var ex = Er(y(V)) === 0 ? tx(V) : g(V); + break; + case 1: + for (;;) { + H(V, 0); + var Jx = jl(y(V)); + if (Jx === 0) { + var ex = _x(V); + break; + } + if (Jx !== 1) { + var ex = g(V); + break; + } + } + break; + default: + r: for (;;) { + H(V, 0); + var Ux = Ko(y(V)); + if (2 < Ux >>> 0) { + var ex = g(V); + break x; + } + switch (Ux) { + case 0: + var ex = _x(V); + break x; + case 1: break; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(V)) === 0) { + e: for (;;) { + H(V, 0); + var hr = Ko(y(V)); + if (2 < hr >>> 0) { + var dr = g(V); + break r; + } + switch (hr) { + case 0: + var dr = _x(V); + break r; + case 1: break; + default: break e; + } + } + continue; + } + var dr = g(V); + } + var ex = dr; + break; + } + } + return ex === 0 ? [ + 0, + b, + Lt(4, o1(V)) + ] : Px(b70); + }); + case 30: return [ + 0, + x, + Lt(4, o1(r)) + ]; + case 31: return [ + 0, + x, + 68 + ]; + case 32: return [ + 0, + x, + 6 + ]; + default: return [ + 0, + x, + 7 + ]; + } + switch (t0) { + case 34: return [ + 0, + x, + 0 + ]; + case 35: return [ + 0, + x, + 1 + ]; + case 36: return [ + 0, + x, + 2 + ]; + case 37: return [ + 0, + x, + 3 + ]; + case 38: return [ + 0, + x, + 4 + ]; + case 39: return [ + 0, + x, + 5 + ]; + case 40: return [ + 0, + x, + 12 + ]; + case 41: return [ + 0, + x, + 10 + ]; + case 42: return [ + 0, + x, + 8 + ]; + case 43: return [ + 0, + x, + 9 + ]; + case 44: return [ + 0, + x, + 88 + ]; + case 45: return [ + 0, + x, + 85 + ]; + case 46: return [ + 0, + x, + 87 + ]; + case 47: return [ + 0, + x, + 6 + ]; + case 48: return [ + 0, + x, + 7 + ]; + case 49: return [ + 0, + x, + cr + ]; + case 50: return [ + 0, + x, + k1 + ]; + case 51: return [ + 0, + x, + 84 + ]; + case 52: return [ + 0, + x, + 87 + ]; + case 53: return [ + 0, + x, + d2 + ]; + case 54: return [ + 0, + x, + 88 + ]; + case 55: return [ + 0, + x, + 90 + ]; + case 56: return [ + 0, + x, + 89 + ]; + case 57: return [ + 0, + x, + 91 + ]; + case 58: return [ + 0, + x, + 93 + ]; + case 59: return [ + 0, + x, + 11 + ]; + case 60: return [ + 0, + x, + 84 + ]; + case 61: return [ + 0, + x, + p2 + ]; + case 62: return [ + 0, + x, + Ct + ]; + case 63: return [ + 0, + x, + s8 + ]; + case 64: return [ + 0, + x, + sm + ]; + case 65: + var M = r[6]; + eX(r); + var d0 = C4(x, M, r[3]); + wO(r, M); + var g0 = o1(r), h0 = fX(x, g0), A0 = h0[2], $0 = h0[1], Kx = sx(A0, Lm); + if (0 <= Kx) { + if (0 >= Kx) return [ + 0, + $0, + Gr + ]; + var J = sx(A0, K3); + if (0 <= J) { + if (0 >= J) return [ + 0, + $0, + $6 + ]; + if (!C(A0, H6)) return [ + 0, + $0, + un + ]; + if (!C(A0, Pa)) return [ + 0, + $0, + 33 + ]; + if (!C(A0, Aa)) return [ + 0, + $0, + 48 + ]; + if (!C(A0, Hk)) return [ + 0, + $0, + v8 + ]; + if (!C(A0, hk)) return [ + 0, + $0, + zv + ]; + if (!C(A0, ga)) return [ + 0, + $0, + e1 + ]; + } else { + if (!C(A0, wk)) return [ + 0, + $0, + Z6 + ]; + if (!C(A0, bk)) return [ + 0, + $0, + So + ]; + if (!C(A0, Hv)) return [ + 0, + $0, + 31 + ]; + if (!C(A0, H3)) return [ + 0, + $0, + b6 + ]; + if (!C(A0, Xv)) return [ + 0, + $0, + R1 + ]; + if (!C(A0, Ue)) return [ + 0, + $0, + 44 + ]; + } + } else { + var tr = sx(A0, be); + if (0 <= tr) { + if (0 >= tr) return [ + 0, + $0, + q6 + ]; + if (!C(A0, mc)) return [ + 0, + $0, + 43 + ]; + if (!C(A0, wa)) return [ + 0, + $0, + 32 + ]; + if (!C(A0, V3)) return [ + 0, + $0, + N6 + ]; + if (!C(A0, FD)) return [ + 0, + $0, + kk + ]; + if (!C(A0, ae)) return [ + 0, + $0, + 55 + ]; + if (!C(A0, J6)) return [ + 0, + $0, + Qv + ]; + } else { + if (!C(A0, ik)) return [ + 0, + $0, + Ca + ]; + if (!C(A0, tl)) return [ + 0, + $0, + M6 + ]; + if (!C(A0, $v)) return [ + 0, + $0, + Cf + ]; + if (!C(A0, rm)) return [ + 0, + $0, + L70 + ]; + if (!C(A0, O6)) return [ + 0, + $0, + M70 + ]; + if (!C(A0, No)) return [ + 0, + $0, + 29 + ]; + } + } + return [ + 0, + $0, + [ + 4, + d0, + A0, + S4(g0) + ] + ]; + case 66: return [ + 0, + x[4] ? D2(x, Jr(x, r), 94) : x, + wr + ]; + default: return [ + 0, + x, + [7, Fx(r)] + ]; + } + }), rS0 = N4(function(x, r) { + function e(w) { + for (;;) if (H(w, 33), mr(y(w)) !== 0) return g(w); + } + function t(w) { + H(w, 33); + var Y = HU(y(w)); + if (3 < Y >>> 0) return g(w); + switch (Y) { + case 0: return e(w); + case 1: + var px = Yo(y(w)); + if (px === 0) for (;;) { + H(w, 28); + var X0 = Cl(y(w)); + if (2 < X0 >>> 0) return g(w); + switch (X0) { + case 0: return u(w); + case 1: break; + default: return i(w); + } + } + else { + if (px !== 1) return g(w); + for (;;) { + H(w, 28); + var vx = Bs(y(w)); + if (3 < vx >>> 0) return g(w); + switch (vx) { + case 0: return u(w); + case 1: break; + case 2: return c(w); + default: return i(w); + } + } + } + break; + case 2: + for (;;) { + H(w, 28); + var Ix = Cl(y(w)); + if (2 < Ix >>> 0) return g(w); + switch (Ix) { + case 0: return v(w); + case 1: break; + default: return o(w); + } + } + break; + default: for (;;) { + H(w, 28); + var Cr = Bs(y(w)); + if (3 < Cr >>> 0) return g(w); + switch (Cr) { + case 0: return v(w); + case 1: break; + case 2: return c(w); + default: return o(w); + } + } + } + } + function u(w) { + for (;;) if (H(w, 27), mr(y(w)) !== 0) return g(w); + } + function i(w) { + H(w, 26); + var Y = q1(y(w)); + if (Y !== 0) return Y === 1 ? u(w) : g(w); + for (;;) if (H(w, 25), mr(y(w)) !== 0) return g(w); + } + function c(w) { + for (;;) { + if (Er(y(w)) !== 0) return g(w); + x: for (;;) { + H(w, 28); + var Y = Bs(y(w)); + if (3 < Y >>> 0) return g(w); + switch (Y) { + case 0: return u(w); + case 1: break; + case 2: break x; + default: return i(w); + } + } + } + } + function v(w) { + for (;;) if (H(w, 27), mr(y(w)) !== 0) return g(w); + } + function o(w) { + H(w, 26); + var Y = q1(y(w)); + if (Y !== 0) return Y === 1 ? v(w) : g(w); + for (;;) if (H(w, 25), mr(y(w)) !== 0) return g(w); + } + function l(w) { + H(w, 31); + var Y = q1(y(w)); + if (Y !== 0) return Y === 1 ? e(w) : g(w); + for (;;) if (H(w, 29), mr(y(w)) !== 0) return g(w); + } + function k(w) { + return H(w, 3), xX(y(w)) === 0 ? 3 : g(w); + } + function h(w) { + return Dd(y(w)) === 0 && Ol(y(w)) === 0 && VU(y(w)) === 0 && UU(y(w)) === 0 && jd(y(w)) === 0 && Pd(y(w)) === 0 && I4(y(w)) === 0 && Dd(y(w)) === 0 && Ho(y(w)) === 0 && DO(y(w)) === 0 && Ja(y(w)) === 0 ? 3 : g(w); + } + function E(w) { + H(w, 34); + var Y = qU(y(w)); + if (3 < Y >>> 0) return g(w); + switch (Y) { + case 0: return e(w); + case 1: + x: for (;;) { + H(w, 34); + var px = zo(y(w)); + if (4 < px >>> 0) return g(w); + switch (px) { + case 0: return e(w); + case 1: break; + case 2: return t(w); + case 3: break x; + default: return l(w); + } + } + for (;;) { + if (Er(y(w)) !== 0) return g(w); + x: for (;;) { + H(w, 34); + var X0 = zo(y(w)); + if (4 < X0 >>> 0) return g(w); + switch (X0) { + case 0: return e(w); + case 1: break; + case 2: return t(w); + case 3: break x; + default: return l(w); + } + } + } + break; + case 2: return t(w); + default: return l(w); + } + } + function T(w) { + for (;;) if (H(w, 19), mr(y(w)) !== 0) return g(w); + } + function I(w) { + H(w, 34); + var Y = Cl(y(w)); + if (2 < Y >>> 0) return g(w); + switch (Y) { + case 0: return e(w); + case 1: + x: for (;;) { + H(w, 34); + var px = Bs(y(w)); + if (3 < px >>> 0) return g(w); + switch (px) { + case 0: return e(w); + case 1: break; + case 2: break x; + default: return l(w); + } + } + for (;;) { + if (Er(y(w)) !== 0) return g(w); + x: for (;;) { + H(w, 34); + var X0 = Bs(y(w)); + if (3 < X0 >>> 0) return g(w); + switch (X0) { + case 0: return e(w); + case 1: break; + case 2: break x; + default: return l(w); + } + } + } + break; + default: return l(w); + } + } + function N(w) { + for (;;) if (H(w, 17), mr(y(w)) !== 0) return g(w); + } + function P(w) { + for (;;) if (H(w, 17), mr(y(w)) !== 0) return g(w); + } + function R(w) { + for (;;) if (H(w, 11), mr(y(w)) !== 0) return g(w); + } + function q(w) { + for (;;) if (H(w, 11), mr(y(w)) !== 0) return g(w); + } + function X(w) { + for (;;) if (H(w, 15), mr(y(w)) !== 0) return g(w); + } + function B(w) { + for (;;) if (H(w, 15), mr(y(w)) !== 0) return g(w); + } + function z(w) { + for (;;) if (H(w, 23), mr(y(w)) !== 0) return g(w); + } + function x0(w) { + for (;;) if (H(w, 23), mr(y(w)) !== 0) return g(w); + } + function W(w) { + H(w, 32); + var Y = q1(y(w)); + if (Y !== 0) return Y === 1 ? e(w) : g(w); + for (;;) if (H(w, 30), mr(y(w)) !== 0) return g(w); + } + function Z(w) { + for (;;) { + if (Er(y(w)) !== 0) return g(w); + x: for (;;) { + H(w, 34); + var Y = JU(y(w)); + if (4 < Y >>> 0) return g(w); + switch (Y) { + case 0: return e(w); + case 1: return I(w); + case 2: break; + case 3: break x; + default: return W(w); + } + } + } + } + Tr(r); + var t0 = (function(w) { + var Y = KE0(y(w)); + if (36 < Y >>> 0) return g(w); + switch (Y) { + case 0: return 98; + case 1: return 99; + case 2: + if (H(w, 1), Ls(y(w)) !== 0) return g(w); + for (;;) if (H(w, 1), Ls(y(w)) !== 0) return g(w); + break; + case 3: return 0; + case 4: return H(w, 0), Ie(y(w)) === 0 ? 0 : g(w); + case 5: return H(w, 88), gn(y(w)) === 0 ? (H(w, 58), gn(y(w)) === 0 ? 54 : g(w)) : g(w); + case 6: return 7; + case 7: + H(w, 95); + var px = y(w); + return (32 < px ? 33 < px ? -1 : 0 : -1) === 0 ? 6 : g(w); + case 8: return 97; + case 9: return H(w, 84), gn(y(w)) === 0 ? 71 : g(w); + case 10: + H(w, 86); + var vx = y(w), Ix = 37 < vx ? 61 < vx ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", vx - 38 | 0) - 1 | 0 : -1; + return Ix === 0 ? (H(w, 51), gn(y(w)) === 0 ? 76 : g(w)) : Ix === 1 ? 72 : g(w); + case 11: return 38; + case 12: return 39; + case 13: + H(w, 82); + var Cr = BU(y(w)); + if (2 < Cr >>> 0) return g(w); + switch (Cr) { + case 0: return H(w, 83), gn(y(w)) === 0 ? 70 : g(w); + case 1: return 4; + default: return 69; + } + case 14: + H(w, 80); + var Vx = y(w), f1 = 42 < Vx ? 61 < Vx ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", Vx + vb | 0) - 1 | 0 : -1; + return f1 === 0 ? 59 : f1 === 1 ? 67 : g(w); + case 15: return 45; + case 16: + H(w, 81); + var c1 = y(w), Fr = 44 < c1 ? 61 < c1 ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", c1 + xL | 0) - 1 | 0 : -1; + return Fr === 0 ? 60 : Fr === 1 ? 68 : g(w); + case 17: + H(w, 43); + var Zr = jl(y(w)); + if (Zr === 0) return NO(y(w)) === 0 ? 42 : g(w); + if (Zr !== 1) return g(w); + x: for (;;) { + H(w, 34); + var mx = zo(y(w)); + if (4 < mx >>> 0) return g(w); + switch (mx) { + case 0: return e(w); + case 1: break; + case 2: return t(w); + case 3: break x; + default: return l(w); + } + } + for (;;) { + if (Er(y(w)) !== 0) return g(w); + x: for (;;) { + H(w, 34); + var Mx = zo(y(w)); + if (4 < Mx >>> 0) return g(w); + switch (Mx) { + case 0: return e(w); + case 1: break; + case 2: return t(w); + case 3: break x; + default: return l(w); + } + } + } + break; + case 18: + H(w, 93); + var rr = BU(y(w)); + if (2 < rr >>> 0) return g(w); + switch (rr) { + case 0: + H(w, 2); + var Ar = bd(y(w)); + if (2 < Ar >>> 0) return g(w); + switch (Ar) { + case 0: + for (;;) { + var Or = bd(y(w)); + if (2 < Or >>> 0) return g(w); + switch (Or) { + case 0: break; + case 1: return k(w); + default: return h(w); + } + } + break; + case 1: return k(w); + default: return h(w); + } + break; + case 1: return 5; + default: return 92; + } + break; + case 19: + H(w, 34); + var ne = GU(y(w)); + if (8 < ne >>> 0) return g(w); + switch (ne) { + case 0: return e(w); + case 1: return E(w); + case 2: + x: { + r: for (;;) { + H(w, 20); + var Y2 = WU(y(w)); + if (4 < Y2 >>> 0) return g(w); + switch (Y2) { + case 0: return T(w); + case 1: return I(w); + case 2: break; + case 3: break x; + default: break r; + } + } + H(w, 19); + var je = q1(y(w)); + if (je !== 0) return je === 1 ? T(w) : g(w); + for (;;) if (H(w, 19), mr(y(w)) !== 0) return g(w); + } + x: for (;;) { + H(w, 18); + var kt = gd(y(w)); + if (3 < kt >>> 0) return g(w); + switch (kt) { + case 0: return N(w); + case 1: return I(w); + case 2: break; + default: break x; + } + } + H(w, 17); + var xo = q1(y(w)); + if (xo !== 0) return xo === 1 ? N(w) : g(w); + for (;;) if (H(w, 17), mr(y(w)) !== 0) return g(w); + break; + case 3: + x: for (;;) { + H(w, 18); + var Tn = gd(y(w)); + if (3 < Tn >>> 0) return g(w); + switch (Tn) { + case 0: return P(w); + case 1: return I(w); + case 2: break; + default: break x; + } + } + H(w, 17); + var ke = q1(y(w)); + if (ke !== 0) return ke === 1 ? P(w) : g(w); + for (;;) if (H(w, 17), mr(y(w)) !== 0) return g(w); + break; + case 4: + H(w, 33); + var ro = XU(y(w)); + if (ro === 0) return e(w); + if (ro !== 1) return g(w); + x: { + r: for (;;) { + H(w, 12); + var Js = Ld(y(w)); + if (3 < Js >>> 0) return g(w); + switch (Js) { + case 0: return R(w); + case 1: break; + case 2: break x; + default: break r; + } + } + H(w, 10); + var eo = q1(y(w)); + if (eo !== 0) return eo === 1 ? R(w) : g(w); + for (;;) if (H(w, 9), mr(y(w)) !== 0) return g(w); + } + x: for (;;) { + if (qs(y(w)) !== 0) return g(w); + r: for (;;) { + H(w, 12); + var Ks = Ld(y(w)); + if (3 < Ks >>> 0) return g(w); + switch (Ks) { + case 0: return q(w); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(w, 10); + var M2 = q1(y(w)); + if (M2 !== 0) return M2 === 1 ? q(w) : g(w); + for (;;) if (H(w, 9), mr(y(w)) !== 0) return g(w); + break; + case 5: return t(w); + case 6: + H(w, 33); + var L2 = YU(y(w)); + if (L2 === 0) return e(w); + if (L2 !== 1) return g(w); + x: { + r: for (;;) { + H(w, 16); + var g1 = Fd(y(w)); + if (3 < g1 >>> 0) return g(w); + switch (g1) { + case 0: return X(w); + case 1: break; + case 2: break x; + default: break r; + } + } + H(w, 14); + var En = q1(y(w)); + if (En !== 0) return En === 1 ? X(w) : g(w); + for (;;) if (H(w, 13), mr(y(w)) !== 0) return g(w); + } + x: for (;;) { + if (re(y(w)) !== 0) return g(w); + r: for (;;) { + H(w, 16); + var Sn = Fd(y(w)); + if (3 < Sn >>> 0) return g(w); + switch (Sn) { + case 0: return B(w); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(w, 14); + var Hs = q1(y(w)); + if (Hs !== 0) return Hs === 1 ? B(w) : g(w); + for (;;) if (H(w, 13), mr(y(w)) !== 0) return g(w); + break; + case 7: + H(w, 33); + var Ws = FU(y(w)); + if (Ws === 0) return e(w); + if (Ws !== 1) return g(w); + x: { + r: for (;;) { + H(w, 24); + var mt = qd(y(w)); + if (3 < mt >>> 0) return g(w); + switch (mt) { + case 0: return z(w); + case 1: break; + case 2: break x; + default: break r; + } + } + H(w, 22); + var to = q1(y(w)); + if (to !== 0) return to === 1 ? z(w) : g(w); + for (;;) if (H(w, 21), mr(y(w)) !== 0) return g(w); + } + x: for (;;) { + if (Pr(y(w)) !== 0) return g(w); + r: for (;;) { + H(w, 24); + var Q1 = qd(y(w)); + if (3 < Q1 >>> 0) return g(w); + switch (Q1) { + case 0: return x0(w); + case 1: break; + case 2: break r; + default: break x; + } + } + } + H(w, 22); + var ar = q1(y(w)); + if (ar !== 0) return ar === 1 ? x0(w) : g(w); + for (;;) if (H(w, 21), mr(y(w)) !== 0) return g(w); + break; + default: return W(w); + } + break; + case 20: + H(w, 34); + var no = Ed(y(w)); + if (5 < no >>> 0) return g(w); + switch (no) { + case 0: return e(w); + case 1: return E(w); + case 2: + for (;;) { + H(w, 34); + var Vs = Ed(y(w)); + if (5 < Vs >>> 0) return g(w); + switch (Vs) { + case 0: return e(w); + case 1: return E(w); + case 2: break; + case 3: return t(w); + case 4: return Z(w); + default: return W(w); + } + } + break; + case 3: return t(w); + case 4: return Z(w); + default: return W(w); + } + break; + case 21: return 46; + case 22: return 44; + case 23: + H(w, 78); + var ht = y(w), E3 = 59 < ht ? 61 < ht ? -1 : z0(Em, ht - 60 | 0) - 1 | 0 : -1; + return E3 === 0 ? (H(w, 62), gn(y(w)) === 0 ? 61 : g(w)) : E3 === 1 ? 55 : g(w); + case 24: + H(w, 90); + var S3 = jO(y(w)); + return S3 === 0 ? (H(w, 57), gn(y(w)) === 0 ? 53 : g(w)) : S3 === 1 ? 91 : g(w); + case 25: + H(w, 79); + var An = jO(y(w)); + if (An === 0) return 56; + if (An !== 1) return g(w); + H(w, 66); + var $s = jO(y(w)); + return $s === 0 ? 63 : $s === 1 ? (H(w, 65), gn(y(w)) === 0 ? 64 : g(w)) : g(w); + case 26: + H(w, 50); + var uo = y(w), tv = 45 < uo ? 63 < uo ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", uo + Po | 0) - 1 | 0 : -1; + return tv === 0 ? (H(w, 48), Er(y(w)) === 0 ? 47 : g(w)) : tv === 1 ? (H(w, 49), gn(y(w)) === 0 ? 75 : g(w)) : g(w); + case 27: + H(w, 94); + var Qs = y(w); + if ((63 < Qs ? 64 < Qs ? -1 : 0 : -1) !== 0) return g(w); + var io = y(w), uv = 96 < io ? p2 < io ? -1 : z0("\0\0\0\0\0\0", io + zk | 0) - 1 | 0 : -1; + if (2 < uv >>> 0) return g(w); + switch (uv) { + case 0: + if (v3(y(w)) !== 0) return g(w); + var z2 = y(w); + if ((Cf < z2 ? $6 < z2 ? -1 : 0 : -1) !== 0 || Pd(y(w)) !== 0 || I4(y(w)) !== 0) return g(w); + var Zs = y(w), In = 67 < Zs ? 73 < Zs ? -1 : z0(MF, Zs - 68 | 0) - 1 | 0 : -1; + return In === 0 ? jd(y(w)) === 0 && v3(y(w)) === 0 && $U(y(w)) === 0 && Ol(y(w)) === 0 && v3(y(w)) === 0 && Ja(y(w)) === 0 ? 35 : g(w) : In === 1 && Id(y(w)) === 0 && Ja(y(w)) === 0 && P4(y(w)) === 0 && zU(y(w)) === 0 && Id(y(w)) === 0 && Ol(y(w)) === 0 && P4(y(w)) === 0 ? 35 : g(w); + case 1: return jd(y(w)) === 0 && v3(y(w)) === 0 && $U(y(w)) === 0 && Ol(y(w)) === 0 && v3(y(w)) === 0 && Ja(y(w)) === 0 ? 35 : g(w); + default: return Id(y(w)) === 0 && Ja(y(w)) === 0 && P4(y(w)) === 0 && zU(y(w)) === 0 && Id(y(w)) === 0 && Ol(y(w)) === 0 && P4(y(w)) === 0 ? 35 : g(w); + } + case 28: return 40; + case 29: + if (H(w, 96), Ho(y(w)) !== 0) return g(w); + var fo = l3(y(w)); + if (fo === 0) return Pr(y(w)) === 0 && Pr(y(w)) === 0 && Pr(y(w)) === 0 ? 97 : g(w); + if (fo !== 1 || Pr(y(w)) !== 0) return g(w); + for (;;) { + var iv = o3(y(w)); + if (iv !== 0) return iv === 1 ? 97 : g(w); + } + break; + case 30: return 41; + case 31: return H(w, 87), gn(y(w)) === 0 ? 74 : g(w); + case 32: return 8; + case 33: return 36; + case 34: + H(w, 85); + var co = y(w), fv = 60 < co ? zv < co ? -1 : z0("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", co + CL | 0) - 1 | 0 : -1; + return fv === 0 ? 73 : fv === 1 ? (H(w, 52), gn(y(w)) === 0 ? 77 : g(w)) : g(w); + case 35: return 37; + default: return 89; + } + })(r); + if (99 < t0 >>> 0) return Px(Us0); + var i0 = t0; + if (50 > i0) switch (i0) { + case 0: return [2, ee(x, r)]; + case 1: return [2, x]; + case 2: + var u0 = j2(x, r), k0 = Kr(Gr), o0 = p3(x, k0, r), S0 = o0[1]; + return [ + 1, + S0, + Mt(S0, u0, o0[2], k0, 1) + ]; + case 3: + var s0 = Fx(r); + if (!x[5]) { + var v0 = j2(x, r), m0 = Kr(Gr); + lr(m0, C2(s0, 2, Rx(s0) - 2 | 0)); + var p0 = p3(x, m0, r), E0 = p0[1]; + return [ + 1, + E0, + Mt(E0, v0, p0[2], m0, 1) + ]; + } + var C0 = kd(1, x[4] ? nX(x, Jr(x, r), s0) : x), D0 = sd(r); + return Sr(E4(r, D0 - 1 | 0, 1), Iv) && C(E4(r, D0 - 2 | 0, 1), Iv) ? [ + 0, + C0, + 88 + ] : [2, C0]; + case 4: + if (x[4]) return [2, kd(0, x)]; + Pl(r), Tr(r); + return (LU(y(r)) === 0 ? 0 : g(r)) === 0 ? [ + 0, + x, + d2 + ] : Px(Xs0); + case 5: + var T0 = j2(x, r), M0 = Kr(Gr), y0 = Dl(x, M0, r), G = y0[1]; + return [ + 1, + G, + Mt(G, T0, y0[2], M0, 0) + ]; + case 6: + if (r[6] !== 0) return [ + 0, + x, + Gs0 + ]; + var j0 = j2(x, r), Q0 = Kr(Gr), q0 = Dl(x, Q0, r), ix = q0[1]; + return [ + 0, + ix, + [ + 6, + [ + 0, + ix[1], + j0, + q0[2] + ], + J1(Q0) + ] + ]; + case 7: + var fx = Fx(r), yx = j2(x, r), R0 = Kr(Gr), lx = Kr(Gr); + lr(lx, fx); + var kx = sX(x, fx, R0, lx, 0, r), Q = kx[1], I0 = kx[3], M = [ + 0, + Q[1], + yx, + kx[2] + ], d0 = J1(lx); + return [ + 0, + Q, + [2, [ + 0, + M, + J1(R0), + d0, + I0 + ]] + ]; + case 8: + var g0 = Kr(Gr), h0 = Kr(Gr), A0 = j2(x, r), $0 = aX(x, g0, h0, r), Kx = $0[1], J = $0[2], tr = Pe(Kx, r), Zx = [ + 0, + Kx[1], + A0, + tr + ], b = J1(h0); + return [ + 0, + Kx, + [3, [ + 0, + Zx, + J1(g0), + b, + 1, + J + ]] + ]; + case 9: return N1(x, r, function(w, Y) { + Tr(Y); + x: if (Ae(y(Y)) === 0 && Ad(y(Y)) === 0 && qs(y(Y)) === 0) { + r: for (;;) { + var px = _d(y(Y)); + if (2 < px >>> 0) { + var Ix = g(Y); + break x; + } + switch (px) { + case 0: break; + case 1: break r; + default: + var Ix = 0; + break x; + } + } + for (;;) { + r: { + if (qs(y(Y)) === 0) { + e: for (;;) { + var X0 = _d(y(Y)); + if (2 < X0 >>> 0) { + var vx = g(Y); + break r; + } + switch (X0) { + case 0: break; + case 1: break e; + default: + var vx = 0; + break r; + } + } + continue; + } + var vx = g(Y); + } + var Ix = vx; + break; + } + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 1, + 0, + Fx(Y) + ] + ] : Px(Bs0); + }); + case 10: return [ + 0, + x, + [ + 1, + 0, + Fx(r) + ] + ]; + case 11: return N1(x, r, function(w, Y) { + if (Tr(Y), Ae(y(Y)) === 0 && Ad(y(Y)) === 0 && qs(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var px = yd(y(Y)); + if (px !== 0) break; + } + if (px === 1) for (;;) { + if (qs(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var X0 = yd(y(Y)); + if (X0 !== 0) break; + } + if (X0 === 1) continue; + var vx = g(Y); + } else var vx = g(Y); + var Ix = vx; + break; + } + else var Ix = g(Y); + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 0, + 0, + Fx(Y) + ] + ] : Px(qs0); + }); + case 12: return [ + 0, + x, + [ + 0, + 0, + Fx(r) + ] + ]; + case 13: return N1(x, r, function(w, Y) { + Tr(Y); + x: if (Ae(y(Y)) === 0 && Nd(y(Y)) === 0 && re(y(Y)) === 0) { + r: for (;;) { + var px = Sd(y(Y)); + if (2 < px >>> 0) { + var Ix = g(Y); + break x; + } + switch (px) { + case 0: break; + case 1: break r; + default: + var Ix = 0; + break x; + } + } + for (;;) { + r: { + if (re(y(Y)) === 0) { + e: for (;;) { + var X0 = Sd(y(Y)); + if (2 < X0 >>> 0) { + var vx = g(Y); + break r; + } + switch (X0) { + case 0: break; + case 1: break e; + default: + var vx = 0; + break r; + } + } + continue; + } + var vx = g(Y); + } + var Ix = vx; + break; + } + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 1, + 1, + Fx(Y) + ] + ] : Px(Ls0); + }); + case 14: return [ + 0, + x, + [ + 1, + 1, + Fx(r) + ] + ]; + case 15: return N1(x, r, function(w, Y) { + if (Tr(Y), Ae(y(Y)) === 0 && Nd(y(Y)) === 0 && re(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var px = Td(y(Y)); + if (px !== 0) break; + } + if (px === 1) for (;;) { + if (re(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var X0 = Td(y(Y)); + if (X0 !== 0) break; + } + if (X0 === 1) continue; + var vx = g(Y); + } else var vx = g(Y); + var Ix = vx; + break; + } + else var Ix = g(Y); + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 0, + 3, + Fx(Y) + ] + ] : Px(Ms0); + }); + case 16: return [ + 0, + x, + [ + 0, + 3, + Fx(r) + ] + ]; + case 17: return N1(x, r, function(w, Y) { + if (Tr(Y), Ae(y(Y)) === 0) { + for (;;) { + var px = y(Y), X0 = 47 < px ? 57 < px ? -1 : z0("", px + r2 | 0) - 1 | 0 : -1; + if (X0 !== 0) break; + } + if (X0 === 1) { + for (;;) if (H(Y, 0), Er(y(Y)) !== 0) { + var vx = g(Y); + break; + } + } else var vx = g(Y); + } else var vx = g(Y); + return vx === 0 ? [ + 0, + w, + [ + 0, + 2, + Fx(Y) + ] + ] : Px(Fs0); + }); + case 18: return [ + 0, + x, + [ + 0, + 2, + Fx(r) + ] + ]; + case 19: return N1(x, r, function(w, Y) { + if (Tr(Y), Ae(y(Y)) === 0 && re(y(Y)) === 0) { + for (;;) if (H(Y, 0), re(y(Y)) !== 0) { + var px = g(Y); + break; + } + } else var px = g(Y); + return px === 0 ? [ + 0, + w, + [ + 0, + 1, + Fx(Y) + ] + ] : Px(Rs0); + }); + case 20: return [ + 0, + x, + [ + 0, + 1, + Fx(r) + ] + ]; + case 21: return N1(x, r, function(w, Y) { + Tr(Y); + x: if (Ae(y(Y)) === 0 && hd(y(Y)) === 0 && Pr(y(Y)) === 0) { + r: for (;;) { + var px = wd(y(Y)); + if (2 < px >>> 0) { + var Ix = g(Y); + break x; + } + switch (px) { + case 0: break; + case 1: break r; + default: + var Ix = 0; + break x; + } + } + for (;;) { + r: { + if (Pr(y(Y)) === 0) { + e: for (;;) { + var X0 = wd(y(Y)); + if (2 < X0 >>> 0) { + var vx = g(Y); + break r; + } + switch (X0) { + case 0: break; + case 1: break e; + default: + var vx = 0; + break r; + } + } + continue; + } + var vx = g(Y); + } + var Ix = vx; + break; + } + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 1, + 2, + Fx(Y) + ] + ] : Px(Ds0); + }); + case 22: return [ + 0, + x, + [ + 1, + 2, + Fx(r) + ] + ]; + case 23: return N1(x, r, function(w, Y) { + if (Tr(Y), Ae(y(Y)) === 0 && hd(y(Y)) === 0 && Pr(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var px = Rd(y(Y)); + if (px !== 0) break; + } + if (px === 1) for (;;) { + if (Pr(y(Y)) === 0) { + for (;;) { + H(Y, 0); + var X0 = Rd(y(Y)); + if (X0 !== 0) break; + } + if (X0 === 1) continue; + var vx = g(Y); + } else var vx = g(Y); + var Ix = vx; + break; + } + else var Ix = g(Y); + } else var Ix = g(Y); + return Ix === 0 ? [ + 0, + w, + [ + 0, + 4, + Fx(Y) + ] + ] : Px(js0); + }); + case 24: return [ + 0, + x, + [ + 0, + 4, + Fx(r) + ] + ]; + case 25: return N1(x, r, function(w, Y) { + function px(rr) { + var Ar = Bd(y(rr)); + if (2 < Ar >>> 0) return g(rr); + switch (Ar) { + case 0: + var Or = Yo(y(rr)); + return Or === 0 ? X0(rr) : Or === 1 ? vx(rr) : g(rr); + case 1: return X0(rr); + default: return vx(rr); + } + } + function X0(rr) { + for (;;) { + var Ar = Nl(y(rr)); + if (Ar !== 0) return Ar === 1 ? 0 : g(rr); + } + } + function vx(rr) { + for (;;) { + var Ar = Rt(y(rr)); + if (2 < Ar >>> 0) return g(rr); + switch (Ar) { + case 0: break; + case 1: + for (;;) { + if (Er(y(rr)) !== 0) return g(rr); + x: for (;;) { + var Or = Rt(y(rr)); + if (2 < Or >>> 0) return g(rr); + switch (Or) { + case 0: break; + case 1: break x; + default: return 0; + } + } + } + break; + default: return 0; + } + } + } + function Ix(rr) { + var Ar = Od(y(rr)); + if (Ar !== 0) return Ar === 1 ? px(rr) : g(rr); + x: for (;;) { + var Or = pe(y(rr)); + if (2 < Or >>> 0) return g(rr); + switch (Or) { + case 0: break; + case 1: return px(rr); + default: break x; + } + } + for (;;) { + if (Er(y(rr)) !== 0) return g(rr); + x: for (;;) { + var ne = pe(y(rr)); + if (2 < ne >>> 0) return g(rr); + switch (ne) { + case 0: break; + case 1: return px(rr); + default: break x; + } + } + } + } + Tr(Y); + var Cr = Go(y(Y)); + if (2 < Cr >>> 0) var Vx = g(Y); + else x: switch (Cr) { + case 0: + if (Er(y(Y)) === 0) { + r: for (;;) { + var f1 = pe(y(Y)); + if (2 < f1 >>> 0) { + var Vx = g(Y); + break x; + } + switch (f1) { + case 0: break; + case 1: + var Vx = px(Y); + break x; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(Y)) === 0) { + e: for (;;) { + var c1 = pe(y(Y)); + if (2 < c1 >>> 0) { + var Fr = g(Y); + break r; + } + switch (c1) { + case 0: break; + case 1: + var Fr = px(Y); + break r; + default: break e; + } + } + continue; + } + var Fr = g(Y); + } + var Vx = Fr; + break; + } + } else var Vx = g(Y); + break; + case 1: + var Zr = dd(y(Y)), Vx = Zr === 0 ? Ix(Y) : Zr === 1 ? px(Y) : g(Y); + break; + default: r: for (;;) { + var mx = Cd(y(Y)); + if (2 < mx >>> 0) { + var Vx = g(Y); + break; + } + switch (mx) { + case 0: + var Vx = Ix(Y); + break r; + case 1: break; + default: + var Vx = px(Y); + break r; + } + } + } + if (Vx !== 0) return Px(Os0); + return [ + 0, + D2(w, Jr(w, Y), 41), + [ + 1, + 2, + Fx(Y) + ] + ]; + }); + case 26: return [ + 0, + D2(x, Jr(x, r), 41), + [ + 1, + 2, + Fx(r) + ] + ]; + case 27: return N1(x, r, function(w, Y) { + function px(Mx) { + var rr = Bd(y(Mx)); + if (2 < rr >>> 0) return g(Mx); + switch (rr) { + case 0: + var Ar = Yo(y(Mx)); + return Ar === 0 ? X0(Mx) : Ar === 1 ? vx(Mx) : g(Mx); + case 1: return X0(Mx); + default: return vx(Mx); + } + } + function X0(Mx) { + for (;;) if (H(Mx, 0), Er(y(Mx)) !== 0) return g(Mx); + } + function vx(Mx) { + for (;;) { + H(Mx, 0); + var rr = Jo(y(Mx)); + if (rr !== 0) { + if (rr !== 1) return g(Mx); + for (;;) { + if (Er(y(Mx)) !== 0) return g(Mx); + for (;;) { + H(Mx, 0); + var Ar = Jo(y(Mx)); + if (Ar !== 0) break; + } + if (Ar !== 1) return g(Mx); + } + } + } + } + function Ix(Mx) { + var rr = Od(y(Mx)); + if (rr !== 0) return rr === 1 ? px(Mx) : g(Mx); + x: for (;;) { + var Ar = pe(y(Mx)); + if (2 < Ar >>> 0) return g(Mx); + switch (Ar) { + case 0: break; + case 1: return px(Mx); + default: break x; + } + } + for (;;) { + if (Er(y(Mx)) !== 0) return g(Mx); + x: for (;;) { + var Or = pe(y(Mx)); + if (2 < Or >>> 0) return g(Mx); + switch (Or) { + case 0: break; + case 1: return px(Mx); + default: break x; + } + } + } + } + Tr(Y); + var Cr = Go(y(Y)); + if (2 < Cr >>> 0) var Vx = g(Y); + else x: switch (Cr) { + case 0: + if (Er(y(Y)) === 0) { + r: for (;;) { + var f1 = pe(y(Y)); + if (2 < f1 >>> 0) { + var Vx = g(Y); + break x; + } + switch (f1) { + case 0: break; + case 1: + var Vx = px(Y); + break x; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(Y)) === 0) { + e: for (;;) { + var c1 = pe(y(Y)); + if (2 < c1 >>> 0) { + var Fr = g(Y); + break r; + } + switch (c1) { + case 0: break; + case 1: + var Fr = px(Y); + break r; + default: break e; + } + } + continue; + } + var Fr = g(Y); + } + var Vx = Fr; + break; + } + } else var Vx = g(Y); + break; + case 1: + var Zr = dd(y(Y)), Vx = Zr === 0 ? Ix(Y) : Zr === 1 ? px(Y) : g(Y); + break; + default: r: for (;;) { + var mx = Cd(y(Y)); + if (2 < mx >>> 0) { + var Vx = g(Y); + break; + } + switch (mx) { + case 0: + var Vx = Ix(Y); + break r; + case 1: break; + default: + var Vx = px(Y); + break r; + } + } + } + return Vx === 0 ? [ + 0, + w, + [ + 0, + 4, + Fx(Y) + ] + ] : Px(Ns0); + }); + case 28: return [ + 0, + x, + [ + 0, + 4, + Fx(r) + ] + ]; + case 29: return N1(x, r, function(w, Y) { + function px(Zr) { + for (;;) { + var mx = Rt(y(Zr)); + if (2 < mx >>> 0) return g(Zr); + switch (mx) { + case 0: break; + case 1: + for (;;) { + if (Er(y(Zr)) !== 0) return g(Zr); + x: for (;;) { + var Mx = Rt(y(Zr)); + if (2 < Mx >>> 0) return g(Zr); + switch (Mx) { + case 0: break; + case 1: break x; + default: return 0; + } + } + } + break; + default: return 0; + } + } + } + function X0(Zr) { + var mx = Nl(y(Zr)); + return mx === 0 ? px(Zr) : mx === 1 ? 0 : g(Zr); + } + Tr(Y); + var vx = Go(y(Y)); + if (2 < vx >>> 0) var Ix = g(Y); + else x: switch (vx) { + case 0: + var Ix = Er(y(Y)) === 0 ? px(Y) : g(Y); + break; + case 1: + for (;;) { + var Cr = jl(y(Y)); + if (Cr === 0) { + var Ix = X0(Y); + break; + } + if (Cr !== 1) { + var Ix = g(Y); + break; + } + } + break; + default: + r: for (;;) { + var Vx = Ko(y(Y)); + if (2 < Vx >>> 0) { + var Ix = g(Y); + break x; + } + switch (Vx) { + case 0: + var Ix = X0(Y); + break x; + case 1: break; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(Y)) === 0) { + e: for (;;) { + var f1 = Ko(y(Y)); + if (2 < f1 >>> 0) { + var c1 = g(Y); + break r; + } + switch (f1) { + case 0: + var c1 = X0(Y); + break r; + case 1: break; + default: break e; + } + } + continue; + } + var c1 = g(Y); + } + var Ix = c1; + break; + } + } + if (Ix !== 0) return Px(Cs0); + return [ + 0, + D2(w, Jr(w, Y), 33), + [ + 1, + 2, + Fx(Y) + ] + ]; + }); + case 30: return N1(x, r, function(w, Y) { + Tr(Y); + var px = Yo(y(Y)); + x: if (px === 0) for (;;) { + var X0 = Nl(y(Y)); + if (X0 !== 0) { + if (X0 === 1) { + var Vx = 0; + break; + } + var Vx = g(Y); + break; + } + } + else if (px === 1) { + r: for (;;) { + var vx = Rt(y(Y)); + if (2 < vx >>> 0) { + var Vx = g(Y); + break x; + } + switch (vx) { + case 0: break; + case 1: break r; + default: + var Vx = 0; + break x; + } + } + for (;;) { + r: { + if (Er(y(Y)) === 0) { + e: for (;;) { + var Ix = Rt(y(Y)); + if (2 < Ix >>> 0) { + var Cr = g(Y); + break r; + } + switch (Ix) { + case 0: break; + case 1: break e; + default: + var Cr = 0; + break r; + } + } + continue; + } + var Cr = g(Y); + } + var Vx = Cr; + break; + } + } else var Vx = g(Y); + return Vx === 0 ? [ + 0, + w, + [ + 1, + 2, + Fx(Y) + ] + ] : Px(Ps0); + }); + case 31: return [ + 0, + D2(x, Jr(x, r), 33), + [ + 1, + 2, + Fx(r) + ] + ]; + case 32: return [ + 0, + x, + [ + 1, + 2, + Fx(r) + ] + ]; + case 33: return N1(x, r, function(w, Y) { + function px(Fr) { + for (;;) { + H(Fr, 0); + var Zr = Jo(y(Fr)); + if (Zr !== 0) { + if (Zr !== 1) return g(Fr); + for (;;) { + if (Er(y(Fr)) !== 0) return g(Fr); + for (;;) { + H(Fr, 0); + var mx = Jo(y(Fr)); + if (mx !== 0) break; + } + if (mx !== 1) return g(Fr); + } + } + } + } + function X0(Fr) { + return H(Fr, 0), Er(y(Fr)) === 0 ? px(Fr) : g(Fr); + } + Tr(Y); + var vx = Go(y(Y)); + if (2 < vx >>> 0) var Ix = g(Y); + else x: switch (vx) { + case 0: + var Ix = Er(y(Y)) === 0 ? px(Y) : g(Y); + break; + case 1: + for (;;) { + H(Y, 0); + var Cr = jl(y(Y)); + if (Cr === 0) { + var Ix = X0(Y); + break; + } + if (Cr !== 1) { + var Ix = g(Y); + break; + } + } + break; + default: + r: for (;;) { + H(Y, 0); + var Vx = Ko(y(Y)); + if (2 < Vx >>> 0) { + var Ix = g(Y); + break x; + } + switch (Vx) { + case 0: + var Ix = X0(Y); + break x; + case 1: break; + default: break r; + } + } + for (;;) { + r: { + if (Er(y(Y)) === 0) { + e: for (;;) { + H(Y, 0); + var f1 = Ko(y(Y)); + if (2 < f1 >>> 0) { + var c1 = g(Y); + break r; + } + switch (f1) { + case 0: + var c1 = X0(Y); + break r; + case 1: break; + default: break e; + } + } + continue; + } + var c1 = g(Y); + } + var Ix = c1; + break; + } + } + return Ix === 0 ? [ + 0, + w, + [ + 0, + 4, + Fx(Y) + ] + ] : Px(Is0); + }); + case 34: return [ + 0, + x, + [ + 0, + 4, + Fx(r) + ] + ]; + case 35: + var _x = Jr(x, r), gx = Fx(r); + return [ + 0, + x, + [ + 4, + _x, + gx, + gx + ] + ]; + case 36: return [ + 0, + x, + 0 + ]; + case 37: return [ + 0, + x, + 1 + ]; + case 38: return [ + 0, + x, + 4 + ]; + case 39: return [ + 0, + x, + 5 + ]; + case 40: return [ + 0, + x, + 6 + ]; + case 41: return [ + 0, + x, + 7 + ]; + case 42: return [ + 0, + x, + 12 + ]; + case 43: return [ + 0, + x, + 10 + ]; + case 44: return [ + 0, + x, + 8 + ]; + case 45: return [ + 0, + x, + 9 + ]; + case 46: return [ + 0, + x, + 88 + ]; + case 47: + Pl(r), Tr(r); + var ex = y(r); + return ((62 < ex ? 63 < ex ? -1 : 0 : -1) === 0 ? 0 : g(r)) === 0 ? [ + 0, + x, + 87 + ] : Px(Ys0); + case 48: return [ + 0, + x, + 85 + ]; + default: return [ + 0, + x, + 86 + ]; + } + switch (i0) { + case 50: return [ + 0, + x, + 87 + ]; + case 51: return [ + 0, + x, + 90 + ]; + case 52: return [ + 0, + x, + 89 + ]; + case 53: return [ + 0, + x, + 96 + ]; + case 54: return [ + 0, + x, + 97 + ]; + case 55: return [ + 0, + x, + 98 + ]; + case 56: return [ + 0, + x, + 99 + ]; + case 57: return [ + 0, + x, + 94 + ]; + case 58: return [ + 0, + x, + 95 + ]; + case 59: return [ + 0, + x, + ef + ]; + case 60: return [ + 0, + x, + k2 + ]; + case 61: return [ + 0, + x, + 71 + ]; + case 62: return [ + 0, + x, + Ee + ]; + case 63: return [ + 0, + x, + 70 + ]; + case 64: return [ + 0, + x, + 69 + ]; + case 65: return [ + 0, + x, + ec + ]; + case 66: return [ + 0, + x, + Ss + ]; + case 67: return [ + 0, + x, + 80 + ]; + case 68: return [ + 0, + x, + 79 + ]; + case 69: return [ + 0, + x, + 77 + ]; + case 70: return [ + 0, + x, + 78 + ]; + case 71: return [ + 0, + x, + 75 + ]; + case 72: return [ + 0, + x, + 74 + ]; + case 73: return [ + 0, + x, + 73 + ]; + case 74: return [ + 0, + x, + 72 + ]; + case 75: return [ + 0, + x, + 81 + ]; + case 76: return [ + 0, + x, + 82 + ]; + case 77: return [ + 0, + x, + 83 + ]; + case 78: return [ + 0, + x, + cr + ]; + case 79: return [ + 0, + x, + k1 + ]; + case 80: return [ + 0, + x, + p2 + ]; + case 81: return [ + 0, + x, + Ct + ]; + case 82: return [ + 0, + x, + d2 + ]; + case 83: return [ + 0, + x, + wo + ]; + case 84: return [ + 0, + x, + n2 + ]; + case 85: return [ + 0, + x, + 91 + ]; + case 86: return [ + 0, + x, + 93 + ]; + case 87: return [ + 0, + x, + 92 + ]; + case 88: return [ + 0, + x, + nn + ]; + case 89: return [ + 0, + x, + h2 + ]; + case 90: return [ + 0, + x, + 84 + ]; + case 91: return [ + 0, + x, + 11 + ]; + case 92: return [ + 0, + x, + 76 + ]; + case 93: return [ + 0, + x, + Te + ]; + case 94: return [ + 0, + x, + 13 + ]; + case 95: return [ + 0, + x, + 14 + ]; + case 96: return [2, lt(x, Jr(x, r))]; + case 97: + var hr = r[6]; + eX(r); + var dr = C4(x, hr, r[3]); + wO(r, hr); + var V0 = Fx(r), K0 = sx(V0, ae); + if (0 <= K0) { + if (0 >= K0) return [ + 0, + x, + 55 + ]; + var Cx = sx(V0, fl); + if (0 <= Cx) { + if (0 >= Cx) return [ + 0, + x, + 53 + ]; + var bx = sx(V0, Aa); + if (0 <= bx) { + if (0 >= bx) return [ + 0, + x, + 48 + ]; + if (!C(V0, g6)) return [ + 0, + x, + 26 + ]; + if (!C(V0, ga)) return [ + 0, + x, + 49 + ]; + if (!C(V0, Tp)) return [ + 0, + x, + 27 + ]; + if (!C(V0, L8)) return [ + 0, + x, + 28 + ]; + if (!C(V0, H2)) return [ + 0, + x, + 60 + ]; + } else { + if (!C(V0, Ve)) return [ + 0, + x, + 20 + ]; + if (!C(V0, Bv)) return [ + 0, + x, + 23 + ]; + if (!C(V0, He)) return [ + 0, + x, + 24 + ]; + if (!C(V0, Pa)) return [ + 0, + x, + 33 + ]; + if (!C(V0, um)) return [ + 0, + x, + 25 + ]; + if (!C(V0, tc)) return [ + 0, + x, + 63 + ]; + } + } else { + var Ox = sx(V0, Pk); + if (0 <= Ox) { + if (0 >= Ox) return [ + 0, + x, + 56 + ]; + if (!C(V0, Q6)) return [ + 0, + x, + 57 + ]; + if (!C(V0, k6)) return [ + 0, + x, + 58 + ]; + if (!C(V0, W6)) return [ + 0, + x, + 59 + ]; + if (!C(V0, DT)) return [ + 0, + x, + 22 + ]; + if (!C(V0, Je)) return [ + 0, + x, + 19 + ]; + if (!C(V0, Ue)) return [ + 0, + x, + 44 + ]; + } else { + if (!C(V0, cl)) return [ + 0, + x, + 30 + ]; + if (!C(V0, $P)) return [ + 0, + x, + 21 + ]; + if (!C(V0, Yv)) return [ + 0, + x, + 46 + ]; + if (!C(V0, Hv)) return [ + 0, + x, + 31 + ]; + if (!C(V0, JS)) return [ + 0, + x, + 65 + ]; + if (!C(V0, zb)) return [ + 0, + x, + 64 + ]; + } + } + } else { + var ux = sx(V0, Ck); + if (0 <= ux) { + if (0 >= ux) return [ + 0, + x, + 45 + ]; + var br = sx(V0, $3); + if (0 <= br) { + if (0 >= br) return [ + 0, + x, + 15 + ]; + if (!C(V0, nm)) return [ + 0, + x, + 16 + ]; + if (!C(V0, Oo)) return [ + 0, + x, + 54 + ]; + if (!C(V0, W2)) return [ + 0, + x, + 52 + ]; + if (!C(V0, bo)) return [ + 0, + x, + 17 + ]; + if (!C(V0, I6)) return [ + 0, + x, + 18 + ]; + } else { + if (!C(V0, j6)) return [ + 0, + x, + 50 + ]; + if (!C(V0, dh)) return [ + 0, + x, + 51 + ]; + if (!C(V0, mc)) return [ + 0, + x, + 43 + ]; + if (!C(V0, wa)) return [ + 0, + x, + 32 + ]; + if (!C(V0, U8)) return [ + 0, + x, + 40 + ]; + if (!C(V0, K8)) return [ + 0, + x, + 41 + ]; + } + } else { + var nr = sx(V0, No); + if (0 <= nr) { + if (0 >= nr) return [ + 0, + x, + 29 + ]; + if (!C(V0, Xe)) return [ + 0, + x, + 37 + ]; + if (!C(V0, Ke)) return [ + 0, + x, + 61 + ]; + if (!C(V0, x4)) return [ + 0, + x, + 62 + ]; + if (!C(V0, Fv)) return [ + 0, + x, + 38 + ]; + if (!C(V0, E6)) return [ + 0, + x, + 47 + ]; + if (!C(V0, Tk)) return [ + 0, + x, + 39 + ]; + } else { + if (!C(V0, Io)) return [ + 0, + x, + 66 + ]; + if (!C(V0, Kv)) return [ + 0, + x, + 67 + ]; + if (!C(V0, We)) return [ + 0, + x, + 34 + ]; + if (!C(V0, rk)) return [ + 0, + x, + 35 + ]; + if (!C(V0, Rm)) return [ + 0, + x, + 36 + ]; + if (!C(V0, h6)) return [ + 0, + x, + 42 + ]; + } + } + } + var $r = o1(r), l1 = fX(x, $r), C1 = l1[2]; + return [ + 0, + l1[1], + [ + 4, + dr, + C1, + S4($r) + ] + ]; + case 98: return [ + 0, + x[4] ? D2(x, Jr(x, r), 94) : x, + wr + ]; + default: return [ + 0, + lt(x, Jr(x, r)), + [7, Fx(r)] + ]; + } + }), R2 = dU([0, jE0]); + function O4(x, r) { + return [ + 0, + 0, + 0, + r, + IU(x) + ]; + } + function Xd(x) { + var r = x[4]; + switch (x[3]) { + case 0: + var t0 = rS0(r); + break; + case 1: + var t0 = xS0(r); + break; + case 2: + var t0 = QE0(r); + break; + case 3: + var e = Pe(r, r[2]), t = Kr(Gr), u = Kr(Gr), i = r[2]; + Tr(i); + var c = y(i), v = un < c ? e2 < c ? 1 : v2 < c ? 2 : 1 : z0("", c + 1 | 0) - 1 | 0; + if (5 < v >>> 0) var o = g(i); + else switch (v) { + case 0: + var o = 1; + break; + case 1: + var o = 4; + break; + case 2: + var o = 0; + break; + case 3: + H(i, 0); + var o = Ie(y(i)) === 0 ? 0 : g(i); + break; + case 4: + var o = 2; + break; + default: var o = 3; + } + if (4 < o >>> 0) var l = Px(X70); + else switch (o) { + case 0: + var k = Fx(i); + lr(u, k), lr(t, k); + var h = vX(ee(r, i), t, u, i), E = Pe(h, i), T = J1(t), I = J1(u), l = [ + 0, + h, + [ + 9, + [ + 0, + h[1], + e, + E + ], + T, + I + ] + ]; + break; + case 1: + var l = [ + 0, + r, + wr + ]; + break; + case 2: + var l = [ + 0, + r, + cr + ]; + break; + case 3: + var l = [ + 0, + r, + 0 + ]; + break; + default: + Pl(i); + var N = vX(r, t, u, i), P = Pe(N, i), R = J1(t), q = J1(u), l = [ + 0, + N, + [ + 9, + [ + 0, + N[1], + e, + P + ], + R, + q + ] + ]; + } + var X = l[2], B = l[1], z = tX(B, X), x0 = B[6]; + if (x0 === 0) var Z = [ + 0, + B, + [ + 0, + X, + z, + 0, + 0 + ] + ]; + else var W = [ + 0, + X, + z, + cx(x0), + 0 + ], Z = [ + 0, + [ + 0, + B[1], + B[2], + B[3], + B[4], + B[5], + 0, + B[7] + ], + W + ]; + var t0 = Z; + break; + case 4: + var t0 = ZE0(r); + break; + default: var t0 = $E0(r); + } + var i0 = t0[1], u0 = t0[2], k0 = [ + 0, + IU(i0), + u0 + ]; + return x[4] = i0, x[1] ? x[2] = [0, k0] : x[1] = [0, k0], k0; + } + function lX(x) { + var r = x[1]; + return r ? r[1][2] : Xd(x)[2]; + } + function Rl(x) { + return v4(x[26][1]); + } + function d1(x) { + return x[30][6]; + } + function B0(x, r) { + var e = r[2]; + x[1][1] = [ + 0, + [ + 0, + r[1], + e + ], + x[1][1] + ]; + var t = x[25]; + return t ? p(t[1], x, e) : 0; + } + function j4(x, r) { + x[33][1] = r; + } + function Wo(x, r) { + if (x === 0) return lX(r[28][1]); + if (x !== 1) throw J0([ + 0, + Nr, + wa0 + ], 1); + var e = r[28][1]; + e[1] || Xd(e); + var t = e[2]; + return t ? t[1][2] : Xd(e)[2]; + } + function Ka(x, r) { + return x === r[5] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + x, + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function pX(x, r) { + return x === r[10] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + x, + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function FO(x, r) { + return x === r[20] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + x, + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function MO(x, r) { + return x === r[21] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + x, + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function kX(x, r) { + return x === r[22] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + x, + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function k3(x, r) { + return x === r[24] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + x, + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function LO(x, r) { + return x === r[16] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + x, + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function D4(x, r) { + return x === r[8] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + x, + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function R4(x, r) { + return x === r[14] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + x, + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function m3(x, r) { + return x === r[17] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + x, + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function qO(x, r) { + return x === r[18] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + x, + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function mX(x, r) { + return x === r[6] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + x, + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function hX(x, r) { + return x === r[7] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + x, + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function BO(x, r) { + return x === r[15] ? r : [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + x, + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + r[25], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function Gd(x, r) { + return [ + 0, + r[1], + r[2], + r[3], + r[4], + r[5], + r[6], + r[7], + r[8], + r[9], + r[10], + r[11], + r[12], + r[13], + r[14], + r[15], + r[16], + r[17], + r[18], + r[19], + r[20], + r[21], + r[22], + r[23], + r[24], + [0, x], + r[26], + r[27], + r[28], + r[29], + r[30], + r[31], + r[32], + r[33] + ]; + } + function UO(x) { + function r(e) { + return B0(x, e); + } + return function(e) { + return P2(r, e); + }; + } + function Fl(x) { + var r = x[4][1]; + return r ? [0, r[1][2]] : 0; + } + function dX(x) { + var r = x[4][1]; + return r ? [0, r[1][1]] : 0; + } + function yX(x) { + return [ + 0, + x[1], + x[2], + x[3], + x[4], + x[5], + x[6], + x[7], + x[8], + x[9], + x[10], + x[11], + x[12], + x[13], + x[14], + x[15], + x[16], + x[17], + x[18], + x[19], + x[20], + x[21], + x[22], + x[23], + x[24], + 0, + x[26], + x[27], + x[28], + x[29], + x[30], + x[31], + x[32], + x[33] + ]; + } + function _X(x, r, e, t) { + return [ + 0, + x[1], + x[2], + R2[1], + x[4], + x[5], + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + x[14], + x[15], + x[16], + x[17], + x[18], + x[19], + e, + r, + x[22], + t, + x[24], + x[25], + x[26], + x[27], + x[28], + x[29], + x[30], + x[31], + x[32], + x[33] + ]; + } + function Ml(x) { + return C(x, Oo) && C(x, ae) && C(x, cl) && C(x, Pk) && C(x, Q6) && C(x, k6) && C(x, W6) && C(x, Ue) && C(x, H2) ? 0 : 1; + } + function h3(x) { + return C(x, Qb) && C(x, "eval") ? 0 : 1; + } + function Yd(x) { + var r = sx(x, nm); + x: { + if (0 <= r) { + if (0 < r) { + var e = sx(x, Bv); + if (0 <= e) { + if (0 < e && C(x, He) && C(x, Pa) && C(x, um) && C(x, Aa) && C(x, g6) && C(x, ga) && C(x, Tp) && C(x, L8)) break x; + } else if (C(x, W2) && C(x, bo) && C(x, I6) && C(x, Yv) && C(x, Hv) && C(x, Je) && C(x, fl) && C(x, Ve)) break x; + } + } else { + var t = sx(x, Tk); + if (0 <= t) { + if (0 < t && C(x, Ck) && C(x, j6) && C(x, dh) && C(x, mc) && C(x, wa) && C(x, U8) && C(x, K8) && C(x, $3)) break x; + } else if (C(x, We) && C(x, rk) && C(x, Rm) && C(x, h6) && C(x, No) && C(x, Xe) && C(x, Ke) && C(x, Fv) && C(x, E6)) break x; + } + return 1; + } + return 0; + } + function XO(x) { + var r = sx(x, wk); + x: { + if (0 <= r) { + if (0 < r) { + var e = sx(x, H6); + if (0 <= e) { + if (0 < e && C(x, Pa) && C(x, Aa) && C(x, Hk) && C(x, hk) && C(x, ga)) break x; + } else if (C(x, bk) && C(x, Hv) && C(x, H3) && C(x, Xv) && C(x, Ue) && C(x, K3)) break x; + } + } else { + var t = sx(x, be); + if (0 <= t) { + if (0 < t && C(x, mc) && C(x, wa) && C(x, $3) && C(x, ae) && C(x, Lm)) break x; + } else if (C(x, Pv) && C(x, ik) && C(x, $v) && C(x, rm) && C(x, O6) && C(x, No)) break x; + } + return 1; + } + return 0; + } + function wX(x, r) { + var e = Rl(x); + if (e === 1) return typeof r != "number" && r[0] === 4 ? 1 : 0; + if (e) return 0; + x: { + r: { + if (typeof r == "number") { + var t = r; + if (48 <= t) switch (t) { + case 48: + case 49: + case 127: + case 128: + case 129: + case 130: + case 131: + case 132: + case 133: + case 134: break; + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: break x; + default: break r; + } + else switch (t) { + case 15: + case 44: break; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: break r; + default: break x; + } + return 0; + } + switch (r[0]) { + case 4: + if (XO(r[3])) return 0; + break x; + case 6: break; + case 11: + case 12: + case 13: break x; + default: return 0; + } + } + return 0; + } + return 1; + } + function Qx(x, r) { + return Wo(x, r)[1]; + } + function Ll(x, r) { + return Wo(x, r)[2]; + } + function L(x) { + return Qx(0, x); + } + function G0(x) { + return Ll(0, x); + } + function Ha(x) { + var r = Fl(x), e = r ? r[1] : Px(_a0); + return [ + 0, + e[1], + e[3], + e[3] + ]; + } + function GO(x) { + return Wo(0, x)[3]; + } + function c0(x) { + var r = Wo(0, x)[4]; + return r ? l4(function(e) { + return za(x[33][1], e[1][2]) <= 0 ? 1 : 0; + }, r) : 0; + } + function gX(x) { + return wl(function(r) { + return za(r[1][2], x[33][1]) < 0 ? 1 : 0; + }, Wo(0, x)[4]); + } + function Vo(x, r) { + var e = 0 < x ? [0, Ll(x - 1 | 0, r)] : Fl(r); + if (!e) return 0; + return e[1][2][1] < Ll(x, r)[2][1] ? 1 : 0; + } + function s2(x) { + return Vo(0, x); + } + function bX(x, r) { + var e = Qx(x, r); + if (typeof e == "number") { + var t = e - 2 | 0; + if (h2 < t >>> 0) { + if (k2 >= t + 1 >>> 0) return 1; + } else if (t === 6) return 0; + } + return Vo(x, r); + } + function ql(x) { + return bX(0, x); + } + function Us(x, r) { + var e = Qx(x, r); + x: { + if (typeof e == "number") switch (e) { + case 30: + case 44: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + var t = 1; + break x; + } + else if (e[0] === 4) { + var t = Ml(e[2]); + break x; + } + var t = 0; + } + if (t) return 1; + x: { + if (typeof e == "number") switch (e) { + case 14: + case 21: + case 22: + case 50: + case 62: + case 63: + case 64: + case 65: + case 66: + case 67: + case 128: break; + default: break x; + } + else if (e[0] !== 4) break x; + return 1; + } + return 0; + } + function zd(x, r) { + return wX(r, Qx(x, r)); + } + function TX(x, r) { + return Us(x, r) || zd(x, r); + } + function Bt(x) { + return Us(0, x); + } + function $o(x) { + var r = L(x) === 15 ? 1 : 0; + if (r) var e = r; + else { + var t = L(x) === 66 ? 1 : 0; + if (t) { + var u = Qx(1, x) === 15 ? 1 : 0; + if (u) var i = Ll(1, x)[2][1], e = G0(x)[3][1] === i ? 1 : 0; + else var e = u; + } else var e = t; + } + return e; + } + function Jd(x) { + var r = L(x); + if (typeof r != "number" && r[0] === 4 && !C(r[3], Lv)) { + var e = x[30][1]; + if (e) { + var t = Us(1, x); + if (t) var u = Ll(1, x)[2][1], i = G0(x)[3][1] === u ? 1 : 0; + else var i = t; + } else var i = e; + return i; + } + return 0; + } + function F4(x) { + var r = L(x); + if (typeof r == "number") switch (r) { + case 13: + case 42: return 1; + } + else if (r[0] === 4 && !C(r[3], $A) && Qx(1, x) === 42) return 1; + return 0; + } + function YO(x) { + var r = x[30][1]; + if (r) { + var e = L(x); + if (typeof e != "number" && e[0] === 4 && !C(e[3], Ta) && Us(1, x)) return 1; + var t = 0; + } else var t = r; + return t; + } + function zO(x) { + var r = L(x); + return typeof r != "number" && r[0] === 4 && !C(r[3], el) ? 1 : 0; + } + function Bx(x, r) { + return B0(x, [ + 0, + G0(x), + r + ]); + } + function EX(x, r) { + var e = CO(0, r); + return x ? [ + 30, + e, + x[1] + ] : [28, e]; + } + function v1(x, r) { + var e = GO(r); + return UO(r)(e), Bx(r, EX(x, L(r))); + } + function Kd(x) { + function r(e) { + return B0(x, [ + 0, + e[1], + nn + ]); + } + return function(e) { + return P2(r, e); + }; + } + function SX(x, r) { + return v1([0, x[6] ? Z0(vr(da0), r, r, r) : ya0], x); + } + function Ce(x, r) { + return x[5] && Bx(x, r); + } + function pt(x, r) { + var e = x[5], t = r[2], u = r[1]; + return e && B0(x, [ + 0, + u, + t + ]); + } + function d3(x, r) { + return B0(x, [ + 0, + r, + [14, x[5]] + ]); + } + function w0(x) { + var r = x[29][1]; + if (r) { + var e = r[1], t = G0(x), u = L(x); + x: { + if (typeof u != "number" && u[0] === 6) { + var i = u[1]; + break x; + } + var i = t; + } + d(e, [ + 0, + i, + u, + Rl(x) + ]); + } + var c = x[28][1], v = c[1], o = v ? v[1][1] : Xd(c)[1]; + x[27][1] = o; + var l = GO(x); + UO(x)(l); + var k = x[2][1], h = yl(Wo(0, x)[4], k); + x[2][1] = h; + var E = [0, Wo(0, x)]; + x[4][1] = E; + var T = x[28][1]; + return T[2] ? (T[1] = T[2], T[2] = 0, 0) : (lX(T), T[1] = 0, 0); + } + function Rr(x, r) { + var e = CU(L(x), r); + return e && w0(x), e; + } + function B1(x, r) { + x[26][1] = [ + 0, + r, + x[26][1] + ]; + var e = Rl(x), t = O4(x[27][1], e); + x[28][1] = t; + } + function H1(x) { + var r = x[26][1], e = r ? r[2] : Px(ha0); + x[26][1] = e; + var t = Rl(x), u = O4(x[27][1], t); + x[28][1] = u; + } + function L0(x) { + var r = G0(x); + if (L(x) === 9 && Vo(1, x)) { + var t = qx(c0(x), l4(function(i) { + return i[1][2][1] <= r[3][1] ? 1 : 0; + }, Wo(1, x)[4])); + return j4(x, [ + 0, + r[3][1] + 1 | 0, + 0 + ]), t; + } + var u = c0(x); + return j4(x, r[3]), u; + } + function Wa(x) { + var r = x[4][1]; + if (!r) return 0; + var e = r[1][2], t = l4(function(u) { + return u[1][2][1] <= e[3][1] ? 1 : 0; + }, c0(x)); + return j4(x, [ + 0, + e[3][1] + 1 | 0, + 0 + ]), t; + } + function Ut(x, r) { + return v1([0, CO(pa0, r)], x); + } + function K(x, r) { + return 1 - CU(L(x), r) && Ut(x, r), w0(x); + } + function AX(x, r) { + var e = Rr(x, r); + return 1 - e && Ut(x, r), e; + } + function Hd(x, r) { + AX(x, r); + } + function Xs(x, r) { + var e = L(x); + x: { + if (typeof e != "number" && e[0] === 4 && Sr(e[3], r)) break x; + v1([0, d(vr(la0), r)], x); + } + return w0(x); + } + var Xt = [ + t1, + Aa0, + js(0) + ]; + function IX(x, r, e) { + if (e) { + var t = e[1], u = t[1], i = t[2]; + if (r[29][1] = [0, u], !x) return x; + for (var c = i[2];;) { + if (!c) return; + var v = c[2]; + d(u, c[1]); + var c = v; + } + } + } + function Wd(x, r) { + var e = x[29][1]; + if (e) { + var t = e[1], u = uB(D); + x[29][1] = [0, function(q) { + return qN(q, u); + }]; + var i = [0, [ + 0, + t, + u + ]]; + } else var i = 0; + var c = x[33][1], v = x[27][1], o = x[26][1], l = x[4][1], k = x[2][1], h = x[1][1]; + try { + var E = d(r, x); + IX(1, x, i); + return [0, E]; + } catch (R) { + var I = M1(R); + if (I !== Xt) throw J0(I, 0); + IX(0, x, i), x[1][1] = h, x[2][1] = k, x[4][1] = l, x[26][1] = o, x[27][1] = v, x[33][1] = c; + var N = Rl(x), P = O4(x[27][1], N); + return x[28][1] = P, 0; + } + } + function Vd(x, r, e) { + var t = Wd(x, e); + return t ? t[1] : r; + } + function M4(x, r) { + var e = cx(r); + if (!e) return r; + var t = e[1], u = e[2], i = d(x, t); + return t === i ? r : cx([ + 0, + i, + u + ]); + } + var PX = id(Na0, function(x) { + var r = kO(x, Pa0), e = lO(x, ja0), t = e[24], u = e[28], i = e[42], c = e[97], v = e[mh], o = e[qI], l = e[xr], k = e[oR], h = e[dF], E = e[lD], T = e[6], I = e[7], N = e[10], P = e[17], R = e[23], q = e[29], X = e[40], B = e[43], z = e[53], x0 = e[67], W = e[h2], Z = e[Ca], t0 = e[e1], i0 = e[zv], u0 = e[FF], k0 = e[kI], o0 = e[Sb], S0 = e[fk], s0 = e[AC], v0 = e[jE], m0 = e[hw], p0 = e[QP], E0 = e[VI], b0 = e[RE], C0 = e[o_], D0 = e[lk], U0 = e[ZL], T0 = e[FM], M0 = e[mL], y0 = e[lL], G = e[QD], j0 = e[jR], Q0 = e[_F], q0 = e[zL], ix = e[hD], xx = e[RF], fx = e[fL], yx = e[gM], R0 = e[AR], lx = e[ox], kx = hO(x, 0, 0, Xq, bO, 1)[1]; + return yO(x, [ + 0, + B, + function(Q, I0) { + var M = I0[2], d0 = l4(function(h0) { + return za(h0[1][2], Q[1 + r]) < 0 ? 1 : 0; + }, M), g0 = qa(d0); + return qa(M) === g0 ? I0 : [ + 0, + I0[1], + d0, + I0[3] + ]; + }, + lx, + function(Q, I0, M) { + var d0 = M[2]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + g0 + ]; + }); + }, + R0, + function(Q, I0) { + var M = I0[2]; + return P0(d(Q[1][1 + i], Q), M, I0, function(d0) { + return [ + 0, + I0[1], + d0 + ]; + }); + }, + yx, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + o], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0 + ]; + }, + fx, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + o], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0 + ]; + }, + xx, + function(Q, I0, M) { + var d0 = M[2]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + g0 + ]; + }); + }, + ix, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + E], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0 + ]; + }, + E, + function(Q, I0) { + var M = I0[2], d0 = M[1], g0 = I0[1], h0 = M[2]; + return P0(d(Q[1][1 + i], Q), h0, I0, function(A0) { + return [ + 0, + g0, + [ + 0, + d0, + A0 + ] + ]; + }); + }, + h, + function(Q, I0) { + var M = I0[2], d0 = M[1], g0 = I0[1], h0 = M[2]; + return P0(d(Q[1][1 + i], Q), h0, I0, function(A0) { + return [ + 0, + g0, + [ + 0, + d0, + A0 + ] + ]; + }); + }, + q0, + function(Q, I0, M) { + var d0 = M[7], g0 = M[2], h0 = p(Q[1][1 + k], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + h0, + M[3], + M[4], + M[5], + M[6], + A0 + ]; + }, + k, + function(Q, I0) { + var M = I0[2], d0 = M[1], g0 = I0[1], h0 = M[2]; + return P0(d(Q[1][1 + i], Q), h0, I0, function(A0) { + return [ + 0, + g0, + [ + 0, + d0, + A0 + ] + ]; + }); + }, + Q0, + function(Q, I0, M) { + var d0 = M[2], g0 = M[1]; + if (d0 === 0) return P0(d(Q[1][1 + o], Q), g0, M, function(A0) { + return [ + 0, + A0, + M[2], + M[3] + ]; + }); + var h0 = d(Q[1][1 + t], Q); + return P0(function(A0) { + return Nx(h0, A0); + }, d0, M, function(A0) { + return [ + 0, + M[1], + A0, + M[3] + ]; + }); + }, + j0, + function(Q, I0) { + var M = I0[2], d0 = M[2], g0 = I0[1], h0 = M[1], A0 = d(Q[1][1 + l], Q); + return P0(function($0) { + return M4(A0, $0); + }, h0, I0, function($0) { + return [ + 0, + g0, + [ + 0, + $0, + d0 + ] + ]; + }); + }, + l, + function(Q, I0) { + var M = I0[2], d0 = M[2], g0 = M[1], h0 = I0[1]; + if (d0 === 0) return P0(d(Q[1][1 + v], Q), g0, I0, function($0) { + return [ + 0, + h0, + [ + 0, + $0, + d0 + ] + ]; + }); + var A0 = d(Q[1][1 + t], Q); + return P0(function($0) { + return Nx(A0, $0); + }, d0, I0, function($0) { + return [ + 0, + h0, + [ + 0, + g0, + $0 + ] + ]; + }); + }, + y0, + function(Q, I0, M) { + var d0 = M[6], g0 = M[5], h0 = p(Q[1][1 + G], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + M[3], + M[4], + h0, + A0, + M[7] + ]; + }, + M0, + function(Q, I0) { + var M = I0[2], d0 = I0[1], g0 = M[3]; + return P0(d(Q[1][1 + i], Q), g0, [ + 0, + d0, + M + ], function(h0) { + return [ + 0, + d0, + [ + 0, + M[1], + M[2], + h0 + ] + ]; + }); + }, + T0, + function(Q, I0) { + var M = I0[2], d0 = M[1], g0 = I0[1], h0 = M[2]; + return P0(d(Q[1][1 + i], Q), h0, I0, function(A0) { + return [ + 0, + g0, + [ + 0, + d0, + A0 + ] + ]; + }); + }, + U0, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + o], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0 + ]; + }, + D0, + function(Q, I0, M) { + var d0 = M[10], g0 = M[3], h0 = p(Q[1][1 + C0], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + M[4], + M[5], + M[6], + M[7], + M[8], + M[9], + A0, + M[11] + ]; + }, + b0, + function(Q, I0) { + var M = I0[2], d0 = I0[1], g0 = M[4]; + return P0(d(Q[1][1 + i], Q), g0, [ + 0, + d0, + M + ], function(h0) { + return [ + 0, + d0, + [ + 0, + M[1], + M[2], + M[3], + h0 + ] + ]; + }); + }, + E0, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + p0], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0, + M[5] + ]; + }, + m0, + function(Q, I0) { + if (I0[0] === 0) { + var M = I0[1]; + return P0(d(Q[1][1 + v], Q), M, I0, function(Kx) { + return [0, Kx]; + }); + } + var d0 = I0[1], g0 = d0[2], h0 = g0[2], A0 = d0[1], $0 = p(Q[1][1 + v], Q, h0); + return h0 === $0 ? I0 : [1, [ + 0, + A0, + [ + 0, + g0[1], + $0 + ] + ]]; + }, + v0, + function(Q, I0, M) { + var d0 = M[2]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + g0 + ]; + }); + }, + s0, + function(Q, I0, M) { + var d0 = M[3], g0 = M[1], h0 = K1(d(Q[1][1 + c], Q), g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + h0, + M[2], + A0 + ]; + }, + S0, + function(Q, I0, M) { + var d0 = M[2], g0 = M[1], h0 = g0[3], A0 = g0[2], $0 = g0[1]; + if (h0) var Kx = M4(d(Q[1][1 + u], Q), h0), J = A0; + else var Kx = 0, J = p(Q[1][1 + u], Q, A0); + var tr = p(Q[1][1 + i], Q, d0); + return A0 === J && h0 === Kx && d0 === tr ? M : [ + 0, + [ + 0, + $0, + J, + Kx + ], + tr + ]; + }, + o0, + function(Q, I0, M) { + var d0 = M[4]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + M[2], + M[3], + g0 + ]; + }); + }, + k0, + function(Q, I0, M) { + var d0 = M[4]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + M[2], + M[3], + g0 + ]; + }); + }, + u0, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = p(Q[1][1 + o], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + M[2], + h0, + A0 + ]; + }, + Z, + function(Q, I0, M) { + var d0 = M[4], g0 = M[3], h0 = M[2], A0 = M[1], $0 = p(Q[1][1 + i], Q, d0); + if (g0) { + var Kx = Nx(d(Q[1][1 + E], Q), g0); + return g0 === Kx && d0 === $0 ? M : [ + 0, + M[1], + M[2], + Kx, + $0 + ]; + } + if (h0) { + var J = Nx(d(Q[1][1 + h], Q), h0); + return h0 === J && d0 === $0 ? M : [ + 0, + M[1], + J, + M[3], + $0 + ]; + } + var tr = p(Q[1][1 + o], Q, A0); + return A0 === tr && d0 === $0 ? M : [ + 0, + tr, + M[2], + M[3], + $0 + ]; + }, + i0, + function(Q, I0, M) { + var d0 = M[3], g0 = M[2], h0 = p(Q[1][1 + t0], Q, g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + M[1], + h0, + A0 + ]; + }, + W, + function(Q, I0, M) { + var d0 = M[2]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + g0 + ]; + }); + }, + c, + function(Q, I0, M) { + var d0 = M[4]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + M[2], + M[3], + g0 + ]; + }); + }, + x0, + function(Q, I0) { + var M = I0[2], d0 = M[1], g0 = I0[1], h0 = M[2]; + return P0(d(Q[1][1 + i], Q), h0, I0, function(A0) { + return [ + 0, + g0, + [ + 0, + d0, + A0 + ] + ]; + }); + }, + z, + function(Q, I0, M) { + var d0 = M[2], g0 = M[1], h0 = M4(d(Q[1][1 + o], Q), g0), A0 = p(Q[1][1 + i], Q, d0); + return g0 === h0 && d0 === A0 ? M : [ + 0, + h0, + A0 + ]; + }, + X, + function(Q, I0, M) { + var d0 = M[3]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + M[2], + g0 + ]; + }); + }, + q, + function(Q, I0) { + var M = I0[3]; + return P0(d(Q[1][1 + i], Q), M, I0, function(d0) { + return [ + 0, + I0[1], + I0[2], + d0 + ]; + }); + }, + R, + function(Q, I0, M) { + var d0 = M[3]; + return P0(d(Q[1][1 + i], Q), d0, M, function(g0) { + return [ + 0, + M[1], + M[2], + g0 + ]; + }); + }, + P, + function(Q, I0, M) { + var d0 = M[2], g0 = d0[1], h0 = M[1], A0 = d0[2]; + return P0(d(Q[1][1 + i], Q), A0, M, function($0) { + return [ + 0, + h0, + [ + 0, + g0, + $0 + ] + ]; + }); + }, + N, + function(Q, I0, M) { + var d0 = M[2], g0 = M[1], h0 = g0[3], A0 = g0[2], $0 = g0[1]; + if (h0) var Kx = M4(d(Q[1][1 + u], Q), h0), J = A0; + else var Kx = 0, J = p(Q[1][1 + u], Q, A0); + var tr = p(Q[1][1 + i], Q, d0); + return A0 === J && h0 === Kx && d0 === tr ? M : [ + 0, + [ + 0, + $0, + J, + Kx + ], + tr + ]; + }, + I, + function(Q, I0, M) { + var d0 = M[2], g0 = d0[2], h0 = d0[1], A0 = M[1]; + if (!g0) return P0(p(Q[1][1 + T], Q, I0), h0, M, function(Kx) { + return [ + 0, + A0, + [ + 0, + Kx, + g0 + ] + ]; + }); + var $0 = g0[1]; + return P0(d(Q[1][1 + o], Q), $0, M, function(Kx) { + return [ + 0, + A0, + [ + 0, + h0, + [0, Kx] + ] + ]; + }); + } + ]), function(Q, I0, M) { + var d0 = fd(I0, x); + return d0[1 + r] = M, d(kx, d0), dO(I0, d0, x); + }; + }); + function $d(x) { + var r = Fl(x); + if (r) var e = r[1], t = gX(x) ? (j4(x, e[3]), [0, p(PX[1], 0, e[3])]) : 0, u = t; + else var u = 0; + return [ + 0, + 0, + function(i, c) { + return u ? c(u[1], i) : i; + } + ]; + } + function L4(x) { + var r = Fl(x); + if (r) { + var e = r[1]; + if (gX(x)) { + j4(x, e[3]); + var t = Wa(x), u = [0, p(PX[1], 0, [ + 0, + e[3][1] + 1 | 0, + 0 + ])], i = t; + } else var u = 0, i = Wa(x); + } else var u = 0, i = 0; + return [ + 0, + i, + function(c, v) { + return u ? p(v, u[1], c) : c; + } + ]; + } + function P1(x) { + return s2(x) ? L4(x) : $d(x); + } + function Gt(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, sl, 2), e, t); + }); + } + function te(x, r, e) { + if (!e) return 0; + var t = e[1]; + return [0, p(P1(x)[2], t, function(u, i) { + return Z0(zx(u, G8, 5), u, r, i); + })]; + } + function JO(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, GL, 8), e, t); + }); + } + function Bl(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, -1045824777, 9), e, t); + }); + } + function q4(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, -455772979, 10), e, t); + }); + } + function CX(x, r) { + if (!r) return 0; + var e = r[1]; + return [0, p(P1(x)[2], e, function(t, u) { + return p(zx(t, FL, 13), t, u); + })]; + } + function bn(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, iL, 14), e, t); + }); + } + function NX(x, r) { + return p(P1(x)[2], r, function(e, t) { + var u = d(zx(e, pR, 16), e); + return M4(function(i) { + return K1(u, i); + }, t); + }); + } + function KO(x, r) { + return p(P1(x)[2], r, function(e, t) { + return p(zx(e, -21476009, 17), e, t); + }); + } + id(Oa0, function(x) { + var r = kO(x, Ia0), e = mO(Ca0), t = e.length - 1, u = Uq.length - 1, i = Fo(t + u | 0, 0), c = t - 1 | 0, v = 0; + if (c >= 0) for (var o = v;;) { + var l = b4(x, S1(e, o)[1 + o]); + S1(i, o)[1 + o] = l; + var k = o + 1 | 0; + if (c === o) break; + var o = k; + } + var h = u - 1 | 0, E = 0; + if (h >= 0) for (var T = E;;) { + var I = T + t | 0, N = kO(x, S1(Uq, T)[1 + T]); + S1(i, I)[1 + I] = N; + var P = T + 1 | 0; + if (h === T) break; + var T = P; + } + var R = i[4], q = i[5], X = i[qR], B = i[UR], z = i[327], x0 = i[328], W = i[45], Z = i[gR], t0 = i[TL], i0 = hO(x, 0, 0, Xq, bO, 1)[1]; + return yO(x, [ + 0, + Z, + function(u0) { + return [ + 0, + u0[1 + z], + u0[1 + x0] + ]; + }, + B, + function(u0, k0) { + var o0 = k0[2], S0 = k0[1]; + return P2(d(u0[1][1 + q], u0), S0), P2(d(u0[1][1 + R], u0), o0); + }, + X, + function(u0, k0) { + return k0 ? p(u0[1][1 + B], u0, k0[1]) : 0; + }, + q, + function(u0, k0) { + var o0 = k0[1], S0 = u0[1 + z]; + if (S0) return (za(o0[2], S0[1][1][2]) < 0 ? 1 : 0) && (u0[1 + z] = [0, k0], 0); + return (za(o0[2], u0[1 + r][2]) < 0 ? 1 : 0) && (u0[1 + z] = [0, k0], 0); + }, + R, + function(u0, k0) { + var o0 = k0[1], S0 = u0[1 + x0]; + if (S0) return (za(S0[1][1][2], o0[2]) < 0 ? 1 : 0) && (u0[1 + x0] = [0, k0], 0); + return (0 <= za(o0[2], u0[1 + r][3]) ? 1 : 0) && (u0[1 + x0] = [0, k0], 0); + }, + W, + function(u0, k0) { + return p(u0[1][1 + B], u0, k0), k0; + }, + t0, + function(u0, k0, o0) { + return p(u0[1][1 + X], u0, o0[2]), o0; + } + ]), function(u0, k0, o0) { + var S0 = fd(k0, x); + return S0[1 + r] = o0, d(i0, S0), S0[1 + z] = 0, S0[1 + x0] = 0, dO(k0, S0, x); + }; + }); + function OX(x) { + var r = L(x); + x: { + if (typeof r == "number") { + var e = r; + if (51 <= e) switch (e) { + case 51: + var u = mo0; + break x; + case 52: + var u = ho0; + break x; + case 53: + var u = do0; + break x; + case 54: + var u = yo0; + break x; + case 55: + var u = _o0; + break x; + case 56: + var u = wo0; + break x; + case 57: + var u = go0; + break x; + case 58: + var u = bo0; + break x; + case 59: + var u = To0; + break x; + case 60: + var u = Eo0; + break x; + case 61: + var u = So0; + break x; + case 62: + var u = Ao0; + break x; + case 63: + var u = Io0; + break x; + case 64: + var u = Po0; + break x; + case 65: + var u = Co0; + break x; + case 66: + var u = No0; + break x; + case 67: + var u = Oo0; + break x; + case 116: + var u = jo0; + break x; + case 117: + var u = Do0; + break x; + case 118: + var u = Ro0; + break x; + case 119: + var u = Fo0; + break x; + case 120: + var u = Mo0; + break x; + case 121: + var u = Lo0; + break x; + case 122: + var u = qo0; + break x; + case 123: + var u = Bo0; + break x; + case 124: + var u = Uo0; + break x; + case 125: + var u = Xo0; + break x; + case 126: + var u = Go0; + break x; + case 127: + var u = Yo0; + break x; + case 128: + var u = zo0; + break x; + case 130: + var u = Jo0; + break x; + case 131: + var u = Ko0; + break x; + case 132: + var u = Ho0; + break x; + } + else switch (e) { + case 15: + var u = Da0; + break x; + case 16: + var u = Ra0; + break x; + case 17: + var u = Fa0; + break x; + case 18: + var u = Ma0; + break x; + case 19: + var u = La0; + break x; + case 20: + var u = qa0; + break x; + case 21: + var u = Ba0; + break x; + case 22: + var u = Ua0; + break x; + case 23: + var u = Xa0; + break x; + case 24: + var u = Ga0; + break x; + case 25: + var u = Ya0; + break x; + case 26: + var u = za0; + break x; + case 27: + var u = Ja0; + break x; + case 28: + var u = Ka0; + break x; + case 29: + var u = Ha0; + break x; + case 30: + var u = Wa0; + break x; + case 31: + var u = Va0; + break x; + case 32: + var u = $a0; + break x; + case 33: + var u = Qa0; + break x; + case 34: + var u = Za0; + break x; + case 35: + var u = xo0; + break x; + case 36: + var u = ro0; + break x; + case 37: + var u = eo0; + break x; + case 38: + var u = to0; + break x; + case 39: + var u = no0; + break x; + case 40: + var u = uo0; + break x; + case 41: + var u = io0; + break x; + case 42: + var u = fo0; + break x; + case 43: + var u = co0; + break x; + case 44: + var u = so0; + break x; + case 45: + var u = ao0; + break x; + case 46: + var u = oo0; + break x; + case 47: + var u = vo0; + break x; + case 48: + var u = lo0; + break x; + case 49: + var u = po0; + break x; + case 50: + var u = ko0; + break x; + } + } else switch (r[0]) { + case 4: + var u = r[2]; + break x; + case 11: + var u = r[1] ? Wo0 : Vo0; + break x; + } + v1($o0, x); + var u = Qo0; + } + return w0(x), u; + } + function W1(x) { + var r = G0(x), e = c0(x); + return [ + 0, + r, + [ + 0, + OX(x), + r0([0, e], [0, L0(x)], D) + ] + ]; + } + function jX(x) { + var r = G0(x), e = c0(x); + K(x, 14); + var t = G0(x), u = OX(x), i = r0([0, e], [0, L0(x)], D), c = Br(r, t), v = t[2], o = r[3]; + return 1 - ((o[1] === v[1] ? 1 : 0) && (o[2] === v[2] ? 1 : 0)) && B0(x, [ + 0, + c, + ef + ]), [ + 0, + c, + [ + 0, + u, + i + ] + ]; + } + function y3(x) { + var r = x[2], e = r[3] === 0 ? 1 : 0, t = r[2]; + if (!e) return e; + for (var u = t;;) { + if (!u) return 1; + var i = u[1][2], c = u[2]; + x: { + if (i[1][2][0] === 2 && !i[2]) { + var v = 1; + break x; + } + var v = 0; + } + if (!v) return v; + var u = c; + } + } + function B4(x) { + for (var r = x;;) { + var e = r[2]; + if (e[0] !== 31) return 0; + var t = e[1][2]; + if (t[2][0] === 27) return 1; + var r = t; + } + } + function Qd(x, r, e) { + var t = e[2][1], u = e[1]; + if (!C(t, Kv)) return r[21] && B0(r, [ + 0, + u, + 5 + ]); + if (C(t, cl)) { + if (!C(t, H2)) return r[20] ? B0(r, [ + 0, + u, + 98 + ]) : pt(r, [ + 0, + u, + 83 + ]); + } else if (r[16]) return B0(r, [ + 0, + u, + [28, md(t)] + ]); + if (Ml(t)) return pt(r, [ + 0, + u, + 83 + ]); + if (Yd(t)) return B0(r, [ + 0, + u, + 98 + ]); + if (x) { + var c = x[1]; + if (h3(t)) return pt(r, [ + 0, + u, + c + ]); + } + } + function e0(x, r, e) { + var t = x ? x[1] : G0(e), u = d(r, e), i = Fl(e); + return [ + 0, + i ? Br(t, i[1]) : t, + u + ]; + } + function HO(x, r, e) { + var t = e0(x, r, e), u = t[2]; + return [ + 0, + [ + 0, + t[1], + u[1] + ], + u[2] + ]; + } + function Zd(x) { + B1(x, 0); + var r = L(x); + H1(x); + var e = Qx(1, x); + x: { + r: { + if (typeof r == "number") { + if (r !== 23) break x; + } else { + if (r[0] !== 4) break x; + var t = r[3]; + if (C(t, tl)) { + if (!C(t, V3)) e: { + if (typeof e == "number") { + if (e !== 23) break e; + } else if (e[0] !== 4) break e; + break r; + } + } else e: { + if (typeof e == "number") { + if (e !== 23) break e; + } else if (e[0] !== 4) break e; + break r; + } + } + if (typeof e == "number") { + if (Qv !== e) break x; + } else if (e[0] !== 4 || C(e[3], J6)) break x; + } + return 1; + } + return 0; + } + function DX(x, r) { + var e = r[1], t = r[2][1]; + !t && B0(x, [ + 0, + e, + 48 + ]); + function i(R) { + return R[0] === 0 ? [0, R[1]] : (B0(x, [ + 0, + R[1][1], + 49 + ]), 0); + } + x: { + for (var c = t;;) { + if (!c) { + var v = 0; + break x; + } + var o = c[2], l = i(c[1]); + if (l) break; + var c = o; + } + for (var k = [ + 0, + l[1], + To + ], h = k, E = 1, T = o;;) { + if (!T) { + h[1 + E] = 0; + var v = k; + break; + } + var I = T[2], N = i(T[1]); + if (N) { + var P = [ + 0, + N[1], + To + ]; + h[1 + E] = P; + var h = P, E = 1, T = I; + } else var T = I; + } + } + return v && !v[2] ? v[1] : [ + 0, + e, + [29, [ + 0, + v, + 0 + ]] + ]; + } + function RX(x) { + switch (x) { + case 3: return 2; + case 4: return 1; + case 5: return 1; + case 6: return 1; + case 7: return 1; + default: return 1; + } + } + function WO(x, r, e) { + if (e) { + var t = e[1]; + x: { + if (t !== 8232 && e2 !== t) { + if (t === 10) { + var u = 6; + break x; + } + if (t === 13) { + var u = 5; + break x; + } + if (Y6 <= t) { + var u = 3; + break x; + } + if (Gg <= t) { + var u = 2; + break x; + } + if (R1 <= t) { + var u = 1; + break x; + } + var u = 0; + break x; + } + var u = 7; + } + var i = u; + } else var i = 4; + return [ + 0, + i, + x + ]; + } + var eS0 = [ + t1, + jv0, + js(0) + ]; + function FX(x, r, e, t) { + try { + return S1(x, r)[1 + r]; + } catch (c) { + var i = M1(c); + throw i[1] === Kh ? J0([ + 0, + eS0, + e, + Z0(vr(Nv0), t, r, x.length - 1) + ], 1) : J0(i, 0); + } + } + function x5(x, r) { + if (r[1] === 0 && r[2] === 0) return 0; + return FX(FX(x, r[1] - 1 | 0, r, Pv0), r[2], r, Cv0); + } + function MX(x) { + function r(o) { + var l = L(o); + x: if (typeof l == "number") { + if (8 <= l) { + if (10 <= l) break x; + } else if (l !== 1) break x; + return 1; + } + return 0; + } + function e(o, l, k, h, E, T) { + var I = Z0(x[24], o, E, T); + if (k) var N = Gx(n30, T), P = -I; + else var N = T, P = I; + var R = L0(o); + return r(o) ? [ + 2, + l, + [ + 0, + P, + N, + r0([0, h], [0, R], D) + ] + ] : [0, l]; + } + function t(o) { + var l = G0(o), k = c0(o), h = L(o); + if (typeof h == "number") switch (h) { + case 106: + w0(o); + var E = L(o); + return typeof E != "number" && E[0] === 0 ? e(o, l, 1, k, E[1], E[2]) : [0, l]; + case 32: + case 33: + w0(o); + var T = L0(o); + return r(o) ? [ + 1, + l, + [ + 0, + h === 33 ? 1 : 0, + r0([0, k], [0, T], D) + ] + ] : [0, l]; + } + else switch (h[0]) { + case 0: return e(o, l, 0, k, h[1], h[2]); + case 1: + var I = h[2], N = Z0(x[26], o, h[1], I), P = L0(o); + return r(o) ? [ + 4, + l, + [ + 0, + N, + I, + r0([0, k], [0, P], D) + ] + ] : [0, l]; + case 2: + var R = h[1], q = R[1], X = R[3], B = R[2]; + R[4] && Ce(o, 79), w0(o); + var z = L0(o); + return r(o) ? [ + 3, + q, + [ + 0, + B, + X, + r0([0, k], [0, z], D) + ] + ] : [0, q]; + } + return w0(o), [0, l]; + } + var u = [ + 0, + u30, + R2[1], + 0, + 0 + ]; + function i(o) { + var l = W1(o), k = L(o); + x: { + if (typeof k == "number") { + if (k === 84) { + K(o, 84); + var h = t(o); + break x; + } + if (k === 88) { + Bx(o, [8, l[2][1]]), K(o, 88); + var h = t(o); + break x; + } + } + var h = 0; + } + return [ + 0, + l, + h + ]; + } + var c = 0; + function v(o, l, k, h, E, T, I) { + var N = qa(E), P = qa(T); + function R(X) { + return [2, [ + 0, + [0, T], + k, + h, + I + ]]; + } + function q(X) { + return [2, [ + 0, + [1, E], + k, + h, + I + ]]; + } + return N === 0 ? R(D) : P === 0 ? q(D) : N < P ? (P2(function(X) { + return B0(o, [ + 0, + X[1], + [12, l] + ]); + }, E), R(D)) : (P2(function(X) { + return B0(o, [ + 0, + X[1], + [12, l] + ]); + }, T), q(D)); + } + return [0, function(o, l) { + var h = qx(o ? o[1] : 0, c0(l)); + K(l, 50); + var E = p(x[13], 0, l), T = E[2][1], I = E[1]; + return [ + 0, + E, + e0(0, function(P) { + if (Rr(P, 65)) { + B1(P, 1); + var R = L(P); + x: { + if (typeof R == "number") switch (R) { + case 119: + var q = Zv0; + break x; + case 120: + var q = x30; + break x; + case 121: + var q = r30; + break x; + case 123: + var q = e30; + break x; + } + else switch (R[0]) { + case 4: + Bx(P, [ + 7, + T, + [0, R[2]] + ]); + var q = 0; + break x; + case 11: + if (R[1]) { + var q = t30; + break x; + } + break; + } + Bx(P, [ + 7, + T, + 0 + ]); + var q = 0; + } + w0(P), H1(P); + var X = q; + } else var X = 0; + var B = X === 0 ? 0 : c0(P); + K(P, 0); + for (var z = u;;) { + var x0 = L(P); + if (typeof x0 == "number") { + var W = x0 - 2 | 0; + if (h2 < W >>> 0) { + if (k2 >= W + 1 >>> 0) break; + } else if (W === 10) { + var Z = G0(P), t0 = c0(P); + w0(P); + var i0 = L(P); + x: { + r: if (typeof i0 == "number") { + var u0 = i0 - 2 | 0; + if (h2 < u0 >>> 0) { + if (k2 < u0 + 1 >>> 0) break r; + } else { + if (u0 !== 7) break r; + K(P, 9); + var k0 = L(P); + e: { + t: if (typeof k0 == "number") { + if (k0 !== 1 && wr !== k0) break t; + var o0 = 1; + break e; + } + var o0 = 0; + } + B0(P, [ + 0, + Z, + [6, o0] + ]); + } + break x; + } + B0(P, [ + 0, + Z, + $v0 + ]); + } + var z = [ + 0, + z[1], + z[2], + 1, + t0 + ]; + continue; + } + } + var S0 = z[2], s0 = z[1], v0 = e0(c, i, P), m0 = v0[2], p0 = m0[2], E0 = m0[1], b0 = v0[1], C0 = E0[2][1], D0 = E0[1]; + x: if (Sr(C0, rx)) var U0 = z; + else { + var T0 = F1(C0, 0); + 97 <= T0 && T0 <= e1 && B0(P, [ + 0, + D0, + [ + 10, + T, + C0 + ] + ]), R2[3].call(null, C0, S0) && B0(P, [ + 0, + D0, + [ + 4, + T, + C0 + ] + ]); + var G = z[4], j0 = z[3], Q0 = R2[4].call(null, C0, S0), q0 = [ + 0, + z[1], + Q0, + j0, + G + ]; + let bx = C0; + var ix = function(Ox, ux) { + if (X && X[1] !== Ox) return B0(P, [ + 0, + ux, + [ + 9, + T, + X, + bx + ] + ]); + }; + if (typeof p0 == "number") { + if (X) switch (X[1]) { + case 0: + B0(P, [ + 0, + b0, + [ + 3, + T, + C0 + ] + ]); + var U0 = q0; + break x; + case 1: + B0(P, [ + 0, + b0, + [ + 11, + T, + C0 + ] + ]); + var U0 = q0; + break x; + case 4: + B0(P, [ + 0, + b0, + [ + 2, + T, + C0 + ] + ]); + var U0 = q0; + break x; + } + var U0 = [ + 0, + [ + 0, + s0[1], + s0[2], + s0[3], + s0[4], + [ + 0, + [ + 0, + b0, + [0, E0] + ], + s0[5] + ] + ], + Q0, + j0, + G + ]; + } else switch (p0[0]) { + case 0: + B0(P, [ + 0, + p0[1], + [ + 9, + T, + X, + C0 + ] + ]); + var U0 = q0; + break; + case 1: + var xx = p0[1], fx = p0[2]; + ix(0, xx); + var U0 = [ + 0, + [ + 0, + [ + 0, + [ + 0, + b0, + [ + 0, + E0, + [ + 0, + xx, + fx + ] + ] + ], + s0[1] + ], + s0[2], + s0[3], + s0[4], + s0[5] + ], + Q0, + j0, + G + ]; + break; + case 2: + var yx = p0[1], R0 = p0[2]; + ix(1, yx); + var U0 = [ + 0, + [ + 0, + s0[1], + [ + 0, + [ + 0, + b0, + [ + 0, + E0, + [ + 0, + yx, + R0 + ] + ] + ], + s0[2] + ], + s0[3], + s0[4], + s0[5] + ], + Q0, + j0, + G + ]; + break; + case 3: + var lx = p0[1], kx = p0[2]; + ix(2, lx); + var U0 = [ + 0, + [ + 0, + s0[1], + s0[2], + [ + 0, + [ + 0, + b0, + [ + 0, + E0, + [ + 0, + lx, + kx + ] + ] + ], + s0[3] + ], + s0[4], + s0[5] + ], + Q0, + j0, + G + ]; + break; + default: + var Q = p0[1], I0 = p0[2]; + ix(4, Q); + var U0 = [ + 0, + [ + 0, + s0[1], + s0[2], + s0[3], + [ + 0, + [ + 0, + b0, + [ + 0, + E0, + [ + 0, + Q, + I0 + ] + ] + ], + s0[4] + ], + s0[5] + ], + Q0, + j0, + G + ]; + } + } + var M = L(P); + x: { + r: if (typeof M == "number") { + var d0 = M - 2 | 0; + if (h2 < d0 >>> 0) { + if (k2 < d0 + 1 >>> 0) break r; + } else { + if (d0 !== 6) break r; + Bx(P, 18), K(P, 8); + } + break x; + } + K(P, 9); + } + var z = U0; + } + var g0 = z[3], h0 = z[4], A0 = cx(z[1][5]), $0 = cx(z[1][4]), Kx = cx(z[1][3]), J = cx(z[1][2]), tr = cx(z[1][1]), Zx = qx(h0, c0(P)); + K(P, 1); + var b = L(P); + x: { + r: if (typeof b == "number") { + if (b !== 1 && wr !== b) break r; + var V = L0(P); + break x; + } + var V = s2(P) ? Wa(P) : 0; + } + var tx = I1([0, B], [0, V], Zx, D); + if (X) { + switch (X[1]) { + case 0: + var _x = [0, [ + 0, + tr, + 1, + g0, + tx + ]]; + break; + case 1: + var _x = [1, [ + 0, + J, + 1, + g0, + tx + ]]; + break; + case 2: + var _x = v(P, T, 1, g0, Kx, A0, tx); + break; + case 3: + var _x = [3, [ + 0, + A0, + g0, + tx + ]]; + break; + default: var _x = [4, [ + 0, + $0, + 1, + g0, + tx + ]]; + } + var gx = _x; + } else { + var ex = qa(tr), Jx = qa(J), Ux = qa($0), hr = qa(Kx), dr = qa(A0), V0 = function(bx) { + return [2, [ + 0, + Qv0, + 0, + g0, + tx + ]]; + }; + x: { + if (ex === 0 && Jx === 0 && Ux === 0) { + if (hr === 0 && dr === 0) { + var K0 = V0(D); + break x; + } + var K0 = v(P, T, 0, g0, Kx, A0, tx); + break x; + } + if (Jx === 0 && Ux === 0 && hr === 0 && dr <= ex) { + P2(function(Ox) { + return B0(P, [ + 0, + Ox[1], + [ + 3, + T, + Ox[2][1][2][1] + ] + ]); + }, A0); + var K0 = [0, [ + 0, + tr, + 0, + g0, + tx + ]]; + break x; + } + if (ex === 0) { + if (Ux === 0 && hr === 0 && dr <= Jx) { + P2(function(Ox) { + return B0(P, [ + 0, + Ox[1], + [ + 11, + T, + Ox[2][1][2][1] + ] + ]); + }, A0); + var K0 = [1, [ + 0, + J, + 0, + g0, + tx + ]]; + break x; + } + if (Jx === 0 && hr === 0 && dr <= Ux) { + P2(function(Ox) { + return B0(P, [ + 0, + Ox[1], + [ + 11, + T, + Ox[2][1][2][1] + ] + ]); + }, A0); + var K0 = [4, [ + 0, + $0, + 0, + g0, + tx + ]]; + break x; + } + } + B0(P, [ + 0, + I, + [5, T] + ]); + var K0 = V0(D); + } + var gx = K0; + } + return gx; + }, l), + r0([0, h], 0, D) + ]; + }]; + } + function Ul(x) { + return [0, Ha(x)]; + } + function r5(x, r, e) { + if (typeof e == "number") return [ + 0, + x, + r + ]; + if (e[0] === 0) { + var t = e[1], u = sx(x, t), i = e[2]; + return u === 0 ? i === r ? e : [ + 0, + t, + r + ] : 0 <= u ? [ + 1, + 2, + x, + r, + e, + 0 + ] : [ + 1, + 2, + x, + r, + 0, + e + ]; + } + var c = e[5], v = e[4], o = e[3], l = e[2], k = sx(x, l), h = e[1]; + if (k === 0) return o === r ? e : [ + 1, + h, + x, + r, + v, + c + ]; + if (0 <= k) { + var E = r5(x, r, c); + return c === E ? e : mU(v, l, o, E); + } + var T = r5(x, r, v); + return v === T ? e : mU(T, l, o, c); + } + function tS0(x, r) { + if (typeof x == "number") { + var e = x; + if (58 <= e) switch (e) { + case 58: + if (typeof r == "number" && r === 58) return 0; + break; + case 59: + if (typeof r == "number" && r === 59) return 0; + break; + case 60: + if (typeof r == "number" && r === 60) return 0; + break; + case 61: + if (typeof r == "number" && r === 61) return 0; + break; + case 62: + if (typeof r == "number" && r === 62) return 0; + break; + case 63: + if (typeof r == "number" && r === 63) return 0; + break; + case 64: + if (typeof r == "number" && r === 64) return 0; + break; + case 65: + if (typeof r == "number" && r === 65) return 0; + break; + case 66: + if (typeof r == "number" && r === 66) return 0; + break; + case 67: + if (typeof r == "number" && r === 67) return 0; + break; + case 68: + if (typeof r == "number" && r === 68) return 0; + break; + case 69: + if (typeof r == "number" && r === 69) return 0; + break; + case 70: + if (typeof r == "number" && r === 70) return 0; + break; + case 71: + if (typeof r == "number" && r === 71) return 0; + break; + case 72: + if (typeof r == "number" && r === 72) return 0; + break; + case 73: + if (typeof r == "number" && r === 73) return 0; + break; + case 74: + if (typeof r == "number" && r === 74) return 0; + break; + case 75: + if (typeof r == "number" && r === 75) return 0; + break; + case 76: + if (typeof r == "number" && r === 76) return 0; + break; + case 77: + if (typeof r == "number" && r === 77) return 0; + break; + case 78: + if (typeof r == "number" && r === 78) return 0; + break; + case 79: + if (typeof r == "number" && r === 79) return 0; + break; + case 80: + if (typeof r == "number" && r === 80) return 0; + break; + case 81: + if (typeof r == "number" && r === 81) return 0; + break; + case 82: + if (typeof r == "number" && r === 82) return 0; + break; + case 83: + if (typeof r == "number" && r === 83) return 0; + break; + case 84: + if (typeof r == "number" && r === 84) return 0; + break; + case 85: + if (typeof r == "number" && r === 85) return 0; + break; + case 86: + if (typeof r == "number" && r === 86) return 0; + break; + case 87: + if (typeof r == "number" && r === 87) return 0; + break; + case 88: + if (typeof r == "number" && r === 88) return 0; + break; + case 89: + if (typeof r == "number" && r === 89) return 0; + break; + case 90: + if (typeof r == "number" && r === 90) return 0; + break; + case 91: + if (typeof r == "number" && r === 91) return 0; + break; + case 92: + if (typeof r == "number" && r === 92) return 0; + break; + case 93: + if (typeof r == "number" && r === 93) return 0; + break; + case 94: + if (typeof r == "number" && r === 94) return 0; + break; + case 95: + if (typeof r == "number" && r === 95) return 0; + break; + case 96: + if (typeof r == "number" && r === 96) return 0; + break; + case 97: + if (typeof r == "number" && r === 97) return 0; + break; + case 98: + if (typeof r == "number" && r === 98) return 0; + break; + case 99: + if (typeof r == "number" && r === 99) return 0; + break; + case 100: + if (typeof r == "number" && cr === r) return 0; + break; + case 101: + if (typeof r == "number" && k1 === r) return 0; + break; + case 102: + if (typeof r == "number" && Ee === r) return 0; + break; + case 103: + if (typeof r == "number" && Ss === r) return 0; + break; + case 104: + if (typeof r == "number" && ec === r) return 0; + break; + case 105: + if (typeof r == "number" && p2 === r) return 0; + break; + case 106: + if (typeof r == "number" && Ct === r) return 0; + break; + case 107: + if (typeof r == "number" && Te === r) return 0; + break; + case 108: + if (typeof r == "number" && d2 === r) return 0; + break; + case 109: + if (typeof r == "number" && wo === r) return 0; + break; + case 110: + if (typeof r == "number" && n2 === r) return 0; + break; + case 111: + if (typeof r == "number" && nn === r) return 0; + break; + case 112: + if (typeof r == "number" && h2 === r) return 0; + break; + case 113: + if (typeof r == "number" && ef === r) return 0; + break; + case 114: + if (typeof r == "number" && k2 === r) return 0; + break; + default: if (typeof r == "number" && wr <= r) return 0; + } + else switch (e) { + case 0: + if (typeof r == "number" && !r) return 0; + break; + case 1: + if (typeof r == "number" && r === 1) return 0; + break; + case 2: + if (typeof r == "number" && r === 2) return 0; + break; + case 3: + if (typeof r == "number" && r === 3) return 0; + break; + case 4: + if (typeof r == "number" && r === 4) return 0; + break; + case 5: + if (typeof r == "number" && r === 5) return 0; + break; + case 6: + if (typeof r == "number" && r === 6) return 0; + break; + case 7: + if (typeof r == "number" && r === 7) return 0; + break; + case 8: + if (typeof r == "number" && r === 8) return 0; + break; + case 9: + if (typeof r == "number" && r === 9) return 0; + break; + case 10: + if (typeof r == "number" && r === 10) return 0; + break; + case 11: + if (typeof r == "number" && r === 11) return 0; + break; + case 12: + if (typeof r == "number" && r === 12) return 0; + break; + case 13: + if (typeof r == "number" && r === 13) return 0; + break; + case 14: + if (typeof r == "number" && r === 14) return 0; + break; + case 15: + if (typeof r == "number" && r === 15) return 0; + break; + case 16: + if (typeof r == "number" && r === 16) return 0; + break; + case 17: + if (typeof r == "number" && r === 17) return 0; + break; + case 18: + if (typeof r == "number" && r === 18) return 0; + break; + case 19: + if (typeof r == "number" && r === 19) return 0; + break; + case 20: + if (typeof r == "number" && r === 20) return 0; + break; + case 21: + if (typeof r == "number" && r === 21) return 0; + break; + case 22: + if (typeof r == "number" && r === 22) return 0; + break; + case 23: + if (typeof r == "number" && r === 23) return 0; + break; + case 24: + if (typeof r == "number" && r === 24) return 0; + break; + case 25: + if (typeof r == "number" && r === 25) return 0; + break; + case 26: + if (typeof r == "number" && r === 26) return 0; + break; + case 27: + if (typeof r == "number" && r === 27) return 0; + break; + case 28: + if (typeof r == "number" && r === 28) return 0; + break; + case 29: + if (typeof r == "number" && r === 29) return 0; + break; + case 30: + if (typeof r == "number" && r === 30) return 0; + break; + case 31: + if (typeof r == "number" && r === 31) return 0; + break; + case 32: + if (typeof r == "number" && r === 32) return 0; + break; + case 33: + if (typeof r == "number" && r === 33) return 0; + break; + case 34: + if (typeof r == "number" && r === 34) return 0; + break; + case 35: + if (typeof r == "number" && r === 35) return 0; + break; + case 36: + if (typeof r == "number" && r === 36) return 0; + break; + case 37: + if (typeof r == "number" && r === 37) return 0; + break; + case 38: + if (typeof r == "number" && r === 38) return 0; + break; + case 39: + if (typeof r == "number" && r === 39) return 0; + break; + case 40: + if (typeof r == "number" && r === 40) return 0; + break; + case 41: + if (typeof r == "number" && r === 41) return 0; + break; + case 42: + if (typeof r == "number" && r === 42) return 0; + break; + case 43: + if (typeof r == "number" && r === 43) return 0; + break; + case 44: + if (typeof r == "number" && r === 44) return 0; + break; + case 45: + if (typeof r == "number" && r === 45) return 0; + break; + case 46: + if (typeof r == "number" && r === 46) return 0; + break; + case 47: + if (typeof r == "number" && r === 47) return 0; + break; + case 48: + if (typeof r == "number" && r === 48) return 0; + break; + case 49: + if (typeof r == "number" && r === 49) return 0; + break; + case 50: + if (typeof r == "number" && r === 50) return 0; + break; + case 51: + if (typeof r == "number" && r === 51) return 0; + break; + case 52: + if (typeof r == "number" && r === 52) return 0; + break; + case 53: + if (typeof r == "number" && r === 53) return 0; + break; + case 54: + if (typeof r == "number" && r === 54) return 0; + break; + case 55: + if (typeof r == "number" && r === 55) return 0; + break; + case 56: + if (typeof r == "number" && r === 56) return 0; + break; + default: if (typeof r == "number" && r === 57) return 0; + } + } else switch (x[0]) { + case 0: + if (typeof r != "number" && r[0] === 0) { + var t = r[1], u = x[1]; + return p(d(kr[47], 0), u, t); + } + break; + case 1: + if (typeof r != "number" && r[0] === 1) { + var i = r[1], c = x[1]; + return p(d(kr[46], 0), c, i); + } + break; + case 2: + if (typeof r != "number" && r[0] === 2) { + var v = r[2], o = r[1], l = x[2], k = x[1], h = p(d(kr[45], 0), k, o); + return h === 0 ? p(d(kr[44], 0), l, v) : h; + } + break; + case 3: + if (typeof r != "number" && r[0] === 3) { + var E = r[2], T = r[1], I = x[2], N = x[1], P = p(d(kr[43], 0), N, T); + return P === 0 ? p(d(kr[42], 0), I, E) : P; + } + break; + case 4: + if (typeof r != "number" && r[0] === 4) { + var R = r[2], q = r[1], X = x[2], B = x[1], z = p(d(kr[41], 0), B, q); + return z === 0 ? p(d(kr[40], 0), X, R) : z; + } + break; + case 5: + if (typeof r != "number" && r[0] === 5) { + var x0 = r[1], W = x[1]; + return p(d(kr[39], 0), W, x0); + } + break; + case 6: + if (typeof r != "number" && r[0] === 6) { + var Z = r[1], t0 = x[1]; + return p(d(kr[38], 0), t0, Z); + } + break; + case 7: + if (typeof r != "number" && r[0] === 7) { + var i0 = r[2], u0 = x[2], k0 = r[1], o0 = x[1], S0 = p(d(kr[37], 0), o0, k0); + if (S0 !== 0) return S0; + if (!u0) return i0 ? -1 : 0; + var s0 = u0[1]; + if (!i0) return 1; + var v0 = i0[1]; + return p(d(kr[36], 0), s0, v0); + } + break; + case 8: + if (typeof r != "number" && r[0] === 8) { + var m0 = r[1], p0 = x[1]; + return p(d(kr[35], 0), p0, m0); + } + break; + case 9: + if (typeof r != "number" && r[0] === 9) { + var E0 = r[2], b0 = x[2], C0 = r[3], D0 = r[1], U0 = x[3], T0 = x[1], M0 = p(d(kr[34], 0), T0, D0); + if (M0 !== 0) return M0; + if (b0) var y0 = b0[1], G = E0 ? p(kr[33], y0, E0[1]) : 1; + else var G = E0 ? -1 : 0; + return G === 0 ? p(d(kr[32], 0), U0, C0) : G; + } + break; + case 10: + if (typeof r != "number" && r[0] === 10) { + var j0 = r[2], Q0 = r[1], q0 = x[2], ix = x[1], xx = p(d(kr[31], 0), ix, Q0); + return xx === 0 ? p(d(kr[30], 0), q0, j0) : xx; + } + break; + case 11: + if (typeof r != "number" && r[0] === 11) { + var fx = r[2], yx = r[1], R0 = x[2], lx = x[1], kx = p(d(kr[29], 0), lx, yx); + return kx === 0 ? p(d(kr[28], 0), R0, fx) : kx; + } + break; + case 12: + if (typeof r != "number" && r[0] === 12) { + var Q = r[1], I0 = x[1]; + return p(d(kr[27], 0), I0, Q); + } + break; + case 13: + if (typeof r != "number" && r[0] === 13) { + var M = r[1], d0 = x[1]; + return p(d(kr[26], 0), d0, M); + } + break; + case 14: + if (typeof r != "number" && r[0] === 14) { + var g0 = r[1], h0 = x[1]; + return p(d(kr[25], 0), h0, g0); + } + break; + case 15: + if (typeof r != "number" && r[0] === 15) { + var A0 = r[1], $0 = x[1]; + return p(d(kr[24], 0), $0, A0); + } + break; + case 16: + if (typeof r != "number" && r[0] === 16) { + var Kx = r[4], J = r[3], tr = r[2], Zx = r[1], b = x[4], V = x[3], tx = x[2], _x = x[1], gx = p(d(kr[23], 0), _x, Zx); + if (gx !== 0) return gx; + var ex = p(d(kr[22], 0), tx, tr); + if (ex !== 0) return ex; + var Jx = p(d(kr[21], 0), V, J); + return Jx === 0 ? p(d(kr[20], 0), b, Kx) : Jx; + } + break; + case 17: + if (typeof r != "number" && r[0] === 17) { + var Ux = r[1], hr = x[1]; + return p(d(kr[19], 0), hr, Ux); + } + break; + case 18: + if (typeof r != "number" && r[0] === 18) { + var dr = r[2], V0 = r[1], K0 = x[2], Cx = x[1], bx = p(d(kr[18], 0), Cx, V0); + return bx === 0 ? p(d(kr[17], 0), K0, dr) : bx; + } + break; + case 19: + if (typeof r != "number" && r[0] === 19) { + var Ox = r[1], ux = x[1]; + return p(d(kr[16], 0), ux, Ox); + } + break; + case 20: + if (typeof r != "number" && r[0] === 20) { + var br = r[1], nr = x[1]; + return p(d(kr[15], 0), nr, br); + } + break; + case 21: + if (typeof r != "number" && r[0] === 21) { + var $r = r[1], l1 = x[1]; + if (R6 <= l1) { + if (typeof $r == "number" && R6 === $r) return 0; + } else if (typeof $r == "number" && dM === $r) return 0; + var C1 = function(Q1) { + return R6 <= Q1 ? 1 : 0; + }, Qr = C1($r); + return xe(C1(l1), Qr); + } + break; + case 22: + if (typeof r != "number" && r[0] === 22) { + var O1 = r[1], Hr = x[1]; + return p(d(kr[14], 0), Hr, O1); + } + break; + case 23: + if (typeof r != "number" && r[0] === 23) { + var w = r[1], Y = x[1]; + return p(d(kr[13], 0), Y, w); + } + break; + case 24: + if (typeof r != "number" && r[0] === 24) { + var px = r[3], X0 = r[2], vx = r[1], Ix = x[3], Cr = x[2], Vx = x[1], f1 = p(d(kr[12], 0), Vx, vx); + if (f1 !== 0) return f1; + var c1 = p(d(kr[11], 0), Cr, X0); + return c1 === 0 ? p(d(kr[10], 0), Ix, px) : c1; + } + break; + case 25: + if (typeof r != "number" && r[0] === 25) { + var Fr = r[2], Zr = r[1], mx = x[2], Mx = x[1], rr = p(d(kr[9], 0), Mx, Zr); + return rr === 0 ? p(d(kr[8], 0), mx, Fr) : rr; + } + break; + case 26: + if (typeof r != "number" && r[0] === 26) { + var Ar = r[1], Or = x[1]; + if (_6 === Or) { + if (typeof Ar == "number" && _6 === Ar) return 0; + } else if (z6 <= Or) { + if (typeof Ar == "number" && z6 === Ar) return 0; + } else if (typeof Ar == "number" && ND === Ar) return 0; + var ne = function(Q1) { + return _6 === Q1 ? 0 : z6 <= Q1 ? 2 : 1; + }, Y2 = ne(Ar); + return xe(ne(Or), Y2); + } + break; + case 27: + if (typeof r != "number" && r[0] === 27) { + var je = r[1], kt = x[1]; + return p(d(kr[7], 0), kt, je); + } + break; + case 28: + if (typeof r != "number" && r[0] === 28) { + var xo = r[1], Tn = x[1]; + return p(d(kr[6], 0), Tn, xo); + } + break; + case 29: + if (typeof r != "number" && r[0] === 29) { + var ke = r[2], ro = r[1], Js = x[2], eo = x[1], Ks = p(d(kr[5], 0), eo, ro); + return Ks === 0 ? p(d(kr[4], 0), Js, ke) : Ks; + } + break; + case 30: + if (typeof r != "number" && r[0] === 30) { + var M2 = r[2], L2 = r[1], g1 = x[2], En = x[1], Sn = p(d(kr[3], 0), En, L2); + return Sn === 0 ? p(d(kr[2], 0), g1, M2) : Sn; + } + break; + default: if (typeof r != "number" && r[0] === 31) { + var Hs = r[1], Ws = x[1]; + return p(d(kr[1], 0), Ws, Hs); + } + } + function mt(Q1) { + if (typeof Q1 != "number") switch (Q1[0]) { + case 0: return 16; + case 1: return 17; + case 2: return 19; + case 3: return 20; + case 4: return 21; + case 5: return 22; + case 6: return 23; + case 7: return 24; + case 8: return 26; + case 9: return 27; + case 10: return 28; + case 11: return 30; + case 12: return 31; + case 13: return 33; + case 14: return 36; + case 15: return 40; + case 16: return 48; + case 17: return 50; + case 18: return 51; + case 19: return 53; + case 20: return 61; + case 21: return 69; + case 22: return 75; + case 23: return 84; + case 24: return 91; + case 25: return 93; + case 26: return ef; + case 27: return $6; + case 28: return e1; + case 29: return s8; + case 30: return SM; + default: return xq; + } + var ar = Q1; + if (58 <= ar) switch (ar) { + case 58: return 81; + case 59: return 82; + case 60: return 83; + case 61: return 85; + case 62: return 86; + case 63: return 87; + case 64: return 88; + case 65: return 89; + case 66: return 90; + case 67: return 92; + case 68: return 94; + case 69: return 95; + case 70: return 96; + case 71: return 97; + case 72: return 98; + case 73: return 99; + case 74: return cr; + case 75: return k1; + case 76: return Ee; + case 77: return Ss; + case 78: return ec; + case 79: return p2; + case 80: return Ct; + case 81: return Te; + case 82: return d2; + case 83: return wo; + case 84: return n2; + case 85: return nn; + case 86: return h2; + case 87: return k2; + case 88: return wr; + case 89: return Ca; + case 90: return Z6; + case 91: return q6; + case 92: return b6; + case 93: return Cf; + case 94: return un; + case 95: return zv; + case 96: return So; + case 97: return v8; + case 98: return Gr; + case 99: return R1; + case 100: return kk; + case 101: return Qv; + case 102: return M6; + case 103: return N6; + case 104: return sm; + case 105: return cM; + case 106: return bR; + case 107: return UD; + case 108: return YL; + case 109: return WF; + case 110: return ML; + case 111: return YM; + case 112: return xR; + case 113: return LM; + case 114: return KM; + default: return ER; + } + switch (ar) { + case 0: return 0; + case 1: return 1; + case 2: return 2; + case 3: return 3; + case 4: return 4; + case 5: return 5; + case 6: return 6; + case 7: return 7; + case 8: return 8; + case 9: return 9; + case 10: return 10; + case 11: return 11; + case 12: return 12; + case 13: return 13; + case 14: return 14; + case 15: return 15; + case 16: return 18; + case 17: return 25; + case 18: return 29; + case 19: return 32; + case 20: return 34; + case 21: return 35; + case 22: return 37; + case 23: return 38; + case 24: return 39; + case 25: return 41; + case 26: return 42; + case 27: return 43; + case 28: return 44; + case 29: return 45; + case 30: return 46; + case 31: return 47; + case 32: return 49; + case 33: return 52; + case 34: return 54; + case 35: return 55; + case 36: return 56; + case 37: return 57; + case 38: return 58; + case 39: return 59; + case 40: return 60; + case 41: return 62; + case 42: return 63; + case 43: return 64; + case 44: return 65; + case 45: return 66; + case 46: return 67; + case 47: return 68; + case 48: return 70; + case 49: return 71; + case 50: return 72; + case 51: return 73; + case 52: return 74; + case 53: return 76; + case 54: return 77; + case 55: return 78; + case 56: return 79; + default: return 80; + } + } + var to = mt(r); + return xe(mt(x), to); + } + var VO = dU([0, function(x, r) { + var e = r[2], t = x[2], u = TU(x[1], r[1]); + return u === 0 ? tS0(t, e) : u; + }]); + function U4(x, r, e) { + var t = e[2][1], u = e[1]; + return Sr(t, rx) ? r : R2[3].call(null, t, r) ? (B0(x, [ + 0, + u, + [0, t] + ]), r) : R2[4].call(null, t, r); + } + function $O(x) { + return function(r) { + var e = r[2]; + switch (e[0]) { + case 0: return y2(function(t, u) { + var i = u[0] === 0 ? u[1][2][2] : u[1][2][1]; + return $O(t)(i); + }, x, e[1][1]); + case 1: return y2(function(t, u) { + if (u[0] === 2) return t; + var i = u[1][2][1]; + return $O(t)(i); + }, x, e[1][1]); + case 2: return [ + 0, + e[1][1], + x + ]; + default: return Px(g40); + } + }; + } + var Y0 = QB(T40, b40[1]); + function e5(x, r, e) { + var t = x ? x[1] : 0, u = r ? r[1] : 0, i = G0(e), c = L(e); + if (typeof c == "number") switch (c) { + case 105: + var v = c0(e); + return w0(e), [0, [ + 0, + i, + [ + 0, + 0, + r0([0, v], 0, D) + ] + ]]; + case 106: + var o = c0(e); + return w0(e), [0, [ + 0, + i, + [ + 0, + 1, + r0([0, o], 0, D) + ] + ]]; + case 128: + if (t) { + var l = c0(e); + return w0(e), [0, [ + 0, + i, + [ + 0, + 2, + r0([0, l], 0, D) + ] + ]]; + } + break; + } + else if (c[0] === 4) { + var k = c[3]; + if (C(k, bo)) { + if (!C(k, ng) && u && zd(1, e)) { + var h = c0(e); + return w0(e), [0, [ + 0, + i, + [ + 0, + 4, + r0([0, h], 0, D) + ] + ]]; + } + } else if (u && zd(1, e)) { + var E = c0(e); + w0(e); + var T = L(e); + x: { + if (typeof T != "number" && T[0] === 4 && !C(T[3], ng)) { + var I = G0(e); + w0(e); + var N = Br(i, I), P = 5; + break x; + } + var N = i, P = 3; + } + return [0, [ + 0, + N, + [ + 0, + P, + r0([0, E], 0, D) + ] + ]]; + } + } + return 0; + } + function LX(x, r, e, t, u) { + r === 1 && Ce(u, 79); + var i = c0(u); + w0(u); + var c = L0(u); + if (x) var v = r0([0, qx(x[1], i)], [0, c], D), o = v, l = Gx(Iv0, t), k = -e; + else var o = r0([0, i], [0, c], D), l = t, k = e; + return [30, [ + 0, + k, + l, + o + ]]; + } + function qX(x, r, e, t) { + var u = c0(t); + w0(t); + var i = L0(t); + if (x) var c = r0([0, qx(x[1], u)], [0, i], D), v = Gx(Av0, e), o = c, l = v, k = Wh(gN, r); + else var o = r0([0, u], [0, i], D), l = e, k = r; + return [31, [ + 0, + k, + l, + o + ]]; + } + var BX = [], UX = [], XX = [], GX = [], YX = [], zX = [], JX = [], KX = [], HX = [], WX = [], VX = []; + function n1(x) { + var r = G0(x), e = qO(0, x); + return $X(e, r, t5(e)); + } + function X4(x) { + return 1 - d1(x) && Bx(x, p2), e0(0, function(r) { + return K(r, 88), n1(r); + }, x); + } + function $X(x, r, e) { + var t = L(x); + return typeof t == "number" && t === 43 ? e0([0, r], function(u) { + K(u, 43); + var i = t5(qO(1, u)); + Hd(u, 87); + var c = n1(u); + Hd(u, 88); + return [17, [ + 0, + e, + i, + c, + n1(u), + r0(0, [0, L0(u)], D) + ]]; + }, x) : e; + } + function t5(x) { + var r = G0(x); + if (L(x) === 91) { + var e = c0(x); + w0(x); + var t = e; + } else var t = 0; + return QX(x, [0, t], r, ZX(x)); + } + function QX(x, r, e, t) { + var u = r ? r[1] : 0; + return L(x) === 91 ? e0([0, e], p(BX[1], u, [ + 0, + t, + 0 + ]), x) : t; + } + function ZX(x) { + var r = G0(x); + if (L(x) === 93) { + var e = c0(x); + w0(x); + var t = e; + } else var t = 0; + return xG(x, [0, t], r, rG(x)); + } + function xG(x, r, e, t) { + var u = r ? r[1] : 0; + return L(x) === 93 ? e0([0, e], p(UX[1], u, [ + 0, + t, + 0 + ]), x) : t; + } + function rG(x) { + return eG(x, n5(x)); + } + function eG(x, r) { + var e = L(x); + if (typeof e == "number" && e === 11 && !x[17]) { + var t = u5(x, r); + return f5(1, x, t[1], 0, [ + 0, + t[1], + [ + 0, + 0, + [ + 0, + t, + 0 + ], + 0, + 0 + ] + ]); + } + return r; + } + function n5(x) { + var r = L(x); + if (typeof r == "number" && r === 87) return e0(0, function(t) { + var u = c0(t); + K(t, 87); + var i = r0([0, u], 0, D); + return [11, [ + 0, + n5(t), + i + ]]; + }, x); + return tG(0, x, G0(x), nS0(x)); + } + function QO(x, r, e, t, u) { + var i = r ? r[1] : 0; + if (s2(e)) return u; + var c = L(e); + if (typeof c == "number") { + if (c === 6) { + w0(e); + var v = 0; + return x < 50 ? Xl(x + 1 | 0, i, v, e, t, u) : z1(Xl, [ + 0, + i, + v, + e, + t, + u + ]); + } + if (c === 10) { + var o = Qx(1, e); + if (typeof o == "number" && o === 6) { + Bx(e, Zo0), K(e, 10), K(e, 6); + var l = 0; + return x < 50 ? Xl(x + 1 | 0, i, l, e, t, u) : z1(Xl, [ + 0, + i, + l, + e, + t, + u + ]); + } + return Bx(e, xv0), u; + } + if (c === 85) { + w0(e), L(e) !== 6 && Bx(e, 39), K(e, 6); + var k = 1, h = 1; + return x < 50 ? Xl(x + 1 | 0, h, k, e, t, u) : z1(Xl, [ + 0, + h, + k, + e, + t, + u + ]); + } + } + return u; + } + function tG(x, r, e, t) { + return Jh(QO(0, x, r, e, t)); + } + function Xl(x, r, e, t, u, i) { + var c = e0([0, u], function(o) { + if (!e && Rr(o, 7)) return [16, [ + 0, + i, + r0(0, [0, L0(o)], D) + ]]; + var l = n1(o); + K(o, 7); + var k = [ + 0, + i, + l, + r0(0, [0, L0(o)], D) + ]; + return r ? [21, [ + 0, + k, + e + ]] : [20, k]; + }, t), v = [0, r]; + return x < 50 ? QO(x + 1 | 0, v, t, u, c) : z1(QO, [ + 0, + v, + t, + u, + c + ]); + } + function nG(x) { + if (B1(x, 0), L(x) === 4) { + w0(x); + var r = nG(x); + K(x, 5); + var t = r; + } else if (Bt(x)) var e = p(Y0[13], 0, x), t = [0, p(XX[1], x, [ + 0, + e[1], + [0, e] + ])]; + else { + Bx(x, 44); + var t = 0; + } + return H1(x), t; + } + function nS0(x) { + var r = G0(x), e = L(x); + x: { + r: { + if (typeof e == "number") switch (e) { + case 4: + var t = G0(x), u = e0(0, fS0, x), i = u[2], c = u[1]; + return i[0] === 0 ? f5(1, x, t, 0, [ + 0, + c, + i[1] + ]) : i[1]; + case 6: return e0(0, function(s0) { + var v0 = c0(s0); + K(s0, 6); + var m0 = m3(0, s0), p0 = p(GX[1], m0, 0), E0 = p0[2], b0 = p0[1]; + return K(s0, 7), [28, [ + 0, + b0, + E0, + r0([0, v0], [0, L0(s0)], D) + ]]; + }, x); + case 48: return e0(0, function(s0) { + var v0 = c0(s0); + K(s0, 48); + var m0 = nG(s0); + if (!m0) return rv0; + return [24, [ + 0, + m0[1], + s2(s0) ? 0 : ej(s0), + r0([0, v0], 0, D) + ]]; + }, x); + case 55: return e0(0, function(s0) { + var v0 = c0(s0); + w0(s0); + var m0 = aG(s0); + return [15, [ + 0, + m0[2], + m0[1], + r0([0, v0], 0, D) + ]]; + }, x); + case 100: return f5(1, x, G0(x), te(x, 1, w3(x)), i5(x)); + case 106: return e0(0, uS0, x); + case 108: + var l = c0(x); + return w0(x), [ + 0, + r, + [10, r0([0, l], [0, L0(x)], D)] + ]; + case 127: return e0(0, function(s0) { + var v0 = c0(s0); + w0(s0); + var m0 = L0(s0); + return [25, [ + 0, + n5(s0), + r0([0, v0], [0, m0], D) + ]]; + }, x); + case 128: return e0(0, function(s0) { + var v0 = c0(s0); + w0(s0); + var m0 = L0(s0); + return [27, [ + 0, + n1(s0), + r0([0, v0], [0, m0], D) + ]]; + }, x); + case 129: return e0(0, function(s0) { + var v0 = c0(s0); + w0(s0); + var m0 = L0(s0); + return [18, [ + 0, + e0(0, function(E0) { + return [ + 0, + _3(E0), + Vd(E0, [0, G0(E0)], function(C0) { + if (1 - Rr(C0, 43)) throw J0(Xt, 1); + var D0 = t5(C0); + if (!C0[18] && L(C0) === 87) throw J0(Xt, 1); + return [1, [ + 0, + D0[1], + D0 + ]]; + }), + 1, + 0, + 0, + 0 + ]; + }, s0), + r0([0, v0], [0, m0], D) + ]]; + }, x); + case 0: + case 2: + var k = rj(0, 1, 1, x); + return [ + 0, + k[1], + [14, k[2]] + ]; + case 133: + case 134: break r; + case 43: + case 44: break; + case 32: + case 33: + var h = c0(x); + return w0(x), [ + 0, + r, + [32, [ + 0, + e === 33 ? 1 : 0, + r0([0, h], [0, L0(x)], D) + ]] + ]; + default: break x; + } + else switch (e[0]) { + case 2: + var E = e[1], T = E[3], I = E[2], N = E[1]; + E[4] && Ce(x, 79); + var P = c0(x); + return w0(x), [ + 0, + N, + [29, [ + 0, + I, + T, + r0([0, P], [0, L0(x)], D) + ]] + ]; + case 4: + var R = e[3]; + if (C(R, Ta)) { + if (C(R, Lv)) { + if (!C(R, el)) break r; + } else if (x[30][1]) { + var q = Qx(1, x); + e: if (typeof q == "number") { + if (q !== 4 && cr !== q) break e; + var X = G0(x); + w0(x); + return f5(0, x, X, te(x, 1, w3(x)), i5(x)); + } + var z = c5(x); + return [ + 0, + z[1], + [19, z[2]] + ]; + } + } else if (x[30][1]) return e0(0, function(s0) { + var v0 = c0(s0); + Xs(s0, ev0); + var m0 = te(s0, 9, w3(s0)), p0 = iG(s0); + if (zO(s0)) var b0 = JO(s0, tj(s0)), C0 = p0; + else var E0 = tj(s0), b0 = E0, C0 = p(P1(s0)[2], p0, function(D0, U0) { + return p(zx(D0, 420776873, 12), D0, U0); + }); + return [13, [ + 0, + m0, + C0, + b0, + r0([0, v0], 0, D) + ]]; + }, x); + break; + case 7: + if (C(e[1], m6)) break x; + return Bx(x, 87), [ + 0, + r, + tv0 + ]; + case 12: + var x0 = e[3], W = e[2], Z = e[1], t0 = 0; + return e0(0, function(s0) { + return LX(t0, Z, W, x0, s0); + }, x); + case 13: + var i0 = e[3], u0 = e[2], k0 = 0; + return e0(0, function(s0) { + return qX(k0, u0, i0, s0); + }, x); + default: break x; + } + var o0 = c5(x); + return [ + 0, + o0[1], + [19, o0[2]] + ]; + } + return e0(0, function(s0) { + return [26, uG(s0)]; + }, x); + } + var S0 = iS0(x); + return S0 ? [ + 0, + r, + S0[1] + ] : (v1(nv0, x), [ + 0, + r, + uv0 + ]); + } + function uS0(x) { + var r = c0(x); + w0(x); + var e = L(x); + if (typeof e != "number") switch (e[0]) { + case 12: return LX([0, r], e[1], e[2], e[3], x); + case 13: return qX([0, r], e[2], e[3], x); + } + return v1(iv0, x), fv0; + } + function ZO(x, r) { + var e = c0(x), t = e0(0, w0, x)[1], u = r0([0, e], [0, L0(x)], D); + return [0, [19, [ + 0, + [0, wn(0, [ + 0, + t, + r + ])], + 0, + u + ]]]; + } + function iS0(x) { + var r = c0(x), e = L(x); + if (typeof e == "number") switch (e) { + case 31: return w0(x), [0, [4, r0([0, r], [0, L0(x)], D)]]; + case 116: return w0(x), [0, [0, r0([0, r], [0, L0(x)], D)]]; + case 117: return w0(x), [0, [1, r0([0, r], [0, L0(x)], D)]]; + case 118: return w0(x), [0, [2, r0([0, r], [0, L0(x)], D)]]; + case 119: return w0(x), [0, [5, r0([0, r], [0, L0(x)], D)]]; + case 120: return w0(x), [0, [6, r0([0, r], [0, L0(x)], D)]]; + case 121: return w0(x), [0, [7, r0([0, r], [0, L0(x)], D)]]; + case 122: return w0(x), [0, [3, r0([0, r], [0, L0(x)], D)]]; + case 123: return w0(x), [0, [9, r0([0, r], [0, L0(x)], D)]]; + case 124: return w0(x), [0, [33, r0([0, r], [0, L0(x)], D)]]; + case 125: return w0(x), [0, [34, r0([0, r], [0, L0(x)], D)]]; + case 126: return w0(x), [0, [35, r0([0, r], [0, L0(x)], D)]]; + case 130: return ZO(x, cv0); + case 131: return ZO(x, sv0); + case 132: return ZO(x, av0); + } + else if (e[0] === 11) { + var t = e[1]; + w0(x); + var u = L0(x); + return [0, [ + 8, + t ? -883944824 : 737456202, + r0([0, r], [0, u], D) + ]]; + } + return 0; + } + function uG(x) { + var r = c0(x), e = L(x); + x: { + if (typeof e == "number") switch (e) { + case 133: + var t = 1; + break x; + case 134: + var t = 2; + break x; + } + else if (e[0] === 4 && !C(e[3], el)) { + var t = 0; + break x; + } + var t = Px(ov0); + } + var u = G0(x); + w0(x); + var i = L0(x); + return [ + 0, + u, + n5(x), + r0([0, r], [0, i], D), + t + ]; + } + function u5(x, r) { + return [ + 0, + r[1], + [ + 0, + 0, + r, + 0 + ] + ]; + } + function Qo(x) { + return p(YX[1], x, 0); + } + function i5(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 4); + var t = d(Qo(r), 0), u = c0(r); + K(r, 5); + var i = I1([0, e], [0, L0(r)], u, D); + return [ + 0, + t[1], + t[2], + t[3], + i + ]; + }, x); + } + function iG(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 4); + var t = p(zX[1], r, 0), u = c0(r); + K(r, 5); + var i = I1([0, e], [0, L0(r)], u, D); + return [ + 0, + t[1], + t[2], + i + ]; + }, x); + } + function fS0(x) { + var r = c0(x); + K(x, 4); + var e = m3(0, x), t = L(e); + x: { + r: { + e: { + if (typeof t != "number") { + if (t[0] !== 4) break r; + var u = t[3]; + if (C(u, Ta)) { + if (C(u, el)) break e; + var i = Qx(1, e); + t: { + if (typeof i == "number" && 1 >= i + Ia >>> 0) { + var c = [0, d(Qo(e), 0)]; + break t; + } + var c = [1, n1(e)]; + } + var v = c; + } else { + if (!e[30][1]) break e; + var o = Qx(1, e); + t: { + n: if (typeof o == "number") { + if (o !== 4 && cr !== o) break n; + var l = [1, n1(e)]; + break t; + } + var l = fG(e); + } + var v = l; + } + var N = v; + break x; + } + switch (t) { + case 5: + var N = vv0; + break x; + case 133: + var k = Qx(1, e); + t: { + if (typeof k == "number" && k === 88) { + var h = [0, d(Qo(e), 0)]; + break t; + } + var h = [1, n1(e)]; + } + var N = h; + break x; + case 44: break; + case 12: + case 115: + var N = [0, d(Qo(e), 0)]; + break x; + default: break r; + } + } + var N = fG(e); + break x; + } + r: { + e: { + if (typeof t == "number") switch (t) { + case 31: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: break; + default: break e; + } + else if (t[0] !== 11) break e; + var E = 1; + break r; + } + var E = 0; + } + if (E) { + var T = Qx(1, e); + r: { + if (typeof T == "number" && 1 >= T + Ia >>> 0) { + var I = [0, d(Qo(e), 0)]; + break r; + } + var I = [1, n1(e)]; + } + var N = I; + } else var N = [1, n1(e)]; + } + if (N[0] === 0) var P = N; + else { + var R = N[1]; + if (x[17]) var q = N; + else { + var X = L(x); + x: { + if (typeof X == "number") { + if (X === 5) { + if (Qx(1, x) === 11) { + var B = [ + 0, + u5(x, R), + 0 + ], x0 = [0, d(Qo(x), B)]; + break x; + } + var x0 = [1, R]; + break x; + } + if (X === 9) { + K(x, 9); + var z = [ + 0, + u5(x, R), + 0 + ], x0 = [0, d(Qo(x), z)]; + break x; + } + } + var x0 = N; + } + var q = x0; + } + var P = q; + } + var W = c0(x); + K(x, 5); + var Z = L0(x); + if (P[0] === 0) var t0 = P[1], i0 = I1([0, r], [0, Z], W, D), u0 = [0, [ + 0, + t0[1], + t0[2], + t0[3], + i0 + ]]; + else var u0 = [1, cS0(P[1], r, Z)]; + return u0; + } + function fG(x) { + var r = Qx(1, x); + if (typeof r == "number" && 1 >= r + Ia >>> 0) return [0, d(Qo(x), 0)]; + var e = G0(x), t = oG(x, _3(x)), u = QX(x, 0, e, xG(x, 0, e, eG(x, tG(0, x, e, [ + 0, + t[1], + [19, t[2]] + ])))); + return [1, $X(qO(0, x), e, u)]; + } + function f5(x, r, e, t, u) { + return e0([0, e], function(i) { + return K(i, 11), [12, [ + 0, + t, + u, + cG(i), + 0, + x + ]]; + }, r); + } + function cG(x) { + return Zd(x) ? [1, xj(x)] : [0, n1(x)]; + } + function xj(x) { + function r(e) { + var t = c0(e); + K(e, Qv); + var u = qx(t, c0(e)); + return [ + 0, + [0, n1(e)], + u + ]; + } + return e0(0, function(e) { + var t = c0(e), u = Rr(e, M6) ? 1 : Rr(e, N6) ? 2 : 0; + B1(e, 0); + var i = W1(e); + H1(e); + x: if (u === 2) var c = r(e), v = c[2], o = c[1]; + else { + var l = L(e); + if (typeof l == "number" && Qv === l) { + var k = r(e), v = k[2], o = k[1]; + break x; + } + var v = 0, o = 0; + } + return [ + 0, + u, + [ + 0, + i, + o + ], + I1([0, t], 0, v, D) + ]; + }, x); + } + function sG(x, r) { + return e0([0, r], xj, x); + } + function rj(x, r, e, t) { + var u = r && (L(t) === 2 ? 1 : 0), i = r && 1 - u; + return e0(0, function(c) { + var v = c0(c); + K(c, u ? 2 : 0); + var l = m3(0, c), k = UJ(JX[1], x, i, e, u, l, lv0), h = k[3], E = k[2], T = k[1], I = qx(h, c0(c)); + return K(c, u ? 3 : 1), [ + 0, + u, + E, + T, + I1([0, v], [0, L0(c)], I, D) + ]; + }, t); + } + function aG(x) { + return [ + 0, + Rr(x, 43) ? NX(x, p(KX[1], x, 0)) : 0, + rj(0, 0, 0, x) + ]; + } + function _3(x) { + var r = W1(x), e = r[2], t = e[1], u = r[1], i = e[2]; + return XO(t) && B0(x, [ + 0, + u, + 99 + ]), [ + 0, + u, + [ + 0, + t, + i + ] + ]; + } + function w3(x) { + if (cr !== L(x)) return 0; + 1 - d1(x) && Bx(x, p2); + var r = e0(0, function(t) { + var u = c0(t); + K(t, cr); + var i = Z0(HX[1], t, 0, 0), c = c0(t); + return Hd(t, k1), [ + 0, + i, + I1([0, u], [0, L0(t)], c, D) + ]; + }, x), e = r[1]; + return r[2][1] || B0(x, [ + 0, + e, + 53 + ]), [0, r]; + } + function ej(x) { + return cr === L(x) ? [0, e0(0, function(r) { + var e = c0(r); + K(r, cr); + var t = m3(0, r), u = p(WX[1], t, 0), i = c0(t); + return K(t, k1), [ + 0, + u, + I1([0, e], [0, L0(t)], i, D) + ]; + }, x)] : 0; + } + function c5(x) { + return oG(x, _3(x)); + } + function oG(x, r) { + return e0([0, r[1]], function(e) { + var t = p(VX[1], e, [ + 0, + r[1], + [0, r] + ])[2]; + return [ + 0, + cr === L(e) ? p(P1(e)[2], t, function(i, c) { + return p(zx(i, -860373976, 67), i, c); + }) : t, + ej(e), + 0 + ]; + }, x); + } + function tj(x) { + var r = L(x); + x: { + if (typeof r == "number") switch (r) { + case 88: + var e = G0(x); + 1 - d1(x) && Bx(x, p2), w0(x); + var t = e0(0, n1, x), u = t[2], i = t[1]; + return B0(x, [ + 0, + e, + [17, u[2][0] === 26 ? 1 : 0] + ]), [ + 1, + i, + [ + 0, + e, + u, + 0, + 0 + ] + ]; + case 133: + case 134: break; + default: break x; + } + else if (r[0] !== 4 || C(r[3], el)) break x; + 1 - d1(x) && Bx(x, p2); + var v = e0([0, G0(x)], uG, x); + return [ + 1, + v[1], + v[2] + ]; + } + return [0, Ha(x)]; + } + function cS0(x, r, e) { + var t = x[2]; + function u(d0) { + return O2(d0, r0([0, r], [0, e], D)); + } + var i = x[1]; + switch (t[0]) { + case 0: + var M = [0, u(t[1])]; + break; + case 1: + var M = [1, u(t[1])]; + break; + case 2: + var M = [2, u(t[1])]; + break; + case 3: + var M = [3, u(t[1])]; + break; + case 4: + var M = [4, u(t[1])]; + break; + case 5: + var M = [5, u(t[1])]; + break; + case 6: + var M = [6, u(t[1])]; + break; + case 7: + var M = [7, u(t[1])]; + break; + case 8: + var c = u(t[2]), M = [ + 8, + t[1], + c + ]; + break; + case 9: + var M = [9, u(t[1])]; + break; + case 10: + var M = [10, u(t[1])]; + break; + case 11: + var v = t[1], o = u(v[2]), M = [11, [ + 0, + v[1], + o + ]]; + break; + case 12: + var l = t[1], k = l[5], h = u(l[4]), M = [12, [ + 0, + l[1], + l[2], + l[3], + h, + k + ]]; + break; + case 13: + var E = t[1], T = u(E[4]), M = [13, [ + 0, + E[1], + E[2], + E[3], + T + ]]; + break; + case 14: + var I = t[1], N = I[4], P = pd(N, r0([0, r], [0, e], D)), M = [14, [ + 0, + I[1], + I[2], + I[3], + P + ]]; + break; + case 15: + var R = t[1], q = u(R[3]), M = [15, [ + 0, + R[1], + R[2], + q + ]]; + break; + case 16: + var X = t[1], B = u(X[2]), M = [16, [ + 0, + X[1], + B + ]]; + break; + case 17: + var z = t[1], x0 = u(z[5]), M = [17, [ + 0, + z[1], + z[2], + z[3], + z[4], + x0 + ]]; + break; + case 18: + var W = t[1], Z = u(W[2]), M = [18, [ + 0, + W[1], + Z + ]]; + break; + case 19: + var t0 = t[1], i0 = u(t0[3]), M = [19, [ + 0, + t0[1], + t0[2], + i0 + ]]; + break; + case 20: + var u0 = t[1], k0 = u(u0[3]), M = [20, [ + 0, + u0[1], + u0[2], + k0 + ]]; + break; + case 21: + var o0 = t[1], S0 = o0[1], s0 = o0[2], v0 = u(S0[3]), M = [21, [ + 0, + [ + 0, + S0[1], + S0[2], + v0 + ], + s0 + ]]; + break; + case 22: + var m0 = t[1], p0 = u(m0[2]), M = [22, [ + 0, + m0[1], + p0 + ]]; + break; + case 23: + var E0 = t[1], b0 = u(E0[2]), M = [23, [ + 0, + E0[1], + b0 + ]]; + break; + case 24: + var C0 = t[1], D0 = u(C0[3]), M = [24, [ + 0, + C0[1], + C0[2], + D0 + ]]; + break; + case 25: + var U0 = t[1], T0 = u(U0[2]), M = [25, [ + 0, + U0[1], + T0 + ]]; + break; + case 26: + var M0 = t[1], y0 = M0[4], G = u(M0[3]), M = [26, [ + 0, + M0[1], + M0[2], + G, + y0 + ]]; + break; + case 27: + var j0 = t[1], Q0 = u(j0[2]), M = [27, [ + 0, + j0[1], + Q0 + ]]; + break; + case 28: + var q0 = t[1], ix = u(q0[3]), M = [28, [ + 0, + q0[1], + q0[2], + ix + ]]; + break; + case 29: + var xx = t[1], fx = u(xx[3]), M = [29, [ + 0, + xx[1], + xx[2], + fx + ]]; + break; + case 30: + var yx = t[1], R0 = u(yx[3]), M = [30, [ + 0, + yx[1], + yx[2], + R0 + ]]; + break; + case 31: + var lx = t[1], kx = u(lx[3]), M = [31, [ + 0, + lx[1], + lx[2], + kx + ]]; + break; + case 32: + var Q = t[1], I0 = u(Q[2]), M = [32, [ + 0, + Q[1], + I0 + ]]; + break; + case 33: + var M = [33, u(t[1])]; + break; + case 34: + var M = [34, u(t[1])]; + break; + default: var M = [35, u(t[1])]; + } + return [ + 0, + i, + M + ]; + } + Dr(BX, [0, function(x, r, e) { + for (var t = r;;) { + if (!Rr(e, 91)) { + var u = cx(t); + if (u) { + var i = u[2]; + if (i) { + var c = i[2], v = i[1]; + return [22, [ + 0, + [ + 0, + u[1], + v, + c + ], + r0([0, x], 0, D) + ]]; + } + } + throw J0([ + 0, + Nr, + Sv0 + ], 1); + } + var t = [ + 0, + ZX(e), + t + ]; + } + }]), Dr(UX, [0, function(x, r, e) { + for (var t = r;;) { + if (!Rr(e, 93)) { + var u = cx(t); + if (u) { + var i = u[2]; + if (i) { + var c = i[2], v = i[1]; + return [23, [ + 0, + [ + 0, + u[1], + v, + c + ], + r0([0, x], 0, D) + ]]; + } + } + throw J0([ + 0, + Nr, + Ev0 + ], 1); + } + var t = [ + 0, + rG(e), + t + ]; + } + }]), Dr(XX, [0, function(x, r) { + for (var e = r;;) { + var t = e[2], u = e[1]; + if (L(x) === 10 && TX(1, x)) { + let v = t; + var i = e0([0, u], function(l) { + return K(l, 10), [ + 0, + v, + W1(l) + ]; + }, x), c = i[1], e = [ + 0, + c, + [1, [ + 0, + c, + i[2] + ]] + ]; + continue; + } + return t; + } + }]), Dr(GX, [0, function(x, r) { + for (var e = r;;) { + var t = L(x); + x: if (typeof t == "number") { + if (t !== 7 && wr !== t) break x; + return [ + 0, + cx(e), + 0 + ]; + } + var u = e0(0, function(l) { + if (!Rr(l, 12)) { + var k = L(l); + x: { + if (typeof k == "number" && (p2 === k || Ct === k && Us(1, l))) { + var h = e5(0, 0, l); + break x; + } + var h = 0; + } + var E = Bt(l), T = Qx(1, l); + if (E && typeof T == "number" && 1 >= T + Ia >>> 0) { + var I = W1(l), N = Rr(l, 87); + return K(l, 88), [0, [1, [ + 0, + I, + n1(l), + h, + N + ]]]; + } + return t3(h) && Bx(l, 43), [0, [0, n1(l)]]; + } + var P = L(l); + x: if (typeof P == "number") { + if (10 <= P) { + if (wr !== P) break x; + } else { + if (7 > P) break x; + switch (P - 7 | 0) { + case 0: break; + case 1: break x; + default: return v1(Tv0, l), w0(l), 0; + } + } + return 0; + } + var R = Bt(l), q = Qx(1, l); + x: { + if (R && typeof q == "number" && 1 >= q + Ia >>> 0) { + var X = W1(l); + L(l) === 87 && (Bx(l, 42), w0(l)), K(l, 88); + var B = [0, X]; + break x; + } + var B = 0; + } + return [0, [2, [ + 0, + B, + n1(l) + ]]]; + }, x), i = u[2], c = u[1]; + if (!i) return [ + 0, + cx(e), + 1 + ]; + var v = [ + 0, + [ + 0, + c, + i[1] + ], + e + ]; + L(x) !== 7 && K(x, 9); + var e = v; + } + }]); + function vG(x) { + var r = Qx(1, x); + return typeof r == "number" && 1 >= r + Ia >>> 0 ? e0(0, function(e) { + B1(e, 0); + var t = p(Y0[13], 0, e); + H1(e), 1 - d1(e) && Bx(e, p2); + var u = Rr(e, 87); + return K(e, 88), [ + 0, + [0, t], + n1(e), + u + ]; + }, x) : u5(x, n1(x)); + } + Dr(YX, [0, function(x, r, e) { + for (var t = r, u = e;;) { + var i = L(x); + x: if (typeof i == "number") switch (i) { + case 5: + case 12: + case 115: + var c = i === 12 ? [0, e0(0, function(E) { + var T = c0(E); + K(E, 12); + var I = r0([0, T], 0, D); + return [ + 0, + vG(E), + I + ]; + }, x)] : 0; + return [ + 0, + t, + cx(u), + c, + 0 + ]; + } + else if (i[0] === 4 && !C(i[3], Bv)) { + if (Qx(1, x) !== 88 && Qx(1, x) !== 87) break x; + (t !== 0 || u !== 0) && Bx(x, 92); + var l = e0(0, function(T) { + var I = c0(T); + w0(T), L(T) === 87 && Bx(T, 91); + var N = r0([0, I], 0, D); + return [ + 0, + X4(T), + N + ]; + }, x); + L(x) !== 5 && K(x, 9); + var t = [0, l]; + continue; + } + var k = [ + 0, + vG(x), + u + ]; + L(x) !== 5 && K(x, 9); + var u = k; + } + }]), Dr(zX, [0, function(x, r) { + for (var e = r;;) { + var t = L(x); + x: if (typeof t == "number") { + var u = t - 5 | 0; + if (7 < u >>> 0) { + if (n2 !== u) break x; + } else if (5 >= u - 1 >>> 0) break x; + var i = t === 12 ? [0, e0(0, function(o) { + var l = c0(o); + K(o, 12); + var k = Qx(1, o); + r: { + if (typeof k == "number") { + if (k === 87) { + B1(o, 0); + var h = p(Y0[13], 0, o); + H1(o), K(o, 87), K(o, 88); + var T = 1, I = [0, h]; + break r; + } + if (k === 88) { + B1(o, 0); + var E = p(Y0[13], 0, o); + H1(o), K(o, 88); + var T = 0, I = [0, E]; + break r; + } + } + var T = 0, I = 0; + } + var N = n1(o); + return L(o) === 9 && w0(o), [ + 0, + I, + N, + T, + r0([0, l], 0, D) + ]; + }, x)] : 0; + return [ + 0, + cx(e), + i, + 0 + ]; + } + var c = [ + 0, + e0(0, function(o) { + var l = L(o); + x: { + if (typeof l != "number" && l[0] === 2) { + var k = l[1], h = k[4], E = k[3], T = k[2], I = k[1]; + h && Ce(o, 79), K(o, [2, [ + 0, + I, + T, + E, + h + ]]); + var P = [1, [ + 0, + I, + [ + 0, + T, + E, + r0(0, [0, L0(o)], D) + ] + ]]; + break x; + } + B1(o, 0); + var N = p(Y0[13], 0, o); + H1(o); + var P = [0, N]; + } + var R = Rr(o, 87); + return [ + 0, + P, + X4(o), + R + ]; + }, x), + e + ]; + L(x) !== 5 && K(x, 9); + var e = c; + } + }]); + function s5(x, r, e) { + return e0([0, r], function(t) { + var u = i5(t); + return K(t, 88), [ + 0, + e, + u, + cG(t), + 0, + 1 + ]; + }, x); + } + function lG(x, r, e, t, u) { + var i = bn(x, t), c = s5(x, r, te(x, 10, w3(x))), v = [ + 0, + c[1], + [12, c[2]] + ], o = [ + 0, + i, + [0, v], + 0, + e !== 0 ? 1 : 0, + 0, + 1, + 0, + r0([0, u], 0, D) + ]; + return [0, [ + 0, + v[1], + o + ]]; + } + function a5(x, r, e, t, u, i, c) { + var v = c[2], o = c[1]; + return 1 - d1(x) && Bx(x, p2), [0, e0([0, r], function(l) { + var k = Rr(l, 87); + return [ + 0, + v, + [0, AX(l, 88) ? n1(l) : [ + 0, + o, + bv0 + ]], + k, + t !== 0 ? 1 : 0, + u !== 0 ? 1 : 0, + 0, + e, + r0([0, i], 0, D) + ]; + }, x)]; + } + function G4(x, r) { + var e = L(r); + if (typeof e == "number" && 10 > e) switch (e) { + case 1: + if (!x) return; + break; + case 3: + if (x) return; + break; + case 8: + case 9: return w0(r); + } + return Ut(r, 9); + } + function Y4(x, r) { + if (r) return B0(x, [ + 0, + r[1][1], + n2 + ]); + } + function z4(x, r) { + if (r) return B0(x, [ + 0, + r[1], + 97 + ]); + } + function sS0(x, r, e, t, u, i, c, v, o) { + for (var l = e, k = t, h = u, E = i, T = c, I = v;;) { + var N = L(x); + if (typeof N == "number") switch (N) { + case 6: + z4(x, T); + var P = Qx(1, x); + if (typeof P == "number" && P === 6) return Y4(x, h), [4, e0([0, o], function(y0) { + var G = qx(I, c0(y0)); + K(y0, 6), K(y0, 6); + var j0 = W1(y0); + K(y0, 7), K(y0, 7); + var Q0 = L(y0); + x: { + r: if (typeof Q0 == "number") { + if (Q0 !== 4 && cr !== Q0) break r; + var q0 = s5(y0, o, te(y0, 10, w3(y0))), fx = 0, yx = [ + 0, + q0[1], + [12, q0[2]] + ], R0 = 1, lx = 0; + break x; + } + var ix = Rr(y0, 87), xx = L0(y0); + K(y0, 88); + var fx = xx, yx = n1(y0), R0 = 0, lx = ix; + } + return [ + 0, + j0, + yx, + lx, + E !== 0 ? 1 : 0, + R0, + r0([0, G], [0, fx], D) + ]; + }, x)]; + var R = qx(I, c0(x)); + K(x, 6); + var q = Qx(1, x); + return typeof q != "number" && q[0] === 4 && !C(q[3], bo) && E === 0 ? [5, e0([0, o], function(y0) { + var G = _3(y0), j0 = G[1]; + w0(y0); + var Q0 = n1(y0); + K(y0, 7); + var q0 = L(y0); + x: { + r: { + var ix = [ + 0, + G, + [0, j0], + 0, + 0, + 0, + 0 + ]; + if (typeof q0 == "number") { + var xx = q0 + t9 | 0; + if (1 < xx >>> 0) { + if (xx !== -18) break r; + w0(y0); + var fx = 2; + } else var fx = xx ? (w0(y0), K(y0, 87), 1) : (w0(y0), K(y0, 87), 0); + var yx = fx; + break x; + } + } + var yx = 3; + } + K(y0, 88); + var R0 = n1(y0); + return [ + 0, + [ + 0, + j0, + ix + ], + R0, + Q0, + h, + yx, + r0([0, R], [0, L0(y0)], D) + ]; + }, x)] : [2, e0([0, o], function(y0) { + if (Qx(1, y0) === 88) { + var G = W1(y0); + K(y0, 88); + var j0 = [0, G]; + } else var j0 = 0; + var Q0 = n1(y0); + K(y0, 7); + var q0 = L0(y0); + K(y0, 88); + return [ + 0, + j0, + Q0, + n1(y0), + E !== 0 ? 1 : 0, + h, + r0([0, R], [0, q0], D) + ]; + }, x)]; + case 44: + if (l) { + if (h !== 0) throw J0([ + 0, + Nr, + hv0 + ], 1); + var X = [0, G0(x)], B = qx(I, c0(x)); + w0(x); + var l = 0, k = 0, E = X, I = B; + continue; + } + break; + case 128: + if (h === 0) { + if (!Us(1, x) && Qx(1, x) !== 6) break; + var l = 0, k = 0, h = e5(dv0, 0, x); + continue; + } + break; + case 105: + case 106: + if (h === 0) { + var l = 0, k = 0, h = e5(0, 0, x); + continue; + } + break; + case 4: + case 100: return z4(x, T), Y4(x, h), [3, e0([0, o], function(y0) { + return [ + 0, + s5(y0, G0(y0), te(y0, 10, w3(y0))), + E !== 0 ? 1 : 0, + r0([0, I], 0, D) + ]; + }, x)]; + } + else if (N[0] === 4 && !C(N[3], rw) && k) { + if (h !== 0) throw J0([ + 0, + Nr, + yv0 + ], 1); + var z = [0, G0(x)], x0 = qx(I, c0(x)); + w0(x); + var l = 0, k = 0, T = z, I = x0; + continue; + } + if (E) { + var W = E[1]; + if (T) return Px(_v0); + if (typeof N == "number" && 1 >= N + Ia >>> 0) return a5(x, o, h, 0, T, 0, [ + 0, + W, + [3, wn(r0([0, I], 0, D), [ + 0, + W, + wv0 + ])] + ]); + } else if (T) { + var Z = T[1]; + if (typeof N == "number" && 1 >= N + Ia >>> 0) return a5(x, o, h, E, 0, 0, [ + 0, + Z, + [3, wn(r0([0, I], 0, D), [ + 0, + Z, + gv0 + ])] + ]); + } + var t0 = function(y0) { + B1(y0, 0); + var G = p(Y0[20], 0, y0); + return H1(y0), G; + }, i0 = c0(x), u0 = t0(x), k0 = u0[1], o0 = u0[2]; + x: if (o0[0] === 3) { + var S0 = o0[1][2][1]; + if (C(S0, Nv) && C(S0, nl)) break x; + var s0 = L(x); + if (typeof s0 == "number") { + var v0 = s0 - 5 | 0; + if (94 < v0 >>> 0) { + if (96 >= v0 + 1 >>> 0) return z4(x, T), Y4(x, h), lG(x, o, E, o0, I); + } else if (1 >= v0 - 82 >>> 0) return a5(x, o, h, E, T, I, [ + 0, + k0, + o0 + ]); + } + bn(x, o0); + var m0 = t0(x), p0 = Sr(S0, Nv), E0 = qx(I, i0); + return z4(x, T), Y4(x, h), [0, e0([0, o], function(y0) { + var G = m0[1], j0 = bn(y0, m0[2]), Q0 = s5(y0, o, 0), q0 = Q0[2][2]; + r: if (p0) { + var ix = q0[2]; + e: { + if (!ix[1]) { + if (!ix[2] && !ix[3]) break e; + B0(y0, [ + 0, + G, + 23 + ]); + break r; + } + B0(y0, [ + 0, + G, + 24 + ]); + } + } else { + var xx = q0[2]; + if (xx[1]) B0(y0, [ + 0, + G, + 69 + ]); + else { + var fx = xx[2]; + e: { + if (!xx[3]) { + if (fx && !fx[2]) break e; + B0(y0, [ + 0, + G, + 68 + ]); + break r; + } + B0(y0, [ + 0, + G, + 68 + ]); + } + } + } + var yx = r0([0, E0], 0, D); + return [ + 0, + j0, + p0 ? [1, Q0] : [2, Q0], + 0, + E !== 0 ? 1 : 0, + 0, + 0, + 0, + yx + ]; + }, x)]; + } + var b0 = u0[2], C0 = L(x); + x: if (typeof C0 == "number") { + if (C0 !== 4 && cr !== C0) break x; + return z4(x, T), Y4(x, h), lG(x, o, E, b0, I); + } + var D0 = E !== 0 ? 1 : 0; + x: if (b0[0] === 3) { + var U0 = b0[1], T0 = U0[2][1]; + r: { + var M0 = U0[1]; + if (r) { + if (!Sr(_a, T0) && (!D0 || !Sr(Sa, T0))) break r; + B0(x, [ + 0, + M0, + [ + 16, + T0, + D0, + 0, + 0 + ] + ]); + break x; + } + } + } + return a5(x, o, h, E, T, I, [ + 0, + k0, + b0 + ]); + } + } + Dr(JX, [0, function(x, r, e, t, u, i) { + for (var c = i;;) { + var v = c[3], o = c[2], l = c[1]; + if (x && e) throw J0([ + 0, + Nr, + kv0 + ], 1); + if (r && !e) throw J0([ + 0, + Nr, + mv0 + ], 1); + var k = G0(u), h = L(u); + if (typeof h == "number") { + if (13 <= h) { + if (wr === h) return [ + 0, + cx(l), + o, + v + ]; + } else if (h) switch (h - 1 | 0) { + case 0: + if (!t) return [ + 0, + cx(l), + o, + v + ]; + break; + case 2: + if (t) return [ + 0, + cx(l), + o, + v + ]; + break; + case 11: + if (!e) { + w0(u); + var E = L(u); + if (typeof E == "number" && 10 > E) switch (E) { + case 1: + case 3: + case 8: + case 9: + B0(u, [ + 0, + k, + 31 + ]), G4(t, u); + continue; + } + var T = GO(u); + UO(u)(T), B0(u, [ + 0, + k, + cr + ]), w0(u), G4(t, u); + continue; + } + var I = c0(u); + w0(u); + var N = L(u); + if (typeof N == "number" && 10 > N) switch (N) { + case 1: + case 3: + case 8: + case 9: + G4(t, u); + var P = L(u); + if (typeof P == "number") { + var R = P - 1 | 0; + if (2 >= R >>> 0) switch (R) { + case 0: + if (r) return [ + 0, + cx(l), + 1, + I + ]; + break; + case 1: break; + default: return B0(u, [ + 0, + k, + 30 + ]), [ + 0, + cx(l), + o, + v + ]; + } + } + B0(u, [ + 0, + k, + 95 + ]); + continue; + } + let z = I; + var q = [1, e0([0, k], function(W) { + var Z = r0([0, z], 0, D); + return [ + 0, + n1(W), + Z + ]; + }, u)]; + G4(t, u); + var c = [ + 0, + [ + 0, + q, + l + ], + o, + v + ]; + continue; + } + } + var X = sS0(u, x, x, x, 0, 0, 0, 0, k); + G4(t, u); + var c = [ + 0, + [ + 0, + X, + l + ], + o, + v + ]; + } + }]), Dr(KX, [0, function(x, r) { + for (var e = r;;) { + var t = [ + 0, + c5(x), + e + ], u = L(x); + if (typeof u == "number" && u === 9) { + K(x, 9); + var e = t; + continue; + } + return cx(t); + } + }]); + function pG(x, r) { + var e = wX(x, r); + if (e) var t = e; + else { + x: { + if (typeof r == "number" && 1 >= r + t9 >>> 0) { + var u = 1; + break x; + } + var u = 0; + } + if (!u) { + x: { + if (typeof r == "number") switch (r) { + case 15: + case 29: + case 31: + case 32: + case 33: + case 43: + case 44: + case 48: + case 55: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: + case 127: + case 128: break; + default: break x; + } + else switch (r[0]) { + case 4: + if (XO(r[3])) return 1; + break x; + case 11: break; + default: break x; + } + return 1; + } + return 0; + } + var t = u; + } + return t; + } + Dr(HX, [0, function(x, r, e) { + for (var t = r, u = e;;) { + if (pG(x, L(x))) { + let T = t; + var i = HO(0, function(P) { + var R = L(P); + x: { + if (typeof R == "number" && R === 29) { + var q = [0, e0(0, function(S0) { + var s0 = c0(S0); + return w0(S0), r0([0, s0], 0, D); + }, P)]; + break x; + } + var q = 0; + } + var X = e5(0, pv0, P), B = e0(0, function(o0) { + var S0 = _3(o0), s0 = L(o0); + x: { + if (typeof s0 == "number") { + if (s0 === 43) { + var v0 = 1, m0 = [1, e0(0, function(b0) { + return w0(b0), n1(b0); + }, o0)]; + break x; + } + if (s0 === 88) { + var v0 = 0, m0 = [1, X4(o0)]; + break x; + } + } + var v0 = 0, m0 = [0, Ha(o0)]; + } + return [ + 0, + S0, + m0, + v0 + ]; + }, P), z = B[2], x0 = z[3], W = z[2], Z = z[1], t0 = B[1], i0 = L(P); + x: { + if (typeof i0 == "number" && i0 === 84) { + w0(P); + var u0 = 1, k0 = [0, n1(P)]; + break x; + } + T && B0(P, [ + 0, + t0, + 54 + ]); + var u0 = T, k0 = 0; + } + return [ + 0, + [ + 0, + Z, + W, + x0, + X, + k0, + q + ], + u0 + ]; + }, x), c = i[2], v = [ + 0, + i[1], + u + ]; + } else var c = t, v = u; + var o = L(x); + if (typeof o == "number") { + var l = o + TF | 0; + if (14 < l >>> 0) { + if (zD === l) { + w0(x); + var t = c, u = v; + continue; + } + } else if (12 < l - 1 >>> 0) return cx(v); + } + x: { + r: { + e: { + if (typeof o != "number") { + if (o[0] !== 4) break r; + var k = o[3]; + if (!Yd(k)) { + t: { + if (C(k, Kv) && C(k, H2)) { + var h = 0; + break t; + } + var h = 1; + } + if (!h) { + if (C(k, j6)) { + if (!C(k, Oo)) break e; + if (C(k, tc)) break r; + break e; + } + if (!x[30][2]) break r; + var E = 1; + break x; + } + } + var E = 1; + break x; + } + switch (o) { + case 4: + case 84: break; + default: break r; + } + } + var E = 1; + break x; + } + var E = 0; + } + if (E) return Ut(x, k1), cx(v); + if (pG(x, o)) { + Ut(x, 9); + var t = c, u = v; + } else { + K(x, 9); + var t = c, u = v; + } + } + }]), Dr(WX, [0, function(x, r) { + for (var e = r;;) { + var t = L(x); + x: if (typeof t == "number") { + if (k1 !== t && wr !== t) break x; + return cx(e); + } + var u = [ + 0, + n1(x), + e + ]; + k1 !== L(x) && K(x, 9); + var e = u; + } + }]), Dr(VX, [0, function(x, r) { + for (var e = r;;) { + var t = e[2], u = e[1]; + if (L(x) === 10 && zd(1, x)) { + let v = t; + var i = e0([0, u], function(l) { + return K(l, 10), [ + 0, + v, + _3(l) + ]; + }, x), c = i[1], e = [ + 0, + c, + [1, [ + 0, + c, + i[2] + ]] + ]; + continue; + } + return [ + 0, + u, + t + ]; + } + }]); + function kG(x, r) { + if (L(x) !== 4) return [ + 0, + 0, + r0([0, r], [0, L0(x)], D) + ]; + var e = qx(r, c0(x)); + K(x, 4), B1(x, 0); + var t = d(Y0[9], x); + return H1(x), K(x, 5), [ + 0, + [0, t], + r0([0, e], [0, L0(x)], D) + ]; + } + function aS0(x) { + var r = L(x); + if (typeof r == "number" && r === 88) { + 1 - d1(x) && Bx(x, p2); + var e = G0(x); + return K(x, 88), Zd(x) ? [2, sG(x, e)] : [1, e0([0, e], n1, x)]; + } + return [0, Ha(x)]; + } + function oS0(x) { + var r = L(x); + return typeof r == "number" && r === 88 ? [1, X4(x)] : [0, Ha(x)]; + } + function vS0(x) { + var r = c0(x); + return K(x, 68), kG(x, r); + } + var lS0 = 0; + function mG(x) { + var r = m3(0, x), e = L(r); + return typeof e == "number" && e === 68 ? [0, e0(lS0, vS0, r)] : 0; + } + function pS0(x) { + var r = L(x); + if (typeof r == "number" && r === 88) { + 1 - d1(x) && Bx(x, p2); + var e = Ha(x), t = G0(x); + K(x, 88); + var u = L(x); + if (typeof u == "number" && u === 68) return [ + 0, + [0, e], + [0, e0([0, t], function(v) { + var o = c0(v); + return K(v, 68), kG(v, o); + }, m3(0, x))] + ]; + if (Zd(x)) return [ + 0, + [2, sG(x, t)], + 0 + ]; + var i = [1, e0([0, t], n1, x)]; + return [ + 0, + L(x) === 68 ? Bl(x, i) : i, + mG(x) + ]; + } + return [ + 0, + [0, Ha(x)], + 0 + ]; + } + function Ne(x, r) { + var e = Ka(1, r); + B1(e, 1); + var t = x(e); + return H1(e), t; + } + function Gs(x) { + return Ne(n1, x); + } + function Ys(x) { + return Ne(_3, x); + } + function Oe(x) { + return Ne(w3, x); + } + function hG(x) { + return Ne(ej, x); + } + function Va(x) { + return Ne(X4, x); + } + function nj(x) { + return Ne(oS0, x); + } + function uj(x) { + return Ne(aS0, x); + } + function ij(x) { + return Ne(pS0, x); + } + function dG(x) { + return Ne(c5, x); + } + function fj(x) { + return Ne(tj, x); + } + function Zo(x, r) { + var e = r[2], t = r[1], u = x[1]; + switch (e[0]) { + case 0: return y2(kS0, x, e[1][1]); + case 1: return y2(mS0, x, e[1][1]); + case 2: + var i = e[1][1], c = i[2][1], v = x[2], o = x[1], l = i[1]; + R2[3].call(null, c, v) && B0(o, [ + 0, + l, + 80 + ]); + var k = i[2][1], h = i[1]; + return h3(k) && pt(o, [ + 0, + h, + 81 + ]), Ml(k) && pt(o, [ + 0, + h, + 83 + ]), [ + 0, + o, + R2[4].call(null, c, v) + ]; + default: return B0(u, [ + 0, + t, + 20 + ]), x; + } + } + function kS0(x) { + return function(r) { + return r[0] === 0 ? Zo(x, r[1][2][2]) : Zo(x, r[1][2][1]); + }; + } + function mS0(x) { + return function(r) { + switch (r[0]) { + case 0: return Zo(x, r[1][2][1]); + case 1: return Zo(x, r[1][2][1]); + default: return x; + } + }; + } + function yG(x, r) { + var e = r[2], t = e[3], u = y2(function(i, c) { + return Zo(i, c[2][1]); + }, [ + 0, + x, + R2[1] + ], e[2]); + t && Zo(u, t[1][2][1]); + } + function _G(x, r, e, t) { + var u = x[5], i = t[0] === 0 ? y3(t[1]) : 0, c = Ka(u ? 0 : r, x), v = r || u || 1 - i; + if (!v) return v; + if (e) { + var o = e[1], l = o[2][1], k = o[1]; + h3(l) && pt(c, [ + 0, + k, + 73 + ]), Ml(l) && pt(c, [ + 0, + k, + 83 + ]); + } + if (t[0] === 0) return yG(c, t[1]); + var h = t[1][2], E = h[2], T = [ + 0, + dl, + [0, [ + 0, + yn(function(N) { + var P = N[2], R = P[1], q = P[4], X = P[3], B = P[2]; + return [0, [ + 0, + dl, + [ + 0, + R[0] === 0 ? [3, R[1]] : [0, [ + 0, + dl, + R[1][2] + ]], + B, + X, + q + ] + ]]; + }, h[1]), + [0, dl], + 0 + ]] + ], I = Zo([ + 0, + c, + R2[1] + ], T); + E && Zo(I, E[1][2][1]); + } + function Gl(x, r, e, t) { + return _G(x, r, e, [0, t]); + } + function wG(x, r) { + if (r !== 12) return 0; + var e = c0(x), t = e0(0, function(c) { + return K(c, 12), p(Y0[18], c, 81); + }, x), u = t[2]; + return [0, [ + 0, + t[1], + u, + r0([0, e], 0, D) + ]]; + } + function hS0(x) { + L(x) === 23 && Bx(x, 92); + return [ + 0, + p(Y0[18], x, 81), + L(x) === 84 ? (K(x, 84), [0, d(Y0[10], x)]) : 0 + ]; + } + var dS0 = 0; + function Yl(x, r) { + function e(u) { + var i = pX(1, FO(r, MO(x, u))), c = c0(i); + K(i, 4); + x: { + if (d1(i) && L(i) === 23) { + var v = c0(i), o = e0(0, function(z) { + return K(z, 23), L(z) === 88 ? [0, Va(z)] : (Bx(z, 88), 0); + }, i), l = o[2], k = o[1]; + if (!l) { + var E = 0; + break x; + } + var h = l[1]; + L(i) === 9 && w0(i); + var E = [0, [ + 0, + k, + [ + 0, + h, + r0([0, v], 0, D) + ] + ]]; + break x; + } + var E = 0; + } + x: r: { + for (var T = 0;;) { + var I = L(i); + if (typeof I == "number") { + var N = I - 5 | 0; + if (7 < N >>> 0) { + if (n2 === N) break; + } else if (5 < N - 1 >>> 0) break r; + } + var P = e0(dS0, hS0, i); + L(i) !== 5 && K(i, 9); + var T = [ + 0, + P, + T + ]; + } + break x; + } + var R = Wh(function(B) { + return [ + 0, + B[1], + [ + 0, + B[2], + B[3] + ] + ]; + }, wG(i, I)); + L(i) !== 5 && Bx(i, 63); + var q = cx(T), X = c0(i); + return K(i, 5), [ + 0, + E, + q, + R, + I1([0, c], [0, L0(i)], X, D) + ]; + } + var t = 0; + return function(u) { + return e0(t, e, u); + }; + } + function gG(x, r, e, t, u) { + var i = _X(x, r, e, u); + return p(Y0[16], t, i); + } + function J4(x, r, e, t, u) { + var i = gG(x, r, e, t, u); + return [ + 0, + [0, i[1]], + i[2] + ]; + } + function xv(x) { + if (d2 !== L(x)) return el0; + var r = c0(x); + return w0(x), [ + 0, + 1, + r + ]; + } + function o5(x) { + if (L(x) === 66 && !Vo(1, x)) { + var r = c0(x); + return w0(x), [ + 0, + 1, + r + ]; + } + return rl0; + } + function yS0(x) { + var r = o5(x), e = r[1], t = r[2], u = e0(0, function(R) { + var q = c0(R), X = L(R); + x: { + if (typeof X == "number") { + if (X === 15) { + w0(R); + var B = xv(R), x0 = B[2], W = B[1], Z = 1; + break x; + } + } else if (X[0] === 4 && !C(X[3], Lv) && !e) { + w0(R); + var x0 = 0, W = 0, Z = 0; + break x; + } + Ut(R, X); + var z = xv(R), x0 = z[2], W = z[1], Z = 1; + } + var t0 = _l([ + 0, + t, + [ + 0, + q, + [ + 0, + x0, + 0 + ] + ] + ]), i0 = R[7], u0 = L(R); + x: { + if (i0 && typeof u0 == "number") { + if (u0 === 4) { + var s0 = 0, v0 = 0; + break x; + } + if (cr === u0) { + var k0 = te(R, 2, Oe(R)), s0 = L(R) === 4 ? 0 : [0, Gt(R, p(Y0[13], $30, R))], v0 = k0; + break x; + } + } + var s0 = [0, Bt(R) ? Gt(R, p(Y0[13], Q30, R)) : (SX(R, Z30), [ + 0, + G0(R), + xl0 + ])], v0 = te(R, 2, Oe(R)); + } + var m0 = Yl(e, W)(R), p0 = L(R) === 88 ? m0 : q4(R, m0), E0 = ij(R), b0 = E0[2], C0 = E0[1]; + if (b0) var D0 = CX(R, b0), U0 = C0; + else var D0 = b0, U0 = Bl(R, C0); + return [ + 0, + W, + Z, + v0, + s0, + p0, + U0, + D0, + t0 + ]; + }, x), i = u[2], c = i[5], v = i[4], o = i[1], l = i[8], k = i[7], h = i[6], E = i[3], T = i[2], I = u[1], N = J4(x, e, o, 0, y3(c)), P = N[1]; + return Gl(x, N[2], v, c), [27, [ + 0, + v, + c, + P, + e, + o, + T, + k, + h, + E, + r0([0, l], 0, D), + I + ]]; + } + var _S0 = 0; + function K4(x) { + return e0(_S0, yS0, x); + } + function cj(x, r) { + var e = c0(r); + K(r, x); + var t = r[30][2]; + if (t) var u = x === 29 ? 1 : 0, i = u && (L(r) === 50 ? 1 : 0); + else var i = t; + i && Bx(r, 19); + for (var c = 0, v = 0;;) { + var o = e0(0, function(P) { + var R = p(Y0[18], P, 84); + if (Rr(P, 84)) var q = 0, X = [0, d(Y0[10], P)]; + else { + var B = R[1]; + if (R[2][0] === 2) var q = 0, X = 0; + else var q = [0, [ + 0, + B, + 60 + ]], X = 0; + } + return [ + 0, + [ + 0, + R, + X + ], + q + ]; + }, r), l = o[2], k = l[2], h = [ + 0, + [ + 0, + o[1], + l[1] + ], + c + ], E = k ? [ + 0, + k[1], + v + ] : v; + if (!Rr(r, 9)) { + var T = cx(E); + return [ + 0, + cx(h), + e, + T + ]; + } + var c = h, v = E; + } + } + var wS0 = MX(Y0), gS0 = 26; + function bG(x) { + return cj(gS0, x); + } + function TG(x) { + var r = cj(29, LO(1, x)), e = r[1]; + return [ + 0, + e, + r[2], + cx(y2(function(u, i) { + return i[2][2] ? u : [ + 0, + [ + 0, + i[1], + 59 + ], + u + ]; + }, r[3], e)) + ]; + } + function EG(x) { + return cj(30, LO(1, x)); + } + function SG(x) { + function r(t) { + return [20, wS0[1].call(null, x, t)]; + } + var e = 0; + return function(t) { + return e0(e, r, t); + }; + } + function bS0(x) { + var r = c0(x), e = L(x), t = Qx(1, x); + x: { + r: if (typeof e != "number" && e[0] === 2) { + var u = e[1], i = u[4], c = u[3], v = u[2], o = u[1]; + e: { + if (typeof t == "number") switch (t) { + case 87: + case 88: break; + default: break e; + } + else { + if (t[0] !== 4) break e; + if (C(t[3], It)) break r; + } + i && Ce(x, 79), K(x, [2, [ + 0, + o, + v, + c, + i + ]]); + var l = [1, [ + 0, + o, + [ + 0, + v, + c, + r0([0, r], [0, L0(x)], D) + ] + ]]; + if (typeof t == "number" && 1 >= t + Ia >>> 0) { + var k = t === 87 ? 1 : 0; + Bx(x, [ + 18, + k, + v + ]), k && w0(x); + var h = G0(x), P = 0, R = [ + 0, + h, + [2, [ + 0, + [ + 0, + h, + H30 + ], + nj(x), + k + ]] + ], q = l; + break x; + } + w0(x); + var P = 0, R = p(Y0[18], x, 81), q = l; + break x; + } + } + if (typeof t != "number" && t[0] === 4 && !C(t[3], It)) { + var E = [0, W1(x)]; + Xs(x, W30); + var P = 0, R = p(Y0[18], x, 81), q = E; + break x; + } + if (typeof e == "number" && !e) { + Bx(x, 32); + var T = [0, [ + 0, + G0(x), + V30 + ]], P = 0, R = p(Y0[18], x, 81), q = T; + break x; + } + var I = Z0(Y0[14], x, 0, 81), N = I[2], P = 1, R = [ + 0, + I[1], + [2, N] + ], q = [0, N[1]]; + } + return [ + 0, + q, + R, + L(x) === 84 ? (K(x, 84), [0, d(Y0[10], x)]) : 0, + P + ]; + } + var TS0 = 0; + function ES0(x) { + var r = pX(1, x), e = c0(r); + K(r, 4); + x: r: { + for (var t = 0;;) { + var u = L(r); + if (typeof u == "number") { + var i = u - 5 | 0; + if (7 < i >>> 0) { + if (n2 === i) break; + } else if (5 < i - 1 >>> 0) break r; + } + var c = e0(TS0, bS0, r); + L(r) !== 5 && K(r, 9); + var t = [ + 0, + c, + t + ]; + } + break x; + } + var v = Wh(function(k) { + var h = k[3], E = k[2], T = k[1]; + return L(r) === 9 && w0(r), [ + 0, + T, + [ + 0, + E, + h + ] + ]; + }, wG(r, u)); + L(r) !== 5 && Bx(r, 63); + var o = cx(t), l = c0(r); + return K(r, 5), [ + 0, + o, + v, + I1([0, e], [0, L0(r)], l, D) + ]; + } + var SS0 = 0; + function AS0(x) { + var r = e0(0, function(h) { + var E = c0(h); + Xs(h, J30); + var T = Gt(h, p(Y0[13], K30, h)), I = te(h, 4, Oe(h)), N = e0(SS0, ES0, h); + return [ + 0, + I, + T, + zO(h) ? N : p(P1(h)[2], N, function(R, q) { + return p(zx(R, 842685896, 11), R, q); + }), + JO(h, fj(h)), + E + ]; + }, x), e = r[2], t = e[3], u = e[2], i = e[5], c = e[4], v = e[1], o = r[1], l = gG(x, 0, 0, 0, 0), k = l[1]; + return _G(x, l[2], [0, u], [1, t]), [3, [ + 0, + u, + v, + t, + c, + k, + r0([0, i], 0, D), + o + ]]; + } + var IS0 = 0; + function sj(x) { + return e0(IS0, AS0, x); + } + function a2(x, r) { + if (r[0] === 0) return r[1]; + var e = r[1]; + return P2(function(t) { + return B0(x, t); + }, r[2][1]), e; + } + function aj(x, r, e) { + var t = x ? x[1] : 35; + if (e[0] === 0) var u = e[1]; + else { + var i = e[1]; + P2(function(l) { + return B0(r, l); + }, e[2][2]); + var u = i; + } + 1 - d(Y0[23], u) && B0(r, [ + 0, + u[1], + t + ]); + var c = u[2]; + x: if (c[0] === 10) { + var v = u[1]; + if (h3(c[1][2][1])) { + pt(r, [ + 0, + v, + 74 + ]); + break x; + } + } + return p(Y0[19], r, u); + } + function oj(x, r) { + var e = yl(x[2], r[2]); + return [ + 0, + yl(x[1], r[1]), + e + ]; + } + function AG(x) { + var r = cx(x[2]); + return [ + 0, + cx(x[1]), + r + ]; + } + function v5(x) { + var r = G0(x); + Rr(x, 91); + var e = IG(x), t = L(x); + x: { + if (typeof t == "number" && t === 91) { + var u = e0([0, r], function(l) { + for (var k = [ + 0, + e, + 0 + ];;) { + var h = L(l); + if (typeof h == "number" && h === 91) { + w0(l); + var k = [ + 0, + IG(l), + k + ]; + continue; + } + return [ + 0, + cx(k), + r0(0, [0, L0(l)], D) + ]; + } + }, x), i = [ + 0, + u[1], + [13, u[2]] + ]; + break x; + } + var i = e; + } + var c = L(x); + if (typeof c != "number" && c[0] === 4 && !C(c[3], It)) { + var v = e0([0, r], function(o) { + w0(o); + var l = L(o); + x: { + r: if (typeof l == "number") { + var k = l + z3 | 0; + if (4 >= k >>> 0) { + switch (k) { + case 0: + var h = Yt(o, 0), I = [ + 1, + h[1], + h[2] + ]; + break; + case 3: + var E = Yt(o, 2), I = [ + 1, + E[1], + E[2] + ]; + break; + case 4: + var T = Yt(o, 1), I = [ + 1, + T[1], + T[2] + ]; + break; + default: break r; + } + var N = I; + break x; + } + } + var N = [0, p(Y0[13], 0, o)]; + } + return [ + 0, + i, + N, + r0(0, [0, L0(o)], D) + ]; + }, x); + return [ + 0, + v[1], + [14, v[2]] + ]; + } + return i; + } + function IG(x) { + var r = L(x); + if (typeof r == "number") switch (r) { + case 0: return e0(0, function(Cx) { + return [10, CG(Cx)]; + }, x); + case 4: + var e = c0(x); + K(x, 4); + var t = v5(x); + K(x, 5); + var u = L0(x), i = t[2], c = function(Cx) { + return O2(Cx, r0([0, e], [0, u], D)); + }, v = function(Cx) { + return pd(Cx, r0([0, e], [0, u], D)); + }, o = t[1]; + switch (i[0]) { + case 0: + var l = i[1], k = l[2], M0 = [0, [ + 0, + c(l[1]), + k + ]]; + break; + case 1: + var h = i[1], E = c(h[3]), M0 = [1, [ + 0, + h[1], + h[2], + E + ]]; + break; + case 2: + var T = i[1], I = c(T[3]), M0 = [2, [ + 0, + T[1], + T[2], + I + ]]; + break; + case 3: + var N = i[1], P = c(N[3]), M0 = [3, [ + 0, + N[1], + N[2], + P + ]]; + break; + case 4: + var R = i[1], q = c(R[2]), M0 = [4, [ + 0, + R[1], + q + ]]; + break; + case 5: + var M0 = [5, c(i[1])]; + break; + case 6: + var X = i[1], B = c(X[3]), M0 = [6, [ + 0, + X[1], + X[2], + B + ]]; + break; + case 7: + var z = i[1], x0 = c(z[3]), M0 = [7, [ + 0, + z[1], + z[2], + x0 + ]]; + break; + case 8: + var W = i[1], Z = W[2], t0 = W[1], i0 = c(Z[2]), M0 = [8, [ + 0, + t0, + [ + 0, + Z[1], + i0 + ] + ]]; + break; + case 9: + var u0 = i[1], k0 = u0[2], o0 = u0[1], S0 = c(k0[3]), M0 = [9, [ + 0, + o0, + [ + 0, + k0[1], + k0[2], + S0 + ] + ]]; + break; + case 10: + var s0 = i[1], v0 = v(s0[3]), M0 = [10, [ + 0, + s0[1], + s0[2], + v0 + ]]; + break; + case 11: + var m0 = i[1], p0 = v(m0[3]), M0 = [11, [ + 0, + m0[1], + m0[2], + p0 + ]]; + break; + case 12: + var E0 = i[1], b0 = c(E0[3]), M0 = [12, [ + 0, + E0[1], + E0[2], + b0 + ]]; + break; + case 13: + var C0 = i[1], D0 = c(C0[2]), M0 = [13, [ + 0, + C0[1], + D0 + ]]; + break; + default: var U0 = i[1], T0 = c(U0[3]), M0 = [14, [ + 0, + U0[1], + U0[2], + T0 + ]]; + } + return [ + 0, + o, + M0 + ]; + case 6: return e0(0, function(Cx) { + var bx = c0(Cx), Ox = G0(Cx); + K(Cx, 6); + x: { + for (var ux = 0;;) { + var br = L(Cx); + if (typeof br == "number") { + var nr = br - 8 | 0; + if (Ct < nr >>> 0) { + if (d2 >= nr + 1 >>> 0) { + var Qr = [ + 0, + cx(ux), + 0 + ]; + break x; + } + } else if (nr === 4) break; + } + var $r = v5(Cx), l1 = Br(Ox, G0(Cx)); + L(Cx) !== 7 && K(Cx, 9); + var ux = [ + 0, + [ + 0, + l1, + $r + ], + ux + ]; + } + var C1 = NG(Cx); + L(Cx) === 9 && B0(Cx, [ + 0, + G0(Cx), + x40 + ]); + var Qr = [ + 0, + cx(ux), + [0, C1] + ]; + } + var O1 = Qr[2], Hr = Qr[1], w = c0(Cx); + return K(Cx, 7), [11, [ + 0, + Hr, + O1, + I1([0, bx], [0, L0(Cx)], w, D) + ]]; + }, x); + case 26: + var y0 = Yt(x, 0); + return [ + 0, + y0[1], + [7, y0[2]] + ]; + case 29: + var G = Yt(x, 2); + return [ + 0, + G[1], + [7, G[2]] + ]; + case 30: + var j0 = Yt(x, 1); + return [ + 0, + j0[1], + [7, j0[2]] + ]; + case 31: + var Q0 = c0(x), q0 = G0(x); + return w0(x), [ + 0, + q0, + [5, r0([0, Q0], [0, L0(x)], D)] + ]; + case 38: + var ix = c0(x), xx = G0(x); + return w0(x), [ + 0, + xx, + [0, [ + 0, + r0([0, ix], [0, L0(x)], D), + 1 + ]] + ]; + case 105: return e0(0, function(Cx) { + return [6, PG(Cx, 0)]; + }, x); + case 106: return e0(0, function(Cx) { + return [6, PG(Cx, 1)]; + }, x); + case 32: + case 33: + var fx = c0(x), yx = G0(x); + return w0(x), [ + 0, + yx, + [4, [ + 0, + r === 33 ? 1 : 0, + r0([0, fx], [0, L0(x)], D) + ]] + ]; + } + else switch (r[0]) { + case 0: + var R0 = r[2], lx = r[1], kx = c0(x); + return [ + 0, + G0(x), + [1, [ + 0, + Z0(Y0[24], x, lx, R0), + R0, + r0([0, kx], [0, L0(x)], D) + ]] + ]; + case 1: + var M = r[2], d0 = r[1], g0 = c0(x); + return [ + 0, + G0(x), + [2, [ + 0, + Z0(Y0[26], x, d0, M), + M, + r0([0, g0], [0, L0(x)], D) + ]] + ]; + case 2: + var $0 = r[1], Kx = $0[4], J = $0[3], tr = $0[2], Zx = $0[1], b = c0(x); + return Kx && Ce(x, 79), w0(x), [ + 0, + Zx, + [3, [ + 0, + tr, + J, + r0([0, b], [0, L0(x)], D) + ]] + ]; + case 4: + if (!C(r[3], Pv)) { + var V = c0(x), tx = G0(x); + return w0(x), [ + 0, + tx, + [0, [ + 0, + r0([0, V], [0, L0(x)], D), + 0 + ]] + ]; + } + break; + } + if (!Bt(x)) { + var _x = c0(x), gx = G0(x); + v1(0, x); + x: if (typeof r != "number" && r[0] === 7) { + w0(x); + break x; + } + return [ + 0, + gx, + [0, [ + 0, + r0([0, _x], W60, D), + 0 + ]] + ]; + } + for (var ex = G0(x), Jx = [0, p(Y0[13], 0, x)];;) { + var Ux = L(x); + if (typeof Ux != "number") break; + if (Ux === 6) { + let Cx = Jx; + var Jx = [1, e0([0, ex], function(Ox) { + K(Ox, 6); + var ux = c0(Ox), br = L(Ox); + x: { + if (typeof br != "number") switch (br[0]) { + case 0: + var nr = br[2], $r = br[1], Cr = [1, [ + 0, + G0(Ox), + [ + 0, + Z0(Y0[24], Ox, $r, nr), + nr, + r0([0, ux], [0, L0(Ox)], D) + ] + ]]; + break x; + case 1: + var Qr = br[2], O1 = br[1], Cr = [2, [ + 0, + G0(Ox), + [ + 0, + Z0(Y0[26], Ox, O1, Qr), + Qr, + r0([0, ux], [0, L0(Ox)], D) + ] + ]]; + break x; + case 2: + var Y = br[1], px = Y[4], X0 = Y[3], vx = Y[2], Ix = Y[1]; + px && Ce(Ox, 79), K(Ox, [2, [ + 0, + Ix, + vx, + X0, + px + ]]); + var Cr = [0, [ + 0, + Ix, + [ + 0, + vx, + X0, + r0([0, ux], [0, L0(Ox)], D) + ] + ]]; + break x; + } + v1(K60, Ox); + var Cr = [0, [ + 0, + G0(Ox), + H60 + ]]; + } + return K(Ox, 7), [ + 0, + Cx, + Cr, + r0(0, [0, L0(Ox)], D) + ]; + }, x)]; + } else { + if (Ux !== 10) break; + let Cx = Jx; + var Jx = [1, e0([0, ex], function(Ox) { + w0(Ox); + return [ + 0, + Cx, + [3, W1(Ox)], + r0(0, [0, L0(Ox)], D) + ]; + }, x)]; + } + } + var hr = L(x); + if (typeof hr == "number" && !hr) return e0([0, ex], function(Cx) { + var bx = e0(0, function(ux) { + return CG(ux); + }, Cx); + return [12, [ + 0, + Jx[0] === 0 ? [0, Jx[1]] : [1, Jx[1]], + bx, + r0(0, [0, L0(Cx)], D) + ]]; + }, x); + if (Jx[0] === 0) { + var dr = Jx[1]; + return [ + 0, + dr[1], + [8, dr] + ]; + } + var V0 = Jx[1], K0 = V0[1]; + return [ + 0, + K0, + [9, [ + 0, + K0, + V0[2] + ]] + ]; + } + function PG(x, r) { + var e = c0(x); + w0(x); + var t = L(x); + x: { + if (typeof t != "number") switch (t[0]) { + case 0: + var u = t[2], i = t[1], c = c0(x), N = [ + 0, + G0(x), + [0, [ + 0, + Z0(Y0[24], x, i, u), + u, + r0([0, c], [0, L0(x)], D) + ]] + ]; + break x; + case 1: + var l = t[2], k = t[1], h = c0(x), N = [ + 0, + G0(x), + [1, [ + 0, + Z0(Y0[26], x, k, l), + l, + r0([0, h], [0, L0(x)], D) + ]] + ]; + break x; + } + var I = G0(x); + v1(V60, x); + var N = [ + 0, + I, + $60 + ]; + } + return [ + 0, + r, + N, + r0([0, e], [0, L0(x)], D) + ]; + } + function Yt(x, r) { + return e0(0, function(e) { + var t = c0(e); + w0(e); + return [ + 0, + r, + p(Y0[13], Q60, e), + r0([0, t], [0, L0(e)], D) + ]; + }, x); + } + function CG(x) { + function r(I) { + var N = c0(I), P = L(I); + if (typeof P != "number") switch (P[0]) { + case 0: + var R = P[2], q = P[1]; + return [1, [ + 0, + G0(I), + [ + 0, + Z0(Y0[24], I, q, R), + R, + r0([0, N], [0, L0(I)], D) + ] + ]]; + case 1: + var z = P[2], x0 = P[1]; + return [2, [ + 0, + G0(I), + [ + 0, + Z0(Y0[26], I, x0, z), + z, + r0([0, N], [0, L0(I)], D) + ] + ]]; + case 2: + var t0 = P[1], i0 = t0[4], u0 = t0[3], k0 = t0[2], o0 = t0[1]; + return i0 && Ce(I, 79), K(I, [2, [ + 0, + o0, + k0, + u0, + i0 + ]]), [0, [ + 0, + o0, + [ + 0, + k0, + u0, + r0([0, N], [0, L0(I)], D) + ] + ]]; + } + return [3, W1(I)]; + } + var e = c0(x); + K(x, 0); + x: { + for (var t = 0, u = function(I) { + var N = c0(I); + function P(W) { + var Z = W[2], t0 = W[1]; + return [0, [ + 0, + [3, [ + 0, + t0, + Z[2][2] + ]], + [ + 0, + t0, + [7, Z] + ], + 1, + r0([0, N], [0, L0(I)], D) + ]]; + } + var R = L(I); + if (typeof R == "number") { + var q = R + z3 | 0; + if (4 >= q >>> 0) switch (q) { + case 0: return P(Yt(I, 0)); + case 3: return P(Yt(I, 2)); + case 4: return P(Yt(I, 1)); + } + } + if (Bt(I)) { + var X = Qx(1, I); + r: { + e: if (typeof X == "number") { + if (X !== 1 && X !== 9) break e; + var B = 1; + break r; + } + var B = 0; + } + if (B) return [1, W1(I)]; + } + var z = r(I); + K(I, 88); + return [0, [ + 0, + z, + v5(I), + 0, + r0([0, N], [0, L0(I)], D) + ]]; + }, i = 0;;) { + var c = L(x); + if (typeof c == "number") { + var v = c - 2 | 0; + if (h2 < v >>> 0) { + if (k2 >= v + 1 >>> 0) { + var k = [ + 0, + cx(t), + 0 + ]; + break x; + } + } else if (v === 10) break; + } + var o = e0(i, u, x); + 1 - (L(x) === 1 ? 1 : 0) && K(x, 9); + var t = [ + 0, + o, + t + ]; + } + var l = NG(x); + L(x) === 9 && B0(x, [ + 0, + G0(x), + Z60 + ]); + var k = [ + 0, + cx(t), + [0, l] + ]; + } + var h = k[2], E = k[1], T = c0(x); + return K(x, 1), [ + 0, + E, + h, + I1([0, e], [0, L0(x)], T, D) + ]; + } + function NG(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 12); + var t = L(r); + x: { + r: if (typeof t == "number") { + var u = t + z3 | 0; + if (4 >= u >>> 0) { + switch (u) { + case 0: + var i = [0, Yt(r, 0)]; + break; + case 3: + var i = [0, Yt(r, 2)]; + break; + case 4: + var i = [0, Yt(r, 1)]; + break; + default: break r; + } + var c = i; + break x; + } + } + var c = 0; + } + return [ + 0, + c, + r0([0, e], [0, L0(r)], D) + ]; + }, x); + } + function OG(x, r) { + var e = x[0] === 0 ? x[1] : x[1] - 1 | 0; + return (r[0], r[1]) <= e ? 1 : 0; + } + var H4 = [], l5 = [], jG = [], DG = [], RG = [], g3 = [], FG = [], MG = [], vj = [], LG = []; + function W4(x) { + var r = Bt(x); + if (r) { + var e = L(x); + x: { + if (typeof e == "number") { + if (e === 60) { + if (x[20]) { + var t = 0; + break x; + } + } else if (e === 67 && x[21]) { + var t = 0; + break x; + } + } + var t = 1; + } + var u = t; + } else var u = r; + var i = L(x); + x: { + r: if (typeof i == "number") { + if (24 <= i) { + if (i === 60) { + if (x[20]) return [0, e0(0, function(k) { + k[10] && Bx(k, wr), k[12] && Bx(k, 51); + var h = c0(k), E = G0(k); + K(k, 60); + var T = G0(k); + if (ql(k)) var I = 0, N = 0; + else { + var P = Rr(k, d2), R = L(k); + e: { + t: if (typeof R == "number") { + if (R !== 88) { + if (10 <= R) break t; + switch (R) { + case 0: + case 2: + case 3: + case 4: + case 6: break t; + } + } + var q = 0; + break e; + } + var q = 1; + } + e: { + if (!P && !q) { + var X = 0; + break e; + } + var X = [0, xt(k)]; + } + var I = P, N = X; + } + var B = N ? 0 : L0(k), z = Br(E, T); + return [38, [ + 0, + N, + r0([0, h], [0, B], D), + I, + z + ]]; + }, x)]; + break r; + } + if (cr !== i) break r; + } else if (i !== 4 && 23 > i) break r; + break x; + } + if (!u) return d(H4[1], x); + } + x: { + if (i === 66 && d1(x) && cr === Qx(1, x)) { + var c = H4[2], v = xY; + break x; + } + var c = xY, v = H4[2]; + } + var o = Wd(x, v); + if (o) return o[1]; + var l = Wd(x, c); + return l ? l[1] : d(H4[1], x); + } + function xt(x) { + return a2(x, W4(x)); + } + function qG(x) { + for (var r = x;;) { + var e = r[2]; + x: { + switch (e[0]) { + case 24: + var t = e[1], u = t[1][2][1]; + if (C(u, W2)) { + if (!C(u, Yv) && !C(t[2][2][1], Ih)) return 0; + } else if (!C(t[2][2][1], w6)) return 0; + break; + case 36: + var i = e[1]; + if (8 > i[1]) break x; + var r = i[2]; + continue; + case 10: + case 23: break; + default: break x; + } + return 1; + } + return 0; + } + } + function BG(x) { + var r = G0(x), e = e0(0, p5, x), t = e[2], u = e[1], i = L(x); + x: { + if (typeof i == "number" && i === 86) { + var v = c4(l5[3], 1, x, t, u); + break x; + } + var c = Z0(l5[1], x, t, u), v = Z0(l5[2], x, c[2], c[1]); + } + var o = v[2]; + if (L(x) !== 87) return o; + w0(x); + var l = xt(R4(0, x)); + K(x, 88); + var k = e0([0, r], xt, x), h = k[2]; + return [0, [ + 0, + k[1], + [8, [ + 0, + a2(x, o), + l, + h, + 0 + ]] + ]]; + } + function p5(x) { + return p(jG[1], x, 0); + } + function UG(x) { + var r = L(x); + if (typeof r == "number") { + if (50 <= r) { + if (p2 <= r) { + if (ef > r) switch (r + t9 | 0) { + case 0: return yl0; + case 1: return _l0; + case 6: return wl0; + case 7: return gl0; + } + } else if (r === 67 && x[21]) return x[10] && Bx(x, 6), x[12] && Bx(x, 50), bl0; + } else if (47 <= r) switch (r - 47 | 0) { + case 0: return Tl0; + case 1: return El0; + default: return Sl0; + } + } + return 0; + } + function XG(x) { + var r = G0(x), e = c0(x), t = UG(x); + if (t) { + var u = t[1]; + w0(x); + var i = e0([0, r], GG, x), c = i[2], v = i[1]; + x: r: if (u === 6) { + var o = c[2]; + switch (o[0]) { + case 10: + pt(x, [ + 0, + v, + 71 + ]); + break; + case 23: + o[1][2][0] === 1 && B0(x, [ + 0, + v, + 64 + ]); + break; + default: break r; + } + break x; + } + return [0, [ + 0, + v, + [36, [ + 0, + u, + c, + r0([0, e], 0, D) + ]] + ]]; + } + var l = L(x); + x: { + if (typeof l == "number") { + if (ef === l) { + var k = Il0; + break x; + } + if (k2 === l) { + var k = Al0; + break x; + } + } + var k = 0; + } + if (k) { + var h = k[1]; + w0(x); + var E = e0([0, r], GG, x), T = E[2], I = E[1]; + 1 - qG(T) && B0(x, [ + 0, + T[1], + 35 + ]); + var N = T[2]; + x: if (N[0] === 10 && h3(N[1][2][1])) { + Ce(x, 76); + break x; + } + return [0, [ + 0, + I, + [37, [ + 0, + h, + T, + 1, + r0([0, e], 0, D) + ]] + ]]; + } + var P = YG(x); + if (s2(x)) return P; + var R = L(x); + x: { + if (typeof R == "number") { + if (ef === R) { + var q = Cl0; + break x; + } + if (k2 === R) { + var q = Pl0; + break x; + } + } + var q = 0; + } + if (!q) return P; + var X = q[1], B = a2(x, P); + 1 - qG(B) && B0(x, [ + 0, + B[1], + 35 + ]); + var z = B[2]; + x: if (z[0] === 10 && h3(z[1][2][1])) { + Ce(x, 75); + break x; + } + var x0 = G0(x); + w0(x); + var W = L0(x); + return [0, [ + 0, + Br(B[1], x0), + [37, [ + 0, + X, + B, + 0, + r0(0, [0, W], D) + ]] + ]]; + } + function GG(x) { + return a2(x, XG(x)); + } + function YG(x) { + var r = G0(x), e = 1 - x[19], u = x[19] === 0 ? x : [ + 0, + x[1], + x[2], + x[3], + x[4], + x[5], + x[6], + x[7], + x[8], + x[9], + x[10], + x[11], + x[12], + x[13], + x[14], + x[15], + x[16], + x[17], + x[18], + 0, + x[20], + x[21], + x[22], + x[23], + x[24], + x[25], + x[26], + x[27], + x[28], + x[29], + x[30], + x[31], + x[32], + x[33] + ], i = L(u); + x: { + r: if (typeof i == "number") { + var c = i + Po | 0; + if (7 >= c >>> 0) { + switch (c) { + case 0: + if (!e) break r; + var v = [0, KG(u)]; + break; + case 6: + var v = [0, e0(0, function(k) { + var h = c0(k), E = G0(k); + if (K(k, 52), Rr(k, 10)) { + var T = wn(0, [ + 0, + E, + Dl0 + ]), I = G0(k); + Xs(k, Rl0); + return [24, [ + 0, + T, + wn(0, [ + 0, + I, + Fl0 + ]), + r0([0, h], [0, L0(k)], D) + ]]; + } + var P = c0(k); + K(k, 4); + var R = ZG([0, P], 0, xt(R4(0, k))); + return K(k, 5), [11, [ + 0, + R, + r0([0, h], [0, L0(k)], D) + ]]; + }, u)]; + break; + case 7: + var v = [0, zG(u)]; + break; + default: break r; + } + var o = v; + break x; + } + } + var o = $o(u) ? [0, WG(u)] : VG(u); + } + return b3(0, 0, u, r, o); + } + function lj(x) { + return a2(x, YG(x)); + } + function zG(x) { + switch (x[24]) { + case 0: + var r = 0, e = 0; + break; + case 1: + var r = 0, e = 1; + break; + default: var r = 1, e = 1; + } + var t = G0(x), u = c0(x); + K(x, 53); + var i = [ + 0, + t, + [30, [0, r0([0, u], [0, L0(x)], D)]] + ], c = L(x); + if (typeof c == "number" && 11 > c) switch (c) { + case 4: return JG(0, x, t, r ? i : (B0(x, [ + 0, + t, + Ss + ]), [ + 0, + t, + [10, wn(0, [ + 0, + t, + Nl0 + ])] + ])); + case 6: + case 10: return JG(0, x, t, e ? i : (B0(x, [ + 0, + t, + Ee + ]), [ + 0, + t, + [10, wn(0, [ + 0, + t, + jl0 + ])] + ])); + } + return e ? v1(Ol0, x) : B0(x, [ + 0, + t, + Ee + ]), i; + } + function b3(x, r, e, t, u) { + var i = x ? x[1] : 1, c = r ? r[1] : 0, v = HG([0, i], [0, c], e, t, u); + function o(P) { + var R = P1(P)[2]; + return p(R, a2(P, v), function(q, X) { + return p(zx(q, cn, 96), q, X); + }); + } + var l = dX(e); + x: { + r: if (l) { + var k = l[1]; + if (typeof k == "number") { + e: { + if (k !== 85) { + if (nn !== k) break r; + if (c && e[30][9]) { + var h = Ml0; + break e; + } + break r; + } + var h = Ll0; + } + var E = h; + break x; + } + } + var E = c ? ql0 : 0; + } + function T(P, R, q) { + var X = k5(R), B = X[1], z = X[2], x0 = Br(t, B), W = [ + 0, + q, + P, + [ + 0, + B, + z + ], + 0 + ], Z = E ? [27, [ + 0, + W, + x0, + E[1] + ]] : [6, W]; + return b3([0, i], [0, t3(E)], R, t, [0, [ + 0, + x0, + Z + ]]); + } + if (e[15]) return v; + var I = L(e); + if (typeof I == "number") { + var N = I + ZD | 0; + if (2 < N >>> 0) { + if (N === -96) return T(0, e, o(e)); + } else if (N !== 1 && d1(e)) return Vd(Gd(function(P, R) { + throw J0(Xt, 1); + }, e), v, function(P) { + var R = o(P); + return T(pj(P), P, R); + }); + } + return v; + } + function JG(x, r, e, t) { + return a2(r, b3([0, x ? x[1] : 1], 0, r, e, [0, t])); + } + function KG(x) { + return e0(0, function(r) { + var e = G0(r), t = c0(r); + if (K(r, 46), r[11] && L(r) === 10) { + var u = L0(r); + w0(r); + var i = wn(r0([0, t], [0, u], D), [ + 0, + e, + Bl0 + ]), c = L(r); + return typeof c != "number" && c[0] === 4 && !C(c[3], Ih) ? [24, [ + 0, + i, + p(Y0[13], 0, r), + 0 + ]] : (v1(Ul0, r), w0(r), [10, i]); + } + var v = G0(r), o = L(r); + x: { + if (typeof o == "number") { + if (o === 46) { + var l = KG(r); + break x; + } + if (o === 53) { + var l = zG(BO(1, r)); + break x; + } + } + var l = $o(r) ? WG(r) : a2(r, VG(r)); + } + var k = BO(1, r), h = a2(k, HG([0, Xl0[1]], 0, k, v, [0, l])), E = L(r); + x: { + if (typeof E != "number" && E[0] === 3) { + var T = QG(r, v, h, E[1]); + break x; + } + var T = h; + } + x: { + r: if (L(r) !== 4) { + if (d1(r) && cr === L(r)) break r; + var I = T; + break x; + } + var I = p(P1(r)[2], T, function(q, X) { + return p(zx(q, cn, 97), q, X); + }); + } + var N = d1(r) ? Vd(Gd(function(q, X) { + throw J0(Xt, 1); + }, r), 0, pj) : 0, P = L(r); + x: { + if (typeof P == "number" && P === 4) { + var R = [0, k5(r)]; + break x; + } + var R = 0; + } + return [25, [ + 0, + I, + N, + R, + r0([0, t], 0, D) + ]]; + }, x); + } + function pj(x) { + B1(x, 1); + var r = cr === L(x) ? [0, e0(0, DG[1], x)] : 0; + return H1(x), r; + } + function k5(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 4); + var t = p(RG[1], r, 0), u = c0(r); + return K(r, 5), [ + 0, + t, + I1([0, e], [0, L0(r)], u, D) + ]; + }, x); + } + function HG(x, r, e, t, u) { + var i = x ? x[1] : 1, c = r ? r[1] : 0, v = c ? Gl0 : 0, o = L(e), l = Qx(1, e); + x: { + if (typeof o == "number" && nn === o) { + r: if (typeof l == "number") { + if (cr !== l) { + if (11 <= l) break r; + switch (l) { + case 4: + case 6: + case 10: break; + default: break r; + } + } + e: if (c) { + if (l === 4 && !d1(e)) break e; + var I = u; + break x; + } + } + if (e[30][9]) { + var k = a2(e, u), h = G0(e); + w0(e); + var E = L0(e), I = [0, [ + 0, + Br(t, h), + [36, [ + 0, + 8, + k, + r0(0, [0, E], D) + ]] + ]]; + break x; + } + } + var I = u; + } + var N = L(e); + if (typeof N == "number") switch (N) { + case 6: return w0(e), La(g3[1], i, v, e, t, I); + case 10: return w0(e), La(g3[2], i, v, e, t, I); + case 85: + 1 - i && Bx(e, 61), K(e, 85); + var P = L(e); + if (typeof P == "number") switch (P) { + case 4: return I; + case 6: return w0(e), La(g3[1], i, Yl0, e, t, I); + case 100: + if (d1(e)) return I; + break; + } + else if (P[0] === 3) return Bx(e, 62), I; + return La(g3[2], i, zl0, e, t, I); + case 111: + if (c && e[30][9]) { + var R = Qx(1, e); + if (typeof R == "number") switch (R) { + case 4: return w0(e), I; + case 6: return w0(e), w0(e), La(g3[1], i, Jl0, e, t, I); + case 10: return w0(e), w0(e), La(g3[2], i, Kl0, e, t, I); + case 100: + if (d1(e)) return w0(e), I; + break; + } + else if (R[0] === 3) return Bx(e, 62), w0(e), I; + return I; + } + break; + } + else if (N[0] === 3) { + var q = N[1]; + return c && Bx(e, 62), b3(Hl0, 0, e, t, [0, QG(e, t, a2(e, I), q)]); + } + return I; + } + function WG(x) { + return e0(0, function(r) { + var e = o5(r), t = e[1], u = e[2], i = e0(0, function(R) { + var q = c0(R); + K(R, 15); + var X = xv(R), B = X[1], z = _l([ + 0, + u, + [ + 0, + q, + [ + 0, + X[2], + 0 + ] + ] + ]); + if (L(R) === 4) var x0 = 0, W = 0; + else { + var Z = L(R); + x: { + if (typeof Z == "number" && cr === Z) { + var i0 = 0; + break x; + } + var t0 = FO(B, MO(t, R)), i0 = [0, Gt(t0, p(Y0[13], Wl0, t0))]; + } + var x0 = te(R, 1, Oe(R)), W = i0; + } + var u0 = k3(0, R), o0 = Yl(t || u0[21], B)(u0), S0 = L(u0) === 88 ? o0 : q4(u0, o0), s0 = ij(u0), v0 = s0[2], m0 = s0[1]; + if (v0) var p0 = CX(u0, v0), E0 = m0; + else var p0 = v0, E0 = Bl(u0, m0); + return [ + 0, + W, + S0, + B, + p0, + E0, + x0, + z + ]; + }, r), c = i[2], v = c[3], o = c[2], l = c[1], k = c[7], h = c[6], E = c[5], T = c[4], I = i[1], N = J4(r, t, v, 1, y3(o)), P = N[1]; + return Gl(r, N[2], l, o), [9, [ + 0, + l, + o, + P, + t, + v, + 1, + T, + E, + h, + r0([0, k], 0, D), + I + ]]; + }, x); + } + function kj(x, r, e) { + switch (r) { + case 1: + Ce(x, 79); + try { + var u = qh(Zv(Gx(Vl0, e))); + } catch (E) { + var i = M1(E); + if (i[1] !== mn) throw J0(i, 0); + var u = Px(Gx($l0, e)); + } + break; + case 2: + Ce(x, 78); + try { + var u = dN(e); + } catch (E) { + var v = M1(E); + if (v[1] !== mn) throw J0(v, 0); + var u = Px(Gx(Ql0, e)); + } + break; + case 4: + try { + var u = dN(e); + } catch (E) { + var l = M1(E); + if (l[1] !== mn) throw J0(l, 0); + var u = Px(Gx(Zl0, e)); + } + break; + default: try { + var u = qh(Zv(e)); + } catch (E) { + var h = M1(E); + if (h[1] !== mn) throw J0(h, 0); + var u = Px(Gx(x60, e)); + } + } + return K(x, [ + 0, + r, + e + ]), u; + } + function mj(x, r, e) { + var t = Rx(e); + x: { + if (t !== 0 && n2 === F1(e, t - 1 | 0)) { + var u = C2(e, 0, t - 1 | 0); + break x; + } + var u = e; + } + var i = nB(u); + return K(x, [ + 1, + r, + e + ]), i; + } + function VG(x) { + var r = G0(x), e = c0(x), t = L(x); + if (typeof t == "number") switch (t) { + case 0: + var u = d(Y0[12], x); + return [ + 1, + [ + 0, + u[1], + [26, u[2]] + ], + u[3] + ]; + case 4: + var i = c0(x), c = e0(0, function(M) { + K(M, 4); + var d0 = G0(M), g0 = xt(M), h0 = L(M); + x: { + if (typeof h0 == "number") { + if (h0 === 9) { + var A0 = [0, hj(M, d0, [ + 0, + g0, + 0 + ])]; + break x; + } + if (h0 === 88) { + var A0 = [1, [ + 0, + g0, + Va(M), + 0 + ]]; + break x; + } + } + var A0 = [0, g0]; + } + return K(M, 5), A0; + }, x), v = c[2], o = c[1], l = L0(x), k = v[0] === 0 ? v[1] : [ + 0, + o, + [34, v[1]] + ]; + return [0, ZG([0, i], [0, l], k)]; + case 6: + var h = e0(0, PS0, x), E = h[2]; + return [ + 1, + [ + 0, + h[1], + [0, E[1]] + ], + E[2] + ]; + case 21: + if (x[30][3] && !Vo(1, x) && Qx(1, x) === 4) { + var T = c0(x), I = G0(x), N = p(Y0[13], 0, x), P = k5(x); + if (!s2(x) && L(x) === 0) { + var R = DX(x, P), X = x[12] === 1 ? x : [ + 0, + x[1], + x[2], + x[3], + x[4], + x[5], + x[6], + x[7], + x[8], + x[9], + x[10], + x[11], + 1, + x[13], + x[14], + x[15], + x[16], + x[17], + x[18], + x[19], + x[20], + x[21], + x[22], + x[23], + x[24], + x[25], + x[26], + x[27], + x[28], + x[29], + x[30], + x[31], + x[32], + x[33] + ], B = function(M) { + var d0 = c0(M), g0 = EU(G0(M)); + if (L(M) === 35) { + var h0 = G0(M); + w0(M); + var A0 = [0, h0]; + } else var A0 = 0; + var $0 = d(Y0[27], M); + if (Rr(M, 16)) { + K(M, 4); + var Kx = d(Y0[7], M); + K(M, 5); + var J = [0, Kx]; + } else var J = 0; + if (L(M) === 88) { + var tr = G0(M); + w0(M); + var Zx = [0, tr]; + } else { + K(M, 11); + var Zx = 0; + } + var b = xt(M), V = L(M); + x: { + r: if (typeof V == "number") { + var tx = V - 2 | 0; + if (h2 < tx >>> 0) { + if (k2 < tx + 1 >>> 0) break r; + var _x = 0; + } else { + if (tx !== 6) break r; + var gx = G0(M); + w0(M); + var _x = [0, gx]; + } + var ex = _x; + break x; + } + K(M, 9); + var ex = 0; + } + return [ + 0, + $0, + b, + J, + r0([0, d0], [0, L0(M)], D), + [ + 0, + A0, + Zx, + ex + ], + g0 + ]; + }; + return [0, e0([0, I], function(M) { + K(M, 0); + for (var d0 = 0;;) { + var g0 = L(M); + x: if (typeof g0 == "number") { + if (g0 !== 1 && wr !== g0) break x; + var h0 = cx(d0); + return K(M, 1), [22, [ + 0, + R, + h0, + I, + r0([0, T], [0, L0(M)], D) + ]]; + } + var d0 = [ + 0, + e0(0, B, M), + d0 + ]; + } + }, X)]; + } + return b3(e60, r60, x, I, [0, [ + 0, + Br(I, P[1]), + [6, [ + 0, + [ + 0, + I, + [10, N] + ], + 0, + P, + r0([0, T], 0, D) + ]] + ]]); + } + break; + case 23: return w0(x), [0, [ + 0, + r, + [33, [0, r0([0, e], [0, L0(x)], D)]] + ]]; + case 31: return w0(x), [0, [ + 0, + r, + [16, r0([0, e], [0, L0(x)], D)] + ]]; + case 42: return [0, d(Y0[22], x)]; + case 100: + var x0 = d(Y0[17], x), W = x0[2]; + return [0, [ + 0, + x0[1], + sn <= W[1] ? [13, W[2]] : [12, W[2]] + ]]; + case 32: + case 33: return w0(x), [0, [ + 0, + r, + [15, [ + 0, + t === 33 ? 1 : 0, + r0([0, e], [0, L0(x)], D) + ]] + ]]; + case 76: + case 107: + B1(x, 5); + var i0 = G0(x), u0 = c0(x), k0 = L(x); + x: { + if (typeof k0 != "number" && k0[0] === 5) { + var o0 = k0[3], S0 = k0[2]; + w0(x); + var v0 = L0(x), m0 = o0, p0 = S0, E0 = Gx(u60, Gx(S0, Gx(n60, o0))); + break x; + } + v1(i60, x); + var v0 = 0, m0 = f60, p0 = c60, E0 = s60; + } + H1(x); + var b0 = Kr(Rx(m0)); + OE0(function(M) { + var d0 = M + ZD | 0; + if (21 >= d0 >>> 0) switch (d0) { + case 0: + case 3: + case 5: + case 9: + case 15: + case 17: + case 18: + case 21: return at(b0, M); + } + }, m0); + var C0 = J1(b0); + return C(C0, m0) && Bx(x, [20, m0]), [0, [ + 0, + i0, + [19, [ + 0, + p0, + C0, + E0, + r0([0, u0], [0, v0], D) + ]] + ]]; + } + else switch (t[0]) { + case 0: + var D0 = t[2]; + return [0, [ + 0, + r, + [17, [ + 0, + kj(x, t[1], D0), + D0, + r0([0, e], [0, L0(x)], D) + ]] + ]]; + case 1: + var T0 = t[2]; + return [0, [ + 0, + r, + [18, [ + 0, + mj(x, t[1], T0), + T0, + r0([0, e], [0, L0(x)], D) + ]] + ]]; + case 2: + var y0 = t[1], G = y0[3], j0 = y0[2], Q0 = y0[1]; + y0[4] && Ce(x, 79), w0(x); + var q0 = r0([0, e], [0, L0(x)], D), ix = x[30][8]; + x: { + if (ix) { + var xx = ix[1], fx = Rx(xx), yx = fx <= Rx(j0) ? 1 : 0; + if (yx) for (var R0 = 0;;) { + if (R0 === fx) { + var lx = 1; + break; + } + if (z0(j0, R0) !== z0(xx, R0)) { + var lx = 0; + break; + } + var R0 = R0 + 1 | 0; + } + else var lx = yx; + if (lx) { + var kx = [20, [ + 0, + j0, + Q0, + 0, + Rx(xx), + G, + q0 + ]]; + break x; + } + } + var kx = [14, [ + 0, + j0, + G, + q0 + ]]; + } + return [0, [ + 0, + Q0, + kx + ]]; + case 3: + var Q = $G(x, t[1]); + return [0, [ + 0, + Q[1], + [32, Q[2]] + ]]; + case 4: + if (!C(t[3], $A) && Qx(1, x) === 42) return [0, d(Y0[22], x)]; + break; + } + if (Bt(x)) { + var I0 = p(Y0[13], 0, x); + return [0, [ + 0, + I0[1], + [10, I0] + ]]; + } + v1(0, x); + x: if (typeof t != "number" && t[0] === 7) { + w0(x); + break x; + } + return [0, [ + 0, + r, + [16, r0([0, e], t60, D)] + ]]; + } + function $G(x, r) { + var e = r[5], t = r[1], u = r[3], i = r[2], c = c0(x); + K(x, [3, r]); + var v = [ + 0, + t, + [ + 0, + [ + 0, + u, + i + ], + e + ] + ]; + if (e) var l = 0, k = [ + 0, + v, + 0 + ], h = t; + else var o = Z0(FG[1], x, [ + 0, + v, + 0 + ], 0), l = o[3], k = o[2], h = o[1]; + var E = L0(x); + return [ + 0, + Br(t, h), + [ + 0, + k, + l, + r0([0, c], [0, E], D) + ] + ]; + } + function QG(x, r, e, t) { + var u = p(P1(x)[2], e, function(c, v) { + return p(zx(c, cn, 3), c, v); + }), i = $G(x, t); + return [ + 0, + Br(r, i[1]), + [31, [ + 0, + u, + i, + 0 + ]] + ]; + } + function ZG(x, r, e) { + var t = x ? x[1] : 0, u = r ? r[1] : 0, i = e[2]; + function c(vx) { + return O2(vx, r0([0, t], [0, u], D)); + } + function v(vx) { + return pd(vx, r0([0, t], [0, u], D)); + } + var o = e[1]; + switch (i[0]) { + case 0: + var l = i[1], k = v(l[2]), X0 = [0, [ + 0, + l[1], + k + ]]; + break; + case 1: + var h = i[1], E = h[11], T = c(h[10]), X0 = [1, [ + 0, + h[1], + h[2], + h[3], + h[4], + h[5], + h[6], + h[7], + h[8], + h[9], + T, + E + ]]; + break; + case 2: + var I = i[1], N = c(I[2]), X0 = [2, [ + 0, + I[1], + N + ]]; + break; + case 3: + var P = i[1], R = c(P[3]), X0 = [3, [ + 0, + P[1], + P[2], + R + ]]; + break; + case 4: + var q = i[1], X = c(q[4]), X0 = [4, [ + 0, + q[1], + q[2], + q[3], + X + ]]; + break; + case 5: + var B = i[1], z = c(B[4]), X0 = [5, [ + 0, + B[1], + B[2], + B[3], + z + ]]; + break; + case 6: + var x0 = i[1], W = c(x0[4]), X0 = [6, [ + 0, + x0[1], + x0[2], + x0[3], + W + ]]; + break; + case 7: + var Z = i[1], t0 = c(Z[7]), X0 = [7, [ + 0, + Z[1], + Z[2], + Z[3], + Z[4], + Z[5], + Z[6], + t0 + ]]; + break; + case 8: + var i0 = i[1], u0 = c(i0[4]), X0 = [8, [ + 0, + i0[1], + i0[2], + i0[3], + u0 + ]]; + break; + case 9: + var k0 = i[1], o0 = k0[11], S0 = c(k0[10]), X0 = [9, [ + 0, + k0[1], + k0[2], + k0[3], + k0[4], + k0[5], + k0[6], + k0[7], + k0[8], + k0[9], + S0, + o0 + ]]; + break; + case 10: + var s0 = i[1], v0 = s0[2], m0 = s0[1], p0 = c(v0[2]), X0 = [10, [ + 0, + m0, + [ + 0, + v0[1], + p0 + ] + ]]; + break; + case 11: + var E0 = i[1], b0 = c(E0[2]), X0 = [11, [ + 0, + E0[1], + b0 + ]]; + break; + case 12: + var C0 = i[1], D0 = c(C0[4]), X0 = [12, [ + 0, + C0[1], + C0[2], + C0[3], + D0 + ]]; + break; + case 13: + var U0 = i[1], T0 = c(U0[4]), X0 = [13, [ + 0, + U0[1], + U0[2], + U0[3], + T0 + ]]; + break; + case 14: + var M0 = i[1], y0 = c(M0[3]), X0 = [14, [ + 0, + M0[1], + M0[2], + y0 + ]]; + break; + case 15: + var G = i[1], j0 = c(G[2]), X0 = [15, [ + 0, + G[1], + j0 + ]]; + break; + case 16: + var X0 = [16, c(i[1])]; + break; + case 17: + var Q0 = i[1], q0 = c(Q0[3]), X0 = [17, [ + 0, + Q0[1], + Q0[2], + q0 + ]]; + break; + case 18: + var ix = i[1], xx = c(ix[3]), X0 = [18, [ + 0, + ix[1], + ix[2], + xx + ]]; + break; + case 19: + var fx = i[1], yx = c(fx[4]), X0 = [19, [ + 0, + fx[1], + fx[2], + fx[3], + yx + ]]; + break; + case 20: + var R0 = i[1], lx = c(R0[6]), X0 = [20, [ + 0, + R0[1], + R0[2], + R0[3], + R0[4], + R0[5], + lx + ]]; + break; + case 21: + var kx = i[1], Q = c(kx[4]), X0 = [21, [ + 0, + kx[1], + kx[2], + kx[3], + Q + ]]; + break; + case 22: + var I0 = i[1], M = c(I0[4]), X0 = [22, [ + 0, + I0[1], + I0[2], + I0[3], + M + ]]; + break; + case 23: + var d0 = i[1], g0 = c(d0[3]), X0 = [23, [ + 0, + d0[1], + d0[2], + g0 + ]]; + break; + case 24: + var h0 = i[1], A0 = c(h0[3]), X0 = [24, [ + 0, + h0[1], + h0[2], + A0 + ]]; + break; + case 25: + var $0 = i[1], Kx = c($0[4]), X0 = [25, [ + 0, + $0[1], + $0[2], + $0[3], + Kx + ]]; + break; + case 26: + var J = i[1], tr = v(J[2]), X0 = [26, [ + 0, + J[1], + tr + ]]; + break; + case 27: + var Zx = i[1], b = Zx[1], V = Zx[3], tx = Zx[2], _x = c(b[4]), X0 = [27, [ + 0, + [ + 0, + b[1], + b[2], + b[3], + _x + ], + tx, + V + ]]; + break; + case 28: + var gx = i[1], ex = gx[1], Jx = gx[3], Ux = gx[2], hr = c(ex[3]), X0 = [28, [ + 0, + [ + 0, + ex[1], + ex[2], + hr + ], + Ux, + Jx + ]]; + break; + case 29: + var dr = i[1], V0 = c(dr[2]), X0 = [29, [ + 0, + dr[1], + V0 + ]]; + break; + case 30: + var X0 = [30, [0, c(i[1][1])]]; + break; + case 31: + var K0 = i[1], Cx = c(K0[3]), X0 = [31, [ + 0, + K0[1], + K0[2], + Cx + ]]; + break; + case 32: + var bx = i[1], Ox = c(bx[3]), X0 = [32, [ + 0, + bx[1], + bx[2], + Ox + ]]; + break; + case 33: + var X0 = [33, [0, c(i[1][1])]]; + break; + case 34: + var ux = i[1], br = c(ux[3]), X0 = [34, [ + 0, + ux[1], + ux[2], + br + ]]; + break; + case 35: + var nr = i[1], $r = c(nr[3]), X0 = [35, [ + 0, + nr[1], + nr[2], + $r + ]]; + break; + case 36: + var l1 = i[1], C1 = c(l1[3]), X0 = [36, [ + 0, + l1[1], + l1[2], + C1 + ]]; + break; + case 37: + var Qr = i[1], O1 = c(Qr[4]), X0 = [37, [ + 0, + Qr[1], + Qr[2], + Qr[3], + O1 + ]]; + break; + default: var Hr = i[1], w = Hr[4], Y = Hr[3], px = c(Hr[2]), X0 = [38, [ + 0, + Hr[1], + px, + Y, + w + ]]; + } + return [ + 0, + o, + X0 + ]; + } + function PS0(x) { + var r = c0(x); + K(x, 6); + var e = p(MG[1], x, [ + 0, + 0, + hn + ]), t = e[2], u = e[1], i = c0(x); + return K(x, 7), [ + 0, + [ + 0, + u, + I1([0, r], [0, L0(x)], i, D) + ], + t + ]; + } + function xY(x) { + var r = Gd(vj[1], x), e = G0(r); + if (Qx(1, r) === 11) var u = 0, i = 0; + else var t = o5(r), u = t[2], i = t[1]; + var c = i || r[21], v = MO(c, r), o = v[20], l = e0(0, function(v0) { + var m0 = te(v0, 1, Oe(v0)); + if (Bt(v0) && m0 === 0) { + var p0 = p(Y0[13], a60, v0), E0 = p0[1]; + return [ + 0, + m0, + [ + 0, + E0, + [ + 0, + 0, + [ + 0, + [ + 0, + E0, + [ + 0, + [ + 0, + E0, + [2, [ + 0, + p0, + [0, Ha(v0)], + 0 + ]] + ], + 0 + ] + ], + 0 + ], + 0, + 0 + ] + ], + [0, [ + 0, + E0[1], + E0[3], + E0[3] + ]], + 0 + ]; + } + var C0 = Yl(c, o)(v0); + yG(v0, C0); + var D0 = ij(m3(1, v0)); + return [ + 0, + m0, + C0, + D0[1], + D0[2] + ]; + }, v), k = l[2], h = k[2], E = h[2]; + x: { + r: { + var T = k[4], I = k[3], N = k[1], P = l[1]; + if (!E[1]) { + var R = E[2]; + if (!E[3] && R) break r; + var q = yX(v); + break x; + } + } + var q = v; + } + var X = h[2], B = X[1]; + if (B) { + var z = h[1]; + B0(q, [ + 0, + B[1][1], + 89 + ]); + var x0 = [ + 0, + z, + [ + 0, + 0, + X[2], + X[3], + X[4] + ] + ]; + } else var x0 = h; + var W = y3(x0); + s2(q) && L(q) === 11 && Bx(q, 57), K(q, 11); + var i0 = _X(yX(q), i, 0, W), u0 = e0(0, vj[2], i0), k0 = u0[2], o0 = k0[1], S0 = u0[1]; + Gl(i0, k0[2], 0, x0); + return [0, [ + 0, + Br(e, S0), + [1, [ + 0, + 0, + x0, + o0, + i, + 0, + 1, + T, + I, + N, + r0([0, u], 0, D), + P + ]] + ]]; + } + function hj(x, r, e) { + return e0([0, r], d(LG[1], e), x); + } + function rY(x) { + var r = G0(x), e = BG(x), t = L(x); + x: { + if (typeof t == "number") { + var u = t - 69 | 0; + if (15 >= u >>> 0) { + switch (u) { + case 0: + var i = tl0; + break; + case 1: + var i = nl0; + break; + case 2: + var i = ul0; + break; + case 3: + var i = il0; + break; + case 4: + var i = fl0; + break; + case 5: + var i = cl0; + break; + case 6: + var i = sl0; + break; + case 7: + var i = al0; + break; + case 8: + var i = ol0; + break; + case 9: + var i = vl0; + break; + case 10: + var i = ll0; + break; + case 11: + var i = pl0; + break; + case 12: + var i = kl0; + break; + case 13: + var i = ml0; + break; + case 14: + var i = hl0; + break; + default: var i = dl0; + } + var c = i; + break x; + } + } + var c = 0; + } + if (c !== 0 && w0(x), !c) return e; + var v = c[1]; + return [0, e0([0, r], function(o) { + return [4, [ + 0, + v, + aj(0, o, e), + xt(o), + 0 + ]]; + }, x)]; + } + function CS0(x, r) { + if (typeof r == "number" && r === 83) return 0; + throw J0(Xt, 1); + } + Dr(H4, [ + 0, + rY, + function(x) { + var r = Gd(CS0, x), e = rY(r), t = L(r); + if (typeof t == "number") { + if (t === 11) throw J0(Xt, 1); + if (t === 88) { + var u = dX(r); + x: { + if (u) { + var i = u[1]; + if (typeof i == "number" && i === 5) { + var c = 1; + break x; + } + } + var c = 0; + } + if (c) throw J0(Xt, 1); + } + } + if (!Bt(r)) return e; + if (e[0] === 0) { + var v = e[1][2]; + if (v[0] === 10 && !C(v[1][2][1], Io) && !s2(r)) throw J0(Xt, 1); + } + return e; + } + ]); + function dj(x, r, e, t, u) { + return [0, [ + 0, + u, + [21, [ + 0, + t, + a2(x, r), + a2(x, e), + 0 + ]] + ]]; + } + function yj(x, r, e) { + for (var t = r, u = e;;) { + var i = L(x); + if (typeof i == "number" && i === 90) { + w0(x); + var c = e0(0, p5, x), v = c[2], o = Br(u, c[1]), l = _j(0, x, dj(x, t, v, 1, o), o), t = l[2], u = l[1]; + continue; + } + return [ + 0, + u, + t + ]; + } + } + function eY(x, r, e) { + for (var t = r, u = e;;) { + var i = L(x); + if (typeof i == "number" && i === 89) { + w0(x); + var c = e0(0, p5, x), v = yj(x, c[2], c[1]), o = v[2], l = Br(u, v[1]), k = _j(0, x, dj(x, t, o, 0, l), l), t = k[2], u = k[1]; + continue; + } + return [ + 0, + u, + t + ]; + } + } + function _j(x, r, e, t) { + for (var u = x, i = e, c = t;;) { + var v = L(r); + if (typeof v == "number" && v === 86) { + 1 - u && Bx(r, L60), K(r, 86); + var o = e0(0, p5, r), l = o[2], k = o[1], h = L(r); + x: { + if (typeof h == "number" && 1 >= h + mR >>> 0) { + Bx(r, [23, PO(h)]); + var E = yj(r, l, k), T = eY(r, E[2], E[1]), I = T[2], N = T[1]; + break x; + } + var I = l, N = k; + } + var P = Br(c, N), u = 1, i = dj(r, i, I, 2, P), c = P; + continue; + } + return [ + 0, + c, + i + ]; + } + } + Dr(l5, [ + 0, + yj, + eY, + _j + ]); + function wj(x, r, e, t) { + return [ + 0, + t, + [5, [ + 0, + e, + x, + r, + 0 + ]] + ]; + } + Dr(jG, [0, function(x, r) { + for (var e = r;;) { + var t = e0(0, function(y0) { + return [ + 0, + UG(y0) !== 0 ? 1 : 0, + XG(R4(0, y0)) + ]; + }, x), u = t[2], i = u[2], c = u[1], v = t[1]; + x: if (cr === L(x) && i[0] === 0 && i[1][2][0] === 12) { + Bx(x, 2); + break x; + } + let M0 = v; + var o = (function(y0, G) { + for (var j0 = y0, Q0 = G;;) { + var q0 = L(x); + x: if (typeof q0 != "number" && q0[0] === 4) { + var ix = q0[3]; + if (C(ix, It) && C(ix, eL)) break x; + if (d1(x)) { + w0(x); + var xx = a2(x, Q0); + r: { + if (j0) { + var fx = j0[1], yx = fx[2], R0 = j0[2], lx = fx[3], kx = yx[1], Q = fx[1]; + if (OG(yx[2], k60)) { + var I0 = wj(Q, xx, kx, Br(lx, M0)), M = R0; + break r; + } + } + var I0 = xx, M = j0; + } + var d0 = I0[1]; + if (Sr(ix, eL)) var g0 = Gs(x), h0 = g0[1], J = [0, [ + 0, + Br(d0, h0), + [35, [ + 0, + I0, + [ + 0, + h0, + g0 + ], + 0 + ]] + ]]; + else if (L(x) === 29) { + var A0 = Br(d0, G0(x)); + w0(x); + var J = [0, [ + 0, + A0, + [2, [ + 0, + I0, + 0 + ]] + ]]; + } else var $0 = Gs(x), Kx = $0[1], J = [0, [ + 0, + Br(d0, Kx), + [3, [ + 0, + I0, + [ + 0, + Kx, + $0 + ], + 0 + ]] + ]]; + var j0 = M, Q0 = J; + continue; + } + } + return [ + 0, + j0, + Q0 + ]; + } + })(e, i), l = o[2], k = o[1], h = L(x); + x: { + r: if (typeof h == "number") { + var E = h - 17 | 0; + if (1 < E >>> 0) { + if (74 > E) break r; + switch (E - 74 | 0) { + case 0: + var T = m60; + break; + case 1: + var T = h60; + break; + case 2: + var T = d60; + break; + case 3: + var T = y60; + break; + case 4: + var T = _60; + break; + case 5: + var T = w60; + break; + case 6: + var T = g60; + break; + case 7: + var T = b60; + break; + case 8: + var T = T60; + break; + case 9: + var T = E60; + break; + case 10: + var T = S60; + break; + case 11: + var T = A60; + break; + case 12: + var T = I60; + break; + case 13: + var T = P60; + break; + case 14: + var T = C60; + break; + case 15: + var T = N60; + break; + case 16: + var T = O60; + break; + case 17: + var T = j60; + break; + case 18: + var T = D60; + break; + case 19: + var T = R60; + break; + default: break r; + } + var I = T; + } else var I = E ? F60 : x[14] ? 0 : M60; + var N = I; + break x; + } + var N = 0; + } + if (N !== 0 && w0(x), !k && !N) return l; + if (N) { + var P = N[1], R = P[1], q = P[2]; + c && R === 14 && B0(x, [ + 0, + v, + 36 + ]); + x: for (var B = a2(x, l), z = [ + 0, + R, + q + ], x0 = v, W = k;;) { + var Z = z[2], t0 = z[1]; + if (!W) break x; + var i0 = W[1], u0 = i0[2], k0 = W[2], o0 = i0[3], S0 = u0[1], s0 = i0[1]; + if (!OG(u0[2], Z)) break; + var v0 = Br(o0, x0), B = wj(s0, B, S0, v0), z = [ + 0, + t0, + Z + ], x0 = v0, W = k0; + } + var e = [ + 0, + [ + 0, + B, + [ + 0, + t0, + Z + ], + x0 + ], + W + ]; + } else for (var m0 = a2(x, l), p0 = v, E0 = k;;) { + if (!E0) return [0, m0]; + var b0 = E0[1], C0 = E0[2], D0 = b0[2][1], U0 = b0[1], T0 = Br(b0[3], p0), m0 = wj(U0, m0, D0, T0), p0 = T0, E0 = C0; + } + } + }]), Dr(DG, [0, function(x) { + var r = c0(x); + K(x, cr); + for (var e = 0;;) { + var t = L(x); + x: if (typeof t == "number") { + if (k1 !== t && wr !== t) break x; + var u = cx(e), i = c0(x); + K(x, k1); + var c = L(x) === 4 ? P1(x)[1] : L0(x); + return [ + 0, + u, + I1([0, r], [0, c], i, D) + ]; + } + var v = L(x); + x: { + if (typeof v != "number" && v[0] === 4 && !C(v[2], Pv)) { + var o = G0(x), l = c0(x); + Xs(x, p60); + var k = [1, [ + 0, + o, + [0, r0([0, l], [0, L0(x)], D)] + ]]; + break x; + } + var k = [0, Gs(x)]; + } + var h = [ + 0, + k, + e + ]; + k1 !== L(x) && K(x, 9); + var e = h; + } + }]); + function NS0(x) { + var r = c0(x); + K(x, 12); + return [ + 0, + xt(x), + r0([0, r], 0, D) + ]; + } + Dr(RG, [0, function(x, r) { + for (var e = r;;) { + var t = L(x); + x: if (typeof t == "number") { + if (t !== 5 && wr !== t) break x; + return cx(e); + } + var u = L(x); + x: { + if (typeof u == "number" && u === 12) { + var i = [1, e0(0, NS0, x)]; + break x; + } + var i = [0, xt(x)]; + } + var c = [ + 0, + i, + e + ]; + L(x) !== 5 && K(x, 9); + var e = c; + } + }]), Dr(g3, [ + 0, + function(x, r, e, t, u) { + var i = BO(0, e), c = d(Y0[7], i), v = G0(e); + K(e, 7); + var o = L0(e), l = Br(t, v), k = r0(0, [0, o], D), h = [ + 0, + a2(e, u), + [2, c], + k + ], E = r ? [28, [ + 0, + h, + l, + r[1] + ]] : [23, h]; + return b3([0, x], [0, t3(r)], e, t, [0, [ + 0, + l, + E + ]]); + }, + function(x, r, e, t, u) { + var i = L(e); + x: { + if (typeof i == "number" && i === 14) { + var c = jX(e), v = c[1], o = e[32][1], l = c[2][1]; + if (o) { + var k = o[1]; + e[32][1] = [ + 0, + [ + 0, + k[1], + [ + 0, + [ + 0, + l, + v + ], + k[2] + ] + ], + o[2] + ]; + } else B0(e, [ + 0, + v, + 65 + ]); + var E = [1, c], T = v; + break x; + } + var h = W1(e), E = [0, h], T = h[1]; + } + var I = Br(t, T); + x: if (u[0] === 0 && u[1][2][0] === 30 && E[0] === 1) { + B0(e, [ + 0, + I, + 85 + ]); + break x; + } + var N = [ + 0, + a2(e, u), + E, + 0 + ], P = r ? [28, [ + 0, + N, + I, + r[1] + ]] : [23, N]; + return b3([0, x], [0, t3(r)], e, t, [0, [ + 0, + I, + P + ]]); + } + ]), Dr(FG, [0, function(x, r, e) { + for (var t = r, u = e;;) { + var i = d(Y0[7], x), c = [ + 0, + i, + u + ], v = L(x); + if (typeof v == "number" && v === 1) { + B1(x, 4); + var o = L(x); + if (typeof o != "number" && o[0] === 3) { + var l = o[1], k = l[5], h = l[1], E = l[3], T = l[2]; + w0(x), H1(x); + var I = [ + 0, + [ + 0, + h, + [ + 0, + [ + 0, + E, + T + ], + k + ] + ], + t + ]; + if (k) { + var N = cx(c); + return [ + 0, + h, + cx(I), + N + ]; + } + var t = I, u = c; + continue; + } + throw J0([ + 0, + Nr, + o60 + ], 1); + } + v1(v60, x); + var P = [ + 0, + i[1], + l60 + ], R = cx(c), q = cx([ + 0, + P, + t + ]); + return [ + 0, + i[1], + q, + R + ]; + } + }]), Dr(MG, [0, function(x, r) { + for (var e = r;;) { + var t = e[2], u = e[1], i = L(x); + x: if (typeof i == "number") { + if (13 <= i) { + if (wr !== i) break x; + } else { + if (7 > i) break x; + switch (i - 7 | 0) { + case 0: break; + case 2: + var c = G0(x); + w0(x); + var e = [ + 0, + [ + 0, + [2, c], + u + ], + t + ]; + continue; + case 5: + var v = c0(x), o = e0(0, function(x0) { + w0(x0); + var W = W4(x0); + return W[0] === 0 ? [ + 0, + W[1], + hn + ] : [ + 0, + W[1], + W[2] + ]; + }, x), l = o[2], k = l[2], h = o[1], T = [1, [ + 0, + h, + [ + 0, + l[1], + r0([0, v], 0, D) + ] + ]], I = L(x) === 7 ? 1 : 0; + r: { + if (!I && Qx(1, x) === 7) { + var N = [ + 0, + k[1], + [ + 0, + [ + 0, + h, + 16 + ], + k[2] + ] + ]; + break r; + } + var N = k; + } + 1 - I && K(x, 9); + var e = [ + 0, + [ + 0, + T, + u + ], + oj(N, t) + ]; + continue; + default: break x; + } + } + var P = AG(t); + return [ + 0, + cx(u), + P + ]; + } + var R = W4(x); + if (R[0] === 0) var q = hn, X = R[1]; + else var q = R[2], X = R[1]; + L(x) !== 7 && K(x, 9); + var e = [ + 0, + [ + 0, + [0, X], + u + ], + oj(q, t) + ]; + } + }]), Dr(vj, [ + 0, + function(x) { + return function(r) { + x: if (typeof r == "number") { + if (63 <= r) { + var e = r - 64 | 0; + if (50 >= e >>> 0) { + var t = e - 16 | 0; + if (9 < t >>> 0) break x; + switch (t) { + case 0: + case 1: + case 3: + case 9: break; + default: break x; + } + } + } else if (7 <= r) { + if (r !== 57) break x; + } else if (5 > r) break x; + return 0; + } + throw J0(Xt, 1); + }; + }, + function(x) { + var r = L(x); + if (typeof r == "number" && !r) { + var e = p(Y0[16], 1, x); + return [ + 0, + [0, e[1]], + e[2] + ]; + } + return [ + 0, + [1, d(Y0[10], x)], + 0 + ]; + } + ]), Dr(LG, [0, function(x, r) { + for (var e = x;;) { + var t = L(r); + if (typeof t == "number" && t === 9) { + w0(r); + var e = [ + 0, + xt(r), + e + ]; + continue; + } + return [29, [ + 0, + cx(e), + 0 + ]]; + } + }]); + function OS0(x) { + var r = c0(x); + w0(x); + var e = r0([0, r], 0, D), t = lj(x); + return [ + 0, + p((s2(x) ? L4(x) : $d(x))[2], t, function(i, c) { + return p(zx(i, cn, 98), i, c); + }), + e + ]; + } + function gj(x) { + if (!x[30][5]) return 0; + for (var r = 0;;) { + var e = L(x); + if (typeof e == "number" && e === 13) { + var r = [ + 0, + e0(0, OS0, x), + r + ]; + continue; + } + return cx(r); + } + } + function rv(x, r) { + var e = x ? x[1] : 0, t = c0(r), u = L(r); + if (typeof u == "number") switch (u) { + case 6: + var i = e0(0, function(v0) { + var m0 = c0(v0); + K(v0, 6); + var p0 = R4(0, v0), E0 = d(Y0[10], p0); + return K(v0, 7), [ + 0, + E0, + r0([0, m0], [0, L0(v0)], D) + ]; + }, r), c = i[1]; + return [ + 0, + c, + [5, [ + 0, + c, + i[2] + ]] + ]; + case 14: + if (!e) { + var v = e0(0, function(v0) { + return w0(v0), [3, W1(v0)]; + }, r), o = v[1], l = v[2]; + return B0(r, [ + 0, + o, + 65 + ]), [ + 0, + o, + l + ]; + } + var k = jX(r), h = r[32][1], E = k[2][1], T = k[1]; + if (h) { + var I = h[1], N = h[2], P = I[2], R = [ + 0, + [ + 0, + R2[4].call(null, E, I[1]), + P + ], + N + ]; + r[32][1] = R; + } else Px(ga0); + return [ + 0, + T, + [4, k] + ]; + } + else switch (u[0]) { + case 0: + var q = u[2], X = u[1], B = G0(r); + return [ + 0, + B, + [1, [ + 0, + B, + [ + 0, + kj(r, X, q), + q, + r0([0, t], [0, L0(r)], D) + ] + ]] + ]; + case 1: + var x0 = u[2], W = u[1], Z = G0(r); + return [ + 0, + Z, + [2, [ + 0, + Z, + [ + 0, + mj(r, W, x0), + x0, + r0([0, t], [0, L0(r)], D) + ] + ]] + ]; + case 2: + var i0 = u[1], u0 = i0[4], k0 = i0[3], o0 = i0[2], S0 = i0[1]; + return u0 && Ce(r, 79), K(r, [2, [ + 0, + S0, + o0, + k0, + u0 + ]]), [ + 0, + S0, + [0, [ + 0, + S0, + [ + 0, + o0, + k0, + r0([0, t], [0, L0(r)], D) + ] + ]] + ]; + } + var s0 = W1(r); + return [ + 0, + s0[1], + [3, s0] + ]; + } + function m5(x, r, e) { + var t = 0, u = xv(x), i = u[1], c = u[2], v = rv([0, r], x), o = v[1]; + return [ + 0, + bn(x, v[2]), + e0(0, function(k) { + var h = k3(1, k), E = e0(0, function(B) { + var z = Yl(0, 0)(B), x0 = 0, W = L(B) === 88 ? z : q4(B, z); + x: if (e) { + var Z = W[2]; + r: { + if (!Z[1]) { + if (!Z[2] && !Z[3]) break r; + B0(B, [ + 0, + o, + 23 + ]); + break x; + } + B0(B, [ + 0, + o, + 24 + ]); + } + } else { + var t0 = W[2]; + r: if (t0[1]) B0(B, [ + 0, + o, + 69 + ]); + else { + var i0 = t0[2]; + if (i0 && !i0[2] && !t0[3]) break r; + t0[3] ? B0(B, [ + 0, + o, + 68 + ]) : B0(B, [ + 0, + o, + 68 + ]); + } + } + return [ + 0, + x0, + W, + Bl(B, uj(B)) + ]; + }, h), T = E[2], I = T[2], N = T[3], P = T[1], R = E[1], q = J4(h, t, i, 0, y3(I)), X = q[1]; + return Gl(h, q[2], 0, I), [ + 0, + 0, + I, + X, + t, + i, + 1, + 0, + N, + P, + r0([0, c], 0, D), + R + ]; + }, x) + ]; + } + function bj(x, r, e) { + function t(i) { + var c = k3(1, i), v = e0(0, function(N) { + var P = te(N, 1, Oe(N)), R = Yl(x, r)(N); + return [ + 0, + P, + L(N) === 88 ? R : q4(N, R), + Bl(N, uj(N)) + ]; + }, c), o = v[2], l = o[2], k = o[3], h = o[1], E = v[1], T = J4(c, x, r, 0, y3(l)), I = T[1]; + return Gl(c, T[2], 0, l), [ + 0, + 0, + l, + I, + x, + r, + 1, + 0, + k, + h, + r0([0, e], 0, D), + E + ]; + } + var u = 0; + return function(i) { + return e0(u, t, i); + }; + } + function tY(x) { + var r = W4(x); + return r[0] === 0 ? [ + 0, + r[1], + hn + ] : [ + 0, + r[1], + r[2] + ]; + } + function nY(x, r) { + switch (r[0]) { + case 0: + var e = r[1], t = e[1], u = e[2]; + return B0(x, [ + 0, + t, + 46 + ]), [ + 0, + t, + [14, u] + ]; + case 1: + var i = r[1], c = i[1], v = i[2]; + return B0(x, [ + 0, + c, + 46 + ]), [ + 0, + c, + [17, v] + ]; + case 2: + var o = r[1], l = o[1], k = o[2]; + return B0(x, [ + 0, + l, + 46 + ]), [ + 0, + l, + [18, k] + ]; + case 3: + var h = r[1], E = h[2][1], T = h[1]; + return Yd(E) ? B0(x, [ + 0, + T, + 98 + ]) : Ml(E) && pt(x, [ + 0, + T, + 83 + ]), [ + 0, + T, + [10, h] + ]; + case 4: return Px(p40); + default: + var I = r[1][2][1]; + return B0(x, [ + 0, + I[1], + 7 + ]), I; + } + } + function uY(x) { + return K(x, 88), tY(x); + } + function Tj(x, r, e, t, u, i) { + var c = e0([0, r], function(o) { + if (!t && !u) { + var l = L(o); + x: if (typeof l == "number") { + if (88 <= l) { + if (cr !== l) { + if (89 <= l) break x; + var k = uY(o); + return [ + 0, + [ + 0, + e, + k[1], + 0 + ], + k[2] + ]; + } + } else { + if (l === 84) { + if (e[0] === 3) var h = e[1], E = G0(o), T = e0([0, h[1]], function(R) { + var q = c0(R); + K(R, 84); + var X = L0(R); + return [4, [ + 0, + 0, + p(Y0[19], R, [ + 0, + h[1], + [10, h] + ]), + d(Y0[10], R), + r0([0, q], [0, X], D) + ]]; + }, o), I = [ + 0, + T, + [ + 0, + [ + 0, + [ + 0, + E, + [28, md(l40)] + ], + 0 + ], + 0 + ] + ]; + else var I = uY(o); + return [ + 0, + [ + 0, + e, + I[1], + 1 + ], + I[2] + ]; + } + if (10 <= l) break x; + switch (l) { + case 4: break; + case 1: + case 9: return [ + 0, + [ + 0, + e, + nY(o, e), + 1 + ], + hn + ]; + default: break x; + } + } + return [ + 0, + [ + 1, + bn(o, e), + bj(t, u, i)(o) + ], + hn + ]; + } + return [ + 0, + [ + 0, + e, + nY(o, e), + 1 + ], + hn + ]; + } + return [ + 0, + [ + 1, + bn(o, e), + bj(t, u, i)(o) + ], + hn + ]; + }, x), v = c[2]; + return [ + 0, + [0, [ + 0, + c[1], + v[1] + ]], + v[2] + ]; + } + function jS0(x) { + if (L(x) === 12) { + var r = c0(x), e = e0(0, function(m0) { + return K(m0, 12), tY(m0); + }, x), t = e[2], u = t[2], i = t[1]; + return [ + 0, + [1, [ + 0, + e[1], + [ + 0, + i, + r0([0, r], 0, D) + ] + ]], + u + ]; + } + var v = G0(x), o = Qx(1, x); + x: { + r: if (typeof o == "number") { + if (88 <= o) { + if (cr !== o && 89 <= o) break r; + } else if (o !== 84) { + if (10 <= o) break r; + switch (o) { + case 1: + case 4: + case 9: break; + default: break r; + } + } + var k = 0, h = 0; + break x; + } + var l = o5(x), k = l[2], h = l[1]; + } + var E = xv(x), T = E[1], I = qx(k, E[2]), N = L(x); + if (!h && !T && typeof N != "number" && N[0] === 4) { + var P = N[3]; + if (!C(P, Nv)) { + var R = c0(x), q = rv(0, x)[2], X = L(x); + x: if (typeof X == "number") { + if (88 <= X) { + if (cr !== X && 89 <= X) break x; + } else if (X !== 84) { + if (10 <= X) break x; + switch (X) { + case 1: + case 4: + case 9: break; + default: break x; + } + } + return Tj(x, v, q, 0, 0, 0); + } + bn(x, q); + var B = e0([0, v], function(m0) { + return m5(m0, 0, 1); + }, x), z = B[2], x0 = z[2], W = z[1]; + return [ + 0, + [0, [ + 0, + B[1], + [ + 2, + W, + x0, + r0([0, R], 0, D) + ] + ]], + hn + ]; + } + if (!C(P, nl)) { + var t0 = c0(x), i0 = rv(0, x)[2], u0 = L(x); + x: if (typeof u0 == "number") { + if (88 <= u0) { + if (cr !== u0 && 89 <= u0) break x; + } else if (u0 !== 84) { + if (10 <= u0) break x; + switch (u0) { + case 1: + case 4: + case 9: break; + default: break x; + } + } + return Tj(x, v, i0, 0, 0, 0); + } + bn(x, i0); + var k0 = e0([0, v], function(m0) { + return m5(m0, 0, 0); + }, x), o0 = k0[2], S0 = o0[2], s0 = o0[1]; + return [ + 0, + [0, [ + 0, + k0[1], + [ + 3, + s0, + S0, + r0([0, t0], 0, D) + ] + ]], + hn + ]; + } + } + return Tj(x, v, rv(0, x)[2], h, T, I); + } + function h5(x, r, e, t) { + var u = e[2][1], i = e[1]; + if (Sr(u, _a)) return B0(x, [ + 0, + i, + [ + 16, + u, + 0, + BL === t ? 1 : 0, + 1 + ] + ]), r; + x: { + r: { + e: { + for (var c = r;;) { + if (typeof c == "number") break r; + if (c[0] === 0) break e; + var v = sx(u, c[2]), o = c[5], l = c[4], k = c[3]; + if (v === 0) break; + var c = 0 <= v ? o : l; + } + var T = [0, k]; + break x; + } + var E = c[2]; + if (sx(u, c[1]) === 0) { + var T = [0, E]; + break x; + } + var T = 0; + break x; + } + var T = 0; + } + if (!T) return r5(u, t, r); + var I = T[1]; + x: { + r: if (typeof t == "number") { + if (mI === t) { + if (typeof I != "number" || OC !== I) break r; + } else if (OC !== t || typeof I != "number" || mI !== I) break r; + break x; + } + B0(x, [ + 0, + i, + [1, u] + ]); + } + return r5(u, yM, r); + } + function Ej(x, r) { + return e0(0, function(e) { + var t = r ? c0(e) : 0; + K(e, 54); + for (var u = 0;;) { + var i = [ + 0, + e0(0, function(o) { + var l = Ys(o); + return [ + 0, + cr === L(o) ? p(P1(o)[2], l, function(h, E) { + return p(zx(h, sl, 99), h, E); + }) : l, + hG(o) + ]; + }, e), + u + ], c = L(e); + if (typeof c == "number" && c === 9) { + K(e, 9); + var u = i; + continue; + } + return [ + 0, + cx(i), + r0([0, t], 0, D) + ]; + } + }, x); + } + function Sj(x) { + switch (x[0]) { + case 0: + case 3: + var r = x[1]; + return [0, [ + 0, + r[1], + r[2][1] + ]]; + default: return 0; + } + } + function Aj(x, r) { + if (r) return B0(x, [ + 0, + r[1][1], + n2 + ]); + } + function Ij(x, r) { + if (r) return B0(x, [ + 0, + r[1], + 12 + ]); + } + function iY(x, r, e, t, u, i, c, v) { + var o = e0([0, r], function(N) { + var P = nj(N), R = L(N); + x: if (i) { + if (typeof R == "number" && R === 84) { + Bx(N, 13), w0(N); + var q = 0; + break x; + } + var q = 0; + } else { + if (typeof R == "number" && R === 84) { + w0(N); + var X = k3(1, N), q = [0, d(Y0[7], X)]; + break x; + } + var q = 1; + } + var B = L(N); + x: { + if (typeof B == "number" && 9 > B) switch (B) { + case 8: + w0(N); + var z = L(N); + r: { + e: if (typeof z == "number") { + if (z !== 1 && wr !== z) break e; + var x0 = L0(N); + break r; + } + var x0 = s2(N) ? Wa(N) : 0; + } + var k0 = [ + 0, + t, + P, + q, + x0 + ]; + break x; + case 4: + case 6: + v1(0, N); + var k0 = [ + 0, + t, + P, + q, + 0 + ]; + break x; + } + var W = L(N); + r: { + e: if (typeof W == "number") { + if (W !== 1 && wr !== W) break e; + var Z = [ + 0, + , + function(m0, p0) { + return m0; + } + ]; + break r; + } + var Z = s2(N) ? L4(N) : $d(N); + } + if (typeof q == "number") if (P[0] === 0) var t0 = q, i0 = P, u0 = p(Z[2], t, function(v0, m0) { + return p(zx(v0, iL, Ee), v0, m0); + }); + else var t0 = q, i0 = [1, p(Z[2], P[1], function(v0, m0) { + return p(zx(v0, ZA, Ss), v0, m0); + })], u0 = t; + else var t0 = [0, p(Z[2], q[1], function(v0, m0) { + return p(zx(v0, cn, ec), v0, m0); + })], i0 = P, u0 = t; + var k0 = [ + 0, + u0, + i0, + t0, + 0 + ]; + } + var o0 = k0[3], S0 = k0[2]; + return [ + 0, + k0[1], + S0, + o0, + r0([0, v], [0, k0[4]], D) + ]; + }, x), l = o[2], k = l[4], h = l[3], E = l[2], T = l[1], I = o[1]; + return T[0] === 4 ? [2, [ + 0, + I, + [ + 0, + T[1], + h, + E, + u, + c, + e, + k + ] + ]] : [1, [ + 0, + I, + [ + 0, + T, + h, + E, + u, + c, + e, + k + ] + ]]; + } + function Pj(x, r, e, t, u, i, c, v, o, l) { + for (;;) { + var k = L(x); + x: if (typeof k == "number") { + var h = k - 1 | 0; + if (7 < h >>> 0) { + var E = h - 83 | 0; + if (4 < E >>> 0) break x; + switch (E) { + case 3: + v1(0, x), w0(x); + continue; + case 0: + case 4: break; + default: break x; + } + } else if (5 >= h - 1 >>> 0) break x; + if (!u && !i) return iY(x, r, e, t, c, v, o, l); + } + var T = L(x); + x: { + if (typeof T == "number" && (T === 4 || cr === T)) { + var I = 0; + break x; + } + var I = ql(x) ? 1 : 0; + } + if (I) return iY(x, r, e, t, c, v, o, l); + Ij(x, v), Aj(x, o); + var N = Sj(t); + x: { + if (c) { + if (N) { + var P = N[1], R = P[1]; + if (!C(P[2], Sa)) { + B0(x, [ + 0, + R, + [ + 16, + i40, + c, + 1, + 0 + ] + ]); + var B = k3(1, x), z = 1; + break x; + } + } + } else if (N) { + var q = N[1], X = q[1]; + if (!C(q[2], _a)) { + u && B0(x, [ + 0, + X, + 9 + ]), i && B0(x, [ + 0, + X, + 10 + ]); + var B = k3(2, x), z = 0; + break x; + } + } + var B = k3(1, x), z = 1; + } + var x0 = bn(B, t), W = e0(0, function(t0) { + var i0 = e0(0, function(p0) { + var E0 = te(p0, 1, Oe(p0)), b0 = Yl(u, i)(p0), C0 = L(p0) === 88 ? b0 : q4(p0, b0), D0 = C0[2], U0 = D0[1]; + x: { + if (U0) { + var T0 = U0[1][1], M0 = C0[1]; + if (z === 0) { + B0(p0, [ + 0, + T0, + 90 + ]); + var y0 = [ + 0, + M0, + [ + 0, + 0, + D0[2], + D0[3], + D0[4] + ] + ]; + break x; + } + } + var y0 = C0; + } + return [ + 0, + E0, + y0, + Bl(p0, uj(p0)) + ]; + }, t0), u0 = i0[2], k0 = u0[2], o0 = u0[3], S0 = u0[1], s0 = i0[1], v0 = J4(t0, u, i, 0, y3(k0)), m0 = v0[1]; + return Gl(t0, v0[2], 0, k0), [ + 0, + 0, + k0, + m0, + u, + i, + 1, + 0, + o0, + S0, + 0, + s0 + ]; + }, B), Z = [ + 0, + z, + x0, + W, + c, + e, + r0([0, l], 0, D) + ]; + return [0, [ + 0, + Br(r, W[1]), + Z + ]]; + } + } + function Cj(x, r) { + var e = Qx(x, r); + x: if (typeof e == "number") { + if (88 <= e) { + if (cr !== e && 89 <= e) break x; + } else if (e !== 84) { + if (9 <= e) break x; + switch (e) { + case 1: + case 4: + case 8: break; + default: break x; + } + } + return 1; + } + return 0; + } + var DS0 = 0; + function RS0(x, r, e, t) { + var u = G0(x), i = L(x); + x: { + if (typeof i == "number") switch (i) { + case 105: + var c = c0(x); + w0(x); + var l = [0, [ + 0, + u, + [ + 0, + 0, + r0([0, c], 0, D) + ] + ]]; + break x; + case 106: + var v = c0(x); + w0(x); + var l = [0, [ + 0, + u, + [ + 0, + 1, + r0([0, v], 0, D) + ] + ]]; + break x; + } + else if (i[0] === 4 && !C(i[3], Xv) && r) { + var o = c0(x); + w0(x); + var l = [0, [ + 0, + u, + [ + 0, + 2, + r0([0, o], 0, D) + ] + ]]; + break x; + } + var l = 0; + } + x: if (l) { + var k = l[1][1]; + if (!e && !t) break x; + return B0(x, [ + 0, + k, + n2 + ]), 0; + } + return l; + } + var FS0 = 0; + function fY(x) { + return Cj(FS0, x); + } + function MS0(x) { + var r = G0(x), e = gj(x), t = L(x); + x: { + if (typeof t == "number" && t === 62 && !Cj(1, x)) { + var u = [0, G0(x)], i = c0(x); + w0(x); + var c = i, v = u; + break x; + } + var c = 0, v = 0; + } + var o = L(x); + x: if (typeof o == "number" && 2 >= o + ED >>> 0 && Us(1, x)) { + r: { + if (typeof o == "number") { + var l = o + ED | 0; + if (2 >= l >>> 0) { + switch (l) { + case 0: + var k = ND; + break; + case 1: + var k = z6; + break; + default: var k = _6; + } + var h = k; + break r; + } + } + var h = Px(f40); + } + Bx(x, [26, h]), w0(x); + break x; + } + var E = L(x) === 44 ? 1 : 0; + if (E) { + var T = Qx(1, x); + x: { + r: if (typeof T == "number") { + if (89 <= T) { + if (cr !== T && wr !== T) break r; + } else { + var I = T - 9 | 0; + if (78 < I >>> 0) { + if (79 > I) switch (I + 9 | 0) { + case 1: + case 4: + case 8: break; + default: break r; + } + } else if (I !== 75) break r; + } + var N = 0; + break x; + } + var N = 1; + } + var P = N; + } else var P = E; + if (P) { + var R = c0(x); + w0(x); + var q = R; + } else var q = 0; + if (P) { + if ((v ? 0 : 1) && Rr(x, 0)) return [3, e0([0, r], function(J) { + var tr = c0(J), Zx = p(Y0[4], function(b) { + return typeof b == "number" && b === 1 ? 1 : 0; + }, J); + return K(J, 1), [ + 0, + Zx, + I1([0, q], [0, L0(J)], tr, D) + ]; + }, x)]; + } + var B = L(x) === 66 ? 1 : 0; + if (B) var z = 1 - Cj(1, x), x0 = z && 1 - Vo(1, x); + else var x0 = B; + if (x0) { + var W = c0(x); + w0(x); + var Z = W; + } else var Z = 0; + var t0 = xv(x), i0 = t0[1], u0 = t0[2], S0 = RS0(x, Us(1, x) || (Qx(1, x) === 6 ? 1 : 0), x0, i0); + x: { + if (!i0 && S0) { + var s0 = xv(x), v0 = s0[2], m0 = s0[1]; + break x; + } + var v0 = u0, m0 = i0; + } + var p0 = _l([ + 0, + c, + [ + 0, + q, + [ + 0, + Z, + [ + 0, + v0, + 0 + ] + ] + ] + ]), E0 = L(x); + if (!x0 && !m0 && typeof E0 != "number" && E0[0] === 4) { + var b0 = E0[3]; + if (!C(b0, Nv)) { + var C0 = c0(x), D0 = rv(s40, x)[2]; + if (fY(x)) return Pj(x, r, e, D0, x0, m0, P, v, S0, p0); + Ij(x, v), Aj(x, S0), bn(x, D0); + var U0 = qx(p0, C0), T0 = e0([0, r], function(J) { + return m5(J, 1, 1); + }, x), M0 = T0[2], y0 = M0[1], G = M0[2], j0 = T0[1], Q0 = Sj(y0); + x: if (P) { + if (Q0) { + var q0 = Q0[1], ix = q0[1]; + if (!C(q0[2], Sa)) { + B0(x, [ + 0, + ix, + [ + 16, + v40, + P, + 0, + 0 + ] + ]); + break x; + } + } + } else if (Q0) { + var xx = Q0[1], fx = xx[1]; + if (!C(xx[2], _a)) { + B0(x, [ + 0, + fx, + 8 + ]); + break x; + } + } + return [0, [ + 0, + j0, + [ + 0, + 2, + y0, + G, + P, + e, + r0([0, U0], 0, D) + ] + ]]; + } + if (!C(b0, nl)) { + var yx = c0(x), R0 = rv(c40, x)[2]; + if (fY(x)) return Pj(x, r, e, R0, x0, m0, P, v, S0, p0); + Ij(x, v), Aj(x, S0), bn(x, R0); + var lx = qx(p0, yx), kx = e0([0, r], function(J) { + return m5(J, 1, 0); + }, x), Q = kx[2], I0 = Q[1], M = Q[2], d0 = kx[1], g0 = Sj(I0); + x: if (P) { + if (g0) { + var h0 = g0[1], A0 = h0[1]; + if (!C(h0[2], Sa)) { + B0(x, [ + 0, + A0, + [ + 16, + o40, + P, + 0, + 0 + ] + ]); + break x; + } + } + } else if (g0) { + var $0 = g0[1], Kx = $0[1]; + if (!C($0[2], _a)) { + B0(x, [ + 0, + Kx, + 8 + ]); + break x; + } + } + return [0, [ + 0, + d0, + [ + 0, + 3, + I0, + M, + P, + e, + r0([0, lx], 0, D) + ] + ]]; + } + } + return Pj(x, r, e, rv(a40, x)[2], x0, m0, P, v, S0, p0); + } + function cY(x, r, e, t) { + var u = x ? x[1] : 0, i = Ka(1, r), c = qx(u, gj(i)), v = c0(i), o = L(i); + x: if (typeof o != "number" && o[0] === 4 && !C(o[3], $A)) { + Bx(i, 86), w0(i); + break x; + } + K(i, 42); + var l = LO(1, i), k = L(l); + x: { + r: if (e && typeof k == "number") { + if (54 <= k) { + if (cr !== k && 55 <= k) break r; + } else if (k !== 43 && k) break r; + var E = 0; + break x; + } + if (Bt(i)) var h = p(Y0[13], 0, l), E = [0, p(P1(i)[2], h, function(W, Z) { + return p(zx(W, sl, Ct), W, Z); + })]; + else { + SX(i, e40); + var E = [0, [ + 0, + G0(i), + t40 + ]]; + } + } + var T = Oe(i); + if (T) var I = T[1], N = [0, p(P1(i)[2], I, function(W, Z) { + return Z0(zx(W, G8, p2), W, 0, Z); + })]; + else var N = 0; + var P = c0(i); + if (Rr(i, 43)) var R = e0(0, function(W) { + var Z = lj(FO(0, W)); + return [ + 0, + cr === L(W) ? p(P1(W)[2], Z, function(u0, k0) { + return p(zx(u0, cn, cr), u0, k0); + }) : Z, + hG(W), + r0([0, P], 0, D) + ]; + }, i), q = R[1], X = R[2], B = [0, [ + 0, + q, + p(P1(i)[2], X, function(W, Z) { + return Z0(zx(W, -663447790, k1), W, q, Z); + }) + ]]; + else var B = 0; + if (L(i) === 54) { + 1 - d1(i) && Bx(i, wo); + var z = [0, KO(i, Ej(i, 1))]; + } else var z = 0; + return [ + 0, + E, + e0(0, function(W) { + var Z = c0(W); + if (!Rr(W, 0)) return Ut(W, 0), u40; + W[32][1] = [ + 0, + [ + 0, + R2[1], + 0 + ], + W[32][1] + ]; + for (var t0 = 0, i0 = DS0, u0 = 0;;) { + var k0 = L(W); + if (typeof k0 == "number") { + var o0 = k0 - 2 | 0; + if (h2 < o0 >>> 0) { + if (k2 >= o0 + 1 >>> 0) break; + } else if (o0 === 6) { + K(W, 8); + continue; + } + } + var S0 = MS0(W); + switch (S0[0]) { + case 0: + var s0 = S0[1], v0 = s0[2], m0 = s0[1]; + switch (v0[1]) { + case 0: + if (v0[4]) var fx = i0, yx = t0; + else { + t0 && B0(W, [ + 0, + m0, + 15 + ]); + var fx = i0, yx = 1; + } + break; + case 1: + var p0 = v0[2], fx = p0[0] === 4 ? h5(W, i0, p0[1], BL) : i0, yx = t0; + break; + case 2: + var b0 = v0[2], fx = b0[0] === 4 ? h5(W, i0, b0[1], mI) : i0, yx = t0; + break; + default: var D0 = v0[2], fx = D0[0] === 4 ? h5(W, i0, D0[1], OC) : i0, yx = t0; + } + break; + case 1: + var T0 = S0[1][2], M0 = T0[4], y0 = T0[1]; + switch (y0[0]) { + case 4: + Px(n40); + break; + case 0: + case 3: + var G = y0[1], j0 = G[2][1], Q0 = Sr(j0, _a), q0 = G[1]; + if (Q0) var xx = Q0; + else var ix = Sr(j0, Sa), xx = ix && M0; + xx && B0(W, [ + 0, + q0, + [ + 16, + j0, + M0, + 0, + 0 + ] + ]); + break; + } + var fx = i0, yx = t0; + break; + case 2: + var fx = h5(W, i0, S0[1][2][1], yM), yx = t0; + break; + default: var fx = i0, yx = t0; + } + var t0 = yx, i0 = fx, u0 = [ + 0, + S0, + u0 + ]; + } + function R0(Zx, b) { + return l4(function(V) { + return 1 - R2[3].call(null, V[1], Zx); + }, b); + } + var lx = cx(u0), kx = W[32][1]; + if (kx) { + var Q = kx[1], I0 = Q[1]; + if (kx[2]) { + var M = kx[2], d0 = R0(I0, Q[2]), g0 = v4(M), h0 = g0[2], A0 = g0[1], $0 = Wq(M), Kx = [ + 0, + [ + 0, + A0, + qx(h0, d0) + ], + $0 + ]; + W[32][1] = Kx; + } else P2(function(Zx) { + return B0(W, [ + 0, + Zx[2], + [27, Zx[1]] + ]); + }, R0(I0, Q[2])), W[32][1] = 0; + } else Px(ba0); + K(W, 1); + var J = L(W); + x: { + r: if (!t) { + if (typeof J == "number" && (J === 1 || wr === J)) break r; + if (s2(W)) { + var tr = Wa(W); + break x; + } + var tr = 0; + break x; + } + var tr = L0(W); + } + return [ + 0, + lx, + r0([0, Z], [0, tr], D) + ]; + }, i), + N, + B, + z, + c, + r0([0, v], 0, D) + ]; + } + function d5(x, r) { + return e0(0, function(e) { + return [2, cY([0, r], e, e[7], 0)]; + }, x); + } + function LS0(x) { + return [7, cY(0, x, 1, 1)]; + } + var qS0 = 0; + function BS0(x) { + var r = c0(x); + if (!Rr(x, 0)) return Ut(x, 0), r40; + x: for (var e = 0;;) { + var t = L(x); + if (typeof t == "number") { + if (t === 1) break x; + if (wr === t) break; + } + var u = function(m0, p0) { + var E0 = Ro(L(p0), m0); + if (E0) { + var b0 = Qx(1, p0); + r: { + e: if (typeof b0 == "number") { + if (88 <= b0) { + var C0 = b0 + mR | 0; + if (25 < C0 >>> 0) { + if (27 <= C0) break e; + } else if (C0 !== 11) break e; + } else if (b0 !== 1 && b0 !== 4) break e; + var D0 = 0; + break r; + } + var D0 = 1; + } + var U0 = D0; + } else var U0 = E0; + if (U0) { + var T0 = c0(p0); + w0(p0); + var M0 = T0; + } else var M0 = 0; + return [ + 0, + U0, + M0 + ]; + }, i = u(44, x), c = i[1], v = i[2], o = u(66, x), l = o[1], k = o[2], h = xv(x), E = h[1], T = h[2], I = _l([ + 0, + v, + [ + 0, + k, + [ + 0, + T, + [ + 0, + c0(x), + 0 + ] + ] + ] + ]); + if (L(x) === 14) { + var N = G0(x); + w0(x), B0(x, [ + 0, + N, + 67 + ]); + } + var P = W1(x), R = P[2][1], q = P[1]; + let Z = c, t0 = R, i0 = q; + var X = function(m0, p0) { + var E0 = Sr(t0, _a); + if (E0) var C0 = E0; + else var b0 = Sr(t0, Sa), C0 = b0 && Z; + return C0 && B0(m0, [ + 0, + i0, + [ + 24, + t0, + Z, + p0 + ] + ]); + }, B = L(x); + if (typeof B == "number" && B === 88) { + if (c) { + X(x, 0); + let m0 = I, p0 = P; + var e = [ + 0, + [2, e0([0, q], function(b0) { + var C0 = Va(b0); + K(b0, 84); + var D0 = xt(b0), U0 = L(b0); + r: { + e: if (typeof U0 == "number") { + if (U0 !== 1 && wr !== U0) break e; + break r; + } + K(b0, 9); + } + return [ + 0, + p0, + C0, + D0, + r0([0, m0], 0, D) + ]; + }, x)], + e + ]; + continue; + } + if (!l && !E) { + X(x, 0); + let m0 = I, p0 = P; + var e = [ + 0, + [1, e0([0, q], function(b0) { + var C0 = Va(b0), D0 = Rr(b0, 84) ? [0, xt(b0)] : 0, U0 = L(b0); + r: { + e: if (typeof U0 == "number") { + if (U0 !== 1 && wr !== U0) break e; + break r; + } + K(b0, 9); + } + return [ + 0, + p0, + C0, + D0, + r0([0, m0], 0, D) + ]; + }, x)], + e + ]; + continue; + } + } + X(x, 1); + let u0 = c, k0 = l, o0 = E, S0 = I, s0 = P; + var e = [ + 0, + [0, e0([0, q], function(m0) { + var p0 = bj(k0, o0, S0)(m0); + return [ + 0, + 1, + [3, s0], + p0, + u0, + 0, + r0([0, S0], 0, D) + ]; + }, x)], + e + ]; + } + var z = cx(e), x0 = L(x); + x: { + r: if (typeof x0 == "number") { + if (x0 !== 1 && wr !== x0) break r; + var W = L0(x); + break x; + } + var W = s2(x) ? Wa(x) : 0; + } + return K(x, 1), [ + 0, + z, + r0([0, r], [0, W], D) + ]; + } + var US0 = 0, sY = MX(Y0); + function aY(x) { + var r = K4(x); + x: if (x[5]) d3(x, r[1]); + else { + var e = r[2]; + r: if (e[0] === 27) { + var t = e[1], u = r[1]; + if (t[4]) B0(x, [ + 0, + u, + 4 + ]); + else { + if (!t[5]) break r; + B0(x, [ + 0, + u, + 22 + ]); + } + break x; + } + } + return r; + } + function y5(x, r) { + var e = r[4], t = r[3], u = r[2], i = r[1]; + e && Ce(x, 79); + var c = c0(x); + return K(x, [2, [ + 0, + i, + u, + t, + e + ]]), [ + 0, + i, + [ + 0, + u, + t, + r0([0, c], [0, L0(x)], D) + ] + ]; + } + function o2(x, r, e) { + var t = x ? x[1] : q30, u = r ? r[1] : 1, i = L(e); + if (typeof i == "number") { + var c = i - 2 | 0; + if (h2 < c >>> 0) { + if (k2 >= c + 1 >>> 0) return [1, [ + 0, + L0(e), + function(o, l) { + return o; + } + ]]; + } else if (c === 6) { + w0(e); + var v = L(e); + x: if (typeof v == "number") { + if (v !== 1 && wr !== v) break x; + return [0, L0(e)]; + } + return s2(e) ? [0, Wa(e)] : B30; + } + } + return s2(e) ? [1, L4(e)] : (u && v1([0, t], e), U30); + } + function $a(x) { + var r = L(x); + x: if (typeof r == "number") { + if (r !== 1 && wr !== r) break x; + return [ + 0, + L0(x), + function(e, t) { + return e; + } + ]; + } + return s2(x) ? L4(x) : $d(x); + } + function Nj(x, r, e) { + var t = o2(0, 0, r); + if (t[0] === 0) return [ + 0, + t[1], + e + ]; + var u = t[1][2], i = cx(e); + if (i) var c = i[2], v = cx([ + 0, + p(u, i[1], function(o, l) { + return Z0(zx(o, 634872468, 68), o, x, l); + }), + c + ]); + else var v = 0; + return [ + 0, + 0, + v + ]; + } + var oY = [], vY = [], lY = []; + function pY(x, r, e) { + var t = e[2][1], u = e[1]; + if (!(t && !t[1][2][2] && !t[2])) return B0(x, [ + 0, + u, + r + ]); + } + function Oj(x, r) { + if (!x[5] && B4(r)) return d3(x, r[1]); + } + function kY(x) { + var r = $o(x) ? aY(x) : p(Y0[2], 0, x); + return 1 - x[5] && B4(r) && d3(x, r[1]), r; + } + function XS0(x) { + var r = c0(x); + K(x, 45); + return [ + 0, + kY(x), + r0([0, r], 0, D) + ]; + } + function GS0(x) { + var r = c0(x); + K(x, 16); + var e = qx(r, c0(x)); + K(x, 4); + var t = d(Y0[7], x); + K(x, 5); + return [28, [ + 0, + t, + kY(x), + L(x) === 45 ? [0, e0(0, XS0, x)] : 0, + r0([0, e], 0, D) + ]]; + } + var YS0 = 0; + function mY(x) { + return e0(YS0, GS0, x); + } + function hY(x) { + return [ + 0, + Ha(x), + C30 + ]; + } + function dY(x) { + var r = L(x); + if (typeof r != "number" && r[0] === 4 && !C(r[3], K6)) { + w0(x); + var e = L(x); + return typeof e != "number" && e[0] === 2 ? y5(x, e[1]) : (v1(I30, x), hY(x)); + } + return v1(P30, x), hY(x); + } + function _5(x, r, e) { + function t(o) { + return x ? Ys(o) : p(Y0[13], 0, o); + } + var u = Qx(1, e); + if (typeof u == "number") switch (u) { + case 1: + case 9: + case 115: return [ + 0, + t(e), + 0 + ]; + } + else if (u[0] === 4 && !C(u[3], It)) { + var i = W1(e); + return w0(e), [ + 0, + i, + [0, t(e)] + ]; + } + var c = L(e); + x: if (r && typeof c == "number") { + var v = r[1]; + if (c !== 48 && c !== 63) break x; + return Bx(e, v), w0(e), [ + 0, + Ys(e), + 0 + ]; + } + return [ + 0, + t(e), + 0 + ]; + } + function zS0(x) { + var r = L(x); + x: { + if (typeof r == "number") { + if (r === 48) { + var e = A30; + break x; + } + if (r === 63) { + var e = S30; + break x; + } + } + var e = 0; + } + var t = L(x); + x: { + r: if (typeof t == "number") { + if (t !== 48 && t !== 63) break r; + var u = 1; + break x; + } + var u = 0; + } + if (!u) { + var i = _5(0, 0, x); + return [ + 0, + 0, + i[2], + i[1], + 0 + ]; + } + var c = W1(x), v = L(x); + if (typeof v == "number") switch (v) { + case 1: + case 9: + case 115: return Qd(0, x, c), [ + 0, + 0, + 0, + c, + 0 + ]; + } + else if (v[0] === 4 && !C(v[3], It)) { + var o = Qx(1, x); + if (typeof o == "number") switch (o) { + case 1: + case 9: + case 115: return [ + 0, + e, + 0, + Ys(x), + 0 + ]; + } + else if (o[0] === 4 && !C(o[3], It)) { + var l = W1(x); + return w0(x), [ + 0, + e, + [0, Ys(x)], + l, + 0 + ]; + } + return Qd(0, x, c), w0(x), [ + 0, + 0, + [0, p(Y0[13], 0, x)], + c, + 0 + ]; + } + var k = _5(1, 0, x); + return [ + 0, + e, + k[2], + k[1], + 0 + ]; + } + function yY(x, r) { + var e = L(x); + if (typeof e == "number" && d2 === e) { + var t = e0(0, function(N) { + w0(N); + var P = L(N); + return typeof P != "number" && P[0] === 4 && !C(P[3], It) ? (w0(N), 2 <= r ? [0, p(Y0[13], 0, N)] : [0, Ys(N)]) : (v1(b30, N), 0); + }, x), u = t[2], i = t[1], c = u ? [0, [ + 0, + i, + u[1] + ]] : 0; + return c ? [0, [1, c[1]]] : 0; + } + K(x, 0); + for (var v = 0, o = 0;;) { + var l = v ? v[1] : 1, k = L(x); + x: if (typeof k == "number") { + if (k !== 1 && wr !== k) break x; + var h = cx(o); + return K(x, 1), [0, [0, h]]; + } + switch (1 - l && Bx(x, 28), r) { + case 0: + var E = _5(1, E30, x), I = [ + 0, + 0, + E[2], + E[1], + 0 + ]; + break; + case 1: + var T = _5(1, T30, x), I = [ + 0, + 0, + T[2], + T[1], + 0 + ]; + break; + default: var I = zS0(x); + } + var v = [0, Rr(x, 9)], o = [ + 0, + I, + o + ]; + } + } + function jj(x, r) { + var e = o2(0, 0, x); + return e[0] === 0 ? [ + 0, + e[1], + r + ] : [ + 0, + 0, + p(e[1][2], r, function(t, u) { + var i = u[1]; + return [ + 0, + i, + Z0(zx(t, lT, 74), t, i, u[2]) + ]; + }) + ]; + } + function V4(x, r, e) { + var t = yY(r, x), u = jj(r, dY(r)); + return [29, [ + 0, + x, + u[2], + 0, + t, + r0([0, e], [0, u[1]], D) + ]]; + } + function w5(x, r, e) { + var t = 2 <= x ? [ + 0, + p(Y0[13], 0, r), + 0 + ] : [ + 0, + Ys(r), + 0 + ], u = L(r); + x: { + if (typeof u == "number" && u === 9) { + K(r, 9); + var i = yY(r, x); + break x; + } + var i = 0; + } + var c = jj(r, dY(r)); + return [29, [ + 0, + x, + c[2], + [0, t], + i, + r0([0, e], [0, c[1]], D) + ]]; + } + function JS0(x) { + var r = Ka(1, x), e = c0(r); + K(r, 52); + var t = L(r); + if (typeof t == "number") switch (t) { + case 0: return V4(2, r, e); + case 48: + if (d1(r)) { + K(r, 48); + var u = L(r); + x: if (typeof u == "number") { + if (d2 !== u && u) break x; + return V4(1, r, e); + } + return w5(1, r, e); + } + break; + case 63: + if (d1(r)) { + var i = Qx(1, r); + x: { + if (typeof i == "number") switch (i) { + case 0: return w0(r), V4(0, r, e); + case 108: return w0(r), v1(0, r), V4(0, r, e); + case 9: break; + default: break x; + } + else if (i[0] !== 4 || C(i[3], K6)) break x; + return w5(2, r, e); + } + return w0(r), w5(0, r, e); + } + break; + case 108: return V4(2, r, e); + } + else if (t[0] === 2) { + var c = jj(r, y5(r, t[1])); + return [29, [ + 0, + 2, + c[2], + 0, + 0, + r0([0, e], [0, c[1]], D) + ]]; + } + return w5(2, r, e); + } + var KS0 = 0; + function g5(x) { + return e0(KS0, JS0, x); + } + function Dj(x) { + var r = x ? x[1] : 1; + function e(u) { + var i = d(r ? Y0[7] : Y0[10], u), c = o2(f30, 0, u); + if (c[0] === 0) var v = i, o = c[1]; + else var v = p(c[1][2], i, function(N, P) { + return p(zx(N, cn, 78), N, P); + }), o = 0; + if (u[22]) { + var l = v[2]; + if (l[0] === 14) { + var k = l[1][2]; + x: { + if (1 < Rx(k)) { + var h = F1(k, Rx(k) - 1 | 0); + if (F1(k, 0) === h) { + var E = [0, C2(k, 1, Rx(k) - 2 | 0)]; + break x; + } + } + var E = 0; + } + var T = E; + } else var T = 0; + var I = T; + } else var I = 0; + return [23, [ + 0, + v, + I, + r0(0, [0, o], D) + ]]; + } + var t = 0; + return function(u) { + return e0(t, e, u); + }; + } + function b5(x, r) { + 1 - d1(r) && Bx(r, ec); + var e = qx(x, c0(r)); + K(r, 63), B1(r, 1); + var t = Ys(r), u = cr === L(r) ? Gt(r, t) : t, i = Oe(r); + K(r, 84); + var c = Gs(r); + H1(r); + var v = o2(0, 0, r); + if (v[0] === 0) var o = c, l = v[1]; + else var o = p(v[1][2], c, function(k, h) { + return p(zx(k, jo, 79), k, h); + }), l = 0; + return [ + 0, + u, + i, + o, + r0([0, e], [0, l], D) + ]; + } + function T5(x, r, e) { + var t = x ? x[1] : 0; + 1 - d1(e) && Bx(e, 96); + var u = qx(r, c0(e)); + K(e, 64); + var i = c0(e); + K(e, 63); + var c = qx(u, i); + B1(e, 1); + var v = Ys(e), o = cr === L(e) ? Gt(e, v) : v, l = Oe(e); + function k(k0) { + B1(e, 0); + var o0 = Ro(L(e), k0) ? (K(e, k0), 1) : 0; + return H1(e), o0; + } + var h = k(53) ? [0, t5(e)] : 0, E = k(43) ? [0, Gs(e)] : 0; + x: { + if (!t3(E) && !t3(h)) { + var T = L(e); + r: { + if (typeof T == "number" && T === 88) { + K(e, 88); + var I = [0, Gs(e)]; + break r; + } + var I = 0; + } + var N = I; + break x; + } + var N = 0; + } + if (t) { + var P = L(e); + x: { + if (typeof P == "number" && P === 84) { + if (Bx(e, 14), w0(e), L(e) !== 8 && !ql(e)) { + var R = [0, Gs(e)]; + break x; + } + var R = 0; + break x; + } + var R = 0; + } + var q = R; + } else { + K(e, 84); + var q = [0, Gs(e)]; + } + H1(e); + var X = o2(0, 0, e); + if (X[0] === 0) var B = q, z = N, x0 = E, W = h, Z = l, t0 = o, i0 = X[1]; + else { + var u0 = X[1][2]; + if (q) var B = [0, p(u0, q[1], function(E0, b0) { + return p(zx(E0, jo, 80), E0, b0); + })], z = N, x0 = E, W = h, Z = l, t0 = o, i0 = 0; + else if (E) var B = 0, z = N, x0 = [0, p(u0, E[1], function(E0, b0) { + return p(zx(E0, jo, 81), E0, b0); + })], W = h, Z = l, t0 = o, i0 = 0; + else if (N) var B = 0, z = [0, p(u0, N[1], function(E0, b0) { + return p(zx(E0, jo, 82), E0, b0); + })], x0 = E, W = h, Z = l, t0 = o, i0 = 0; + else if (h) var B = 0, z = N, x0 = E, W = [0, p(u0, h[1], function(E0, b0) { + return p(zx(E0, jo, 83), E0, b0); + })], Z = l, t0 = o, i0 = 0; + else if (l) var B = 0, z = 0, x0 = 0, W = 0, Z = [0, p(u0, l[1], function(E0, b0) { + return Z0(zx(E0, G8, 84), E0, 7, b0); + })], t0 = o, i0 = 0; + else var B = 0, z = 0, x0 = 0, W = 0, Z = 0, t0 = p(u0, o, function(E0, b0) { + return p(zx(E0, sl, 85), E0, b0); + }), i0 = 0; + } + return [ + 0, + t0, + Z, + B, + W, + x0, + z, + r0([0, c], [0, i0], D) + ]; + } + function E5(x, r) { + 1 - d1(r) && Bx(r, wo); + var e = qx(x, c0(r)); + K(r, 55); + var t = Ys(r), u = L(r) === 43 ? t : Gt(r, t), i = Oe(r), c = L(r) === 43 ? i : te(r, 6, i), v = Ne(aG, r), o = v[2]; + return [ + 0, + u, + c, + v[1], + p($a(r)[2], o, function(h, E) { + var T = E[1]; + return [ + 0, + T, + Z0(zx(h, SL, 86), h, T, E[2]) + ]; + }), + r0([0, e], 0, D) + ]; + } + function Rj(x, r) { + var e = Ka(1, r), t = qx(x, c0(e)); + K(e, 42); + var u = p(Y0[13], 0, e), i = L(e); + x: { + r: if (typeof i == "number") { + if (cr !== i && i) break r; + var c = Gt(e, u); + break x; + } + var c = u; + } + var v = Oe(e), o = L(e); + x: { + if (typeof o == "number" && !o) { + var l = te(e, 3, v); + break x; + } + var l = v; + } + if (Rr(e, 43)) { + var k = dG(e), h = L(e); + x: { + if (typeof h == "number" && !h) { + var E = [0, p(P1(e)[2], k, function(s0, v0) { + return K1(d(zx(s0, pR, 15), s0), v0); + })]; + break x; + } + var E = [0, k]; + } + var T = E; + } else var T = 0; + var I = L(e); + x: { + if (typeof I != "number" && I[0] === 4 && !C(I[3], lM)) { + w0(e); + var N = p(oY[1], e, 0), P = L(e); + r: { + if (typeof P == "number" && !P) { + var R = NX(e, N); + break r; + } + var R = N; + } + var q = R; + break x; + } + var q = 0; + } + var X = L(e); + x: { + if (typeof X == "number" && X === 54) { + var B = Ej(e, 0), z = L(e); + r: { + if (typeof z == "number" && !z) { + var x0 = [0, KO(e, B)]; + break r; + } + var x0 = [0, B]; + } + var W = x0; + break x; + } + var W = 0; + } + var Z = 0, t0 = 0, i0 = 1, u0 = Ne(function(o0) { + return rj(i0, t0, Z, o0); + }, e); + return [ + 0, + c, + l, + p($a(e)[2], u0, function(o0, S0) { + var s0 = S0[1]; + return [ + 0, + s0, + Z0(zx(o0, SL, 87), o0, s0, S0[2]) + ]; + }), + T, + q, + W, + r0([0, t], 0, D) + ]; + } + function Fj(x, r) { + var e = qx(x, c0(r)); + Xs(r, a30); + var t = Gt(r, p(Y0[13], o30, r)), u = te(r, 4, Oe(r)), i = Ne(iG, r), c = zO(r) ? JO(r, fj(r)) : fj(r), v = o2(0, 0, r); + if (v[0] === 0) var o = c, l = v[1]; + else var o = p(v[1][2], c, function(k, h) { + return p(zx(k, GL, 88), k, h); + }), l = 0; + return [ + 0, + t, + u, + i, + o, + r0([0, e], [0, l], D) + ]; + } + function $4(x, r, e) { + var u = qx(r ? r[1] : 0, c0(e)), i = L(e); + x: { + if (typeof i == "number") { + if (i === 15) { + w0(e); + var c = 1; + break x; + } + } else if (i[0] === 4 && !C(i[3], Lv) && !x) { + w0(e); + var c = 0; + break x; + } + Ut(e, i); + var c = 1; + } + var v = Gt(e, p(Y0[13], 0, e)), o = e0(0, function(P) { + var R = te(P, 2, Oe(P)), q = Ne(i5, P); + K(P, 88), B1(P, 1); + x: { + if (Zd(P) && c !== 0) { + var z = [1, xj(P)]; + break x; + } + var X = Gs(P); + r: { + if (L(P) === 68 && c !== 0) { + var B = [0, p(P1(P)[2], X, function(W, Z) { + return p(zx(W, jo, 6), W, Z); + })]; + break r; + } + var B = [0, X]; + } + var z = B; + } + return H1(P), [12, [ + 0, + R, + q, + z, + 0, + c + ]]; + }, e), l = Ne(mG, e), k = o2(0, 0, e); + if (k[0] === 0) var h = l, E = o, T = k[1]; + else { + var I = k[1][2]; + if (l) var h = [0, p(I, l[1], function(X, B) { + return p(zx(X, FL, 89), X, B); + })], E = o, T = 0; + else var h = 0, E = p(I, o, function(X, B) { + return p(zx(X, jo, 90), X, B); + }), T = 0; + } + return [ + 0, + v, + [ + 0, + E[1], + E + ], + h, + r0([0, u], [0, T], D) + ]; + } + function _Y(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 62); + var t = L(r); + x: { + if (typeof t == "number" && t === 66) { + Bx(r, 11), K(r, 66); + var u = 1; + break x; + } + var u = 0; + } + return [10, $4(u, [0, e], r)]; + }, x); + } + function S5(x, r, e) { + var t = qx(e, c0(r)); + switch (x) { + case 0: + K(r, 26); + break; + case 1: + K(r, 30); + break; + default: K(r, 29); + } + var u = p(Y0[13], v30, r), i = Va(r), c = o2(0, 0, r); + if (c[0] === 0) var v = i, o = c[1]; + else var v = p(c[1][2], i, function(l, k) { + return p(zx(l, ZA, 91), l, k); + }), o = 0; + return [ + 0, + u, + v, + x, + r0([0, t], [0, o], D) + ]; + } + function A5(x, r) { + return e0(0, function(e) { + var t = c0(e); + return K(e, 62), [17, S5(x, e, t)]; + }, r); + } + function wY(x) { + return e0(0, function(r) { + var e = c0(r); + K(r, 0); + var t = p(Y0[6], function(i) { + return typeof i == "number" && i === 1 ? 1 : 0; + }, r), u = t === 0 ? c0(r) : 0; + return K(r, 1), [ + 0, + t, + I1([0, e], [0, $a(r)[1]], u, D) + ]; + }, x); + } + function gY(x, r) { + var e = G0(x), t = c0(x); + K(x, 62); + var u = qx(t, c0(x)); + return 1 - r && Xs(x, p30), e0([0, e], p(lY[1], u, r), x); + } + function Q4(x) { + Xs(x, m30); + var r = L(x); + x: { + if (typeof r != "number" && r[0] === 2) { + var t = y5(x, r[1]); + break x; + } + var e = [ + 0, + G0(x), + h30 + ]; + v1(d30, x); + var t = e; + } + var u = t[2], i = t[1], c = o2(0, 0, x); + return c[0] === 0 ? [ + 0, + [ + 0, + i, + u + ], + c[1] + ] : [ + 0, + [ + 0, + i, + p(c[1][2], u, function(v, o) { + return Z0(zx(v, lT, 93), v, i, o); + }) + ], + 0 + ]; + } + function bY(x, r, e) { + for (var t = x, u = e;;) { + var i = t ? t[1] : 1, c = L(r); + x: if (typeof c == "number") { + if (c !== 1 && wr !== c) break x; + return cx(u); + } + 1 - i && Bx(r, 21); + var v = e0(0, function(k) { + var h = W1(k), E = L(k); + x: { + if (typeof E != "number" && E[0] === 4 && !C(E[3], It)) { + w0(k); + var T = [0, W1(k)]; + break x; + } + var T = 0; + } + return [ + 0, + h, + T, + 0, + 0 + ]; + }, r), t = [0, Rr(r, 9)], u = [ + 0, + v, + u + ]; + } + } + function TY(x, r) { + return P2(function(e) { + return Qd(y30, x, e[2][1]); + }, r); + } + function EY(x) { + return e0(0, function(r) { + 1 - d1(r) && Bx(r, Ct); + var e = c0(r); + K(r, 62); + var t = mX(1, Ka(1, r)), u = qx(e, c0(t)); + K(t, 51); + var i = L(t); + if (typeof i == "number") switch (i) { + case 38: + var c = qx(u, c0(t)), v = e0(0, function(R0) { + return K(R0, 38); + }, t)[1], o = hX(1, t), l = L(o); + x: { + if (typeof l == "number") switch (l) { + case 15: + var k = 0, X = 0, B = [0, [1, e0(0, function(kx) { + return $4(k, 0, kx); + }, o)]]; + break x; + case 42: + var h = 0, X = 0, B = [0, [2, e0(0, function(kx) { + return Rj(h, kx); + }, o)]]; + break x; + } + else if (l[0] === 4) { + var E = l[3]; + if (C(E, Ta)) { + if (!C(E, Lv) && o[30][1]) { + var T = 0, X = 0, B = [0, [1, e0(0, function(kx) { + return $4(T, 0, kx); + }, o)]]; + break x; + } + } else if (o[30][1]) { + var I = 0, X = 0, B = [0, [3, e0(0, function(kx) { + return Fj(I, kx); + }, o)]]; + break x; + } + } + var N = Gs(o), P = o2(0, 0, o); + if (P[0] === 0) var R = P[1], q = N; + else var R = 0, q = p(P[1][2], N, function(R0, lx) { + return p(zx(R0, jo, 95), R0, lx); + }); + var X = R, B = [0, [4, q]]; + } + return [9, [ + 0, + [0, v], + B, + 0, + 0, + r0([0, c], [0, X], D) + ]]; + case 50: + if (t[30][2]) { + var z = sY[1]; + return [9, [ + 0, + 0, + [0, [8, e0(0, function(R0) { + return z(0, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + } + break; + case 55: + var W = 0; + return [9, [ + 0, + 0, + [0, [7, e0(0, function(R0) { + return E5(W, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + case 63: + var t0 = 0; + return [9, [ + 0, + 0, + [0, [5, e0(0, function(R0) { + return b5(t0, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + case 64: + var u0 = 0; + return [9, [ + 0, + 0, + [0, [6, e0(0, function(R0) { + return T5(w30, u0, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + case 108: + var o0 = G0(t); + K(t, d2); + var S0 = L(t); + x: { + if (typeof S0 != "number" && S0[0] === 4 && !C(S0[3], It)) { + w0(t); + var s0 = [0, p(Y0[13], 0, t)]; + break x; + } + var s0 = 0; + } + var v0 = Q4(t), m0 = v0[1]; + return [9, [ + 0, + 0, + 0, + [0, [1, [ + 0, + o0, + s0 + ]]], + [0, m0], + r0([0, u], [0, v0[2]], D) + ]]; + case 15: + case 26: + case 29: + case 30: + case 42: + var p0 = L(t); + x: if (typeof p0 == "number") { + if (26 <= p0) { + if (43 <= p0) break x; + switch (p0 + z3 | 0) { + case 0: + var b0 = [0, [0, e0(0, function(R0) { + return S5(0, R0, 0); + }, t)]]; + break; + case 3: + var b0 = [0, [0, e0(0, function(R0) { + return S5(2, R0, 0); + }, t)]]; + break; + case 4: + var b0 = [0, [0, e0(0, function(R0) { + return S5(1, R0, 0); + }, t)]]; + break; + case 16: + var E0 = 0, b0 = [0, [2, e0(0, function(R0) { + return Rj(E0, R0); + }, t)]]; + break; + default: break x; + } + var C0 = b0; + } else { + if (p0 !== 15) break x; + var D0 = 0, C0 = [0, [1, e0(0, function(lx) { + return $4(D0, 0, lx); + }, t)]]; + } + return [9, [ + 0, + 0, + C0, + 0, + 0, + r0([0, u], 0, D) + ]]; + } + throw J0([ + 0, + Nr, + g30 + ], 1); + } + else if (i[0] === 4) { + var U0 = i[3]; + if (C(U0, Ta)) { + if (!C(U0, Lv) && t[30][1]) { + var T0 = 0; + return [9, [ + 0, + 0, + [0, [1, e0(0, function(R0) { + return $4(T0, 0, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + } + } else if (t[30][1]) { + var y0 = 0; + return [9, [ + 0, + 0, + [0, [3, e0(0, function(R0) { + return Fj(y0, R0); + }, t)]], + 0, + 0, + r0([0, u], 0, D) + ]]; + } + } + K(t, 0); + var j0 = bY(0, t, 0); + K(t, 1); + var Q0 = L(t); + x: { + if (typeof Q0 != "number" && Q0[0] === 4 && !C(Q0[3], K6)) { + var q0 = Q4(t), fx = q0[2], yx = [0, q0[1]]; + break x; + } + TY(t, j0); + var ix = o2(0, 0, t), fx = ix[0] === 0 ? ix[1] : ix[1][1], yx = 0; + } + return [9, [ + 0, + 0, + 0, + [0, [0, j0]], + yx, + r0([0, u], [0, fx], D) + ]]; + }, x); + } + Dr(oY, [0, function(x, r) { + for (var e = r;;) { + var t = [ + 0, + dG(x), + e + ], u = L(x); + if (typeof u == "number" && u === 9) { + K(x, 9); + var e = t; + continue; + } + return cx(t); + } + }]), Dr(vY, [0, function(x, r) { + var e = L(r); + x: { + if (typeof e != "number" && e[0] === 2) { + var t = y5(r, e[1]), u = [1, p(P1(r)[2], t, function(v, o) { + var l = o[1]; + return [ + 0, + l, + Z0(zx(v, lT, 18), v, l, o[2]) + ]; + })]; + break x; + } + var u = [0, Gt(r, p(Y0[13], 0, r))]; + } + return [12, [ + 0, + u, + wY(r), + r0([0, x], 0, D) + ]]; + }]), Dr(lY, [0, function(x, r, e) { + var t = Gt(e, p(Y0[13], 0, e)); + return [14, [ + 0, + r ? [0, t] : [1, t], + wY(e), + r0([0, x], 0, D) + ]]; + }]); + var SY = [], AY = []; + function I5(x, r) { + var e = r[2], t = r[1]; + switch (e[0]) { + case 0: + var u = e[1], i = u[2], c = u[1], v = Ul(x); + return [ + 0, + t, + [1, [ + 0, + Z0(AY[1], x, 0, c), + v, + i + ]] + ]; + case 10: + var o = e[1], l = o[2][1], k = o[1]; + x: { + if (x[5] && h3(l)) { + B0(x, [ + 0, + k, + 74 + ]); + break x; + } + if (1 - x[5]) { + if (x[20] && Sr(l, H2)) { + B0(x, [ + 0, + k, + k2 + ]); + break x; + } + x[21] && Sr(l, Kv) && B0(x, [ + 0, + k, + 5 + ]); + } + } + return [ + 0, + t, + [2, [ + 0, + o, + Ul(x), + 0 + ]] + ]; + case 26: + var T = e[1], I = T[2], N = T[1], P = Ul(x); + return [ + 0, + t, + [0, [ + 0, + Z0(SY[1], x, 0, N), + P, + I + ]] + ]; + default: return [ + 0, + t, + [3, [ + 0, + t, + e + ]] + ]; + } + } + function P5(x, r) { + return function(e) { + if (!e) return cx(r); + var t = e[1]; + if (t[0] !== 0) { + var u = t[1], i = u[1]; + if (e[2]) { + var c = e[2]; + return B0(x, [ + 0, + i, + 66 + ]), P5(x, r)(c); + } + var v = u[2], o = v[2]; + return P5(x, [ + 0, + [1, [ + 0, + i, + [ + 0, + I5(x, v[1]), + o + ] + ]], + r + ])(0); + } + var l = t[1], k = l[2], h = e[2], E = l[1]; + switch (k[0]) { + case 0: + var T = k[2], I = k[1], N = k[3]; + switch (I[0]) { + case 0: + var P = [0, I[1]]; + break; + case 1: + var P = [1, I[1]]; + break; + case 2: + var P = [2, I[1]]; + break; + case 3: + var P = [3, I[1]]; + break; + case 4: + var P = Px(Y30); + break; + default: var P = [4, I[1]]; + } + var R = T[2]; + x: { + if (R[0] === 4) { + var q = R[1]; + if (!q[1]) { + var X = [0, q[3]], B = q[2]; + break x; + } + } + var X = 0, B = I5(x, T); + } + var z = [ + 0, + [0, [ + 0, + E, + [ + 0, + P, + B, + X, + N + ] + ]], + r + ]; + break; + case 1: + B0(x, [ + 0, + k[2][1], + 52 + ]); + var z = r; + break; + default: + B0(x, [ + 0, + k[2][1], + z30 + ]); + var z = r; + } + return P5(x, z)(h); + }; + } + Dr(SY, [0, P5]); + function IY(x, r) { + var e = r[1]; + return d(Y0[23], r) ? [0, I5(x, r)] : (B0(x, [ + 0, + e, + 35 + ]), 0); + } + function zl(x, r) { + return function(e) { + if (!e) return cx(r); + var t = e[1]; + switch (t[0]) { + case 0: + var u = t[1], i = u[2]; + if (i[0] === 4) { + var c = i[1]; + if (!c[1]) { + var v = e[2]; + return zl(x, [ + 0, + [0, [ + 0, + u[1], + [ + 0, + c[2], + [0, c[3]] + ] + ]], + r + ])(v); + } + } + var o = e[2], l = IY(x, u); + if (l) var k = l[1], h = [ + 0, + [0, [ + 0, + k[1], + [ + 0, + k, + 0 + ] + ]], + r + ]; + else var h = r; + return zl(x, h)(o); + case 1: + var E = t[1], T = E[1]; + if (e[2]) { + var I = e[2]; + return B0(x, [ + 0, + T, + 16 + ]), zl(x, r)(I); + } + var N = E[2], P = N[2], R = IY(x, N[1]); + return zl(x, R ? [ + 0, + [1, [ + 0, + T, + [ + 0, + R[1], + P + ] + ]], + r + ] : r)(0); + default: + var X = e[2]; + return zl(x, [ + 0, + [2, t[1]], + r + ])(X); + } + }; + } + Dr(AY, [0, zl]); + function Z4(x, r) { + var e = L(x); + if (typeof e == "number") { + if (e === 6) return e0(0, function(i) { + var c = c0(i); + K(i, 6); + x: r: { + var v = 0; + e: for (;;) { + var o = L(i); + if (typeof o == "number") { + if (13 <= o) { + if (wr === o) break r; + } else if (7 <= o) switch (o - 7 | 0) { + case 0: break e; + case 2: + var l = G0(i); + K(i, 9); + var v = [ + 0, + [2, l], + v + ]; + continue; + case 5: + var k = c0(i), h = e0(0, function(W) { + return K(W, 12), Z4(W, r); + }, i), E = h[1], I = [1, [ + 0, + E, + [ + 0, + h[2], + r0([0, k], 0, D) + ] + ]]; + L(i) !== 7 && (B0(i, [ + 0, + E, + 16 + ]), L(i) === 9 && w0(i)); + var v = [ + 0, + I, + v + ]; + continue; + } + } + var N = e0(0, function(x0) { + var W = Z4(x0, r), Z = L(x0); + t: { + if (typeof Z == "number" && Z === 84) { + K(x0, 84); + var t0 = [0, d(Y0[10], x0)]; + break t; + } + var t0 = 0; + } + return [ + 0, + W, + t0 + ]; + }, i), P = N[2], R = [0, [ + 0, + N[1], + [ + 0, + P[1], + P[2] + ] + ]]; + L(i) !== 7 && K(i, 9); + var v = [ + 0, + R, + v + ]; + } + break x; + } + var q = cx(v), X = c0(i); + K(i, 7); + return [1, [ + 0, + q, + L(i) === 88 ? [1, Va(i)] : Ul(i), + I1([0, c], [0, L0(i)], X, D) + ]]; + }, x); + if (!e) { + var t = function(i) { + var c = L(i); + return typeof c == "number" && c === 84 ? (K(i, 84), [0, d(Y0[10], i)]) : 0; + }; + return e0(0, function(i) { + var c = c0(i); + K(i, 0); + x: for (var v = 0, o = 0, l = 0;;) { + var k = L(i); + if (typeof k == "number") { + if (k === 1) break x; + if (wr === k) break; + } + r: if (L(i) === 12) var h = c0(i), E = e0(0, function(y0) { + return K(y0, 12), Z4(y0, r); + }, i), T = E[2], I = E[1], N = [0, [1, [ + 0, + I, + [ + 0, + T, + r0([0, h], 0, D) + ] + ]]]; + else { + var P = G0(i), R = p(Y0[20], 0, i), q = L(i); + if (typeof q == "number" && q === 88) { + K(i, 88); + var X = e0([0, P], function(G) { + return [ + 0, + Z4(G, r), + t(G) + ]; + }, i), B = X[2], z = R[2], x0 = B[2], W = B[1], Z = X[1]; + switch (z[0]) { + case 0: + var t0 = [0, z[1]]; + break; + case 1: + var t0 = [1, z[1]]; + break; + case 2: + var t0 = [2, z[1]]; + break; + case 3: + var t0 = [3, z[1]]; + break; + case 4: + var t0 = Px(X30); + break; + default: var t0 = [4, z[1]]; + } + var N = [0, [0, [ + 0, + Z, + [ + 0, + t0, + W, + x0, + 0 + ] + ]]]; + break r; + } + var i0 = R[2]; + if (i0[0] === 3) { + var u0 = i0[1], k0 = u0[2][1], o0 = u0[1]; + Yd(k0) ? B0(i, [ + 0, + o0, + 98 + ]) : Ml(k0) && pt(i, [ + 0, + o0, + 83 + ]); + let y0 = u0, G = o0; + var S0 = e0([0, P], function(Q0) { + return [ + 0, + [ + 0, + G, + [2, [ + 0, + y0, + Ul(Q0), + 0 + ]] + ], + t(Q0) + ]; + }, i), s0 = S0[2], N = [0, [0, [ + 0, + S0[1], + [ + 0, + [3, u0], + s0[1], + s0[2], + 1 + ] + ]]]; + } else { + v1(G30, i); + var N = 0; + } + } + if (N) { + var v0 = N[1], m0 = v0[1][1], p0 = v ? (B0(i, [ + 0, + m0, + 66 + ]), 0) : o; + if (v0[0] === 0) var b0 = p0, C0 = v; + else var E0 = L(i) === 9 ? [0, G0(i)] : 0, b0 = E0, C0 = 1; + L(i) !== 1 && K(i, 9); + var v = C0, o = b0, l = [ + 0, + v0, + l + ]; + } + } + o && B0(i, [ + 0, + o[1], + 93 + ]); + var D0 = cx(l), U0 = c0(i); + K(i, 1); + var T0 = L0(i); + return [0, [ + 0, + D0, + L(i) === 88 ? [1, Va(i)] : Ul(i), + I1([0, c], [0, T0], U0, D) + ]]; + }, x); + } + } + var u = Z0(Y0[14], x, 0, r); + return [ + 0, + u[1], + [2, u[2]] + ]; + } + function C5(x) { + var r = L(x); + x: if (typeof r == "number") { + var e = r + TF | 0; + if (6 < e >>> 0) { + if (e !== 14) break x; + } else if (4 >= e - 1 >>> 0) break x; + return L0(x); + } + return s2(x) ? Wa(x) : 0; + } + function PY(x) { + return L(x) === 1 ? 0 : [0, d(Y0[7], x)]; + } + function Qa(x) { + var r = G0(x), e = L(x); + x: { + if (typeof e != "number" && e[0] === 8) { + var t = e[1]; + break x; + } + v1(z60, x); + var t = J60; + } + var u = c0(x); + w0(x); + var i = L(x); + x: { + r: if (typeof i == "number") { + var c = i + MM | 0; + if (74 < c >>> 0) { + if (c !== 78) break r; + } else if (72 >= c - 1 >>> 0) break r; + var v = L0(x); + break x; + } + var v = C5(x); + } + return [ + 0, + r, + [ + 0, + t, + r0([0, u], [0, v], D) + ] + ]; + } + function CY(x) { + var r = Qx(1, x); + if (typeof r == "number") { + if (r === 10) for (var e = e0(0, function(u) { + var i = [0, Qa(u)]; + return K(u, 10), [ + 0, + i, + Qa(u) + ]; + }, x);;) { + var t = L(x); + if (typeof t == "number" && t === 10) { + let u = e; + var e = e0([0, e[1]], function(c) { + return K(c, 10), [ + 0, + [1, u], + Qa(c) + ]; + }, x); + continue; + } + return [2, e]; + } + if (r === 88) return [1, e0(0, function(u) { + var i = Qa(u); + return K(u, 88), [ + 0, + i, + Qa(u) + ]; + }, x)]; + } + return [0, Qa(x)]; + } + function xp(x, r) { + return Sr(x[2][1], r[2][1]); + } + function NY(x, r) { + var e = x[2], t = e[1], u = r[2], i = u[1], c = e[2], v = u[2]; + x: { + if (t[0] === 0) { + var o = t[1]; + if (i[0] === 0) { + var k = xp(o, i[1]); + break x; + } + } else { + var l = t[1]; + if (i[0] !== 0) { + var k = NY(l, i[1]); + break x; + } + } + var k = 0; + } + return k && xp(c, v); + } + function N5(x, r) { + switch (x[0]) { + case 0: + var e = x[1]; + if (r[0] === 0) return xp(e, r[1]); + break; + case 1: + var t = x[1]; + if (r[0] === 1) { + var u = t[2], i = r[1][2], c = u[2], v = i[2]; + return xp(u[1], i[1]) && xp(c, v); + } + break; + default: + var l = x[1]; + if (r[0] === 2) return NY(l, r[1]); + } + return 0; + } + function Mj(x) { + switch (x[0]) { + case 0: return x[1][1]; + case 1: return x[1][1]; + default: return x[1][1]; + } + } + var T3 = []; + function OY(x, r) { + var e = c0(r), t = e0(0, function(m0) { + K(m0, cr); + var p0 = L(m0); + if (typeof p0 == "number") { + if (k1 === p0) return w0(m0), X60; + } else if (p0[0] === 8) { + var E0 = CY(m0); + x: { + if (d1(m0) && cr === L(m0) && Te !== Qx(1, m0)) { + var b0 = Vd(m0, 0, pj); + break x; + } + var b0 = 0; + } + for (var C0 = 0;;) { + var D0 = L(m0); + if (typeof D0 == "number") { + if (D0 === 0) { + var U0 = c0(m0); + B1(m0, 0); + var T0 = e0(0, function(q0) { + K(q0, 0), K(q0, 12); + var ix = d(Y0[10], q0); + return K(q0, 1), ix; + }, m0), M0 = T0[2], y0 = T0[1]; + H1(m0); + var C0 = [ + 0, + [1, [ + 0, + y0, + [ + 0, + M0, + r0([0, U0], [0, C5(m0)], D) + ] + ]], + C0 + ]; + continue; + } + } else if (D0[0] === 8) { + var C0 = [ + 0, + [0, e0(0, function(q0) { + var ix = Qx(1, q0); + x: { + if (typeof ix == "number" && ix === 88) { + var xx = [1, e0(0, function(J) { + var tr = Qa(J); + return K(J, 88), [ + 0, + tr, + Qa(J) + ]; + }, q0)]; + break x; + } + var xx = [0, Qa(q0)]; + } + var fx = L(q0); + x: { + if (typeof fx == "number" && fx === 84) { + K(q0, 84); + var yx = c0(q0), R0 = L(q0); + r: { + if (typeof R0 == "number") { + if (R0 === 0) { + var lx = c0(q0); + B1(q0, 0); + var kx = e0(0, function(tr) { + K(tr, 0); + var Zx = PY(tr); + return K(tr, 1), Zx; + }, q0), Q = kx[1], I0 = kx[2]; + H1(q0); + var M = [ + 0, + I0, + I1([0, lx], [0, C5(q0)], 0, D) + ]; + M[1] || B0(q0, [ + 0, + Q, + 45 + ]); + var A0 = [0, [1, [ + 0, + Q, + M + ]]]; + break r; + } + } else if (R0[0] === 10) { + var d0 = R0[3], g0 = R0[2], h0 = R0[1]; + K(q0, R0); + var A0 = [0, [0, [ + 0, + h0, + [ + 0, + g0, + d0, + r0([0, yx], [0, C5(q0)], D) + ] + ]]]; + break r; + } + Bx(q0, 34); + var A0 = [0, [0, [ + 0, + G0(q0), + Y60 + ]]]; + } + var $0 = A0; + break x; + } + var $0 = 0; + } + return [ + 0, + xx, + $0 + ]; + }, m0)], + C0 + ]; + continue; + } + var G = cx(C0), j0 = [ + 0, + go, + [ + 0, + E0, + b0, + Rr(m0, Te), + G + ] + ]; + return Rr(m0, k1) ? [0, j0] : (Ut(m0, k1), [1, j0]); + } + } + return Ut(m0, k1), G60; + }, r); + if (H1(r), d(T3[3], t)) var u = UE, i = e0(0, function(m0) { + return 0; + }, r); + else { + B1(r, 3); + var c = d(T3[4], t), v = Z0(T3[1], x, c, r), u = v[2], i = v[1]; + } + var o = L0(r); + x: { + r: if (typeof u != "number") { + var l = u[1]; + if (go === l) { + var k = u[2], h = k[2][1], E = t[2], T = k[1]; + if (E[0] === 0) { + var I = E[1]; + if (typeof I == "number") B0(r, [ + 0, + Mj(h), + q60 + ]); + else { + var N = I[2][1]; + e: if (1 - N5(h, N)) { + if (x && N5(x[1], h)) { + var P = [22, d(T3[2], N)]; + B0(r, [ + 0, + Mj(N), + P + ]); + break e; + } + var R = [13, d(T3[2], N)]; + B0(r, [ + 0, + Mj(h), + R + ]); + } + } + } + var q = T; + } else { + if (sn !== l) break r; + var X = u[2], B = t[2]; + if (B[0] === 0) { + var z = B[1]; + typeof z != "number" && B0(r, [ + 0, + X, + [13, d(T3[2], z[2][1])] + ]); + } + var q = X; + } + var x0 = q; + break x; + } + var x0 = t[1]; + } + var W = t[2][1], Z = t[1]; + if (typeof W == "number") { + x: { + r: { + var t0 = r0([0, e], [0, o], D); + if (typeof u != "number") { + var i0 = u[1]; + if (go === i0) var u0 = u[2][1]; + else { + if (sn !== i0) break r; + var u0 = u[2]; + } + var k0 = u0; + break x; + } + } + var k0 = x0; + } + var o0 = [ + 0, + sn, + [ + 0, + Z, + k0, + i, + t0 + ] + ]; + } else { + var S0 = W[2]; + x: { + var s0 = r0([0, e], [0, o], D); + if (typeof u != "number" && go === u[1]) { + var v0 = [0, u[2]]; + break x; + } + var v0 = 0; + } + var o0 = [ + 0, + go, + [ + 0, + [ + 0, + Z, + S0 + ], + v0, + i, + s0 + ] + ]; + } + return [ + 0, + Br(t[1], x0), + o0 + ]; + } + function jY(x, r) { + return B1(r, 2), OY(x, r); + } + function HS0(x, r, e, t) { + for (var u = t;;) { + var i = Fl(e); + if (u && r) { + var c = u[1], v = c[2], o = r[1], l = u[2]; + x: { + if (v[0] === 0) { + var k = v[1], h = k[2]; + if (h) { + var E = h[1][2][1], T = 1 - N5(k[1][2][1], E); + if (T) { + var I = N5(o, E); + break x; + } + var I = T; + break x; + } + } + var I = 0; + } + if (I) { + var N = c[2]; + x: { + if (N[0] === 0) { + var P = N[1], R = P[2]; + if (R) { + var q = R[1], X = Br(c[1], P[3][1]), B = [ + 0, + go, + q + ], z = [ + 0, + X, + [0, [ + 0, + P[1], + 0, + P[3], + P[4] + ]] + ]; + break x; + } + } + var B = UE, z = c; + } + return H1(e), [ + 0, + cx([ + 0, + z, + l + ]), + i, + B + ]; + } + } + var x0 = L(e); + if (typeof x0 == "number") { + if (cr === x0) { + B1(e, 2); + var W = L(e), Z = Qx(1, e); + x: if (typeof W == "number" && cr === W && typeof Z == "number") { + if (Te !== Z && wr !== Z) break x; + var t0 = e0(0, function(R0) { + K(R0, cr), K(R0, Te); + var lx = L(R0); + if (typeof lx == "number") { + if (k1 === lx) return w0(R0), sn; + } else if (lx[0] === 8) { + var kx = CY(R0); + return Hd(R0, k1), [ + 0, + go, + [0, kx] + ]; + } + return Ut(R0, k1), sn; + }, e), i0 = t0[2], u0 = t0[1], k0 = typeof i0 == "number" ? [ + 0, + sn, + u0 + ] : [ + 0, + go, + [ + 0, + u0, + i0[2] + ] + ], o0 = e[26][1]; + r: { + if (o0) { + var S0 = o0[2]; + if (S0) { + var s0 = S0[2]; + break r; + } + } + var s0 = Px(ma0); + } + e[26][1] = s0; + var v0 = Rl(e), m0 = O4(e[27][1], v0); + return e[28][1] = m0, [ + 0, + cx(u), + i, + k0 + ]; + } + var p0 = OY(r, e), E0 = p0[2], b0 = p0[1], u = [ + 0, + sn <= E0[1] ? [ + 0, + b0, + [1, E0[2]] + ] : [ + 0, + b0, + [0, E0[2]] + ], + u + ]; + continue; + } + if (wr === x0) return v1(0, e), [ + 0, + cx(u), + i, + UE + ]; + } + var D0 = L(e); + x: { + if (typeof D0 == "number") { + if (D0 === 0) { + B1(e, 0); + var U0 = e0(0, function(R0) { + K(R0, 0); + var lx = L(R0); + r: { + if (typeof lx == "number" && lx === 12) { + var kx = c0(R0); + K(R0, 12); + var d0 = [3, [ + 0, + d(Y0[10], R0), + r0([0, kx], 0, D) + ]]; + break r; + } + var I0 = PY(R0), d0 = [2, [ + 0, + I0, + I1(0, 0, I0 ? 0 : c0(R0), D) + ]]; + } + return K(R0, 1), d0; + }, e), T0 = U0[2], M0 = U0[1]; + H1(e); + var xx = [ + 0, + M0, + T0 + ]; + break x; + } + } else if (D0[0] === 9) { + var y0 = D0[3], G = D0[2], j0 = D0[1]; + K(e, D0); + var xx = [ + 0, + j0, + [4, [ + 0, + G, + y0 + ]] + ]; + break x; + } + var Q0 = jY(r, e), q0 = Q0[2], ix = Q0[1], xx = sn <= q0[1] ? [ + 0, + ix, + [1, q0[2]] + ] : [ + 0, + ix, + [0, q0[2]] + ]; + } + var u = [ + 0, + xx, + u + ]; + } + } + function DY(x) { + switch (x[0]) { + case 0: return x[1][2][1]; + case 1: + var r = x[1][2], e = r[1], t = Gx(B60, r[2][2][1]); + return Gx(e[2][1], t); + default: + var u = x[1][2], i = u[1], c = u[2]; + return Gx(i[0] === 0 ? i[1][2][1] : DY([2, i[1]]), Gx(U60, c[2][1])); + } + } + Dr(T3, [ + 0, + function(x, r, e) { + var t = G0(e), u = HS0(D, r, e, 0), i = u[2], c = u[3], v = u[1]; + return [ + 0, + [ + 0, + Br(t, i ? i[1] : t), + v + ], + c + ]; + }, + DY, + function(x) { + var r = x[2]; + if (r[0] !== 0) return 1; + var e = r[1]; + return typeof e == "number" ? 0 : e[2][3]; + }, + function(x) { + var r = x[2][1]; + return typeof r == "number" ? 0 : [0, r[2][1]]; + } + ]); + function RY(x, r) { + var e = W1(r); + return Qd(x, r, e), e; + } + var Lj = [], FY = [], MY = [], LY = []; + function WS0(x) { + var r = c0(x); + K(x, 61); + var e = L(x) === 8 ? L0(x) : 0, t = o2(0, 0, x), u = t[0] === 0 ? t[1] : t[1][1]; + return [5, [0, r0([0, r], [0, qx(e, u)], D)]]; + } + var VS0 = 0; + function $S0(x) { + var r = c0(x); + K(x, 39); + var e = D4(1, x), t = p(Y0[2], 0, e); + 1 - x[5] && B4(t) && d3(x, t[1]); + var c = L0(x); + K(x, 27); + var v = L0(x); + K(x, 4); + var o = d(Y0[7], x); + K(x, 5); + var l = L(x) === 8 ? L0(x) : 0, k = o2(0, L30, x), h = k[0] === 0 ? qx(l, k[1]) : k[1][1]; + return [18, [ + 0, + t, + o, + r0([0, r], [0, qx(c, qx(v, h))], D) + ]]; + } + var QS0 = 0; + function ZS0(x) { + var r = c0(x); + K(x, 41); + var t = x[21] && Rr(x, 67), u = qx(r, c0(x)); + K(x, 4); + var i = r0([0, u], 0, D), c = L(x); + x: { + if (typeof c == "number" && c === 66) { + var v = 1; + break x; + } + var v = 0; + } + var o = R4(1, x), l = L(o); + x: { + if (typeof l == "number") { + if (26 <= l) { + if (31 > l) switch (l + z3 | 0) { + case 0: + var k = e0(0, bG, o), h = k[2], E = h[3], T = h[1], I = k[1], t0 = E, i0 = [0, [1, [ + 0, + I, + [ + 0, + T, + 0, + r0([0, h[2]], 0, D) + ] + ]]]; + break x; + case 3: + var N = e0(0, TG, o), P = N[2], R = P[3], q = P[1], X = N[1], t0 = R, i0 = [0, [1, [ + 0, + X, + [ + 0, + q, + 2, + r0([0, P[2]], 0, D) + ] + ]]]; + break x; + case 4: + if (Qx(1, o) !== 17) { + var B = e0(0, EG, o), z = B[2], x0 = z[3], W = z[1], Z = B[1], t0 = x0, i0 = [0, [1, [ + 0, + Z, + [ + 0, + W, + 1, + r0([0, z[2]], 0, D) + ] + ]]]; + break x; + } + break; + } + } else if (l === 8) { + var t0 = 0, i0 = 0; + break x; + } + } + var t0 = 0, i0 = [0, [0, d(Y0[8], o)]]; + } + var u0 = L(x); + if (typeof u0 == "number") { + if (u0 === 17) { + if (!i0) throw J0([ + 0, + Nr, + M30 + ], 1); + var k0 = i0[1]; + if (k0[0] === 0) var o0 = [1, aj(F30, x, k0[1])]; + else { + var S0 = k0[1]; + pY(x, 37, S0); + var o0 = [0, S0]; + } + t ? K(x, 65) : K(x, 17); + var s0 = d(Y0[7], x); + K(x, 5); + var v0 = D4(1, x), m0 = p(Y0[2], 0, v0); + return Oj(x, m0), [25, [ + 0, + o0, + s0, + m0, + 0, + i + ]]; + } + if (u0 === 65) { + if (!i0) throw J0([ + 0, + Nr, + R30 + ], 1); + var p0 = i0[1]; + if (p0[0] === 0) { + var E0 = aj(D30, x, p0[1]), C0 = 1 - t && v; + x: if (C0) { + var D0 = E0[2]; + if (D0[0] === 2) { + var U0 = D0[1][1], T0 = U0[1]; + if (!C(U0[2][1], Io)) { + B0(x, [ + 0, + T0, + 38 + ]); + break x; + } + } + } + var M0 = [1, E0]; + } else { + var y0 = p0[1]; + pY(x, 38, y0); + var M0 = [0, y0]; + } + K(x, 65); + var G = d(Y0[10], x); + K(x, 5); + var j0 = D4(1, x), Q0 = p(Y0[2], 0, j0); + return Oj(x, Q0), [26, [ + 0, + M0, + G, + Q0, + t, + i + ]]; + } + } + if (P2(function(I0) { + return B0(x, I0); + }, t0), t ? K(x, 65) : K(x, 8), i0) var q0 = i0[1], ix = q0[0] === 0 ? [0, [1, a2(x, q0[1])]] : [0, [0, q0[1]]], xx = ix; + else var xx = 0; + var fx = L(x); + x: { + if (typeof fx == "number" && fx === 8) { + var yx = 0; + break x; + } + var yx = [0, d(Y0[7], x)]; + } + K(x, 8); + var R0 = L(x); + x: { + if (typeof R0 == "number" && R0 === 5) { + var lx = 0; + break x; + } + var lx = [0, d(Y0[7], x)]; + } + K(x, 5); + var kx = D4(1, x), Q = p(Y0[2], 0, kx); + return Oj(x, Q), [24, [ + 0, + xx, + yx, + lx, + Q, + i + ]]; + } + var xA0 = 0; + function rA0(x) { + 1 - x[11] && Bx(x, 26); + var r = c0(x), e = G0(x); + K(x, 19); + var t = L(x) === 8 ? L0(x) : 0; + x: { + if (L(x) !== 8 && !ql(x)) { + var u = [0, d(Y0[7], x)]; + break x; + } + var u = 0; + } + var i = Br(e, G0(x)), c = o2(0, 0, x); + x: { + if (c[0] === 0) var v = c[1]; + else { + var o = c[1], l = o[1]; + if (u) { + var k = [0, p(o[2], u[1], function(N, P) { + return p(zx(N, cn, 69), N, P); + })], h = t; + break x; + } + var v = l; + } + var k = u, h = qx(t, v); + } + return [34, [ + 0, + k, + r0([0, r], [0, h], D), + i + ]]; + } + var eA0 = 0; + function tA0(x) { + var r = c0(x); + K(x, 20), K(x, 4); + var e = d(Y0[7], x); + K(x, 5), K(x, 0); + for (var t = j30;;) { + var u = t[2], i = t[1], c = L(x); + x: if (typeof c == "number") { + if (c !== 1 && wr !== c) break x; + var v = cx(u); + K(x, 1); + var o = $a(x)[1], l = e[1]; + return [35, [ + 0, + e, + v, + r0([0, r], [0, o], D), + l + ]]; + } + let h = i; + var k = HO(0, function(T) { + var I = c0(T), N = L(T); + x: { + if (typeof N == "number" && N === 38) { + h && Bx(T, 55), K(T, 38); + var R = 0, q = L0(T), X = 0; + break x; + } + var P = G0(T); + K(T, 35); + var R = [0, P], q = 0, X = [0, d(Y0[7], T)]; + } + var B = h || (X === 0 ? 1 : 0); + K(T, 88); + var z = qx(q, $a(T)[1]); + function x0(k0) { + x: if (typeof k0 == "number") { + var o0 = k0 - 1 | 0; + if (34 < o0 >>> 0) { + if (o0 !== 37) break x; + } else if (32 >= o0 - 1 >>> 0) break x; + return 1; + } + return 0; + } + var Z = T[9] === 1 ? T : [ + 0, + T[1], + T[2], + T[3], + T[4], + T[5], + T[6], + T[7], + T[8], + 1, + T[10], + T[11], + T[12], + T[13], + T[14], + T[15], + T[16], + T[17], + T[18], + T[19], + T[20], + T[21], + T[22], + T[23], + T[24], + T[25], + T[26], + T[27], + T[28], + T[29], + T[30], + T[31], + T[32], + T[33] + ], t0 = p(Y0[4], x0, Z); + x: { + var i0 = r0([0, I], [0, z], D); + if (R && X) { + var u0 = [0, Br(R[1], X[1][1])]; + break x; + } + var u0 = 0; + } + return [ + 0, + [ + 0, + X, + u0, + t0, + i0 + ], + B + ]; + }, x), t = [ + 0, + k[2], + [ + 0, + k[1], + u + ] + ]; + } + } + var nA0 = 0; + function uA0(x) { + var r = c0(x), e = G0(x); + K(x, 24), s2(x) && B0(x, [ + 0, + e, + 56 + ]); + var t = d(Y0[7], x), u = o2(0, 0, x); + if (u[0] === 0) var i = t, c = u[1]; + else var i = p(u[1][2], t, function(v, o) { + return p(zx(v, cn, 70), v, o); + }), c = 0; + return [36, [ + 0, + i, + r0([0, r], [0, c], D) + ]]; + } + var iA0 = 0; + function fA0(x) { + var r = c0(x); + K(x, 25); + var e = d(Y0[15], x), t = L(x) === 36 ? p(P1(x)[2], e, function(T, I) { + var N = I[1]; + return [ + 0, + N, + Z0(zx(T, Ok, 4), T, N, I[2]) + ]; + }) : e, u = L(x); + x: { + if (typeof u == "number" && u === 36) { + var i = [0, e0(0, function(I) { + var N = c0(I); + K(I, 36); + var P = L0(I); + if (L(I) === 4) { + K(I, 4); + var R = [0, p(Y0[18], I, 70)]; + K(I, 5); + var q = R; + } else var q = 0; + var X = d(Y0[15], I); + return [ + 0, + q, + L(I) === 40 ? X : p($a(I)[2], X, function(z, x0) { + var W = x0[1]; + return [ + 0, + W, + Z0(zx(z, Ok, 71), z, W, x0[2]) + ]; + }), + r0([0, N], [0, P], D) + ]; + }, x)]; + break x; + } + var i = 0; + } + var c = L(x); + x: { + if (typeof c == "number" && c === 40) { + K(x, 40); + var v = d(Y0[15], x), o = v[1], l = v[2], k = [0, [ + 0, + o, + p($a(x)[2], l, function(I, N) { + return Z0(zx(I, Ok, 72), I, o, N); + }) + ]]; + break x; + } + var k = 0; + } + return i === 0 && k === 0 && B0(x, [ + 0, + t[1], + 58 + ]), [37, [ + 0, + t, + i, + k, + r0([0, r], 0, D) + ]]; + } + var cA0 = 0; + function sA0(x) { + var r = 0, e = bG(x), t = e[3], u = e[2], i = Nj(r, x, e[1]), c = i[2], v = i[1]; + return P2(function(o) { + return B0(x, o); + }, t), [40, [ + 0, + c, + r, + r0([0, u], [0, v], D) + ]]; + } + var aA0 = 0; + function oA0(x) { + var r = 2, e = TG(x), t = e[3], u = e[2], i = Nj(r, x, e[1]), c = i[2], v = i[1]; + return P2(function(o) { + return B0(x, o); + }, t), [40, [ + 0, + c, + r, + r0([0, u], [0, v], D) + ]]; + } + var vA0 = 0; + function lA0(x) { + var r = 1, e = EG(x), t = e[3], u = e[2], i = Nj(r, x, e[1]), c = i[2], v = i[1]; + return P2(function(o) { + return B0(x, o); + }, t), [40, [ + 0, + c, + r, + r0([0, u], [0, v], D) + ]]; + } + var pA0 = 0; + function kA0(x) { + var r = c0(x); + K(x, 27); + var e = qx(r, c0(x)); + K(x, 4); + var t = d(Y0[7], x); + K(x, 5); + var u = D4(1, x), i = p(Y0[2], 0, u); + return 1 - x[5] && B4(i) && d3(x, i[1]), [41, [ + 0, + t, + i, + r0([0, e], 0, D) + ]]; + } + var mA0 = 0; + function hA0(x) { + var r = c0(x), e = d(Y0[7], x), t = L(x), u = e[2]; + if (u[0] === 10 && typeof t == "number" && t === 88) { + var i = u[1], c = i[2][1], v = e[1]; + K(x, 88), R2[3].call(null, c, x[3]) && B0(x, [ + 0, + v, + [ + 25, + N30, + c + ] + ]); + var o = x[33], l = x[32], k = x[31], h = x[30], E = x[29], T = x[28], I = x[27], N = x[26], P = x[25], R = x[24], q = x[23], X = x[22], B = x[21], z = x[20], x0 = x[19], W = x[18], Z = x[17], t0 = x[16], i0 = x[15], u0 = x[14], k0 = x[13], o0 = x[12], S0 = x[11], s0 = x[10], v0 = x[9], m0 = x[8], p0 = x[7], E0 = x[6], b0 = x[5], C0 = x[4], D0 = R2[4].call(null, c, x[3]), U0 = [ + 0, + x[1], + x[2], + D0, + C0, + b0, + E0, + p0, + m0, + v0, + s0, + S0, + o0, + k0, + u0, + i0, + t0, + Z, + W, + x0, + z, + B, + X, + q, + R, + P, + N, + I, + T, + E, + h, + k, + l, + o + ]; + return [31, [ + 0, + i, + $o(U0) ? aY(U0) : p(Y0[2], 0, U0), + r0([0, r], 0, D) + ]]; + } + var M0 = o2(O30, 0, x); + if (M0[0] === 0) var y0 = e, G = M0[1]; + else var y0 = p(M0[1][2], e, function(j0, Q0) { + return p(zx(j0, cn, 73), j0, Q0); + }), G = 0; + return [23, [ + 0, + y0, + 0, + r0(0, [0, G], D) + ]]; + } + var dA0 = 0; + function yA0(x) { + function r(e) { + var t = c0(e), u = EU(G0(e)); + if (L(e) === 35) { + var i = G0(e); + w0(e); + var c = [0, i]; + } else var c = 0; + var v = d(Y0[27], e); + if (Rr(e, 16)) { + K(e, 4); + var o = d(Y0[7], e); + K(e, 5); + var l = [0, o]; + } else var l = 0; + if (L(e) === 88) { + var k = G0(e); + w0(e); + var h = [0, k]; + } else { + K(e, 11); + var h = 0; + } + var T = e[13] === 1 ? e : [ + 0, + e[1], + e[2], + e[3], + e[4], + e[5], + e[6], + e[7], + e[8], + e[9], + e[10], + e[11], + e[12], + 1, + e[14], + e[15], + e[16], + e[17], + e[18], + e[19], + e[20], + e[21], + e[22], + e[23], + e[24], + e[25], + e[26], + e[27], + e[28], + e[29], + e[30], + e[31], + e[32], + e[33] + ], I = p(Y0[2], i30, T); + return Rr(e, 9), [ + 0, + v, + I, + l, + r0([0, t], [0, L0(e)], D), + [ + 0, + c, + h, + 0 + ], + u + ]; + } + return e0(0, function(e) { + var t = c0(e), u = G0(e); + if (K(e, 21), s2(e)) throw J0(Xt, 1); + var i = k5(e); + if (s2(e) || 1 - Rr(e, 0)) throw J0(Xt, 1); + for (var o = 0, l = DX(e, i);;) { + var k = L(e); + x: if (typeof k == "number") { + if (k !== 1 && wr !== k) break x; + var h = cx(o); + return K(e, 1), [32, [ + 0, + l, + h, + u, + r0([0, t], [0, L0(e)], D) + ]]; + } + var o = [ + 0, + e0(0, r, e), + o + ]; + } + }, x); + } + function _A0(x, r) { + var e = x ? x[1] : 0; + 1 - d1(r) && Bx(r, Ct); + var t = Qx(1, r); + if (typeof t == "number") switch (t) { + case 26: return A5(0, r); + case 29: return A5(2, r); + case 30: return A5(1, r); + case 42: return e0(0, function(k) { + var h = c0(k); + return K(k, 62), [6, Rj(h, k)]; + }, r); + case 48: + if (L(r) === 52) return g5(r); + break; + case 50: + if (r[30][2]) return e0(0, function(k) { + var h = c0(k); + return K(k, 62), [8, sY[1].call(null, [0, h], k)]; + }, r); + break; + case 51: + if (e) return EY(r); + break; + case 55: return e0(0, function(k) { + var h = c0(k); + return K(k, 62), [11, E5(h, k)]; + }, r); + case 63: + var u = L(r); + return typeof u == "number" && u === 52 && e ? g5(r) : e0(0, function(k) { + var h = c0(k); + return K(k, 62), [15, b5(h, k)]; + }, r); + case 64: return e0(0, function(k) { + var h = c0(k); + return K(k, 62), [16, T5(c30, h, k)]; + }, r); + case 15: + case 66: return _Y(r); + } + else if (t[0] === 4) { + var i = t[3]; + if (C(i, Ta)) { + if (!C(i, NL)) return gY(r, 1); + if (C(i, Lv)) { + if (!C(i, aM)) { + var c = G0(r), v = c0(r); + K(r, 62); + var o = qx(v, c0(r)); + return Xs(r, l30), L(r) === 10 ? e0([0, c], function(k) { + var h = c0(k); + K(k, 10); + var E = c0(k); + Xs(k, k30); + var T = _l([ + 0, + o, + [ + 0, + h, + [ + 0, + E, + [ + 0, + c0(k), + 0 + ] + ] + ] + ]), I = Va(k), N = o2(0, 0, k); + if (N[0] === 0) var P = N[1], R = I; + else var P = 0, R = p(N[1][2], I, function(q, X) { + return p(zx(q, ZA, 92), q, X); + }); + return [13, [ + 0, + R, + r0([0, T], [0, P], D) + ]]; + }, r) : e0([0, c], d(vY[1], o), r); + } + if (!C(i, rE)) return gY(r, 0); + } else if (r[30][1]) return _Y(r); + } else if (r[30][1]) return e0(0, function(k) { + var h = c0(k); + return K(k, 62), [7, Fj(h, k)]; + }, r); + } + if (!e) return p(Y0[2], 0, r); + var l = L(r); + return typeof l == "number" && l === 52 ? g5(r) : A5(0, r); + } + function wA0(x) { + var r = c0(x); + K(x, 22); + var e = p(Y0[13], 0, x), t = Oe(x); + if (t) var u = t[1], i = [0, p(P1(x)[2], u, function(o, l) { + return Z0(zx(o, G8, Te), o, 13, l); + })]; + else var i = 0; + return [33, [ + 0, + e, + i, + L(x) === 54 ? [0, KO(x, Ej(x, 1))] : 0, + e0(US0, BS0, x), + r0([0, r], 0, D) + ]]; + } + var gA0 = 0, bA0 = 0; + function qY(x, r, e) { + var t = kX(1, x), u = c4(Lj[2], t, r, e, k40), i = u[4], c = u[3], v = u[2], o = kX(0, u[1]), l = cx(v); + return P2(d(Lj[1], o), l), [ + 0, + o, + c, + i + ]; + } + function BY(x) { + var r = gj(x), e = L(x); + if (typeof e == "number") { + var t = e - 51 | 0; + if (11 >= t >>> 0) switch (t) { + case 0: + var u = mX(1, Ka(1, x)), i = c0(u), c = G0(u); + K(u, 51); + var v = L(u); + if (typeof v == "number") { + if (55 <= v) { + if (65 > v) switch (v - 55 | 0) { + case 0: return e0([0, c], function(E) { + 1 - d1(E) && Bx(E, Te); + var T = 0, I = e0(0, function(P) { + return E5(T, P); + }, E); + return [22, [ + 0, + [0, [ + 0, + I[1], + [30, I[2]] + ]], + 0, + 0, + 0, + r0([0, i], 0, D) + ]]; + }, u); + case 8: + if (Qx(1, u) !== 0) return e0([0, c], function(E) { + 1 - d1(E) && Bx(E, Te); + var T = Qx(1, E); + if (typeof T == "number") { + if (T === 50) return Bx(E, 17), K(E, 63), [22, [ + 0, + 0, + 0, + 0, + 0, + r0([0, i], 0, D) + ]]; + if (d2 === T) { + K(E, 63); + var I = G0(E); + K(E, d2); + var N = Q4(E), P = N[1]; + return [22, [ + 0, + 0, + [0, [1, [ + 0, + I, + 0 + ]]], + [0, P], + 0, + r0([0, i], [0, N[2]], D) + ]]; + } + } + var R = 0, q = e0(0, function(B) { + return b5(R, B); + }, E); + return [22, [ + 0, + [0, [ + 0, + q[1], + [38, q[2]] + ]], + 0, + 0, + 0, + r0([0, i], 0, D) + ]]; + }, u); + break; + case 9: return e0([0, c], function(E) { + var T = e0(0, function(N) { + return T5(0, 0, N); + }, E); + return [22, [ + 0, + [0, [ + 0, + T[1], + [39, T[2]] + ]], + 0, + 0, + 0, + r0([0, i], 0, D) + ]]; + }, u); + } + } else if (v === 38) return e0([0, c], function(E) { + var T = qx(i, c0(E)), I = e0(0, function(x0) { + return K(x0, 38); + }, E)[1], N = hX(1, E); + x: { + if (!$o(N) && !Jd(N)) { + if (F4(N)) { + var B = 0, z = [0, d5(N, r)]; + break x; + } + if (L(N) === 50) { + var B = 0, z = [0, SG(0)(N)]; + break x; + } + if (YO(N)) { + var B = 0, z = [0, sj(N)]; + break x; + } + var P = d(Y0[10], N), R = o2(0, 0, N); + if (R[0] === 0) var q = R[1], X = P; + else var q = 0, X = p(R[1][2], P, function(Z, t0) { + return p(zx(Z, cn, 94), Z, t0); + }); + var B = q, z = [1, X]; + break x; + } + var B = 0, z = [0, K4(N)]; + } + return [21, [ + 0, + I, + z, + r0([0, T], [0, B], D) + ]]; + }, u); + } + if (F4(u)) return e0([0, c], function(E) { + return [22, [ + 0, + [0, d5(E, r)], + 0, + 0, + 1, + r0([0, i], 0, D) + ]]; + }, u); + if (!$o(u) && !Jd(u)) { + if (typeof v == "number") { + var o = v + z3 | 0; + if (4 < o >>> 0) { + if (o === 24 && u[30][2]) return e0([0, c], function(E) { + return [22, [ + 0, + [0, p(Y0[3], [0, r], E)], + 0, + 0, + 1, + r0([0, i], 0, D) + ]]; + }, u); + } else if (1 < o - 1 >>> 0) return e0([0, c], function(E) { + return [22, [ + 0, + [0, p(Y0[3], [0, r], E)], + 0, + 0, + 1, + r0([0, i], 0, D) + ]]; + }, u); + } + if (YO(u)) return e0([0, c], function(E) { + return [22, [ + 0, + [0, sj(E)], + 0, + 0, + 1, + r0([0, i], 0, D) + ]]; + }, u); + if (typeof v == "number" && d2 === v) return e0([0, c], function(E) { + var T = G0(E); + K(E, d2); + var I = L(E); + x: { + if (typeof I != "number" && I[0] === 4 && !C(I[3], It)) { + w0(E); + var N = [0, W1(E)]; + break x; + } + var N = 0; + } + var P = Q4(E), R = P[1]; + return [22, [ + 0, + 0, + [0, [1, [ + 0, + T, + N + ]]], + [0, R], + 1, + r0([0, i], [0, P[2]], D) + ]]; + }, u); + var l = Rr(u, 63) ? 0 : 1; + return Rr(u, 0) ? e0([0, c], function(E) { + var T = bY(0, E, 0); + K(E, 1); + var I = L(E); + x: { + if (typeof I != "number" && I[0] === 4 && !C(I[3], K6)) { + var N = Q4(E), P = N[2], R = N[1], B = yn(function(i0) { + var u0 = i0[2]; + return [ + 0, + i0[1], + [ + 0, + u0[1], + u0[2], + 1, + u0[4] + ] + ]; + }, T), z = P, x0 = [0, R]; + break x; + } + TY(E, T); + var q = o2(0, 0, E), X = q[0] === 0 ? q[1] : q[1][1], B = T, z = X, x0 = 0; + } + return [22, [ + 0, + 0, + [0, [0, B]], + x0, + l, + r0([0, i], [0, z], D) + ]]; + }, u) : (v1(_30, u), p(Y0[3], [0, r], u)); + } + return e0([0, c], function(E) { + Kd(E)(r); + return [22, [ + 0, + [0, K4(E)], + 0, + 0, + 1, + r0([0, i], 0, D) + ]]; + }, u); + case 1: + Kd(x)(r); + var k = Qx(1, x); + x: { + r: if (typeof k == "number") { + if (k !== 4 && k !== 10) break r; + var h = Dj(0)(x); + break x; + } + var h = g5(x); + } + return h; + case 11: + if (Qx(1, x) === 51) return Kd(x)(r), EY(x); + break; + } + } + return O5([0, r], x); + } + function UY(x, r) { + return Z0(FY[1], r, x, 0); + } + function XY(x, r) { + var e = qY(r, x, function(i) { + return O5(0, i); + }), t = e[3], u = e[2]; + return [ + 0, + y2(function(i, c) { + return [ + 0, + c, + i + ]; + }, qj(x, e[1]), u), + t + ]; + } + function qj(x, r) { + return Z0(MY[1], r, x, 0); + } + function O5(x, r) { + var e = x ? x[1] : 0; + 1 - F4(r) && Kd(r)(e); + var t = L(r); + if (typeof t == "number") { + if (t === 29) return e0(vA0, oA0, r); + if (t === 30) return e0(pA0, lA0, r); + } + if (!$o(r) && !Jd(r)) { + if (F4(r)) return d5(r, e); + if (typeof t == "number") { + var u = t - 50 | 0; + if (14 >= u >>> 0) switch (u) { + case 0: + if (r[30][2]) return SG(0)(r); + break; + case 5: + if (!TX(1, r)) return Dj(0)(r); + var i = 0, c = e0(0, function(E) { + return E5(i, E); + }, r); + return [ + 0, + c[1], + [30, c[2]] + ]; + case 12: return _A0(0, r); + case 13: + if (Us(1, r) && !bX(1, r)) { + var v = 0, o = e0(0, function(E) { + return b5(v, E); + }, r); + return [ + 0, + o[1], + [38, o[2]] + ]; + } + return p(Y0[2], 0, r); + case 14: + var l = Qx(1, r); + if (typeof l == "number" && l === 63) { + var k = 0, h = e0(0, function(E) { + return T5(s30, k, E); + }, r); + return [ + 0, + h[1], + [39, h[2]] + ]; + } + return p(Y0[2], 0, r); + } + } + return YO(r) ? sj(r) : GY(0, r); + } + return K4(r); + } + function GY(x, r) { + for (var e = x;;) { + var u = Dj([0, e ? e[1] : 1]), i = L(r); + if (typeof i == "number" && Ca > i) switch (i) { + case 0: + var c = d(Y0[15], r), v = c[1], o = c[2]; + return [ + 0, + v, + [0, p($a(r)[2], o, function(p0, E0) { + return Z0(zx(p0, Ok, 77), p0, v, E0); + })] + ]; + case 8: + var l = G0(r), k = c0(r); + return K(r, 8), [ + 0, + l, + [19, [0, r0([0, k], [0, $a(r)[1]], D)]] + ]; + case 16: return mY(r); + case 19: return e0(eA0, rA0, r); + case 20: return e0(nA0, tA0, r); + case 21: + if (r[30][3] && !Vo(1, r) && Qx(1, r) === 4) { + var h = Wd(r, yA0); + return h ? h[1] : u(r); + } + break; + case 22: + if (r[30][4] && !Vo(1, r) && Us(1, r)) return e0(gA0, wA0, r); + break; + case 24: return e0(iA0, uA0, r); + case 25: return e0(cA0, fA0, r); + case 26: return e0(aA0, sA0, r); + case 27: return e0(mA0, kA0, r); + case 28: + var E = e0(0, function(p0) { + var E0 = c0(p0); + K(p0, 28); + var b0 = qx(E0, c0(p0)); + K(p0, 4); + var C0 = d(Y0[7], p0); + K(p0, 5); + var D0 = p(Y0[2], 0, p0); + return 1 - p0[5] && B4(D0) && d3(p0, D0[1]), [42, [ + 0, + C0, + D0, + r0([0, b0], 0, D) + ]]; + }, r), T = E[1], I = E[2]; + return pt(r, [ + 0, + T, + 77 + ]), [ + 0, + T, + I + ]; + case 34: + var N = c0(r), P = e0(0, function(p0) { + K(p0, 34); + x: { + if (L(p0) !== 8 && !ql(p0)) { + var E0 = p(Y0[13], 0, p0), b0 = E0[2][1], C0 = E0[1]; + 1 - R2[3].call(null, b0, p0[3]) && B0(p0, [ + 0, + C0, + [31, b0] + ]); + var D0 = [0, E0]; + break x; + } + var D0 = 0; + } + var U0 = o2(0, 0, p0); + x: { + if (U0[0] === 0) var T0 = U0[1]; + else { + var M0 = U0[1], y0 = M0[1]; + if (D0) { + var G = [0, p(M0[2], D0[1], function(xx, fx) { + return p(zx(xx, sl, 75), xx, fx); + })], j0 = 0; + break x; + } + var T0 = y0; + } + var G = D0, j0 = T0; + } + return [ + 0, + G, + j0 + ]; + }, r), R = P[2], q = R[1], X = P[1], B = q === 0 ? 1 : 0, z = R[2]; + if (B) var x0 = r[8], W = x0 || r[9], Z = 1 - W; + else var Z = B; + return Z && B0(r, [ + 0, + X, + [15, r[13]] + ]), [ + 0, + X, + [1, [ + 0, + q, + r0([0, N], [0, z], D) + ]] + ]; + case 37: + var t0 = c0(r), i0 = e0(0, function(p0) { + K(p0, 37); + x: { + if (L(p0) !== 8 && !ql(p0)) { + var E0 = p(Y0[13], 0, p0), b0 = E0[2][1], C0 = E0[1]; + 1 - R2[3].call(null, b0, p0[3]) && B0(p0, [ + 0, + C0, + [31, b0] + ]); + var D0 = [0, E0]; + break x; + } + var D0 = 0; + } + var U0 = o2(0, 0, p0); + x: { + if (U0[0] === 0) var T0 = U0[1]; + else { + var M0 = U0[1], y0 = M0[1]; + if (D0) { + var G = [0, p(M0[2], D0[1], function(xx, fx) { + return p(zx(xx, sl, 76), xx, fx); + })], j0 = 0; + break x; + } + var T0 = y0; + } + var G = D0, j0 = T0; + } + return [ + 0, + G, + j0 + ]; + }, r), u0 = i0[2], k0 = i0[1], o0 = u0[2], S0 = u0[1]; + return 1 - r[8] && B0(r, [ + 0, + k0, + 25 + ]), [ + 0, + k0, + [4, [ + 0, + S0, + r0([0, t0], [0, o0], D) + ]] + ]; + case 39: return e0(QS0, $S0, r); + case 41: return e0(xA0, ZS0, r); + case 45: return mY(r); + case 61: return e0(VS0, WS0, r); + case 115: return v1(m40, r), [ + 0, + G0(r), + h40 + ]; + case 1: + case 5: + case 7: + case 9: + case 10: + case 11: + case 12: + case 17: + case 18: + case 35: + case 36: + case 38: + case 40: + case 43: + case 44: + case 51: + case 85: + case 88: + v1(d40, r), w0(r); + var e = 0; + continue; + } + if (!$o(r) && !Jd(r)) { + if (typeof i == "number" && i === 30 && Qx(1, r) === 6) { + var s0 = Ll(1, r); + return B0(r, [ + 0, + Br(G0(r), s0), + 3 + ]), u(r); + } + return Bt(r) ? e0(dA0, hA0, r) : (F4(r) && (v1(0, r), w0(r)), u(r)); + } + var v0 = K4(r); + return d3(r, v0[1]), v0; + } + } + Dr(Lj, [ + 0, + function(x, r) { + if (typeof r != "number" && r[0] === 2) { + var e = r[1], t = e[4], u = e[1]; + return t && pt(x, [ + 0, + u, + 79 + ]); + } + return Px(Gx(_40, Gx(jU(r), y40))); + }, + function(x, r, e, t) { + for (var u = x, i = t;;) { + var c = i[3], v = i[2], o = i[1], l = L(u); + if (typeof l == "number" && wr === l) return [ + 0, + u, + o, + v, + c + ]; + if (d(r, l)) return [ + 0, + u, + o, + v, + c + ]; + if (typeof l != "number" && l[0] === 2) { + var k = d(e, u), h = [ + 0, + k, + v + ], E = k[2]; + if (E[0] === 23) { + var T = E[1][2]; + if (T) { + var I = Sr(T[1], "use strict"), N = k[1]; + I && 1 - u[23] && B0(u, [ + 0, + N, + 82 + ]); + var R = I ? Ka(1, u) : u, q = [ + 0, + l, + o + ], X = c || I, u = R, i = [ + 0, + q, + h, + X + ]; + continue; + } + } + return [ + 0, + u, + o, + h, + c + ]; + } + return [ + 0, + u, + o, + v, + c + ]; + } + } + ]), Dr(FY, [0, function(x, r, e) { + for (var t = e;;) { + var u = L(x); + if (typeof u == "number" && wr === u || d(r, u)) return cx(t); + var t = [ + 0, + BY(x), + t + ]; + } + }]), Dr(MY, [0, function(x, r, e) { + for (var t = e;;) { + var u = L(x); + if (typeof u == "number" && wr === u || d(r, u)) return cx(t); + var t = [ + 0, + O5(0, x), + t + ]; + } + }]), Dr(LY, [0, function(x, r, e) { + var t = 1 - x, u = RY([0, r], e), i = t && (L(e) === 87 ? 1 : 0); + return i && (1 - d1(e) && Bx(e, p2), K(e, 87)), [ + 0, + u, + nj(e), + i + ]; + }]), ZB(E40[1], Y0, [ + 0, + function(x) { + var r = L(x); + x: { + if (typeof r != "number" && r[0] === 6) { + var e = r[2], t = r[1]; + w0(x); + var u = [0, [ + 0, + t, + e + ]]; + break x; + } + var u = 0; + } + var i = c0(x); + x: { + r: { + for (var c = cx(i), v = 5; c;) { + var o = c[2], l = c[1], k = l[2], h = l[1], E = k[2]; + e: { + t: { + for (var T = 0, I = Rx(E);;) { + if (I < (T + 5 | 0)) break t; + var N = Sr(C2(E, T, v), "@flow"); + if (N) break; + var T = T + 1 | 0; + } + var P = N; + break e; + } + var P = 0; + } + if (P) break r; + var c = o; + } + var R = 0; + break x; + } + x[33][1] = h[3]; + var R = cx([ + 0, + [ + 0, + h, + k + ], + o + ]); + } + x: if (R === 0) { + if (i) { + var q = i[1], X = q[2]; + if (!X[1]) { + var B = X[2], z = q[1]; + if (1 <= Rx(B) && F1(B, 0) === 42) { + x[33][1] = z[3]; + var x0 = [ + 0, + q, + 0 + ]; + break x; + } + } + } + var x0 = 0; + } else var x0 = R; + function W(s0) { + return 0; + } + var Z = qY(x, W, BY), t0 = Z[2], i0 = y2(function(s0, v0) { + return [ + 0, + v0, + s0 + ]; + }, UY(W, Z[1]), t0), u0 = G0(x); + if (K(x, wr), y2(function(s0, v0) { + var m0 = v0[2]; + switch (m0[0]) { + case 21: return U4(x, s0, wn(0, [ + 0, + m0[1][1], + w40 + ])); + case 22: + var p0 = m0[1], E0 = p0[1]; + if (E0) { + if (!p0[2]) { + var b0 = E0[1], C0 = b0[2], D0 = b0[1]; + x: { + switch (C0[0]) { + case 40: return y2(function(G, j0) { + return U4(x, G, j0); + }, s0, y2(function(G, j0) { + return y2($O, G, [ + 0, + j0[2][1], + 0 + ]); + }, 0, C0[1][1])); + case 2: + case 27: + var U0 = C0[1][1]; + if (U0) { + var T0 = U0[1]; + break x; + } + break; + case 3: + case 20: + case 30: + case 33: + case 38: + case 39: + var T0 = C0[1][1]; + break x; + } + return s0; + } + return U4(x, s0, wn(0, [ + 0, + D0, + T0[2][1] + ])); + } + } else { + var M0 = p0[2]; + if (M0) { + var y0 = M0[1]; + return y0[0] === 0 ? y2(function(G, j0) { + var Q0 = j0[2], q0 = Q0[2], ix = Q0[1]; + return q0 ? U4(x, G, q0[1]) : U4(x, G, ix); + }, s0, y0[1]) : s0; + } + } + return s0; + default: return s0; + } + }, R2[1], i0), i0) var k0 = v4(cx(i0))[1], o0 = Br(v4(i0)[1], k0); + else var o0 = u0; + var S0 = cx(x[2][1]); + return [ + 0, + o0, + [ + 0, + i0, + u, + r0([0, x0], 0, D), + S0 + ] + ]; + }, + GY, + O5, + qj, + XY, + UY, + function(x) { + var r = G0(x), e = xt(x), t = L(x); + return typeof t == "number" && t === 9 ? hj(x, r, [ + 0, + e, + 0 + ]) : e; + }, + function(x) { + var r = G0(x), e = W4(x), t = L(x); + return typeof t == "number" && t === 9 ? [0, hj(x, r, [ + 0, + a2(x, e), + 0 + ])] : e; + }, + function(x) { + return a2(x, BG(x)); + }, + xt, + lj, + function(x) { + var r = e0(0, function(t) { + var u = c0(t); + K(t, 0); + x: for (var i = 0, c = [ + 0, + 0, + hn + ];;) { + var v = c[2], o = c[1], l = L(t); + if (typeof l == "number") { + if (l === 1) break x; + if (wr === l) break; + } + var k = jS0(t), h = k[1], E = k[2]; + r: { + if (h[0] === 1 && L(t) === 9) { + var T = [0, G0(t)]; + break r; + } + var T = 0; + } + var I = oj(E, v), N = L(t); + r: { + e: if (typeof N == "number") { + var P = N - 2 | 0; + if (h2 < P >>> 0) { + if (k2 < P + 1 >>> 0) break e; + } else { + if (P !== 7) break e; + w0(t); + } + var B = I; + break r; + } + var q = EX([0, CO(ka0, 9)], L(t)), X = [ + 0, + G0(t), + q + ]; + Rr(t, 8); + var B = [ + 0, + [ + 0, + X, + I[1] + ], + [ + 0, + X, + I[2] + ] + ]; + } + var i = T, c = [ + 0, + [ + 0, + h, + o + ], + B + ]; + } + var x0 = AG(i ? [ + 0, + v[1], + [ + 0, + [ + 0, + i[1], + 93 + ], + v[2] + ] + ] : v), W = cx(o), Z = c0(t); + return K(t, 1), [ + 0, + [ + 0, + W, + I1([0, u], [0, L0(t)], Z, D) + ], + x0 + ]; + }, x), e = r[2]; + return [ + 0, + r[1], + e[1], + e[2] + ]; + }, + RY, + function(x, r, e) { + var t = r ? r[1] : 0; + return e0(0, p(LY[1], t, e), x); + }, + function(x) { + var r = G0(x), e = c0(x); + K(x, 0); + var t = qj(function(v) { + return v === 1 ? 1 : 0; + }, x), u = G0(x), i = t === 0 ? c0(x) : 0; + K(x, 1); + var c = [ + 0, + t, + I1([0, e], [0, L0(x)], i, D) + ]; + return [ + 0, + Br(r, u), + c + ]; + }, + function(x) { + function r(t) { + var u = c0(t); + K(t, 0); + var i = XY(function(h) { + return h === 1 ? 1 : 0; + }, t), c = i[1], v = i[2], o = c === 0 ? c0(t) : 0; + K(t, 1); + var l = L(t); + x: { + r: if (!x) { + if (typeof l == "number" && (l === 1 || wr === l)) break r; + if (s2(t)) { + var k = Wa(t); + break x; + } + var k = 0; + break x; + } + var k = L0(t); + } + return [ + 0, + [ + 0, + c, + I1([0, u], [0, k], o, D) + ], + v + ]; + } + var e = 0; + return function(t) { + return HO(e, r, t); + }; + }, + function(x) { + return jY(bA0, x); + }, + Z4, + I5, + rv, + d5, + function(x) { + return e0(qS0, LS0, x); + }, + function(x) { + for (var r = x;;) { + var e = r[2]; + x: { + switch (e[0]) { + case 24: + var t = e[1], u = t[1][2][1]; + if (C(u, W2)) { + if (!C(u, Yv) && !C(t[2][2][1], Ih)) return 0; + } else if (!C(t[2][2][1], w6)) return 0; + break; + case 36: + var i = e[1]; + if (8 > i[1]) break x; + var r = i[2]; + continue; + case 0: + case 10: + case 23: + case 26: break; + default: break x; + } + return 1; + } + return 0; + } + }, + kj, + Va, + mj, + v5 + ]); + var Bj = [ + t1, + _E0, + js(0) + ], Uj = [ + 0, + Bj, + [0] + ], TA0 = id(hE0, function(x) { + var r = lO(x, dE0)[42], e = hO(x, 0, 0, yE0, bO, 1)[1]; + return $B(x, r, function(t, u) { + return 0; + }), function(t, u) { + var i = fd(u, x); + return d(e, i), dO(u, i, x); + }; + }), EA0 = [ + t1, + xr0, + js(0) + ]; + function SA0(x) { + if (typeof x == "number") { + var r = x; + if (58 <= r) switch (r) { + case 58: return UZ; + case 59: return XZ; + case 60: return GZ; + case 61: return YZ; + case 62: return zZ; + case 63: return JZ; + case 64: return KZ; + case 65: return HZ; + case 66: return WZ; + case 67: return VZ; + case 68: return $Z; + case 69: return QZ; + case 70: return ZZ; + case 71: return x00; + case 72: return r00; + case 73: return e00; + case 74: return t00; + case 75: return n00; + case 76: return u00; + case 77: return i00; + case 78: return f00; + case 79: return c00; + case 80: return s00; + case 81: return a00; + case 82: return o00; + case 83: return v00; + case 84: return l00; + case 85: return p00; + case 86: return k00; + case 87: return m00; + case 88: return h00; + case 89: return d00; + case 90: return y00; + case 91: return _00; + case 92: return w00; + case 93: return g00; + case 94: return b00; + case 95: return T00; + case 96: return E00; + case 97: return S00; + case 98: return A00; + case 99: return I00; + case 100: return P00; + case 101: return C00; + case 102: return N00; + case 103: return O00; + case 104: return j00; + case 105: return D00; + case 106: return R00; + case 107: return F00; + case 108: return M00; + case 109: return L00; + case 110: return q00; + case 111: return B00; + case 112: return U00; + case 113: return X00; + case 114: return G00; + default: return Y00; + } + switch (r) { + case 0: return RQ; + case 1: return FQ; + case 2: return MQ; + case 3: return LQ; + case 4: return qQ; + case 5: return BQ; + case 6: return UQ; + case 7: return XQ; + case 8: return GQ; + case 9: return YQ; + case 10: return zQ; + case 11: return Gx(KQ, JQ); + case 12: return HQ; + case 13: return WQ; + case 14: return VQ; + case 15: return $Q; + case 16: return QQ; + case 17: return ZQ; + case 18: return xZ; + case 19: return rZ; + case 20: return eZ; + case 21: return tZ; + case 22: return nZ; + case 23: return uZ; + case 24: return iZ; + case 25: return fZ; + case 26: return cZ; + case 27: return sZ; + case 28: return aZ; + case 29: return Gx(vZ, oZ); + case 30: return lZ; + case 31: return pZ; + case 32: return kZ; + case 33: return mZ; + case 34: return hZ; + case 35: return dZ; + case 36: return yZ; + case 37: return _Z; + case 38: return wZ; + case 39: return gZ; + case 40: return bZ; + case 41: return TZ; + case 42: return EZ; + case 43: return SZ; + case 44: return AZ; + case 45: return IZ; + case 46: return PZ; + case 47: return CZ; + case 48: return NZ; + case 49: return OZ; + case 50: return jZ; + case 51: return DZ; + case 52: return RZ; + case 53: return FZ; + case 54: return MZ; + case 55: return LZ; + case 56: return qZ; + default: return BZ; + } + } + switch (x[0]) { + case 0: + var e = x[1]; + return d(vr(z00), e); + case 1: + var t = x[1]; + return d(vr(J00), t); + case 2: + var u = x[2], i = x[1]; + return p(vr(K00), u, i); + case 3: + var c = x[2], v = x[1]; + return Z0(vr(H00), c, c, v); + case 4: + var o = x[2], l = x[1]; + return p(vr(W00), o, l); + case 5: + var k = x[1]; + return d(vr(V00), k); + case 6: return x[1] ? $00 : Q00; + case 7: + var h = x[2], E = x[1], T = d(vr(Z00), E); + if (!h) return d(vr(rx0), T); + var I = h[1]; + return p(vr(xx0), I, T); + case 8: + var N = x[1]; + return p(vr(ex0), N, N); + case 9: + var P = x[3], R = x[2], q = x[1]; + if (!R) return p(vr(ux0), P, q); + var X = R[1]; + if (X === 3) return p(vr(nx0), P, q); + switch (X) { + case 0: + var B = t$; + break; + case 1: + var B = n$; + break; + case 2: + var B = u$; + break; + case 3: + var B = i$; + break; + default: var B = f$; + } + return c4(vr(tx0), q, B, P, B); + case 10: + var z = x[2], x0 = x[1], W = xB(z); + return Z0(vr(ix0), z, W, x0); + case 11: + var Z = x[2], t0 = x[1]; + return p(vr(fx0), Z, t0); + case 12: + var i0 = x[1]; + return d(vr(cx0), i0); + case 13: + var u0 = x[1]; + return d(vr(sx0), u0); + case 14: return x[1] ? Gx(ox0, ax0) : Gx(lx0, vx0); + case 15: + var k0 = x[1] ? px0 : kx0; + return d(vr(mx0), k0); + case 16: + var o0 = x[1], S0 = x[4], s0 = x[3], v0 = x[2] ? hx0 : dx0, m0 = s0 ? yx0 : _x0, p0 = S0 ? Gx(wx0, o0) : o0; + return Z0(vr(gx0), v0, m0, p0); + case 17: return bx0; + case 18: + var E0 = x[2], b0 = x[1], C0 = rB(45, E0); + if (C0) var D0 = C0[1], U0 = C0[2] ? Zq(DQ, [ + 0, + D0, + yn(xB, C0[2]) + ]) : D0; + else var U0 = E0; + var T0 = b0 ? Tx0 : Ex0; + return Z0(vr(Sx0), E0, U0, T0); + case 19: + var M0 = x[1] ? Ax0 : Ix0; + return d(vr(Px0), M0); + case 20: + var y0 = x[1]; + return d(vr(Cx0), y0); + case 21: + var G = R6 <= x[1] ? Nx0 : Ox0; + return d(vr(jx0), G); + case 22: + var j0 = x[1]; + return d(vr(Dx0), j0); + case 23: + var Q0 = x[1]; + return d(vr(Rx0), Q0); + case 24: + var q0 = x[3], ix = x[1], xx = x[2] ? Fx0 : Mx0, fx = q0 ? Lx0 : qx0; + return Z0(vr(Bx0), xx, fx, ix); + case 25: + var yx = x[2], R0 = x[1]; + return p(vr(Ux0), R0, yx); + case 26: + var lx = x[1]; + if (_6 === lx) var kx = Jx0, Q = Kx0; + else if (z6 <= lx) var kx = Xx0, Q = Gx0; + else var kx = Yx0, Q = zx0; + return p(vr(Hx0), Q, kx); + case 27: + var I0 = x[1]; + return d(vr(Wx0), I0); + case 28: + var M = x[1]; + return d(vr(Vx0), M); + case 29: + var d0 = x[2], g0 = x[1]; + return p(vr($x0), g0, d0); + case 30: + var h0 = x[2], A0 = x[1]; + return p(vr(Qx0), A0, h0); + default: + var $0 = x[1]; + return d(vr(Zx0), $0); + } + } + function AA0(x, r) { + var e = x[2]; + function t(px) { + return O2(px, r); + } + var u = x[1]; + switch (e[0]) { + case 0: + var i = e[1], c = pd(i[2], r), Y = [0, [ + 0, + i[1], + c + ]]; + break; + case 1: + var v = e[1], o = t(v[2]), Y = [1, [ + 0, + v[1], + o + ]]; + break; + case 2: + var l = e[1], k = t(l[7]), Y = [2, [ + 0, + l[1], + l[2], + l[3], + l[4], + l[5], + l[6], + k + ]]; + break; + case 3: + var h = e[1], E = h[7], T = t(h[6]), Y = [3, [ + 0, + h[1], + h[2], + h[3], + h[4], + h[5], + T, + E + ]]; + break; + case 4: + var I = e[1], N = t(I[2]), Y = [4, [ + 0, + I[1], + N + ]]; + break; + case 5: + var Y = [5, [0, t(e[1][1])]]; + break; + case 6: + var P = e[1], R = t(P[7]), Y = [6, [ + 0, + P[1], + P[2], + P[3], + P[4], + P[5], + P[6], + R + ]]; + break; + case 7: + var q = e[1], X = t(q[5]), Y = [7, [ + 0, + q[1], + q[2], + q[3], + q[4], + X + ]]; + break; + case 8: + var B = e[1], z = t(B[3]), Y = [8, [ + 0, + B[1], + B[2], + z + ]]; + break; + case 9: + var x0 = e[1], W = t(x0[5]), Y = [9, [ + 0, + x0[1], + x0[2], + x0[3], + x0[4], + W + ]]; + break; + case 10: + var Z = e[1], t0 = t(Z[4]), Y = [10, [ + 0, + Z[1], + Z[2], + Z[3], + t0 + ]]; + break; + case 11: + var i0 = e[1], u0 = t(i0[5]), Y = [11, [ + 0, + i0[1], + i0[2], + i0[3], + i0[4], + u0 + ]]; + break; + case 12: + var k0 = e[1], o0 = t(k0[3]), Y = [12, [ + 0, + k0[1], + k0[2], + o0 + ]]; + break; + case 13: + var S0 = e[1], s0 = t(S0[2]), Y = [13, [ + 0, + S0[1], + s0 + ]]; + break; + case 14: + var v0 = e[1], m0 = t(v0[3]), Y = [14, [ + 0, + v0[1], + v0[2], + m0 + ]]; + break; + case 15: + var p0 = e[1], E0 = t(p0[4]), Y = [15, [ + 0, + p0[1], + p0[2], + p0[3], + E0 + ]]; + break; + case 16: + var b0 = e[1], C0 = t(b0[7]), Y = [16, [ + 0, + b0[1], + b0[2], + b0[3], + b0[4], + b0[5], + b0[6], + C0 + ]]; + break; + case 17: + var D0 = e[1], U0 = t(D0[4]), Y = [17, [ + 0, + D0[1], + D0[2], + D0[3], + U0 + ]]; + break; + case 18: + var T0 = e[1], M0 = t(T0[3]), Y = [18, [ + 0, + T0[1], + T0[2], + M0 + ]]; + break; + case 19: + var Y = [19, [0, t(e[1][1])]]; + break; + case 20: + var y0 = e[1], G = t(y0[3]), Y = [20, [ + 0, + y0[1], + y0[2], + G + ]]; + break; + case 21: + var j0 = e[1], Q0 = t(j0[3]), Y = [21, [ + 0, + j0[1], + j0[2], + Q0 + ]]; + break; + case 22: + var q0 = e[1], ix = t(q0[5]), Y = [22, [ + 0, + q0[1], + q0[2], + q0[3], + q0[4], + ix + ]]; + break; + case 23: + var xx = e[1], fx = t(xx[3]), Y = [23, [ + 0, + xx[1], + xx[2], + fx + ]]; + break; + case 24: + var yx = e[1], R0 = t(yx[5]), Y = [24, [ + 0, + yx[1], + yx[2], + yx[3], + yx[4], + R0 + ]]; + break; + case 25: + var lx = e[1], kx = t(lx[5]), Y = [25, [ + 0, + lx[1], + lx[2], + lx[3], + lx[4], + kx + ]]; + break; + case 26: + var Q = e[1], I0 = t(Q[5]), Y = [26, [ + 0, + Q[1], + Q[2], + Q[3], + Q[4], + I0 + ]]; + break; + case 27: + var M = e[1], d0 = M[11], g0 = t(M[10]), Y = [27, [ + 0, + M[1], + M[2], + M[3], + M[4], + M[5], + M[6], + M[7], + M[8], + M[9], + g0, + d0 + ]]; + break; + case 28: + var h0 = e[1], A0 = t(h0[4]), Y = [28, [ + 0, + h0[1], + h0[2], + h0[3], + A0 + ]]; + break; + case 29: + var $0 = e[1], Kx = t($0[5]), Y = [29, [ + 0, + $0[1], + $0[2], + $0[3], + $0[4], + Kx + ]]; + break; + case 30: + var J = e[1], tr = t(J[5]), Y = [30, [ + 0, + J[1], + J[2], + J[3], + J[4], + tr + ]]; + break; + case 31: + var Zx = e[1], b = t(Zx[3]), Y = [31, [ + 0, + Zx[1], + Zx[2], + b + ]]; + break; + case 32: + var V = e[1], tx = t(V[4]), Y = [32, [ + 0, + V[1], + V[2], + V[3], + tx + ]]; + break; + case 33: + var _x = e[1], gx = t(_x[5]), Y = [33, [ + 0, + _x[1], + _x[2], + _x[3], + _x[4], + gx + ]]; + break; + case 34: + var ex = e[1], Jx = ex[3], Ux = t(ex[2]), Y = [34, [ + 0, + ex[1], + Ux, + Jx + ]]; + break; + case 35: + var hr = e[1], dr = hr[4], V0 = t(hr[3]), Y = [35, [ + 0, + hr[1], + hr[2], + V0, + dr + ]]; + break; + case 36: + var K0 = e[1], Cx = t(K0[2]), Y = [36, [ + 0, + K0[1], + Cx + ]]; + break; + case 37: + var bx = e[1], Ox = t(bx[4]), Y = [37, [ + 0, + bx[1], + bx[2], + bx[3], + Ox + ]]; + break; + case 38: + var ux = e[1], br = t(ux[4]), Y = [38, [ + 0, + ux[1], + ux[2], + ux[3], + br + ]]; + break; + case 39: + var nr = e[1], $r = t(nr[7]), Y = [39, [ + 0, + nr[1], + nr[2], + nr[3], + nr[4], + nr[5], + nr[6], + $r + ]]; + break; + case 40: + var l1 = e[1], C1 = t(l1[3]), Y = [40, [ + 0, + l1[1], + l1[2], + C1 + ]]; + break; + case 41: + var Qr = e[1], O1 = t(Qr[3]), Y = [41, [ + 0, + Qr[1], + Qr[2], + O1 + ]]; + break; + default: var Hr = e[1], w = t(Hr[3]), Y = [42, [ + 0, + Hr[1], + Hr[2], + w + ]]; + } + return [ + 0, + u, + Y + ]; + } + CN(dA, e3(Uj) === t1 ? Uj : Uj[1]); + var Za = a0, F2 = null, YY = void 0; + function j5(x) { + return 1 - (x === YY ? 1 : 0); + } + Za.String, Za.RegExp, Za.Object, Za.Date, Za.Math; + function PA0(x) { + throw x; + } + function zY(x) { + return d(PA0, x); + } + Za.JSON; + var CA0 = Za.Array, NA0 = Za.Error; + xO(function(x) { + return x[1] === Bj ? [0, Ot(x[2].toString())] : 0; + }), xO(function(x) { + return x instanceof CA0 ? 0 : [0, Ot(x.toString())]; + }); + var JY = [0, 0]; + function zs(x) { + return tJ(p4(x)); + } + function U1(x) { + return fq(p4(x)); + } + function gr(x, r) { + return U1(cx(Vh(x, r))); + } + function dx(x, r) { + return r ? d(x, r[1]) : F2; + } + function Jl(x, r) { + return r[0] === 0 ? F2 : x(r[1]); + } + function KY(x) { + return zs([ + 0, + [ + 0, + mE0, + x[1] + ], + [ + 0, + [ + 0, + kE0, + x[2] + ], + 0 + ] + ]); + } + function HY(x) { + var r = x[1], e = r ? Wx(r[1][1]) : F2, t = [ + 0, + [ + 0, + vE0, + KY(x[3]) + ], + 0 + ]; + return zs([ + 0, + [ + 0, + pE0, + e + ], + [ + 0, + [ + 0, + lE0, + KY(x[2]) + ], + t + ] + ]); + } + function y1(x) { + if (!x) return 0; + var r = x[1], e = r[1]; + return r0([0, e], [0, qx(r[3], r[2])], D); + } + var OA0 = Wx; + function ev(x, r, e) { + var t = r[e]; + return j5(t) ? t | 0 : x; + } + function jA0(x, r) { + var e = Ro(r, YY) ? {} : r, t = Ot(x), u = ev(Lo[9], e, gE0), i = ev(Lo[7], e, bE0), c = ev(Lo[6], e, TE0), v = ev(Lo[5], e, EE0), o = ev(Lo[4], e, SE0), l = ev(Lo[3], e, AE0), k = ev(Lo[2], e, IE0), h = [ + 0, + ev(Lo[1], e, PE0), + k, + l, + o, + v, + c, + i, + 0, + u + ], E = e[MD], I = j5(E) && E | 0, N = e[sD], P = j5(N) ? N | 0 : 1, R = e.all_comments, q = j5(R) ? R | 0 : 1, X = [0, 0], B = I ? [0, function(U) { + return X[1] = [ + 0, + U, + X[1] + ], 0; + }] : 0, z = 0, x0 = wE0[1]; + try { + var W = 0, Z = pU(t), t0 = W, i0 = Z; + } catch (U) { + var u0 = M1(U); + if (u0 !== Bo) throw J0(u0, 0); + var t0 = [ + 0, + [ + 0, + [ + 0, + z, + dl[2], + dl[3] + ], + 47 + ], + 0 + ], i0 = pU(Ta0); + } + var o0 = [ + 0, + z, + i0, + er0, + 0, + h[6], + AU, + tr0 + ], S0 = [0, O4(o0, 0)], s0 = [ + 0, + [0, t0], + [0, 0], + R2[1], + [0, 0], + h[7], + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + [0, Sa0], + [0, o0], + S0, + [0, B], + h, + z, + [0, 0], + [0, Ea0] + ], v0 = d(Y0[1], s0), m0 = cx(s0[1][1]), p0 = cx(y2(function(U, A) { + var j = U[2], f0 = U[1]; + return VO[3].call(null, A, f0) ? [ + 0, + f0, + j + ] : [ + 0, + VO[4].call(null, A, f0), + [ + 0, + A, + j + ] + ]; + }, [ + 0, + VO[1], + 0 + ], m0)[2]); + if (p0) { + var E0 = p0[2], b0 = p0[1]; + if (x0) throw J0([ + 0, + EA0, + b0, + E0 + ], 1); + } + JY[1] = 0; + var C0 = Rx(t) - 0 | 0, D0 = Nt(t); + x: { + r: { + for (var U0 = 0, T0 = 0;;) { + if (T0 === C0) break r; + var M0 = oe(D0, T0); + e: { + if (0 <= M0 && Gr >= M0) { + var y0 = 1; + break e; + } + if (mh <= M0 && e8 >= M0) { + var y0 = 2; + break e; + } + if (Sv <= M0 && E9 >= M0) { + var y0 = 3; + break e; + } + if (rl <= M0 && jv >= M0) { + var y0 = 4; + break e; + } + var y0 = 0; + } + if (y0 === 0) var U0 = WO(U0, T0, 0), T0 = T0 + 1 | 0; + else { + if ((C0 - T0 | 0) < y0) break; + var G = y0 - 1 | 0, j0 = T0 + y0 | 0; + if (3 < G >>> 0) throw J0([ + 0, + Nr, + x$ + ], 1); + switch (G) { + case 0: + var Q0 = oe(D0, T0); + break; + case 1: + var Q0 = (oe(D0, T0) & 31) << 6 | oe(D0, T0 + 1 | 0) & 63; + break; + case 2: + var Q0 = (oe(D0, T0) & 15) << 12 | (oe(D0, T0 + 1 | 0) & 63) << 6 | oe(D0, T0 + 2 | 0) & 63; + break; + default: var Q0 = (oe(D0, T0) & 7) << 18 | (oe(D0, T0 + 1 | 0) & 63) << 12 | (oe(D0, T0 + 2 | 0) & 63) << 6 | oe(D0, T0 + 3 | 0) & 63; + } + var U0 = WO(U0, T0, [0, Q0]), T0 = j0; + } + } + var q0 = WO(U0, T0, 0); + break x; + } + var q0 = U0; + } + for (var ix = Ov0, xx = cx([ + 0, + 6, + q0 + ]);;) { + var fx = ix[3], yx = ix[2], R0 = ix[1]; + if (!xx) break; + var lx = xx[1]; + if (lx === 5) { + var kx = xx[2]; + if (kx && kx[1] === 6) { + var Q = kx[2], ix = [ + 0, + R0 + 2 | 0, + 0, + [ + 0, + p4(cx([ + 0, + R0, + yx + ])), + fx + ] + ], xx = Q; + continue; + } + } else if (6 > lx) { + var I0 = xx[2], ix = [ + 0, + R0 + RX(lx) | 0, + [ + 0, + R0, + yx + ], + fx + ], xx = I0; + continue; + } + var M = xx[2], d0 = [ + 0, + p4(cx([ + 0, + R0, + yx + ])), + fx + ], ix = [ + 0, + R0 + RX(lx) | 0, + 0, + d0 + ], xx = M; + } + var g0 = p4(cx(fx)); + if (P) var A0 = v0; + else var h0 = d(TA0[1], 0), A0 = p(zx(h0, -201766268, d2), h0, v0); + if (q) var Kx = A0; + else var $0 = A0[2], Kx = [ + 0, + A0[1], + [ + 0, + $0[1], + $0[2], + $0[3], + 0 + ] + ]; + function J(U, A, j, f0) { + var _0 = [ + 0, + x5(g0, A[3]), + 0 + ], H0 = qx([ + 0, + [ + 0, + S40, + U1([ + 0, + x5(g0, A[2]), + _0 + ]) + ], + 0 + ], [ + 0, + [ + 0, + A40, + HY(A) + ], + 0 + ]); + if (j) { + var nx = j[1], wx = nx[1]; + if (wx) { + var Sx = nx[2]; + if (Sx) var er = [ + 0, + [ + 0, + I40, + zt(Sx) + ], + 0 + ], Lx = [ + 0, + [ + 0, + P40, + zt(wx) + ], + er + ]; + else var Lx = [ + 0, + [ + 0, + C40, + zt(wx) + ], + 0 + ]; + var $x = Lx; + } else var Xx = nx[2], ur = Xx ? [ + 0, + [ + 0, + N40, + zt(Xx) + ], + 0 + ] : 0, $x = ur; + var ir = $x; + } else var ir = 0; + return zs(yl(qx(H0, qx(ir, [ + 0, + [ + 0, + O40, + Wx(U) + ], + 0 + ])), f0)); + } + function tr(U) { + return gr(Zx, U); + } + function Zx(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: return nr([ + 0, + j, + A[1] + ]); + case 1: + var f0 = A[1], _0 = f0[2]; + return J(V40, j, _0, [ + 0, + [ + 0, + W40, + dx(K0, f0[1]) + ], + 0 + ]); + case 2: return Cr(v50, [ + 0, + j, + A[1] + ]); + case 3: + var N0 = A[1], H0 = N0[3], nx = N0[6], wx = N0[5], Sx = N0[4], er = N0[2], Lx = N0[1], Xx = O2(y1(H0[2][3]), nx), ur = [ + 0, + [ + 0, + iy0, + dx(Z1, er) + ], + 0 + ], $x = [ + 0, + [ + 0, + fy0, + nv(Sx) + ], + ur + ], ir = H0[2], fr = ir[2], or = ir[1]; + if (fr) var Mr = fr[1], jx = Mr[2], u1 = jx[2], p1 = Mr[1], j1 = J(ly0, p1, u1, [ + 0, + [ + 0, + vy0, + Or(jx[1]) + ], + 0 + ]), Ur = U1(cx([ + 0, + j1, + Vh(mx, or) + ])); + else var Ur = U1(yn(mx, or)); + var Wr = [ + 0, + [ + 0, + sy0, + K0(Lx) + ], + [ + 0, + [ + 0, + cy0, + Ur + ], + $x + ] + ]; + return J(oy0, j, Xx, [ + 0, + [ + 0, + ay0, + nr(wx) + ], + Wr + ]); + case 4: + var s1 = A[1], yr = s1[2]; + return J(Q40, j, yr, [ + 0, + [ + 0, + $40, + dx(K0, s1[1]) + ], + 0 + ]); + case 5: return J(Z40, j, A[1][1], 0); + case 6: return C1([ + 0, + j, + A[1] + ]); + case 7: return Qr([ + 0, + j, + A[1] + ]); + case 8: return Y([ + 0, + j, + A[1] + ]); + case 9: + var Ir = A[1], x1 = Ir[5], D1 = Ir[4], X1 = Ir[3], De = Ir[2], T1 = Ir[1]; + if (X1) { + var w2 = X1[1]; + if (w2[0] !== 0 && !w2[1][2]) return J(rp0, j, x1, [ + 0, + [ + 0, + xp0, + dx(g1, D1) + ], + 0 + ]); + } + if (De) { + var V1 = De[1]; + switch (V1[0]) { + case 0: + var i1 = $r(V1[1]); + break; + case 1: + var i1 = l1(V1[1]); + break; + case 2: + var i1 = C1(V1[1]); + break; + case 3: + var i1 = Qr(V1[1]); + break; + case 4: + var i1 = ar(V1[1]); + break; + case 5: + var i1 = vx(V1[1]); + break; + case 6: + var i1 = Ix(1, V1[1]); + break; + case 7: + var i1 = rr(V1[1]); + break; + default: var i1 = Y(V1[1]); + } + var J2 = i1; + } else var J2 = F2; + var rt = [ + 0, + [ + 0, + ep0, + dx(g1, D1) + ], + 0 + ], dt = [ + 0, + [ + 0, + np0, + J2 + ], + [ + 0, + [ + 0, + tp0, + X0(X1) + ], + rt + ] + ]; + return J(ip0, j, x1, [ + 0, + [ + 0, + up0, + !!(T1 ? 1 : 0) + ], + dt + ]); + case 10: return l1([ + 0, + j, + A[1] + ]); + case 11: + var g2 = A[1], r1 = g2[5], me = g2[4], b2 = g2[2], yt = g2[1], ue = [ + 0, + [ + 0, + Ud0, + gr(Ar, g2[3]) + ], + 0 + ], _t = [ + 0, + [ + 0, + Xd0, + An(0, me) + ], + ue + ], Jt = [ + 0, + [ + 0, + Gd0, + dx(Z1, b2) + ], + _t + ]; + return J(zd0, j, r1, [ + 0, + [ + 0, + Yd0, + K0(yt) + ], + Jt + ]); + case 12: + var Kt = A[1], Ht = Kt[1], Pn = Kt[3], Cn = Kt[2]; + return J(sp0, j, Pn, [ + 0, + [ + 0, + cp0, + Ht[0] === 0 ? K0(Ht[1]) : g1(Ht[1]) + ], + [ + 0, + [ + 0, + fp0, + nr(Cn) + ], + 0 + ] + ]); + case 13: + var ie = A[1], Dx = ie[2]; + return J(op0, j, Dx, [ + 0, + [ + 0, + ap0, + z2(ie[1]) + ], + 0 + ]); + case 14: + var tt = A[1], Re = tt[1], Wt = tt[3], Vt = tt[2]; + if (Re[0] === 0) var q2 = 1, nt = K0(Re[1]); + else var q2 = 0, nt = K0(Re[1]); + var ut = [ + 0, + [ + 0, + lp0, + nt + ], + [ + 0, + [ + 0, + vp0, + nr(Vt) + ], + 0 + ] + ]; + return J(kp0, j, Wt, q2 ? [ + 0, + [ + 0, + pp0, + !!q2 + ], + ut + ] : ut); + case 15: + var wt = A[1], On = wt[4], Fe = wt[2], jn = wt[1], T2 = [ + 0, + [ + 0, + Vd0, + ar(wt[3]) + ], + 0 + ], he = [ + 0, + [ + 0, + $d0, + dx(Z1, Fe) + ], + T2 + ]; + return J(Zd0, j, On, [ + 0, + [ + 0, + Qd0, + K0(jn) + ], + he + ]); + case 16: return Ix(1, [ + 0, + j, + A[1] + ]); + case 17: return $r([ + 0, + j, + A[1] + ]); + case 18: + var it = A[1], ra = it[3], Dn = it[1], ea = [ + 0, + [ + 0, + mp0, + b(it[2]) + ], + 0 + ]; + return J(dp0, j, ra, [ + 0, + [ + 0, + hp0, + Zx(Dn) + ], + ea + ]); + case 19: return J(yp0, j, A[1][1], 0); + case 20: + var Me = A[1], ta = Me[3], na = Me[1], Rn = [ + 0, + [ + 0, + e90, + Mx(Me[2]) + ], + 0 + ]; + return J(n90, j, ta, [ + 0, + [ + 0, + t90, + K0(na) + ], + Rn + ]); + case 21: + var Le = A[1], $t = Le[2], ao = Le[3]; + return J(gp0, j, ao, [ + 0, + [ + 0, + wp0, + $t[0] === 0 ? Zx($t[1]) : b($t[1]) + ], + [ + 0, + [ + 0, + _p0, + Wx(px(1)) + ], + 0 + ] + ]); + case 22: + var ua = A[1], av = ua[5], A3 = ua[4], oo = ua[3], vo = ua[2], Ql = ua[1]; + if (vo) { + var ov = vo[1]; + if (ov[0] !== 0) { + var I3 = ov[1][2], P3 = [ + 0, + [ + 0, + bp0, + Wx(px(A3)) + ], + 0 + ], C3 = [ + 0, + [ + 0, + Tp0, + dx(K0, I3) + ], + P3 + ]; + return J(Sp0, j, av, [ + 0, + [ + 0, + Ep0, + dx(g1, oo) + ], + C3 + ]); + } + } + var vv = [ + 0, + [ + 0, + Ap0, + Wx(px(A3)) + ], + 0 + ], Zl = [ + 0, + [ + 0, + Ip0, + dx(g1, oo) + ], + vv + ], x6 = [ + 0, + [ + 0, + Pp0, + X0(vo) + ], + Zl + ]; + return J(Np0, j, av, [ + 0, + [ + 0, + Cp0, + dx(Zx, Ql) + ], + x6 + ]); + case 23: + var lo = A[1], lv = lo[3], po = lo[1], N3 = [ + 0, + [ + 0, + Op0, + dx(OA0, lo[2]) + ], + 0 + ]; + return J(Dp0, j, lv, [ + 0, + [ + 0, + jp0, + b(po) + ], + N3 + ]); + case 24: + var Fn = A[1], r6 = Fn[5], ia = Fn[3], pv = Fn[2], kv = Fn[1], O3 = [ + 0, + [ + 0, + Rp0, + Zx(Fn[4]) + ], + 0 + ], mv = [ + 0, + [ + 0, + Fp0, + dx(b, ia) + ], + O3 + ], j3 = [ + 0, + [ + 0, + Mp0, + dx(b, pv) + ], + mv + ]; + return J(qp0, j, r6, [ + 0, + [ + 0, + Lp0, + dx(function(ha) { + return ha[0] === 0 ? mt(ha[1]) : b(ha[1]); + }, kv) + ], + j3 + ]); + case 25: + var fa = A[1], hv = fa[1], ca = fa[5], e6 = fa[4], D3 = fa[3], t6 = fa[2], dv = hv[0] === 0 ? mt(hv[1]) : Or(hv[1]), R3 = [ + 0, + [ + 0, + Up0, + Zx(D3) + ], + [ + 0, + [ + 0, + Bp0, + !!e6 + ], + 0 + ] + ]; + return J(Yp0, j, ca, [ + 0, + [ + 0, + Gp0, + dv + ], + [ + 0, + [ + 0, + Xp0, + b(t6) + ], + R3 + ] + ]); + case 26: + var sa = A[1], aa = sa[1], ko = sa[5], yv = sa[4], _v = sa[3], wv = sa[2], de = aa[0] === 0 ? mt(aa[1]) : Or(aa[1]), mo = [ + 0, + [ + 0, + Jp0, + Zx(_v) + ], + [ + 0, + [ + 0, + zp0, + !!yv + ], + 0 + ] + ]; + return J(Wp0, j, ko, [ + 0, + [ + 0, + Hp0, + de + ], + [ + 0, + [ + 0, + Kp0, + b(wv) + ], + mo + ] + ]); + case 27: + var qe = A[1], gv = qe[3], F3 = qe[2], n6 = qe[10], bv = qe[9], Tv = qe[8], u6 = qe[7], oa = qe[6], L5 = qe[5], i6 = qe[4], q5 = F3[2][4], Mn = qe[1], Ln = gv[0] === 0 ? gv[1] : Px(yh0), M3 = O2(y1(q5), n6); + if (oa === 0) var pp = 0, Qt = _h0; + else var pp = [ + 0, + [ + 0, + Th0, + !!i6 + ], + [ + 0, + [ + 0, + bh0, + !!L5 + ], + [ + 0, + [ + 0, + gh0, + dx(cv, u6) + ], + [ + 0, + [ + 0, + wh0, + !1 + ], + 0 + ] + ] + ] + ], Qt = Eh0; + var f6 = [ + 0, + [ + 0, + Sh0, + dx(Z1, bv) + ], + 0 + ], B5 = [ + 0, + [ + 0, + Ah0, + Tn(Tv) + ], + f6 + ], U5 = [ + 0, + [ + 0, + Ih0, + nr(Ln) + ], + B5 + ], X5 = [ + 0, + [ + 0, + Ph0, + je(F3) + ], + U5 + ]; + return J(Qt, j, M3, qx([ + 0, + [ + 0, + Ch0, + dx(K0, Mn) + ], + X5 + ], pp)); + case 28: + var L3 = A[1], kp = L3[3], G5 = L3[4], Y5 = L3[2], mp = L3[1]; + if (kp) var n = kp[1][2], s = Zx(AA0(n[1], n[2])); + else var s = F2; + var f = [ + 0, + [ + 0, + $p0, + Zx(Y5) + ], + [ + 0, + [ + 0, + Vp0, + s + ], + 0 + ] + ]; + return J(Zp0, j, G5, [ + 0, + [ + 0, + Qp0, + b(mp) + ], + f + ]); + case 29: + var a = A[1], m = a[4], _ = a[3], S = a[5], O = a[2], F = a[1]; + if (m) { + var n0 = m[1]; + if (n0[0] === 0) var W0 = yn(function(c6) { + var ho = c6[3], s6 = c6[2], J5 = c6[1], Kj = s6 ? Br(ho[1], s6[1][1]) : ho[1], Hj = s6 ? s6[1] : ho; + x: { + r: { + var Wj = 0; + if (J5) { + switch (J5[1]) { + case 0: + var K5 = tc; + break; + case 1: + var K5 = Aa; + break; + default: break r; + } + var dp = K5; + break x; + } + } + var dp = F2; + } + var a6 = [ + 0, + [ + 0, + WT0, + K0(Hj) + ], + [ + 0, + [ + 0, + HT0, + dp + ], + Wj + ] + ]; + return J($T0, Kj, 0, [ + 0, + [ + 0, + VT0, + K0(ho) + ], + a6 + ]); + }, n0[1]); + else var l0 = n0[1], F0 = l0[1], W0 = [ + 0, + J(KT0, F0, 0, [ + 0, + [ + 0, + JT0, + K0(l0[2]) + ], + 0 + ]), + 0 + ]; + var Tx = W0; + } else var Tx = 0; + if (_) var Ax = _[1][1], _r = [ + 0, + [ + 0, + YT0, + K0(Ax) + ], + 0 + ], Lr = [ + 0, + J(zT0, Ax[1], 0, _r), + Tx + ]; + else var Lr = Tx; + switch (F) { + case 0: + var Xr = xk0; + break; + case 1: + var Xr = rk0; + break; + default: var Xr = ek0; + } + var _1 = [ + 0, + [ + 0, + nk0, + g1(O) + ], + [ + 0, + [ + 0, + tk0, + Wx(Xr) + ], + 0 + ] + ]; + return J(ik0, j, S, [ + 0, + [ + 0, + uk0, + U1(Lr) + ], + _1 + ]); + case 30: return rr([ + 0, + j, + A[1] + ]); + case 31: + var Hx = A[1], x2 = Hx[3], fe = Hx[1], ye = [ + 0, + [ + 0, + fk0, + Zx(Hx[2]) + ], + 0 + ]; + return J(sk0, j, x2, [ + 0, + [ + 0, + ck0, + K0(fe) + ], + ye + ]); + case 32: + var K2 = A[1], Be = K2[4], _e = K2[1], we = [ + 0, + [ + 0, + ak0, + gr(_x, K2[2]) + ], + 0 + ]; + return J(vk0, j, Be, [ + 0, + [ + 0, + ok0, + b(_e) + ], + we + ]); + case 33: + var E2 = A[1], gt = E2[4], ce = E2[3], Zt = E2[5], va = E2[2], la = E2[1], pa = function(ha) { + switch (ha[0]) { + case 0: return Zr(ha[1]); + case 1: + var c6 = ha[1], ho = c6[2], s6 = ho[4], J5 = ho[3], Kj = ho[2], Hj = c6[1], Wj = K0(ho[1]), K5 = [ + 0, + [ + 0, + z40, + dx(b, J5) + ], + 0 + ]; + return J(H40, Hj, s6, [ + 0, + [ + 0, + K40, + Wj + ], + [ + 0, + [ + 0, + J40, + z2(Kj) + ], + K5 + ] + ]); + default: + var dp = ha[1], a6 = dp[2], JA0 = a6[4], KA0 = a6[3], HA0 = a6[2], WA0 = dp[1], VA0 = K0(a6[1]), $A0 = [ + 0, + [ + 0, + U40, + b(KA0) + ], + 0 + ]; + return J(Y40, WA0, JA0, [ + 0, + [ + 0, + G40, + VA0 + ], + [ + 0, + [ + 0, + X40, + z2(HA0) + ], + $A0 + ] + ]); + } + }, ka = function(ha) { + return f1(lk0, ha); + }, ma = ce ? gr(ka, ce[1][2][1]) : U1(0), Ev = gt[2], q3 = Ev[2], B3 = gt[1], U3 = [ + 0, + [ + 0, + kk0, + ma + ], + [ + 0, + [ + 0, + pk0, + J(B40, B3, q3, [ + 0, + [ + 0, + q40, + gr(pa, Ev[1]) + ], + 0 + ]) + ], + 0 + ] + ], X3 = [ + 0, + [ + 0, + mk0, + dx(Z1, va) + ], + U3 + ]; + return J(dk0, j, Zt, [ + 0, + [ + 0, + hk0, + K0(la) + ], + X3 + ]); + case 34: + var Ex = A[1], hp = Ex[2]; + return J(_k0, j, hp, [ + 0, + [ + 0, + yk0, + dx(b, Ex[1]) + ], + 0 + ]); + case 35: + var hx = A[1], Xj = hx[3], Gj = hx[1], Yj = [ + 0, + [ + 0, + wk0, + gr(ux, hx[2]) + ], + 0 + ]; + return J(bk0, j, Xj, [ + 0, + [ + 0, + gk0, + b(Gj) + ], + Yj + ]); + case 36: + var ax = A[1], DA0 = ax[2]; + return J(Ek0, j, DA0, [ + 0, + [ + 0, + Tk0, + b(ax[1]) + ], + 0 + ]); + case 37: + var z5 = A[1], RA0 = z5[4], FA0 = z5[2], MA0 = z5[1], LA0 = [ + 0, + [ + 0, + Sk0, + dx(nr, z5[3]) + ], + 0 + ], qA0 = [ + 0, + [ + 0, + Ak0, + dx(br, FA0) + ], + LA0 + ]; + return J(Pk0, j, RA0, [ + 0, + [ + 0, + Ik0, + nr(MA0) + ], + qA0 + ]); + case 38: return vx([ + 0, + j, + A[1] + ]); + case 39: return Ix(0, [ + 0, + j, + A[1] + ]); + case 40: return mt([ + 0, + j, + A[1] + ]); + case 41: + var zj = A[1], BA0 = zj[3], UA0 = zj[1], XA0 = [ + 0, + [ + 0, + Ck0, + Zx(zj[2]) + ], + 0 + ]; + return J(Ok0, j, BA0, [ + 0, + [ + 0, + Nk0, + b(UA0) + ], + XA0 + ]); + default: + var Jj = A[1], GA0 = Jj[3], YA0 = Jj[1], zA0 = [ + 0, + [ + 0, + jk0, + Zx(Jj[2]) + ], + 0 + ]; + return J(Rk0, j, GA0, [ + 0, + [ + 0, + Dk0, + b(YA0) + ], + zA0 + ]); + } + } + function b(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: + var f0 = A[1], _0 = f0[2], N0 = [ + 0, + [ + 0, + Xk0, + gr(Ks, f0[1]) + ], + 0 + ]; + return J(Gk0, j, y1(_0), N0); + case 1: + var H0 = A[1], nx = H0[3], wx = H0[2], Sx = H0[10], er = H0[9], Lx = H0[8], Xx = H0[7], ur = H0[4], $x = wx[2][4]; + if (nx[0] === 0) var ir = 0, fr = nr(nx[1]); + else var ir = 1, fr = b(nx[1]); + var or = O2(y1($x), Sx), Mr = [ + 0, + [ + 0, + Yk0, + dx(Z1, er) + ], + 0 + ], jx = [ + 0, + [ + 0, + Jk0, + !!ir + ], + [ + 0, + [ + 0, + zk0, + Tn(Lx) + ], + Mr + ] + ], u1 = [ + 0, + [ + 0, + Vk0, + fr + ], + [ + 0, + [ + 0, + Wk0, + !!ur + ], + [ + 0, + [ + 0, + Hk0, + !1 + ], + [ + 0, + [ + 0, + Kk0, + dx(cv, Xx) + ], + jx + ] + ] + ] + ]; + return J(Zk0, j, or, [ + 0, + [ + 0, + Qk0, + F2 + ], + [ + 0, + [ + 0, + $k0, + je(wx) + ], + u1 + ] + ]); + case 2: + var p1 = A[1], j1 = p1[2]; + return J(r80, j, j1, [ + 0, + [ + 0, + x80, + b(p1[1]) + ], + 0 + ]); + case 3: + var Ur = A[1], Wr = Ur[3], s1 = Ur[1], yr = [ + 0, + [ + 0, + e80, + ar(Ur[2][2]) + ], + 0 + ]; + return J(n80, j, Wr, [ + 0, + [ + 0, + t80, + b(s1) + ], + yr + ]); + case 4: + var Ir = A[1], x1 = Ir[1], D1 = Ir[4], X1 = Ir[3], De = Ir[2]; + if (x1) { + switch (x1[1]) { + case 0: + var T1 = uQ; + break; + case 1: + var T1 = iQ; + break; + case 2: + var T1 = fQ; + break; + case 3: + var T1 = cQ; + break; + case 4: + var T1 = sQ; + break; + case 5: + var T1 = aQ; + break; + case 6: + var T1 = oQ; + break; + case 7: + var T1 = vQ; + break; + case 8: + var T1 = lQ; + break; + case 9: + var T1 = pQ; + break; + case 10: + var T1 = kQ; + break; + case 11: + var T1 = mQ; + break; + case 12: + var T1 = hQ; + break; + case 13: + var T1 = dQ; + break; + default: var T1 = yQ; + } + var w2 = T1; + } else var w2 = u80; + var V1 = [ + 0, + [ + 0, + i80, + b(X1) + ], + 0 + ]; + return J(s80, j, D1, [ + 0, + [ + 0, + c80, + Wx(w2) + ], + [ + 0, + [ + 0, + f80, + Or(De) + ], + V1 + ] + ]); + case 5: + var i1 = A[1], J2 = i1[4], rt = i1[2], dt = i1[1], et = [ + 0, + [ + 0, + a80, + b(i1[3]) + ], + 0 + ], g2 = [ + 0, + [ + 0, + o80, + b(rt) + ], + et + ]; + switch (dt) { + case 0: + var r1 = M$; + break; + case 1: + var r1 = L$; + break; + case 2: + var r1 = q$; + break; + case 3: + var r1 = B$; + break; + case 4: + var r1 = U$; + break; + case 5: + var r1 = X$; + break; + case 6: + var r1 = G$; + break; + case 7: + var r1 = Y$; + break; + case 8: + var r1 = z$; + break; + case 9: + var r1 = J$; + break; + case 10: + var r1 = K$; + break; + case 11: + var r1 = H$; + break; + case 12: + var r1 = W$; + break; + case 13: + var r1 = V$; + break; + case 14: + var r1 = $$; + break; + case 15: + var r1 = Q$; + break; + case 16: + var r1 = Z$; + break; + case 17: + var r1 = xQ; + break; + case 18: + var r1 = rQ; + break; + case 19: + var r1 = eQ; + break; + case 20: + var r1 = tQ; + break; + default: var r1 = nQ; + } + return J(l80, j, J2, [ + 0, + [ + 0, + v80, + Wx(r1) + ], + g2 + ]); + case 6: + var me = A[1], b2 = me[4]; + return J(p80, j, O2(y1(me[3][2][2]), b2), fp(0, me)); + case 7: return Cr(l50, [ + 0, + j, + A[1] + ]); + case 8: + var ue = A[1], _t = ue[4], Jt = ue[2], Kt = ue[1], Ht = [ + 0, + [ + 0, + k80, + b(ue[3]) + ], + 0 + ], Pn = [ + 0, + [ + 0, + m80, + b(Jt) + ], + Ht + ]; + return J(d80, j, _t, [ + 0, + [ + 0, + h80, + b(Kt) + ], + Pn + ]); + case 9: return V0([ + 0, + j, + A[1] + ]); + case 10: return K0(A[1]); + case 11: + var Cn = A[1], Nn = Cn[2]; + return J(_80, j, Nn, [ + 0, + [ + 0, + y80, + b(Cn[1]) + ], + 0 + ]); + case 12: return co([ + 0, + j, + A[1] + ]); + case 13: return fv([ + 0, + j, + A[1] + ]); + case 14: return g1([ + 0, + j, + A[1] + ]); + case 15: return En([ + 0, + j, + A[1] + ]); + case 16: return Sn([ + 0, + j, + A[1] + ]); + case 17: return M2([ + 0, + j, + A[1] + ]); + case 18: return L2([ + 0, + j, + A[1] + ]); + case 19: + var ie = A[1], Dx = ie[2], tt = ie[1], Re = ie[4], Wt = ie[3]; + try { + var q2 = new RegExp(Wx(tt), Wx(Dx)); + } catch { + var q2 = F2; + } + return J(E_0, j, Re, [ + 0, + [ + 0, + T_0, + q2 + ], + [ + 0, + [ + 0, + b_0, + Wx(Wt) + ], + [ + 0, + [ + 0, + g_0, + zs([ + 0, + [ + 0, + w_0, + Wx(tt) + ], + [ + 0, + [ + 0, + __0, + Wx(Dx) + ], + 0 + ] + ]) + ], + 0 + ] + ] + ]); + case 20: + var nt = A[1]; + return g1([ + 0, + j, + [ + 0, + nt[1], + nt[5], + nt[6] + ] + ]); + case 21: + var ut = A[1], xa = ut[4], wt = ut[3], On = ut[2]; + switch (ut[1]) { + case 0: + var Fe = w80; + break; + case 1: + var Fe = g80; + break; + default: var Fe = b80; + } + var jn = [ + 0, + [ + 0, + T80, + b(wt) + ], + 0 + ]; + return J(A80, j, xa, [ + 0, + [ + 0, + S80, + Wx(Fe) + ], + [ + 0, + [ + 0, + E80, + b(On) + ], + jn + ] + ]); + case 22: + var T2 = A[1], he = T2[4], it = T2[1], ra = [ + 0, + [ + 0, + I80, + gr(V, T2[2]) + ], + 0 + ]; + return J(C80, j, he, [ + 0, + [ + 0, + P80, + b(it) + ], + ra + ]); + case 23: + var Dn = A[1], ea = Dn[3]; + return J(N80, j, ea, cp(0, Dn)); + case 24: + var Me = A[1], ta = Me[3], na = Me[1], Rn = [ + 0, + [ + 0, + O80, + K0(Me[2]) + ], + 0 + ]; + return J(D80, j, ta, [ + 0, + [ + 0, + j80, + K0(na) + ], + Rn + ]); + case 25: + var Le = A[1], $t = Le[4], ao = Le[3], $l = Le[2], ua = Le[1]; + if (ao) var av = ao[1], A3 = O2(y1(av[2][2]), $t), oo = A3, vo = Ox(av); + else var oo = $t, vo = U1(0); + var Ql = [ + 0, + [ + 0, + F80, + dx(fo, $l) + ], + [ + 0, + [ + 0, + R80, + vo + ], + 0 + ] + ]; + return J(L80, j, oo, [ + 0, + [ + 0, + M80, + b(ua) + ], + Ql + ]); + case 26: + var ov = A[1], I3 = ov[2], P3 = [ + 0, + [ + 0, + q80, + gr(ke, ov[1]) + ], + 0 + ]; + return J(B80, j, y1(I3), P3); + case 27: + var C3 = A[1], vv = C3[1], Zl = C3[3], x6 = vv[4], lo = O2(y1(vv[3][2][2]), x6); + switch (Zl) { + case 0: + var lv = 0, po = !0; + break; + case 1: + var lv = 0, po = !1; + break; + default: var lv = [0, function(oa) { + return J(Uk0, j, 0, [ + 0, + [ + 0, + Bk0, + oa + ], + [ + 0, + [ + 0, + qk0, + !0 + ], + 0 + ] + ]); + }], po = !1; + } + return J(X80, j, lo, qx(fp(lv, vv), [ + 0, + [ + 0, + U80, + po + ], + 0 + ])); + case 28: + var N3 = A[1], Fn = N3[1], r6 = Fn[3]; + switch (N3[3]) { + case 0: + var ia = 0, pv = !0; + break; + case 1: + var ia = 0, pv = !1; + break; + default: var ia = [0, function(oa) { + return J(Lk0, j, 0, [ + 0, + [ + 0, + Mk0, + oa + ], + [ + 0, + [ + 0, + Fk0, + !0 + ], + 0 + ] + ]); + }], pv = !1; + } + return J(Y80, j, r6, qx(cp(ia, Fn), [ + 0, + [ + 0, + G80, + pv + ], + 0 + ])); + case 29: + var kv = A[1], O3 = kv[2]; + return J(J80, j, O3, [ + 0, + [ + 0, + z80, + gr(b, kv[1]) + ], + 0 + ]); + case 30: return J(K80, j, A[1][1], 0); + case 31: + var mv = A[1], j3 = mv[3], fa = mv[1], hv = [ + 0, + [ + 0, + M_0, + Hs(mv[2]) + ], + 0 + ]; + return J(q_0, j, j3, [ + 0, + [ + 0, + L_0, + b(fa) + ], + hv + ]); + case 32: return Hs([ + 0, + j, + A[1] + ]); + case 33: return J(H80, j, A[1][1], 0); + case 34: + var ca = A[1], e6 = ca[3], D3 = ca[1], t6 = [ + 0, + [ + 0, + W80, + z2(ca[2]) + ], + 0 + ]; + return J($80, j, e6, [ + 0, + [ + 0, + V80, + b(D3) + ], + t6 + ]); + case 35: + var dv = A[1], R3 = dv[3], sa = dv[1], aa = [ + 0, + [ + 0, + Q80, + ar(dv[2][2]) + ], + 0 + ]; + return J(xm0, j, R3, [ + 0, + [ + 0, + Z80, + b(sa) + ], + aa + ]); + case 36: + var ko = A[1], yv = ko[3], _v = ko[2], wv = ko[1]; + if (wv === 7) return J(hm0, j, yv, [ + 0, + [ + 0, + mm0, + b(_v) + ], + 0 + ]); + if (8 <= wv) return J(tm0, j, yv, [ + 0, + [ + 0, + em0, + b(_v) + ], + [ + 0, + [ + 0, + rm0, + !1 + ], + 0 + ] + ]); + switch (wv) { + case 0: + var de = nm0; + break; + case 1: + var de = um0; + break; + case 2: + var de = im0; + break; + case 3: + var de = fm0; + break; + case 4: + var de = cm0; + break; + case 5: + var de = sm0; + break; + case 6: + var de = am0; + break; + default: var de = Px(om0); + } + return J(km0, j, yv, [ + 0, + [ + 0, + pm0, + Wx(de) + ], + [ + 0, + [ + 0, + lm0, + !0 + ], + [ + 0, + [ + 0, + vm0, + b(_v) + ], + 0 + ] + ] + ]); + case 37: + var mo = A[1], qe = mo[4], gv = mo[3], F3 = mo[2]; + return J(bm0, j, qe, [ + 0, + [ + 0, + gm0, + Wx(mo[1] ? dm0 : ym0) + ], + [ + 0, + [ + 0, + wm0, + b(F3) + ], + [ + 0, + [ + 0, + _m0, + !!gv + ], + 0 + ] + ] + ]); + default: + var bv = A[1], Tv = bv[2], u6 = [ + 0, + [ + 0, + Tm0, + !!bv[3] + ], + 0 + ]; + return J(Sm0, j, Tv, [ + 0, + [ + 0, + Em0, + dx(b, bv[1]) + ], + u6 + ]); + } + } + function V(U) { + return tx(Am0, b, U); + } + function tx(U, A, j) { + var f0 = j[2], _0 = f0[4], N0 = f0[2], H0 = f0[1], nx = j[1], wx = [ + 0, + [ + 0, + Im0, + dx(b, f0[3]) + ], + 0 + ], Sx = [ + 0, + [ + 0, + Pm0, + A(N0) + ], + wx + ]; + return J(U, nx, _0, [ + 0, + [ + 0, + Cm0, + gx(H0) + ], + Sx + ]); + } + function _x(U) { + return tx(Nm0, Zx, U); + } + function gx(U) { + var A = U[2], j = U[1]; + function f0(x1) { + return J(jm0, j, 0, [ + 0, + [ + 0, + Om0, + x1 + ], + 0 + ]); + } + switch (A[0]) { + case 0: return J(Dm0, j, A[1][1], 0); + case 1: return f0(M2([ + 0, + j, + A[1] + ])); + case 2: return f0(L2([ + 0, + j, + A[1] + ])); + case 3: return f0(g1([ + 0, + j, + A[1] + ])); + case 4: return f0(En([ + 0, + j, + A[1] + ])); + case 5: return f0(Sn([ + 0, + j, + A[1] + ])); + case 6: + var _0 = A[1], N0 = _0[2], H0 = _0[3], nx = _0[1] ? Rm0 : Fm0, wx = N0[2], Sx = N0[1], er = wx[0] === 0 ? M2([ + 0, + Sx, + wx[1] + ]) : L2([ + 0, + Sx, + wx[1] + ]); + return J(qm0, j, H0, [ + 0, + [ + 0, + Lm0, + Wx(nx) + ], + [ + 0, + [ + 0, + Mm0, + er + ], + 0 + ] + ]); + case 7: return Ux([ + 0, + j, + A[1] + ]); + case 8: return ex(A[1]); + case 9: return Jx(A[1]); + case 10: return hr(Bm0, [ + 0, + j, + A[1] + ]); + case 11: + var Lx = A[1], Xx = Lx[3], ur = Lx[1], $x = [ + 0, + [ + 0, + nh0, + dx(dr, Lx[2]) + ], + 0 + ], ir = [ + 0, + [ + 0, + uh0, + gr(function(x1) { + return gx(x1[2]); + }, ur) + ], + $x + ]; + return J(ih0, j, y1(Xx), ir); + case 12: + var fr = A[1], or = fr[1], Mr = fr[3], jx = fr[2]; + return J(Ym0, j, Mr, [ + 0, + [ + 0, + Gm0, + or[0] === 0 ? ex(or[1]) : Jx(or[1]) + ], + [ + 0, + [ + 0, + Xm0, + hr(Um0, jx) + ], + 0 + ] + ]); + case 13: + var p1 = A[1], j1 = p1[2]; + return J(Jm0, j, j1, [ + 0, + [ + 0, + zm0, + gr(gx, p1[1]) + ], + 0 + ]); + default: + var Ur = A[1], Wr = Ur[2], s1 = Ur[3], yr = Ur[1], Ir = Wr[0] === 0 ? K0(Wr[1]) : Ux([ + 0, + Wr[1], + Wr[2] + ]); + return J(Wm0, j, s1, [ + 0, + [ + 0, + Hm0, + gx(yr) + ], + [ + 0, + [ + 0, + Km0, + Ir + ], + 0 + ] + ]); + } + } + function ex(U) { + var A = U[1]; + return J($m0, A, 0, [ + 0, + [ + 0, + Vm0, + K0(U) + ], + 0 + ]); + } + function Jx(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = A[3], N0 = U[1], H0 = 0; + switch (j[0]) { + case 0: + var nx = g1(j[1]); + break; + case 1: + var nx = M2(j[1]); + break; + case 2: + var nx = L2(j[1]); + break; + default: var nx = K0(j[1]); + } + var wx = [ + 0, + [ + 0, + Qm0, + nx + ], + H0 + ]; + return J(xh0, N0, _0, [ + 0, + [ + 0, + Zm0, + f0[0] === 0 ? ex(f0[1]) : Jx(f0[1]) + ], + wx + ]); + } + function Ux(U) { + var A = U[2], j = A[3], f0 = A[2], _0 = U[1], N0 = [ + 0, + [ + 0, + rh0, + Wx(AO(A[1])) + ], + 0 + ]; + return J(th0, _0, j, [ + 0, + [ + 0, + eh0, + K0(f0) + ], + N0 + ]); + } + function hr(U, A) { + var j = A[2], f0 = j[3], _0 = j[1], N0 = A[1], H0 = [ + 0, + [ + 0, + kh0, + dx(dr, j[2]) + ], + 0 + ], nx = [ + 0, + [ + 0, + mh0, + gr(function(wx) { + var Sx = wx[2], er = wx[1]; + if (Sx[0] === 0) { + var Lx = Sx[1], Xx = Lx[1], ur = Lx[4], $x = [ + 0, + [ + 0, + fh0, + !!Lx[3] + ], + 0 + ], ir = [ + 0, + [ + 0, + ch0, + gx(Lx[2]) + ], + $x + ]; + switch (Xx[0]) { + case 0: + var fr = g1(Xx[1]); + break; + case 1: + var fr = M2(Xx[1]); + break; + case 2: + var fr = L2(Xx[1]); + break; + default: var fr = K0(Xx[1]); + } + return J(ah0, er, ur, [ + 0, + [ + 0, + sh0, + fr + ], + ir + ]); + } + var or = Sx[1], Mr = [ + 0, + [ + 0, + vh0, + ex(or) + ], + [ + 0, + [ + 0, + oh0, + !0 + ], + 0 + ] + ]; + return J(ph0, er, 0, [ + 0, + [ + 0, + lh0, + K0(or) + ], + Mr + ]); + }, _0) + ], + H0 + ]; + return J(U, N0, y1(f0), nx); + } + function dr(U) { + var A = U[2], j = A[2], f0 = U[1]; + return J(dh0, f0, j, [ + 0, + [ + 0, + hh0, + dx(Ux, A[1]) + ], + 0 + ]); + } + function V0(U) { + var A = U[2], j = A[3], f0 = A[2], _0 = A[10], N0 = A[9], H0 = A[8], nx = A[7], wx = A[5], Sx = A[4], er = f0[2][4], Lx = A[1], Xx = U[1], ur = j[0] === 0 ? j[1] : Px(Nh0), $x = O2(y1(er), _0), ir = [ + 0, + [ + 0, + Oh0, + dx(Z1, N0) + ], + 0 + ], fr = [ + 0, + [ + 0, + Dh0, + !1 + ], + [ + 0, + [ + 0, + jh0, + Tn(H0) + ], + ir + ] + ], or = [ + 0, + [ + 0, + Mh0, + !!Sx + ], + [ + 0, + [ + 0, + Fh0, + !!wx + ], + [ + 0, + [ + 0, + Rh0, + dx(cv, nx) + ], + fr + ] + ] + ], Mr = [ + 0, + [ + 0, + Lh0, + nr(ur) + ], + or + ], jx = [ + 0, + [ + 0, + qh0, + je(f0) + ], + Mr + ]; + return J(Uh0, Xx, $x, [ + 0, + [ + 0, + Bh0, + dx(K0, Lx) + ], + jx + ]); + } + function K0(U) { + var A = U[2]; + return J(zh0, U[1], A[2], [ + 0, + [ + 0, + Yh0, + Wx(A[1]) + ], + [ + 0, + [ + 0, + Gh0, + F2 + ], + [ + 0, + [ + 0, + Xh0, + !1 + ], + 0 + ] + ] + ]); + } + function Cx(U) { + var A = U[2]; + return J(Wh0, U[1], A[2], [ + 0, + [ + 0, + Hh0, + Wx(A[1]) + ], + [ + 0, + [ + 0, + Kh0, + F2 + ], + [ + 0, + [ + 0, + Jh0, + !1 + ], + 0 + ] + ] + ]); + } + function bx(U, A) { + var j = A[1][2], f0 = j[2], _0 = j[1], N0 = [ + 0, + [ + 0, + Vh0, + !!A[3] + ], + 0 + ]; + return J(Zh0, U, f0, [ + 0, + [ + 0, + Qh0, + Wx(_0) + ], + [ + 0, + [ + 0, + $h0, + Jl(z2, A[2]) + ], + N0 + ] + ]); + } + function Ox(U) { + return gr(eo, U[2][1]); + } + function ux(U) { + var A = U[2], j = A[4], f0 = A[1], _0 = U[1], N0 = [ + 0, + [ + 0, + xd0, + gr(Zx, A[3]) + ], + 0 + ]; + return J(ed0, _0, j, [ + 0, + [ + 0, + rd0, + dx(b, f0) + ], + N0 + ]); + } + function br(U) { + var A = U[2], j = A[3], f0 = A[1], _0 = U[1], N0 = [ + 0, + [ + 0, + td0, + nr(A[2]) + ], + 0 + ]; + return J(ud0, _0, j, [ + 0, + [ + 0, + nd0, + dx(Or, f0) + ], + N0 + ]); + } + function nr(U) { + var A = U[2], j = A[2], f0 = U[1], _0 = [ + 0, + [ + 0, + id0, + tr(A[1]) + ], + 0 + ]; + return J(fd0, f0, y1(j), _0); + } + function $r(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = A[4], N0 = A[3], H0 = U[1], nx = Br(f0[1], j[1]), wx = [ + 0, + [ + 0, + cd0, + Wx(AO(N0)) + ], + 0 + ]; + return J(ad0, H0, _0, [ + 0, + [ + 0, + sd0, + bx(nx, [ + 0, + f0, + [1, j], + 0 + ]) + ], + wx + ]); + } + function l1(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = A[4], N0 = A[3], H0 = U[1], nx = Br(f0[1], j[1]), wx = j[2][2]; + x: { + if (wx[0] === 12 && !wx[1][5]) { + var Sx = 0, er = od0; + break x; + } + var Sx = [ + 0, + [ + 0, + vd0, + dx(cv, N0) + ], + 0 + ], er = ld0; + } + return J(er, H0, _0, qx([ + 0, + [ + 0, + pd0, + bx(nx, [ + 0, + f0, + [1, j], + 0 + ]) + ], + 0 + ], Sx)); + } + function C1(U) { + var A = U[2], j = A[6], f0 = A[4], _0 = A[7], N0 = A[5], H0 = A[3], nx = A[2], wx = A[1], Sx = U[1], er = U1(f0 ? [ + 0, + Ar(f0[1]), + 0 + ] : 0), Lx = j ? gr(c1, j[1][2][1]) : U1(0), Xx = [ + 0, + [ + 0, + hd0, + er + ], + [ + 0, + [ + 0, + md0, + Lx + ], + [ + 0, + [ + 0, + kd0, + gr(Ar, N0) + ], + 0 + ] + ] + ], ur = [ + 0, + [ + 0, + dd0, + An(0, H0) + ], + Xx + ], $x = [ + 0, + [ + 0, + yd0, + dx(Z1, nx) + ], + ur + ]; + return J(wd0, Sx, _0, [ + 0, + [ + 0, + _d0, + K0(wx) + ], + $x + ]); + } + function Qr(U) { + var A = U[2], j = A[3], f0 = U[1], _0 = A[5], N0 = A[4], H0 = A[2], nx = A[1], wx = O2(y1(j[2][3]), _0), Sx = j[2], er = Sx[1], Lx = Sx[2], Xx = [ + 0, + [ + 0, + gd0, + dx(Z1, H0) + ], + 0 + ], ur = [ + 0, + [ + 0, + bd0, + nv(N0) + ], + Xx + ], $x = [ + 0, + [ + 0, + Td0, + O1(er) + ], + ur + ], ir = [ + 0, + [ + 0, + Ed0, + dx(Hr, Lx) + ], + $x + ], fr = [ + 0, + [ + 0, + Sd0, + O1(er) + ], + ir + ]; + return J(Id0, f0, wx, [ + 0, + [ + 0, + Ad0, + K0(nx) + ], + fr + ]); + } + function O1(U) { + return U1(yn(function(A) { + var j = A[2]; + return w(0, j[3], A[1], [0, j[1]], j[2][2]); + }, U)); + } + function Hr(U) { + var A = U[2], j = A[4], f0 = A[3], _0 = A[2], N0 = U[1]; + return w(j, f0, N0, Wh(function(H0) { + return [0, H0]; + }, A[1]), _0); + } + function w(U, A, j, f0, _0) { + if (f0) var N0 = f0[1], H0 = N0[0] === 0 ? dx(K0, [0, N0[1]]) : dx(g1, [0, N0[1]]), nx = H0; + else var nx = dx(K0, 0); + return J(Md0, j, U, [ + 0, + [ + 0, + Fd0, + nx + ], + [ + 0, + [ + 0, + Rd0, + ar(_0) + ], + [ + 0, + [ + 0, + Dd0, + !!A + ], + 0 + ] + ] + ]); + } + function Y(U) { + var A = U[2], j = A[3], f0 = A[1], _0 = U[1], N0 = [ + 0, + [ + 0, + Ld0, + Mx(A[2]) + ], + 0 + ]; + return J(Bd0, _0, j, [ + 0, + [ + 0, + qd0, + K0(f0) + ], + N0 + ]); + } + function px(U) { + return U ? Jd0 : Kd0; + } + function X0(U) { + if (!U) return U1(0); + var A = U[1]; + if (A[0] === 0) return gr(up, A[1]); + var j = A[1], f0 = j[2], _0 = j[1]; + return U1(f0 ? [ + 0, + J(Wd0, _0, 0, [ + 0, + [ + 0, + Hd0, + K0(f0[1]) + ], + 0 + ]), + 0 + ] : 0); + } + function vx(U) { + var A = U[2], j = A[4], f0 = A[2], _0 = A[1], N0 = U[1], H0 = [ + 0, + [ + 0, + x50, + ar(A[3]) + ], + 0 + ], nx = [ + 0, + [ + 0, + r50, + dx(Z1, f0) + ], + H0 + ]; + return J(t50, N0, j, [ + 0, + [ + 0, + e50, + K0(_0) + ], + nx + ]); + } + function Ix(U, A) { + var j = A[2], f0 = j[7], _0 = j[6], N0 = j[5], H0 = j[4], nx = j[3], wx = j[2], Sx = j[1], er = A[1], Lx = U ? n50 : u50, Xx = [ + 0, + [ + 0, + i50, + dx(ar, _0) + ], + 0 + ], ur = [ + 0, + [ + 0, + f50, + dx(ar, N0) + ], + Xx + ], $x = [ + 0, + [ + 0, + c50, + dx(ar, H0) + ], + ur + ], ir = [ + 0, + [ + 0, + s50, + dx(ar, nx) + ], + $x + ], fr = [ + 0, + [ + 0, + a50, + dx(Z1, wx) + ], + ir + ]; + return J(Lx, er, f0, [ + 0, + [ + 0, + o50, + K0(Sx) + ], + fr + ]); + } + function Cr(U, A) { + var j = A[2], f0 = j[7], _0 = j[5], N0 = j[4], H0 = j[2], nx = j[6], wx = j[3], Sx = j[1], er = A[1]; + if (N0) var Lx = N0[1][2], Xx = Lx[2], ur = Lx[1], $x = O2(Lx[3], f0), ir = Xx, fr = [0, ur]; + else var $x = f0, ir = 0, fr = 0; + if (_0) var or = _0[1][2], Mr = or[1], jx = O2(or[2], $x), u1 = jx, p1 = gr(c1, Mr); + else var u1 = $x, p1 = U1(0); + var j1 = [ + 0, + [ + 0, + k50, + p1 + ], + [ + 0, + [ + 0, + p50, + gr(Vx, nx) + ], + 0 + ] + ], Ur = [ + 0, + [ + 0, + m50, + dx(In, ir) + ], + j1 + ], Wr = [ + 0, + [ + 0, + h50, + dx(b, fr) + ], + Ur + ], s1 = [ + 0, + [ + 0, + d50, + dx(Z1, wx) + ], + Wr + ], yr = H0[2], Ir = yr[2], x1 = H0[1], D1 = [ + 0, + [ + 0, + y50, + J(A50, x1, Ir, [ + 0, + [ + 0, + S50, + gr(Fr, yr[1]) + ], + 0 + ]) + ], + s1 + ]; + return J(U, er, u1, [ + 0, + [ + 0, + _50, + dx(K0, Sx) + ], + D1 + ]); + } + function Vx(U) { + var A = U[2], j = A[2], f0 = U[1]; + return J(g50, f0, j, [ + 0, + [ + 0, + w50, + b(A[1]) + ], + 0 + ]); + } + function f1(U, A) { + var j = A[2], f0 = j[1], _0 = A[1], N0 = [ + 0, + [ + 0, + b50, + dx(In, j[2]) + ], + 0 + ]; + return J(U, _0, 0, [ + 0, + [ + 0, + T50, + K0(f0) + ], + N0 + ]); + } + function c1(U) { + return f1(E50, U); + } + function Fr(U) { + switch (U[0]) { + case 0: return Zr(U[1]); + case 1: + var A = U[1], j = A[2], f0 = j[7], _0 = j[6], N0 = j[2], H0 = j[1], nx = j[5], wx = j[4], Sx = j[3], er = A[1]; + switch (H0[0]) { + case 0: + var ir = f0, fr = 0, or = g1(H0[1]); + break; + case 1: + var ir = f0, fr = 0, or = M2(H0[1]); + break; + case 2: + var ir = f0, fr = 0, or = L2(H0[1]); + break; + case 3: + var ir = f0, fr = 0, or = K0(H0[1]); + break; + case 4: + var Lx = Px(V50), ir = Lx[3], fr = Lx[2], or = Lx[1]; + break; + default: var Xx = H0[1][2], ur = Xx[1], ir = O2(Xx[2], f0), fr = 1, or = b(ur); + } + if (typeof N0 == "number") if (N0) var Mr = 0, jx = 0; + else var Mr = 1, jx = 0; + else var Mr = 0, jx = [0, N0[1]]; + var u1 = Mr ? [ + 0, + [ + 0, + $50, + !!Mr + ], + 0 + ] : 0, j1 = qx(_0 === 0 ? 0 : [ + 0, + [ + 0, + Q50, + gr(Vx, _0) + ], + 0 + ], u1), Ur = [ + 0, + [ + 0, + ry0, + !!fr + ], + [ + 0, + [ + 0, + xy0, + !!wx + ], + [ + 0, + [ + 0, + Z50, + dx(Q1, nx) + ], + 0 + ] + ] + ], Wr = [ + 0, + [ + 0, + ey0, + Jl(z2, Sx) + ], + Ur + ]; + return J(uy0, er, ir, qx([ + 0, + [ + 0, + ny0, + or + ], + [ + 0, + [ + 0, + ty0, + dx(b, jx) + ], + Wr + ] + ], j1)); + case 2: + var s1 = U[1], yr = s1[2], Ir = yr[6], x1 = yr[2], D1 = yr[7], X1 = yr[5], De = yr[4], T1 = yr[3], w2 = yr[1], V1 = s1[1]; + if (typeof x1 == "number") if (x1) var i1 = 0, J2 = 0; + else var i1 = 1, J2 = 0; + else var i1 = 0, J2 = [0, x1[1]]; + var rt = i1 ? [ + 0, + [ + 0, + U50, + !!i1 + ], + 0 + ] : 0, et = qx(Ir === 0 ? 0 : [ + 0, + [ + 0, + X50, + gr(Vx, Ir) + ], + 0 + ], rt), g2 = [ + 0, + [ + 0, + z50, + !1 + ], + [ + 0, + [ + 0, + Y50, + !!De + ], + [ + 0, + [ + 0, + G50, + dx(Q1, X1) + ], + 0 + ] + ] + ], r1 = [ + 0, + [ + 0, + J50, + Jl(z2, T1) + ], + g2 + ], me = [ + 0, + [ + 0, + K50, + dx(b, J2) + ], + r1 + ]; + return J(W50, V1, D1, qx([ + 0, + [ + 0, + H50, + Cx(w2) + ], + me + ], et)); + default: + var b2 = U[1], yt = b2[2], ue = yt[2], _t = b2[1], Jt = [ + 0, + [ + 0, + I50, + tr(yt[1]) + ], + 0 + ]; + return J(P50, _t, y1(ue), Jt); + } + } + function Zr(U) { + var A = U[2], j = A[6], f0 = A[2], _0 = A[5], N0 = A[4], H0 = A[3], nx = A[1], wx = U[1]; + switch (f0[0]) { + case 0: + var Xx = j, ur = 0, $x = g1(f0[1]); + break; + case 1: + var Xx = j, ur = 0, $x = M2(f0[1]); + break; + case 2: + var Xx = j, ur = 0, $x = L2(f0[1]); + break; + case 3: + var Xx = j, ur = 0, $x = K0(f0[1]); + break; + case 4: + var Xx = j, ur = 0, $x = Cx(f0[1]); + break; + default: var Sx = f0[1][2], er = Sx[1], Xx = O2(Sx[2], j), ur = 1, $x = b(er); + } + switch (nx) { + case 0: + var ir = C50; + break; + case 1: + var ir = N50; + break; + case 2: + var ir = O50; + break; + default: var ir = j50; + } + var fr = [ + 0, + [ + 0, + M50, + Wx(ir) + ], + [ + 0, + [ + 0, + F50, + !!N0 + ], + [ + 0, + [ + 0, + R50, + !!ur + ], + [ + 0, + [ + 0, + D50, + gr(Vx, _0) + ], + 0 + ] + ] + ] + ]; + return J(B50, wx, Xx, [ + 0, + [ + 0, + q50, + $x + ], + [ + 0, + [ + 0, + L50, + V0(H0) + ], + fr + ] + ]); + } + function mx(U) { + var A = U[2], j = A[3], f0 = A[2], _0 = A[1], N0 = U[1], H0 = A[4], nx = _0[0] === 0 ? K0(_0[1]) : g1(_0[1]); + if (j) var wx = [ + 0, + [ + 0, + py0, + b(j[1]) + ], + 0 + ], Sx = J(my0, N0, 0, [ + 0, + [ + 0, + ky0, + Or(f0) + ], + wx + ]); + else var Sx = Or(f0); + return J(_y0, N0, 0, [ + 0, + [ + 0, + yy0, + nx + ], + [ + 0, + [ + 0, + dy0, + Sx + ], + [ + 0, + [ + 0, + hy0, + !!H0 + ], + 0 + ] + ] + ]); + } + function Mx(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: + var f0 = A[1], _0 = f0[4], N0 = [ + 0, + [ + 0, + Ly0, + !!f0[2] + ], + [ + 0, + [ + 0, + My0, + !!f0[3] + ], + 0 + ] + ], H0 = [ + 0, + [ + 0, + qy0, + gr(function(yr) { + var Ir = yr[2], x1 = Ir[1], D1 = yr[1], X1 = [ + 0, + [ + 0, + Dy0, + En(Ir[2]) + ], + 0 + ]; + return J(Fy0, D1, 0, [ + 0, + [ + 0, + Ry0, + K0(x1) + ], + X1 + ]); + }, f0[1]) + ], + N0 + ]; + return J(By0, j, y1(_0), H0); + case 1: + var nx = A[1], wx = nx[4], Sx = [ + 0, + [ + 0, + Xy0, + !!nx[2] + ], + [ + 0, + [ + 0, + Uy0, + !!nx[3] + ], + 0 + ] + ], er = [ + 0, + [ + 0, + Gy0, + gr(function(yr) { + var Ir = yr[2], x1 = Ir[1], D1 = yr[1], X1 = [ + 0, + [ + 0, + Ny0, + M2(Ir[2]) + ], + 0 + ]; + return J(jy0, D1, 0, [ + 0, + [ + 0, + Oy0, + K0(x1) + ], + X1 + ]); + }, nx[1]) + ], + Sx + ]; + return J(Yy0, j, y1(wx), er); + case 2: + var Lx = A[1], Xx = Lx[1], ur = Lx[4], $x = Lx[3], ir = Lx[2], or = [ + 0, + [ + 0, + Ky0, + U1(Xx[0] === 0 ? yn(function(yr) { + var Ir = yr[1]; + return J(Cy0, Ir, 0, [ + 0, + [ + 0, + Py0, + K0(yr[2][1]) + ], + 0 + ]); + }, Xx[1]) : yn(function(yr) { + var Ir = yr[2], x1 = Ir[1], D1 = yr[1], X1 = [ + 0, + [ + 0, + Sy0, + g1(Ir[2]) + ], + 0 + ]; + return J(Iy0, D1, 0, [ + 0, + [ + 0, + Ay0, + K0(x1) + ], + X1 + ]); + }, Xx[1])) + ], + [ + 0, + [ + 0, + Jy0, + !!ir + ], + [ + 0, + [ + 0, + zy0, + !!$x + ], + 0 + ] + ] + ]; + return J(Hy0, j, y1(ur), or); + case 3: + var Mr = A[1], jx = Mr[3], u1 = [ + 0, + [ + 0, + Wy0, + !!Mr[2] + ], + 0 + ], p1 = [ + 0, + [ + 0, + Vy0, + gr(function(yr) { + var Ir = yr[1]; + return J(Ey0, Ir, 0, [ + 0, + [ + 0, + Ty0, + K0(yr[2][1]) + ], + 0 + ]); + }, Mr[1]) + ], + u1 + ]; + return J($y0, j, y1(jx), p1); + default: + var j1 = A[1], Ur = j1[4], Wr = [ + 0, + [ + 0, + Zy0, + !!j1[2] + ], + [ + 0, + [ + 0, + Qy0, + !!j1[3] + ], + 0 + ] + ], s1 = [ + 0, + [ + 0, + x90, + gr(function(yr) { + var Ir = yr[2], x1 = Ir[1], D1 = yr[1], X1 = [ + 0, + [ + 0, + wy0, + L2(Ir[2]) + ], + 0 + ]; + return J(by0, D1, 0, [ + 0, + [ + 0, + gy0, + K0(x1) + ], + X1 + ]); + }, j1[1]) + ], + Wr + ]; + return J(r90, j, y1(Ur), s1); + } + } + function rr(U) { + var A = U[2], j = A[5], f0 = A[4], _0 = A[2], N0 = A[1], H0 = U[1], nx = [ + 0, + [ + 0, + u90, + gr(Ar, A[3]) + ], + 0 + ], wx = [ + 0, + [ + 0, + i90, + An(0, f0) + ], + nx + ], Sx = [ + 0, + [ + 0, + f90, + dx(Z1, _0) + ], + wx + ]; + return J(s90, H0, j, [ + 0, + [ + 0, + c90, + K0(N0) + ], + Sx + ]); + } + function Ar(U) { + var A = U[2], j = A[1], f0 = A[3], _0 = A[2], N0 = U[1]; + return J(v90, N0, f0, [ + 0, + [ + 0, + o90, + j[0] === 0 ? K0(j[1]) : $s(j[1]) + ], + [ + 0, + [ + 0, + a90, + dx(In, _0) + ], + 0 + ] + ]); + } + function Or(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: + var f0 = A[1], _0 = f0[3], N0 = f0[1], H0 = [ + 0, + [ + 0, + l90, + Jl(z2, f0[2]) + ], + 0 + ], nx = [ + 0, + [ + 0, + p90, + gr(ro, N0) + ], + H0 + ]; + return J(k90, j, y1(_0), nx); + case 1: + var wx = A[1], Sx = wx[3], er = wx[1], Lx = [ + 0, + [ + 0, + m90, + Jl(z2, wx[2]) + ], + 0 + ], Xx = [ + 0, + [ + 0, + h90, + gr(xo, er) + ], + Lx + ]; + return J(d90, j, y1(Sx), Xx); + case 2: return bx(j, A[1]); + default: return b(A[1]); + } + } + function ne(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = U[1]; + if (!j) return Or(f0); + var N0 = [ + 0, + [ + 0, + y90, + b(j[1]) + ], + 0 + ]; + return J(w90, _0, 0, [ + 0, + [ + 0, + _90, + Or(f0) + ], + N0 + ]); + } + function Y2(U) { + var A = U[2], j = A[2], f0 = U[1]; + return J(T90, f0, j, [ + 0, + [ + 0, + b90, + Bv + ], + [ + 0, + [ + 0, + g90, + z2(A[1]) + ], + 0 + ] + ]); + } + function je(U) { + var A = U[2], j = A[3], f0 = A[2], _0 = A[1]; + if (j) { + var N0 = j[1], H0 = N0[2], nx = H0[2], wx = N0[1], er = cx([ + 0, + J(S90, wx, nx, [ + 0, + [ + 0, + E90, + Or(H0[1]) + ], + 0 + ]), + Vh(ne, f0) + ]); + return U1(_0 ? [ + 0, + Y2(_0[1]), + er + ] : er); + } + var Xx = yn(ne, f0); + return U1(_0 ? [ + 0, + Y2(_0[1]), + Xx + ] : Xx); + } + function kt(U, A) { + var j = A[2]; + return J(I90, U, j, [ + 0, + [ + 0, + A90, + Or(A[1]) + ], + 0 + ]); + } + function xo(U) { + switch (U[0]) { + case 0: + var A = U[1], j = A[2], f0 = j[2], _0 = j[1], N0 = A[1]; + if (!f0) return Or(_0); + var H0 = [ + 0, + [ + 0, + P90, + b(f0[1]) + ], + 0 + ]; + return J(N90, N0, 0, [ + 0, + [ + 0, + C90, + Or(_0) + ], + H0 + ]); + case 1: + var nx = U[1]; + return kt(nx[1], nx[2]); + default: return F2; + } + } + function Tn(U) { + switch (U[0]) { + case 0: return F2; + case 1: return z2(U[1]); + default: + var A = U[1], j = A[2], f0 = A[1]; + return J(Xb0, f0, 0, [ + 0, + [ + 0, + Ub0, + no([ + 0, + j[1], + j[2] + ]) + ], + 0 + ]); + } + } + function ke(U) { + if (U[0] === 0) { + var A = U[1], j = A[2], f0 = A[1]; + switch (j[0]) { + case 0: + var _0 = j[3], N0 = j[1], $x = 0, ir = _0, fr = 0, or = O90, Mr = b(j[2]), jx = N0; + break; + case 1: + var H0 = j[2], nx = j[1], $x = 0, ir = 0, fr = 1, or = j90, Mr = V0([ + 0, + H0[1], + H0[2] + ]), jx = nx; + break; + case 2: + var wx = j[2], Sx = j[3], er = j[1], $x = Sx, ir = 0, fr = 0, or = D90, Mr = V0([ + 0, + wx[1], + wx[2] + ]), jx = er; + break; + default: var Lx = j[2], Xx = j[3], ur = j[1], $x = Xx, ir = 0, fr = 0, or = R90, Mr = V0([ + 0, + Lx[1], + Lx[2] + ]), jx = ur; + } + switch (jx[0]) { + case 0: + var Wr = $x, s1 = 0, yr = g1(jx[1]); + break; + case 1: + var Wr = $x, s1 = 0, yr = M2(jx[1]); + break; + case 2: + var Wr = $x, s1 = 0, yr = L2(jx[1]); + break; + case 3: + var Wr = $x, s1 = 0, yr = K0(jx[1]); + break; + case 4: + var u1 = Px(F90), Wr = u1[3], s1 = u1[2], yr = u1[1]; + break; + default: var p1 = jx[1][2], j1 = p1[1], Wr = O2(p1[2], $x), s1 = 1, yr = b(j1); + } + return J(G90, f0, Wr, [ + 0, + [ + 0, + X90, + yr + ], + [ + 0, + [ + 0, + U90, + Mr + ], + [ + 0, + [ + 0, + B90, + Wx(or) + ], + [ + 0, + [ + 0, + q90, + !!fr + ], + [ + 0, + [ + 0, + L90, + !!ir + ], + [ + 0, + [ + 0, + M90, + !!s1 + ], + 0 + ] + ] + ] + ] + ] + ]); + } + var Ir = U[1], x1 = Ir[2], D1 = x1[2], X1 = Ir[1]; + return J(z90, X1, D1, [ + 0, + [ + 0, + Y90, + b(x1[1]) + ], + 0 + ]); + } + function ro(U) { + if (U[0] !== 0) { + var A = U[1]; + return kt(A[1], A[2]); + } + var j = U[1], f0 = j[2], _0 = f0[3], N0 = f0[2], H0 = f0[1], nx = f0[4], wx = j[1]; + switch (H0[0]) { + case 0: + var Lx = 0, Xx = 0, ur = g1(H0[1]); + break; + case 1: + var Lx = 0, Xx = 0, ur = M2(H0[1]); + break; + case 2: + var Lx = 0, Xx = 0, ur = L2(H0[1]); + break; + case 3: + var Lx = 0, Xx = 0, ur = K0(H0[1]); + break; + default: var Sx = H0[1][2], Lx = Sx[2], Xx = 1, ur = b(Sx[1]); + } + if (_0) var $x = _0[1], ir = Br(N0[1], $x[1]), fr = [ + 0, + [ + 0, + J90, + b($x) + ], + 0 + ], or = J(H90, ir, 0, [ + 0, + [ + 0, + K90, + Or(N0) + ], + fr + ]); + else var or = Or(N0); + return J(r_0, wx, Lx, [ + 0, + [ + 0, + x_0, + ur + ], + [ + 0, + [ + 0, + Z90, + or + ], + [ + 0, + [ + 0, + Q90, + ks + ], + [ + 0, + [ + 0, + $90, + !1 + ], + [ + 0, + [ + 0, + V90, + !!nx + ], + [ + 0, + [ + 0, + W90, + !!Xx + ], + 0 + ] + ] + ] + ] + ] + ]); + } + function Js(U) { + var A = U[2], j = A[2], f0 = U[1]; + return J(t_0, f0, j, [ + 0, + [ + 0, + e_0, + b(A[1]) + ], + 0 + ]); + } + function eo(U) { + return U[0] === 0 ? b(U[1]) : Js(U[1]); + } + function Ks(U) { + switch (U[0]) { + case 0: return b(U[1]); + case 1: return Js(U[1]); + default: return F2; + } + } + function M2(U) { + var A = U[2]; + return J(i_0, U[1], A[3], [ + 0, + [ + 0, + u_0, + A[1] + ], + [ + 0, + [ + 0, + n_0, + Wx(A[2]) + ], + 0 + ] + ]); + } + function L2(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = A[3], N0 = U[1], H0 = f0 ? bq(al, f0[1]) : Zq(f_0, rB(95, C2(j, 0, Rx(j) - 1 | 0))); + return J(o_0, N0, _0, [ + 0, + [ + 0, + a_0, + F2 + ], + [ + 0, + [ + 0, + s_0, + Wx(H0) + ], + [ + 0, + [ + 0, + c_0, + Wx(j) + ], + 0 + ] + ] + ]); + } + function g1(U) { + var A = U[2]; + return J(p_0, U[1], A[3], [ + 0, + [ + 0, + l_0, + Wx(A[1]) + ], + [ + 0, + [ + 0, + v_0, + Wx(A[2]) + ], + 0 + ] + ]); + } + function En(U) { + var A = U[2], j = A[1], f0 = A[2], _0 = U[1]; + return J(y_0, _0, f0, [ + 0, + [ + 0, + d_0, + !!j + ], + [ + 0, + [ + 0, + h_0, + Wx(j ? k_0 : m_0) + ], + 0 + ] + ]); + } + function Sn(U) { + return J(I_0, U[1], U[2], [ + 0, + [ + 0, + A_0, + F2 + ], + [ + 0, + [ + 0, + S_0, + Hv + ], + 0 + ] + ]); + } + function Hs(U) { + var A = U[2], j = A[3], f0 = A[1], _0 = U[1], N0 = [ + 0, + [ + 0, + P_0, + gr(b, A[2]) + ], + 0 + ]; + return J(N_0, _0, j, [ + 0, + [ + 0, + C_0, + gr(Ws, f0) + ], + N0 + ]); + } + function Ws(U) { + var A = U[2], j = A[1], f0 = A[2], _0 = U[1]; + return J(F_0, _0, 0, [ + 0, + [ + 0, + R_0, + zs([ + 0, + [ + 0, + j_0, + Wx(j[1]) + ], + [ + 0, + [ + 0, + O_0, + Wx(j[2]) + ], + 0 + ] + ]) + ], + [ + 0, + [ + 0, + D_0, + !!f0 + ], + 0 + ] + ]); + } + function mt(U) { + var A = U[2], j = A[3], f0 = A[1], _0 = U[1], N0 = [ + 0, + [ + 0, + B_0, + Wx(AO(A[2])) + ], + 0 + ]; + return J(X_0, _0, j, [ + 0, + [ + 0, + U_0, + gr(to, f0) + ], + N0 + ]); + } + function to(U) { + var A = U[2], j = A[1], f0 = U[1], _0 = [ + 0, + [ + 0, + G_0, + dx(b, A[2]) + ], + 0 + ]; + return J(z_0, f0, 0, [ + 0, + [ + 0, + Y_0, + Or(j) + ], + _0 + ]); + } + function Q1(U) { + var A = U[2], j = A[2], f0 = U[1]; + switch (A[1]) { + case 0: + var _0 = J_0; + break; + case 1: + var _0 = K_0; + break; + case 2: + var _0 = H_0; + break; + case 3: + var _0 = W_0; + break; + case 4: + var _0 = V_0; + break; + default: var _0 = $_0; + } + return J(Z_0, f0, j, [ + 0, + [ + 0, + Q_0, + Wx(_0) + ], + 0 + ]); + } + function ar(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: return J(xw0, j, A[1], 0); + case 1: return J(rw0, j, A[1], 0); + case 2: return J(ew0, j, A[1], 0); + case 3: return J(tw0, j, A[1], 0); + case 4: return J(nw0, j, A[1], 0); + case 5: return J(iw0, j, A[1], 0); + case 6: return J(fw0, j, A[1], 0); + case 7: return J(cw0, j, A[1], 0); + case 8: return J(sw0, j, A[2], 0); + case 9: return J(uw0, j, A[1], 0); + case 10: return J(Lb0, j, A[1], 0); + case 11: + var f0 = A[1], _0 = f0[2]; + return J(ow0, j, _0, [ + 0, + [ + 0, + aw0, + ar(f0[1]) + ], + 0 + ]); + case 12: return Vs([ + 0, + j, + A[1] + ]); + case 13: + var N0 = A[1], H0 = N0[2], nx = N0[4], wx = N0[3], Sx = N0[1], er = O2(y1(H0[2][3]), nx), Lx = H0[2], Xx = Lx[2], ur = Lx[1], $x = [ + 0, + [ + 0, + Pd0, + dx(Z1, Sx) + ], + 0 + ], ir = [ + 0, + [ + 0, + Cd0, + nv(wx) + ], + $x + ], fr = [ + 0, + [ + 0, + Nd0, + dx(Hr, Xx) + ], + ir + ]; + return J(jd0, j, er, [ + 0, + [ + 0, + Od0, + O1(ur) + ], + fr + ]); + case 14: return An(1, [ + 0, + j, + A[1] + ]); + case 15: + var or = A[1], Mr = or[3], jx = or[2], u1 = [ + 0, + [ + 0, + Eg0, + An(0, or[1]) + ], + 0 + ]; + return J(Ag0, j, Mr, [ + 0, + [ + 0, + Sg0, + gr(Ar, jx) + ], + u1 + ]); + case 16: + var p1 = A[1], j1 = p1[2]; + return J(Pg0, j, j1, [ + 0, + [ + 0, + Ig0, + ar(p1[1]) + ], + 0 + ]); + case 17: + var Ur = A[1], Wr = Ur[5], s1 = Ur[3], yr = Ur[2], Ir = Ur[1], x1 = [ + 0, + [ + 0, + Cg0, + ar(Ur[4]) + ], + 0 + ], D1 = [ + 0, + [ + 0, + Ng0, + ar(s1) + ], + x1 + ], X1 = [ + 0, + [ + 0, + Og0, + ar(yr) + ], + D1 + ]; + return J(Dg0, j, Wr, [ + 0, + [ + 0, + jg0, + ar(Ir) + ], + X1 + ]); + case 18: + var De = A[1], T1 = De[2]; + return J(Fg0, j, T1, [ + 0, + [ + 0, + Rg0, + Zs(De[1]) + ], + 0 + ]); + case 19: return uo([ + 0, + j, + A[1] + ]); + case 20: + var w2 = A[1], V1 = w2[3]; + return J(zg0, j, V1, tv(w2)); + case 21: + var i1 = A[1], J2 = i1[1], rt = J2[3], dt = [ + 0, + [ + 0, + Jg0, + !!i1[2] + ], + 0 + ]; + return J(Kg0, j, rt, qx(tv(J2), dt)); + case 22: + var et = A[1], g2 = et[1], r1 = et[2]; + return J(Wg0, j, r1, [ + 0, + [ + 0, + Hg0, + gr(ar, [ + 0, + g2[1], + [ + 0, + g2[2], + g2[3] + ] + ]) + ], + 0 + ]); + case 23: + var me = A[1], b2 = me[1], yt = me[2]; + return J($g0, j, yt, [ + 0, + [ + 0, + Vg0, + gr(ar, [ + 0, + b2[1], + [ + 0, + b2[2], + b2[3] + ] + ]) + ], + 0 + ]); + case 24: + var ue = A[1], _t = ue[2], Jt = ue[3], Kt = ue[1], Ht = _t ? [ + 0, + [ + 0, + Qg0, + In(_t[1]) + ], + 0 + ] : 0; + return J(xb0, j, Jt, [ + 0, + [ + 0, + Zg0, + Qs(Kt) + ], + Ht + ]); + case 25: + var Pn = A[1], Cn = Pn[2]; + return J(ub0, j, Cn, [ + 0, + [ + 0, + nb0, + ar(Pn[1]) + ], + 0 + ]); + case 26: return io(j, A[1]); + case 27: + var Nn = A[1]; + return uv(j, Nn[2], vb0, Nn[1]); + case 28: + var ie = A[1], Dx = ie[3], tt = [ + 0, + [ + 0, + lb0, + !!ie[2] + ], + 0 + ]; + return J(kb0, j, Dx, [ + 0, + [ + 0, + pb0, + gr(function(On) { + var Fe = On[2], jn = On[1]; + switch (Fe[0]) { + case 0: return ar(Fe[1]); + case 1: + var T2 = Fe[1], he = T2[2], it = T2[1], ra = [ + 0, + [ + 0, + mb0, + !!T2[4] + ], + 0 + ], Dn = [ + 0, + [ + 0, + hb0, + dx(Q1, T2[3]) + ], + ra + ], ea = [ + 0, + [ + 0, + db0, + ar(he) + ], + Dn + ]; + return J(_b0, jn, 0, [ + 0, + [ + 0, + yb0, + K0(it) + ], + ea + ]); + default: + var Me = Fe[1], ta = Me[1], na = [ + 0, + [ + 0, + wb0, + ar(Me[2]) + ], + 0 + ]; + return J(bb0, jn, 0, [ + 0, + [ + 0, + gb0, + dx(K0, ta) + ], + na + ]); + } + }, ie[1]) + ], + tt + ]); + case 29: + var Re = A[1]; + return J(Sb0, j, Re[3], [ + 0, + [ + 0, + Eb0, + Wx(Re[1]) + ], + [ + 0, + [ + 0, + Tb0, + Wx(Re[2]) + ], + 0 + ] + ]); + case 30: + var Wt = A[1]; + return J(Pb0, j, Wt[3], [ + 0, + [ + 0, + Ib0, + Wt[1] + ], + [ + 0, + [ + 0, + Ab0, + Wx(Wt[2]) + ], + 0 + ] + ]); + case 31: + var Vt = A[1]; + return J(Ob0, j, Vt[3], [ + 0, + [ + 0, + Nb0, + F2 + ], + [ + 0, + [ + 0, + Cb0, + Wx(Vt[2]) + ], + 0 + ] + ]); + case 32: + var q2 = A[1], nt = q2[1], ut = q2[2]; + return J(Mb0, j, ut, [ + 0, + [ + 0, + Fb0, + !!nt + ], + [ + 0, + [ + 0, + Rb0, + Wx(nt ? jb0 : Db0) + ], + 0 + ] + ]); + case 33: return J(vw0, j, A[1], 0); + case 34: return J(lw0, j, A[1], 0); + default: return J(pw0, j, A[1], 0); + } + } + function no(U) { + var A = U[2], j = A[2], f0 = A[3], _0 = j[2], N0 = j[1], H0 = U[1]; + switch (A[1]) { + case 0: + var nx = F2; + break; + case 1: + var nx = tl; + break; + default: var nx = V3; + } + var wx = [ + 0, + [ + 0, + mw0, + dx(ar, _0) + ], + [ + 0, + [ + 0, + kw0, + nx + ], + 0 + ] + ], Sx = [ + 0, + [ + 0, + hw0, + K0(N0) + ], + wx + ]; + return J(dw0, H0, y1(f0), Sx); + } + function Vs(U) { + var A = U[2], j = A[5], f0 = A[3], _0 = A[2][2], N0 = A[4], H0 = _0[3], nx = _0[2], wx = _0[1], Sx = A[1], er = U[1], Lx = O2(y1(_0[4]), N0), Xx = j === 0 ? yw0 : _w0, ur = j === 0 ? 0 : [ + 0, + [ + 0, + ww0, + dx(S3, wx) + ], + 0 + ], $x = [ + 0, + [ + 0, + gw0, + dx(Z1, Sx) + ], + 0 + ], ir = [ + 0, + [ + 0, + bw0, + dx(E3, H0) + ], + $x + ], fr = f0[0] === 0 ? ar(f0[1]) : no(f0[1]); + return J(Xx, er, Lx, qx([ + 0, + [ + 0, + Ew0, + gr(function(or) { + return ht(0, or); + }, nx) + ], + [ + 0, + [ + 0, + Tw0, + fr + ], + ir + ] + ], ur)); + } + function ht(U, A) { + var j = A[2], f0 = j[1], _0 = A[1], N0 = [ + 0, + [ + 0, + Sw0, + !!j[3] + ], + 0 + ], H0 = [ + 0, + [ + 0, + Aw0, + ar(j[2]) + ], + N0 + ]; + return J(Pw0, _0, U, [ + 0, + [ + 0, + Iw0, + dx(K0, f0) + ], + H0 + ]); + } + function E3(U) { + var A = U[2]; + return ht(A[2], A[1]); + } + function S3(U) { + var A = U[2], j = A[2], f0 = U[1], _0 = [ + 0, + [ + 0, + Nw0, + ar(A[1][2]) + ], + [ + 0, + [ + 0, + Cw0, + !1 + ], + 0 + ] + ]; + return J(jw0, f0, j, [ + 0, + [ + 0, + Ow0, + dx(K0, 0) + ], + _0 + ]); + } + function An(U, A) { + var j = A[2], f0 = j[4], _0 = j[2], N0 = j[1], H0 = A[1], nx = y2(function(fr, or) { + var Mr = fr[4], jx = fr[3], u1 = fr[2], p1 = fr[1]; + switch (or[0]) { + case 0: + var j1 = or[1], Ur = j1[2], Wr = Ur[2], s1 = Ur[1], yr = Ur[8], Ir = Ur[7], x1 = Ur[6], D1 = Ur[5], X1 = Ur[4], De = Ur[3], T1 = j1[1]; + switch (s1[0]) { + case 0: + var w2 = g1(s1[1]); + break; + case 1: + var w2 = M2(s1[1]); + break; + case 2: + var w2 = L2(s1[1]); + break; + case 3: + var w2 = K0(s1[1]); + break; + case 4: + var w2 = Px(Xw0); + break; + default: var w2 = Px(Gw0); + } + switch (Wr[0]) { + case 0: + var J2 = Yw0, rt = ar(Wr[1]); + break; + case 1: + var V1 = Wr[1], J2 = zw0, rt = Vs([ + 0, + V1[1], + V1[2] + ]); + break; + default: var i1 = Wr[1], J2 = Jw0, rt = Vs([ + 0, + i1[1], + i1[2] + ]); + } + return [ + 0, + [ + 0, + J(rg0, T1, yr, [ + 0, + [ + 0, + xg0, + w2 + ], + [ + 0, + [ + 0, + Zw0, + rt + ], + [ + 0, + [ + 0, + Qw0, + !!x1 + ], + [ + 0, + [ + 0, + $w0, + !!De + ], + [ + 0, + [ + 0, + Vw0, + !!X1 + ], + [ + 0, + [ + 0, + Ww0, + !!D1 + ], + [ + 0, + [ + 0, + Hw0, + dx(Q1, Ir) + ], + [ + 0, + [ + 0, + Kw0, + Wx(J2) + ], + 0 + ] + ] + ] + ] + ] + ] + ] + ]), + p1 + ], + u1, + jx, + Mr + ]; + case 1: + var dt = or[1], et = dt[2], g2 = et[2], r1 = dt[1]; + return [ + 0, + [ + 0, + J(tg0, r1, g2, [ + 0, + [ + 0, + eg0, + ar(et[1]) + ], + 0 + ]), + p1 + ], + u1, + jx, + Mr + ]; + case 2: + var me = or[1], b2 = me[2], yt = b2[6], ue = b2[4], _t = b2[3], Jt = b2[2], Kt = b2[1], Ht = me[1], Pn = [ + 0, + [ + 0, + ug0, + !!ue + ], + [ + 0, + [ + 0, + ng0, + dx(Q1, b2[5]) + ], + 0 + ] + ], Cn = [ + 0, + [ + 0, + ig0, + ar(_t) + ], + Pn + ], Nn = [ + 0, + [ + 0, + fg0, + ar(Jt) + ], + Cn + ]; + return [ + 0, + p1, + [ + 0, + J(sg0, Ht, yt, [ + 0, + [ + 0, + cg0, + dx(K0, Kt) + ], + Nn + ]), + u1 + ], + jx, + Mr + ]; + case 3: + var ie = or[1], Dx = ie[2], tt = Dx[3], Re = ie[1], Wt = [ + 0, + [ + 0, + ag0, + !!Dx[2] + ], + 0 + ]; + return [ + 0, + p1, + u1, + [ + 0, + J(vg0, Re, tt, [ + 0, + [ + 0, + og0, + Vs(Dx[1]) + ], + Wt + ]), + jx + ], + Mr + ]; + case 4: + var Vt = or[1], q2 = Vt[2], nt = q2[6], ut = q2[5], xa = q2[4], wt = q2[3], On = q2[1], Fe = Vt[1], jn = [ + 0, + [ + 0, + gg0, + !!wt + ], + [ + 0, + [ + 0, + wg0, + !!xa + ], + [ + 0, + [ + 0, + _g0, + !!ut + ], + [ + 0, + [ + 0, + yg0, + ar(q2[2]) + ], + 0 + ] + ] + ] + ]; + return [ + 0, + p1, + u1, + jx, + [ + 0, + J(Tg0, Fe, nt, [ + 0, + [ + 0, + bg0, + K0(On) + ], + jn + ]), + Mr + ] + ]; + default: + var T2 = or[1], he = T2[2], it = he[6], ra = he[4], Dn = he[3], ea = he[2], Me = he[1], ta = T2[1], na = 0; + switch (he[5]) { + case 0: + var Rn = "PlusOptional"; + break; + case 1: + var Rn = "MinusOptional"; + break; + case 2: + var Rn = "Optional"; + break; + default: var Rn = F2; + } + var Le = [ + 0, + [ + 0, + pg0, + dx(Q1, ra) + ], + [ + 0, + [ + 0, + lg0, + Rn + ], + na + ] + ], $t = [ + 0, + [ + 0, + kg0, + ar(Dn) + ], + Le + ], ao = [ + 0, + [ + 0, + mg0, + ar(ea) + ], + $t + ]; + return [ + 0, + [ + 0, + J(dg0, ta, it, [ + 0, + [ + 0, + hg0, + Zs(Me) + ], + ao + ]), + p1 + ], + u1, + jx, + Mr + ]; + } + }, Dw0, j[3]), wx = nx[3], Sx = nx[2], er = nx[1], Lx = [ + 0, + [ + 0, + Rw0, + U1(cx(nx[4])) + ], + 0 + ], Xx = [ + 0, + [ + 0, + Fw0, + U1(cx(wx)) + ], + Lx + ], ur = [ + 0, + [ + 0, + Mw0, + U1(cx(Sx)) + ], + Xx + ], $x = [ + 0, + [ + 0, + qw0, + !!N0 + ], + [ + 0, + [ + 0, + Lw0, + U1(cx(er)) + ], + ur + ] + ], ir = U ? [ + 0, + [ + 0, + Bw0, + !!_0 + ], + $x + ] : $x; + return J(Uw0, H0, y1(f0), ir); + } + function $s(U) { + var A = U[2], j = A[1], f0 = A[2], _0 = U[1]; + return J(qg0, _0, 0, [ + 0, + [ + 0, + Lg0, + j[0] === 0 ? K0(j[1]) : $s(j[1]) + ], + [ + 0, + [ + 0, + Mg0, + K0(f0) + ], + 0 + ] + ]); + } + function uo(U) { + var A = U[2], j = A[1], f0 = A[3], _0 = A[2], N0 = U[1]; + return J(Xg0, N0, f0, [ + 0, + [ + 0, + Ug0, + j[0] === 0 ? K0(j[1]) : $s(j[1]) + ], + [ + 0, + [ + 0, + Bg0, + dx(In, _0) + ], + 0 + ] + ]); + } + function tv(U) { + var A = U[1], j = [ + 0, + [ + 0, + Gg0, + ar(U[2]) + ], + 0 + ]; + return [ + 0, + [ + 0, + Yg0, + ar(A) + ], + j + ]; + } + function Qs(U) { + if (U[0] === 0) return K0(U[1]); + var A = U[1], j = A[2], f0 = j[2], _0 = A[1]; + return J(tb0, _0, 0, [ + 0, + [ + 0, + eb0, + Qs(j[1]) + ], + [ + 0, + [ + 0, + rb0, + K0(f0) + ], + 0 + ] + ]); + } + function nv(U) { + return U[0] === 0 ? F2 : io(U[1], U[2]); + } + function io(U, A) { + var j = A[3], f0 = A[2]; + switch (A[4]) { + case 0: + var _0 = ib0; + break; + case 1: + var _0 = fb0; + break; + default: var _0 = cb0; + } + return uv(U, j, _0, f0); + } + function uv(U, A, j, f0) { + return J(ob0, U, A, [ + 0, + [ + 0, + ab0, + Wx(j) + ], + [ + 0, + [ + 0, + sb0, + ar(f0) + ], + 0 + ] + ]); + } + function z2(U) { + var A = U[1]; + return J(Bb0, A, 0, [ + 0, + [ + 0, + qb0, + ar(U[2]) + ], + 0 + ]); + } + function Z1(U) { + var A = U[2], j = A[2], f0 = U[1], _0 = [ + 0, + [ + 0, + Gb0, + gr(Zs, A[1]) + ], + 0 + ]; + return J(Yb0, f0, y1(j), _0); + } + function Zs(U) { + var A = U[2], j = A[1][2], f0 = A[6], _0 = A[5], N0 = A[4], H0 = A[2], nx = j[2], wx = j[1], Sx = U[1], er = A[3] ? [ + 0, + [ + 0, + zb0, + !0 + ], + 0 + ] : 0, Lx = [ + 0, + [ + 0, + Jb0, + dx(ar, _0) + ], + 0 + ], Xx = [ + 0, + [ + 0, + Kb0, + dx(Q1, N0) + ], + Lx + ], ur = [ + 0, + [ + 0, + Hb0, + !!t3(f0) + ], + Xx + ]; + return J($b0, Sx, nx, qx([ + 0, + [ + 0, + Vb0, + Wx(wx) + ], + [ + 0, + [ + 0, + Wb0, + Jl(z2, H0) + ], + ur + ] + ], er)); + } + function In(U) { + var A = U[2], j = A[2], f0 = U[1], _0 = [ + 0, + [ + 0, + Qb0, + gr(ar, A[1]) + ], + 0 + ]; + return J(Zb0, f0, y1(j), _0); + } + function fo(U) { + var A = U[2], j = A[2], f0 = U[1], _0 = [ + 0, + [ + 0, + xT0, + gr(iv, A[1]) + ], + 0 + ]; + return J(rT0, f0, y1(j), _0); + } + function iv(U) { + if (U[0] === 0) return ar(U[1]); + var A = U[1], j = A[1], f0 = A[2][1]; + return uo([ + 0, + j, + [ + 0, + [0, wn(0, [ + 0, + j, + eT0 + ])], + 0, + f0 + ] + ]); + } + function co(U) { + var A = U[2], j = A[1], f0 = A[4], _0 = A[2], N0 = U[1], H0 = [ + 0, + [ + 0, + tT0, + gr(rp, A[3][2]) + ], + 0 + ], nx = [ + 0, + [ + 0, + nT0, + dx(D5, _0) + ], + H0 + ], wx = j[2], Sx = wx[2], er = wx[4], Lx = wx[3], Xx = wx[1], ur = j[1], $x = Sx ? [ + 0, + [ + 0, + oT0, + fo(Sx[1]) + ], + 0 + ] : 0, ir = [ + 0, + [ + 0, + lT0, + gr(Kl, er) + ], + [ + 0, + [ + 0, + vT0, + !!Lx + ], + 0 + ] + ]; + return J(iT0, N0, f0, [ + 0, + [ + 0, + uT0, + J(kT0, ur, 0, qx([ + 0, + [ + 0, + pT0, + ep(Xx) + ], + ir + ], $x)) + ], + nx + ]); + } + function fv(U) { + var A = U[2], j = A[4], f0 = A[3][2], _0 = A[1], N0 = U[1], H0 = [ + 0, + [ + 0, + fT0, + J(yT0, A[2], 0, 0) + ], + 0 + ], nx = [ + 0, + [ + 0, + cT0, + gr(rp, f0) + ], + H0 + ]; + return J(aT0, N0, j, [ + 0, + [ + 0, + sT0, + J(mT0, _0, 0, 0) + ], + nx + ]); + } + function Kl(U) { + if (U[0] === 0) { + var A = U[1], j = A[2], f0 = j[1], _0 = j[2], N0 = A[1]; + return J(gT0, N0, 0, [ + 0, + [ + 0, + wT0, + f0[0] === 0 ? so(f0[1]) : np(f0[1]) + ], + [ + 0, + [ + 0, + _T0, + dx(R5, _0) + ], + 0 + ] + ]); + } + var nx = U[1], wx = nx[2], Sx = wx[2], er = nx[1]; + return J(TT0, er, Sx, [ + 0, + [ + 0, + bT0, + b(wx[1]) + ], + 0 + ]); + } + function D5(U) { + var A = U[1]; + return J(dT0, A, 0, [ + 0, + [ + 0, + hT0, + ep(U[2][1]) + ], + 0 + ]); + } + function rp(U) { + var A = U[2], j = U[1]; + switch (A[0]) { + case 0: return co([ + 0, + j, + A[1] + ]); + case 1: return fv([ + 0, + j, + A[1] + ]); + case 2: return tp([ + 0, + j, + A[1] + ]); + case 3: + var f0 = A[1], _0 = f0[2]; + return J(PT0, j, _0, [ + 0, + [ + 0, + IT0, + b(f0[1]) + ], + 0 + ]); + default: + var N0 = A[1]; + return J(OT0, j, 0, [ + 0, + [ + 0, + NT0, + Wx(N0[1]) + ], + [ + 0, + [ + 0, + CT0, + Wx(N0[2]) + ], + 0 + ] + ]); + } + } + function ep(U) { + switch (U[0]) { + case 0: return so(U[1]); + case 1: return np(U[1]); + default: return Hl(U[1]); + } + } + function R5(U) { + if (U[0] === 0) { + var A = U[1]; + return g1([ + 0, + A[1], + A[2] + ]); + } + var j = U[1]; + return tp([ + 0, + j[1], + j[2] + ]); + } + function tp(U) { + var A = U[2], j = A[1], f0 = U[1], _0 = A[2], N0 = j ? b(j[1]) : J(ET0, [ + 0, + f0[1], + [ + 0, + f0[2][1], + f0[2][2] + 1 | 0 + ], + [ + 0, + f0[3][1], + f0[3][2] - 1 | 0 + ] + ], 0, 0); + return J(AT0, f0, y1(_0), [ + 0, + [ + 0, + ST0, + N0 + ], + 0 + ]); + } + function Hl(U) { + var A = U[2], j = A[1], f0 = A[2], _0 = U[1]; + return J(RT0, _0, 0, [ + 0, + [ + 0, + DT0, + j[0] === 0 ? so(j[1]) : Hl(j[1]) + ], + [ + 0, + [ + 0, + jT0, + so(f0) + ], + 0 + ] + ]); + } + function np(U) { + var A = U[2], j = A[1], f0 = U[1], _0 = [ + 0, + [ + 0, + FT0, + so(A[2]) + ], + 0 + ]; + return J(LT0, f0, 0, [ + 0, + [ + 0, + MT0, + so(j) + ], + _0 + ]); + } + function so(U) { + var A = U[2]; + return J(BT0, U[1], A[2], [ + 0, + [ + 0, + qT0, + Wx(A[1]) + ], + 0 + ]); + } + function up(U) { + var A = U[2], j = A[2], f0 = A[1], _0 = U[1], N0 = K0(j ? j[1] : f0); + return J(GT0, _0, 0, [ + 0, + [ + 0, + XT0, + K0(f0) + ], + [ + 0, + [ + 0, + UT0, + N0 + ], + 0 + ] + ]); + } + function zt(U) { + return gr(ip, U); + } + function ip(U) { + var A = U[2], j = U[1]; + if (A[1]) var f0 = A[2], _0 = QT0; + else var f0 = A[2], _0 = ZT0; + return J(_0, j, 0, [ + 0, + [ + 0, + xE0, + Wx(f0) + ], + 0 + ]); + } + function cv(U) { + var A = U[2], j = A[1], f0 = A[2], _0 = U[1]; + if (j) var N0 = [ + 0, + [ + 0, + rE0, + b(j[1]) + ], + 0 + ], H0 = eE0; + else var N0 = 0, H0 = tE0; + return J(H0, _0, f0, N0); + } + function fp(U, A) { + var j = A[1], f0 = A[3], _0 = A[2]; + if (U) var N0 = U[1], H0 = N0(b(j)); + else var H0 = b(j); + var nx = [ + 0, + [ + 0, + nE0, + Ox(f0) + ], + 0 + ]; + return [ + 0, + [ + 0, + iE0, + H0 + ], + [ + 0, + [ + 0, + uE0, + dx(fo, _0) + ], + nx + ] + ]; + } + function cp(U, A) { + var j = A[2], f0 = A[1]; + switch (j[0]) { + case 0: + var _0 = 0, N0 = K0(j[1]); + break; + case 1: + var _0 = 0, N0 = Cx(j[1]); + break; + default: var _0 = 1, N0 = b(j[1]); + } + if (U) var H0 = U[1], nx = H0(b(f0)); + else var nx = b(f0); + return [ + 0, + [ + 0, + sE0, + nx + ], + [ + 0, + [ + 0, + cE0, + N0 + ], + [ + 0, + [ + 0, + fE0, + !!_0 + ], + 0 + ] + ] + ]; + } + var sv = Kx[2], Wl = sv[2], sp = sv[4], F5 = sv[3], ap = Kx[1], op = [ + 0, + [ + 0, + D40, + tr(sv[1]) + ], + [ + 0, + [ + 0, + j40, + zt(sp) + ], + 0 + ] + ]; + if (Wl) var vp = Wl[1], lp = qx(op, [ + 0, + [ + 0, + M40, + J(F40, vp[1], 0, [ + 0, + [ + 0, + R40, + Wx(vp[2]) + ], + 0 + ]) + ], + 0 + ]); + else var lp = op; + var Vl = J(L40, ap, F5, lp); + return Vl.errors = gr(function(U) { + var A = U[1], j = [ + 0, + [ + 0, + aE0, + Wx(SA0(U[2])) + ], + 0 + ]; + return zs([ + 0, + [ + 0, + oE0, + HY(A) + ], + j + ]); + }, qx(p0, JY[1])), I && (Vl[MD] = U1(Vh(function(U) { + var A = U[2], j = U[1], f0 = U[3], _0 = [ + 0, + [ + 0, + Dv0, + Wx(PO(A)) + ], + 0 + ], N0 = [ + 0, + x5(g0, j[3]), + 0 + ], H0 = [ + 0, + [ + 0, + Rv0, + U1([ + 0, + x5(g0, j[2]), + N0 + ]) + ], + _0 + ], nx = [ + 0, + [ + 0, + Lv0, + zs([ + 0, + [ + 0, + Mv0, + j[3][1] + ], + [ + 0, + [ + 0, + Fv0, + j[3][2] + ], + 0 + ] + ]) + ], + 0 + ], wx = [ + 0, + [ + 0, + Xv0, + zs([ + 0, + [ + 0, + Uv0, + zs([ + 0, + [ + 0, + Bv0, + j[2][1] + ], + [ + 0, + [ + 0, + qv0, + j[2][2] + ], + 0 + ] + ]) + ], + nx + ]) + ], + H0 + ]; + switch (f0) { + case 0: + var Sx = Gv0; + break; + case 1: + var Sx = Yv0; + break; + case 2: + var Sx = zv0; + break; + case 3: + var Sx = Jv0; + break; + case 4: + var Sx = Kv0; + break; + default: var Sx = Hv0; + } + return zs([ + 0, + [ + 0, + Vv0, + Wx(jU(A)) + ], + [ + 0, + [ + 0, + Wv0, + Wx(Sx) + ], + wx + ] + ]); + }, X[1]))), Vl; + } + if (typeof $j < "u") var WY = $j; + else { + var VY = {}; + Za.flow = VY; + var WY = VY; + } + WY.parse = uJ(function(x, r) { + try { + return jA0(x, r); + } catch (u) { + var t = M1(u); + return t[1] === Bj ? zY(t[2]) : zY(new NA0(Wx(Gx(CE0, _4(t))))); + } + }), DN(D); + })(globalThis); + }); + Tz = {}; + $Y(Tz, { parsers: () => tD }); + tD = {}; + $Y(tD, { flow: () => MI0 }); + bz = uI0(QY(), 1); + ZY = iI0; + o6 = (a0, ox) => (Yx, xr, ...E1) => Yx | 1 && xr == null ? void 0 : (ox.call(xr) ?? xr[a0]).apply(xr, E1); + fI0 = Array.prototype.findLast ?? function(a0) { + for (let ox = this.length - 1; ox >= 0; ox--) { + let Yx = this[ox]; + if (a0(Yx, ox, this)) return Yx; + } + }, xz = o6("findLast", function() { + if (Array.isArray(this)) return fI0; + }); + rz = o6("at", function() { + if (Array.isArray(this) || typeof this == "string") return sI0; + }); + v6 = oI0; + l6 = v6([ + "Block", + "CommentBlock", + "MultiLine" + ]); + ez = v6([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + Qj = /* @__PURE__ */ new WeakMap(); + tz = pI0; + Zj = /* @__PURE__ */ new WeakMap(); + xD = mI0; + nz = hI0; + uz = dI0; + yp = null; + yI0 = 10; + for (let a0 = 0; a0 <= yI0; a0++) _p(); + iz = _I0; + $ = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + cz = iz({ + AccessorProperty: $[0], + AnyTypeAnnotation: $[1], + ArgumentPlaceholder: $[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: $[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: $[3], + AsExpression: $[4], + AssignmentExpression: $[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: $[6], + BigIntLiteral: $[1], + BigIntLiteralTypeAnnotation: $[1], + BigIntTypeAnnotation: $[1], + BinaryExpression: $[5], + BindExpression: ["object", "callee"], + BlockStatement: $[7], + BooleanLiteral: $[1], + BooleanLiteralTypeAnnotation: $[1], + BooleanTypeAnnotation: $[1], + BreakStatement: $[8], + CallExpression: $[9], + CatchClause: ["param", "body"], + ChainExpression: $[3], + ClassAccessorProperty: $[0], + ClassBody: $[10], + ClassDeclaration: $[11], + ClassExpression: $[11], + ClassImplements: $[12], + ClassMethod: $[13], + ClassPrivateMethod: $[13], + ClassPrivateProperty: $[14], + ClassProperty: $[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: $[15], + ConditionalExpression: $[16], + ConditionalTypeAnnotation: $[17], + ContinueStatement: $[8], + DebuggerStatement: $[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: $[18], + DeclareEnum: $[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: $[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: $[21], + DeclareInterface: $[22], + DeclareModule: $[19], + DeclareModuleExports: $[23], + DeclareNamespace: $[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: $[24], + DeclareVariable: $[21], + Decorator: $[3], + Directive: $[18], + DirectiveLiteral: $[1], + DoExpression: $[10], + DoWhileStatement: $[25], + EmptyStatement: $[1], + EmptyTypeAnnotation: $[1], + EnumBigIntBody: $[26], + EnumBigIntMember: $[27], + EnumBooleanBody: $[26], + EnumBooleanMember: $[27], + EnumDeclaration: $[19], + EnumDefaultedMember: $[21], + EnumNumberBody: $[26], + EnumNumberMember: $[27], + EnumStringBody: $[26], + EnumStringMember: $[27], + EnumSymbolBody: $[26], + ExistsTypeAnnotation: $[1], + ExperimentalRestProperty: $[6], + ExperimentalSpreadProperty: $[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: $[28], + ExportNamedDeclaration: $[20], + ExportNamespaceSpecifier: $[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: $[3], + File: ["program"], + ForInStatement: $[29], + ForOfStatement: $[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: $[30], + FunctionExpression: $[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: $[15], + GenericTypeAnnotation: $[12], + HookDeclaration: $[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: $[16], + ImportAttribute: $[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: $[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: $[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: $[34], + InferredPredicate: $[1], + InferTypeAnnotation: $[35], + InterfaceDeclaration: $[22], + InterfaceExtends: $[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: $[1], + IntersectionTypeAnnotation: $[36], + JsExpressionRoot: $[37], + JsonRoot: $[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: $[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: $[1], + JSXExpressionContainer: $[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: $[1], + JSXMemberExpression: $[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: $[1], + JSXSpreadAttribute: $[6], + JSXSpreadChild: $[3], + JSXText: $[1], + KeyofTypeAnnotation: $[6], + LabeledStatement: ["label", "body"], + Literal: $[1], + LogicalExpression: $[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: $[21], + MatchExpression: $[39], + MatchExpressionCase: $[40], + MatchIdentifierPattern: $[21], + MatchLiteralPattern: $[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: $[6], + MatchStatement: $[39], + MatchStatementCase: $[40], + MatchUnaryPattern: $[6], + MatchWildcardPattern: $[1], + MemberExpression: $[38], + MetaProperty: ["meta", "property"], + MethodDefinition: $[42], + MixedTypeAnnotation: $[1], + ModuleExpression: $[10], + NeverTypeAnnotation: $[1], + NewExpression: $[9], + NGChainedExpression: $[43], + NGEmptyExpression: $[1], + NGMicrosyntax: $[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: $[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: $[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: $[37], + NullableTypeAnnotation: $[23], + NullLiteral: $[1], + NullLiteralTypeAnnotation: $[1], + NumberLiteralTypeAnnotation: $[1], + NumberTypeAnnotation: $[1], + NumericLiteral: $[1], + ObjectExpression: ["properties"], + ObjectMethod: $[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: $[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: $[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: $[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: $[9], + OptionalIndexedAccessType: $[34], + OptionalMemberExpression: $[38], + ParenthesizedExpression: $[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: $[1], + PipelineTopicExpression: $[3], + Placeholder: $[1], + PrivateIdentifier: $[1], + PrivateName: $[21], + Program: $[7], + Property: $[32], + PropertyDefinition: $[14], + QualifiedTypeIdentifier: $[44], + QualifiedTypeofIdentifier: $[44], + RegExpLiteral: $[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: $[6], + SatisfiesExpression: $[4], + SequenceExpression: $[43], + SpreadElement: $[6], + StaticBlock: $[10], + StringLiteral: $[1], + StringLiteralTypeAnnotation: $[1], + StringTypeAnnotation: $[1], + Super: $[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: $[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: $[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: $[1], + ThisTypeAnnotation: $[1], + ThrowStatement: $[6], + TopicReference: $[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: $[45], + TSAbstractKeyword: $[1], + TSAbstractMethodDefinition: $[32], + TSAbstractPropertyDefinition: $[45], + TSAnyKeyword: $[1], + TSArrayType: $[2], + TSAsExpression: $[4], + TSAsyncKeyword: $[1], + TSBigIntKeyword: $[1], + TSBooleanKeyword: $[1], + TSCallSignatureDeclaration: $[46], + TSClassImplements: $[47], + TSConditionalType: $[17], + TSConstructorType: $[46], + TSConstructSignatureDeclaration: $[46], + TSDeclareFunction: $[31], + TSDeclareKeyword: $[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: $[26], + TSEnumDeclaration: $[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: $[3], + TSExportKeyword: $[1], + TSExternalModuleReference: $[3], + TSFunctionType: $[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: $[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: $[35], + TSInstantiationExpression: $[47], + TSInterfaceBody: $[10], + TSInterfaceDeclaration: $[22], + TSInterfaceHeritage: $[47], + TSIntersectionType: $[36], + TSIntrinsicKeyword: $[1], + TSJSDocAllType: $[1], + TSJSDocNonNullableType: $[23], + TSJSDocNullableType: $[23], + TSJSDocUnknownType: $[1], + TSLiteralType: $[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: $[10], + TSModuleDeclaration: $[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: $[21], + TSNeverKeyword: $[1], + TSNonNullExpression: $[3], + TSNullKeyword: $[1], + TSNumberKeyword: $[1], + TSObjectKeyword: $[1], + TSOptionalType: $[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: $[23], + TSPrivateKeyword: $[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: $[1], + TSPublicKeyword: $[1], + TSQualifiedName: $[5], + TSReadonlyKeyword: $[1], + TSRestType: $[23], + TSSatisfiesExpression: $[4], + TSStaticKeyword: $[1], + TSStringKeyword: $[1], + TSSymbolKeyword: $[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: $[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: $[23], + TSTypeAssertion: $[4], + TSTypeLiteral: $[26], + TSTypeOperator: $[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: $[48], + TSTypeParameterInstantiation: $[48], + TSTypePredicate: $[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: $[1], + TSUnionType: $[36], + TSUnknownKeyword: $[1], + TSVoidKeyword: $[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: $[24], + TypeAnnotation: $[23], + TypeCastExpression: $[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: $[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: $[48], + TypeParameterInstantiation: $[48], + TypePredicate: $[49], + UnaryExpression: $[6], + UndefinedTypeAnnotation: $[1], + UnionTypeAnnotation: $[36], + UnknownTypeAnnotation: $[1], + UpdateExpression: $[6], + V8IntrinsicIdentifier: $[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: $[27], + Variance: $[1], + VoidPattern: $[1], + VoidTypeAnnotation: $[1], + WhileStatement: $[25], + WithStatement: ["object", "body"], + YieldExpression: $[6] + }); + sz = H5; + v6([ + "RegExpLiteral", + "BigIntLiteral", + "NumericLiteral", + "StringLiteral", + "DirectiveLiteral", + "Literal", + "JSXText", + "TemplateElement", + "StringLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation" + ]); + oz = gI0; + bI0 = String.prototype.replaceAll ?? function(a0, ox) { + return a0.global ? this.replace(a0, ox) : this.split(a0).join(ox); + }, wp = o6("replaceAll", function() { + if (typeof this == "string") return bI0; + }); + EI0 = /\*\/$/, SI0 = /^\/\*\*?/, AI0 = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, II0 = /(^|\s+)\/\/([^\n\r]*)/g, vz = /^(\r?\n)+/, PI0 = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, lz = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, CI0 = /(\r?\n|^) *\* ?/g, NI0 = []; + mz = ["noformat", "noprettier"], hz = ["format", "prettier"]; + dz = OI0; + gz = jI0; + DI0 = { + comments: !1, + components: !0, + enums: !0, + esproposal_decorators: !0, + esproposal_export_star_as: !0, + pattern_matching: !0, + tokens: !1 + }; + MI0 = gz(FI0); +}))(); +export { Tz as default, tD as parsers }; diff --git a/.github/actions/check-public-api/dist/glimmer-C2CSmn_t.js b/.github/actions/check-public-api/dist/glimmer-C2CSmn_t.js new file mode 100644 index 0000000000..522c813c80 --- /dev/null +++ b/.github/actions/check-public-api/dist/glimmer-C2CSmn_t.js @@ -0,0 +1,7533 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/glimmer.mjs +function Yn(e) { + return this[e < 0 ? this.length + e : e]; +} +function Wn(e) { + if (typeof e == "string") return Ot; + if (Array.isArray(e)) return It; + if (!e) return; + let { type: t } = e; + if (ne.has(t)) return t; +} +function Qn(e) { + let t = e === null ? "null" : typeof e; + if (t !== "string" && t !== "object") return `Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`; + if (se(e)) throw new Error("doc is valid."); + let r = Object.prototype.toString.call(e); + if (r !== "[object Object]") return `Unexpected doc '${r}'.`; + let s = jn([...ne].map((n) => `'${n}'`)); + return `Unexpected doc.type '${e.type}'. +Expected it to be ${s}.`; +} +function Jn(e, t) { + if (typeof e == "string") return t(e); + let r = /* @__PURE__ */ new Map(); + return s(e); + function s(i) { + if (r.has(i)) return r.get(i); + let a = n(i); + return r.set(i, a), a; + } + function n(i) { + switch (se(i)) { + case It: return t(i.map(s)); + case wt: return t({ + ...i, + parts: i.parts.map(s) + }); + case Tt: return t({ + ...i, + breakContents: s(i.breakContents), + flatContents: s(i.flatContents) + }); + case vt: { + let { expandedStates: a, contents: o } = i; + return a ? (a = a.map(s), o = a[0]) : o = s(o), t({ + ...i, + contents: o, + expandedStates: a + }); + } + case Et: + case kt: + case Zt: + case re: + case te: return t({ + ...i, + contents: s(i.contents) + }); + case Ot: + case $t: + case Xt: + case ee: + case Q: + case xt: return t(i); + default: throw new _r(i); + } + } +} +function ie(e, t = Lr) { + return Jn(e, (r) => typeof r == "string" ? ct(t, r.split(` +`)) : r); +} +function F(e) { + return M(e), { + type: kt, + contents: e + }; +} +function $n(e, t) { + return Or(e), M(t), { + type: Et, + contents: t, + n: e + }; +} +function Be(e) { + return $n(-1, e); +} +function qe(e) { + return Dr(e), { + type: wt, + parts: e + }; +} +function I(e, t = {}) { + return M(e), ae(t.expandedStates, !0), { + type: vt, + id: t.id, + contents: e, + break: !!t.shouldBreak, + expandedStates: t.expandedStates + }; +} +function Ve(e, t = "", r = {}) { + return M(e), t !== "" && M(t), { + type: Tt, + breakContents: e, + flatContents: t, + groupId: r.groupId + }; +} +function ct(e, t) { + M(e), ae(t); + let r = []; + for (let s = 0; s < t.length; s++) s !== 0 && r.push(e), r.push(t[s]); + return r; +} +function rs(e, t) { + let { preferred: r, alternate: s } = t === !0 || t === "'" ? ts : es, { length: n } = e, i = 0, a = 0; + for (let o = 0; o < n; o++) { + let c = e.charCodeAt(o); + c === r.codePoint ? i++ : c === s.codePoint && a++; + } + return (i > a ? s : r).character; +} +function Fe(e) { + if (typeof e != "string") throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +function is(e) { + return Array.isArray(e) && e.length > 0; +} +function Vr(e, t, r) { + if (e.type === "TextNode") { + let s = e.chars.trim(); + if (!s) return null; + r.tag === "style" && r.children.length === 1 && r.children[0] === e ? t.chars = "" : t.chars = R.split(s).join(" "); + } + e.type === "ElementNode" && (delete t.startTag, delete t.openTag, delete t.parts, delete t.endTag, delete t.closeTag, delete t.nameNode, delete t.body, delete t.blockParamNodes, delete t.params, delete t.path), e.type === "Block" && (delete t.blockParamNodes, delete t.params), e.type === "AttrNode" && e.name.toLowerCase() === "class" && delete t.value, e.type === "PathExpression" && (t.head = e.head.original); +} +function as(e) { + let { node: t } = e; + if (t.type !== "TextNode") return; + let { parent: r } = e; + if (!(r.type === "ElementNode" && r.tag === "style" && r.children.length === 1 && r.children[0] === t)) return; + let s = r.attributes.find((n) => n.type === "AttrNode" && n.name === "lang"); + if (!(s && !(s.value.type === "TextNode" && (s.value.chars === "" || s.value.chars === "css")))) return async (n) => { + let i = t.chars; + return i.trim() ? await n(i, { parser: "css" }) : ""; + }; +} +function qt(e) { + if (Rt !== null && typeof Rt.property) { + let t = Rt; + return Rt = qt.prototype = null, t; + } + return Rt = qt.prototype = e ?? Object.create(null), new qt(); +} +function Me(e) { + return qt(e); +} +function ls(e, t = "type") { + Me(e); + function r(s) { + let n = s[t], i = e[n]; + if (!Array.isArray(i)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${n}'.`), { node: s }); + return i; + } + return r; +} +function Yr(e, t = "unexpected unreachable branch") { + throw Mr.log("unreachable", e), Mr.log(`${t} :: ${JSON.stringify(e)} (${e})`), /* @__PURE__ */ new Error("code reached unreachable"); +} +function Ge(e, t) { + var r = t && t.loc, s, n, i, a; + r && (s = r.start.line, n = r.end.line, i = r.start.column, a = r.end.column, e += " - " + s + ":" + i); + for (var o = Error.prototype.constructor.call(this, e), c = 0; c < Ye.length; c++) this[Ye[c]] = o[Ye[c]]; + Error.captureStackTrace && Error.captureStackTrace(this, Ge); + try { + r && (this.lineNumber = s, this.endLineNumber = n, Object.defineProperty ? (Object.defineProperty(this, "column", { + value: i, + enumerable: !0 + }), Object.defineProperty(this, "endColumn", { + value: a, + enumerable: !0 + })) : (this.column = i, this.endColumn = a)); + } catch {} +} +function le() { + this.parents = []; +} +function ce(e) { + this.acceptRequired(e, "path"), this.acceptArray(e.params), this.acceptKey(e, "hash"); +} +function Gr(e) { + ce.call(this, e), this.acceptKey(e, "program"), this.acceptKey(e, "inverse"); +} +function Kr(e) { + this.acceptRequired(e, "name"), this.acceptArray(e.params), this.acceptKey(e, "hash"); +} +function G(e) { + e === void 0 && (e = {}), this.options = e; +} +function Ke(e, t, r) { + t === void 0 && (t = e.length); + var s = e[t - 1], n = e[t - 2]; + if (!s) return r; + if (s.type === "ContentStatement") return (n || !r ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(s.original); +} +function We(e, t, r) { + t === void 0 && (t = -1); + var s = e[t + 1], n = e[t + 2]; + if (!s) return r; + if (s.type === "ContentStatement") return (n || !r ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(s.original); +} +function ht(e, t, r) { + var s = e[t == null ? 0 : t + 1]; + if (!(!s || s.type !== "ContentStatement" || !r && s.rightStripped)) { + var n = s.value; + s.value = s.value.replace(r ? /^\s+/ : /^[ \t]*\r?\n?/, ""), s.rightStripped = s.value !== n; + } +} +function et(e, t, r) { + var s = e[t == null ? e.length - 1 : t - 1]; + if (!(!s || s.type !== "ContentStatement" || !r && s.leftStripped)) { + var n = s.value; + return s.value = s.value.replace(r ? /\s+$/ : /[ \t]+$/, ""), s.leftStripped = s.value !== n, s.leftStripped; + } +} +function je(e, t) { + if (t = t.path ? t.path.original : t, e.path.original !== t) { + var r = { loc: e.path.loc }; + throw new tt(e.path.original + " doesn't match " + t, r); + } +} +function Qe(e, t) { + this.source = e, this.start = { + line: t.first_line, + column: t.first_column + }, this.end = { + line: t.last_line, + column: t.last_column + }; +} +function ps(e) { + return /^\[.*\]$/.test(e) ? e.substring(1, e.length - 1) : e; +} +function fs(e, t) { + return { + open: e.charAt(2) === "~", + close: t.charAt(t.length - 3) === "~" + }; +} +function ms(e) { + return e.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, ""); +} +function ds(e, t, r, s) { + s = this.locInfo(s); + var n; + e ? n = "@" : t ? n = t.original + "." : n = ""; + for (var i = [], a = 0, o = 0, c = r.length; o < c; o++) { + var h = r[o].part, f = r[o].original !== h, p = r[o].separator, g = p === ".#" ? "#" : ""; + if (n += (p || "") + h, !f && (h === ".." || h === "." || h === "this")) { + if (i.length > 0) throw new tt("Invalid path: " + n, { loc: s }); + h === ".." && a++; + } else i.push("".concat(g).concat(h)); + } + var E = t || i.shift(); + return { + type: "PathExpression", + this: n.startsWith("this."), + data: e, + depth: a, + head: E, + tail: i, + parts: E ? hs([E], i, !0) : i, + original: n, + loc: s + }; +} +function gs(e, t, r, s, n, i) { + var a = s.charAt(3) || s.charAt(2), o = a !== "{" && a !== "&"; + return { + type: /\*/.test(s) ? "Decorator" : "MustacheStatement", + path: e, + params: t, + hash: r, + escaped: o, + strip: n, + loc: this.locInfo(i) + }; +} +function bs(e, t, r, s) { + je(e, r), s = this.locInfo(s); + var n = { + type: "Program", + body: t, + strip: {}, + loc: s + }; + return { + type: "BlockStatement", + path: e.path, + params: e.params, + hash: e.hash, + program: n, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: s + }; +} +function ys(e, t, r, s, n, i) { + s && s.path && je(e, s); + var a = /\*/.test(e.open); + t.blockParams = e.blockParams; + var o, c; + if (r) { + if (a) throw new tt("Unexpected inverse block on decorator", r); + r.chain && (r.program.body[0].closeStrip = s.strip), c = r.strip, o = r.program; + } + return n && (n = o, o = t, t = n), { + type: a ? "DecoratorBlock" : "BlockStatement", + path: e.path, + params: e.params, + hash: e.hash, + program: t, + inverse: o, + openStrip: e.strip, + inverseStrip: c, + closeStrip: s && s.strip, + loc: this.locInfo(i) + }; +} +function Ss(e, t) { + if (!t && e.length) { + var r = e[0].loc, s = e[e.length - 1].loc; + r && s && (t = { + source: r.source, + start: { + line: r.start.line, + column: r.start.column + }, + end: { + line: s.end.line, + column: s.end.column + } + }); + } + return { + type: "Program", + body: e, + strip: {}, + loc: t + }; +} +function ks(e, t, r, s) { + return je(e, r), { + type: "PartialBlockStatement", + name: e.path, + params: e.params, + hash: e.hash, + program: t, + openStrip: e.strip, + closeStrip: r && r.strip, + loc: this.locInfo(s) + }; +} +function he(e, t) { + var r, s, n; + if (e.type === "Program") return e; + Vt.yy = Qr, Vt.yy.locInfo = function(o) { + return new Qe(t && t.srcName, o); + }; + var i; + typeof ((r = t?.syntax) === null || r === void 0 ? void 0 : r.square) == "function" ? i = t.syntax.square : ((s = t?.syntax) === null || s === void 0 ? void 0 : s.square) === "node" ? i = Es : i = "string"; + var a; + return typeof ((n = t?.syntax) === null || n === void 0 ? void 0 : n.hash) == "function" ? a = t.syntax.hash : a = vs, Vt.yy.syntax = { + square: i, + hash: a + }, Vt.parse(e); +} +function Es(e, t) { + return { + type: "ArrayLiteral", + items: e, + loc: t + }; +} +function vs(e, t) { + return { + type: "HashLiteral", + pairs: e.pairs, + loc: t + }; +} +function Je(e, t) { + var r = he(e, t); + return new jr(t).accept(r); +} +function _(e) { + return Ns.test(e); +} +function Jr(e) { + return As.test(e); +} +function Cs(e) { + return e.replace(Ps, ` +`); +} +function on() { + return [...de]; +} +function Os(e) { + return de.has(e.toLowerCase()) && e[0]?.toLowerCase() === e[0]; +} +function Yt(e) { + return !!e && e.length > 0; +} +function fr(e) { + return e.length === 0 ? void 0 : e[e.length - 1]; +} +function Is(e) { + return e.length === 0 ? void 0 : e[0]; +} +function ln(e) { + return e(new ar()).validate(); +} +function k(e, t) { + let { module: r, loc: s } = t, { line: n, column: i } = s.start, a = t.asString(), o = a ? ` + +| +| ${a.split(` +`).join(` +| `)} +| + +` : "", c = /* @__PURE__ */ new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`); + return c.name = "SyntaxError", c.location = t, c.code = a, c; +} +function Zr(e, t, r) { + return new mr("Cannot remove a node unless it is part of an array", e, t, r); +} +function qs(e, t, r) { + return new mr("Cannot replace a node with multiple nodes unless it is part of an array", e, t, r); +} +function tn(e, t) { + return new mr("Replacing and removing in key handlers is not yet supported.", e, null, t); +} +function cn(e) { + return typeof e == "function" ? e : e.enter; +} +function un(e) { + return typeof e == "function" ? void 0 : e.exit; +} +function ye(e, t) { + let r, s, n, { node: i, parent: a, parentKey: o } = t, c = (function(h, f) { + if (h.Program && (f === "Template" && !h.Template || f === "Block" && !h.Block)) return h.Program; + let p = h[f]; + return p !== void 0 ? p : h.All; + })(e, i.type); + if (c !== void 0 && (r = cn(c), s = un(c)), r !== void 0 && (n = r(i, t)), n != null) { + if (JSON.stringify(i) !== JSON.stringify(n)) return Array.isArray(n) ? (hn(e, n, a, o), n) : ye(e, new Ct(n, a, o)) || n; + n = void 0; + } + if (n === void 0) { + let h = be[i.type]; + for (let f = 0; f < h.length; f++) Vs(e, c, t, h[f]); + s !== void 0 && (n = s(i, t)); + } + return n; +} +function en(e, t, r) { + e[t] = r; +} +function Vs(e, t, r, s) { + let n, i, { node: a } = r, o = (function(c, h) { + return c[h]; + })(a, s); + if (o) { + if (t !== void 0) { + let c = (function(h, f) { + let p = typeof h != "function" ? h.keys : void 0; + if (p === void 0) return; + let g = p[f]; + return g !== void 0 ? g : p.All; + })(t, s); + c !== void 0 && (n = cn(c), i = un(c)); + } + if (n !== void 0 && n(a, s) !== void 0) throw tn(a, s); + if (Array.isArray(o)) hn(e, o, r, s); + else { + let c = ye(e, new Ct(o, r, s)); + c !== void 0 && (function(h, f, p, g) { + if (g === null) throw Zr(p, h, f); + if (Array.isArray(g)) { + if (g.length !== 1) throw g.length === 0 ? Zr(p, h, f) : qs(p, h, f); + en(h, f, g[0]); + } else en(h, f, g); + })(a, s, o, c); + } + if (i !== void 0 && i(a, s) !== void 0) throw tn(a, s); + } +} +function hn(e, t, r, s) { + for (let n = 0; n < t.length; n++) { + let i = t[n], a = ye(e, new Ct(i, r, s)); + a !== void 0 && (n += Fs(t, n, a) - 1); + } +} +function Fs(e, t, r) { + return r === null ? (e.splice(t, 1), 0) : Array.isArray(r) ? (e.splice(t, 1, ...r), r.length) : (e.splice(t, 1, r), 1); +} +function Hs(e, t) { + ye(t, new Ct(e)); +} +function At(e, t) { + (function(r) { + switch (r.type) { + case "Block": + case "Template": return r.body; + case "ElementNode": return r.children; + } + })(e).push(t); +} +function pn(e) { + return e.type === "StringLiteral" || e.type === "BooleanLiteral" || e.type === "NumberLiteral" || e.type === "NullLiteral" || e.type === "UndefinedLiteral"; +} +function tr() { + return Ze || (Ze = new pt("", "(synthetic)")), Ze; +} +function rn(e, t) { + return d.var({ + name: e, + loc: v(t || null) + }); +} +function rt(e, t) { + let r = v(t || null); + if (typeof e != "string") { + if ("type" in e) return e; + { + e.head.indexOf("."); + let { head: i, tail: a } = e; + return d.path({ + head: d.head({ + original: i, + loc: r.sliceStartChars({ chars: i.length }) + }), + tail: a, + loc: v(t || null) + }); + } + } + let { head: s, tail: n } = (function(i, a) { + let [o, ...c] = i.split("."), h = d.head({ + original: o, + loc: v(a || null) + }); + return d.path({ + head: h, + tail: c, + loc: v(a || null) + }); + })(e, r); + return d.path({ + head: s, + tail: n, + loc: r + }); +} +function me(e, t, r) { + return d.literal({ + type: e, + value: t, + loc: v(r || null) + }); +} +function Ht(e = [], t) { + return d.hash({ + pairs: e, + loc: v(t || null) + }); +} +function fn(e) { + return e.map(((t) => typeof t == "string" ? d.var({ + name: t, + loc: A.synthetic(t) + }) : t)); +} +function nn(e = [], t = [], r = !1, s) { + return d.blockItself({ + body: e, + params: fn(t), + chained: r, + loc: v(s || null) + }); +} +function sn(e = [], t = [], r) { + return d.template({ + body: e, + blockParams: t, + loc: v(r || null) + }); +} +function v(...e) { + if (e.length === 1) { + let t = e[0]; + return t && typeof t == "object" ? A.forHbsLoc(tr(), t) : A.forHbsLoc(tr(), Bs); + } + { + let [t, r, s, n, i] = e, a = i ? new pt("", i) : tr(); + return A.forHbsLoc(a, { + start: { + line: t, + column: r + }, + end: { + line: s || t, + column: n || r + } + }); + } +} +function er(e) { + return function(t, r) { + return me(e, t, r); + }; +} +function rr(e, t) { + let r; + switch (t.path.type) { + case "PathExpression": + r = e.PathExpression(t.path); + break; + case "SubExpression": + r = e.SubExpression(t.path); + break; + case "StringLiteral": + case "UndefinedLiteral": + case "NullLiteral": + case "NumberLiteral": + case "BooleanLiteral": { + let i; + throw i = t.path.type === "BooleanLiteral" ? t.path.original.toString() : t.path.type === "StringLiteral" ? `"${t.path.original}"` : t.path.type === "NullLiteral" ? "null" : t.path.type === "NumberLiteral" ? t.path.value.toString() : "undefined", k(`${t.path.type} "${t.path.type === "StringLiteral" ? t.path.original : i}" cannot be called as a sub-expression, replace (${i}) with ${i}`, e.source.spanFor(t.path.loc)); + } + } + let s = t.params.map(((i) => e.acceptNode(i))), n = Yt(s) ? fr(s).loc : r.loc; + return { + path: r, + params: s, + hash: t.hash ? e.Hash(t.hash) : d.hash({ + pairs: [], + loc: e.source.spanFor(n).collapse("end") + }) + }; +} +function nr(e, t) { + let { path: r, params: s, hash: n, loc: i } = t; + if (pn(r)) { + let o = `{{${(function(c) { + return c.type === "UndefinedLiteral" ? "undefined" : JSON.stringify(c.value); + })(r)}}}`; + throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`, t.loc); + } + let a = d.elementModifier({ + path: r, + params: s, + hash: n, + loc: i + }); + e.modifiers.push(a); +} +function an(e, t, r) { + if (!t.program.loc) { + let n = V(0, t.program.body, 0), i = V(0, t.program.body, -1); + if (n && i) t.program.loc = { + ...n.loc, + end: i.loc.end + }; + else { + let a = e.spanFor(t.loc); + t.program.loc = r.withEnd(a.getEnd()); + } + } + let s = e.spanFor(t.program.loc).getEnd(); + return t.inverse && !t.inverse.loc && (t.inverse.loc = s.collapsed()), t; +} +function Nt(e) { + return /[\t\n\f ]/u.test(e); +} +function mn(e, t = {}) { + let r, s, n, i = t.mode || "precompile"; + typeof e == "string" ? (r = new pt(e, t.meta?.moduleName), s = i === "codemod" ? he(e, t.parseOptions) : Je(e, t.parseOptions)) : e instanceof pt ? (r = e, s = i === "codemod" ? he(e.source, t.parseOptions) : Je(e.source, t.parseOptions)) : (r = new pt("", t.meta?.moduleName), s = e), i === "codemod" && (n = new pr()); + let a = A.forCharPositions(r, 0, r.source.length); + s.loc = { + source: "(program)", + start: a.startPosition, + end: a.endPosition + }; + let o = new hr(r, n, i).parse(s, t.locals ?? []); + if (t.plugins?.ast) for (let c of t.plugins.ast) Hs(o, c(ze({}, t, { syntax: Ms }, { plugins: void 0 })).visitor); + return o; +} +function bn(e) { + return e.toUpperCase() === e; +} +function Ks(e) { + return e.type === "ElementNode" && typeof e.tag == "string" && !e.tag.startsWith(":") && (bn(e.tag[0]) || e.tag.includes(".")); +} +function Ws(e) { + return Gs.has(e.toLowerCase()) && !bn(e[0]); +} +function dr(e) { + return e.selfClosing === !0 || Ws(e.tag) || Ks(e) && e.children.every((t) => Se(t)); +} +function Se(e) { + return e.type === "TextNode" && !/\S/u.test(e.chars); +} +function gn(e) { + return e?.type === "MustacheCommentStatement" && typeof e.value == "string" && e.value.trim() === "prettier-ignore"; +} +function yn(e) { + return gn(e.node) || e.isInArray && (e.key === "children" || e.key === "body" || e.key === "parts") && gn(e.siblings[e.index - 2]); +} +function js(e, t, r) { + let { node: s } = e; + switch (s.type) { + case "Block": + case "Program": + case "Template": return I(e.map(r, "body")); + case "ElementNode": { + let n = t.htmlWhitespaceSensitivity !== "ignore", i = [!n && e.previous?.type === "ElementNode" ? H : "", I([Js(e, r)])]; + if (dr(s)) return [i]; + let a = [ + "" + ], o = s.tag === "style"; + if (s.children.length === 0 || (!n || o) && s.children.every((h) => Se(h))) return [i, a]; + let c = e.map(r, "children"); + return o || !n ? [ + i, + F([H, ...c]), + H, + a + ] : [ + i, + F(I(c)), + a + ]; + } + case "BlockStatement": return Pn(e) ? [ + ni(e, r), + En(e, t, r), + vn(e, t, r) + ] : [ti(e, r), I([ + En(e, t, r), + vn(e, t, r), + si(e, t, r) + ])]; + case "ElementModifierStatement": return I([ + "{{", + Tn(e, r), + "}}" + ]); + case "MustacheStatement": return I([ + ke(s), + Tn(e, r), + Ee(s) + ]); + case "SubExpression": return I([ + "(", + ui(e, r), + H, + ")" + ]); + case "AttrNode": { + let { name: n, value: i } = s, a = i.type === "TextNode"; + if (a && i.chars === "" && mt(i) === Gt(i)) return n; + let c = a ? oe(i.chars, t.singleQuote) : i.type === "ConcatStatement" ? oe(i.parts.map((f) => f.type === "TextNode" ? f.chars : "").join(""), t.singleQuote) : "", h = r("value"); + return [ + n, + "=", + c, + n === "class" && c ? I(F(h)) : h, + c + ]; + } + case "ConcatStatement": return e.map(r, "parts"); + case "Hash": return ct(N, e.map(r, "pairs")); + case "HashPair": return [ + s.key, + "=", + r("value") + ]; + case "TextNode": { + let n = s.chars, { parent: i } = e; + if (i.type === "ElementNode") { + if (i.tag === "pre") return ie(n); + if (i.tag === "style") return n = St(0, n, /^\n+/gu, ""), n = R.trimEnd(n), n = R.dedentString(n), ie(n, ut); + } + n = St(0, n, "{{", "\\{{"); + let a = ii(e); + if (a) { + if (a === "class") { + let D = n.trim().split(/\s+/u).join(" "), B = !1, O = !1; + return e.parent.type === "ConcatStatement" && (e.previous?.type === "MustacheStatement" && /^\s/u.test(n) && (B = !0), e.next?.type === "MustacheStatement" && /\s$/u.test(n) && D !== "" && (O = !0)), [ + B ? N : "", + D, + O ? N : "" + ]; + } + return ie(n); + } + let o = R.isWhitespaceOnly(n), { isFirst: c, isLast: h } = e; + if (t.htmlWhitespaceSensitivity !== "ignore") { + let D = h && e.parent.type === "Template", B = c && e.parent.type === "Template"; + if (o) { + if (B || D) return ""; + let C = [N], $ = _t(n); + return $ && (C = Kt($)), h && (C = C.map((W) => Be(W))), C; + } + let O = R.getLeadingWhitespace(n), z = []; + if (O) { + z = [N]; + let C = _t(O); + C && (z = Kt(C)), n = n.slice(O.length); + } + let P = R.getTrailingWhitespace(n), U = []; + if (P) { + if (!D) { + U = [N]; + let C = _t(P); + C && (U = Kt(C)), h && (U = U.map(($) => Be($))); + } + n = n.slice(0, -P.length); + } + return [ + ...z, + qe(wn(n)), + ...U + ]; + } + let f = _t(n), p = ai(n), g = oi(n); + if ((c || h) && o && (e.parent.type === "Block" || e.parent.type === "ElementNode" || e.parent.type === "Template")) return ""; + o && f ? (p = Math.min(f, xn), g = 0) : ((e.next?.type === "BlockStatement" || e.next?.type === "ElementNode") && (g = Math.max(g, 1)), (e.previous?.type === "BlockStatement" || e.previous?.type === "ElementNode") && (p = Math.max(p, 1))); + let E = "", T = ""; + return g === 0 && e.next?.type === "MustacheStatement" && (T = " "), p === 0 && e.previous?.type === "MustacheStatement" && (E = " "), c && (p = 0, E = ""), h && (g = 0, T = ""), R.hasLeadingWhitespace(n) && (n = E + R.trimStart(n)), R.hasTrailingWhitespace(n) && (n = R.trimEnd(n) + T), [ + ...Kt(p), + qe(wn(n)), + ...Kt(g) + ]; + } + case "MustacheCommentStatement": { + let n = mt(s), i = Gt(s), a = t.originalText.charAt(n + 2) === "~", o = t.originalText.charAt(i - 3) === "~", c = s.value.includes("}}") ? "--" : ""; + return [ + "{{", + a ? "~" : "", + "!", + c, + s.value, + c, + o ? "~" : "", + "}}" + ]; + } + case "PathExpression": return mi(s); + case "BooleanLiteral": return String(s.value); + case "CommentStatement": return [ + "" + ]; + case "StringLiteral": return li(e, t); + case "NumberLiteral": return String(s.value); + case "UndefinedLiteral": return "undefined"; + case "NullLiteral": return "null"; + default: throw new qr(s, "Handlebars"); + } +} +function Qs(e, t) { + return mt(e) - mt(t); +} +function Js(e, t) { + let { node: r } = e, s = [ + "attributes", + "modifiers", + "comments" + ].filter((i) => Bt(r[i])), n = s.flatMap((i) => r[i]).sort(Qs); + for (let i of s) e.each(({ node: a }) => { + let o = n.indexOf(a); + n.splice(o, 1, [N, t()]); + }, i); + return Bt(r.blockParams) && n.push(N, br(r)), [ + "<", + r.tag, + F(n), + $s(r) + ]; +} +function $s(e) { + return dr(e) ? Ve([H, "/>"], [" />", H]) : Ve([H, ">"], ">"); +} +function ke(e) { + return [e.trusting ? "{{{" : "{{", e.strip?.open ? "~" : ""]; +} +function Ee(e) { + let t = e.trusting ? "}}}" : "}}"; + return [e.strip?.close ? "~" : "", t]; +} +function Xs(e) { + return [ + ke(e), + e.openStrip.open ? "~" : "", + "#" + ]; +} +function Zs(e) { + let t = Ee(e); + return [e.openStrip.close ? "~" : "", t]; +} +function Sn(e) { + return [ + ke(e), + e.closeStrip.open ? "~" : "", + "/" + ]; +} +function kn(e) { + let t = Ee(e); + return [e.closeStrip.close ? "~" : "", t]; +} +function Nn(e) { + return [ke(e), e.inverseStrip.open ? "~" : ""]; +} +function An(e) { + let t = Ee(e); + return [e.inverseStrip.close ? "~" : "", t]; +} +function ti(e, t) { + let { node: r } = e, s = [], n = ve(e, t); + return n && s.push(I(n)), Bt(r.program.blockParams) && s.push(br(r.program)), I([ + Xs(r), + gr(e, t), + s.length > 0 ? F([N, ct(N, s)]) : "", + H, + Zs(r) + ]); +} +function ei(e, t) { + return [ + t.htmlWhitespaceSensitivity === "ignore" ? ut : "", + Nn(e), + "else", + An(e) + ]; +} +function Pn(e) { + if (!e.match((r) => r.type === "BlockStatement", (r, s) => s === "body" && r.type === "Block" && r.body.length === 1, (r, s) => s === "inverse" && r.type === "BlockStatement")) return !1; + let { node: t } = e; + return t.path.type === "PathExpression" && t.path.head.type === "VarHead" && t.path.head.name === "if" || ri(t, e.grandparent); +} +function ni(e, t) { + let { node: r, grandparent: s } = e; + return I([ + Nn(s), + [ + "else", + " ", + s.inverse.body[0].path.head.name + ], + F([ + N, + I(ve(e, t)), + ...Bt(r.program.blockParams) ? [N, br(r.program)] : [] + ]), + H, + An(s) + ]); +} +function si(e, t, r) { + let { node: s } = e; + return t.htmlWhitespaceSensitivity === "ignore" ? [ + Cn(s) ? H : ut, + Sn(s), + r("path"), + kn(s) + ] : [ + Sn(s), + r("path"), + kn(s) + ]; +} +function Cn(e) { + return e.type === "BlockStatement" && e.program.body.every((t) => Se(t)); +} +function En(e, t, r) { + let { node: s } = e; + if (Cn(s)) return ""; + let n = r("program"); + return t.htmlWhitespaceSensitivity === "ignore" ? F([ut, n]) : F(n); +} +function vn(e, t, r) { + let { node: s } = e; + if (!s.inverse) return ""; + let n = r("inverse"), i = t.htmlWhitespaceSensitivity === "ignore" ? [ut, n] : n; + return e.call(Pn, "inverse", "body", 0) ? i : [ei(s, t), F(i)]; +} +function wn(e) { + return ct(N, R.split(e)); +} +function ii(e) { + for (let t = 0; t < 2; t++) { + let r = e.getParentNode(t); + if (r?.type === "AttrNode") return r.name.toLowerCase(); + } +} +function _t(e) { + return e = typeof e == "string" ? e : "", e.split(` +`).length - 1; +} +function ai(e) { + e = typeof e == "string" ? e : ""; + return _t((e.match(/^([^\S\n\r]*[\n\r])+/gu) || [])[0] || ""); +} +function oi(e) { + e = typeof e == "string" ? e : ""; + return _t((e.match(/([\n\r][^\S\n\r]*)+$/gu) || [])[0] || ""); +} +function Kt(e = 0) { + return Array.from({ length: Math.min(e, xn) }).fill(ut); +} +function li(e, t) { + let { node: { value: r } } = e, s = oe(r, ci(e) ? !t.singleQuote : t.singleQuote); + return [ + s, + St(0, r, s, `\\${s}`), + s + ]; +} +function ci(e) { + let { ancestors: t } = e, r = t.findIndex((s) => s.type !== "SubExpression"); + return r !== -1 && t[r + 1].type === "ConcatStatement" && t[r + 2].type === "AttrNode"; +} +function ui(e, t) { + let r = gr(e, t), s = ve(e, t); + return s ? F([ + r, + N, + I(s) + ]) : r; +} +function Tn(e, t) { + let r = gr(e, t), s = ve(e, t); + return s ? [F([ + r, + N, + s + ]), H] : r; +} +function gr(e, t) { + return t("path"); +} +function ve(e, t) { + let { node: r } = e, s = []; + return r.params.length > 0 && s.push(...e.map(t, "params")), r.hash?.pairs.length > 0 && s.push(t("hash")), s.length === 0 ? "" : ct(N, s); +} +function br(e) { + return [ + "as |", + e.blockParams.join(" "), + "|" + ]; +} +function mi(e) { + return e.tail.length === 0 && e.original.includes("/") ? e.original : [e.head.original, ...e.tail].map((r, s) => fi(r, s) ? `[${r}]` : r).join("."); +} +function gi(e, t) { + let r = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(r, t); +} +function bi(e) { + let t = e.slice(0, Wt); + if (t !== "---" && t !== "+++") return; + let r = e.indexOf(` +`, Wt); + if (r === -1) return; + let s = e.slice(Wt, r).trim(), n = e.indexOf(` +${t}`, r), i = s; + if (i || (i = t === "+++" ? "toml" : "yaml"), n === -1 && t === "---" && i === "yaml" && (n = e.indexOf(` +...`, r)), n === -1) return; + let a = n + 1 + Wt, o = e.charAt(a + 1); + if (!/\s?/u.test(o)) return; + let c = e.slice(0, a), h; + return { + language: i, + explicitLanguage: s || null, + value: e.slice(r + 1, n), + startDelimiter: t, + endDelimiter: c.slice(-Wt), + raw: c, + start: { + line: 1, + column: 0, + index: 0 + }, + end: { + index: c.length, + get line() { + return h ?? (h = c.split(` +`)), h.length; + }, + get column() { + return h ?? (h = c.split(` +`)), V(0, h, -1).length; + } + }, + [On]: !0 + }; +} +function yi(e) { + let t = bi(e); + return t ? { + frontMatter: t, + get content() { + let { raw: r } = t; + return St(0, r, /[^\n]/gu, " ") + e.slice(r.length); + } + } : { content: e }; +} +function Si(e) { + let t = e.children ?? e.body; + if (t) for (let r = 0; r < t.length - 1; r++) t[r].type === "TextNode" && t[r + 1].type === "MustacheStatement" && (t[r].chars = t[r].chars.replace(/\\$/u, "\\\\")); +} +function wi(e) { + let { frontMatter: t, content: r } = In(e), s; + try { + s = mn(r, vi); + } catch (n) { + let i = xi(n); + if (i) throw Dn(Ti(n), { + loc: i, + cause: n + }); + throw n; + } + if (t) { + let n = { + ...t, + type: "FrontMatter", + loc: { + start: { + ...t.start, + offset: t.start.index + }, + end: { + ...t.end, + offset: t.end.index + } + } + }; + s.body.unshift(n); + } + return s; +} +function Ti(e) { + let { message: t } = e, r = t.split(` +`); + return r.length >= 4 && /^Parse error on line \d+:$/u.test(r[0]) && /^-*\^$/u.test(V(0, r, -2)) ? V(0, r, -1) : r.length >= 4 && /:\s?$/u.test(r[0]) && /^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(V(0, r, -1)) && r[1] === "" && V(0, r, -2) === "" && r.slice(2, -2).every((s) => s.startsWith("|")) ? r[0].trim().slice(0, -1) : t; +} +function xi(e) { + let { location: t, hash: r } = e; + if (t) { + let { start: s, end: n } = t; + return typeof n.line != "number" ? { start: s } : t; + } + if (r) { + let { loc: { last_line: s, last_column: n } } = r; + return { start: { + line: s, + column: n + 1 + } }; + } +} +var Un, Oe, Bn, Jt, Mn, St, V, Kn, Dt, Ot, It, $t, kt, Et, Xt, vt, wt, Tt, Zt, te, ee, Q, re, xt, ne, se, jn, Ie, _r, M, ae, Dr, Or, Re, N, H, ut, Lr, Ir, Br, ts, es, oe, He, R, Bt, Ue, qr, Fr, Hr, Rt, os, Ur, ze, Mr, Vt, Ye, tt, Wr, jr, Ft, hs, Qr, ue, $r, ws, Ts, xs, $e, Ns, As, Ps, Xe, pe, _s, de, st, Bs, sr, nt, ir, ge, ar, or, A, Ut, Mt, J, K, it, Pt, ft, at, zt, Rs, pt, be, mr, Ct, lr, Ze, Us, fe, d, cr, ur, hr, Ms, pr, dn, mt, Gt, Gs, xn, ri, hi, pi, fi, _n, Ln, yr, Dn, On, Wt, In, ki, Ei, vi, Ni, Ai; +//#endregion +__esmMin((() => { + Un = Object.defineProperty; + Oe = (e, t) => { + for (var r in t) Un(e, r, { + get: t[r], + enumerable: !0 + }); + }; + Bn = {}; + Oe(Bn, { + languages: () => Ln, + parsers: () => yr, + printers: () => Ai + }); + Jt = (e, t) => (r, s, ...n) => r | 1 && s == null ? void 0 : (t.call(s) ?? s[e]).apply(s, n); + Mn = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, St = Jt("replaceAll", function() { + if (typeof this == "string") return Mn; + }); + V = Jt("at", function() { + if (Array.isArray(this) || typeof this == "string") return Yn; + }); + Kn = () => {}, Dt = Kn; + Ot = "string", It = "array", $t = "cursor", kt = "indent", Et = "align", Xt = "trim", vt = "group", wt = "fill", Tt = "if-break", Zt = "indent-if-break", te = "line-suffix", ee = "line-suffix-boundary", Q = "line", re = "label", xt = "break-parent", ne = /* @__PURE__ */ new Set([ + $t, + kt, + Et, + Xt, + vt, + wt, + Tt, + Zt, + te, + ee, + Q, + re, + xt + ]); + se = Wn; + jn = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e); + Ie = class extends Error { + name = "InvalidDocError"; + constructor(t) { + super(Qn(t)), this.doc = t; + } + }, _r = Ie; + M = Dt, ae = Dt, Dr = Dt, Or = Dt; + Re = { type: xt }; + N = { type: Q }, H = { + type: Q, + soft: !0 + }, ut = [{ + type: Q, + hard: !0 + }, Re], Lr = [{ + type: Q, + hard: !0, + literal: !0 + }, Re]; + Ir = Object.freeze({ + character: "'", + codePoint: 39 + }), Br = Object.freeze({ + character: "\"", + codePoint: 34 + }), ts = Object.freeze({ + preferred: Ir, + alternate: Br + }), es = Object.freeze({ + preferred: Br, + alternate: Ir + }); + oe = rs; + He = class { + #t; + constructor(t) { + this.#t = new Set(t); + } + getLeadingWhitespaceCount(t) { + let r = this.#t, s = 0; + for (let n = 0; n < t.length && r.has(t.charAt(n)); n++) s++; + return s; + } + getTrailingWhitespaceCount(t) { + let r = this.#t, s = 0; + for (let n = t.length - 1; n >= 0 && r.has(t.charAt(n)); n--) s++; + return s; + } + getLeadingWhitespace(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(0, r); + } + getTrailingWhitespace(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(t.length - r); + } + hasLeadingWhitespace(t) { + return this.#t.has(t.charAt(0)); + } + hasTrailingWhitespace(t) { + return this.#t.has(V(0, t, -1)); + } + trimStart(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(r); + } + trimEnd(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(0, t.length - r); + } + trim(t) { + return this.trimEnd(this.trimStart(t)); + } + split(t, r = !1) { + let s = `[${Fe([...this.#t].join(""))}]+`, n = new RegExp(r ? `(${s})` : s, "u"); + return t.split(n); + } + hasWhitespaceCharacter(t) { + let r = this.#t; + return Array.prototype.some.call(t, (s) => r.has(s)); + } + hasNonWhitespaceCharacter(t) { + let r = this.#t; + return Array.prototype.some.call(t, (s) => !r.has(s)); + } + isWhitespaceOnly(t) { + let r = this.#t; + return Array.prototype.every.call(t, (s) => r.has(s)); + } + #e(t) { + let r = Number.POSITIVE_INFINITY; + for (let s of t.split(` +`)) { + if (s.length === 0) continue; + let n = this.getLeadingWhitespaceCount(s); + if (n === 0) return 0; + s.length !== n && n < r && (r = n); + } + return r === Number.POSITIVE_INFINITY ? 0 : r; + } + dedentString(t) { + let r = this.#e(t); + return r === 0 ? t : t.split(` +`).map((s) => s.slice(r)).join(` +`); + } + }; + R = new He([ + " ", + ` +`, + "\f", + "\r", + " " + ]); + Bt = is; + Ue = class extends Error { + name = "UnexpectedNodeError"; + constructor(t, r, s = "type") { + super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`), this.node = t; + } + }, qr = Ue; + Vr.ignoredProperties = /* @__PURE__ */ new Set(["loc", "selfClosing"]); + Fr = Vr; + Hr = as; + Rt = null; + os = 10; + for (let e = 0; e <= os; e++) qt(); + Ur = ls; + Object.freeze([]); + ze = Object.assign; + Mr = console; + Vt = (function() { + var e = function(X, b, S, y) { + for (S = S || {}, y = X.length; y--; S[X[y]] = b); + return S; + }, t = [2, 52], r = [1, 20], s = [ + 5, + 14, + 15, + 19, + 29, + 34, + 39, + 44, + 47, + 48, + 53, + 57, + 61 + ], n = [1, 44], i = [1, 40], a = [1, 43], o = [1, 33], c = [1, 34], h = [1, 35], f = [1, 36], p = [1, 37], g = [1, 42], E = [1, 46], T = [ + 14, + 15, + 19, + 29, + 34, + 39, + 44, + 47, + 48, + 53, + 57, + 61 + ], D = [ + 14, + 15, + 19, + 29, + 34, + 44, + 47, + 48, + 53, + 57, + 61 + ], B = [15, 18], O = [ + 14, + 15, + 19, + 29, + 34, + 47, + 48, + 53, + 57, + 61 + ], z = [ + 33, + 67, + 73, + 75, + 84, + 85, + 86, + 87, + 88, + 89 + ], P = [ + 23, + 33, + 56, + 67, + 68, + 73, + 75, + 77, + 79, + 84, + 85, + 86, + 87, + 88, + 89 + ], U = [1, 62], C = [1, 63], $ = [ + 23, + 33, + 56, + 68, + 73, + 79 + ], W = [ + 23, + 33, + 56, + 67, + 68, + 73, + 75, + 77, + 79, + 84, + 85, + 86, + 87, + 88, + 89, + 92, + 93 + ], Sr = [2, 51], kr = [1, 64], Er = [ + 67, + 73, + 75, + 77, + 84, + 85, + 86, + 87, + 88, + 89 + ], vr = [ + 56, + 67, + 73, + 75, + 84, + 85, + 86, + 87, + 88, + 89 + ], wr = [1, 75], we = [1, 76], Te = [1, 83], dt = [ + 33, + 67, + 73, + 75, + 79, + 84, + 85, + 86, + 87, + 88, + 89 + ], Tr = [ + 23, + 67, + 73, + 75, + 84, + 85, + 86, + 87, + 88, + 89 + ], xr = [ + 67, + 68, + 73, + 75, + 84, + 85, + 86, + 87, + 88, + 89 + ], gt = [33, 79], xe = [1, 134], Nr = [73, 81], Ne = { + trace: function() {}, + yy: {}, + symbols_: { + error: 2, + root: 3, + program: 4, + EOF: 5, + program_repetition0: 6, + statement: 7, + mustache: 8, + block: 9, + rawBlock: 10, + partial: 11, + partialBlock: 12, + content: 13, + COMMENT: 14, + CONTENT: 15, + openRawBlock: 16, + rawBlock_repetition0: 17, + END_RAW_BLOCK: 18, + OPEN_RAW_BLOCK: 19, + helperName: 20, + openRawBlock_repetition0: 21, + openRawBlock_option0: 22, + CLOSE_RAW_BLOCK: 23, + openBlock: 24, + block_option0: 25, + closeBlock: 26, + openInverse: 27, + block_option1: 28, + OPEN_BLOCK: 29, + openBlock_repetition0: 30, + openBlock_option0: 31, + openBlock_option1: 32, + CLOSE: 33, + OPEN_INVERSE: 34, + openInverse_repetition0: 35, + openInverse_option0: 36, + openInverse_option1: 37, + openInverseChain: 38, + OPEN_INVERSE_CHAIN: 39, + openInverseChain_repetition0: 40, + openInverseChain_option0: 41, + openInverseChain_option1: 42, + inverseAndProgram: 43, + INVERSE: 44, + inverseChain: 45, + inverseChain_option0: 46, + OPEN_ENDBLOCK: 47, + OPEN: 48, + hash: 49, + expr: 50, + mustache_repetition0: 51, + mustache_option0: 52, + OPEN_UNESCAPED: 53, + mustache_repetition1: 54, + mustache_option1: 55, + CLOSE_UNESCAPED: 56, + OPEN_PARTIAL: 57, + partial_repetition0: 58, + partial_option0: 59, + openPartialBlock: 60, + OPEN_PARTIAL_BLOCK: 61, + openPartialBlock_repetition0: 62, + openPartialBlock_option0: 63, + exprHead: 64, + arrayLiteral: 65, + sexpr: 66, + OPEN_SEXPR: 67, + CLOSE_SEXPR: 68, + sexpr_repetition0: 69, + sexpr_option0: 70, + hash_repetition_plus0: 71, + hashSegment: 72, + ID: 73, + EQUALS: 74, + OPEN_ARRAY: 75, + arrayLiteral_repetition0: 76, + CLOSE_ARRAY: 77, + blockParams: 78, + OPEN_BLOCK_PARAMS: 79, + blockParams_repetition_plus0: 80, + CLOSE_BLOCK_PARAMS: 81, + path: 82, + dataName: 83, + STRING: 84, + NUMBER: 85, + BOOLEAN: 86, + UNDEFINED: 87, + NULL: 88, + DATA: 89, + pathSegments: 90, + sep: 91, + SEP: 92, + PRIVATE_SEP: 93, + $accept: 0, + $end: 1 + }, + terminals_: { + 2: "error", + 5: "EOF", + 14: "COMMENT", + 15: "CONTENT", + 18: "END_RAW_BLOCK", + 19: "OPEN_RAW_BLOCK", + 23: "CLOSE_RAW_BLOCK", + 29: "OPEN_BLOCK", + 33: "CLOSE", + 34: "OPEN_INVERSE", + 39: "OPEN_INVERSE_CHAIN", + 44: "INVERSE", + 47: "OPEN_ENDBLOCK", + 48: "OPEN", + 53: "OPEN_UNESCAPED", + 56: "CLOSE_UNESCAPED", + 57: "OPEN_PARTIAL", + 61: "OPEN_PARTIAL_BLOCK", + 67: "OPEN_SEXPR", + 68: "CLOSE_SEXPR", + 73: "ID", + 74: "EQUALS", + 75: "OPEN_ARRAY", + 77: "CLOSE_ARRAY", + 79: "OPEN_BLOCK_PARAMS", + 81: "CLOSE_BLOCK_PARAMS", + 84: "STRING", + 85: "NUMBER", + 86: "BOOLEAN", + 87: "UNDEFINED", + 88: "NULL", + 89: "DATA", + 92: "SEP", + 93: "PRIVATE_SEP" + }, + productions_: [ + 0, + [3, 2], + [4, 1], + [7, 1], + [7, 1], + [7, 1], + [7, 1], + [7, 1], + [7, 1], + [7, 1], + [13, 1], + [10, 3], + [16, 5], + [9, 4], + [9, 4], + [24, 6], + [27, 6], + [38, 6], + [43, 2], + [45, 3], + [45, 1], + [26, 3], + [8, 3], + [8, 5], + [8, 5], + [11, 5], + [12, 3], + [60, 5], + [50, 1], + [50, 1], + [64, 1], + [64, 1], + [66, 3], + [66, 5], + [49, 1], + [72, 3], + [65, 3], + [78, 3], + [20, 1], + [20, 1], + [20, 1], + [20, 1], + [20, 1], + [20, 1], + [20, 1], + [83, 2], + [91, 1], + [91, 1], + [82, 3], + [82, 1], + [90, 3], + [90, 1], + [6, 0], + [6, 2], + [17, 0], + [17, 2], + [21, 0], + [21, 2], + [22, 0], + [22, 1], + [25, 0], + [25, 1], + [28, 0], + [28, 1], + [30, 0], + [30, 2], + [31, 0], + [31, 1], + [32, 0], + [32, 1], + [35, 0], + [35, 2], + [36, 0], + [36, 1], + [37, 0], + [37, 1], + [40, 0], + [40, 2], + [41, 0], + [41, 1], + [42, 0], + [42, 1], + [46, 0], + [46, 1], + [51, 0], + [51, 2], + [52, 0], + [52, 1], + [54, 0], + [54, 2], + [55, 0], + [55, 1], + [58, 0], + [58, 2], + [59, 0], + [59, 1], + [62, 0], + [62, 2], + [63, 0], + [63, 1], + [69, 0], + [69, 2], + [70, 0], + [70, 1], + [71, 1], + [71, 2], + [76, 0], + [76, 2], + [80, 1], + [80, 2] + ], + performAction: function(b, S, y, m, w, l, bt) { + var u = l.length - 1; + switch (w) { + case 1: return l[u - 1]; + case 2: + this.$ = m.prepareProgram(l[u]); + break; + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 20: + case 28: + case 29: + case 30: + case 31: + case 38: + case 39: + case 46: + case 47: + this.$ = l[u]; + break; + case 9: + this.$ = { + type: "CommentStatement", + value: m.stripComment(l[u]), + strip: m.stripFlags(l[u], l[u]), + loc: m.locInfo(this._$) + }; + break; + case 10: + this.$ = { + type: "ContentStatement", + original: l[u], + value: l[u], + loc: m.locInfo(this._$) + }; + break; + case 11: + this.$ = m.prepareRawBlock(l[u - 2], l[u - 1], l[u], this._$); + break; + case 12: + this.$ = { + path: l[u - 3], + params: l[u - 2], + hash: l[u - 1] + }; + break; + case 13: + this.$ = m.prepareBlock(l[u - 3], l[u - 2], l[u - 1], l[u], !1, this._$); + break; + case 14: + this.$ = m.prepareBlock(l[u - 3], l[u - 2], l[u - 1], l[u], !0, this._$); + break; + case 15: + this.$ = { + open: l[u - 5], + path: l[u - 4], + params: l[u - 3], + hash: l[u - 2], + blockParams: l[u - 1], + strip: m.stripFlags(l[u - 5], l[u]) + }; + break; + case 16: + case 17: + this.$ = { + path: l[u - 4], + params: l[u - 3], + hash: l[u - 2], + blockParams: l[u - 1], + strip: m.stripFlags(l[u - 5], l[u]) + }; + break; + case 18: + this.$ = { + strip: m.stripFlags(l[u - 1], l[u - 1]), + program: l[u] + }; + break; + case 19: + var Z = m.prepareBlock(l[u - 2], l[u - 1], l[u], l[u], !1, this._$), Lt = m.prepareProgram([Z], l[u - 1].loc); + Lt.chained = !0, this.$ = { + strip: l[u - 2].strip, + program: Lt, + chain: !0 + }; + break; + case 21: + this.$ = { + path: l[u - 1], + strip: m.stripFlags(l[u - 2], l[u]) + }; + break; + case 22: + this.$ = m.prepareMustache(m.syntax.hash(l[u - 1], m.locInfo(this._$), { + yy: m, + syntax: "expr" + }), [], void 0, l[u - 2], m.stripFlags(l[u - 2], l[u]), this._$); + break; + case 23: + case 24: + this.$ = m.prepareMustache(l[u - 3], l[u - 2], l[u - 1], l[u - 4], m.stripFlags(l[u - 4], l[u]), this._$); + break; + case 25: + this.$ = { + type: "PartialStatement", + name: l[u - 3], + params: l[u - 2], + hash: l[u - 1], + indent: "", + strip: m.stripFlags(l[u - 4], l[u]), + loc: m.locInfo(this._$) + }; + break; + case 26: + this.$ = m.preparePartialBlock(l[u - 2], l[u - 1], l[u], this._$); + break; + case 27: + this.$ = { + path: l[u - 3], + params: l[u - 2], + hash: l[u - 1], + strip: m.stripFlags(l[u - 4], l[u]) + }; + break; + case 32: + this.$ = m.syntax.hash(l[u - 1], m.locInfo(this._$), { + yy: m, + syntax: "expr" + }); + break; + case 33: + this.$ = { + type: "SubExpression", + path: l[u - 3], + params: l[u - 2], + hash: l[u - 1], + loc: m.locInfo(this._$) + }; + break; + case 34: + this.$ = { + type: "Hash", + pairs: l[u], + loc: m.locInfo(this._$) + }; + break; + case 35: + this.$ = { + type: "HashPair", + key: m.id(l[u - 2]), + value: l[u], + loc: m.locInfo(this._$) + }; + break; + case 36: + this.$ = m.syntax.square(l[u - 1], m.locInfo(this._$), { + yy: m, + syntax: "expr" + }); + break; + case 37: + this.$ = m.id(l[u - 1]); + break; + case 40: + this.$ = { + type: "StringLiteral", + value: l[u], + original: l[u], + loc: m.locInfo(this._$) + }; + break; + case 41: + this.$ = { + type: "NumberLiteral", + value: Number(l[u]), + original: Number(l[u]), + loc: m.locInfo(this._$) + }; + break; + case 42: + this.$ = { + type: "BooleanLiteral", + value: l[u] === "true", + original: l[u] === "true", + loc: m.locInfo(this._$) + }; + break; + case 43: + this.$ = { + type: "UndefinedLiteral", + original: void 0, + value: void 0, + loc: m.locInfo(this._$) + }; + break; + case 44: + this.$ = { + type: "NullLiteral", + original: null, + value: null, + loc: m.locInfo(this._$) + }; + break; + case 45: + this.$ = m.preparePath(!0, !1, l[u], this._$); + break; + case 48: + this.$ = m.preparePath(!1, l[u - 2], l[u], this._$); + break; + case 49: + this.$ = m.preparePath(!1, !1, l[u], this._$); + break; + case 50: + l[u - 2].push({ + part: m.id(l[u]), + original: l[u], + separator: l[u - 1] + }), this.$ = l[u - 2]; + break; + case 51: + this.$ = [{ + part: m.id(l[u]), + original: l[u] + }]; + break; + case 52: + case 54: + case 56: + case 64: + case 70: + case 76: + case 84: + case 88: + case 92: + case 96: + case 100: + case 106: + this.$ = []; + break; + case 53: + case 55: + case 57: + case 65: + case 71: + case 77: + case 85: + case 89: + case 93: + case 97: + case 101: + case 105: + case 107: + case 109: + l[u - 1].push(l[u]); + break; + case 104: + case 108: + this.$ = [l[u]]; + break; + } + }, + table: [ + e([ + 5, + 14, + 15, + 19, + 29, + 34, + 48, + 53, + 57, + 61 + ], t, { + 3: 1, + 4: 2, + 6: 3 + }), + { 1: [3] }, + { 5: [1, 4] }, + e([ + 5, + 39, + 44, + 47 + ], [2, 2], { + 7: 5, + 8: 6, + 9: 7, + 10: 8, + 11: 9, + 12: 10, + 13: 11, + 24: 15, + 27: 16, + 16: 17, + 60: 19, + 14: [1, 12], + 15: r, + 19: [1, 23], + 29: [1, 21], + 34: [1, 22], + 48: [1, 13], + 53: [1, 14], + 57: [1, 18], + 61: [1, 24] + }), + { 1: [2, 1] }, + e(s, [2, 53]), + e(s, [2, 3]), + e(s, [2, 4]), + e(s, [2, 5]), + e(s, [2, 6]), + e(s, [2, 7]), + e(s, [2, 8]), + e(s, [2, 9]), + { + 20: 28, + 49: 25, + 50: 26, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 20: 28, + 50: 45, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(T, t, { + 6: 3, + 4: 47 + }), + e(D, t, { + 6: 3, + 4: 48 + }), + e(B, [2, 54], { 17: 49 }), + { + 20: 28, + 50: 50, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(O, t, { + 6: 3, + 4: 51 + }), + e([ + 5, + 14, + 15, + 18, + 19, + 29, + 34, + 39, + 44, + 47, + 48, + 53, + 57, + 61 + ], [2, 10]), + { + 20: 52, + 64: 53, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 20: 54, + 64: 53, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 20: 55, + 64: 53, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 20: 28, + 50: 56, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { 33: [1, 57] }, + e(z, [2, 84], { 51: 58 }), + e([ + 23, + 33, + 56, + 68, + 79 + ], [2, 34], { + 72: 59, + 73: [1, 60] + }), + e(P, [2, 28]), + e(P, [2, 29], { + 91: 61, + 92: U, + 93: C + }), + e($, [2, 104]), + e(P, [2, 38]), + e(P, [2, 39]), + e(P, [2, 40]), + e(P, [2, 41]), + e(P, [2, 42]), + e(P, [2, 43]), + e(P, [2, 44]), + e(W, [2, 30]), + e(W, [2, 31]), + e([ + 23, + 33, + 56, + 67, + 68, + 73, + 75, + 79, + 84, + 85, + 86, + 87, + 88, + 89, + 92, + 93 + ], Sr, { 74: kr }), + e(P, [2, 49], { + 91: 65, + 92: U, + 93: C + }), + { + 73: E, + 90: 66 + }, + e(Er, [2, 106], { 76: 67 }), + { + 20: 28, + 49: 68, + 50: 69, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(vr, [2, 88], { 54: 70 }), + e(W, Sr), + { + 25: 71, + 38: 73, + 39: wr, + 43: 74, + 44: we, + 45: 72, + 47: [2, 60] + }, + { + 28: 77, + 43: 78, + 44: we, + 47: [2, 62] + }, + { + 13: 80, + 15: r, + 18: [1, 79] + }, + e(z, [2, 92], { 58: 81 }), + { + 26: 82, + 47: Te + }, + e(dt, [2, 64], { 30: 84 }), + { + 91: 61, + 92: U, + 93: C + }, + e(dt, [2, 70], { 35: 85 }), + e(Tr, [2, 56], { 21: 86 }), + e(z, [2, 96], { 62: 87 }), + e(s, [2, 22]), + { + 20: 28, + 33: [2, 86], + 49: 90, + 50: 89, + 52: 88, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e($, [2, 105]), + { 74: kr }, + { + 73: E, + 90: 91 + }, + { 73: [2, 46] }, + { 73: [2, 47] }, + { + 20: 28, + 50: 92, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { 73: [1, 93] }, + e(P, [2, 45], { + 91: 65, + 92: U, + 93: C + }), + { + 20: 28, + 50: 95, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 77: [1, 94], + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { 68: [1, 96] }, + e(xr, [2, 100], { 69: 97 }), + { + 20: 28, + 49: 100, + 50: 99, + 55: 98, + 56: [2, 90], + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 26: 101, + 47: Te + }, + { 47: [2, 61] }, + e(T, t, { + 6: 3, + 4: 102 + }), + { 47: [2, 20] }, + { + 20: 103, + 64: 53, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(O, t, { + 6: 3, + 4: 104 + }), + { + 26: 105, + 47: Te + }, + { 47: [2, 63] }, + e(s, [2, 11]), + e(B, [2, 55]), + { + 20: 28, + 33: [2, 94], + 49: 108, + 50: 107, + 59: 106, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(s, [2, 26]), + { + 20: 109, + 64: 53, + 65: 38, + 66: 39, + 67: n, + 73: E, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + e(gt, [2, 66], { + 71: 27, + 20: 28, + 64: 29, + 72: 30, + 82: 31, + 83: 32, + 65: 38, + 66: 39, + 90: 41, + 31: 110, + 50: 111, + 49: 112, + 67: n, + 73: i, + 75: a, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g + }), + e(gt, [2, 72], { + 71: 27, + 20: 28, + 64: 29, + 72: 30, + 82: 31, + 83: 32, + 65: 38, + 66: 39, + 90: 41, + 36: 113, + 50: 114, + 49: 115, + 67: n, + 73: i, + 75: a, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g + }), + { + 20: 28, + 22: 116, + 23: [2, 58], + 49: 118, + 50: 117, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { + 20: 28, + 33: [2, 98], + 49: 121, + 50: 120, + 63: 119, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { 33: [1, 122] }, + e(z, [2, 85]), + { 33: [2, 87] }, + e(P, [2, 48], { + 91: 65, + 92: U, + 93: C + }), + e($, [2, 35]), + e(W, [2, 50]), + e(W, [2, 36]), + e(Er, [2, 107]), + e(W, [2, 32]), + { + 20: 28, + 49: 125, + 50: 124, + 64: 29, + 65: 38, + 66: 39, + 67: n, + 68: [2, 102], + 70: 123, + 71: 27, + 72: 30, + 73: i, + 75: a, + 82: 31, + 83: 32, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g, + 90: 41 + }, + { 56: [1, 126] }, + e(vr, [2, 89]), + { 56: [2, 91] }, + e(s, [2, 13]), + { + 38: 73, + 39: wr, + 43: 74, + 44: we, + 45: 128, + 46: 127, + 47: [2, 82] + }, + e(dt, [2, 76], { 40: 129 }), + { 47: [2, 18] }, + e(s, [2, 14]), + { 33: [1, 130] }, + e(z, [2, 93]), + { 33: [2, 95] }, + { 33: [1, 131] }, + { + 32: 132, + 33: [2, 68], + 78: 133, + 79: xe + }, + e(dt, [2, 65]), + e(gt, [2, 67]), + { + 33: [2, 74], + 37: 135, + 78: 136, + 79: xe + }, + e(dt, [2, 71]), + e(gt, [2, 73]), + { 23: [1, 137] }, + e(Tr, [2, 57]), + { 23: [2, 59] }, + { 33: [1, 138] }, + e(z, [2, 97]), + { 33: [2, 99] }, + e(s, [2, 23]), + { 68: [1, 139] }, + e(xr, [2, 101]), + { 68: [2, 103] }, + e(s, [2, 24]), + { 47: [2, 19] }, + { 47: [2, 83] }, + e(gt, [2, 78], { + 71: 27, + 20: 28, + 64: 29, + 72: 30, + 82: 31, + 83: 32, + 65: 38, + 66: 39, + 90: 41, + 41: 140, + 50: 141, + 49: 142, + 67: n, + 73: i, + 75: a, + 84: o, + 85: c, + 86: h, + 87: f, + 88: p, + 89: g + }), + e(s, [2, 25]), + e(s, [2, 21]), + { 33: [1, 143] }, + { 33: [2, 69] }, + { + 73: [1, 145], + 80: 144 + }, + { 33: [1, 146] }, + { 33: [2, 75] }, + e(B, [2, 12]), + e(O, [2, 27]), + e(W, [2, 33]), + { + 33: [2, 80], + 42: 147, + 78: 148, + 79: xe + }, + e(dt, [2, 77]), + e(gt, [2, 79]), + e(T, [2, 15]), + { + 73: [1, 150], + 81: [1, 149] + }, + e(Nr, [2, 108]), + e(D, [2, 16]), + { 33: [1, 151] }, + { 33: [2, 81] }, + { 33: [2, 37] }, + e(Nr, [2, 109]), + e(T, [2, 17]) + ], + defaultActions: { + 4: [2, 1], + 62: [2, 46], + 63: [2, 47], + 72: [2, 61], + 74: [2, 20], + 78: [2, 63], + 90: [2, 87], + 100: [2, 91], + 104: [2, 18], + 108: [2, 95], + 118: [2, 59], + 121: [2, 99], + 125: [2, 103], + 127: [2, 19], + 128: [2, 83], + 133: [2, 69], + 136: [2, 75], + 148: [2, 81], + 149: [2, 37] + }, + parseError: function(b, S) { + if (S.recoverable) this.trace(b); + else { + var y = new Error(b); + throw y.hash = S, y; + } + }, + parse: function(b) { + var S = this, y = [0], w = [null], l = [], bt = this.table, u = "", Z = 0, Lt = 0, Ar = 0, qn = 2, Pr = 1, Vn = l.slice.call(arguments, 1), x = Object.create(this.lexer), ot = { yy: {} }; + for (var Pe in this.yy) Object.prototype.hasOwnProperty.call(this.yy, Pe) && (ot.yy[Pe] = this.yy[Pe]); + x.setInput(b, ot.yy), ot.yy.lexer = x, ot.yy.parser = this, typeof x.yylloc > "u" && (x.yylloc = {}); + var Ce = x.yylloc; + l.push(Ce); + var Fn = x.options && x.options.ranges; + typeof ot.yy.parseError == "function" ? this.parseError = ot.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; + for (var Hn = function() { + var Y; + return Y = x.lex() || Pr, typeof Y != "number" && (Y = S.symbols_[Y] || Y), Y; + }, L, _e, lt, q, Le, yt = {}, jt, j, Cr, Qt;;) { + if (lt = y[y.length - 1], this.defaultActions[lt] ? q = this.defaultActions[lt] : ((L === null || typeof L > "u") && (L = Hn()), q = bt[lt] && bt[lt][L]), typeof q > "u" || !q.length || !q[0]) { + var De = ""; + Qt = []; + for (jt in bt[lt]) this.terminals_[jt] && jt > qn && Qt.push("'" + this.terminals_[jt] + "'"); + x.showPosition ? De = "Parse error on line " + (Z + 1) + `: +` + x.showPosition() + ` +Expecting ` + Qt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : De = "Parse error on line " + (Z + 1) + ": Unexpected " + (L == Pr ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(De, { + text: x.match, + token: this.terminals_[L] || L, + line: x.yylineno, + loc: Ce, + expected: Qt + }); + } + if (q[0] instanceof Array && q.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + lt + ", token: " + L); + switch (q[0]) { + case 1: + y.push(L), w.push(x.yytext), l.push(x.yylloc), y.push(q[1]), L = null, _e ? (L = _e, _e = null) : (Lt = x.yyleng, u = x.yytext, Z = x.yylineno, Ce = x.yylloc, Ar > 0 && Ar--); + break; + case 2: + if (j = this.productions_[q[1]][1], yt.$ = w[w.length - j], yt._$ = { + first_line: l[l.length - (j || 1)].first_line, + last_line: l[l.length - 1].last_line, + first_column: l[l.length - (j || 1)].first_column, + last_column: l[l.length - 1].last_column + }, Fn && (yt._$.range = [l[l.length - (j || 1)].range[0], l[l.length - 1].range[1]]), Le = this.performAction.apply(yt, [ + u, + Lt, + Z, + ot.yy, + q[1], + w, + l + ].concat(Vn)), typeof Le < "u") return Le; + j && (y = y.slice(0, -1 * j * 2), w = w.slice(0, -1 * j), l = l.slice(0, -1 * j)), y.push(this.productions_[q[1]][0]), w.push(yt.$), l.push(yt._$), Cr = bt[y[y.length - 2]][y[y.length - 1]], y.push(Cr); + break; + case 3: return !0; + } + } + return !0; + } + }; + Ne.lexer = (function() { + return { + EOF: 1, + parseError: function(S, y) { + if (this.yy.parser) this.yy.parser.parseError(S, y); + else throw new Error(S); + }, + setInput: function(b, S) { + return this.yy = S || this.yy || {}, this._input = b, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; + }, + input: function() { + var b = this._input[0]; + this.yytext += b, this.yyleng++, this.offset++, this.match += b, this.matched += b; + return b.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), b; + }, + unput: function(b) { + var S = b.length, y = b.split(/(?:\r\n?|\n)/g); + this._input = b + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - S), this.offset -= S; + var m = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1); + var w = this.yylloc.range; + return this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: y ? (y.length === m.length ? this.yylloc.first_column : 0) + m[m.length - y.length].length - y[0].length : this.yylloc.first_column - S + }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - S]), this.yyleng = this.yytext.length, this; + }, + more: function() { + return this._more = !0, this; + }, + reject: function() { + if (this.options.backtrack_lexer) this._backtrack = !0; + else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + return this; + }, + less: function(b) { + this.unput(this.match.slice(b)); + }, + pastInput: function() { + var b = this.matched.substr(0, this.matched.length - this.match.length); + return (b.length > 20 ? "..." : "") + b.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function() { + var b = this.match; + return b.length < 20 && (b += this._input.substr(0, 20 - b.length)), (b.substr(0, 20) + (b.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + showPosition: function() { + var b = this.pastInput(), S = new Array(b.length + 1).join("-"); + return b + this.upcomingInput() + ` +` + S + "^"; + }, + test_match: function(b, S) { + var y, m, w; + if (this.options.backtrack_lexer && (w = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), m = b[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + b[0].length + }, this.yytext += b[0], this.match += b[0], this.matches = b, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(b[0].length), this.matched += b[0], y = this.performAction.call(this, this.yy, this, S, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y) return y; + if (this._backtrack) { + for (var l in w) this[l] = w[l]; + return !1; + } + return !1; + }, + next: function() { + if (this.done) return this.EOF; + this._input || (this.done = !0); + var b, S, y, m; + this._more || (this.yytext = "", this.match = ""); + for (var w = this._currentRules(), l = 0; l < w.length; l++) if (y = this._input.match(this.rules[w[l]]), y && (!S || y[0].length > S[0].length)) { + if (S = y, m = l, this.options.backtrack_lexer) { + if (b = this.test_match(y, w[l]), b !== !1) return b; + if (this._backtrack) { + S = !1; + continue; + } else return !1; + } else if (!this.options.flex) break; + } + return S ? (b = this.test_match(S, w[m]), b !== !1 ? b : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. +` + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + }, + lex: function() { + return this.next() || this.lex(); + }, + begin: function(S) { + this.conditionStack.push(S); + }, + popState: function() { + return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0]; + }, + _currentRules: function() { + return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; + }, + topState: function(S) { + return S = this.conditionStack.length - 1 - Math.abs(S || 0), S >= 0 ? this.conditionStack[S] : "INITIAL"; + }, + pushState: function(S) { + this.begin(S); + }, + stateStackSize: function() { + return this.conditionStack.length; + }, + options: {}, + performAction: function(S, y, m, w) { + function l(u, Z) { + return y.yytext = y.yytext.substring(u, y.yyleng - Z + u); + } + switch (m) { + case 0: + if (y.yytext.slice(-2) === "\\\\" ? (l(0, 1), this.begin("mu")) : y.yytext.slice(-1) === "\\" ? (l(0, 1), this.begin("emu")) : this.begin("mu"), y.yytext) return 15; + break; + case 1: return 15; + case 2: return this.popState(), 15; + case 3: return this.begin("raw"), 15; + case 4: return this.popState(), this.conditionStack[this.conditionStack.length - 1] === "raw" ? 15 : (l(5, 9), 18); + case 5: return 15; + case 6: return this.popState(), 14; + case 7: return 67; + case 8: return 68; + case 9: + if (S.syntax.square === "string") this.unput(y.yytext), this.begin("escl"); + else return 75; + break; + case 10: return 77; + case 11: return 19; + case 12: return this.popState(), this.begin("raw"), 23; + case 13: return 57; + case 14: return 61; + case 15: return 29; + case 16: return 47; + case 17: return this.popState(), 44; + case 18: return this.popState(), 44; + case 19: return 34; + case 20: return 39; + case 21: return 53; + case 22: return 48; + case 23: + this.unput(y.yytext), this.popState(), this.begin("com"); + break; + case 24: return this.popState(), 14; + case 25: return 48; + case 26: return 74; + case 27: return 73; + case 28: return 73; + case 29: return 93; + case 30: return 92; + case 31: break; + case 32: return this.popState(), 56; + case 33: return this.popState(), 33; + case 34: return y.yytext = l(1, 2).replace(/\\"/g, "\""), 84; + case 35: return y.yytext = l(1, 2).replace(/\\'/g, "'"), 84; + case 36: return 89; + case 37: return 86; + case 38: return 86; + case 39: return 87; + case 40: return 88; + case 41: return 85; + case 42: return 79; + case 43: return 81; + case 44: return 73; + case 45: return y.yytext = y.yytext.replace(/\\([\\\]])/g, "$1"), this.popState(), 73; + case 46: return "INVALID"; + case 47: return 5; + } + }, + rules: [ + /^(?:[^\x00]*?(?=(\{\{)))/, + /^(?:[^\x00]+)/, + /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, + /^(?:\{\{\{\{(?=[^/]))/, + /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, + /^(?:[^\x00]+?(?=(\{\{\{\{)))/, + /^(?:[\s\S]*?--(~)?\}\})/, + /^(?:\()/, + /^(?:\))/, + /^(?:\[)/, + /^(?:\])/, + /^(?:\{\{\{\{)/, + /^(?:\}\}\}\})/, + /^(?:\{\{(~)?>)/, + /^(?:\{\{(~)?#>)/, + /^(?:\{\{(~)?#\*?)/, + /^(?:\{\{(~)?\/)/, + /^(?:\{\{(~)?\^\s*(~)?\}\})/, + /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, + /^(?:\{\{(~)?\^)/, + /^(?:\{\{(~)?\s*else\b)/, + /^(?:\{\{(~)?\{)/, + /^(?:\{\{(~)?&)/, + /^(?:\{\{(~)?!--)/, + /^(?:\{\{(~)?![\s\S]*?\}\})/, + /^(?:\{\{(~)?\*?)/, + /^(?:=)/, + /^(?:\.\.)/, + /^(?:\.(?=([=~}\s\/.)\]|])))/, + /^(?:\.#)/, + /^(?:[\/.])/, + /^(?:\s+)/, + /^(?:\}(~)?\}\})/, + /^(?:(~)?\}\})/, + /^(?:"(\\["]|[^"])*")/, + /^(?:'(\\[']|[^'])*')/, + /^(?:@)/, + /^(?:true(?=([~}\s)\]])))/, + /^(?:false(?=([~}\s)\]])))/, + /^(?:undefined(?=([~}\s)\]])))/, + /^(?:null(?=([~}\s)\]])))/, + /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/, + /^(?:as\s+\|)/, + /^(?:\|)/, + /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/, + /^(?:\[(\\\]|[^\]])*\])/, + /^(?:.)/, + /^(?:$)/ + ], + conditions: { + mu: { + rules: [ + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 46, + 47 + ], + inclusive: !1 + }, + emu: { + rules: [2], + inclusive: !1 + }, + com: { + rules: [6], + inclusive: !1 + }, + raw: { + rules: [ + 3, + 4, + 5 + ], + inclusive: !1 + }, + escl: { + rules: [45], + inclusive: !1 + }, + INITIAL: { + rules: [ + 0, + 1, + 47 + ], + inclusive: !0 + } + } + }; + })(); + function Ae() { + this.yy = {}; + } + return Ae.prototype = Ne, Ne.Parser = Ae, new Ae(); + })(); + Ye = [ + "description", + "fileName", + "lineNumber", + "endLineNumber", + "message", + "name", + "number", + "stack" + ]; + Ge.prototype = /* @__PURE__ */ new Error(); + tt = Ge; + le.prototype = { + constructor: le, + mutating: !1, + acceptKey: function(e, t) { + var r = this.accept(e[t]); + if (this.mutating) { + if (r && !le.prototype[r.type]) throw new tt("Unexpected node type \"" + r.type + "\" found when accepting " + t + " on " + e.type); + e[t] = r; + } + }, + acceptRequired: function(e, t) { + if (this.acceptKey(e, t), !e[t]) throw new tt(e.type + " requires " + t); + }, + acceptArray: function(e) { + for (var t = 0, r = e.length; t < r; t++) this.acceptKey(e, t), e[t] || (e.splice(t, 1), t--, r--); + }, + accept: function(e) { + if (e) { + if (!this[e.type]) throw new tt("Unknown type: " + e.type, e); + this.current && this.parents.unshift(this.current), this.current = e; + var t = this[e.type](e); + if (this.current = this.parents.shift(), !this.mutating || t) return t; + if (t !== !1) return e; + } + }, + Program: function(e) { + this.acceptArray(e.body); + }, + MustacheStatement: ce, + Decorator: ce, + BlockStatement: Gr, + DecoratorBlock: Gr, + PartialStatement: Kr, + PartialBlockStatement: function(e) { + Kr.call(this, e), this.acceptKey(e, "program"); + }, + ContentStatement: function() {}, + CommentStatement: function() {}, + SubExpression: ce, + PathExpression: function() {}, + StringLiteral: function() {}, + NumberLiteral: function() {}, + BooleanLiteral: function() {}, + UndefinedLiteral: function() {}, + NullLiteral: function() {}, + Hash: function(e) { + this.acceptArray(e.pairs); + }, + HashPair: function(e) { + this.acceptRequired(e, "value"); + } + }; + Wr = le; + G.prototype = new Wr(); + G.prototype.Program = function(e) { + var t = !this.options.ignoreStandalone, r = !this.isRootSeen; + this.isRootSeen = !0; + for (var s = e.body, n = 0, i = s.length; n < i; n++) { + var a = s[n], o = this.accept(a); + if (o) { + var c = Ke(s, n, r), h = We(s, n, r), f = o.openStandalone && c, p = o.closeStandalone && h, g = o.inlineStandalone && c && h; + o.close && ht(s, n, !0), o.open && et(s, n, !0), t && g && (ht(s, n), et(s, n) && a.type === "PartialStatement" && (a.indent = /([ \t]+$)/.exec(s[n - 1].original)[1])), t && f && (ht((a.program || a.inverse).body), et(s, n)), t && p && (ht(s, n), et((a.inverse || a.program).body)); + } + } + return e; + }; + G.prototype.BlockStatement = G.prototype.DecoratorBlock = G.prototype.PartialBlockStatement = function(e) { + this.accept(e.program), this.accept(e.inverse); + var t = e.program || e.inverse, r = e.program && e.inverse, s = r, n = r; + if (r && r.chained) for (s = r.body[0].program; n.chained;) n = n.body[n.body.length - 1].program; + var i = { + open: e.openStrip.open, + close: e.closeStrip.close, + openStandalone: We(t.body), + closeStandalone: Ke((s || t).body) + }; + if (e.openStrip.close && ht(t.body, null, !0), r) { + var a = e.inverseStrip; + a.open && et(t.body, null, !0), a.close && ht(s.body, null, !0), e.closeStrip.open && et(n.body, null, !0), !this.options.ignoreStandalone && Ke(t.body) && We(s.body) && (et(t.body), ht(s.body)); + } else e.closeStrip.open && et(t.body, null, !0); + return i; + }; + G.prototype.Decorator = G.prototype.MustacheStatement = function(e) { + return e.strip; + }; + G.prototype.PartialStatement = G.prototype.CommentStatement = function(e) { + var t = e.strip || {}; + return { + inlineStandalone: !0, + open: t.open, + close: t.close + }; + }; + jr = G; + Ft = {}; + Oe(Ft, { + SourceLocation: () => Qe, + id: () => ps, + prepareBlock: () => ys, + prepareMustache: () => gs, + preparePartialBlock: () => ks, + preparePath: () => ds, + prepareProgram: () => Ss, + prepareRawBlock: () => bs, + stripComment: () => ms, + stripFlags: () => fs + }); + hs = function(e, t, r) { + if (r || arguments.length === 2) for (var s = 0, n = t.length, i; s < n; s++) (i || !(s in t)) && (i || (i = Array.prototype.slice.call(t, 0, s)), i[s] = t[s]); + return e.concat(i || Array.prototype.slice.call(t)); + }; + Qr = {}; + for (ue in Ft) Object.prototype.hasOwnProperty.call(Ft, ue) && (Qr[ue] = Ft[ue]); + $r = { + Aacute: "Á", + aacute: "á", + Abreve: "Ă", + abreve: "ă", + ac: "∾", + acd: "∿", + acE: "∾̳", + Acirc: "Â", + acirc: "â", + acute: "´", + Acy: "А", + acy: "а", + AElig: "Æ", + aelig: "æ", + af: "⁡", + Afr: "𝔄", + afr: "𝔞", + Agrave: "À", + agrave: "à", + alefsym: "ℵ", + aleph: "ℵ", + Alpha: "Α", + alpha: "α", + Amacr: "Ā", + amacr: "ā", + amalg: "⨿", + amp: "&", + AMP: "&", + andand: "⩕", + And: "⩓", + and: "∧", + andd: "⩜", + andslope: "⩘", + andv: "⩚", + ang: "∠", + ange: "⦤", + angle: "∠", + angmsdaa: "⦨", + angmsdab: "⦩", + angmsdac: "⦪", + angmsdad: "⦫", + angmsdae: "⦬", + angmsdaf: "⦭", + angmsdag: "⦮", + angmsdah: "⦯", + angmsd: "∡", + angrt: "∟", + angrtvb: "⊾", + angrtvbd: "⦝", + angsph: "∢", + angst: "Å", + angzarr: "⍼", + Aogon: "Ą", + aogon: "ą", + Aopf: "𝔸", + aopf: "𝕒", + apacir: "⩯", + ap: "≈", + apE: "⩰", + ape: "≊", + apid: "≋", + apos: "'", + ApplyFunction: "⁡", + approx: "≈", + approxeq: "≊", + Aring: "Å", + aring: "å", + Ascr: "𝒜", + ascr: "𝒶", + Assign: "≔", + ast: "*", + asymp: "≈", + asympeq: "≍", + Atilde: "Ã", + atilde: "ã", + Auml: "Ä", + auml: "ä", + awconint: "∳", + awint: "⨑", + backcong: "≌", + backepsilon: "϶", + backprime: "‵", + backsim: "∽", + backsimeq: "⋍", + Backslash: "∖", + Barv: "⫧", + barvee: "⊽", + barwed: "⌅", + Barwed: "⌆", + barwedge: "⌅", + bbrk: "⎵", + bbrktbrk: "⎶", + bcong: "≌", + Bcy: "Б", + bcy: "б", + bdquo: "„", + becaus: "∵", + because: "∵", + Because: "∵", + bemptyv: "⦰", + bepsi: "϶", + bernou: "ℬ", + Bernoullis: "ℬ", + Beta: "Β", + beta: "β", + beth: "ℶ", + between: "≬", + Bfr: "𝔅", + bfr: "𝔟", + bigcap: "⋂", + bigcirc: "◯", + bigcup: "⋃", + bigodot: "⨀", + bigoplus: "⨁", + bigotimes: "⨂", + bigsqcup: "⨆", + bigstar: "★", + bigtriangledown: "▽", + bigtriangleup: "△", + biguplus: "⨄", + bigvee: "⋁", + bigwedge: "⋀", + bkarow: "⤍", + blacklozenge: "⧫", + blacksquare: "▪", + blacktriangle: "▴", + blacktriangledown: "▾", + blacktriangleleft: "◂", + blacktriangleright: "▸", + blank: "␣", + blk12: "▒", + blk14: "░", + blk34: "▓", + block: "█", + bne: "=⃥", + bnequiv: "≡⃥", + bNot: "⫭", + bnot: "⌐", + Bopf: "𝔹", + bopf: "𝕓", + bot: "⊥", + bottom: "⊥", + bowtie: "⋈", + boxbox: "⧉", + boxdl: "┐", + boxdL: "╕", + boxDl: "╖", + boxDL: "╗", + boxdr: "┌", + boxdR: "╒", + boxDr: "╓", + boxDR: "╔", + boxh: "─", + boxH: "═", + boxhd: "┬", + boxHd: "╤", + boxhD: "╥", + boxHD: "╦", + boxhu: "┴", + boxHu: "╧", + boxhU: "╨", + boxHU: "╩", + boxminus: "⊟", + boxplus: "⊞", + boxtimes: "⊠", + boxul: "┘", + boxuL: "╛", + boxUl: "╜", + boxUL: "╝", + boxur: "└", + boxuR: "╘", + boxUr: "╙", + boxUR: "╚", + boxv: "│", + boxV: "║", + boxvh: "┼", + boxvH: "╪", + boxVh: "╫", + boxVH: "╬", + boxvl: "┤", + boxvL: "╡", + boxVl: "╢", + boxVL: "╣", + boxvr: "├", + boxvR: "╞", + boxVr: "╟", + boxVR: "╠", + bprime: "‵", + breve: "˘", + Breve: "˘", + brvbar: "¦", + bscr: "𝒷", + Bscr: "ℬ", + bsemi: "⁏", + bsim: "∽", + bsime: "⋍", + bsolb: "⧅", + bsol: "\\", + bsolhsub: "⟈", + bull: "•", + bullet: "•", + bump: "≎", + bumpE: "⪮", + bumpe: "≏", + Bumpeq: "≎", + bumpeq: "≏", + Cacute: "Ć", + cacute: "ć", + capand: "⩄", + capbrcup: "⩉", + capcap: "⩋", + cap: "∩", + Cap: "⋒", + capcup: "⩇", + capdot: "⩀", + CapitalDifferentialD: "ⅅ", + caps: "∩︀", + caret: "⁁", + caron: "ˇ", + Cayleys: "ℭ", + ccaps: "⩍", + Ccaron: "Č", + ccaron: "č", + Ccedil: "Ç", + ccedil: "ç", + Ccirc: "Ĉ", + ccirc: "ĉ", + Cconint: "∰", + ccups: "⩌", + ccupssm: "⩐", + Cdot: "Ċ", + cdot: "ċ", + cedil: "¸", + Cedilla: "¸", + cemptyv: "⦲", + cent: "¢", + centerdot: "·", + CenterDot: "·", + cfr: "𝔠", + Cfr: "ℭ", + CHcy: "Ч", + chcy: "ч", + check: "✓", + checkmark: "✓", + Chi: "Χ", + chi: "χ", + circ: "ˆ", + circeq: "≗", + circlearrowleft: "↺", + circlearrowright: "↻", + circledast: "⊛", + circledcirc: "⊚", + circleddash: "⊝", + CircleDot: "⊙", + circledR: "®", + circledS: "Ⓢ", + CircleMinus: "⊖", + CirclePlus: "⊕", + CircleTimes: "⊗", + cir: "○", + cirE: "⧃", + cire: "≗", + cirfnint: "⨐", + cirmid: "⫯", + cirscir: "⧂", + ClockwiseContourIntegral: "∲", + CloseCurlyDoubleQuote: "”", + CloseCurlyQuote: "’", + clubs: "♣", + clubsuit: "♣", + colon: ":", + Colon: "∷", + Colone: "⩴", + colone: "≔", + coloneq: "≔", + comma: ",", + commat: "@", + comp: "∁", + compfn: "∘", + complement: "∁", + complexes: "ℂ", + cong: "≅", + congdot: "⩭", + Congruent: "≡", + conint: "∮", + Conint: "∯", + ContourIntegral: "∮", + copf: "𝕔", + Copf: "ℂ", + coprod: "∐", + Coproduct: "∐", + copy: "©", + COPY: "©", + copysr: "℗", + CounterClockwiseContourIntegral: "∳", + crarr: "↵", + cross: "✗", + Cross: "⨯", + Cscr: "𝒞", + cscr: "𝒸", + csub: "⫏", + csube: "⫑", + csup: "⫐", + csupe: "⫒", + ctdot: "⋯", + cudarrl: "⤸", + cudarrr: "⤵", + cuepr: "⋞", + cuesc: "⋟", + cularr: "↶", + cularrp: "⤽", + cupbrcap: "⩈", + cupcap: "⩆", + CupCap: "≍", + cup: "∪", + Cup: "⋓", + cupcup: "⩊", + cupdot: "⊍", + cupor: "⩅", + cups: "∪︀", + curarr: "↷", + curarrm: "⤼", + curlyeqprec: "⋞", + curlyeqsucc: "⋟", + curlyvee: "⋎", + curlywedge: "⋏", + curren: "¤", + curvearrowleft: "↶", + curvearrowright: "↷", + cuvee: "⋎", + cuwed: "⋏", + cwconint: "∲", + cwint: "∱", + cylcty: "⌭", + dagger: "†", + Dagger: "‡", + daleth: "ℸ", + darr: "↓", + Darr: "↡", + dArr: "⇓", + dash: "‐", + Dashv: "⫤", + dashv: "⊣", + dbkarow: "⤏", + dblac: "˝", + Dcaron: "Ď", + dcaron: "ď", + Dcy: "Д", + dcy: "д", + ddagger: "‡", + ddarr: "⇊", + DD: "ⅅ", + dd: "ⅆ", + DDotrahd: "⤑", + ddotseq: "⩷", + deg: "°", + Del: "∇", + Delta: "Δ", + delta: "δ", + demptyv: "⦱", + dfisht: "⥿", + Dfr: "𝔇", + dfr: "𝔡", + dHar: "⥥", + dharl: "⇃", + dharr: "⇂", + DiacriticalAcute: "´", + DiacriticalDot: "˙", + DiacriticalDoubleAcute: "˝", + DiacriticalGrave: "`", + DiacriticalTilde: "˜", + diam: "⋄", + diamond: "⋄", + Diamond: "⋄", + diamondsuit: "♦", + diams: "♦", + die: "¨", + DifferentialD: "ⅆ", + digamma: "ϝ", + disin: "⋲", + div: "÷", + divide: "÷", + divideontimes: "⋇", + divonx: "⋇", + DJcy: "Ђ", + djcy: "ђ", + dlcorn: "⌞", + dlcrop: "⌍", + dollar: "$", + Dopf: "𝔻", + dopf: "𝕕", + Dot: "¨", + dot: "˙", + DotDot: "⃜", + doteq: "≐", + doteqdot: "≑", + DotEqual: "≐", + dotminus: "∸", + dotplus: "∔", + dotsquare: "⊡", + doublebarwedge: "⌆", + DoubleContourIntegral: "∯", + DoubleDot: "¨", + DoubleDownArrow: "⇓", + DoubleLeftArrow: "⇐", + DoubleLeftRightArrow: "⇔", + DoubleLeftTee: "⫤", + DoubleLongLeftArrow: "⟸", + DoubleLongLeftRightArrow: "⟺", + DoubleLongRightArrow: "⟹", + DoubleRightArrow: "⇒", + DoubleRightTee: "⊨", + DoubleUpArrow: "⇑", + DoubleUpDownArrow: "⇕", + DoubleVerticalBar: "∥", + DownArrowBar: "⤓", + downarrow: "↓", + DownArrow: "↓", + Downarrow: "⇓", + DownArrowUpArrow: "⇵", + DownBreve: "̑", + downdownarrows: "⇊", + downharpoonleft: "⇃", + downharpoonright: "⇂", + DownLeftRightVector: "⥐", + DownLeftTeeVector: "⥞", + DownLeftVectorBar: "⥖", + DownLeftVector: "↽", + DownRightTeeVector: "⥟", + DownRightVectorBar: "⥗", + DownRightVector: "⇁", + DownTeeArrow: "↧", + DownTee: "⊤", + drbkarow: "⤐", + drcorn: "⌟", + drcrop: "⌌", + Dscr: "𝒟", + dscr: "𝒹", + DScy: "Ѕ", + dscy: "ѕ", + dsol: "⧶", + Dstrok: "Đ", + dstrok: "đ", + dtdot: "⋱", + dtri: "▿", + dtrif: "▾", + duarr: "⇵", + duhar: "⥯", + dwangle: "⦦", + DZcy: "Џ", + dzcy: "џ", + dzigrarr: "⟿", + Eacute: "É", + eacute: "é", + easter: "⩮", + Ecaron: "Ě", + ecaron: "ě", + Ecirc: "Ê", + ecirc: "ê", + ecir: "≖", + ecolon: "≕", + Ecy: "Э", + ecy: "э", + eDDot: "⩷", + Edot: "Ė", + edot: "ė", + eDot: "≑", + ee: "ⅇ", + efDot: "≒", + Efr: "𝔈", + efr: "𝔢", + eg: "⪚", + Egrave: "È", + egrave: "è", + egs: "⪖", + egsdot: "⪘", + el: "⪙", + Element: "∈", + elinters: "⏧", + ell: "ℓ", + els: "⪕", + elsdot: "⪗", + Emacr: "Ē", + emacr: "ē", + empty: "∅", + emptyset: "∅", + EmptySmallSquare: "◻", + emptyv: "∅", + EmptyVerySmallSquare: "▫", + emsp13: " ", + emsp14: " ", + emsp: " ", + ENG: "Ŋ", + eng: "ŋ", + ensp: " ", + Eogon: "Ę", + eogon: "ę", + Eopf: "𝔼", + eopf: "𝕖", + epar: "⋕", + eparsl: "⧣", + eplus: "⩱", + epsi: "ε", + Epsilon: "Ε", + epsilon: "ε", + epsiv: "ϵ", + eqcirc: "≖", + eqcolon: "≕", + eqsim: "≂", + eqslantgtr: "⪖", + eqslantless: "⪕", + Equal: "⩵", + equals: "=", + EqualTilde: "≂", + equest: "≟", + Equilibrium: "⇌", + equiv: "≡", + equivDD: "⩸", + eqvparsl: "⧥", + erarr: "⥱", + erDot: "≓", + escr: "ℯ", + Escr: "ℰ", + esdot: "≐", + Esim: "⩳", + esim: "≂", + Eta: "Η", + eta: "η", + ETH: "Ð", + eth: "ð", + Euml: "Ë", + euml: "ë", + euro: "€", + excl: "!", + exist: "∃", + Exists: "∃", + expectation: "ℰ", + exponentiale: "ⅇ", + ExponentialE: "ⅇ", + fallingdotseq: "≒", + Fcy: "Ф", + fcy: "ф", + female: "♀", + ffilig: "ffi", + fflig: "ff", + ffllig: "ffl", + Ffr: "𝔉", + ffr: "𝔣", + filig: "fi", + FilledSmallSquare: "◼", + FilledVerySmallSquare: "▪", + fjlig: "fj", + flat: "♭", + fllig: "fl", + fltns: "▱", + fnof: "ƒ", + Fopf: "𝔽", + fopf: "𝕗", + forall: "∀", + ForAll: "∀", + fork: "⋔", + forkv: "⫙", + Fouriertrf: "ℱ", + fpartint: "⨍", + frac12: "½", + frac13: "⅓", + frac14: "¼", + frac15: "⅕", + frac16: "⅙", + frac18: "⅛", + frac23: "⅔", + frac25: "⅖", + frac34: "¾", + frac35: "⅗", + frac38: "⅜", + frac45: "⅘", + frac56: "⅚", + frac58: "⅝", + frac78: "⅞", + frasl: "⁄", + frown: "⌢", + fscr: "𝒻", + Fscr: "ℱ", + gacute: "ǵ", + Gamma: "Γ", + gamma: "γ", + Gammad: "Ϝ", + gammad: "ϝ", + gap: "⪆", + Gbreve: "Ğ", + gbreve: "ğ", + Gcedil: "Ģ", + Gcirc: "Ĝ", + gcirc: "ĝ", + Gcy: "Г", + gcy: "г", + Gdot: "Ġ", + gdot: "ġ", + ge: "≥", + gE: "≧", + gEl: "⪌", + gel: "⋛", + geq: "≥", + geqq: "≧", + geqslant: "⩾", + gescc: "⪩", + ges: "⩾", + gesdot: "⪀", + gesdoto: "⪂", + gesdotol: "⪄", + gesl: "⋛︀", + gesles: "⪔", + Gfr: "𝔊", + gfr: "𝔤", + gg: "≫", + Gg: "⋙", + ggg: "⋙", + gimel: "ℷ", + GJcy: "Ѓ", + gjcy: "ѓ", + gla: "⪥", + gl: "≷", + glE: "⪒", + glj: "⪤", + gnap: "⪊", + gnapprox: "⪊", + gne: "⪈", + gnE: "≩", + gneq: "⪈", + gneqq: "≩", + gnsim: "⋧", + Gopf: "𝔾", + gopf: "𝕘", + grave: "`", + GreaterEqual: "≥", + GreaterEqualLess: "⋛", + GreaterFullEqual: "≧", + GreaterGreater: "⪢", + GreaterLess: "≷", + GreaterSlantEqual: "⩾", + GreaterTilde: "≳", + Gscr: "𝒢", + gscr: "ℊ", + gsim: "≳", + gsime: "⪎", + gsiml: "⪐", + gtcc: "⪧", + gtcir: "⩺", + gt: ">", + GT: ">", + Gt: "≫", + gtdot: "⋗", + gtlPar: "⦕", + gtquest: "⩼", + gtrapprox: "⪆", + gtrarr: "⥸", + gtrdot: "⋗", + gtreqless: "⋛", + gtreqqless: "⪌", + gtrless: "≷", + gtrsim: "≳", + gvertneqq: "≩︀", + gvnE: "≩︀", + Hacek: "ˇ", + hairsp: " ", + half: "½", + hamilt: "ℋ", + HARDcy: "Ъ", + hardcy: "ъ", + harrcir: "⥈", + harr: "↔", + hArr: "⇔", + harrw: "↭", + Hat: "^", + hbar: "ℏ", + Hcirc: "Ĥ", + hcirc: "ĥ", + hearts: "♥", + heartsuit: "♥", + hellip: "…", + hercon: "⊹", + hfr: "𝔥", + Hfr: "ℌ", + HilbertSpace: "ℋ", + hksearow: "⤥", + hkswarow: "⤦", + hoarr: "⇿", + homtht: "∻", + hookleftarrow: "↩", + hookrightarrow: "↪", + hopf: "𝕙", + Hopf: "ℍ", + horbar: "―", + HorizontalLine: "─", + hscr: "𝒽", + Hscr: "ℋ", + hslash: "ℏ", + Hstrok: "Ħ", + hstrok: "ħ", + HumpDownHump: "≎", + HumpEqual: "≏", + hybull: "⁃", + hyphen: "‐", + Iacute: "Í", + iacute: "í", + ic: "⁣", + Icirc: "Î", + icirc: "î", + Icy: "И", + icy: "и", + Idot: "İ", + IEcy: "Е", + iecy: "е", + iexcl: "¡", + iff: "⇔", + ifr: "𝔦", + Ifr: "ℑ", + Igrave: "Ì", + igrave: "ì", + ii: "ⅈ", + iiiint: "⨌", + iiint: "∭", + iinfin: "⧜", + iiota: "℩", + IJlig: "IJ", + ijlig: "ij", + Imacr: "Ī", + imacr: "ī", + image: "ℑ", + ImaginaryI: "ⅈ", + imagline: "ℐ", + imagpart: "ℑ", + imath: "ı", + Im: "ℑ", + imof: "⊷", + imped: "Ƶ", + Implies: "⇒", + incare: "℅", + in: "∈", + infin: "∞", + infintie: "⧝", + inodot: "ı", + intcal: "⊺", + int: "∫", + Int: "∬", + integers: "ℤ", + Integral: "∫", + intercal: "⊺", + Intersection: "⋂", + intlarhk: "⨗", + intprod: "⨼", + InvisibleComma: "⁣", + InvisibleTimes: "⁢", + IOcy: "Ё", + iocy: "ё", + Iogon: "Į", + iogon: "į", + Iopf: "𝕀", + iopf: "𝕚", + Iota: "Ι", + iota: "ι", + iprod: "⨼", + iquest: "¿", + iscr: "𝒾", + Iscr: "ℐ", + isin: "∈", + isindot: "⋵", + isinE: "⋹", + isins: "⋴", + isinsv: "⋳", + isinv: "∈", + it: "⁢", + Itilde: "Ĩ", + itilde: "ĩ", + Iukcy: "І", + iukcy: "і", + Iuml: "Ï", + iuml: "ï", + Jcirc: "Ĵ", + jcirc: "ĵ", + Jcy: "Й", + jcy: "й", + Jfr: "𝔍", + jfr: "𝔧", + jmath: "ȷ", + Jopf: "𝕁", + jopf: "𝕛", + Jscr: "𝒥", + jscr: "𝒿", + Jsercy: "Ј", + jsercy: "ј", + Jukcy: "Є", + jukcy: "є", + Kappa: "Κ", + kappa: "κ", + kappav: "ϰ", + Kcedil: "Ķ", + kcedil: "ķ", + Kcy: "К", + kcy: "к", + Kfr: "𝔎", + kfr: "𝔨", + kgreen: "ĸ", + KHcy: "Х", + khcy: "х", + KJcy: "Ќ", + kjcy: "ќ", + Kopf: "𝕂", + kopf: "𝕜", + Kscr: "𝒦", + kscr: "𝓀", + lAarr: "⇚", + Lacute: "Ĺ", + lacute: "ĺ", + laemptyv: "⦴", + lagran: "ℒ", + Lambda: "Λ", + lambda: "λ", + lang: "⟨", + Lang: "⟪", + langd: "⦑", + langle: "⟨", + lap: "⪅", + Laplacetrf: "ℒ", + laquo: "«", + larrb: "⇤", + larrbfs: "⤟", + larr: "←", + Larr: "↞", + lArr: "⇐", + larrfs: "⤝", + larrhk: "↩", + larrlp: "↫", + larrpl: "⤹", + larrsim: "⥳", + larrtl: "↢", + latail: "⤙", + lAtail: "⤛", + lat: "⪫", + late: "⪭", + lates: "⪭︀", + lbarr: "⤌", + lBarr: "⤎", + lbbrk: "❲", + lbrace: "{", + lbrack: "[", + lbrke: "⦋", + lbrksld: "⦏", + lbrkslu: "⦍", + Lcaron: "Ľ", + lcaron: "ľ", + Lcedil: "Ļ", + lcedil: "ļ", + lceil: "⌈", + lcub: "{", + Lcy: "Л", + lcy: "л", + ldca: "⤶", + ldquo: "“", + ldquor: "„", + ldrdhar: "⥧", + ldrushar: "⥋", + ldsh: "↲", + le: "≤", + lE: "≦", + LeftAngleBracket: "⟨", + LeftArrowBar: "⇤", + leftarrow: "←", + LeftArrow: "←", + Leftarrow: "⇐", + LeftArrowRightArrow: "⇆", + leftarrowtail: "↢", + LeftCeiling: "⌈", + LeftDoubleBracket: "⟦", + LeftDownTeeVector: "⥡", + LeftDownVectorBar: "⥙", + LeftDownVector: "⇃", + LeftFloor: "⌊", + leftharpoondown: "↽", + leftharpoonup: "↼", + leftleftarrows: "⇇", + leftrightarrow: "↔", + LeftRightArrow: "↔", + Leftrightarrow: "⇔", + leftrightarrows: "⇆", + leftrightharpoons: "⇋", + leftrightsquigarrow: "↭", + LeftRightVector: "⥎", + LeftTeeArrow: "↤", + LeftTee: "⊣", + LeftTeeVector: "⥚", + leftthreetimes: "⋋", + LeftTriangleBar: "⧏", + LeftTriangle: "⊲", + LeftTriangleEqual: "⊴", + LeftUpDownVector: "⥑", + LeftUpTeeVector: "⥠", + LeftUpVectorBar: "⥘", + LeftUpVector: "↿", + LeftVectorBar: "⥒", + LeftVector: "↼", + lEg: "⪋", + leg: "⋚", + leq: "≤", + leqq: "≦", + leqslant: "⩽", + lescc: "⪨", + les: "⩽", + lesdot: "⩿", + lesdoto: "⪁", + lesdotor: "⪃", + lesg: "⋚︀", + lesges: "⪓", + lessapprox: "⪅", + lessdot: "⋖", + lesseqgtr: "⋚", + lesseqqgtr: "⪋", + LessEqualGreater: "⋚", + LessFullEqual: "≦", + LessGreater: "≶", + lessgtr: "≶", + LessLess: "⪡", + lesssim: "≲", + LessSlantEqual: "⩽", + LessTilde: "≲", + lfisht: "⥼", + lfloor: "⌊", + Lfr: "𝔏", + lfr: "𝔩", + lg: "≶", + lgE: "⪑", + lHar: "⥢", + lhard: "↽", + lharu: "↼", + lharul: "⥪", + lhblk: "▄", + LJcy: "Љ", + ljcy: "љ", + llarr: "⇇", + ll: "≪", + Ll: "⋘", + llcorner: "⌞", + Lleftarrow: "⇚", + llhard: "⥫", + lltri: "◺", + Lmidot: "Ŀ", + lmidot: "ŀ", + lmoustache: "⎰", + lmoust: "⎰", + lnap: "⪉", + lnapprox: "⪉", + lne: "⪇", + lnE: "≨", + lneq: "⪇", + lneqq: "≨", + lnsim: "⋦", + loang: "⟬", + loarr: "⇽", + lobrk: "⟦", + longleftarrow: "⟵", + LongLeftArrow: "⟵", + Longleftarrow: "⟸", + longleftrightarrow: "⟷", + LongLeftRightArrow: "⟷", + Longleftrightarrow: "⟺", + longmapsto: "⟼", + longrightarrow: "⟶", + LongRightArrow: "⟶", + Longrightarrow: "⟹", + looparrowleft: "↫", + looparrowright: "↬", + lopar: "⦅", + Lopf: "𝕃", + lopf: "𝕝", + loplus: "⨭", + lotimes: "⨴", + lowast: "∗", + lowbar: "_", + LowerLeftArrow: "↙", + LowerRightArrow: "↘", + loz: "◊", + lozenge: "◊", + lozf: "⧫", + lpar: "(", + lparlt: "⦓", + lrarr: "⇆", + lrcorner: "⌟", + lrhar: "⇋", + lrhard: "⥭", + lrm: "‎", + lrtri: "⊿", + lsaquo: "‹", + lscr: "𝓁", + Lscr: "ℒ", + lsh: "↰", + Lsh: "↰", + lsim: "≲", + lsime: "⪍", + lsimg: "⪏", + lsqb: "[", + lsquo: "‘", + lsquor: "‚", + Lstrok: "Ł", + lstrok: "ł", + ltcc: "⪦", + ltcir: "⩹", + lt: "<", + LT: "<", + Lt: "≪", + ltdot: "⋖", + lthree: "⋋", + ltimes: "⋉", + ltlarr: "⥶", + ltquest: "⩻", + ltri: "◃", + ltrie: "⊴", + ltrif: "◂", + ltrPar: "⦖", + lurdshar: "⥊", + luruhar: "⥦", + lvertneqq: "≨︀", + lvnE: "≨︀", + macr: "¯", + male: "♂", + malt: "✠", + maltese: "✠", + Map: "⤅", + map: "↦", + mapsto: "↦", + mapstodown: "↧", + mapstoleft: "↤", + mapstoup: "↥", + marker: "▮", + mcomma: "⨩", + Mcy: "М", + mcy: "м", + mdash: "—", + mDDot: "∺", + measuredangle: "∡", + MediumSpace: " ", + Mellintrf: "ℳ", + Mfr: "𝔐", + mfr: "𝔪", + mho: "℧", + micro: "µ", + midast: "*", + midcir: "⫰", + mid: "∣", + middot: "·", + minusb: "⊟", + minus: "−", + minusd: "∸", + minusdu: "⨪", + MinusPlus: "∓", + mlcp: "⫛", + mldr: "…", + mnplus: "∓", + models: "⊧", + Mopf: "𝕄", + mopf: "𝕞", + mp: "∓", + mscr: "𝓂", + Mscr: "ℳ", + mstpos: "∾", + Mu: "Μ", + mu: "μ", + multimap: "⊸", + mumap: "⊸", + nabla: "∇", + Nacute: "Ń", + nacute: "ń", + nang: "∠⃒", + nap: "≉", + napE: "⩰̸", + napid: "≋̸", + napos: "ʼn", + napprox: "≉", + natural: "♮", + naturals: "ℕ", + natur: "♮", + nbsp: "\xA0", + nbump: "≎̸", + nbumpe: "≏̸", + ncap: "⩃", + Ncaron: "Ň", + ncaron: "ň", + Ncedil: "Ņ", + ncedil: "ņ", + ncong: "≇", + ncongdot: "⩭̸", + ncup: "⩂", + Ncy: "Н", + ncy: "н", + ndash: "–", + nearhk: "⤤", + nearr: "↗", + neArr: "⇗", + nearrow: "↗", + ne: "≠", + nedot: "≐̸", + NegativeMediumSpace: "​", + NegativeThickSpace: "​", + NegativeThinSpace: "​", + NegativeVeryThinSpace: "​", + nequiv: "≢", + nesear: "⤨", + nesim: "≂̸", + NestedGreaterGreater: "≫", + NestedLessLess: "≪", + NewLine: ` +`, + nexist: "∄", + nexists: "∄", + Nfr: "𝔑", + nfr: "𝔫", + ngE: "≧̸", + nge: "≱", + ngeq: "≱", + ngeqq: "≧̸", + ngeqslant: "⩾̸", + nges: "⩾̸", + nGg: "⋙̸", + ngsim: "≵", + nGt: "≫⃒", + ngt: "≯", + ngtr: "≯", + nGtv: "≫̸", + nharr: "↮", + nhArr: "⇎", + nhpar: "⫲", + ni: "∋", + nis: "⋼", + nisd: "⋺", + niv: "∋", + NJcy: "Њ", + njcy: "њ", + nlarr: "↚", + nlArr: "⇍", + nldr: "‥", + nlE: "≦̸", + nle: "≰", + nleftarrow: "↚", + nLeftarrow: "⇍", + nleftrightarrow: "↮", + nLeftrightarrow: "⇎", + nleq: "≰", + nleqq: "≦̸", + nleqslant: "⩽̸", + nles: "⩽̸", + nless: "≮", + nLl: "⋘̸", + nlsim: "≴", + nLt: "≪⃒", + nlt: "≮", + nltri: "⋪", + nltrie: "⋬", + nLtv: "≪̸", + nmid: "∤", + NoBreak: "⁠", + NonBreakingSpace: "\xA0", + nopf: "𝕟", + Nopf: "ℕ", + Not: "⫬", + not: "¬", + NotCongruent: "≢", + NotCupCap: "≭", + NotDoubleVerticalBar: "∦", + NotElement: "∉", + NotEqual: "≠", + NotEqualTilde: "≂̸", + NotExists: "∄", + NotGreater: "≯", + NotGreaterEqual: "≱", + NotGreaterFullEqual: "≧̸", + NotGreaterGreater: "≫̸", + NotGreaterLess: "≹", + NotGreaterSlantEqual: "⩾̸", + NotGreaterTilde: "≵", + NotHumpDownHump: "≎̸", + NotHumpEqual: "≏̸", + notin: "∉", + notindot: "⋵̸", + notinE: "⋹̸", + notinva: "∉", + notinvb: "⋷", + notinvc: "⋶", + NotLeftTriangleBar: "⧏̸", + NotLeftTriangle: "⋪", + NotLeftTriangleEqual: "⋬", + NotLess: "≮", + NotLessEqual: "≰", + NotLessGreater: "≸", + NotLessLess: "≪̸", + NotLessSlantEqual: "⩽̸", + NotLessTilde: "≴", + NotNestedGreaterGreater: "⪢̸", + NotNestedLessLess: "⪡̸", + notni: "∌", + notniva: "∌", + notnivb: "⋾", + notnivc: "⋽", + NotPrecedes: "⊀", + NotPrecedesEqual: "⪯̸", + NotPrecedesSlantEqual: "⋠", + NotReverseElement: "∌", + NotRightTriangleBar: "⧐̸", + NotRightTriangle: "⋫", + NotRightTriangleEqual: "⋭", + NotSquareSubset: "⊏̸", + NotSquareSubsetEqual: "⋢", + NotSquareSuperset: "⊐̸", + NotSquareSupersetEqual: "⋣", + NotSubset: "⊂⃒", + NotSubsetEqual: "⊈", + NotSucceeds: "⊁", + NotSucceedsEqual: "⪰̸", + NotSucceedsSlantEqual: "⋡", + NotSucceedsTilde: "≿̸", + NotSuperset: "⊃⃒", + NotSupersetEqual: "⊉", + NotTilde: "≁", + NotTildeEqual: "≄", + NotTildeFullEqual: "≇", + NotTildeTilde: "≉", + NotVerticalBar: "∤", + nparallel: "∦", + npar: "∦", + nparsl: "⫽⃥", + npart: "∂̸", + npolint: "⨔", + npr: "⊀", + nprcue: "⋠", + nprec: "⊀", + npreceq: "⪯̸", + npre: "⪯̸", + nrarrc: "⤳̸", + nrarr: "↛", + nrArr: "⇏", + nrarrw: "↝̸", + nrightarrow: "↛", + nRightarrow: "⇏", + nrtri: "⋫", + nrtrie: "⋭", + nsc: "⊁", + nsccue: "⋡", + nsce: "⪰̸", + Nscr: "𝒩", + nscr: "𝓃", + nshortmid: "∤", + nshortparallel: "∦", + nsim: "≁", + nsime: "≄", + nsimeq: "≄", + nsmid: "∤", + nspar: "∦", + nsqsube: "⋢", + nsqsupe: "⋣", + nsub: "⊄", + nsubE: "⫅̸", + nsube: "⊈", + nsubset: "⊂⃒", + nsubseteq: "⊈", + nsubseteqq: "⫅̸", + nsucc: "⊁", + nsucceq: "⪰̸", + nsup: "⊅", + nsupE: "⫆̸", + nsupe: "⊉", + nsupset: "⊃⃒", + nsupseteq: "⊉", + nsupseteqq: "⫆̸", + ntgl: "≹", + Ntilde: "Ñ", + ntilde: "ñ", + ntlg: "≸", + ntriangleleft: "⋪", + ntrianglelefteq: "⋬", + ntriangleright: "⋫", + ntrianglerighteq: "⋭", + Nu: "Ν", + nu: "ν", + num: "#", + numero: "№", + numsp: " ", + nvap: "≍⃒", + nvdash: "⊬", + nvDash: "⊭", + nVdash: "⊮", + nVDash: "⊯", + nvge: "≥⃒", + nvgt: ">⃒", + nvHarr: "⤄", + nvinfin: "⧞", + nvlArr: "⤂", + nvle: "≤⃒", + nvlt: "<⃒", + nvltrie: "⊴⃒", + nvrArr: "⤃", + nvrtrie: "⊵⃒", + nvsim: "∼⃒", + nwarhk: "⤣", + nwarr: "↖", + nwArr: "⇖", + nwarrow: "↖", + nwnear: "⤧", + Oacute: "Ó", + oacute: "ó", + oast: "⊛", + Ocirc: "Ô", + ocirc: "ô", + ocir: "⊚", + Ocy: "О", + ocy: "о", + odash: "⊝", + Odblac: "Ő", + odblac: "ő", + odiv: "⨸", + odot: "⊙", + odsold: "⦼", + OElig: "Œ", + oelig: "œ", + ofcir: "⦿", + Ofr: "𝔒", + ofr: "𝔬", + ogon: "˛", + Ograve: "Ò", + ograve: "ò", + ogt: "⧁", + ohbar: "⦵", + ohm: "Ω", + oint: "∮", + olarr: "↺", + olcir: "⦾", + olcross: "⦻", + oline: "‾", + olt: "⧀", + Omacr: "Ō", + omacr: "ō", + Omega: "Ω", + omega: "ω", + Omicron: "Ο", + omicron: "ο", + omid: "⦶", + ominus: "⊖", + Oopf: "𝕆", + oopf: "𝕠", + opar: "⦷", + OpenCurlyDoubleQuote: "“", + OpenCurlyQuote: "‘", + operp: "⦹", + oplus: "⊕", + orarr: "↻", + Or: "⩔", + or: "∨", + ord: "⩝", + order: "ℴ", + orderof: "ℴ", + ordf: "ª", + ordm: "º", + origof: "⊶", + oror: "⩖", + orslope: "⩗", + orv: "⩛", + oS: "Ⓢ", + Oscr: "𝒪", + oscr: "ℴ", + Oslash: "Ø", + oslash: "ø", + osol: "⊘", + Otilde: "Õ", + otilde: "õ", + otimesas: "⨶", + Otimes: "⨷", + otimes: "⊗", + Ouml: "Ö", + ouml: "ö", + ovbar: "⌽", + OverBar: "‾", + OverBrace: "⏞", + OverBracket: "⎴", + OverParenthesis: "⏜", + para: "¶", + parallel: "∥", + par: "∥", + parsim: "⫳", + parsl: "⫽", + part: "∂", + PartialD: "∂", + Pcy: "П", + pcy: "п", + percnt: "%", + period: ".", + permil: "‰", + perp: "⊥", + pertenk: "‱", + Pfr: "𝔓", + pfr: "𝔭", + Phi: "Φ", + phi: "φ", + phiv: "ϕ", + phmmat: "ℳ", + phone: "☎", + Pi: "Π", + pi: "π", + pitchfork: "⋔", + piv: "ϖ", + planck: "ℏ", + planckh: "ℎ", + plankv: "ℏ", + plusacir: "⨣", + plusb: "⊞", + pluscir: "⨢", + plus: "+", + plusdo: "∔", + plusdu: "⨥", + pluse: "⩲", + PlusMinus: "±", + plusmn: "±", + plussim: "⨦", + plustwo: "⨧", + pm: "±", + Poincareplane: "ℌ", + pointint: "⨕", + popf: "𝕡", + Popf: "ℙ", + pound: "£", + prap: "⪷", + Pr: "⪻", + pr: "≺", + prcue: "≼", + precapprox: "⪷", + prec: "≺", + preccurlyeq: "≼", + Precedes: "≺", + PrecedesEqual: "⪯", + PrecedesSlantEqual: "≼", + PrecedesTilde: "≾", + preceq: "⪯", + precnapprox: "⪹", + precneqq: "⪵", + precnsim: "⋨", + pre: "⪯", + prE: "⪳", + precsim: "≾", + prime: "′", + Prime: "″", + primes: "ℙ", + prnap: "⪹", + prnE: "⪵", + prnsim: "⋨", + prod: "∏", + Product: "∏", + profalar: "⌮", + profline: "⌒", + profsurf: "⌓", + prop: "∝", + Proportional: "∝", + Proportion: "∷", + propto: "∝", + prsim: "≾", + prurel: "⊰", + Pscr: "𝒫", + pscr: "𝓅", + Psi: "Ψ", + psi: "ψ", + puncsp: " ", + Qfr: "𝔔", + qfr: "𝔮", + qint: "⨌", + qopf: "𝕢", + Qopf: "ℚ", + qprime: "⁗", + Qscr: "𝒬", + qscr: "𝓆", + quaternions: "ℍ", + quatint: "⨖", + quest: "?", + questeq: "≟", + quot: "\"", + QUOT: "\"", + rAarr: "⇛", + race: "∽̱", + Racute: "Ŕ", + racute: "ŕ", + radic: "√", + raemptyv: "⦳", + rang: "⟩", + Rang: "⟫", + rangd: "⦒", + range: "⦥", + rangle: "⟩", + raquo: "»", + rarrap: "⥵", + rarrb: "⇥", + rarrbfs: "⤠", + rarrc: "⤳", + rarr: "→", + Rarr: "↠", + rArr: "⇒", + rarrfs: "⤞", + rarrhk: "↪", + rarrlp: "↬", + rarrpl: "⥅", + rarrsim: "⥴", + Rarrtl: "⤖", + rarrtl: "↣", + rarrw: "↝", + ratail: "⤚", + rAtail: "⤜", + ratio: "∶", + rationals: "ℚ", + rbarr: "⤍", + rBarr: "⤏", + RBarr: "⤐", + rbbrk: "❳", + rbrace: "}", + rbrack: "]", + rbrke: "⦌", + rbrksld: "⦎", + rbrkslu: "⦐", + Rcaron: "Ř", + rcaron: "ř", + Rcedil: "Ŗ", + rcedil: "ŗ", + rceil: "⌉", + rcub: "}", + Rcy: "Р", + rcy: "р", + rdca: "⤷", + rdldhar: "⥩", + rdquo: "”", + rdquor: "”", + rdsh: "↳", + real: "ℜ", + realine: "ℛ", + realpart: "ℜ", + reals: "ℝ", + Re: "ℜ", + rect: "▭", + reg: "®", + REG: "®", + ReverseElement: "∋", + ReverseEquilibrium: "⇋", + ReverseUpEquilibrium: "⥯", + rfisht: "⥽", + rfloor: "⌋", + rfr: "𝔯", + Rfr: "ℜ", + rHar: "⥤", + rhard: "⇁", + rharu: "⇀", + rharul: "⥬", + Rho: "Ρ", + rho: "ρ", + rhov: "ϱ", + RightAngleBracket: "⟩", + RightArrowBar: "⇥", + rightarrow: "→", + RightArrow: "→", + Rightarrow: "⇒", + RightArrowLeftArrow: "⇄", + rightarrowtail: "↣", + RightCeiling: "⌉", + RightDoubleBracket: "⟧", + RightDownTeeVector: "⥝", + RightDownVectorBar: "⥕", + RightDownVector: "⇂", + RightFloor: "⌋", + rightharpoondown: "⇁", + rightharpoonup: "⇀", + rightleftarrows: "⇄", + rightleftharpoons: "⇌", + rightrightarrows: "⇉", + rightsquigarrow: "↝", + RightTeeArrow: "↦", + RightTee: "⊢", + RightTeeVector: "⥛", + rightthreetimes: "⋌", + RightTriangleBar: "⧐", + RightTriangle: "⊳", + RightTriangleEqual: "⊵", + RightUpDownVector: "⥏", + RightUpTeeVector: "⥜", + RightUpVectorBar: "⥔", + RightUpVector: "↾", + RightVectorBar: "⥓", + RightVector: "⇀", + ring: "˚", + risingdotseq: "≓", + rlarr: "⇄", + rlhar: "⇌", + rlm: "‏", + rmoustache: "⎱", + rmoust: "⎱", + rnmid: "⫮", + roang: "⟭", + roarr: "⇾", + robrk: "⟧", + ropar: "⦆", + ropf: "𝕣", + Ropf: "ℝ", + roplus: "⨮", + rotimes: "⨵", + RoundImplies: "⥰", + rpar: ")", + rpargt: "⦔", + rppolint: "⨒", + rrarr: "⇉", + Rrightarrow: "⇛", + rsaquo: "›", + rscr: "𝓇", + Rscr: "ℛ", + rsh: "↱", + Rsh: "↱", + rsqb: "]", + rsquo: "’", + rsquor: "’", + rthree: "⋌", + rtimes: "⋊", + rtri: "▹", + rtrie: "⊵", + rtrif: "▸", + rtriltri: "⧎", + RuleDelayed: "⧴", + ruluhar: "⥨", + rx: "℞", + Sacute: "Ś", + sacute: "ś", + sbquo: "‚", + scap: "⪸", + Scaron: "Š", + scaron: "š", + Sc: "⪼", + sc: "≻", + sccue: "≽", + sce: "⪰", + scE: "⪴", + Scedil: "Ş", + scedil: "ş", + Scirc: "Ŝ", + scirc: "ŝ", + scnap: "⪺", + scnE: "⪶", + scnsim: "⋩", + scpolint: "⨓", + scsim: "≿", + Scy: "С", + scy: "с", + sdotb: "⊡", + sdot: "⋅", + sdote: "⩦", + searhk: "⤥", + searr: "↘", + seArr: "⇘", + searrow: "↘", + sect: "§", + semi: ";", + seswar: "⤩", + setminus: "∖", + setmn: "∖", + sext: "✶", + Sfr: "𝔖", + sfr: "𝔰", + sfrown: "⌢", + sharp: "♯", + SHCHcy: "Щ", + shchcy: "щ", + SHcy: "Ш", + shcy: "ш", + ShortDownArrow: "↓", + ShortLeftArrow: "←", + shortmid: "∣", + shortparallel: "∥", + ShortRightArrow: "→", + ShortUpArrow: "↑", + shy: "­", + Sigma: "Σ", + sigma: "σ", + sigmaf: "ς", + sigmav: "ς", + sim: "∼", + simdot: "⩪", + sime: "≃", + simeq: "≃", + simg: "⪞", + simgE: "⪠", + siml: "⪝", + simlE: "⪟", + simne: "≆", + simplus: "⨤", + simrarr: "⥲", + slarr: "←", + SmallCircle: "∘", + smallsetminus: "∖", + smashp: "⨳", + smeparsl: "⧤", + smid: "∣", + smile: "⌣", + smt: "⪪", + smte: "⪬", + smtes: "⪬︀", + SOFTcy: "Ь", + softcy: "ь", + solbar: "⌿", + solb: "⧄", + sol: "/", + Sopf: "𝕊", + sopf: "𝕤", + spades: "♠", + spadesuit: "♠", + spar: "∥", + sqcap: "⊓", + sqcaps: "⊓︀", + sqcup: "⊔", + sqcups: "⊔︀", + Sqrt: "√", + sqsub: "⊏", + sqsube: "⊑", + sqsubset: "⊏", + sqsubseteq: "⊑", + sqsup: "⊐", + sqsupe: "⊒", + sqsupset: "⊐", + sqsupseteq: "⊒", + square: "□", + Square: "□", + SquareIntersection: "⊓", + SquareSubset: "⊏", + SquareSubsetEqual: "⊑", + SquareSuperset: "⊐", + SquareSupersetEqual: "⊒", + SquareUnion: "⊔", + squarf: "▪", + squ: "□", + squf: "▪", + srarr: "→", + Sscr: "𝒮", + sscr: "𝓈", + ssetmn: "∖", + ssmile: "⌣", + sstarf: "⋆", + Star: "⋆", + star: "☆", + starf: "★", + straightepsilon: "ϵ", + straightphi: "ϕ", + strns: "¯", + sub: "⊂", + Sub: "⋐", + subdot: "⪽", + subE: "⫅", + sube: "⊆", + subedot: "⫃", + submult: "⫁", + subnE: "⫋", + subne: "⊊", + subplus: "⪿", + subrarr: "⥹", + subset: "⊂", + Subset: "⋐", + subseteq: "⊆", + subseteqq: "⫅", + SubsetEqual: "⊆", + subsetneq: "⊊", + subsetneqq: "⫋", + subsim: "⫇", + subsub: "⫕", + subsup: "⫓", + succapprox: "⪸", + succ: "≻", + succcurlyeq: "≽", + Succeeds: "≻", + SucceedsEqual: "⪰", + SucceedsSlantEqual: "≽", + SucceedsTilde: "≿", + succeq: "⪰", + succnapprox: "⪺", + succneqq: "⪶", + succnsim: "⋩", + succsim: "≿", + SuchThat: "∋", + sum: "∑", + Sum: "∑", + sung: "♪", + sup1: "¹", + sup2: "²", + sup3: "³", + sup: "⊃", + Sup: "⋑", + supdot: "⪾", + supdsub: "⫘", + supE: "⫆", + supe: "⊇", + supedot: "⫄", + Superset: "⊃", + SupersetEqual: "⊇", + suphsol: "⟉", + suphsub: "⫗", + suplarr: "⥻", + supmult: "⫂", + supnE: "⫌", + supne: "⊋", + supplus: "⫀", + supset: "⊃", + Supset: "⋑", + supseteq: "⊇", + supseteqq: "⫆", + supsetneq: "⊋", + supsetneqq: "⫌", + supsim: "⫈", + supsub: "⫔", + supsup: "⫖", + swarhk: "⤦", + swarr: "↙", + swArr: "⇙", + swarrow: "↙", + swnwar: "⤪", + szlig: "ß", + Tab: " ", + target: "⌖", + Tau: "Τ", + tau: "τ", + tbrk: "⎴", + Tcaron: "Ť", + tcaron: "ť", + Tcedil: "Ţ", + tcedil: "ţ", + Tcy: "Т", + tcy: "т", + tdot: "⃛", + telrec: "⌕", + Tfr: "𝔗", + tfr: "𝔱", + there4: "∴", + therefore: "∴", + Therefore: "∴", + Theta: "Θ", + theta: "θ", + thetasym: "ϑ", + thetav: "ϑ", + thickapprox: "≈", + thicksim: "∼", + ThickSpace: "  ", + ThinSpace: " ", + thinsp: " ", + thkap: "≈", + thksim: "∼", + THORN: "Þ", + thorn: "þ", + tilde: "˜", + Tilde: "∼", + TildeEqual: "≃", + TildeFullEqual: "≅", + TildeTilde: "≈", + timesbar: "⨱", + timesb: "⊠", + times: "×", + timesd: "⨰", + tint: "∭", + toea: "⤨", + topbot: "⌶", + topcir: "⫱", + top: "⊤", + Topf: "𝕋", + topf: "𝕥", + topfork: "⫚", + tosa: "⤩", + tprime: "‴", + trade: "™", + TRADE: "™", + triangle: "▵", + triangledown: "▿", + triangleleft: "◃", + trianglelefteq: "⊴", + triangleq: "≜", + triangleright: "▹", + trianglerighteq: "⊵", + tridot: "◬", + trie: "≜", + triminus: "⨺", + TripleDot: "⃛", + triplus: "⨹", + trisb: "⧍", + tritime: "⨻", + trpezium: "⏢", + Tscr: "𝒯", + tscr: "𝓉", + TScy: "Ц", + tscy: "ц", + TSHcy: "Ћ", + tshcy: "ћ", + Tstrok: "Ŧ", + tstrok: "ŧ", + twixt: "≬", + twoheadleftarrow: "↞", + twoheadrightarrow: "↠", + Uacute: "Ú", + uacute: "ú", + uarr: "↑", + Uarr: "↟", + uArr: "⇑", + Uarrocir: "⥉", + Ubrcy: "Ў", + ubrcy: "ў", + Ubreve: "Ŭ", + ubreve: "ŭ", + Ucirc: "Û", + ucirc: "û", + Ucy: "У", + ucy: "у", + udarr: "⇅", + Udblac: "Ű", + udblac: "ű", + udhar: "⥮", + ufisht: "⥾", + Ufr: "𝔘", + ufr: "𝔲", + Ugrave: "Ù", + ugrave: "ù", + uHar: "⥣", + uharl: "↿", + uharr: "↾", + uhblk: "▀", + ulcorn: "⌜", + ulcorner: "⌜", + ulcrop: "⌏", + ultri: "◸", + Umacr: "Ū", + umacr: "ū", + uml: "¨", + UnderBar: "_", + UnderBrace: "⏟", + UnderBracket: "⎵", + UnderParenthesis: "⏝", + Union: "⋃", + UnionPlus: "⊎", + Uogon: "Ų", + uogon: "ų", + Uopf: "𝕌", + uopf: "𝕦", + UpArrowBar: "⤒", + uparrow: "↑", + UpArrow: "↑", + Uparrow: "⇑", + UpArrowDownArrow: "⇅", + updownarrow: "↕", + UpDownArrow: "↕", + Updownarrow: "⇕", + UpEquilibrium: "⥮", + upharpoonleft: "↿", + upharpoonright: "↾", + uplus: "⊎", + UpperLeftArrow: "↖", + UpperRightArrow: "↗", + upsi: "υ", + Upsi: "ϒ", + upsih: "ϒ", + Upsilon: "Υ", + upsilon: "υ", + UpTeeArrow: "↥", + UpTee: "⊥", + upuparrows: "⇈", + urcorn: "⌝", + urcorner: "⌝", + urcrop: "⌎", + Uring: "Ů", + uring: "ů", + urtri: "◹", + Uscr: "𝒰", + uscr: "𝓊", + utdot: "⋰", + Utilde: "Ũ", + utilde: "ũ", + utri: "▵", + utrif: "▴", + uuarr: "⇈", + Uuml: "Ü", + uuml: "ü", + uwangle: "⦧", + vangrt: "⦜", + varepsilon: "ϵ", + varkappa: "ϰ", + varnothing: "∅", + varphi: "ϕ", + varpi: "ϖ", + varpropto: "∝", + varr: "↕", + vArr: "⇕", + varrho: "ϱ", + varsigma: "ς", + varsubsetneq: "⊊︀", + varsubsetneqq: "⫋︀", + varsupsetneq: "⊋︀", + varsupsetneqq: "⫌︀", + vartheta: "ϑ", + vartriangleleft: "⊲", + vartriangleright: "⊳", + vBar: "⫨", + Vbar: "⫫", + vBarv: "⫩", + Vcy: "В", + vcy: "в", + vdash: "⊢", + vDash: "⊨", + Vdash: "⊩", + VDash: "⊫", + Vdashl: "⫦", + veebar: "⊻", + vee: "∨", + Vee: "⋁", + veeeq: "≚", + vellip: "⋮", + verbar: "|", + Verbar: "‖", + vert: "|", + Vert: "‖", + VerticalBar: "∣", + VerticalLine: "|", + VerticalSeparator: "❘", + VerticalTilde: "≀", + VeryThinSpace: " ", + Vfr: "𝔙", + vfr: "𝔳", + vltri: "⊲", + vnsub: "⊂⃒", + vnsup: "⊃⃒", + Vopf: "𝕍", + vopf: "𝕧", + vprop: "∝", + vrtri: "⊳", + Vscr: "𝒱", + vscr: "𝓋", + vsubnE: "⫋︀", + vsubne: "⊊︀", + vsupnE: "⫌︀", + vsupne: "⊋︀", + Vvdash: "⊪", + vzigzag: "⦚", + Wcirc: "Ŵ", + wcirc: "ŵ", + wedbar: "⩟", + wedge: "∧", + Wedge: "⋀", + wedgeq: "≙", + weierp: "℘", + Wfr: "𝔚", + wfr: "𝔴", + Wopf: "𝕎", + wopf: "𝕨", + wp: "℘", + wr: "≀", + wreath: "≀", + Wscr: "𝒲", + wscr: "𝓌", + xcap: "⋂", + xcirc: "◯", + xcup: "⋃", + xdtri: "▽", + Xfr: "𝔛", + xfr: "𝔵", + xharr: "⟷", + xhArr: "⟺", + Xi: "Ξ", + xi: "ξ", + xlarr: "⟵", + xlArr: "⟸", + xmap: "⟼", + xnis: "⋻", + xodot: "⨀", + Xopf: "𝕏", + xopf: "𝕩", + xoplus: "⨁", + xotime: "⨂", + xrarr: "⟶", + xrArr: "⟹", + Xscr: "𝒳", + xscr: "𝓍", + xsqcup: "⨆", + xuplus: "⨄", + xutri: "△", + xvee: "⋁", + xwedge: "⋀", + Yacute: "Ý", + yacute: "ý", + YAcy: "Я", + yacy: "я", + Ycirc: "Ŷ", + ycirc: "ŷ", + Ycy: "Ы", + ycy: "ы", + yen: "¥", + Yfr: "𝔜", + yfr: "𝔶", + YIcy: "Ї", + yicy: "ї", + Yopf: "𝕐", + yopf: "𝕪", + Yscr: "𝒴", + yscr: "𝓎", + YUcy: "Ю", + yucy: "ю", + yuml: "ÿ", + Yuml: "Ÿ", + Zacute: "Ź", + zacute: "ź", + Zcaron: "Ž", + zcaron: "ž", + Zcy: "З", + zcy: "з", + Zdot: "Ż", + zdot: "ż", + zeetrf: "ℨ", + ZeroWidthSpace: "​", + Zeta: "Ζ", + zeta: "ζ", + zfr: "𝔷", + Zfr: "ℨ", + ZHcy: "Ж", + zhcy: "ж", + zigrarr: "⇝", + zopf: "𝕫", + Zopf: "ℤ", + Zscr: "𝒵", + zscr: "𝓏", + zwj: "‍", + zwnj: "‌" + }, ws = /^#[xX]([A-Fa-f0-9]+)$/, Ts = /^#([0-9]+)$/, xs = /^([A-Za-z0-9]+)$/, $e = (function() { + function e(t) { + this.named = t; + } + return e.prototype.parse = function(t) { + if (t) { + var r = t.match(ws); + if (r) return String.fromCharCode(parseInt(r[1], 16)); + if (r = t.match(Ts), r) return String.fromCharCode(parseInt(r[1], 10)); + if (r = t.match(xs), r) return this.named[r[1]]; + } + }, e; + })(), Ns = /[\t\n\f ]/, As = /[A-Za-z]/, Ps = /\r\n?/g; + Xe = (function() { + function e(t, r, s) { + s === void 0 && (s = "precompile"), this.delegate = t, this.entityParser = r, this.mode = s, this.state = "beforeData", this.line = -1, this.column = -1, this.input = "", this.index = -1, this.tagNameBuffer = "", this.states = { + beforeData: function() { + var n = this.peek(); + if (n === "<" && !this.isIgnoredEndTag()) this.transitionTo("tagOpen"), this.markTagStart(), this.consume(); + else { + if (this.mode === "precompile" && n === ` +`) { + var i = this.tagNameBuffer.toLowerCase(); + (i === "pre" || i === "textarea") && this.consume(); + } + this.transitionTo("data"), this.delegate.beginData(); + } + }, + data: function() { + var n = this.peek(), i = this.tagNameBuffer; + n === "<" && !this.isIgnoredEndTag() ? (this.delegate.finishData(), this.transitionTo("tagOpen"), this.markTagStart(), this.consume()) : n === "&" && i !== "script" && i !== "style" ? (this.consume(), this.delegate.appendToData(this.consumeCharRef() || "&")) : (this.consume(), this.delegate.appendToData(n)); + }, + tagOpen: function() { + var n = this.consume(); + n === "!" ? this.transitionTo("markupDeclarationOpen") : n === "/" ? this.transitionTo("endTagOpen") : (n === "@" || n === ":" || Jr(n)) && (this.transitionTo("tagName"), this.tagNameBuffer = "", this.delegate.beginStartTag(), this.appendToTagName(n)); + }, + markupDeclarationOpen: function() { + var n = this.consume(); + if (n === "-" && this.peek() === "-") this.consume(), this.transitionTo("commentStart"), this.delegate.beginComment(); + else n.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase() === "DOCTYPE" && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.transitionTo("doctype"), this.delegate.beginDoctype && this.delegate.beginDoctype()); + }, + doctype: function() { + _(this.consume()) && this.transitionTo("beforeDoctypeName"); + }, + beforeDoctypeName: function() { + var n = this.consume(); + _(n) || (this.transitionTo("doctypeName"), this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(n.toLowerCase())); + }, + doctypeName: function() { + var n = this.consume(); + _(n) ? this.transitionTo("afterDoctypeName") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(n.toLowerCase()); + }, + afterDoctypeName: function() { + var n = this.consume(); + if (!_(n)) if (n === ">") this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData"); + else { + var i = n.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase(), a = i.toUpperCase() === "PUBLIC", o = i.toUpperCase() === "SYSTEM"; + (a || o) && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume()), a ? this.transitionTo("afterDoctypePublicKeyword") : o && this.transitionTo("afterDoctypeSystemKeyword"); + } + }, + afterDoctypePublicKeyword: function() { + var n = this.peek(); + _(n) ? (this.transitionTo("beforeDoctypePublicIdentifier"), this.consume()) : n === "\"" ? (this.transitionTo("doctypePublicIdentifierDoubleQuoted"), this.consume()) : n === "'" ? (this.transitionTo("doctypePublicIdentifierSingleQuoted"), this.consume()) : n === ">" && (this.consume(), this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")); + }, + doctypePublicIdentifierDoubleQuoted: function() { + var n = this.consume(); + n === "\"" ? this.transitionTo("afterDoctypePublicIdentifier") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(n); + }, + doctypePublicIdentifierSingleQuoted: function() { + var n = this.consume(); + n === "'" ? this.transitionTo("afterDoctypePublicIdentifier") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(n); + }, + afterDoctypePublicIdentifier: function() { + var n = this.consume(); + _(n) ? this.transitionTo("betweenDoctypePublicAndSystemIdentifiers") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : n === "\"" ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : n === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted"); + }, + betweenDoctypePublicAndSystemIdentifiers: function() { + var n = this.consume(); + _(n) || (n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : n === "\"" ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : n === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted")); + }, + doctypeSystemIdentifierDoubleQuoted: function() { + var n = this.consume(); + n === "\"" ? this.transitionTo("afterDoctypeSystemIdentifier") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(n); + }, + doctypeSystemIdentifierSingleQuoted: function() { + var n = this.consume(); + n === "'" ? this.transitionTo("afterDoctypeSystemIdentifier") : n === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(n); + }, + afterDoctypeSystemIdentifier: function() { + var n = this.consume(); + _(n) || n === ">" && (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")); + }, + commentStart: function() { + var n = this.consume(); + n === "-" ? this.transitionTo("commentStartDash") : n === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData(n), this.transitionTo("comment")); + }, + commentStartDash: function() { + var n = this.consume(); + n === "-" ? this.transitionTo("commentEnd") : n === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("-"), this.transitionTo("comment")); + }, + comment: function() { + var n = this.consume(); + n === "-" ? this.transitionTo("commentEndDash") : this.delegate.appendToCommentData(n); + }, + commentEndDash: function() { + var n = this.consume(); + n === "-" ? this.transitionTo("commentEnd") : (this.delegate.appendToCommentData("-" + n), this.transitionTo("comment")); + }, + commentEnd: function() { + var n = this.consume(); + n === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("--" + n), this.transitionTo("comment")); + }, + tagName: function() { + var n = this.consume(); + _(n) ? this.transitionTo("beforeAttributeName") : n === "/" ? this.transitionTo("selfClosingStartTag") : n === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData")) : this.appendToTagName(n); + }, + endTagName: function() { + var n = this.consume(); + _(n) ? (this.transitionTo("beforeAttributeName"), this.tagNameBuffer = "") : n === "/" ? (this.transitionTo("selfClosingStartTag"), this.tagNameBuffer = "") : n === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData"), this.tagNameBuffer = "") : this.appendToTagName(n); + }, + beforeAttributeName: function() { + var n = this.peek(); + if (_(n)) { + this.consume(); + return; + } else n === "/" ? (this.transitionTo("selfClosingStartTag"), this.consume()) : n === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : n === "=" ? (this.delegate.reportSyntaxError("attribute name cannot start with equals sign"), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(n)) : (this.transitionTo("attributeName"), this.delegate.beginAttribute()); + }, + attributeName: function() { + var n = this.peek(); + _(n) ? (this.transitionTo("afterAttributeName"), this.consume()) : n === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : n === "=" ? (this.transitionTo("beforeAttributeValue"), this.consume()) : n === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : n === "\"" || n === "'" || n === "<" ? (this.delegate.reportSyntaxError(n + " is not a valid character within attribute names"), this.consume(), this.delegate.appendToAttributeName(n)) : (this.consume(), this.delegate.appendToAttributeName(n)); + }, + afterAttributeName: function() { + var n = this.peek(); + if (_(n)) { + this.consume(); + return; + } else n === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : n === "=" ? (this.consume(), this.transitionTo("beforeAttributeValue")) : n === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(n)); + }, + beforeAttributeValue: function() { + var n = this.peek(); + _(n) ? this.consume() : n === "\"" ? (this.transitionTo("attributeValueDoubleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : n === "'" ? (this.transitionTo("attributeValueSingleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : n === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.transitionTo("attributeValueUnquoted"), this.delegate.beginAttributeValue(!1), this.consume(), this.delegate.appendToAttributeValue(n)); + }, + attributeValueDoubleQuoted: function() { + var n = this.consume(); + n === "\"" ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : n === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(n); + }, + attributeValueSingleQuoted: function() { + var n = this.consume(); + n === "'" ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : n === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(n); + }, + attributeValueUnquoted: function() { + var n = this.peek(); + _(n) ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("beforeAttributeName")) : n === "/" ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : n === "&" ? (this.consume(), this.delegate.appendToAttributeValue(this.consumeCharRef() || "&")) : n === ">" ? (this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.consume(), this.delegate.appendToAttributeValue(n)); + }, + afterAttributeValueQuoted: function() { + var n = this.peek(); + _(n) ? (this.consume(), this.transitionTo("beforeAttributeName")) : n === "/" ? (this.consume(), this.transitionTo("selfClosingStartTag")) : n === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName"); + }, + selfClosingStartTag: function() { + this.peek() === ">" ? (this.consume(), this.delegate.markTagAsSelfClosing(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName"); + }, + endTagOpen: function() { + var n = this.consume(); + (n === "@" || n === ":" || Jr(n)) && (this.transitionTo("endTagName"), this.tagNameBuffer = "", this.delegate.beginEndTag(), this.appendToTagName(n)); + } + }, this.reset(); + } + return e.prototype.reset = function() { + this.transitionTo("beforeData"), this.input = "", this.tagNameBuffer = "", this.index = 0, this.line = 1, this.column = 0, this.delegate.reset(); + }, e.prototype.transitionTo = function(t) { + this.state = t; + }, e.prototype.tokenize = function(t) { + this.reset(), this.tokenizePart(t), this.tokenizeEOF(); + }, e.prototype.tokenizePart = function(t) { + for (this.input += Cs(t); this.index < this.input.length;) { + var r = this.states[this.state]; + if (r !== void 0) r.call(this); + else throw new Error("unhandled state " + this.state); + } + }, e.prototype.tokenizeEOF = function() { + this.flushData(); + }, e.prototype.flushData = function() { + this.state === "data" && (this.delegate.finishData(), this.transitionTo("beforeData")); + }, e.prototype.peek = function() { + return this.input.charAt(this.index); + }, e.prototype.consume = function() { + var t = this.peek(); + return this.index++, t === ` +` ? (this.line++, this.column = 0) : this.column++, t; + }, e.prototype.consumeCharRef = function() { + var t = this.input.indexOf(";", this.index); + if (t !== -1) { + var r = this.input.slice(this.index, t), s = this.entityParser.parse(r); + if (s) { + for (var n = r.length; n;) this.consume(), n--; + return this.consume(), s; + } + } + }, e.prototype.markTagStart = function() { + this.delegate.tagOpen(); + }, e.prototype.appendToTagName = function(t) { + this.tagNameBuffer += t, this.delegate.appendToTagName(t); + }, e.prototype.isIgnoredEndTag = function() { + var t = this.tagNameBuffer; + return t === "title" && this.input.substring(this.index, this.index + 8) !== "" || t === "style" && this.input.substring(this.index, this.index + 8) !== "" || t === "script" && this.input.substring(this.index, this.index + 9) !== "<\/script>"; + }, e; + })(); + (function() { + function e(t, r) { + r === void 0 && (r = {}), this.options = r, this.token = null, this.startLine = 1, this.startColumn = 0, this.tokens = [], this.tokenizer = new Xe(this, t, r.mode), this._currentAttribute = void 0; + } + return e.prototype.tokenize = function(t) { + return this.tokens = [], this.tokenizer.tokenize(t), this.tokens; + }, e.prototype.tokenizePart = function(t) { + return this.tokens = [], this.tokenizer.tokenizePart(t), this.tokens; + }, e.prototype.tokenizeEOF = function() { + return this.tokens = [], this.tokenizer.tokenizeEOF(), this.tokens[0]; + }, e.prototype.reset = function() { + this.token = null, this.startLine = 1, this.startColumn = 0; + }, e.prototype.current = function() { + var t = this.token; + if (t === null) throw new Error("token was unexpectedly null"); + if (arguments.length === 0) return t; + for (var r = 0; r < arguments.length; r++) if (t.type === arguments[r]) return t; + throw new Error("token type was unexpectedly " + t.type); + }, e.prototype.push = function(t) { + this.token = t, this.tokens.push(t); + }, e.prototype.currentAttribute = function() { + return this._currentAttribute; + }, e.prototype.addLocInfo = function() { + this.options.loc && (this.current().loc = { + start: { + line: this.startLine, + column: this.startColumn + }, + end: { + line: this.tokenizer.line, + column: this.tokenizer.column + } + }), this.startLine = this.tokenizer.line, this.startColumn = this.tokenizer.column; + }, e.prototype.beginDoctype = function() { + this.push({ + type: "Doctype", + name: "" + }); + }, e.prototype.appendToDoctypeName = function(t) { + this.current("Doctype").name += t; + }, e.prototype.appendToDoctypePublicIdentifier = function(t) { + var r = this.current("Doctype"); + r.publicIdentifier === void 0 ? r.publicIdentifier = t : r.publicIdentifier += t; + }, e.prototype.appendToDoctypeSystemIdentifier = function(t) { + var r = this.current("Doctype"); + r.systemIdentifier === void 0 ? r.systemIdentifier = t : r.systemIdentifier += t; + }, e.prototype.endDoctype = function() { + this.addLocInfo(); + }, e.prototype.beginData = function() { + this.push({ + type: "Chars", + chars: "" + }); + }, e.prototype.appendToData = function(t) { + this.current("Chars").chars += t; + }, e.prototype.finishData = function() { + this.addLocInfo(); + }, e.prototype.beginComment = function() { + this.push({ + type: "Comment", + chars: "" + }); + }, e.prototype.appendToCommentData = function(t) { + this.current("Comment").chars += t; + }, e.prototype.finishComment = function() { + this.addLocInfo(); + }, e.prototype.tagOpen = function() {}, e.prototype.beginStartTag = function() { + this.push({ + type: "StartTag", + tagName: "", + attributes: [], + selfClosing: !1 + }); + }, e.prototype.beginEndTag = function() { + this.push({ + type: "EndTag", + tagName: "" + }); + }, e.prototype.finishTag = function() { + this.addLocInfo(); + }, e.prototype.markTagAsSelfClosing = function() { + this.current("StartTag").selfClosing = !0; + }, e.prototype.appendToTagName = function(t) { + this.current("StartTag", "EndTag").tagName += t; + }, e.prototype.beginAttribute = function() { + this._currentAttribute = [ + "", + "", + !1 + ]; + }, e.prototype.appendToAttributeName = function(t) { + this.currentAttribute()[0] += t; + }, e.prototype.beginAttributeValue = function(t) { + this.currentAttribute()[2] = t; + }, e.prototype.appendToAttributeValue = function(t) { + this.currentAttribute()[1] += t; + }, e.prototype.finishAttributeValue = function() { + this.current("StartTag").attributes.push(this._currentAttribute); + }, e.prototype.reportSyntaxError = function(t) { + this.current().syntaxError = t; + }, e; + })(); + pe = { + Append: 1, + TrustingAppend: 2, + Comment: 3, + Modifier: 4, + StrictModifier: 5, + Block: 6, + StrictBlock: 7, + Component: 8, + OpenElement: 10, + OpenElementWithSplat: 11, + FlushElement: 12, + CloseElement: 13, + StaticAttr: 14, + DynamicAttr: 15, + ComponentAttr: 16, + AttrSplat: 17, + Yield: 18, + DynamicArg: 20, + StaticArg: 21, + TrustingDynamicAttr: 22, + TrustingComponentAttr: 23, + StaticComponentAttr: 24, + Debugger: 26, + Undefined: 27, + Call: 28, + Concat: 29, + GetSymbol: 30, + GetLexicalSymbol: 32, + GetStrictKeyword: 31, + GetFreeAsComponentOrHelperHead: 35, + GetFreeAsHelperHead: 37, + GetFreeAsModifierHead: 38, + GetFreeAsComponentHead: 39, + InElement: 40, + If: 41, + Each: 42, + Let: 44, + WithDynamicVars: 45, + InvokeComponent: 46, + HasBlock: 48, + HasBlockParams: 49, + Curry: 50, + Not: 51, + IfInline: 52, + GetDynamicVar: 53, + Log: 54 + }; + pe.FlushElement; + pe.GetSymbol; + _s = !1; + new RegExp(/["\x26\xa0]/u.source, "gu"); + new RegExp(/[&<>\xa0]/u.source, "gu"); + de = /* @__PURE__ */ new Set([ + "area", + "base", + "br", + "col", + "command", + "embed", + "hr", + "img", + "input", + "keygen", + "link", + "meta", + "param", + "source", + "track", + "wbr" + ]); + st = Object.freeze({ + line: 1, + column: 0 + }), Bs = Object.freeze({ + source: "(synthetic)", + start: st, + end: st + }), sr = Object.freeze({ + source: "(nonexistent)", + start: st, + end: st + }), nt = Object.freeze({ + source: "(broken)", + start: st, + end: st + }), ir = class { + constructor(t) { + this._whens = t; + } + first(t) { + for (let r of this._whens) { + let s = r.match(t); + if (Yt(s)) return s[0]; + } + return null; + } + }, ge = class { + get(t, r) { + let s = this._map.get(t); + return s || (s = r(), this._map.set(t, s), s); + } + add(t, r) { + this._map.set(t, r); + } + match(t) { + let r = (function(a) { + switch (a) { + case "Broken": + case "InternalsSynthetic": + case "NonExistent": return "IS_INVISIBLE"; + default: return a; + } + })(t), s = [], n = this._map.get(r), i = this._map.get("MATCH_ANY"); + return n && s.push(n), i && s.push(i), s; + } + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + }; + ar = class { + validate() { + return (t, r) => this.matchFor(t.kind, r.kind)(t, r); + } + matchFor(t, r) { + let s = this._whens.match(t); + return Yt(s), new ir(s).first(r); + } + when(t, r, s) { + return this._whens.get(t, (() => new ge())).add(r, s), this; + } + constructor() { + this._whens = new ge(); + } + }, or = class e { + static synthetic(t) { + return new e({ + loc: A.synthetic(t), + chars: t + }); + } + static load(t, r) { + return new e({ + loc: A.load(t, r[1]), + chars: r[0] + }); + } + constructor(t) { + this.loc = t.loc, this.chars = t.chars; + } + getString() { + return this.chars; + } + serialize() { + return [this.chars, this.loc.serialize()]; + } + }, A = class e { + static get NON_EXISTENT() { + return new J("NonExistent", sr).wrap(); + } + static load(t, r) { + return typeof r == "number" ? e.forCharPositions(t, r, r) : typeof r == "string" ? e.synthetic(r) : Array.isArray(r) ? e.forCharPositions(t, r[0], r[1]) : r === "NonExistent" ? e.NON_EXISTENT : r === "Broken" ? e.broken(nt) : void Yr(r); + } + static forHbsLoc(t, r) { + return new Mt(t, { + start: new at(t, r.start), + end: new at(t, r.end) + }, r).wrap(); + } + static forCharPositions(t, r, s) { + return new Ut(t, { + start: new ft(t, r), + end: new ft(t, s) + }).wrap(); + } + static synthetic(t) { + return new J("InternalsSynthetic", sr, t).wrap(); + } + static broken(t = nt) { + return new J("Broken", t).wrap(); + } + constructor(t) { + var r; + this.data = t, this.isInvisible = (r = t.kind) !== "CharPosition" && r !== "HbsPosition"; + } + getStart() { + return this.data.getStart().wrap(); + } + getEnd() { + return this.data.getEnd().wrap(); + } + get loc() { + let t = this.data.toHbsSpan(); + return t === null ? nt : t.toHbsLoc(); + } + get module() { + return this.data.getModule(); + } + get startPosition() { + return this.loc.start; + } + get endPosition() { + return this.loc.end; + } + toJSON() { + return this.loc; + } + withStart(t) { + return K(t.data, this.data.getEnd()); + } + withEnd(t) { + return K(this.data.getStart(), t.data); + } + asString() { + return this.data.asString(); + } + toSlice(t) { + let r = this.data.asString(); + return JSON.stringify(r), JSON.stringify(t), new or({ + loc: this, + chars: t || r + }); + } + get start() { + return this.loc.start; + } + set start(t) { + this.data.locDidUpdate({ start: t }); + } + get end() { + return this.loc.end; + } + set end(t) { + this.data.locDidUpdate({ end: t }); + } + get source() { + return this.module; + } + collapse(t) { + switch (t) { + case "start": return this.getStart().collapsed(); + case "end": return this.getEnd().collapsed(); + } + } + extend(t) { + return K(this.data.getStart(), t.data.getEnd()); + } + serialize() { + return this.data.serialize(); + } + slice({ skipStart: t = 0, skipEnd: r = 0 }) { + return K(this.getStart().move(t).data, this.getEnd().move(-r).data); + } + sliceStartChars({ skipStart: t = 0, chars: r }) { + return K(this.getStart().move(t).data, this.getStart().move(t + r).data); + } + sliceEndChars({ skipEnd: t = 0, chars: r }) { + return K(this.getEnd().move(t - r).data, this.getStart().move(-t).data); + } + }, Ut = class { + #t; + constructor(t, r) { + this.source = t, this.charPositions = r, this.kind = "CharPosition", this.#t = null; + } + wrap() { + return new A(this); + } + asString() { + return this.source.slice(this.charPositions.start.charPos, this.charPositions.end.charPos); + } + getModule() { + return this.source.module; + } + getStart() { + return this.charPositions.start; + } + getEnd() { + return this.charPositions.end; + } + locDidUpdate() {} + toHbsSpan() { + let t = this.#t; + if (t === null) { + let r = this.charPositions.start.toHbsPos(), s = this.charPositions.end.toHbsPos(); + t = this.#t = r === null || s === null ? it : new Mt(this.source, { + start: r, + end: s + }); + } + return t === it ? null : t; + } + serialize() { + let { start: { charPos: t }, end: { charPos: r } } = this.charPositions; + return t === r ? t : [t, r]; + } + toCharPosSpan() { + return this; + } + }, Mt = class { + #t; + #e; + constructor(t, r, s = null) { + this.source = t, this.hbsPositions = r, this.kind = "HbsPosition", this.#t = null, this.#e = s; + } + serialize() { + let t = this.toCharPosSpan(); + return t === null ? "Broken" : t.wrap().serialize(); + } + wrap() { + return new A(this); + } + updateProvided(t, r) { + this.#e && (this.#e[r] = t), this.#t = null, this.#e = { + start: t, + end: t + }; + } + locDidUpdate({ start: t, end: r }) { + t !== void 0 && (this.updateProvided(t, "start"), this.hbsPositions.start = new at(this.source, t, null)), r !== void 0 && (this.updateProvided(r, "end"), this.hbsPositions.end = new at(this.source, r, null)); + } + asString() { + let t = this.toCharPosSpan(); + return t === null ? "" : t.asString(); + } + getModule() { + return this.source.module; + } + getStart() { + return this.hbsPositions.start; + } + getEnd() { + return this.hbsPositions.end; + } + toHbsLoc() { + return { + start: this.hbsPositions.start.hbsPos, + end: this.hbsPositions.end.hbsPos + }; + } + toHbsSpan() { + return this; + } + toCharPosSpan() { + let t = this.#t; + if (t === null) { + let r = this.hbsPositions.start.toCharPos(), s = this.hbsPositions.end.toCharPos(); + if (!r || !s) return t = this.#t = it, null; + t = this.#t = new Ut(this.source, { + start: r, + end: s + }); + } + return t === it ? null : t; + } + }, J = class { + constructor(t, r, s = null) { + this.kind = t, this.loc = r, this.string = s; + } + serialize() { + switch (this.kind) { + case "Broken": + case "NonExistent": return this.kind; + case "InternalsSynthetic": return this.string || ""; + } + } + wrap() { + return new A(this); + } + asString() { + return this.string || ""; + } + locDidUpdate({ start: t, end: r }) { + t !== void 0 && (this.loc.start = t), r !== void 0 && (this.loc.end = r); + } + getModule() { + return "an unknown module"; + } + getStart() { + return new zt(this.kind, this.loc.start); + } + getEnd() { + return new zt(this.kind, this.loc.end); + } + toCharPosSpan() { + return this; + } + toHbsSpan() { + return null; + } + toHbsLoc() { + return nt; + } + }, K = ln(((e) => e.when("HbsPosition", "HbsPosition", ((t, r) => new Mt(t.source, { + start: t, + end: r + }).wrap())).when("CharPosition", "CharPosition", ((t, r) => new Ut(t.source, { + start: t, + end: r + }).wrap())).when("CharPosition", "HbsPosition", ((t, r) => { + let s = r.toCharPos(); + return s === null ? new J("Broken", nt).wrap() : K(t, s); + })).when("HbsPosition", "CharPosition", ((t, r) => { + let s = t.toCharPos(); + return s === null ? new J("Broken", nt).wrap() : K(s, r); + })).when("IS_INVISIBLE", "MATCH_ANY", ((t) => new J(t.kind, nt).wrap())).when("MATCH_ANY", "IS_INVISIBLE", ((t, r) => new J(r.kind, nt).wrap())))), it = "BROKEN", Pt = class e { + static forHbsPos(t, r) { + return new at(t, r, null).wrap(); + } + static broken(t = st) { + return new zt("Broken", t).wrap(); + } + constructor(t) { + this.data = t; + } + get offset() { + let t = this.data.toCharPos(); + return t === null ? null : t.offset; + } + eql(t) { + return Rs(this.data, t.data); + } + until(t) { + return K(this.data, t.data); + } + move(t) { + let r = this.data.toCharPos(); + if (r === null) return e.broken(); + { + let s = r.offset + t; + return r.source.validate(s) ? new ft(r.source, s).wrap() : e.broken(); + } + } + collapsed() { + return K(this.data, this.data); + } + toJSON() { + return this.data.toJSON(); + } + }, ft = class { + constructor(t, r) { + this.source = t, this.charPos = r, this.kind = "CharPosition", this._locPos = null; + } + toCharPos() { + return this; + } + toJSON() { + let t = this.toHbsPos(); + return t === null ? st : t.toJSON(); + } + wrap() { + return new Pt(this); + } + get offset() { + return this.charPos; + } + toHbsPos() { + let t = this._locPos; + if (t === null) { + let r = this.source.hbsPosFor(this.charPos); + this._locPos = t = r === null ? it : new at(this.source, r, this.charPos); + } + return t === it ? null : t; + } + }, at = class { + constructor(t, r, s = null) { + this.source = t, this.hbsPos = r, this.kind = "HbsPosition", this._charPos = s === null ? null : new ft(t, s); + } + toCharPos() { + let t = this._charPos; + if (t === null) { + let r = this.source.charPosFor(this.hbsPos); + this._charPos = t = r === null ? it : new ft(this.source, r); + } + return t === it ? null : t; + } + toJSON() { + return this.hbsPos; + } + wrap() { + return new Pt(this); + } + toHbsPos() { + return this; + } + }, zt = class { + constructor(t, r) { + this.kind = t, this.pos = r; + } + toCharPos() { + return null; + } + toJSON() { + return this.pos; + } + wrap() { + return new Pt(this); + } + get offset() { + return null; + } + }, Rs = ln(((e) => e.when("HbsPosition", "HbsPosition", (({ hbsPos: t }, { hbsPos: r }) => t.column === r.column && t.line === r.line)).when("CharPosition", "CharPosition", (({ charPos: t }, { charPos: r }) => t === r)).when("CharPosition", "HbsPosition", (({ offset: t }, r) => t === r.toCharPos()?.offset)).when("HbsPosition", "CharPosition", ((t, { offset: r }) => t.toCharPos()?.offset === r)).when("MATCH_ANY", "MATCH_ANY", (() => !1)))), pt = class e { + static from(t, r = {}) { + return new e(t, r.meta?.moduleName); + } + constructor(t, r = "an unknown module") { + this.source = t, this.module = r; + } + validate(t) { + return t >= 0 && t <= this.source.length; + } + slice(t, r) { + return this.source.slice(t, r); + } + offsetFor(t, r) { + return Pt.forHbsPos(this, { + line: t, + column: r + }); + } + spanFor({ start: t, end: r }) { + return A.forHbsLoc(this, { + start: { + line: t.line, + column: t.column + }, + end: { + line: r.line, + column: r.column + } + }); + } + hbsPosFor(t) { + let r = 0, s = 0; + if (t > this.source.length) return null; + for (;;) { + let n = this.source.indexOf(` +`, s); + if (t <= n || n === -1) return { + line: r + 1, + column: t - s + }; + r += 1, s = n + 1; + } + } + charPosFor(t) { + let { line: r, column: s } = t, n = this.source.length, i = 0, a = 0; + for (; a < n;) { + let o = this.source.indexOf(` +`, a); + if (o === -1 && (o = this.source.length), i === r - 1) { + if (a + s > o) return o; + if (_s) { + let c = this.hbsPosFor(a + s); + c.line, c.column; + } + return a + s; + } + if (o === -1) return 0; + i += 1, a = o + 1; + } + return n; + } + }; + be = { + Template: ["body"], + Block: ["body"], + MustacheStatement: [ + "path", + "params", + "hash" + ], + BlockStatement: [ + "path", + "params", + "hash", + "program", + "inverse" + ], + ElementModifierStatement: [ + "path", + "params", + "hash" + ], + CommentStatement: [], + MustacheCommentStatement: [], + ElementNode: [ + "attributes", + "modifiers", + "children", + "comments" + ], + AttrNode: ["value"], + TextNode: [], + ConcatStatement: ["parts"], + SubExpression: [ + "path", + "params", + "hash" + ], + PathExpression: [], + StringLiteral: [], + BooleanLiteral: [], + NumberLiteral: [], + NullLiteral: [], + UndefinedLiteral: [], + Hash: ["pairs"], + HashPair: ["value"] + }, mr = (function() { + function e(t, r, s, n) { + let i = Error.call(this, t); + this.key = n, this.message = t, this.node = r, this.parent = s, i.stack && (this.stack = i.stack); + } + return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e; + })(); + Ct = class { + constructor(t, r = null, s = null) { + this.node = t, this.parent = r, this.parentKey = s; + } + get parentNode() { + return this.parent ? this.parent.node : null; + } + parents() { + return { [Symbol.iterator]: () => new lr(this) }; + } + }, lr = class { + constructor(t) { + this.path = t; + } + next() { + return this.path.parent ? (this.path = this.path.parent, { + done: !1, + value: this.path + }) : { + done: !0, + value: null + }; + } + }; + Us = { + mustache: function(e, t = [], r = Ht([]), s = !1, n, i) { + return d.mustache({ + path: rt(e), + params: t, + hash: r, + trusting: s, + strip: i, + loc: v(n || null) + }); + }, + block: function(e, t, r, s, n = null, i, a, o, c) { + let h, f = null; + return h = s.type === "Template" ? d.blockItself({ + params: fn(s.blockParams), + body: s.body, + loc: s.loc + }) : s, n?.type === "Template" ? (n.blockParams.length, f = d.blockItself({ + params: [], + body: n.body, + loc: n.loc + })) : f = n, d.block({ + path: rt(e), + params: t || [], + hash: r || Ht([]), + defaultBlock: h, + elseBlock: f, + loc: v(i || null), + openStrip: a, + inverseStrip: o, + closeStrip: c + }); + }, + comment: function(e, t) { + return d.comment({ + value: e, + loc: v(t || null) + }); + }, + mustacheComment: function(e, t) { + return d.mustacheComment({ + value: e, + loc: v(t || null) + }); + }, + element: function(e, t = {}) { + let r, s, { attrs: n, blockParams: i, modifiers: a, comments: o, children: c, openTag: h, closeTag: f, loc: p } = t; + typeof e == "string" ? e.endsWith("/") ? (r = rt(e.slice(0, -1)), s = !0) : r = rt(e) : "type" in e ? (e.type, e.type, r = e) : "path" in e ? (e.path.type, e.path.type, r = e.path, s = e.selfClosing) : (r = rt(e.name), s = e.selfClosing); + let g = i?.map(((T) => typeof T == "string" ? rn(T) : T)), E = null; + return f ? E = v(f) : f === void 0 && (E = s || Os(r.original) ? null : v(null)), d.element({ + path: r, + selfClosing: s || !1, + attributes: n || [], + params: g || [], + modifiers: a || [], + comments: o || [], + children: c || [], + openTag: v(h || null), + closeTag: E, + loc: v(p || null) + }); + }, + elementModifier: function(e, t, r, s) { + return d.elementModifier({ + path: rt(e), + params: t || [], + hash: r || Ht([]), + loc: v(s || null) + }); + }, + attr: function(e, t, r) { + return d.attr({ + name: e, + value: t, + loc: v(r || null) + }); + }, + text: function(e = "", t) { + return d.text({ + chars: e, + loc: v(t || null) + }); + }, + sexpr: function(e, t = [], r = Ht([]), s) { + return d.sexpr({ + path: rt(e), + params: t, + hash: r, + loc: v(s || null) + }); + }, + concat: function(e, t) { + if (!Yt(e)) throw new Error("b.concat requires at least one part"); + return d.concat({ + parts: e, + loc: v(t || null) + }); + }, + hash: Ht, + pair: function(e, t, r) { + return d.pair({ + key: e, + value: t, + loc: v(r || null) + }); + }, + literal: me, + program: function(e, t, r) { + return t && t.length ? nn(e, t, !1, r) : sn(e, [], r); + }, + blockItself: nn, + template: sn, + loc: v, + pos: function(e, t) { + return d.pos({ + line: e, + column: t + }); + }, + path: rt, + fullPath: function(e, t = [], r) { + return d.path({ + head: e, + tail: t, + loc: v(r || null) + }); + }, + head: function(e, t) { + return d.head({ + original: e, + loc: v(t || null) + }); + }, + at: function(e, t) { + return d.atName({ + name: e, + loc: v(t || null) + }); + }, + var: rn, + this: function(e) { + return d.this({ loc: v(e || null) }); + }, + string: er("StringLiteral"), + boolean: er("BooleanLiteral"), + number: er("NumberLiteral"), + undefined: () => me("UndefinedLiteral", void 0), + null: () => me("NullLiteral", null) + }; + fe = { + close: !1, + open: !1 + }, d = new class { + pos({ line: e, column: t }) { + return { + line: e, + column: t + }; + } + blockItself({ body: e, params: t, chained: r = !1, loc: s }) { + return { + type: "Block", + body: e, + params: t, + get blockParams() { + return this.params.map(((n) => n.name)); + }, + set blockParams(n) { + this.params = n.map(((i) => d.var({ + name: i, + loc: A.synthetic(i) + }))); + }, + chained: r, + loc: s + }; + } + template({ body: e, blockParams: t, loc: r }) { + return { + type: "Template", + body: e, + blockParams: t, + loc: r + }; + } + mustache({ path: e, params: t, hash: r, trusting: s, loc: n, strip: i = fe }) { + return (function({ path: a, params: o, hash: c, trusting: h, strip: f, loc: p }) { + let g = { + type: "MustacheStatement", + path: a, + params: o, + hash: c, + trusting: h, + strip: f, + loc: p + }; + return Object.defineProperty(g, "escaped", { + enumerable: !1, + get() { + return !this.trusting; + }, + set(E) { + this.trusting = !E; + } + }), g; + })({ + path: e, + params: t, + hash: r, + trusting: s, + strip: i, + loc: n + }); + } + block({ path: e, params: t, hash: r, defaultBlock: s, elseBlock: n = null, loc: i, openStrip: a = fe, inverseStrip: o = fe, closeStrip: c = fe }) { + return { + type: "BlockStatement", + path: e, + params: t, + hash: r, + program: s, + inverse: n, + loc: i, + openStrip: a, + inverseStrip: o, + closeStrip: c + }; + } + comment({ value: e, loc: t }) { + return { + type: "CommentStatement", + value: e, + loc: t + }; + } + mustacheComment({ value: e, loc: t }) { + return { + type: "MustacheCommentStatement", + value: e, + loc: t + }; + } + concat({ parts: e, loc: t }) { + return { + type: "ConcatStatement", + parts: e, + loc: t + }; + } + element({ path: e, selfClosing: t, attributes: r, modifiers: s, params: n, comments: i, children: a, openTag: o, closeTag: c, loc: h }) { + let f = t; + return { + type: "ElementNode", + path: e, + attributes: r, + modifiers: s, + params: n, + comments: i, + children: a, + openTag: o, + closeTag: c, + loc: h, + get tag() { + return this.path.original; + }, + set tag(p) { + this.path.original = p; + }, + get blockParams() { + return this.params.map(((p) => p.name)); + }, + set blockParams(p) { + this.params = p.map(((g) => d.var({ + name: g, + loc: A.synthetic(g) + }))); + }, + get selfClosing() { + return f; + }, + set selfClosing(p) { + f = p, this.closeTag = p ? null : A.synthetic(``); + } + }; + } + elementModifier({ path: e, params: t, hash: r, loc: s }) { + return { + type: "ElementModifierStatement", + path: e, + params: t, + hash: r, + loc: s + }; + } + attr({ name: e, value: t, loc: r }) { + return { + type: "AttrNode", + name: e, + value: t, + loc: r + }; + } + text({ chars: e, loc: t }) { + return { + type: "TextNode", + chars: e, + loc: t + }; + } + sexpr({ path: e, params: t, hash: r, loc: s }) { + return { + type: "SubExpression", + path: e, + params: t, + hash: r, + loc: s + }; + } + path({ head: e, tail: t, loc: r }) { + return (function({ head: s, tail: n, loc: i }) { + let a = { + type: "PathExpression", + head: s, + tail: n, + get original() { + return [this.head.original, ...this.tail].join("."); + }, + set original(o) { + let [c, ...h] = o.split("."); + this.head = Us.head(c, this.head.loc), this.tail = h; + }, + loc: i + }; + return Object.defineProperty(a, "parts", { + enumerable: !1, + get() { + let o = this.original.split("."); + return o[0] === "this" ? o.shift() : o[0].startsWith("@") && (o[0] = o[0].slice(1)), Object.freeze(o); + }, + set(o) { + let c = [...o]; + c[0] === "this" || c[0]?.startsWith("@") || (this.head.type === "ThisHead" ? c.unshift("this") : this.head.type === "AtHead" && (c[0] = `@${c[0]}`)), this.original = c.join("."); + } + }), Object.defineProperty(a, "this", { + enumerable: !1, + get() { + return this.head.type === "ThisHead"; + } + }), Object.defineProperty(a, "data", { + enumerable: !1, + get() { + return this.head.type === "AtHead"; + } + }), a; + })({ + head: e, + tail: t, + loc: r + }); + } + head({ original: e, loc: t }) { + return e === "this" ? this.this({ loc: t }) : e[0] === "@" ? this.atName({ + name: e, + loc: t + }) : this.var({ + name: e, + loc: t + }); + } + this({ loc: e }) { + return { + type: "ThisHead", + get original() { + return "this"; + }, + loc: e + }; + } + atName({ name: e, loc: t }) { + let r = "", s = { + type: "AtHead", + get name() { + return r; + }, + set name(n) { + n[0], n.indexOf("."), r = n; + }, + get original() { + return this.name; + }, + set original(n) { + this.name = n; + }, + loc: t + }; + return s.name = e, s; + } + var({ name: e, loc: t }) { + let r = "", s = { + type: "VarHead", + get name() { + return r; + }, + set name(n) { + n[0], n.indexOf("."), r = n; + }, + get original() { + return this.name; + }, + set original(n) { + this.name = n; + }, + loc: t + }; + return s.name = e, s; + } + hash({ pairs: e, loc: t }) { + return { + type: "Hash", + pairs: e, + loc: t + }; + } + pair({ key: e, value: t, loc: r }) { + return { + type: "HashPair", + key: e, + value: t, + loc: r + }; + } + literal({ type: e, value: t, loc: r }) { + return (function({ type: s, value: n, loc: i }) { + let a = { + type: s, + value: n, + loc: i + }; + return Object.defineProperty(a, "original", { + enumerable: !1, + get() { + return this.value; + }, + set(o) { + this.value = o; + } + }), a; + })({ + type: e, + value: t, + loc: r + }); + } + }(), cr = class { + constructor(t, r = new $e($r), s = "precompile") { + this.elementStack = [], this.currentAttribute = null, this.currentNode = null, this.source = t, this.lines = t.source.split(/\r\n?|\n/u), this.tokenizer = new Xe(this, r, s); + } + offset() { + let { line: t, column: r } = this.tokenizer; + return this.source.offsetFor(t, r); + } + pos({ line: t, column: r }) { + return this.source.offsetFor(t, r); + } + finish(t) { + return ze({}, t, { loc: t.start.until(this.offset()) }); + } + get currentAttr() { + return this.currentAttribute; + } + get currentTag() { + let t = this.currentNode; + return t && (t.type === "StartTag" || t.type), t; + } + get currentStartTag() { + let t = this.currentNode; + return t && t.type, t; + } + get currentEndTag() { + let t = this.currentNode; + return t && t.type, t; + } + get currentComment() { + let t = this.currentNode; + return t && t.type, t; + } + get currentData() { + let t = this.currentNode; + return t && t.type, t; + } + acceptNode(t) { + return this[t.type](t); + } + currentElement() { + return fr(this.elementStack); + } + sourceForNode(t, r) { + let s, n, i, a = t.loc.start.line - 1, o = a - 1, c = t.loc.start.column, h = []; + for (r ? (n = r.loc.end.line - 1, i = r.loc.end.column) : (n = t.loc.end.line - 1, i = t.loc.end.column); o < n;) o++, s = this.lines[o], o === a ? a === n ? h.push(s.slice(c, i)) : h.push(s.slice(c)) : o === n ? h.push(s.slice(0, i)) : h.push(s); + return h.join(` +`); + } + }, ur = class extends cr { + parse(t, r) { + t.loc; + let s = d.template({ + body: [], + blockParams: r, + loc: this.source.spanFor(t.loc) + }), n = this.parseProgram(s, t); + return this.pendingError?.eof(n.loc.getEnd()), n; + } + Program(t, r) { + t.loc; + let s = d.blockItself({ + body: [], + params: r, + chained: t.chained, + loc: this.source.spanFor(t.loc) + }); + return this.parseProgram(s, t); + } + parseProgram(t, r) { + if (r.body.length === 0) return t; + let s; + try { + this.elementStack.push(t); + for (let n of r.body) this.acceptNode(n); + } finally { + s = this.elementStack.pop(); + } + if (t !== s) { + if (s?.type === "ElementNode") throw k(`Unclosed element \`${s.tag}\``, s.loc); + t.type; + } + return t; + } + BlockStatement(t) { + if (this.tokenizer.state === "comment") return t.loc, void this.appendToCommentData(this.sourceForNode(t)); + if (this.tokenizer.state !== "data" && this.tokenizer.state !== "beforeData") throw k("A block may only be used inside an HTML element or another block.", this.source.spanFor(t.loc)); + let { path: r, params: s, hash: n } = rr(this, t), i = this.source.spanFor(t.loc), a, o = []; + if (t.program.blockParams?.length) { + let p = n.loc.collapse("end"); + p = t.program.loc ? p.withEnd(this.source.spanFor(t.program.loc).getStart()) : t.program.body[0] ? p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()) : p.withEnd(i.getEnd()), a = an(this.source, t, p); + let g = p.asString(), E = g.indexOf("|") + 1, T = g.indexOf("|", E); + for (let D of t.program.blockParams) { + let B, O; + B = E >= T ? -1 : g.indexOf(D, E), B === -1 || B + D.length > T ? (E = T, O = this.source.spanFor(sr)) : (E = B, O = p.sliceStartChars({ + skipStart: E, + chars: D.length + }), E += D.length), o.push(d.var({ + name: D, + loc: O + })); + } + } else a = an(this.source, t, i); + let c = this.Program(a.program, o), h = a.inverse ? this.Program(a.inverse, []) : null, f = d.block({ + path: r, + params: s, + hash: n, + defaultBlock: c, + elseBlock: h, + loc: this.source.spanFor(t.loc), + openStrip: t.openStrip, + inverseStrip: t.inverseStrip, + closeStrip: t.closeStrip + }); + At(this.currentElement(), f); + } + MustacheStatement(t) { + this.pendingError?.mustache(this.source.spanFor(t.loc)); + let { tokenizer: r } = this; + if (r.state === "comment") return void this.appendToCommentData(this.sourceForNode(t)); + let s, { escaped: n, loc: i, strip: a } = t; + if ("original" in t.path && t.path.original === "...attributes") throw k("Illegal use of ...attributes", this.source.spanFor(t.loc)); + if (pn(t.path)) s = d.mustache({ + path: this.acceptNode(t.path), + params: [], + hash: d.hash({ + pairs: [], + loc: this.source.spanFor(t.path.loc).collapse("end") + }), + trusting: !n, + loc: this.source.spanFor(i), + strip: a + }); + else { + let { path: o, params: c, hash: h } = rr(this, t); + s = d.mustache({ + path: o, + params: c, + hash: h, + trusting: !n, + loc: this.source.spanFor(i), + strip: a + }); + } + switch (r.state) { + case "tagOpen": + case "tagName": throw k("Cannot use mustaches in an elements tagname", s.loc); + case "beforeAttributeName": + nr(this.currentStartTag, s); + break; + case "attributeName": + case "afterAttributeName": + this.beginAttributeValue(!1), this.finishAttributeValue(), nr(this.currentStartTag, s), r.transitionTo("beforeAttributeName"); + break; + case "afterAttributeValueQuoted": + nr(this.currentStartTag, s), r.transitionTo("beforeAttributeName"); + break; + case "beforeAttributeValue": + this.beginAttributeValue(!1), this.appendDynamicAttributeValuePart(s), r.transitionTo("attributeValueUnquoted"); + break; + case "attributeValueDoubleQuoted": + case "attributeValueSingleQuoted": + case "attributeValueUnquoted": + this.appendDynamicAttributeValuePart(s); + break; + default: At(this.currentElement(), s); + } + return s; + } + appendDynamicAttributeValuePart(t) { + this.finalizeTextPart(); + let r = this.currentAttr; + r.isDynamic = !0, r.parts.push(t); + } + finalizeTextPart() { + let t = this.currentAttr.currentPart; + t !== null && (this.currentAttr.parts.push(t), this.startTextPart()); + } + startTextPart() { + this.currentAttr.currentPart = null; + } + ContentStatement(t) { + (function(r, s) { + let n = s.loc.start.line, i = s.loc.start.column, a = (function(o, c) { + if (c === "") return { + lines: o.split(` +`).length - 1, + columns: 0 + }; + let [h] = o.split(c), f = h.split(/\n/u), p = f.length - 1; + return { + lines: p, + columns: f[p].length + }; + })(s.original, s.value); + n += a.lines, a.lines ? i = a.columns : i += a.columns, r.line = n, r.column = i; + })(this.tokenizer, t), this.tokenizer.tokenizePart(t.value), this.tokenizer.flushData(); + } + CommentStatement(t) { + let { tokenizer: r } = this; + if (r.state === "comment") return this.appendToCommentData(this.sourceForNode(t)), null; + let { value: s, loc: n } = t, i = d.mustacheComment({ + value: s, + loc: this.source.spanFor(n) + }); + switch (r.state) { + case "beforeAttributeName": + case "afterAttributeName": + this.currentStartTag.comments.push(i); + break; + case "beforeData": + case "data": + At(this.currentElement(), i); + break; + default: throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`, this.source.spanFor(t.loc)); + } + return i; + } + PartialStatement(t) { + throw k("Handlebars partials are not supported", this.source.spanFor(t.loc)); + } + PartialBlockStatement(t) { + throw k("Handlebars partial blocks are not supported", this.source.spanFor(t.loc)); + } + Decorator(t) { + throw k("Handlebars decorators are not supported", this.source.spanFor(t.loc)); + } + DecoratorBlock(t) { + throw k("Handlebars decorator blocks are not supported", this.source.spanFor(t.loc)); + } + SubExpression(t) { + let { path: r, params: s, hash: n } = rr(this, t); + return d.sexpr({ + path: r, + params: s, + hash: n, + loc: this.source.spanFor(t.loc) + }); + } + PathExpression(t) { + let { original: r } = t, s; + if (r.indexOf("/") !== -1) { + if (r.slice(0, 2) === "./") throw k("Using \"./\" is not supported in Glimmer and unnecessary", this.source.spanFor(t.loc)); + if (r.slice(0, 3) === "../") throw k("Changing context using \"../\" is not supported in Glimmer", this.source.spanFor(t.loc)); + if (r.indexOf(".") !== -1) throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths", this.source.spanFor(t.loc)); + s = [t.parts.join("/")]; + } else { + if (r === ".") throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'", this.source.spanFor(t.loc)); + s = t.parts; + } + let n, i = !1; + if (/^this(?:\..+)?$/u.test(r) && (i = !0), i) n = d.this({ loc: this.source.spanFor({ + start: t.loc.start, + end: { + line: t.loc.start.line, + column: t.loc.start.column + 4 + } + }) }); + else if (t.data) { + let a = s.shift(); + if (a === void 0) throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.", this.source.spanFor(t.loc)); + n = d.atName({ + name: `@${a}`, + loc: this.source.spanFor({ + start: t.loc.start, + end: { + line: t.loc.start.line, + column: t.loc.start.column + a.length + 1 + } + }) + }); + } else { + let a = s.shift(); + if (a === void 0) throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.", this.source.spanFor(t.loc)); + n = d.var({ + name: a, + loc: this.source.spanFor({ + start: t.loc.start, + end: { + line: t.loc.start.line, + column: t.loc.start.column + a.length + } + }) + }); + } + return d.path({ + head: n, + tail: s, + loc: this.source.spanFor(t.loc) + }); + } + Hash(t) { + let r = t.pairs.map(((s) => d.pair({ + key: s.key, + value: this.acceptNode(s.value), + loc: this.source.spanFor(s.loc) + }))); + return d.hash({ + pairs: r, + loc: this.source.spanFor(t.loc) + }); + } + StringLiteral(t) { + return d.literal({ + type: "StringLiteral", + value: t.value, + loc: this.source.spanFor(t.loc) + }); + } + BooleanLiteral(t) { + return d.literal({ + type: "BooleanLiteral", + value: t.value, + loc: this.source.spanFor(t.loc) + }); + } + NumberLiteral(t) { + return d.literal({ + type: "NumberLiteral", + value: t.value, + loc: this.source.spanFor(t.loc) + }); + } + UndefinedLiteral(t) { + return d.literal({ + type: "UndefinedLiteral", + value: void 0, + loc: this.source.spanFor(t.loc) + }); + } + NullLiteral(t) { + return d.literal({ + type: "NullLiteral", + value: null, + loc: this.source.spanFor(t.loc) + }); + } + constructor(...t) { + super(...t), this.pendingError = null; + } + }; + hr = class extends ur { + reset() { + this.currentNode = null; + } + beginComment() { + this.currentNode = { + type: "CommentStatement", + value: "", + start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) + }; + } + appendToCommentData(t) { + this.currentComment.value += t; + } + finishComment() { + At(this.currentElement(), d.comment(this.finish(this.currentComment))); + } + beginData() { + this.currentNode = { + type: "TextNode", + chars: "", + start: this.offset() + }; + } + appendToData(t) { + this.currentData.chars += t; + } + finishData() { + At(this.currentElement(), d.text(this.finish(this.currentData))); + } + tagOpen() { + this.tagOpenLine = this.tokenizer.line, this.tagOpenColumn = this.tokenizer.column; + } + beginStartTag() { + this.currentNode = { + type: "StartTag", + name: "", + nameStart: null, + nameEnd: null, + attributes: [], + modifiers: [], + comments: [], + params: [], + selfClosing: !1, + start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) + }; + } + beginEndTag() { + this.currentNode = { + type: "EndTag", + name: "", + start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) + }; + } + finishTag() { + let t = this.finish(this.currentTag); + if (t.type === "StartTag") { + if (this.finishStartTag(), t.name === ":") throw k("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter", this.source.spanFor({ + start: this.currentTag.start.toJSON(), + end: this.offset().toJSON() + })); + (de.has(t.name) || t.selfClosing) && this.finishEndTag(!0); + } else t.type, t.type, this.finishEndTag(!1); + } + finishStartTag() { + let { name: t, nameStart: r, nameEnd: s } = this.currentStartTag, n = r.until(s), [i, ...a] = t.split("."), o = d.path({ + head: d.head({ + original: i, + loc: n.sliceStartChars({ chars: i.length }) + }), + tail: a, + loc: n + }), { attributes: c, modifiers: h, comments: f, params: p, selfClosing: g, loc: E } = this.finish(this.currentStartTag), T = d.element({ + path: o, + selfClosing: g, + attributes: c, + modifiers: h, + comments: f, + params: p, + children: [], + openTag: E, + closeTag: g ? null : A.broken(), + loc: E + }); + this.elementStack.push(T); + } + finishEndTag(t) { + let { start: r } = this.currentTag, s = this.finish(this.currentTag), n = this.elementStack.pop(); + this.validateEndTag(s, n, t); + let i = this.currentElement(); + t ? n.closeTag = null : n.selfClosing ? n.closeTag : n.closeTag = r.until(this.offset()), n.loc = n.loc.withEnd(this.offset()), At(i, d.element(n)); + } + markTagAsSelfClosing() { + let t = this.currentTag; + if (t.type !== "StartTag") throw k("Invalid end tag: closing tag must not be self-closing", this.source.spanFor({ + start: t.start.toJSON(), + end: this.offset().toJSON() + })); + t.selfClosing = !0; + } + appendToTagName(t) { + let r = this.currentTag; + if (r.name += t, r.type === "StartTag") { + let s = this.offset(); + r.nameStart === null && (r.nameEnd, r.nameStart = s.move(-1)), r.nameEnd = s; + } + } + beginAttribute() { + let t = this.offset(); + this.currentAttribute = { + name: "", + parts: [], + currentPart: null, + isQuoted: !1, + isDynamic: !1, + start: t, + valueSpan: t.collapsed() + }; + } + appendToAttributeName(t) { + this.currentAttr.name += t, this.currentAttr.name === "as" && this.parsePossibleBlockParams(); + } + beginAttributeValue(t) { + this.currentAttr.isQuoted = t, this.startTextPart(), this.currentAttr.valueSpan = this.offset().collapsed(); + } + appendToAttributeValue(t) { + let r = this.currentAttr.parts, s = r[r.length - 1], n = this.currentAttr.currentPart; + if (n) n.chars += t, n.loc = n.loc.withEnd(this.offset()); + else { + let i = this.offset(); + i = t === ` +` ? s ? s.loc.getEnd() : this.currentAttr.valueSpan.getStart() : i.move(-1), this.currentAttr.currentPart = d.text({ + chars: t, + loc: i.collapsed() + }); + } + } + finishAttributeValue() { + this.finalizeTextPart(); + let t = this.currentTag, r = this.offset(); + if (t.type === "EndTag") throw k("Invalid end tag: closing tag must not have attributes", this.source.spanFor({ + start: t.start.toJSON(), + end: r.toJSON() + })); + let { name: s, parts: n, start: i, isQuoted: a, isDynamic: o, valueSpan: c } = this.currentAttr; + if (s.startsWith("|") && n.length === 0 && !a && !o) throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword", i.until(i.move(s.length))); + let h = this.assembleAttributeValue(n, a, o, i.until(r)); + h.loc = c.withEnd(r); + let f = d.attr({ + name: s, + value: h, + loc: i.until(r) + }); + this.currentStartTag.attributes.push(f); + } + parsePossibleBlockParams() { + let t = /[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u; + this.tokenizer.state; + let r = this.currentStartTag, s = this.currentAttr, n = { state: "PossibleAs" }, i = { + PossibleAs: (o) => { + if (n.state, Nt(o)) n = { state: "BeforeStartPipe" }, this.tokenizer.transitionTo("afterAttributeName"), this.tokenizer.consume(); + else { + if (o === "|") throw k("Invalid block parameters syntax: expecting at least one space character between \"as\" and \"|\"", s.start.until(this.offset().move(1))); + n = { state: "Done" }; + } + }, + BeforeStartPipe: (o) => { + n.state, Nt(o) ? this.tokenizer.consume() : o === "|" ? (n = { state: "BeforeBlockParamName" }, this.tokenizer.transitionTo("beforeAttributeName"), this.tokenizer.consume()) : n = { state: "Done" }; + }, + BeforeBlockParamName: (o) => { + if (n.state, Nt(o)) this.tokenizer.consume(); + else if (o === "") n = { state: "Done" }, this.pendingError = { + mustache(c) { + throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list", c); + }, + eof(c) { + throw k("Invalid block parameters syntax: expecting the tag to be closed with \">\" or \"/>\" after parameters list", s.start.until(c)); + } + }; + else if (o === "|") { + if (r.params.length === 0) throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier", s.start.until(this.offset().move(1))); + n = { state: "AfterEndPipe" }, this.tokenizer.consume(); + } else { + if (o === ">" || o === "/") throw k("Invalid block parameters syntax: incomplete parameters list, expecting \"|\" but the tag was closed prematurely", s.start.until(this.offset().move(1))); + n = { + state: "BlockParamName", + name: o, + start: this.offset() + }, this.tokenizer.consume(); + } + }, + BlockParamName: (o) => { + if (n.state, o === "") n = { state: "Done" }, this.pendingError = { + mustache(c) { + throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list", c); + }, + eof(c) { + throw k("Invalid block parameters syntax: expecting the tag to be closed with \">\" or \"/>\" after parameters list", s.start.until(c)); + } + }; + else if (o === "|" || Nt(o)) { + let c = n.start.until(this.offset()); + if (n.name === "this" || t.test(n.name)) throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``, c); + r.params.push(d.var({ + name: n.name, + loc: c + })), n = o === "|" ? { state: "AfterEndPipe" } : { state: "BeforeBlockParamName" }, this.tokenizer.consume(); + } else { + if (o === ">" || o === "/") throw k("Invalid block parameters syntax: expecting \"|\" but the tag was closed prematurely", s.start.until(this.offset().move(1))); + n.name += o, this.tokenizer.consume(); + } + }, + AfterEndPipe: (o) => { + n.state, Nt(o) ? this.tokenizer.consume() : o === "" ? (n = { state: "Done" }, this.pendingError = { + mustache(c) { + throw k("Invalid block parameters syntax: modifiers cannot follow parameters list", c); + }, + eof(c) { + throw k("Invalid block parameters syntax: expecting the tag to be closed with \">\" or \"/>\" after parameters list", s.start.until(c)); + } + }) : o === ">" || o === "/" ? n = { state: "Done" } : (n = { + state: "Error", + message: "Invalid block parameters syntax: expecting the tag to be closed with \">\" or \"/>\" after parameters list", + start: this.offset() + }, this.tokenizer.consume()); + }, + Error: (o) => { + if (n.state, o === "" || o === "/" || o === ">" || Nt(o)) throw k(n.message, n.start.until(this.offset())); + this.tokenizer.consume(); + }, + Done: () => {} + }, a; + do + a = this.tokenizer.peek(), i[n.state](a); + while (n.state !== "Done" && a !== ""); + n.state; + } + reportSyntaxError(t) { + throw k(t, this.offset().collapsed()); + } + assembleConcatenatedValue(t) { + let r = Is(t), s = fr(t); + return d.concat({ + parts: t, + loc: this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc)) + }); + } + validateEndTag(t, r, s) { + if (de.has(t.name) && !s) throw k(`<${t.name}> elements do not need end tags. You should remove it`, t.loc); + if (r.type !== "ElementNode") throw k(`Closing tag without an open tag`, t.loc); + if (r.tag !== t.name) throw k(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`, t.loc); + } + assembleAttributeValue(t, r, s, n) { + if (s) { + if (r) return this.assembleConcatenatedValue(t); + { + let [i, a] = t; + if (a === void 0 || a.type === "TextNode" && a.chars === "/") return i; + throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'", n); + } + } + return Yt(t) ? t[0] : d.text({ + chars: "", + loc: n + }); + } + constructor(...t) { + super(...t), this.tagOpenLine = 0, this.tagOpenColumn = 0; + } + }, Ms = {}, pr = class extends $e { + constructor() { + super({}); + } + parse() {} + }; + dn = Ur(be); + mt = (e) => e.loc.start.offset, Gt = (e) => e.loc.end.offset; + Gs = new Set(on()); + xn = 2; + ri = ({ path: e }, { path: t }) => [e, t].every((r) => r.type === "PathExpression" && r.head.type === "VarHead") && e.head.name === t.head.name; + hi = /* @__PURE__ */ new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"), pi = /* @__PURE__ */ new Set([ + "true", + "false", + "null", + "undefined" + ]), fi = (e, t) => t === 0 && e.startsWith("@") ? !1 : t !== 0 && pi.has(e) || /\s/u.test(e) || /^\d/u.test(e) || Array.prototype.some.call(e, (r) => hi.has(r)); + _n = { + features: { experimental_frontMatterSupport: { + massageAstNode: !0, + embed: !0, + print: !0 + } }, + print: js, + massageAstNode: Fr, + hasPrettierIgnore: yn, + getVisitorKeys: dn, + embed: Hr + }; + Ln = [{ + name: "Handlebars", + type: "markup", + aceMode: "handlebars", + extensions: [".handlebars", ".hbs"], + tmScope: "text.html.handlebars", + aliases: ["hbs", "htmlbars"], + parsers: ["glimmer"], + vscodeLanguageIds: ["handlebars"], + linguistLanguageId: 155 + }]; + yr = {}; + Oe(yr, { glimmer: () => Ni }); + Dn = gi; + On = Symbol.for("PRETTIER_IS_FRONT_MATTER"); + Wt = 3; + In = yi; + ki = (e) => { + let { start: t, end: r } = e.loc; + t.offset = e.loc.getStart().offset, r.offset = e.loc.getEnd().offset; + }, Ei = () => ({ + name: "glimmerPrettierParsePlugin", + visitor: { All(e) { + ki(e), Si(e); + } } + }), vi = { + mode: "codemod", + plugins: { ast: [Ei] } + }; + Ni = { + parse: wi, + astFormat: "glimmer", + locStart: mt, + locEnd: Gt + }; + Ai = { glimmer: _n }; +}))(); +export { Bn as default, Ln as languages, yr as parsers, Ai as printers }; diff --git a/.github/actions/check-public-api/dist/graphql-DMUfcyR9.js b/.github/actions/check-public-api/dist/graphql-DMUfcyR9.js new file mode 100644 index 0000000000..332841b7f3 --- /dev/null +++ b/.github/actions/check-public-api/dist/graphql-DMUfcyR9.js @@ -0,0 +1,1944 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/graphql.mjs +function x(e) { + return S(e), { + type: Ee, + contents: e + }; +} +function y(e, t = {}) { + return S(e), Y(t.expandedStates, !0), { + type: Te, + id: t.id, + contents: e, + break: !!t.shouldBreak, + expandedStates: t.expandedStates + }; +} +function I(e, t = "", n = {}) { + return S(e), t !== "" && S(t), { + type: Ne, + breakContents: e, + flatContents: t, + groupId: n.groupId + }; +} +function E(e, t) { + S(e), Y(t); + let n = []; + for (let i = 0; i < t.length; i++) i !== 0 && n.push(e), n.push(t[i]); + return n; +} +function j(e) { + return (t, n, i) => { + let r = !!i?.backwards; + if (n === !1) return !1; + let { length: s } = t, a = n; + for (; a >= 0 && a < s;) { + let u = t.charAt(a); + if (e instanceof RegExp) { + if (!e.test(u)) return a; + } else if (!e.includes(u)) return a; + r ? a-- : a++; + } + return a === -1 || a === s ? a : !1; + }; +} +function mt(e, t, n) { + let i = !!n?.backwards; + if (t === !1) return !1; + let r = e.charAt(t); + if (i) { + if (e.charAt(t - 1) === "\r" && r === ` +`) return t - 2; + if (Oe(r)) return t - 1; + } else { + if (r === "\r" && e.charAt(t + 1) === ` +`) return t + 2; + if (Oe(r)) return t + 1; + } + return t; +} +function Et(e, t, n = {}) { + let i = $(e, n.backwards ? t - 1 : t, n); + return i !== X(e, i, n); +} +function Tt(e, t) { + if (t === !1) return !1; + if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") { + for (let n = t + 2; n < e.length; ++n) if (e.charAt(n) === "*" && e.charAt(n + 1) === "/") return n + 2; + } + return t; +} +function Nt(e, t) { + return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Ae(e, t) : t; +} +function xt(e, t) { + let n = null, i = t; + for (; i !== n;) n = i, i = ye(e, i), i = De(e, i), i = $(e, i); + return i = ge(e, i), i = X(e, i), i !== !1 && Ie(e, i); +} +function _t(e) { + return Array.isArray(e) && e.length > 0; +} +function w(e) { + if (P !== null && typeof P.property) { + let t = P; + return P = w.prototype = null, t; + } + return P = w.prototype = e ?? Object.create(null), new w(); +} +function ae(e) { + return w(e); +} +function At(e, t = "type") { + ae(e); + function n(i) { + let r = i[t], s = e[r]; + if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${r}'.`), { node: i }); + return s; + } + return n; +} +function It(e, t, n) { + let { node: i } = e; + if (!i.description) return ""; + let r = [n("description")]; + return i.kind === "InputValueDefinition" && !i.description.block ? r.push(k) : r.push(f), r; +} +function Dt(e, t, n) { + let { node: i } = e; + switch (i.kind) { + case "Document": return [...E(f, g(e, t, n, "definitions")), f]; + case "OperationDefinition": { + let r = t.originalText[J(i)] !== "{", s = !!i.name; + return [ + A(e, t, n), + r ? i.operation : "", + r && s ? [" ", n("name")] : "", + r && !s && se(i.variableDefinitions) ? " " : "", + Be(e, n), + _(e, n, i), + !r && !s ? "" : " ", + n("selectionSet") + ]; + } + case "FragmentDefinition": return [ + A(e, t, n), + "fragment ", + n("name"), + Be(e, n), + " on ", + n("typeCondition"), + _(e, n, i), + " ", + n("selectionSet") + ]; + case "SelectionSet": return [ + "{", + x([f, E(f, g(e, t, n, "selections"))]), + f, + "}" + ]; + case "Field": return y([ + i.alias ? [n("alias"), ": "] : "", + n("name"), + i.arguments.length > 0 ? y([ + "(", + x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]), + l, + ")" + ]) : "", + _(e, n, i), + i.selectionSet ? " " : "", + n("selectionSet") + ]); + case "Name": return i.value; + case "StringValue": + if (i.block) { + let r = U(0, i.value, "\"\"\"", "\\\"\"\"").split(` +`); + return r.length === 1 && (r[0] = r[0].trim()), r.every((s) => s === "") && (r.length = 0), E(f, [ + "\"\"\"", + ...r, + "\"\"\"" + ]); + } + return [ + "\"", + U(0, U(0, i.value, /["\\]/gu, "\\$&"), ` +`, "\\n"), + "\"" + ]; + case "IntValue": + case "FloatValue": + case "EnumValue": return i.value; + case "BooleanValue": return i.value ? "true" : "false"; + case "NullValue": return "null"; + case "Variable": return ["$", n("name")]; + case "ListValue": return y([ + "[", + x([l, E([I("", ", "), l], e.map(n, "values"))]), + l, + "]" + ]); + case "ObjectValue": { + let r = t.bracketSpacing && i.fields.length > 0 ? " " : ""; + return y([ + "{", + r, + x([l, E([I("", ", "), l], e.map(n, "fields"))]), + l, + I("", r), + "}" + ]); + } + case "ObjectField": + case "Argument": return [ + n("name"), + ": ", + n("value") + ]; + case "Directive": return [ + "@", + n("name"), + i.arguments.length > 0 ? y([ + "(", + x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]), + l, + ")" + ]) : "" + ]; + case "NamedType": return n("name"); + case "VariableDefinition": return [ + A(e, t, n), + n("variable"), + ": ", + n("type"), + i.defaultValue ? [" = ", n("defaultValue")] : "", + _(e, n, i) + ]; + case "ObjectTypeExtension": + case "ObjectTypeDefinition": + case "InputObjectTypeExtension": + case "InputObjectTypeDefinition": + case "InterfaceTypeExtension": + case "InterfaceTypeDefinition": { + let { kind: r } = i, s = []; + return r.endsWith("TypeDefinition") ? s.push(A(e, t, n)) : s.push("extend "), r.startsWith("ObjectType") ? s.push("type") : r.startsWith("InputObjectType") ? s.push("input") : s.push("interface"), s.push(" ", n("name")), !r.startsWith("InputObjectType") && i.interfaces.length > 0 && s.push(" implements ", ...kt(e, t, n)), s.push(_(e, n, i)), i.fields.length > 0 && s.push([ + " {", + x([f, E(f, g(e, t, n, "fields"))]), + f, + "}" + ]), s; + } + case "FieldDefinition": return [ + A(e, t, n), + n("name"), + i.arguments.length > 0 ? y([ + "(", + x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]), + l, + ")" + ]) : "", + ": ", + n("type"), + _(e, n, i) + ]; + case "DirectiveDefinition": return [ + A(e, t, n), + "directive ", + "@", + n("name"), + i.arguments.length > 0 ? y([ + "(", + x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]), + l, + ")" + ]) : "", + i.repeatable ? " repeatable" : "", + " on ", + ...E(" | ", e.map(n, "locations")) + ]; + case "EnumTypeExtension": + case "EnumTypeDefinition": return [ + A(e, t, n), + i.kind === "EnumTypeExtension" ? "extend " : "", + "enum ", + n("name"), + _(e, n, i), + i.values.length > 0 ? [ + " {", + x([f, E(f, g(e, t, n, "values"))]), + f, + "}" + ] : "" + ]; + case "EnumValueDefinition": return [ + A(e, t, n), + n("name"), + _(e, n, i) + ]; + case "InputValueDefinition": return [ + A(e, t, n), + n("name"), + ": ", + n("type"), + i.defaultValue ? [" = ", n("defaultValue")] : "", + _(e, n, i) + ]; + case "SchemaExtension": return [ + "extend schema", + _(e, n, i), + ...i.operationTypes.length > 0 ? [ + " {", + x([f, E(f, g(e, t, n, "operationTypes"))]), + f, + "}" + ] : [] + ]; + case "SchemaDefinition": return [ + A(e, t, n), + "schema", + _(e, n, i), + " {", + i.operationTypes.length > 0 ? x([f, E(f, g(e, t, n, "operationTypes"))]) : "", + f, + "}" + ]; + case "OperationTypeDefinition": return [ + i.operation, + ": ", + n("type") + ]; + case "FragmentSpread": return [ + "...", + n("name"), + _(e, n, i) + ]; + case "InlineFragment": return [ + "...", + i.typeCondition ? [" on ", n("typeCondition")] : "", + _(e, n, i), + " ", + n("selectionSet") + ]; + case "UnionTypeExtension": + case "UnionTypeDefinition": return y([A(e, t, n), y([ + i.kind === "UnionTypeExtension" ? "extend " : "", + "union ", + n("name"), + _(e, n, i), + i.types.length > 0 ? [ + " =", + I("", " "), + x([I([k, "| "]), E([k, "| "], e.map(n, "types"))]) + ] : "" + ])]); + case "ScalarTypeExtension": + case "ScalarTypeDefinition": return [ + A(e, t, n), + i.kind === "ScalarTypeExtension" ? "extend " : "", + "scalar ", + n("name"), + _(e, n, i) + ]; + case "NonNullType": return [n("type"), "!"]; + case "ListType": return [ + "[", + n("type"), + "]" + ]; + default: throw new ke(i, "Graphql", "kind"); + } +} +function _(e, t, n) { + if (n.directives.length === 0) return ""; + let i = E(k, e.map(t, "directives")); + return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(x([l, i]))]; +} +function g(e, t, n, i) { + return e.map(({ isLast: r, node: s }) => { + let a = n(); + return !r && Se(t.originalText, q(s)) ? [a, f] : a; + }, i); +} +function gt(e) { + return e.kind !== "Comment"; +} +function St({ node: e }) { + if (e.kind === "Comment") return "#" + e.value.trimEnd(); + throw new Error("Not a comment: " + JSON.stringify(e)); +} +function kt(e, t, n) { + let { node: i } = e, r = [], { interfaces: s } = i, a = e.map(n, "interfaces"); + for (let u = 0; u < s.length; u++) { + let p = s[u]; + r.push(a[u]); + let T = s[u + 1]; + if (T) { + let D = t.originalText.slice(p.loc.end, T.loc.start).includes("#"); + r.push(" &", D ? k : " "); + } + } + return r; +} +function Be(e, t) { + let { node: n } = e; + return se(n.variableDefinitions) ? y([ + "(", + x([l, E([I("", ", "), l], e.map(t, "variableDefinitions"))]), + l, + ")" + ]) : ""; +} +function Ue(e, t) { + e.kind === "StringValue" && e.block && !e.value.includes(` +`) && (t.value = e.value.trim()); +} +function Ct(e) { + let { node: t } = e; + return t?.comments?.some((n) => n.value.trim() === "prettier-ignore"); +} +function Xe(e) { + return typeof e == "object" && e !== null; +} +function He(e, t) { + if (!!!e) throw new Error(t ?? "Unexpected invariant triggered."); +} +function M(e, t) { + let n = 0, i = 1; + for (let r of e.body.matchAll(bt)) { + if (typeof r.index == "number" || He(!1), r.index >= t) break; + n = r.index + r[0].length, i += 1; + } + return { + line: i, + column: t + 1 - n + }; +} +function qe(e) { + return ue(e.source, M(e.source, e.start)); +} +function ue(e, t) { + let n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, T = `${e.name}:${a}:${p} +`, d = i.split(/\r\n|[\n\r]/g), D = d[r]; + if (D.length > 120) { + let O = Math.floor(p / 80), re = p % 80, N = []; + for (let v = 0; v < D.length; v += 80) N.push(D.slice(v, v + 80)); + return T + Je([ + [`${a} |`, N[0]], + ...N.slice(1, O + 1).map((v) => ["|", v]), + ["|", "^".padStart(re)], + ["|", N[O + 1]] + ]); + } + return T + Je([ + [`${a - 1} |`, d[r - 1]], + [`${a} |`, D], + ["|", "^".padStart(p)], + [`${a + 1} |`, d[r + 1]] + ]); +} +function Je(e) { + let t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length)); + return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(` +`); +} +function Lt(e) { + let t = e[0]; + return t == null || "kind" in t || "length" in t ? { + nodes: t, + source: e[1], + positions: e[2], + path: e[3], + originalError: e[4], + extensions: e[5] + } : t; +} +function Qe(e) { + return e === void 0 || e.length === 0 ? void 0 : e; +} +function h(e, t, n) { + return new Q(`Syntax Error: ${n}`, { + source: e, + positions: [t] + }); +} +function We(e) { + return e === 9 || e === 32; +} +function b(e) { + return e >= 48 && e <= 57; +} +function ze(e) { + return e >= 97 && e <= 122 || e >= 65 && e <= 90; +} +function pe(e) { + return ze(e) || e === 95; +} +function Ke(e) { + return ze(e) || b(e) || e === 95; +} +function Ze(e) { + var t; + let n = Number.MAX_SAFE_INTEGER, i = null, r = -1; + for (let a = 0; a < e.length; ++a) { + var s; + let u = e[a], p = Pt(u); + p !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p)); + } + return e.map((a, u) => u === 0 ? a : a.slice(n)).slice((t = i) !== null && t !== void 0 ? t : 0, r + 1); +} +function Pt(e) { + let t = 0; + for (; t < e.length && We(e.charCodeAt(t));) ++t; + return t; +} +function tt(e) { + return e === o.BANG || e === o.DOLLAR || e === o.AMP || e === o.PAREN_L || e === o.PAREN_R || e === o.DOT || e === o.SPREAD || e === o.COLON || e === o.EQUALS || e === o.AT || e === o.BRACKET_L || e === o.BRACKET_R || e === o.BRACE_L || e === o.PIPE || e === o.BRACE_R; +} +function L(e) { + return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111; +} +function K(e, t) { + return nt(e.charCodeAt(t)) && rt(e.charCodeAt(t + 1)); +} +function nt(e) { + return e >= 55296 && e <= 56319; +} +function rt(e) { + return e >= 56320 && e <= 57343; +} +function R(e, t) { + let n = e.source.body.codePointAt(t); + if (n === void 0) return o.EOF; + if (n >= 32 && n <= 126) { + let i = String.fromCodePoint(n); + return i === "\"" ? `'"'` : `"${i}"`; + } + return "U+" + n.toString(16).toUpperCase().padStart(4, "0"); +} +function m(e, t, n, i, r) { + let s = e.line; + return new F(t, n, i, s, 1 + n - e.lineStart, r); +} +function wt(e, t) { + let n = e.source.body, i = n.length, r = t; + for (; r < i;) { + let s = n.charCodeAt(r); + switch (s) { + case 65279: + case 9: + case 32: + case 44: + ++r; + continue; + case 10: + ++r, ++e.line, e.lineStart = r; + continue; + case 13: + n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r; + continue; + case 35: return Ft(e, r); + case 33: return m(e, o.BANG, r, r + 1); + case 36: return m(e, o.DOLLAR, r, r + 1); + case 38: return m(e, o.AMP, r, r + 1); + case 40: return m(e, o.PAREN_L, r, r + 1); + case 41: return m(e, o.PAREN_R, r, r + 1); + case 46: + if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46) return m(e, o.SPREAD, r, r + 3); + break; + case 58: return m(e, o.COLON, r, r + 1); + case 61: return m(e, o.EQUALS, r, r + 1); + case 64: return m(e, o.AT, r, r + 1); + case 91: return m(e, o.BRACKET_L, r, r + 1); + case 93: return m(e, o.BRACKET_R, r, r + 1); + case 123: return m(e, o.BRACE_L, r, r + 1); + case 124: return m(e, o.PIPE, r, r + 1); + case 125: return m(e, o.BRACE_R, r, r + 1); + case 34: return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Yt(e, r) : Vt(e, r); + } + if (b(s) || s === 45) return Mt(e, r, s); + if (pe(s)) return jt(e, r); + throw h(e.source, r, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : L(s) || K(n, r) ? `Unexpected character: ${R(e, r)}.` : `Invalid character: ${R(e, r)}.`); + } + return m(e, o.EOF, i, i); +} +function Ft(e, t) { + let n = e.source.body, i = n.length, r = t + 1; + for (; r < i;) { + let s = n.charCodeAt(r); + if (s === 10 || s === 13) break; + if (L(s)) ++r; + else if (K(n, r)) r += 2; + else break; + } + return m(e, o.COMMENT, t, r, n.slice(t + 1, r)); +} +function Mt(e, t, n) { + let i = e.source.body, r = t, s = n, a = !1; + if (s === 45 && (s = i.charCodeAt(++r)), s === 48) { + if (s = i.charCodeAt(++r), b(s)) throw h(e.source, r, `Invalid number, unexpected digit after 0: ${R(e, r)}.`); + } else r = le(e, r, s), s = i.charCodeAt(r); + if (s === 46 && (a = !0, s = i.charCodeAt(++r), r = le(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (a = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = le(e, r, s), s = i.charCodeAt(r)), s === 46 || pe(s)) throw h(e.source, r, `Invalid number, expected digit but got: ${R(e, r)}.`); + return m(e, a ? o.FLOAT : o.INT, t, r, i.slice(t, r)); +} +function le(e, t, n) { + if (!b(n)) throw h(e.source, t, `Invalid number, expected digit but got: ${R(e, t)}.`); + let i = e.source.body, r = t + 1; + for (; b(i.charCodeAt(r));) ++r; + return r; +} +function Vt(e, t) { + let n = e.source.body, i = n.length, r = t + 1, s = r, a = ""; + for (; r < i;) { + let u = n.charCodeAt(r); + if (u === 34) return a += n.slice(s, r), m(e, o.STRING, t, r + 1, a); + if (u === 92) { + a += n.slice(s, r); + let p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Bt(e, r) : Ut(e, r) : Gt(e, r); + a += p.value, r += p.size, s = r; + continue; + } + if (u === 10 || u === 13) break; + if (L(u)) ++r; + else if (K(n, r)) r += 2; + else throw h(e.source, r, `Invalid character within String: ${R(e, r)}.`); + } + throw h(e.source, r, "Unterminated string."); +} +function Bt(e, t) { + let n = e.source.body, i = 0, r = 3; + for (; r < 12;) { + let s = n.charCodeAt(t + r++); + if (s === 125) { + if (r < 5 || !L(i)) break; + return { + value: String.fromCodePoint(i), + size: r + }; + } + if (i = i << 4 | V(s), i < 0) break; + } + throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + r)}".`); +} +function Ut(e, t) { + let n = e.source.body, i = et(n, t + 2); + if (L(i)) return { + value: String.fromCodePoint(i), + size: 6 + }; + if (nt(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) { + let r = et(n, t + 8); + if (rt(r)) return { + value: String.fromCodePoint(i, r), + size: 12 + }; + } + throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`); +} +function et(e, t) { + return V(e.charCodeAt(t)) << 12 | V(e.charCodeAt(t + 1)) << 8 | V(e.charCodeAt(t + 2)) << 4 | V(e.charCodeAt(t + 3)); +} +function V(e) { + return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1; +} +function Gt(e, t) { + let n = e.source.body; + switch (n.charCodeAt(t + 1)) { + case 34: return { + value: "\"", + size: 2 + }; + case 92: return { + value: "\\", + size: 2 + }; + case 47: return { + value: "/", + size: 2 + }; + case 98: return { + value: "\b", + size: 2 + }; + case 102: return { + value: "\f", + size: 2 + }; + case 110: return { + value: ` +`, + size: 2 + }; + case 114: return { + value: "\r", + size: 2 + }; + case 116: return { + value: " ", + size: 2 + }; + } + throw h(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`); +} +function Yt(e, t) { + let n = e.source.body, i = n.length, r = e.lineStart, s = t + 3, a = s, u = "", p = []; + for (; s < i;) { + let T = n.charCodeAt(s); + if (T === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) { + u += n.slice(a, s), p.push(u); + let d = m(e, o.BLOCK_STRING, t, s + 3, Ze(p).join(` +`)); + return e.line += p.length - 1, e.lineStart = r, d; + } + if (T === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) { + u += n.slice(a, s), a = s + 1, s += 4; + continue; + } + if (T === 10 || T === 13) { + u += n.slice(a, s), p.push(u), T === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, r = s; + continue; + } + if (L(T)) ++s; + else if (K(n, s)) s += 2; + else throw h(e.source, s, `Invalid character within String: ${R(e, s)}.`); + } + throw h(e.source, s, "Unterminated string."); +} +function jt(e, t) { + let n = e.source.body, i = n.length, r = t + 1; + for (; r < i;) if (Ke(n.charCodeAt(r))) ++r; + else break; + return m(e, o.NAME, t, r, n.slice(t, r)); +} +function Z(e, t) { + if (!!!e) throw new Error(t); +} +function ee(e) { + return te(e, []); +} +function te(e, t) { + switch (typeof e) { + case "string": return JSON.stringify(e); + case "function": return e.name ? `[function ${e.name}]` : "[function]"; + case "object": return $t(e, t); + default: return String(e); + } +} +function $t(e, t) { + if (e === null) return "null"; + if (t.includes(e)) return "[Circular]"; + let n = [...t, e]; + if (Xt(e)) { + let i = e.toJSON(); + if (i !== e) return typeof i == "string" ? i : te(i, n); + } else if (Array.isArray(e)) return Jt(e, n); + return Ht(e, n); +} +function Xt(e) { + return typeof e.toJSON == "function"; +} +function Ht(e, t) { + let n = Object.entries(e); + return n.length === 0 ? "{}" : t.length > 2 ? "[" + qt(e) + "]" : "{ " + n.map(([r, s]) => r + ": " + te(s, t)).join(", ") + " }"; +} +function Jt(e, t) { + if (e.length === 0) return "[]"; + if (t.length > 2) return "[Array]"; + let n = Math.min(10, e.length), i = e.length - n, r = []; + for (let s = 0; s < n; ++s) r.push(te(e[s], t)); + return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]"; +} +function qt(e) { + let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, ""); + if (t === "Object" && typeof e.constructor == "function") { + let n = e.constructor.name; + if (typeof n == "string" && n !== "") return n; + } + return t; +} +function st(e) { + return it(e, B); +} +function ot(e, t) { + let n = new fe(e, t), i = n.parseDocument(); + return Object.defineProperty(i, "tokenCount", { + enumerable: !1, + value: n.tokenCount + }), i; +} +function ne(e) { + let t = e.value; + return at(e.kind) + (t != null ? ` "${t}"` : ""); +} +function at(e) { + return tt(e) ? `"${e}"` : e; +} +function Wt(e, t) { + let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(n, t); +} +function zt(e) { + let t = [], { startToken: n, endToken: i } = e.loc; + for (let r = n; r !== i; r = r.next) r.kind === "Comment" && t.push({ + ...r, + loc: { + start: r.start, + end: r.end + } + }); + return t; +} +function Zt(e) { + if (e?.name === "GraphQLError") { + let { message: t, locations: [n] } = e; + return ct(t, { + loc: { start: n }, + cause: e + }); + } + return e; +} +function en(e) { + let t; + try { + t = ot(e, Kt); + } catch (n) { + throw Zt(n); + } + return t.comments = zt(t), t; +} +var pt, de, ut, me, lt, U, ht, ie, Ee, Te, Ne, G, xe, S, Y, _e, k, l, f, $, ye, Ae, Oe, X, Ie, De, ge, Se, se, oe, ke, P, yt, Ce, H, F, ce, C, Re, be, J, q, Le, Pe, we, Fe, Me, Ve, A, Ge, Ye, $e, he, bt, Q, W, c, o, z, it, B, fe, ct, Kt, tn, nn; +//#endregion +__esmMin((() => { + pt = Object.defineProperty; + de = (e, t) => { + for (var n in t) pt(e, n, { + get: t[n], + enumerable: !0 + }); + }; + ut = {}; + de(ut, { + languages: () => Ye, + options: () => $e, + parsers: () => he, + printers: () => nn + }); + me = (e, t) => (n, i, ...r) => n | 1 && i == null ? void 0 : (t.call(i) ?? i[e]).apply(i, r); + lt = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, U = me("replaceAll", function() { + if (typeof this == "string") return lt; + }); + ht = () => {}, ie = ht; + Ee = "indent"; + Te = "group"; + Ne = "if-break"; + G = "line"; + xe = "break-parent"; + S = ie, Y = ie; + _e = { type: xe }; + k = { type: G }, l = { + type: G, + soft: !0 + }, f = [{ + type: G, + hard: !0 + }, _e]; + $ = j(" "), ye = j(",; "), Ae = j(/[^\n\r]/u); + Oe = (e) => e === ` +` || e === "\r" || e === "\u2028" || e === "\u2029"; + X = mt; + Ie = Et; + De = Tt; + ge = Nt; + Se = xt; + se = _t; + oe = class extends Error { + name = "UnexpectedNodeError"; + constructor(t, n, i = "type") { + super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`), this.node = t; + } + }, ke = oe; + P = null; + yt = 10; + for (let e = 0; e <= yt; e++) w(); + Ce = At, H = class { + constructor(t, n, i) { + this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i; + } + get [Symbol.toStringTag]() { + return "Location"; + } + toJSON() { + return { + start: this.start, + end: this.end + }; + } + }, F = class { + constructor(t, n, i, r, s, a) { + this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null; + } + get [Symbol.toStringTag]() { + return "Token"; + } + toJSON() { + return { + kind: this.kind, + value: this.value, + line: this.line, + column: this.column + }; + } + }, ce = { + Name: [], + Document: ["definitions"], + OperationDefinition: [ + "description", + "name", + "variableDefinitions", + "directives", + "selectionSet" + ], + VariableDefinition: [ + "description", + "variable", + "type", + "defaultValue", + "directives" + ], + Variable: ["name"], + SelectionSet: ["selections"], + Field: [ + "alias", + "name", + "arguments", + "directives", + "selectionSet" + ], + Argument: ["name", "value"], + FragmentSpread: ["name", "directives"], + InlineFragment: [ + "typeCondition", + "directives", + "selectionSet" + ], + FragmentDefinition: [ + "description", + "name", + "variableDefinitions", + "typeCondition", + "directives", + "selectionSet" + ], + IntValue: [], + FloatValue: [], + StringValue: [], + BooleanValue: [], + NullValue: [], + EnumValue: [], + ListValue: ["values"], + ObjectValue: ["fields"], + ObjectField: ["name", "value"], + Directive: ["name", "arguments"], + NamedType: ["name"], + ListType: ["type"], + NonNullType: ["type"], + SchemaDefinition: [ + "description", + "directives", + "operationTypes" + ], + OperationTypeDefinition: ["type"], + ScalarTypeDefinition: [ + "description", + "name", + "directives" + ], + ObjectTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + FieldDefinition: [ + "description", + "name", + "arguments", + "type", + "directives" + ], + InputValueDefinition: [ + "description", + "name", + "type", + "defaultValue", + "directives" + ], + InterfaceTypeDefinition: [ + "description", + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeDefinition: [ + "description", + "name", + "directives", + "types" + ], + EnumTypeDefinition: [ + "description", + "name", + "directives", + "values" + ], + EnumValueDefinition: [ + "description", + "name", + "directives" + ], + InputObjectTypeDefinition: [ + "description", + "name", + "directives", + "fields" + ], + DirectiveDefinition: [ + "description", + "name", + "arguments", + "locations" + ], + SchemaExtension: ["directives", "operationTypes"], + ScalarTypeExtension: ["name", "directives"], + ObjectTypeExtension: [ + "name", + "interfaces", + "directives", + "fields" + ], + InterfaceTypeExtension: [ + "name", + "interfaces", + "directives", + "fields" + ], + UnionTypeExtension: [ + "name", + "directives", + "types" + ], + EnumTypeExtension: [ + "name", + "directives", + "values" + ], + InputObjectTypeExtension: [ + "name", + "directives", + "fields" + ], + TypeCoordinate: ["name"], + MemberCoordinate: ["name", "memberName"], + ArgumentCoordinate: [ + "name", + "fieldName", + "argumentName" + ], + DirectiveCoordinate: ["name"], + DirectiveArgumentCoordinate: ["name", "argumentName"] + }; + new Set(Object.keys(ce)); + (function(e) { + e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription"; + })(C || (C = {})); + Re = { ...ce }; + for (let e of [ + "ArgumentCoordinate", + "DirectiveArgumentCoordinate", + "DirectiveCoordinate", + "MemberCoordinate", + "TypeCoordinate" + ]) delete Re[e]; + be = Ce(Re, "kind"); + J = (e) => e.loc.start, q = (e) => e.loc.end; + Le = "format", Pe = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, we = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u; + Fe = (e) => we.test(e), Me = (e) => Pe.test(e), Ve = (e) => `# @${Le} + +${e}`; + A = It; + Ue.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]); + Ge = { + print: Dt, + massageAstNode: Ue, + hasPrettierIgnore: Ct, + insertPragma: Ve, + printComment: St, + canAttachComment: gt, + getVisitorKeys: be + }; + Ye = [{ + name: "GraphQL", + type: "data", + aceMode: "graphqlschema", + extensions: [ + ".graphql", + ".gql", + ".graphqls" + ], + tmScope: "source.graphql", + parsers: ["graphql"], + vscodeLanguageIds: ["graphql"], + linguistLanguageId: 139 + }]; + $e = { bracketSpacing: { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }.bracketSpacing }; + he = {}; + de(he, { graphql: () => tn }); + bt = /\r\n|[\n\r]/g; + Q = class e extends Error { + constructor(t, ...n) { + var i, r, s; + let { nodes: a, source: u, positions: p, path: T, originalError: d, extensions: D } = Lt(n); + super(t), this.name = "GraphQLError", this.path = T ?? void 0, this.originalError = d ?? void 0, this.nodes = Qe(Array.isArray(a) ? a : a ? [a] : void 0); + let O = Qe((i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null)); + this.source = u ?? (O == null || (r = O[0]) === null || r === void 0 ? void 0 : r.source), this.positions = p ?? O?.map((N) => N.start), this.locations = p && u ? p.map((N) => M(u, N)) : O?.map((N) => M(N.source, N.start)); + let re = Xe(d?.extensions) ? d?.extensions : void 0; + this.extensions = (s = D ?? re) !== null && s !== void 0 ? s : Object.create(null), Object.defineProperties(this, { + message: { + writable: !0, + enumerable: !0 + }, + name: { enumerable: !1 }, + nodes: { enumerable: !1 }, + source: { enumerable: !1 }, + positions: { enumerable: !1 }, + originalError: { enumerable: !1 } + }), d != null && d.stack ? Object.defineProperty(this, "stack", { + value: d.stack, + writable: !0, + configurable: !0 + }) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", { + value: Error().stack, + writable: !0, + configurable: !0 + }); + } + get [Symbol.toStringTag]() { + return "GraphQLError"; + } + toString() { + let t = this.message; + if (this.nodes) for (let n of this.nodes) n.loc && (t += ` + +` + qe(n.loc)); + else if (this.source && this.locations) for (let n of this.locations) t += ` + +` + ue(this.source, n); + return t; + } + toJSON() { + let t = { message: this.message }; + return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t; + } + }; + (function(e) { + e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION"; + })(W || (W = {})); + (function(e) { + e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", e.TYPE_COORDINATE = "TypeCoordinate", e.MEMBER_COORDINATE = "MemberCoordinate", e.ARGUMENT_COORDINATE = "ArgumentCoordinate", e.DIRECTIVE_COORDINATE = "DirectiveCoordinate", e.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate"; + })(c || (c = {})); + (function(e) { + e.SOF = "", e.EOF = "", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.DOT = ".", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment"; + })(o || (o = {})); + z = class { + constructor(t) { + let n = new F(o.SOF, 0, 0, 0, 0); + this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0; + } + get [Symbol.toStringTag]() { + return "Lexer"; + } + advance() { + return this.lastToken = this.token, this.token = this.lookahead(); + } + lookahead() { + let t = this.token; + if (t.kind !== o.EOF) do + if (t.next) t = t.next; + else { + let n = wt(this, t.end); + t.next = n, n.prev = t, t = n; + } + while (t.kind === o.COMMENT); + return t; + } + }; + it = globalThis.process && !0 ? function(t, n) { + return t instanceof n; + } : function(t, n) { + if (t instanceof n) return !0; + if (typeof t == "object" && t !== null) { + var i; + let r = n.prototype[Symbol.toStringTag]; + if (r === (Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name)) { + let a = ee(t); + throw new Error(`Cannot use ${r} "${a}" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`); + } + } + return !1; + }; + B = class { + constructor(t, n = "GraphQL request", i = { + line: 1, + column: 1 + }) { + typeof t == "string" || Z(!1, `Body must be a string. Received: ${ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || Z(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Z(!1, "column in locationOffset is 1-indexed and must be positive."); + } + get [Symbol.toStringTag]() { + return "Source"; + } + }; + fe = class { + constructor(t, n = {}) { + let { lexer: i, ...r } = n; + if (i) this._lexer = i; + else { + let s = st(t) ? t : new B(t); + this._lexer = new z(s); + } + this._options = r, this._tokenCounter = 0; + } + get tokenCount() { + return this._tokenCounter; + } + parseName() { + let t = this.expectToken(o.NAME); + return this.node(t, { + kind: c.NAME, + value: t.value + }); + } + parseDocument() { + return this.node(this._lexer.token, { + kind: c.DOCUMENT, + definitions: this.many(o.SOF, this.parseDefinition, o.EOF) + }); + } + parseDefinition() { + if (this.peek(o.BRACE_L)) return this.parseOperationDefinition(); + let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token; + if (t && n.kind === o.BRACE_L) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are not supported on shorthand queries."); + if (n.kind === o.NAME) { + switch (n.value) { + case "schema": return this.parseSchemaDefinition(); + case "scalar": return this.parseScalarTypeDefinition(); + case "type": return this.parseObjectTypeDefinition(); + case "interface": return this.parseInterfaceTypeDefinition(); + case "union": return this.parseUnionTypeDefinition(); + case "enum": return this.parseEnumTypeDefinition(); + case "input": return this.parseInputObjectTypeDefinition(); + case "directive": return this.parseDirectiveDefinition(); + } + switch (n.value) { + case "query": + case "mutation": + case "subscription": return this.parseOperationDefinition(); + case "fragment": return this.parseFragmentDefinition(); + } + if (t) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions."); + switch (n.value) { + case "extend": return this.parseTypeSystemExtension(); + } + } + throw this.unexpected(n); + } + parseOperationDefinition() { + let t = this._lexer.token; + if (this.peek(o.BRACE_L)) return this.node(t, { + kind: c.OPERATION_DEFINITION, + operation: C.QUERY, + description: void 0, + name: void 0, + variableDefinitions: [], + directives: [], + selectionSet: this.parseSelectionSet() + }); + let n = this.parseDescription(), i = this.parseOperationType(), r; + return this.peek(o.NAME) && (r = this.parseName()), this.node(t, { + kind: c.OPERATION_DEFINITION, + operation: i, + description: n, + name: r, + variableDefinitions: this.parseVariableDefinitions(), + directives: this.parseDirectives(!1), + selectionSet: this.parseSelectionSet() + }); + } + parseOperationType() { + let t = this.expectToken(o.NAME); + switch (t.value) { + case "query": return C.QUERY; + case "mutation": return C.MUTATION; + case "subscription": return C.SUBSCRIPTION; + } + throw this.unexpected(t); + } + parseVariableDefinitions() { + return this.optionalMany(o.PAREN_L, this.parseVariableDefinition, o.PAREN_R); + } + parseVariableDefinition() { + return this.node(this._lexer.token, { + kind: c.VARIABLE_DEFINITION, + description: this.parseDescription(), + variable: this.parseVariable(), + type: (this.expectToken(o.COLON), this.parseTypeReference()), + defaultValue: this.expectOptionalToken(o.EQUALS) ? this.parseConstValueLiteral() : void 0, + directives: this.parseConstDirectives() + }); + } + parseVariable() { + let t = this._lexer.token; + return this.expectToken(o.DOLLAR), this.node(t, { + kind: c.VARIABLE, + name: this.parseName() + }); + } + parseSelectionSet() { + return this.node(this._lexer.token, { + kind: c.SELECTION_SET, + selections: this.many(o.BRACE_L, this.parseSelection, o.BRACE_R) + }); + } + parseSelection() { + return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField(); + } + parseField() { + let t = this._lexer.token, n = this.parseName(), i, r; + return this.expectOptionalToken(o.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, { + kind: c.FIELD, + alias: i, + name: r, + arguments: this.parseArguments(!1), + directives: this.parseDirectives(!1), + selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0 + }); + } + parseArguments(t) { + let n = t ? this.parseConstArgument : this.parseArgument; + return this.optionalMany(o.PAREN_L, n, o.PAREN_R); + } + parseArgument(t = !1) { + let n = this._lexer.token, i = this.parseName(); + return this.expectToken(o.COLON), this.node(n, { + kind: c.ARGUMENT, + name: i, + value: this.parseValueLiteral(t) + }); + } + parseConstArgument() { + return this.parseArgument(!0); + } + parseFragment() { + let t = this._lexer.token; + this.expectToken(o.SPREAD); + let n = this.expectOptionalKeyword("on"); + return !n && this.peek(o.NAME) ? this.node(t, { + kind: c.FRAGMENT_SPREAD, + name: this.parseFragmentName(), + directives: this.parseDirectives(!1) + }) : this.node(t, { + kind: c.INLINE_FRAGMENT, + typeCondition: n ? this.parseNamedType() : void 0, + directives: this.parseDirectives(!1), + selectionSet: this.parseSelectionSet() + }); + } + parseFragmentDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, { + kind: c.FRAGMENT_DEFINITION, + description: n, + name: this.parseFragmentName(), + variableDefinitions: this.parseVariableDefinitions(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(!1), + selectionSet: this.parseSelectionSet() + }) : this.node(t, { + kind: c.FRAGMENT_DEFINITION, + description: n, + name: this.parseFragmentName(), + typeCondition: (this.expectKeyword("on"), this.parseNamedType()), + directives: this.parseDirectives(!1), + selectionSet: this.parseSelectionSet() + }); + } + parseFragmentName() { + if (this._lexer.token.value === "on") throw this.unexpected(); + return this.parseName(); + } + parseValueLiteral(t) { + let n = this._lexer.token; + switch (n.kind) { + case o.BRACKET_L: return this.parseList(t); + case o.BRACE_L: return this.parseObject(t); + case o.INT: return this.advanceLexer(), this.node(n, { + kind: c.INT, + value: n.value + }); + case o.FLOAT: return this.advanceLexer(), this.node(n, { + kind: c.FLOAT, + value: n.value + }); + case o.STRING: + case o.BLOCK_STRING: return this.parseStringLiteral(); + case o.NAME: switch (this.advanceLexer(), n.value) { + case "true": return this.node(n, { + kind: c.BOOLEAN, + value: !0 + }); + case "false": return this.node(n, { + kind: c.BOOLEAN, + value: !1 + }); + case "null": return this.node(n, { kind: c.NULL }); + default: return this.node(n, { + kind: c.ENUM, + value: n.value + }); + } + case o.DOLLAR: + if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) { + let i = this._lexer.token.value; + throw h(this._lexer.source, n.start, `Unexpected variable "$${i}" in constant value.`); + } else throw this.unexpected(n); + return this.parseVariable(); + default: throw this.unexpected(); + } + } + parseConstValueLiteral() { + return this.parseValueLiteral(!0); + } + parseStringLiteral() { + let t = this._lexer.token; + return this.advanceLexer(), this.node(t, { + kind: c.STRING, + value: t.value, + block: t.kind === o.BLOCK_STRING + }); + } + parseList(t) { + let n = () => this.parseValueLiteral(t); + return this.node(this._lexer.token, { + kind: c.LIST, + values: this.any(o.BRACKET_L, n, o.BRACKET_R) + }); + } + parseObject(t) { + let n = () => this.parseObjectField(t); + return this.node(this._lexer.token, { + kind: c.OBJECT, + fields: this.any(o.BRACE_L, n, o.BRACE_R) + }); + } + parseObjectField(t) { + let n = this._lexer.token, i = this.parseName(); + return this.expectToken(o.COLON), this.node(n, { + kind: c.OBJECT_FIELD, + name: i, + value: this.parseValueLiteral(t) + }); + } + parseDirectives(t) { + let n = []; + for (; this.peek(o.AT);) n.push(this.parseDirective(t)); + return n; + } + parseConstDirectives() { + return this.parseDirectives(!0); + } + parseDirective(t) { + let n = this._lexer.token; + return this.expectToken(o.AT), this.node(n, { + kind: c.DIRECTIVE, + name: this.parseName(), + arguments: this.parseArguments(t) + }); + } + parseTypeReference() { + let t = this._lexer.token, n; + if (this.expectOptionalToken(o.BRACKET_L)) { + let i = this.parseTypeReference(); + this.expectToken(o.BRACKET_R), n = this.node(t, { + kind: c.LIST_TYPE, + type: i + }); + } else n = this.parseNamedType(); + return this.expectOptionalToken(o.BANG) ? this.node(t, { + kind: c.NON_NULL_TYPE, + type: n + }) : n; + } + parseNamedType() { + return this.node(this._lexer.token, { + kind: c.NAMED_TYPE, + name: this.parseName() + }); + } + peekDescription() { + return this.peek(o.STRING) || this.peek(o.BLOCK_STRING); + } + parseDescription() { + if (this.peekDescription()) return this.parseStringLiteral(); + } + parseSchemaDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("schema"); + let i = this.parseConstDirectives(), r = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R); + return this.node(t, { + kind: c.SCHEMA_DEFINITION, + description: n, + directives: i, + operationTypes: r + }); + } + parseOperationTypeDefinition() { + let t = this._lexer.token, n = this.parseOperationType(); + this.expectToken(o.COLON); + let i = this.parseNamedType(); + return this.node(t, { + kind: c.OPERATION_TYPE_DEFINITION, + operation: n, + type: i + }); + } + parseScalarTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("scalar"); + let i = this.parseName(), r = this.parseConstDirectives(); + return this.node(t, { + kind: c.SCALAR_TYPE_DEFINITION, + description: n, + name: i, + directives: r + }); + } + parseObjectTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("type"); + let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition(); + return this.node(t, { + kind: c.OBJECT_TYPE_DEFINITION, + description: n, + name: i, + interfaces: r, + directives: s, + fields: a + }); + } + parseImplementsInterfaces() { + return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : []; + } + parseFieldsDefinition() { + return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R); + } + parseFieldDefinition() { + let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs(); + this.expectToken(o.COLON); + let s = this.parseTypeReference(), a = this.parseConstDirectives(); + return this.node(t, { + kind: c.FIELD_DEFINITION, + description: n, + name: i, + arguments: r, + type: s, + directives: a + }); + } + parseArgumentDefs() { + return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R); + } + parseInputValueDef() { + let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(); + this.expectToken(o.COLON); + let r = this.parseTypeReference(), s; + this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral()); + let a = this.parseConstDirectives(); + return this.node(t, { + kind: c.INPUT_VALUE_DEFINITION, + description: n, + name: i, + type: r, + defaultValue: s, + directives: a + }); + } + parseInterfaceTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("interface"); + let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition(); + return this.node(t, { + kind: c.INTERFACE_TYPE_DEFINITION, + description: n, + name: i, + interfaces: r, + directives: s, + fields: a + }); + } + parseUnionTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("union"); + let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes(); + return this.node(t, { + kind: c.UNION_TYPE_DEFINITION, + description: n, + name: i, + directives: r, + types: s + }); + } + parseUnionMemberTypes() { + return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : []; + } + parseEnumTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("enum"); + let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition(); + return this.node(t, { + kind: c.ENUM_TYPE_DEFINITION, + description: n, + name: i, + directives: r, + values: s + }); + } + parseEnumValuesDefinition() { + return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R); + } + parseEnumValueDefinition() { + let t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives(); + return this.node(t, { + kind: c.ENUM_VALUE_DEFINITION, + description: n, + name: i, + directives: r + }); + } + parseEnumValueName() { + if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw h(this._lexer.source, this._lexer.token.start, `${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`); + return this.parseName(); + } + parseInputObjectTypeDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("input"); + let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition(); + return this.node(t, { + kind: c.INPUT_OBJECT_TYPE_DEFINITION, + description: n, + name: i, + directives: r, + fields: s + }); + } + parseInputFieldsDefinition() { + return this.optionalMany(o.BRACE_L, this.parseInputValueDef, o.BRACE_R); + } + parseTypeSystemExtension() { + let t = this._lexer.lookahead(); + if (t.kind === o.NAME) switch (t.value) { + case "schema": return this.parseSchemaExtension(); + case "scalar": return this.parseScalarTypeExtension(); + case "type": return this.parseObjectTypeExtension(); + case "interface": return this.parseInterfaceTypeExtension(); + case "union": return this.parseUnionTypeExtension(); + case "enum": return this.parseEnumTypeExtension(); + case "input": return this.parseInputObjectTypeExtension(); + } + throw this.unexpected(t); + } + parseSchemaExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("schema"); + let n = this.parseConstDirectives(), i = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R); + if (n.length === 0 && i.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.SCHEMA_EXTENSION, + directives: n, + operationTypes: i + }); + } + parseScalarTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("scalar"); + let n = this.parseName(), i = this.parseConstDirectives(); + if (i.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.SCALAR_TYPE_EXTENSION, + name: n, + directives: i + }); + } + parseObjectTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("type"); + let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition(); + if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.OBJECT_TYPE_EXTENSION, + name: n, + interfaces: i, + directives: r, + fields: s + }); + } + parseInterfaceTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("interface"); + let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition(); + if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.INTERFACE_TYPE_EXTENSION, + name: n, + interfaces: i, + directives: r, + fields: s + }); + } + parseUnionTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("union"); + let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes(); + if (i.length === 0 && r.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.UNION_TYPE_EXTENSION, + name: n, + directives: i, + types: r + }); + } + parseEnumTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("enum"); + let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition(); + if (i.length === 0 && r.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.ENUM_TYPE_EXTENSION, + name: n, + directives: i, + values: r + }); + } + parseInputObjectTypeExtension() { + let t = this._lexer.token; + this.expectKeyword("extend"), this.expectKeyword("input"); + let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition(); + if (i.length === 0 && r.length === 0) throw this.unexpected(); + return this.node(t, { + kind: c.INPUT_OBJECT_TYPE_EXTENSION, + name: n, + directives: i, + fields: r + }); + } + parseDirectiveDefinition() { + let t = this._lexer.token, n = this.parseDescription(); + this.expectKeyword("directive"), this.expectToken(o.AT); + let i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable"); + this.expectKeyword("on"); + let a = this.parseDirectiveLocations(); + return this.node(t, { + kind: c.DIRECTIVE_DEFINITION, + description: n, + name: i, + arguments: r, + repeatable: s, + locations: a + }); + } + parseDirectiveLocations() { + return this.delimitedMany(o.PIPE, this.parseDirectiveLocation); + } + parseDirectiveLocation() { + let t = this._lexer.token, n = this.parseName(); + if (Object.prototype.hasOwnProperty.call(W, n.value)) return n; + throw this.unexpected(t); + } + parseSchemaCoordinate() { + let t = this._lexer.token, n = this.expectOptionalToken(o.AT), i = this.parseName(), r; + !n && this.expectOptionalToken(o.DOT) && (r = this.parseName()); + let s; + return (n || r) && this.expectOptionalToken(o.PAREN_L) && (s = this.parseName(), this.expectToken(o.COLON), this.expectToken(o.PAREN_R)), n ? s ? this.node(t, { + kind: c.DIRECTIVE_ARGUMENT_COORDINATE, + name: i, + argumentName: s + }) : this.node(t, { + kind: c.DIRECTIVE_COORDINATE, + name: i + }) : r ? s ? this.node(t, { + kind: c.ARGUMENT_COORDINATE, + name: i, + fieldName: r, + argumentName: s + }) : this.node(t, { + kind: c.MEMBER_COORDINATE, + name: i, + memberName: r + }) : this.node(t, { + kind: c.TYPE_COORDINATE, + name: i + }); + } + node(t, n) { + return this._options.noLocation !== !0 && (n.loc = new H(t, this._lexer.lastToken, this._lexer.source)), n; + } + peek(t) { + return this._lexer.token.kind === t; + } + expectToken(t) { + let n = this._lexer.token; + if (n.kind === t) return this.advanceLexer(), n; + throw h(this._lexer.source, n.start, `Expected ${at(t)}, found ${ne(n)}.`); + } + expectOptionalToken(t) { + return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1; + } + expectKeyword(t) { + let n = this._lexer.token; + if (n.kind === o.NAME && n.value === t) this.advanceLexer(); + else throw h(this._lexer.source, n.start, `Expected "${t}", found ${ne(n)}.`); + } + expectOptionalKeyword(t) { + let n = this._lexer.token; + return n.kind === o.NAME && n.value === t ? (this.advanceLexer(), !0) : !1; + } + unexpected(t) { + let n = t ?? this._lexer.token; + return h(this._lexer.source, n.start, `Unexpected ${ne(n)}.`); + } + any(t, n, i) { + this.expectToken(t); + let r = []; + for (; !this.expectOptionalToken(i);) r.push(n.call(this)); + return r; + } + optionalMany(t, n, i) { + if (this.expectOptionalToken(t)) { + let r = []; + do + r.push(n.call(this)); + while (!this.expectOptionalToken(i)); + return r; + } + return []; + } + many(t, n, i) { + this.expectToken(t); + let r = []; + do + r.push(n.call(this)); + while (!this.expectOptionalToken(i)); + return r; + } + delimitedMany(t, n) { + this.expectOptionalToken(t); + let i = []; + do + i.push(n.call(this)); + while (this.expectOptionalToken(t)); + return i; + } + advanceLexer() { + let { maxTokens: t } = this._options, n = this._lexer.advance(); + if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw h(this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.`); + } + }; + ct = Wt; + Kt = { allowLegacyFragmentVariables: !0 }; + tn = { + parse: en, + astFormat: "graphql", + hasPragma: Fe, + hasIgnorePragma: Me, + locStart: J, + locEnd: q + }; + nn = { graphql: Ge }; +}))(); +export { ut as default, Ye as languages, $e as options, he as parsers, nn as printers }; diff --git a/.github/actions/check-public-api/dist/html-CGnTnh3H.js b/.github/actions/check-public-api/dist/html-CGnTnh3H.js new file mode 100644 index 0000000000..77f43d4eb8 --- /dev/null +++ b/.github/actions/check-public-api/dist/html-CGnTnh3H.js @@ -0,0 +1,7139 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/html.mjs +function ns(e) { + return this[e < 0 ? this.length + e : e]; +} +function as(e) { + if (typeof e == "string") return Ve; + if (Array.isArray(e)) return Ue; + if (!e) return; + let { type: t } = e; + if (mt.has(t)) return t; +} +function ls(e) { + let t = e === null ? "null" : typeof e; + if (t !== "string" && t !== "object") return `Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`; + if (ft(e)) throw new Error("doc is valid."); + let r = Object.prototype.toString.call(e); + if (r !== "[object Object]") return `Unexpected doc '${r}'.`; + let n = os([...mt].map((i) => `'${i}'`)); + return `Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`; +} +function Gt(e, t) { + if (typeof e == "string") return t(e); + let r = /* @__PURE__ */ new Map(); + return n(e); + function n(s) { + if (r.has(s)) return r.get(s); + let a = i(s); + return r.set(s, a), a; + } + function i(s) { + switch (ft(s)) { + case Ue: return t(s.map(n)); + case ke: return t({ + ...s, + parts: s.parts.map(n) + }); + case xe: return t({ + ...s, + breakContents: n(s.breakContents), + flatContents: n(s.flatContents) + }); + case we: { + let { expandedStates: a, contents: o } = s; + return a ? (a = a.map(n), o = a[0]) : o = n(o), t({ + ...s, + contents: o, + expandedStates: a + }); + } + case be: + case Te: + case ye: + case ht: + case ut: return t({ + ...s, + contents: n(s.contents) + }); + case Ve: + case lt: + case ct: + case pt: + case $: + case Ae: return t(s); + default: throw new Ir(s); + } + } +} +function L(e, t = Rr) { + return Gt(e, (r) => typeof r == "string" ? B(t, r.split(` +`)) : r); +} +function A(e) { + return D(e), { + type: Te, + contents: e + }; +} +function cs(e, t) { + return Br(e), D(t), { + type: be, + contents: t, + n: e + }; +} +function qr(e) { + return cs(Number.NEGATIVE_INFINITY, e); +} +function gt(e) { + return Mr(e), { + type: ke, + parts: e + }; +} +function E(e, t = {}) { + return D(e), dt(t.expandedStates, !0), { + type: we, + id: t.id, + contents: e, + break: !!t.shouldBreak, + expandedStates: t.expandedStates + }; +} +function j(e, t = "", r = {}) { + return D(e), t !== "" && D(t), { + type: xe, + breakContents: e, + flatContents: t, + groupId: r.groupId + }; +} +function Fr(e, t) { + return D(e), { + type: ye, + contents: e, + groupId: t.groupId, + negate: t.negate + }; +} +function B(e, t) { + D(e), dt(t); + let r = []; + for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]); + return r; +} +function fs(e, t) { + let { preferred: r, alternate: n } = t === !0 || t === "'" ? hs : ms, { length: i } = e, s = 0, a = 0; + for (let o = 0; o < i; o++) { + let c = e.charCodeAt(o); + c === r.codePoint ? s++ : c === n.codePoint && a++; + } + return (s > a ? n : r).character; +} +function zt(e) { + if (typeof e != "string") throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +function zr(e, t, r) { + if (e.kind === "text" || e.kind === "comment") return null; + if (e.kind === "yaml" && delete t.value, e.kind === "attribute") { + let { fullName: n, value: i } = e; + n === "style" || n === "class" || n === "srcset" && (r.fullName === "img" || r.fullName === "source") || n === "allow" && r.fullName === "iframe" || n.startsWith("on") || n.startsWith("@") || n.startsWith(":") || n.startsWith(".") || n.startsWith("#") || n.startsWith("v-") || n === "vars" && r.fullName === "style" || (n === "setup" || n === "generic") && r.fullName === "script" || n === "slot-scope" || n.startsWith("(") || n.startsWith("[") || n.startsWith("*") || n.startsWith("bind") || n.startsWith("i18n") || n.startsWith("on-") || n.startsWith("ng-") || i?.includes("{{") ? delete t.value : i && (t.value = w(0, i, /'|"|'/gu, "\"")); + } + if (e.kind === "docType" && (t.value = w(0, e.value.toLowerCase(), /\s+/gu, " ")), e.kind === "angularControlFlowBlock" && e.parameters?.children) for (let n of t.parameters.children) Ss.has(e.name) ? delete n.expression : n.expression = n.expression.trim(); + e.kind === "angularIcuExpression" && (t.switchValue = e.switchValue.trim()), e.kind === "angularLetDeclarationInitializer" && delete t.value, e.kind === "element" && e.isVoid && !e.isSelfClosing && (t.isSelfClosing = !0); +} +function X(e, t = !0) { + return [A([k, e]), t ? k : ""]; +} +function V(e, t) { + let r = e.type === "NGRoot" ? e.node.type === "NGMicrosyntax" && e.node.body.length === 1 && e.node.body[0].type === "NGMicrosyntaxExpression" ? e.node.body[0].expression : e.node : e.type === "JsExpressionRoot" ? e.node : e; + return r && (r.type === "ObjectExpression" || r.type === "ArrayExpression" || (t.parser === "__vue_expression" || t.parser === "__vue_ts_expression" || t.parser === "__ng_binding" || t.parser === "__ng_directive") && (r.type === "TemplateLiteral" || r.type === "StringLiteral")); +} +async function x(e, t, r, n) { + r = { + __isInHtmlAttribute: !0, + __embeddedInHtml: !0, + ...r + }; + let i = !0; + n && (r.__onHtmlBindingRoot = (a, o) => { + i = n(a, o); + }); + let s = await t(e, r, t); + return i ? E(s) : X(s); +} +function Es(e, t, r, n) { + let { node: i } = r, s = n.originalText.slice(i.sourceSpan.start.offset, i.sourceSpan.end.offset); + return /^\s*$/u.test(s) ? "" : x(s, e, { + parser: "__ng_directive", + __isInHtmlAttribute: !1 + }, V); +} +function Ts() { + let e = globalThis, t = e.Deno?.build?.os; + return typeof t == "string" ? t === "windows" : e.navigator?.platform?.startsWith("Win") ?? e.process?.platform?.startsWith("win") ?? !1; +} +function Xr(e) { + if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`); + return e; +} +function ws(e) { + return e = Xr(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); +} +function ks(e) { + e = Xr(e); + let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t; +} +function jt(e) { + return bs ? ks(e) : ws(e); +} +function xs(e) { + return Array.isArray(e) && e.length > 0; +} +function Jr(e, t) { + if (!t) return; + let r = Kr(t).toLowerCase(); + return e.find(({ filenames: n }) => n?.some((i) => i.toLowerCase() === r)) ?? e.find(({ extensions: n }) => n?.some((i) => r.endsWith(i))); +} +function ys(e, t) { + if (t) return e.find(({ name: r }) => r.toLowerCase() === t) ?? e.find(({ aliases: r }) => r?.includes(t)) ?? e.find(({ extensions: r }) => r?.includes(`.${t}`)); +} +function Zr(e, t) { + if (t) { + if (Qr(t)) try { + t = jt(t); + } catch { + return; + } + if (typeof t == "string") return e.find(({ isSupported: r }) => r?.({ filepath: t })); + } +} +function Ns(e, t) { + let r = jr(0, e.plugins).flatMap((i) => i.languages ?? []); + return (ys(r, t.language) ?? Jr(r, t.physicalFile) ?? Jr(r, t.file) ?? Zr(r, t.physicalFile) ?? Zr(r, t.file) ?? As?.(r, t.physicalFile))?.parsers[0]; +} +function Ls(e) { + return !!e?.[St]; +} +function Ps(e) { + let t = e.slice(0, We); + if (t !== "---" && t !== "+++") return; + let r = e.indexOf(` +`, We); + if (r === -1) return; + let n = e.slice(We, r).trim(), i = e.indexOf(` +${t}`, r), s = n; + if (s || (s = t === "+++" ? "toml" : "yaml"), i === -1 && t === "---" && s === "yaml" && (i = e.indexOf(` +...`, r)), i === -1) return; + let a = i + 1 + We, o = e.charAt(a + 1); + if (!/\s?/u.test(o)) return; + let c = e.slice(0, a), u; + return { + language: s, + explicitLanguage: n || null, + value: e.slice(r + 1, i), + startDelimiter: t, + endDelimiter: c.slice(-We), + raw: c, + start: { + line: 1, + column: 0, + index: 0 + }, + end: { + index: c.length, + get line() { + return u ?? (u = c.split(` +`)), u.length; + }, + get column() { + return u ?? (u = c.split(` +`)), M(0, u, -1).length; + } + }, + [St]: !0 + }; +} +function Os(e) { + let t = Ps(e); + return t ? { + frontMatter: t, + get content() { + let { raw: r } = t; + return w(0, r, /[^\n]/gu, " ") + e.slice(r.length); + } + } : { content: e }; +} +function Ds(e) { + return e.kind === "element" && !e.hasExplicitNamespace && !["html", "svg"].includes(e.namespace); +} +function Et(e, t) { + return !!(e.kind === "ieConditionalComment" && e.lastChild && !e.lastChild.isSelfClosing && !e.lastChild.endSourceSpan || e.kind === "ieConditionalComment" && !e.complete || ae(e) && e.children.some((r) => r.kind !== "text" && r.kind !== "interpolation") || Tt(e, t) && !q(e, t) && e.kind !== "interpolation"); +} +function oe(e) { + return e.kind === "attribute" || !e.parent || !e.prev ? !1 : Rs(e.prev); +} +function Rs(e) { + return e.kind === "comment" && e.value.trim() === "prettier-ignore"; +} +function O(e) { + return e.kind === "text" || e.kind === "comment"; +} +function q(e, t) { + return e.kind === "element" && (e.fullName === "script" || e.fullName === "style" || e.fullName === "svg:style" || e.fullName === "svg:script" || e.fullName === "mj-style" && t.parser === "mjml" || se(e) && (e.name === "script" || e.name === "style")); +} +function nn(e, t) { + return e.children && !q(e, t); +} +function sn(e, t) { + return q(e, t) || e.kind === "interpolation" || Zt(e); +} +function Zt(e) { + return gn(e).startsWith("pre"); +} +function an(e, t) { + let r = n(); + if (r && !e.prev && e.parent?.tagDefinition?.ignoreFirstLf) return e.kind === "interpolation"; + return r; + function n() { + return ie(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.prev && (e.prev.kind === "text" || e.prev.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : ae(e.parent) ? !0 : !(!e.prev && (e.parent.kind === "root" || ae(e) && e.parent || q(e.parent, t) || $e(e.parent, t) || !Vs(e.parent.cssDisplay)) || e.prev && !Gs(e.prev.cssDisplay)); + } +} +function on(e, t) { + return ie(e) || e.kind === "angularControlFlowBlock" ? !1 : (e.kind === "text" || e.kind === "interpolation") && e.next && (e.next.kind === "text" || e.next.kind === "interpolation") ? !0 : !e.parent || e.parent.cssDisplay === "none" ? !1 : ae(e.parent) ? !0 : !(!e.next && (e.parent.kind === "root" || ae(e) && e.parent || q(e.parent, t) || $e(e.parent, t) || !Us(e.parent.cssDisplay)) || e.next && !Ws(e.next.cssDisplay)); +} +function ln(e, t) { + return zs(e.cssDisplay) && !q(e, t); +} +function Ge(e) { + return ie(e) || e.next && e.sourceSpan.end && e.sourceSpan.end.line + 1 < e.next.sourceSpan.start.line; +} +function cn(e) { + return er(e) || e.kind === "element" && e.children.length > 0 && ([ + "body", + "script", + "style" + ].includes(e.name) || e.children.some((t) => Bs(t))) || e.firstChild && e.firstChild === e.lastChild && e.firstChild.kind !== "text" && pn(e.firstChild) && (!e.lastChild.isTrailingSpaceSensitive || hn(e.lastChild)); +} +function er(e) { + return e.kind === "element" && e.children.length > 0 && ([ + "html", + "head", + "ul", + "ol", + "select" + ].includes(e.name) || e.cssDisplay.startsWith("table") && e.cssDisplay !== "table-cell"); +} +function Ct(e) { + return mn(e) || e.prev && Ms(e.prev) || un(e); +} +function Ms(e) { + return mn(e) || e.kind === "element" && e.fullName === "br" || un(e); +} +function un(e) { + return pn(e) && hn(e); +} +function pn(e) { + return e.hasLeadingSpaces && (e.prev ? e.prev.sourceSpan.end.line < e.sourceSpan.start.line : e.parent.kind === "root" || e.parent.startSourceSpan.end.line < e.sourceSpan.start.line); +} +function hn(e) { + return e.hasTrailingSpaces && (e.next ? e.next.sourceSpan.start.line > e.sourceSpan.end.line : e.parent.kind === "root" || e.parent.endSourceSpan && e.parent.endSourceSpan.start.line > e.sourceSpan.end.line); +} +function mn(e) { + switch (e.kind) { + case "ieConditionalComment": + case "comment": + case "directive": return !0; + case "element": return ["script", "select"].includes(e.name); + } + return !1; +} +function vt(e) { + return e.lastChild ? vt(e.lastChild) : e; +} +function Bs(e) { + return e.children?.some((t) => t.kind !== "text"); +} +function fn(e) { + if (e) switch (e) { + case "module": + case "text/javascript": + case "text/babel": + case "text/jsx": + case "application/javascript": return "babel"; + case "application/x-typescript": return "typescript"; + case "text/markdown": return "markdown"; + case "text/html": return "html"; + case "text/x-handlebars-template": return "glimmer"; + default: if (e.endsWith("json") || e.endsWith("importmap") || e === "speculationrules") return "json"; + } +} +function qs(e, t) { + let { name: r, attrMap: n } = e; + if (r !== "script" || Object.prototype.hasOwnProperty.call(n, "src")) return; + let { type: i, lang: s } = e.attrMap; + return !s && !i ? "babel" : _t(t, { language: s }) ?? fn(i); +} +function Fs(e, t) { + if (!Tt(e, t)) return; + let { attrMap: r } = e; + if (Object.prototype.hasOwnProperty.call(r, "src")) return; + let { type: n, lang: i } = r; + return _t(t, { language: i }) ?? fn(n); +} +function Hs(e, t) { + if (e.name === "style") { + let { lang: r } = e.attrMap; + return r ? _t(t, { language: r }) : "css"; + } + if (e.name === "mj-style" && t.parser === "mjml") return "css"; +} +function tr(e, t) { + return qs(e, t) ?? Hs(e, t) ?? Fs(e, t); +} +function ze(e) { + return e === "block" || e === "list-item" || e.startsWith("table"); +} +function Vs(e) { + return !ze(e) && e !== "inline-block"; +} +function Us(e) { + return !ze(e) && e !== "inline-block"; +} +function Ws(e) { + return !ze(e); +} +function Gs(e) { + return !ze(e); +} +function zs(e) { + return !ze(e) && e !== "inline-block"; +} +function ae(e) { + return gn(e).startsWith("pre"); +} +function $s(e, t) { + let r = e; + for (; r;) { + if (t(r)) return !0; + r = r.parent; + } + return !1; +} +function dn(e, t) { + if (le(e, t)) return "block"; + if (e.prev?.kind === "comment") { + let n = e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u); + if (n) return n[1]; + } + let r = !1; + if (e.kind === "element" && e.namespace === "svg") if ($s(e, (n) => n.fullName === "svg:foreignObject")) r = !0; + else return e.name === "svg" ? "inline-block" : "block"; + switch (t.htmlWhitespaceSensitivity) { + case "strict": return "inline"; + case "ignore": return "block"; + default: if (e.kind === "element" && (!e.namespace || r || se(e)) && Object.prototype.hasOwnProperty.call(Kt, e.name)) return Kt[e.name]; + } + return en; +} +function gn(e) { + return e.kind === "element" && (!e.namespace || se(e)) && Object.prototype.hasOwnProperty.call(Qt, e.name) ? Qt[e.name] : tn; +} +function rr(e) { + return w(0, w(0, e, "'", "'"), """, "\""); +} +function b(e) { + return rr(e.value); +} +function $e(e, t) { + return le(e, t) && !Ys.has(e.fullName); +} +function le(e, t) { + return t.parser === "vue" && e.kind === "element" && e.parent.kind === "root" && e.fullName.toLowerCase() !== "html"; +} +function Tt(e, t) { + return le(e, t) && ($e(e, t) || e.attrMap.lang && e.attrMap.lang !== "html"); +} +function _n(e) { + let t = e.fullName; + return t.charAt(0) === "#" || t === "slot-scope" || t === "v-slot" || t.startsWith("v-slot:"); +} +function Sn(e, t) { + let r = e.parent; + if (!le(r, t)) return !1; + let n = r.fullName, i = e.fullName; + return n === "script" && i === "setup" || n === "style" && i === "vars"; +} +function bt(e, t = e.value) { + return e.parent.isWhitespaceSensitive ? e.parent.isIndentationSensitive ? L(t) : L(N.dedentString(Jt(t)), C) : B(S, N.split(t)); +} +function wt(e, t) { + return le(e, t) && e.name === "script"; +} +function js(e) { + let { valueSpan: t, value: r } = e; + return t.end.offset - t.start.offset === r.length + 2; +} +function kt(e, t) { + if (js(e)) return !1; + let { value: r } = e; + return /^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r) || t.parser === "lwc" && r.startsWith("{") && r.endsWith("}"); +} +async function vn(e, t, r) { + let n = b(r.node), i = []; + for (let [s, a] of n.split(En).entries()) if (s % 2 === 0) i.push(L(a)); + else try { + i.push(E([ + "{{", + A([S, await x(a, e, { + parser: "__ng_interpolation", + __isInHtmlInterpolation: !0 + })]), + S, + "}}" + ])); + } catch { + i.push("{{", L(a), "}}"); + } + return i; +} +function Ks(e, t, { node: r }) { + let n = b(r); + return X(gt(bt(r, n.trim())), !n.includes("@@")); +} +function Zs(e) { + let t = []; + for (let r of e.split(";")) { + if (r = N.trim(r), !r) continue; + let [n, ...i] = N.split(r); + t.push({ + name: n, + value: i + }); + } + return t; +} +function Nn(e, t, r) { + let { node: n } = r, i = yn(b(n)); + return i.length === 0 ? [""] : X(i.map(({ name: s, value: a }, o) => [[s, ...a].join(" "), o === i.length - 1 ? j(";") : [";", S]])); +} +function Ln(e) { + return e === " " || e === ` +` || e === "\f" || e === "\r" || e === " "; +} +function sa(e) { + let t = e.length, r, n, i, s, a, o = 0, c; + function u(m) { + let _, T = m.exec(e.substring(o)); + if (T) return [_] = T, o += _.length, _; + } + let p = []; + for (;;) { + if (u(ta), o >= t) { + if (p.length === 0) throw new Error("Must contain one or more image candidate strings."); + return p; + } + c = o, r = u(ra), n = [], r.slice(-1) === "," ? (r = r.replace(na, ""), g()) : d(); + } + function d() { + for (u(ea), i = "", s = "in descriptor";;) { + if (a = e.charAt(o), s === "in descriptor") if (Ln(a)) i && (n.push(i), i = "", s = "after descriptor"); + else if (a === ",") { + o += 1, i && n.push(i), g(); + return; + } else if (a === "(") i += a, s = "in parens"; + else if (a === "") { + i && n.push(i), g(); + return; + } else i += a; + else if (s === "in parens") if (a === ")") i += a, s = "in descriptor"; + else if (a === "") { + n.push(i), g(); + return; + } else i += a; + else if (s === "after descriptor" && !Ln(a)) if (a === "") { + g(); + return; + } else s = "in descriptor", o -= 1; + o += 1; + } + } + function g() { + let m = !1, _, T, P, z, ne = {}, Q, ot, Ce, qe, Vt; + for (z = 0; z < n.length; z++) Q = n[z], ot = Q[Q.length - 1], Ce = Q.substring(0, Q.length - 1), qe = parseInt(Ce, 10), Vt = parseFloat(Ce), Pn.test(Ce) && ot === "w" ? ((_ || T) && (m = !0), qe === 0 ? m = !0 : _ = qe) : ia.test(Ce) && ot === "x" ? ((_ || T || P) && (m = !0), Vt < 0 ? m = !0 : T = Vt) : Pn.test(Ce) && ot === "h" ? ((P || T) && (m = !0), qe === 0 ? m = !0 : P = qe) : m = !0; + if (!m) ne.source = { + value: r, + startOffset: c + }, _ && (ne.width = { value: _ }), T && (ne.density = { value: T }), P && (ne.height = { value: P }), p.push(ne); + else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`); + } +} +function Rn(e, t, r) { + let i = On(b(r.node)), s = aa.filter((m) => i.some((_) => Object.prototype.hasOwnProperty.call(_, m))); + if (s.length > 1) throw new Error("Mixed descriptor in srcset is not supported"); + let [a] = s, o = In[a], c = i.map((m) => m.source.value), u = Math.max(...c.map((m) => m.length)), p = i.map((m) => m[a] ? String(m[a].value) : ""), d = p.map((m) => { + let _ = m.indexOf("."); + return _ === -1 ? m.length : _; + }), g = Math.max(...d); + return X(B([",", S], c.map((m, _) => { + let T = [m], P = p[_]; + if (P) { + let z = u - m.length + 1, ne = g - d[_], Q = " ".repeat(z + ne); + T.push(j(Q, " "), P + o); + } + return T; + }))); +} +function oa(e, t) { + let { root: r } = e; + return sr.has(r) || sr.set(r, r.children.some((n) => wt(n, t) && ["ts", "typescript"].includes(n.attrMap.lang))), sr.get(r); +} +function qn(e, t, r) { + return x(`type T<${b(r.node)}> = any`, e, { + parser: "babel-ts", + __isEmbeddedTypescriptGenericParameters: !0 + }, V); +} +function Fn(e, t, r, n) { + let i = b(r.node), s = U(r, n) ? "babel-ts" : "babel"; + return x(`function _(${i}) {}`, e, { + parser: s, + __isVueBindings: !0 + }); +} +async function Hn(e, t, r, n) { + let { left: s, operator: a, right: o } = la(b(r.node)), c = U(r, n); + return [ + E(await x(`function _(${s}) {}`, e, { + parser: c ? "babel-ts" : "babel", + __isVueForBindingLeft: !0 + })), + " ", + a, + " ", + await x(o, e, { parser: c ? "__ts_expression" : "__js_expression" }) + ]; +} +function la(e) { + let t = /(.*?)\s+(in|of)\s+(.*)/su, r = /,([^,\]}]*)(?:,([^,\]}]*))?$/u, n = /^\(|\)$/gu, i = e.match(t); + if (!i) return; + let s = { for: i[3].trim() }; + if (!s.for) return; + let a = w(0, i[1].trim(), n, ""), o = a.match(r); + o ? (s.alias = a.replace(r, ""), s.iterator1 = o[1].trim(), o[2] && (s.iterator2 = o[2].trim())) : s.alias = a; + let c = [ + s.alias, + s.iterator1, + s.iterator2 + ]; + if (!c.some((u, p) => !u && (p === 0 || c.slice(p + 1).some(Boolean)))) return { + left: c.filter(Boolean).join(","), + operator: i[2], + right: s.for + }; +} +async function ua(e, t, r, n) { + try { + return await Vn(e, t, r, n); + } catch (a) { + if (a.cause?.code !== "BABEL_PARSER_SYNTAX_ERROR") throw a; + } + return x(b(r.node), e, { parser: U(r, n) ? "__vue_ts_event_binding" : "__vue_event_binding" }, V); +} +function pa(e, t, r, n) { + return x(b(r.node), e, { parser: U(r, n) ? "__vue_ts_expression" : "__vue_expression" }, V); +} +function Vn(e, t, r, n) { + return x(b(r.node), e, { parser: U(r, n) ? "__ts_expression" : "__js_expression" }, V); +} +function ma(e, t) { + let { node: r } = e, { value: n } = r; + if (n) return kt(r, t) ? [ + r.rawName, + "=", + n + ] : ha.find(({ test: i }) => i(e, t))?.print; +} +function fa(e) { + return async (t, r, n, i) => { + let s = await e(t, r, n, i); + if (s) return s = Gt(s, (a) => typeof a == "string" ? w(0, a, "\"", """) : a), [ + n.node.rawName, + "=\"", + E(s), + "\"" + ]; + }; +} +function Ye(e, t) { + return [e.isSelfClosing ? "" : da(e, t), ce(e, t)]; +} +function da(e, t) { + return e.lastChild && he(e.lastChild) ? "" : [ga(e, t), xt(e, t)]; +} +function ce(e, t) { + return (e.next ? W(e.next) : pe(e.parent)) ? "" : [ue(e, t), F(e, t)]; +} +function ga(e, t) { + return pe(e) ? ue(e.lastChild, t) : ""; +} +function F(e, t) { + return he(e) ? xt(e.parent, t) : je(e) ? yt(e.next, t) : ""; +} +function xt(e, t) { + if (zn(e, t)) return ""; + switch (e.kind) { + case "ieConditionalComment": return ""; + case "ieConditionalStartComment": return "]>"; + case "interpolation": return "}}"; + case "angularIcuExpression": return "}"; + case "element": if (e.isSelfClosing) return "/>"; + default: return ">"; + } +} +function zn(e, t) { + return !e.isSelfClosing && !e.endSourceSpan && (oe(e) || Et(e.parent, t)); +} +function W(e) { + return e.prev && e.prev.kind !== "docType" && e.kind !== "angularControlFlowBlock" && !O(e.prev) && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces; +} +function pe(e) { + return e.lastChild?.isTrailingSpaceSensitive && !e.lastChild.hasTrailingSpaces && !O(vt(e.lastChild)) && !ae(e); +} +function he(e) { + return !e.next && !e.hasTrailingSpaces && e.isTrailingSpaceSensitive && O(vt(e)); +} +function je(e) { + return e.next && !O(e.next) && O(e) && e.isTrailingSpaceSensitive && !e.hasTrailingSpaces; +} +function _a(e) { + let t = e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su); + return t ? t[1] ? t[1].split(/\s+/u) : !0 : !1; +} +function Xe(e) { + return !e.prev && e.isLeadingSpaceSensitive && !e.hasLeadingSpaces; +} +function Sa(e, t, r) { + let { node: n } = e; + if (!Ne(n.attrs)) return n.isSelfClosing ? " " : ""; + let i = n.prev?.kind === "comment" && _a(n.prev.value), s = typeof i == "boolean" ? () => i : Array.isArray(i) ? (d) => i.includes(d.rawName) : () => !1, a = e.map(({ node: d }) => s(d) ? L(t.originalText.slice(K(d), J(d))) : r(), "attrs"), o = n.kind === "element" && n.fullName === "script" && n.attrs.length === 1 && n.attrs[0].fullName === "src" && n.children.length === 0, u = t.singleAttributePerLine && n.attrs.length > 1 && !le(n, t) ? C : S, p = [A([o ? " " : S, B(u, a)])]; + return n.firstChild && Xe(n.firstChild) || n.isSelfClosing && pe(n.parent) || o ? p.push(n.isSelfClosing ? " " : "") : p.push(t.bracketSameLine ? n.isSelfClosing ? " " : "" : n.isSelfClosing ? S : k), p; +} +function Ea(e) { + return e.firstChild && Xe(e.firstChild) ? "" : At(e); +} +function Ke(e, t, r) { + let { node: n } = e; + return [ + me(n, t), + Sa(e, t, r), + n.isSelfClosing ? "" : Ea(n) + ]; +} +function me(e, t) { + return e.prev && je(e.prev) ? "" : [H(e, t), yt(e, t)]; +} +function H(e, t) { + return Xe(e) ? At(e.parent) : W(e) ? ue(e.prev, t) : ""; +} +function yt(e, t) { + switch (e.kind) { + case "ieConditionalComment": + case "ieConditionalStartComment": return `<${e.rawName}`; + default: return `<${e.rawName}`; + } +} +function At(e) { + switch (e.kind) { + case "ieConditionalComment": return "]>"; + case "element": if (e.condition) return ">"; + default: return ">"; + } +} +function Ca(e, t) { + if (!e.endSourceSpan) return ""; + let r = e.startSourceSpan.end.offset; + e.firstChild && Xe(e.firstChild) && (r -= At(e).length); + let n = e.endSourceSpan.start.offset; + return e.lastChild && he(e.lastChild) ? n += xt(e, t).length : pe(e) && (n -= ue(e.lastChild, t).length), t.originalText.slice(r, n); +} +function Ta(e, t) { + let { node: r } = e; + switch (r.kind) { + case "element": + if (q(r, t) || r.kind === "interpolation") return; + if (!r.isSelfClosing && Tt(r, t)) { + let n = tr(r, t); + return n ? async (i, s) => { + let a = Nt(r, t), o = /^\s*$/u.test(a), c = ""; + return o || (c = await i(Jt(a), { + parser: n, + __embeddedInHtml: !0 + }), o = c === ""), [ + H(r, t), + E(Ke(e, t, s)), + o ? "" : C, + c, + o ? "" : C, + Ye(r, t), + F(r, t) + ]; + } : void 0; + } + break; + case "text": + if (q(r.parent, t)) { + let n = tr(r.parent, t); + if (n) return async (i) => { + let s = n === "markdown" ? N.dedentString(r.value.replace(/^[^\S\n]*\n/u, "")) : r.value, a = { + parser: n, + __embeddedInHtml: !0 + }; + if (t.parser === "html" && n === "babel") { + let o = "script", { attrMap: c } = r.parent; + c && (c.type === "module" || (c.type === "text/babel" || c.type === "text/jsx") && c["data-type"] === "module") && (o = "module"), a.__babelSourceType = o; + } + return [ + Y, + H(r, t), + await i(s, a), + F(r, t) + ]; + }; + } else if (r.parent.kind === "interpolation") return async (n) => { + let i = { + __isInHtmlInterpolation: !0, + __embeddedInHtml: !0 + }; + return t.parser === "angular" ? i.parser = "__ng_interpolation" : t.parser === "vue" ? i.parser = U(e, t) ? "__vue_ts_expression" : "__vue_expression" : i.parser = "__js_expression", [A([S, await n(r.value, i)]), r.parent.next && W(r.parent.next) ? " " : S]; + }; + break; + case "attribute": return Wn(e, t); + case "angularControlFlowBlockParameters": return va.has(e.parent.name) ? Yr : void 0; + case "angularLetDeclarationInitializer": return (n) => x(r.value, n, { + parser: "__ng_binding", + __isInHtmlAttribute: !1 + }); + } +} +function Je(e) { + if (Qe !== null && typeof Qe.property) { + let t = Qe; + return Qe = Je.prototype = null, t; + } + return Qe = Je.prototype = e ?? Object.create(null), new Je(); +} +function ar(e) { + return Je(e); +} +function wa(e, t = "type") { + ar(e); + function r(n) { + let i = n[t], s = e[i]; + if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: n }); + return s; + } + return r; +} +function ni(e) { + let t = J(e); + return e.kind === "element" && !e.endSourceSpan && Ne(e.children) ? Math.max(t, ni(M(0, e.children, -1))) : t; +} +function Ze(e, t, r) { + let n = e.node; + if (oe(n)) { + let i = ni(n); + return [ + H(n, t), + L(N.trimEnd(t.originalText.slice(K(n) + (n.prev && je(n.prev) ? yt(n).length : 0), i - (n.next && W(n.next) ? ue(n, t).length : 0)))), + F(n, t) + ]; + } + return r(); +} +function Lt(e, t) { + return O(e) && O(t) ? e.isTrailingSpaceSensitive ? e.hasTrailingSpaces ? Ct(t) ? C : S : "" : Ct(t) ? C : k : je(e) && (oe(t) || t.firstChild || t.isSelfClosing || t.kind === "element" && t.attrs.length > 0) || e.kind === "element" && e.isSelfClosing && W(t) ? "" : !t.isLeadingSpaceSensitive || Ct(t) || W(t) && e.lastChild && he(e.lastChild) && e.lastChild.lastChild && he(e.lastChild.lastChild) ? C : t.hasLeadingSpaces ? S : k; +} +function Le(e, t, r) { + let { node: n } = e; + if (er(n)) return [Y, ...e.map(() => { + let s = e.node, a = s.prev ? Lt(s.prev, s) : ""; + return [a ? [a, Ge(s.prev) ? C : ""] : "", Ze(e, t, r)]; + }, "children")]; + let i = n.children.map(() => Symbol("")); + return e.map(({ node: s, index: a }) => { + if (O(s)) { + if (s.prev && O(s.prev)) { + let m = Lt(s.prev, s); + if (m) return Ge(s.prev) ? [ + C, + C, + Ze(e, t, r) + ] : [m, Ze(e, t, r)]; + } + return Ze(e, t, r); + } + let o = [], c = [], u = [], p = [], d = s.prev ? Lt(s.prev, s) : "", g = s.next ? Lt(s, s.next) : ""; + return d && (Ge(s.prev) ? o.push(C, C) : d === C ? o.push(C) : O(s.prev) ? c.push(d) : c.push(j("", k, { groupId: i[a - 1] }))), g && (Ge(s) ? O(s.next) && p.push(C, C) : g === C ? O(s.next) && p.push(C) : u.push(g)), [ + ...o, + E([...c, E([Ze(e, t, r), ...u], { id: i[a] })]), + ...p + ]; + }, "children"); +} +function ii(e, t, r) { + let { node: n } = e, i = []; + if (Na(e) && i.push("} "), i.push("@", n.name), ya(n)) return i.push(";"), i; + if (n.parameters && i.push(" (", E(r("parameters")), ")"), !Aa(n)) { + i.push(" {"); + let s = si(n); + n.children.length > 0 ? (n.firstChild.hasLeadingSpaces = !0, n.lastChild.hasTrailingSpaces = !0, i.push(A([C, Le(e, t, r)])), s && i.push(C, "}")) : s && i.push("}"); + } + return E(i, { shouldBreak: !0 }); +} +function si(e) { + return !(e.next?.kind === "angularControlFlowBlock" && ri.get(e.name)?.has(e.next.name)); +} +function Aa(e) { + return xa(e) && e.endSourceSpan && e.endSourceSpan.start.offset === e.endSourceSpan.end.offset; +} +function Na(e) { + let { previous: t } = e; + return t?.kind === "angularControlFlowBlock" && !oe(t) && !si(t); +} +function ai(e, t, r) { + return [A([k, B([";", S], e.map(r, "children"))]), k]; +} +function oi(e, t, r) { + let { node: n } = e; + return [ + me(n, t), + E([ + n.switchValue.trim(), + ", ", + n.type, + n.cases.length > 0 ? [",", A([S, B(S, e.map(r, "cases"))])] : "", + k + ]), + ce(n, t) + ]; +} +function li(e, t, r) { + let { node: n } = e; + return [ + n.value, + " {", + E([A([k, e.map(({ node: i, isLast: s }) => { + let a = [r()]; + return i.kind === "text" && (i.hasLeadingSpaces && a.unshift(S), i.hasTrailingSpaces && !s && a.push(S)), a; + }, "expression")]), k]), + "}" + ]; +} +function ci(e, t, r) { + let { node: n } = e; + if (Et(n, t)) return [ + H(n, t), + E(Ke(e, t, r)), + L(Nt(n, t)), + ...Ye(n, t), + F(n, t) + ]; + let i = n.children.length === 1 && (n.firstChild.kind === "interpolation" || n.firstChild.kind === "angularIcuExpression") && n.firstChild.isLeadingSpaceSensitive && !n.firstChild.hasLeadingSpaces && n.lastChild.isTrailingSpaceSensitive && !n.lastChild.hasTrailingSpaces, s = Symbol("element-attr-group-id"), a = (p) => E([ + E(Ke(e, t, r), { id: s }), + p, + Ye(n, t) + ]), o = (p) => i ? Fr(p, { groupId: s }) : (q(n, t) || $e(n, t)) && n.parent.kind === "root" && t.parser === "vue" && !t.vueIndentScriptAndStyle ? p : A(p), c = () => i ? j(k, "", { groupId: s }) : n.firstChild.hasLeadingSpaces && n.firstChild.isLeadingSpaceSensitive ? S : n.firstChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive ? qr(k) : k, u = () => (n.next ? W(n.next) : pe(n.parent)) ? n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? " " : "" : i ? j(k, "", { groupId: s }) : n.lastChild.hasTrailingSpaces && n.lastChild.isTrailingSpaceSensitive ? S : (n.lastChild.kind === "comment" || n.lastChild.kind === "text" && n.isWhitespaceSensitive && n.isIndentationSensitive) && new RegExp(`\\n[\\t ]{${t.tabWidth * (e.ancestors.length - 1)}}$`, "u").test(n.lastChild.value) ? "" : k; + return n.children.length === 0 ? a(n.hasDanglingSpaces && n.isDanglingSpaceSensitive ? S : "") : a([ + cn(n) ? Y : "", + o([c(), Le(e, t, r)]), + u() + ]); +} +function et(e, t = !0) { + if (e[0] != ":") return [null, e]; + let r = e.indexOf(":", 1); + if (r === -1) { + if (t) throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`); + return [null, e]; + } + return [e.slice(1, r), e.slice(r + 1)]; +} +function or(e) { + return et(e)[1] === "ng-container"; +} +function lr(e) { + return et(e)[1] === "ng-content"; +} +function Pe(e) { + return e === null ? null : et(e)[0]; +} +function fe(e, t) { + return e ? `:${e}:${t}` : t; +} +function ui(e) { + return e.replace(La, (...t) => t[1].toUpperCase()); +} +function pr() { + return Pt || (Pt = {}, tt(Z.HTML, [ + "iframe|srcdoc", + "*|innerHTML", + "*|outerHTML" + ]), tt(Z.STYLE, ["*|style"]), tt(Z.URL, [ + "*|formAction", + "area|href", + "a|href", + "a|xlink:href", + "form|action", + "annotation|href", + "annotation|xlink:href", + "annotation-xml|href", + "annotation-xml|xlink:href", + "maction|href", + "maction|xlink:href", + "malignmark|href", + "malignmark|xlink:href", + "math|href", + "math|xlink:href", + "mroot|href", + "mroot|xlink:href", + "msqrt|href", + "msqrt|xlink:href", + "merror|href", + "merror|xlink:href", + "mfrac|href", + "mfrac|xlink:href", + "mglyph|href", + "mglyph|xlink:href", + "msub|href", + "msub|xlink:href", + "msup|href", + "msup|xlink:href", + "msubsup|href", + "msubsup|xlink:href", + "mmultiscripts|href", + "mmultiscripts|xlink:href", + "mprescripts|href", + "mprescripts|xlink:href", + "mi|href", + "mi|xlink:href", + "mn|href", + "mn|xlink:href", + "mo|href", + "mo|xlink:href", + "mpadded|href", + "mpadded|xlink:href", + "mphantom|href", + "mphantom|xlink:href", + "mrow|href", + "mrow|xlink:href", + "ms|href", + "ms|xlink:href", + "mspace|href", + "mspace|xlink:href", + "mstyle|href", + "mstyle|xlink:href", + "mtable|href", + "mtable|xlink:href", + "mtd|href", + "mtd|xlink:href", + "mtr|href", + "mtr|xlink:href", + "mtext|href", + "mtext|xlink:href", + "mover|href", + "mover|xlink:href", + "munder|href", + "munder|xlink:href", + "munderover|href", + "munderover|xlink:href", + "semantics|href", + "semantics|xlink:href", + "none|href", + "none|xlink:href", + "img|src", + "video|src" + ]), tt(Z.RESOURCE_URL, [ + "base|href", + "embed|src", + "frame|src", + "iframe|src", + "link|href", + "object|codebase", + "object|data", + "script|src", + "script|href", + "script|xlink:href" + ]), tt(Z.ATTRIBUTE_NO_BINDING, [ + "animate|attributeName", + "animate|values", + "animate|to", + "animate|from", + "set|to", + "set|attributeName", + "animateMotion|attributeName", + "animateTransform|attributeName", + "unknown|attributeName", + "unknown|values", + "unknown|to", + "unknown|from", + "iframe|sandbox", + "iframe|allow", + "iframe|allowFullscreen", + "iframe|referrerPolicy", + "iframe|csp", + "iframe|fetchPriority", + "unknown|sandbox", + "unknown|allow", + "unknown|allowFullscreen", + "unknown|referrerPolicy", + "unknown|csp", + "unknown|fetchPriority" + ])), Pt; +} +function tt(e, t) { + for (let r of t) Pt[r.toLowerCase()] = e; +} +function Ba(e) { + switch (e) { + case "width": + case "height": + case "minWidth": + case "minHeight": + case "maxWidth": + case "maxHeight": + case "left": + case "top": + case "bottom": + case "right": + case "fontSize": + case "outlineWidth": + case "outlineOffset": + case "paddingTop": + case "paddingLeft": + case "paddingBottom": + case "paddingRight": + case "marginTop": + case "marginLeft": + case "marginBottom": + case "marginRight": + case "borderRadius": + case "borderWidth": + case "borderTopWidth": + case "borderLeftWidth": + case "borderRightWidth": + case "borderBottomWidth": + case "textIndent": return !0; + default: return !1; + } +} +function Oe(e) { + return rt || (fi = new f({ canSelfClose: !0 }), rt = Object.assign(Object.create(null), { + base: new f({ isVoid: !0 }), + meta: new f({ isVoid: !0 }), + area: new f({ isVoid: !0 }), + embed: new f({ isVoid: !0 }), + link: new f({ isVoid: !0 }), + img: new f({ isVoid: !0 }), + input: new f({ isVoid: !0 }), + param: new f({ isVoid: !0 }), + hr: new f({ isVoid: !0 }), + br: new f({ isVoid: !0 }), + source: new f({ isVoid: !0 }), + track: new f({ isVoid: !0 }), + wbr: new f({ isVoid: !0 }), + p: new f({ + closedByChildren: [ + "address", + "article", + "aside", + "blockquote", + "div", + "dl", + "fieldset", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "hr", + "main", + "nav", + "ol", + "p", + "pre", + "section", + "table", + "ul" + ], + closedByParent: !0 + }), + thead: new f({ closedByChildren: ["tbody", "tfoot"] }), + tbody: new f({ + closedByChildren: ["tbody", "tfoot"], + closedByParent: !0 + }), + tfoot: new f({ + closedByChildren: ["tbody"], + closedByParent: !0 + }), + tr: new f({ + closedByChildren: ["tr"], + closedByParent: !0 + }), + td: new f({ + closedByChildren: ["td", "th"], + closedByParent: !0 + }), + th: new f({ + closedByChildren: ["td", "th"], + closedByParent: !0 + }), + col: new f({ isVoid: !0 }), + svg: new f({ implicitNamespacePrefix: "svg" }), + foreignObject: new f({ + implicitNamespacePrefix: "svg", + preventNamespaceInheritance: !0 + }), + math: new f({ implicitNamespacePrefix: "math" }), + li: new f({ + closedByChildren: ["li"], + closedByParent: !0 + }), + dt: new f({ closedByChildren: ["dt", "dd"] }), + dd: new f({ + closedByChildren: ["dt", "dd"], + closedByParent: !0 + }), + rb: new f({ + closedByChildren: [ + "rb", + "rt", + "rtc", + "rp" + ], + closedByParent: !0 + }), + rt: new f({ + closedByChildren: [ + "rb", + "rt", + "rtc", + "rp" + ], + closedByParent: !0 + }), + rtc: new f({ + closedByChildren: [ + "rb", + "rtc", + "rp" + ], + closedByParent: !0 + }), + rp: new f({ + closedByChildren: [ + "rb", + "rt", + "rtc", + "rp" + ], + closedByParent: !0 + }), + optgroup: new f({ + closedByChildren: ["optgroup"], + closedByParent: !0 + }), + option: new f({ + closedByChildren: ["option", "optgroup"], + closedByParent: !0 + }), + pre: new f({ ignoreFirstLf: !0 }), + listing: new f({ ignoreFirstLf: !0 }), + style: new f({ contentType: R.RAW_TEXT }), + script: new f({ contentType: R.RAW_TEXT }), + title: new f({ contentType: { + default: R.ESCAPABLE_RAW_TEXT, + svg: R.PARSABLE_DATA + } }), + textarea: new f({ + contentType: R.ESCAPABLE_RAW_TEXT, + ignoreFirstLf: !0 + }) + }), new mi().allKnownElementNames().forEach((t) => { + !rt[t] && Pe(t) === null && (rt[t] = new f({ canSelfClose: !1 })); + })), rt[e] ?? fi; +} +function Ot(e, t, r = null) { + let n = [], i = e.visit ? (s) => e.visit(s, r) || s.visit(e, r) : (s) => s.visit(e, r); + return t.forEach((s) => { + let a = i(s); + a && n.push(a); + }), n; +} +function it(e) { + return e >= 9 && e <= 32 || e == 160; +} +function Ie(e) { + return 48 <= e && e <= 57; +} +function Re(e) { + return e >= 97 && e <= 122 || e >= 65 && e <= 90; +} +function ki(e) { + return e >= 97 && e <= 102 || e >= 65 && e <= 70 || Ie(e); +} +function Me(e) { + return e === 10 || e === 13; +} +function dr(e) { + return 48 <= e && e <= 55; +} +function Dt(e) { + return e === 39 || e === 34 || e === 96; +} +function Pi(e, t, r, n = {}) { + let i = new Ua(new nt(e, t), r, n); + return i.tokenize(), new qa(Xa(i.tokens), i.errors, i.nonNormalizedIcuExpressions); +} +function Se(e) { + return `Unexpected character "${e === 0 ? "EOF" : String.fromCharCode(e)}"`; +} +function xi(e) { + return `Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`; +} +function Ha(e, t) { + return `Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`; +} +function v(e) { + return !it(e) || e === 0; +} +function Ee(e) { + return it(e) || e === 62 || e === 60 || e === 47 || e === 39 || e === 34 || e === 61 || e === 0; +} +function Wa(e) { + return (e < 97 || 122 < e) && (e < 65 || 90 < e) && (e < 48 || e > 57); +} +function Ga(e) { + return e === 59 || e === 0 || !ki(e); +} +function za(e) { + return e === 59 || e === 0 || !(Re(e) || Ie(e)); +} +function $a(e) { + return e !== 125; +} +function Ya(e, t) { + return yi(e) === yi(t); +} +function yi(e) { + return e >= 97 && e <= 122 ? e - 97 + 65 : e; +} +function ja(e) { + return Re(e) || Ie(e) || e === 95; +} +function Ai(e) { + return e !== 59 && v(e); +} +function It(e) { + return e === 95 || e >= 65 && e <= 90; +} +function Ni(e) { + return Re(e) || Ie(e) || e === 95; +} +function Li(e) { + return e === 47 || e === 62 || e === 60 || e === 0; +} +function Xa(e) { + let t = [], r; + for (let n = 0; n < e.length; n++) { + let i = e[n]; + r && r.type === l.TEXT && i.type === l.TEXT || r && r.type === l.ATTR_VALUE_TEXT && i.type === l.ATTR_VALUE_TEXT ? (r.parts[0] += i.parts[0], r.sourceSpan.end = i.sourceSpan.end) : (r = i, t.push(r)); + } + return t; +} +function Di(e, t) { + return e.length > 0 && e[e.length - 1] === t; +} +function Ii(e, t) { + return _e[t] !== void 0 ? _e[t] || e : /^#x[a-f0-9]+$/i.test(t) ? String.fromCodePoint(parseInt(t.slice(2), 16)) : /^#\d+$/.test(t) ? String.fromCodePoint(parseInt(t.slice(1), 10)) : e; +} +function Rt(e, t = {}) { + let { canSelfClose: r = !1, allowHtmComponentClosingTags: n = !1, isTagNameCaseSensitive: i = !1, getTagContentType: s, tokenizeAngularBlocks: a = !1, tokenizeAngularLetDeclaration: o = !1, enableAngularSelectorlessSyntax: c = !1 } = t; + return Cr ?? (Cr = new qi()), Cr.parse(e, "angular-html-parser", { + tokenizeExpansionForms: a, + canSelfClose: r, + allowHtmComponentClosingTags: n, + tokenizeBlocks: a, + tokenizeLet: o, + selectorlessEnabled: c + }, i, s); +} +function eo(e, t) { + for (let r of Za) r(e, t); + return e; +} +function to(e) { + e.walk((t) => { + if (t.kind === "element" && t.tagDefinition.ignoreFirstLf && t.children.length > 0 && t.children[0].kind === "text" && t.children[0].value[0] === ` +`) { + let r = t.children[0]; + r.value.length === 1 ? t.removeChild(r) : r.value = r.value.slice(1); + } + }); +} +function ro(e) { + let t = (r) => r.kind === "element" && r.prev?.kind === "ieConditionalStartComment" && r.prev.sourceSpan.end.offset === r.startSourceSpan.start.offset && r.firstChild?.kind === "ieConditionalEndComment" && r.firstChild.sourceSpan.start.offset === r.startSourceSpan.end.offset; + e.walk((r) => { + if (r.children) for (let n = 0; n < r.children.length; n++) { + let i = r.children[n]; + if (!t(i)) continue; + let s = i.prev, a = i.firstChild; + r.removeChild(s), n--; + let o = new h(s.sourceSpan.start, a.sourceSpan.end), c = new h(o.start, i.sourceSpan.end); + i.condition = s.condition, i.sourceSpan = c, i.startSourceSpan = o, i.removeChild(a); + } + }); +} +function no(e, t, r) { + e.walk((n) => { + if (n.children) for (let i = 0; i < n.children.length; i++) { + let s = n.children[i]; + if (s.kind !== "text" && !t(s)) continue; + s.kind !== "text" && (s.kind = "text", s.value = r(s)); + let a = s.prev; + !a || a.kind !== "text" || (a.value += s.value, a.sourceSpan = new h(a.sourceSpan.start, s.sourceSpan.end), n.removeChild(s), i--); + } + }); +} +function io(e) { + return no(e, (t) => t.kind === "cdata", (t) => ``); +} +function so(e) { + let t = (r) => r.kind === "element" && r.attrs.length === 0 && r.children.length === 1 && r.firstChild.kind === "text" && !N.hasWhitespaceCharacter(r.children[0].value) && !r.firstChild.hasLeadingSpaces && !r.firstChild.hasTrailingSpaces && r.isLeadingSpaceSensitive && !r.hasLeadingSpaces && r.isTrailingSpaceSensitive && !r.hasTrailingSpaces && r.prev?.kind === "text" && r.next?.kind === "text"; + e.walk((r) => { + if (r.children) for (let n = 0; n < r.children.length; n++) { + let i = r.children[n]; + if (!t(i)) continue; + let s = i.prev, a = i.next; + s.value += `<${i.rawName}>` + i.firstChild.value + `` + a.value, s.sourceSpan = new h(s.sourceSpan.start, a.sourceSpan.end), s.isTrailingSpaceSensitive = a.isTrailingSpaceSensitive, s.hasTrailingSpaces = a.hasTrailingSpaces, r.removeChild(i), n--, r.removeChild(a); + } + }); +} +function ao(e, t) { + if (t.parser === "html") return; + let r = /\{\{(.+?)\}\}/su; + e.walk((n) => { + if (nn(n, t)) for (let i of n.children) { + if (i.kind !== "text") continue; + let s = i.sourceSpan.start, a = null, o = i.value.split(r); + for (let c = 0; c < o.length; c++, s = a) { + let u = o[c]; + if (c % 2 === 0) { + a = s.moveBy(u.length), u.length > 0 && n.insertChildBefore(i, { + kind: "text", + value: u, + sourceSpan: new h(s, a) + }); + continue; + } + a = s.moveBy(u.length + 4), n.insertChildBefore(i, { + kind: "interpolation", + sourceSpan: new h(s, a), + children: u.length === 0 ? [] : [{ + kind: "text", + value: u, + sourceSpan: new h(s.moveBy(2), a.moveBy(-2)) + }] + }); + } + n.removeChild(i); + } + }); +} +function oo(e, t) { + e.walk((r) => { + let n = r.$children; + if (!n) return; + if (n.length === 0 || n.length === 1 && n[0].kind === "text" && N.trim(n[0].value).length === 0) { + r.hasDanglingSpaces = n.length > 0, r.$children = []; + return; + } + let i = sn(r, t), s = Zt(r); + if (!i) for (let a = 0; a < n.length; a++) { + let o = n[a]; + if (o.kind !== "text") continue; + let { leadingWhitespace: c, text: u, trailingWhitespace: p } = rn(o.value), d = o.prev, g = o.next; + u ? (o.value = u, o.sourceSpan = new h(o.sourceSpan.start.moveBy(c.length), o.sourceSpan.end.moveBy(-p.length)), c && (d && (d.hasTrailingSpaces = !0), o.hasLeadingSpaces = !0), p && (o.hasTrailingSpaces = !0, g && (g.hasLeadingSpaces = !0))) : (r.removeChild(o), a--, (c || p) && (d && (d.hasTrailingSpaces = !0), g && (g.hasLeadingSpaces = !0))); + } + r.isWhitespaceSensitive = i, r.isIndentationSensitive = s; + }); +} +function lo(e) { + e.walk((t) => { + t.isSelfClosing = !t.children || t.kind === "element" && (t.tagDefinition.isVoid || t.endSourceSpan && t.startSourceSpan.start === t.endSourceSpan.start && t.startSourceSpan.end === t.endSourceSpan.end); + }); +} +function co(e, t) { + e.walk((r) => { + r.kind === "element" && (r.hasHtmComponentClosingTag = r.endSourceSpan && /^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset, r.endSourceSpan.end.offset))); + }); +} +function uo(e, t) { + e.walk((r) => { + r.cssDisplay = dn(r, t); + }); +} +function po(e, t) { + e.walk((r) => { + let { children: n } = r; + if (n) { + if (n.length === 0) { + r.isDanglingSpaceSensitive = ln(r, t); + return; + } + for (let i of n) i.isLeadingSpaceSensitive = an(i, t), i.isTrailingSpaceSensitive = on(i, t); + for (let i = 0; i < n.length; i++) { + let s = n[i]; + s.isLeadingSpaceSensitive = (i === 0 || s.prev.isTrailingSpaceSensitive) && s.isLeadingSpaceSensitive, s.isTrailingSpaceSensitive = (i === n.length - 1 || s.next.isLeadingSpaceSensitive) && s.isTrailingSpaceSensitive; + } + } + }); +} +function ho(e, t, r) { + let { node: n } = e; + switch (n.kind) { + case "root": return t.__onHtmlRoot && t.__onHtmlRoot(n), [E(Le(e, t, r)), C]; + case "element": + case "ieConditionalComment": return ci(e, t, r); + case "angularControlFlowBlock": return ii(e, t, r); + case "angularControlFlowBlockParameters": return ai(e, t, r); + case "angularControlFlowBlockParameter": return N.trim(n.expression); + case "angularLetDeclaration": return E([ + "@let ", + E([ + n.id, + " =", + E(A([S, r("init")])) + ]), + ";" + ]); + case "angularLetDeclarationInitializer": return n.value; + case "angularIcuExpression": return oi(e, t, r); + case "angularIcuCase": return li(e, t, r); + case "ieConditionalStartComment": + case "ieConditionalEndComment": return [me(n), ce(n)]; + case "interpolation": return [ + me(n, t), + ...e.map(r, "children"), + ce(n, t) + ]; + case "text": { + if (n.parent.kind === "interpolation") { + let o = /\n[^\S\n]*$/u, c = o.test(n.value); + return [L(c ? n.value.replace(o, "") : n.value), c ? C : ""]; + } + let i = H(n, t), s = bt(n), a = F(n, t); + return s[0] = [i, s[0]], s.push([s.pop(), a]), gt(s); + } + case "docType": return [E([ + me(n, t), + " ", + w(0, n.value.replace(/^html\b/iu, "html"), /\s+/gu, " ") + ]), ce(n, t)]; + case "comment": return [ + H(n, t), + L(t.originalText.slice(K(n), J(n))), + F(n, t) + ]; + case "attribute": { + if (n.value === null) return n.rawName; + let i = rr(n.value), s = kt(n, t) ? "" : Ur(i, "\""); + return [ + n.rawName, + "=", + s, + L(s === "\"" ? w(0, i, "\"", """) : w(0, i, "'", "'")), + s + ]; + } + default: throw new Gr(n, "HTML"); + } +} +function go(e, t) { + let r = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(r, t); +} +function Mt(e) { + return { + ..._o, + ...e + }; +} +function Tr(e) { + let { canSelfClose: t, allowHtmComponentClosingTags: r, isTagNameCaseSensitive: n, shouldParseAsRawText: i, tokenizeAngularBlocks: s, tokenizeAngularLetDeclaration: a } = e; + return { + canSelfClose: t, + allowHtmComponentClosingTags: r, + isTagNameCaseSensitive: n, + getTagContentType: i ? (...o) => i(...o) ? R.RAW_TEXT : void 0 : void 0, + tokenizeAngularBlocks: s, + tokenizeAngularLetDeclaration: a + }; +} +function So(e, t) { + let r = e.map(t); + return r.some((n, i) => n !== e[i]) ? r : e; +} +function Yi(e, t) { + if (e.value) for (let { regex: r, parse: n } of Eo) { + let i = e.value.match(r); + if (i) return n(e, i, t); + } + return null; +} +function Co(e, t, r) { + let { openingTagSuffix: n, condition: i, data: s } = t.groups, a = 4 + n.length, o = e.sourceSpan.start.moveBy(a), c = o.moveBy(s.length), [u, p] = (() => { + try { + return [!0, r(s, o).children]; + } catch { + return [!1, [{ + kind: "text", + value: s, + sourceSpan: new h(o, c) + }]]; + } + })(); + return { + kind: "ieConditionalComment", + complete: u, + children: p, + condition: w(0, i.trim(), /\s+/gu, " "), + sourceSpan: e.sourceSpan, + startSourceSpan: new h(e.sourceSpan.start, o), + endSourceSpan: new h(c, e.sourceSpan.end) + }; +} +function vo(e, t) { + let { condition: r } = t.groups; + return { + kind: "ieConditionalStartComment", + condition: w(0, r.trim(), /\s+/gu, " "), + sourceSpan: e.sourceSpan + }; +} +function To(e) { + return { + kind: "ieConditionalEndComment", + sourceSpan: e.sourceSpan + }; +} +function Ki(e, t, r, n) { + Ot(new kr(), e.children, { parseOptions: r }), t && e.children.unshift(t); + let i = new Ft(e); + return i.walk((s) => { + if (s.kind === "comment") { + let a = Yi(s, n); + a && s.parent.replaceChild(s, a); + } + bo(s), wo(s), ko(s); + }), i; +} +function bo(e) { + if (e.kind === "block") { + if (e.name = w(0, e.name.toLowerCase(), /\s+/gu, " ").trim(), e.kind = "angularControlFlowBlock", !Ne(e.parameters)) { + delete e.parameters; + return; + } + for (let t of e.parameters) t.kind = "angularControlFlowBlockParameter"; + e.parameters = { + kind: "angularControlFlowBlockParameters", + children: e.parameters, + sourceSpan: new h(e.parameters[0].sourceSpan.start, M(0, e.parameters, -1).sourceSpan.end) + }; + } +} +function wo(e) { + e.kind === "letDeclaration" && (e.kind = "angularLetDeclaration", e.id = e.name, e.init = { + kind: "angularLetDeclarationInitializer", + sourceSpan: new h(e.valueSpan.start, e.valueSpan.end), + value: e.value + }, delete e.name, delete e.value); +} +function ko(e) { + e.kind === "expansion" && (e.kind = "angularIcuExpression"), e.kind === "expansionCase" && (e.kind = "angularIcuCase"); +} +function ji(e, t) { + let r = e.toLowerCase(); + return t(r) ? r : e; +} +function Xi(e) { + let t = e.name.startsWith(":") ? e.name.slice(1).split(":")[0] : null, r = e.nameSpan.toString(), n = t !== null && r.startsWith(`${t}:`); + e.name = n ? r.slice(t.length + 1) : r, e.namespace = t, e.hasExplicitNamespace = n; +} +function xo(e) { + switch (e.kind) { + case "element": + Xi(e); + for (let t of e.attrs) Xi(t), t.valueSpan ? (t.value = t.valueSpan.toString(), /["']/u.test(t.value[0]) && (t.value = t.value.slice(1, -1))) : t.value = null; + break; + case "comment": + e.value = e.sourceSpan.toString().slice(4, -3); + break; + case "text": + e.value = e.sourceSpan.toString(); + break; + } +} +function yo(e, t) { + if (e.kind === "element") { + let r = Oe(t.isTagNameCaseSensitive ? e.name : e.name.toLowerCase()); + !e.namespace || e.namespace === r.implicitNamespacePrefix || se(e) ? e.tagDefinition = r : e.tagDefinition = Oe(""); + } +} +function Ao(e) { + e.sourceSpan && e.endSourceSpan && (e.sourceSpan = new h(e.sourceSpan.start, e.endSourceSpan.end)); +} +function No(e, t) { + if (e.kind === "element" && (t.normalizeTagName && (!e.namespace || e.namespace === e.tagDefinition.implicitNamespacePrefix || se(e)) && (e.name = ji(e.name, (r) => zi.has(r))), t.normalizeAttributeName)) for (let r of e.attrs) r.namespace || (r.name = ji(r.name, (n) => Bt.has(e.name) && (Bt.get("*").has(n) || Bt.get(e.name).has(n)))); +} +function yr(e, t) { + let { rootNodes: r, errors: n } = Rt(e, Tr(t)); + return n.length > 0 && xr(n[0]), { + parseOptions: t, + rootNodes: r + }; +} +function Qi(e, t) { + let r = Tr(t), { rootNodes: n, errors: i } = Rt(e, r); + if (n.some((u) => u.kind === "docType" && u.value === "html" || u.kind === "element" && u.name.toLowerCase() === "html")) return yr(e, Ht); + let a, o = () => a ?? (a = Rt(e, { + ...r, + getTagContentType: void 0 + })), c = (u) => { + let { offset: p } = u.startSourceSpan.start; + return o().rootNodes.find((d) => d.kind === "element" && d.startSourceSpan.start.offset === p) ?? u; + }; + for (let [u, p] of n.entries()) if (p.kind === "element") { + if (p.isVoid) i = o().errors, n[u] = c(p); + else if (Lo(p)) { + let { endSourceSpan: d, startSourceSpan: g } = p, m = o().errors.find((_) => _.span.start.offset > g.start.offset && _.span.start.offset < d.end.offset); + m && xr(m), n[u] = c(p); + } + } + return i.length > 0 && xr(i[0]), { + parseOptions: t, + rootNodes: n + }; +} +function Lo(e) { + if (e.kind !== "element" || e.name !== "template") return !1; + let t = e.attrs.find((r) => r.name === "lang")?.value; + return !t || t === "html"; +} +function xr(e) { + let { msg: t, span: { start: r, end: n } } = e; + throw Gi(t, { + loc: { + start: { + line: r.line + 1, + column: r.col + 1 + }, + end: { + line: n.line + 1, + column: n.col + 1 + } + }, + cause: e + }); +} +function Po(e, t, r, n, i, s) { + let { offset: a } = n, c = Ar(w(0, t.slice(0, a), /[^\n]/gu, " ") + r, e, { + ...i, + shouldParseFrontMatter: !1 + }, s); + c.sourceSpan = new h(n, M(0, c.children, -1).sourceSpan.end); + let u = c.children[0]; + return u.length === a ? c.children.shift() : (u.sourceSpan = new h(u.sourceSpan.start.moveBy(a), u.sourceSpan.end), u.value = u.value.slice(a)), c; +} +function Ar(e, t, r, n = {}) { + let { frontMatter: i, content: s } = r.shouldParseFrontMatter ? Xt(e) : { content: e }, a = new nt(e, n.filepath), o = new De(a, 0, 0, 0), c = o.moveBy(e.length), { parseOptions: u, rootNodes: p } = t(s, r), d = { + kind: "root", + sourceSpan: new h(o, c), + children: p + }, g; + if (i) { + let [_, T] = [i.start, i.end].map((P) => new De(a, P.index, P.line - 1, P.column)); + g = { + ...i, + kind: "frontMatter", + sourceSpan: new h(_, T) + }; + } + return Ki(d, g, u, (_, T) => Po(t, e, _, T, u, n)); +} +function at(e) { + let t = Mt(e), r = t.name === "vue" ? Qi : yr; + return { + parse: (n, i) => Ar(n, r, t, i), + hasPragma: Zn, + hasIgnorePragma: ei, + astFormat: "html", + locStart: K, + locEnd: J + }; +} +var Lr, Pr, Zi, Or, Ut, es, Fe, Dr, Ji, ve, ts, w, M, ss, He, Ve, Ue, lt, Te, be, ct, we, ke, xe, ye, ut, pt, $, ht, Ae, mt, ft, os, Wt, Ir, D, dt, Mr, Br, Y, S, k, C, Rr, Hr, Vr, hs, ms, Ur, $t, N, Yt, Gr, _s, Ss, $r, Yr, Cs, jr, bs, Kr, Qr, Ne, As, _t, St, ie, We, Xt, en, Kt, tn, Qt, se, Is, Jt, rn, Ys, En, Cn, nr, Xs, Tn, bn, wn, Js, kn, xn, yn, An, ea, ta, ra, na, Pn, ia, On, Dn, In, aa, Mn, Bn, sr, U, ca, ha, Wn, K, J, Gn, Nt, va, $n, Qe, ba, Yn, I, Xn, Kn, Qn, Jn, Zn, ei, ti, ri, xa, ya, R, cr, ur, Z, La, Pt, pi, Pa, Oa, Da, Ia, Ra, hi, Ma, mi, f, fi, rt, De, nt, h, di, ee, de, _i, Si, Ei, Ci, vi, te, Ti, bi, ge, G, wi, hr, mr, fr, _e, l, qa, Fa, gr, Va, st, Ua, Oi, Ka, Er, y, Qa, Mi, Ja, qi, Cr, Za, Fi, Hi, Vi, vr, Ui, Wi, Nr, Gi, _o, Bt, zi, qt, $i, re, br, wr, Be, Ft, Eo, kr, Ht, Oo, Do, Io, Ro, Mo, Bo, qo; +//#endregion +__esmMin((() => { + Lr = Object.defineProperty; + Pr = (e) => { + throw TypeError(e); + }; + Zi = (e, t, r) => t in e ? Lr(e, t, { + enumerable: !0, + configurable: !0, + writable: !0, + value: r + }) : e[t] = r; + Or = (e, t) => { + for (var r in t) Lr(e, r, { + get: t[r], + enumerable: !0 + }); + }; + Ut = (e, t, r) => Zi(e, typeof t != "symbol" ? t + "" : t, r), es = (e, t, r) => t.has(e) || Pr("Cannot " + r); + Fe = (e, t, r) => (es(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Dr = (e, t, r) => t.has(e) ? Pr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r); + Ji = {}; + Or(Ji, { + languages: () => Vi, + options: () => Wi, + parsers: () => Nr, + printers: () => qo + }); + ve = (e, t) => (r, n, ...i) => r | 1 && n == null ? void 0 : (t.call(n) ?? n[e]).apply(n, i); + ts = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, w = ve("replaceAll", function() { + if (typeof this == "string") return ts; + }); + M = ve("at", function() { + if (Array.isArray(this) || typeof this == "string") return ns; + }); + ss = () => {}, He = ss; + Ve = "string", Ue = "array", lt = "cursor", Te = "indent", be = "align", ct = "trim", we = "group", ke = "fill", xe = "if-break", ye = "indent-if-break", ut = "line-suffix", pt = "line-suffix-boundary", $ = "line", ht = "label", Ae = "break-parent", mt = /* @__PURE__ */ new Set([ + lt, + Te, + be, + ct, + we, + ke, + xe, + ye, + ut, + pt, + $, + ht, + Ae + ]); + ft = as; + os = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e); + Wt = class extends Error { + name = "InvalidDocError"; + constructor(t) { + super(ls(t)), this.doc = t; + } + }, Ir = Wt; + D = He, dt = He, Mr = He, Br = He; + Y = { type: Ae }; + S = { type: $ }, k = { + type: $, + soft: !0 + }, C = [{ + type: $, + hard: !0 + }, Y], Rr = [{ + type: $, + hard: !0, + literal: !0 + }, Y]; + Hr = Object.freeze({ + character: "'", + codePoint: 39 + }), Vr = Object.freeze({ + character: "\"", + codePoint: 34 + }), hs = Object.freeze({ + preferred: Hr, + alternate: Vr + }), ms = Object.freeze({ + preferred: Vr, + alternate: Hr + }); + Ur = fs; + $t = class { + #e; + constructor(t) { + this.#e = new Set(t); + } + getLeadingWhitespaceCount(t) { + let r = this.#e, n = 0; + for (let i = 0; i < t.length && r.has(t.charAt(i)); i++) n++; + return n; + } + getTrailingWhitespaceCount(t) { + let r = this.#e, n = 0; + for (let i = t.length - 1; i >= 0 && r.has(t.charAt(i)); i--) n++; + return n; + } + getLeadingWhitespace(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(0, r); + } + getTrailingWhitespace(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(t.length - r); + } + hasLeadingWhitespace(t) { + return this.#e.has(t.charAt(0)); + } + hasTrailingWhitespace(t) { + return this.#e.has(M(0, t, -1)); + } + trimStart(t) { + let r = this.getLeadingWhitespaceCount(t); + return t.slice(r); + } + trimEnd(t) { + let r = this.getTrailingWhitespaceCount(t); + return t.slice(0, t.length - r); + } + trim(t) { + return this.trimEnd(this.trimStart(t)); + } + split(t, r = !1) { + let n = `[${zt([...this.#e].join(""))}]+`, i = new RegExp(r ? `(${n})` : n, "u"); + return t.split(i); + } + hasWhitespaceCharacter(t) { + let r = this.#e; + return Array.prototype.some.call(t, (n) => r.has(n)); + } + hasNonWhitespaceCharacter(t) { + let r = this.#e; + return Array.prototype.some.call(t, (n) => !r.has(n)); + } + isWhitespaceOnly(t) { + let r = this.#e; + return Array.prototype.every.call(t, (n) => r.has(n)); + } + #t(t) { + let r = Number.POSITIVE_INFINITY; + for (let n of t.split(` +`)) { + if (n.length === 0) continue; + let i = this.getLeadingWhitespaceCount(n); + if (i === 0) return 0; + n.length !== i && i < r && (r = i); + } + return r === Number.POSITIVE_INFINITY ? 0 : r; + } + dedentString(t) { + let r = this.#t(t); + return r === 0 ? t : t.split(` +`).map((n) => n.slice(r)).join(` +`); + } + }; + N = new $t([ + " ", + ` +`, + "\f", + "\r", + " " + ]); + Yt = class extends Error { + name = "UnexpectedNodeError"; + constructor(t, r, n = "type") { + super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`), this.node = t; + } + }, Gr = Yt; + _s = /* @__PURE__ */ new Set([ + "sourceSpan", + "startSourceSpan", + "endSourceSpan", + "nameSpan", + "valueSpan", + "keySpan", + "tagDefinition", + "tokens", + "valueTokens", + "switchValueSourceSpan", + "expSourceSpan", + "valueSourceSpan" + ]), Ss = /* @__PURE__ */ new Set([ + "if", + "else if", + "for", + "switch", + "case" + ]); + zr.ignoredProperties = _s; + $r = zr; + Yr = Es; + Cs = Array.prototype.toReversed ?? function() { + return [...this].reverse(); + }, jr = ve("toReversed", function() { + if (Array.isArray(this)) return Cs; + }); + bs = Ts(); + Kr = (e) => String(e).split(/[/\\]/u).pop(), Qr = (e) => String(e).startsWith("file:"); + Ne = xs; + As = void 0; + _t = Ns; + St = Symbol.for("PRETTIER_IS_FRONT_MATTER"); + ie = Ls; + We = 3; + Xt = Os; + en = "inline", Kt = { + area: "none", + base: "none", + basefont: "none", + datalist: "none", + head: "none", + link: "none", + meta: "none", + noembed: "none", + noframes: "none", + param: "block", + rp: "none", + script: "block", + style: "none", + template: "inline", + title: "none", + html: "block", + body: "block", + address: "block", + blockquote: "block", + center: "block", + dialog: "block", + div: "block", + figure: "block", + figcaption: "block", + footer: "block", + form: "block", + header: "block", + hr: "block", + legend: "block", + listing: "block", + main: "block", + p: "block", + plaintext: "block", + pre: "block", + search: "block", + xmp: "block", + slot: "contents", + ruby: "ruby", + rt: "ruby-text", + article: "block", + aside: "block", + h1: "block", + h2: "block", + h3: "block", + h4: "block", + h5: "block", + h6: "block", + hgroup: "block", + nav: "block", + section: "block", + dir: "block", + dd: "block", + dl: "block", + dt: "block", + menu: "block", + ol: "block", + ul: "block", + li: "list-item", + table: "table", + caption: "table-caption", + colgroup: "table-column-group", + col: "table-column", + thead: "table-header-group", + tbody: "table-row-group", + tfoot: "table-footer-group", + tr: "table-row", + td: "table-cell", + th: "table-cell", + input: "inline-block", + button: "inline-block", + fieldset: "block", + details: "block", + summary: "block", + marquee: "inline-block", + select: "inline-block", + source: "block", + track: "block", + meter: "inline-block", + progress: "inline-block", + object: "inline-block", + video: "inline-block", + audio: "inline-block", + option: "block", + optgroup: "block" + }, tn = "normal", Qt = { + listing: "pre", + plaintext: "pre", + pre: "pre", + xmp: "pre", + nobr: "nowrap", + table: "initial", + textarea: "pre-wrap" + }; + se = Ds; + Is = (e) => w(0, e, /^[\t\f\r ]*\n/gu, ""), Jt = (e) => Is(N.trimEnd(e)), rn = (e) => { + let t = e, r = N.getLeadingWhitespace(t); + r && (t = t.slice(r.length)); + let n = N.getTrailingWhitespace(t); + return n && (t = t.slice(0, -n.length)), { + leadingWhitespace: r, + trailingWhitespace: n, + text: t + }; + }; + Ys = /* @__PURE__ */ new Set([ + "template", + "style", + "script" + ]); + En = /\{\{(.+?)\}\}/su, Cn = ({ node: { value: e } }) => En.test(e); + nr = (e) => (t, r, n) => x(b(n.node), t, { parser: e }, V), Xs = [ + { + test(e) { + let t = e.node.fullName; + return t.startsWith("(") && t.endsWith(")") || t.startsWith("on-"); + }, + print: nr("__ng_action") + }, + { + test(e) { + let t = e.node.fullName; + return t.startsWith("[") && t.endsWith("]") || /^bind(?:on)?-/u.test(t) || /^ng-(?:if|show|hide|class|style)$/u.test(t); + }, + print: nr("__ng_binding") + }, + { + test: (e) => e.node.fullName.startsWith("*"), + print: nr("__ng_directive") + }, + { + test: (e) => /^i18n(?:-.+)?$/u.test(e.node.fullName), + print: Ks + }, + { + test: Cn, + print: vn + } + ].map(({ test: e, print: t }) => ({ + test: (r, n) => n.parser === "angular" && e(r), + print: t + })); + Tn = Xs; + bn = ({ node: e }, t) => !t.parentParser && e.fullName === "class" && !e.value.includes("{{"), wn = (e, t, r) => b(r.node).trim().split(/\s+/u).join(" "); + Js = /* @__PURE__ */ new Set([ + "onabort", + "onafterprint", + "onauxclick", + "onbeforeinput", + "onbeforematch", + "onbeforeprint", + "onbeforetoggle", + "onbeforeunload", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncommand", + "oncontextlost", + "oncontextmenu", + "oncontextrestored", + "oncopy", + "oncuechange", + "oncut", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "onformdata", + "onhashchange", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmessage", + "onmessageerror", + "onmousedown", + "onmouseenter", + "onmouseleave", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onoffline", + "ononline", + "onpagehide", + "onpagereveal", + "onpageshow", + "onpageswap", + "onpaste", + "onpause", + "onplay", + "onplaying", + "onpopstate", + "onprogress", + "onratechange", + "onrejectionhandled", + "onreset", + "onresize", + "onscroll", + "onscrollend", + "onsecuritypolicyviolation", + "onseeked", + "onseeking", + "onselect", + "onslotchange", + "onstalled", + "onstorage", + "onsubmit", + "onsuspend", + "ontimeupdate", + "ontoggle", + "onunhandledrejection", + "onunload", + "onvolumechange", + "onwaiting", + "onwheel" + ]), kn = ({ node: e }, t) => Js.has(e.fullName) && !t.parentParser && !e.value.includes("{{"), xn = (e, t, r) => x(b(r.node), e, { + parser: "babel", + __isHtmlInlineEventHandler: !0 + }, () => !1); + yn = Zs; + An = ({ node: e }, t) => e.fullName === "allow" && !t.parentParser && e.parent.fullName === "iframe" && !e.value.includes("{{"); + ea = /^[ \t\n\r\u000c]+/, ta = /^[, \t\n\r\u000c]+/, ra = /^[^ \t\n\r\u000c]+/, na = /[,]+$/, Pn = /^\d+$/, ia = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/; + On = sa; + Dn = (e) => e.node.fullName === "srcset" && (e.parent.fullName === "img" || e.parent.fullName === "source"), In = { + width: "w", + height: "h", + density: "x" + }, aa = Object.keys(In); + Mn = ({ node: e }, t) => e.fullName === "style" && !t.parentParser && !e.value.includes("{{"), Bn = async (e, t, r) => X(await e(b(r.node), { + parser: "css", + __isHTMLStyleAttribute: !0 + })); + sr = /* @__PURE__ */ new WeakMap(); + U = oa; + ca = [ + { + test: (e) => e.node.fullName === "v-for", + print: Hn + }, + { + test: (e, t) => e.node.fullName === "generic" && wt(e.parent, t), + print: qn + }, + { + test: ({ node: e }, t) => _n(e) || Sn(e, t), + print: Fn + }, + { + test(e) { + let t = e.node.fullName; + return t.startsWith("@") || t.startsWith("v-on:"); + }, + print: ua + }, + { + test(e) { + let t = e.node.fullName; + return t.startsWith(":") || t.startsWith(".") || t.startsWith("v-bind:"); + }, + print: pa + }, + { + test: (e) => e.node.fullName.startsWith("v-"), + print: Vn + } + ].map(({ test: e, print: t }) => ({ + test: (r, n) => n.parser === "vue" && e(r, n), + print: t + })); + ha = [ + { + test: Dn, + print: Rn + }, + { + test: Mn, + print: Bn + }, + { + test: kn, + print: xn + }, + { + test: bn, + print: wn + }, + { + test: An, + print: Nn + }, + ...ca, + ...Tn + ].map(({ test: e, print: t }) => ({ + test: e, + print: fa(t) + })); + Wn = ma; + K = (e) => e.sourceSpan.start.offset, J = (e) => e.sourceSpan.end.offset; + Gn = "/u, Jn = /^\s*/u; + Zn = (e) => Jn.test(e), ei = (e) => Qn.test(e), ti = (e) => ` + +${e}`; + ri = /* @__PURE__ */ new Map([ + ["if", /* @__PURE__ */ new Set(["else if", "else"])], + ["else if", /* @__PURE__ */ new Set(["else if", "else"])], + ["for", /* @__PURE__ */ new Set(["empty"])], + ["defer", /* @__PURE__ */ new Set([ + "placeholder", + "error", + "loading" + ])], + ["placeholder", /* @__PURE__ */ new Set([ + "placeholder", + "error", + "loading" + ])], + ["error", /* @__PURE__ */ new Set([ + "placeholder", + "error", + "loading" + ])], + ["loading", /* @__PURE__ */ new Set([ + "placeholder", + "error", + "loading" + ])] + ]); + xa = (e) => e?.kind === "angularControlFlowBlock" && (e.name === "case" || e.name === "default"), ya = (e) => e?.kind === "angularControlFlowBlock" && e.name === "default never"; + R = (function(e) { + return e[e.RAW_TEXT = 0] = "RAW_TEXT", e[e.ESCAPABLE_RAW_TEXT = 1] = "ESCAPABLE_RAW_TEXT", e[e.PARSABLE_DATA = 2] = "PARSABLE_DATA", e; + })({}); + cr = { name: "custom-elements" }, ur = { name: "no-errors-schema" }, Z = (function(e) { + return e[e.NONE = 0] = "NONE", e[e.HTML = 1] = "HTML", e[e.STYLE = 2] = "STYLE", e[e.SCRIPT = 3] = "SCRIPT", e[e.URL = 4] = "URL", e[e.RESOURCE_URL = 5] = "RESOURCE_URL", e[e.ATTRIBUTE_NO_BINDING = 6] = "ATTRIBUTE_NO_BINDING", e; + })({}); + La = /-+([a-z0-9])/g; + pi = class {}; + Pa = "boolean", Oa = "number", Da = "string", Ia = "object", Ra = [ + "[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored", + "[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", + "abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy", + "media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume", + ":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", + ":svg:graphics^:svg:|", + ":svg:animation^:svg:|*begin,*end,*repeat", + ":svg:geometry^:svg:|", + ":svg:componentTransferFunction^:svg:|", + ":svg:gradient^:svg:|", + ":svg:textContent^:svg:graphics|", + ":svg:textPositioning^:svg:textContent|", + "a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username", + "area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username", + "audio^media|", + "br^[HTMLElement]|clear", + "base^[HTMLElement]|href,target", + "body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink", + "button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value", + "canvas^[HTMLElement]|#height,#width", + "content^[HTMLElement]|select", + "dl^[HTMLElement]|!compact", + "data^[HTMLElement]|value", + "datalist^[HTMLElement]|", + "details^[HTMLElement]|!open", + "dialog^[HTMLElement]|!open,returnValue", + "dir^[HTMLElement]|!compact", + "div^[HTMLElement]|align", + "embed^[HTMLElement]|align,height,name,src,type,width", + "fieldset^[HTMLElement]|!disabled,name", + "font^[HTMLElement]|color,face,size", + "form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target", + "frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src", + "frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows", + "geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch", + "hr^[HTMLElement]|align,color,!noShade,size,width", + "head^[HTMLElement]|", + "h1,h2,h3,h4,h5,h6^[HTMLElement]|align", + "html^[HTMLElement]|version", + "iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width", + "img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width", + "input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width", + "li^[HTMLElement]|type,#value", + "label^[HTMLElement]|htmlFor", + "legend^[HTMLElement]|align", + "link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type", + "map^[HTMLElement]|name", + "marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width", + "menu^[HTMLElement]|!compact", + "meta^[HTMLElement]|content,httpEquiv,media,name,scheme", + "meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value", + "ins,del^[HTMLElement]|cite,dateTime", + "ol^[HTMLElement]|!compact,!reversed,#start,type", + "object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width", + "optgroup^[HTMLElement]|!disabled,label", + "option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value", + "output^[HTMLElement]|defaultValue,%htmlFor,name,value", + "p^[HTMLElement]|align", + "param^[HTMLElement]|name,type,value,valueType", + "picture^[HTMLElement]|", + "pre^[HTMLElement]|#width", + "progress^[HTMLElement]|#max,#value", + "q,blockquote,cite^[HTMLElement]|", + "script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type", + "select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value", + "selectedcontent^[HTMLElement]|", + "slot^[HTMLElement]|name", + "source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width", + "span^[HTMLElement]|", + "style^[HTMLElement]|!disabled,media,type", + "search^[HTMLELement]|", + "caption^[HTMLElement]|align", + "th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width", + "col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width", + "table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width", + "tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign", + "tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign", + "template^[HTMLElement]|", + "textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap", + "time^[HTMLElement]|dateTime", + "title^[HTMLElement]|text", + "track^[HTMLElement]|!default,kind,label,src,srclang", + "ul^[HTMLElement]|!compact,type", + "unknown^[HTMLElement]|", + "video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width", + ":svg:a^:svg:graphics|", + ":svg:animate^:svg:animation|", + ":svg:animateMotion^:svg:animation|", + ":svg:animateTransform^:svg:animation|", + ":svg:circle^:svg:geometry|", + ":svg:clipPath^:svg:graphics|", + ":svg:defs^:svg:graphics|", + ":svg:desc^:svg:|", + ":svg:discard^:svg:|", + ":svg:ellipse^:svg:geometry|", + ":svg:feBlend^:svg:|", + ":svg:feColorMatrix^:svg:|", + ":svg:feComponentTransfer^:svg:|", + ":svg:feComposite^:svg:|", + ":svg:feConvolveMatrix^:svg:|", + ":svg:feDiffuseLighting^:svg:|", + ":svg:feDisplacementMap^:svg:|", + ":svg:feDistantLight^:svg:|", + ":svg:feDropShadow^:svg:|", + ":svg:feFlood^:svg:|", + ":svg:feFuncA^:svg:componentTransferFunction|", + ":svg:feFuncB^:svg:componentTransferFunction|", + ":svg:feFuncG^:svg:componentTransferFunction|", + ":svg:feFuncR^:svg:componentTransferFunction|", + ":svg:feGaussianBlur^:svg:|", + ":svg:feImage^:svg:|", + ":svg:feMerge^:svg:|", + ":svg:feMergeNode^:svg:|", + ":svg:feMorphology^:svg:|", + ":svg:feOffset^:svg:|", + ":svg:fePointLight^:svg:|", + ":svg:feSpecularLighting^:svg:|", + ":svg:feSpotLight^:svg:|", + ":svg:feTile^:svg:|", + ":svg:feTurbulence^:svg:|", + ":svg:filter^:svg:|", + ":svg:foreignObject^:svg:graphics|", + ":svg:g^:svg:graphics|", + ":svg:image^:svg:graphics|decoding", + ":svg:line^:svg:geometry|", + ":svg:linearGradient^:svg:gradient|", + ":svg:mpath^:svg:|", + ":svg:marker^:svg:|", + ":svg:mask^:svg:|", + ":svg:metadata^:svg:|", + ":svg:path^:svg:geometry|", + ":svg:pattern^:svg:|", + ":svg:polygon^:svg:geometry|", + ":svg:polyline^:svg:geometry|", + ":svg:radialGradient^:svg:gradient|", + ":svg:rect^:svg:geometry|", + ":svg:svg^:svg:graphics|#currentScale,#zoomAndPan", + ":svg:script^:svg:|type", + ":svg:set^:svg:animation|", + ":svg:stop^:svg:|", + ":svg:style^:svg:|!disabled,media,title,type", + ":svg:switch^:svg:graphics|", + ":svg:symbol^:svg:|", + ":svg:tspan^:svg:textPositioning|", + ":svg:text^:svg:textPositioning|", + ":svg:textPath^:svg:textContent|", + ":svg:title^:svg:|", + ":svg:use^:svg:graphics|", + ":svg:view^:svg:|#zoomAndPan", + "data^[HTMLElement]|value", + "keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name", + "menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default", + "summary^[HTMLElement]|", + "time^[HTMLElement]|dateTime", + ":svg:cursor^:svg:|", + ":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex", + ":math:math^:math:|", + ":math:maction^:math:|", + ":math:menclose^:math:|", + ":math:merror^:math:|", + ":math:mfenced^:math:|", + ":math:mfrac^:math:|", + ":math:mi^:math:|", + ":math:mmultiscripts^:math:|", + ":math:mn^:math:|", + ":math:mo^:math:|", + ":math:mover^:math:|", + ":math:mpadded^:math:|", + ":math:mphantom^:math:|", + ":math:mroot^:math:|", + ":math:mrow^:math:|", + ":math:ms^:math:|", + ":math:mspace^:math:|", + ":math:msqrt^:math:|", + ":math:mstyle^:math:|", + ":math:msub^:math:|", + ":math:msubsup^:math:|", + ":math:msup^:math:|", + ":math:mtable^:math:|", + ":math:mtd^:math:|", + ":math:mtext^:math:|", + ":math:mtr^:math:|", + ":math:munder^:math:|", + ":math:munderover^:math:|", + ":math:semantics^:math:|" + ], hi = new Map(Object.entries({ + class: "className", + for: "htmlFor", + formaction: "formAction", + innerHtml: "innerHTML", + readonly: "readOnly", + tabindex: "tabIndex", + "aria-activedescendant": "ariaActiveDescendantElement", + "aria-atomic": "ariaAtomic", + "aria-autocomplete": "ariaAutoComplete", + "aria-busy": "ariaBusy", + "aria-checked": "ariaChecked", + "aria-colcount": "ariaColCount", + "aria-colindex": "ariaColIndex", + "aria-colindextext": "ariaColIndexText", + "aria-colspan": "ariaColSpan", + "aria-controls": "ariaControlsElements", + "aria-current": "ariaCurrent", + "aria-describedby": "ariaDescribedByElements", + "aria-description": "ariaDescription", + "aria-details": "ariaDetailsElements", + "aria-disabled": "ariaDisabled", + "aria-errormessage": "ariaErrorMessageElements", + "aria-expanded": "ariaExpanded", + "aria-flowto": "ariaFlowToElements", + "aria-haspopup": "ariaHasPopup", + "aria-hidden": "ariaHidden", + "aria-invalid": "ariaInvalid", + "aria-keyshortcuts": "ariaKeyShortcuts", + "aria-label": "ariaLabel", + "aria-labelledby": "ariaLabelledByElements", + "aria-level": "ariaLevel", + "aria-live": "ariaLive", + "aria-modal": "ariaModal", + "aria-multiline": "ariaMultiLine", + "aria-multiselectable": "ariaMultiSelectable", + "aria-orientation": "ariaOrientation", + "aria-owns": "ariaOwnsElements", + "aria-placeholder": "ariaPlaceholder", + "aria-posinset": "ariaPosInSet", + "aria-pressed": "ariaPressed", + "aria-readonly": "ariaReadOnly", + "aria-required": "ariaRequired", + "aria-roledescription": "ariaRoleDescription", + "aria-rowcount": "ariaRowCount", + "aria-rowindex": "ariaRowIndex", + "aria-rowindextext": "ariaRowIndexText", + "aria-rowspan": "ariaRowSpan", + "aria-selected": "ariaSelected", + "aria-setsize": "ariaSetSize", + "aria-sort": "ariaSort", + "aria-valuemax": "ariaValueMax", + "aria-valuemin": "ariaValueMin", + "aria-valuenow": "ariaValueNow", + "aria-valuetext": "ariaValueText" + })), Ma = Array.from(hi).reduce((e, [t, r]) => (e.set(t, r), e), /* @__PURE__ */ new Map()), mi = class extends pi { + _schema = /* @__PURE__ */ new Map(); + _eventSchema = /* @__PURE__ */ new Map(); + constructor() { + super(), Ra.forEach((e) => { + let t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), [n, i] = e.split("|"), s = i.split(","), [a, o] = n.split("^"); + a.split(",").forEach((u) => { + this._schema.set(u.toLowerCase(), t), this._eventSchema.set(u.toLowerCase(), r); + }); + let c = o && this._schema.get(o.toLowerCase()); + if (c) { + for (let [u, p] of c) t.set(u, p); + for (let u of this._eventSchema.get(o.toLowerCase())) r.add(u); + } + s.forEach((u) => { + if (u.length > 0) switch (u[0]) { + case "*": + r.add(u.substring(1)); + break; + case "!": + t.set(u.substring(1), Pa); + break; + case "#": + t.set(u.substring(1), Oa); + break; + case "%": + t.set(u.substring(1), Ia); + break; + default: t.set(u, Da); + } + }); + }); + } + hasProperty(e, t, r) { + if (r.some((n) => n.name === ur.name)) return !0; + if (e.indexOf("-") > -1) { + if (or(e) || lr(e)) return !1; + if (r.some((n) => n.name === cr.name)) return !0; + } + return (this._schema.get(e.toLowerCase()) || this._schema.get("unknown")).has(t); + } + hasElement(e, t) { + return t.some((r) => r.name === ur.name) || e.indexOf("-") > -1 && (or(e) || lr(e) || t.some((r) => r.name === cr.name)) ? !0 : this._schema.has(e.toLowerCase()); + } + securityContext(e, t, r) { + r && (t = this.getMappedPropName(t)), e = e.toLowerCase(), t = t.toLowerCase(); + let n = pr()[e + "|" + t]; + return n || (n = pr()["*|" + t], n || Z.NONE); + } + getMappedPropName(e) { + return hi.get(e) ?? e; + } + getDefaultComponentElementName() { + return "ng-component"; + } + validateProperty(e) { + return e.toLowerCase().startsWith("on") ? { + error: !0, + msg: `Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.` + } : { error: !1 }; + } + validateAttribute(e) { + return e.toLowerCase().startsWith("on") ? { + error: !0, + msg: `Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...` + } : { error: !1 }; + } + allKnownElementNames() { + return Array.from(this._schema.keys()); + } + allKnownAttributesOfElement(e) { + let t = this._schema.get(e.toLowerCase()) || this._schema.get("unknown"); + return Array.from(t.keys()).map((r) => Ma.get(r) ?? r); + } + allKnownEventsOfElement(e) { + return Array.from(this._eventSchema.get(e.toLowerCase()) ?? []); + } + normalizeAnimationStyleProperty(e) { + return ui(e); + } + normalizeAnimationStyleValue(e, t, r) { + let n = "", i = r.toString().trim(), s = null; + if (Ba(e) && r !== 0 && r !== "0") if (typeof r == "number") n = "px"; + else { + let a = r.match(/^[+-]?[\d\.]+([a-z]*)$/); + a && a[1].length == 0 && (s = `Please provide a CSS unit value for ${t}:${r}`); + } + return { + error: s, + value: i + n + }; + } + }; + f = class { + closedByChildren = {}; + contentType; + closedByParent = !1; + implicitNamespacePrefix; + isVoid; + ignoreFirstLf; + canSelfClose; + preventNamespaceInheritance; + constructor({ closedByChildren: e, implicitNamespacePrefix: t, contentType: r = R.PARSABLE_DATA, closedByParent: n = !1, isVoid: i = !1, ignoreFirstLf: s = !1, preventNamespaceInheritance: a = !1, canSelfClose: o = !1 } = {}) { + e && e.length > 0 && e.forEach((c) => this.closedByChildren[c] = !0), this.isVoid = i, this.closedByParent = n || i, this.implicitNamespacePrefix = t || null, this.contentType = r, this.ignoreFirstLf = s, this.preventNamespaceInheritance = a, this.canSelfClose = o ?? i; + } + isClosedByChild(e) { + return this.isVoid || e.toLowerCase() in this.closedByChildren; + } + getContentType(e) { + return typeof this.contentType == "object" ? (e === void 0 ? void 0 : this.contentType[e]) ?? this.contentType.default : this.contentType; + } + }; + De = class gi { + constructor(t, r, n, i) { + this.file = t, this.offset = r, this.line = n, this.col = i; + } + toString() { + return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url; + } + moveBy(t) { + let r = this.file.content, n = r.length, i = this.offset, s = this.line, a = this.col; + for (; i > 0 && t < 0;) if (i--, t++, r.charCodeAt(i) == 10) { + s--; + let o = r.substring(0, i - 1).lastIndexOf(` +`); + a = o > 0 ? i - o : i; + } else a--; + for (; i < n && t > 0;) { + let o = r.charCodeAt(i); + i++, t--, o == 10 ? (s++, a = 0) : a++; + } + return new gi(this.file, i, s, a); + } + getContext(t, r) { + let n = this.file.content, i = this.offset; + if (i != null) { + i > n.length - 1 && (i = n.length - 1); + let s = i, a = 0, o = 0; + for (; a < t && i > 0 && (i--, a++, !(n[i] == ` +` && ++o == r));); + for (a = 0, o = 0; a < t && s < n.length - 1 && (s++, a++, !(n[s] == ` +` && ++o == r));); + return { + before: n.substring(i, this.offset), + after: n.substring(this.offset, s + 1) + }; + } + return null; + } + }, nt = class { + constructor(e, t) { + this.content = e, this.url = t; + } + }, h = class { + constructor(e, t, r = e, n = null) { + this.start = e, this.end = t, this.fullStart = r, this.details = n; + } + toString() { + return this.start.file.content.substring(this.start.offset, this.end.offset); + } + }, di = (function(e) { + return e[e.WARNING = 0] = "WARNING", e[e.ERROR = 1] = "ERROR", e; + })({}), ee = class extends Error { + constructor(e, t, r = di.ERROR, n) { + super(t), this.span = e, this.msg = t, this.level = r, this.relatedError = n, Object.setPrototypeOf(this, new.target.prototype); + } + contextualMessage() { + let e = this.span.start.getContext(100, 3); + return e ? `${this.msg} ("${e.before}[${di[this.level]} ->]${e.after}")` : this.msg; + } + toString() { + let e = this.span.details ? `, ${this.span.details}` : ""; + return `${this.contextualMessage()}: ${this.span.start}${e}`; + } + }; + de = class { + constructor(e, t) { + this.sourceSpan = e, this.i18n = t; + } + }, _i = class extends de { + constructor(e, t, r, n) { + super(t, n), this.value = e, this.tokens = r; + } + visit(e, t) { + return e.visitText(this, t); + } + kind = "text"; + }, Si = class extends de { + constructor(e, t, r, n) { + super(t, n), this.value = e, this.tokens = r; + } + visit(e, t) { + return e.visitCdata(this, t); + } + kind = "cdata"; + }, Ei = class extends de { + constructor(e, t, r, n, i, s) { + super(n, s), this.switchValue = e, this.type = t, this.cases = r, this.switchValueSourceSpan = i; + } + visit(e, t) { + return e.visitExpansion(this, t); + } + kind = "expansion"; + }, Ci = class { + constructor(e, t, r, n, i) { + this.value = e, this.expression = t, this.sourceSpan = r, this.valueSourceSpan = n, this.expSourceSpan = i; + } + visit(e, t) { + return e.visitExpansionCase(this, t); + } + kind = "expansionCase"; + }, vi = class extends de { + constructor(e, t, r, n, i, s, a) { + super(r, a), this.name = e, this.value = t, this.keySpan = n, this.valueSpan = i, this.valueTokens = s; + } + visit(e, t) { + return e.visitAttribute(this, t); + } + kind = "attribute"; + get nameSpan() { + return this.keySpan; + } + }, te = class extends de { + constructor(e, t, r, n, i, s, a, o = null, c = null, u, p) { + super(s, p), this.name = e, this.attrs = t, this.directives = r, this.children = n, this.isSelfClosing = i, this.startSourceSpan = a, this.endSourceSpan = o, this.nameSpan = c, this.isVoid = u; + } + visit(e, t) { + return e.visitElement(this, t); + } + kind = "element"; + }, Ti = class { + constructor(e, t) { + this.value = e, this.sourceSpan = t; + } + visit(e, t) { + return e.visitComment(this, t); + } + kind = "comment"; + }, bi = class { + constructor(e, t) { + this.value = e, this.sourceSpan = t; + } + visit(e, t) { + return e.visitDocType(this, t); + } + kind = "docType"; + }, ge = class extends de { + constructor(e, t, r, n, i, s, a = null, o) { + super(n, o), this.name = e, this.parameters = t, this.children = r, this.nameSpan = i, this.startSourceSpan = s, this.endSourceSpan = a; + } + visit(e, t) { + return e.visitBlock(this, t); + } + kind = "block"; + }, G = class extends de { + constructor(e, t, r, n, i, s, a, o, c, u = null, p) { + super(o, p), this.componentName = e, this.tagName = t, this.fullName = r, this.attrs = n, this.directives = i, this.children = s, this.isSelfClosing = a, this.startSourceSpan = c, this.endSourceSpan = u; + } + visit(e, t) { + return e.visitComponent(this, t); + } + kind = "component"; + }, wi = class { + constructor(e, t, r, n, i = null) { + this.name = e, this.attrs = t, this.sourceSpan = r, this.startSourceSpan = n, this.endSourceSpan = i; + } + visit(e, t) { + return e.visitDirective(this, t); + } + kind = "directive"; + }, hr = class { + constructor(e, t) { + this.expression = e, this.sourceSpan = t; + } + visit(e, t) { + return e.visitBlockParameter(this, t); + } + kind = "blockParameter"; + startSourceSpan = null; + endSourceSpan = null; + }, mr = class { + constructor(e, t, r, n, i) { + this.name = e, this.value = t, this.sourceSpan = r, this.nameSpan = n, this.valueSpan = i; + } + visit(e, t) { + return e.visitLetDeclaration(this, t); + } + kind = "letDeclaration"; + startSourceSpan = null; + endSourceSpan = null; + }; + fr = class { + constructor() {} + visitElement(e, t) { + this.visitChildren(t, (r) => { + r(e.attrs), r(e.directives), r(e.children); + }); + } + visitAttribute(e, t) {} + visitText(e, t) {} + visitCdata(e, t) {} + visitComment(e, t) {} + visitDocType(e, t) {} + visitExpansion(e, t) { + return this.visitChildren(t, (r) => { + r(e.cases); + }); + } + visitExpansionCase(e, t) {} + visitBlock(e, t) { + this.visitChildren(t, (r) => { + r(e.parameters), r(e.children); + }); + } + visitBlockParameter(e, t) {} + visitLetDeclaration(e, t) {} + visitComponent(e, t) { + this.visitChildren(t, (r) => { + r(e.attrs), r(e.children); + }); + } + visitDirective(e, t) { + this.visitChildren(t, (r) => { + r(e.attrs); + }); + } + visitChildren(e, t) { + let r = [], n = this; + function i(s) { + s && r.push(Ot(n, s, e)); + } + return t(i), Array.prototype.concat.apply([], r); + } + }; + _e = { + AElig: "Æ", + AMP: "&", + amp: "&", + Aacute: "Á", + Abreve: "Ă", + Acirc: "Â", + Acy: "А", + Afr: "𝔄", + Agrave: "À", + Alpha: "Α", + Amacr: "Ā", + And: "⩓", + Aogon: "Ą", + Aopf: "𝔸", + ApplyFunction: "⁡", + af: "⁡", + Aring: "Å", + angst: "Å", + Ascr: "𝒜", + Assign: "≔", + colone: "≔", + coloneq: "≔", + Atilde: "Ã", + Auml: "Ä", + Backslash: "∖", + setminus: "∖", + setmn: "∖", + smallsetminus: "∖", + ssetmn: "∖", + Barv: "⫧", + Barwed: "⌆", + doublebarwedge: "⌆", + Bcy: "Б", + Because: "∵", + becaus: "∵", + because: "∵", + Bernoullis: "ℬ", + Bscr: "ℬ", + bernou: "ℬ", + Beta: "Β", + Bfr: "𝔅", + Bopf: "𝔹", + Breve: "˘", + breve: "˘", + Bumpeq: "≎", + HumpDownHump: "≎", + bump: "≎", + CHcy: "Ч", + COPY: "©", + copy: "©", + Cacute: "Ć", + Cap: "⋒", + CapitalDifferentialD: "ⅅ", + DD: "ⅅ", + Cayleys: "ℭ", + Cfr: "ℭ", + Ccaron: "Č", + Ccedil: "Ç", + Ccirc: "Ĉ", + Cconint: "∰", + Cdot: "Ċ", + Cedilla: "¸", + cedil: "¸", + CenterDot: "·", + centerdot: "·", + middot: "·", + Chi: "Χ", + CircleDot: "⊙", + odot: "⊙", + CircleMinus: "⊖", + ominus: "⊖", + CirclePlus: "⊕", + oplus: "⊕", + CircleTimes: "⊗", + otimes: "⊗", + ClockwiseContourIntegral: "∲", + cwconint: "∲", + CloseCurlyDoubleQuote: "”", + rdquo: "”", + rdquor: "”", + CloseCurlyQuote: "’", + rsquo: "’", + rsquor: "’", + Colon: "∷", + Proportion: "∷", + Colone: "⩴", + Congruent: "≡", + equiv: "≡", + Conint: "∯", + DoubleContourIntegral: "∯", + ContourIntegral: "∮", + conint: "∮", + oint: "∮", + Copf: "ℂ", + complexes: "ℂ", + Coproduct: "∐", + coprod: "∐", + CounterClockwiseContourIntegral: "∳", + awconint: "∳", + Cross: "⨯", + Cscr: "𝒞", + Cup: "⋓", + CupCap: "≍", + asympeq: "≍", + DDotrahd: "⤑", + DJcy: "Ђ", + DScy: "Ѕ", + DZcy: "Џ", + Dagger: "‡", + ddagger: "‡", + Darr: "↡", + Dashv: "⫤", + DoubleLeftTee: "⫤", + Dcaron: "Ď", + Dcy: "Д", + Del: "∇", + nabla: "∇", + Delta: "Δ", + Dfr: "𝔇", + DiacriticalAcute: "´", + acute: "´", + DiacriticalDot: "˙", + dot: "˙", + DiacriticalDoubleAcute: "˝", + dblac: "˝", + DiacriticalGrave: "`", + grave: "`", + DiacriticalTilde: "˜", + tilde: "˜", + Diamond: "⋄", + diam: "⋄", + diamond: "⋄", + DifferentialD: "ⅆ", + dd: "ⅆ", + Dopf: "𝔻", + Dot: "¨", + DoubleDot: "¨", + die: "¨", + uml: "¨", + DotDot: "⃜", + DotEqual: "≐", + doteq: "≐", + esdot: "≐", + DoubleDownArrow: "⇓", + Downarrow: "⇓", + dArr: "⇓", + DoubleLeftArrow: "⇐", + Leftarrow: "⇐", + lArr: "⇐", + DoubleLeftRightArrow: "⇔", + Leftrightarrow: "⇔", + hArr: "⇔", + iff: "⇔", + DoubleLongLeftArrow: "⟸", + Longleftarrow: "⟸", + xlArr: "⟸", + DoubleLongLeftRightArrow: "⟺", + Longleftrightarrow: "⟺", + xhArr: "⟺", + DoubleLongRightArrow: "⟹", + Longrightarrow: "⟹", + xrArr: "⟹", + DoubleRightArrow: "⇒", + Implies: "⇒", + Rightarrow: "⇒", + rArr: "⇒", + DoubleRightTee: "⊨", + vDash: "⊨", + DoubleUpArrow: "⇑", + Uparrow: "⇑", + uArr: "⇑", + DoubleUpDownArrow: "⇕", + Updownarrow: "⇕", + vArr: "⇕", + DoubleVerticalBar: "∥", + par: "∥", + parallel: "∥", + shortparallel: "∥", + spar: "∥", + DownArrow: "↓", + ShortDownArrow: "↓", + darr: "↓", + downarrow: "↓", + DownArrowBar: "⤓", + DownArrowUpArrow: "⇵", + duarr: "⇵", + DownBreve: "̑", + DownLeftRightVector: "⥐", + DownLeftTeeVector: "⥞", + DownLeftVector: "↽", + leftharpoondown: "↽", + lhard: "↽", + DownLeftVectorBar: "⥖", + DownRightTeeVector: "⥟", + DownRightVector: "⇁", + rhard: "⇁", + rightharpoondown: "⇁", + DownRightVectorBar: "⥗", + DownTee: "⊤", + top: "⊤", + DownTeeArrow: "↧", + mapstodown: "↧", + Dscr: "𝒟", + Dstrok: "Đ", + ENG: "Ŋ", + ETH: "Ð", + Eacute: "É", + Ecaron: "Ě", + Ecirc: "Ê", + Ecy: "Э", + Edot: "Ė", + Efr: "𝔈", + Egrave: "È", + Element: "∈", + in: "∈", + isin: "∈", + isinv: "∈", + Emacr: "Ē", + EmptySmallSquare: "◻", + EmptyVerySmallSquare: "▫", + Eogon: "Ę", + Eopf: "𝔼", + Epsilon: "Ε", + Equal: "⩵", + EqualTilde: "≂", + eqsim: "≂", + esim: "≂", + Equilibrium: "⇌", + rightleftharpoons: "⇌", + rlhar: "⇌", + Escr: "ℰ", + expectation: "ℰ", + Esim: "⩳", + Eta: "Η", + Euml: "Ë", + Exists: "∃", + exist: "∃", + ExponentialE: "ⅇ", + ee: "ⅇ", + exponentiale: "ⅇ", + Fcy: "Ф", + Ffr: "𝔉", + FilledSmallSquare: "◼", + FilledVerySmallSquare: "▪", + blacksquare: "▪", + squarf: "▪", + squf: "▪", + Fopf: "𝔽", + ForAll: "∀", + forall: "∀", + Fouriertrf: "ℱ", + Fscr: "ℱ", + GJcy: "Ѓ", + GT: ">", + gt: ">", + Gamma: "Γ", + Gammad: "Ϝ", + Gbreve: "Ğ", + Gcedil: "Ģ", + Gcirc: "Ĝ", + Gcy: "Г", + Gdot: "Ġ", + Gfr: "𝔊", + Gg: "⋙", + ggg: "⋙", + Gopf: "𝔾", + GreaterEqual: "≥", + ge: "≥", + geq: "≥", + GreaterEqualLess: "⋛", + gel: "⋛", + gtreqless: "⋛", + GreaterFullEqual: "≧", + gE: "≧", + geqq: "≧", + GreaterGreater: "⪢", + GreaterLess: "≷", + gl: "≷", + gtrless: "≷", + GreaterSlantEqual: "⩾", + geqslant: "⩾", + ges: "⩾", + GreaterTilde: "≳", + gsim: "≳", + gtrsim: "≳", + Gscr: "𝒢", + Gt: "≫", + NestedGreaterGreater: "≫", + gg: "≫", + HARDcy: "Ъ", + Hacek: "ˇ", + caron: "ˇ", + Hat: "^", + Hcirc: "Ĥ", + Hfr: "ℌ", + Poincareplane: "ℌ", + HilbertSpace: "ℋ", + Hscr: "ℋ", + hamilt: "ℋ", + Hopf: "ℍ", + quaternions: "ℍ", + HorizontalLine: "─", + boxh: "─", + Hstrok: "Ħ", + HumpEqual: "≏", + bumpe: "≏", + bumpeq: "≏", + IEcy: "Е", + IJlig: "IJ", + IOcy: "Ё", + Iacute: "Í", + Icirc: "Î", + Icy: "И", + Idot: "İ", + Ifr: "ℑ", + Im: "ℑ", + image: "ℑ", + imagpart: "ℑ", + Igrave: "Ì", + Imacr: "Ī", + ImaginaryI: "ⅈ", + ii: "ⅈ", + Int: "∬", + Integral: "∫", + int: "∫", + Intersection: "⋂", + bigcap: "⋂", + xcap: "⋂", + InvisibleComma: "⁣", + ic: "⁣", + InvisibleTimes: "⁢", + it: "⁢", + Iogon: "Į", + Iopf: "𝕀", + Iota: "Ι", + Iscr: "ℐ", + imagline: "ℐ", + Itilde: "Ĩ", + Iukcy: "І", + Iuml: "Ï", + Jcirc: "Ĵ", + Jcy: "Й", + Jfr: "𝔍", + Jopf: "𝕁", + Jscr: "𝒥", + Jsercy: "Ј", + Jukcy: "Є", + KHcy: "Х", + KJcy: "Ќ", + Kappa: "Κ", + Kcedil: "Ķ", + Kcy: "К", + Kfr: "𝔎", + Kopf: "𝕂", + Kscr: "𝒦", + LJcy: "Љ", + LT: "<", + lt: "<", + Lacute: "Ĺ", + Lambda: "Λ", + Lang: "⟪", + Laplacetrf: "ℒ", + Lscr: "ℒ", + lagran: "ℒ", + Larr: "↞", + twoheadleftarrow: "↞", + Lcaron: "Ľ", + Lcedil: "Ļ", + Lcy: "Л", + LeftAngleBracket: "⟨", + lang: "⟨", + langle: "⟨", + LeftArrow: "←", + ShortLeftArrow: "←", + larr: "←", + leftarrow: "←", + slarr: "←", + LeftArrowBar: "⇤", + larrb: "⇤", + LeftArrowRightArrow: "⇆", + leftrightarrows: "⇆", + lrarr: "⇆", + LeftCeiling: "⌈", + lceil: "⌈", + LeftDoubleBracket: "⟦", + lobrk: "⟦", + LeftDownTeeVector: "⥡", + LeftDownVector: "⇃", + dharl: "⇃", + downharpoonleft: "⇃", + LeftDownVectorBar: "⥙", + LeftFloor: "⌊", + lfloor: "⌊", + LeftRightArrow: "↔", + harr: "↔", + leftrightarrow: "↔", + LeftRightVector: "⥎", + LeftTee: "⊣", + dashv: "⊣", + LeftTeeArrow: "↤", + mapstoleft: "↤", + LeftTeeVector: "⥚", + LeftTriangle: "⊲", + vartriangleleft: "⊲", + vltri: "⊲", + LeftTriangleBar: "⧏", + LeftTriangleEqual: "⊴", + ltrie: "⊴", + trianglelefteq: "⊴", + LeftUpDownVector: "⥑", + LeftUpTeeVector: "⥠", + LeftUpVector: "↿", + uharl: "↿", + upharpoonleft: "↿", + LeftUpVectorBar: "⥘", + LeftVector: "↼", + leftharpoonup: "↼", + lharu: "↼", + LeftVectorBar: "⥒", + LessEqualGreater: "⋚", + leg: "⋚", + lesseqgtr: "⋚", + LessFullEqual: "≦", + lE: "≦", + leqq: "≦", + LessGreater: "≶", + lessgtr: "≶", + lg: "≶", + LessLess: "⪡", + LessSlantEqual: "⩽", + leqslant: "⩽", + les: "⩽", + LessTilde: "≲", + lesssim: "≲", + lsim: "≲", + Lfr: "𝔏", + Ll: "⋘", + Lleftarrow: "⇚", + lAarr: "⇚", + Lmidot: "Ŀ", + LongLeftArrow: "⟵", + longleftarrow: "⟵", + xlarr: "⟵", + LongLeftRightArrow: "⟷", + longleftrightarrow: "⟷", + xharr: "⟷", + LongRightArrow: "⟶", + longrightarrow: "⟶", + xrarr: "⟶", + Lopf: "𝕃", + LowerLeftArrow: "↙", + swarr: "↙", + swarrow: "↙", + LowerRightArrow: "↘", + searr: "↘", + searrow: "↘", + Lsh: "↰", + lsh: "↰", + Lstrok: "Ł", + Lt: "≪", + NestedLessLess: "≪", + ll: "≪", + Map: "⤅", + Mcy: "М", + MediumSpace: " ", + Mellintrf: "ℳ", + Mscr: "ℳ", + phmmat: "ℳ", + Mfr: "𝔐", + MinusPlus: "∓", + mnplus: "∓", + mp: "∓", + Mopf: "𝕄", + Mu: "Μ", + NJcy: "Њ", + Nacute: "Ń", + Ncaron: "Ň", + Ncedil: "Ņ", + Ncy: "Н", + NegativeMediumSpace: "​", + NegativeThickSpace: "​", + NegativeThinSpace: "​", + NegativeVeryThinSpace: "​", + ZeroWidthSpace: "​", + NewLine: ` +`, + Nfr: "𝔑", + NoBreak: "⁠", + NonBreakingSpace: "\xA0", + nbsp: "\xA0", + Nopf: "ℕ", + naturals: "ℕ", + Not: "⫬", + NotCongruent: "≢", + nequiv: "≢", + NotCupCap: "≭", + NotDoubleVerticalBar: "∦", + npar: "∦", + nparallel: "∦", + nshortparallel: "∦", + nspar: "∦", + NotElement: "∉", + notin: "∉", + notinva: "∉", + NotEqual: "≠", + ne: "≠", + NotEqualTilde: "≂̸", + nesim: "≂̸", + NotExists: "∄", + nexist: "∄", + nexists: "∄", + NotGreater: "≯", + ngt: "≯", + ngtr: "≯", + NotGreaterEqual: "≱", + nge: "≱", + ngeq: "≱", + NotGreaterFullEqual: "≧̸", + ngE: "≧̸", + ngeqq: "≧̸", + NotGreaterGreater: "≫̸", + nGtv: "≫̸", + NotGreaterLess: "≹", + ntgl: "≹", + NotGreaterSlantEqual: "⩾̸", + ngeqslant: "⩾̸", + nges: "⩾̸", + NotGreaterTilde: "≵", + ngsim: "≵", + NotHumpDownHump: "≎̸", + nbump: "≎̸", + NotHumpEqual: "≏̸", + nbumpe: "≏̸", + NotLeftTriangle: "⋪", + nltri: "⋪", + ntriangleleft: "⋪", + NotLeftTriangleBar: "⧏̸", + NotLeftTriangleEqual: "⋬", + nltrie: "⋬", + ntrianglelefteq: "⋬", + NotLess: "≮", + nless: "≮", + nlt: "≮", + NotLessEqual: "≰", + nle: "≰", + nleq: "≰", + NotLessGreater: "≸", + ntlg: "≸", + NotLessLess: "≪̸", + nLtv: "≪̸", + NotLessSlantEqual: "⩽̸", + nleqslant: "⩽̸", + nles: "⩽̸", + NotLessTilde: "≴", + nlsim: "≴", + NotNestedGreaterGreater: "⪢̸", + NotNestedLessLess: "⪡̸", + NotPrecedes: "⊀", + npr: "⊀", + nprec: "⊀", + NotPrecedesEqual: "⪯̸", + npre: "⪯̸", + npreceq: "⪯̸", + NotPrecedesSlantEqual: "⋠", + nprcue: "⋠", + NotReverseElement: "∌", + notni: "∌", + notniva: "∌", + NotRightTriangle: "⋫", + nrtri: "⋫", + ntriangleright: "⋫", + NotRightTriangleBar: "⧐̸", + NotRightTriangleEqual: "⋭", + nrtrie: "⋭", + ntrianglerighteq: "⋭", + NotSquareSubset: "⊏̸", + NotSquareSubsetEqual: "⋢", + nsqsube: "⋢", + NotSquareSuperset: "⊐̸", + NotSquareSupersetEqual: "⋣", + nsqsupe: "⋣", + NotSubset: "⊂⃒", + nsubset: "⊂⃒", + vnsub: "⊂⃒", + NotSubsetEqual: "⊈", + nsube: "⊈", + nsubseteq: "⊈", + NotSucceeds: "⊁", + nsc: "⊁", + nsucc: "⊁", + NotSucceedsEqual: "⪰̸", + nsce: "⪰̸", + nsucceq: "⪰̸", + NotSucceedsSlantEqual: "⋡", + nsccue: "⋡", + NotSucceedsTilde: "≿̸", + NotSuperset: "⊃⃒", + nsupset: "⊃⃒", + vnsup: "⊃⃒", + NotSupersetEqual: "⊉", + nsupe: "⊉", + nsupseteq: "⊉", + NotTilde: "≁", + nsim: "≁", + NotTildeEqual: "≄", + nsime: "≄", + nsimeq: "≄", + NotTildeFullEqual: "≇", + ncong: "≇", + NotTildeTilde: "≉", + nap: "≉", + napprox: "≉", + NotVerticalBar: "∤", + nmid: "∤", + nshortmid: "∤", + nsmid: "∤", + Nscr: "𝒩", + Ntilde: "Ñ", + Nu: "Ν", + OElig: "Œ", + Oacute: "Ó", + Ocirc: "Ô", + Ocy: "О", + Odblac: "Ő", + Ofr: "𝔒", + Ograve: "Ò", + Omacr: "Ō", + Omega: "Ω", + ohm: "Ω", + Omicron: "Ο", + Oopf: "𝕆", + OpenCurlyDoubleQuote: "“", + ldquo: "“", + OpenCurlyQuote: "‘", + lsquo: "‘", + Or: "⩔", + Oscr: "𝒪", + Oslash: "Ø", + Otilde: "Õ", + Otimes: "⨷", + Ouml: "Ö", + OverBar: "‾", + oline: "‾", + OverBrace: "⏞", + OverBracket: "⎴", + tbrk: "⎴", + OverParenthesis: "⏜", + PartialD: "∂", + part: "∂", + Pcy: "П", + Pfr: "𝔓", + Phi: "Φ", + Pi: "Π", + PlusMinus: "±", + plusmn: "±", + pm: "±", + Popf: "ℙ", + primes: "ℙ", + Pr: "⪻", + Precedes: "≺", + pr: "≺", + prec: "≺", + PrecedesEqual: "⪯", + pre: "⪯", + preceq: "⪯", + PrecedesSlantEqual: "≼", + prcue: "≼", + preccurlyeq: "≼", + PrecedesTilde: "≾", + precsim: "≾", + prsim: "≾", + Prime: "″", + Product: "∏", + prod: "∏", + Proportional: "∝", + prop: "∝", + propto: "∝", + varpropto: "∝", + vprop: "∝", + Pscr: "𝒫", + Psi: "Ψ", + QUOT: "\"", + quot: "\"", + Qfr: "𝔔", + Qopf: "ℚ", + rationals: "ℚ", + Qscr: "𝒬", + RBarr: "⤐", + drbkarow: "⤐", + REG: "®", + circledR: "®", + reg: "®", + Racute: "Ŕ", + Rang: "⟫", + Rarr: "↠", + twoheadrightarrow: "↠", + Rarrtl: "⤖", + Rcaron: "Ř", + Rcedil: "Ŗ", + Rcy: "Р", + Re: "ℜ", + Rfr: "ℜ", + real: "ℜ", + realpart: "ℜ", + ReverseElement: "∋", + SuchThat: "∋", + ni: "∋", + niv: "∋", + ReverseEquilibrium: "⇋", + leftrightharpoons: "⇋", + lrhar: "⇋", + ReverseUpEquilibrium: "⥯", + duhar: "⥯", + Rho: "Ρ", + RightAngleBracket: "⟩", + rang: "⟩", + rangle: "⟩", + RightArrow: "→", + ShortRightArrow: "→", + rarr: "→", + rightarrow: "→", + srarr: "→", + RightArrowBar: "⇥", + rarrb: "⇥", + RightArrowLeftArrow: "⇄", + rightleftarrows: "⇄", + rlarr: "⇄", + RightCeiling: "⌉", + rceil: "⌉", + RightDoubleBracket: "⟧", + robrk: "⟧", + RightDownTeeVector: "⥝", + RightDownVector: "⇂", + dharr: "⇂", + downharpoonright: "⇂", + RightDownVectorBar: "⥕", + RightFloor: "⌋", + rfloor: "⌋", + RightTee: "⊢", + vdash: "⊢", + RightTeeArrow: "↦", + map: "↦", + mapsto: "↦", + RightTeeVector: "⥛", + RightTriangle: "⊳", + vartriangleright: "⊳", + vrtri: "⊳", + RightTriangleBar: "⧐", + RightTriangleEqual: "⊵", + rtrie: "⊵", + trianglerighteq: "⊵", + RightUpDownVector: "⥏", + RightUpTeeVector: "⥜", + RightUpVector: "↾", + uharr: "↾", + upharpoonright: "↾", + RightUpVectorBar: "⥔", + RightVector: "⇀", + rharu: "⇀", + rightharpoonup: "⇀", + RightVectorBar: "⥓", + Ropf: "ℝ", + reals: "ℝ", + RoundImplies: "⥰", + Rrightarrow: "⇛", + rAarr: "⇛", + Rscr: "ℛ", + realine: "ℛ", + Rsh: "↱", + rsh: "↱", + RuleDelayed: "⧴", + SHCHcy: "Щ", + SHcy: "Ш", + SOFTcy: "Ь", + Sacute: "Ś", + Sc: "⪼", + Scaron: "Š", + Scedil: "Ş", + Scirc: "Ŝ", + Scy: "С", + Sfr: "𝔖", + ShortUpArrow: "↑", + UpArrow: "↑", + uarr: "↑", + uparrow: "↑", + Sigma: "Σ", + SmallCircle: "∘", + compfn: "∘", + Sopf: "𝕊", + Sqrt: "√", + radic: "√", + Square: "□", + squ: "□", + square: "□", + SquareIntersection: "⊓", + sqcap: "⊓", + SquareSubset: "⊏", + sqsub: "⊏", + sqsubset: "⊏", + SquareSubsetEqual: "⊑", + sqsube: "⊑", + sqsubseteq: "⊑", + SquareSuperset: "⊐", + sqsup: "⊐", + sqsupset: "⊐", + SquareSupersetEqual: "⊒", + sqsupe: "⊒", + sqsupseteq: "⊒", + SquareUnion: "⊔", + sqcup: "⊔", + Sscr: "𝒮", + Star: "⋆", + sstarf: "⋆", + Sub: "⋐", + Subset: "⋐", + SubsetEqual: "⊆", + sube: "⊆", + subseteq: "⊆", + Succeeds: "≻", + sc: "≻", + succ: "≻", + SucceedsEqual: "⪰", + sce: "⪰", + succeq: "⪰", + SucceedsSlantEqual: "≽", + sccue: "≽", + succcurlyeq: "≽", + SucceedsTilde: "≿", + scsim: "≿", + succsim: "≿", + Sum: "∑", + sum: "∑", + Sup: "⋑", + Supset: "⋑", + Superset: "⊃", + sup: "⊃", + supset: "⊃", + SupersetEqual: "⊇", + supe: "⊇", + supseteq: "⊇", + THORN: "Þ", + TRADE: "™", + trade: "™", + TSHcy: "Ћ", + TScy: "Ц", + Tab: " ", + Tau: "Τ", + Tcaron: "Ť", + Tcedil: "Ţ", + Tcy: "Т", + Tfr: "𝔗", + Therefore: "∴", + there4: "∴", + therefore: "∴", + Theta: "Θ", + ThickSpace: "  ", + ThinSpace: " ", + thinsp: " ", + Tilde: "∼", + sim: "∼", + thicksim: "∼", + thksim: "∼", + TildeEqual: "≃", + sime: "≃", + simeq: "≃", + TildeFullEqual: "≅", + cong: "≅", + TildeTilde: "≈", + ap: "≈", + approx: "≈", + asymp: "≈", + thickapprox: "≈", + thkap: "≈", + Topf: "𝕋", + TripleDot: "⃛", + tdot: "⃛", + Tscr: "𝒯", + Tstrok: "Ŧ", + Uacute: "Ú", + Uarr: "↟", + Uarrocir: "⥉", + Ubrcy: "Ў", + Ubreve: "Ŭ", + Ucirc: "Û", + Ucy: "У", + Udblac: "Ű", + Ufr: "𝔘", + Ugrave: "Ù", + Umacr: "Ū", + UnderBar: "_", + lowbar: "_", + UnderBrace: "⏟", + UnderBracket: "⎵", + bbrk: "⎵", + UnderParenthesis: "⏝", + Union: "⋃", + bigcup: "⋃", + xcup: "⋃", + UnionPlus: "⊎", + uplus: "⊎", + Uogon: "Ų", + Uopf: "𝕌", + UpArrowBar: "⤒", + UpArrowDownArrow: "⇅", + udarr: "⇅", + UpDownArrow: "↕", + updownarrow: "↕", + varr: "↕", + UpEquilibrium: "⥮", + udhar: "⥮", + UpTee: "⊥", + bot: "⊥", + bottom: "⊥", + perp: "⊥", + UpTeeArrow: "↥", + mapstoup: "↥", + UpperLeftArrow: "↖", + nwarr: "↖", + nwarrow: "↖", + UpperRightArrow: "↗", + nearr: "↗", + nearrow: "↗", + Upsi: "ϒ", + upsih: "ϒ", + Upsilon: "Υ", + Uring: "Ů", + Uscr: "𝒰", + Utilde: "Ũ", + Uuml: "Ü", + VDash: "⊫", + Vbar: "⫫", + Vcy: "В", + Vdash: "⊩", + Vdashl: "⫦", + Vee: "⋁", + bigvee: "⋁", + xvee: "⋁", + Verbar: "‖", + Vert: "‖", + VerticalBar: "∣", + mid: "∣", + shortmid: "∣", + smid: "∣", + VerticalLine: "|", + verbar: "|", + vert: "|", + VerticalSeparator: "❘", + VerticalTilde: "≀", + wr: "≀", + wreath: "≀", + VeryThinSpace: " ", + hairsp: " ", + Vfr: "𝔙", + Vopf: "𝕍", + Vscr: "𝒱", + Vvdash: "⊪", + Wcirc: "Ŵ", + Wedge: "⋀", + bigwedge: "⋀", + xwedge: "⋀", + Wfr: "𝔚", + Wopf: "𝕎", + Wscr: "𝒲", + Xfr: "𝔛", + Xi: "Ξ", + Xopf: "𝕏", + Xscr: "𝒳", + YAcy: "Я", + YIcy: "Ї", + YUcy: "Ю", + Yacute: "Ý", + Ycirc: "Ŷ", + Ycy: "Ы", + Yfr: "𝔜", + Yopf: "𝕐", + Yscr: "𝒴", + Yuml: "Ÿ", + ZHcy: "Ж", + Zacute: "Ź", + Zcaron: "Ž", + Zcy: "З", + Zdot: "Ż", + Zeta: "Ζ", + Zfr: "ℨ", + zeetrf: "ℨ", + Zopf: "ℤ", + integers: "ℤ", + Zscr: "𝒵", + aacute: "á", + abreve: "ă", + ac: "∾", + mstpos: "∾", + acE: "∾̳", + acd: "∿", + acirc: "â", + acy: "а", + aelig: "æ", + afr: "𝔞", + agrave: "à", + alefsym: "ℵ", + aleph: "ℵ", + alpha: "α", + amacr: "ā", + amalg: "⨿", + and: "∧", + wedge: "∧", + andand: "⩕", + andd: "⩜", + andslope: "⩘", + andv: "⩚", + ang: "∠", + angle: "∠", + ange: "⦤", + angmsd: "∡", + measuredangle: "∡", + angmsdaa: "⦨", + angmsdab: "⦩", + angmsdac: "⦪", + angmsdad: "⦫", + angmsdae: "⦬", + angmsdaf: "⦭", + angmsdag: "⦮", + angmsdah: "⦯", + angrt: "∟", + angrtvb: "⊾", + angrtvbd: "⦝", + angsph: "∢", + angzarr: "⍼", + aogon: "ą", + aopf: "𝕒", + apE: "⩰", + apacir: "⩯", + ape: "≊", + approxeq: "≊", + apid: "≋", + apos: "'", + aring: "å", + ascr: "𝒶", + ast: "*", + midast: "*", + atilde: "ã", + auml: "ä", + awint: "⨑", + bNot: "⫭", + backcong: "≌", + bcong: "≌", + backepsilon: "϶", + bepsi: "϶", + backprime: "‵", + bprime: "‵", + backsim: "∽", + bsim: "∽", + backsimeq: "⋍", + bsime: "⋍", + barvee: "⊽", + barwed: "⌅", + barwedge: "⌅", + bbrktbrk: "⎶", + bcy: "б", + bdquo: "„", + ldquor: "„", + bemptyv: "⦰", + beta: "β", + beth: "ℶ", + between: "≬", + twixt: "≬", + bfr: "𝔟", + bigcirc: "◯", + xcirc: "◯", + bigodot: "⨀", + xodot: "⨀", + bigoplus: "⨁", + xoplus: "⨁", + bigotimes: "⨂", + xotime: "⨂", + bigsqcup: "⨆", + xsqcup: "⨆", + bigstar: "★", + starf: "★", + bigtriangledown: "▽", + xdtri: "▽", + bigtriangleup: "△", + xutri: "△", + biguplus: "⨄", + xuplus: "⨄", + bkarow: "⤍", + rbarr: "⤍", + blacklozenge: "⧫", + lozf: "⧫", + blacktriangle: "▴", + utrif: "▴", + blacktriangledown: "▾", + dtrif: "▾", + blacktriangleleft: "◂", + ltrif: "◂", + blacktriangleright: "▸", + rtrif: "▸", + blank: "␣", + blk12: "▒", + blk14: "░", + blk34: "▓", + block: "█", + bne: "=⃥", + bnequiv: "≡⃥", + bnot: "⌐", + bopf: "𝕓", + bowtie: "⋈", + boxDL: "╗", + boxDR: "╔", + boxDl: "╖", + boxDr: "╓", + boxH: "═", + boxHD: "╦", + boxHU: "╩", + boxHd: "╤", + boxHu: "╧", + boxUL: "╝", + boxUR: "╚", + boxUl: "╜", + boxUr: "╙", + boxV: "║", + boxVH: "╬", + boxVL: "╣", + boxVR: "╠", + boxVh: "╫", + boxVl: "╢", + boxVr: "╟", + boxbox: "⧉", + boxdL: "╕", + boxdR: "╒", + boxdl: "┐", + boxdr: "┌", + boxhD: "╥", + boxhU: "╨", + boxhd: "┬", + boxhu: "┴", + boxminus: "⊟", + minusb: "⊟", + boxplus: "⊞", + plusb: "⊞", + boxtimes: "⊠", + timesb: "⊠", + boxuL: "╛", + boxuR: "╘", + boxul: "┘", + boxur: "└", + boxv: "│", + boxvH: "╪", + boxvL: "╡", + boxvR: "╞", + boxvh: "┼", + boxvl: "┤", + boxvr: "├", + brvbar: "¦", + bscr: "𝒷", + bsemi: "⁏", + bsol: "\\", + bsolb: "⧅", + bsolhsub: "⟈", + bull: "•", + bullet: "•", + bumpE: "⪮", + cacute: "ć", + cap: "∩", + capand: "⩄", + capbrcup: "⩉", + capcap: "⩋", + capcup: "⩇", + capdot: "⩀", + caps: "∩︀", + caret: "⁁", + ccaps: "⩍", + ccaron: "č", + ccedil: "ç", + ccirc: "ĉ", + ccups: "⩌", + ccupssm: "⩐", + cdot: "ċ", + cemptyv: "⦲", + cent: "¢", + cfr: "𝔠", + chcy: "ч", + check: "✓", + checkmark: "✓", + chi: "χ", + cir: "○", + cirE: "⧃", + circ: "ˆ", + circeq: "≗", + cire: "≗", + circlearrowleft: "↺", + olarr: "↺", + circlearrowright: "↻", + orarr: "↻", + circledS: "Ⓢ", + oS: "Ⓢ", + circledast: "⊛", + oast: "⊛", + circledcirc: "⊚", + ocir: "⊚", + circleddash: "⊝", + odash: "⊝", + cirfnint: "⨐", + cirmid: "⫯", + cirscir: "⧂", + clubs: "♣", + clubsuit: "♣", + colon: ":", + comma: ",", + commat: "@", + comp: "∁", + complement: "∁", + congdot: "⩭", + copf: "𝕔", + copysr: "℗", + crarr: "↵", + cross: "✗", + cscr: "𝒸", + csub: "⫏", + csube: "⫑", + csup: "⫐", + csupe: "⫒", + ctdot: "⋯", + cudarrl: "⤸", + cudarrr: "⤵", + cuepr: "⋞", + curlyeqprec: "⋞", + cuesc: "⋟", + curlyeqsucc: "⋟", + cularr: "↶", + curvearrowleft: "↶", + cularrp: "⤽", + cup: "∪", + cupbrcap: "⩈", + cupcap: "⩆", + cupcup: "⩊", + cupdot: "⊍", + cupor: "⩅", + cups: "∪︀", + curarr: "↷", + curvearrowright: "↷", + curarrm: "⤼", + curlyvee: "⋎", + cuvee: "⋎", + curlywedge: "⋏", + cuwed: "⋏", + curren: "¤", + cwint: "∱", + cylcty: "⌭", + dHar: "⥥", + dagger: "†", + daleth: "ℸ", + dash: "‐", + hyphen: "‐", + dbkarow: "⤏", + rBarr: "⤏", + dcaron: "ď", + dcy: "д", + ddarr: "⇊", + downdownarrows: "⇊", + ddotseq: "⩷", + eDDot: "⩷", + deg: "°", + delta: "δ", + demptyv: "⦱", + dfisht: "⥿", + dfr: "𝔡", + diamondsuit: "♦", + diams: "♦", + digamma: "ϝ", + gammad: "ϝ", + disin: "⋲", + div: "÷", + divide: "÷", + divideontimes: "⋇", + divonx: "⋇", + djcy: "ђ", + dlcorn: "⌞", + llcorner: "⌞", + dlcrop: "⌍", + dollar: "$", + dopf: "𝕕", + doteqdot: "≑", + eDot: "≑", + dotminus: "∸", + minusd: "∸", + dotplus: "∔", + plusdo: "∔", + dotsquare: "⊡", + sdotb: "⊡", + drcorn: "⌟", + lrcorner: "⌟", + drcrop: "⌌", + dscr: "𝒹", + dscy: "ѕ", + dsol: "⧶", + dstrok: "đ", + dtdot: "⋱", + dtri: "▿", + triangledown: "▿", + dwangle: "⦦", + dzcy: "џ", + dzigrarr: "⟿", + eacute: "é", + easter: "⩮", + ecaron: "ě", + ecir: "≖", + eqcirc: "≖", + ecirc: "ê", + ecolon: "≕", + eqcolon: "≕", + ecy: "э", + edot: "ė", + efDot: "≒", + fallingdotseq: "≒", + efr: "𝔢", + eg: "⪚", + egrave: "è", + egs: "⪖", + eqslantgtr: "⪖", + egsdot: "⪘", + el: "⪙", + elinters: "⏧", + ell: "ℓ", + els: "⪕", + eqslantless: "⪕", + elsdot: "⪗", + emacr: "ē", + empty: "∅", + emptyset: "∅", + emptyv: "∅", + varnothing: "∅", + emsp13: " ", + emsp14: " ", + emsp: " ", + eng: "ŋ", + ensp: " ", + eogon: "ę", + eopf: "𝕖", + epar: "⋕", + eparsl: "⧣", + eplus: "⩱", + epsi: "ε", + epsilon: "ε", + epsiv: "ϵ", + straightepsilon: "ϵ", + varepsilon: "ϵ", + equals: "=", + equest: "≟", + questeq: "≟", + equivDD: "⩸", + eqvparsl: "⧥", + erDot: "≓", + risingdotseq: "≓", + erarr: "⥱", + escr: "ℯ", + eta: "η", + eth: "ð", + euml: "ë", + euro: "€", + excl: "!", + fcy: "ф", + female: "♀", + ffilig: "ffi", + fflig: "ff", + ffllig: "ffl", + ffr: "𝔣", + filig: "fi", + fjlig: "fj", + flat: "♭", + fllig: "fl", + fltns: "▱", + fnof: "ƒ", + fopf: "𝕗", + fork: "⋔", + pitchfork: "⋔", + forkv: "⫙", + fpartint: "⨍", + frac12: "½", + half: "½", + frac13: "⅓", + frac14: "¼", + frac15: "⅕", + frac16: "⅙", + frac18: "⅛", + frac23: "⅔", + frac25: "⅖", + frac34: "¾", + frac35: "⅗", + frac38: "⅜", + frac45: "⅘", + frac56: "⅚", + frac58: "⅝", + frac78: "⅞", + frasl: "⁄", + frown: "⌢", + sfrown: "⌢", + fscr: "𝒻", + gEl: "⪌", + gtreqqless: "⪌", + gacute: "ǵ", + gamma: "γ", + gap: "⪆", + gtrapprox: "⪆", + gbreve: "ğ", + gcirc: "ĝ", + gcy: "г", + gdot: "ġ", + gescc: "⪩", + gesdot: "⪀", + gesdoto: "⪂", + gesdotol: "⪄", + gesl: "⋛︀", + gesles: "⪔", + gfr: "𝔤", + gimel: "ℷ", + gjcy: "ѓ", + glE: "⪒", + gla: "⪥", + glj: "⪤", + gnE: "≩", + gneqq: "≩", + gnap: "⪊", + gnapprox: "⪊", + gne: "⪈", + gneq: "⪈", + gnsim: "⋧", + gopf: "𝕘", + gscr: "ℊ", + gsime: "⪎", + gsiml: "⪐", + gtcc: "⪧", + gtcir: "⩺", + gtdot: "⋗", + gtrdot: "⋗", + gtlPar: "⦕", + gtquest: "⩼", + gtrarr: "⥸", + gvertneqq: "≩︀", + gvnE: "≩︀", + hardcy: "ъ", + harrcir: "⥈", + harrw: "↭", + leftrightsquigarrow: "↭", + hbar: "ℏ", + hslash: "ℏ", + planck: "ℏ", + plankv: "ℏ", + hcirc: "ĥ", + hearts: "♥", + heartsuit: "♥", + hellip: "…", + mldr: "…", + hercon: "⊹", + hfr: "𝔥", + hksearow: "⤥", + searhk: "⤥", + hkswarow: "⤦", + swarhk: "⤦", + hoarr: "⇿", + homtht: "∻", + hookleftarrow: "↩", + larrhk: "↩", + hookrightarrow: "↪", + rarrhk: "↪", + hopf: "𝕙", + horbar: "―", + hscr: "𝒽", + hstrok: "ħ", + hybull: "⁃", + iacute: "í", + icirc: "î", + icy: "и", + iecy: "е", + iexcl: "¡", + ifr: "𝔦", + igrave: "ì", + iiiint: "⨌", + qint: "⨌", + iiint: "∭", + tint: "∭", + iinfin: "⧜", + iiota: "℩", + ijlig: "ij", + imacr: "ī", + imath: "ı", + inodot: "ı", + imof: "⊷", + imped: "Ƶ", + incare: "℅", + infin: "∞", + infintie: "⧝", + intcal: "⊺", + intercal: "⊺", + intlarhk: "⨗", + intprod: "⨼", + iprod: "⨼", + iocy: "ё", + iogon: "į", + iopf: "𝕚", + iota: "ι", + iquest: "¿", + iscr: "𝒾", + isinE: "⋹", + isindot: "⋵", + isins: "⋴", + isinsv: "⋳", + itilde: "ĩ", + iukcy: "і", + iuml: "ï", + jcirc: "ĵ", + jcy: "й", + jfr: "𝔧", + jmath: "ȷ", + jopf: "𝕛", + jscr: "𝒿", + jsercy: "ј", + jukcy: "є", + kappa: "κ", + kappav: "ϰ", + varkappa: "ϰ", + kcedil: "ķ", + kcy: "к", + kfr: "𝔨", + kgreen: "ĸ", + khcy: "х", + kjcy: "ќ", + kopf: "𝕜", + kscr: "𝓀", + lAtail: "⤛", + lBarr: "⤎", + lEg: "⪋", + lesseqqgtr: "⪋", + lHar: "⥢", + lacute: "ĺ", + laemptyv: "⦴", + lambda: "λ", + langd: "⦑", + lap: "⪅", + lessapprox: "⪅", + laquo: "«", + larrbfs: "⤟", + larrfs: "⤝", + larrlp: "↫", + looparrowleft: "↫", + larrpl: "⤹", + larrsim: "⥳", + larrtl: "↢", + leftarrowtail: "↢", + lat: "⪫", + latail: "⤙", + late: "⪭", + lates: "⪭︀", + lbarr: "⤌", + lbbrk: "❲", + lbrace: "{", + lcub: "{", + lbrack: "[", + lsqb: "[", + lbrke: "⦋", + lbrksld: "⦏", + lbrkslu: "⦍", + lcaron: "ľ", + lcedil: "ļ", + lcy: "л", + ldca: "⤶", + ldrdhar: "⥧", + ldrushar: "⥋", + ldsh: "↲", + le: "≤", + leq: "≤", + leftleftarrows: "⇇", + llarr: "⇇", + leftthreetimes: "⋋", + lthree: "⋋", + lescc: "⪨", + lesdot: "⩿", + lesdoto: "⪁", + lesdotor: "⪃", + lesg: "⋚︀", + lesges: "⪓", + lessdot: "⋖", + ltdot: "⋖", + lfisht: "⥼", + lfr: "𝔩", + lgE: "⪑", + lharul: "⥪", + lhblk: "▄", + ljcy: "љ", + llhard: "⥫", + lltri: "◺", + lmidot: "ŀ", + lmoust: "⎰", + lmoustache: "⎰", + lnE: "≨", + lneqq: "≨", + lnap: "⪉", + lnapprox: "⪉", + lne: "⪇", + lneq: "⪇", + lnsim: "⋦", + loang: "⟬", + loarr: "⇽", + longmapsto: "⟼", + xmap: "⟼", + looparrowright: "↬", + rarrlp: "↬", + lopar: "⦅", + lopf: "𝕝", + loplus: "⨭", + lotimes: "⨴", + lowast: "∗", + loz: "◊", + lozenge: "◊", + lpar: "(", + lparlt: "⦓", + lrhard: "⥭", + lrm: "‎", + lrtri: "⊿", + lsaquo: "‹", + lscr: "𝓁", + lsime: "⪍", + lsimg: "⪏", + lsquor: "‚", + sbquo: "‚", + lstrok: "ł", + ltcc: "⪦", + ltcir: "⩹", + ltimes: "⋉", + ltlarr: "⥶", + ltquest: "⩻", + ltrPar: "⦖", + ltri: "◃", + triangleleft: "◃", + lurdshar: "⥊", + luruhar: "⥦", + lvertneqq: "≨︀", + lvnE: "≨︀", + mDDot: "∺", + macr: "¯", + strns: "¯", + male: "♂", + malt: "✠", + maltese: "✠", + marker: "▮", + mcomma: "⨩", + mcy: "м", + mdash: "—", + mfr: "𝔪", + mho: "℧", + micro: "µ", + midcir: "⫰", + minus: "−", + minusdu: "⨪", + mlcp: "⫛", + models: "⊧", + mopf: "𝕞", + mscr: "𝓂", + mu: "μ", + multimap: "⊸", + mumap: "⊸", + nGg: "⋙̸", + nGt: "≫⃒", + nLeftarrow: "⇍", + nlArr: "⇍", + nLeftrightarrow: "⇎", + nhArr: "⇎", + nLl: "⋘̸", + nLt: "≪⃒", + nRightarrow: "⇏", + nrArr: "⇏", + nVDash: "⊯", + nVdash: "⊮", + nacute: "ń", + nang: "∠⃒", + napE: "⩰̸", + napid: "≋̸", + napos: "ʼn", + natur: "♮", + natural: "♮", + ncap: "⩃", + ncaron: "ň", + ncedil: "ņ", + ncongdot: "⩭̸", + ncup: "⩂", + ncy: "н", + ndash: "–", + neArr: "⇗", + nearhk: "⤤", + nedot: "≐̸", + nesear: "⤨", + toea: "⤨", + nfr: "𝔫", + nharr: "↮", + nleftrightarrow: "↮", + nhpar: "⫲", + nis: "⋼", + nisd: "⋺", + njcy: "њ", + nlE: "≦̸", + nleqq: "≦̸", + nlarr: "↚", + nleftarrow: "↚", + nldr: "‥", + nopf: "𝕟", + not: "¬", + notinE: "⋹̸", + notindot: "⋵̸", + notinvb: "⋷", + notinvc: "⋶", + notnivb: "⋾", + notnivc: "⋽", + nparsl: "⫽⃥", + npart: "∂̸", + npolint: "⨔", + nrarr: "↛", + nrightarrow: "↛", + nrarrc: "⤳̸", + nrarrw: "↝̸", + nscr: "𝓃", + nsub: "⊄", + nsubE: "⫅̸", + nsubseteqq: "⫅̸", + nsup: "⊅", + nsupE: "⫆̸", + nsupseteqq: "⫆̸", + ntilde: "ñ", + nu: "ν", + num: "#", + numero: "№", + numsp: " ", + nvDash: "⊭", + nvHarr: "⤄", + nvap: "≍⃒", + nvdash: "⊬", + nvge: "≥⃒", + nvgt: ">⃒", + nvinfin: "⧞", + nvlArr: "⤂", + nvle: "≤⃒", + nvlt: "<⃒", + nvltrie: "⊴⃒", + nvrArr: "⤃", + nvrtrie: "⊵⃒", + nvsim: "∼⃒", + nwArr: "⇖", + nwarhk: "⤣", + nwnear: "⤧", + oacute: "ó", + ocirc: "ô", + ocy: "о", + odblac: "ő", + odiv: "⨸", + odsold: "⦼", + oelig: "œ", + ofcir: "⦿", + ofr: "𝔬", + ogon: "˛", + ograve: "ò", + ogt: "⧁", + ohbar: "⦵", + olcir: "⦾", + olcross: "⦻", + olt: "⧀", + omacr: "ō", + omega: "ω", + omicron: "ο", + omid: "⦶", + oopf: "𝕠", + opar: "⦷", + operp: "⦹", + or: "∨", + vee: "∨", + ord: "⩝", + order: "ℴ", + orderof: "ℴ", + oscr: "ℴ", + ordf: "ª", + ordm: "º", + origof: "⊶", + oror: "⩖", + orslope: "⩗", + orv: "⩛", + oslash: "ø", + osol: "⊘", + otilde: "õ", + otimesas: "⨶", + ouml: "ö", + ovbar: "⌽", + para: "¶", + parsim: "⫳", + parsl: "⫽", + pcy: "п", + percnt: "%", + period: ".", + permil: "‰", + pertenk: "‱", + pfr: "𝔭", + phi: "φ", + phiv: "ϕ", + straightphi: "ϕ", + varphi: "ϕ", + phone: "☎", + pi: "π", + piv: "ϖ", + varpi: "ϖ", + planckh: "ℎ", + plus: "+", + plusacir: "⨣", + pluscir: "⨢", + plusdu: "⨥", + pluse: "⩲", + plussim: "⨦", + plustwo: "⨧", + pointint: "⨕", + popf: "𝕡", + pound: "£", + prE: "⪳", + prap: "⪷", + precapprox: "⪷", + precnapprox: "⪹", + prnap: "⪹", + precneqq: "⪵", + prnE: "⪵", + precnsim: "⋨", + prnsim: "⋨", + prime: "′", + profalar: "⌮", + profline: "⌒", + profsurf: "⌓", + prurel: "⊰", + pscr: "𝓅", + psi: "ψ", + puncsp: " ", + qfr: "𝔮", + qopf: "𝕢", + qprime: "⁗", + qscr: "𝓆", + quatint: "⨖", + quest: "?", + rAtail: "⤜", + rHar: "⥤", + race: "∽̱", + racute: "ŕ", + raemptyv: "⦳", + rangd: "⦒", + range: "⦥", + raquo: "»", + rarrap: "⥵", + rarrbfs: "⤠", + rarrc: "⤳", + rarrfs: "⤞", + rarrpl: "⥅", + rarrsim: "⥴", + rarrtl: "↣", + rightarrowtail: "↣", + rarrw: "↝", + rightsquigarrow: "↝", + ratail: "⤚", + ratio: "∶", + rbbrk: "❳", + rbrace: "}", + rcub: "}", + rbrack: "]", + rsqb: "]", + rbrke: "⦌", + rbrksld: "⦎", + rbrkslu: "⦐", + rcaron: "ř", + rcedil: "ŗ", + rcy: "р", + rdca: "⤷", + rdldhar: "⥩", + rdsh: "↳", + rect: "▭", + rfisht: "⥽", + rfr: "𝔯", + rharul: "⥬", + rho: "ρ", + rhov: "ϱ", + varrho: "ϱ", + rightrightarrows: "⇉", + rrarr: "⇉", + rightthreetimes: "⋌", + rthree: "⋌", + ring: "˚", + rlm: "‏", + rmoust: "⎱", + rmoustache: "⎱", + rnmid: "⫮", + roang: "⟭", + roarr: "⇾", + ropar: "⦆", + ropf: "𝕣", + roplus: "⨮", + rotimes: "⨵", + rpar: ")", + rpargt: "⦔", + rppolint: "⨒", + rsaquo: "›", + rscr: "𝓇", + rtimes: "⋊", + rtri: "▹", + triangleright: "▹", + rtriltri: "⧎", + ruluhar: "⥨", + rx: "℞", + sacute: "ś", + scE: "⪴", + scap: "⪸", + succapprox: "⪸", + scaron: "š", + scedil: "ş", + scirc: "ŝ", + scnE: "⪶", + succneqq: "⪶", + scnap: "⪺", + succnapprox: "⪺", + scnsim: "⋩", + succnsim: "⋩", + scpolint: "⨓", + scy: "с", + sdot: "⋅", + sdote: "⩦", + seArr: "⇘", + sect: "§", + semi: ";", + seswar: "⤩", + tosa: "⤩", + sext: "✶", + sfr: "𝔰", + sharp: "♯", + shchcy: "щ", + shcy: "ш", + shy: "­", + sigma: "σ", + sigmaf: "ς", + sigmav: "ς", + varsigma: "ς", + simdot: "⩪", + simg: "⪞", + simgE: "⪠", + siml: "⪝", + simlE: "⪟", + simne: "≆", + simplus: "⨤", + simrarr: "⥲", + smashp: "⨳", + smeparsl: "⧤", + smile: "⌣", + ssmile: "⌣", + smt: "⪪", + smte: "⪬", + smtes: "⪬︀", + softcy: "ь", + sol: "/", + solb: "⧄", + solbar: "⌿", + sopf: "𝕤", + spades: "♠", + spadesuit: "♠", + sqcaps: "⊓︀", + sqcups: "⊔︀", + sscr: "𝓈", + star: "☆", + sub: "⊂", + subset: "⊂", + subE: "⫅", + subseteqq: "⫅", + subdot: "⪽", + subedot: "⫃", + submult: "⫁", + subnE: "⫋", + subsetneqq: "⫋", + subne: "⊊", + subsetneq: "⊊", + subplus: "⪿", + subrarr: "⥹", + subsim: "⫇", + subsub: "⫕", + subsup: "⫓", + sung: "♪", + sup1: "¹", + sup2: "²", + sup3: "³", + supE: "⫆", + supseteqq: "⫆", + supdot: "⪾", + supdsub: "⫘", + supedot: "⫄", + suphsol: "⟉", + suphsub: "⫗", + suplarr: "⥻", + supmult: "⫂", + supnE: "⫌", + supsetneqq: "⫌", + supne: "⊋", + supsetneq: "⊋", + supplus: "⫀", + supsim: "⫈", + supsub: "⫔", + supsup: "⫖", + swArr: "⇙", + swnwar: "⤪", + szlig: "ß", + target: "⌖", + tau: "τ", + tcaron: "ť", + tcedil: "ţ", + tcy: "т", + telrec: "⌕", + tfr: "𝔱", + theta: "θ", + thetasym: "ϑ", + thetav: "ϑ", + vartheta: "ϑ", + thorn: "þ", + times: "×", + timesbar: "⨱", + timesd: "⨰", + topbot: "⌶", + topcir: "⫱", + topf: "𝕥", + topfork: "⫚", + tprime: "‴", + triangle: "▵", + utri: "▵", + triangleq: "≜", + trie: "≜", + tridot: "◬", + triminus: "⨺", + triplus: "⨹", + trisb: "⧍", + tritime: "⨻", + trpezium: "⏢", + tscr: "𝓉", + tscy: "ц", + tshcy: "ћ", + tstrok: "ŧ", + uHar: "⥣", + uacute: "ú", + ubrcy: "ў", + ubreve: "ŭ", + ucirc: "û", + ucy: "у", + udblac: "ű", + ufisht: "⥾", + ufr: "𝔲", + ugrave: "ù", + uhblk: "▀", + ulcorn: "⌜", + ulcorner: "⌜", + ulcrop: "⌏", + ultri: "◸", + umacr: "ū", + uogon: "ų", + uopf: "𝕦", + upsi: "υ", + upsilon: "υ", + upuparrows: "⇈", + uuarr: "⇈", + urcorn: "⌝", + urcorner: "⌝", + urcrop: "⌎", + uring: "ů", + urtri: "◹", + uscr: "𝓊", + utdot: "⋰", + utilde: "ũ", + uuml: "ü", + uwangle: "⦧", + vBar: "⫨", + vBarv: "⫩", + vangrt: "⦜", + varsubsetneq: "⊊︀", + vsubne: "⊊︀", + varsubsetneqq: "⫋︀", + vsubnE: "⫋︀", + varsupsetneq: "⊋︀", + vsupne: "⊋︀", + varsupsetneqq: "⫌︀", + vsupnE: "⫌︀", + vcy: "в", + veebar: "⊻", + veeeq: "≚", + vellip: "⋮", + vfr: "𝔳", + vopf: "𝕧", + vscr: "𝓋", + vzigzag: "⦚", + wcirc: "ŵ", + wedbar: "⩟", + wedgeq: "≙", + weierp: "℘", + wp: "℘", + wfr: "𝔴", + wopf: "𝕨", + wscr: "𝓌", + xfr: "𝔵", + xi: "ξ", + xnis: "⋻", + xopf: "𝕩", + xscr: "𝓍", + yacute: "ý", + yacy: "я", + ycirc: "ŷ", + ycy: "ы", + yen: "¥", + yfr: "𝔶", + yicy: "ї", + yopf: "𝕪", + yscr: "𝓎", + yucy: "ю", + yuml: "ÿ", + zacute: "ź", + zcaron: "ž", + zcy: "з", + zdot: "ż", + zeta: "ζ", + zfr: "𝔷", + zhcy: "ж", + zigrarr: "⇝", + zopf: "𝕫", + zscr: "𝓏", + zwj: "‍", + zwnj: "‌" + }; + _e.ngsp = ""; + l = (function(e) { + return e[e.TAG_OPEN_START = 0] = "TAG_OPEN_START", e[e.TAG_OPEN_END = 1] = "TAG_OPEN_END", e[e.TAG_OPEN_END_VOID = 2] = "TAG_OPEN_END_VOID", e[e.TAG_CLOSE = 3] = "TAG_CLOSE", e[e.INCOMPLETE_TAG_OPEN = 4] = "INCOMPLETE_TAG_OPEN", e[e.TEXT = 5] = "TEXT", e[e.ESCAPABLE_RAW_TEXT = 6] = "ESCAPABLE_RAW_TEXT", e[e.RAW_TEXT = 7] = "RAW_TEXT", e[e.INTERPOLATION = 8] = "INTERPOLATION", e[e.ENCODED_ENTITY = 9] = "ENCODED_ENTITY", e[e.COMMENT_START = 10] = "COMMENT_START", e[e.COMMENT_END = 11] = "COMMENT_END", e[e.CDATA_START = 12] = "CDATA_START", e[e.CDATA_END = 13] = "CDATA_END", e[e.ATTR_NAME = 14] = "ATTR_NAME", e[e.ATTR_QUOTE = 15] = "ATTR_QUOTE", e[e.ATTR_VALUE_TEXT = 16] = "ATTR_VALUE_TEXT", e[e.ATTR_VALUE_INTERPOLATION = 17] = "ATTR_VALUE_INTERPOLATION", e[e.DOC_TYPE_START = 18] = "DOC_TYPE_START", e[e.DOC_TYPE_END = 19] = "DOC_TYPE_END", e[e.EXPANSION_FORM_START = 20] = "EXPANSION_FORM_START", e[e.EXPANSION_CASE_VALUE = 21] = "EXPANSION_CASE_VALUE", e[e.EXPANSION_CASE_EXP_START = 22] = "EXPANSION_CASE_EXP_START", e[e.EXPANSION_CASE_EXP_END = 23] = "EXPANSION_CASE_EXP_END", e[e.EXPANSION_FORM_END = 24] = "EXPANSION_FORM_END", e[e.BLOCK_OPEN_START = 25] = "BLOCK_OPEN_START", e[e.BLOCK_OPEN_END = 26] = "BLOCK_OPEN_END", e[e.BLOCK_CLOSE = 27] = "BLOCK_CLOSE", e[e.BLOCK_PARAMETER = 28] = "BLOCK_PARAMETER", e[e.INCOMPLETE_BLOCK_OPEN = 29] = "INCOMPLETE_BLOCK_OPEN", e[e.LET_START = 30] = "LET_START", e[e.LET_VALUE = 31] = "LET_VALUE", e[e.LET_END = 32] = "LET_END", e[e.INCOMPLETE_LET = 33] = "INCOMPLETE_LET", e[e.COMPONENT_OPEN_START = 34] = "COMPONENT_OPEN_START", e[e.COMPONENT_OPEN_END = 35] = "COMPONENT_OPEN_END", e[e.COMPONENT_OPEN_END_VOID = 36] = "COMPONENT_OPEN_END_VOID", e[e.COMPONENT_CLOSE = 37] = "COMPONENT_CLOSE", e[e.INCOMPLETE_COMPONENT_OPEN = 38] = "INCOMPLETE_COMPONENT_OPEN", e[e.DIRECTIVE_NAME = 39] = "DIRECTIVE_NAME", e[e.DIRECTIVE_OPEN = 40] = "DIRECTIVE_OPEN", e[e.DIRECTIVE_CLOSE = 41] = "DIRECTIVE_CLOSE", e[e.EOF = 42] = "EOF", e; + })({}); + qa = class { + constructor(e, t, r) { + this.tokens = e, this.errors = t, this.nonNormalizedIcuExpressions = r; + } + }; + Fa = /\r\n?/g; + gr = (function(e) { + return e.HEX = "hexadecimal", e.DEC = "decimal", e; + })(gr || {}), Va = [ + "@if", + "@else", + "@for", + "@switch", + "@case", + "@default", + "@empty", + "@defer", + "@placeholder", + "@loading", + "@error" + ], st = { + start: "{{", + end: "}}" + }, Ua = class { + _cursor; + _tokenizeIcu; + _leadingTriviaCodePoints; + _canSelfClose; + _allowHtmComponentClosingTags; + _currentTokenStart = null; + _currentTokenType = null; + _expansionCaseStack = []; + _openDirectiveCount = 0; + _inInterpolation = !1; + _preserveLineEndings; + _i18nNormalizeLineEndingsInICUs; + _fullNameStack = []; + _tokenizeBlocks; + _tokenizeLet; + _selectorlessEnabled; + tokens = []; + errors = []; + nonNormalizedIcuExpressions = []; + constructor(e, t, r) { + this._getTagContentType = t, this._tokenizeIcu = r.tokenizeExpansionForms || !1, this._leadingTriviaCodePoints = r.leadingTriviaChars && r.leadingTriviaChars.map((i) => i.codePointAt(0) || 0), this._canSelfClose = r.canSelfClose || !1, this._allowHtmComponentClosingTags = r.allowHtmComponentClosingTags || !1; + let n = r.range || { + endPos: e.content.length, + startPos: 0, + startLine: 0, + startCol: 0 + }; + this._cursor = r.escapedString ? new Ka(e, n) : new Oi(e, n), this._preserveLineEndings = r.preserveLineEndings || !1, this._i18nNormalizeLineEndingsInICUs = r.i18nNormalizeLineEndingsInICUs || !1, this._tokenizeBlocks = r.tokenizeBlocks ?? !0, this._tokenizeLet = r.tokenizeLet ?? !0, this._selectorlessEnabled = r.selectorlessEnabled ?? !1; + try { + this._cursor.init(); + } catch (i) { + this.handleError(i); + } + } + _processCarriageReturns(e) { + return this._preserveLineEndings ? e : e.replace(Fa, ` +`); + } + tokenize() { + for (; this._cursor.peek() !== 0;) { + let e = this._cursor.clone(); + try { + if (this._attemptCharCode(60)) if (this._attemptCharCode(33)) this._attemptStr("[CDATA[") ? this._consumeCdata(e) : this._attemptStr("--") ? this._consumeComment(e) : this._attemptStrCaseInsensitive("doctype") ? this._consumeDocType(e) : this._consumeBogusComment(e); + else if (this._attemptCharCode(47)) this._consumeTagClose(e); + else { + let t = this._cursor.clone(); + this._attemptCharCode(63) ? (this._cursor = t, this._consumeBogusComment(e)) : this._consumeTagOpen(e); + } + else this._tokenizeLet && this._cursor.peek() === 64 && !this._inInterpolation && this._isLetStart() ? this._consumeLetDeclaration(e) : this._tokenizeBlocks && this._isBlockStart() ? this._consumeBlockStart(e) : this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode(125) ? this._consumeBlockEnd(e) : this._tokenizeIcu && this._tokenizeExpansionForm() || this._consumeWithInterpolation(l.TEXT, l.INTERPOLATION, () => this._isTextEnd(), () => this._isTagStart()); + } catch (t) { + this.handleError(t); + } + } + this._beginToken(l.EOF), this._endToken([]); + } + _getBlockName() { + let e = !1, t = this._cursor.clone(); + return this._attemptCharCodeUntilFn((r) => it(r) ? !e : ja(r) ? (e = !0, !1) : !0), this._cursor.getChars(t).trim(); + } + _consumeBlockStart(e) { + this._requireCharCode(64), this._beginToken(l.BLOCK_OPEN_START, e); + let t = this._endToken([this._getBlockName()]); + if (this._cursor.peek() === 40) if (this._cursor.advance(), this._consumeBlockParameters(), this._attemptCharCodeUntilFn(v), this._attemptCharCode(41)) this._attemptCharCodeUntilFn(v); + else { + t.type = l.INCOMPLETE_BLOCK_OPEN; + return; + } + if (t.parts[0] === "default never" && this._attemptCharCode(59)) { + this._beginToken(l.BLOCK_OPEN_END), this._endToken([]), this._beginToken(l.BLOCK_CLOSE), this._endToken([]); + return; + } + this._attemptCharCode(123) ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([])) : this._isBlockStart() && (t.parts[0] === "case" || t.parts[0] === "default") ? (this._beginToken(l.BLOCK_OPEN_END), this._endToken([]), this._beginToken(l.BLOCK_CLOSE), this._endToken([])) : t.type = l.INCOMPLETE_BLOCK_OPEN; + } + _consumeBlockEnd(e) { + this._beginToken(l.BLOCK_CLOSE, e), this._endToken([]); + } + _consumeBlockParameters() { + for (this._attemptCharCodeUntilFn(Ai); this._cursor.peek() !== 41 && this._cursor.peek() !== 0;) { + this._beginToken(l.BLOCK_PARAMETER); + let e = this._cursor.clone(), t = null, r = 0; + for (; this._cursor.peek() !== 59 && this._cursor.peek() !== 0 || t !== null;) { + let n = this._cursor.peek(); + if (n === 92) this._cursor.advance(); + else if (n === t) t = null; + else if (t === null && Dt(n)) t = n; + else if (n === 40 && t === null) r++; + else if (n === 41 && t === null) { + if (r === 0) break; + r > 0 && r--; + } + this._cursor.advance(); + } + this._endToken([this._cursor.getChars(e)]), this._attemptCharCodeUntilFn(Ai); + } + } + _consumeLetDeclaration(e) { + if (this._requireStr("@let"), this._beginToken(l.LET_START, e), it(this._cursor.peek())) this._attemptCharCodeUntilFn(v); + else { + let r = this._endToken([this._cursor.getChars(e)]); + r.type = l.INCOMPLETE_LET; + return; + } + let t = this._endToken([this._getLetDeclarationName()]); + if (this._attemptCharCodeUntilFn(v), !this._attemptCharCode(61)) { + t.type = l.INCOMPLETE_LET; + return; + } + this._attemptCharCodeUntilFn((r) => v(r) && !Me(r)), this._consumeLetDeclarationValue(), this._cursor.peek() === 59 ? (this._beginToken(l.LET_END), this._endToken([]), this._cursor.advance()) : (t.type = l.INCOMPLETE_LET, t.sourceSpan = this._cursor.getSpan(e)); + } + _getLetDeclarationName() { + let e = this._cursor.clone(), t = !1; + return this._attemptCharCodeUntilFn((r) => Re(r) || r === 36 || r === 95 || t && Ie(r) ? (t = !0, !1) : !0), this._cursor.getChars(e).trim(); + } + _consumeLetDeclarationValue() { + let e = this._cursor.clone(); + for (this._beginToken(l.LET_VALUE, e); this._cursor.peek() !== 0;) { + let t = this._cursor.peek(); + if (t === 59) break; + Dt(t) && (this._cursor.advance(), this._attemptCharCodeUntilFn((r) => r === 92 ? (this._cursor.advance(), !1) : r === t)), this._cursor.advance(); + } + this._endToken([this._cursor.getChars(e)]); + } + _tokenizeExpansionForm() { + if (this.isExpansionFormStart()) return this._consumeExpansionFormStart(), !0; + if ($a(this._cursor.peek()) && this._isInExpansionForm()) return this._consumeExpansionCaseStart(), !0; + if (this._cursor.peek() === 125) { + if (this._isInExpansionCase()) return this._consumeExpansionCaseEnd(), !0; + if (this._isInExpansionForm()) return this._consumeExpansionFormEnd(), !0; + } + return !1; + } + _beginToken(e, t = this._cursor.clone()) { + this._currentTokenStart = t, this._currentTokenType = e; + } + _endToken(e, t) { + if (this._currentTokenStart === null) throw new ee(this._cursor.getSpan(t), "Programming error - attempted to end a token when there was no start to the token"); + if (this._currentTokenType === null) throw new ee(this._cursor.getSpan(this._currentTokenStart), "Programming error - attempted to end a token which has no token type"); + let r = { + type: this._currentTokenType, + parts: e, + sourceSpan: (t ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) + }; + return this.tokens.push(r), this._currentTokenStart = null, this._currentTokenType = null, r; + } + _createError(e, t) { + this._isInExpansionForm() && (e += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`); + let r = new ee(t, e); + return this._currentTokenStart = null, this._currentTokenType = null, r; + } + handleError(e) { + if (e instanceof Er && (e = this._createError(e.msg, this._cursor.getSpan(e.cursor))), e instanceof ee) this.errors.push(e); + else throw e; + } + _attemptCharCode(e) { + return this._cursor.peek() === e ? (this._cursor.advance(), !0) : !1; + } + _attemptCharCodeCaseInsensitive(e) { + return Ya(this._cursor.peek(), e) ? (this._cursor.advance(), !0) : !1; + } + _requireCharCode(e) { + let t = this._cursor.clone(); + if (!this._attemptCharCode(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t)); + } + _attemptStr(e) { + let t = e.length; + if (this._cursor.charsLeft() < t) return !1; + let r = this._cursor.clone(); + for (let n = 0; n < t; n++) if (!this._attemptCharCode(e.charCodeAt(n))) return this._cursor = r, !1; + return !0; + } + _attemptStrCaseInsensitive(e) { + for (let t = 0; t < e.length; t++) if (!this._attemptCharCodeCaseInsensitive(e.charCodeAt(t))) return !1; + return !0; + } + _requireStr(e) { + let t = this._cursor.clone(); + if (!this._attemptStr(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t)); + } + _requireStrCaseInsensitive(e) { + let t = this._cursor.clone(); + if (!this._attemptStrCaseInsensitive(e)) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(t)); + } + _attemptCharCodeUntilFn(e) { + for (; !e(this._cursor.peek());) this._cursor.advance(); + } + _requireCharCodeUntilFn(e, t) { + let r = this._cursor.clone(); + if (this._attemptCharCodeUntilFn(e), this._cursor.diff(r) < t) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(r)); + } + _attemptUntilChar(e) { + for (; this._cursor.peek() !== e;) this._cursor.advance(); + } + _readChar() { + let e = String.fromCodePoint(this._cursor.peek()); + return this._cursor.advance(), e; + } + _peekStr(e) { + let t = e.length; + if (this._cursor.charsLeft() < t) return !1; + let r = this._cursor.clone(); + for (let n = 0; n < t; n++) { + if (r.peek() !== e.charCodeAt(n)) return !1; + r.advance(); + } + return !0; + } + _isBlockStart() { + return this._cursor.peek() === 64 && Va.some((e) => this._peekStr(e)); + } + _isLetStart() { + return this._cursor.peek() === 64 && this._peekStr("@let"); + } + _consumeEntity(e) { + this._beginToken(l.ENCODED_ENTITY); + let t = this._cursor.clone(); + if (this._cursor.advance(), this._attemptCharCode(35)) { + let r = this._attemptCharCode(120) || this._attemptCharCode(88), n = this._cursor.clone(); + if (this._attemptCharCodeUntilFn(Ga), this._cursor.peek() != 59) { + this._cursor.advance(); + let s = r ? gr.HEX : gr.DEC; + throw this._createError(Ha(s, this._cursor.getChars(t)), this._cursor.getSpan()); + } + let i = this._cursor.getChars(n); + this._cursor.advance(); + try { + let s = parseInt(i, r ? 16 : 10); + this._endToken([String.fromCodePoint(s), this._cursor.getChars(t)]); + } catch { + throw this._createError(xi(this._cursor.getChars(t)), this._cursor.getSpan()); + } + } else { + let r = this._cursor.clone(); + if (this._attemptCharCodeUntilFn(za), this._cursor.peek() != 59) this._beginToken(e, t), this._cursor = r, this._endToken(["&"]); + else { + let n = this._cursor.getChars(r); + this._cursor.advance(); + let i = _e.hasOwnProperty(n) && _e[n]; + if (!i) throw this._createError(xi(n), this._cursor.getSpan(t)); + this._endToken([i, `&${n};`]); + } + } + } + _consumeRawText(e, t) { + this._beginToken(e ? l.ESCAPABLE_RAW_TEXT : l.RAW_TEXT); + let r = []; + for (;;) { + let n = this._cursor.clone(), i = t(); + if (this._cursor = n, i) break; + e && this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(r.join(""))]), r.length = 0, this._consumeEntity(l.ESCAPABLE_RAW_TEXT), this._beginToken(l.ESCAPABLE_RAW_TEXT)) : r.push(this._readChar()); + } + this._endToken([this._processCarriageReturns(r.join(""))]); + } + _consumeComment(e) { + this._beginToken(l.COMMENT_START, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("-->")), this._beginToken(l.COMMENT_END), this._requireStr("-->"), this._endToken([]); + } + _consumeBogusComment(e) { + this._beginToken(l.COMMENT_START, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(l.COMMENT_END), this._cursor.advance(), this._endToken([]); + } + _consumeCdata(e) { + this._beginToken(l.CDATA_START, e), this._endToken([]), this._consumeRawText(!1, () => this._attemptStr("]]>")), this._beginToken(l.CDATA_END), this._requireStr("]]>"), this._endToken([]); + } + _consumeDocType(e) { + this._beginToken(l.DOC_TYPE_START, e), this._endToken([]), this._consumeRawText(!1, () => this._cursor.peek() === 62), this._beginToken(l.DOC_TYPE_END), this._cursor.advance(), this._endToken([]); + } + _consumePrefixAndName(e) { + let t = this._cursor.clone(), r = ""; + for (; this._cursor.peek() !== 58 && !Wa(this._cursor.peek());) this._cursor.advance(); + let n; + this._cursor.peek() === 58 ? (r = this._cursor.getChars(t), this._cursor.advance(), n = this._cursor.clone()) : n = t, this._requireCharCodeUntilFn(e, r === "" ? 0 : 1); + let i = this._cursor.getChars(n); + return [r, i]; + } + _consumeSingleLineComment() { + this._attemptCharCodeUntilFn((e) => Me(e) || e === 0), this._attemptCharCodeUntilFn(v); + } + _consumeMultiLineComment() { + this._attemptCharCodeUntilFn((e) => { + if (e === 0) return !0; + if (e === 42) { + let t = this._cursor.clone(); + return t.advance(), t.peek() === 47; + } + return !1; + }), this._attemptStr("*/") && this._attemptCharCodeUntilFn(v); + } + _consumeTagOpen(e) { + let t, r, n, i, s = []; + try { + if (this._selectorlessEnabled && It(this._cursor.peek())) i = this._consumeComponentOpenStart(e), [n, r, t] = i.parts, r && (n += `:${r}`), t && (n += `:${t}`), this._attemptCharCodeUntilFn(v); + else { + if (!Re(this._cursor.peek())) throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e)); + i = this._consumeTagOpenStart(e), r = i.parts[0], t = n = i.parts[1], this._attemptCharCodeUntilFn(v); + } + for (;;) { + if (this._attemptStr("//")) { + this._consumeSingleLineComment(); + continue; + } + if (this._attemptStr("/*")) { + this._consumeMultiLineComment(); + continue; + } + if (Li(this._cursor.peek())) break; + if (this._selectorlessEnabled && this._cursor.peek() === 64) { + let o = this._cursor.clone(), c = o.clone(); + c.advance(), It(c.peek()) && this._consumeDirective(o, c); + } else { + let o = this._consumeAttribute(); + s.push(o); + } + } + i.type === l.COMPONENT_OPEN_START ? this._consumeComponentOpenEnd() : this._consumeTagOpenEnd(); + } catch (o) { + if (o instanceof ee) { + i ? i.type = i.type === l.COMPONENT_OPEN_START ? l.INCOMPLETE_COMPONENT_OPEN : l.INCOMPLETE_TAG_OPEN : (this._beginToken(l.TEXT, e), this._endToken(["<"])); + return; + } + throw o; + } + if (this._canSelfClose && this.tokens[this.tokens.length - 1].type === l.TAG_OPEN_END_VOID) return; + let a = this._getTagContentType(t, r, this._fullNameStack.length > 0, s); + this._handleFullNameStackForTagOpen(r, t), a === R.RAW_TEXT ? this._consumeRawTextWithTagClose(r, i, n, !1) : a === R.ESCAPABLE_RAW_TEXT && this._consumeRawTextWithTagClose(r, i, n, !0); + } + _consumeRawTextWithTagClose(e, t, r, n) { + this._consumeRawText(n, () => !this._attemptCharCode(60) || !this._attemptCharCode(47) || (this._attemptCharCodeUntilFn(v), !this._attemptStrCaseInsensitive(e && t.type !== l.COMPONENT_OPEN_START ? `${e}:${r}` : r)) ? !1 : (this._attemptCharCodeUntilFn(v), this._attemptCharCode(62))), this._beginToken(t.type === l.COMPONENT_OPEN_START ? l.COMPONENT_CLOSE : l.TAG_CLOSE), this._requireCharCodeUntilFn((i) => i === 62, 3), this._cursor.advance(), this._endToken(t.parts), this._handleFullNameStackForTagClose(e, r); + } + _consumeTagOpenStart(e) { + this._beginToken(l.TAG_OPEN_START, e); + let t = this._consumePrefixAndName(Ee); + return this._endToken(t); + } + _consumeComponentOpenStart(e) { + this._beginToken(l.COMPONENT_OPEN_START, e); + let t = this._consumeComponentName(); + return this._endToken(t); + } + _consumeComponentName() { + let e = this._cursor.clone(); + for (; Ni(this._cursor.peek());) this._cursor.advance(); + let t = this._cursor.getChars(e), r = "", n = ""; + return this._cursor.peek() === 58 && (this._cursor.advance(), [r, n] = this._consumePrefixAndName(Ee)), [ + t, + r, + n + ]; + } + _consumeAttribute() { + let [e, t] = this._consumeAttributeName(), r; + return this._attemptCharCodeUntilFn(v), this._attemptCharCode(61) && (this._attemptCharCodeUntilFn(v), r = this._consumeAttributeValue()), this._attemptCharCodeUntilFn(v), { + prefix: e, + name: t, + value: r + }; + } + _consumeAttributeName() { + let e = this._cursor.peek(); + if (e === 39 || e === 34) throw this._createError(Se(e), this._cursor.getSpan()); + this._beginToken(l.ATTR_NAME); + let t; + if (this._openDirectiveCount > 0) { + let n = 0; + t = (i) => { + if (this._openDirectiveCount > 0) { + if (i === 40) n++; + else if (i === 41) { + if (n === 0) return !0; + n--; + } + } + return Ee(i); + }; + } else if (e === 91) { + let n = 0; + t = (i) => (i === 91 ? n++ : i === 93 && n--, n <= 0 ? Ee(i) : Me(i)); + } else t = Ee; + let r = this._consumePrefixAndName(t); + return this._endToken(r), r; + } + _consumeAttributeValue() { + let e; + if (this._cursor.peek() === 39 || this._cursor.peek() === 34) { + let t = this._cursor.peek(); + this._consumeQuote(t); + let r = () => this._cursor.peek() === t; + e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, r, r), this._consumeQuote(t); + } else { + let t = () => Ee(this._cursor.peek()); + e = this._consumeWithInterpolation(l.ATTR_VALUE_TEXT, l.ATTR_VALUE_INTERPOLATION, t, t); + } + return e; + } + _consumeQuote(e) { + this._beginToken(l.ATTR_QUOTE), this._requireCharCode(e), this._endToken([String.fromCodePoint(e)]); + } + _consumeTagOpenEnd() { + let e = this._attemptCharCode(47) ? l.TAG_OPEN_END_VOID : l.TAG_OPEN_END; + this._beginToken(e), this._requireCharCode(62), this._endToken([]); + } + _consumeComponentOpenEnd() { + let e = this._attemptCharCode(47) ? l.COMPONENT_OPEN_END_VOID : l.COMPONENT_OPEN_END; + this._beginToken(e), this._requireCharCode(62), this._endToken([]); + } + _consumeTagClose(e) { + if (this._selectorlessEnabled) { + let t = e.clone(); + for (; t.peek() !== 62 && !It(t.peek());) t.advance(); + if (It(t.peek())) { + this._beginToken(l.COMPONENT_CLOSE, e); + let r = this._consumeComponentName(); + this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken(r); + return; + } + } + if (this._beginToken(l.TAG_CLOSE, e), this._attemptCharCodeUntilFn(v), this._allowHtmComponentClosingTags && this._attemptCharCode(47)) this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken([]); + else { + let [t, r] = this._consumePrefixAndName(Ee); + this._attemptCharCodeUntilFn(v), this._requireCharCode(62), this._endToken([t, r]), this._handleFullNameStackForTagClose(t, r); + } + } + _consumeExpansionFormStart() { + this._beginToken(l.EXPANSION_FORM_START), this._requireCharCode(123), this._endToken([]), this._expansionCaseStack.push(l.EXPANSION_FORM_START), this._beginToken(l.RAW_TEXT); + let e = this._readUntil(44), t = this._processCarriageReturns(e); + if (this._i18nNormalizeLineEndingsInICUs) this._endToken([t]); + else { + let n = this._endToken([e]); + t !== e && this.nonNormalizedIcuExpressions.push(n); + } + this._requireCharCode(44), this._attemptCharCodeUntilFn(v), this._beginToken(l.RAW_TEXT); + let r = this._readUntil(44); + this._endToken([r]), this._requireCharCode(44), this._attemptCharCodeUntilFn(v); + } + _consumeExpansionCaseStart() { + this._beginToken(l.EXPANSION_CASE_VALUE); + let e = this._readUntil(123).trim(); + this._endToken([e]), this._attemptCharCodeUntilFn(v), this._beginToken(l.EXPANSION_CASE_EXP_START), this._requireCharCode(123), this._endToken([]), this._attemptCharCodeUntilFn(v), this._expansionCaseStack.push(l.EXPANSION_CASE_EXP_START); + } + _consumeExpansionCaseEnd() { + this._beginToken(l.EXPANSION_CASE_EXP_END), this._requireCharCode(125), this._endToken([]), this._attemptCharCodeUntilFn(v), this._expansionCaseStack.pop(); + } + _consumeExpansionFormEnd() { + this._beginToken(l.EXPANSION_FORM_END), this._requireCharCode(125), this._endToken([]), this._expansionCaseStack.pop(); + } + _consumeWithInterpolation(e, t, r, n) { + this._beginToken(e); + let i = []; + for (; !r();) { + let a = this._cursor.clone(); + this._attemptStr(st.start) ? (this._endToken([this._processCarriageReturns(i.join(""))], a), i.length = 0, this._consumeInterpolation(t, a, n), this._beginToken(e)) : this._cursor.peek() === 38 ? (this._endToken([this._processCarriageReturns(i.join(""))]), i.length = 0, this._consumeEntity(e), this._beginToken(e)) : i.push(this._readChar()); + } + this._inInterpolation = !1; + let s = this._processCarriageReturns(i.join("")); + return this._endToken([s]), s; + } + _consumeInterpolation(e, t, r) { + let n = []; + this._beginToken(e, t), n.push(st.start); + let i = this._cursor.clone(), s = null, a = !1; + for (; this._cursor.peek() !== 0 && (r === null || !r());) { + let o = this._cursor.clone(); + if (this._isTagStart()) { + this._cursor = o, n.push(this._getProcessedChars(i, o)), this._endToken(n); + return; + } + if (s === null) if (this._attemptStr(st.end)) { + n.push(this._getProcessedChars(i, o)), n.push(st.end), this._endToken(n); + return; + } else this._attemptStr("//") && (a = !0); + let c = this._cursor.peek(); + this._cursor.advance(), c === 92 ? this._cursor.advance() : c === s ? s = null : !a && s === null && Dt(c) && (s = c); + } + n.push(this._getProcessedChars(i, this._cursor)), this._endToken(n); + } + _consumeDirective(e, t) { + for (this._requireCharCode(64), this._cursor.advance(); Ni(this._cursor.peek());) this._cursor.advance(); + this._beginToken(l.DIRECTIVE_NAME, e); + let r = this._cursor.getChars(t); + if (this._endToken([r]), this._attemptCharCodeUntilFn(v), this._cursor.peek() === 40) { + for (this._openDirectiveCount++, this._beginToken(l.DIRECTIVE_OPEN), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(v); !Li(this._cursor.peek()) && this._cursor.peek() !== 41;) this._consumeAttribute(); + if (this._attemptCharCodeUntilFn(v), this._openDirectiveCount--, this._cursor.peek() !== 41) { + if (this._cursor.peek() === 62 || this._cursor.peek() === 47) return; + throw this._createError(Se(this._cursor.peek()), this._cursor.getSpan(e)); + } + this._beginToken(l.DIRECTIVE_CLOSE), this._cursor.advance(), this._endToken([]), this._attemptCharCodeUntilFn(v); + } + } + _getProcessedChars(e, t) { + return this._processCarriageReturns(t.getChars(e)); + } + _isTextEnd() { + return !!(this._isTagStart() || this._cursor.peek() === 0 || this._tokenizeIcu && !this._inInterpolation && (this.isExpansionFormStart() || this._cursor.peek() === 125 && this._isInExpansionCase()) || this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._isBlockStart() || this._isLetStart() || this._cursor.peek() === 125)); + } + _isTagStart() { + if (this._cursor.peek() === 60) { + let e = this._cursor.clone(); + e.advance(); + let t = e.peek(); + if (97 <= t && t <= 122 || 65 <= t && t <= 90 || t === 47 || t === 33) return !0; + } + return !1; + } + _readUntil(e) { + let t = this._cursor.clone(); + return this._attemptUntilChar(e), this._cursor.getChars(t); + } + _isInExpansion() { + return this._isInExpansionCase() || this._isInExpansionForm(); + } + _isInExpansionCase() { + return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === l.EXPANSION_CASE_EXP_START; + } + _isInExpansionForm() { + return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === l.EXPANSION_FORM_START; + } + isExpansionFormStart() { + if (this._cursor.peek() !== 123) return !1; + let e = this._cursor.clone(), t = this._attemptStr(st.start); + return this._cursor = e, !t; + } + _handleFullNameStackForTagOpen(e, t) { + let r = fe(e, t); + (this._fullNameStack.length === 0 || this._fullNameStack[this._fullNameStack.length - 1] === r) && this._fullNameStack.push(r); + } + _handleFullNameStackForTagClose(e, t) { + let r = fe(e, t); + this._fullNameStack.length !== 0 && this._fullNameStack[this._fullNameStack.length - 1] === r && this._fullNameStack.pop(); + } + }; + Oi = class _r { + state; + file; + input; + end; + constructor(t, r) { + if (t instanceof _r) { + this.file = t.file, this.input = t.input, this.end = t.end; + let n = t.state; + this.state = { + peek: n.peek, + offset: n.offset, + line: n.line, + column: n.column + }; + } else { + if (!r) throw new Error("Programming error: the range argument must be provided with a file argument."); + this.file = t, this.input = t.content, this.end = r.endPos, this.state = { + peek: -1, + offset: r.startPos, + line: r.startLine, + column: r.startCol + }; + } + } + clone() { + return new _r(this); + } + peek() { + return this.state.peek; + } + charsLeft() { + return this.end - this.state.offset; + } + diff(t) { + return this.state.offset - t.state.offset; + } + advance() { + this.advanceState(this.state); + } + init() { + this.updatePeek(this.state); + } + getSpan(t, r) { + t = t || this; + let n = t; + if (r) for (; this.diff(t) > 0 && r.indexOf(t.peek()) !== -1;) n === t && (t = t.clone()), t.advance(); + let i = this.locationFromCursor(t); + return new h(i, this.locationFromCursor(this), n !== t ? this.locationFromCursor(n) : i); + } + getChars(t) { + return this.input.substring(t.state.offset, this.state.offset); + } + charAt(t) { + return this.input.charCodeAt(t); + } + advanceState(t) { + if (t.offset >= this.end) throw this.state = t, new Er("Unexpected character \"EOF\"", this); + let r = this.charAt(t.offset); + r === 10 ? (t.line++, t.column = 0) : Me(r) || t.column++, t.offset++, this.updatePeek(t); + } + updatePeek(t) { + t.peek = t.offset >= this.end ? 0 : this.charAt(t.offset); + } + locationFromCursor(t) { + return new De(t.file, t.state.offset, t.state.line, t.state.column); + } + }, Ka = class Sr extends Oi { + internalState; + constructor(t, r) { + t instanceof Sr ? (super(t), this.internalState = { ...t.internalState }) : (super(t, r), this.internalState = this.state); + } + advance() { + this.state = this.internalState, super.advance(), this.processEscapeSequence(); + } + init() { + super.init(), this.processEscapeSequence(); + } + clone() { + return new Sr(this); + } + getChars(t) { + let r = t.clone(), n = ""; + for (; r.internalState.offset < this.internalState.offset;) n += String.fromCodePoint(r.peek()), r.advance(); + return n; + } + processEscapeSequence() { + let t = () => this.internalState.peek; + if (t() === 92) if (this.internalState = { ...this.state }, this.advanceState(this.internalState), t() === 110) this.state.peek = 10; + else if (t() === 114) this.state.peek = 13; + else if (t() === 118) this.state.peek = 11; + else if (t() === 116) this.state.peek = 9; + else if (t() === 98) this.state.peek = 8; + else if (t() === 102) this.state.peek = 12; + else if (t() === 117) if (this.advanceState(this.internalState), t() === 123) { + this.advanceState(this.internalState); + let r = this.clone(), n = 0; + for (; t() !== 125;) this.advanceState(this.internalState), n++; + this.state.peek = this.decodeHexDigits(r, n); + } else { + let r = this.clone(); + this.advanceState(this.internalState), this.advanceState(this.internalState), this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 4); + } + else if (t() === 120) { + this.advanceState(this.internalState); + let r = this.clone(); + this.advanceState(this.internalState), this.state.peek = this.decodeHexDigits(r, 2); + } else if (dr(t())) { + let r = "", n = 0, i = this.clone(); + for (; dr(t()) && n < 3;) i = this.clone(), r += String.fromCodePoint(t()), this.advanceState(this.internalState), n++; + this.state.peek = parseInt(r, 8), this.internalState = i.internalState; + } else Me(this.internalState.peek) ? (this.advanceState(this.internalState), this.state = this.internalState) : this.state.peek = this.internalState.peek; + } + decodeHexDigits(t, r) { + let n = this.input.slice(t.internalState.offset, t.internalState.offset + r), i = parseInt(n, 16); + if (isNaN(i)) throw t.state = t.internalState, new Er("Invalid hexadecimal escape sequence", t); + return i; + } + }, Er = class extends Error { + constructor(e, t) { + super(e), this.msg = e, this.cursor = t, Object.setPrototypeOf(this, new.target.prototype); + } + }; + y = class Ri extends ee { + static create(t, r, n) { + return new Ri(t, r, n); + } + constructor(t, r, n) { + super(r, n), this.elementName = t; + } + }, Qa = class { + constructor(e, t) { + this.rootNodes = e, this.errors = t; + } + }, Mi = class { + constructor(e) { + this.getTagDefinition = e; + } + parse(e, t, r, n = !1, i) { + let s = (m) => (_, ...T) => m(_.toLowerCase(), ...T), a = n ? this.getTagDefinition : s(this.getTagDefinition), o = (m) => a(m).getContentType(), c = n ? i : s(i), u = Pi(e, t, i ? (m, _, T, P) => { + let z = c(m, _, T, P); + return z !== void 0 ? z : o(m); + } : o, r), p = r && r.canSelfClose || !1, d = r && r.allowHtmComponentClosingTags || !1, g = new Ja(u.tokens, a, p, d, n); + return g.build(), new Qa(g.rootNodes, [...u.errors, ...g.errors]); + } + }, Ja = class Bi { + _index = -1; + _peek; + _containerStack = []; + rootNodes = []; + errors = []; + constructor(t, r, n, i, s) { + this.tokens = t, this.tagDefinitionResolver = r, this.canSelfClose = n, this.allowHtmComponentClosingTags = i, this.isTagNameCaseSensitive = s, this._advance(); + } + build() { + for (; this._peek.type !== l.EOF;) this._peek.type === l.TAG_OPEN_START || this._peek.type === l.INCOMPLETE_TAG_OPEN ? this._consumeElementStartTag(this._advance()) : this._peek.type === l.TAG_CLOSE ? (this._closeVoidElement(), this._consumeElementEndTag(this._advance())) : this._peek.type === l.CDATA_START ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === l.COMMENT_START ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === l.TEXT || this._peek.type === l.RAW_TEXT || this._peek.type === l.ESCAPABLE_RAW_TEXT ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === l.EXPANSION_FORM_START ? this._consumeExpansion(this._advance()) : this._peek.type === l.BLOCK_OPEN_START ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === l.BLOCK_CLOSE ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === l.INCOMPLETE_BLOCK_OPEN ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === l.LET_START ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === l.DOC_TYPE_START ? this._consumeDocType(this._advance()) : this._peek.type === l.INCOMPLETE_LET ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._peek.type === l.COMPONENT_OPEN_START || this._peek.type === l.INCOMPLETE_COMPONENT_OPEN ? this._consumeComponentStartTag(this._advance()) : this._peek.type === l.COMPONENT_CLOSE ? this._consumeComponentEndTag(this._advance()) : this._advance(); + for (let t of this._containerStack) t instanceof ge && this.errors.push(y.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`)); + } + _advance() { + let t = this._peek; + return this._index < this.tokens.length - 1 && this._index++, this._peek = this.tokens[this._index], t; + } + _advanceIf(t) { + return this._peek.type === t ? this._advance() : null; + } + _consumeCdata(t) { + let r = this._advance(), n = this._getText(r), i = this._advanceIf(l.CDATA_END); + this._addToParent(new Si(n, new h(t.sourceSpan.start, (i || r).sourceSpan.end), [r])); + } + _consumeComment(t) { + let r = this._advanceIf(l.RAW_TEXT), n = this._advanceIf(l.COMMENT_END), i = r != null ? r.parts[0].trim() : null, s = n == null ? t.sourceSpan : new h(t.sourceSpan.start, n.sourceSpan.end, t.sourceSpan.fullStart); + this._addToParent(new Ti(i, s)); + } + _consumeDocType(t) { + let r = this._advanceIf(l.RAW_TEXT), n = this._advanceIf(l.DOC_TYPE_END), i = r != null ? r.parts[0].trim() : null, s = new h(t.sourceSpan.start, (n || r || t).sourceSpan.end); + this._addToParent(new bi(i, s)); + } + _consumeExpansion(t) { + let r = this._advance(), n = this._advance(), i = []; + for (; this._peek.type === l.EXPANSION_CASE_VALUE;) { + let a = this._parseExpansionCase(); + if (!a) return; + i.push(a); + } + if (this._peek.type !== l.EXPANSION_FORM_END) { + this.errors.push(y.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'.")); + return; + } + let s = new h(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart); + this._addToParent(new Ei(r.parts[0], n.parts[0], i, s, r.sourceSpan)), this._advance(); + } + _parseExpansionCase() { + let t = this._advance(); + if (this._peek.type !== l.EXPANSION_CASE_EXP_START) return this.errors.push(y.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null; + let r = this._advance(), n = this._collectExpansionExpTokens(r); + if (!n) return null; + let i = this._advance(); + n.push({ + type: l.EOF, + parts: [], + sourceSpan: i.sourceSpan + }); + let s = new Bi(n, this.tagDefinitionResolver, this.canSelfClose, this.allowHtmComponentClosingTags, this.isTagNameCaseSensitive); + if (s.build(), s.errors.length > 0) return this.errors = this.errors.concat(s.errors), null; + let a = new h(t.sourceSpan.start, i.sourceSpan.end, t.sourceSpan.fullStart), o = new h(r.sourceSpan.start, i.sourceSpan.end, r.sourceSpan.fullStart); + return new Ci(t.parts[0], s.rootNodes, a, t.sourceSpan, o); + } + _collectExpansionExpTokens(t) { + let r = [], n = [l.EXPANSION_CASE_EXP_START]; + for (;;) { + if ((this._peek.type === l.EXPANSION_FORM_START || this._peek.type === l.EXPANSION_CASE_EXP_START) && n.push(this._peek.type), this._peek.type === l.EXPANSION_CASE_EXP_END) if (Di(n, l.EXPANSION_CASE_EXP_START)) { + if (n.pop(), n.length === 0) return r; + } else return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null; + if (this._peek.type === l.EXPANSION_FORM_END) if (Di(n, l.EXPANSION_FORM_START)) n.pop(); + else return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null; + if (this._peek.type === l.EOF) return this.errors.push(y.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null; + r.push(this._advance()); + } + } + _getText(t) { + let r = t.parts[0]; + if (r.length > 0 && r[0] == ` +`) { + var n; + let i = this._getClosestElementLikeParent(); + i != null && i.children.length == 0 && !((n = this._getTagDefinition(i)) === null || n === void 0) && n.ignoreFirstLf && (r = r.substring(1)); + } + return r; + } + _consumeText(t) { + let r = [t], n = t.sourceSpan, i = t.parts[0]; + if (i.length > 0 && i[0] === ` +`) { + var s; + let a = this._getContainer(); + a != null && a.children.length === 0 && !((s = this._getTagDefinition(a)) === null || s === void 0) && s.ignoreFirstLf && (i = i.substring(1), r[0] = { + type: t.type, + sourceSpan: t.sourceSpan, + parts: [i] + }); + } + for (; this._peek.type === l.INTERPOLATION || this._peek.type === l.TEXT || this._peek.type === l.ENCODED_ENTITY;) t = this._advance(), r.push(t), t.type === l.INTERPOLATION ? i += t.parts.join("").replace(/&([^;]+);/g, Ii) : t.type === l.ENCODED_ENTITY ? i += t.parts[0] : i += t.parts.join(""); + if (i.length > 0) { + let a = t.sourceSpan; + this._addToParent(new _i(i, new h(n.start, a.end, n.fullStart, n.details), r)); + } + } + _closeVoidElement() { + var t; + let r = this._getContainer(); + r !== null && !((t = this._getTagDefinition(r)) === null || t === void 0) && t.isVoid && this._containerStack.pop(); + } + _consumeElementStartTag(t) { + var r; + let n = [], i = []; + this._consumeAttributesAndDirectives(n, i); + let s = this._getElementFullName(t, this._getClosestElementLikeParent()), a = this._getTagDefinition(s), o = !1; + if (this._peek.type === l.TAG_OPEN_END_VOID) { + this._advance(), o = !0; + let T = this._getTagDefinition(s); + this.canSelfClose || T?.canSelfClose || Pe(s) !== null || T?.isVoid || this.errors.push(y.create(s, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`)); + } else this._peek.type === l.TAG_OPEN_END && (this._advance(), o = !1); + let c = this._peek.sourceSpan.fullStart, u = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), p = new h(t.sourceSpan.start, c, t.sourceSpan.fullStart), d = new h(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), g = new te(s, n, i, [], o, u, p, void 0, d, a?.isVoid ?? !1), m = this._getContainer(), _ = m !== null && !!(!((r = this._getTagDefinition(m)) === null || r === void 0) && r.isClosedByChild(g.name)); + this._pushContainer(g, _), o ? this._popContainer(s, te, u) : t.type === l.INCOMPLETE_TAG_OPEN && (this._popContainer(s, te, null), this.errors.push(y.create(s, u, `Opening tag "${s}" not terminated.`))); + } + _consumeComponentStartTag(t) { + var r; + let n = t.parts[0], i = [], s = []; + this._consumeAttributesAndDirectives(i, s); + let a = this._getClosestElementLikeParent(), o = this._getComponentTagName(t, a), c = this._getComponentFullName(t, a), u = this._peek.type === l.COMPONENT_OPEN_END_VOID; + this._advance(); + let p = this._peek.sourceSpan.fullStart, d = new h(t.sourceSpan.start, p, t.sourceSpan.fullStart), g = new G(n, o, c, i, s, [], u, d, new h(t.sourceSpan.start, p, t.sourceSpan.fullStart), void 0), m = this._getContainer(), _ = m !== null && g.tagName !== null && !!(!((r = this._getTagDefinition(m)) === null || r === void 0) && r.isClosedByChild(g.tagName)); + this._pushContainer(g, _), u ? this._popContainer(c, G, d) : t.type === l.INCOMPLETE_COMPONENT_OPEN && (this._popContainer(c, G, null), this.errors.push(y.create(c, d, `Opening tag "${c}" not terminated.`))); + } + _consumeAttributesAndDirectives(t, r) { + for (; this._peek.type === l.ATTR_NAME || this._peek.type === l.DIRECTIVE_NAME;) this._peek.type === l.DIRECTIVE_NAME ? r.push(this._consumeDirective(this._peek)) : t.push(this._consumeAttr(this._advance())); + } + _consumeComponentEndTag(t) { + let r = this._getComponentFullName(t, this._getClosestElementLikeParent()); + if (!this._popContainer(r, G, t.sourceSpan)) { + let n = this._containerStack[this._containerStack.length - 1], i; + n instanceof G && n.componentName === t.parts[0] ? i = `, did you mean "${n.fullName}"?` : i = ". It may happen when the tag has already been closed by another tag."; + let s = `Unexpected closing tag "${r}"${i}`; + this.errors.push(y.create(r, t.sourceSpan, s)); + } + } + _getTagDefinition(t) { + return typeof t == "string" ? this.tagDefinitionResolver(t) : t instanceof te ? this.tagDefinitionResolver(t.name) : t instanceof G && t.tagName !== null ? this.tagDefinitionResolver(t.tagName) : null; + } + _pushContainer(t, r) { + r && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t); + } + _consumeElementEndTag(t) { + var r; + let n = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t, this._getClosestElementLikeParent()); + if (n && !((r = this._getTagDefinition(n)) === null || r === void 0) && r.isVoid) this.errors.push(y.create(n, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`)); + else if (!this._popContainer(n, te, t.sourceSpan)) { + let i = `Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`; + this.errors.push(y.create(n, t.sourceSpan, i)); + } + } + _popContainer(t, r, n) { + let i = !1; + for (let a = this._containerStack.length - 1; a >= 0; a--) { + var s; + let o = this._containerStack[a], c = o instanceof G ? o.fullName : o.name; + if (Pe(c) ? c === t : (c === t || t === null) && o instanceof r) return o.endSourceSpan = n, o.sourceSpan.end = n !== null ? n.end : o.sourceSpan.end, this._containerStack.splice(a, this._containerStack.length - a), !i; + (o instanceof ge || !(!((s = this._getTagDefinition(o)) === null || s === void 0) && s.closedByParent)) && (i = !0); + } + return !1; + } + _consumeAttr(t) { + let r = fe(t.parts[0], t.parts[1]), n = t.sourceSpan.end, i; + this._peek.type === l.ATTR_QUOTE && (i = this._advance()); + let s = "", a = [], o, c; + if (this._peek.type === l.ATTR_VALUE_TEXT) for (o = this._peek.sourceSpan, c = this._peek.sourceSpan.end; this._peek.type === l.ATTR_VALUE_TEXT || this._peek.type === l.ATTR_VALUE_INTERPOLATION || this._peek.type === l.ENCODED_ENTITY;) { + let p = this._advance(); + a.push(p), p.type === l.ATTR_VALUE_INTERPOLATION ? s += p.parts.join("").replace(/&([^;]+);/g, Ii) : p.type === l.ENCODED_ENTITY ? s += p.parts[0] : s += p.parts.join(""), c = n = p.sourceSpan.end; + } + this._peek.type === l.ATTR_QUOTE && (c = n = this._advance().sourceSpan.end); + let u = o && c && new h(i?.sourceSpan.start ?? o.start, c, i?.sourceSpan.fullStart ?? o.fullStart); + return new vi(r, s, new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), t.sourceSpan, u, a.length > 0 ? a : void 0, void 0); + } + _consumeDirective(t) { + let r = [], n = t.sourceSpan.end, i = null; + if (this._advance(), this._peek.type === l.DIRECTIVE_OPEN) { + for (n = this._peek.sourceSpan.end, this._advance(); this._peek.type === l.ATTR_NAME;) r.push(this._consumeAttr(this._advance())); + this._peek.type === l.DIRECTIVE_CLOSE ? (i = this._peek.sourceSpan, this._advance()) : this.errors.push(y.create(null, t.sourceSpan, "Unterminated directive definition")); + } + let s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new h(s.start, i === null ? t.sourceSpan.end : i.end, s.fullStart); + return new wi(t.parts[0], r, a, s, i); + } + _consumeBlockOpen(t) { + let r = []; + for (; this._peek.type === l.BLOCK_PARAMETER;) { + let o = this._advance(); + r.push(new hr(o.parts[0], o.sourceSpan)); + } + this._peek.type === l.BLOCK_OPEN_END && this._advance(); + let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s); + this._pushContainer(a, !1); + } + _consumeBlockClose(t) { + let r = this._containerStack.length, n = this._containerStack[r - 1]; + if (!this._popContainer(null, ge, t.sourceSpan)) { + if (this._containerStack.length < r) { + let i = n instanceof G ? n.fullName : n.name; + this.errors.push(y.create(null, t.sourceSpan, `Unexpected closing block. The block may have been closed earlier. Did you forget to close the <${i}> element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`)); + return; + } + this.errors.push(y.create(null, t.sourceSpan, "Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the \"}\" HTML entity instead.")); + } + } + _consumeIncompleteBlock(t) { + let r = []; + for (; this._peek.type === l.BLOCK_PARAMETER;) { + let o = this._advance(); + r.push(new hr(o.parts[0], o.sourceSpan)); + } + let n = this._peek.sourceSpan.fullStart, i = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), s = new h(t.sourceSpan.start, n, t.sourceSpan.fullStart), a = new ge(t.parts[0], r, [], i, t.sourceSpan, s); + this._pushContainer(a, !1), this._popContainer(null, ge, null), this.errors.push(y.create(t.parts[0], i, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`)); + } + _consumeLet(t) { + let r = t.parts[0], n, i; + if (this._peek.type !== l.LET_VALUE) { + this.errors.push(y.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${r}". Declaration must have a value.`)); + return; + } else n = this._advance(); + if (this._peek.type !== l.LET_END) { + this.errors.push(y.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`)); + return; + } else i = this._advance(); + let s = i.sourceSpan.fullStart, a = new h(t.sourceSpan.start, s, t.sourceSpan.fullStart), o = t.sourceSpan.toString().lastIndexOf(r), c = new h(t.sourceSpan.start.moveBy(o), t.sourceSpan.end), u = new mr(r, n.parts[0], a, c, n.sourceSpan); + this._addToParent(u); + } + _consumeIncompleteLet(t) { + let r = t.parts[0] ?? "", n = r ? ` "${r}"` : ""; + if (r.length > 0) { + let i = t.sourceSpan.toString().lastIndexOf(r), s = new h(t.sourceSpan.start.moveBy(i), t.sourceSpan.end), a = new h(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), o = new mr(r, "", t.sourceSpan, s, a); + this._addToParent(o); + } + this.errors.push(y.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${n}. @let declarations must be written as \`@let = ;\``)); + } + _getContainer() { + return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null; + } + _getClosestElementLikeParent() { + for (let t = this._containerStack.length - 1; t > -1; t--) { + let r = this._containerStack[t]; + if (r instanceof te || r instanceof G) return r; + } + return null; + } + _addToParent(t) { + let r = this._getContainer(); + r === null ? this.rootNodes.push(t) : r.children.push(t); + } + _getElementFullName(t, r) { + return fe(this._getPrefix(t, r), t.parts[1]); + } + _getComponentFullName(t, r) { + let n = t.parts[0], i = this._getComponentTagName(t, r); + return i === null ? n : i.startsWith(":") ? n + i : `${n}:${i}`; + } + _getComponentTagName(t, r) { + let n = this._getPrefix(t, r), i = t.parts[2]; + return !n && !i ? null : !n && i ? i : fe(n, i || "ng-component"); + } + _getPrefix(t, r) { + var n; + let i, s; + if (t.type === l.COMPONENT_OPEN_START || t.type === l.INCOMPLETE_COMPONENT_OPEN || t.type === l.COMPONENT_CLOSE ? (i = t.parts[1], s = t.parts[2]) : (i = t.parts[0], s = t.parts[1]), i = i || ((n = this._getTagDefinition(s)) === null || n === void 0 ? void 0 : n.implicitNamespacePrefix) || "", !i && r) { + let a = r instanceof te ? r.name : r.tagName; + if (a !== null) { + let o = et(a)[1], c = this._getTagDefinition(o); + c !== null && !c.preventNamespaceInheritance && (i = Pe(a)); + } + } + return i; + } + }; + qi = class extends Mi { + constructor() { + super(Oe); + } + parse(e, t, r, n = !1, i) { + return super.parse(e, t, r, n, i); + } + }; + Za = [ + to, + ro, + io, + ao, + oo, + uo, + lo, + co, + po, + so + ]; + Fi = eo; + Hi = { + features: { experimental_frontMatterSupport: { + massageAstNode: !0, + embed: !0, + print: !0 + } }, + preprocess: Fi, + print: ho, + insertPragma: ti, + massageAstNode: $r, + embed: $n, + getVisitorKeys: Xn + }; + Vi = [ + { + name: "Angular", + type: "markup", + aceMode: "html", + extensions: [".component.html"], + tmScope: "text.html.basic", + aliases: ["xhtml"], + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + parsers: ["angular"], + vscodeLanguageIds: ["html"], + filenames: [], + linguistLanguageId: 146 + }, + { + name: "HTML", + type: "markup", + aceMode: "html", + extensions: [ + ".html", + ".hta", + ".htm", + ".html.hl", + ".inc", + ".xht", + ".xhtml" + ], + tmScope: "text.html.basic", + aliases: ["xhtml"], + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + parsers: ["html"], + vscodeLanguageIds: ["html"], + linguistLanguageId: 146 + }, + { + name: "Lightning Web Components", + type: "markup", + aceMode: "html", + extensions: [], + tmScope: "text.html.basic", + aliases: ["xhtml"], + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + parsers: ["lwc"], + vscodeLanguageIds: ["html"], + filenames: [], + linguistLanguageId: 146 + }, + { + name: "MJML", + type: "markup", + aceMode: "html", + extensions: [".mjml"], + tmScope: "text.mjml.basic", + aliases: ["MJML", "mjml"], + codemirrorMode: "htmlmixed", + codemirrorMimeType: "text/html", + parsers: ["mjml"], + filenames: [], + vscodeLanguageIds: ["mjml"], + linguistLanguageId: 146 + }, + { + name: "Vue", + type: "markup", + aceMode: "vue", + extensions: [".vue"], + tmScope: "source.vue", + codemirrorMode: "vue", + codemirrorMimeType: "text/x-vue", + parsers: ["vue"], + vscodeLanguageIds: ["vue"], + linguistLanguageId: 391 + } + ]; + vr = { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }; + Ui = "HTML", Wi = { + bracketSameLine: vr.bracketSameLine, + htmlWhitespaceSensitivity: { + category: Ui, + type: "choice", + default: "css", + description: "How to handle whitespaces in HTML.", + choices: [ + { + value: "css", + description: "Respect the default value of CSS display property." + }, + { + value: "strict", + description: "Whitespaces are considered sensitive." + }, + { + value: "ignore", + description: "Whitespaces are considered insensitive." + } + ] + }, + singleAttributePerLine: vr.singleAttributePerLine, + vueIndentScriptAndStyle: { + category: Ui, + type: "boolean", + default: !1, + description: "Indent script and style tags in Vue files." + } + }; + Nr = {}; + Or(Nr, { + angular: () => Ro, + html: () => Oo, + lwc: () => Bo, + mjml: () => Io, + vue: () => Mo + }); + Gi = go; + _o = { + canSelfClose: !0, + normalizeTagName: !1, + normalizeAttributeName: !1, + allowHtmComponentClosingTags: !1, + isTagNameCaseSensitive: !1, + shouldParseFrontMatter: !0 + }; + Bt = /* @__PURE__ */ new Map([ + ["*", /* @__PURE__ */ new Set([ + "accesskey", + "autocapitalize", + "autocorrect", + "autofocus", + "class", + "contenteditable", + "dir", + "draggable", + "enterkeyhint", + "exportparts", + "hidden", + "id", + "inert", + "inputmode", + "is", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "nonce", + "part", + "popover", + "slot", + "spellcheck", + "style", + "tabindex", + "title", + "translate", + "writingsuggestions" + ])], + ["a", /* @__PURE__ */ new Set([ + "charset", + "coords", + "download", + "href", + "hreflang", + "name", + "ping", + "referrerpolicy", + "rel", + "rev", + "shape", + "target", + "type" + ])], + ["applet", /* @__PURE__ */ new Set([ + "align", + "alt", + "archive", + "code", + "codebase", + "height", + "hspace", + "name", + "object", + "vspace", + "width" + ])], + ["area", /* @__PURE__ */ new Set([ + "alt", + "coords", + "download", + "href", + "hreflang", + "nohref", + "ping", + "referrerpolicy", + "rel", + "shape", + "target", + "type" + ])], + ["audio", /* @__PURE__ */ new Set([ + "autoplay", + "controls", + "crossorigin", + "loop", + "muted", + "preload", + "src" + ])], + ["base", /* @__PURE__ */ new Set(["href", "target"])], + ["basefont", /* @__PURE__ */ new Set([ + "color", + "face", + "size" + ])], + ["blockquote", /* @__PURE__ */ new Set(["cite"])], + ["body", /* @__PURE__ */ new Set([ + "alink", + "background", + "bgcolor", + "link", + "text", + "vlink" + ])], + ["br", /* @__PURE__ */ new Set(["clear"])], + ["button", /* @__PURE__ */ new Set([ + "command", + "commandfor", + "disabled", + "form", + "formaction", + "formenctype", + "formmethod", + "formnovalidate", + "formtarget", + "name", + "popovertarget", + "popovertargetaction", + "type", + "value" + ])], + ["canvas", /* @__PURE__ */ new Set(["height", "width"])], + ["caption", /* @__PURE__ */ new Set(["align"])], + ["col", /* @__PURE__ */ new Set([ + "align", + "char", + "charoff", + "span", + "valign", + "width" + ])], + ["colgroup", /* @__PURE__ */ new Set([ + "align", + "char", + "charoff", + "span", + "valign", + "width" + ])], + ["data", /* @__PURE__ */ new Set(["value"])], + ["del", /* @__PURE__ */ new Set(["cite", "datetime"])], + ["details", /* @__PURE__ */ new Set(["name", "open"])], + ["dialog", /* @__PURE__ */ new Set(["closedby", "open"])], + ["dir", /* @__PURE__ */ new Set(["compact"])], + ["div", /* @__PURE__ */ new Set(["align"])], + ["dl", /* @__PURE__ */ new Set(["compact"])], + ["embed", /* @__PURE__ */ new Set([ + "height", + "src", + "type", + "width" + ])], + ["fieldset", /* @__PURE__ */ new Set([ + "disabled", + "form", + "name" + ])], + ["font", /* @__PURE__ */ new Set([ + "color", + "face", + "size" + ])], + ["form", /* @__PURE__ */ new Set([ + "accept", + "accept-charset", + "action", + "autocomplete", + "enctype", + "method", + "name", + "novalidate", + "target" + ])], + ["frame", /* @__PURE__ */ new Set([ + "frameborder", + "longdesc", + "marginheight", + "marginwidth", + "name", + "noresize", + "scrolling", + "src" + ])], + ["frameset", /* @__PURE__ */ new Set(["cols", "rows"])], + ["h1", /* @__PURE__ */ new Set(["align"])], + ["h2", /* @__PURE__ */ new Set(["align"])], + ["h3", /* @__PURE__ */ new Set(["align"])], + ["h4", /* @__PURE__ */ new Set(["align"])], + ["h5", /* @__PURE__ */ new Set(["align"])], + ["h6", /* @__PURE__ */ new Set(["align"])], + ["head", /* @__PURE__ */ new Set(["profile"])], + ["hr", /* @__PURE__ */ new Set([ + "align", + "noshade", + "size", + "width" + ])], + ["html", /* @__PURE__ */ new Set(["manifest", "version"])], + ["iframe", /* @__PURE__ */ new Set([ + "align", + "allow", + "allowfullscreen", + "allowpaymentrequest", + "allowusermedia", + "frameborder", + "height", + "loading", + "longdesc", + "marginheight", + "marginwidth", + "name", + "referrerpolicy", + "sandbox", + "scrolling", + "src", + "srcdoc", + "width" + ])], + ["img", /* @__PURE__ */ new Set([ + "align", + "alt", + "border", + "crossorigin", + "decoding", + "fetchpriority", + "height", + "hspace", + "ismap", + "loading", + "longdesc", + "name", + "referrerpolicy", + "sizes", + "src", + "srcset", + "usemap", + "vspace", + "width" + ])], + ["input", /* @__PURE__ */ new Set([ + "accept", + "align", + "alpha", + "alt", + "autocomplete", + "checked", + "colorspace", + "dirname", + "disabled", + "form", + "formaction", + "formenctype", + "formmethod", + "formnovalidate", + "formtarget", + "height", + "ismap", + "list", + "max", + "maxlength", + "min", + "minlength", + "multiple", + "name", + "pattern", + "placeholder", + "popovertarget", + "popovertargetaction", + "readonly", + "required", + "size", + "src", + "step", + "type", + "usemap", + "value", + "width" + ])], + ["ins", /* @__PURE__ */ new Set(["cite", "datetime"])], + ["isindex", /* @__PURE__ */ new Set(["prompt"])], + ["label", /* @__PURE__ */ new Set(["for", "form"])], + ["legend", /* @__PURE__ */ new Set(["align"])], + ["li", /* @__PURE__ */ new Set(["type", "value"])], + ["link", /* @__PURE__ */ new Set([ + "as", + "blocking", + "charset", + "color", + "crossorigin", + "disabled", + "fetchpriority", + "href", + "hreflang", + "imagesizes", + "imagesrcset", + "integrity", + "media", + "referrerpolicy", + "rel", + "rev", + "sizes", + "target", + "type" + ])], + ["map", /* @__PURE__ */ new Set(["name"])], + ["menu", /* @__PURE__ */ new Set(["compact"])], + ["meta", /* @__PURE__ */ new Set([ + "charset", + "content", + "http-equiv", + "media", + "name", + "scheme" + ])], + ["meter", /* @__PURE__ */ new Set([ + "high", + "low", + "max", + "min", + "optimum", + "value" + ])], + ["object", /* @__PURE__ */ new Set([ + "align", + "archive", + "border", + "classid", + "codebase", + "codetype", + "data", + "declare", + "form", + "height", + "hspace", + "name", + "standby", + "type", + "typemustmatch", + "usemap", + "vspace", + "width" + ])], + ["ol", /* @__PURE__ */ new Set([ + "compact", + "reversed", + "start", + "type" + ])], + ["optgroup", /* @__PURE__ */ new Set(["disabled", "label"])], + ["option", /* @__PURE__ */ new Set([ + "disabled", + "label", + "selected", + "value" + ])], + ["output", /* @__PURE__ */ new Set([ + "for", + "form", + "name" + ])], + ["p", /* @__PURE__ */ new Set(["align"])], + ["param", /* @__PURE__ */ new Set([ + "name", + "type", + "value", + "valuetype" + ])], + ["pre", /* @__PURE__ */ new Set(["width"])], + ["progress", /* @__PURE__ */ new Set(["max", "value"])], + ["q", /* @__PURE__ */ new Set(["cite"])], + ["script", /* @__PURE__ */ new Set([ + "async", + "blocking", + "charset", + "crossorigin", + "defer", + "fetchpriority", + "integrity", + "language", + "nomodule", + "referrerpolicy", + "src", + "type" + ])], + ["select", /* @__PURE__ */ new Set([ + "autocomplete", + "disabled", + "form", + "multiple", + "name", + "required", + "size" + ])], + ["slot", /* @__PURE__ */ new Set(["name"])], + ["source", /* @__PURE__ */ new Set([ + "height", + "media", + "sizes", + "src", + "srcset", + "type", + "width" + ])], + ["style", /* @__PURE__ */ new Set([ + "blocking", + "media", + "type" + ])], + ["table", /* @__PURE__ */ new Set([ + "align", + "bgcolor", + "border", + "cellpadding", + "cellspacing", + "frame", + "rules", + "summary", + "width" + ])], + ["tbody", /* @__PURE__ */ new Set([ + "align", + "char", + "charoff", + "valign" + ])], + ["td", /* @__PURE__ */ new Set([ + "abbr", + "align", + "axis", + "bgcolor", + "char", + "charoff", + "colspan", + "headers", + "height", + "nowrap", + "rowspan", + "scope", + "valign", + "width" + ])], + ["template", /* @__PURE__ */ new Set([ + "shadowrootclonable", + "shadowrootcustomelementregistry", + "shadowrootdelegatesfocus", + "shadowrootmode", + "shadowrootserializable" + ])], + ["textarea", /* @__PURE__ */ new Set([ + "autocomplete", + "cols", + "dirname", + "disabled", + "form", + "maxlength", + "minlength", + "name", + "placeholder", + "readonly", + "required", + "rows", + "wrap" + ])], + ["tfoot", /* @__PURE__ */ new Set([ + "align", + "char", + "charoff", + "valign" + ])], + ["th", /* @__PURE__ */ new Set([ + "abbr", + "align", + "axis", + "bgcolor", + "char", + "charoff", + "colspan", + "headers", + "height", + "nowrap", + "rowspan", + "scope", + "valign", + "width" + ])], + ["thead", /* @__PURE__ */ new Set([ + "align", + "char", + "charoff", + "valign" + ])], + ["time", /* @__PURE__ */ new Set(["datetime"])], + ["tr", /* @__PURE__ */ new Set([ + "align", + "bgcolor", + "char", + "charoff", + "valign" + ])], + ["track", /* @__PURE__ */ new Set([ + "default", + "kind", + "label", + "src", + "srclang" + ])], + ["ul", /* @__PURE__ */ new Set(["compact", "type"])], + ["video", /* @__PURE__ */ new Set([ + "autoplay", + "controls", + "crossorigin", + "height", + "loop", + "muted", + "playsinline", + "poster", + "preload", + "src", + "width" + ])] + ]); + zi = /* @__PURE__ */ new Set([ + "a", + "abbr", + "acronym", + "address", + "applet", + "area", + "article", + "aside", + "audio", + "b", + "base", + "basefont", + "bdi", + "bdo", + "bgsound", + "big", + "blink", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "center", + "cite", + "code", + "col", + "colgroup", + "command", + "content", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "dir", + "div", + "dl", + "dt", + "em", + "embed", + "fencedframe", + "fieldset", + "figcaption", + "figure", + "font", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "image", + "img", + "input", + "ins", + "isindex", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "listing", + "main", + "map", + "mark", + "marquee", + "math", + "menu", + "menuitem", + "meta", + "meter", + "multicol", + "nav", + "nextid", + "nobr", + "noembed", + "noframes", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "picture", + "plaintext", + "pre", + "progress", + "q", + "rb", + "rbc", + "rp", + "rt", + "rtc", + "ruby", + "s", + "samp", + "script", + "search", + "section", + "select", + "selectedcontent", + "shadow", + "slot", + "small", + "source", + "spacer", + "span", + "strike", + "strong", + "style", + "sub", + "summary", + "sup", + "svg", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "tt", + "u", + "ul", + "var", + "video", + "wbr", + "xmp" + ]); + qt = { + attrs: !0, + children: !0, + cases: !0, + expression: !0 + }, $i = /* @__PURE__ */ new Set(["parent"]), Be = class Be { + constructor(t = {}) { + Dr(this, re); + Ut(this, "kind"); + Ut(this, "parent"); + for (let r of /* @__PURE__ */ new Set([...$i, ...Object.keys(t)])) this.setProperty(r, t[r]); + if (ie(t)) for (let r of Object.getOwnPropertySymbols(t)) this.setProperty(r, t[r]); + } + setProperty(t, r) { + if (this[t] !== r) { + if (t in qt && (r = r.map((n) => this.createChild(n))), !$i.has(t)) { + this[t] = r; + return; + } + Object.defineProperty(this, t, { + value: r, + enumerable: !1, + configurable: !0 + }); + } + } + map(t) { + let r; + for (let n in qt) { + let i = this[n]; + if (i) { + let s = So(i, (a) => a.map(t)); + r !== i && (r || (r = new Be({ parent: this.parent })), r.setProperty(n, s)); + } + } + if (r) for (let n in this) n in qt || (r[n] = this[n]); + return t(r || this); + } + walk(t) { + for (let r in qt) { + let n = this[r]; + if (n) for (let i = 0; i < n.length; i++) n[i].walk(t); + } + t(this); + } + createChild(t) { + let r = t instanceof Be ? t.clone() : new Be(t); + return r.setProperty("parent", this), r; + } + insertChildBefore(t, r) { + let n = this.$children; + n.splice(n.indexOf(t), 0, this.createChild(r)); + } + removeChild(t) { + let r = this.$children; + r.splice(r.indexOf(t), 1); + } + replaceChild(t, r) { + let n = this.$children; + n[n.indexOf(t)] = this.createChild(r); + } + clone() { + return new Be(this); + } + get $children() { + return this[Fe(this, re, br)]; + } + set $children(t) { + this[Fe(this, re, br)] = t; + } + get firstChild() { + return this.$children?.[0]; + } + get lastChild() { + return M(1, this.$children, -1); + } + get prev() { + let t = Fe(this, re, wr); + return t[t.indexOf(this) - 1]; + } + get next() { + let t = Fe(this, re, wr); + return t[t.indexOf(this) + 1]; + } + get rawName() { + return this.hasExplicitNamespace ? this.fullName : this.name; + } + get fullName() { + return this.namespace ? this.namespace + ":" + this.name : this.name; + } + get attrMap() { + return Object.fromEntries(this.attrs.map((t) => [t.fullName, t.value])); + } + }; + re = /* @__PURE__ */ new WeakSet(), br = function() { + return this.kind === "angularIcuCase" ? "expression" : this.kind === "angularIcuExpression" ? "cases" : "children"; + }, wr = function() { + return this.parent?.$children ?? []; + }; + Ft = Be; + Eo = [ + { + regex: /^(?\[if(?[^\]]*)\]>)(?.*?)[^\]]*)\]> { + n(t.expression); + }); + } + visit(t, { parseOptions: r }) { + xo(t), yo(t, r), No(t, r), Ao(t); + } + }; + Ht = Mt({ + name: "html", + normalizeTagName: !0, + normalizeAttributeName: !0, + allowHtmComponentClosingTags: !0 + }); + Oo = at(Ht), Do = /* @__PURE__ */ new Set(["mj-style", "mj-raw"]), Io = at({ + ...Ht, + name: "mjml", + shouldParseAsRawText: (e) => Do.has(e) + }), Ro = at({ + name: "angular", + tokenizeAngularBlocks: !0, + tokenizeAngularLetDeclaration: !0 + }), Mo = at({ + name: "vue", + isTagNameCaseSensitive: !0, + shouldParseAsRawText(e, t, r, n) { + return e.toLowerCase() !== "html" && !r && (e !== "template" || n.some(({ name: i, value: s }) => i === "lang" && s !== "html" && s !== "" && s !== void 0)); + } + }), Bo = at({ + name: "lwc", + canSelfClose: !1 + }); + qo = { html: Hi }; +}))(); +export { Ji as default, Vi as languages, Wi as options, Nr as parsers, qo as printers }; diff --git a/.github/actions/check-public-api/dist/index.js b/.github/actions/check-public-api/dist/index.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/actions/check-public-api/dist/markdown-CujGU574.js b/.github/actions/check-public-api/dist/markdown-CujGU574.js new file mode 100644 index 0000000000..a63eed119c --- /dev/null +++ b/.github/actions/check-public-api/dist/markdown-CujGU574.js @@ -0,0 +1,6880 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/markdown.mjs +function yl(e) { + return this[e < 0 ? this.length + e : e]; +} +function fe(e) { + if (typeof e != "string") throw new TypeError("Expected a string"); + return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +function Ol(e) { + if (typeof e == "string") return V; + if (Array.isArray(e)) return j; + if (!e) return; + let { type: r } = e; + if (Br.has(r)) return r; +} +function Nl(e) { + let r = e === null ? "null" : typeof e; + if (r !== "string" && r !== "object") return `Unexpected doc '${r}', +Expected it to be 'string' or 'object'.`; + if (W(e)) throw new Error("doc is valid."); + let t = Object.prototype.toString.call(e); + if (t !== "[object Object]") return `Unexpected doc '${t}'.`; + let n = ql([...Br].map((i) => `'${i}'`)); + return `Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`; +} +function Pl(e, r, t, n) { + let i = [e]; + for (; i.length > 0;) { + let u = i.pop(); + if (u === $n) { + t(i.pop()); + continue; + } + t && i.push(u, $n); + let a = W(u); + if (!a) throw new Be(u); + if (r?.(u) !== !1) switch (a) { + case j: + case J: { + let o = a === j ? u : u.parts; + for (let l = o.length - 1; l >= 0; --l) i.push(o[l]); + break; + } + case Q: + i.push(u.flatContents, u.breakContents); + break; + case X: + if (n && u.expandedStates) for (let o = u.expandedStates.length, s = o - 1; s >= 0; --s) i.push(u.expandedStates[s]); + else i.push(u.contents); + break; + case re: + case ee: + case pe: + case me: + case he: + i.push(u.contents); + break; + case V: + case be: + case De: + case de: + case $: + case te: break; + default: throw new Be(u); + } + } +} +function Il(e, r) { + if (typeof e == "string") return r(e); + let t = /* @__PURE__ */ new Map(); + return n(e); + function n(u) { + if (t.has(u)) return t.get(u); + let a = i(u); + return t.set(u, a), a; + } + function i(u) { + switch (W(u)) { + case j: return r(u.map(n)); + case J: return r({ + ...u, + parts: u.parts.map(n) + }); + case Q: return r({ + ...u, + breakContents: n(u.breakContents), + flatContents: n(u.flatContents) + }); + case X: { + let { expandedStates: a, contents: o } = u; + return a ? (a = a.map(n), o = a[0]) : o = n(o), r({ + ...u, + contents: o, + expandedStates: a + }); + } + case re: + case ee: + case pe: + case me: + case he: return r({ + ...u, + contents: n(u.contents) + }); + case V: + case be: + case De: + case de: + case $: + case te: return r(u); + default: throw new Be(u); + } + } +} +function Kn(e) { + if (e.length > 0) { + let r = U(0, e, -1); + !r.expandedStates && !r.break && (r.break = "propagated"); + } + return null; +} +function Xn(e) { + let r = /* @__PURE__ */ new Set(), t = []; + function n(u) { + if (u.type === te && Kn(t), u.type === X) { + if (t.push(u), r.has(u)) return !1; + r.add(u); + } + } + function i(u) { + u.type === X && t.pop().break && Kn(t); + } + Hn(e, n, i, !0); +} +function xe(e, r = nr) { + return Il(e, (t) => typeof t == "string" ? _r(r, t.split(` +`)) : t); +} +function ir(e) { + return ne(e), { + type: ee, + contents: e + }; +} +function Fe(e, r) { + return Qn(e), ne(r), { + type: re, + contents: r, + n: e + }; +} +function ur(e) { + return Fe({ type: "root" }, e); +} +function Ye(e) { + return Jn(e), { + type: J, + parts: e + }; +} +function Ge(e, r = {}) { + return ne(e), Or(r.expandedStates, !0), { + type: X, + id: r.id, + contents: e, + break: !!r.shouldBreak, + expandedStates: r.expandedStates + }; +} +function Zn(e, r = "", t = {}) { + return ne(e), r !== "" && ne(r), { + type: Q, + breakContents: e, + flatContents: r, + groupId: t.groupId + }; +} +function _r(e, r) { + ne(e), Or(r); + let t = []; + for (let n = 0; n < r.length; n++) n !== 0 && t.push(e), t.push(r[n]); + return t; +} +function ei(e) { + return e === Ll ? Ml : e === Rl ? Ul : Gl; +} +function Et(e) { + return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510; +} +function Ct(e) { + return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e >= 94192 && e <= 94198 || e >= 94208 && e <= 101589 || e >= 101631 && e <= 101662 || e >= 101760 && e <= 101874 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128728 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129674 || e >= 129678 && e <= 129734 || e === 129736 || e >= 129741 && e <= 129756 || e >= 129759 && e <= 129770 || e >= 129775 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141; +} +function Vl(e) { + if (!e) return 0; + if (!zl.test(e)) return e.length; + e = e.replace(ri(), (t) => Wl.has(t) ? " " : " "); + let r = 0; + for (let t of e) { + let n = t.codePointAt(0); + n <= 31 || n >= 127 && n <= 159 || n >= 768 && n <= 879 || n >= 65024 && n <= 65039 || (r += Et(n) || Ct(n) ? 2 : 1); + } + return r; +} +function ni(e, r, t) { + let n = r.type === 1 ? e.queue.slice(0, -1) : [...e.queue, r], i = "", u = 0, a = 0, o = 0; + for (let p of n) switch (p.type) { + case 0: + c(), t.useTabs ? s(1) : l(t.tabWidth); + break; + case 3: { + let { string: h } = p; + c(), i += h, u += h.length; + break; + } + case 2: { + let { width: h } = p; + a += 1, o += h; + break; + } + default: throw new Error(`Unexpected indent comment '${p.type}'.`); + } + return D(), { + ...e, + value: i, + length: u, + queue: n + }; + function s(p) { + i += " ".repeat(p), u += t.tabWidth * p; + } + function l(p) { + i += " ".repeat(p), u += p; + } + function c() { + t.useTabs ? f() : D(); + } + function f() { + a > 0 && s(a), m(); + } + function D() { + o > 0 && l(o), m(); + } + function m() { + a = 0, o = 0; + } +} +function ii(e, r, t) { + if (!r) return e; + if (r.type === "root") return { + ...e, + root: e + }; + if (r === Number.NEGATIVE_INFINITY) return e.root; + let n; + return typeof r == "number" ? r < 0 ? n = $l : n = { + type: 2, + width: r + } : n = { + type: 3, + string: r + }, ni(e, n, t); +} +function ui(e, r) { + return ni(e, jl, r); +} +function Hl(e) { + let r = 0; + for (let t = e.length - 1; t >= 0; t--) { + let n = e[t]; + if (n === " " || n === " ") r++; + else break; + } + return r; +} +function At(e) { + let r = Hl(e); + return { + text: r === 0 ? e : e.slice(0, e.length - r), + count: r + }; +} +function Pr(e, r, t, n, i, u) { + if (t === Number.POSITIVE_INFINITY) return !0; + let a = r.length, o = !1, s = [e], l = ""; + for (; t >= 0;) { + if (s.length === 0) { + if (a === 0) return !0; + s.push(r[--a]); + continue; + } + let { mode: c, doc: f } = s.pop(), D = W(f); + switch (D) { + case V: + f && (o && (l += " ", t -= 1, o = !1), l += f, t -= or(f)); + break; + case j: + case J: { + let m = D === j ? f : f.parts, p = f[bt] ?? 0; + for (let h = m.length - 1; h >= p; h--) s.push({ + mode: c, + doc: m[h] + }); + break; + } + case ee: + case re: + case pe: + case me: + s.push({ + mode: c, + doc: f.contents + }); + break; + case De: { + let { text: m, count: p } = At(l); + l = m, t += p; + break; + } + case X: { + if (u && f.break) return !1; + let m = f.break ? H : c, p = f.expandedStates && m === H ? U(0, f.expandedStates, -1) : f.contents; + s.push({ + mode: m, + doc: p + }); + break; + } + case Q: { + let p = (f.groupId ? i[f.groupId] || ue : c) === H ? f.breakContents : f.flatContents; + p && s.push({ + mode: c, + doc: p + }); + break; + } + case $: + if (c === H || f.hard) return !0; + f.soft || (o = !0); + break; + case he: + n = !0; + break; + case de: + if (n) return !1; + break; + } + } + return !1; +} +function ai(e, r) { + let t = Object.create(null), n = r.printWidth, i = ei(r.endOfLine), u = 0, a = [{ + indent: vt, + mode: H, + doc: e + }], o = "", s = !1, l = [], c = [], f = [], D = [], m = 0; + for (Xn(e); a.length > 0;) { + let { indent: E, mode: v, doc: A } = a.pop(); + switch (W(A)) { + case V: { + let b = i !== ` +` ? R(0, A, ` +`, i) : A; + b && (o += b, a.length > 0 && (u += or(b))); + break; + } + case j: + for (let b = A.length - 1; b >= 0; b--) a.push({ + indent: E, + mode: v, + doc: A[b] + }); + break; + case be: + if (c.length >= 2) throw new Error("There are too many 'cursor' in doc."); + c.push(m + o.length); + break; + case ee: + a.push({ + indent: ui(E, r), + mode: v, + doc: A.contents + }); + break; + case re: + a.push({ + indent: ii(E, A.n, r), + mode: v, + doc: A.contents + }); + break; + case De: + g(); + break; + case X: + switch (v) { + case ue: if (!s) { + a.push({ + indent: E, + mode: A.break ? H : ue, + doc: A.contents + }); + break; + } + case H: { + s = !1; + let b = { + indent: E, + mode: ue, + doc: A.contents + }, d = n - u, y = l.length > 0; + if (!A.break && Pr(b, a, d, y, t)) a.push(b); + else if (A.expandedStates) { + let w = U(0, A.expandedStates, -1); + if (A.break) { + a.push({ + indent: E, + mode: H, + doc: w + }); + break; + } else for (let C = 1; C < A.expandedStates.length + 1; C++) if (C >= A.expandedStates.length) { + a.push({ + indent: E, + mode: H, + doc: w + }); + break; + } else { + let T = { + indent: E, + mode: ue, + doc: A.expandedStates[C] + }; + if (Pr(T, a, d, y, t)) { + a.push(T); + break; + } + } + } else a.push({ + indent: E, + mode: H, + doc: A.contents + }); + break; + } + } + A.id && (t[A.id] = U(0, a, -1).mode); + break; + case J: { + let b = n - u, d = A[bt] ?? 0, { parts: y } = A, w = y.length - d; + if (w === 0) break; + let C = y[d + 0], k = y[d + 1], T = { + indent: E, + mode: ue, + doc: C + }, B = { + indent: E, + mode: H, + doc: C + }, _ = Pr(T, [], b, l.length > 0, t, !0); + if (w === 1) { + _ ? a.push(T) : a.push(B); + break; + } + let S = { + indent: E, + mode: ue, + doc: k + }, P = { + indent: E, + mode: H, + doc: k + }; + if (w === 2) { + _ ? a.push(S, T) : a.push(P, B); + break; + } + let N = y[d + 2], O = { + indent: E, + mode: v, + doc: { + ...A, + [bt]: d + 2 + } + }, le = Pr({ + indent: E, + mode: ue, + doc: [ + C, + k, + N + ] + }, [], b, l.length > 0, t, !0); + a.push(O), le ? a.push(S, T) : _ ? a.push(P, T) : a.push(P, B); + break; + } + case Q: + case pe: { + let b = A.groupId ? t[A.groupId] : v; + if (b === H) { + let d = A.type === Q ? A.breakContents : A.negate ? A.contents : ir(A.contents); + d && a.push({ + indent: E, + mode: v, + doc: d + }); + } + if (b === ue) { + let d = A.type === Q ? A.flatContents : A.negate ? ir(A.contents) : A.contents; + d && a.push({ + indent: E, + mode: v, + doc: d + }); + } + break; + } + case he: + l.push({ + indent: E, + mode: v, + doc: A.contents + }); + break; + case de: + l.length > 0 && a.push({ + indent: E, + mode: v, + doc: ar + }); + break; + case $: + switch (v) { + case ue: if (A.hard) s = !0; + else { + A.soft || (o += " ", u += 1); + break; + } + case H: + if (l.length > 0) { + a.push({ + indent: E, + mode: v, + doc: A + }, ...l.reverse()), l.length = 0; + break; + } + A.literal ? (o += i, u = 0, E.root && (E.root.value && (o += E.root.value), u = E.root.length)) : (g(), o += i + E.value, u = E.length); + break; + } + break; + case me: + a.push({ + indent: E, + mode: v, + doc: A.contents + }); + break; + case te: break; + default: throw new Be(A); + } + a.length === 0 && l.length > 0 && (a.push(...l.reverse()), l.length = 0); + } + let p = f.join("") + o, h = [...D, ...c]; + if (h.length !== 2) return { formatted: p }; + let F = h[0]; + return { + formatted: p, + cursorNodeStart: F, + cursorNodeText: p.slice(F, U(0, h, -1)) + }; + function g() { + let { text: E, count: v } = At(o); + E && (f.push(E), m += E.length), o = "", u -= v, c.length > 0 && (D.push(...c.map((A) => Math.min(A, m))), c.length = 0); + } +} +function Kl(e, r) { + let t = e.matchAll(new RegExp(`(?:${fe(r)})+`, "gu")); + return t.reduce || (t = [...t]), t.reduce((n, [i]) => Math.max(n, i.length), 0) / r.length; +} +function Xl(e, r) { + let t = e.match(new RegExp(`(${fe(r)})+`, "gu")); + if (t === null) return 1; + let n = /* @__PURE__ */ new Map(), i = 0; + for (let u of t) { + let a = u.length / r.length; + n.set(a, !0), a > i && (i = a); + } + for (let u = 1; u < i; u++) if (!n.get(u)) return u; + return i + 1; +} +function Zl(e, r) { + let { preferred: t, alternate: n } = r === !0 || r === "'" ? Jl : Ql, { length: i } = e, u = 0, a = 0; + for (let o = 0; o < i; o++) { + let s = e.charCodeAt(o); + s === t.codePoint ? u++ : s === n.codePoint && a++; + } + return (u > a ? n : t).character; +} +function tf() { + let e = globalThis, r = e.Deno?.build?.os; + return typeof r == "string" ? r === "windows" : e.navigator?.platform?.startsWith("Win") ?? e.process?.platform?.startsWith("win") ?? !1; +} +function pi(e) { + if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`); + return e; +} +function uf(e) { + return e = pi(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25")); +} +function af(e) { + e = pi(e); + let r = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\"); + return e.hostname !== "" && (r = `\\\\${e.hostname}${r}`), r; +} +function yt(e) { + return nf ? af(e) : uf(e); +} +function mi(e, r) { + if (!r) return; + let t = hi(r).toLowerCase(); + return e.find(({ filenames: n }) => n?.some((i) => i.toLowerCase() === t)) ?? e.find(({ extensions: n }) => n?.some((i) => t.endsWith(i))); +} +function of(e, r) { + if (r) return e.find(({ name: t }) => t.toLowerCase() === r) ?? e.find(({ aliases: t }) => t?.includes(r)) ?? e.find(({ extensions: t }) => t?.includes(`.${r}`)); +} +function Fi(e, r) { + if (r) { + if (di(r)) try { + r = yt(r); + } catch { + return; + } + if (typeof r == "string") return e.find(({ isSupported: t }) => t?.({ filepath: r })); + } +} +function cf(e, r) { + let t = Di(0, e.plugins).flatMap((i) => i.languages ?? []); + return (of(t, r.language) ?? mi(t, r.physicalFile) ?? mi(t, r.file) ?? Fi(t, r.physicalFile) ?? Fi(t, r.file) ?? sf?.(t, r.physicalFile))?.parsers[0]; +} +function lf(e) { + return !!e?.[Sr]; +} +function ff(e) { + let r = e.slice(0, sr); + if (r !== "---" && r !== "+++") return; + let t = e.indexOf(` +`, sr); + if (t === -1) return; + let n = e.slice(sr, t).trim(), i = e.indexOf(` +${r}`, t), u = n; + if (u || (u = r === "+++" ? "toml" : "yaml"), i === -1 && r === "---" && u === "yaml" && (i = e.indexOf(` +...`, t)), i === -1) return; + let a = i + 1 + sr, o = e.charAt(a + 1); + if (!/\s?/u.test(o)) return; + let s = e.slice(0, a), l; + return { + language: u, + explicitLanguage: n || null, + value: e.slice(t + 1, i), + startDelimiter: r, + endDelimiter: s.slice(-sr), + raw: s, + start: { + line: 1, + column: 0, + index: 0 + }, + end: { + index: s.length, + get line() { + return l ?? (l = s.split(` +`)), l.length; + }, + get column() { + return l ?? (l = s.split(` +`)), U(0, l, -1).length; + } + }, + [Sr]: !0 + }; +} +function Df(e) { + let r = ff(e); + return r ? { + frontMatter: r, + get content() { + let { raw: t } = r; + return R(0, t, /[^\n]/gu, " ") + e.slice(t.length); + } + } : { content: e }; +} +function xi(e, r, t) { + if ((e.type === "code" || e.type === "yaml" || e.type === "import" || e.type === "export" || e.type === "jsx") && delete r.value, e.type === "list" && delete r.isAligned, (e.type === "list" || e.type === "listItem") && delete r.spread, e.type === "text") return null; + if (e.type === "inlineCode" && (r.value = R(0, e.value, ` +`, " ")), e.type === "wikiLink" && (r.value = R(0, e.value.trim(), /[\t\n]+/gu, " ")), (e.type === "definition" || e.type === "linkReference" || e.type === "imageReference") && (r.label = (0, bi.default)(e.label)), (e.type === "link" || e.type === "image") && e.url && e.url.includes("(")) for (let n of "<>") r.url = R(0, e.url, n, encodeURIComponent(n)); + if ((e.type === "definition" || e.type === "link" || e.type === "image") && e.title && (r.title = R(0, e.title, /\\(?=["')])/gu, "")), t?.type === "root" && t.children.length > 0 && (t.children[0] === e || kt(t.children[0]) && t.children[1] === e) && e.type === "html" && Lr(e.value)) return null; +} +function Mr(e) { + let r = [], t = e.split(/([\t\n ]+)/u); + for (let [i, u] of t.entries()) { + if (i % 2 === 1) { + r.push({ + type: "whitespace", + value: /\n/u.test(u) ? ` +` : " " + }); + continue; + } + if ((i === 0 || i === t.length - 1) && u === "") continue; + let a = u.split(new RegExp(`(${wi.source})`, "u")); + for (let [o, s] of a.entries()) if (!((o === 0 || o === a.length - 1) && s === "")) { + if (o % 2 === 0) { + s !== "" && n({ + type: "word", + value: s, + kind: We, + isCJ: !1, + hasLeadingPunctuation: Oe.test(s[0]), + hasTrailingPunctuation: Oe.test(U(0, s, -1)) + }); + continue; + } + if (Oe.test(s)) { + n({ + type: "word", + value: s, + kind: cr, + isCJ: !0, + hasLeadingPunctuation: !0, + hasTrailingPunctuation: !0 + }); + continue; + } + if (hf.test(s)) { + n({ + type: "word", + value: s, + kind: Pe, + isCJ: !1, + hasLeadingPunctuation: !1, + hasTrailingPunctuation: !1 + }); + continue; + } + n({ + type: "word", + value: s, + kind: ae, + isCJ: !0, + hasLeadingPunctuation: !1, + hasTrailingPunctuation: !1 + }); + } + } + return r; + function n(i) { + let u = U(0, r, -1); + u?.type === "word" && !a(We, cr) && ![u.value, i.value].some((o) => /\u3000/u.test(o)) && r.push({ + type: "whitespace", + value: "" + }), r.push(i); + function a(o, s) { + return u.kind === o && i.kind === s || u.kind === s && i.kind === o; + } + } +} +function ze(e, r) { + let { numberText: n, leadingSpaces: i } = r.originalText.slice(e.position.start.offset, e.position.end.offset).match(/^\s*(?\d+)(\.|\))(?\s*)/u).groups; + return { + number: Number(n), + leadingSpaces: i + }; +} +function ki(e, r) { + return !e.ordered || e.children.length < 2 || ze(e.children[1], r).number !== 1 ? !1 : ze(e.children[0], r).number !== 0 ? !0 : e.children.length > 2 && ze(e.children[2], r).number === 1; +} +function Ur(e, r) { + let { value: t } = e; + return e.position.end.offset === r.length && t.endsWith(` +`) && r.endsWith(` +`) ? t.slice(0, -1) : t; +} +function ye(e, r) { + return (function t(n, i, u) { + let a = { ...r(n, i, u) }; + return a.children && (a.children = a.children.map((o, s) => t(o, s, [a, ...u]))), a; + })(e, null, []); +} +function Yr(e) { + if (e?.type !== "link" || e.children.length !== 1) return !1; + let [r] = e.children; + return qe(e) === qe(r) && Ne(e) === Ne(r); +} +function lr(e) { + let r; + if (e.type === "html") r = e.value.match(/^$/u); + else { + let t; + e.type === "esComment" ? t = e : e.type === "paragraph" && e.children.length === 1 && e.children[0].type === "esComment" && (t = e.children[0]), t && (r = t.value.match(/^prettier-ignore(?:-(start|end))?$/u)); + } + return r ? r[1] || "next" : !1; +} +function Gr(e, r) { + return t(e, r, (n) => n.ordered === e.ordered); + function t(n, i, u) { + let a = -1; + for (let o of i.children) if (o.type === n.type && u(o) ? a++ : a = -1, o === n) return a; + } +} +function df(e, r) { + let { node: t } = e; + switch (t.type) { + case "code": { + let { lang: n } = t; + if (!n) return; + let i; + return n === "angular-ts" ? i = wt(r, { language: "typescript" }) : n === "angular-html" ? i = "angular" : i = wt(r, { language: n }), i ? async (u) => { + let a = { parser: i }; + n === "ts" || n === "typescript" ? a.filepath = "dummy.ts" : n === "tsx" && (a.filepath = "dummy.tsx"); + let o = await u(Ur(t, r.originalText), a), s = r.__inJsTemplate ? "~" : "`", l = s.repeat(Math.max(3, Ir(t.value, s) + 1)); + return ur([ + l, + t.lang, + t.meta ? " " + t.meta : "", + M, + xe(o), + M, + l + ]); + } : void 0; + } + case "import": + case "export": return (n) => n(t.value, { + __onHtmlBindingRoot: (i) => mf(i, t.type), + parser: "babel" + }); + case "jsx": return (n) => n(`<$>${t.value}`, { + parser: "__js_expression", + rootMarker: "mdx" + }); + } + return null; +} +function mf(e, r) { + let { program: { body: t } } = e; + if (!t.every((n) => n.type === "ImportDeclaration" || n.type === "ExportDefaultDeclaration" || n.type === "ExportNamedDeclaration")) throw new Error(`Unexpected '${r}' in MDX.`); +} +function Dr(e) { + if (fr !== null && typeof fr.property) { + let r = fr; + return fr = Dr.prototype = null, r; + } + return fr = Dr.prototype = e ?? Object.create(null), new Dr(); +} +function Bt(e) { + return Dr(e); +} +function gf(e, r = "type") { + Bt(e); + function t(n) { + let i = n[r], u = e[i]; + if (!Array.isArray(u)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: n }); + return u; + } + return t; +} +function z(e, r, t, n = {}) { + let { processor: i = t } = n, u = []; + return e.each(() => { + let a = i(e); + a !== !1 && (u.length > 0 && Cf(e) && (u.push(M), (Af(e, r) || qi(e)) && u.push(M), qi(e) && u.push(M)), u.push(a)); + }, "children"), u; +} +function Cf({ node: e, parent: r }) { + let t = Tt.has(e.type), n = e.type === "html" && Rr.has(r.type); + return !t && !n; +} +function Af({ node: e, previous: r, parent: t }, n) { + if (Ni(r, n) || e.type === "list" && t.type === "listItem" && (r.type === "code" || r.type === "paragraph") && r.position.end.line + 1 < e.position.start.line) return !0; + let u = r.type === e.type && vf.has(e.type), a = t.type === "listItem" && (e.type === "list" || !Ni(t, n)), o = lr(r) === "next", s = e.type === "html" && r.type === "html" && r.position.end.line + 1 === e.position.start.line, l = e.type === "html" && t.type === "listItem" && r.type === "paragraph" && r.position.end.line + 1 === e.position.start.line; + return !(u || a || o || s || l); +} +function qi({ node: e, previous: r }) { + let t = r.type === "list", n = e.type === "code" && e.isIndented; + return t && n; +} +function Ni(e, r) { + return e.type === "listItem" && (e.spread || r.originalText.charAt(e.position.end.offset - 1) === ` +`); +} +function Ii(e, r, t) { + let { node: n } = e, i = Gr(n, e.parent), u = ki(n, r); + return z(e, r, t, { processor() { + let a = s(), { node: o } = e; + if (o.children.length === 2 && o.children[1].type === "html" && o.children[0].position.start.column !== o.children[1].position.start.column) return [a, Pi(e, r, t, a)]; + return [a, Fe(" ".repeat(a.length), Pi(e, r, t, a))]; + function s() { + let l = n.ordered ? (e.isFirst ? n.start : u ? 1 : n.start + e.index) + (i % 2 === 0 ? ". " : ") ") : i % 2 === 0 ? "- " : "* "; + return (n.isAligned || n.hasIndentedCodeblock) && n.ordered ? bf(l, r) : l; + } + } }); +} +function Pi(e, r, t, n) { + let { node: i } = e, u = i.checked === null ? "" : i.checked ? "[x] " : "[ ] "; + return [u, z(e, r, t, { processor({ node: a, isFirst: o }) { + if (o && a.type !== "list") return Fe(" ".repeat(u.length), t()); + let s = " ".repeat(xf(r.tabWidth - n.length, 0, 3)); + return [s, Fe(s, t())]; + } })]; +} +function bf(e, r) { + let t = n(); + return e + " ".repeat(t >= 4 ? 0 : t); + function n() { + let i = e.length % r.tabWidth; + return i === 0 ? 0 : r.tabWidth - i; + } +} +function xf(e, r, t) { + return Math.max(r, Math.min(e, t)); +} +function Si(e, r, t) { + let { node: n } = e, i = [], u = e.map(() => e.map(({ index: f }) => { + let D = ai(t(), r).formatted, m = or(D); + return i[f] = Math.max(i[f] ?? 3, m), { + text: D, + width: m + }; + }, "children"), "children"), a = s(!1); + if (r.proseWrap !== "never") return [Ue, a]; + return [Ue, Ge(Zn(s(!0), a))]; + function s(f) { + return _r(ar, [ + c(u[0], f), + l(f), + ...u.slice(1).map((D) => c(D, f)) + ].map((D) => `| ${D.join(" | ")} |`)); + } + function l(f) { + return i.map((D, m) => { + let p = n.align[m], h = p === "center" || p === "left" ? ":" : "-", F = p === "center" || p === "right" ? ":" : "-"; + return `${h}${f ? "-" : "-".repeat(D - 2)}${F}`; + }); + } + function c(f, D) { + return f.map(({ text: m, width: p }, h) => { + if (D) return m; + let F = i[h] - p, g = n.align[h], E = 0; + g === "right" ? E = F : g === "center" && (E = Math.floor(F / 2)); + let v = F - E; + return `${" ".repeat(E)}${m}${" ".repeat(v)}`; + }); + } +} +function Li(e) { + let { node: r } = e, t = R(0, R(0, r.value, "*", "\\*"), new RegExp([`(^|${Oe.source})(_+)`, `(_+)(${Oe.source}|$)`].join("|"), "gu"), (u, a, o, s, l) => R(0, o ? `${a}${o}` : `${s}${l}`, "_", "\\_")), n = (u, a, o) => u.type === "sentence" && o === 0, i = (u, a, o) => Yr(u.children[o - 1]); + return t !== r.value && (e.match(void 0, n, i) || e.match(void 0, n, (u, a, o) => u.type === "emphasis" && o === 0, i)) && (t = t.replace(/^(\\?[*_])+/u, (u) => R(0, u, "\\", ""))), t; +} +function Ri(e, r, t) { + return yf(e.map(t, "children")); +} +function yf(e) { + let r = [""]; + return (function t(n) { + for (let i of n) { + let u = W(i); + if (u === j) { + t(i); + continue; + } + let a = i, o = []; + u === J && ([a, ...o] = i.parts), r.push([r.pop(), a], ...o); + } + })(e), Ye(r); +} +function _f(e, r) { + return e = Of(e, r), e = Nf(e), e = If(e, r), e = Sf(e, r), e = Pf(e), e; +} +function Of(e, r) { + return ye(e, (t) => { + if (t.type !== "text") return t; + let { value: n } = t; + if (n === "*" || n === "_" || !Tf.test(n) || t.position.end.offset - t.position.start.offset === n.length) return t; + let i = r.originalText.slice(t.position.start.offset, t.position.end.offset); + return Bf.test(i) ? t : { + ...t, + value: i + }; + }); +} +function qf(e, r, t) { + return ye(e, (n) => { + if (!n.children) return n; + let i = [], u, a; + for (let o of n.children) u && r(u, o) ? (o = t(u, o), i.splice(-1, 1, o), a || (a = !0)) : i.push(o), u = o; + return a ? { + ...n, + children: i + } : n; + }); +} +function Nf(e) { + return qf(e, (r, t) => r.type === "text" && t.type === "text", (r, t) => ({ + type: "text", + value: r.value + t.value, + position: { + start: r.position.start, + end: t.position.end + } + })); +} +function Pf(e) { + return ye(e, (r, t, [n]) => { + if (r.type !== "text") return r; + let { value: i } = r; + return n.type === "paragraph" && (t === 0 && (i = Ot.trimStart(i)), t === n.children.length - 1 && (i = Ot.trimEnd(i))), { + type: "sentence", + position: r.position, + children: Mr(i) + }; + }); +} +function If(e, r) { + return ye(e, (t, n, i) => { + if (t.type === "code") { + let u = /^\n?(?: {4,}|\t)/u.test(r.originalText.slice(t.position.start.offset, t.position.end.offset)); + if (t.isIndented = u, u) for (let a = 0; a < i.length; a++) { + let o = i[a]; + if (o.hasIndentedCodeblock) break; + o.type === "list" && (o.hasIndentedCodeblock = !0); + } + } + return t; + }); +} +function Sf(e, r) { + return ye(e, (i, u, a) => { + if (i.type === "list" && i.children.length > 0) { + for (let o = 0; o < a.length; o++) { + let s = a[o]; + if (s.type === "list" && !s.isAligned) return i.isAligned = !1, i; + } + i.isAligned = n(i); + } + return i; + }); + function t(i) { + return i.children.length === 0 ? -1 : i.children[0].position.start.column - 1; + } + function n(i) { + if (!i.ordered) return !0; + let [u, a] = i.children; + if (ze(u, r).leadingSpaces.length > 1) return !0; + let s = t(u); + if (s === -1) return !1; + if (i.children.length === 1) return s % r.tabWidth === 0; + return s !== t(a) ? !1 : s % r.tabWidth === 0 ? !0 : ze(a, r).leadingSpaces.length > 1; + } +} +function Yi(e, r) { + let t = [""]; + return e.each(() => { + let { node: n } = e, i = r(); + switch (n.type) { + case "whitespace": if (W(i) !== V) { + t.push(i, ""); + break; + } + default: t.push([t.pop(), i]); + } + }, "children"), Ye(t); +} +function Rf({ parent: e }) { + if (e.usesCJSpaces === void 0) { + let r = { + " ": 0, + "": 0 + }, { children: t } = e; + for (let n = 1; n < t.length - 1; ++n) { + let i = t[n]; + if (i.type === "whitespace" && (i.value === " " || i.value === "")) { + let u = t[n - 1].kind, a = t[n + 1].kind; + (u === ae && a === We || u === We && a === ae) && ++r[i.value]; + } + } + e.usesCJSpaces = r[" "] > r[""]; + } + return e.usesCJSpaces; +} +function Mf(e, r) { + if (r) return !0; + let { previous: t, next: n } = e; + if (!t || !n) return !0; + let i = t.kind, u = n.kind; + return zi(i) && zi(u) || i === Pe && u === ae || u === Pe && i === ae ? !0 : i === cr || u === cr || i === ae && u === ae ? !1 : Gi.has(n.value[0]) || Gi.has(U(0, t.value, -1)) ? !0 : t.hasTrailingPunctuation || n.hasLeadingPunctuation ? !1 : Rf(e); +} +function zi(e) { + return e === We || e === Pe; +} +function Uf(e, r, t, n) { + if (t !== "always" || e.hasAncestor((a) => Lf.has(a.type))) return !1; + if (n) return r !== ""; + let { previous: i, next: u } = e; + return !i || !u ? !0 : r === "" ? !1 : i.kind === Pe && u.kind === ae || u.kind === Pe && i.kind === ae ? !0 : !(i.isCJ || u.isCJ); +} +function qt(e, r, t, n) { + if (t === "preserve" && r === ` +`) return M; + let i = r === " " || r === ` +` && Mf(e, n); + return Uf(e, r, t, n) ? i ? qr : Nr : i ? " " : ""; +} +function Wi(e) { + let { previous: r, next: t } = e; + return r?.type === "sentence" && U(0, r.children, -1)?.type === "word" && !U(0, r.children, -1).hasTrailingPunctuation || t?.type === "sentence" && t.children[0]?.type === "word" && !t.children[0].hasLeadingPunctuation; +} +function Yf(e, r, t) { + let { node: n } = e; + if (zf(e)) { + let i = [""], u = Mr(r.originalText.slice(n.position.start.offset, n.position.end.offset)); + for (let a of u) { + if (a.type === "word") { + i.push([i.pop(), a.value]); + continue; + } + let o = qt(e, a.value, r.proseWrap, !0); + if (W(o) === V) { + i.push([i.pop(), o]); + continue; + } + i.push(o, ""); + } + return Ye(i); + } + switch (n.type) { + case "root": return n.children.length === 0 ? "" : [Gf(e, r, t), M]; + case "paragraph": return Ri(e, r, t); + case "sentence": return Yi(e, t); + case "word": return Li(e); + case "whitespace": { + let { next: i } = e, u = i && /^>|^(?:[*+-]|#{1,6}|\d+[).])$/u.test(i.value) ? "never" : r.proseWrap; + return qt(e, n.value, u); + } + case "emphasis": { + let i; + if (Yr(n.children[0])) i = r.originalText[n.position.start.offset]; + else { + let u = Wi(e), a = e.callParent(({ node: o }) => o.type === "strong" && Wi(e)); + i = u || a || e.hasAncestor((o) => o.type === "emphasis") ? "*" : "_"; + } + return [ + i, + z(e, r, t), + i + ]; + } + case "strong": return [ + "**", + z(e, r, t), + "**" + ]; + case "delete": return [ + "~~", + z(e, r, t), + "~~" + ]; + case "inlineCode": { + let i = r.proseWrap === "preserve" ? n.value : R(0, n.value, ` +`, " "), u = oi(i, "`"), a = "`".repeat(u), o = i.startsWith("`") || i.endsWith("`") || /^[\n ]/u.test(i) && /[\n ]$/u.test(i) && /[^\n ]/u.test(i) ? " " : ""; + return [ + a, + o, + i, + o, + a + ]; + } + case "wikiLink": { + let i = ""; + return r.proseWrap === "preserve" ? i = n.value : i = R(0, n.value, /[\t\n]+/gu, " "), [ + "[[", + i, + "]]" + ]; + } + case "link": switch (r.originalText[n.position.start.offset]) { + case "<": { + let i = "mailto:"; + return [ + "<", + n.url.startsWith(i) && r.originalText.slice(n.position.start.offset + 1, n.position.start.offset + 1 + 7) !== i ? n.url.slice(7) : n.url, + ">" + ]; + } + case "[": return [ + "[", + z(e, r, t), + "](", + Nt(n.url, ")"), + zr(n.title, r), + ")" + ]; + default: return r.originalText.slice(n.position.start.offset, n.position.end.offset); + } + case "image": return [ + "![", + n.alt || "", + "](", + Nt(n.url, ")"), + zr(n.title, r), + ")" + ]; + case "blockquote": return ["> ", Fe("> ", z(e, r, t))]; + case "heading": return ["#".repeat(n.depth) + " ", z(e, r, t)]; + case "code": { + if (n.isIndented) { + let a = " ".repeat(4); + return Fe(a, [a, xe(n.value, M)]); + } + let i = r.__inJsTemplate ? "~" : "`", u = i.repeat(Math.max(3, Ir(n.value, i) + 1)); + return [ + u, + n.lang || "", + n.meta ? " " + n.meta : "", + M, + xe(Ur(n, r.originalText), M), + M, + u + ]; + } + case "html": { + let { parent: i, isLast: u } = e, a = i.type === "root" && u ? n.value.trimEnd() : n.value; + return xe(a, /^$/su.test(a) ? M : ur(nr)); + } + case "list": return Ii(e, r, t); + case "thematicBreak": { + let { ancestors: i } = e, u = i.findIndex((o) => o.type === "list"); + return u === -1 ? "---" : Gr(i[u], i[u + 1]) % 2 === 0 ? "***" : "---"; + } + case "linkReference": return [ + "[", + z(e, r, t), + "]", + n.referenceType === "full" ? Pt(n) : n.referenceType === "collapsed" ? "[]" : "" + ]; + case "imageReference": switch (n.referenceType) { + case "full": return [ + "![", + n.alt || "", + "]", + Pt(n) + ]; + default: return [ + "![", + n.alt, + "]", + n.referenceType === "collapsed" ? "[]" : "" + ]; + } + case "definition": { + let i = r.proseWrap === "always" ? qr : " "; + return Ge([ + Pt(n), + ":", + ir([ + i, + Nt(n.url), + n.title === null ? "" : [i, zr(n.title, r, !1)] + ]) + ]); + } + case "footnote": return [ + "[^", + z(e, r, t), + "]" + ]; + case "footnoteReference": return ji(n); + case "footnoteDefinition": { + let i = n.children.length === 1 && n.children[0].type === "paragraph" && (r.proseWrap === "never" || r.proseWrap === "preserve" && n.children[0].position.start.line === n.children[0].position.end.line); + return [ + ji(n), + ": ", + i ? z(e, r, t) : Ge([Fe(" ".repeat(4), z(e, r, t, { processor: ({ isFirst: u }) => u ? Ge([Nr, t()]) : t() }))]) + ]; + } + case "table": return Si(e, r, t); + case "tableCell": return z(e, r, t); + case "break": return /\s/u.test(r.originalText[n.position.start.offset]) ? [" ", ur(nr)] : ["\\", M]; + case "liquidNode": return xe(n.value, M); + case "import": + case "export": + case "jsx": return n.value.trimEnd(); + case "esComment": return [ + "{/* ", + n.value, + " */}" + ]; + case "math": return [ + "$$", + M, + n.value ? [xe(n.value, M), M] : "", + "$$" + ]; + case "inlineMath": return r.originalText.slice(qe(n), Ne(n)); + default: throw new fi(n, "Markdown"); + } +} +function Gf(e, r, t) { + let n = [], i = null, { children: u } = e.node; + for (let [a, o] of u.entries()) switch (lr(o)) { + case "start": + i === null && (i = { + index: a, + offset: o.position.end.offset + }); + break; + case "end": + i !== null && (n.push({ + start: i, + end: { + index: a, + offset: o.position.start.offset + } + }), i = null); + break; + default: break; + } + return z(e, r, t, { processor({ index: a }) { + if (n.length > 0) { + let o = n[0]; + if (a === o.start.index) return [ + Vi(u[o.start.index]), + r.originalText.slice(o.start.offset, o.end.offset), + Vi(u[o.end.index]) + ]; + if (o.start.index < a && a < o.end.index) return !1; + if (a === o.end.index) return n.shift(), !1; + } + return t(); + } }); +} +function Vi(e) { + if (e.type === "html") return e.value; + if (e.type === "paragraph" && Array.isArray(e.children) && e.children.length === 1 && e.children[0].type === "esComment") return [ + "{/* ", + e.children[0].value, + " */}" + ]; +} +function zf(e) { + let r = e.findAncestor((t) => t.type === "linkReference" || t.type === "imageReference"); + return r && (r.type !== "linkReference" || r.referenceType !== "full"); +} +function Nt(e, r = []) { + let t = [" ", ...Array.isArray(r) ? r : [r]]; + return new RegExp(t.map((n) => fe(n)).join("|"), "u").test(e) ? `<${Wf(e, "<>")}>` : e; +} +function zr(e, r, t = !0) { + if (!e) return ""; + if (t) return " " + zr(e, r, !1); + if (e = R(0, e, /\\(?=["')])/gu, ""), e.includes("\"") && e.includes("'") && !e.includes(")")) return `(${e})`; + let n = li(e, r.singleQuote); + return e = R(0, e, "\\", "\\\\"), e = R(0, e, n, `\\${n}`), `${n}${e}${n}`; +} +function Vf(e) { + return e.index > 0 && lr(e.previous) === "next"; +} +function Pt(e) { + return `[${(0, $i.default)(e.label)}]`; +} +function ji(e) { + return `[^${e.label}]`; +} +function aF() { + return (e) => ye(e, (r, t, [n]) => r.type !== "html" || tl.test(r.value) || Rr.has(n.type) ? r : { + ...r, + type: "jsx" + }); +} +function ml({ isMDX: e }) { + return (r) => { + let t = (0, dl.default)().use(hl.default, { + commonmark: !0, + ...e && { blocks: [rl] } + }).use(Dl.default).use(ol).use(pl.default).use(e ? al : fl).use(cl).use(e ? sl : fl).use(ll); + return t.run(t.parse(r)); + }; +} +function fl() {} +var El, Ft, Cl, vl, Al, bl, x, Vn, xl, Re, Tr, Qi, Mt, uu, lu, Du, Ie, hu, Fu, Eu, vu, bu, xu, yu, Se, Tu, $e, Ou, qu, Iu, mr, Ju, ea, na, ua, Kt, sa, fa, pa, Fa, Ea, va, xa, wa, Zr, Qt, Oa, Pa, Le, rt, Ua, za, ja, nn, Ja, no, oo, cn, po, se, ln, bo, wo, Bo, Oo, Io, hn, Yo, zo, jo, Jo, rs, us, ss, yn, ms, Es, vs, ys, ks, Bs, Ps, Ss, Ys, zs, js, Hs, Js, Zs, nc, oc, cc, Pn, Ec, vc, bc, Tc, qc, Ic, Sc, Rc, Yc, zc, Vc, el, gl, Me, U, kl, R, $i, _l, tr, V, j, be, ee, re, De, X, J, Q, pe, he, de, $, me, te, Br, W, ql, gt, Be, $n, Hn, ne, Or, Jn, Qn, Ue, qr, Nr, ar, M, nr, Ll, Rl, Ml, Ul, Gl, ri, ti, zl, Wl, or, jl, $l, vt, H, ue, bt, Ir, oi, si, ci, Jl, Ql, li, xt, fi, bi, ef, Di, nf, hi, di, sf, wt, Sr, kt, sr, _e, gi, Ei, Ci, Lr, vi, Ai, pf, yi, wi, Oe, qe, Ne, Tt, Rr, We, ae, Pe, cr, hf, Ti, fr, Ff, Bi, q, Oi, vf, _t, Ot, Tf, Bf, Ui, Lf, Gi, Wf, Hi, Ki, It, Xi, Wn, Dl, pl, hl, dl, rF, tF, rl, tl, nF, iF, nl, il, zn, ul, al, uF, ol, sl, oF, cl, sF, ll, Fl, cF, lF, fF; +//#endregion +__esmMin((() => { + El = Object.create; + Ft = Object.defineProperty; + Cl = Object.getOwnPropertyDescriptor; + vl = Object.getOwnPropertyNames; + Al = Object.getPrototypeOf, bl = Object.prototype.hasOwnProperty; + x = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports), Vn = (e, r) => { + for (var t in r) Ft(e, t, { + get: r[t], + enumerable: !0 + }); + }, xl = (e, r, t, n) => { + if (r && typeof r == "object" || typeof r == "function") for (let i of vl(r)) !bl.call(e, i) && i !== t && Ft(e, i, { + get: () => r[i], + enumerable: !(n = Cl(r, i)) || n.enumerable + }); + return e; + }; + Re = (e, r, t) => (t = e != null ? El(Al(e)) : {}, xl(r || !e || !e.__esModule ? Ft(t, "default", { + value: e, + enumerable: !0 + }) : t, e)); + Tr = x((gF, jn) => { + "use strict"; + jn.exports = Bl; + function Bl(e) { + return String(e).replace(/\s+/g, " "); + } + }); + Qi = x((KC, Ji) => { + "use strict"; + Ji.exports = Qf; + var pr = 9, Wr = 10, Ve = 32, Hf = 33, Kf = 58, je = 91, Xf = 92, St = 93, hr = 94, Vr = 96, jr = 4, Jf = 1024; + function Qf(e) { + var r = this.Parser, t = this.Compiler; + Zf(r) && rD(r, e), eD(t) && tD(t); + } + function Zf(e) { + return !!(e && e.prototype && e.prototype.blockTokenizers); + } + function eD(e) { + return !!(e && e.prototype && e.prototype.visitors); + } + function rD(e, r) { + for (var t = r || {}, n = e.prototype, i = n.blockTokenizers, u = n.inlineTokenizers, a = n.blockMethods, o = n.inlineMethods, s = i.definition, l = u.reference, c = [], f = -1, D = a.length, m; ++f < D;) m = a[f], !(m === "newline" || m === "indentedCode" || m === "paragraph" || m === "footnoteDefinition") && c.push([m]); + c.push(["footnoteDefinition"]), t.inlineNotes && (Lt(o, "reference", "inlineNote"), u.inlineNote = F), Lt(a, "definition", "footnoteDefinition"), Lt(o, "reference", "footnoteCall"), i.definition = E, i.footnoteDefinition = p, u.footnoteCall = h, u.reference = g, n.interruptFootnoteDefinition = c, g.locator = l.locator, h.locator = v, F.locator = A; + function p(b, d, y) { + for (var w = this, C = w.interruptFootnoteDefinition, k = w.offset, T = d.length + 1, B = 0, _ = [], S, P, N, O, I, le, K, L, ie, Z, ve, Ae, G; B < T && (O = d.charCodeAt(B), !(O !== pr && O !== Ve));) B++; + if (d.charCodeAt(B++) === je && d.charCodeAt(B++) === hr) { + for (P = B; B < T;) { + if (O = d.charCodeAt(B), O !== O || O === Wr || O === pr || O === Ve) return; + if (O === St) { + N = B, B++; + break; + } + B++; + } + if (!(N === void 0 || P === N || d.charCodeAt(B++) !== Kf)) { + if (y) return !0; + for (S = d.slice(P, N), I = b.now(), ie = 0, Z = 0, ve = B, Ae = []; B < T;) { + if (O = d.charCodeAt(B), O !== O || O === Wr) G = { + start: ie, + contentStart: ve || B, + contentEnd: B, + end: B + }, Ae.push(G), O === Wr && (ie = B + 1, Z = 0, ve = void 0, G.end = ie); + else if (Z !== void 0) if (O === Ve || O === pr) Z += O === Ve ? 1 : jr - Z % jr, Z > jr && (Z = void 0, ve = B); + else { + if (Z < jr && G && (G.contentStart === G.contentEnd || nD(C, i, w, [ + b, + d.slice(B, Jf), + !0 + ]))) break; + Z = void 0, ve = B; + } + B++; + } + for (B = -1, T = Ae.length; T > 0 && (G = Ae[T - 1], G.contentStart === G.contentEnd);) T--; + for (le = b(d.slice(0, G.contentEnd)); ++B < T;) G = Ae[B], k[I.line + B] = (k[I.line + B] || 0) + (G.contentStart - G.start), _.push(d.slice(G.contentStart, G.end)); + return K = w.enterBlock(), L = w.tokenizeBlock(_.join(""), I), K(), le({ + type: "footnoteDefinition", + identifier: S.toLowerCase(), + label: S, + children: L + }); + } + } + } + function h(b, d, y) { + var w = d.length + 1, C = 0, k, T, B, _; + if (d.charCodeAt(C++) === je && d.charCodeAt(C++) === hr) { + for (T = C; C < w;) { + if (_ = d.charCodeAt(C), _ !== _ || _ === Wr || _ === pr || _ === Ve) return; + if (_ === St) { + B = C, C++; + break; + } + C++; + } + if (!(B === void 0 || T === B)) return y ? !0 : (k = d.slice(T, B), b(d.slice(0, C))({ + type: "footnoteReference", + identifier: k.toLowerCase(), + label: k + })); + } + } + function F(b, d, y) { + var w = this, C = d.length + 1, k = 0, T = 0, B, _, S, P, N, O, I; + if (d.charCodeAt(k++) === hr && d.charCodeAt(k++) === je) { + for (S = k; k < C;) { + if (_ = d.charCodeAt(k), _ !== _) return; + if (O === void 0) if (_ === Xf) k += 2; + else if (_ === je) T++, k++; + else if (_ === St) if (T === 0) { + P = k, k++; + break; + } else T--, k++; + else if (_ === Vr) { + for (N = k, O = 1; d.charCodeAt(N + O) === Vr;) O++; + k += O; + } else k++; + else if (_ === Vr) { + for (N = k, I = 1; d.charCodeAt(N + I) === Vr;) I++; + k += I, O === I && (O = void 0), I = void 0; + } else k++; + } + if (P !== void 0) return y ? !0 : (B = b.now(), B.column += 2, B.offset += 2, b(d.slice(0, k))({ + type: "footnote", + children: w.tokenizeInline(d.slice(S, P), B) + })); + } + } + function g(b, d, y) { + var w = 0; + if (d.charCodeAt(w) === Hf && w++, d.charCodeAt(w) === je && d.charCodeAt(w + 1) !== hr) return l.call(this, b, d, y); + } + function E(b, d, y) { + for (var w = 0, C = d.charCodeAt(w); C === Ve || C === pr;) C = d.charCodeAt(++w); + if (C === je && d.charCodeAt(w + 1) !== hr) return s.call(this, b, d, y); + } + function v(b, d) { + return b.indexOf("[", d); + } + function A(b, d) { + return b.indexOf("^[", d); + } + } + function tD(e) { + var r = e.prototype.visitors, t = " "; + r.footnote = n, r.footnoteReference = i, r.footnoteDefinition = u; + function n(a) { + return "^[" + this.all(a).join("") + "]"; + } + function i(a) { + return "[^" + (a.label || a.identifier) + "]"; + } + function u(a) { + for (var o = this.all(a).join(` + +`).split(` +`), s = 0, l = o.length, c; ++s < l;) c = o[s], c !== "" && (o[s] = t + c); + return "[^" + (a.label || a.identifier) + "]: " + o.join(` +`); + } + } + function Lt(e, r, t) { + e.splice(e.indexOf(r), 0, t); + } + function nD(e, r, t, n) { + for (var i = e.length, u = -1; ++u < i;) if (r[e[u][0]].apply(t, n)) return !0; + return !1; + } + }); + Mt = x((Rt) => { + Rt.isRemarkParser = iD; + Rt.isRemarkCompiler = uD; + function iD(e) { + return !!(e && e.prototype && e.prototype.blockTokenizers); + } + function uD(e) { + return !!(e && e.prototype && e.prototype.visitors); + } + }); + uu = x((JC, iu) => { + var Zi = Mt(); + iu.exports = cD; + var eu = 9, ru = 32, $r = 36, aD = 48, oD = 57, tu = 92, sD = ["math", "math-inline"], nu = "math-display"; + function cD(e) { + let r = this.Parser, t = this.Compiler; + Zi.isRemarkParser(r) && lD(r, e), Zi.isRemarkCompiler(t) && fD(t, e); + } + function lD(e, r) { + let t = e.prototype, n = t.inlineMethods; + u.locator = i, t.inlineTokenizers.math = u, n.splice(n.indexOf("text"), 0, "math"); + function i(a, o) { + return a.indexOf("$", o); + } + function u(a, o, s) { + let l = o.length, c = !1, f = !1, D = 0, m, p, h, F, g, E, v; + if (o.charCodeAt(D) === tu && (f = !0, D++), o.charCodeAt(D) === $r) { + if (D++, f) return s ? !0 : a(o.slice(0, D))({ + type: "text", + value: "$" + }); + if (o.charCodeAt(D) === $r && (c = !0, D++), h = o.charCodeAt(D), !(h === ru || h === eu)) { + for (F = D; D < l;) { + if (p = h, h = o.charCodeAt(D + 1), p === $r) { + if (m = o.charCodeAt(D - 1), m !== ru && m !== eu && (h !== h || h < aD || h > oD) && (!c || h === $r)) { + g = D - 1, D++, c && D++, E = D; + break; + } + } else p === tu && (D++, h = o.charCodeAt(D + 1)); + D++; + } + if (E !== void 0) return s ? !0 : (v = o.slice(F, g + 1), a(o.slice(0, E))({ + type: "inlineMath", + value: v, + data: { + hName: "span", + hProperties: { className: sD.concat(c && r.inlineMathDouble ? [nu] : []) }, + hChildren: [{ + type: "text", + value: v + }] + } + })); + } + } + } + } + function fD(e) { + let r = e.prototype; + r.visitors.inlineMath = t; + function t(n) { + let i = "$"; + return (n.data && n.data.hProperties && n.data.hProperties.className || []).includes(nu) && (i = "$$"), i + n.value + i; + } + } + }); + lu = x((QC, cu) => { + var au = Mt(); + cu.exports = dD; + var ou = 10, dr = 32, Ut = 36, su = ` +`, DD = "$", pD = 2, hD = ["math", "math-display"]; + function dD() { + let e = this.Parser, r = this.Compiler; + au.isRemarkParser(e) && mD(e), au.isRemarkCompiler(r) && FD(r); + } + function mD(e) { + let r = e.prototype, t = r.blockMethods, n = r.interruptParagraph, i = r.interruptList, u = r.interruptBlockquote; + r.blockTokenizers.math = a, t.splice(t.indexOf("fencedCode") + 1, 0, "math"), n.splice(n.indexOf("fencedCode") + 1, 0, ["math"]), i.splice(i.indexOf("fencedCode") + 1, 0, ["math"]), u.splice(u.indexOf("fencedCode") + 1, 0, ["math"]); + function a(o, s, l) { + var c = s.length, f = 0; + let D, m, p, h, F, g, E, v, A, b, d; + for (; f < c && s.charCodeAt(f) === dr;) f++; + for (F = f; f < c && s.charCodeAt(f) === Ut;) f++; + if (g = f - F, !(g < pD)) { + for (; f < c && s.charCodeAt(f) === dr;) f++; + for (E = f; f < c;) { + if (D = s.charCodeAt(f), D === Ut) return; + if (D === ou) break; + f++; + } + if (s.charCodeAt(f) === ou) { + if (l) return !0; + for (m = [], E !== f && m.push(s.slice(E, f)), f++, p = s.indexOf(su, f + 1), p = p === -1 ? c : p; f < c;) { + for (v = !1, b = f, d = p, h = p, A = 0; h > b && s.charCodeAt(h - 1) === dr;) h--; + for (; h > b && s.charCodeAt(h - 1) === Ut;) A++, h--; + for (g <= A && s.indexOf(DD, b) === h && (v = !0, d = h); b <= d && b - f < F && s.charCodeAt(b) === dr;) b++; + if (v) for (; d > b && s.charCodeAt(d - 1) === dr;) d--; + if ((!v || b !== d) && m.push(s.slice(b, d)), v) break; + f = p + 1, p = s.indexOf(su, f + 1), p = p === -1 ? c : p; + } + return m = m.join(` +`), o(s.slice(0, p))({ + type: "math", + value: m, + data: { + hName: "div", + hProperties: { className: hD.concat() }, + hChildren: [{ + type: "text", + value: m + }] + } + }); + } + } + } + } + function FD(e) { + let r = e.prototype; + r.visitors.math = t; + function t(n) { + return `$$ +` + n.value + ` +$$`; + } + } + }); + Du = x((ZC, fu) => { + var gD = uu(), ED = lu(); + fu.exports = CD; + function CD(e) { + var r = e || {}; + ED.call(this, r), gD.call(this, r); + } + }); + Ie = x((ev, pu) => { + pu.exports = AD; + var vD = Object.prototype.hasOwnProperty; + function AD() { + for (var e = {}, r = 0; r < arguments.length; r++) { + var t = arguments[r]; + for (var n in t) vD.call(t, n) && (e[n] = t[n]); + } + return e; + } + }); + hu = x((rv, Yt) => { + typeof Object.create == "function" ? Yt.exports = function(r, t) { + t && (r.super_ = t, r.prototype = Object.create(t.prototype, { constructor: { + value: r, + enumerable: !1, + writable: !0, + configurable: !0 + } })); + } : Yt.exports = function(r, t) { + if (t) { + r.super_ = t; + var n = function() {}; + n.prototype = t.prototype, r.prototype = new n(), r.prototype.constructor = r; + } + }; + }); + Fu = x((tv, mu) => { + "use strict"; + var bD = Ie(), du = hu(); + mu.exports = xD; + function xD(e) { + var r, t, n; + du(u, e), du(i, u), r = u.prototype; + for (t in r) n = r[t], n && typeof n == "object" && (r[t] = "concat" in n ? n.concat() : bD(n)); + return u; + function i(a) { + return e.apply(this, a); + } + function u() { + return this instanceof u ? e.apply(this, arguments) : new i(arguments); + } + } + }); + Eu = x((nv, gu) => { + "use strict"; + gu.exports = yD; + function yD(e, r, t) { + return n; + function n() { + var i = t || this, u = i[e]; + return i[e] = !r, a; + function a() { + i[e] = u; + } + } + } + }); + vu = x((iv, Cu) => { + "use strict"; + Cu.exports = wD; + function wD(e) { + for (var r = String(e), t = [], n = /\r?\n|\r/g; n.exec(r);) t.push(n.lastIndex); + return t.push(r.length + 1), { + toPoint: i, + toPosition: i, + toOffset: u + }; + function i(a) { + var o = -1; + if (a > -1 && a < t[t.length - 1]) { + for (; ++o < t.length;) if (t[o] > a) return { + line: o + 1, + column: a - (t[o - 1] || 0) + 1, + offset: a + }; + } + return {}; + } + function u(a) { + var o = a && a.line, s = a && a.column, l; + return !isNaN(o) && !isNaN(s) && o - 1 in t && (l = (t[o - 2] || 0) + s - 1 || 0), l > -1 && l < t[t.length - 1] ? l : -1; + } + } + }); + bu = x((uv, Au) => { + "use strict"; + Au.exports = kD; + var Gt = "\\"; + function kD(e, r) { + return t; + function t(n) { + for (var i = 0, u = n.indexOf(Gt), a = e[r], o = [], s; u !== -1;) o.push(n.slice(i, u)), i = u + 1, s = n.charAt(i), (!s || a.indexOf(s) === -1) && o.push(Gt), u = n.indexOf(Gt, i + 1); + return o.push(n.slice(i)), o.join(""); + } + } + }); + xu = x((av, TD) => { + TD.exports = { + AElig: "Æ", + AMP: "&", + Aacute: "Á", + Acirc: "Â", + Agrave: "À", + Aring: "Å", + Atilde: "Ã", + Auml: "Ä", + COPY: "©", + Ccedil: "Ç", + ETH: "Ð", + Eacute: "É", + Ecirc: "Ê", + Egrave: "È", + Euml: "Ë", + GT: ">", + Iacute: "Í", + Icirc: "Î", + Igrave: "Ì", + Iuml: "Ï", + LT: "<", + Ntilde: "Ñ", + Oacute: "Ó", + Ocirc: "Ô", + Ograve: "Ò", + Oslash: "Ø", + Otilde: "Õ", + Ouml: "Ö", + QUOT: "\"", + REG: "®", + THORN: "Þ", + Uacute: "Ú", + Ucirc: "Û", + Ugrave: "Ù", + Uuml: "Ü", + Yacute: "Ý", + aacute: "á", + acirc: "â", + acute: "´", + aelig: "æ", + agrave: "à", + amp: "&", + aring: "å", + atilde: "ã", + auml: "ä", + brvbar: "¦", + ccedil: "ç", + cedil: "¸", + cent: "¢", + copy: "©", + curren: "¤", + deg: "°", + divide: "÷", + eacute: "é", + ecirc: "ê", + egrave: "è", + eth: "ð", + euml: "ë", + frac12: "½", + frac14: "¼", + frac34: "¾", + gt: ">", + iacute: "í", + icirc: "î", + iexcl: "¡", + igrave: "ì", + iquest: "¿", + iuml: "ï", + laquo: "«", + lt: "<", + macr: "¯", + micro: "µ", + middot: "·", + nbsp: "\xA0", + not: "¬", + ntilde: "ñ", + oacute: "ó", + ocirc: "ô", + ograve: "ò", + ordf: "ª", + ordm: "º", + oslash: "ø", + otilde: "õ", + ouml: "ö", + para: "¶", + plusmn: "±", + pound: "£", + quot: "\"", + raquo: "»", + reg: "®", + sect: "§", + shy: "­", + sup1: "¹", + sup2: "²", + sup3: "³", + szlig: "ß", + thorn: "þ", + times: "×", + uacute: "ú", + ucirc: "û", + ugrave: "ù", + uml: "¨", + uuml: "ü", + yacute: "ý", + yen: "¥", + yuml: "ÿ" + }; + }); + yu = x((ov, BD) => { + BD.exports = { + "0": "�", + "128": "€", + "130": "‚", + "131": "ƒ", + "132": "„", + "133": "…", + "134": "†", + "135": "‡", + "136": "ˆ", + "137": "‰", + "138": "Š", + "139": "‹", + "140": "Œ", + "142": "Ž", + "145": "‘", + "146": "’", + "147": "“", + "148": "”", + "149": "•", + "150": "–", + "151": "—", + "152": "˜", + "153": "™", + "154": "š", + "155": "›", + "156": "œ", + "158": "ž", + "159": "Ÿ" + }; + }); + Se = x((sv, wu) => { + "use strict"; + wu.exports = _D; + function _D(e) { + var r = typeof e == "string" ? e.charCodeAt(0) : e; + return r >= 48 && r <= 57; + } + }); + Tu = x((cv, ku) => { + "use strict"; + ku.exports = OD; + function OD(e) { + var r = typeof e == "string" ? e.charCodeAt(0) : e; + return r >= 97 && r <= 102 || r >= 65 && r <= 70 || r >= 48 && r <= 57; + } + }); + $e = x((lv, Bu) => { + "use strict"; + Bu.exports = qD; + function qD(e) { + var r = typeof e == "string" ? e.charCodeAt(0) : e; + return r >= 97 && r <= 122 || r >= 65 && r <= 90; + } + }); + Ou = x((fv, _u) => { + "use strict"; + var ND = $e(), PD = Se(); + _u.exports = ID; + function ID(e) { + return ND(e) || PD(e); + } + }); + qu = x((Dv, SD) => { + SD.exports = { + AEli: "Æ", + AElig: "Æ", + AM: "&", + AMP: "&", + Aacut: "Á", + Aacute: "Á", + Abreve: "Ă", + Acir: "Â", + Acirc: "Â", + Acy: "А", + Afr: "𝔄", + Agrav: "À", + Agrave: "À", + Alpha: "Α", + Amacr: "Ā", + And: "⩓", + Aogon: "Ą", + Aopf: "𝔸", + ApplyFunction: "⁡", + Arin: "Å", + Aring: "Å", + Ascr: "𝒜", + Assign: "≔", + Atild: "Ã", + Atilde: "Ã", + Aum: "Ä", + Auml: "Ä", + Backslash: "∖", + Barv: "⫧", + Barwed: "⌆", + Bcy: "Б", + Because: "∵", + Bernoullis: "ℬ", + Beta: "Β", + Bfr: "𝔅", + Bopf: "𝔹", + Breve: "˘", + Bscr: "ℬ", + Bumpeq: "≎", + CHcy: "Ч", + COP: "©", + COPY: "©", + Cacute: "Ć", + Cap: "⋒", + CapitalDifferentialD: "ⅅ", + Cayleys: "ℭ", + Ccaron: "Č", + Ccedi: "Ç", + Ccedil: "Ç", + Ccirc: "Ĉ", + Cconint: "∰", + Cdot: "Ċ", + Cedilla: "¸", + CenterDot: "·", + Cfr: "ℭ", + Chi: "Χ", + CircleDot: "⊙", + CircleMinus: "⊖", + CirclePlus: "⊕", + CircleTimes: "⊗", + ClockwiseContourIntegral: "∲", + CloseCurlyDoubleQuote: "”", + CloseCurlyQuote: "’", + Colon: "∷", + Colone: "⩴", + Congruent: "≡", + Conint: "∯", + ContourIntegral: "∮", + Copf: "ℂ", + Coproduct: "∐", + CounterClockwiseContourIntegral: "∳", + Cross: "⨯", + Cscr: "𝒞", + Cup: "⋓", + CupCap: "≍", + DD: "ⅅ", + DDotrahd: "⤑", + DJcy: "Ђ", + DScy: "Ѕ", + DZcy: "Џ", + Dagger: "‡", + Darr: "↡", + Dashv: "⫤", + Dcaron: "Ď", + Dcy: "Д", + Del: "∇", + Delta: "Δ", + Dfr: "𝔇", + DiacriticalAcute: "´", + DiacriticalDot: "˙", + DiacriticalDoubleAcute: "˝", + DiacriticalGrave: "`", + DiacriticalTilde: "˜", + Diamond: "⋄", + DifferentialD: "ⅆ", + Dopf: "𝔻", + Dot: "¨", + DotDot: "⃜", + DotEqual: "≐", + DoubleContourIntegral: "∯", + DoubleDot: "¨", + DoubleDownArrow: "⇓", + DoubleLeftArrow: "⇐", + DoubleLeftRightArrow: "⇔", + DoubleLeftTee: "⫤", + DoubleLongLeftArrow: "⟸", + DoubleLongLeftRightArrow: "⟺", + DoubleLongRightArrow: "⟹", + DoubleRightArrow: "⇒", + DoubleRightTee: "⊨", + DoubleUpArrow: "⇑", + DoubleUpDownArrow: "⇕", + DoubleVerticalBar: "∥", + DownArrow: "↓", + DownArrowBar: "⤓", + DownArrowUpArrow: "⇵", + DownBreve: "̑", + DownLeftRightVector: "⥐", + DownLeftTeeVector: "⥞", + DownLeftVector: "↽", + DownLeftVectorBar: "⥖", + DownRightTeeVector: "⥟", + DownRightVector: "⇁", + DownRightVectorBar: "⥗", + DownTee: "⊤", + DownTeeArrow: "↧", + Downarrow: "⇓", + Dscr: "𝒟", + Dstrok: "Đ", + ENG: "Ŋ", + ET: "Ð", + ETH: "Ð", + Eacut: "É", + Eacute: "É", + Ecaron: "Ě", + Ecir: "Ê", + Ecirc: "Ê", + Ecy: "Э", + Edot: "Ė", + Efr: "𝔈", + Egrav: "È", + Egrave: "È", + Element: "∈", + Emacr: "Ē", + EmptySmallSquare: "◻", + EmptyVerySmallSquare: "▫", + Eogon: "Ę", + Eopf: "𝔼", + Epsilon: "Ε", + Equal: "⩵", + EqualTilde: "≂", + Equilibrium: "⇌", + Escr: "ℰ", + Esim: "⩳", + Eta: "Η", + Eum: "Ë", + Euml: "Ë", + Exists: "∃", + ExponentialE: "ⅇ", + Fcy: "Ф", + Ffr: "𝔉", + FilledSmallSquare: "◼", + FilledVerySmallSquare: "▪", + Fopf: "𝔽", + ForAll: "∀", + Fouriertrf: "ℱ", + Fscr: "ℱ", + GJcy: "Ѓ", + G: ">", + GT: ">", + Gamma: "Γ", + Gammad: "Ϝ", + Gbreve: "Ğ", + Gcedil: "Ģ", + Gcirc: "Ĝ", + Gcy: "Г", + Gdot: "Ġ", + Gfr: "𝔊", + Gg: "⋙", + Gopf: "𝔾", + GreaterEqual: "≥", + GreaterEqualLess: "⋛", + GreaterFullEqual: "≧", + GreaterGreater: "⪢", + GreaterLess: "≷", + GreaterSlantEqual: "⩾", + GreaterTilde: "≳", + Gscr: "𝒢", + Gt: "≫", + HARDcy: "Ъ", + Hacek: "ˇ", + Hat: "^", + Hcirc: "Ĥ", + Hfr: "ℌ", + HilbertSpace: "ℋ", + Hopf: "ℍ", + HorizontalLine: "─", + Hscr: "ℋ", + Hstrok: "Ħ", + HumpDownHump: "≎", + HumpEqual: "≏", + IEcy: "Е", + IJlig: "IJ", + IOcy: "Ё", + Iacut: "Í", + Iacute: "Í", + Icir: "Î", + Icirc: "Î", + Icy: "И", + Idot: "İ", + Ifr: "ℑ", + Igrav: "Ì", + Igrave: "Ì", + Im: "ℑ", + Imacr: "Ī", + ImaginaryI: "ⅈ", + Implies: "⇒", + Int: "∬", + Integral: "∫", + Intersection: "⋂", + InvisibleComma: "⁣", + InvisibleTimes: "⁢", + Iogon: "Į", + Iopf: "𝕀", + Iota: "Ι", + Iscr: "ℐ", + Itilde: "Ĩ", + Iukcy: "І", + Ium: "Ï", + Iuml: "Ï", + Jcirc: "Ĵ", + Jcy: "Й", + Jfr: "𝔍", + Jopf: "𝕁", + Jscr: "𝒥", + Jsercy: "Ј", + Jukcy: "Є", + KHcy: "Х", + KJcy: "Ќ", + Kappa: "Κ", + Kcedil: "Ķ", + Kcy: "К", + Kfr: "𝔎", + Kopf: "𝕂", + Kscr: "𝒦", + LJcy: "Љ", + L: "<", + LT: "<", + Lacute: "Ĺ", + Lambda: "Λ", + Lang: "⟪", + Laplacetrf: "ℒ", + Larr: "↞", + Lcaron: "Ľ", + Lcedil: "Ļ", + Lcy: "Л", + LeftAngleBracket: "⟨", + LeftArrow: "←", + LeftArrowBar: "⇤", + LeftArrowRightArrow: "⇆", + LeftCeiling: "⌈", + LeftDoubleBracket: "⟦", + LeftDownTeeVector: "⥡", + LeftDownVector: "⇃", + LeftDownVectorBar: "⥙", + LeftFloor: "⌊", + LeftRightArrow: "↔", + LeftRightVector: "⥎", + LeftTee: "⊣", + LeftTeeArrow: "↤", + LeftTeeVector: "⥚", + LeftTriangle: "⊲", + LeftTriangleBar: "⧏", + LeftTriangleEqual: "⊴", + LeftUpDownVector: "⥑", + LeftUpTeeVector: "⥠", + LeftUpVector: "↿", + LeftUpVectorBar: "⥘", + LeftVector: "↼", + LeftVectorBar: "⥒", + Leftarrow: "⇐", + Leftrightarrow: "⇔", + LessEqualGreater: "⋚", + LessFullEqual: "≦", + LessGreater: "≶", + LessLess: "⪡", + LessSlantEqual: "⩽", + LessTilde: "≲", + Lfr: "𝔏", + Ll: "⋘", + Lleftarrow: "⇚", + Lmidot: "Ŀ", + LongLeftArrow: "⟵", + LongLeftRightArrow: "⟷", + LongRightArrow: "⟶", + Longleftarrow: "⟸", + Longleftrightarrow: "⟺", + Longrightarrow: "⟹", + Lopf: "𝕃", + LowerLeftArrow: "↙", + LowerRightArrow: "↘", + Lscr: "ℒ", + Lsh: "↰", + Lstrok: "Ł", + Lt: "≪", + Map: "⤅", + Mcy: "М", + MediumSpace: " ", + Mellintrf: "ℳ", + Mfr: "𝔐", + MinusPlus: "∓", + Mopf: "𝕄", + Mscr: "ℳ", + Mu: "Μ", + NJcy: "Њ", + Nacute: "Ń", + Ncaron: "Ň", + Ncedil: "Ņ", + Ncy: "Н", + NegativeMediumSpace: "​", + NegativeThickSpace: "​", + NegativeThinSpace: "​", + NegativeVeryThinSpace: "​", + NestedGreaterGreater: "≫", + NestedLessLess: "≪", + NewLine: ` +`, + Nfr: "𝔑", + NoBreak: "⁠", + NonBreakingSpace: "\xA0", + Nopf: "ℕ", + Not: "⫬", + NotCongruent: "≢", + NotCupCap: "≭", + NotDoubleVerticalBar: "∦", + NotElement: "∉", + NotEqual: "≠", + NotEqualTilde: "≂̸", + NotExists: "∄", + NotGreater: "≯", + NotGreaterEqual: "≱", + NotGreaterFullEqual: "≧̸", + NotGreaterGreater: "≫̸", + NotGreaterLess: "≹", + NotGreaterSlantEqual: "⩾̸", + NotGreaterTilde: "≵", + NotHumpDownHump: "≎̸", + NotHumpEqual: "≏̸", + NotLeftTriangle: "⋪", + NotLeftTriangleBar: "⧏̸", + NotLeftTriangleEqual: "⋬", + NotLess: "≮", + NotLessEqual: "≰", + NotLessGreater: "≸", + NotLessLess: "≪̸", + NotLessSlantEqual: "⩽̸", + NotLessTilde: "≴", + NotNestedGreaterGreater: "⪢̸", + NotNestedLessLess: "⪡̸", + NotPrecedes: "⊀", + NotPrecedesEqual: "⪯̸", + NotPrecedesSlantEqual: "⋠", + NotReverseElement: "∌", + NotRightTriangle: "⋫", + NotRightTriangleBar: "⧐̸", + NotRightTriangleEqual: "⋭", + NotSquareSubset: "⊏̸", + NotSquareSubsetEqual: "⋢", + NotSquareSuperset: "⊐̸", + NotSquareSupersetEqual: "⋣", + NotSubset: "⊂⃒", + NotSubsetEqual: "⊈", + NotSucceeds: "⊁", + NotSucceedsEqual: "⪰̸", + NotSucceedsSlantEqual: "⋡", + NotSucceedsTilde: "≿̸", + NotSuperset: "⊃⃒", + NotSupersetEqual: "⊉", + NotTilde: "≁", + NotTildeEqual: "≄", + NotTildeFullEqual: "≇", + NotTildeTilde: "≉", + NotVerticalBar: "∤", + Nscr: "𝒩", + Ntild: "Ñ", + Ntilde: "Ñ", + Nu: "Ν", + OElig: "Œ", + Oacut: "Ó", + Oacute: "Ó", + Ocir: "Ô", + Ocirc: "Ô", + Ocy: "О", + Odblac: "Ő", + Ofr: "𝔒", + Ograv: "Ò", + Ograve: "Ò", + Omacr: "Ō", + Omega: "Ω", + Omicron: "Ο", + Oopf: "𝕆", + OpenCurlyDoubleQuote: "“", + OpenCurlyQuote: "‘", + Or: "⩔", + Oscr: "𝒪", + Oslas: "Ø", + Oslash: "Ø", + Otild: "Õ", + Otilde: "Õ", + Otimes: "⨷", + Oum: "Ö", + Ouml: "Ö", + OverBar: "‾", + OverBrace: "⏞", + OverBracket: "⎴", + OverParenthesis: "⏜", + PartialD: "∂", + Pcy: "П", + Pfr: "𝔓", + Phi: "Φ", + Pi: "Π", + PlusMinus: "±", + Poincareplane: "ℌ", + Popf: "ℙ", + Pr: "⪻", + Precedes: "≺", + PrecedesEqual: "⪯", + PrecedesSlantEqual: "≼", + PrecedesTilde: "≾", + Prime: "″", + Product: "∏", + Proportion: "∷", + Proportional: "∝", + Pscr: "𝒫", + Psi: "Ψ", + QUO: "\"", + QUOT: "\"", + Qfr: "𝔔", + Qopf: "ℚ", + Qscr: "𝒬", + RBarr: "⤐", + RE: "®", + REG: "®", + Racute: "Ŕ", + Rang: "⟫", + Rarr: "↠", + Rarrtl: "⤖", + Rcaron: "Ř", + Rcedil: "Ŗ", + Rcy: "Р", + Re: "ℜ", + ReverseElement: "∋", + ReverseEquilibrium: "⇋", + ReverseUpEquilibrium: "⥯", + Rfr: "ℜ", + Rho: "Ρ", + RightAngleBracket: "⟩", + RightArrow: "→", + RightArrowBar: "⇥", + RightArrowLeftArrow: "⇄", + RightCeiling: "⌉", + RightDoubleBracket: "⟧", + RightDownTeeVector: "⥝", + RightDownVector: "⇂", + RightDownVectorBar: "⥕", + RightFloor: "⌋", + RightTee: "⊢", + RightTeeArrow: "↦", + RightTeeVector: "⥛", + RightTriangle: "⊳", + RightTriangleBar: "⧐", + RightTriangleEqual: "⊵", + RightUpDownVector: "⥏", + RightUpTeeVector: "⥜", + RightUpVector: "↾", + RightUpVectorBar: "⥔", + RightVector: "⇀", + RightVectorBar: "⥓", + Rightarrow: "⇒", + Ropf: "ℝ", + RoundImplies: "⥰", + Rrightarrow: "⇛", + Rscr: "ℛ", + Rsh: "↱", + RuleDelayed: "⧴", + SHCHcy: "Щ", + SHcy: "Ш", + SOFTcy: "Ь", + Sacute: "Ś", + Sc: "⪼", + Scaron: "Š", + Scedil: "Ş", + Scirc: "Ŝ", + Scy: "С", + Sfr: "𝔖", + ShortDownArrow: "↓", + ShortLeftArrow: "←", + ShortRightArrow: "→", + ShortUpArrow: "↑", + Sigma: "Σ", + SmallCircle: "∘", + Sopf: "𝕊", + Sqrt: "√", + Square: "□", + SquareIntersection: "⊓", + SquareSubset: "⊏", + SquareSubsetEqual: "⊑", + SquareSuperset: "⊐", + SquareSupersetEqual: "⊒", + SquareUnion: "⊔", + Sscr: "𝒮", + Star: "⋆", + Sub: "⋐", + Subset: "⋐", + SubsetEqual: "⊆", + Succeeds: "≻", + SucceedsEqual: "⪰", + SucceedsSlantEqual: "≽", + SucceedsTilde: "≿", + SuchThat: "∋", + Sum: "∑", + Sup: "⋑", + Superset: "⊃", + SupersetEqual: "⊇", + Supset: "⋑", + THOR: "Þ", + THORN: "Þ", + TRADE: "™", + TSHcy: "Ћ", + TScy: "Ц", + Tab: " ", + Tau: "Τ", + Tcaron: "Ť", + Tcedil: "Ţ", + Tcy: "Т", + Tfr: "𝔗", + Therefore: "∴", + Theta: "Θ", + ThickSpace: "  ", + ThinSpace: " ", + Tilde: "∼", + TildeEqual: "≃", + TildeFullEqual: "≅", + TildeTilde: "≈", + Topf: "𝕋", + TripleDot: "⃛", + Tscr: "𝒯", + Tstrok: "Ŧ", + Uacut: "Ú", + Uacute: "Ú", + Uarr: "↟", + Uarrocir: "⥉", + Ubrcy: "Ў", + Ubreve: "Ŭ", + Ucir: "Û", + Ucirc: "Û", + Ucy: "У", + Udblac: "Ű", + Ufr: "𝔘", + Ugrav: "Ù", + Ugrave: "Ù", + Umacr: "Ū", + UnderBar: "_", + UnderBrace: "⏟", + UnderBracket: "⎵", + UnderParenthesis: "⏝", + Union: "⋃", + UnionPlus: "⊎", + Uogon: "Ų", + Uopf: "𝕌", + UpArrow: "↑", + UpArrowBar: "⤒", + UpArrowDownArrow: "⇅", + UpDownArrow: "↕", + UpEquilibrium: "⥮", + UpTee: "⊥", + UpTeeArrow: "↥", + Uparrow: "⇑", + Updownarrow: "⇕", + UpperLeftArrow: "↖", + UpperRightArrow: "↗", + Upsi: "ϒ", + Upsilon: "Υ", + Uring: "Ů", + Uscr: "𝒰", + Utilde: "Ũ", + Uum: "Ü", + Uuml: "Ü", + VDash: "⊫", + Vbar: "⫫", + Vcy: "В", + Vdash: "⊩", + Vdashl: "⫦", + Vee: "⋁", + Verbar: "‖", + Vert: "‖", + VerticalBar: "∣", + VerticalLine: "|", + VerticalSeparator: "❘", + VerticalTilde: "≀", + VeryThinSpace: " ", + Vfr: "𝔙", + Vopf: "𝕍", + Vscr: "𝒱", + Vvdash: "⊪", + Wcirc: "Ŵ", + Wedge: "⋀", + Wfr: "𝔚", + Wopf: "𝕎", + Wscr: "𝒲", + Xfr: "𝔛", + Xi: "Ξ", + Xopf: "𝕏", + Xscr: "𝒳", + YAcy: "Я", + YIcy: "Ї", + YUcy: "Ю", + Yacut: "Ý", + Yacute: "Ý", + Ycirc: "Ŷ", + Ycy: "Ы", + Yfr: "𝔜", + Yopf: "𝕐", + Yscr: "𝒴", + Yuml: "Ÿ", + ZHcy: "Ж", + Zacute: "Ź", + Zcaron: "Ž", + Zcy: "З", + Zdot: "Ż", + ZeroWidthSpace: "​", + Zeta: "Ζ", + Zfr: "ℨ", + Zopf: "ℤ", + Zscr: "𝒵", + aacut: "á", + aacute: "á", + abreve: "ă", + ac: "∾", + acE: "∾̳", + acd: "∿", + acir: "â", + acirc: "â", + acut: "´", + acute: "´", + acy: "а", + aeli: "æ", + aelig: "æ", + af: "⁡", + afr: "𝔞", + agrav: "à", + agrave: "à", + alefsym: "ℵ", + aleph: "ℵ", + alpha: "α", + amacr: "ā", + amalg: "⨿", + am: "&", + amp: "&", + and: "∧", + andand: "⩕", + andd: "⩜", + andslope: "⩘", + andv: "⩚", + ang: "∠", + ange: "⦤", + angle: "∠", + angmsd: "∡", + angmsdaa: "⦨", + angmsdab: "⦩", + angmsdac: "⦪", + angmsdad: "⦫", + angmsdae: "⦬", + angmsdaf: "⦭", + angmsdag: "⦮", + angmsdah: "⦯", + angrt: "∟", + angrtvb: "⊾", + angrtvbd: "⦝", + angsph: "∢", + angst: "Å", + angzarr: "⍼", + aogon: "ą", + aopf: "𝕒", + ap: "≈", + apE: "⩰", + apacir: "⩯", + ape: "≊", + apid: "≋", + apos: "'", + approx: "≈", + approxeq: "≊", + arin: "å", + aring: "å", + ascr: "𝒶", + ast: "*", + asymp: "≈", + asympeq: "≍", + atild: "ã", + atilde: "ã", + aum: "ä", + auml: "ä", + awconint: "∳", + awint: "⨑", + bNot: "⫭", + backcong: "≌", + backepsilon: "϶", + backprime: "‵", + backsim: "∽", + backsimeq: "⋍", + barvee: "⊽", + barwed: "⌅", + barwedge: "⌅", + bbrk: "⎵", + bbrktbrk: "⎶", + bcong: "≌", + bcy: "б", + bdquo: "„", + becaus: "∵", + because: "∵", + bemptyv: "⦰", + bepsi: "϶", + bernou: "ℬ", + beta: "β", + beth: "ℶ", + between: "≬", + bfr: "𝔟", + bigcap: "⋂", + bigcirc: "◯", + bigcup: "⋃", + bigodot: "⨀", + bigoplus: "⨁", + bigotimes: "⨂", + bigsqcup: "⨆", + bigstar: "★", + bigtriangledown: "▽", + bigtriangleup: "△", + biguplus: "⨄", + bigvee: "⋁", + bigwedge: "⋀", + bkarow: "⤍", + blacklozenge: "⧫", + blacksquare: "▪", + blacktriangle: "▴", + blacktriangledown: "▾", + blacktriangleleft: "◂", + blacktriangleright: "▸", + blank: "␣", + blk12: "▒", + blk14: "░", + blk34: "▓", + block: "█", + bne: "=⃥", + bnequiv: "≡⃥", + bnot: "⌐", + bopf: "𝕓", + bot: "⊥", + bottom: "⊥", + bowtie: "⋈", + boxDL: "╗", + boxDR: "╔", + boxDl: "╖", + boxDr: "╓", + boxH: "═", + boxHD: "╦", + boxHU: "╩", + boxHd: "╤", + boxHu: "╧", + boxUL: "╝", + boxUR: "╚", + boxUl: "╜", + boxUr: "╙", + boxV: "║", + boxVH: "╬", + boxVL: "╣", + boxVR: "╠", + boxVh: "╫", + boxVl: "╢", + boxVr: "╟", + boxbox: "⧉", + boxdL: "╕", + boxdR: "╒", + boxdl: "┐", + boxdr: "┌", + boxh: "─", + boxhD: "╥", + boxhU: "╨", + boxhd: "┬", + boxhu: "┴", + boxminus: "⊟", + boxplus: "⊞", + boxtimes: "⊠", + boxuL: "╛", + boxuR: "╘", + boxul: "┘", + boxur: "└", + boxv: "│", + boxvH: "╪", + boxvL: "╡", + boxvR: "╞", + boxvh: "┼", + boxvl: "┤", + boxvr: "├", + bprime: "‵", + breve: "˘", + brvba: "¦", + brvbar: "¦", + bscr: "𝒷", + bsemi: "⁏", + bsim: "∽", + bsime: "⋍", + bsol: "\\", + bsolb: "⧅", + bsolhsub: "⟈", + bull: "•", + bullet: "•", + bump: "≎", + bumpE: "⪮", + bumpe: "≏", + bumpeq: "≏", + cacute: "ć", + cap: "∩", + capand: "⩄", + capbrcup: "⩉", + capcap: "⩋", + capcup: "⩇", + capdot: "⩀", + caps: "∩︀", + caret: "⁁", + caron: "ˇ", + ccaps: "⩍", + ccaron: "č", + ccedi: "ç", + ccedil: "ç", + ccirc: "ĉ", + ccups: "⩌", + ccupssm: "⩐", + cdot: "ċ", + cedi: "¸", + cedil: "¸", + cemptyv: "⦲", + cen: "¢", + cent: "¢", + centerdot: "·", + cfr: "𝔠", + chcy: "ч", + check: "✓", + checkmark: "✓", + chi: "χ", + cir: "○", + cirE: "⧃", + circ: "ˆ", + circeq: "≗", + circlearrowleft: "↺", + circlearrowright: "↻", + circledR: "®", + circledS: "Ⓢ", + circledast: "⊛", + circledcirc: "⊚", + circleddash: "⊝", + cire: "≗", + cirfnint: "⨐", + cirmid: "⫯", + cirscir: "⧂", + clubs: "♣", + clubsuit: "♣", + colon: ":", + colone: "≔", + coloneq: "≔", + comma: ",", + commat: "@", + comp: "∁", + compfn: "∘", + complement: "∁", + complexes: "ℂ", + cong: "≅", + congdot: "⩭", + conint: "∮", + copf: "𝕔", + coprod: "∐", + cop: "©", + copy: "©", + copysr: "℗", + crarr: "↵", + cross: "✗", + cscr: "𝒸", + csub: "⫏", + csube: "⫑", + csup: "⫐", + csupe: "⫒", + ctdot: "⋯", + cudarrl: "⤸", + cudarrr: "⤵", + cuepr: "⋞", + cuesc: "⋟", + cularr: "↶", + cularrp: "⤽", + cup: "∪", + cupbrcap: "⩈", + cupcap: "⩆", + cupcup: "⩊", + cupdot: "⊍", + cupor: "⩅", + cups: "∪︀", + curarr: "↷", + curarrm: "⤼", + curlyeqprec: "⋞", + curlyeqsucc: "⋟", + curlyvee: "⋎", + curlywedge: "⋏", + curre: "¤", + curren: "¤", + curvearrowleft: "↶", + curvearrowright: "↷", + cuvee: "⋎", + cuwed: "⋏", + cwconint: "∲", + cwint: "∱", + cylcty: "⌭", + dArr: "⇓", + dHar: "⥥", + dagger: "†", + daleth: "ℸ", + darr: "↓", + dash: "‐", + dashv: "⊣", + dbkarow: "⤏", + dblac: "˝", + dcaron: "ď", + dcy: "д", + dd: "ⅆ", + ddagger: "‡", + ddarr: "⇊", + ddotseq: "⩷", + de: "°", + deg: "°", + delta: "δ", + demptyv: "⦱", + dfisht: "⥿", + dfr: "𝔡", + dharl: "⇃", + dharr: "⇂", + diam: "⋄", + diamond: "⋄", + diamondsuit: "♦", + diams: "♦", + die: "¨", + digamma: "ϝ", + disin: "⋲", + div: "÷", + divid: "÷", + divide: "÷", + divideontimes: "⋇", + divonx: "⋇", + djcy: "ђ", + dlcorn: "⌞", + dlcrop: "⌍", + dollar: "$", + dopf: "𝕕", + dot: "˙", + doteq: "≐", + doteqdot: "≑", + dotminus: "∸", + dotplus: "∔", + dotsquare: "⊡", + doublebarwedge: "⌆", + downarrow: "↓", + downdownarrows: "⇊", + downharpoonleft: "⇃", + downharpoonright: "⇂", + drbkarow: "⤐", + drcorn: "⌟", + drcrop: "⌌", + dscr: "𝒹", + dscy: "ѕ", + dsol: "⧶", + dstrok: "đ", + dtdot: "⋱", + dtri: "▿", + dtrif: "▾", + duarr: "⇵", + duhar: "⥯", + dwangle: "⦦", + dzcy: "џ", + dzigrarr: "⟿", + eDDot: "⩷", + eDot: "≑", + eacut: "é", + eacute: "é", + easter: "⩮", + ecaron: "ě", + ecir: "ê", + ecirc: "ê", + ecolon: "≕", + ecy: "э", + edot: "ė", + ee: "ⅇ", + efDot: "≒", + efr: "𝔢", + eg: "⪚", + egrav: "è", + egrave: "è", + egs: "⪖", + egsdot: "⪘", + el: "⪙", + elinters: "⏧", + ell: "ℓ", + els: "⪕", + elsdot: "⪗", + emacr: "ē", + empty: "∅", + emptyset: "∅", + emptyv: "∅", + emsp13: " ", + emsp14: " ", + emsp: " ", + eng: "ŋ", + ensp: " ", + eogon: "ę", + eopf: "𝕖", + epar: "⋕", + eparsl: "⧣", + eplus: "⩱", + epsi: "ε", + epsilon: "ε", + epsiv: "ϵ", + eqcirc: "≖", + eqcolon: "≕", + eqsim: "≂", + eqslantgtr: "⪖", + eqslantless: "⪕", + equals: "=", + equest: "≟", + equiv: "≡", + equivDD: "⩸", + eqvparsl: "⧥", + erDot: "≓", + erarr: "⥱", + escr: "ℯ", + esdot: "≐", + esim: "≂", + eta: "η", + et: "ð", + eth: "ð", + eum: "ë", + euml: "ë", + euro: "€", + excl: "!", + exist: "∃", + expectation: "ℰ", + exponentiale: "ⅇ", + fallingdotseq: "≒", + fcy: "ф", + female: "♀", + ffilig: "ffi", + fflig: "ff", + ffllig: "ffl", + ffr: "𝔣", + filig: "fi", + fjlig: "fj", + flat: "♭", + fllig: "fl", + fltns: "▱", + fnof: "ƒ", + fopf: "𝕗", + forall: "∀", + fork: "⋔", + forkv: "⫙", + fpartint: "⨍", + frac1: "¼", + frac12: "½", + frac13: "⅓", + frac14: "¼", + frac15: "⅕", + frac16: "⅙", + frac18: "⅛", + frac23: "⅔", + frac25: "⅖", + frac3: "¾", + frac34: "¾", + frac35: "⅗", + frac38: "⅜", + frac45: "⅘", + frac56: "⅚", + frac58: "⅝", + frac78: "⅞", + frasl: "⁄", + frown: "⌢", + fscr: "𝒻", + gE: "≧", + gEl: "⪌", + gacute: "ǵ", + gamma: "γ", + gammad: "ϝ", + gap: "⪆", + gbreve: "ğ", + gcirc: "ĝ", + gcy: "г", + gdot: "ġ", + ge: "≥", + gel: "⋛", + geq: "≥", + geqq: "≧", + geqslant: "⩾", + ges: "⩾", + gescc: "⪩", + gesdot: "⪀", + gesdoto: "⪂", + gesdotol: "⪄", + gesl: "⋛︀", + gesles: "⪔", + gfr: "𝔤", + gg: "≫", + ggg: "⋙", + gimel: "ℷ", + gjcy: "ѓ", + gl: "≷", + glE: "⪒", + gla: "⪥", + glj: "⪤", + gnE: "≩", + gnap: "⪊", + gnapprox: "⪊", + gne: "⪈", + gneq: "⪈", + gneqq: "≩", + gnsim: "⋧", + gopf: "𝕘", + grave: "`", + gscr: "ℊ", + gsim: "≳", + gsime: "⪎", + gsiml: "⪐", + g: ">", + gt: ">", + gtcc: "⪧", + gtcir: "⩺", + gtdot: "⋗", + gtlPar: "⦕", + gtquest: "⩼", + gtrapprox: "⪆", + gtrarr: "⥸", + gtrdot: "⋗", + gtreqless: "⋛", + gtreqqless: "⪌", + gtrless: "≷", + gtrsim: "≳", + gvertneqq: "≩︀", + gvnE: "≩︀", + hArr: "⇔", + hairsp: " ", + half: "½", + hamilt: "ℋ", + hardcy: "ъ", + harr: "↔", + harrcir: "⥈", + harrw: "↭", + hbar: "ℏ", + hcirc: "ĥ", + hearts: "♥", + heartsuit: "♥", + hellip: "…", + hercon: "⊹", + hfr: "𝔥", + hksearow: "⤥", + hkswarow: "⤦", + hoarr: "⇿", + homtht: "∻", + hookleftarrow: "↩", + hookrightarrow: "↪", + hopf: "𝕙", + horbar: "―", + hscr: "𝒽", + hslash: "ℏ", + hstrok: "ħ", + hybull: "⁃", + hyphen: "‐", + iacut: "í", + iacute: "í", + ic: "⁣", + icir: "î", + icirc: "î", + icy: "и", + iecy: "е", + iexc: "¡", + iexcl: "¡", + iff: "⇔", + ifr: "𝔦", + igrav: "ì", + igrave: "ì", + ii: "ⅈ", + iiiint: "⨌", + iiint: "∭", + iinfin: "⧜", + iiota: "℩", + ijlig: "ij", + imacr: "ī", + image: "ℑ", + imagline: "ℐ", + imagpart: "ℑ", + imath: "ı", + imof: "⊷", + imped: "Ƶ", + in: "∈", + incare: "℅", + infin: "∞", + infintie: "⧝", + inodot: "ı", + int: "∫", + intcal: "⊺", + integers: "ℤ", + intercal: "⊺", + intlarhk: "⨗", + intprod: "⨼", + iocy: "ё", + iogon: "į", + iopf: "𝕚", + iota: "ι", + iprod: "⨼", + iques: "¿", + iquest: "¿", + iscr: "𝒾", + isin: "∈", + isinE: "⋹", + isindot: "⋵", + isins: "⋴", + isinsv: "⋳", + isinv: "∈", + it: "⁢", + itilde: "ĩ", + iukcy: "і", + ium: "ï", + iuml: "ï", + jcirc: "ĵ", + jcy: "й", + jfr: "𝔧", + jmath: "ȷ", + jopf: "𝕛", + jscr: "𝒿", + jsercy: "ј", + jukcy: "є", + kappa: "κ", + kappav: "ϰ", + kcedil: "ķ", + kcy: "к", + kfr: "𝔨", + kgreen: "ĸ", + khcy: "х", + kjcy: "ќ", + kopf: "𝕜", + kscr: "𝓀", + lAarr: "⇚", + lArr: "⇐", + lAtail: "⤛", + lBarr: "⤎", + lE: "≦", + lEg: "⪋", + lHar: "⥢", + lacute: "ĺ", + laemptyv: "⦴", + lagran: "ℒ", + lambda: "λ", + lang: "⟨", + langd: "⦑", + langle: "⟨", + lap: "⪅", + laqu: "«", + laquo: "«", + larr: "←", + larrb: "⇤", + larrbfs: "⤟", + larrfs: "⤝", + larrhk: "↩", + larrlp: "↫", + larrpl: "⤹", + larrsim: "⥳", + larrtl: "↢", + lat: "⪫", + latail: "⤙", + late: "⪭", + lates: "⪭︀", + lbarr: "⤌", + lbbrk: "❲", + lbrace: "{", + lbrack: "[", + lbrke: "⦋", + lbrksld: "⦏", + lbrkslu: "⦍", + lcaron: "ľ", + lcedil: "ļ", + lceil: "⌈", + lcub: "{", + lcy: "л", + ldca: "⤶", + ldquo: "“", + ldquor: "„", + ldrdhar: "⥧", + ldrushar: "⥋", + ldsh: "↲", + le: "≤", + leftarrow: "←", + leftarrowtail: "↢", + leftharpoondown: "↽", + leftharpoonup: "↼", + leftleftarrows: "⇇", + leftrightarrow: "↔", + leftrightarrows: "⇆", + leftrightharpoons: "⇋", + leftrightsquigarrow: "↭", + leftthreetimes: "⋋", + leg: "⋚", + leq: "≤", + leqq: "≦", + leqslant: "⩽", + les: "⩽", + lescc: "⪨", + lesdot: "⩿", + lesdoto: "⪁", + lesdotor: "⪃", + lesg: "⋚︀", + lesges: "⪓", + lessapprox: "⪅", + lessdot: "⋖", + lesseqgtr: "⋚", + lesseqqgtr: "⪋", + lessgtr: "≶", + lesssim: "≲", + lfisht: "⥼", + lfloor: "⌊", + lfr: "𝔩", + lg: "≶", + lgE: "⪑", + lhard: "↽", + lharu: "↼", + lharul: "⥪", + lhblk: "▄", + ljcy: "љ", + ll: "≪", + llarr: "⇇", + llcorner: "⌞", + llhard: "⥫", + lltri: "◺", + lmidot: "ŀ", + lmoust: "⎰", + lmoustache: "⎰", + lnE: "≨", + lnap: "⪉", + lnapprox: "⪉", + lne: "⪇", + lneq: "⪇", + lneqq: "≨", + lnsim: "⋦", + loang: "⟬", + loarr: "⇽", + lobrk: "⟦", + longleftarrow: "⟵", + longleftrightarrow: "⟷", + longmapsto: "⟼", + longrightarrow: "⟶", + looparrowleft: "↫", + looparrowright: "↬", + lopar: "⦅", + lopf: "𝕝", + loplus: "⨭", + lotimes: "⨴", + lowast: "∗", + lowbar: "_", + loz: "◊", + lozenge: "◊", + lozf: "⧫", + lpar: "(", + lparlt: "⦓", + lrarr: "⇆", + lrcorner: "⌟", + lrhar: "⇋", + lrhard: "⥭", + lrm: "‎", + lrtri: "⊿", + lsaquo: "‹", + lscr: "𝓁", + lsh: "↰", + lsim: "≲", + lsime: "⪍", + lsimg: "⪏", + lsqb: "[", + lsquo: "‘", + lsquor: "‚", + lstrok: "ł", + l: "<", + lt: "<", + ltcc: "⪦", + ltcir: "⩹", + ltdot: "⋖", + lthree: "⋋", + ltimes: "⋉", + ltlarr: "⥶", + ltquest: "⩻", + ltrPar: "⦖", + ltri: "◃", + ltrie: "⊴", + ltrif: "◂", + lurdshar: "⥊", + luruhar: "⥦", + lvertneqq: "≨︀", + lvnE: "≨︀", + mDDot: "∺", + mac: "¯", + macr: "¯", + male: "♂", + malt: "✠", + maltese: "✠", + map: "↦", + mapsto: "↦", + mapstodown: "↧", + mapstoleft: "↤", + mapstoup: "↥", + marker: "▮", + mcomma: "⨩", + mcy: "м", + mdash: "—", + measuredangle: "∡", + mfr: "𝔪", + mho: "℧", + micr: "µ", + micro: "µ", + mid: "∣", + midast: "*", + midcir: "⫰", + middo: "·", + middot: "·", + minus: "−", + minusb: "⊟", + minusd: "∸", + minusdu: "⨪", + mlcp: "⫛", + mldr: "…", + mnplus: "∓", + models: "⊧", + mopf: "𝕞", + mp: "∓", + mscr: "𝓂", + mstpos: "∾", + mu: "μ", + multimap: "⊸", + mumap: "⊸", + nGg: "⋙̸", + nGt: "≫⃒", + nGtv: "≫̸", + nLeftarrow: "⇍", + nLeftrightarrow: "⇎", + nLl: "⋘̸", + nLt: "≪⃒", + nLtv: "≪̸", + nRightarrow: "⇏", + nVDash: "⊯", + nVdash: "⊮", + nabla: "∇", + nacute: "ń", + nang: "∠⃒", + nap: "≉", + napE: "⩰̸", + napid: "≋̸", + napos: "ʼn", + napprox: "≉", + natur: "♮", + natural: "♮", + naturals: "ℕ", + nbs: "\xA0", + nbsp: "\xA0", + nbump: "≎̸", + nbumpe: "≏̸", + ncap: "⩃", + ncaron: "ň", + ncedil: "ņ", + ncong: "≇", + ncongdot: "⩭̸", + ncup: "⩂", + ncy: "н", + ndash: "–", + ne: "≠", + neArr: "⇗", + nearhk: "⤤", + nearr: "↗", + nearrow: "↗", + nedot: "≐̸", + nequiv: "≢", + nesear: "⤨", + nesim: "≂̸", + nexist: "∄", + nexists: "∄", + nfr: "𝔫", + ngE: "≧̸", + nge: "≱", + ngeq: "≱", + ngeqq: "≧̸", + ngeqslant: "⩾̸", + nges: "⩾̸", + ngsim: "≵", + ngt: "≯", + ngtr: "≯", + nhArr: "⇎", + nharr: "↮", + nhpar: "⫲", + ni: "∋", + nis: "⋼", + nisd: "⋺", + niv: "∋", + njcy: "њ", + nlArr: "⇍", + nlE: "≦̸", + nlarr: "↚", + nldr: "‥", + nle: "≰", + nleftarrow: "↚", + nleftrightarrow: "↮", + nleq: "≰", + nleqq: "≦̸", + nleqslant: "⩽̸", + nles: "⩽̸", + nless: "≮", + nlsim: "≴", + nlt: "≮", + nltri: "⋪", + nltrie: "⋬", + nmid: "∤", + nopf: "𝕟", + no: "¬", + not: "¬", + notin: "∉", + notinE: "⋹̸", + notindot: "⋵̸", + notinva: "∉", + notinvb: "⋷", + notinvc: "⋶", + notni: "∌", + notniva: "∌", + notnivb: "⋾", + notnivc: "⋽", + npar: "∦", + nparallel: "∦", + nparsl: "⫽⃥", + npart: "∂̸", + npolint: "⨔", + npr: "⊀", + nprcue: "⋠", + npre: "⪯̸", + nprec: "⊀", + npreceq: "⪯̸", + nrArr: "⇏", + nrarr: "↛", + nrarrc: "⤳̸", + nrarrw: "↝̸", + nrightarrow: "↛", + nrtri: "⋫", + nrtrie: "⋭", + nsc: "⊁", + nsccue: "⋡", + nsce: "⪰̸", + nscr: "𝓃", + nshortmid: "∤", + nshortparallel: "∦", + nsim: "≁", + nsime: "≄", + nsimeq: "≄", + nsmid: "∤", + nspar: "∦", + nsqsube: "⋢", + nsqsupe: "⋣", + nsub: "⊄", + nsubE: "⫅̸", + nsube: "⊈", + nsubset: "⊂⃒", + nsubseteq: "⊈", + nsubseteqq: "⫅̸", + nsucc: "⊁", + nsucceq: "⪰̸", + nsup: "⊅", + nsupE: "⫆̸", + nsupe: "⊉", + nsupset: "⊃⃒", + nsupseteq: "⊉", + nsupseteqq: "⫆̸", + ntgl: "≹", + ntild: "ñ", + ntilde: "ñ", + ntlg: "≸", + ntriangleleft: "⋪", + ntrianglelefteq: "⋬", + ntriangleright: "⋫", + ntrianglerighteq: "⋭", + nu: "ν", + num: "#", + numero: "№", + numsp: " ", + nvDash: "⊭", + nvHarr: "⤄", + nvap: "≍⃒", + nvdash: "⊬", + nvge: "≥⃒", + nvgt: ">⃒", + nvinfin: "⧞", + nvlArr: "⤂", + nvle: "≤⃒", + nvlt: "<⃒", + nvltrie: "⊴⃒", + nvrArr: "⤃", + nvrtrie: "⊵⃒", + nvsim: "∼⃒", + nwArr: "⇖", + nwarhk: "⤣", + nwarr: "↖", + nwarrow: "↖", + nwnear: "⤧", + oS: "Ⓢ", + oacut: "ó", + oacute: "ó", + oast: "⊛", + ocir: "ô", + ocirc: "ô", + ocy: "о", + odash: "⊝", + odblac: "ő", + odiv: "⨸", + odot: "⊙", + odsold: "⦼", + oelig: "œ", + ofcir: "⦿", + ofr: "𝔬", + ogon: "˛", + ograv: "ò", + ograve: "ò", + ogt: "⧁", + ohbar: "⦵", + ohm: "Ω", + oint: "∮", + olarr: "↺", + olcir: "⦾", + olcross: "⦻", + oline: "‾", + olt: "⧀", + omacr: "ō", + omega: "ω", + omicron: "ο", + omid: "⦶", + ominus: "⊖", + oopf: "𝕠", + opar: "⦷", + operp: "⦹", + oplus: "⊕", + or: "∨", + orarr: "↻", + ord: "º", + order: "ℴ", + orderof: "ℴ", + ordf: "ª", + ordm: "º", + origof: "⊶", + oror: "⩖", + orslope: "⩗", + orv: "⩛", + oscr: "ℴ", + oslas: "ø", + oslash: "ø", + osol: "⊘", + otild: "õ", + otilde: "õ", + otimes: "⊗", + otimesas: "⨶", + oum: "ö", + ouml: "ö", + ovbar: "⌽", + par: "¶", + para: "¶", + parallel: "∥", + parsim: "⫳", + parsl: "⫽", + part: "∂", + pcy: "п", + percnt: "%", + period: ".", + permil: "‰", + perp: "⊥", + pertenk: "‱", + pfr: "𝔭", + phi: "φ", + phiv: "ϕ", + phmmat: "ℳ", + phone: "☎", + pi: "π", + pitchfork: "⋔", + piv: "ϖ", + planck: "ℏ", + planckh: "ℎ", + plankv: "ℏ", + plus: "+", + plusacir: "⨣", + plusb: "⊞", + pluscir: "⨢", + plusdo: "∔", + plusdu: "⨥", + pluse: "⩲", + plusm: "±", + plusmn: "±", + plussim: "⨦", + plustwo: "⨧", + pm: "±", + pointint: "⨕", + popf: "𝕡", + poun: "£", + pound: "£", + pr: "≺", + prE: "⪳", + prap: "⪷", + prcue: "≼", + pre: "⪯", + prec: "≺", + precapprox: "⪷", + preccurlyeq: "≼", + preceq: "⪯", + precnapprox: "⪹", + precneqq: "⪵", + precnsim: "⋨", + precsim: "≾", + prime: "′", + primes: "ℙ", + prnE: "⪵", + prnap: "⪹", + prnsim: "⋨", + prod: "∏", + profalar: "⌮", + profline: "⌒", + profsurf: "⌓", + prop: "∝", + propto: "∝", + prsim: "≾", + prurel: "⊰", + pscr: "𝓅", + psi: "ψ", + puncsp: " ", + qfr: "𝔮", + qint: "⨌", + qopf: "𝕢", + qprime: "⁗", + qscr: "𝓆", + quaternions: "ℍ", + quatint: "⨖", + quest: "?", + questeq: "≟", + quo: "\"", + quot: "\"", + rAarr: "⇛", + rArr: "⇒", + rAtail: "⤜", + rBarr: "⤏", + rHar: "⥤", + race: "∽̱", + racute: "ŕ", + radic: "√", + raemptyv: "⦳", + rang: "⟩", + rangd: "⦒", + range: "⦥", + rangle: "⟩", + raqu: "»", + raquo: "»", + rarr: "→", + rarrap: "⥵", + rarrb: "⇥", + rarrbfs: "⤠", + rarrc: "⤳", + rarrfs: "⤞", + rarrhk: "↪", + rarrlp: "↬", + rarrpl: "⥅", + rarrsim: "⥴", + rarrtl: "↣", + rarrw: "↝", + ratail: "⤚", + ratio: "∶", + rationals: "ℚ", + rbarr: "⤍", + rbbrk: "❳", + rbrace: "}", + rbrack: "]", + rbrke: "⦌", + rbrksld: "⦎", + rbrkslu: "⦐", + rcaron: "ř", + rcedil: "ŗ", + rceil: "⌉", + rcub: "}", + rcy: "р", + rdca: "⤷", + rdldhar: "⥩", + rdquo: "”", + rdquor: "”", + rdsh: "↳", + real: "ℜ", + realine: "ℛ", + realpart: "ℜ", + reals: "ℝ", + rect: "▭", + re: "®", + reg: "®", + rfisht: "⥽", + rfloor: "⌋", + rfr: "𝔯", + rhard: "⇁", + rharu: "⇀", + rharul: "⥬", + rho: "ρ", + rhov: "ϱ", + rightarrow: "→", + rightarrowtail: "↣", + rightharpoondown: "⇁", + rightharpoonup: "⇀", + rightleftarrows: "⇄", + rightleftharpoons: "⇌", + rightrightarrows: "⇉", + rightsquigarrow: "↝", + rightthreetimes: "⋌", + ring: "˚", + risingdotseq: "≓", + rlarr: "⇄", + rlhar: "⇌", + rlm: "‏", + rmoust: "⎱", + rmoustache: "⎱", + rnmid: "⫮", + roang: "⟭", + roarr: "⇾", + robrk: "⟧", + ropar: "⦆", + ropf: "𝕣", + roplus: "⨮", + rotimes: "⨵", + rpar: ")", + rpargt: "⦔", + rppolint: "⨒", + rrarr: "⇉", + rsaquo: "›", + rscr: "𝓇", + rsh: "↱", + rsqb: "]", + rsquo: "’", + rsquor: "’", + rthree: "⋌", + rtimes: "⋊", + rtri: "▹", + rtrie: "⊵", + rtrif: "▸", + rtriltri: "⧎", + ruluhar: "⥨", + rx: "℞", + sacute: "ś", + sbquo: "‚", + sc: "≻", + scE: "⪴", + scap: "⪸", + scaron: "š", + sccue: "≽", + sce: "⪰", + scedil: "ş", + scirc: "ŝ", + scnE: "⪶", + scnap: "⪺", + scnsim: "⋩", + scpolint: "⨓", + scsim: "≿", + scy: "с", + sdot: "⋅", + sdotb: "⊡", + sdote: "⩦", + seArr: "⇘", + searhk: "⤥", + searr: "↘", + searrow: "↘", + sec: "§", + sect: "§", + semi: ";", + seswar: "⤩", + setminus: "∖", + setmn: "∖", + sext: "✶", + sfr: "𝔰", + sfrown: "⌢", + sharp: "♯", + shchcy: "щ", + shcy: "ш", + shortmid: "∣", + shortparallel: "∥", + sh: "­", + shy: "­", + sigma: "σ", + sigmaf: "ς", + sigmav: "ς", + sim: "∼", + simdot: "⩪", + sime: "≃", + simeq: "≃", + simg: "⪞", + simgE: "⪠", + siml: "⪝", + simlE: "⪟", + simne: "≆", + simplus: "⨤", + simrarr: "⥲", + slarr: "←", + smallsetminus: "∖", + smashp: "⨳", + smeparsl: "⧤", + smid: "∣", + smile: "⌣", + smt: "⪪", + smte: "⪬", + smtes: "⪬︀", + softcy: "ь", + sol: "/", + solb: "⧄", + solbar: "⌿", + sopf: "𝕤", + spades: "♠", + spadesuit: "♠", + spar: "∥", + sqcap: "⊓", + sqcaps: "⊓︀", + sqcup: "⊔", + sqcups: "⊔︀", + sqsub: "⊏", + sqsube: "⊑", + sqsubset: "⊏", + sqsubseteq: "⊑", + sqsup: "⊐", + sqsupe: "⊒", + sqsupset: "⊐", + sqsupseteq: "⊒", + squ: "□", + square: "□", + squarf: "▪", + squf: "▪", + srarr: "→", + sscr: "𝓈", + ssetmn: "∖", + ssmile: "⌣", + sstarf: "⋆", + star: "☆", + starf: "★", + straightepsilon: "ϵ", + straightphi: "ϕ", + strns: "¯", + sub: "⊂", + subE: "⫅", + subdot: "⪽", + sube: "⊆", + subedot: "⫃", + submult: "⫁", + subnE: "⫋", + subne: "⊊", + subplus: "⪿", + subrarr: "⥹", + subset: "⊂", + subseteq: "⊆", + subseteqq: "⫅", + subsetneq: "⊊", + subsetneqq: "⫋", + subsim: "⫇", + subsub: "⫕", + subsup: "⫓", + succ: "≻", + succapprox: "⪸", + succcurlyeq: "≽", + succeq: "⪰", + succnapprox: "⪺", + succneqq: "⪶", + succnsim: "⋩", + succsim: "≿", + sum: "∑", + sung: "♪", + sup: "⊃", + sup1: "¹", + sup2: "²", + sup3: "³", + supE: "⫆", + supdot: "⪾", + supdsub: "⫘", + supe: "⊇", + supedot: "⫄", + suphsol: "⟉", + suphsub: "⫗", + suplarr: "⥻", + supmult: "⫂", + supnE: "⫌", + supne: "⊋", + supplus: "⫀", + supset: "⊃", + supseteq: "⊇", + supseteqq: "⫆", + supsetneq: "⊋", + supsetneqq: "⫌", + supsim: "⫈", + supsub: "⫔", + supsup: "⫖", + swArr: "⇙", + swarhk: "⤦", + swarr: "↙", + swarrow: "↙", + swnwar: "⤪", + szli: "ß", + szlig: "ß", + target: "⌖", + tau: "τ", + tbrk: "⎴", + tcaron: "ť", + tcedil: "ţ", + tcy: "т", + tdot: "⃛", + telrec: "⌕", + tfr: "𝔱", + there4: "∴", + therefore: "∴", + theta: "θ", + thetasym: "ϑ", + thetav: "ϑ", + thickapprox: "≈", + thicksim: "∼", + thinsp: " ", + thkap: "≈", + thksim: "∼", + thor: "þ", + thorn: "þ", + tilde: "˜", + time: "×", + times: "×", + timesb: "⊠", + timesbar: "⨱", + timesd: "⨰", + tint: "∭", + toea: "⤨", + top: "⊤", + topbot: "⌶", + topcir: "⫱", + topf: "𝕥", + topfork: "⫚", + tosa: "⤩", + tprime: "‴", + trade: "™", + triangle: "▵", + triangledown: "▿", + triangleleft: "◃", + trianglelefteq: "⊴", + triangleq: "≜", + triangleright: "▹", + trianglerighteq: "⊵", + tridot: "◬", + trie: "≜", + triminus: "⨺", + triplus: "⨹", + trisb: "⧍", + tritime: "⨻", + trpezium: "⏢", + tscr: "𝓉", + tscy: "ц", + tshcy: "ћ", + tstrok: "ŧ", + twixt: "≬", + twoheadleftarrow: "↞", + twoheadrightarrow: "↠", + uArr: "⇑", + uHar: "⥣", + uacut: "ú", + uacute: "ú", + uarr: "↑", + ubrcy: "ў", + ubreve: "ŭ", + ucir: "û", + ucirc: "û", + ucy: "у", + udarr: "⇅", + udblac: "ű", + udhar: "⥮", + ufisht: "⥾", + ufr: "𝔲", + ugrav: "ù", + ugrave: "ù", + uharl: "↿", + uharr: "↾", + uhblk: "▀", + ulcorn: "⌜", + ulcorner: "⌜", + ulcrop: "⌏", + ultri: "◸", + umacr: "ū", + um: "¨", + uml: "¨", + uogon: "ų", + uopf: "𝕦", + uparrow: "↑", + updownarrow: "↕", + upharpoonleft: "↿", + upharpoonright: "↾", + uplus: "⊎", + upsi: "υ", + upsih: "ϒ", + upsilon: "υ", + upuparrows: "⇈", + urcorn: "⌝", + urcorner: "⌝", + urcrop: "⌎", + uring: "ů", + urtri: "◹", + uscr: "𝓊", + utdot: "⋰", + utilde: "ũ", + utri: "▵", + utrif: "▴", + uuarr: "⇈", + uum: "ü", + uuml: "ü", + uwangle: "⦧", + vArr: "⇕", + vBar: "⫨", + vBarv: "⫩", + vDash: "⊨", + vangrt: "⦜", + varepsilon: "ϵ", + varkappa: "ϰ", + varnothing: "∅", + varphi: "ϕ", + varpi: "ϖ", + varpropto: "∝", + varr: "↕", + varrho: "ϱ", + varsigma: "ς", + varsubsetneq: "⊊︀", + varsubsetneqq: "⫋︀", + varsupsetneq: "⊋︀", + varsupsetneqq: "⫌︀", + vartheta: "ϑ", + vartriangleleft: "⊲", + vartriangleright: "⊳", + vcy: "в", + vdash: "⊢", + vee: "∨", + veebar: "⊻", + veeeq: "≚", + vellip: "⋮", + verbar: "|", + vert: "|", + vfr: "𝔳", + vltri: "⊲", + vnsub: "⊂⃒", + vnsup: "⊃⃒", + vopf: "𝕧", + vprop: "∝", + vrtri: "⊳", + vscr: "𝓋", + vsubnE: "⫋︀", + vsubne: "⊊︀", + vsupnE: "⫌︀", + vsupne: "⊋︀", + vzigzag: "⦚", + wcirc: "ŵ", + wedbar: "⩟", + wedge: "∧", + wedgeq: "≙", + weierp: "℘", + wfr: "𝔴", + wopf: "𝕨", + wp: "℘", + wr: "≀", + wreath: "≀", + wscr: "𝓌", + xcap: "⋂", + xcirc: "◯", + xcup: "⋃", + xdtri: "▽", + xfr: "𝔵", + xhArr: "⟺", + xharr: "⟷", + xi: "ξ", + xlArr: "⟸", + xlarr: "⟵", + xmap: "⟼", + xnis: "⋻", + xodot: "⨀", + xopf: "𝕩", + xoplus: "⨁", + xotime: "⨂", + xrArr: "⟹", + xrarr: "⟶", + xscr: "𝓍", + xsqcup: "⨆", + xuplus: "⨄", + xutri: "△", + xvee: "⋁", + xwedge: "⋀", + yacut: "ý", + yacute: "ý", + yacy: "я", + ycirc: "ŷ", + ycy: "ы", + ye: "¥", + yen: "¥", + yfr: "𝔶", + yicy: "ї", + yopf: "𝕪", + yscr: "𝓎", + yucy: "ю", + yum: "ÿ", + yuml: "ÿ", + zacute: "ź", + zcaron: "ž", + zcy: "з", + zdot: "ż", + zeetrf: "ℨ", + zeta: "ζ", + zfr: "𝔷", + zhcy: "ж", + zigrarr: "⇝", + zopf: "𝕫", + zscr: "𝓏", + zwj: "‍", + zwnj: "‌" + }; + }); + Iu = x((pv, Pu) => { + "use strict"; + var Nu = qu(); + Pu.exports = RD; + var LD = {}.hasOwnProperty; + function RD(e) { + return LD.call(Nu, e) ? Nu[e] : !1; + } + }); + mr = x((hv, Hu) => { + "use strict"; + var Su = xu(), Lu = yu(), MD = Se(), UD = Tu(), Yu = Ou(), YD = Iu(); + Hu.exports = ep; + var GD = {}.hasOwnProperty, He = String.fromCharCode, zD = Function.prototype, Ru = { + warning: null, + reference: null, + text: null, + warningContext: null, + referenceContext: null, + textContext: null, + position: {}, + additional: null, + attribute: !1, + nonTerminated: !0 + }, WD = 9, Mu = 10, VD = 12, jD = 32, Uu = 38, $D = 59, HD = 60, KD = 61, XD = 35, JD = 88, QD = 120, ZD = 65533, Ke = "named", Wt = "hexadecimal", Vt = "decimal", jt = {}; + jt[Wt] = 16; + jt[Vt] = 10; + var Hr = {}; + Hr[Ke] = Yu; + Hr[Vt] = MD; + Hr[Wt] = UD; + var Gu = 1, zu = 2, Wu = 3, Vu = 4, ju = 5, zt = 6, $u = 7, we = {}; + we[Gu] = "Named character references must be terminated by a semicolon"; + we[zu] = "Numeric character references must be terminated by a semicolon"; + we[Wu] = "Named character references cannot be empty"; + we[Vu] = "Numeric character references cannot be empty"; + we[ju] = "Named character references must be known"; + we[zt] = "Numeric character references cannot be disallowed"; + we[$u] = "Numeric character references cannot be outside the permissible Unicode range"; + function ep(e, r) { + var t = {}, n, i; + r || (r = {}); + for (i in Ru) n = r[i], t[i] = n ?? Ru[i]; + return (t.position.indent || t.position.start) && (t.indent = t.position.indent || [], t.position = t.position.start), rp(e, t); + } + function rp(e, r) { + var t = r.additional, n = r.nonTerminated, i = r.text, u = r.reference, a = r.warning, o = r.textContext, s = r.referenceContext, l = r.warningContext, c = r.position, f = r.indent || [], D = e.length, m = 0, p = -1, h = c.column || 1, F = c.line || 1, g = "", E = [], v, A, b, d, y, w, C, k, T, B, _, S, P, N, O, I, le, K, L; + for (typeof t == "string" && (t = t.charCodeAt(0)), I = ie(), k = a ? Z : zD, m--, D++; ++m < D;) if (y === Mu && (h = f[p] || 1), y = e.charCodeAt(m), y === Uu) { + if (C = e.charCodeAt(m + 1), C === WD || C === Mu || C === VD || C === jD || C === Uu || C === HD || C !== C || t && C === t) { + g += He(y), h++; + continue; + } + for (P = m + 1, S = P, L = P, C === XD ? (L = ++S, C = e.charCodeAt(L), C === JD || C === QD ? (N = Wt, L = ++S) : N = Vt) : N = Ke, v = "", _ = "", d = "", O = Hr[N], L--; ++L < D && (C = e.charCodeAt(L), !!O(C));) d += He(C), N === Ke && GD.call(Su, d) && (v = d, _ = Su[d]); + b = e.charCodeAt(L) === $D, b && (L++, A = N === Ke ? YD(d) : !1, A && (v = d, _ = A)), K = 1 + L - P, !b && !n || (d ? N === Ke ? (b && !_ ? k(ju, 1) : (v !== d && (L = S + v.length, K = 1 + L - S, b = !1), b || (T = v ? Gu : Wu, r.attribute ? (C = e.charCodeAt(L), C === KD ? (k(T, K), _ = null) : Yu(C) ? _ = null : k(T, K)) : k(T, K))), w = _) : (b || k(zu, K), w = parseInt(d, jt[N]), tp(w) ? (k($u, K), w = He(ZD)) : w in Lu ? (k(zt, K), w = Lu[w]) : (B = "", np(w) && k(zt, K), w > 65535 && (w -= 65536, B += He(w >>> 10 | 55296), w = 56320 | w & 1023), w = B + He(w))) : N !== Ke && k(Vu, K)), w ? (ve(), I = ie(), m = L - 1, h += L - P + 1, E.push(w), le = ie(), le.offset++, u && u.call(s, w, { + start: I, + end: le + }, e.slice(P - 1, L)), I = le) : (d = e.slice(P - 1, L), g += d, h += d.length, m = L - 1); + } else y === 10 && (F++, p++, h = 0), y === y ? (g += He(y), h++) : ve(); + return E.join(""); + function ie() { + return { + line: F, + column: h, + offset: m + (c.offset || 0) + }; + } + function Z(Ae, G) { + var mt = ie(); + mt.column += G, mt.offset += G, a.call(l, we[Ae], mt, Ae); + } + function ve() { + g && (E.push(g), i && i.call(o, g, { + start: I, + end: ie() + }), g = ""); + } + } + function tp(e) { + return e >= 55296 && e <= 57343 || e > 1114111; + } + function np(e) { + return e >= 1 && e <= 8 || e === 11 || e >= 13 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || (e & 65535) === 65535 || (e & 65535) === 65534; + } + }); + Ju = x((dv, Xu) => { + "use strict"; + var ip = Ie(), Ku = mr(); + Xu.exports = up; + function up(e) { + return t.raw = n, t; + function r(u) { + for (var a = e.offset, o = u.line, s = []; ++o && o in a;) s.push((a[o] || 0) + 1); + return { + start: u, + indent: s + }; + } + function t(u, a, o) { + Ku(u, { + position: r(a), + warning: i, + text: o, + reference: o, + textContext: e, + referenceContext: e + }); + } + function n(u, a, o) { + return Ku(u, ip(o, { + position: r(a), + warning: i + })); + } + function i(u, a, o) { + o !== 3 && e.file.message(u, a); + } + } + }); + ea = x((mv, Zu) => { + "use strict"; + Zu.exports = ap; + function ap(e) { + return r; + function r(t, n) { + var i = this, u = i.offset, a = [], o = i[e + "Methods"], s = i[e + "Tokenizers"], l = n.line, c = n.column, f, D, m, p, h, F; + if (!t) return a; + for (w.now = v, w.file = i.file, g(""); t;) { + for (f = -1, D = o.length, h = !1; ++f < D && (p = o[f], m = s[p], !(m && (!m.onlyAtStart || i.atStart) && (!m.notInList || !i.inList) && (!m.notInBlock || !i.inBlock) && (!m.notInLink || !i.inLink) && (F = t.length, m.apply(i, [w, t]), h = F !== t.length, h)));); + h || i.file.fail(/* @__PURE__ */ new Error("Infinite loop"), w.now()); + } + return i.eof = v(), a; + function g(C) { + for (var k = -1, T = C.indexOf(` +`); T !== -1;) l++, k = T, T = C.indexOf(` +`, T + 1); + k === -1 ? c += C.length : c = C.length - k, l in u && (k !== -1 ? c += u[l] : c <= u[l] && (c = u[l] + 1)); + } + function E() { + var C = [], k = l + 1; + return function() { + for (var T = l + 1; k < T;) C.push((u[k] || 0) + 1), k++; + return C; + }; + } + function v() { + var C = { + line: l, + column: c + }; + return C.offset = i.toOffset(C), C; + } + function A(C) { + this.start = C, this.end = v(); + } + function b(C) { + t.slice(0, C.length) !== C && i.file.fail(/* @__PURE__ */ new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"), v()); + } + function d() { + var C = v(); + return k; + function k(T, B) { + var _ = T.position, S = _ ? _.start : C, P = [], N = _ && _.end.line, O = C.line; + if (T.position = new A(S), _ && B && _.indent) { + if (P = _.indent, N < O) { + for (; ++N < O;) P.push((u[N] || 0) + 1); + P.push(C.column); + } + B = P.concat(B); + } + return T.position.indent = B || [], T; + } + } + function y(C, k) { + var T = k ? k.children : a, B = T[T.length - 1], _; + return B && C.type === B.type && (C.type === "text" || C.type === "blockquote") && Qu(B) && Qu(C) && (_ = C.type === "text" ? op : sp, C = _.call(i, B, C)), C !== B && T.push(C), i.atStart && a.length !== 0 && i.exitStart(), C; + } + function w(C) { + var k = E(), T = d(), B = v(); + return b(C), _.reset = S, S.test = P, _.test = P, t = t.slice(C.length), g(C), k = k(), _; + function _(N, O) { + return T(y(T(N), O), k); + } + function S() { + var N = _.apply(null, arguments); + return l = B.line, c = B.column, t = C + t, N; + } + function P() { + var N = T({}); + return l = B.line, c = B.column, t = C + t, N.position; + } + } + } + } + function Qu(e) { + var r, t; + return e.type !== "text" || !e.position ? !0 : (r = e.position.start, t = e.position.end, r.line !== t.line || t.column - r.column === e.value.length); + } + function op(e, r) { + return e.value += r.value, e; + } + function sp(e, r) { + return this.options.commonmark || this.options.gfm ? r : (e.children = e.children.concat(r.children), e); + } + }); + na = x((Fv, ta) => { + "use strict"; + ta.exports = Kr; + var $t = [ + "\\", + "`", + "*", + "{", + "}", + "[", + "]", + "(", + ")", + "#", + "+", + "-", + ".", + "!", + "_", + ">" + ], Ht = $t.concat(["~", "|"]), ra = Ht.concat([ + ` +`, + "\"", + "$", + "%", + "&", + "'", + ",", + "/", + ":", + ";", + "<", + "=", + "?", + "@", + "^" + ]); + Kr.default = $t; + Kr.gfm = Ht; + Kr.commonmark = ra; + function Kr(e) { + var r = e || {}; + return r.commonmark ? ra : r.gfm ? Ht : $t; + } + }); + ua = x((gv, ia) => { + "use strict"; + ia.exports = [ + "address", + "article", + "aside", + "base", + "basefont", + "blockquote", + "body", + "caption", + "center", + "col", + "colgroup", + "dd", + "details", + "dialog", + "dir", + "div", + "dl", + "dt", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "iframe", + "legend", + "li", + "link", + "main", + "menu", + "menuitem", + "meta", + "nav", + "noframes", + "ol", + "optgroup", + "option", + "p", + "param", + "pre", + "section", + "source", + "title", + "summary", + "table", + "tbody", + "td", + "tfoot", + "th", + "thead", + "title", + "tr", + "track", + "ul" + ]; + }); + Kt = x((Ev, aa) => { + "use strict"; + aa.exports = { + position: !0, + gfm: !0, + commonmark: !1, + pedantic: !1, + blocks: ua() + }; + }); + sa = x((Cv, oa) => { + "use strict"; + var cp = Ie(), lp = na(), fp = Kt(); + oa.exports = Dp; + function Dp(e) { + var r = this, t = r.options, n, i; + if (e == null) e = {}; + else if (typeof e == "object") e = cp(e); + else throw new Error("Invalid value `" + e + "` for setting `options`"); + for (n in fp) { + if (i = e[n], i ??= t[n], n !== "blocks" && typeof i != "boolean" || n === "blocks" && typeof i != "object") throw new Error("Invalid value `" + i + "` for setting `options." + n + "`"); + e[n] = i; + } + return r.options = e, r.escape = lp(e), r; + } + }); + fa = x((vv, la) => { + "use strict"; + la.exports = ca; + function ca(e) { + if (e == null) return mp; + if (typeof e == "string") return dp(e); + if (typeof e == "object") return "length" in e ? hp(e) : pp(e); + if (typeof e == "function") return e; + throw new Error("Expected function, string, or object as test"); + } + function pp(e) { + return r; + function r(t) { + var n; + for (n in e) if (t[n] !== e[n]) return !1; + return !0; + } + } + function hp(e) { + for (var r = [], t = -1; ++t < e.length;) r[t] = ca(e[t]); + return n; + function n() { + for (var i = -1; ++i < r.length;) if (r[i].apply(this, arguments)) return !0; + return !1; + } + } + function dp(e) { + return r; + function r(t) { + return !!(t && t.type === e); + } + } + function mp() { + return !0; + } + }); + pa = x((Av, Da) => { + Da.exports = Fp; + function Fp(e) { + return e; + } + }); + Fa = x((bv, ma) => { + "use strict"; + ma.exports = Xr; + var gp = fa(), Ep = pa(), ha = !0, da = "skip", Xt = !1; + Xr.CONTINUE = ha; + Xr.SKIP = da; + Xr.EXIT = Xt; + function Xr(e, r, t, n) { + var i, u; + typeof r == "function" && typeof t != "function" && (n = t, t = r, r = null), u = gp(r), i = n ? -1 : 1, a(e, null, [])(); + function a(o, s, l) { + var c = typeof o == "object" && o !== null ? o : {}, f; + return typeof c.type == "string" && (f = typeof c.tagName == "string" ? c.tagName : typeof c.name == "string" ? c.name : void 0, D.displayName = "node (" + Ep(c.type + (f ? "<" + f + ">" : "")) + ")"), D; + function D() { + var m = l.concat(o), p = [], h, F; + if ((!r || u(o, s, l[l.length - 1] || null)) && (p = Cp(t(o, l)), p[0] === Xt)) return p; + if (o.children && p[0] !== da) for (F = (n ? o.children.length : -1) + i; F > -1 && F < o.children.length;) { + if (h = a(o.children[F], F, m)(), h[0] === Xt) return h; + F = typeof h[1] == "number" ? h[1] : F + i; + } + return p; + } + } + } + function Cp(e) { + return e !== null && typeof e == "object" && "length" in e ? e : typeof e == "number" ? [ha, e] : [e]; + } + }); + Ea = x((xv, ga) => { + "use strict"; + ga.exports = Qr; + var Jr = Fa(), vp = Jr.CONTINUE, Ap = Jr.SKIP, bp = Jr.EXIT; + Qr.CONTINUE = vp; + Qr.SKIP = Ap; + Qr.EXIT = bp; + function Qr(e, r, t, n) { + typeof r == "function" && typeof t != "function" && (n = t, t = r, r = null), Jr(e, r, i, n); + function i(u, a) { + var o = a[a.length - 1], s = o ? o.children.indexOf(u) : null; + return t(u, s, o); + } + } + }); + va = x((yv, Ca) => { + "use strict"; + var xp = Ea(); + Ca.exports = yp; + function yp(e, r) { + return xp(e, r ? wp : kp), e; + } + function wp(e) { + delete e.position; + } + function kp(e) { + e.position = void 0; + } + }); + xa = x((wv, ba) => { + "use strict"; + var Aa = Ie(), Tp = va(); + ba.exports = Op; + var Bp = ` +`, _p = /\r\n|\r/g; + function Op() { + var e = this, r = String(e.file), t = { + line: 1, + column: 1, + offset: 0 + }, n = Aa(t), i; + return r = r.replace(_p, Bp), r.charCodeAt(0) === 65279 && (r = r.slice(1), n.column++, n.offset++), i = { + type: "root", + children: e.tokenizeBlock(r, n), + position: { + start: t, + end: e.eof || Aa(t) + } + }, e.options.position || Tp(i, !0), i; + } + }); + wa = x((kv, ya) => { + "use strict"; + var qp = /^[ \t]*(\n|$)/; + ya.exports = Np; + function Np(e, r, t) { + for (var n, i = "", u = 0, a = r.length; u < a && (n = qp.exec(r.slice(u)), n != null);) u += n[0].length, i += n[0]; + if (i !== "") { + if (t) return !0; + e(i); + } + } + }); + Zr = x((Tv, ka) => { + "use strict"; + var ge = "", Jt; + ka.exports = Pp; + function Pp(e, r) { + if (typeof e != "string") throw new TypeError("expected a string"); + if (r === 1) return e; + if (r === 2) return e + e; + var t = e.length * r; + if (Jt !== e || typeof Jt > "u") Jt = e, ge = ""; + else if (ge.length >= t) return ge.substr(0, t); + for (; t > ge.length && r > 1;) r & 1 && (ge += e), r >>= 1, e += e; + return ge += e, ge = ge.substr(0, t), ge; + } + }); + Qt = x((Bv, Ta) => { + "use strict"; + Ta.exports = Ip; + function Ip(e) { + return String(e).replace(/\n+$/, ""); + } + }); + Oa = x((_v, _a) => { + "use strict"; + var Sp = Zr(), Lp = Qt(); + _a.exports = Up; + var Zt = ` +`, Ba = " ", en = " ", Mp = Sp(en, 4); + function Up(e, r, t) { + for (var n = -1, i = r.length, u = "", a = "", o = "", s = "", l, c, f; ++n < i;) if (l = r.charAt(n), f) if (f = !1, u += o, a += s, o = "", s = "", l === Zt) o = l, s = l; + else for (u += l, a += l; ++n < i;) { + if (l = r.charAt(n), !l || l === Zt) { + s = l, o = l; + break; + } + u += l, a += l; + } + else if (l === en && r.charAt(n + 1) === l && r.charAt(n + 2) === l && r.charAt(n + 3) === l) o += Mp, n += 3, f = !0; + else if (l === Ba) o += l, f = !0; + else { + for (c = ""; l === Ba || l === en;) c += l, l = r.charAt(++n); + if (l !== Zt) break; + o += c + l, s += l; + } + if (a) return t ? !0 : e(u)({ + type: "code", + lang: null, + meta: null, + value: Lp(a) + }); + } + }); + Pa = x((Ov, Na) => { + "use strict"; + Na.exports = Wp; + var et = ` +`, Fr = " ", Xe = " ", Yp = "~", qa = "`", Gp = 3, zp = 4; + function Wp(e, r, t) { + var n = this, i = n.options.gfm, u = r.length + 1, a = 0, o = "", s, l, c, f, D, m, p, h, F, g, E, v, A; + if (i) { + for (; a < u && (c = r.charAt(a), !(c !== Xe && c !== Fr));) o += c, a++; + if (v = a, c = r.charAt(a), !(c !== Yp && c !== qa)) { + for (a++, l = c, s = 1, o += c; a < u && (c = r.charAt(a), c === l);) o += c, s++, a++; + if (!(s < Gp)) { + for (; a < u && (c = r.charAt(a), !(c !== Xe && c !== Fr));) o += c, a++; + for (f = "", p = ""; a < u && (c = r.charAt(a), !(c === et || l === qa && c === l));) c === Xe || c === Fr ? p += c : (f += p + c, p = ""), a++; + if (c = r.charAt(a), !(c && c !== et)) { + if (t) return !0; + A = e.now(), A.column += o.length, A.offset += o.length, o += f, f = n.decode.raw(n.unescape(f), A), p && (o += p), p = "", g = "", E = "", h = "", F = ""; + for (var b = !0; a < u;) { + if (c = r.charAt(a), h += g, F += E, g = "", E = "", c !== et) { + h += c, E += c, a++; + continue; + } + for (b ? (o += c, b = !1) : (g += c, E += c), p = "", a++; a < u && (c = r.charAt(a), c === Xe);) p += c, a++; + if (g += p, E += p.slice(v), !(p.length >= zp)) { + for (p = ""; a < u && (c = r.charAt(a), c === l);) p += c, a++; + if (g += p, E += p, !(p.length < s)) { + for (p = ""; a < u && (c = r.charAt(a), !(c !== Xe && c !== Fr));) g += c, E += c, a++; + if (!c || c === et) break; + } + } + } + for (o += h + g, a = -1, u = f.length; ++a < u;) if (c = f.charAt(a), c === Xe || c === Fr) D || (D = f.slice(0, a)); + else if (D) { + m = f.slice(a); + break; + } + return e(o)({ + type: "code", + lang: D || f || null, + meta: m || null, + value: F + }); + } + } + } + } + } + }); + Le = x((Je, Ia) => { + Je = Ia.exports = Vp; + function Vp(e) { + return e.trim ? e.trim() : Je.right(Je.left(e)); + } + Je.left = function(e) { + return e.trimLeft ? e.trimLeft() : e.replace(/^\s\s*/, ""); + }; + Je.right = function(e) { + if (e.trimRight) return e.trimRight(); + for (var r = /\s/, t = e.length; r.test(e.charAt(--t));); + return e.slice(0, t + 1); + }; + }); + rt = x((qv, Sa) => { + "use strict"; + Sa.exports = jp; + function jp(e, r, t, n) { + for (var i = e.length, u = -1, a, o; ++u < i;) if (a = e[u], o = a[1] || {}, !(o.pedantic !== void 0 && o.pedantic !== t.options.pedantic) && !(o.commonmark !== void 0 && o.commonmark !== t.options.commonmark) && r[a[0]].apply(t, n)) return !0; + return !1; + } + }); + Ua = x((Nv, Ma) => { + "use strict"; + var $p = Le(), Hp = rt(); + Ma.exports = Kp; + var rn = ` +`, La = " ", tn = " ", Ra = ">"; + function Kp(e, r, t) { + for (var n = this, i = n.offset, u = n.blockTokenizers, a = n.interruptBlockquote, o = e.now(), s = o.line, l = r.length, c = [], f = [], D = [], m, p = 0, h, F, g, E, v, A, b, d; p < l && (h = r.charAt(p), !(h !== tn && h !== La));) p++; + if (r.charAt(p) === Ra) { + if (t) return !0; + for (p = 0; p < l;) { + for (g = r.indexOf(rn, p), A = p, b = !1, g === -1 && (g = l); p < l && (h = r.charAt(p), !(h !== tn && h !== La));) p++; + if (r.charAt(p) === Ra ? (p++, b = !0, r.charAt(p) === tn && p++) : p = A, E = r.slice(p, g), !b && !$p(E)) { + p = A; + break; + } + if (!b && (F = r.slice(p), Hp(a, u, n, [ + e, + F, + !0 + ]))) break; + v = A === p ? E : r.slice(A, g), D.push(p - A), c.push(v), f.push(E), p = g + 1; + } + for (p = -1, l = D.length, m = e(c.join(rn)); ++p < l;) i[s] = (i[s] || 0) + D[p], s++; + return d = n.enterBlock(), f = n.tokenizeBlock(f.join(rn), o), d(), m({ + type: "blockquote", + children: f + }); + } + } + }); + za = x((Pv, Ga) => { + "use strict"; + Ga.exports = Jp; + var Ya = ` +`, gr = " ", Er = " ", Cr = "#", Xp = 6; + function Jp(e, r, t) { + for (var n = this, i = n.options.pedantic, u = r.length + 1, a = -1, o = e.now(), s = "", l = "", c, f, D; ++a < u;) { + if (c = r.charAt(a), c !== Er && c !== gr) { + a--; + break; + } + s += c; + } + for (D = 0; ++a <= u;) { + if (c = r.charAt(a), c !== Cr) { + a--; + break; + } + s += c, D++; + } + if (!(D > Xp) && !(!D || !i && r.charAt(a + 1) === Cr)) { + for (u = r.length + 1, f = ""; ++a < u;) { + if (c = r.charAt(a), c !== Er && c !== gr) { + a--; + break; + } + f += c; + } + if (!(!i && f.length === 0 && c && c !== Ya)) { + if (t) return !0; + for (s += f, f = "", l = ""; ++a < u && (c = r.charAt(a), !(!c || c === Ya));) { + if (c !== Er && c !== gr && c !== Cr) { + l += f + c, f = ""; + continue; + } + for (; c === Er || c === gr;) f += c, c = r.charAt(++a); + if (!i && l && !f && c === Cr) { + l += c; + continue; + } + for (; c === Cr;) f += c, c = r.charAt(++a); + for (; c === Er || c === gr;) f += c, c = r.charAt(++a); + a--; + } + return o.column += s.length, o.offset += s.length, s += l + f, e(s)({ + type: "heading", + depth: D, + children: n.tokenizeInline(l, o) + }); + } + } + } + }); + ja = x((Iv, Va) => { + "use strict"; + Va.exports = ih; + var Qp = " ", Zp = ` +`, Wa = " ", eh = "*", rh = "-", th = "_", nh = 3; + function ih(e, r, t) { + for (var n = -1, i = r.length + 1, u = "", a, o, s, l; ++n < i && (a = r.charAt(n), !(a !== Qp && a !== Wa));) u += a; + if (!(a !== eh && a !== rh && a !== th)) for (o = a, u += a, s = 1, l = ""; ++n < i;) if (a = r.charAt(n), a === o) s++, u += l + o, l = ""; + else if (a === Wa) l += a; + else return s >= nh && (!a || a === Zp) ? (u += l, t ? !0 : e(u)({ type: "thematicBreak" })) : void 0; + } + }); + nn = x((Sv, Ha) => { + "use strict"; + Ha.exports = sh; + var $a = " ", uh = " ", ah = 1, oh = 4; + function sh(e) { + for (var r = 0, t = 0, n = e.charAt(r), i = {}, u, a = 0; n === $a || n === uh;) { + for (u = n === $a ? oh : ah, t += u, u > 1 && (t = Math.floor(t / u) * u); a < t;) i[++a] = r; + n = e.charAt(++r); + } + return { + indent: t, + stops: i + }; + } + }); + Ja = x((Lv, Xa) => { + "use strict"; + var ch = Le(), lh = Zr(), fh = nn(); + Xa.exports = hh; + var Ka = ` +`, Dh = " ", ph = "!"; + function hh(e, r) { + var t = e.split(Ka), n = t.length + 1, i = Infinity, u = [], a, o, s; + for (t.unshift(lh(Dh, r) + ph); n--;) if (o = fh(t[n]), u[n] = o.stops, ch(t[n]).length !== 0) if (o.indent) o.indent > 0 && o.indent < i && (i = o.indent); + else { + i = Infinity; + break; + } + if (i !== Infinity) for (n = t.length; n--;) { + for (s = u[n], a = i; a && !(a in s);) a--; + t[n] = t[n].slice(s[a] + 1); + } + return t.shift(), t.join(Ka); + } + }); + no = x((Rv, to) => { + "use strict"; + var dh = Le(), mh = Zr(), Qa = Se(), Fh = nn(), gh = Ja(), Eh = rt(); + to.exports = kh; + var un = "*", Ch = "_", Za = "+", an = "-", eo = ".", Ee = " ", oe = ` +`, tt = " ", ro = ")", vh = "x", ke = 4, Ah = /\n\n(?!\s*$)/, bh = /^\[([ X\tx])][ \t]/, xh = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/, yh = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/, wh = /^( {1,4}|\t)?/gm; + function kh(e, r, t) { + for (var n = this, i = n.options.commonmark, u = n.options.pedantic, a = n.blockTokenizers, o = n.interruptList, s = 0, l = r.length, c = null, f, D, m, p, h, F, g, E, v, A, b, d, y, w, C, k, T, B, _, S = !1, P, N, O, I; s < l && (p = r.charAt(s), !(p !== tt && p !== Ee));) s++; + if (p = r.charAt(s), p === un || p === Za || p === an) h = p, m = !1; + else { + for (m = !0, D = ""; s < l && (p = r.charAt(s), !!Qa(p));) D += p, s++; + if (p = r.charAt(s), !D || !(p === eo || i && p === ro) || t && D !== "1") return; + c = parseInt(D, 10), h = p; + } + if (p = r.charAt(++s), !(p !== Ee && p !== tt && (u || p !== oe && p !== ""))) { + if (t) return !0; + for (s = 0, w = [], C = [], k = []; s < l;) { + for (F = r.indexOf(oe, s), g = s, E = !1, I = !1, F === -1 && (F = l), f = 0; s < l;) { + if (p = r.charAt(s), p === tt) f += ke - f % ke; + else if (p === Ee) f++; + else break; + s++; + } + if (T && f >= T.indent && (I = !0), p = r.charAt(s), v = null, !I) { + if (p === un || p === Za || p === an) v = p, s++, f++; + else { + for (D = ""; s < l && (p = r.charAt(s), !!Qa(p));) D += p, s++; + p = r.charAt(s), s++, D && (p === eo || i && p === ro) && (v = p, f += D.length + 1); + } + if (v) if (p = r.charAt(s), p === tt) f += ke - f % ke, s++; + else if (p === Ee) { + for (O = s + ke; s < O && r.charAt(s) === Ee;) s++, f++; + s === O && r.charAt(s) === Ee && (s -= ke - 1, f -= ke - 1); + } else p !== oe && p !== "" && (v = null); + } + if (v) { + if (!u && h !== v) break; + E = !0; + } else !i && !I && r.charAt(g) === Ee ? I = !0 : i && T && (I = f >= T.indent || f > ke), E = !1, s = g; + if (b = r.slice(g, F), A = g === s ? b : r.slice(s, F), (v === un || v === Ch || v === an) && a.thematicBreak.call(n, e, b, !0)) break; + if (d = y, y = !E && !dh(A).length, I && T) T.value = T.value.concat(k, b), C = C.concat(k, b), k = []; + else if (E) k.length !== 0 && (S = !0, T.value.push(""), T.trail = k.concat()), T = { + value: [b], + indent: f, + trail: [] + }, w.push(T), C = C.concat(k, b), k = []; + else if (y) { + if (d && !i) break; + k.push(b); + } else { + if (d || Eh(o, a, n, [ + e, + b, + !0 + ])) break; + T.value = T.value.concat(k, b), C = C.concat(k, b), k = []; + } + s = F + 1; + } + for (P = e(C.join(oe)).reset({ + type: "list", + ordered: m, + start: c, + spread: S, + children: [] + }), B = n.enterList(), _ = n.enterBlock(), s = -1, l = w.length; ++s < l;) T = w[s].value.join(oe), N = e.now(), e(T)(Th(n, T, N), P), T = w[s].trail.join(oe), s !== l - 1 && (T += oe), e(T); + return B(), _(), P; + } + } + function Th(e, r, t) { + var n = e.offset, i = e.options.pedantic ? Bh : _h, u = null, a, o; + return r = i.apply(null, arguments), e.options.gfm && (a = r.match(bh), a && (o = a[0].length, u = a[1].toLowerCase() === vh, n[t.line] += o, r = r.slice(o))), { + type: "listItem", + spread: Ah.test(r), + checked: u, + children: e.tokenizeBlock(r, t) + }; + } + function Bh(e, r, t) { + var n = e.offset, i = t.line; + return r = r.replace(yh, u), i = t.line, r.replace(wh, u); + function u(a) { + return n[i] = (n[i] || 0) + a.length, i++, ""; + } + } + function _h(e, r, t) { + var n = e.offset, i = t.line, u, a, o, s, l, c, f; + for (r = r.replace(xh, D), s = r.split(oe), l = gh(r, Fh(u).indent).split(oe), l[0] = o, n[i] = (n[i] || 0) + a.length, i++, c = 0, f = s.length; ++c < f;) n[i] = (n[i] || 0) + s[c].length - l[c].length, i++; + return l.join(oe); + function D(m, p, h, F, g) { + return a = p + h + F, o = g, Number(h) < 10 && a.length % 2 === 1 && (h = Ee + h), u = p + mh(Ee, h.length) + F, u + o; + } + } + }); + oo = x((Mv, ao) => { + "use strict"; + ao.exports = Sh; + var on = ` +`, Oh = " ", io = " ", uo = "=", qh = "-", Nh = 3, Ph = 1, Ih = 2; + function Sh(e, r, t) { + for (var n = this, i = e.now(), u = r.length, a = -1, o = "", s, l, c, f, D; ++a < u;) { + if (c = r.charAt(a), c !== io || a >= Nh) { + a--; + break; + } + o += c; + } + for (s = "", l = ""; ++a < u;) { + if (c = r.charAt(a), c === on) { + a--; + break; + } + c === io || c === Oh ? l += c : (s += l + c, l = ""); + } + if (i.column += o.length, i.offset += o.length, o += s + l, c = r.charAt(++a), f = r.charAt(++a), !(c !== on || f !== uo && f !== qh)) { + for (o += c, l = f, D = f === uo ? Ph : Ih; ++a < u;) { + if (c = r.charAt(a), c !== f) { + if (c !== on) return; + a--; + break; + } + l += c; + } + return t ? !0 : e(o + l)({ + type: "heading", + depth: D, + children: n.tokenizeInline(s, i) + }); + } + } + }); + cn = x((sn) => { + "use strict"; + var so = "<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>", co = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", zh = "|", Wh = "<[?].*?[?]>", Vh = "]*>", jh = ""; + sn.openCloseTag = new RegExp("^(?:" + so + "|" + co + ")"); + sn.tag = new RegExp("^(?:" + so + "|" + co + "|" + zh + "|" + Wh + "|" + Vh + "|" + jh + ")"); + }); + po = x((Yv, Do) => { + "use strict"; + var $h = cn().openCloseTag; + Do.exports = sd; + var Hh = " ", Kh = " ", lo = ` +`, Xh = "<", Jh = /^<(script|pre|style)(?=(\s|>|$))/i, Qh = /<\/(script|pre|style)>/i, Zh = /^/, rd = /^<\?/, td = /\?>/, nd = /^/, ud = /^/, fo = /^$/, od = new RegExp($h.source + "\\s*$"); + function sd(e, r, t) { + for (var i = this.options.blocks.join("|"), u = new RegExp("^|$))", "i"), a = r.length, o = 0, s, l, c, f, D, m, p, h = [ + [ + Jh, + Qh, + !0 + ], + [ + Zh, + ed, + !0 + ], + [ + rd, + td, + !0 + ], + [ + nd, + id, + !0 + ], + [ + ud, + ad, + !0 + ], + [ + u, + fo, + !0 + ], + [ + od, + fo, + !1 + ] + ]; o < a && (f = r.charAt(o), !(f !== Hh && f !== Kh));) o++; + if (r.charAt(o) === Xh) { + for (s = r.indexOf(lo, o + 1), s = s === -1 ? a : s, l = r.slice(o, s), c = -1, D = h.length; ++c < D;) if (h[c][0].test(l)) { + m = h[c]; + break; + } + if (m) { + if (t) return m[2]; + if (o = s, !m[1].test(l)) for (; o < a;) { + if (s = r.indexOf(lo, o + 1), s = s === -1 ? a : s, l = r.slice(o + 1, s), m[1].test(l)) { + l && (o = s); + break; + } + o = s; + } + return p = r.slice(0, o), e(p)({ + type: "html", + value: p + }); + } + } + } + }); + se = x((Gv, ho) => { + "use strict"; + ho.exports = fd; + var cd = String.fromCharCode, ld = /\s/; + function fd(e) { + return ld.test(typeof e == "number" ? cd(e) : e.charAt(0)); + } + }); + ln = x((zv, mo) => { + "use strict"; + var Dd = Tr(); + mo.exports = pd; + function pd(e) { + return Dd(e).toLowerCase(); + } + }); + bo = x((Wv, Ao) => { + "use strict"; + var hd = se(), dd = ln(); + Ao.exports = Ed; + var Fo = "\"", go = "'", md = "\\", Qe = ` +`, nt = " ", it = " ", Dn = "[", vr = "]", Fd = "(", gd = ")", Eo = ":", Co = "<", vo = ">"; + function Ed(e, r, t) { + for (var n = this, i = n.options.commonmark, u = 0, a = r.length, o = "", s, l, c, f, D, m, p, h; u < a && (f = r.charAt(u), !(f !== it && f !== nt));) o += f, u++; + if (f = r.charAt(u), f === Dn) { + for (u++, o += f, c = ""; u < a && (f = r.charAt(u), f !== vr);) f === md && (c += f, u++, f = r.charAt(u)), c += f, u++; + if (!(!c || r.charAt(u) !== vr || r.charAt(u + 1) !== Eo)) { + for (m = c, o += c + vr + Eo, u = o.length, c = ""; u < a && (f = r.charAt(u), !(f !== nt && f !== it && f !== Qe));) o += f, u++; + if (f = r.charAt(u), c = "", s = o, f === Co) { + for (u++; u < a && (f = r.charAt(u), !!fn(f));) c += f, u++; + if (f = r.charAt(u), f === fn.delimiter) o += Co + c + f, u++; + else { + if (i) return; + u -= c.length + 1, c = ""; + } + } + if (!c) { + for (; u < a && (f = r.charAt(u), !!Cd(f));) c += f, u++; + o += c; + } + if (c) { + for (p = c, c = ""; u < a && (f = r.charAt(u), !(f !== nt && f !== it && f !== Qe));) c += f, u++; + if (f = r.charAt(u), D = null, f === Fo ? D = Fo : f === go ? D = go : f === Fd && (D = gd), !D) c = "", u = o.length; + else if (c) { + for (o += c + f, u = o.length, c = ""; u < a && (f = r.charAt(u), f !== D);) { + if (f === Qe) { + if (u++, f = r.charAt(u), f === Qe || f === D) return; + c += Qe; + } + c += f, u++; + } + if (f = r.charAt(u), f !== D) return; + l = o, o += c + f, u++, h = c, c = ""; + } else return; + for (; u < a && (f = r.charAt(u), !(f !== nt && f !== it));) o += f, u++; + if (f = r.charAt(u), !f || f === Qe) return t ? !0 : (s = e(s).test().end, p = n.decode.raw(n.unescape(p), s, { nonTerminated: !1 }), h && (l = e(l).test().end, h = n.decode.raw(n.unescape(h), l)), e(o)({ + type: "definition", + identifier: dd(m), + label: m, + title: h || null, + url: p + })); + } + } + } + } + function fn(e) { + return e !== vo && e !== Dn && e !== vr; + } + fn.delimiter = vo; + function Cd(e) { + return e !== Dn && e !== vr && !hd(e); + } + }); + wo = x((Vv, yo) => { + "use strict"; + var vd = se(); + yo.exports = Od; + var Ad = " ", ut = ` +`, bd = " ", xd = "-", yd = ":", wd = "\\", pn = "|", kd = 1, Td = 2, xo = "left", Bd = "center", _d = "right"; + function Od(e, r, t) { + var n = this, i, u, a, o, s, l, c, f, D, m, p, h, F, g, E, v, A, b, d, y, w, C; + if (n.options.gfm) { + for (i = 0, v = 0, l = r.length + 1, c = []; i < l;) { + if (y = r.indexOf(ut, i), w = r.indexOf(pn, i + 1), y === -1 && (y = r.length), w === -1 || w > y) { + if (v < Td) return; + break; + } + c.push(r.slice(i, y)), v++, i = y + 1; + } + for (o = c.join(ut), u = c.splice(1, 1)[0] || [], i = 0, l = u.length, v--, a = !1, p = []; i < l;) { + if (D = u.charAt(i), D === pn) { + if (m = null, a === !1) { + if (C === !1) return; + } else p.push(a), a = !1; + C = !1; + } else if (D === xd) m = !0, a = a || null; + else if (D === yd) a === xo ? a = Bd : m && a === null ? a = _d : a = xo; + else if (!vd(D)) return; + i++; + } + if (a !== !1 && p.push(a), !(p.length < kd)) { + if (t) return !0; + for (E = -1, b = [], d = e(o).reset({ + type: "table", + align: p, + children: b + }); ++E < v;) { + for (A = c[E], s = { + type: "tableRow", + children: [] + }, E && e(ut), e(A).reset(s, d), l = A.length + 1, i = 0, f = "", h = "", F = !0; i < l;) { + if (D = A.charAt(i), D === Ad || D === bd) { + h ? f += D : e(D), i++; + continue; + } + D === "" || D === pn ? F ? e(D) : ((h || D) && !F && (o = h, f.length > 1 && (D ? (o += f.slice(0, -1), f = f.charAt(f.length - 1)) : (o += f, f = "")), g = e.now(), e(o)({ + type: "tableCell", + children: n.tokenizeInline(h, g) + }, s)), e(f + D), f = "", h = "") : (f && (h += f, f = ""), h += D, D === wd && i !== l - 2 && (h += A.charAt(i + 1), i++)), F = !1, i++; + } + E || e(ut + u); + } + return d; + } + } + } + }); + Bo = x((jv, To) => { + "use strict"; + var qd = Le(), Nd = Qt(), Pd = rt(); + To.exports = Ld; + var Id = " ", Ar = ` +`, Sd = " ", ko = 4; + function Ld(e, r, t) { + for (var n = this, u = n.options.commonmark, a = n.blockTokenizers, o = n.interruptParagraph, s = r.indexOf(Ar), l = r.length, c, f, D, m, p; s < l;) { + if (s === -1) { + s = l; + break; + } + if (r.charAt(s + 1) === Ar) break; + if (u) { + for (m = 0, c = s + 1; c < l;) { + if (D = r.charAt(c), D === Id) { + m = ko; + break; + } else if (D === Sd) m++; + else break; + c++; + } + if (m >= ko && D !== Ar) { + s = r.indexOf(Ar, s + 1); + continue; + } + } + if (f = r.slice(s + 1), Pd(o, a, n, [ + e, + f, + !0 + ])) break; + if (c = s, s = r.indexOf(Ar, s + 1), s !== -1 && qd(r.slice(c, s)) === "") { + s = c; + break; + } + } + return f = r.slice(0, s), t ? !0 : (p = e.now(), f = Nd(f), e(f)({ + type: "paragraph", + children: n.tokenizeInline(f, p) + })); + } + }); + Oo = x(($v, _o) => { + "use strict"; + _o.exports = Rd; + function Rd(e, r) { + return e.indexOf("\\", r); + } + }); + Io = x((Hv, Po) => { + "use strict"; + var Md = Oo(); + Po.exports = No; + No.locator = Md; + var Ud = ` +`, qo = "\\"; + function No(e, r, t) { + var n = this, i, u; + if (r.charAt(0) === qo && (i = r.charAt(1), n.escape.indexOf(i) !== -1)) return t ? !0 : (i === Ud ? u = { type: "break" } : u = { + type: "text", + value: i + }, e(qo + i)(u)); + } + }); + hn = x((Kv, So) => { + "use strict"; + So.exports = Yd; + function Yd(e, r) { + return e.indexOf("<", r); + } + }); + Yo = x((Xv, Uo) => { + "use strict"; + var Lo = se(), Gd = mr(), zd = hn(); + Uo.exports = gn; + gn.locator = zd; + gn.notInLink = !0; + var Ro = "<", dn = ">", Mo = "@", mn = "/", Fn = "mailto:", at = Fn.length; + function gn(e, r, t) { + var n = this, i = "", u = r.length, a = 0, o = "", s = !1, l = "", c, f, D, m, p; + if (r.charAt(0) === Ro) { + for (a++, i = Ro; a < u && (c = r.charAt(a), !(Lo(c) || c === dn || c === Mo || c === ":" && r.charAt(a + 1) === mn));) o += c, a++; + if (o) { + if (l += o, o = "", c = r.charAt(a), l += c, a++, c === Mo) s = !0; + else { + if (c !== ":" || r.charAt(a + 1) !== mn) return; + l += mn, a++; + } + for (; a < u && (c = r.charAt(a), !(Lo(c) || c === dn));) o += c, a++; + if (c = r.charAt(a), !(!o || c !== dn)) return t ? !0 : (l += o, D = l, i += l + c, f = e.now(), f.column++, f.offset++, s && (l.slice(0, at).toLowerCase() === Fn ? (D = D.slice(at), f.column += at, f.offset += at) : l = Fn + l), m = n.inlineTokenizers, n.inlineTokenizers = { text: m.text }, p = n.enterLink(), D = n.tokenizeInline(D, f), n.inlineTokenizers = m, p(), e(i)({ + type: "link", + title: null, + url: Gd(l, { nonTerminated: !1 }), + children: D + })); + } + } + } + }); + zo = x((Jv, Go) => { + "use strict"; + Go.exports = Wd; + function Wd(e, r) { + var t = String(e), n = 0, i; + if (typeof r != "string") throw new Error("Expected character"); + for (i = t.indexOf(r); i !== -1;) n++, i = t.indexOf(r, i + r.length); + return n; + } + }); + jo = x((Qv, Vo) => { + "use strict"; + Vo.exports = Vd; + var Wo = [ + "www.", + "http://", + "https://" + ]; + function Vd(e, r) { + var t = -1, n, i, u; + if (!this.options.gfm) return t; + for (i = Wo.length, n = -1; ++n < i;) u = e.indexOf(Wo[n], r), u !== -1 && (t === -1 || u < t) && (t = u); + return t; + } + }); + Jo = x((Zv, Xo) => { + "use strict"; + var $o = zo(), jd = mr(), $d = Se(), En = $e(), Hd = se(), Kd = jo(); + Xo.exports = vn; + vn.locator = Kd; + vn.notInLink = !0; + var Xd = 33, Jd = 38, Qd = 41, Zd = 42, e0 = 44, r0 = 45, Cn = 46, t0 = 58, n0 = 59, i0 = 63, u0 = 60, Ho = 95, a0 = 126, o0 = "(", Ko = ")"; + function vn(e, r, t) { + var n = this, i = n.options.gfm, u = n.inlineTokenizers, a = r.length, o = -1, s = !1, l, c, f, D, m, p, h, F, g, E, v, A, b, d; + if (i) { + if (r.slice(0, 4) === "www.") s = !0, D = 4; + else if (r.slice(0, 7).toLowerCase() === "http://") D = 7; + else if (r.slice(0, 8).toLowerCase() === "https://") D = 8; + else return; + for (o = D - 1, f = D, l = []; D < a;) { + if (h = r.charCodeAt(D), h === Cn) { + if (o === D - 1) break; + l.push(D), o = D, D++; + continue; + } + if ($d(h) || En(h) || h === r0 || h === Ho) { + D++; + continue; + } + break; + } + if (h === Cn && (l.pop(), D--), l[0] !== void 0 && (c = l.length < 2 ? f : l[l.length - 2] + 1, r.slice(c, D).indexOf("_") === -1)) { + if (t) return !0; + for (F = D, m = D; D < a && (h = r.charCodeAt(D), !(Hd(h) || h === u0));) D++, h === Xd || h === Zd || h === e0 || h === Cn || h === t0 || h === i0 || h === Ho || h === a0 || (F = D); + if (D = F, r.charCodeAt(D - 1) === Qd) for (p = r.slice(m, D), g = $o(p, o0), E = $o(p, Ko); E > g;) D = m + p.lastIndexOf(Ko), p = r.slice(m, D), E--; + if (r.charCodeAt(D - 1) === n0 && (D--, En(r.charCodeAt(D - 1)))) { + for (F = D - 2; En(r.charCodeAt(F));) F--; + r.charCodeAt(F) === Jd && (D = F); + } + return v = r.slice(0, D), b = jd(v, { nonTerminated: !1 }), s && (b = "http://" + b), d = n.enterLink(), n.inlineTokenizers = { text: u.text }, A = n.tokenizeInline(v, e.now()), n.inlineTokenizers = u, d(), e(v)({ + type: "link", + title: null, + url: b, + children: A + }); + } + } + } + }); + rs = x((e2, es) => { + "use strict"; + var s0 = Se(), c0 = $e(), l0 = 43, f0 = 45, D0 = 46, p0 = 95; + es.exports = Zo; + function Zo(e, r) { + var t = this, n, i; + if (!this.options.gfm || (n = e.indexOf("@", r), n === -1)) return -1; + if (i = n, i === r || !Qo(e.charCodeAt(i - 1))) return Zo.call(t, e, n + 1); + for (; i > r && Qo(e.charCodeAt(i - 1));) i--; + return i; + } + function Qo(e) { + return s0(e) || c0(e) || e === l0 || e === f0 || e === D0 || e === p0; + } + }); + us = x((r2, is) => { + "use strict"; + var h0 = mr(), ts = Se(), ns = $e(), d0 = rs(); + is.exports = xn; + xn.locator = d0; + xn.notInLink = !0; + var m0 = 43, An = 45, ot = 46, F0 = 64, bn = 95; + function xn(e, r, t) { + var n = this, i = n.options.gfm, u = n.inlineTokenizers, a = 0, o = r.length, s = -1, l, c, f, D; + if (i) { + for (l = r.charCodeAt(a); ts(l) || ns(l) || l === m0 || l === An || l === ot || l === bn;) l = r.charCodeAt(++a); + if (a !== 0 && l === F0) { + for (a++; a < o;) { + if (l = r.charCodeAt(a), ts(l) || ns(l) || l === An || l === ot || l === bn) { + a++, s === -1 && l === ot && (s = a); + continue; + } + break; + } + if (!(s === -1 || s === a || l === An || l === bn)) return l === ot && a--, c = r.slice(0, a), t ? !0 : (D = n.enterLink(), n.inlineTokenizers = { text: u.text }, f = n.tokenizeInline(c, e.now()), n.inlineTokenizers = u, D(), e(c)({ + type: "link", + title: null, + url: "mailto:" + h0(c, { nonTerminated: !1 }), + children: f + })); + } + } + } + }); + ss = x((t2, os) => { + "use strict"; + var g0 = $e(), E0 = hn(), C0 = cn().tag; + os.exports = as; + as.locator = E0; + var v0 = "<", A0 = "?", b0 = "!", x0 = "/", y0 = /^/i; + function as(e, r, t) { + var n = this, i = r.length, u, a; + if (!(r.charAt(0) !== v0 || i < 3) && (u = r.charAt(1), !(!g0(u) && u !== A0 && u !== b0 && u !== x0) && (a = r.match(C0), !!a))) return t ? !0 : (a = a[0], !n.inLink && y0.test(a) ? n.inLink = !0 : n.inLink && w0.test(a) && (n.inLink = !1), e(a)({ + type: "html", + value: a + })); + } + }); + yn = x((n2, cs) => { + "use strict"; + cs.exports = k0; + function k0(e, r) { + var t = e.indexOf("[", r), n = e.indexOf("![", r); + return n === -1 || t < n ? t : n; + } + }); + ms = x((i2, ds) => { + "use strict"; + var br = se(), T0 = yn(); + ds.exports = hs; + hs.locator = T0; + var B0 = ` +`, _0 = "!", ls = "\"", fs = "'", Ze = "(", xr = ")", wn = "<", kn = ">", Ds = "[", yr = "\\", O0 = "]", ps = "`"; + function hs(e, r, t) { + var n = this, i = "", u = 0, a = r.charAt(0), o = n.options.pedantic, s = n.options.commonmark, l = n.options.gfm, c, f, D, m, p, h, F, g, E, v, A, b, d, y, w, C, k, T; + if (a === _0 && (g = !0, i = a, a = r.charAt(++u)), a === Ds && !(!g && n.inLink)) { + for (i += a, y = "", u++, A = r.length, C = e.now(), d = 0, C.column += u, C.offset += u; u < A;) { + if (a = r.charAt(u), h = a, a === ps) { + for (f = 1; r.charAt(u + 1) === ps;) h += a, u++, f++; + D ? f >= D && (D = 0) : D = f; + } else if (a === yr) u++, h += r.charAt(u); + else if ((!D || l) && a === Ds) d++; + else if ((!D || l) && a === O0) if (d) d--; + else { + if (r.charAt(u + 1) !== Ze) return; + h += Ze, c = !0, u++; + break; + } + y += h, h = "", u++; + } + if (c) { + for (E = y, i += y + h, u++; u < A && (a = r.charAt(u), !!br(a));) i += a, u++; + if (a = r.charAt(u), y = "", m = i, a === wn) { + for (u++, m += wn; u < A && (a = r.charAt(u), a !== kn);) { + if (s && a === B0) return; + y += a, u++; + } + if (r.charAt(u) !== kn) return; + i += wn + y + kn, w = y, u++; + } else { + for (a = null, h = ""; u < A && (a = r.charAt(u), !(h && (a === ls || a === fs || s && a === Ze)));) { + if (br(a)) { + if (!o) break; + h += a; + } else { + if (a === Ze) d++; + else if (a === xr) { + if (d === 0) break; + d--; + } + y += h, h = "", a === yr && (y += yr, a = r.charAt(++u)), y += a; + } + u++; + } + i += y, w = y, u = i.length; + } + for (y = ""; u < A && (a = r.charAt(u), !!br(a));) y += a, u++; + if (a = r.charAt(u), i += y, y && (a === ls || a === fs || s && a === Ze)) if (u++, i += a, y = "", v = a === Ze ? xr : a, p = i, s) { + for (; u < A && (a = r.charAt(u), a !== v);) a === yr && (y += yr, a = r.charAt(++u)), u++, y += a; + if (a = r.charAt(u), a !== v) return; + for (b = y, i += y + a, u++; u < A && (a = r.charAt(u), !!br(a));) i += a, u++; + } else for (h = ""; u < A;) { + if (a = r.charAt(u), a === v) F && (y += v + h, h = ""), F = !0; + else if (!F) y += a; + else if (a === xr) { + i += y + v + h, b = y; + break; + } else br(a) ? h += a : (y += v + h + a, h = "", F = !1); + u++; + } + if (r.charAt(u) === xr) return t ? !0 : (i += xr, w = n.decode.raw(n.unescape(w), e(m).test().end, { nonTerminated: !1 }), b && (p = e(p).test().end, b = n.decode.raw(n.unescape(b), p)), T = { + type: g ? "image" : "link", + title: b || null, + url: w + }, g ? T.alt = n.decode.raw(n.unescape(E), C) || null : (k = n.enterLink(), T.children = n.tokenizeInline(E, C), k()), e(i)(T)); + } + } + } + }); + Es = x((u2, gs) => { + "use strict"; + var q0 = se(), N0 = yn(), P0 = ln(); + gs.exports = Fs; + Fs.locator = N0; + var Tn = "link", I0 = "image", S0 = "shortcut", L0 = "collapsed", Bn = "full", R0 = "!", st = "[", ct = "\\", lt = "]"; + function Fs(e, r, t) { + var n = this, i = n.options.commonmark, u = r.charAt(0), a = 0, o = r.length, s = "", l = "", c = Tn, f = S0, D, m, p, h, F, g, E, v; + if (u === R0 && (c = I0, l = u, u = r.charAt(++a)), u === st) { + for (a++, l += u, g = "", v = 0; a < o;) { + if (u = r.charAt(a), u === st) E = !0, v++; + else if (u === lt) { + if (!v) break; + v--; + } + u === ct && (g += ct, u = r.charAt(++a)), g += u, a++; + } + if (s = g, D = g, u = r.charAt(a), u === lt) { + if (a++, s += u, g = "", !i) for (; a < o && (u = r.charAt(a), !!q0(u));) g += u, a++; + if (u = r.charAt(a), u === st) { + for (m = "", g += u, a++; a < o && (u = r.charAt(a), !(u === st || u === lt));) u === ct && (m += ct, u = r.charAt(++a)), m += u, a++; + u = r.charAt(a), u === lt ? (f = m ? Bn : L0, g += m + u, a++) : m = "", s += g, g = ""; + } else { + if (!D) return; + m = D; + } + if (!(f !== Bn && E)) return s = l + s, c === Tn && n.inLink ? null : t ? !0 : (p = e.now(), p.column += l.length, p.offset += l.length, m = f === Bn ? m : D, h = { + type: c + "Reference", + identifier: P0(m), + label: m, + referenceType: f + }, c === Tn ? (F = n.enterLink(), h.children = n.tokenizeInline(D, p), F()) : h.alt = n.decode.raw(n.unescape(D), p) || null, e(s)(h)); + } + } + } + }); + vs = x((a2, Cs) => { + "use strict"; + Cs.exports = M0; + function M0(e, r) { + var t = e.indexOf("**", r), n = e.indexOf("__", r); + return n === -1 ? t : t === -1 || n < t ? n : t; + } + }); + ys = x((o2, xs) => { + "use strict"; + var U0 = Le(), As = se(), Y0 = vs(); + xs.exports = bs; + bs.locator = Y0; + var G0 = "\\", z0 = "*", W0 = "_"; + function bs(e, r, t) { + var n = this, i = 0, u = r.charAt(i), a, o, s, l, c, f, D; + if (!(u !== z0 && u !== W0 || r.charAt(++i) !== u) && (o = n.options.pedantic, s = u, c = s + s, f = r.length, i++, l = "", u = "", !(o && As(r.charAt(i))))) for (; i < f;) { + if (D = u, u = r.charAt(i), u === s && r.charAt(i + 1) === s && (!o || !As(D)) && (u = r.charAt(i + 2), u !== s)) return U0(l) ? t ? !0 : (a = e.now(), a.column += 2, a.offset += 2, e(c + l + c)({ + type: "strong", + children: n.tokenizeInline(l, a) + })) : void 0; + !o && u === G0 && (l += u, u = r.charAt(++i)), l += u, i++; + } + } + }); + ks = x((s2, ws) => { + "use strict"; + ws.exports = $0; + var V0 = String.fromCharCode, j0 = /\w/; + function $0(e) { + return j0.test(typeof e == "number" ? V0(e) : e.charAt(0)); + } + }); + Bs = x((c2, Ts) => { + "use strict"; + Ts.exports = H0; + function H0(e, r) { + var t = e.indexOf("*", r), n = e.indexOf("_", r); + return n === -1 ? t : t === -1 || n < t ? n : t; + } + }); + Ps = x((l2, Ns) => { + "use strict"; + var K0 = Le(), X0 = ks(), _s = se(), J0 = Bs(); + Ns.exports = qs; + qs.locator = J0; + var Q0 = "*", Os = "_", Z0 = "\\"; + function qs(e, r, t) { + var n = this, i = 0, u = r.charAt(i), a, o, s, l, c, f, D; + if (!(u !== Q0 && u !== Os) && (o = n.options.pedantic, c = u, s = u, f = r.length, i++, l = "", u = "", !(o && _s(r.charAt(i))))) for (; i < f;) { + if (D = u, u = r.charAt(i), u === s && (!o || !_s(D))) { + if (u = r.charAt(++i), u !== s) { + if (!K0(l) || D === s) return; + if (!o && s === Os && X0(u)) { + l += s; + continue; + } + return t ? !0 : (a = e.now(), a.column++, a.offset++, e(c + l + s)({ + type: "emphasis", + children: n.tokenizeInline(l, a) + })); + } + l += s; + } + !o && u === Z0 && (l += u, u = r.charAt(++i)), l += u, i++; + } + } + }); + Ss = x((f2, Is) => { + "use strict"; + Is.exports = em; + function em(e, r) { + return e.indexOf("~~", r); + } + }); + Ys = x((D2, Us) => { + "use strict"; + var Ls = se(), rm = Ss(); + Us.exports = Ms; + Ms.locator = rm; + var ft = "~", Rs = "~~"; + function Ms(e, r, t) { + var n = this, i = "", u = "", a = "", o = "", s, l, c; + if (!(!n.options.gfm || r.charAt(0) !== ft || r.charAt(1) !== ft || Ls(r.charAt(2)))) for (s = 1, l = r.length, c = e.now(), c.column += 2, c.offset += 2; ++s < l;) { + if (i = r.charAt(s), i === ft && u === ft && (!a || !Ls(a))) return t ? !0 : e(Rs + o + Rs)({ + type: "delete", + children: n.tokenizeInline(o, c) + }); + o += u, a = u, u = i; + } + } + }); + zs = x((p2, Gs) => { + "use strict"; + Gs.exports = tm; + function tm(e, r) { + return e.indexOf("`", r); + } + }); + js = x((h2, Vs) => { + "use strict"; + var nm = zs(); + Vs.exports = Ws; + Ws.locator = nm; + var _n = 10, On = 32, qn = 96; + function Ws(e, r, t) { + for (var n = r.length, i = 0, u, a, o, s, l, c; i < n && r.charCodeAt(i) === qn;) i++; + if (!(i === 0 || i === n)) { + for (u = i, l = r.charCodeAt(i); i < n;) { + if (s = l, l = r.charCodeAt(i + 1), s === qn) { + if (a === void 0 && (a = i), o = i + 1, l !== qn && o - a === u) { + c = !0; + break; + } + } else a !== void 0 && (a = void 0, o = void 0); + i++; + } + if (c) { + if (t) return !0; + if (i = u, n = a, s = r.charCodeAt(i), l = r.charCodeAt(n - 1), c = !1, n - i > 2 && (s === On || s === _n) && (l === On || l === _n)) { + for (i++, n--; i < n;) { + if (s = r.charCodeAt(i), s !== On && s !== _n) { + c = !0; + break; + } + i++; + } + c === !0 && (u++, a--); + } + return e(r.slice(0, o))({ + type: "inlineCode", + value: r.slice(u, a) + }); + } + } + } + }); + Hs = x((d2, $s) => { + "use strict"; + $s.exports = im; + function im(e, r) { + for (var t = e.indexOf(` +`, r); t > r && e.charAt(t - 1) === " ";) t--; + return t; + } + }); + Js = x((m2, Xs) => { + "use strict"; + var um = Hs(); + Xs.exports = Ks; + Ks.locator = um; + var am = " ", om = ` +`, sm = 2; + function Ks(e, r, t) { + for (var n = r.length, i = -1, u = "", a; ++i < n;) { + if (a = r.charAt(i), a === om) return i < sm ? void 0 : t ? !0 : (u += a, e(u)({ type: "break" })); + if (a !== am) return; + u += a; + } + } + }); + Zs = x((F2, Qs) => { + "use strict"; + Qs.exports = cm; + function cm(e, r, t) { + var n = this, i, u, a, o, s, l, c, f, D, m; + if (t) return !0; + for (i = n.inlineMethods, o = i.length, u = n.inlineTokenizers, a = -1, D = r.length; ++a < o;) f = i[a], !(f === "text" || !u[f]) && (c = u[f].locator, c || e.file.fail("Missing locator: `" + f + "`"), l = c.call(n, r, 1), l !== -1 && l < D && (D = l)); + s = r.slice(0, D), m = e.now(), n.decode(s, m, p); + function p(h, F, g) { + e(g || h)({ + type: "text", + value: h + }); + } + } + }); + nc = x((g2, tc) => { + "use strict"; + var lm = Ie(), Dt = Eu(), fm = vu(), Dm = bu(), pm = Ju(), Nn = ea(); + tc.exports = ec; + function ec(e, r) { + this.file = r, this.offset = {}, this.options = lm(this.options), this.setOptions({}), this.inList = !1, this.inBlock = !1, this.inLink = !1, this.atStart = !0, this.toOffset = fm(r).toOffset, this.unescape = Dm(this, "escape"), this.decode = pm(this); + } + var Y = ec.prototype; + Y.setOptions = sa(); + Y.parse = xa(); + Y.options = Kt(); + Y.exitStart = Dt("atStart", !0); + Y.enterList = Dt("inList", !1); + Y.enterLink = Dt("inLink", !1); + Y.enterBlock = Dt("inBlock", !1); + Y.interruptParagraph = [ + ["thematicBreak"], + ["list"], + ["atxHeading"], + ["fencedCode"], + ["blockquote"], + ["html"], + ["setextHeading", { commonmark: !1 }], + ["definition", { commonmark: !1 }] + ]; + Y.interruptList = [ + ["atxHeading", { pedantic: !1 }], + ["fencedCode", { pedantic: !1 }], + ["thematicBreak", { pedantic: !1 }], + ["definition", { commonmark: !1 }] + ]; + Y.interruptBlockquote = [ + ["indentedCode", { commonmark: !0 }], + ["fencedCode", { commonmark: !0 }], + ["atxHeading", { commonmark: !0 }], + ["setextHeading", { commonmark: !0 }], + ["thematicBreak", { commonmark: !0 }], + ["html", { commonmark: !0 }], + ["list", { commonmark: !0 }], + ["definition", { commonmark: !1 }] + ]; + Y.blockTokenizers = { + blankLine: wa(), + indentedCode: Oa(), + fencedCode: Pa(), + blockquote: Ua(), + atxHeading: za(), + thematicBreak: ja(), + list: no(), + setextHeading: oo(), + html: po(), + definition: bo(), + table: wo(), + paragraph: Bo() + }; + Y.inlineTokenizers = { + escape: Io(), + autoLink: Yo(), + url: Jo(), + email: us(), + html: ss(), + link: ms(), + reference: Es(), + strong: ys(), + emphasis: Ps(), + deletion: Ys(), + code: js(), + break: Js(), + text: Zs() + }; + Y.blockMethods = rc(Y.blockTokenizers); + Y.inlineMethods = rc(Y.inlineTokenizers); + Y.tokenizeBlock = Nn("block"); + Y.tokenizeInline = Nn("inline"); + Y.tokenizeFactory = Nn; + function rc(e) { + var r = [], t; + for (t in e) r.push(t); + return r; + } + }); + oc = x((E2, ac) => { + "use strict"; + var hm = Fu(), dm = Ie(), ic = nc(); + ac.exports = uc; + uc.Parser = ic; + function uc(e) { + var r = this.data("settings"), t = hm(ic); + t.prototype.options = dm(t.prototype.options, r, e), this.Parser = t; + } + }); + cc = x((C2, sc) => { + "use strict"; + sc.exports = mm; + function mm(e) { + if (e) throw e; + } + }); + Pn = x((v2, lc) => { + lc.exports = function(r) { + return r != null && r.constructor != null && typeof r.constructor.isBuffer == "function" && r.constructor.isBuffer(r); + }; + }); + Ec = x((A2, gc) => { + "use strict"; + var pt = Object.prototype.hasOwnProperty, Fc = Object.prototype.toString, fc = Object.defineProperty, Dc = Object.getOwnPropertyDescriptor, pc = function(r) { + return typeof Array.isArray == "function" ? Array.isArray(r) : Fc.call(r) === "[object Array]"; + }, hc = function(r) { + if (!r || Fc.call(r) !== "[object Object]") return !1; + var t = pt.call(r, "constructor"), n = r.constructor && r.constructor.prototype && pt.call(r.constructor.prototype, "isPrototypeOf"); + if (r.constructor && !t && !n) return !1; + var i; + for (i in r); + return typeof i > "u" || pt.call(r, i); + }, dc = function(r, t) { + fc && t.name === "__proto__" ? fc(r, t.name, { + enumerable: !0, + configurable: !0, + value: t.newValue, + writable: !0 + }) : r[t.name] = t.newValue; + }, mc = function(r, t) { + if (t === "__proto__") if (pt.call(r, t)) { + if (Dc) return Dc(r, t).value; + } else return; + return r[t]; + }; + gc.exports = function e() { + var r, t, n, i, u, a, o = arguments[0], s = 1, l = arguments.length, c = !1; + for (typeof o == "boolean" && (c = o, o = arguments[1] || {}, s = 2), (o == null || typeof o != "object" && typeof o != "function") && (o = {}); s < l; ++s) if (r = arguments[s], r != null) for (t in r) n = mc(o, t), i = mc(r, t), o !== i && (c && i && (hc(i) || (u = pc(i))) ? (u ? (u = !1, a = n && pc(n) ? n : []) : a = n && hc(n) ? n : {}, dc(o, { + name: t, + newValue: e(c, a, i) + })) : typeof i < "u" && dc(o, { + name: t, + newValue: i + })); + return o; + }; + }); + vc = x((b2, Cc) => { + "use strict"; + Cc.exports = (e) => { + if (Object.prototype.toString.call(e) !== "[object Object]") return !1; + let r = Object.getPrototypeOf(e); + return r === null || r === Object.prototype; + }; + }); + bc = x((x2, Ac) => { + "use strict"; + var Fm = [].slice; + Ac.exports = gm; + function gm(e, r) { + var t; + return n; + function n() { + var a = Fm.call(arguments, 0), o = e.length > a.length, s; + o && a.push(i); + try { + s = e.apply(null, a); + } catch (l) { + if (o && t) throw l; + return i(l); + } + o || (s && typeof s.then == "function" ? s.then(u, i) : s instanceof Error ? i(s) : u(s)); + } + function i() { + t || (t = !0, r.apply(null, arguments)); + } + function u(a) { + i(null, a); + } + } + }); + Tc = x((y2, kc) => { + "use strict"; + var yc = bc(); + kc.exports = wc; + wc.wrap = yc; + var xc = [].slice; + function wc() { + var e = [], r = {}; + return r.run = t, r.use = n, r; + function t() { + var i = -1, u = xc.call(arguments, 0, -1), a = arguments[arguments.length - 1]; + if (typeof a != "function") throw new Error("Expected function as last argument, not " + a); + o.apply(null, [null].concat(u)); + function o(s) { + var l = e[++i], f = xc.call(arguments, 0).slice(1), D = u.length, m = -1; + if (s) { + a(s); + return; + } + for (; ++m < D;) (f[m] === null || f[m] === void 0) && (f[m] = u[m]); + u = f, l ? yc(l, o).apply(null, u) : a.apply(null, [null].concat(u)); + } + } + function n(i) { + if (typeof i != "function") throw new Error("Expected `fn` to be a function, not " + i); + return e.push(i), r; + } + } + }); + qc = x((w2, Oc) => { + "use strict"; + var er = {}.hasOwnProperty; + Oc.exports = Em; + function Em(e) { + return !e || typeof e != "object" ? "" : er.call(e, "position") || er.call(e, "type") ? Bc(e.position) : er.call(e, "start") || er.call(e, "end") ? Bc(e) : er.call(e, "line") || er.call(e, "column") ? In(e) : ""; + } + function In(e) { + return (!e || typeof e != "object") && (e = {}), _c(e.line) + ":" + _c(e.column); + } + function Bc(e) { + return (!e || typeof e != "object") && (e = {}), In(e.start) + "-" + In(e.end); + } + function _c(e) { + return e && typeof e == "number" ? e : 1; + } + }); + Ic = x((k2, Pc) => { + "use strict"; + var Cm = qc(); + Pc.exports = Sn; + function Nc() {} + Nc.prototype = Error.prototype; + Sn.prototype = new Nc(); + var Te = Sn.prototype; + Te.file = ""; + Te.name = ""; + Te.reason = ""; + Te.message = ""; + Te.stack = ""; + Te.fatal = null; + Te.column = null; + Te.line = null; + function Sn(e, r, t) { + var n, i, u; + typeof r == "string" && (t = r, r = null), n = vm(t), i = Cm(r) || "1:1", u = { + start: { + line: null, + column: null + }, + end: { + line: null, + column: null + } + }, r && r.position && (r = r.position), r && (r.start ? (u = r, r = r.start) : u.start = r), e.stack && (this.stack = e.stack, e = e.message), this.message = e, this.name = i, this.reason = e, this.line = r ? r.line : null, this.column = r ? r.column : null, this.location = u, this.source = n[0], this.ruleId = n[1]; + } + function vm(e) { + var r = [null, null], t; + return typeof e == "string" && (t = e.indexOf(":"), t === -1 ? r[1] = e : (r[0] = e.slice(0, t), r[1] = e.slice(t + 1))), r; + } + }); + Sc = x((rr) => { + "use strict"; + rr.basename = Am; + rr.dirname = bm; + rr.extname = xm; + rr.join = ym; + rr.sep = "/"; + function Am(e, r) { + var t = 0, n = -1, i, u, a, o; + if (r !== void 0 && typeof r != "string") throw new TypeError("\"ext\" argument must be a string"); + if (wr(e), i = e.length, r === void 0 || !r.length || r.length > e.length) { + for (; i--;) if (e.charCodeAt(i) === 47) { + if (a) { + t = i + 1; + break; + } + } else n < 0 && (a = !0, n = i + 1); + return n < 0 ? "" : e.slice(t, n); + } + if (r === e) return ""; + for (u = -1, o = r.length - 1; i--;) if (e.charCodeAt(i) === 47) { + if (a) { + t = i + 1; + break; + } + } else u < 0 && (a = !0, u = i + 1), o > -1 && (e.charCodeAt(i) === r.charCodeAt(o--) ? o < 0 && (n = i) : (o = -1, n = u)); + return t === n ? n = u : n < 0 && (n = e.length), e.slice(t, n); + } + function bm(e) { + var r, t, n; + if (wr(e), !e.length) return "."; + for (r = -1, n = e.length; --n;) if (e.charCodeAt(n) === 47) { + if (t) { + r = n; + break; + } + } else t || (t = !0); + return r < 0 ? e.charCodeAt(0) === 47 ? "/" : "." : r === 1 && e.charCodeAt(0) === 47 ? "//" : e.slice(0, r); + } + function xm(e) { + var r = -1, t = 0, n = -1, i = 0, u, a, o; + for (wr(e), o = e.length; o--;) { + if (a = e.charCodeAt(o), a === 47) { + if (u) { + t = o + 1; + break; + } + continue; + } + n < 0 && (u = !0, n = o + 1), a === 46 ? r < 0 ? r = o : i !== 1 && (i = 1) : r > -1 && (i = -1); + } + return r < 0 || n < 0 || i === 0 || i === 1 && r === n - 1 && r === t + 1 ? "" : e.slice(r, n); + } + function ym() { + for (var e = -1, r; ++e < arguments.length;) wr(arguments[e]), arguments[e] && (r = r === void 0 ? arguments[e] : r + "/" + arguments[e]); + return r === void 0 ? "." : wm(r); + } + function wm(e) { + var r, t; + return wr(e), r = e.charCodeAt(0) === 47, t = km(e, !r), !t.length && !r && (t = "."), t.length && e.charCodeAt(e.length - 1) === 47 && (t += "/"), r ? "/" + t : t; + } + function km(e, r) { + for (var t = "", n = 0, i = -1, u = 0, a = -1, o, s; ++a <= e.length;) { + if (a < e.length) o = e.charCodeAt(a); + else { + if (o === 47) break; + o = 47; + } + if (o === 47) { + if (!(i === a - 1 || u === 1)) if (i !== a - 1 && u === 2) { + if (t.length < 2 || n !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) { + if (t.length > 2) { + if (s = t.lastIndexOf("/"), s !== t.length - 1) { + s < 0 ? (t = "", n = 0) : (t = t.slice(0, s), n = t.length - 1 - t.lastIndexOf("/")), i = a, u = 0; + continue; + } + } else if (t.length) { + t = "", n = 0, i = a, u = 0; + continue; + } + } + r && (t = t.length ? t + "/.." : "..", n = 2); + } else t.length ? t += "/" + e.slice(i + 1, a) : t = e.slice(i + 1, a), n = a - i - 1; + i = a, u = 0; + } else o === 46 && u > -1 ? u++ : u = -1; + } + return t; + } + function wr(e) { + if (typeof e != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(e)); + } + }); + Rc = x((Lc) => { + "use strict"; + Lc.cwd = Tm; + function Tm() { + return "/"; + } + }); + Yc = x((_2, Uc) => { + "use strict"; + var ce = Sc(), Bm = Rc(), _m = Pn(); + Uc.exports = Ce; + var Om = {}.hasOwnProperty, Ln = [ + "history", + "path", + "basename", + "stem", + "extname", + "dirname" + ]; + Ce.prototype.toString = Gm; + Object.defineProperty(Ce.prototype, "path", { + get: qm, + set: Nm + }); + Object.defineProperty(Ce.prototype, "dirname", { + get: Pm, + set: Im + }); + Object.defineProperty(Ce.prototype, "basename", { + get: Sm, + set: Lm + }); + Object.defineProperty(Ce.prototype, "extname", { + get: Rm, + set: Mm + }); + Object.defineProperty(Ce.prototype, "stem", { + get: Um, + set: Ym + }); + function Ce(e) { + var r, t; + if (!e) e = {}; + else if (typeof e == "string" || _m(e)) e = { contents: e }; + else if ("message" in e && "messages" in e) return e; + if (!(this instanceof Ce)) return new Ce(e); + for (this.data = {}, this.messages = [], this.history = [], this.cwd = Bm.cwd(), t = -1; ++t < Ln.length;) r = Ln[t], Om.call(e, r) && (this[r] = e[r]); + for (r in e) Ln.indexOf(r) < 0 && (this[r] = e[r]); + } + function qm() { + return this.history[this.history.length - 1]; + } + function Nm(e) { + Mn(e, "path"), this.path !== e && this.history.push(e); + } + function Pm() { + return typeof this.path == "string" ? ce.dirname(this.path) : void 0; + } + function Im(e) { + Mc(this.path, "dirname"), this.path = ce.join(e || "", this.basename); + } + function Sm() { + return typeof this.path == "string" ? ce.basename(this.path) : void 0; + } + function Lm(e) { + Mn(e, "basename"), Rn(e, "basename"), this.path = ce.join(this.dirname || "", e); + } + function Rm() { + return typeof this.path == "string" ? ce.extname(this.path) : void 0; + } + function Mm(e) { + if (Rn(e, "extname"), Mc(this.path, "extname"), e) { + if (e.charCodeAt(0) !== 46) throw new Error("`extname` must start with `.`"); + if (e.indexOf(".", 1) > -1) throw new Error("`extname` cannot contain multiple dots"); + } + this.path = ce.join(this.dirname, this.stem + (e || "")); + } + function Um() { + return typeof this.path == "string" ? ce.basename(this.path, this.extname) : void 0; + } + function Ym(e) { + Mn(e, "stem"), Rn(e, "stem"), this.path = ce.join(this.dirname || "", e + (this.extname || "")); + } + function Gm(e) { + return (this.contents || "").toString(e); + } + function Rn(e, r) { + if (e && e.indexOf(ce.sep) > -1) throw new Error("`" + r + "` cannot be a path: did not expect `" + ce.sep + "`"); + } + function Mn(e, r) { + if (!e) throw new Error("`" + r + "` cannot be empty"); + } + function Mc(e, r) { + if (!e) throw new Error("Setting `" + r + "` requires `path` to be set too"); + } + }); + zc = x((O2, Gc) => { + "use strict"; + var zm = Ic(), ht = Yc(); + Gc.exports = ht; + ht.prototype.message = Wm; + ht.prototype.info = jm; + ht.prototype.fail = Vm; + function Wm(e, r, t) { + var n = new zm(e, r, t); + return this.path && (n.name = this.path + ":" + n.name, n.file = this.path), n.fatal = !1, this.messages.push(n), n; + } + function Vm() { + var e = this.message.apply(this, arguments); + throw e.fatal = !0, e; + } + function jm() { + var e = this.message.apply(this, arguments); + return e.fatal = null, e; + } + }); + Vc = x((q2, Wc) => { + "use strict"; + Wc.exports = zc(); + }); + el = x((N2, Zc) => { + "use strict"; + var jc = cc(), $m = Pn(), dt = Ec(), $c = vc(), Jc = Tc(), kr = Vc(); + Zc.exports = Qc().freeze(); + var Hm = [].slice, Km = {}.hasOwnProperty, Xm = Jc().use(Jm).use(Qm).use(Zm); + function Jm(e, r) { + r.tree = e.parse(r.file); + } + function Qm(e, r, t) { + e.run(r.tree, r.file, n); + function n(i, u, a) { + i ? t(i) : (r.tree = u, r.file = a, t()); + } + } + function Zm(e, r) { + var t = e.stringify(r.tree, r.file); + t == null || (typeof t == "string" || $m(t) ? ("value" in r.file && (r.file.value = t), r.file.contents = t) : r.file.result = t); + } + function Qc() { + var e = [], r = Jc(), t = {}, n = -1, i; + return u.data = o, u.freeze = a, u.attachers = e, u.use = s, u.parse = c, u.stringify = m, u.run = f, u.runSync = D, u.process = p, u.processSync = h, u; + function u() { + for (var F = Qc(), g = -1; ++g < e.length;) F.use.apply(null, e[g]); + return F.data(dt(!0, {}, t)), F; + } + function a() { + var F, g; + if (i) return u; + for (; ++n < e.length;) F = e[n], F[1] !== !1 && (F[1] === !0 && (F[1] = void 0), g = F[0].apply(u, F.slice(1)), typeof g == "function" && r.use(g)); + return i = !0, n = Infinity, u; + } + function o(F, g) { + return typeof F == "string" ? arguments.length === 2 ? (Gn("data", i), t[F] = g, u) : Km.call(t, F) && t[F] || null : F ? (Gn("data", i), t = F, u) : t; + } + function s(F) { + var g; + if (Gn("use", i), F != null) if (typeof F == "function") b.apply(null, arguments); + else if (typeof F == "object") "length" in F ? A(F) : E(F); + else throw new Error("Expected usable value, not `" + F + "`"); + return g && (t.settings = dt(t.settings || {}, g)), u; + function E(d) { + A(d.plugins), d.settings && (g = dt(g || {}, d.settings)); + } + function v(d) { + if (typeof d == "function") b(d); + else if (typeof d == "object") "length" in d ? b.apply(null, d) : E(d); + else throw new Error("Expected usable value, not `" + d + "`"); + } + function A(d) { + var y = -1; + if (d != null) if (typeof d == "object" && "length" in d) for (; ++y < d.length;) v(d[y]); + else throw new Error("Expected a list of plugins, not `" + d + "`"); + } + function b(d, y) { + var w = l(d); + w ? ($c(w[1]) && $c(y) && (y = dt(!0, w[1], y)), w[1] = y) : e.push(Hm.call(arguments)); + } + } + function l(F) { + for (var g = -1; ++g < e.length;) if (e[g][0] === F) return e[g]; + } + function c(F) { + var g = kr(F), E; + return a(), E = u.Parser, Un("parse", E), Hc(E, "parse") ? new E(String(g), g).parse() : E(String(g), g); + } + function f(F, g, E) { + if (Kc(F), a(), !E && typeof g == "function" && (E = g, g = null), !E) return new Promise(v); + v(null, E); + function v(A, b) { + r.run(F, kr(g), d); + function d(y, w, C) { + w = w || F, y ? b(y) : A ? A(w) : E(null, w, C); + } + } + } + function D(F, g) { + var E, v; + return f(F, g, A), Xc("runSync", "run", v), E; + function A(b, d) { + v = !0, E = d, jc(b); + } + } + function m(F, g) { + var E = kr(g), v; + return a(), v = u.Compiler, Yn("stringify", v), Kc(F), Hc(v, "compile") ? new v(F, E).compile() : v(F, E); + } + function p(F, g) { + if (a(), Un("process", u.Parser), Yn("process", u.Compiler), !g) return new Promise(E); + E(null, g); + function E(v, A) { + var b = kr(F); + Xm.run(u, { file: b }, d); + function d(y) { + y ? A(y) : v ? v(b) : g(null, b); + } + } + } + function h(F) { + var g, E; + return a(), Un("processSync", u.Parser), Yn("processSync", u.Compiler), g = kr(F), p(g, v), Xc("processSync", "process", E), g; + function v(A) { + E = !0, jc(A); + } + } + } + function Hc(e, r) { + return typeof e == "function" && e.prototype && (eF(e.prototype) || r in e.prototype); + } + function eF(e) { + var r; + for (r in e) return !0; + return !1; + } + function Un(e, r) { + if (typeof r != "function") throw new Error("Cannot `" + e + "` without `Parser`"); + } + function Yn(e, r) { + if (typeof r != "function") throw new Error("Cannot `" + e + "` without `Compiler`"); + } + function Gn(e, r) { + if (r) throw new Error("Cannot invoke `" + e + "` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`."); + } + function Kc(e) { + if (!e || typeof e.type != "string") throw new Error("Expected node, got `" + e + "`"); + } + function Xc(e, r, t) { + if (!t) throw new Error("`" + e + "` finished async. Use `" + r + "` instead"); + } + }); + gl = {}; + Vn(gl, { + languages: () => Ki, + options: () => Xi, + parsers: () => Wn, + printers: () => fF + }); + Me = (e, r) => (t, n, ...i) => t | 1 && n == null ? void 0 : (r.call(n) ?? n[e]).apply(n, i); + U = Me("at", function() { + if (Array.isArray(this) || typeof this == "string") return yl; + }); + kl = String.prototype.replaceAll ?? function(e, r) { + return e.global ? this.replace(e, r) : this.split(e).join(r); + }, R = Me("replaceAll", function() { + if (typeof this == "string") return kl; + }); + $i = Re(Tr(), 1); + _l = () => {}, tr = _l; + V = "string", j = "array", be = "cursor", ee = "indent", re = "align", De = "trim", X = "group", J = "fill", Q = "if-break", pe = "indent-if-break", he = "line-suffix", de = "line-suffix-boundary", $ = "line", me = "label", te = "break-parent", Br = /* @__PURE__ */ new Set([ + be, + ee, + re, + De, + X, + J, + Q, + pe, + he, + de, + $, + me, + te + ]); + W = Ol; + ql = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e); + gt = class extends Error { + name = "InvalidDocError"; + constructor(r) { + super(Nl(r)), this.doc = r; + } + }, Be = gt; + $n = {}; + Hn = Pl; + ne = tr, Or = tr, Jn = tr, Qn = tr; + Ue = { type: te }; + qr = { type: $ }, Nr = { + type: $, + soft: !0 + }, ar = { + type: $, + hard: !0 + }, M = [ar, Ue], nr = [{ + type: $, + hard: !0, + literal: !0 + }, Ue]; + Ll = "cr", Rl = "crlf"; + Ml = "\r", Ul = `\r +`, Gl = ` +`; + ri = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\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?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; + ti = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇"; + zl = /[^\x20-\x7F]/u, Wl = new Set(ti); + or = Vl; + jl = { type: 0 }, $l = { type: 1 }, vt = { + value: "", + length: 0, + queue: [], + get root() { + return vt; + } + }; + H = Symbol("MODE_BREAK"), ue = Symbol("MODE_FLAT"), bt = Symbol("DOC_FILL_PRINTED_LENGTH"); + Ir = Kl; + oi = Xl; + si = Object.freeze({ + character: "'", + codePoint: 39 + }), ci = Object.freeze({ + character: "\"", + codePoint: 34 + }), Jl = Object.freeze({ + preferred: si, + alternate: ci + }), Ql = Object.freeze({ + preferred: ci, + alternate: si + }); + li = Zl; + xt = class extends Error { + name = "UnexpectedNodeError"; + constructor(r, t, n = "type") { + super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`), this.node = r; + } + }, fi = xt; + bi = Re(Tr(), 1); + ef = Array.prototype.toReversed ?? function() { + return [...this].reverse(); + }, Di = Me("toReversed", function() { + if (Array.isArray(this)) return ef; + }); + nf = tf(); + hi = (e) => String(e).split(/[/\\]/u).pop(), di = (e) => String(e).startsWith("file:"); + sf = void 0; + wt = cf; + Sr = Symbol.for("PRETTIER_IS_FRONT_MATTER"); + kt = lf; + sr = 3; + _e = Df; + gi = "format"; + Ei = /|\{\s*\/\*\s*@(?:noformat|noprettier)\s*\*\/\s*\}|/mu, Ci = /|\{\s*\/\*\s*@(?:format|prettier)\s*\*\/\s*\}|/mu; + Lr = (e) => _e(e).content.trimStart().match(Ci)?.index === 0, vi = (e) => _e(e).content.trimStart().match(Ei)?.index === 0, Ai = (e) => { + let { frontMatter: r } = _e(e), t = ``; + return r ? `${r.raw} + +${t} + +${e.slice(r.end.index)}` : `${t} + +${e}`; + }; + pf = /* @__PURE__ */ new Set(["position", "raw"]); + xi.ignoredProperties = pf; + yi = xi; + wi = /(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{16ff2}-\u{16ff6}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b81d}\u{2b820}-\u{2cead}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{33479}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u, Oe = /(?:[\u{21}-\u{2f}\u{3a}-\u{40}\u{5b}-\u{60}\u{7b}-\u{7e}]|\p{General_Category=Connector_Punctuation}|\p{General_Category=Dash_Punctuation}|\p{General_Category=Close_Punctuation}|\p{General_Category=Final_Punctuation}|\p{General_Category=Initial_Punctuation}|\p{General_Category=Other_Punctuation}|\p{General_Category=Open_Punctuation})/u; + qe = (e) => e.position.start.offset, Ne = (e) => e.position.end.offset; + Tt = /* @__PURE__ */ new Set([ + "liquidNode", + "inlineCode", + "emphasis", + "esComment", + "strong", + "delete", + "wikiLink", + "link", + "linkReference", + "image", + "imageReference", + "footnote", + "footnoteReference", + "sentence", + "whitespace", + "word", + "break", + "inlineMath" + ]), Rr = /* @__PURE__ */ new Set([ + ...Tt, + "tableCell", + "paragraph", + "heading" + ]), We = "non-cjk", ae = "cj-letter", Pe = "k-letter", cr = "cjk-punctuation", hf = /\p{Script_Extensions=Hangul}/u; + Ti = df; + fr = null; + Ff = 10; + for (let e = 0; e <= Ff; e++) Dr(); + Bi = gf; + q = [["children"], []]; + Oi = Bi({ + root: q[0], + paragraph: q[0], + sentence: q[0], + word: q[1], + whitespace: q[1], + emphasis: q[0], + strong: q[0], + delete: q[0], + inlineCode: q[1], + wikiLink: q[1], + link: q[0], + image: q[1], + blockquote: q[0], + heading: q[0], + code: q[1], + html: q[1], + list: q[0], + thematicBreak: q[1], + linkReference: q[0], + imageReference: q[1], + definition: q[1], + footnote: q[0], + footnoteReference: q[1], + footnoteDefinition: q[0], + table: q[0], + tableCell: q[0], + break: q[1], + liquidNode: q[1], + import: q[1], + export: q[1], + esComment: q[1], + jsx: q[1], + math: q[1], + inlineMath: q[1], + tableRow: q[0], + listItem: q[0], + text: q[1] + }); + vf = /* @__PURE__ */ new Set(["listItem", "definition"]); + _t = class { + #e; + constructor(r) { + this.#e = new Set(r); + } + getLeadingWhitespaceCount(r) { + let t = this.#e, n = 0; + for (let i = 0; i < r.length && t.has(r.charAt(i)); i++) n++; + return n; + } + getTrailingWhitespaceCount(r) { + let t = this.#e, n = 0; + for (let i = r.length - 1; i >= 0 && t.has(r.charAt(i)); i--) n++; + return n; + } + getLeadingWhitespace(r) { + let t = this.getLeadingWhitespaceCount(r); + return r.slice(0, t); + } + getTrailingWhitespace(r) { + let t = this.getTrailingWhitespaceCount(r); + return r.slice(r.length - t); + } + hasLeadingWhitespace(r) { + return this.#e.has(r.charAt(0)); + } + hasTrailingWhitespace(r) { + return this.#e.has(U(0, r, -1)); + } + trimStart(r) { + let t = this.getLeadingWhitespaceCount(r); + return r.slice(t); + } + trimEnd(r) { + let t = this.getTrailingWhitespaceCount(r); + return r.slice(0, r.length - t); + } + trim(r) { + return this.trimEnd(this.trimStart(r)); + } + split(r, t = !1) { + let n = `[${fe([...this.#e].join(""))}]+`, i = new RegExp(t ? `(${n})` : n, "u"); + return r.split(i); + } + hasWhitespaceCharacter(r) { + let t = this.#e; + return Array.prototype.some.call(r, (n) => t.has(n)); + } + hasNonWhitespaceCharacter(r) { + let t = this.#e; + return Array.prototype.some.call(r, (n) => !t.has(n)); + } + isWhitespaceOnly(r) { + let t = this.#e; + return Array.prototype.every.call(r, (n) => t.has(n)); + } + #r(r) { + let t = Number.POSITIVE_INFINITY; + for (let n of r.split(` +`)) { + if (n.length === 0) continue; + let i = this.getLeadingWhitespaceCount(n); + if (i === 0) return 0; + n.length !== i && i < t && (t = i); + } + return t === Number.POSITIVE_INFINITY ? 0 : t; + } + dedentString(r) { + let t = this.#r(r); + return t === 0 ? r : r.split(` +`).map((n) => n.slice(t)).join(` +`); + } + }; + Ot = new _t([ + " ", + ` +`, + "\f", + "\r", + " " + ]); + Tf = /^\\?.$/su, Bf = /^\n *>[ >]*$/u; + Ui = _f; + Lf = /* @__PURE__ */ new Set([ + "heading", + "tableCell", + "link", + "wikiLink" + ]), Gi = /* @__PURE__ */ new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"); + Wf = (e, r) => { + for (let t of r) e = R(0, e, t, encodeURIComponent(t)); + return e; + }; + Hi = { + features: { experimental_frontMatterSupport: { + massageAstNode: !0, + embed: !0, + print: !0 + } }, + preprocess: Ui, + print: Yf, + embed: Ti, + massageAstNode: yi, + hasPrettierIgnore: Vf, + insertPragma: Ai, + getVisitorKeys: Oi + }; + Ki = [{ + name: "Markdown", + type: "prose", + aceMode: "markdown", + extensions: [ + ".md", + ".livemd", + ".markdown", + ".mdown", + ".mdwn", + ".mkd", + ".mkdn", + ".mkdown", + ".ronn", + ".scd", + ".workbook" + ], + filenames: ["contents.lr", "README"], + tmScope: "text.md", + aliases: ["md", "pandoc"], + codemirrorMode: "gfm", + codemirrorMimeType: "text/x-gfm", + wrap: !0, + parsers: ["markdown"], + vscodeLanguageIds: ["markdown"], + linguistLanguageId: 222 + }, { + name: "MDX", + type: "prose", + aceMode: "markdown", + extensions: [".mdx"], + filenames: [], + tmScope: "text.md", + aliases: ["md", "pandoc"], + codemirrorMode: "gfm", + codemirrorMimeType: "text/x-gfm", + wrap: !0, + parsers: ["mdx"], + vscodeLanguageIds: ["mdx"], + linguistLanguageId: 222 + }]; + It = { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }; + Xi = { + proseWrap: It.proseWrap, + singleQuote: It.singleQuote + }; + Wn = {}; + Vn(Wn, { + markdown: () => cF, + mdx: () => lF, + remark: () => cF + }); + Dl = Re(Qi(), 1), pl = Re(Du(), 1), hl = Re(oc(), 1), dl = Re(el(), 1); + rF = /^import\s/u, tF = /^export\s/u, rl = "[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|", tl = /|/u, nF = /^\{\s*\/\*(.*)\*\/\s*\}/u; + iF = (e) => rF.test(e), nl = (e) => tF.test(e), il = (e) => iF(e) || nl(e), zn = (e, r) => { + let t = r.indexOf(` + +`), n = t === -1 ? r : r.slice(0, t); + if (il(n)) return e(n)({ + type: nl(n) ? "export" : "import", + value: n + }); + }; + zn.notInBlock = !0; + zn.locator = (e) => il(e) ? -1 : 1; + ul = (e, r) => { + let t = nF.exec(r); + if (t) return e(t[0])({ + type: "esComment", + value: t[1].trim() + }); + }; + ul.locator = (e, r) => e.indexOf("{", r); + al = function() { + let { Parser: e } = this, { blockTokenizers: r, blockMethods: t, inlineTokenizers: n, inlineMethods: i } = e.prototype; + r.esSyntax = zn, n.esComment = ul, t.splice(t.indexOf("paragraph"), 0, "esSyntax"), i.splice(i.indexOf("text"), 0, "esComment"); + }; + uF = function() { + let e = this.Parser.prototype; + e.blockMethods = ["frontMatter", ...e.blockMethods], e.blockTokenizers.frontMatter = r; + function r(t, n) { + let { frontMatter: i } = _e(n); + if (i) return t(i.raw)({ + ...i, + type: "frontMatter" + }); + } + r.onlyAtStart = !0; + }, ol = uF; + sl = aF; + oF = function() { + let e = this.Parser.prototype, r = e.inlineMethods; + r.splice(r.indexOf("text"), 0, "liquid"), e.inlineTokenizers.liquid = t; + function t(n, i) { + let u = i.match(/^(\{%.*?%\}|\{\{.*?\}\})/su); + if (u) return n(u[0])({ + type: "liquidNode", + value: u[0] + }); + } + t.locator = function(n, i) { + return n.indexOf("{", i); + }; + }, cl = oF; + sF = function() { + let e = "wikiLink", r = /^\[\[(?.+?)\]\]/su, t = this.Parser.prototype, n = t.inlineMethods; + n.splice(n.indexOf("link"), 0, e), t.inlineTokenizers.wikiLink = i; + function i(u, a) { + let o = r.exec(a); + if (o) { + let s = o.groups.linkContents.trim(); + return u(o[0])({ + type: e, + value: s + }); + } + } + i.locator = function(u, a) { + return u.indexOf("[", a); + }; + }, ll = sF; + Fl = { + astFormat: "mdast", + hasPragma: Lr, + hasIgnorePragma: vi, + locStart: qe, + locEnd: Ne + }, cF = { + ...Fl, + parse: ml({ isMDX: !1 }) + }, lF = { + ...Fl, + parse: ml({ isMDX: !0 }) + }; + fF = { mdast: Hi }; +}))(); +export { gl as default, Ki as languages, Xi as options, Wn as parsers, fF as printers }; diff --git a/.github/actions/check-public-api/dist/meriyah-UhC-PINz.js b/.github/actions/check-public-api/dist/meriyah-UhC-PINz.js new file mode 100644 index 0000000000..316428ba08 --- /dev/null +++ b/.github/actions/check-public-api/dist/meriyah-UhC-PINz.js @@ -0,0 +1,7592 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/meriyah.mjs +function Se(e) { + return e <= 127 ? _2[e] > 0 : Ct(e); +} +function De(e) { + return e <= 127 ? Et[e] > 0 : J2(e) || e === 8204 || e === 8205; +} +function m(e) { + return e.column++, e.currentChar = e.source.charCodeAt(++e.index); +} +function Ke(e) { + let t = e.currentChar; + if ((t & 64512) !== 55296) return 0; + let n = e.source.charCodeAt(e.index + 1); + return (n & 64512) !== 56320 ? 0 : 65536 + ((t & 1023) << 10) + (n & 1023); +} +function $e(e, t) { + e.currentChar = e.source.charCodeAt(++e.index), e.flags |= 1, !(t & 4) && (e.column = 0, e.line++); +} +function te(e) { + e.flags |= 1, e.currentChar = e.source.charCodeAt(++e.index), e.column = 0, e.line++; +} +function X2(e) { + return e === 160 || e === 65279 || e === 133 || e === 5760 || e >= 8192 && e <= 8203 || e === 8239 || e === 8287 || e === 12288 || e === 8201 || e === 65519; +} +function v(e) { + return e < 65 ? e - 48 : e - 65 + 10 & 15; +} +function j2(e) { + switch (e) { + case 134283266: return "NumericLiteral"; + case 134283267: return "StringLiteral"; + case 86021: + case 86022: return "BooleanLiteral"; + case 86023: return "NullLiteral"; + case 65540: return "RegularExpression"; + case 67174408: + case 67174409: + case 131: return "TemplateLiteral"; + default: return (e & 143360) === 143360 ? "Identifier" : (e & 4096) === 4096 ? "Keyword" : "Punctuator"; + } +} +function H2(e) { + let { source: t } = e; + e.currentChar === 35 && t.charCodeAt(e.index + 1) === 33 && (m(e), m(e), We(e, t, 0, 4, e.tokenStart)); +} +function rt(e, t, n, u, o, i) { + return u & 2 && e.report(0), We(e, t, n, o, i); +} +function We(e, t, n, u, o) { + let { index: i } = e; + for (e.tokenIndex = e.index, e.tokenLine = e.line, e.tokenColumn = e.column; e.index < e.end;) { + if (S[e.currentChar] & 8) { + let l = e.currentChar === 13; + te(e), l && e.index < e.end && e.currentChar === 10 && (e.currentChar = t.charCodeAt(++e.index)); + break; + } else if ((e.currentChar ^ 8232) <= 1) { + te(e); + break; + } + m(e), e.tokenIndex = e.index, e.tokenLine = e.line, e.tokenColumn = e.column; + } + if (e.options.onComment) { + let l = { + start: { + line: o.line, + column: o.column + }, + end: { + line: e.tokenLine, + column: e.tokenColumn + } + }; + e.options.onComment(wt[u & 255], t.slice(i, e.tokenIndex), o.index, e.tokenIndex, l); + } + return n | 1; +} +function z2(e, t, n) { + let { index: u } = e; + for (; e.index < e.end;) if (e.currentChar < 43) { + let o = !1; + for (; e.currentChar === 42;) if (o || (n &= -5, o = !0), m(e) === 47) { + if (m(e), e.options.onComment) { + let i = { + start: { + line: e.tokenLine, + column: e.tokenColumn + }, + end: { + line: e.line, + column: e.column + } + }; + e.options.onComment(wt[1], t.slice(u, e.index - 2), u - 2, e.index, i); + } + return e.tokenIndex = e.index, e.tokenLine = e.line, e.tokenColumn = e.column, n; + } + if (o) continue; + S[e.currentChar] & 8 ? e.currentChar === 13 ? (n |= 5, te(e)) : ($e(e, n), n = n & -5 | 1) : m(e); + } else (e.currentChar ^ 8232) <= 1 ? (n = n & -5 | 1, te(e)) : (n &= -5, m(e)); + e.report(18); +} +function St(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0; +} +function ht(e, t, n) { + for (; Et[m(e)];); + return e.tokenValue = e.source.slice(e.tokenIndex, e.index), e.currentChar !== 92 && e.currentChar <= 126 ? St(Bt, e.tokenValue) ?? 208897 : Ye(e, t, 0, n); +} +function $2(e, t) { + let n = Ft(e); + return Se(n) || e.report(5), e.tokenValue = String.fromCodePoint(n), Ye(e, t, 1, S[n] & 4); +} +function Ye(e, t, n, u) { + let o = e.index; + for (; e.index < e.end;) if (e.currentChar === 92) { + e.tokenValue += e.source.slice(o, e.index), n = 1; + let l = Ft(e); + De(l) || e.report(5), u = u && S[l] & 4, e.tokenValue += String.fromCodePoint(l), o = e.index; + } else { + let l = Ke(e); + if (l > 0) De(l) || e.report(20, String.fromCodePoint(l)), e.currentChar = l, e.index++, e.column++; + else if (!De(e.currentChar)) break; + m(e); + } + e.index <= e.end && (e.tokenValue += e.source.slice(o, e.index)); + let { length: i } = e.tokenValue; + if (u && i >= 2 && i <= 11) { + let l = St(Bt, e.tokenValue); + return l === void 0 ? 208897 | (n ? -2147483648 : 0) : n ? l === 209006 ? (t & 2050) === 0 ? l | -2147483648 : -2147483528 : t & 1 ? l === 36970 || (l & 36864) === 36864 ? -2147483527 : (l & 20480) === 20480 ? t & 262144 && (t & 8) === 0 ? l | -2147483648 : -2147483528 : -2147274630 : t & 262144 && (t & 8) === 0 && (l & 20480) === 20480 ? l | -2147483648 : l === 241771 ? t & 262144 ? -2147274630 : t & 1024 ? -2147483528 : l | -2147483648 : l === 209005 ? -2147274630 : (l & 36864) === 36864 ? l | -2147471360 : -2147483528 : l; + } + return 208897 | (n ? -2147483648 : 0); +} +function W2(e) { + let t = m(e); + if (t === 92) return 130; + let n = Ke(e); + return n && (t = n), Se(t) || e.report(96), 130; +} +function Ft(e) { + return e.source.charCodeAt(e.index + 1) !== 117 && e.report(5), e.currentChar = e.source.charCodeAt(e.index += 2), e.column += 2, Y2(e); +} +function Y2(e) { + let t = 0, n = e.currentChar; + if (n === 123) { + let l = e.index - 2; + for (; S[m(e)] & 64;) if (t = t << 4 | v(e.currentChar), t > 1114111) throw new q({ + index: l, + line: e.line, + column: e.column + }, e.currentLocation, 104); + if (e.currentChar !== 125) throw new q({ + index: l, + line: e.line, + column: e.column + }, e.currentLocation, 7); + return m(e), t; + } + !(S[n] & 64) && e.report(7); + let u = e.source.charCodeAt(e.index + 1); + !(S[u] & 64) && e.report(7); + let o = e.source.charCodeAt(e.index + 2); + !(S[o] & 64) && e.report(7); + let i = e.source.charCodeAt(e.index + 3); + return !(S[i] & 64) && e.report(7), t = v(n) << 12 | v(u) << 8 | v(o) << 4 | v(i), e.currentChar = e.source.charCodeAt(e.index += 4), e.column += 4, t; +} +function kt(e, t, n) { + let u = e.currentChar, o = 0, i = 9, l = n & 64 ? 0 : 1, f = 0, c = 0; + if (n & 64) o = "." + Te(e, u), u = e.currentChar, u === 110 && e.report(12); + else { + if (u === 48) if (u = m(e), (u | 32) === 120) { + for (n = 136, u = m(e); S[u] & 4160;) { + if (u === 95) { + c || e.report(152), c = 0, u = m(e); + continue; + } + c = 1, o = o * 16 + v(u), f++, u = m(e); + } + (f === 0 || !c) && e.report(f === 0 ? 21 : 153); + } else if ((u | 32) === 111) { + for (n = 132, u = m(e); S[u] & 4128;) { + if (u === 95) { + c || e.report(152), c = 0, u = m(e); + continue; + } + c = 1, o = o * 8 + (u - 48), f++, u = m(e); + } + (f === 0 || !c) && e.report(f === 0 ? 0 : 153); + } else if ((u | 32) === 98) { + for (n = 130, u = m(e); S[u] & 4224;) { + if (u === 95) { + c || e.report(152), c = 0, u = m(e); + continue; + } + c = 1, o = o * 2 + (u - 48), f++, u = m(e); + } + (f === 0 || !c) && e.report(f === 0 ? 0 : 153); + } else if (S[u] & 32) for (t & 1 && e.report(1), n = 1; S[u] & 16;) { + if (S[u] & 512) { + n = 32, l = 0; + break; + } + o = o * 8 + (u - 48), u = m(e); + } + else S[u] & 512 ? (t & 1 && e.report(1), e.flags |= 64, n = 32) : u === 95 && e.report(0); + if (n & 48) { + if (l) { + for (; i >= 0 && S[u] & 4112;) { + if (u === 95) { + if (u = m(e), u === 95 || n & 32) throw new q(e.currentLocation, { + index: e.index + 1, + line: e.line, + column: e.column + }, 152); + c = 1; + continue; + } + c = 0, o = 10 * o + (u - 48), u = m(e), --i; + } + if (c) throw new q(e.currentLocation, { + index: e.index + 1, + line: e.line, + column: e.column + }, 153); + if (i >= 0 && !Se(u) && u !== 46) return e.tokenValue = o, e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), 134283266; + } + o += Te(e, u), u = e.currentChar, u === 46 && (m(e) === 95 && e.report(0), n = 64, o += "." + Te(e, e.currentChar), u = e.currentChar); + } + } + let g = e.index, d = 0; + if (u === 110 && n & 128) d = 1, u = m(e); + else if ((u | 32) === 101) { + u = m(e), S[u] & 256 && (u = m(e)); + let { index: a } = e; + !(S[u] & 16) && e.report(11), o += e.source.substring(g, a) + Te(e, u), u = e.currentChar; + } + return (e.index < e.end && S[u] & 16 || Se(u)) && e.report(13), d ? (e.tokenRaw = e.source.slice(e.tokenIndex, e.index), e.tokenValue = BigInt(p(0, e.tokenRaw.slice(0, -1), "_", "")), 134283388) : (e.tokenValue = n & 15 ? o : n & 32 ? parseFloat(e.source.substring(e.tokenIndex, e.index)) : +o, e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), 134283266); +} +function Te(e, t) { + let n = 0, u = e.index, o = ""; + for (; S[t] & 4112;) { + if (t === 95) { + let { index: i } = e; + if (t = m(e), t === 95) throw new q(e.currentLocation, { + index: e.index + 1, + line: e.line, + column: e.column + }, 152); + n = 1, o += e.source.substring(u, i), u = e.index; + continue; + } + n = 0, t = m(e); + } + if (n) throw new q(e.currentLocation, { + index: e.index + 1, + line: e.line, + column: e.column + }, 153); + return o + e.source.substring(u, e.index); +} +function Q2(e) { + let t = e.index, n = Z.Empty; + e: for (;;) { + let g = e.currentChar; + if (m(e), n & Z.Escape) n &= ~Z.Escape; + else switch (g) { + case 47: + if (n) break; + break e; + case 92: + n |= Z.Escape; + break; + case 91: + n |= Z.Class; + break; + case 93: + n &= Z.Escape; + break; + } + if ((g === 13 || g === 10 || g === 8232 || g === 8233) && e.report(34), e.index >= e.source.length) return e.report(34); + } + let u = e.index - 1, o = P.Empty, i = e.currentChar, { index: l } = e; + for (; De(i);) { + switch (i) { + case 103: + o & P.Global && e.report(36, "g"), o |= P.Global; + break; + case 105: + o & P.IgnoreCase && e.report(36, "i"), o |= P.IgnoreCase; + break; + case 109: + o & P.Multiline && e.report(36, "m"), o |= P.Multiline; + break; + case 117: + o & P.Unicode && e.report(36, "u"), o & P.UnicodeSets && e.report(36, "vu"), o |= P.Unicode; + break; + case 118: + o & P.Unicode && e.report(36, "uv"), o & P.UnicodeSets && e.report(36, "v"), o |= P.UnicodeSets; + break; + case 121: + o & P.Sticky && e.report(36, "y"), o |= P.Sticky; + break; + case 115: + o & P.DotAll && e.report(36, "s"), o |= P.DotAll; + break; + case 100: + o & P.Indices && e.report(36, "d"), o |= P.Indices; + break; + default: e.report(35); + } + i = m(e); + } + let f = e.source.slice(l, e.index), c = e.source.slice(t, u); + return e.tokenRegExp = { + pattern: c, + flags: f + }, e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), e.tokenValue = Z2(e, c, f), 65540; +} +function Z2(e, t, n) { + try { + return new RegExp(t, n); + } catch { + if (!e.options.validateRegex) return null; + e.report(34); + } +} +function G2(e, t, n) { + let { index: u } = e, o = "", i = m(e), l = e.index; + for (; (S[i] & 8) === 0;) { + if (i === n) return o += e.source.slice(l, e.index), m(e), e.options.raw && (e.tokenRaw = e.source.slice(u, e.index)), e.tokenValue = o, 134283267; + if ((i & 8) === 8 && i === 92) { + if (o += e.source.slice(l, e.index), i = m(e), i < 127 || i === 8232 || i === 8233) { + let f = Nt(e, t, i); + f >= 0 ? o += String.fromCodePoint(f) : Lt(e, f, 0); + } else o += String.fromCodePoint(i); + l = e.index + 1; + } else (i === 8232 || i === 8233) && (e.column = -1, e.line++); + e.index >= e.end && e.report(16), i = m(e); + } + e.report(16); +} +function Nt(e, t, n, u = 0) { + switch (n) { + case 98: return 8; + case 102: return 12; + case 114: return 13; + case 110: return 10; + case 116: return 9; + case 118: return 11; + case 13: if (e.index < e.end) { + let o = e.source.charCodeAt(e.index + 1); + o === 10 && (e.index = e.index + 1, e.currentChar = o); + } + case 10: + case 8232: + case 8233: return e.column = -1, e.line++, -1; + case 48: + case 49: + case 50: + case 51: { + let o = n - 48, i = e.index + 1, l = e.column + 1; + if (i < e.end) { + let f = e.source.charCodeAt(i); + if ((S[f] & 32) === 0) { + if (o !== 0 || S[f] & 512) { + if (t & 1 || u) return -2; + e.flags |= 64; + } + } else { + if (t & 1 || u) return -2; + if (e.currentChar = f, o = o << 3 | f - 48, i++, l++, i < e.end) { + let c = e.source.charCodeAt(i); + S[c] & 32 && (e.currentChar = c, o = o << 3 | c - 48, i++, l++); + } + e.flags |= 64; + } + e.index = i - 1, e.column = l - 1; + } + return o; + } + case 52: + case 53: + case 54: + case 55: { + if (u || t & 1) return -2; + let o = n - 48, i = e.index + 1, l = e.column + 1; + if (i < e.end) { + let f = e.source.charCodeAt(i); + S[f] & 32 && (o = o << 3 | f - 48, e.currentChar = f, e.index = i, e.column = l); + } + return e.flags |= 64, o; + } + case 120: { + let o = m(e); + if ((S[o] & 64) === 0) return -4; + let i = v(o), l = m(e); + if ((S[l] & 64) === 0) return -4; + let f = v(l); + return i << 4 | f; + } + case 117: { + let o = m(e); + if (e.currentChar === 123) { + let i = 0; + for (; (S[m(e)] & 64) !== 0;) if (i = i << 4 | v(e.currentChar), i > 1114111) return -5; + return e.currentChar < 1 || e.currentChar !== 125 ? -4 : i; + } else { + if ((S[o] & 64) === 0) return -4; + let i = e.source.charCodeAt(e.index + 1); + if ((S[i] & 64) === 0) return -4; + let l = e.source.charCodeAt(e.index + 2); + if ((S[l] & 64) === 0) return -4; + let f = e.source.charCodeAt(e.index + 3); + return (S[f] & 64) === 0 ? -4 : (e.index += 3, e.column += 3, e.currentChar = e.source.charCodeAt(e.index), v(o) << 12 | v(i) << 8 | v(l) << 4 | v(f)); + } + } + case 56: + case 57: + if (u || !e.options.webcompat || t & 1) return -3; + e.flags |= 4096; + default: return n; + } +} +function Lt(e, t, n) { + switch (t) { + case -1: return; + case -2: e.report(n ? 2 : 1); + case -3: e.report(n ? 3 : 14); + case -4: e.report(7); + case -5: e.report(104); + } +} +function It(e, t) { + let { index: n } = e, u = 67174409, o = "", i = m(e); + for (; i !== 96;) { + if (i === 36 && e.source.charCodeAt(e.index + 1) === 123) { + m(e), u = 67174408; + break; + } else if (i === 92) if (i = m(e), i > 126) o += String.fromCodePoint(i); + else { + let { index: l, line: f, column: c } = e, g = Nt(e, t | 1, i, 1); + if (g >= 0) o += String.fromCodePoint(g); + else if (g !== -1 && t & 64) { + e.index = l, e.line = f, e.column = c, o = null, i = x2(e, i), i < 0 && (u = 67174408); + break; + } else Lt(e, g, 1); + } + else e.index < e.end && (i === 13 && e.source.charCodeAt(e.index) === 10 && (o += String.fromCodePoint(i), e.currentChar = e.source.charCodeAt(++e.index)), ((i & 83) < 3 && i === 10 || (i ^ 8232) <= 1) && (e.column = -1, e.line++), o += String.fromCodePoint(i)); + e.index >= e.end && e.report(17), i = m(e); + } + return m(e), e.tokenValue = o, e.tokenRaw = e.source.slice(n + 1, e.index - (u === 67174409 ? 1 : 2)), u; +} +function x2(e, t) { + for (; t !== 96;) { + switch (t) { + case 36: { + let n = e.index + 1; + if (n < e.end && e.source.charCodeAt(n) === 123) return e.index = n, e.column++, -t; + break; + } + case 10: + case 8232: + case 8233: e.column = -1, e.line++; + } + e.index >= e.end && e.report(17), t = m(e); + } + return t; +} +function p2(e, t) { + return e.index >= e.end && e.report(0), e.index--, e.column--, It(e, t); +} +function r(e, t) { + e.flags = (e.flags | 1) ^ 1, e.startIndex = e.index, e.startColumn = e.column, e.startLine = e.line, e.setToken(qt(e, t, 0)); +} +function qt(e, t, n) { + let u = e.index === 0, { source: o } = e; + for (; e.index < e.end;) { + e.tokenIndex = e.index, e.tokenColumn = e.column, e.tokenLine = e.line; + let i = e.currentChar; + if (i <= 126) { + let l = en[i]; + switch (l) { + case 67174411: + case 16: + case 2162700: + case 1074790415: + case 69271571: + case 20: + case 21: + case 1074790417: + case 18: + case 16842799: + case 132: + case 128: return m(e), l; + case 208897: return ht(e, t, 0); + case 4096: return ht(e, t, 1); + case 134283266: return kt(e, t, 144); + case 134283267: return G2(e, t, i); + case 131: return It(e, t); + case 136: return $2(e, t); + case 130: return W2(e); + case 127: + m(e); + break; + case 129: + n |= 5, te(e); + break; + case 135: + $e(e, n), n = n & -5 | 1; + break; + case 8456256: { + let f = m(e); + if (e.index < e.end) { + if (f === 60) return e.index < e.end && m(e) === 61 ? (m(e), 4194332) : 8390978; + if (f === 61) return m(e), 8390718; + if (f === 33) { + let c = e.index + 1; + if (c + 1 < e.end && o.charCodeAt(c) === 45 && o.charCodeAt(c + 1) == 45) { + e.column += 3, e.currentChar = o.charCodeAt(e.index += 3), n = rt(e, o, n, t, 2, e.tokenStart); + continue; + } + return 8456256; + } + } + return 8456256; + } + case 1077936155: { + m(e); + let f = e.currentChar; + return f === 61 ? m(e) === 61 ? (m(e), 8390458) : 8390460 : f === 62 ? (m(e), 10) : 1077936155; + } + case 16842798: return m(e) !== 61 ? 16842798 : m(e) !== 61 ? 8390461 : (m(e), 8390459); + case 8391477: return m(e) !== 61 ? 8391477 : (m(e), 4194340); + case 8391476: { + if (m(e), e.index >= e.end) return 8391476; + let f = e.currentChar; + return f === 61 ? (m(e), 4194338) : f !== 42 ? 8391476 : m(e) !== 61 ? 8391735 : (m(e), 4194335); + } + case 8389959: return m(e) !== 61 ? 8389959 : (m(e), 4194341); + case 25233968: { + m(e); + let f = e.currentChar; + return f === 43 ? (m(e), 33619993) : f === 61 ? (m(e), 4194336) : 25233968; + } + case 25233969: { + m(e); + let f = e.currentChar; + if (f === 45) { + if (m(e), (n & 1 || u) && e.currentChar === 62) { + e.options.webcompat || e.report(112), m(e), n = rt(e, o, n, t, 3, e.tokenStart); + continue; + } + return 33619994; + } + return f === 61 ? (m(e), 4194337) : 25233969; + } + case 8457014: + if (m(e), e.index < e.end) { + let f = e.currentChar; + if (f === 47) { + m(e), n = We(e, o, n, 0, e.tokenStart); + continue; + } + if (f === 42) { + m(e), n = z2(e, o, n); + continue; + } + if (t & 32) return Q2(e); + if (f === 61) return m(e), 4259875; + } + return 8457014; + case 67108877: { + let f = m(e); + if (f >= 48 && f <= 57) return kt(e, t, 80); + if (f === 46) { + let c = e.index + 1; + if (c < e.end && o.charCodeAt(c) === 46) return e.column += 2, e.currentChar = o.charCodeAt(e.index += 2), 14; + } + return 67108877; + } + case 8389702: { + m(e); + let f = e.currentChar; + return f === 124 ? (m(e), e.currentChar === 61 ? (m(e), 4194344) : 8913465) : f === 61 ? (m(e), 4194342) : 8389702; + } + case 8390721: { + m(e); + let f = e.currentChar; + if (f === 61) return m(e), 8390719; + if (f !== 62) return 8390721; + if (m(e), e.index < e.end) { + let c = e.currentChar; + if (c === 62) return m(e) === 61 ? (m(e), 4194334) : 8390980; + if (c === 61) return m(e), 4194333; + } + return 8390979; + } + case 8390213: { + m(e); + let f = e.currentChar; + return f === 38 ? (m(e), e.currentChar === 61 ? (m(e), 4194345) : 8913720) : f === 61 ? (m(e), 4194343) : 8390213; + } + case 22: { + let f = m(e); + if (f === 63) return m(e), e.currentChar === 61 ? (m(e), 4194346) : 276824445; + if (f === 46) { + let c = e.index + 1; + if (c < e.end && (f = o.charCodeAt(c), !(f >= 48 && f <= 57))) return m(e), 67108990; + } + return 22; + } + } + } else { + if ((i ^ 8232) <= 1) { + n = n & -5 | 1, te(e); + continue; + } + let l = Ke(e); + if (l > 0 && (i = l), Ct(i)) return e.tokenValue = "", Ye(e, t, 0, 0); + if (X2(i)) { + m(e); + continue; + } + e.report(20, String.fromCodePoint(i)); + } + } + return 1048576; +} +function M(e, t) { + !(e.flags & 1) && (e.getToken() & 1048576) !== 1048576 && e.report(30, B[e.getToken() & 255]), C(e, t, 1074790417) || e.options.onInsertedSemicolon?.(e.startIndex); +} +function Pt(e, t, n, u) { + return t - n < 13 && u === "use strict" && ((e.getToken() & 1048576) === 1048576 || e.flags & 1) ? 1 : 0; +} +function Qe(e, t, n) { + return e.getToken() !== n ? 0 : (r(e, t), 1); +} +function C(e, t, n) { + return e.getToken() !== n ? !1 : (r(e, t), !0); +} +function y(e, t, n) { + e.getToken() !== n && e.report(25, B[n & 255]), r(e, t); +} +function K(e, t) { + switch (t.type) { + case "ArrayExpression": { + t.type = "ArrayPattern"; + let { elements: n } = t; + for (let u = 0, o = n.length; u < o; ++u) { + let i = n[u]; + i && K(e, i); + } + return; + } + case "ObjectExpression": { + t.type = "ObjectPattern"; + let { properties: n } = t; + for (let u = 0, o = n.length; u < o; ++u) K(e, n[u]); + return; + } + case "AssignmentExpression": + t.type = "AssignmentPattern", t.operator !== "=" && e.report(71), delete t.operator, K(e, t.left); + return; + case "Property": + K(e, t.value); + return; + case "SpreadElement": t.type = "RestElement", K(e, t.argument); + } +} +function Be(e, t, n, u, o) { + t & 1 && ((u & 36864) === 36864 && e.report(118), !o && (u & 537079808) === 537079808 && e.report(119)), ((u & 20480) === 20480 || u === -2147483528) && e.report(102), n & 24 && (u & 255) === 73 && e.report(100), t & 2050 && u === 209006 && e.report(110), t & 1025 && u === 241771 && e.report(97, "yield"); +} +function Ot(e, t, n) { + t & 1 && ((n & 36864) === 36864 && e.report(118), (n & 537079808) === 537079808 && e.report(119), n === -2147483527 && e.report(95), n === -2147483528 && e.report(95)), (n & 20480) === 20480 && e.report(102), t & 2050 && n === 209006 && e.report(110), t & 1025 && n === 241771 && e.report(97, "yield"); +} +function Vt(e, t, n) { + return n === 209006 && (t & 2050 && e.report(110), e.destructible |= 128), n === 241771 && t & 1024 && e.report(97, "yield"), (n & 20480) === 20480 || (n & 36864) === 36864 || n == -2147483527; +} +function tn(e) { + return e.property ? e.property.type === "PrivateIdentifier" : !1; +} +function Rt(e, t, n, u) { + for (; t;) { + if (t["$" + n]) return u && e.report(137), 1; + u && t.loop && (u = 0), t = t.$; + } + return 0; +} +function nn(e, t, n) { + let u = t; + for (; u;) u["$" + n] && e.report(136, n), u = u.$; + t["$" + n] = 1; +} +function Fe(e) { + switch (e.type) { + case "JSXIdentifier": return e.name; + case "JSXNamespacedName": return e.namespace + ":" + e.name; + case "JSXMemberExpression": return Fe(e.object) + "." + Fe(e.property); + } +} +function ge(e, t) { + return e & 1025 ? e & 2 && t === 209006 || e & 1024 && t === 241771 ? !1 : (t & 12288) === 12288 : (t & 12288) === 12288 || (t & 36864) === 36864; +} +function Ie(e, t, n) { + (n & 537079808) === 537079808 && (t & 1 && e.report(119), e.flags |= 512), ge(t, n) || e.report(0); +} +function un(e, t) { + return e.startIndex = e.tokenIndex = e.index, e.startColumn = e.tokenColumn = e.column, e.startLine = e.tokenLine = e.line, e.setToken(S[e.currentChar] & 8192 ? on(e) : qt(e, t, 0)), e.getToken(); +} +function on(e) { + let t = e.currentChar, n = m(e), u = e.index; + for (; n !== t;) e.index >= e.end && e.report(16), n = m(e); + return n !== t && e.report(16), e.tokenValue = e.source.slice(u, e.index), m(e), e.options.raw && (e.tokenRaw = e.source.slice(e.tokenIndex, e.index)), 134283267; +} +function me(e) { + if (e.startIndex = e.tokenIndex = e.index, e.startColumn = e.tokenColumn = e.column, e.startLine = e.tokenLine = e.line, e.index >= e.end) { + e.setToken(1048576); + return; + } + if (e.currentChar === 60) { + m(e), e.setToken(8456256); + return; + } + if (e.currentChar === 123) { + m(e), e.setToken(2162700); + return; + } + let t = 0; + for (; e.index < e.end;) { + let u = S[e.source.charCodeAt(e.index)]; + if (u & 1024 ? (t |= 5, te(e)) : u & 2048 ? ($e(e, t), t = t & -5 | 1) : m(e), S[e.currentChar] & 16384) break; + } + e.tokenIndex === e.index && e.report(0); + let n = e.source.slice(e.tokenIndex, e.index); + e.options.raw && (e.tokenRaw = n), e.tokenValue = n, e.setToken(137); +} +function Ue(e) { + if ((e.getToken() & 143360) === 143360) { + let { index: t } = e, n = e.currentChar; + for (; S[n] & 32770;) n = m(e); + e.tokenValue += e.source.slice(t, e.index), e.setToken(208897, !0); + } + return e.getToken(); +} +function ln(e) { + let t = { + validateRegex: !0, + ...e + }; + return t.module && !t.sourceType && (t.sourceType = "module"), t.globalReturn && (!t.sourceType || t.sourceType === "script") && (t.sourceType = "commonjs"), t; +} +function qe(e, t, n) { + let u = e.createScope().createChildScope(512); + return u.addBlockName(t, n, 1, 0), u; +} +function fn(e, t) { + return function(n, u, o, i, l) { + let f = { + type: n, + value: u + }; + t.ranges && (f.start = o, f.end = i, f.range = [o, i]), t.loc && (f.loc = l), e.push(f); + }; +} +function cn(e, t) { + return function(n, u, o, i) { + let l = { token: n }; + t.ranges && (l.start = u, l.end = o, l.range = [u, o]), t.loc && (l.loc = i), e.push(l); + }; +} +function sn(e, t = {}, n = 0) { + let u = new Xe(e, t); + u.options.sourceType === "module" && (n |= 3), u.options.sourceType === "commonjs" && (n |= 69632), u.options.impliedStrict && (n |= 1), H2(u); + let o = u.createScopeIfLexical(), i = [], l = "script"; + if (n & 2) { + if (l = "module", i = an(u, n | 8, o), o) for (let f of u.exportedBindings) o.hasVariable(f) || u.report(148, f); + } else i = dn(u, n | 8, o); + return u.finishNode({ + type: "Program", + sourceType: l, + body: i + }, { + index: 0, + line: 1, + column: 0 + }, u.currentLocation); +} +function dn(e, t, n) { + r(e, t | 262176); + let u = []; + for (; e.getToken() === 134283267;) { + let { index: o, tokenValue: i, tokenStart: l, tokenIndex: f } = e, c = e.getToken(), g = O(e, t); + if (Pt(e, o, f, i)) { + if (t |= 1, e.flags & 64) throw new q(e.tokenStart, e.currentLocation, 9); + if (e.flags & 4096) throw new q(e.tokenStart, e.currentLocation, 15); + } + u.push(Ge(e, t, g, c, l)); + } + for (; e.getToken() !== 1048576;) u.push(re(e, t, n, void 0, 4, {})); + return u; +} +function an(e, t, n) { + r(e, t | 32); + let u = []; + for (; e.getToken() === 134283267;) { + let { tokenStart: o } = e, i = e.getToken(); + u.push(Ge(e, t, O(e, t), i, o)); + } + for (; e.getToken() !== 1048576;) u.push(gn(e, t, n)); + return u; +} +function gn(e, t, n) { + e.getToken() === 132 && Object.assign(e.leadingDecorators, { + start: e.tokenStart, + decorators: Ve(e, t, void 0) + }); + let u; + switch (e.getToken()) { + case 20564: + u = Pn(e, t, n); + break; + case 86106: + u = In(e, t, n); + break; + default: u = re(e, t, n, void 0, 4, {}); + } + return e.leadingDecorators?.decorators.length && e.report(170), u; +} +function re(e, t, n, u, o, i) { + let l = e.tokenStart; + switch (e.getToken()) { + case 86104: return x(e, t, n, u, o, 1, 0, 0, l); + case 132: + case 86094: return ze(e, t, n, u, 0); + case 86090: return je(e, t, n, u, 16, 0); + case 241737: return Nn(e, t, n, u, o); + case 20564: e.report(103, "export"); + case 86106: switch (r(e, t), e.getToken()) { + case 67174411: return _t(e, t, u, l); + case 67108877: return Jt(e, t, l); + default: e.report(103, "import"); + } + case 209005: return Mt(e, t, n, u, o, i, 1); + default: return he(e, t, n, u, o, i, 1); + } +} +function he(e, t, n, u, o, i, l) { + switch (e.getToken()) { + case 86088: return vt(e, t, n, u, 0); + case 20572: return rn(e, t, u); + case 20569: return yn(e, t, n, u, i); + case 20567: return Ln(e, t, n, u, i); + case 20562: return Fn(e, t, n, u, i); + case 20578: return Tn(e, t, n, u, i); + case 86110: return An(e, t, n, u, i); + case 1074790417: return hn(e, t); + case 2162700: return ae(e, t, n?.createChildScope(), u, i, e.tokenStart); + case 86112: return kn(e, t, u); + case 20555: return Dn(e, t, i); + case 20559: return bn(e, t, i); + case 20577: return wn(e, t, n, u, i); + case 20579: return Cn(e, t, n, u, i); + case 20560: return En(e, t); + case 209005: return Mt(e, t, n, u, o, i, 0); + case 20557: e.report(162); + case 20566: e.report(163); + case 86104: e.report(t & 1 ? 76 : e.options.webcompat ? 77 : 78); + case 86094: e.report(79); + default: return mn(e, t, n, u, o, i, l); + } +} +function mn(e, t, n, u, o, i, l) { + let { tokenValue: f, tokenStart: c } = e, g = e.getToken(), d; + switch (g) { + case 241737: + d = N(e, t), t & 1 && e.report(85), e.getToken() === 69271571 && e.report(84); + break; + default: d = U(e, t, u, 2, 0, 1, 0, 1, e.tokenStart); + } + return g & 143360 && e.getToken() === 21 ? Ze(e, t, n, u, o, i, f, d, g, l, c) : (d = F(e, t, u, d, 0, 0, c), d = I(e, t, u, 0, 0, c, d), e.getToken() === 18 && (d = W(e, t, u, 0, c, d)), ie(e, t, d, c)); +} +function ae(e, t, n, u, o, i = e.tokenStart, l = "BlockStatement") { + let f = []; + for (y(e, t | 32, 2162700); e.getToken() !== 1074790415;) f.push(re(e, t, n, u, 2, { $: o })); + return y(e, t | 32, 1074790415), e.finishNode({ + type: l, + body: f + }, i); +} +function rn(e, t, n) { + !(t & 4096) && e.report(92); + let u = e.tokenStart; + r(e, t | 32); + let o = e.flags & 1 || e.getToken() & 1048576 ? null : V(e, t, n, 0, 1, e.tokenStart); + return M(e, t | 32), e.finishNode({ + type: "ReturnStatement", + argument: o + }, u); +} +function ie(e, t, n, u) { + return M(e, t | 32), e.finishNode({ + type: "ExpressionStatement", + expression: n + }, u); +} +function Ze(e, t, n, u, o, i, l, f, c, g, d) { + Be(e, t, 0, c, 1), nn(e, i, l), r(e, t | 32); + let a = g && (t & 1) === 0 && e.options.webcompat && e.getToken() === 86104 ? x(e, t, n?.createChildScope(), u, o, 0, 0, 0, e.tokenStart) : he(e, t, n, u, o, i, g); + return e.finishNode({ + type: "LabeledStatement", + label: f, + body: a + }, d); +} +function Mt(e, t, n, u, o, i, l) { + let { tokenValue: f, tokenStart: c } = e, g = e.getToken(), d = N(e, t); + if (e.getToken() === 21) return Ze(e, t, n, u, o, i, f, d, g, 1, c); + let a = e.flags & 1; + if (!a) { + if (e.getToken() === 86104) return l || e.report(123), x(e, t, n, u, o, 1, 0, 1, c); + if (ge(t, e.getToken())) return d = Wt(e, t, u, 1, c), e.getToken() === 18 && (d = W(e, t, u, 0, c, d)), ie(e, t, d, c); + } + return e.getToken() === 67174411 ? d = ut(e, t, u, d, 1, 1, 0, a, c) : (e.getToken() === 10 && (Ie(e, t, g), (g & 36864) === 36864 && (e.flags |= 256), d = Oe(e, t | 2048, u, e.tokenValue, d, 0, 1, 0, c)), e.assignable = 1), d = F(e, t, u, d, 0, 0, c), d = I(e, t, u, 0, 0, c, d), e.assignable = 1, e.getToken() === 18 && (d = W(e, t, u, 0, c, d)), ie(e, t, d, c); +} +function Ge(e, t, n, u, o) { + let i = e.startIndex; + u !== 1074790417 && (e.assignable = 2, n = F(e, t, void 0, n, 0, 0, o), e.getToken() !== 1074790417 && (n = I(e, t, void 0, 0, 0, o, n), e.getToken() === 18 && (n = W(e, t, void 0, 0, o, n))), M(e, t | 32)); + let l = { + type: "ExpressionStatement", + expression: n + }; + return n.type === "Literal" && typeof n.value == "string" && (l.directive = e.source.slice(o.index + 1, i - 1)), e.finishNode(l, o); +} +function hn(e, t) { + let n = e.tokenStart; + return r(e, t | 32), e.finishNode({ type: "EmptyStatement" }, n); +} +function kn(e, t, n) { + let u = e.tokenStart; + r(e, t | 32), e.flags & 1 && e.report(90); + let o = V(e, t, n, 0, 1, e.tokenStart); + return M(e, t | 32), e.finishNode({ + type: "ThrowStatement", + argument: o + }, u); +} +function yn(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t), y(e, t | 32, 67174411), e.assignable = 1; + let l = V(e, t, u, 0, 1, e.tokenStart); + y(e, t | 32, 16); + let f = yt(e, t, n, u, o), c = null; + return e.getToken() === 20563 && (r(e, t | 32), c = yt(e, t, n, u, o)), e.finishNode({ + type: "IfStatement", + test: l, + consequent: f, + alternate: c + }, i); +} +function yt(e, t, n, u, o) { + let { tokenStart: i } = e; + return t & 1 || !e.options.webcompat || e.getToken() !== 86104 ? he(e, t, n, u, 0, { $: o }, 0) : x(e, t, n?.createChildScope(), u, 0, 0, 0, 0, i); +} +function An(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t), y(e, t | 32, 67174411); + let l = V(e, t, u, 0, 1, e.tokenStart); + y(e, t, 16), y(e, t, 2162700); + let f = [], c = 0; + for (n = n?.createChildScope(8); e.getToken() !== 1074790415;) { + let { tokenStart: g } = e, d = null, a = []; + for (C(e, t | 32, 20556) ? d = V(e, t, u, 0, 1, e.tokenStart) : (y(e, t | 32, 20561), c && e.report(89), c = 1), y(e, t | 32, 21); e.getToken() !== 20556 && e.getToken() !== 1074790415 && e.getToken() !== 20561;) a.push(re(e, t | 4, n, u, 2, { $: o })); + f.push(e.finishNode({ + type: "SwitchCase", + test: d, + consequent: a + }, g)); + } + return y(e, t | 32, 1074790415), e.finishNode({ + type: "SwitchStatement", + discriminant: l, + cases: f + }, i); +} +function Tn(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t), y(e, t | 32, 67174411); + let l = V(e, t, u, 0, 1, e.tokenStart); + y(e, t | 32, 16); + let f = de(e, t, n, u, o); + return e.finishNode({ + type: "WhileStatement", + test: l, + body: f + }, i); +} +function de(e, t, n, u, o) { + return he(e, (t | 131072) ^ 131072 | 128, n, u, 0, { + loop: 1, + $: o + }, 0); +} +function bn(e, t, n) { + !(t & 128) && e.report(68); + let u = e.tokenStart; + r(e, t); + let o = null; + if ((e.flags & 1) === 0 && e.getToken() & 143360) { + let { tokenValue: i } = e; + o = N(e, t | 32), Rt(e, n, i, 1) || e.report(138, i); + } + return M(e, t | 32), e.finishNode({ + type: "ContinueStatement", + label: o + }, u); +} +function Dn(e, t, n) { + let u = e.tokenStart; + r(e, t | 32); + let o = null; + if ((e.flags & 1) === 0 && e.getToken() & 143360) { + let { tokenValue: i } = e; + o = N(e, t | 32), Rt(e, n, i, 0) || e.report(138, i); + } else !(t & 132) && e.report(69); + return M(e, t | 32), e.finishNode({ + type: "BreakStatement", + label: o + }, u); +} +function Cn(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t), t & 1 && e.report(91), y(e, t | 32, 67174411); + let l = V(e, t, u, 0, 1, e.tokenStart); + y(e, t | 32, 16); + let f = he(e, t, n, u, 2, o, 0); + return e.finishNode({ + type: "WithStatement", + object: l, + body: f + }, i); +} +function En(e, t) { + let n = e.tokenStart; + return r(e, t | 32), M(e, t | 32), e.finishNode({ type: "DebuggerStatement" }, n); +} +function wn(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t | 32); + let l = n?.createChildScope(16), f = ae(e, t, l, u, { $: o }), { tokenStart: c } = e, g = C(e, t | 32, 20557) ? Sn(e, t, n, u, o, c) : null, d = null; + if (e.getToken() === 20566) { + r(e, t | 32); + let a = n?.createChildScope(4); + d = ae(e, t, a, u, { $: o }); + } + return !g && !d && e.report(88), e.finishNode({ + type: "TryStatement", + block: f, + handler: g, + finalizer: d + }, i); +} +function Sn(e, t, n, u, o, i) { + let l = null, f = n; + C(e, t, 67174411) && (n = n?.createChildScope(4), l = Zt(e, t, n, u, (e.getToken() & 2097152) === 2097152 ? 256 : 512, 0), e.getToken() === 18 ? e.report(86) : e.getToken() === 1077936155 && e.report(87), y(e, t | 32, 16)), f = n?.createChildScope(32); + let c = ae(e, t, f, u, { $: o }); + return e.finishNode({ + type: "CatchClause", + param: l, + body: c + }, i); +} +function Bn(e, t, n, u, o) { + n = n?.createChildScope(); + let i = 5764; + return t = (t | i) ^ i | 592128, ae(e, t, n, u, {}, o, "StaticBlock"); +} +function Fn(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t | 32); + let l = de(e, t, n, u, o); + y(e, t, 20578), y(e, t | 32, 67174411); + let f = V(e, t, u, 0, 1, e.tokenStart); + return y(e, t | 32, 16), C(e, t | 32, 1074790417), e.finishNode({ + type: "DoWhileStatement", + body: l, + test: f + }, i); +} +function Nn(e, t, n, u, o) { + let { tokenValue: i, tokenStart: l } = e, f = e.getToken(), c = N(e, t); + if (e.getToken() & 2240512) { + let g = ue(e, t, n, u, 8, 0); + return M(e, t | 32), e.finishNode({ + type: "VariableDeclaration", + kind: "let", + declarations: g + }, l); + } + if (e.assignable = 1, t & 1 && e.report(85), e.getToken() === 21) return Ze(e, t, n, u, o, {}, i, c, f, 0, l); + if (e.getToken() === 10) { + let g; + e.options.lexical && (g = qe(e, t, i)), e.flags = (e.flags | 128) ^ 128, c = ke(e, t, g, u, [c], 0, l); + } else c = F(e, t, u, c, 0, 0, l), c = I(e, t, u, 0, 0, l, c); + return e.getToken() === 18 && (c = W(e, t, u, 0, l, c)), ie(e, t, c, l); +} +function je(e, t, n, u, o, i) { + let l = e.tokenStart; + r(e, t); + let f = ue(e, t, n, u, o, i); + return M(e, t | 32), e.finishNode({ + type: "VariableDeclaration", + kind: o & 8 ? "let" : "const", + declarations: f + }, l); +} +function vt(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t); + let l = ue(e, t, n, u, 4, o); + return M(e, t | 32), e.finishNode({ + type: "VariableDeclaration", + kind: "var", + declarations: l + }, i); +} +function ue(e, t, n, u, o, i) { + let l = 1, f = [At(e, t, n, u, o, i)]; + for (; C(e, t, 18);) l++, f.push(At(e, t, n, u, o, i)); + return l > 1 && i & 32 && e.getToken() & 262144 && e.report(61, B[e.getToken() & 255]), f; +} +function At(e, t, n, u, o, i) { + let { tokenStart: l } = e, f = e.getToken(), c = null, g = Zt(e, t, n, u, o, i); + if (e.getToken() === 1077936155) { + if (r(e, t | 32), c = L(e, t, u, 1, 0, e.tokenStart), (i & 32 || (f & 2097152) === 0) && (e.getToken() === 471156 || e.getToken() === 8673330 && (f & 2097152 || (o & 4) === 0 || t & 1))) throw new q(l, e.currentLocation, 60, e.getToken() === 471156 ? "of" : "in"); + } else (o & 16 || (f & 2097152) > 0) && (e.getToken() & 262144) !== 262144 && e.report(59, o & 16 ? "const" : "destructuring"); + return e.finishNode({ + type: "VariableDeclarator", + id: g, + init: c + }, l); +} +function Ln(e, t, n, u, o) { + let i = e.tokenStart; + r(e, t); + let l = ((t & 2048) > 0 || (t & 2) > 0 && (t & 8) > 0) && C(e, t, 209006); + y(e, t | 32, 67174411), n = n?.createChildScope(1); + let f = null, c = null, g = 0, d = null, a = e.getToken() === 86088 || e.getToken() === 241737 || e.getToken() === 86090, h, { tokenStart: A } = e, b = e.getToken(); + if (a) b === 241737 ? (d = N(e, t), e.getToken() & 2240512 ? (e.getToken() === 8673330 ? t & 1 && e.report(67) : d = e.finishNode({ + type: "VariableDeclaration", + kind: "let", + declarations: ue(e, t | 131072, n, u, 8, 32) + }, A), e.assignable = 1) : t & 1 ? e.report(67) : (a = !1, e.assignable = 1, d = F(e, t, u, d, 0, 0, A), e.getToken() === 471156 && e.report(115))) : (r(e, t), d = e.finishNode(b === 86088 ? { + type: "VariableDeclaration", + kind: "var", + declarations: ue(e, t | 131072, n, u, 4, 32) + } : { + type: "VariableDeclaration", + kind: "const", + declarations: ue(e, t | 131072, n, u, 16, 32) + }, A), e.assignable = 1); + else if (b === 1074790417) l && e.report(82); + else if ((b & 2097152) === 2097152) { + let T = e.tokenStart; + d = b === 2162700 ? j(e, t, void 0, u, 1, 0, 0, 2, 32) : X(e, t, void 0, u, 1, 0, 0, 2, 32), g = e.destructible, g & 64 && e.report(63), e.assignable = g & 16 ? 2 : 1, d = F(e, t | 131072, u, d, 0, 0, T); + } else d = _(e, t | 131072, u, 1, 0, 1); + if ((e.getToken() & 262144) === 262144) { + if (e.getToken() === 471156) { + e.assignable & 2 && e.report(80, l ? "await" : "of"), K(e, d), r(e, t | 32), h = L(e, t, u, 1, 0, e.tokenStart), y(e, t | 32, 16); + let D = de(e, t, n, u, o); + return e.finishNode({ + type: "ForOfStatement", + left: d, + right: h, + body: D, + await: l + }, i); + } + e.assignable & 2 && e.report(80, "in"), K(e, d), r(e, t | 32), l && e.report(82), h = V(e, t, u, 0, 1, e.tokenStart), y(e, t | 32, 16); + let T = de(e, t, n, u, o); + return e.finishNode({ + type: "ForInStatement", + body: T, + left: d, + right: h + }, i); + } + l && e.report(82), a || (g & 8 && e.getToken() !== 1077936155 && e.report(80, "loop"), d = I(e, t | 131072, u, 0, 0, A, d)), e.getToken() === 18 && (d = W(e, t, u, 0, A, d)), y(e, t | 32, 1074790417), e.getToken() !== 1074790417 && (f = V(e, t, u, 0, 1, e.tokenStart)), y(e, t | 32, 1074790417), e.getToken() !== 16 && (c = V(e, t, u, 0, 1, e.tokenStart)), y(e, t | 32, 16); + let w = de(e, t, n, u, o); + return e.finishNode({ + type: "ForStatement", + init: d, + test: f, + update: c, + body: w + }, i); +} +function Ut(e, t, n) { + return ge(t, e.getToken()) || e.report(118), (e.getToken() & 537079808) === 537079808 && e.report(119), n?.addBlockName(t, e.tokenValue, 8, 0), N(e, t); +} +function In(e, t, n) { + let u = e.tokenStart; + r(e, t); + let o = null, { tokenStart: i } = e, l = []; + if (e.getToken() === 134283267) o = O(e, t); + else { + if (e.getToken() & 143360) { + let g = Ut(e, t, n); + if (l = [e.finishNode({ + type: "ImportDefaultSpecifier", + local: g + }, i)], C(e, t, 18)) switch (e.getToken()) { + case 8391476: + l.push(Tt(e, t, n)); + break; + case 2162700: + bt(e, t, n, l); + break; + default: e.report(107); + } + } else switch (e.getToken()) { + case 8391476: + l = [Tt(e, t, n)]; + break; + case 2162700: + bt(e, t, n, l); + break; + case 67174411: return _t(e, t, void 0, u); + case 67108877: return Jt(e, t, u); + default: e.report(30, B[e.getToken() & 255]); + } + o = qn(e, t); + } + let f = He(e, t), c = { + type: "ImportDeclaration", + specifiers: l, + source: o, + attributes: f + }; + return M(e, t | 32), e.finishNode(c, u); +} +function Tt(e, t, n) { + let { tokenStart: u } = e; + if (r(e, t), y(e, t, 77932), (e.getToken() & 134217728) === 134217728) throw new q(u, e.currentLocation, 30, B[e.getToken() & 255]); + return e.finishNode({ + type: "ImportNamespaceSpecifier", + local: Ut(e, t, n) + }, u); +} +function qn(e, t) { + return y(e, t, 209011), e.getToken() !== 134283267 && e.report(105, "Import"), O(e, t); +} +function bt(e, t, n, u) { + for (r(e, t); e.getToken() & 143360 || e.getToken() === 134283267;) { + let { tokenValue: o, tokenStart: i } = e, l = e.getToken(), f = Ce(e, t), c; + C(e, t, 77932) ? ((e.getToken() & 134217728) === 134217728 || e.getToken() === 18 ? e.report(106) : Be(e, t, 16, e.getToken(), 0), o = e.tokenValue, c = N(e, t)) : f.type === "Identifier" ? (Be(e, t, 16, l, 0), c = e.cloneIdentifier(f)) : e.report(25, B[108]), n?.addBlockName(t, o, 8, 0), u.push(e.finishNode({ + type: "ImportSpecifier", + local: c, + imported: f + }, i)), e.getToken() !== 1074790415 && y(e, t, 18); + } + return y(e, t, 1074790415), u; +} +function Jt(e, t, n) { + let u = Xt(e, t, e.finishNode({ + type: "Identifier", + name: "import" + }, n), n); + return u = F(e, t, void 0, u, 0, 0, n), u = I(e, t, void 0, 0, 0, n, u), e.getToken() === 18 && (u = W(e, t, void 0, 0, n, u)), ie(e, t, u, n); +} +function _t(e, t, n, u) { + let o = jt(e, t, n, 0, u); + return o = F(e, t, n, o, 0, 0, u), e.getToken() === 18 && (o = W(e, t, n, 0, u, o)), ie(e, t, o, u); +} +function Pn(e, t, n) { + let u = e.leadingDecorators.decorators.length ? e.leadingDecorators.start : e.tokenStart; + r(e, t | 32); + let o = [], i = null, l = null, f = []; + if (C(e, t | 32, 20561)) { + switch (e.getToken()) { + case 86104: + i = x(e, t, n, void 0, 4, 1, 1, 0, e.tokenStart); + break; + case 132: + case 86094: + i = ze(e, t, n, void 0, 1); + break; + case 209005: { + let { tokenStart: g } = e; + i = N(e, t); + let { flags: d } = e; + !(d & 1) && (e.getToken() === 86104 ? i = x(e, t, n, void 0, 4, 1, 1, 1, g) : e.getToken() === 67174411 ? (i = ut(e, t, void 0, i, 1, 1, 0, d, g), i = F(e, t, void 0, i, 0, 0, g), i = I(e, t, void 0, 0, 0, g, i)) : e.getToken() & 143360 && (n && (n = qe(e, t, e.tokenValue)), i = N(e, t), i = ke(e, t, n, void 0, [i], 1, g))); + break; + } + default: i = L(e, t, void 0, 1, 0, e.tokenStart), M(e, t | 32); + } + return n && e.declareUnboundVariable("default"), e.finishNode({ + type: "ExportDefaultDeclaration", + declaration: i + }, u); + } + switch (e.getToken()) { + case 8391476: { + r(e, t); + let g = null; + C(e, t, 77932) && (n && e.declareUnboundVariable(e.tokenValue), g = Ce(e, t)), y(e, t, 209011), e.getToken() !== 134283267 && e.report(105, "Export"), l = O(e, t); + let a = He(e, t), h = { + type: "ExportAllDeclaration", + source: l, + exported: g, + attributes: a + }; + return M(e, t | 32), e.finishNode(h, u); + } + case 2162700: { + r(e, t); + let g = [], d = [], a = 0; + for (; e.getToken() & 143360 || e.getToken() === 134283267;) { + let { tokenStart: h, tokenValue: A } = e, b = Ce(e, t); + b.type === "Literal" && (a = 1); + let w; + e.getToken() === 77932 ? (r(e, t), !(e.getToken() & 143360) && e.getToken() !== 134283267 && e.report(106), n && (g.push(e.tokenValue), d.push(A)), w = Ce(e, t)) : (n && (g.push(e.tokenValue), d.push(e.tokenValue)), w = b.type === "Literal" ? e.cloneStringLiteral(b) : e.cloneIdentifier(b)), o.push(e.finishNode({ + type: "ExportSpecifier", + local: b, + exported: w + }, h)), e.getToken() !== 1074790415 && y(e, t, 18); + } + y(e, t, 1074790415), C(e, t, 209011) ? (e.getToken() !== 134283267 && e.report(105, "Export"), l = O(e, t), f = He(e, t), n && g.forEach((h) => e.declareUnboundVariable(h))) : (a && e.report(172), n && (g.forEach((h) => e.declareUnboundVariable(h)), d.forEach((h) => e.addBindingToExports(h)))), M(e, t | 32); + break; + } + case 132: + case 86094: + i = ze(e, t, n, void 0, 2); + break; + case 86104: + i = x(e, t, n, void 0, 4, 1, 2, 0, e.tokenStart); + break; + case 241737: + i = je(e, t, n, void 0, 8, 64); + break; + case 86090: + i = je(e, t, n, void 0, 16, 64); + break; + case 86088: + i = vt(e, t, n, void 0, 64); + break; + case 209005: { + let { tokenStart: g } = e; + if (r(e, t), (e.flags & 1) === 0 && e.getToken() === 86104) { + i = x(e, t, n, void 0, 4, 1, 2, 1, g); + break; + } + } + default: e.report(30, B[e.getToken() & 255]); + } + let c = { + type: "ExportNamedDeclaration", + declaration: i, + specifiers: o, + source: l, + attributes: f + }; + return e.finishNode(c, u); +} +function L(e, t, n, u, o, i) { + let l = U(e, t, n, 2, 0, u, o, 1, i); + return l = F(e, t, n, l, o, 0, i), I(e, t, n, o, 0, i, l); +} +function W(e, t, n, u, o, i) { + let l = [i]; + for (; C(e, t | 32, 18);) l.push(L(e, t, n, 1, u, e.tokenStart)); + return e.finishNode({ + type: "SequenceExpression", + expressions: l + }, o); +} +function V(e, t, n, u, o, i) { + let l = L(e, t, n, o, u, i); + return e.getToken() === 18 ? W(e, t, n, u, i, l) : l; +} +function I(e, t, n, u, o, i, l) { + let f = e.getToken(); + if ((f & 4194304) === 4194304) { + e.assignable & 2 && e.report(26), (!o && f === 1077936155 && l.type === "ArrayExpression" || l.type === "ObjectExpression") && K(e, l), r(e, t | 32); + let c = L(e, t, n, 1, u, e.tokenStart); + return e.assignable = 2, e.finishNode(o ? { + type: "AssignmentPattern", + left: l, + right: c + } : { + type: "AssignmentExpression", + left: l, + operator: B[f & 255], + right: c + }, i); + } + return (f & 8388608) === 8388608 && (l = G(e, t, n, u, i, 4, f, l)), C(e, t | 32, 22) && (l = ee(e, t, n, l, i)), l; +} +function be(e, t, n, u, o, i, l) { + let f = e.getToken(); + r(e, t | 32); + let c = L(e, t, n, 1, u, e.tokenStart); + return l = e.finishNode(o ? { + type: "AssignmentPattern", + left: l, + right: c + } : { + type: "AssignmentExpression", + left: l, + operator: B[f & 255], + right: c + }, i), e.assignable = 2, l; +} +function ee(e, t, n, u, o) { + let i = L(e, (t | 131072) ^ 131072, n, 1, 0, e.tokenStart); + y(e, t | 32, 21), e.assignable = 1; + let l = L(e, t, n, 1, 0, e.tokenStart); + return e.assignable = 2, e.finishNode({ + type: "ConditionalExpression", + test: u, + consequent: i, + alternate: l + }, o); +} +function G(e, t, n, u, o, i, l, f) { + let c = -((t & 131072) > 0) & 8673330, g, d; + for (e.assignable = 2; e.getToken() & 8388608 && (g = e.getToken(), d = g & 3840, (g & 524288 && l & 268435456 || l & 524288 && g & 268435456) && e.report(165), !(d + ((g === 8391735) << 8) - ((c === g) << 12) <= i));) r(e, t | 32), f = e.finishNode({ + type: g & 524288 || g & 268435456 ? "LogicalExpression" : "BinaryExpression", + left: f, + right: G(e, t, n, u, e.tokenStart, d, g, _(e, t, n, 0, u, 1)), + operator: B[g & 255] + }, o); + return e.getToken() === 1077936155 && e.report(26), f; +} +function On(e, t, n, u, o) { + u || e.report(0); + let { tokenStart: i } = e, l = e.getToken(); + r(e, t | 32); + let f = _(e, t, n, 0, o, 1); + return e.getToken() === 8391735 && e.report(33), t & 1 && l === 16863276 && (f.type === "Identifier" ? e.report(121) : tn(f) && e.report(127)), e.assignable = 2, e.finishNode({ + type: "UnaryExpression", + operator: B[l & 255], + argument: f, + prefix: !0 + }, i); +} +function Vn(e, t, n, u, o, i, l, f) { + let c = e.getToken(), g = N(e, t), { flags: d } = e; + if ((d & 1) === 0) { + if (e.getToken() === 86104) return zt(e, t, n, 1, u, f); + if (ge(t, e.getToken())) return o || e.report(0), (e.getToken() & 36864) === 36864 && (e.flags |= 256), Wt(e, t, n, i, f); + } + return !l && e.getToken() === 67174411 ? ut(e, t, n, g, i, 1, 0, d, f) : e.getToken() === 10 ? (Ie(e, t, c), l && e.report(51), (c & 36864) === 36864 && (e.flags |= 256), Oe(e, t, n, e.tokenValue, g, l, i, 0, f)) : (e.assignable = 1, g); +} +function Rn(e, t, n, u, o, i) { + if (u && (e.destructible |= 256), t & 1024) { + r(e, t | 32), t & 8192 && e.report(32), o || e.report(26), e.getToken() === 22 && e.report(124); + let l = null, f = !1; + return (e.flags & 1) === 0 ? (f = C(e, t | 32, 8391476), (e.getToken() & 77824 || f) && (l = L(e, t, n, 1, 0, e.tokenStart))) : e.getToken() === 8391476 && e.report(30, B[e.getToken() & 255]), e.assignable = 2, e.finishNode({ + type: "YieldExpression", + argument: l, + delegate: f + }, i); + } + return t & 1 && e.report(97, "yield"), nt(e, t, n); +} +function Mn(e, t, n, u, o, i) { + o && (e.destructible |= 128), t & 524288 && e.report(177); + let l = nt(e, t, n); + if (l.type === "ArrowFunctionExpression" || (e.getToken() & 65536) === 0) { + if (t & 2048) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 176); + if (t & 2) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 110); + if (t & 8192 && t & 2048) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 110); + return l; + } + if (t & 8192) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 31); + if (t & 2048 || t & 2 && t & 8) { + if (u) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 0); + let c = _(e, t, n, 0, 0, 1); + return e.getToken() === 8391735 && e.report(33), e.assignable = 2, e.finishNode({ + type: "AwaitExpression", + argument: c + }, i); + } + if (t & 2) throw new q(i, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + }, 98); + return l; +} +function Pe(e, t, n, u, o, i, l) { + let { tokenStart: f } = e; + y(e, t | 32, 2162700); + let c = []; + if (e.getToken() !== 1074790415) { + for (; e.getToken() === 134283267;) { + let { index: g, tokenStart: d, tokenIndex: a, tokenValue: h } = e, A = e.getToken(), b = O(e, t); + if (Pt(e, g, a, h)) { + if (t |= 1, e.flags & 128) throw new q(d, e.currentLocation, 66); + if (e.flags & 64) throw new q(d, e.currentLocation, 9); + if (e.flags & 4096) throw new q(d, e.currentLocation, 15); + l?.reportScopeError(); + } + c.push(Ge(e, t, b, A, d)); + } + t & 1 && (i && ((i & 537079808) === 537079808 && e.report(119), (i & 36864) === 36864 && e.report(40)), e.flags & 512 && e.report(119), e.flags & 256 && e.report(118)); + } + for (e.flags = (e.flags | 4928) ^ 4928, e.destructible = (e.destructible | 256) ^ 256; e.getToken() !== 1074790415;) c.push(re(e, t, n, u, 4, {})); + return y(e, o & 24 ? t | 32 : t, 1074790415), e.flags &= -4289, e.getToken() === 1077936155 && e.report(26), e.finishNode({ + type: "BlockStatement", + body: c + }, f); +} +function vn(e, t) { + let { tokenStart: n } = e; + switch (r(e, t), e.getToken()) { + case 67108990: e.report(167); + case 67174411: + !(t & 512) && e.report(28), e.assignable = 2; + break; + case 69271571: + case 67108877: + !(t & 256) && e.report(29), e.assignable = 1; + break; + default: e.report(30, "super"); + } + return e.finishNode({ type: "Super" }, n); +} +function _(e, t, n, u, o, i) { + let l = e.tokenStart; + return F(e, t, n, U(e, t, n, 2, 0, u, o, i, l), o, 0, l); +} +function Un(e, t, n, u) { + e.assignable & 2 && e.report(55); + let o = e.getToken(); + return r(e, t), e.assignable = 2, e.finishNode({ + type: "UpdateExpression", + argument: n, + operator: B[o & 255], + prefix: !1 + }, u); +} +function F(e, t, n, u, o, i, l) { + if ((e.getToken() & 33619968) === 33619968 && (e.flags & 1) === 0) u = Un(e, t, u, l); + else if ((e.getToken() & 67108864) === 67108864) { + switch (t = (t | 131072) ^ 131072, e.getToken()) { + case 67108877: { + r(e, (t | 262152) ^ 8), t & 16 && e.getToken() === 130 && e.tokenValue === "super" && e.report(173), e.assignable = 1; + let f = xe(e, t | 64, n); + u = e.finishNode({ + type: "MemberExpression", + object: u, + computed: !1, + property: f, + optional: !1 + }, l); + break; + } + case 69271571: { + let f = !1; + (e.flags & 2048) === 2048 && (f = !0, e.flags = (e.flags | 2048) ^ 2048), r(e, t | 32); + let { tokenStart: c } = e, g = V(e, t, n, o, 1, c); + y(e, t, 20), e.assignable = 1, u = e.finishNode({ + type: "MemberExpression", + object: u, + computed: !0, + property: g, + optional: !1 + }, l), f && (e.flags |= 2048); + break; + } + case 67174411: { + if ((e.flags & 1024) === 1024) return e.flags = (e.flags | 1024) ^ 1024, u; + let f = !1; + (e.flags & 2048) === 2048 && (f = !0, e.flags = (e.flags | 2048) ^ 2048); + let c = tt(e, t, n, o); + e.assignable = 2, u = e.finishNode({ + type: "CallExpression", + callee: u, + arguments: c, + optional: !1 + }, l), f && (e.flags |= 2048); + break; + } + case 67108990: + r(e, (t | 262152) ^ 8), e.flags |= 2048, e.assignable = 2, u = Jn(e, t, n, u, l); + break; + default: (e.flags & 2048) === 2048 && e.report(166), e.assignable = 2, u = e.finishNode({ + type: "TaggedTemplateExpression", + tag: u, + quasi: e.getToken() === 67174408 ? et(e, t | 64, n) : pe(e, t) + }, l); + } + u = F(e, t, n, u, 0, 1, l); + } + return i === 0 && (e.flags & 2048) === 2048 && (e.flags = (e.flags | 2048) ^ 2048, u = e.finishNode({ + type: "ChainExpression", + expression: u + }, l)), u; +} +function Jn(e, t, n, u, o) { + let i = !1, l; + if ((e.getToken() === 69271571 || e.getToken() === 67174411) && (e.flags & 2048) === 2048 && (i = !0, e.flags = (e.flags | 2048) ^ 2048), e.getToken() === 69271571) { + r(e, t | 32); + let { tokenStart: f } = e, c = V(e, t, n, 0, 1, f); + y(e, t, 20), e.assignable = 2, l = e.finishNode({ + type: "MemberExpression", + object: u, + computed: !0, + optional: !0, + property: c + }, o); + } else if (e.getToken() === 67174411) { + let f = tt(e, t, n, 0); + e.assignable = 2, l = e.finishNode({ + type: "CallExpression", + callee: u, + arguments: f, + optional: !0 + }, o); + } else { + let f = xe(e, t, n); + e.assignable = 2, l = e.finishNode({ + type: "MemberExpression", + object: u, + computed: !1, + optional: !0, + property: f + }, o); + } + return i && (e.flags |= 2048), l; +} +function xe(e, t, n) { + return !(e.getToken() & 143360) && e.getToken() !== -2147483528 && e.getToken() !== -2147483527 && e.getToken() !== 130 && e.report(160), e.getToken() === 130 ? Le(e, t, n, 0) : N(e, t); +} +function _n(e, t, n, u, o, i) { + u && e.report(56), o || e.report(0); + let l = e.getToken(); + r(e, t | 32); + let f = _(e, t, n, 0, 0, 1); + return e.assignable & 2 && e.report(55), e.assignable = 2, e.finishNode({ + type: "UpdateExpression", + argument: f, + operator: B[l & 255], + prefix: !0 + }, i); +} +function U(e, t, n, u, o, i, l, f, c) { + if ((e.getToken() & 143360) === 143360) { + switch (e.getToken()) { + case 209006: return Mn(e, t, n, o, l, c); + case 241771: return Rn(e, t, n, l, i, c); + case 209005: return Vn(e, t, n, l, f, i, o, c); + } + let { tokenValue: g } = e, d = e.getToken(), a = N(e, t | 64); + return e.getToken() === 10 ? (f || e.report(0), Ie(e, t, d), (d & 36864) === 36864 && (e.flags |= 256), Oe(e, t, n, g, a, o, i, 0, c)) : (t & 16 && !(t & 32768) && !(t & 8192) && e.tokenValue === "arguments" && e.report(130), (d & 255) === 73 && (t & 1 && e.report(113), u & 24 && e.report(100)), e.assignable = t & 1 && (d & 537079808) === 537079808 ? 2 : 1, a); + } + if ((e.getToken() & 134217728) === 134217728) return O(e, t); + switch (e.getToken()) { + case 33619993: + case 33619994: return _n(e, t, n, o, f, c); + case 16863276: + case 16842798: + case 16842799: + case 25233968: + case 25233969: + case 16863275: + case 16863277: return On(e, t, n, f, l); + case 86104: return zt(e, t, n, 0, l, c); + case 2162700: return Yn(e, t, n, i ? 0 : 1, l); + case 69271571: return Wn(e, t, n, i ? 0 : 1, l); + case 67174411: return Zn(e, t | 64, n, i, 1, 0, c); + case 86021: + case 86022: + case 86023: return Kn(e, t); + case 86111: return $n(e, t); + case 65540: return pn(e, t); + case 132: + case 86094: return eu(e, t, n, l, c); + case 86109: return vn(e, t); + case 67174409: return pe(e, t); + case 67174408: return et(e, t, n); + case 86107: return Gn(e, t, n, l); + case 134283388: return Ht(e, t); + case 130: return Le(e, t, n, 0); + case 86106: return Xn(e, t, n, o, l, c); + case 8456256: if (e.options.jsx) return Re(e, t, n, 0, e.tokenStart); + default: + if (ge(t, e.getToken())) return nt(e, t, n); + e.report(30, B[e.getToken() & 255]); + } +} +function Xn(e, t, n, u, o, i) { + let l = N(e, t); + return e.getToken() === 67108877 ? Xt(e, t, l, i) : (u && e.report(142), l = jt(e, t, n, o, i), e.assignable = 2, F(e, t, n, l, o, 0, i)); +} +function Xt(e, t, n, u) { + !(t & 2) && e.report(169), r(e, t); + let o = e.getToken(); + return o !== 209030 && e.tokenValue !== "meta" ? e.report(174) : o & -2147483648 && e.report(175), e.assignable = 2, e.finishNode({ + type: "MetaProperty", + meta: n, + property: N(e, t) + }, u); +} +function jt(e, t, n, u, o) { + y(e, t | 32, 67174411), e.getToken() === 14 && e.report(143); + let i = L(e, t, n, 1, u, e.tokenStart), l = null; + if (e.getToken() === 18) { + if (y(e, t, 18), e.getToken() !== 16) l = L(e, (t | 131072) ^ 131072, n, 1, u, e.tokenStart); + C(e, t, 18); + } + let f = { + type: "ImportExpression", + source: i, + options: l + }; + return y(e, t, 16), e.finishNode(f, o); +} +function He(e, t) { + if (!C(e, t, 20579)) return []; + y(e, t, 2162700); + let n = [], u = /* @__PURE__ */ new Set(); + for (; e.getToken() !== 1074790415;) { + let o = e.tokenStart, i = Hn(e, t); + y(e, t, 21); + let l = jn(e, t), f = i.type === "Literal" ? i.value : i.name; + u.has(f) && e.report(145, `${f}`), u.add(f), n.push(e.finishNode({ + type: "ImportAttribute", + key: i, + value: l + }, o)), e.getToken() !== 1074790415 && y(e, t, 18); + } + return y(e, t, 1074790415), n; +} +function jn(e, t) { + if (e.getToken() === 134283267) return O(e, t); + e.report(30, B[e.getToken() & 255]); +} +function Hn(e, t) { + if (e.getToken() === 134283267) return O(e, t); + if (e.getToken() & 143360) return N(e, t); + e.report(30, B[e.getToken() & 255]); +} +function Ce(e, t) { + if (e.getToken() === 134283267) { + let n = e.tokenValue; + return mt(0, n) || e.report(171), O(e, t); + } else { + if (e.getToken() & 143360) return N(e, t); + e.report(30, B[e.getToken() & 255]); + } +} +function Ht(e, t) { + let { tokenRaw: n, tokenValue: u, tokenStart: o } = e; + r(e, t), e.assignable = 2; + let i = { + type: "Literal", + value: u, + bigint: String(u) + }; + return e.options.raw && (i.raw = n), e.finishNode(i, o); +} +function pe(e, t) { + e.assignable = 2; + let { tokenValue: n, tokenRaw: u, tokenStart: o } = e; + y(e, t, 67174409); + let i = [Ee(e, n, u, o, !0)]; + return e.finishNode({ + type: "TemplateLiteral", + expressions: [], + quasis: i + }, o); +} +function et(e, t, n) { + t = (t | 131072) ^ 131072; + let { tokenValue: u, tokenRaw: o, tokenStart: i } = e; + y(e, t & -65 | 32, 67174408); + let l = [Ee(e, u, o, i, !1)], f = [V(e, t & -65, n, 0, 1, e.tokenStart)]; + for (e.getToken() !== 1074790415 && e.report(83); e.setToken(p2(e, t), !0) !== 67174409;) { + let { tokenValue: c, tokenRaw: g, tokenStart: d } = e; + y(e, t & -65 | 32, 67174408), l.push(Ee(e, c, g, d, !1)), f.push(V(e, t, n, 0, 1, e.tokenStart)), e.getToken() !== 1074790415 && e.report(83); + } + { + let { tokenValue: c, tokenRaw: g, tokenStart: d } = e; + y(e, t, 67174409), l.push(Ee(e, c, g, d, !0)); + } + return e.finishNode({ + type: "TemplateLiteral", + expressions: f, + quasis: l + }, i); +} +function Ee(e, t, n, u, o) { + let i = e.finishNode({ + type: "TemplateElement", + value: { + cooked: t, + raw: n + }, + tail: o + }, u), l = o ? 1 : 2; + return e.options.ranges && (i.start += 1, i.range[0] += 1, i.end -= l, i.range[1] -= l), e.options.loc && (i.loc.start.column += 1, i.loc.end.column -= l), i; +} +function zn(e, t, n) { + let u = e.tokenStart; + t = (t | 131072) ^ 131072, y(e, t | 32, 14); + let o = L(e, t, n, 1, 0, e.tokenStart); + return e.assignable = 1, e.finishNode({ + type: "SpreadElement", + argument: o + }, u); +} +function tt(e, t, n, u) { + r(e, t | 32); + let o = []; + if (e.getToken() === 16) return r(e, t | 64), o; + for (; e.getToken() !== 16 && (e.getToken() === 14 ? o.push(zn(e, t, n)) : o.push(L(e, t, n, 1, u, e.tokenStart)), !(e.getToken() !== 18 || (r(e, t | 32), e.getToken() === 16)));); + return y(e, t | 64, 16), o; +} +function N(e, t) { + let { tokenValue: n, tokenStart: u } = e; + return r(e, t | (n === "await" && (e.getToken() & -2147483648) === 0 ? 32 : 0)), e.finishNode({ + type: "Identifier", + name: n + }, u); +} +function O(e, t) { + let { tokenValue: n, tokenRaw: u, tokenStart: o } = e; + if (e.getToken() === 134283388) return Ht(e, t); + let i = { + type: "Literal", + value: n + }; + return e.options.raw && (i.raw = u), r(e, t), e.assignable = 2, e.finishNode(i, o); +} +function Kn(e, t) { + let n = e.tokenStart, u = B[e.getToken() & 255], i = { + type: "Literal", + value: e.getToken() === 86023 ? null : u === "true" + }; + return e.options.raw && (i.raw = u), r(e, t), e.assignable = 2, e.finishNode(i, n); +} +function $n(e, t) { + let { tokenStart: n } = e; + return r(e, t), e.assignable = 2, e.finishNode({ type: "ThisExpression" }, n); +} +function x(e, t, n, u, o, i, l, f, c) { + r(e, t | 32); + let g = i ? Qe(e, t, 8391476) : 0, d = null, a, h = n ? e.createScope() : void 0; + if (e.getToken() === 67174411) !(l & 1) && e.report(39, "Function"); + else { + let T = o & 4 && ((t & 8) === 0 || (t & 2) === 0) ? 4 : 64 | (f ? 1024 : 0) | (g ? 1024 : 0); + Ot(e, t, e.getToken()), n && (T & 4 ? n.addVarName(t, e.tokenValue, T) : n.addBlockName(t, e.tokenValue, T, o), h = h?.createChildScope(128), l && l & 2 && e.declareUnboundVariable(e.tokenValue)), a = e.getToken(), e.getToken() & 143360 ? d = N(e, t) : e.report(30, B[e.getToken() & 255]); + } + t = (t | 28416) ^ 28416 | 65536 | (f ? 2048 : 0) | (g ? 1024 : 0) | (g ? 0 : 262144), h = h?.createChildScope(256); + let A = $t(e, (t | 8192) & -524289, h, u, 0, 1), b = 524428, w = Pe(e, (t | b) ^ b | 36864, h?.createChildScope(64), u, 8, a, h); + return e.finishNode({ + type: "FunctionDeclaration", + id: d, + params: A, + body: w, + async: f === 1, + generator: g === 1 + }, c); +} +function zt(e, t, n, u, o, i) { + r(e, t | 32); + let l = Qe(e, t, 8391476), f = (u ? 2048 : 0) | (l ? 1024 : 0), c = null, g, d = e.createScopeIfLexical(), a = 552704; + e.getToken() & 143360 && (Ot(e, (t | a) ^ a | f, e.getToken()), d = d?.createChildScope(128), g = e.getToken(), c = N(e, t)), t = (t | a) ^ a | 65536 | f | (l ? 0 : 262144), d = d?.createChildScope(256); + let h = $t(e, (t | 8192) & -524289, d, n, o, 1), A = Pe(e, t & -131229 | 36864, d?.createChildScope(64), n, 0, g, d); + return e.assignable = 2, e.finishNode({ + type: "FunctionExpression", + id: c, + params: h, + body: A, + async: u === 1, + generator: l === 1 + }, i); +} +function Wn(e, t, n, u, o) { + let i = X(e, t, void 0, n, u, o, 0, 2, 0); + return e.destructible & 64 && e.report(63), e.destructible & 8 && e.report(62), i; +} +function X(e, t, n, u, o, i, l, f, c) { + let { tokenStart: g } = e; + r(e, t | 32); + let d = [], a = 0; + for (t = (t | 131072) ^ 131072; e.getToken() !== 20;) if (C(e, t | 32, 18)) d.push(null); + else { + let A, { tokenStart: b, tokenValue: w } = e, T = e.getToken(); + if (T & 143360) if (A = U(e, t, u, f, 0, 1, i, 1, b), e.getToken() === 1077936155) { + e.assignable & 2 && e.report(26), r(e, t | 32), n?.addVarOrBlock(t, w, f, c); + let D = L(e, t, u, 1, i, e.tokenStart); + A = e.finishNode(l ? { + type: "AssignmentPattern", + left: A, + right: D + } : { + type: "AssignmentExpression", + operator: "=", + left: A, + right: D + }, b), a |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0; + } else e.getToken() === 18 || e.getToken() === 20 ? (e.assignable & 2 ? a |= 16 : n?.addVarOrBlock(t, w, f, c), a |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0) : (a |= f & 1 ? 32 : (f & 2) === 0 ? 16 : 0, A = F(e, t, u, A, i, 0, b), e.getToken() !== 18 && e.getToken() !== 20 ? (e.getToken() !== 1077936155 && (a |= 16), A = I(e, t, u, i, l, b, A)) : e.getToken() !== 1077936155 && (a |= e.assignable & 2 ? 16 : 32)); + else T & 2097152 ? (A = e.getToken() === 2162700 ? j(e, t, n, u, 0, i, l, f, c) : X(e, t, n, u, 0, i, l, f, c), a |= e.destructible, e.assignable = e.destructible & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 20 ? e.assignable & 2 && (a |= 16) : e.destructible & 8 ? e.report(71) : (A = F(e, t, u, A, i, 0, b), a = e.assignable & 2 ? 16 : 0, e.getToken() !== 18 && e.getToken() !== 20 ? A = I(e, t, u, i, l, b, A) : e.getToken() !== 1077936155 && (a |= e.assignable & 2 ? 16 : 32))) : T === 14 ? (A = oe(e, t, n, u, 20, f, c, 0, i, l), a |= e.destructible, e.getToken() !== 18 && e.getToken() !== 20 && e.report(30, B[e.getToken() & 255])) : (A = _(e, t, u, 1, 0, 1), e.getToken() !== 18 && e.getToken() !== 20 ? (A = I(e, t, u, i, l, b, A), !(f & 3) && T === 67174411 && (a |= 16)) : e.assignable & 2 ? a |= 16 : T === 67174411 && (a |= e.assignable & 1 && f & 3 ? 32 : 16)); + if (d.push(A), C(e, t | 32, 18)) { + if (e.getToken() === 20) break; + } else break; + } + y(e, t, 20); + let h = e.finishNode({ + type: l ? "ArrayPattern" : "ArrayExpression", + elements: d + }, g); + return !o && e.getToken() & 4194304 ? Kt(e, t, u, a, i, l, g, h) : (e.destructible = a, h); +} +function Kt(e, t, n, u, o, i, l, f) { + e.getToken() !== 1077936155 && e.report(26), r(e, t | 32), u & 16 && e.report(26), i || K(e, f); + let { tokenStart: c } = e, g = L(e, t, n, 1, o, c); + return e.destructible = (u | 72) ^ 72 | (e.destructible & 128 ? 128 : 0) | (e.destructible & 256 ? 256 : 0), e.finishNode(i ? { + type: "AssignmentPattern", + left: f, + right: g + } : { + type: "AssignmentExpression", + left: f, + operator: "=", + right: g + }, l); +} +function oe(e, t, n, u, o, i, l, f, c, g) { + let { tokenStart: d } = e; + r(e, t | 32); + let a = null, h = 0, { tokenValue: A, tokenStart: b } = e, w = e.getToken(); + if (w & 143360) e.assignable = 1, a = U(e, t, u, i, 0, 1, c, 1, b), w = e.getToken(), a = F(e, t, u, a, c, 0, b), e.getToken() !== 18 && e.getToken() !== o && (e.assignable & 2 && e.getToken() === 1077936155 && e.report(71), h |= 16, a = I(e, t, u, c, g, b, a)), e.assignable & 2 ? h |= 16 : w === o || w === 18 ? n?.addVarOrBlock(t, A, i, l) : h |= 32, h |= e.destructible & 128 ? 128 : 0; + else if (w === o) e.report(41); + else if (w & 2097152) a = e.getToken() === 2162700 ? j(e, t, n, u, 1, c, g, i, l) : X(e, t, n, u, 1, c, g, i, l), w = e.getToken(), w !== 1077936155 && w !== o && w !== 18 ? (e.destructible & 8 && e.report(71), a = F(e, t, u, a, c, 0, b), h |= e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? (e.getToken() !== 1077936155 && (h |= 16), a = I(e, t, u, c, g, b, a)) : ((e.getToken() & 8388608) === 8388608 && (a = G(e, t, u, 1, b, 4, w, a)), C(e, t | 32, 22) && (a = ee(e, t, u, a, b)), h |= e.assignable & 2 ? 16 : 32)) : h |= o === 1074790415 && w !== 1077936155 ? 16 : e.destructible; + else { + h |= 32, a = _(e, t, u, 1, c, 1); + let { tokenStart: T } = e, D = e.getToken(); + return D === 1077936155 ? (e.assignable & 2 && e.report(26), a = I(e, t, u, c, g, T, a), h |= 16) : (D === 18 ? h |= 16 : D !== o && (a = I(e, t, u, c, g, T, a)), h |= e.assignable & 1 ? 32 : 16), e.destructible = h, e.getToken() !== o && e.getToken() !== 18 && e.report(161), e.finishNode({ + type: g ? "RestElement" : "SpreadElement", + argument: a + }, d); + } + if (e.getToken() !== o) if (i & 1 && (h |= f ? 16 : 32), C(e, t | 32, 1077936155)) { + h & 16 && e.report(26), K(e, a); + let T = L(e, t, u, 1, c, e.tokenStart); + a = e.finishNode(g ? { + type: "AssignmentPattern", + left: a, + right: T + } : { + type: "AssignmentExpression", + left: a, + operator: "=", + right: T + }, b), h = 16; + } else h |= 16; + return e.destructible = h, e.finishNode({ + type: g ? "RestElement" : "SpreadElement", + argument: a + }, d); +} +function z(e, t, n, u, o, i) { + let l = 11264 | ((u & 64) === 0 ? 16896 : 0); + t = (t | l) ^ l | (u & 8 ? 1024 : 0) | (u & 16 ? 2048 : 0) | (u & 64 ? 16384 : 0) | 98560; + let f = e.createScopeIfLexical(256), c = Qn(e, (t | 8192) & -524289, f, n, u, 1, o); + f = f?.createChildScope(64); + let g = Pe(e, t & -655373 | 36864, f, n, 0, void 0, f?.parent); + return e.finishNode({ + type: "FunctionExpression", + params: c, + body: g, + async: (u & 16) > 0, + generator: (u & 8) > 0, + id: null + }, i); +} +function Yn(e, t, n, u, o) { + let i = j(e, t, void 0, n, u, o, 0, 2, 0); + return e.destructible & 64 && e.report(63), e.destructible & 8 && e.report(62), i; +} +function j(e, t, n, u, o, i, l, f, c) { + let { tokenStart: g } = e; + r(e, t); + let d = [], a = 0, h = 0; + for (t = (t | 131072) ^ 131072; e.getToken() !== 1074790415;) { + let { tokenValue: b, tokenStart: w } = e, T = e.getToken(); + if (T === 14) d.push(oe(e, t, n, u, 1074790415, f, c, 0, i, l)); + else { + let D = 0, R = null, k; + if (e.getToken() & 143360 || e.getToken() === -2147483528 || e.getToken() === -2147483527) if (e.getToken() === -2147483527 && (a |= 16), R = N(e, t), e.getToken() === 18 || e.getToken() === 1074790415 || e.getToken() === 1077936155) if (D |= 4, t & 1 && (T & 537079808) === 537079808 ? a |= 16 : Be(e, t, f, T, 0), n?.addVarOrBlock(t, b, f, c), C(e, t | 32, 1077936155)) { + a |= 8; + let E = L(e, t, u, 1, i, e.tokenStart); + a |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, k = e.finishNode({ + type: "AssignmentPattern", + left: e.cloneIdentifier(R), + right: E + }, w); + } else a |= (T === 209006 ? 128 : 0) | (T === -2147483528 ? 16 : 0), k = e.cloneIdentifier(R); + else if (C(e, t | 32, 21)) { + let { tokenStart: E } = e; + if (b === "__proto__" && h++, e.getToken() & 143360) { + let ce = e.getToken(), Y = e.tokenValue; + k = U(e, t, u, f, 0, 1, i, 1, E); + let $ = e.getToken(); + k = F(e, t, u, k, i, 0, E), e.getToken() === 18 || e.getToken() === 1074790415 ? $ === 1077936155 || $ === 1074790415 || $ === 18 ? (a |= e.destructible & 128 ? 128 : 0, e.assignable & 2 ? a |= 16 : (ce & 143360) === 143360 && n?.addVarOrBlock(t, Y, f, c)) : a |= e.assignable & 1 ? 32 : 16 : (e.getToken() & 4194304) === 4194304 ? (e.assignable & 2 ? a |= 16 : $ !== 1077936155 ? a |= 32 : n?.addVarOrBlock(t, Y, f, c), k = I(e, t, u, i, l, E, k)) : (a |= 16, (e.getToken() & 8388608) === 8388608 && (k = G(e, t, u, 1, E, 4, $, k)), C(e, t | 32, 22) && (k = ee(e, t, u, k, E))); + } else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? X(e, t, n, u, 0, i, l, f, c) : j(e, t, n, u, 0, i, l, f, c), a = e.destructible, e.assignable = a & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : e.destructible & 8 ? e.report(71) : (k = F(e, t, u, k, i, 0, E), a = e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? k = be(e, t, u, i, l, E, k) : ((e.getToken() & 8388608) === 8388608 && (k = G(e, t, u, 1, E, 4, T, k)), C(e, t | 32, 22) && (k = ee(e, t, u, k, E)), a |= e.assignable & 2 ? 16 : 32))) : (k = _(e, t, u, 1, i, 1), a |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : (k = F(e, t, u, k, i, 0, E), a = e.assignable & 2 ? 16 : 0, e.getToken() !== 18 && T !== 1074790415 && (e.getToken() !== 1077936155 && (a |= 16), k = I(e, t, u, i, l, E, k)))); + } else e.getToken() === 69271571 ? (a |= 16, T === 209005 && (D |= 16), D |= (T === 209008 ? 256 : T === 209009 ? 512 : 1) | 2, R = ne(e, t, u, i), a |= e.assignable, k = z(e, t, u, D, i, e.tokenStart)) : e.getToken() & 143360 ? (a |= 16, T === -2147483528 && e.report(95), T === 209005 ? (e.flags & 1 && e.report(132), D |= 17) : T === 209008 ? D |= 256 : T === 209009 ? D |= 512 : e.report(0), R = N(e, t), k = z(e, t, u, D, i, e.tokenStart)) : e.getToken() === 67174411 ? (a |= 16, D |= 1, k = z(e, t, u, D, i, e.tokenStart)) : e.getToken() === 8391476 ? (a |= 16, T === 209008 ? e.report(42) : T === 209009 ? e.report(43) : T !== 209005 && e.report(30, B[52]), r(e, t), D |= 9 | (T === 209005 ? 16 : 0), e.getToken() & 143360 ? R = N(e, t) : (e.getToken() & 134217728) === 134217728 ? R = O(e, t) : e.getToken() === 69271571 ? (D |= 2, R = ne(e, t, u, i), a |= e.assignable) : e.report(30, B[e.getToken() & 255]), k = z(e, t, u, D, i, e.tokenStart)) : (e.getToken() & 134217728) === 134217728 ? (T === 209005 && (D |= 16), D |= T === 209008 ? 256 : T === 209009 ? 512 : 1, a |= 16, R = O(e, t), k = z(e, t, u, D, i, e.tokenStart)) : e.report(133); + else if ((e.getToken() & 134217728) === 134217728) if (R = O(e, t), e.getToken() === 21) { + y(e, t | 32, 21); + let { tokenStart: E } = e; + if (b === "__proto__" && h++, e.getToken() & 143360) { + k = U(e, t, u, f, 0, 1, i, 1, E); + let { tokenValue: ce } = e, Y = e.getToken(); + k = F(e, t, u, k, i, 0, E), e.getToken() === 18 || e.getToken() === 1074790415 ? Y === 1077936155 || Y === 1074790415 || Y === 18 ? e.assignable & 2 ? a |= 16 : n?.addVarOrBlock(t, ce, f, c) : a |= e.assignable & 1 ? 32 : 16 : e.getToken() === 1077936155 ? (e.assignable & 2 && (a |= 16), k = I(e, t, u, i, l, E, k)) : (a |= 16, k = I(e, t, u, i, l, E, k)); + } else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? X(e, t, n, u, 0, i, l, f, c) : j(e, t, n, u, 0, i, l, f, c), a = e.destructible, e.assignable = a & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : (e.destructible & 8) !== 8 && (k = F(e, t, u, k, i, 0, E), a = e.assignable & 2 ? 16 : 0, (e.getToken() & 4194304) === 4194304 ? k = be(e, t, u, i, l, E, k) : ((e.getToken() & 8388608) === 8388608 && (k = G(e, t, u, 1, E, 4, T, k)), C(e, t | 32, 22) && (k = ee(e, t, u, k, E)), a |= e.assignable & 2 ? 16 : 32))) : (k = _(e, t, u, 1, 0, 1), a |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : (k = F(e, t, u, k, i, 0, E), a = e.assignable & 1 ? 0 : 16, e.getToken() !== 18 && e.getToken() !== 1074790415 && (e.getToken() !== 1077936155 && (a |= 16), k = I(e, t, u, i, l, E, k)))); + } else e.getToken() === 67174411 ? (D |= 1, k = z(e, t, u, D, i, e.tokenStart), a = e.assignable | 16) : e.report(134); + else if (e.getToken() === 69271571) if (R = ne(e, t, u, i), a |= e.destructible & 256 ? 256 : 0, D |= 2, e.getToken() === 21) { + r(e, t | 32); + let { tokenStart: E, tokenValue: ce } = e, Y = e.getToken(); + if (e.getToken() & 143360) { + k = U(e, t, u, f, 0, 1, i, 1, E); + let $ = e.getToken(); + k = F(e, t, u, k, i, 0, E), (e.getToken() & 4194304) === 4194304 ? (a |= e.assignable & 2 ? 16 : $ === 1077936155 ? 0 : 32, k = be(e, t, u, i, l, E, k)) : e.getToken() === 18 || e.getToken() === 1074790415 ? $ === 1077936155 || $ === 1074790415 || $ === 18 ? e.assignable & 2 ? a |= 16 : (Y & 143360) === 143360 && n?.addVarOrBlock(t, ce, f, c) : a |= e.assignable & 1 ? 32 : 16 : (a |= 16, k = I(e, t, u, i, l, E, k)); + } else (e.getToken() & 2097152) === 2097152 ? (k = e.getToken() === 69271571 ? X(e, t, n, u, 0, i, l, f, c) : j(e, t, n, u, 0, i, l, f, c), a = e.destructible, e.assignable = a & 16 ? 2 : 1, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : a & 8 ? e.report(62) : (k = F(e, t, u, k, i, 0, E), a = e.assignable & 2 ? a | 16 : 0, (e.getToken() & 4194304) === 4194304 ? (e.getToken() !== 1077936155 && (a |= 16), k = be(e, t, u, i, l, E, k)) : ((e.getToken() & 8388608) === 8388608 && (k = G(e, t, u, 1, E, 4, T, k)), C(e, t | 32, 22) && (k = ee(e, t, u, k, E)), a |= e.assignable & 2 ? 16 : 32))) : (k = _(e, t, u, 1, 0, 1), a |= e.assignable & 1 ? 32 : 16, e.getToken() === 18 || e.getToken() === 1074790415 ? e.assignable & 2 && (a |= 16) : (k = F(e, t, u, k, i, 0, E), a = e.assignable & 1 ? 0 : 16, e.getToken() !== 18 && e.getToken() !== 1074790415 && (e.getToken() !== 1077936155 && (a |= 16), k = I(e, t, u, i, l, E, k)))); + } else e.getToken() === 67174411 ? (D |= 1, k = z(e, t, u, D, i, e.tokenStart), a = 16) : e.report(44); + else if (T === 8391476) if (y(e, t | 32, 8391476), D |= 8, e.getToken() & 143360) { + let E = e.getToken(); + if (R = N(e, t), D |= 1, e.getToken() === 67174411) a |= 16, k = z(e, t, u, D, i, e.tokenStart); + else throw new q(e.tokenStart, e.currentLocation, E === 209005 ? 46 : E === 209008 || e.getToken() === 209009 ? 45 : 47, B[E & 255]); + } else (e.getToken() & 134217728) === 134217728 ? (a |= 16, R = O(e, t), D |= 1, k = z(e, t, u, D, i, e.tokenStart)) : e.getToken() === 69271571 ? (a |= 16, D |= 3, R = ne(e, t, u, i), k = z(e, t, u, D, i, e.tokenStart)) : e.report(126); + else e.report(30, B[T & 255]); + a |= e.destructible & 128 ? 128 : 0, e.destructible = a, d.push(e.finishNode({ + type: "Property", + key: R, + value: k, + kind: D & 768 ? D & 512 ? "set" : "get" : "init", + computed: (D & 2) > 0, + method: (D & 1) > 0, + shorthand: (D & 4) > 0 + }, w)); + } + if (a |= e.destructible, e.getToken() !== 18) break; + r(e, t); + } + y(e, t, 1074790415), h > 1 && (a |= 64); + let A = e.finishNode({ + type: l ? "ObjectPattern" : "ObjectExpression", + properties: d + }, g); + return !o && e.getToken() & 4194304 ? Kt(e, t, u, a, i, l, g, A) : (e.destructible = a, A); +} +function Qn(e, t, n, u, o, i, l) { + y(e, t, 67174411); + let f = []; + if (e.flags = (e.flags | 128) ^ 128, e.getToken() === 16) return o & 512 && e.report(37, "Setter", "one", ""), r(e, t), f; + o & 256 && e.report(37, "Getter", "no", "s"), o & 512 && e.getToken() === 14 && e.report(38), t = (t | 131072) ^ 131072; + let c = 0, g = 0; + for (; e.getToken() !== 18;) { + let d = null, { tokenStart: a } = e; + if (e.getToken() & 143360 ? (!(t & 1) && ((e.getToken() & 36864) === 36864 && (e.flags |= 256), (e.getToken() & 537079808) === 537079808 && (e.flags |= 512)), d = it(e, t, n, o | 1, 0)) : (e.getToken() === 2162700 ? d = j(e, t, n, u, 1, l, 1, i, 0) : e.getToken() === 69271571 ? d = X(e, t, n, u, 1, l, 1, i, 0) : e.getToken() === 14 && (d = oe(e, t, n, u, 16, i, 0, 0, l, 1)), g = 1, e.destructible & 48 && e.report(50)), e.getToken() === 1077936155) { + r(e, t | 32), g = 1; + let h = L(e, t, u, 1, 0, e.tokenStart); + d = e.finishNode({ + type: "AssignmentPattern", + left: d, + right: h + }, a); + } + if (c++, f.push(d), !C(e, t, 18) || e.getToken() === 16) break; + } + return o & 512 && c !== 1 && e.report(37, "Setter", "one", ""), n?.reportScopeError(), g && (e.flags |= 128), y(e, t, 16), f; +} +function ne(e, t, n, u) { + r(e, t | 32); + let o = L(e, (t | 131072) ^ 131072, n, 1, u, e.tokenStart); + return y(e, t, 20), o; +} +function Zn(e, t, n, u, o, i, l) { + e.flags = (e.flags | 128) ^ 128; + let f = e.tokenStart; + r(e, t | 262176); + let c = e.createScopeIfLexical()?.createChildScope(512); + if (t = (t | 131072) ^ 131072, C(e, t, 16)) return Ne(e, t, c, n, [], u, 0, l); + let g = 0; + e.destructible &= -385; + let d, a = [], h = 0, A = 0, b = 0, w = e.tokenStart; + for (e.assignable = 1; e.getToken() !== 16;) { + let { tokenStart: T } = e, D = e.getToken(); + if (D & 143360) c?.addBlockName(t, e.tokenValue, 1, 0), (D & 537079808) === 537079808 ? A = 1 : (D & 36864) === 36864 && (b = 1), d = U(e, t, n, o, 0, 1, 1, 1, T), e.getToken() === 16 || e.getToken() === 18 ? e.assignable & 2 && (g |= 16, A = 1) : (e.getToken() === 1077936155 ? A = 1 : g |= 16, d = F(e, t, n, d, 1, 0, T), e.getToken() !== 16 && e.getToken() !== 18 && (d = I(e, t, n, 1, 0, T, d))); + else if ((D & 2097152) === 2097152) d = D === 2162700 ? j(e, t | 262144, c, n, 0, 1, 0, o, i) : X(e, t | 262144, c, n, 0, 1, 0, o, i), g |= e.destructible, A = 1, e.assignable = 2, e.getToken() !== 16 && e.getToken() !== 18 && (g & 8 && e.report(122), d = F(e, t, n, d, 0, 0, T), g |= 16, e.getToken() !== 16 && e.getToken() !== 18 && (d = I(e, t, n, 0, 0, T, d))); + else if (D === 14) { + d = oe(e, t, c, n, 16, o, i, 0, 1, 0), e.destructible & 16 && e.report(74), A = 1, h && (e.getToken() === 16 || e.getToken() === 18) && a.push(d), g |= 8; + break; + } else { + if (g |= 16, d = L(e, t, n, 1, 1, T), h && (e.getToken() === 16 || e.getToken() === 18) && a.push(d), e.getToken() === 18 && (h || (h = 1, a = [d])), h) { + for (; C(e, t | 32, 18);) a.push(L(e, t, n, 1, 1, e.tokenStart)); + e.assignable = 2, d = e.finishNode({ + type: "SequenceExpression", + expressions: a + }, w); + } + return y(e, t, 16), e.destructible = g, e.options.preserveParens ? e.finishNode({ + type: "ParenthesizedExpression", + expression: d + }, f) : d; + } + if (h && (e.getToken() === 16 || e.getToken() === 18) && a.push(d), !C(e, t | 32, 18)) break; + if (h || (h = 1, a = [d]), e.getToken() === 16) { + g |= 8; + break; + } + } + return h && (e.assignable = 2, d = e.finishNode({ + type: "SequenceExpression", + expressions: a + }, w)), y(e, t, 16), g & 16 && g & 8 && e.report(151), g |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (g & 48 && e.report(49), t & 2050 && g & 128 && e.report(31), t & 1025 && g & 256 && e.report(32), A && (e.flags |= 128), b && (e.flags |= 256), Ne(e, t, c, n, h ? a : [d], u, 0, l)) : (g & 64 && e.report(63), g & 8 && e.report(144), e.destructible = (e.destructible | 256) ^ 256 | g, e.options.preserveParens ? e.finishNode({ + type: "ParenthesizedExpression", + expression: d + }, f) : d); +} +function nt(e, t, n) { + let { tokenStart: u } = e, { tokenValue: o } = e, i = 0, l = 0; + (e.getToken() & 537079808) === 537079808 ? i = 1 : (e.getToken() & 36864) === 36864 && (l = 1); + let f = N(e, t); + if (e.assignable = 1, e.getToken() === 10) { + let c = e.options.lexical ? qe(e, t, o) : void 0; + return i && (e.flags |= 128), l && (e.flags |= 256), ke(e, t, c, n, [f], 0, u); + } + return f; +} +function Oe(e, t, n, u, o, i, l, f, c) { + l || e.report(57), i && e.report(51), e.flags &= -129; + return ke(e, t, e.options.lexical ? qe(e, t, u) : void 0, n, [o], f, c); +} +function Ne(e, t, n, u, o, i, l, f) { + i || e.report(57); + for (let c = 0; c < o.length; ++c) K(e, o[c]); + return ke(e, t, n, u, o, l, f); +} +function ke(e, t, n, u, o, i, l) { + e.flags & 1 && e.report(48), y(e, t | 32, 10); + let f = 535552; + t = (t | f) ^ f | (i ? 2048 : 0); + let c = e.getToken() !== 2162700, g; + if (n?.reportScopeError(), c) e.flags = (e.flags | 4928) ^ 4928, g = L(e, t, u, 1, 0, e.tokenStart); + else { + n = n?.createChildScope(64); + let d = 131084; + switch (g = Pe(e, (t | d) ^ d | 4096, n, u, 16, void 0, void 0), e.getToken()) { + case 69271571: + !(e.flags & 1) && e.report(116); + break; + case 67108877: + case 67174409: + case 22: e.report(117); + case 67174411: + !(e.flags & 1) && e.report(116), e.flags |= 1024; + break; + } + (e.getToken() & 8388608) === 8388608 && !(e.flags & 1) && e.report(30, B[e.getToken() & 255]), (e.getToken() & 33619968) === 33619968 && e.report(125); + } + return e.assignable = 2, e.finishNode({ + type: "ArrowFunctionExpression", + params: o, + body: g, + async: i === 1, + expression: c, + generator: !1 + }, l); +} +function $t(e, t, n, u, o, i) { + y(e, t, 67174411), e.flags = (e.flags | 128) ^ 128; + let l = []; + if (C(e, t, 16)) return l; + t = (t | 131072) ^ 131072; + let f = 0; + for (; e.getToken() !== 18;) { + let c, { tokenStart: g } = e, d = e.getToken(); + if (d & 143360 ? (!(t & 1) && ((d & 36864) === 36864 && (e.flags |= 256), (d & 537079808) === 537079808 && (e.flags |= 512)), c = it(e, t, n, i | 1, 0)) : (d === 2162700 ? c = j(e, t, n, u, 1, o, 1, i, 0) : d === 69271571 ? c = X(e, t, n, u, 1, o, 1, i, 0) : d === 14 ? c = oe(e, t, n, u, 16, i, 0, 0, o, 1) : e.report(30, B[d & 255]), f = 1, e.destructible & 48 && e.report(50)), e.getToken() === 1077936155) { + r(e, t | 32), f = 1; + let a = L(e, t, u, 1, o, e.tokenStart); + c = e.finishNode({ + type: "AssignmentPattern", + left: c, + right: a + }, g); + } + if (l.push(c), !C(e, t, 18) || e.getToken() === 16) break; + } + return f && (e.flags |= 128), (f || t & 1) && n?.reportScopeError(), y(e, t, 16), l; +} +function we(e, t, n, u, o, i) { + let l = e.getToken(); + if (l & 67108864) { + if (l === 67108877) { + r(e, t | 262144), e.assignable = 1; + let f = xe(e, t, n); + return we(e, t, n, e.finishNode({ + type: "MemberExpression", + object: u, + computed: !1, + property: f, + optional: !1 + }, i), 0, i); + } else if (l === 69271571) { + r(e, t | 32); + let { tokenStart: f } = e, c = V(e, t, n, o, 1, f); + return y(e, t, 20), e.assignable = 1, we(e, t, n, e.finishNode({ + type: "MemberExpression", + object: u, + computed: !0, + property: c, + optional: !1 + }, i), 0, i); + } else if (l === 67174408 || l === 67174409) return e.assignable = 2, we(e, t, n, e.finishNode({ + type: "TaggedTemplateExpression", + tag: u, + quasi: e.getToken() === 67174408 ? et(e, t | 64, n) : pe(e, t | 64) + }, i), 0, i); + } + return u; +} +function Gn(e, t, n, u) { + let { tokenStart: o } = e, i = N(e, t | 32), { tokenStart: l } = e; + if (C(e, t, 67108877)) { + if (t & 65536 && e.getToken() === 209029) return e.assignable = 2, xn(e, t, i, o); + e.report(94); + } + e.assignable = 2, (e.getToken() & 16842752) === 16842752 && e.report(65, B[e.getToken() & 255]); + let f = U(e, t, n, 2, 1, 0, u, 1, l); + t = (t | 131072) ^ 131072, e.getToken() === 67108990 && e.report(168); + let c = we(e, t, n, f, u, l); + return e.assignable = 2, e.finishNode({ + type: "NewExpression", + callee: c, + arguments: e.getToken() === 67174411 ? tt(e, t, n, u) : [] + }, o); +} +function xn(e, t, n, u) { + let o = N(e, t); + return e.finishNode({ + type: "MetaProperty", + meta: n, + property: o + }, u); +} +function Wt(e, t, n, u, o) { + return e.getToken() === 209006 && e.report(31), t & 1025 && e.getToken() === 241771 && e.report(32), Ie(e, t, e.getToken()), (e.getToken() & 36864) === 36864 && (e.flags |= 256), Oe(e, t & -524289 | 2048, n, e.tokenValue, N(e, t), 0, u, 1, o); +} +function ut(e, t, n, u, o, i, l, f, c) { + r(e, t | 32); + let g = e.createScopeIfLexical()?.createChildScope(512); + if (t = (t | 131072) ^ 131072, C(e, t, 16)) return e.getToken() === 10 ? (f & 1 && e.report(48), Ne(e, t, g, n, [], o, 1, c)) : e.finishNode({ + type: "CallExpression", + callee: u, + arguments: [], + optional: !1 + }, c); + let d = 0, a = null, h = 0; + e.destructible = (e.destructible | 384) ^ 384; + let A = []; + for (; e.getToken() !== 16;) { + let { tokenStart: b } = e, w = e.getToken(); + if (w & 143360) g?.addBlockName(t, e.tokenValue, i, 0), (w & 537079808) === 537079808 ? e.flags |= 512 : (w & 36864) === 36864 && (e.flags |= 256), a = U(e, t, n, i, 0, 1, 1, 1, b), e.getToken() === 16 || e.getToken() === 18 ? e.assignable & 2 && (d |= 16, h = 1) : (e.getToken() === 1077936155 ? h = 1 : d |= 16, a = F(e, t, n, a, 1, 0, b), e.getToken() !== 16 && e.getToken() !== 18 && (a = I(e, t, n, 1, 0, b, a))); + else if (w & 2097152) a = w === 2162700 ? j(e, t, g, n, 0, 1, 0, i, l) : X(e, t, g, n, 0, 1, 0, i, l), d |= e.destructible, h = 1, e.getToken() !== 16 && e.getToken() !== 18 && (d & 8 && e.report(122), a = F(e, t, n, a, 0, 0, b), d |= 16, (e.getToken() & 8388608) === 8388608 && (a = G(e, t, n, 1, c, 4, w, a)), C(e, t | 32, 22) && (a = ee(e, t, n, a, c))); + else if (w === 14) a = oe(e, t, g, n, 16, i, l, 1, 1, 0), d |= (e.getToken() === 16 ? 0 : 16) | e.destructible, h = 1; + else { + for (a = L(e, t, n, 1, 0, b), d = e.assignable, A.push(a); C(e, t | 32, 18);) A.push(L(e, t, n, 1, 0, b)); + return d |= e.assignable, y(e, t, 16), e.destructible = d | 16, e.assignable = 2, e.finishNode({ + type: "CallExpression", + callee: u, + arguments: A, + optional: !1 + }, c); + } + if (A.push(a), !C(e, t | 32, 18)) break; + } + return y(e, t, 16), d |= e.destructible & 256 ? 256 : 0 | e.destructible & 128 ? 128 : 0, e.getToken() === 10 ? (d & 48 && e.report(27), (e.flags & 1 || f & 1) && e.report(48), d & 128 && e.report(31), t & 1025 && d & 256 && e.report(32), h && (e.flags |= 128), Ne(e, t | 2048, g, n, A, o, 1, c)) : (d & 64 && e.report(63), d & 8 && e.report(62), e.assignable = 2, e.finishNode({ + type: "CallExpression", + callee: u, + arguments: A, + optional: !1 + }, c)); +} +function pn(e, t) { + let { tokenRaw: n, tokenRegExp: u, tokenValue: o, tokenStart: i } = e; + r(e, t), e.assignable = 2; + let l = { + type: "Literal", + value: o, + regex: u + }; + return e.options.raw && (l.raw = n), e.finishNode(l, i); +} +function ze(e, t, n, u, o) { + let i, l; + e.leadingDecorators.decorators.length ? (e.getToken() === 132 && e.report(30, "@"), i = e.leadingDecorators.start, l = [...e.leadingDecorators.decorators], e.leadingDecorators.decorators.length = 0) : (i = e.tokenStart, l = Ve(e, t, u)), t = (t | 16385) ^ 16384, r(e, t); + let f = null, c = null, { tokenValue: g } = e; + e.getToken() & 4096 && e.getToken() !== 20565 ? (Vt(e, t, e.getToken()) && e.report(118), (e.getToken() & 537079808) === 537079808 && e.report(119), n && (n.addBlockName(t, g, 32, 0), o && o & 2 && e.declareUnboundVariable(g)), f = N(e, t)) : !(o & 1) && e.report(39, "Class"); + let d = t; + C(e, t | 32, 20565) ? (c = _(e, t, u, 0, 0, 0), d |= 512) : d = (d | 512) ^ 512; + let a = Yt(e, d, t, n, u, 2, 8, 0); + return e.finishNode({ + type: "ClassDeclaration", + id: f, + superClass: c, + body: a, + ...e.options.next ? { decorators: l } : null + }, i); +} +function eu(e, t, n, u, o) { + let i = null, l = null, f = Ve(e, t, n); + t = (t | 16385) ^ 16384, r(e, t), e.getToken() & 4096 && e.getToken() !== 20565 && (Vt(e, t, e.getToken()) && e.report(118), (e.getToken() & 537079808) === 537079808 && e.report(119), i = N(e, t)); + let c = t; + C(e, t | 32, 20565) ? (l = _(e, t, n, 0, u, 0), c |= 512) : c = (c | 512) ^ 512; + let g = Yt(e, c, t, void 0, n, 2, 0, u); + return e.assignable = 2, e.finishNode({ + type: "ClassExpression", + id: i, + superClass: l, + body: g, + ...e.options.next ? { decorators: f } : null + }, o); +} +function Ve(e, t, n) { + let u = []; + if (e.options.next) for (; e.getToken() === 132;) u.push(tu(e, t, n)); + return u; +} +function tu(e, t, n) { + let u = e.tokenStart; + r(e, t | 32); + let o = e.tokenStart, i = U(e, t, n, 2, 0, 1, 0, 1, u); + return i = F(e, t, n, i, 0, 0, o), e.finishNode({ + type: "Decorator", + expression: i + }, u); +} +function Yt(e, t, n, u, o, i, l, f) { + let { tokenStart: c } = e, g = e.createPrivateScopeIfLexical(o); + y(e, t | 32, 2162700); + let d = 655360; + t = (t | d) ^ d; + let a = e.flags & 32; + e.flags = (e.flags | 32) ^ 32; + let h = []; + for (; e.getToken() !== 1074790415;) { + let A = e.tokenStart, b = Ve(e, t, g); + if (b.length > 0 && e.tokenValue === "constructor" && e.report(109), e.getToken() === 1074790415 && e.report(108), C(e, t, 1074790417)) { + b.length > 0 && e.report(120); + continue; + } + h.push(Qt(e, t, u, g, n, i, b, 0, f, b.length > 0 ? A : e.tokenStart)); + } + return y(e, l & 8 ? t | 32 : t, 1074790415), g?.validatePrivateIdentifierRefs(), e.flags = e.flags & -33 | a, e.finishNode({ + type: "ClassBody", + body: h + }, c); +} +function Qt(e, t, n, u, o, i, l, f, c, g) { + let d = f ? 32 : 0, a = null, h = e.getToken(); + if (h & 176128 || h === -2147483528) switch (a = N(e, t), h) { + case 36970: + if (!f && e.getToken() !== 67174411 && (e.getToken() & 1048576) !== 1048576 && e.getToken() !== 1077936155) return Qt(e, t, n, u, o, i, l, 1, c, g); + break; + case 209005: + if (e.getToken() !== 67174411 && (e.flags & 1) === 0) { + if ((e.getToken() & 1073741824) === 1073741824) return se(e, t, u, a, d, l, g); + d |= 16 | (Qe(e, t, 8391476) ? 8 : 0); + } + break; + case 209008: + if (e.getToken() !== 67174411) { + if ((e.getToken() & 1073741824) === 1073741824) return se(e, t, u, a, d, l, g); + d |= 256; + } + break; + case 209009: + if (e.getToken() !== 67174411) { + if ((e.getToken() & 1073741824) === 1073741824) return se(e, t, u, a, d, l, g); + d |= 512; + } + break; + case 12402: + if (e.getToken() !== 67174411 && (e.flags & 1) === 0) { + if ((e.getToken() & 1073741824) === 1073741824) return se(e, t, u, a, d, l, g); + e.options.next && (d |= 1024); + } + break; + } + else if (h === 69271571) d |= 2, a = ne(e, o, u, c); + else if ((h & 134217728) === 134217728) a = O(e, t); + else if (h === 8391476) d |= 8, r(e, t); + else if (e.getToken() === 130) d |= 8192, a = Le(e, t | 16, u, 768); + else if ((e.getToken() & 1073741824) === 1073741824) d |= 128; + else { + if (f && h === 2162700) return Bn(e, t | 16, n, u, g); + h === -2147483527 ? (a = N(e, t), e.getToken() !== 67174411 && e.report(30, B[e.getToken() & 255])) : e.report(30, B[e.getToken() & 255]); + } + if (d & 1816 && (e.getToken() & 143360 || e.getToken() === -2147483528 || e.getToken() === -2147483527 ? a = N(e, t) : (e.getToken() & 134217728) === 134217728 ? a = O(e, t) : e.getToken() === 69271571 ? (d |= 2, a = ne(e, t, u, 0)) : e.getToken() === 130 ? (d |= 8192, a = Le(e, t, u, d)) : e.report(135)), !(d & 2) && (e.tokenValue === "constructor" ? ((e.getToken() & 1073741824) === 1073741824 ? e.report(129) : !(d & 32) && e.getToken() === 67174411 && (d & 920 ? e.report(53, "accessor") : !(t & 512) && (e.flags & 32 ? e.report(54) : e.flags |= 32)), d |= 64) : !(d & 8192) && d & 32 && e.tokenValue === "prototype" && e.report(52)), d & 1024 || e.getToken() !== 67174411 && (d & 768) === 0) return se(e, t, u, a, d, l, g); + let A = z(e, t | 16, u, d, c, e.tokenStart); + return e.finishNode({ + type: "MethodDefinition", + kind: (d & 32) === 0 && d & 64 ? "constructor" : d & 256 ? "get" : d & 512 ? "set" : "method", + static: (d & 32) > 0, + computed: (d & 2) > 0, + key: a, + value: A, + ...e.options.next ? { decorators: l } : null + }, g); +} +function Le(e, t, n, u) { + let { tokenStart: o } = e; + r(e, t); + let { tokenValue: i } = e; + return i === "constructor" && e.report(128), e.options.lexical && (n || e.report(4, i), u ? n.addPrivateIdentifier(i, u) : n.addPrivateIdentifierRef(i)), r(e, t), e.finishNode({ + type: "PrivateIdentifier", + name: i + }, o); +} +function se(e, t, n, u, o, i, l) { + let f = null; + if (o & 8 && e.report(0), e.getToken() === 1077936155) { + r(e, t | 32); + let { tokenStart: c } = e; + e.getToken() === 537079927 && e.report(119); + let g = 11264 | ((o & 64) === 0 ? 16896 : 0); + t = (t | g) ^ g | (o & 8 ? 1024 : 0) | (o & 16 ? 2048 : 0) | (o & 64 ? 16384 : 0) | 65792, f = U(e, t | 16, n, 2, 0, 1, 0, 1, c), ((e.getToken() & 1073741824) !== 1073741824 || (e.getToken() & 4194304) === 4194304) && (f = F(e, t | 16, n, f, 0, 0, c), f = I(e, t | 16, n, 0, 0, c, f)); + } + return M(e, t), e.finishNode({ + type: o & 1024 ? "AccessorProperty" : "PropertyDefinition", + key: u, + value: f, + static: (o & 32) > 0, + computed: (o & 2) > 0, + ...e.options.next ? { decorators: i } : null + }, l); +} +function Zt(e, t, n, u, o, i) { + if (e.getToken() & 143360 || (t & 1) === 0 && e.getToken() === -2147483527) return it(e, t, n, o, i); + (e.getToken() & 2097152) !== 2097152 && e.report(30, B[e.getToken() & 255]); + let l = e.getToken() === 69271571 ? X(e, t, n, u, 1, 0, 1, o, i) : j(e, t, n, u, 1, 0, 1, o, i); + return e.destructible & 16 && e.report(50), e.destructible & 32 && e.report(50), l; +} +function it(e, t, n, u, o) { + let i = e.getToken(); + t & 1 && ((i & 537079808) === 537079808 ? e.report(119) : ((i & 36864) === 36864 || i === -2147483527) && e.report(118)), (i & 20480) === 20480 && e.report(102), i === 241771 && (t & 1024 && e.report(32), t & 2 && e.report(111)), (i & 255) === 73 && u & 24 && e.report(100), i === 209006 && (t & 2048 && e.report(176), t & 2 && e.report(110)); + let { tokenValue: l, tokenStart: f } = e; + return r(e, t), n?.addVarOrBlock(t, l, u, o), e.finishNode({ + type: "Identifier", + name: l + }, f); +} +function Re(e, t, n, u, o) { + if (u || y(e, t, 8456256), e.getToken() === 8390721) { + let c = nu(e, o), [g, d] = lu(e, t, n, u); + return e.finishNode({ + type: "JSXFragment", + openingFragment: c, + children: g, + closingFragment: d + }, o); + } + e.getToken() === 8457014 && e.report(30, B[e.getToken() & 255]); + let i = null, l = [], f = su(e, t, n, u, o); + if (!f.selfClosing) { + [l, i] = ou(e, t, n, u); + let c = Fe(i.name); + Fe(f.name) !== c && e.report(155, c); + } + return e.finishNode({ + type: "JSXElement", + children: l, + openingElement: f, + closingElement: i + }, o); +} +function nu(e, t) { + return me(e), e.finishNode({ type: "JSXOpeningFragment" }, t); +} +function uu(e, t, n, u) { + y(e, t, 8457014); + let o = xt(e, t); + return e.getToken() !== 8390721 && e.report(25, B[65]), n ? me(e) : r(e, t), e.finishNode({ + type: "JSXClosingElement", + name: o + }, u); +} +function iu(e, t, n, u) { + return y(e, t, 8457014), e.getToken() !== 8390721 && e.report(25, B[65]), n ? me(e) : r(e, t), e.finishNode({ type: "JSXClosingFragment" }, u); +} +function ou(e, t, n, u) { + let o = []; + for (;;) { + let i = fu(e, t, n, u); + if (i.type === "JSXClosingElement") return [o, i]; + o.push(i); + } +} +function lu(e, t, n, u) { + let o = []; + for (;;) { + let i = cu(e, t, n, u); + if (i.type === "JSXClosingFragment") return [o, i]; + o.push(i); + } +} +function fu(e, t, n, u) { + if (e.getToken() === 137) return Gt(e, t); + if (e.getToken() === 2162700) return ot(e, t, n, 1, 0); + if (e.getToken() === 8456256) { + let { tokenStart: o } = e; + return r(e, t), e.getToken() === 8457014 ? uu(e, t, u, o) : Re(e, t, n, 1, o); + } + e.report(0); +} +function cu(e, t, n, u) { + if (e.getToken() === 137) return Gt(e, t); + if (e.getToken() === 2162700) return ot(e, t, n, 1, 0); + if (e.getToken() === 8456256) { + let { tokenStart: o } = e; + return r(e, t), e.getToken() === 8457014 ? iu(e, t, u, o) : Re(e, t, n, 1, o); + } + e.report(0); +} +function Gt(e, t) { + let n = e.tokenStart; + r(e, t); + let u = { + type: "JSXText", + value: e.tokenValue + }; + return e.options.raw && (u.raw = e.tokenRaw), e.finishNode(u, n); +} +function su(e, t, n, u, o) { + (e.getToken() & 143360) !== 143360 && (e.getToken() & 4096) !== 4096 && e.report(0); + let i = xt(e, t), l = au(e, t, n), f = e.getToken() === 8457014; + return f && y(e, t, 8457014), e.getToken() !== 8390721 && e.report(25, B[65]), u || !f ? me(e) : r(e, t), e.finishNode({ + type: "JSXOpeningElement", + name: i, + attributes: l, + selfClosing: f + }, o); +} +function xt(e, t) { + let { tokenStart: n } = e; + Ue(e); + let u = Me(e, t); + if (e.getToken() === 21) return pt(e, t, u, n); + for (; C(e, t, 67108877);) Ue(e), u = du(e, t, u, n); + return u; +} +function du(e, t, n, u) { + let o = Me(e, t); + return e.finishNode({ + type: "JSXMemberExpression", + object: n, + property: o + }, u); +} +function au(e, t, n) { + let u = []; + for (; e.getToken() !== 8457014 && e.getToken() !== 8390721 && e.getToken() !== 1048576;) u.push(mu(e, t, n)); + return u; +} +function gu(e, t, n) { + let u = e.tokenStart; + r(e, t), y(e, t, 14); + let o = L(e, t, n, 1, 0, e.tokenStart); + return y(e, t, 1074790415), e.finishNode({ + type: "JSXSpreadAttribute", + argument: o + }, u); +} +function mu(e, t, n) { + let { tokenStart: u } = e; + if (e.getToken() === 2162700) return gu(e, t, n); + Ue(e); + let o = null, i = Me(e, t); + if (e.getToken() === 21 && (i = pt(e, t, i, u)), e.getToken() === 1077936155) switch (un(e, t)) { + case 134283267: + o = O(e, t); + break; + case 8456256: + o = Re(e, t, n, 0, e.tokenStart); + break; + case 2162700: + o = ot(e, t, n, 0, 1); + break; + default: e.report(154); + } + return e.finishNode({ + type: "JSXAttribute", + value: o, + name: i + }, u); +} +function pt(e, t, n, u) { + y(e, t, 21); + let o = Me(e, t); + return e.finishNode({ + type: "JSXNamespacedName", + namespace: n, + name: o + }, u); +} +function ot(e, t, n, u, o) { + let { tokenStart: i } = e; + r(e, t | 32); + let { tokenStart: l } = e; + if (e.getToken() === 14) return ru(e, t, n, i); + let f = null; + return e.getToken() === 1074790415 ? (o && e.report(157), f = hu(e, { + index: e.startIndex, + line: e.startLine, + column: e.startColumn + })) : f = L(e, t, n, 1, 0, l), e.getToken() !== 1074790415 && e.report(25, B[15]), u ? me(e) : r(e, t), e.finishNode({ + type: "JSXExpressionContainer", + expression: f + }, i); +} +function ru(e, t, n, u) { + y(e, t, 14); + let o = L(e, t, n, 1, 0, e.tokenStart); + return y(e, t, 1074790415), e.finishNode({ + type: "JSXSpreadChild", + expression: o + }, u); +} +function hu(e, t) { + return e.finishNode({ type: "JSXEmptyExpression" }, t, e.tokenStart); +} +function Me(e, t) { + let n = e.tokenStart; + e.getToken() & 143360 || e.report(30, B[e.getToken() & 255]); + let { tokenValue: u } = e; + return r(e, t), e.finishNode({ + type: "JSXIdentifier", + name: u + }, n); +} +function e2(e, t) { + return sn(e, t); +} +function ku(e, t) { + let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(n, t); +} +function n2(e) { + let t = []; + for (let n of e) try { + return n(); + } catch (u) { + t.push(u); + } + throw Object.assign(/* @__PURE__ */ new Error("All combinations failed"), { errors: t }); +} +function Tu(e) { + return this[e < 0 ? this.length + e : e]; +} +function H(e) { + let t = e.range?.[0] ?? e.start, n = (e.declaration?.decorators ?? e.decorators)?.[0]; + return n ? Math.min(H(n), t) : t; +} +function J(e) { + return e.range?.[1] ?? e.end; +} +function Du(e) { + let t = new Set(e); + return (n) => t.has(n?.type); +} +function wu(e) { + return lt.has(e) || lt.set(e, fe(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), lt.get(e); +} +function Su(e) { + if (!fe(e)) return !1; + let t = `*${e.value}*`.split(` +`); + return t.length > 1 && t.every((n) => n.trimStart()[0] === "*"); +} +function Bu(e) { + return ft.has(e) || ft.set(e, Su(e)), ft.get(e); +} +function Fu(e) { + if (e.length < 2) return; + let t; + for (let n = e.length - 1; n >= 0; n--) { + let u = e[n]; + if (t && J(u) === H(t) && ct(u) && ct(t) && (e.splice(n + 1, 1), u.value += "*//*" + t.value, u.range = [H(u), J(t)]), !o2(u) && !fe(u)) throw new TypeError(`Unknown comment type: "${u.type}".`); + t = u; + } +} +function Nu(e) { + return e !== null && typeof e == "object"; +} +function Ae(e) { + if (ye !== null && typeof ye.property) { + let t = ye; + return ye = Ae.prototype = null, t; + } + return ye = Ae.prototype = e ?? Object.create(null), new Ae(); +} +function st(e) { + return Ae(e); +} +function Iu(e, t = "type") { + st(e); + function n(u) { + let o = u[t], i = e[o]; + if (!Array.isArray(i)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${o}'.`), { node: u }); + return i; + } + return n; +} +function ve(e, t) { + if (!c2(e)) return e; + if (Array.isArray(e)) { + for (let u = 0; u < e.length; u++) e[u] = ve(e[u], t); + return e; + } + if (t.onEnter) { + let u = t.onEnter(e) ?? e; + if (u !== e) return ve(u, t); + e = u; + } + let n = a2(e); + for (let u = 0; u < n.length; u++) e[n[u]] = ve(e[n[u]], t); + return t.onLeave && (e = t.onLeave(e) || e), e; +} +function Pu(e, t) { + let { parser: n, text: u } = t, { comments: o } = e, i = n === "oxc" && t.oxcAstType === "ts"; + f2(o); + let l = e.type === "File" ? e.program : e; + l.interpreter && (o.unshift(l.interpreter), delete l.interpreter), i && e.hashbang && (o.unshift(e.hashbang), delete e.hashbang), e.type === "Program" && (e.range = [0, u.length]); + let f; + return e = g2(e, { + onEnter(c) { + switch (c.type) { + case "ParenthesizedExpression": { + let { expression: g } = c, d = H(c); + if (g.type === "TypeCastExpression") return g.range = [d, J(c)], g; + let a = !1; + if (!i) { + if (!f) { + f = []; + for (let A of o) l2(A) && f.push(J(A)); + } + let h = u2(0, f, (A) => A <= d); + a = h && u.slice(h, d).trim().length === 0; + } + return a ? void 0 : (g.extra = { + ...g.extra, + parenthesized: !0 + }, g); + } + case "TemplateLiteral": + if (c.expressions.length !== c.quasis.length - 1) throw new Error("Malformed template literal."); + break; + case "TemplateElement": + if (n === "flow" || n === "hermes" || n === "espree" || n === "typescript" || i) c.range = [H(c) + 1, J(c) - (c.tail ? 1 : 2)]; + break; + case "VariableDeclaration": { + let g = i2(0, c.declarations, -1); + g?.init && u[J(g)] !== ";" && (c.range = [H(c), J(g)]); + break; + } + case "TSParenthesizedType": return c.typeAnnotation; + case "TopicReference": + e.extra = { + ...e.extra, + __isUsingHackPipeline: !0 + }; + break; + case "TSUnionType": + case "TSIntersectionType": + if (c.types.length === 1) return c.types[0]; + break; + case "ImportExpression": + n === "hermes" && c.attributes && !c.options && (c.options = c.attributes); + break; + } + }, + onLeave(c) { + switch (c.type) { + case "LogicalExpression": + if (m2(c)) return dt(c); + break; + case "TSImportType": + !c.source && c.argument.type === "TSLiteralType" && (c.source = c.argument.literal, delete c.argument); + break; + } + } + }), e; +} +function m2(e) { + return e.type === "LogicalExpression" && e.right.type === "LogicalExpression" && e.operator === e.right.operator; +} +function dt(e) { + return m2(e) ? dt({ + type: "LogicalExpression", + operator: e.operator, + left: dt({ + type: "LogicalExpression", + operator: e.operator, + left: e.left, + right: e.right.left, + range: [H(e.left), J(e.right.left)] + }), + right: e.right.right, + range: [H(e), J(e)] + }) : e; +} +function y2(e) { + let t = e.match(Ru); + return t ? t[0].trimStart() : ""; +} +function A2(e) { + e = p(0, e.replace(Vu, "").replace(Ou, ""), Uu, "$1"); + let n = ""; + for (; n !== e;) n = e, e = p(0, e, vu, ` +$1 $2 +`); + e = e.replace(h2, "").trimEnd(); + let u = Object.create(null), o = p(0, e, k2, "").replace(h2, "").trimEnd(), i; + for (; i = k2.exec(e);) { + let l = p(0, i[2], Mu, ""); + if (typeof u[i[1]] == "string" || Array.isArray(u[i[1]])) { + let f = u[i[1]]; + u[i[1]] = [ + ...Ju, + ...Array.isArray(f) ? f : [f], + l + ]; + } else u[i[1]] = l; + } + return { + comments: o, + pragmas: u + }; +} +function _u(e) { + if (!e.startsWith("#!")) return ""; + let t = e.indexOf(` +`); + return t === -1 ? e : e.slice(0, t); +} +function C2(e) { + let t = D2(e); + t && (e = e.slice(t.length + 1)); + let { pragmas: u, comments: o } = A2(y2(e)); + return { + shebang: t, + text: e, + pragmas: u, + comments: o + }; +} +function E2(e) { + let { pragmas: t } = C2(e); + return b2.some((n) => Object.prototype.hasOwnProperty.call(t, n)); +} +function w2(e) { + let { pragmas: t } = C2(e); + return T2.some((n) => Object.prototype.hasOwnProperty.call(t, n)); +} +function Xu(e) { + return e = typeof e == "function" ? { parse: e } : e, { + astFormat: "estree", + hasPragma: E2, + hasIgnorePragma: w2, + locStart: H, + locEnd: J, + ...e + }; +} +function L2(e) { + if (typeof e == "string") { + if (e = e.toLowerCase(), /\.(?:mjs|mts)$/iu.test(e)) return B2; + if (/\.(?:cjs|cts)$/iu.test(e)) return F2; + } +} +function Hu(e, t) { + let n = [], u = e2(e, { + ...ju, + sourceType: t, + onComment: n + }); + return u.comments = n, u; +} +function zu(e) { + let { description: t, loc: n } = e; + return n ? t2(t, { + loc: { + start: { + line: n.start.line, + column: n.start.column + 1 + }, + end: { + line: n.end.line, + column: n.end.column + 1 + } + }, + cause: e + }) : e; +} +function Ku(e, t) { + let n = L2(t?.filepath), u = (n ? [n] : N2).map((i) => () => Hu(e, i)), o; + try { + o = n2(u); + } catch ({ errors: [i] }) { + throw zu(i); + } + return r2(o, { + parser: "meriyah", + text: e + }); +} +var q2, gt, I2, at, Q, P2, p, V2, R2, M2, v2, mt, Dt, J2, Ct, S, _2, Et, wt, K2, q, B, Bt, Z, P, en, Je, _e, Xe, t2, yu, u2, i2, le, fe, o2, lt, l2, ft, ct, f2, c2, ye, Lu, s2, s, a2, g2, r2, Ou, Vu, Ru, Mu, h2, vu, k2, Uu, Ju, T2, b2, D2, S2, B2, F2, N2, ju, $u; +//#endregion +__esmMin((() => { + q2 = Object.defineProperty; + gt = (e, t) => { + for (var n in t) q2(e, n, { + get: t[n], + enumerable: !0 + }); + }; + I2 = {}; + gt(I2, { parsers: () => at }); + at = {}; + gt(at, { meriyah: () => $u }); + Q = (e, t) => (n, u, ...o) => n | 1 && u == null ? void 0 : (t.call(u) ?? u[e]).apply(u, o); + P2 = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, p = Q("replaceAll", function() { + if (typeof this == "string") return P2; + }); + V2 = 55296, R2 = 56319, M2 = 56320, v2 = String.prototype.isWellFormed ?? function() { + let { length: e } = this; + for (let t = 0; t < e; t++) { + let n = this.charCodeAt(t); + if ((n & 64512) === V2 && (n > R2 || ++t >= e || (this.charCodeAt(t) & 64512) !== M2)) return !1; + } + return !0; + }, mt = Q("isWellFormed", function() { + if (typeof this == "string") return v2; + }); + Dt = ((e, t) => { + let n = /* @__PURE__ */ new Uint32Array(69632), u = 0, o = 0; + for (; u < 2597;) { + let i = e[u++]; + if (i < 0) o -= i; + else { + let l = e[u++]; + i & 2 && (l = t[l]), i & 1 ? n.fill(l, o, o += e[u++]) : n[o++] = l; + } + } + return n; + })([ + -1, + 2, + 26, + 2, + 27, + 2, + 5, + -1, + 0, + 77595648, + 3, + 44, + 2, + 3, + 0, + 14, + 2, + 61, + 2, + 62, + 3, + 0, + 3, + 0, + 3168796671, + 0, + 4294956992, + 2, + 1, + 2, + 0, + 2, + 41, + 3, + 0, + 4, + 0, + 4294966523, + 3, + 0, + 4, + 2, + 16, + 2, + 63, + 2, + 0, + 0, + 4294836735, + 0, + 3221225471, + 0, + 4294901942, + 2, + 64, + 0, + 134152192, + 3, + 0, + 2, + 0, + 4294951935, + 3, + 0, + 2, + 0, + 2683305983, + 0, + 2684354047, + 2, + 17, + 2, + 0, + 0, + 4294961151, + 3, + 0, + 2, + 2, + 19, + 2, + 0, + 0, + 608174079, + 2, + 0, + 2, + 58, + 2, + 7, + 2, + 6, + 0, + 4286643967, + 3, + 0, + 2, + 2, + 1, + 3, + 0, + 3, + 0, + 4294901711, + 2, + 40, + 0, + 4089839103, + 0, + 2961209759, + 0, + 1342439375, + 0, + 4294543342, + 0, + 3547201023, + 0, + 1577204103, + 0, + 4194240, + 0, + 4294688750, + 2, + 2, + 0, + 80831, + 0, + 4261478351, + 0, + 4294549486, + 2, + 2, + 0, + 2967484831, + 0, + 196559, + 0, + 3594373100, + 0, + 3288319768, + 0, + 8469959, + 0, + 65472, + 2, + 3, + 0, + 4093640191, + 0, + 929054175, + 0, + 65487, + 0, + 4294828015, + 0, + 4092591615, + 0, + 1885355487, + 0, + 982991, + 2, + 3, + 2, + 0, + 0, + 2163244511, + 0, + 4227923919, + 0, + 4236247022, + 2, + 69, + 0, + 4284449919, + 0, + 851904, + 2, + 4, + 2, + 12, + 0, + 67076095, + -1, + 2, + 70, + 0, + 1073741743, + 0, + 4093607775, + -1, + 0, + 50331649, + 0, + 3265266687, + 2, + 33, + 0, + 4294844415, + 0, + 4278190047, + 2, + 20, + 2, + 137, + -1, + 3, + 0, + 2, + 2, + 23, + 2, + 0, + 2, + 9, + 2, + 0, + 2, + 15, + 2, + 22, + 3, + 0, + 10, + 2, + 72, + 2, + 0, + 2, + 73, + 2, + 74, + 2, + 75, + 2, + 0, + 2, + 76, + 2, + 0, + 2, + 11, + 0, + 261632, + 2, + 25, + 3, + 0, + 2, + 2, + 13, + 2, + 4, + 3, + 0, + 18, + 2, + 77, + 2, + 5, + 3, + 0, + 2, + 2, + 78, + 0, + 2151677951, + 2, + 29, + 2, + 10, + 0, + 909311, + 3, + 0, + 2, + 0, + 814743551, + 2, + 48, + 0, + 67090432, + 3, + 0, + 2, + 2, + 42, + 2, + 0, + 2, + 6, + 2, + 0, + 2, + 30, + 2, + 8, + 0, + 268374015, + 2, + 108, + 2, + 51, + 2, + 0, + 2, + 79, + 0, + 134153215, + -1, + 2, + 7, + 2, + 0, + 2, + 8, + 0, + 2684354559, + 0, + 67044351, + 0, + 3221160064, + 2, + 9, + 2, + 18, + 3, + 0, + 2, + 2, + 53, + 0, + 1046528, + 3, + 0, + 3, + 2, + 10, + 2, + 0, + 2, + 127, + 0, + 4294960127, + 2, + 9, + 2, + 6, + 2, + 11, + 0, + 4294377472, + 2, + 12, + 3, + 0, + 16, + 2, + 13, + 2, + 0, + 2, + 80, + 2, + 9, + 2, + 0, + 2, + 81, + 2, + 82, + 2, + 83, + 0, + 12288, + 2, + 54, + 0, + 1048577, + 2, + 84, + 2, + 14, + -1, + 2, + 14, + 0, + 131042, + 2, + 85, + 2, + 86, + 2, + 87, + 2, + 0, + 2, + 34, + -83, + 3, + 0, + 7, + 0, + 1046559, + 2, + 0, + 2, + 15, + 2, + 0, + 0, + 2147516671, + 2, + 21, + 3, + 88, + 2, + 2, + 0, + -16, + 2, + 89, + 0, + 524222462, + 2, + 4, + 2, + 0, + 0, + 4269801471, + 2, + 4, + 3, + 0, + 2, + 2, + 28, + 2, + 16, + 3, + 0, + 2, + 2, + 49, + 2, + 0, + -1, + 2, + 17, + -16, + 3, + 0, + 206, + -2, + 3, + 0, + 692, + 2, + 71, + -1, + 2, + 17, + 2, + 9, + 3, + 0, + 8, + 2, + 91, + 2, + 18, + 2, + 0, + 0, + 3220242431, + 3, + 0, + 3, + 2, + 19, + 2, + 92, + 2, + 93, + 3, + 0, + 2, + 2, + 94, + 2, + 0, + 2, + 20, + 2, + 95, + 2, + 0, + 0, + 4351, + 2, + 0, + 2, + 10, + 3, + 0, + 2, + 0, + 67043391, + 0, + 3909091327, + 2, + 0, + 2, + 24, + 2, + 10, + 2, + 20, + 3, + 0, + 2, + 0, + 67076097, + 2, + 8, + 2, + 0, + 2, + 21, + 0, + 67059711, + 0, + 4236247039, + 3, + 0, + 2, + 0, + 939524103, + 0, + 8191999, + 2, + 99, + 2, + 100, + 2, + 22, + 2, + 23, + 3, + 0, + 3, + 0, + 67057663, + 3, + 0, + 349, + 2, + 101, + 2, + 102, + 2, + 7, + -264, + 3, + 0, + 11, + 2, + 24, + 3, + 0, + 2, + 2, + 32, + -1, + 0, + 3774349439, + 2, + 103, + 2, + 104, + 3, + 0, + 2, + 2, + 19, + 2, + 105, + 3, + 0, + 10, + 2, + 9, + 2, + 17, + 2, + 0, + 2, + 46, + 2, + 0, + 2, + 31, + 2, + 106, + 2, + 25, + 0, + 1638399, + 0, + 57344, + 2, + 107, + 3, + 0, + 3, + 2, + 20, + 2, + 26, + 2, + 27, + 2, + 5, + 2, + 28, + 2, + 0, + 2, + 8, + 2, + 109, + -1, + 2, + 110, + 2, + 111, + 2, + 112, + -1, + 3, + 0, + 3, + 2, + 12, + -2, + 2, + 0, + 2, + 29, + -3, + 0, + 536870912, + -4, + 2, + 20, + 2, + 0, + 2, + 36, + 0, + 1, + 2, + 0, + 2, + 65, + 2, + 6, + 2, + 12, + 2, + 9, + 2, + 0, + 2, + 113, + -1, + 3, + 0, + 4, + 2, + 9, + 2, + 23, + 2, + 114, + 2, + 7, + 2, + 0, + 2, + 115, + 2, + 0, + 2, + 116, + 2, + 117, + 2, + 118, + 2, + 0, + 2, + 10, + 3, + 0, + 9, + 2, + 21, + 2, + 30, + 2, + 31, + 2, + 119, + 2, + 120, + -2, + 2, + 121, + 2, + 122, + 2, + 30, + 2, + 21, + 2, + 8, + -2, + 2, + 123, + 2, + 30, + 3, + 32, + 2, + -1, + 2, + 0, + 2, + 39, + -2, + 0, + 4277137519, + 0, + 2269118463, + -1, + 3, + 20, + 2, + -1, + 2, + 33, + 2, + 38, + 2, + 0, + 3, + 30, + 2, + 2, + 35, + 2, + 19, + -3, + 3, + 0, + 2, + 2, + 34, + -1, + 2, + 0, + 2, + 35, + 2, + 0, + 2, + 35, + 2, + 0, + 2, + 47, + 2, + 0, + 0, + 4294950463, + 2, + 37, + -7, + 2, + 0, + 0, + 203775, + 2, + 125, + 0, + 4227858432, + 2, + 20, + 2, + 43, + 2, + 36, + 2, + 17, + 2, + 37, + 2, + 17, + 2, + 124, + 2, + 21, + 3, + 0, + 2, + 2, + 38, + 0, + 2151677888, + 2, + 0, + 2, + 12, + 0, + 4294901764, + 2, + 145, + 2, + 0, + 2, + 56, + 2, + 55, + 0, + 5242879, + 3, + 0, + 2, + 0, + 402644511, + -1, + 2, + 128, + 2, + 39, + 0, + 3, + -1, + 2, + 129, + 2, + 130, + 2, + 0, + 0, + 67045375, + 2, + 40, + 0, + 4226678271, + 0, + 3766565279, + 0, + 2039759, + 2, + 132, + 2, + 41, + 0, + 1046437, + 0, + 6, + 3, + 0, + 2, + 0, + 3288270847, + 0, + 3, + 3, + 0, + 2, + 0, + 67043519, + -5, + 2, + 0, + 0, + 4282384383, + 0, + 1056964609, + -1, + 3, + 0, + 2, + 0, + 67043345, + -1, + 2, + 0, + 2, + 42, + 2, + 23, + 2, + 50, + 2, + 11, + 2, + 59, + 2, + 38, + -5, + 2, + 0, + 2, + 12, + -3, + 3, + 0, + 2, + 0, + 2147484671, + 2, + 133, + 0, + 4190109695, + 2, + 52, + -2, + 2, + 134, + 0, + 4244635647, + 0, + 27, + 2, + 0, + 2, + 8, + 2, + 43, + 2, + 0, + 2, + 66, + 2, + 17, + 2, + 0, + 2, + 42, + -3, + 2, + 31, + -2, + 2, + 0, + 2, + 45, + 2, + 57, + 2, + 44, + 2, + 45, + 2, + 135, + 2, + 46, + 0, + 8388351, + -2, + 2, + 136, + 0, + 3028287487, + 2, + 47, + 2, + 138, + 0, + 33259519, + 2, + 23, + 2, + 7, + 2, + 48, + -7, + 2, + 21, + 0, + 4294836223, + 0, + 3355443199, + 0, + 134152199, + -2, + 2, + 67, + -2, + 3, + 0, + 28, + 2, + 32, + -3, + 3, + 0, + 3, + 2, + 49, + 3, + 0, + 6, + 2, + 50, + -81, + 2, + 17, + 3, + 0, + 2, + 2, + 36, + 3, + 0, + 33, + 2, + 25, + 2, + 30, + 3, + 0, + 124, + 2, + 12, + 3, + 0, + 18, + 2, + 38, + -213, + 2, + 0, + 2, + 32, + -54, + 3, + 0, + 17, + 2, + 42, + 2, + 8, + 2, + 23, + 2, + 0, + 2, + 8, + 2, + 23, + 2, + 51, + 2, + 0, + 2, + 21, + 2, + 52, + 2, + 139, + 2, + 25, + -13, + 2, + 0, + 2, + 53, + -6, + 3, + 0, + 2, + -1, + 2, + 140, + 2, + 10, + -1, + 3, + 0, + 2, + 0, + 4294936575, + 2, + 0, + 0, + 4294934783, + -2, + 0, + 8323099, + 3, + 0, + 230, + 2, + 30, + 2, + 54, + 2, + 8, + -3, + 3, + 0, + 3, + 2, + 35, + -271, + 2, + 141, + 3, + 0, + 9, + 2, + 142, + 2, + 143, + 2, + 55, + 3, + 0, + 11, + 2, + 7, + -72, + 3, + 0, + 3, + 2, + 144, + 0, + 1677656575, + -130, + 2, + 26, + -16, + 2, + 0, + 2, + 24, + 2, + 38, + -16, + 0, + 4161266656, + 0, + 4071, + 0, + 15360, + -4, + 0, + 28, + -13, + 3, + 0, + 2, + 2, + 56, + 2, + 0, + 2, + 146, + 2, + 147, + 2, + 60, + 2, + 0, + 2, + 148, + 2, + 149, + 2, + 150, + 3, + 0, + 10, + 2, + 151, + 2, + 152, + 2, + 22, + 3, + 56, + 2, + 3, + 153, + 2, + 3, + 57, + 2, + 0, + 4294954999, + 2, + 0, + -16, + 2, + 0, + 2, + 90, + 2, + 0, + 0, + 2105343, + 0, + 4160749584, + 0, + 65534, + -34, + 2, + 8, + 2, + 155, + -6, + 0, + 4194303871, + 0, + 4294903771, + 2, + 0, + 2, + 58, + 2, + 98, + -3, + 2, + 0, + 0, + 1073684479, + 0, + 17407, + -9, + 2, + 17, + 2, + 49, + 2, + 0, + 2, + 32, + -14, + 2, + 17, + 2, + 32, + -6, + 2, + 17, + 2, + 12, + -6, + 2, + 8, + 0, + 3225419775, + -7, + 2, + 156, + 3, + 0, + 6, + 0, + 8323103, + -1, + 3, + 0, + 2, + 2, + 59, + -37, + 2, + 60, + 2, + 157, + 2, + 158, + 2, + 159, + 2, + 160, + 2, + 161, + -105, + 2, + 26, + -32, + 3, + 0, + 1335, + -1, + 3, + 0, + 136, + 2, + 9, + 3, + 0, + 180, + 2, + 24, + 3, + 0, + 233, + 2, + 162, + 3, + 0, + 18, + 2, + 9, + -77, + 3, + 0, + 16, + 2, + 9, + -47, + 3, + 0, + 154, + 2, + 6, + 3, + 0, + 264, + 2, + 32, + -22116, + 3, + 0, + 7, + 2, + 25, + -6130, + 3, + 5, + 2, + -1, + 0, + 69207040, + 3, + 44, + 2, + 3, + 0, + 14, + 2, + 61, + 2, + 62, + -3, + 0, + 3168731136, + 0, + 4294956864, + 2, + 1, + 2, + 0, + 2, + 41, + 3, + 0, + 4, + 0, + 4294966275, + 3, + 0, + 4, + 2, + 16, + 2, + 63, + 2, + 0, + 2, + 34, + -1, + 2, + 17, + 2, + 64, + -1, + 2, + 0, + 0, + 2047, + 0, + 4294885376, + 3, + 0, + 2, + 0, + 3145727, + 0, + 2617294944, + 0, + 4294770688, + 2, + 25, + 2, + 65, + 3, + 0, + 2, + 0, + 131135, + 2, + 96, + 0, + 70256639, + 0, + 71303167, + 0, + 272, + 2, + 42, + 2, + 6, + 0, + 65279, + 2, + 0, + 2, + 48, + -1, + 2, + 97, + 2, + 66, + 0, + 4278255616, + 0, + 4294836227, + 0, + 4294549473, + 0, + 600178175, + 0, + 2952806400, + 0, + 268632067, + 0, + 4294543328, + 0, + 57540095, + 0, + 1577058304, + 0, + 1835008, + 0, + 4294688736, + 2, + 68, + 2, + 67, + 0, + 33554435, + 2, + 131, + 2, + 68, + 0, + 2952790016, + 0, + 131075, + 0, + 3594373096, + 0, + 67094296, + 2, + 67, + -1, + 0, + 4294828e3, + 0, + 603979263, + 0, + 922746880, + 0, + 3, + 0, + 4294828001, + 0, + 602930687, + 0, + 1879048192, + 0, + 393219, + 0, + 4294828016, + 0, + 671088639, + 0, + 2154840064, + 0, + 4227858435, + 0, + 4236247008, + 2, + 69, + 2, + 38, + -1, + 2, + 4, + 0, + 917503, + 2, + 38, + -1, + 2, + 70, + 0, + 537788335, + 0, + 4026531935, + -1, + 0, + 1, + -1, + 2, + 33, + 2, + 71, + 0, + 7936, + -3, + 2, + 0, + 0, + 2147485695, + 0, + 1010761728, + 0, + 4292984930, + 0, + 16387, + 2, + 0, + 2, + 15, + 2, + 22, + 3, + 0, + 10, + 2, + 72, + 2, + 0, + 2, + 73, + 2, + 74, + 2, + 75, + 2, + 0, + 2, + 76, + 2, + 0, + 2, + 12, + -1, + 2, + 25, + 3, + 0, + 2, + 2, + 13, + 2, + 4, + 3, + 0, + 18, + 2, + 77, + 2, + 5, + 3, + 0, + 2, + 2, + 78, + 0, + 2147745791, + 3, + 19, + 2, + 0, + 122879, + 2, + 0, + 2, + 10, + 0, + 276824064, + -2, + 3, + 0, + 2, + 2, + 42, + 2, + 0, + 0, + 4294903295, + 2, + 0, + 2, + 30, + 2, + 8, + -1, + 2, + 17, + 2, + 51, + 2, + 0, + 2, + 79, + 2, + 48, + -1, + 2, + 21, + 2, + 0, + 2, + 29, + -2, + 0, + 128, + -2, + 2, + 28, + 2, + 10, + 0, + 8160, + -1, + 2, + 126, + 0, + 4227907585, + 2, + 0, + 2, + 37, + 2, + 0, + 2, + 50, + 0, + 4227915776, + 2, + 9, + 2, + 6, + 2, + 11, + -1, + 0, + 74440192, + 3, + 0, + 6, + -2, + 3, + 0, + 8, + 2, + 13, + 2, + 0, + 2, + 80, + 2, + 9, + 2, + 0, + 2, + 81, + 2, + 82, + 2, + 83, + -3, + 2, + 84, + 2, + 14, + -3, + 2, + 85, + 2, + 86, + 2, + 87, + 2, + 0, + 2, + 34, + -83, + 3, + 0, + 7, + 0, + 817183, + 2, + 0, + 2, + 15, + 2, + 0, + 0, + 33023, + 2, + 21, + 3, + 88, + 2, + -17, + 2, + 89, + 0, + 524157950, + 2, + 4, + 2, + 0, + 2, + 90, + 2, + 4, + 2, + 0, + 2, + 22, + 2, + 28, + 2, + 16, + 3, + 0, + 2, + 2, + 49, + 2, + 0, + -1, + 2, + 17, + -16, + 3, + 0, + 206, + -2, + 3, + 0, + 692, + 2, + 71, + -1, + 2, + 17, + 2, + 9, + 3, + 0, + 8, + 2, + 91, + 0, + 3072, + 2, + 0, + 0, + 2147516415, + 2, + 9, + 3, + 0, + 2, + 2, + 25, + 2, + 92, + 2, + 93, + 3, + 0, + 2, + 2, + 94, + 2, + 0, + 2, + 20, + 2, + 95, + 0, + 4294965179, + 0, + 7, + 2, + 0, + 2, + 10, + 2, + 93, + 2, + 10, + -1, + 0, + 1761345536, + 2, + 96, + 0, + 4294901823, + 2, + 38, + 2, + 20, + 2, + 97, + 2, + 35, + 2, + 98, + 0, + 2080440287, + 2, + 0, + 2, + 34, + 2, + 154, + 0, + 3296722943, + 2, + 0, + 0, + 1046675455, + 0, + 939524101, + 0, + 1837055, + 2, + 99, + 2, + 100, + 2, + 22, + 2, + 23, + 3, + 0, + 3, + 0, + 7, + 3, + 0, + 349, + 2, + 101, + 2, + 102, + 2, + 7, + -264, + 3, + 0, + 11, + 2, + 24, + 3, + 0, + 2, + 2, + 32, + -1, + 0, + 2700607615, + 2, + 103, + 2, + 104, + 3, + 0, + 2, + 2, + 19, + 2, + 105, + 3, + 0, + 10, + 2, + 9, + 2, + 17, + 2, + 0, + 2, + 46, + 2, + 0, + 2, + 31, + 2, + 106, + -3, + 2, + 107, + 3, + 0, + 3, + 2, + 20, + -1, + 3, + 5, + 2, + 2, + 108, + 2, + 0, + 2, + 8, + 2, + 109, + -1, + 2, + 110, + 2, + 111, + 2, + 112, + -1, + 3, + 0, + 3, + 2, + 12, + -2, + 2, + 0, + 2, + 29, + -8, + 2, + 20, + 2, + 0, + 2, + 36, + -1, + 2, + 0, + 2, + 65, + 2, + 6, + 2, + 30, + 2, + 9, + 2, + 0, + 2, + 113, + -1, + 3, + 0, + 4, + 2, + 9, + 2, + 17, + 2, + 114, + 2, + 7, + 2, + 0, + 2, + 115, + 2, + 0, + 2, + 116, + 2, + 117, + 2, + 118, + 2, + 0, + 2, + 10, + 3, + 0, + 9, + 2, + 21, + 2, + 30, + 2, + 31, + 2, + 119, + 2, + 120, + -2, + 2, + 121, + 2, + 122, + 2, + 30, + 2, + 21, + 2, + 8, + -2, + 2, + 123, + 2, + 30, + 3, + 32, + 2, + -1, + 2, + 0, + 2, + 39, + -2, + 0, + 4277075969, + 2, + 30, + -1, + 3, + 20, + 2, + -1, + 2, + 33, + 2, + 124, + 2, + 0, + 3, + 30, + 2, + 2, + 35, + 2, + 19, + -3, + 3, + 0, + 2, + 2, + 34, + -1, + 2, + 0, + 2, + 35, + 2, + 0, + 2, + 35, + 2, + 0, + 2, + 50, + 2, + 96, + 0, + 4294934591, + 2, + 37, + -7, + 2, + 0, + 0, + 197631, + 2, + 125, + -1, + 2, + 20, + 2, + 43, + 2, + 37, + 2, + 17, + 0, + 3, + 2, + 17, + 2, + 124, + 2, + 21, + 2, + 126, + 2, + 127, + -1, + 0, + 2490368, + 2, + 126, + 2, + 25, + 2, + 17, + 2, + 34, + 2, + 126, + 2, + 38, + 0, + 4294901904, + 0, + 4718591, + 2, + 126, + 2, + 35, + 0, + 335544350, + -1, + 2, + 128, + 0, + 2147487743, + 0, + 1, + -1, + 2, + 129, + 2, + 130, + 2, + 8, + -1, + 2, + 131, + 2, + 68, + 0, + 3758161920, + 0, + 3, + 2, + 132, + 0, + 12582911, + 0, + 655360, + -1, + 2, + 0, + 2, + 29, + 0, + 2147485568, + 0, + 3, + 2, + 0, + 2, + 25, + 0, + 176, + -5, + 2, + 0, + 2, + 49, + 0, + 251658240, + -1, + 2, + 0, + 2, + 25, + 0, + 16, + -1, + 2, + 0, + 0, + 16779263, + -2, + 2, + 12, + -1, + 2, + 38, + -5, + 2, + 0, + 2, + 18, + -3, + 3, + 0, + 2, + 2, + 54, + 2, + 133, + 0, + 2147549183, + 0, + 2, + -2, + 2, + 134, + 2, + 36, + 0, + 10, + 0, + 4294965249, + 0, + 67633151, + 0, + 4026597376, + 2, + 0, + 0, + 536871935, + 2, + 17, + 2, + 0, + 2, + 42, + -6, + 2, + 0, + 0, + 1, + 2, + 57, + 2, + 49, + 0, + 1, + 2, + 135, + 2, + 25, + -3, + 2, + 136, + 2, + 36, + 2, + 137, + 2, + 138, + 0, + 16778239, + 2, + 17, + 2, + 7, + -8, + 2, + 35, + 0, + 4294836212, + 2, + 10, + -3, + 2, + 67, + -2, + 3, + 0, + 28, + 2, + 32, + -3, + 3, + 0, + 3, + 2, + 49, + 3, + 0, + 6, + 2, + 50, + -81, + 2, + 17, + 3, + 0, + 2, + 2, + 36, + 3, + 0, + 33, + 2, + 25, + 0, + 126, + 3, + 0, + 124, + 2, + 12, + 3, + 0, + 18, + 2, + 38, + -213, + 2, + 9, + -55, + 3, + 0, + 17, + 2, + 42, + 2, + 8, + 2, + 17, + 2, + 0, + 2, + 8, + 2, + 17, + 2, + 58, + 2, + 0, + 2, + 25, + 2, + 50, + 2, + 139, + 2, + 25, + -13, + 2, + 0, + 2, + 71, + -6, + 3, + 0, + 2, + -1, + 2, + 140, + 2, + 10, + -1, + 3, + 0, + 2, + 0, + 67583, + -1, + 2, + 105, + -2, + 0, + 8126475, + 3, + 0, + 230, + 2, + 30, + 2, + 54, + 2, + 8, + -3, + 3, + 0, + 3, + 2, + 35, + -271, + 2, + 141, + 3, + 0, + 9, + 2, + 142, + 2, + 143, + 2, + 55, + 3, + 0, + 11, + 2, + 7, + -72, + 3, + 0, + 3, + 2, + 144, + 2, + 145, + -187, + 3, + 0, + 2, + 2, + 56, + 2, + 0, + 2, + 146, + 2, + 147, + 2, + 60, + 2, + 0, + 2, + 148, + 2, + 149, + 2, + 150, + 3, + 0, + 10, + 2, + 151, + 2, + 152, + 2, + 22, + 3, + 56, + 2, + 3, + 153, + 2, + 3, + 57, + 2, + 2, + 154, + -57, + 2, + 8, + 2, + 155, + -7, + 2, + 17, + 2, + 0, + 2, + 58, + -4, + 2, + 0, + 0, + 1065361407, + 0, + 16384, + -9, + 2, + 17, + 2, + 58, + 2, + 0, + 2, + 18, + -14, + 2, + 17, + 2, + 18, + -6, + 2, + 17, + 0, + 81919, + -6, + 2, + 8, + 0, + 3223273399, + -7, + 2, + 156, + 3, + 0, + 6, + 2, + 124, + -1, + 3, + 0, + 2, + 0, + 2063, + -37, + 2, + 60, + 2, + 157, + 2, + 158, + 2, + 159, + 2, + 160, + 2, + 161, + -138, + 3, + 0, + 1335, + -1, + 3, + 0, + 136, + 2, + 9, + 3, + 0, + 180, + 2, + 24, + 3, + 0, + 233, + 2, + 162, + 3, + 0, + 18, + 2, + 9, + -77, + 3, + 0, + 16, + 2, + 9, + -47, + 3, + 0, + 154, + 2, + 6, + 3, + 0, + 264, + 2, + 32, + -28252 + ], [ + 4294967295, + 4294967291, + 4092460543, + 4294828031, + 4294967294, + 134217726, + 4294903807, + 268435455, + 2147483647, + 1073741823, + 1048575, + 3892314111, + 134217727, + 1061158911, + 536805376, + 4294910143, + 4294901759, + 4294901760, + 4095, + 262143, + 536870911, + 8388607, + 4160749567, + 4294902783, + 4294918143, + 65535, + 67043328, + 2281701374, + 4294967264, + 2097151, + 4194303, + 255, + 67108863, + 4294967039, + 511, + 524287, + 131071, + 63, + 127, + 3238002687, + 4294549487, + 4290772991, + 33554431, + 4294901888, + 4286578687, + 67043329, + 4294770687, + 67043583, + 1023, + 32767, + 15, + 2047999, + 67043343, + 67051519, + 2147483648, + 4294902e3, + 4292870143, + 4294966783, + 16383, + 67047423, + 4294967279, + 262083, + 20511, + 41943039, + 493567, + 4294959104, + 603979775, + 65536, + 602799615, + 805044223, + 4294965206, + 8191, + 1031749119, + 4294917631, + 2134769663, + 4286578493, + 4282253311, + 4294942719, + 33540095, + 4294905855, + 2868854591, + 1608515583, + 265232348, + 534519807, + 2147614720, + 1060109444, + 4093640016, + 17376, + 2139062143, + 224, + 4169138175, + 4294909951, + 4286578688, + 4294967292, + 4294965759, + 4294836224, + 4294966272, + 4294967280, + 32768, + 8289918, + 4294934399, + 4294901775, + 4294965375, + 1602223615, + 4294967259, + 4294443008, + 268369920, + 4292804608, + 4294967232, + 486341884, + 4294963199, + 3087007615, + 1073692671, + 4128527, + 4279238655, + 4294902015, + 4160684047, + 4290246655, + 469499899, + 4294967231, + 134086655, + 4294966591, + 2445279231, + 3670015, + 31, + 252, + 4294967288, + 16777215, + 4294705151, + 3221208447, + 4294902271, + 4294549472, + 4294921215, + 4285526655, + 4294966527, + 4294705152, + 4294966143, + 64, + 4294966719, + 3774873592, + 4194303999, + 1877934080, + 262151, + 2555904, + 536807423, + 67043839, + 3758096383, + 3959414372, + 3755993023, + 2080374783, + 4294835295, + 4294967103, + 4160749565, + 4294934527, + 4087, + 2016, + 2147446655, + 184024726, + 2862017156, + 1593309078, + 268434431, + 268434414, + 4294901761 + ]), J2 = (e) => (Dt[(e >>> 5) + 0] >>> e & 1) !== 0, Ct = (e) => (Dt[(e >>> 5) + 34816] >>> e & 1) !== 0, S = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1032, + 0, + 0, + 2056, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 8192, + 0, + 3, + 0, + 0, + 8192, + 0, + 0, + 0, + 256, + 0, + 33024, + 0, + 0, + 242, + 242, + 114, + 114, + 114, + 114, + 114, + 114, + 594, + 594, + 0, + 0, + 16384, + 0, + 0, + 0, + 0, + 67, + 67, + 67, + 67, + 67, + 67, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 3, + 0, + 1, + 0, + 0, + 4099, + 0, + 71, + 71, + 71, + 71, + 71, + 71, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 16384, + 0, + 0, + 0, + 0 + ], _2 = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0 + ], Et = [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0 + ]; + wt = [ + "SingleLine", + "MultiLine", + "HTMLOpen", + "HTMLClose", + "HashbangComment" + ]; + K2 = { + 0: "Unexpected token", + 30: "Unexpected token: '%0'", + 1: "Octal escape sequences are not allowed in strict mode", + 2: "Octal escape sequences are not allowed in template strings", + 3: "\\8 and \\9 are not allowed in template strings", + 4: "Private identifier #%0 is not defined", + 5: "Illegal Unicode escape sequence", + 6: "Invalid code point %0", + 7: "Invalid hexadecimal escape sequence", + 9: "Octal literals are not allowed in strict mode", + 8: "Decimal integer literals with a leading zero are forbidden in strict mode", + 10: "Expected number in radix %0", + 151: "Invalid left-hand side assignment to a destructible right-hand side", + 11: "Non-number found after exponent indicator", + 12: "Invalid BigIntLiteral", + 13: "No identifiers allowed directly after numeric literal", + 14: "Escapes \\8 or \\9 are not syntactically valid escapes", + 15: "Escapes \\8 or \\9 are not allowed in strict mode", + 16: "Unterminated string literal", + 17: "Unterminated template literal", + 18: "Multiline comment was not closed properly", + 19: "The identifier contained dynamic unicode escape that was not closed", + 20: "Illegal character '%0'", + 21: "Missing hexadecimal digits", + 22: "Invalid implicit octal", + 23: "Invalid line break in string literal", + 24: "Only unicode escapes are legal in identifier names", + 25: "Expected '%0'", + 26: "Invalid left-hand side in assignment", + 27: "Invalid left-hand side in async arrow", + 28: "Calls to super must be in the \"constructor\" method of a class expression or class declaration that has a superclass", + 29: "Member access on super must be in a method", + 31: "Await expression not allowed in formal parameter", + 32: "Yield expression not allowed in formal parameter", + 95: "Unexpected token: 'escaped keyword'", + 33: "Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses", + 123: "Async functions can only be declared at the top level or inside a block", + 34: "Unterminated regular expression", + 35: "Unexpected regular expression flag", + 36: "Duplicate regular expression flag '%0'", + 37: "%0 functions must have exactly %1 argument%2", + 38: "Setter function argument must not be a rest parameter", + 39: "%0 declaration must have a name in this context", + 40: "Function name may not contain any reserved words or be eval or arguments in strict mode", + 41: "The rest operator is missing an argument", + 42: "A getter cannot be a generator", + 43: "A setter cannot be a generator", + 44: "A computed property name must be followed by a colon or paren", + 134: "Object literal keys that are strings or numbers must be a method or have a colon", + 46: "Found `* async x(){}` but this should be `async * x(){}`", + 45: "Getters and setters can not be generators", + 47: "'%0' can not be generator method", + 48: "No line break is allowed after '=>'", + 49: "The left-hand side of the arrow can only be destructed through assignment", + 50: "The binding declaration is not destructible", + 51: "Async arrow can not be followed by new expression", + 52: "Classes may not have a static property named 'prototype'", + 53: "Class constructor may not be a %0", + 54: "Duplicate constructor method in class", + 55: "Invalid increment/decrement operand", + 56: "Invalid use of `new` keyword on an increment/decrement expression", + 57: "`=>` is an invalid assignment target", + 58: "Rest element may not have a trailing comma", + 59: "Missing initializer in %0 declaration", + 60: "'for-%0' loop head declarations can not have an initializer", + 61: "Invalid left-hand side in for-%0 loop: Must have a single binding", + 62: "Invalid shorthand property initializer", + 63: "Property name __proto__ appears more than once in object literal", + 64: "Let is disallowed as a lexically bound name", + 65: "Invalid use of '%0' inside new expression", + 66: "Illegal 'use strict' directive in function with non-simple parameter list", + 67: "Identifier \"let\" disallowed as left-hand side expression in strict mode", + 68: "Illegal continue statement", + 69: "Illegal break statement", + 70: "Cannot have `let[...]` as a var name in strict mode", + 71: "Invalid destructuring assignment target", + 72: "Rest parameter may not have a default initializer", + 73: "The rest argument must the be last parameter", + 74: "Invalid rest argument", + 76: "In strict mode code, functions can only be declared at top level or inside a block", + 77: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement", + 78: "Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement", + 79: "Class declaration can't appear in single-statement context", + 80: "Invalid left-hand side in for-%0", + 81: "Invalid assignment in for-%0", + 82: "for await (... of ...) is only valid in async functions and async generators", + 83: "The first token after the template expression should be a continuation of the template", + 85: "`let` declaration not allowed here and `let` cannot be a regular var name in strict mode", + 84: "`let \n [` is a restricted production at the start of a statement", + 86: "Catch clause requires exactly one parameter, not more (and no trailing comma)", + 87: "Catch clause parameter does not support default values", + 88: "Missing catch or finally after try", + 89: "More than one default clause in switch statement", + 90: "Illegal newline after throw", + 91: "Strict mode code may not include a with statement", + 92: "Illegal return statement", + 93: "The left hand side of the for-header binding declaration is not destructible", + 94: "new.target only allowed within functions or static blocks", + 96: "'#' not followed by identifier", + 102: "Invalid keyword", + 101: "Can not use 'let' as a class name", + 100: "'A lexical declaration can't define a 'let' binding", + 99: "Can not use `let` as variable name in strict mode", + 97: "'%0' may not be used as an identifier in this context", + 98: "Await is only valid in async functions", + 103: "The %0 keyword can only be used with the module goal", + 104: "Unicode codepoint must not be greater than 0x10FFFF", + 105: "%0 source must be string", + 106: "Only a identifier or string can be used to indicate alias", + 107: "Only '*' or '{...}' can be imported after default", + 108: "Trailing decorator may be followed by method", + 109: "Decorators can't be used with a constructor", + 110: "Can not use `await` as identifier in module or async func", + 111: "Can not use `await` as identifier in module", + 112: "HTML comments are only allowed with web compatibility (Annex B)", + 113: "The identifier 'let' must not be in expression position in strict mode", + 114: "Cannot assign to `eval` and `arguments` in strict mode", + 115: "The left-hand side of a for-of loop may not start with 'let'", + 116: "Block body arrows can not be immediately invoked without a group", + 117: "Block body arrows can not be immediately accessed without a group", + 118: "Unexpected strict mode reserved word", + 119: "Unexpected eval or arguments in strict mode", + 120: "Decorators must not be followed by a semicolon", + 121: "Calling delete on expression not allowed in strict mode", + 122: "Pattern can not have a tail", + 124: "Can not have a `yield` expression on the left side of a ternary", + 125: "An arrow function can not have a postfix update operator", + 126: "Invalid object literal key character after generator star", + 127: "Private fields can not be deleted", + 129: "Classes may not have a field called constructor", + 128: "Classes may not have a private element named constructor", + 130: "A class field initializer or static block may not contain arguments", + 131: "Generators can only be declared at the top level or inside a block", + 132: "Async methods are a restricted production and cannot have a newline following it", + 133: "Unexpected character after object literal property name", + 135: "Invalid key token", + 136: "Label '%0' has already been declared", + 137: "continue statement must be nested within an iteration statement", + 138: "Undefined label '%0'", + 139: "Trailing comma is disallowed inside import(...) arguments", + 140: "Invalid binding in JSON import", + 141: "import() requires exactly one argument", + 142: "Cannot use new with import(...)", + 143: "... is not allowed in import()", + 144: "Expected '=>'", + 145: "Duplicate binding '%0'", + 146: "Duplicate private identifier #%0", + 147: "Cannot export a duplicate name '%0'", + 150: "Duplicate %0 for-binding", + 148: "Exported binding '%0' needs to refer to a top-level declared variable", + 149: "Unexpected private field", + 153: "Numeric separators are not allowed at the end of numeric literals", + 152: "Only one underscore is allowed as numeric separator", + 154: "JSX value should be either an expression or a quoted JSX text", + 155: "Expected corresponding JSX closing tag for %0", + 156: "Adjacent JSX elements must be wrapped in an enclosing tag", + 157: "JSX attributes must only be assigned a non-empty 'expression'", + 158: "'%0' has already been declared", + 159: "'%0' shadowed a catch clause binding", + 160: "Dot property must be an identifier", + 161: "Encountered invalid input after spread/rest argument", + 162: "Catch without try", + 163: "Finally without try", + 164: "Expected corresponding closing tag for JSX fragment", + 165: "Coalescing and logical operators used together in the same expression must be disambiguated with parentheses", + 166: "Invalid tagged template on optional chain", + 167: "Invalid optional chain from super property", + 168: "Invalid optional chain from new expression", + 169: "Cannot use \"import.meta\" outside a module", + 170: "Leading decorators must be attached to a class declaration", + 171: "An export name cannot include a lone surrogate", + 172: "A string literal cannot be used as an exported binding without `from`", + 173: "Private fields can't be accessed on super", + 174: "The only valid meta property for import is 'import.meta'", + 175: "'import.meta' must not contain escaped characters", + 176: "cannot use \"await\" as identifier inside an async function", + 177: "cannot use \"await\" in static blocks" + }, q = class extends SyntaxError { + start; + end; + range; + loc; + description; + constructor(t, n, u, ...o) { + let i = K2[u].replace(/%(\d+)/g, (f, c) => o[c]), l = "[" + t.line + ":" + t.column + "-" + n.line + ":" + n.column + "]: " + i; + super(l), this.start = t.index, this.end = n.index, this.range = [t.index, n.index], this.loc = { + start: { + line: t.line, + column: t.column + }, + end: { + line: n.line, + column: n.column + } + }, this.description = i; + } + }; + B = [ + "end of source", + "identifier", + "number", + "string", + "regular expression", + "false", + "true", + "null", + "template continuation", + "template tail", + "=>", + "(", + "{", + ".", + "...", + "}", + ")", + ";", + ",", + "[", + "]", + ":", + "?", + "'", + "\"", + "++", + "--", + "=", + "<<=", + ">>=", + ">>>=", + "**=", + "+=", + "-=", + "*=", + "/=", + "%=", + "^=", + "|=", + "&=", + "||=", + "&&=", + "??=", + "typeof", + "delete", + "void", + "!", + "~", + "+", + "-", + "in", + "instanceof", + "*", + "%", + "/", + "**", + "&&", + "||", + "===", + "!==", + "==", + "!=", + "<=", + ">=", + "<", + ">", + "<<", + ">>", + ">>>", + "&", + "|", + "^", + "var", + "let", + "const", + "break", + "case", + "catch", + "class", + "continue", + "debugger", + "default", + "do", + "else", + "export", + "extends", + "finally", + "for", + "function", + "if", + "import", + "new", + "return", + "super", + "switch", + "this", + "throw", + "try", + "while", + "with", + "implements", + "interface", + "package", + "private", + "protected", + "public", + "static", + "yield", + "as", + "async", + "await", + "constructor", + "get", + "set", + "accessor", + "from", + "of", + "enum", + "eval", + "arguments", + "escaped keyword", + "escaped future reserved keyword", + "reserved if strict", + "#", + "BigIntLiteral", + "??", + "?.", + "WhiteSpace", + "Illegal", + "LineTerminator", + "PrivateField", + "Template", + "@", + "target", + "meta", + "LineFeed", + "Escaped", + "JSXText" + ], Bt = { + this: 86111, + function: 86104, + if: 20569, + return: 20572, + var: 86088, + else: 20563, + for: 20567, + new: 86107, + in: 8673330, + typeof: 16863275, + while: 20578, + case: 20556, + break: 20555, + try: 20577, + catch: 20557, + delete: 16863276, + throw: 86112, + switch: 86110, + continue: 20559, + default: 20561, + instanceof: 8411187, + do: 20562, + void: 16863277, + finally: 20566, + async: 209005, + await: 209006, + class: 86094, + const: 86090, + constructor: 12399, + debugger: 20560, + export: 20564, + extends: 20565, + false: 86021, + from: 209011, + get: 209008, + implements: 36964, + import: 86106, + interface: 36965, + let: 241737, + null: 86023, + of: 471156, + package: 36966, + private: 36967, + protected: 36968, + public: 36969, + set: 209009, + static: 36970, + super: 86109, + true: 86022, + with: 20579, + yield: 241771, + enum: 86133, + eval: 537079926, + as: 77932, + arguments: 537079927, + target: 209029, + meta: 209030, + accessor: 12402 + }; + (function(e) { + e[e.Empty = 0] = "Empty", e[e.Escape = 1] = "Escape", e[e.Class = 2] = "Class"; + })(Z || (Z = {})); + (function(e) { + e[e.Empty = 0] = "Empty", e[e.IgnoreCase = 1] = "IgnoreCase", e[e.Global = 2] = "Global", e[e.Multiline = 4] = "Multiline", e[e.Unicode = 16] = "Unicode", e[e.Sticky = 8] = "Sticky", e[e.DotAll = 32] = "DotAll", e[e.Indices = 64] = "Indices", e[e.UnicodeSets = 128] = "UnicodeSets"; + })(P || (P = {})); + en = [ + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 127, + 135, + 127, + 127, + 129, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 128, + 127, + 16842798, + 134283267, + 130, + 208897, + 8391477, + 8390213, + 134283267, + 67174411, + 16, + 8391476, + 25233968, + 18, + 25233969, + 67108877, + 8457014, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 134283266, + 21, + 1074790417, + 8456256, + 1077936155, + 8390721, + 22, + 132, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 208897, + 69271571, + 136, + 20, + 8389959, + 208897, + 131, + 4096, + 4096, + 4096, + 4096, + 4096, + 4096, + 4096, + 208897, + 4096, + 208897, + 208897, + 4096, + 208897, + 4096, + 208897, + 4096, + 208897, + 4096, + 4096, + 4096, + 208897, + 4096, + 4096, + 208897, + 4096, + 4096, + 2162700, + 8389702, + 1074790415, + 16842799, + 128 + ]; + Je = class { + parser; + parent; + refs = Object.create(null); + privateIdentifiers = /* @__PURE__ */ new Map(); + constructor(t, n) { + this.parser = t, this.parent = n; + } + addPrivateIdentifier(t, n) { + let { privateIdentifiers: u } = this, o = n & 800; + o & 768 || (o |= 768); + let i = u.get(t); + this.hasPrivateIdentifier(t) && ((i & 32) !== (o & 32) || i & o & 768) && this.parser.report(146, t), u.set(t, this.hasPrivateIdentifier(t) ? i | o : o); + } + addPrivateIdentifierRef(t) { + var n; + (n = this.refs)[t] ?? (n[t] = []), this.refs[t].push(this.parser.tokenStart); + } + isPrivateIdentifierDefined(t) { + return this.hasPrivateIdentifier(t) || !!this.parent?.isPrivateIdentifierDefined(t); + } + validatePrivateIdentifierRefs() { + for (let t in this.refs) if (!this.isPrivateIdentifierDefined(t)) { + let { index: n, line: u, column: o } = this.refs[t][0]; + throw new q({ + index: n, + line: u, + column: o + }, { + index: n + t.length, + line: u, + column: o + t.length + }, 4, t); + } + } + hasPrivateIdentifier(t) { + return this.privateIdentifiers.has(t); + } + }, _e = class e { + parser; + type; + parent; + scopeError; + variableBindings = /* @__PURE__ */ new Map(); + constructor(t, n = 2, u) { + this.parser = t, this.type = n, this.parent = u; + } + createChildScope(t) { + return new e(this.parser, t, this); + } + addVarOrBlock(t, n, u, o) { + u & 4 ? this.addVarName(t, n, u) : this.addBlockName(t, n, u, o), o & 64 && this.parser.declareUnboundVariable(n); + } + addVarName(t, n, u) { + let { parser: o } = this, i = this; + for (; i && (i.type & 128) === 0;) { + let { variableBindings: l } = i, f = l.get(n); + f && f & 248 && (o.options.webcompat && !(t & 1) && (u & 128 && f & 68 || f & 128 && u & 68) || o.report(145, n)), i === this && f && f & 1 && u & 1 && i.recordScopeError(145, n), f && (f & 256 || f & 512 && !o.options.webcompat) && o.report(145, n), i.variableBindings.set(n, u), i = i.parent; + } + } + hasVariable(t) { + return this.variableBindings.has(t); + } + addBlockName(t, n, u, o) { + let { parser: i } = this, l = this.variableBindings.get(n); + l && !(l & 2) && (u & 1 ? this.recordScopeError(145, n) : i.options.webcompat && !(t & 1) && o & 2 && l === 64 && u === 64 || i.report(145, n)), this.type & 64 && this.parent?.hasVariable(n) && !(this.parent.variableBindings.get(n) & 2) && i.report(145, n), this.type & 512 && l && !(l & 2) && u & 1 && this.recordScopeError(145, n), this.type & 32 && this.parent.variableBindings.get(n) & 768 && i.report(159, n), this.variableBindings.set(n, u); + } + recordScopeError(t, ...n) { + this.scopeError = { + type: t, + params: n, + start: this.parser.tokenStart, + end: this.parser.currentLocation + }; + } + reportScopeError() { + let { scopeError: t } = this; + if (t) throw new q(t.start, t.end, t.type, ...t.params); + } + }; + Xe = class { + source; + lastOnToken = null; + options; + token = 1048576; + flags = 0; + index = 0; + line = 1; + column = 0; + startIndex = 0; + end = 0; + tokenIndex = 0; + startColumn = 0; + tokenColumn = 0; + tokenLine = 1; + startLine = 1; + tokenValue = ""; + tokenRaw = ""; + tokenRegExp = void 0; + currentChar = 0; + exportedNames = /* @__PURE__ */ new Set(); + exportedBindings = /* @__PURE__ */ new Set(); + assignable = 1; + destructible = 0; + leadingDecorators = { decorators: [] }; + constructor(t, n = {}) { + this.source = t, this.end = t.length, this.currentChar = t.charCodeAt(0), this.options = ln(n), Array.isArray(this.options.onComment) && (this.options.onComment = fn(this.options.onComment, this.options)), Array.isArray(this.options.onToken) && (this.options.onToken = cn(this.options.onToken, this.options)); + } + getToken() { + return this.token; + } + setToken(t, n = !1) { + this.token = t; + let { onToken: u } = this.options; + if (u) if (t !== 1048576) { + let o = { + start: { + line: this.tokenLine, + column: this.tokenColumn + }, + end: { + line: this.line, + column: this.column + } + }; + !n && this.lastOnToken && u(...this.lastOnToken), this.lastOnToken = [ + j2(t), + this.tokenIndex, + this.index, + o + ]; + } else this.lastOnToken && (u(...this.lastOnToken), this.lastOnToken = null); + return t; + } + get tokenStart() { + return { + index: this.tokenIndex, + line: this.tokenLine, + column: this.tokenColumn + }; + } + get currentLocation() { + return { + index: this.index, + line: this.line, + column: this.column + }; + } + finishNode(t, n, u) { + if (this.options.ranges) { + t.start = n.index; + let o = u ? u.index : this.startIndex; + t.end = o, t.range = [n.index, o]; + } + return this.options.loc && (t.loc = { + start: { + line: n.line, + column: n.column + }, + end: u ? { + line: u.line, + column: u.column + } : { + line: this.startLine, + column: this.startColumn + } + }, this.options.source && (t.loc.source = this.options.source)), t; + } + addBindingToExports(t) { + this.exportedBindings.add(t); + } + declareUnboundVariable(t) { + let { exportedNames: n } = this; + n.has(t) && this.report(147, t), n.add(t); + } + report(t, ...n) { + throw new q(this.tokenStart, this.currentLocation, t, ...n); + } + createScopeIfLexical(t, n) { + if (this.options.lexical) return this.createScope(t, n); + } + createScope(t, n) { + return new _e(this, t, n); + } + createPrivateScopeIfLexical(t) { + if (this.options.lexical) return new Je(this, t); + } + cloneIdentifier(t) { + return this.cloneLocationInformation({ ...t }, t); + } + cloneStringLiteral(t) { + return this.cloneLocationInformation({ ...t }, t); + } + cloneLocationInformation(t, n) { + return this.options.ranges && (t.range = [...n.range]), this.options.loc && (t.loc = { + ...n.loc, + start: { ...n.loc.start }, + end: { ...n.loc.end } + }), t; + } + }; + t2 = ku; + yu = Array.prototype.findLast ?? function(e) { + for (let t = this.length - 1; t >= 0; t--) { + let n = this[t]; + if (e(n, t, this)) return n; + } + }, u2 = Q("findLast", function() { + if (Array.isArray(this)) return yu; + }); + i2 = Q("at", function() { + if (Array.isArray(this) || typeof this == "string") return Tu; + }); + le = Du; + fe = le([ + "Block", + "CommentBlock", + "MultiLine" + ]); + o2 = le([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + lt = /* @__PURE__ */ new WeakMap(); + l2 = wu; + ft = /* @__PURE__ */ new WeakMap(); + ct = Bu; + f2 = Fu; + c2 = Nu; + ye = null; + Lu = 10; + for (let e = 0; e <= Lu; e++) Ae(); + s2 = Iu; + s = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + a2 = s2({ + AccessorProperty: s[0], + AnyTypeAnnotation: s[1], + ArgumentPlaceholder: s[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: s[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: s[3], + AsExpression: s[4], + AssignmentExpression: s[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: s[6], + BigIntLiteral: s[1], + BigIntLiteralTypeAnnotation: s[1], + BigIntTypeAnnotation: s[1], + BinaryExpression: s[5], + BindExpression: ["object", "callee"], + BlockStatement: s[7], + BooleanLiteral: s[1], + BooleanLiteralTypeAnnotation: s[1], + BooleanTypeAnnotation: s[1], + BreakStatement: s[8], + CallExpression: s[9], + CatchClause: ["param", "body"], + ChainExpression: s[3], + ClassAccessorProperty: s[0], + ClassBody: s[10], + ClassDeclaration: s[11], + ClassExpression: s[11], + ClassImplements: s[12], + ClassMethod: s[13], + ClassPrivateMethod: s[13], + ClassPrivateProperty: s[14], + ClassProperty: s[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: s[15], + ConditionalExpression: s[16], + ConditionalTypeAnnotation: s[17], + ContinueStatement: s[8], + DebuggerStatement: s[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: s[18], + DeclareEnum: s[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: s[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: s[21], + DeclareInterface: s[22], + DeclareModule: s[19], + DeclareModuleExports: s[23], + DeclareNamespace: s[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: s[24], + DeclareVariable: s[21], + Decorator: s[3], + Directive: s[18], + DirectiveLiteral: s[1], + DoExpression: s[10], + DoWhileStatement: s[25], + EmptyStatement: s[1], + EmptyTypeAnnotation: s[1], + EnumBigIntBody: s[26], + EnumBigIntMember: s[27], + EnumBooleanBody: s[26], + EnumBooleanMember: s[27], + EnumDeclaration: s[19], + EnumDefaultedMember: s[21], + EnumNumberBody: s[26], + EnumNumberMember: s[27], + EnumStringBody: s[26], + EnumStringMember: s[27], + EnumSymbolBody: s[26], + ExistsTypeAnnotation: s[1], + ExperimentalRestProperty: s[6], + ExperimentalSpreadProperty: s[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: s[28], + ExportNamedDeclaration: s[20], + ExportNamespaceSpecifier: s[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: s[3], + File: ["program"], + ForInStatement: s[29], + ForOfStatement: s[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: s[30], + FunctionExpression: s[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: s[15], + GenericTypeAnnotation: s[12], + HookDeclaration: s[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: s[16], + ImportAttribute: s[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: s[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: s[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: s[34], + InferredPredicate: s[1], + InferTypeAnnotation: s[35], + InterfaceDeclaration: s[22], + InterfaceExtends: s[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: s[1], + IntersectionTypeAnnotation: s[36], + JsExpressionRoot: s[37], + JsonRoot: s[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: s[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: s[1], + JSXExpressionContainer: s[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: s[1], + JSXMemberExpression: s[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: s[1], + JSXSpreadAttribute: s[6], + JSXSpreadChild: s[3], + JSXText: s[1], + KeyofTypeAnnotation: s[6], + LabeledStatement: ["label", "body"], + Literal: s[1], + LogicalExpression: s[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: s[21], + MatchExpression: s[39], + MatchExpressionCase: s[40], + MatchIdentifierPattern: s[21], + MatchLiteralPattern: s[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: s[6], + MatchStatement: s[39], + MatchStatementCase: s[40], + MatchUnaryPattern: s[6], + MatchWildcardPattern: s[1], + MemberExpression: s[38], + MetaProperty: ["meta", "property"], + MethodDefinition: s[42], + MixedTypeAnnotation: s[1], + ModuleExpression: s[10], + NeverTypeAnnotation: s[1], + NewExpression: s[9], + NGChainedExpression: s[43], + NGEmptyExpression: s[1], + NGMicrosyntax: s[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: s[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: s[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: s[37], + NullableTypeAnnotation: s[23], + NullLiteral: s[1], + NullLiteralTypeAnnotation: s[1], + NumberLiteralTypeAnnotation: s[1], + NumberTypeAnnotation: s[1], + NumericLiteral: s[1], + ObjectExpression: ["properties"], + ObjectMethod: s[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: s[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: s[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: s[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: s[9], + OptionalIndexedAccessType: s[34], + OptionalMemberExpression: s[38], + ParenthesizedExpression: s[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: s[1], + PipelineTopicExpression: s[3], + Placeholder: s[1], + PrivateIdentifier: s[1], + PrivateName: s[21], + Program: s[7], + Property: s[32], + PropertyDefinition: s[14], + QualifiedTypeIdentifier: s[44], + QualifiedTypeofIdentifier: s[44], + RegExpLiteral: s[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: s[6], + SatisfiesExpression: s[4], + SequenceExpression: s[43], + SpreadElement: s[6], + StaticBlock: s[10], + StringLiteral: s[1], + StringLiteralTypeAnnotation: s[1], + StringTypeAnnotation: s[1], + Super: s[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: s[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: s[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: s[1], + ThisTypeAnnotation: s[1], + ThrowStatement: s[6], + TopicReference: s[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: s[45], + TSAbstractKeyword: s[1], + TSAbstractMethodDefinition: s[32], + TSAbstractPropertyDefinition: s[45], + TSAnyKeyword: s[1], + TSArrayType: s[2], + TSAsExpression: s[4], + TSAsyncKeyword: s[1], + TSBigIntKeyword: s[1], + TSBooleanKeyword: s[1], + TSCallSignatureDeclaration: s[46], + TSClassImplements: s[47], + TSConditionalType: s[17], + TSConstructorType: s[46], + TSConstructSignatureDeclaration: s[46], + TSDeclareFunction: s[31], + TSDeclareKeyword: s[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: s[26], + TSEnumDeclaration: s[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: s[3], + TSExportKeyword: s[1], + TSExternalModuleReference: s[3], + TSFunctionType: s[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: s[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: s[35], + TSInstantiationExpression: s[47], + TSInterfaceBody: s[10], + TSInterfaceDeclaration: s[22], + TSInterfaceHeritage: s[47], + TSIntersectionType: s[36], + TSIntrinsicKeyword: s[1], + TSJSDocAllType: s[1], + TSJSDocNonNullableType: s[23], + TSJSDocNullableType: s[23], + TSJSDocUnknownType: s[1], + TSLiteralType: s[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: s[10], + TSModuleDeclaration: s[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: s[21], + TSNeverKeyword: s[1], + TSNonNullExpression: s[3], + TSNullKeyword: s[1], + TSNumberKeyword: s[1], + TSObjectKeyword: s[1], + TSOptionalType: s[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: s[23], + TSPrivateKeyword: s[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: s[1], + TSPublicKeyword: s[1], + TSQualifiedName: s[5], + TSReadonlyKeyword: s[1], + TSRestType: s[23], + TSSatisfiesExpression: s[4], + TSStaticKeyword: s[1], + TSStringKeyword: s[1], + TSSymbolKeyword: s[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: s[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: s[23], + TSTypeAssertion: s[4], + TSTypeLiteral: s[26], + TSTypeOperator: s[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: s[48], + TSTypeParameterInstantiation: s[48], + TSTypePredicate: s[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: s[1], + TSUnionType: s[36], + TSUnknownKeyword: s[1], + TSVoidKeyword: s[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: s[24], + TypeAnnotation: s[23], + TypeCastExpression: s[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: s[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: s[48], + TypeParameterInstantiation: s[48], + TypePredicate: s[49], + UnaryExpression: s[6], + UndefinedTypeAnnotation: s[1], + UnionTypeAnnotation: s[36], + UnknownTypeAnnotation: s[1], + UpdateExpression: s[6], + V8IntrinsicIdentifier: s[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: s[27], + Variance: s[1], + VoidPattern: s[1], + VoidTypeAnnotation: s[1], + WhileStatement: s[25], + WithStatement: ["object", "body"], + YieldExpression: s[6] + }); + g2 = ve; + le([ + "RegExpLiteral", + "BigIntLiteral", + "NumericLiteral", + "StringLiteral", + "DirectiveLiteral", + "Literal", + "JSXText", + "TemplateElement", + "StringLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation" + ]); + r2 = Pu; + Ou = /\*\/$/, Vu = /^\/\*\*?/, Ru = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, Mu = /(^|\s+)\/\/([^\n\r]*)/g, h2 = /^(\r?\n)+/, vu = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, k2 = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, Uu = /(\r?\n|^) *\* ?/g, Ju = []; + T2 = ["noformat", "noprettier"], b2 = ["format", "prettier"]; + D2 = _u; + S2 = Xu; + B2 = "module"; + F2 = "commonjs", N2 = [B2, F2]; + ju = { + next: !0, + ranges: !0, + webcompat: !0, + loc: !1, + raw: !0, + directives: !0, + impliedStrict: !1, + preserveParens: !0, + lexical: !1, + jsx: !0, + validateRegex: !1 + }; + $u = S2(Ku); +}))(); +export { I2 as default, at as parsers }; diff --git a/.github/actions/check-public-api/dist/postcss-CFOfUTlp.js b/.github/actions/check-public-api/dist/postcss-CFOfUTlp.js new file mode 100644 index 0000000000..1156b47cf8 --- /dev/null +++ b/.github/actions/check-public-api/dist/postcss-CFOfUTlp.js @@ -0,0 +1,6780 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/postcss.mjs +function Nl(t) { + return this[t < 0 ? this.length + t : t]; +} +function Il(t) { + if (typeof t == "string") return je; + if (Array.isArray(t)) return He; + if (!t) return; + let { type: e } = t; + if (Ot.has(e)) return e; +} +function Ll(t) { + let e = t === null ? "null" : typeof t; + if (e !== "string" && e !== "object") return `Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`; + if (ue(t)) throw new Error("doc is valid."); + let s = Object.prototype.toString.call(t); + if (s !== "[object Object]") return `Unexpected doc '${s}'.`; + let r = ql([...Ot].map((n) => `'${n}'`)); + return `Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`; +} +function Dl(t, e) { + if (typeof t == "string") return e(t); + let s = /* @__PURE__ */ new Map(); + return r(t); + function r(i) { + if (s.has(i)) return s.get(i); + let o = n(i); + return s.set(i, o), o; + } + function n(i) { + switch (ue(i)) { + case He: return e(i.map(r)); + case ae: return e({ + ...i, + parts: i.parts.map(r) + }); + case me: return e({ + ...i, + breakContents: r(i.breakContents), + flatContents: r(i.flatContents) + }); + case oe: { + let { expandedStates: o, contents: u } = i; + return o ? (o = o.map(r), u = o[0]) : u = r(u), e({ + ...i, + contents: u, + expandedStates: o + }); + } + case Ae: + case ie: + case kt: + case At: + case Oe: return e({ + ...i, + contents: r(i.contents) + }); + case je: + case Et: + case St: + case Tt: + case X: + case Ce: return e(i); + default: throw new nn(i); + } + } +} +function Ml(t) { + return t.type === X && !t.hard ? t.soft ? "" : " " : t.type === me ? t.flatContents : t; +} +function on(t) { + return Dl(t, Ml); +} +function L(t) { + return $(t), { + type: ie, + contents: t + }; +} +function Bl(t, e) { + return un(t), $(e), { + type: Ae, + contents: e, + n: t + }; +} +function le(t) { + return Bl(-1, t); +} +function Pe(t) { + return an(t), { + type: ae, + parts: t + }; +} +function D(t, e = {}) { + return $(t), ye(e.expandedStates, !0), { + type: oe, + id: e.id, + contents: t, + break: !!e.shouldBreak, + expandedStates: e.expandedStates + }; +} +function Ct(t, e = "", s = {}) { + return $(t), e !== "" && $(e), { + type: me, + breakContents: t, + flatContents: e, + groupId: s.groupId + }; +} +function Y(t, e) { + $(t), ye(e); + let s = []; + for (let r = 0; r < e.length; r++) r !== 0 && s.push(t), s.push(e[r]); + return s; +} +function ln(t) { + return $(t), { + type: Oe, + contents: t + }; +} +function $l(t) { + return Array.isArray(t) && t.length > 0; +} +function Yl(t, e) { + let { preferred: s, alternate: r } = e === !0 || e === "'" ? Wl : Gl, { length: n } = t, i = 0, o = 0; + for (let u = 0; u < n; u++) { + let a = t.charCodeAt(u); + a === s.codePoint ? i++ : a === r.codePoint && o++; + } + return (i > o ? r : s).character; +} +function zl(t, e) { + let s = e === "\"" ? "'" : "\""; + return e + E(0, t, Vl, (n, i, o) => i ? i === s ? s : n : o === e ? "\\" + o : o) + e; +} +function jl(t, e) { + K(/^(?["']).*\k$/su.test(t)); + let s = t.slice(1, -1), r = e.parser === "json" || e.parser === "jsonc" || e.parser === "json5" && e.quoteProps === "preserve" && !e.singleQuote ? "\"" : e.__isInHtmlAttribute ? "'" : pn(s, e.singleQuote); + return t.charAt(0) === r ? t : hn(s, r); +} +function Hl(t) { + return !!t?.[Pt]; +} +function Kl(t) { + let e = t.slice(0, Ke); + if (e !== "---" && e !== "+++") return; + let s = t.indexOf(` +`, Ke); + if (s === -1) return; + let r = t.slice(Ke, s).trim(), n = t.indexOf(` +${e}`, s), i = r; + if (i || (i = e === "+++" ? "toml" : "yaml"), n === -1 && e === "---" && i === "yaml" && (n = t.indexOf(` +...`, s)), n === -1) return; + let o = n + 1 + Ke, u = t.charAt(o + 1); + if (!/\s?/u.test(u)) return; + let a = t.slice(0, o), l; + return { + language: i, + explicitLanguage: r || null, + value: t.slice(s + 1, n), + startDelimiter: e, + endDelimiter: a.slice(-Ke), + raw: a, + start: { + line: 1, + column: 0, + index: 0 + }, + end: { + index: a.length, + get line() { + return l ?? (l = a.split(` +`)), l.length; + }, + get column() { + return l ?? (l = a.split(` +`)), G(0, l, -1).length; + } + }, + [Pt]: !0 + }; +} +function Ql(t) { + let e = Kl(t); + return e ? { + frontMatter: e, + get content() { + let { raw: s } = e; + return E(0, s, /[^\n]/gu, " ") + t.slice(s.length); + } + } : { content: t }; +} +function mn(t, e, s) { + if (t.type === "css-comment" && s.type === "css-root" && s.nodes.length > 0 && ((s.nodes[0] === t || Re(s.nodes[0]) && s.nodes[1] === t) && (delete e.text, /^\*\s*@(?:format|prettier)\s*$/u.test(t.text)) || s.type === "css-root" && G(0, s.nodes, -1) === t)) return null; + if (t.type === "value-root" && delete e.text, (t.type === "media-query" || t.type === "media-query-list" || t.type === "media-feature-expression") && delete e.value, t.type === "css-rule" && delete e.params, (t.type === "media-feature" || t.type === "media-keyword" || t.type === "media-type" || t.type === "media-unknown" || t.type === "media-url" || t.type === "media-value" || t.type === "selector-attribute" || t.type === "selector-string" || t.type === "selector-class" || t.type === "selector-combinator" || t.type === "value-string") && t.value && (e.value = Jl(t.value)), t.type === "selector-combinator" && (e.value = E(0, e.value, /\s+/gu, " ")), t.type === "media-feature" && (e.value = E(0, e.value, " ", "")), (t.type === "value-word" && (t.isColor && t.isHex || [ + "initial", + "inherit", + "unset", + "revert" + ].includes(t.value.toLowerCase())) || t.type === "media-feature" || t.type === "selector-root-invalid" || t.type === "selector-pseudo") && (e.value = e.value.toLowerCase()), t.type === "css-decl" && (e.prop = t.prop.toLowerCase()), (t.type === "css-atrule" || t.type === "css-import") && (e.name = t.name.toLowerCase()), t.type === "value-number" && (e.unit = t.unit.toLowerCase()), t.type === "value-unknown" && (e.value = E(0, e.value, /;$/gu, "")), t.type === "selector-attribute" && (e.attribute = t.attribute.trim(), t.namespace && typeof t.namespace == "string" && (e.namespace = t.namespace.trim() || !0), t.value)) { + let { value: r } = e; + /\s[a-zA-Z]$/u.test(r) && (e.__prettier_attribute_selector_flag = G(0, r, -1), r = r.slice(0, -1)), r = r.trim(), r = r.replace(/^(?["'])(?.*?)\k$/u, "$"), e.value = r, delete e.quoted; + } + if ((t.type === "media-value" || t.type === "media-type" || t.type === "value-number" || t.type === "selector-root-invalid" || t.type === "selector-class" || t.type === "selector-combinator" || t.type === "selector-tag") && t.value && (e.value = E(0, e.value, /([\d+.e-]+)([a-z]*)/giu, (r, n, i) => { + let o = Number(n); + return Number.isNaN(o) ? r : o + i.toLowerCase(); + })), t.type === "selector-tag") { + let r = e.value.toLowerCase(); + ["from", "to"].includes(r) && (e.value = r); + } + if (t.type === "css-atrule" && t.name.toLowerCase() === "supports" && delete e.value, t.type === "selector-unknown" && delete e.value, t.type === "value-comma_group") { + let r = t.groups.findIndex((n) => n.type === "value-number" && n.unit === "..."); + r !== -1 && (e.groups[r].unit = "", e.groups.splice(r + 1, 0, { + type: "value-word", + value: "...", + isColor: !1, + isHex: !1 + })); + } + if (t.type === "value-comma_group" && t.groups.some((r) => r.type === "value-atword" && (r.value.endsWith("[") || r.value.endsWith("]")) || r.type === "value-word" && (r.value.startsWith("]") || r.value.startsWith("[")))) return { + type: "value-atword", + value: t.groups.map((r) => r.value).join(""), + group: { + open: null, + close: null, + groups: [], + type: "value-paren_group" + } + }; +} +function Jl(t) { + return E(0, E(0, t, "'", "\""), /\\([^\da-f])/giu, "$1"); +} +function gn() {} +function Xe(t) { + if (Qe !== null && typeof Qe.property) { + let e = Qe; + return Qe = Xe.prototype = null, e; + } + return Qe = Xe.prototype = t ?? Object.create(null), new Xe(); +} +function Hr(t) { + return Xe(t); +} +function ec(t, e = "type") { + Hr(t); + function s(r) { + let n = r[e], i = t[n]; + if (!Array.isArray(i)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${n}'.`), { node: r }); + return i; + } + return s; +} +function rc(t, e) { + let s = 0; + for (let r = 0; r < t.line - 1; ++r) s = e.indexOf(` +`, s) + 1; + return s + t.column; +} +function Rt(t) { + return (e, s, r) => { + let n = !!r?.backwards; + if (s === !1) return !1; + let { length: i } = e, o = s; + for (; o >= 0 && o < i;) { + let u = e.charAt(o); + if (t instanceof RegExp) { + if (!t.test(u)) return o; + } else if (!t.includes(u)) return o; + n ? o-- : o++; + } + return o === -1 || o === i ? o : !1; + }; +} +function En(t, e) { + let { value: s } = t; + return s === "-" || s === "--" || s.charAt(0) !== "-" ? e : e - (s.charAt(1) === "-" ? 2 : 1); +} +function Sn(t, e) { + if (typeof t.source?.start?.offset == "number") return t.source.start.offset; + if (typeof t.sourceIndex == "number") return t.type === "value-word" ? En(t, t.sourceIndex) : t.sourceIndex; + if (t.source?.start) return Kr(t.source.start, e); + throw Object.assign(/* @__PURE__ */ new Error("Can not locate node."), { node: t }); +} +function Qr(t, e) { + if (t.type === "css-comment" && t.inline) return qt(e, t.source.startOffset); + if (typeof t.source?.end?.offset == "number") return t.source.end.offset; + if (t.source) { + if (t.source.end) { + let s = Kr(t.source.end, e); + return t.type === "value-word" ? En(t, s) : s; + } + if (ce(t.nodes)) return Qr(G(0, t.nodes, -1), e); + } + return null; +} +function Xr(t, e) { + t.source && (t.source.startOffset = Sn(t, e), t.source.endOffset = Qr(t, e)); + for (let s in t) { + let r = t[s]; + s === "source" || !r || typeof r != "object" || (r.type === "value-root" || r.type === "value-unknown" ? kn(r, sc(t), r.text || r.value) : Xr(r, e)); + } +} +function kn(t, e, s) { + t.source && (t.source.startOffset = Sn(t, s) + e, t.source.endOffset = Qr(t, s) + e); + for (let r in t) { + let n = t[r]; + r === "source" || !n || typeof n != "object" || kn(n, e, s); + } +} +function sc(t) { + let e = t.source.startOffset; + return typeof t.prop == "string" && (e += t.prop.length), t.type === "css-atrule" && typeof t.name == "string" && (e += 1 + t.name.length + t.raws.afterName.match(/^\s*:?\s*/u)[0].length), t.type !== "css-atrule" && typeof t.raws?.between == "string" && (e += t.raws.between.length), e; +} +function Tn(t) { + let e = "initial", s = "initial", r, n = !1, i = []; + for (let o = 0; o < t.length; o++) { + let u = t[o]; + switch (e) { + case "initial": + if (u === "'") { + e = "single-quotes"; + continue; + } + if (u === "\"") { + e = "double-quotes"; + continue; + } + if ((u === "u" || u === "U") && t.slice(o, o + 4).toLowerCase() === "url(") { + e = "url", o += 3; + continue; + } + if (u === "*" && t[o - 1] === "/") { + e = "comment-block"; + continue; + } + if (u === "/" && t[o - 1] === "/") { + e = "comment-inline", r = o - 1; + continue; + } + continue; + case "single-quotes": + if (u === "'" && t[o - 1] !== "\\" && (e = s, s = "initial"), u === ` +` || u === "\r") return t; + continue; + case "double-quotes": + if (u === "\"" && t[o - 1] !== "\\" && (e = s, s = "initial"), u === ` +` || u === "\r") return t; + continue; + case "url": + if (u === ")" && (e = "initial"), u === ` +` || u === "\r") return t; + if (u === "'") { + e = "single-quotes", s = "url"; + continue; + } + if (u === "\"") { + e = "double-quotes", s = "url"; + continue; + } + continue; + case "comment-block": + u === "/" && t[o - 1] === "*" && (e = "initial"); + continue; + case "comment-inline": + (u === "\"" || u === "'" || u === "*") && (n = !0), (u === ` +` || u === "\r") && (n && i.push([r, o]), e = "initial", n = !1); + continue; + } + } + for (let [o, u] of i) t = t.slice(0, o) + E(0, t.slice(o, u), /["'*]/gu, " ") + t.slice(u); + return t; +} +function Rn(t) { + let e = t.match(Nn); + return e ? e[0].trimStart() : ""; +} +function In(t) { + let s = t.match(Nn)?.[0]; + return s == null ? t : t.slice(s.length); +} +function qn(t) { + t = E(0, t.replace(ic, "").replace(nc, ""), uc, "$1"); + let s = ""; + for (; s !== t;) s = t, t = E(0, t, ac, ` +$1 $2 +`); + t = t.replace(An, "").trimEnd(); + let r = Object.create(null), n = E(0, t, On, "").replace(An, "").trimEnd(), i; + for (; i = On.exec(t);) { + let o = E(0, i[2], oc, ""); + if (typeof r[i[1]] == "string" || Array.isArray(r[i[1]])) { + let u = r[i[1]]; + r[i[1]] = [ + ...Pn, + ...Array.isArray(u) ? u : [u], + o + ]; + } else r[i[1]] = o; + } + return { + comments: n, + pragmas: r + }; +} +function Ln({ comments: t = "", pragmas: e = {} }) { + let o = Object.keys(e), u = o.flatMap((l) => Cn(l, e[l])).map((l) => ` * ${l} +`).join(""); + if (!t) { + if (o.length === 0) return ""; + if (o.length === 1 && !Array.isArray(e[o[0]])) { + let l = e[o[0]]; + return `/** ${Cn(o[0], l)[0]} */`; + } + } + let a = t.split(` +`).map((l) => ` * ${l}`).join(` +`) + ` +`; + return `/** +` + (t ? a : "") + (t && o.length > 0 ? ` * +` : "") + u + " */"; +} +function Cn(t, e) { + return [...Pn, ...Array.isArray(e) ? e : [e]].map((s) => `@${t} ${s}`.trim()); +} +function lc(t) { + if (!t.startsWith("#!")) return ""; + let e = t.indexOf(` +`); + return e === -1 ? t : t.slice(0, e); +} +function Jr(t) { + let e = Un(t); + e && (t = t.slice(e.length + 1)); + let { pragmas: r, comments: n } = qn(Rn(t)); + return { + shebang: e, + text: t, + pragmas: r, + comments: n + }; +} +function Fn(t) { + let { pragmas: e } = Jr(t); + return Mn.some((s) => Object.prototype.hasOwnProperty.call(e, s)); +} +function $n(t) { + let { pragmas: e } = Jr(t); + return Dn.some((s) => Object.prototype.hasOwnProperty.call(e, s)); +} +function Wn(t) { + let { shebang: e, text: s, pragmas: r, comments: n } = Jr(t), i = In(s), o = Ln({ + pragmas: { + [Bn]: "", + ...r + }, + comments: n.trimStart() + }); + return (e ? `${e} +` : "") + o + (i.startsWith(` +`) ? ` +` : ` + +`) + i; +} +function zn(t) { + return t.findAncestor((e) => e.type === "css-decl")?.prop?.toLowerCase(); +} +function jn(t) { + return fc.has(t.toLowerCase()); +} +function Hn(t, e) { + return t.findAncestor((r) => r.type === "css-atrule")?.name?.toLowerCase().endsWith("keyframes") && ["from", "to"].includes(e.toLowerCase()); +} +function Ie(t) { + return t.includes("$") || t.includes("@") || t.includes("#") || t.startsWith("%") || t.startsWith("--") || t.startsWith(":--") || t.includes("(") && t.includes(")") ? t : t.toLowerCase(); +} +function qe(t, e) { + return t.findAncestor((r) => r.type === "value-func")?.value?.toLowerCase() === e; +} +function Kn(t) { + return t.hasAncestor((e) => { + if (e.type !== "css-rule") return !1; + let s = e.raws?.selector; + return s && (s.startsWith(":import") || s.startsWith(":export")); + }); +} +function we(t, e) { + let s = Array.isArray(e) ? e : [e], r = t.findAncestor((n) => n.type === "css-atrule"); + return r && s.includes(r.name.toLowerCase()); +} +function Qn(t) { + let { node: e } = t; + return e.groups[0]?.value === "url" && e.groups.length === 2 && t.findAncestor((s) => s.type === "css-atrule")?.name === "import"; +} +function Xn(t) { + return t.type === "value-func" && t.value.toLowerCase() === "url"; +} +function Jn(t) { + return t.type === "value-func" && t.value.toLowerCase() === "var"; +} +function Zn(t) { + let { selector: e } = t; + return e ? typeof e == "string" && /^@.+:.*$/u.test(e) || e.value && /^@.+:.*$/u.test(e.value) : !1; +} +function ei(t) { + return t.type === "value-word" && [ + "from", + "through", + "end" + ].includes(t.value); +} +function ti(t) { + return t.type === "value-word" && [ + "and", + "or", + "not" + ].includes(t.value); +} +function ri(t) { + return t.type === "value-word" && t.value === "in"; +} +function Lt(t) { + return t.type === "value-operator" && t.value === "*"; +} +function ve(t) { + return t?.type === "value-operator" && t.value === "/"; +} +function J(t) { + return t.type === "value-operator" && t.value === "+"; +} +function xe(t) { + return t.type === "value-operator" && t.value === "-"; +} +function pc(t) { + return t.type === "value-operator" && t.value === "%"; +} +function Dt(t) { + return Lt(t) || ve(t) || J(t) || xe(t) || pc(t); +} +function si(t) { + return t.type === "value-word" && ["==", "!="].includes(t.value); +} +function ni(t) { + return t.type === "value-word" && [ + "<", + ">", + "<=", + ">=" + ].includes(t.value); +} +function Je(t, e) { + return e.parser === "scss" && t.type === "css-atrule" && [ + "if", + "else", + "for", + "each", + "while" + ].includes(t.name); +} +function es(t) { + return t.raws?.params && /^\(\s*\)$/u.test(t.raws.params); +} +function Mt(t) { + return t.name.startsWith("prettier-placeholder"); +} +function ii(t) { + return t.prop.startsWith("@prettier-placeholder"); +} +function oi(t, e) { + return t.value === "$$" && t.type === "value-func" && e?.type === "value-word" && !e.raws.before; +} +function ai(t) { + return t.value?.type === "value-root" && t.value.group?.type === "value-value" && t.prop.toLowerCase() === "composes"; +} +function ui(t) { + return t.value?.group?.group?.type === "value-paren_group" && t.value.group.group.open !== null && t.value.group.group.close !== null; +} +function Z(t) { + return t?.raws?.before === ""; +} +function Bt(t) { + return t.type === "value-comma_group" && t.groups?.[1]?.type === "value-colon"; +} +function Zr(t) { + return t.type === "value-paren_group" && t.groups?.[0] && Bt(t.groups[0]); +} +function ts(t, e) { + if (e.parser !== "scss") return !1; + let { node: s } = t; + if (s.groups.length === 0) return !1; + let r = t.parent; + if (r && r.type === "value-func" && r.value === "if") return !1; + let n = t.grandparent; + return !Zr(s) && !(n && Zr(n)) ? !1 : !!(t.findAncestor((o) => o.type === "css-decl")?.prop?.startsWith("$") || Zr(n) || n.type === "value-func"); +} +function Ze(t) { + return t.type === "value-comment" && t.inline; +} +function Ut(t) { + return t.type === "value-word" && t.value === "#"; +} +function rs(t) { + return t.type === "value-word" && t.value === "{"; +} +function Ft(t) { + return t.type === "value-word" && t.value === "}"; +} +function et(t) { + return ["value-word", "value-atword"].includes(t.type); +} +function $t(t) { + return t?.type === "value-colon"; +} +function li(t, e) { + if (!Bt(e)) return !1; + let { groups: s } = e, r = s.indexOf(t); + return r === -1 ? !1 : $t(s[r + 1]); +} +function ci(t) { + return t.value && [ + "not", + "and", + "or" + ].includes(t.value.toLowerCase()); +} +function fi(t) { + return t.type !== "value-func" ? !1 : cc.has(t.value.toLowerCase()); +} +function Le(t) { + return /\/\//u.test(t.split(/[\n\r]/u).pop()); +} +function tt(t) { + return t?.type === "value-atword" && t.value.startsWith("prettier-placeholder-"); +} +function pi(t, e) { + if (t.open?.value !== "(" || t.close?.value !== ")" || t.groups.some((s) => s.type !== "value-comma_group")) return !1; + if (e.type === "value-comma_group") { + let s = e.groups.indexOf(t) - 1, r = e.groups[s]; + if (r?.type === "value-word" && r.value === "with") return !0; + } + return !1; +} +function rt(t) { + return t.type === "value-paren_group" && t.open?.value === "(" && t.close?.value === ")"; +} +function hc(t, e, s) { + let { node: r } = t, n = t.parent, i = t.grandparent, o = zn(t), u = o && n.type === "value-value" && (o === "grid" || o.startsWith("grid-template")), a = t.findAncestor((p) => p.type === "css-atrule"), l = a && Je(a, e), f = r.groups.some((p) => Ze(p)), h = t.map(s, "groups"), c = [""], g = qe(t, "url"), b = !1, d = !1; + for (let p = 0; p < r.groups.length; ++p) { + let m = r.groups[p - 1], y = r.groups[p], v = r.groups[p + 1], O = r.groups[p + 2]; + if (Ze(y) && !v) { + c.push([c.pop(), ln([" ", h[p]])]); + continue; + } + if (c.push([c.pop(), h[p]]), g) { + (v && J(v) || J(y)) && c.push([c.pop(), " "]); + continue; + } + if (we(t, "forward") && y.type === "value-word" && y.value && m !== void 0 && m.type === "value-word" && m.value === "as" && v.type === "value-operator" && v.value === "*" || we(t, "utility") && y.type === "value-word" && v && v.type === "value-operator" && v.value === "*" || !v || y.type === "value-word" && tt(v) && R(y) === P(v)) continue; + if (y.type === "value-string" && y.quoted) { + let k = y.value.lastIndexOf("#{"), N = y.value.lastIndexOf("}"); + k !== -1 && N !== -1 ? b = k > N : k !== -1 ? b = !0 : N !== -1 && (b = !1); + } + if (b || $t(y) || $t(v) || y.type === "value-atword" && (y.value === "" || y.value.endsWith("[")) || v.type === "value-word" && v.value.startsWith("]") || y.value === "~" || e.parser === "less" && (v?.type === "value-word" && v.value === "[" || y.type === "value-word" && y.value === "[" && (v?.type === "value-atword" || v?.type === "value-word") || y.type === "value-word" && y.value === "][" && v?.type === "value-word") || y.type !== "value-string" && y.value && y.value.includes("\\") && v && v.type !== "value-comment" || m?.value && m.value.indexOf("\\") === m.value.length - 1 && y.type === "value-operator" && y.value === "/" || y.value === "\\" || oi(y, v) || Ut(y) || rs(y) || Ft(v) || rs(v) && Z(v) || Ft(y) && Z(v) || y.value === "--" && Ut(v)) continue; + let q = Dt(y), H = Dt(v); + if ((q && Ut(v) || H && Ft(y)) && Z(v) || !m && ve(y) || qe(t, "calc") && (J(y) || J(v) || xe(y) || xe(v)) && Z(v)) continue; + let ne = (J(y) || xe(y)) && p === 0 && (v.type === "value-number" || v.isHex) && i && fi(i) && !Z(v); + if (e.parser === "scss" && q && y.value === "-" && v.type === "value-func" && R(y) !== P(v)) { + c.push([c.pop(), " "]); + continue; + } + let W = O?.type === "value-func" || O && et(O) || y.type === "value-func" || et(y), A = v.type === "value-func" || et(v) || m?.type === "value-func" || m && et(m); + if (!(!(Lt(v) || Lt(y)) && !qe(t, "calc") && !ne && (ve(v) && !W || ve(y) && !A || J(v) && !W || J(y) && !A || xe(v) || xe(y)) && (Z(v) || q && (!m || m && Dt(m)))) && !((e.parser === "scss" || e.parser === "less") && q && y.value === "-" && rt(v) && R(y) === P(v.open) && v.open.value === "(")) { + if (Ze(y)) { + if (n.type === "value-paren_group") { + c.push(le(T), ""); + continue; + } + c.push(T, ""); + continue; + } + if (l && (si(v) || ni(v) || ti(v) || ri(y) || ei(y))) { + c.push([c.pop(), " "]); + continue; + } + if (a && a.name.toLowerCase() === "namespace") { + c.push([c.pop(), " "]); + continue; + } + if (u) { + y.source && v.source && y.source.start.line !== v.source.start.line ? (c.push(T, ""), d = !0) : c.push([c.pop(), " "]); + continue; + } + if (!(o && (o === "font" || o.startsWith("--")) && (ve(v) && Z(v) && hi(y) || ve(y) && Z(y) && hi(m)))) { + if (H) { + c.push([c.pop(), " "]); + continue; + } + if (v?.value !== "..." && !(tt(y) && tt(v) && R(y) === P(v))) { + if (tt(y) && rt(v) && R(y) === P(v.open)) { + c.push(M, ""); + continue; + } + if (y.value === "with" && rt(v)) { + c = [[Pe(c), " "]]; + continue; + } + if (!(y.value?.endsWith("#") && v.value === "{" && rt(v.group)) && !(Ze(v) && !O)) { + if (!a && y.type === "value-comment" && !y.inline && r.groups.slice(0, p).every((k) => k.type === "value-comment")) { + c.push(le(C), ""); + continue; + } + c.push(C, ""); + } + } + } + } + } + return f && c.push([c.pop(), Ne]), d && c.unshift("", T), l ? D(L(c)) : Qn(t) ? D(Pe(c)) : D(L(Pe(c))); +} +function hi(t) { + if (t?.type === "value-number") return !0; + if (t?.type !== "value-func") return !1; + let e = t.value.toLowerCase(); + return e === "var" || e === "calc" || e === "min" || e === "max" || e === "clamp" || e.startsWith("--"); +} +function dc(t) { + return t.length === 1 ? t : t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u, "$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u, "$1").replace(/^([+-])?\./u, "$10.").replace(/(\.\d+?)0+(?=e|$)/u, "$1").replace(/\.(?=e|$)/u, ""); +} +function ss(t) { + let e = t.toLowerCase(); + return Wt.has(e) ? Wt.get(e) : t; +} +function V(t, e) { + return E(0, t, yi, (s) => Nt(s, e)); +} +function gi(t, e) { + let s = e.singleQuote ? "'" : "\"", r = "", n = t.match(/^(?.+?)\s+(?[a-zA-Z])$/u); + return n && ({value: t, flag: r} = n.groups), (t.includes("\"") || t.includes("'") ? t : s + t + s) + (r ? ` ${r}` : ""); +} +function _e(t) { + return E(0, t, wc, (e, s, r, n, i) => !r && n && (i ?? (i = ""), i = i.toLowerCase(), !i || i === "n" || Wt.has(i)) ? ns(n) + (i ? ss(i) : "") : e); +} +function ns(t) { + return mi(t).replace(/\.0(?=$|e)/u, ""); +} +function wi(t) { + return t.trailingComma === "es5" || t.trailingComma === "all"; +} +function vc(t, e, s) { + let r = !!s?.backwards; + if (e === !1) return !1; + let n = t.charAt(e); + if (r) { + if (t.charAt(e - 1) === "\r" && n === ` +`) return e - 2; + if (vi(n)) return e - 1; + } else { + if (n === "\r" && t.charAt(e + 1) === ` +`) return e + 2; + if (vi(n)) return e + 1; + } + return e; +} +function xc(t, e, s = {}) { + let r = It(t, s.backwards ? e - 1 : e, s); + return r !== Gt(t, r, s); +} +function _c(t, e) { + if (e === !1) return !1; + if (t.charAt(e) === "/" && t.charAt(e + 1) === "*") { + for (let s = e + 2; s < t.length; ++s) if (t.charAt(s) === "*" && t.charAt(s + 1) === "/") return s + 2; + } + return e; +} +function bc(t, e) { + return e === !1 ? !1 : t.charAt(e) === "/" && t.charAt(e + 1) === "/" ? qt(t, e) : e; +} +function Ec(t, e) { + let s = null, r = e; + for (; r !== s;) s = r, r = bn(t, r), r = xi(t, r), r = It(t, r); + return r = _i(t, r), r = Gt(t, r), r !== !1 && Yt(t, r); +} +function Sc({ node: t, parent: e }, s) { + return !!(t.source && s.originalText.slice(P(t), P(e.close)).trimEnd().endsWith(",")); +} +function kc(t, e) { + return Jn(t.grandparent) && Sc(t, e) ? "," : t.node.type !== "value-comment" && !(t.node.type === "value-comma_group" && t.node.groups.every((s) => s.type === "value-comment")) && wi(e) && t.callParent(() => ts(t, e)) ? Ct(",") : ""; +} +function bi(t, e, s) { + let { node: r, parent: n } = t, i = t.map(({ node: g }) => typeof g == "string" ? g : s(), "groups"); + if (n && Xn(n) && (r.groups.length === 1 || r.groups.length > 0 && r.groups[0].type === "value-comma_group" && r.groups[0].groups.length > 0 && r.groups[0].groups[0].type === "value-word" && r.groups[0].groups[0].value.startsWith("data:"))) return [ + r.open ? s("open") : "", + Y(",", i), + r.close ? s("close") : "" + ]; + if (!r.open) { + let g = is(t); + ye(i); + let b = Ac(Y(",", i), 2), d = Y(g ? T : C, b); + return L(g ? [T, d] : D([Tc(t) ? M : "", Pe(d)])); + } + let o = t.map(({ node: g, isLast: b, index: d }) => { + let p = i[d]; + Bt(g) && g.type === "value-comma_group" && g.groups && g.groups[0].type !== "value-paren_group" && g.groups[2]?.type === "value-paren_group" && ue(p) === oe && ue(p.contents) === ie && ue(p.contents.contents) === ae && (p = D(le(p))); + let m = [p, b ? kc(t, e) : ","]; + if (!b && g.type === "value-comma_group" && ce(g.groups)) { + let y = G(0, g.groups, -1); + !y.source && y.close && (y = y.close), y.source && Vt(e.originalText, R(y)) && m.push(T); + } + return m; + }, "groups"), u = li(r, n), a = pi(r, n), l = ts(t, e), f = a || l && !u, h = a || u, c = D([ + r.open ? s("open") : "", + L([M, Y(C, o)]), + M, + r.close ? s("close") : "" + ], { shouldBreak: f }); + return h ? le(c) : c; +} +function is(t) { + return t.match((e) => e.type === "value-paren_group" && !e.open && e.groups.some((s) => s.type === "value-comma_group"), (e, s) => s === "group" && e.type === "value-value", (e, s) => s === "group" && e.type === "value-root", (e, s) => s === "value" && (e.type === "css-decl" && !e.prop.startsWith("--") || e.type === "css-atrule" && e.variable)); +} +function Tc(t) { + return t.match((e) => e.type === "value-paren_group" && !e.open, (e, s) => s === "group" && e.type === "value-value", (e, s) => s === "group" && e.type === "value-root", (e, s) => s === "value" && e.type === "css-decl"); +} +function Ac(t, e) { + let s = []; + for (let r = 0; r < t.length; r += e) s.push(t.slice(r, r + e)); + return s; +} +function Oc(t, e, s) { + let r = []; + return t.each(() => { + let { node: n, previous: i } = t; + if (i?.type === "css-comment" && i.text.trim() === "prettier-ignore" ? r.push(e.originalText.slice(P(n), R(n))) : r.push(s()), t.isLast) return; + let { next: o } = t; + o.type === "css-comment" && !Yt(e.originalText, P(o), { backwards: !0 }) && !Re(n) || o.type === "css-atrule" && o.name === "else" && n.type !== "css-comment" ? r.push(" ") : (r.push(e.__isHTMLStyleAttribute ? C : T), Vt(e.originalText, R(n)) && !Re(n) && r.push(T)); + }, "nodes"), r; +} +function Cc(t, e, s) { + let { node: r } = t; + switch (r.type) { + case "css-root": { + let n = De(t, e, s), i = r.raws.after.trim(); + return i.startsWith(";") && (i = i.slice(1).trim()), [ + r.frontMatter ? [ + s("frontMatter"), + T, + r.nodes.length > 0 ? T : "" + ] : "", + n, + i ? ` ${i}` : "", + r.nodes.length > 0 ? T : "" + ]; + } + case "css-comment": { + let n = r.inline || r.raws.inline, i = e.originalText.slice(P(r), R(r)); + return n ? i.trimEnd() : i; + } + case "css-rule": return [ + s("selector"), + r.important ? " !important" : "", + r.nodes ? [ + r.selector?.type === "selector-unknown" && Le(r.selector.value) ? C : r.selector ? " " : "", + "{", + r.nodes.length > 0 ? L([T, De(t, e, s)]) : "", + T, + "}", + Zn(r) ? ";" : "" + ] : ";" + ]; + case "css-decl": { + let n = t.parent, { between: i } = r.raws, o = i.trim(), u = o === ":", a = typeof r.value == "string" && /^ *$/u.test(r.value), l = typeof r.value == "string" ? r.value : s("value"); + return l = ai(r) ? on(l) : l, !u && Le(o) && !t.call(() => is(t), "value", "group", "group") && (l = L([T, le(l)])), [ + E(0, r.raws.before, /[\s;]/gu, ""), + n.type === "css-atrule" && n.variable || Kn(t) ? r.prop : Ie(r.prop), + o.startsWith("//") ? " " : "", + o, + r.extend || a ? "" : " ", + e.parser === "less" && r.extend && r.selector ? [ + "extend(", + s("selector"), + ")" + ] : "", + l, + r.raws.important ? r.raws.important.replace(/\s*!\s*important/iu, " !important") : r.important ? " !important" : "", + r.raws.scssDefault ? r.raws.scssDefault.replace(/\s*!default/iu, " !default") : r.scssDefault ? " !default" : "", + r.raws.scssGlobal ? r.raws.scssGlobal.replace(/\s*!global/iu, " !global") : r.scssGlobal ? " !global" : "", + r.nodes ? [ + " {", + L([M, De(t, e, s)]), + M, + "}" + ] : ii(r) && !n.raws.semicolon && e.originalText[R(r) - 1] !== ";" ? "" : e.__isHTMLStyleAttribute && t.isLast ? Ct(";") : ";" + ]; + } + case "css-atrule": { + let n = t.parent, i = Mt(r) && !n.raws.semicolon && e.originalText[R(r) - 1] !== ";"; + if (e.parser === "less") { + if (r.mixin) return [ + s("selector"), + r.important ? " !important" : "", + i ? "" : ";" + ]; + if (r.function) return [ + r.name, + typeof r.params == "string" ? r.params : s("params"), + i ? "" : ";" + ]; + if (r.variable) return [ + "@", + r.name, + ": ", + r.value ? s("value") : "", + r.raws.between.trim() ? r.raws.between.trim() + " " : "", + r.nodes ? [ + "{", + L([r.nodes.length > 0 ? M : "", De(t, e, s)]), + M, + "}" + ] : "", + i ? "" : ";" + ]; + } + let o = r.name === "import" && r.params?.type === "value-unknown" && r.params.value.endsWith(";"); + return [ + "@", + es(r) || r.name.endsWith(":") || Mt(r) ? r.name : Ie(r.name), + r.params ? [es(r) ? "" : Mt(r) ? r.raws.afterName === "" ? "" : r.name.endsWith(":") ? " " : /^\s*\n\s*\n/u.test(r.raws.afterName) ? [T, T] : /^\s*\n/u.test(r.raws.afterName) ? T : " " : " ", typeof r.params == "string" ? r.params : s("params")] : "", + r.selector ? L([" ", s("selector")]) : "", + r.value ? D([ + " ", + s("value"), + Je(r, e) ? ui(r) ? " " : C : "" + ]) : r.name === "else" ? " " : "", + r.nodes ? [ + Je(r, e) ? "" : r.selector && !r.selector.nodes && typeof r.selector.value == "string" && Le(r.selector.value) || !r.selector && typeof r.params == "string" && Le(r.params) ? C : " ", + "{", + L([r.nodes.length > 0 ? M : "", De(t, e, s)]), + M, + "}" + ] : i || o ? "" : ";" + ]; + } + case "media-query-list": { + let n = []; + return t.each(({ node: i }) => { + i.type === "media-query" && i.value === "" || n.push(s()); + }, "nodes"), D(L(Y(C, n))); + } + case "media-query": return [Y(" ", t.map(s, "nodes")), t.isLast ? "" : ","]; + case "media-type": return _e(V(r.value, e)); + case "media-feature-expression": return r.nodes ? [ + "(", + ...t.map(s, "nodes"), + ")" + ] : r.value; + case "media-feature": return Ie(V(E(0, r.value, / +/gu, " "), e)); + case "media-colon": return [r.value, " "]; + case "media-value": return _e(V(r.value, e)); + case "media-keyword": return V(r.value, e); + case "media-url": return V(E(0, E(0, r.value, /^url\(\s+/giu, "url("), /\s+\)$/gu, ")"), e); + case "media-unknown": return r.value; + case "selector-root": return D([we(t, "custom-selector") ? [t.findAncestor((n) => n.type === "css-atrule").customSelector, C] : "", Y([",", we(t, [ + "extend", + "custom-selector", + "nest" + ]) ? C : T], t.map(s, "nodes"))]); + case "selector-selector": return D((r.nodes.length > 2 ? L : (i) => i)(t.map(s, "nodes"))); + case "selector-comment": return r.value; + case "selector-string": return V(r.value, e); + case "selector-tag": return [r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", t.previous?.type === "selector-nesting" ? r.value : _e(Hn(t, r.value) ? r.value.toLowerCase() : r.value)]; + case "selector-id": return ["#", r.value]; + case "selector-class": return [".", _e(V(r.value, e))]; + case "selector-attribute": return [ + "[", + r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", + r.attribute.trim(), + r.operator ?? "", + r.value ? gi(V(r.value.trim(), e), e) : "", + r.insensitive ? " i" : "", + "]" + ]; + case "selector-combinator": + if (r.value === "+" || r.value === ">" || r.value === "~" || r.value === ">>>") { + let o = t.parent; + return [ + o.type === "selector-selector" && o.nodes[0] === r ? "" : C, + r.value, + t.isLast ? "" : " " + ]; + } + return [r.value.trim().startsWith("(") ? C : "", _e(V(r.value.trim(), e)) || C]; + case "selector-universal": return [r.namespace ? [r.namespace === !0 ? "" : r.namespace.trim(), "|"] : "", r.value]; + case "selector-pseudo": return [Ie(r.value), ce(r.nodes) ? D([ + "(", + L([M, Y([",", C], t.map(s, "nodes"))]), + M, + ")" + ]) : ""]; + case "selector-nesting": return r.value; + case "selector-unknown": { + if (t.findAncestor((u) => u.type === "css-rule")?.isSCSSNesterProperty) return _e(V(Ie(r.value), e)); + let i = t.parent; + if (i.raws?.selector) { + let u = P(i), a = u + i.raws.selector.length; + return e.originalText.slice(u, a).trim(); + } + let o = t.grandparent; + if (i.type === "value-paren_group" && o?.type === "value-func" && o.value === "selector") { + let u = R(i.open) + 1, a = P(i.close), l = e.originalText.slice(u, a).trim(); + return Le(l) ? [Ne, l] : l; + } + return r.value; + } + case "value-value": + case "value-root": return s("group"); + case "value-comment": return e.originalText.slice(P(r), R(r)); + case "value-comma_group": return di(t, e, s); + case "value-paren_group": return bi(t, e, s); + case "value-func": return [ + r.value, + we(t, "supports") && ci(r) ? " " : "", + s("group") + ]; + case "value-paren": return r.value; + case "value-number": return [ns(r.value), ss(r.unit)]; + case "value-operator": return r.value; + case "value-word": return r.isColor && r.isHex || jn(r.value) ? r.value.toLowerCase() : r.value; + case "value-colon": { + let { previous: n } = t; + return D([r.value, typeof n?.value == "string" && n.value.endsWith("\\") || qe(t, "url") ? "" : C]); + } + case "value-string": return Nt(r.raws.quote + r.value + r.raws.quote, e); + case "value-atword": return ["@", r.value]; + case "value-unicode-range": return r.value; + case "value-unknown": return r.value; + default: throw new dn(r, "PostCSS"); + } +} +function gp(t, e) { + let s = /* @__PURE__ */ new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")"); + return Object.assign(s, e); +} +function wp(t) { + return t !== null && typeof t == "object"; +} +function te(t, e, s) { + if (Se(t)) { + delete t.parent; + for (let r in t) te(t[r], e, s), r === "type" && typeof t[r] == "string" && !t[r].startsWith(e) && (!s || !s.test(t[r])) && (t[r] = e + t[r]); + } + return t; +} +function Bs(t) { + if (Se(t)) { + delete t.parent; + for (let e in t) Bs(t[e]); + !Array.isArray(t) && t.value && !t.type && (t.type = "unknown"); + } + return t; +} +function Pp(t) { + let e; + try { + e = Np(t); + } catch { + return { + type: "selector-unknown", + value: t + }; + } + return te(Bs(e), "media-"); +} +function Vm(t) { + if (/\/[/*]/u.test(E(0, t, /"[^"]+"|'[^']+'/gu, ""))) return { + type: "selector-unknown", + value: t.trim() + }; + let e; + try { + new gu.default((s) => { + e = s; + }).process(t); + } catch { + return { + type: "selector-unknown", + value: t + }; + } + return te(e, "selector-"); +} +function qy(t) { + return Gr(t).text.slice(t.group.open.sourceIndex + 1, t.group.close.sourceIndex).trim(); +} +function Ly(t) { + if (ce(t)) { + for (let e = t.length - 1; e > 0; e--) if (t[e].type === "word" && t[e].value === "{" && t[e - 1].type === "word" && t[e - 1].value.endsWith("#")) return !0; + } + return !1; +} +function Dy(t) { + return t.some((e) => e.type === "string" || e.type === "func" && !e.value.endsWith("\\")); +} +function My(t, e) { + return !!(e.parser === "scss" && t?.type === "word" && t.value.startsWith("$")); +} +function By(t, e) { + let { nodes: s } = t, r = { + open: null, + close: null, + groups: [], + type: "paren_group" + }, n = [r], i = r, o = { + groups: [], + type: "comma_group" + }, u = [o]; + for (let a = 0; a < s.length; ++a) { + let l = s[a]; + if (e.parser === "scss" && l.type === "number" && l.unit === ".." && l.value.endsWith(".") && (l.value = l.value.slice(0, -1), l.unit = "..."), l.type === "func" && l.value === "selector" && (l.group.groups = [se(Gr(t).text.slice(l.group.open.sourceIndex + 1, l.group.close.sourceIndex))]), l.type === "func" && l.value === "url") { + let f = l.group?.groups ?? [], h = []; + for (let c = 0; c < f.length; c++) { + let g = f[c]; + g.type === "comma_group" ? h = [...h, ...g.groups] : h.push(g); + } + (ol(h) || !al(h) && !ul(h[0], e)) && (l.group.groups = [il(l)]); + } + if (l.type === "paren" && l.value === "(") r = { + open: l, + close: null, + groups: [], + type: "paren_group" + }, n.push(r), o = { + groups: [], + type: "comma_group" + }, u.push(o); + else if (ll(l)) { + if (o.groups.length > 0 && r.groups.push(o), r.close = l, u.length === 1) throw new Error("Unbalanced parenthesis"); + u.pop(), o = G(0, u, -1), o.groups.push(r), n.pop(), r = G(0, n, -1); + } else if (l.type === "comma") { + if (a === s.length - 3 && s[a + 1].type === "comment" && ll(s[a + 2])) continue; + r.groups.push(o), o = { + groups: [], + type: "comma_group" + }, u[u.length - 1] = o; + } else o.groups.push(l); + } + return o.groups.length > 0 && r.groups.push(o), i; +} +function Yr(t) { + return t.type === "paren_group" && !t.open && !t.close && t.groups.length === 1 || t.type === "comma_group" && t.groups.length === 1 ? Yr(t.groups[0]) : t.type === "paren_group" || t.type === "comma_group" ? { + ...t, + groups: t.groups.map(Yr) + } : t; +} +function fl(t, e) { + if (Se(t)) for (let s in t) s !== "parent" && (fl(t[s], e), s === "nodes" && (t.group = Yr(By(t, e)), delete t[s])); + return t; +} +function Uy(t, e) { + if (e.parser === "less" && t.startsWith("~`")) return { + type: "value-unknown", + value: t + }; + let s = null; + try { + s = new cl.default(t, { loose: !0 }).parse(); + } catch { + return { + type: "value-unknown", + value: t + }; + } + s.text = t; + return te(fl(s, e), "value-", /^selector-/u); +} +function $y(t) { + return Fy.has(t); +} +function Wy(t, e) { + return e.parser !== "scss" || !t.selector ? !1 : t.selector.replace(/\/\*.*?\*\//u, "").replace(/\/\/.*\n/u, "").trim().endsWith(":"); +} +function gl(t, e) { + if (Se(t)) { + delete t.parent; + for (let i in t) gl(t[i], e); + if (!t.type) return t; + if (t.raws ?? (t.raws = {}), t.type === "css-decl" && typeof t.prop == "string" && t.prop.startsWith("--") && typeof t.value == "string" && t.value.startsWith("{")) { + let i; + if (t.value.trimEnd().endsWith("}")) { + let o = e.originalText.slice(0, t.source.start.offset), u = "a".repeat(t.prop.length) + e.originalText.slice(t.source.start.offset + t.prop.length, t.source.end.offset), a = E(0, o, /[^\n]/gu, " ") + u, l; + e.parser === "scss" ? l = xl : e.parser === "less" ? l = vl : l = wl; + let f; + try { + f = l(a, { ...e }); + } catch {} + f?.nodes?.length === 1 && f.nodes[0].type === "css-rule" && (i = f.nodes[0].nodes); + } + return i ? t.value = { + type: "css-rule", + nodes: i + } : t.value = { + type: "value-unknown", + value: t.raws.value.raw + }, t; + } + let s = ""; + typeof t.selector == "string" && (s = t.raws.selector ? t.raws.selector.scss ?? t.raws.selector.raw : t.selector, t.raws.between && t.raws.between.trim().length > 0 && (s += t.raws.between), t.raws.selector = s); + let r = ""; + typeof t.value == "string" && (r = t.raws.value ? t.raws.value.scss ?? t.raws.value.raw : t.value, t.raws.value = r.trim()); + let n = ""; + if (typeof t.params == "string" && (n = t.raws.params ? t.raws.params.scss ?? t.raws.params.raw : t.params, t.raws.afterName && t.raws.afterName.trim().length > 0 && (n = t.raws.afterName + n), t.raws.between && t.raws.between.trim().length > 0 && (n = n + t.raws.between), n = n.trim(), t.raws.params = n), s.trim().length > 0) return s.startsWith("@") && s.endsWith(":") ? t : t.mixin ? (t.selector = de(s, e), t) : (hl(t, e) && (t.isSCSSNesterProperty = !0), t.selector = se(s), t); + if (r.trim().length > 0) { + let i = r.match(Gy); + i && (r = r.slice(0, i.index), t.scssDefault = !0, i[0].trim() !== "!default" && (t.raws.scssDefault = i[0])); + let o = r.match(Yy); + if (o && (r = r.slice(0, o.index), t.scssGlobal = !0, o[0].trim() !== "!global" && (t.raws.scssGlobal = o[0])), r.startsWith("progid:")) return { + type: "value-unknown", + value: r + }; + t.value = de(r, e); + } + if (e.parser === "less" && t.type === "css-decl" && r.startsWith("extend(") && (t.extend || (t.extend = t.raws.between === ":"), t.extend && !t.selector && (delete t.value, t.selector = se(r.slice(7, -1)))), t.type === "css-atrule") { + if (e.parser === "less") { + if (t.mixin) return t.selector = se(t.raws.identifier + t.name + t.raws.afterName + t.raws.params), delete t.params, t; + if (t.function) return t; + } + if (e.parser === "css" && t.name === "custom-selector") { + let i = t.params.match(/:--\S+\s+/u)[0].trim(); + return t.customSelector = i, t.selector = se(t.params.slice(i.length).trim()), delete t.params, t; + } + if (e.parser === "less") { + if (t.name.includes(":")) { + t.variable = !0; + let i = t.name.split(":"); + t.name = i[0]; + let o = i.slice(1).join(":"); + t.params && (o += t.params), t.value = de(o, e); + } + if (![ + "page", + "nest", + "keyframes" + ].includes(t.name) && t.params?.[0] === ":") { + t.variable = !0; + let i = t.params.slice(1); + i && (t.value = de(i, e)), t.raws.afterName += ":"; + } + if (t.variable) return delete t.params, t.value || delete t.value, t; + } + } + if (t.type === "css-atrule" && n.length > 0) { + let { name: i } = t, o = t.name.toLowerCase(); + return i === "warn" || i === "error" ? (t.params = { + type: "media-unknown", + value: n + }, t) : i === "extend" || i === "nest" ? (t.selector = se(n), delete t.params, t) : i === "at-root" ? (/^\(\s*(?:without|with)\s*:.+\)$/su.test(n) ? t.params = de(n, e) : (t.selector = se(n), delete t.params), t) : pl(o) ? (t.import = !0, delete t.filename, t.params = de(n, e), t) : [ + "namespace", + "supports", + "if", + "else", + "for", + "each", + "while", + "debug", + "mixin", + "include", + "function", + "return", + "define-mixin", + "add-mixin" + ].includes(i) ? (n = n.replace(/(\$\S+?)(\s+)?\.{3}/u, "$1...$2"), n = n.replace(/^(?!if)([^"'\s(]+)(\s+)\(/u, "$1($2"), t.value = de(n, e), delete t.params, t) : ["media", "custom-media"].includes(o) ? n.includes("#{") ? { + type: "media-unknown", + value: n + } : (t.params = Ea(n), t) : (t.params = n, t); + } + } + return t; +} +function Js(t, e, s) { + let { frontMatter: r, content: n } = ge(e), i; + try { + i = t(n, { map: !1 }); + } catch (o) { + let { name: u, reason: a, line: l, column: f } = o; + throw typeof l != "number" ? o : ma(`${u}: ${a}`, { + loc: { start: { + line: l, + column: f + } }, + cause: o + }); + } + return s.originalText = e, i = gl(te(i, "css-"), s), Xr(i, e), r && (i.frontMatter = { + ...r, + type: "front-matter", + source: { + startOffset: r.start.index, + endOffset: r.end.index + } + }), i; +} +function wl(t, e = {}) { + return Js(dl.default.default, t, e); +} +function vl(t, e = {}) { + return Js((s) => ml.default.parse(Tn(s)), t, e); +} +function xl(t, e = {}) { + return Js(yl.default, t, e); +} +var bl, Vr, El, Sl, kl, Tl, w, sn, Al, Te, Oi, as, zt, jt, it, Ht, ut, Me, ft, fe, Hi, Ki, hs, Ue, Qt, $e, ws, Xt, er, tr, ht, wo, xo, bo, So, Oo, Po, Io, qo, sr, Uo, bs, Es, nr, Ss, As, Qo, Jo, ir, aa, ca, pa, da, Rs, qs, xa, _a, Us, Fs, $s, ke, B, fr, Pa, Ia, Ye, Da, Ba, Fa, Wa, Ya, za, Ha, Qa, Ja, eu, ru, fu, du, yu, j, F, _u, Eu, Tu, Ou, Nu, Ru, Lu, Mu, Uu, $u, Gu, Vu, ju, Ku, Ju, el, nl, _l, bt, Ol, E, G, Rl, K, je, He, Et, ie, Ae, St, oe, ae, me, kt, Oe, Tt, X, At, Ce, Ot, ue, ql, zr, nn, $, ye, an, un, Ne, C, M, T, ce, cn, fn, Wl, Gl, pn, Vl, hn, Nt, jr, dn, Pt, Re, Ke, ge, Xl, yn, wn, Qe, Zl, vn, _, _n, Kr, It, bn, qt, P, R, nc, ic, Nn, oc, An, ac, On, uc, Pn, Dn, Mn, Bn, Un, Gn, Yn, Vn, cc, fc, di, mi, Wt, yi, wc, vi, Gt, Yt, xi, _i, Vt, De, Ei, Si, Ti, en, dl, ml, yl, ma, Se, ba, Np, Ea, gu, se, cl, Iy, Gr, il, ol, al, ul, ll, de, Fy, pl, hl, Gy, Yy, Zs, Vy, zy, jy, Hy; +//#endregion +__esmMin((() => { + bl = Object.create; + Vr = Object.defineProperty; + El = Object.getOwnPropertyDescriptor; + Sl = Object.getOwnPropertyNames; + kl = Object.getPrototypeOf, Tl = Object.prototype.hasOwnProperty; + w = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), sn = (t, e) => { + for (var s in e) Vr(t, s, { + get: e[s], + enumerable: !0 + }); + }, Al = (t, e, s, r) => { + if (e && typeof e == "object" || typeof e == "function") for (let n of Sl(e)) !Tl.call(t, n) && n !== s && Vr(t, n, { + get: () => e[n], + enumerable: !(r = El(e, n)) || r.enumerable + }); + return t; + }; + Te = (t, e, s) => (s = t != null ? bl(kl(t)) : {}, Al(e || !t || !t.__esModule ? Vr(s, "default", { + value: t, + enumerable: !0 + }) : s, t)); + Oi = w((ux, os) => { + var x = String, Ai = function() { + return { + isColorSupported: !1, + reset: x, + bold: x, + dim: x, + italic: x, + underline: x, + inverse: x, + hidden: x, + strikethrough: x, + black: x, + red: x, + green: x, + yellow: x, + blue: x, + magenta: x, + cyan: x, + white: x, + gray: x, + bgBlack: x, + bgRed: x, + bgGreen: x, + bgYellow: x, + bgBlue: x, + bgMagenta: x, + bgCyan: x, + bgWhite: x, + blackBright: x, + redBright: x, + greenBright: x, + yellowBright: x, + blueBright: x, + magentaBright: x, + cyanBright: x, + whiteBright: x, + bgBlackBright: x, + bgRedBright: x, + bgGreenBright: x, + bgYellowBright: x, + bgBlueBright: x, + bgMagentaBright: x, + bgCyanBright: x, + bgWhiteBright: x + }; + }; + os.exports = Ai(); + os.exports.createColors = Ai; + }); + as = w(() => {}); + zt = w((fx, Pi) => { + "use strict"; + var Ci = Oi(), Ni = as(), st = class t extends Error { + constructor(e, s, r, n, i, o) { + super(e), this.name = "CssSyntaxError", this.reason = e, i && (this.file = i), n && (this.source = n), o && (this.plugin = o), typeof s < "u" && typeof r < "u" && (typeof s == "number" ? (this.line = s, this.column = r) : (this.line = s.line, this.column = s.column, this.endLine = r.line, this.endColumn = r.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, t); + } + setMessage() { + this.message = this.plugin ? this.plugin + ": " : "", this.message += this.file ? this.file : "", typeof this.line < "u" && (this.message += ":" + this.line + ":" + this.column), this.message += ": " + this.reason; + } + showSourceCode(e) { + if (!this.source) return ""; + let s = this.source; + e ??= Ci.isColorSupported; + let r = (f) => f, n = (f) => f, i = (f) => f; + if (e) { + let { bold: f, gray: h, red: c } = Ci.createColors(!0); + n = (g) => f(c(g)), r = (g) => h(g), Ni && (i = (g) => Ni(g)); + } + let o = s.split(/\r?\n/), u = Math.max(this.line - 3, 0), a = Math.min(this.line + 2, o.length), l = String(a).length; + return o.slice(u, a).map((f, h) => { + let c = u + 1 + h, g = " " + (" " + c).slice(-l) + " | "; + if (c === this.line) { + if (f.length > 160) { + let d = 20, p = Math.max(0, this.column - d), m = Math.max(this.column + d, this.endColumn + d), y = f.slice(p, m), v = r(g.replace(/\d/g, " ")) + f.slice(0, Math.min(this.column - 1, d - 1)).replace(/[^\t]/g, " "); + return n(">") + r(g) + i(y) + ` + ` + v + n("^"); + } + let b = r(g.replace(/\d/g, " ")) + f.slice(0, this.column - 1).replace(/[^\t]/g, " "); + return n(">") + r(g) + i(f) + ` + ` + b + n("^"); + } + return " " + r(g) + i(f); + }).join(` +`); + } + toString() { + let e = this.showSourceCode(); + return e && (e = ` + +` + e + ` +`), this.name + ": " + this.message + e; + } + }; + Pi.exports = st; + st.default = st; + }); + jt = w((px, Ii) => { + "use strict"; + var Ri = { + after: ` +`, + beforeClose: ` +`, + beforeComment: ` +`, + beforeDecl: ` +`, + beforeOpen: " ", + beforeRule: ` +`, + colon: ": ", + commentLeft: " ", + commentRight: " ", + emptyBody: "", + indent: " ", + semicolon: !1 + }; + function Rc(t) { + return t[0].toUpperCase() + t.slice(1); + } + var nt = class { + constructor(e) { + this.builder = e; + } + atrule(e, s) { + let r = "@" + e.name, n = e.params ? this.rawValue(e, "params") : ""; + if (typeof e.raws.afterName < "u" ? r += e.raws.afterName : n && (r += " "), e.nodes) this.block(e, r + n); + else { + let i = (e.raws.between || "") + (s ? ";" : ""); + this.builder(r + n + i, e); + } + } + beforeAfter(e, s) { + let r; + e.type === "decl" ? r = this.raw(e, null, "beforeDecl") : e.type === "comment" ? r = this.raw(e, null, "beforeComment") : s === "before" ? r = this.raw(e, null, "beforeRule") : r = this.raw(e, null, "beforeClose"); + let n = e.parent, i = 0; + for (; n && n.type !== "root";) i += 1, n = n.parent; + if (r.includes(` +`)) { + let o = this.raw(e, null, "indent"); + if (o.length) for (let u = 0; u < i; u++) r += o; + } + return r; + } + block(e, s) { + let r = this.raw(e, "between", "beforeOpen"); + this.builder(s + r + "{", e, "start"); + let n; + e.nodes && e.nodes.length ? (this.body(e), n = this.raw(e, "after")) : n = this.raw(e, "after", "emptyBody"), n && this.builder(n), this.builder("}", e, "end"); + } + body(e) { + let s = e.nodes.length - 1; + for (; s > 0 && e.nodes[s].type === "comment";) s -= 1; + let r = this.raw(e, "semicolon"); + for (let n = 0; n < e.nodes.length; n++) { + let i = e.nodes[n], o = this.raw(i, "before"); + o && this.builder(o), this.stringify(i, s !== n || r); + } + } + comment(e) { + let s = this.raw(e, "left", "commentLeft"), r = this.raw(e, "right", "commentRight"); + this.builder("/*" + s + e.text + r + "*/", e); + } + decl(e, s) { + let r = this.raw(e, "between", "colon"), n = e.prop + r + this.rawValue(e, "value"); + e.important && (n += e.raws.important || " !important"), s && (n += ";"), this.builder(n, e); + } + document(e) { + this.body(e); + } + raw(e, s, r) { + let n; + if (r || (r = s), s && (n = e.raws[s], typeof n < "u")) return n; + let i = e.parent; + if (r === "before" && (!i || i.type === "root" && i.first === e || i && i.type === "document")) return ""; + if (!i) return Ri[r]; + let o = e.root(); + if (o.rawCache || (o.rawCache = {}), typeof o.rawCache[r] < "u") return o.rawCache[r]; + if (r === "before" || r === "after") return this.beforeAfter(e, r); + { + let u = "raw" + Rc(r); + this[u] ? n = this[u](o, e) : o.walk((a) => { + if (n = a.raws[s], typeof n < "u") return !1; + }); + } + return typeof n > "u" && (n = Ri[r]), o.rawCache[r] = n, n; + } + rawBeforeClose(e) { + let s; + return e.walk((r) => { + if (r.nodes && r.nodes.length > 0 && typeof r.raws.after < "u") return s = r.raws.after, s.includes(` +`) && (s = s.replace(/[^\n]+$/, "")), !1; + }), s && (s = s.replace(/\S/g, "")), s; + } + rawBeforeComment(e, s) { + let r; + return e.walkComments((n) => { + if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(` +`) && (r = r.replace(/[^\n]+$/, "")), !1; + }), typeof r > "u" ? r = this.raw(s, null, "beforeDecl") : r && (r = r.replace(/\S/g, "")), r; + } + rawBeforeDecl(e, s) { + let r; + return e.walkDecls((n) => { + if (typeof n.raws.before < "u") return r = n.raws.before, r.includes(` +`) && (r = r.replace(/[^\n]+$/, "")), !1; + }), typeof r > "u" ? r = this.raw(s, null, "beforeRule") : r && (r = r.replace(/\S/g, "")), r; + } + rawBeforeOpen(e) { + let s; + return e.walk((r) => { + if (r.type !== "decl" && (s = r.raws.between, typeof s < "u")) return !1; + }), s; + } + rawBeforeRule(e) { + let s; + return e.walk((r) => { + if (r.nodes && (r.parent !== e || e.first !== r) && typeof r.raws.before < "u") return s = r.raws.before, s.includes(` +`) && (s = s.replace(/[^\n]+$/, "")), !1; + }), s && (s = s.replace(/\S/g, "")), s; + } + rawColon(e) { + let s; + return e.walkDecls((r) => { + if (typeof r.raws.between < "u") return s = r.raws.between.replace(/[^\s:]/g, ""), !1; + }), s; + } + rawEmptyBody(e) { + let s; + return e.walk((r) => { + if (r.nodes && r.nodes.length === 0 && (s = r.raws.after, typeof s < "u")) return !1; + }), s; + } + rawIndent(e) { + if (e.raws.indent) return e.raws.indent; + let s; + return e.walk((r) => { + let n = r.parent; + if (n && n !== e && n.parent && n.parent === e && typeof r.raws.before < "u") { + let i = r.raws.before.split(` +`); + return s = i[i.length - 1], s = s.replace(/\S/g, ""), !1; + } + }), s; + } + rawSemicolon(e) { + let s; + return e.walk((r) => { + if (r.nodes && r.nodes.length && r.last.type === "decl" && (s = r.raws.semicolon, typeof s < "u")) return !1; + }), s; + } + rawValue(e, s) { + let r = e[s], n = e.raws[s]; + return n && n.value === r ? n.raw : r; + } + root(e) { + this.body(e), e.raws.after && this.builder(e.raws.after); + } + rule(e) { + this.block(e, this.rawValue(e, "selector")), e.raws.ownSemicolon && this.builder(e.raws.ownSemicolon, e, "end"); + } + stringify(e, s) { + if (!this[e.type]) throw new Error("Unknown AST node type " + e.type + ". Maybe you need to change PostCSS stringifier."); + this[e.type](e, s); + } + }; + Ii.exports = nt; + nt.default = nt; + }); + it = w((hx, qi) => { + "use strict"; + var Ic = jt(); + function us(t, e) { + new Ic(e).stringify(t); + } + qi.exports = us; + us.default = us; + }); + Ht = w((dx, ls) => { + "use strict"; + ls.exports.isClean = Symbol("isClean"); + ls.exports.my = Symbol("my"); + }); + ut = w((mx, Li) => { + "use strict"; + var qc = zt(), Lc = jt(), Dc = it(), { isClean: ot, my: Mc } = Ht(); + function cs(t, e) { + let s = new t.constructor(); + for (let r in t) { + if (!Object.prototype.hasOwnProperty.call(t, r) || r === "proxyCache") continue; + let n = t[r], i = typeof n; + r === "parent" && i === "object" ? e && (s[r] = e) : r === "source" ? s[r] = n : Array.isArray(n) ? s[r] = n.map((o) => cs(o, s)) : (i === "object" && n !== null && (n = cs(n)), s[r] = n); + } + return s; + } + function ee(t, e) { + if (e && typeof e.offset < "u") return e.offset; + let s = 1, r = 1, n = 0; + for (let i = 0; i < t.length; i++) { + if (r === e.line && s === e.column) { + n = i; + break; + } + t[i] === ` +` ? (s = 1, r += 1) : s += 1; + } + return n; + } + var at = class { + get proxyOf() { + return this; + } + constructor(e = {}) { + this.raws = {}, this[ot] = !1, this[Mc] = !0; + for (let s in e) if (s === "nodes") { + this.nodes = []; + for (let r of e[s]) typeof r.clone == "function" ? this.append(r.clone()) : this.append(r); + } else this[s] = e[s]; + } + addToError(e) { + if (e.postcssNode = this, e.stack && this.source && /\n\s{4}at /.test(e.stack)) { + let s = this.source; + e.stack = e.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`); + } + return e; + } + after(e) { + return this.parent.insertAfter(this, e), this; + } + assign(e = {}) { + for (let s in e) this[s] = e[s]; + return this; + } + before(e) { + return this.parent.insertBefore(this, e), this; + } + cleanRaws(e) { + delete this.raws.before, delete this.raws.after, e || delete this.raws.between; + } + clone(e = {}) { + let s = cs(this); + for (let r in e) s[r] = e[r]; + return s; + } + cloneAfter(e = {}) { + let s = this.clone(e); + return this.parent.insertAfter(this, s), s; + } + cloneBefore(e = {}) { + let s = this.clone(e); + return this.parent.insertBefore(this, s), s; + } + error(e, s = {}) { + if (this.source) { + let { end: r, start: n } = this.rangeBy(s); + return this.source.input.error(e, { + column: n.column, + line: n.line + }, { + column: r.column, + line: r.line + }, s); + } + return new qc(e); + } + getProxyProcessor() { + return { + get(e, s) { + return s === "proxyOf" ? e : s === "root" ? () => e.root().toProxy() : e[s]; + }, + set(e, s, r) { + return e[s] === r || (e[s] = r, (s === "prop" || s === "value" || s === "name" || s === "params" || s === "important" || s === "text") && e.markDirty()), !0; + } + }; + } + markClean() { + this[ot] = !0; + } + markDirty() { + if (this[ot]) { + this[ot] = !1; + let e = this; + for (; e = e.parent;) e[ot] = !1; + } + } + next() { + if (!this.parent) return; + let e = this.parent.index(this); + return this.parent.nodes[e + 1]; + } + positionBy(e = {}) { + let s = this.source.start; + if (e.index) s = this.positionInside(e.index); + else if (e.word) { + let r = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = r.slice(ee(r, this.source.start), ee(r, this.source.end)).indexOf(e.word); + i !== -1 && (s = this.positionInside(i)); + } + return s; + } + positionInside(e) { + let s = this.source.start.column, r = this.source.start.line, n = "document" in this.source.input ? this.source.input.document : this.source.input.css, i = ee(n, this.source.start), o = i + e; + for (let u = i; u < o; u++) n[u] === ` +` ? (s = 1, r += 1) : s += 1; + return { + column: s, + line: r, + offset: o + }; + } + prev() { + if (!this.parent) return; + let e = this.parent.index(this); + return this.parent.nodes[e - 1]; + } + rangeBy(e = {}) { + let s = "document" in this.source.input ? this.source.input.document : this.source.input.css, r = { + column: this.source.start.column, + line: this.source.start.line, + offset: ee(s, this.source.start) + }, n = this.source.end ? { + column: this.source.end.column + 1, + line: this.source.end.line, + offset: typeof this.source.end.offset == "number" ? this.source.end.offset : ee(s, this.source.end) + 1 + } : { + column: r.column + 1, + line: r.line, + offset: r.offset + 1 + }; + if (e.word) { + let o = s.slice(ee(s, this.source.start), ee(s, this.source.end)).indexOf(e.word); + o !== -1 && (r = this.positionInside(o), n = this.positionInside(o + e.word.length)); + } else e.start ? r = { + column: e.start.column, + line: e.start.line, + offset: ee(s, e.start) + } : e.index && (r = this.positionInside(e.index)), e.end ? n = { + column: e.end.column, + line: e.end.line, + offset: ee(s, e.end) + } : typeof e.endIndex == "number" ? n = this.positionInside(e.endIndex) : e.index && (n = this.positionInside(e.index + 1)); + return (n.line < r.line || n.line === r.line && n.column <= r.column) && (n = { + column: r.column + 1, + line: r.line, + offset: r.offset + 1 + }), { + end: n, + start: r + }; + } + raw(e, s) { + return new Lc().raw(this, e, s); + } + remove() { + return this.parent && this.parent.removeChild(this), this.parent = void 0, this; + } + replaceWith(...e) { + if (this.parent) { + let s = this, r = !1; + for (let n of e) n === this ? r = !0 : r ? (this.parent.insertAfter(s, n), s = n) : this.parent.insertBefore(s, n); + r || this.remove(); + } + return this; + } + root() { + let e = this; + for (; e.parent && e.parent.type !== "document";) e = e.parent; + return e; + } + toJSON(e, s) { + let r = {}, n = s == null; + s = s || /* @__PURE__ */ new Map(); + let i = 0; + for (let o in this) { + if (!Object.prototype.hasOwnProperty.call(this, o) || o === "parent" || o === "proxyCache") continue; + let u = this[o]; + if (Array.isArray(u)) r[o] = u.map((a) => typeof a == "object" && a.toJSON ? a.toJSON(null, s) : a); + else if (typeof u == "object" && u.toJSON) r[o] = u.toJSON(null, s); + else if (o === "source") { + if (u == null) continue; + let a = s.get(u.input); + a ?? (a = i, s.set(u.input, i), i++), r[o] = { + end: u.end, + inputId: a, + start: u.start + }; + } else r[o] = u; + } + return n && (r.inputs = [...s.keys()].map((o) => o.toJSON())), r; + } + toProxy() { + return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache; + } + toString(e = Dc) { + e.stringify && (e = e.stringify); + let s = ""; + return e(this, (r) => { + s += r; + }), s; + } + warn(e, s, r = {}) { + let n = { node: this }; + for (let i in r) n[i] = r[i]; + return e.warn(s, n); + } + }; + Li.exports = at; + at.default = at; + }); + Me = w((yx, Di) => { + "use strict"; + var Bc = ut(), lt = class extends Bc { + constructor(e) { + super(e), this.type = "comment"; + } + }; + Di.exports = lt; + lt.default = lt; + }); + ft = w((gx, Mi) => { + "use strict"; + var Uc = ut(), ct = class extends Uc { + get variable() { + return this.prop.startsWith("--") || this.prop[0] === "$"; + } + constructor(e) { + e && typeof e.value < "u" && typeof e.value != "string" && (e = { + ...e, + value: String(e.value) + }), super(e), this.type = "decl"; + } + }; + Mi.exports = ct; + ct.default = ct; + }); + fe = w((wx, zi) => { + "use strict"; + var Bi = Me(), Ui = ft(), Fc = ut(), { isClean: Fi, my: $i } = Ht(), fs, Wi, Gi, ps; + function Yi(t) { + return t.map((e) => (e.nodes && (e.nodes = Yi(e.nodes)), delete e.source, e)); + } + function Vi(t) { + if (t[Fi] = !1, t.proxyOf.nodes) for (let e of t.proxyOf.nodes) Vi(e); + } + var z = class t extends Fc { + get first() { + if (this.proxyOf.nodes) return this.proxyOf.nodes[0]; + } + get last() { + if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]; + } + append(...e) { + for (let s of e) { + let r = this.normalize(s, this.last); + for (let n of r) this.proxyOf.nodes.push(n); + } + return this.markDirty(), this; + } + cleanRaws(e) { + if (super.cleanRaws(e), this.nodes) for (let s of this.nodes) s.cleanRaws(e); + } + each(e) { + if (!this.proxyOf.nodes) return; + let s = this.getIterator(), r, n; + for (; this.indexes[s] < this.proxyOf.nodes.length && (r = this.indexes[s], n = e(this.proxyOf.nodes[r], r), n !== !1);) this.indexes[s] += 1; + return delete this.indexes[s], n; + } + every(e) { + return this.nodes.every(e); + } + getIterator() { + this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1; + let e = this.lastEach; + return this.indexes[e] = 0, e; + } + getProxyProcessor() { + return { + get(e, s) { + return s === "proxyOf" ? e : e[s] ? s === "each" || typeof s == "string" && s.startsWith("walk") ? (...r) => e[s](...r.map((n) => typeof n == "function" ? (i, o) => n(i.toProxy(), o) : n)) : s === "every" || s === "some" ? (r) => e[s]((n, ...i) => r(n.toProxy(), ...i)) : s === "root" ? () => e.root().toProxy() : s === "nodes" ? e.nodes.map((r) => r.toProxy()) : s === "first" || s === "last" ? e[s].toProxy() : e[s] : e[s]; + }, + set(e, s, r) { + return e[s] === r || (e[s] = r, (s === "name" || s === "params" || s === "selector") && e.markDirty()), !0; + } + }; + } + index(e) { + return typeof e == "number" ? e : (e.proxyOf && (e = e.proxyOf), this.proxyOf.nodes.indexOf(e)); + } + insertAfter(e, s) { + let r = this.index(e), n = this.normalize(s, this.proxyOf.nodes[r]).reverse(); + r = this.index(e); + for (let o of n) this.proxyOf.nodes.splice(r + 1, 0, o); + let i; + for (let o in this.indexes) i = this.indexes[o], r < i && (this.indexes[o] = i + n.length); + return this.markDirty(), this; + } + insertBefore(e, s) { + let r = this.index(e), n = r === 0 ? "prepend" : !1, i = this.normalize(s, this.proxyOf.nodes[r], n).reverse(); + r = this.index(e); + for (let u of i) this.proxyOf.nodes.splice(r, 0, u); + let o; + for (let u in this.indexes) o = this.indexes[u], r <= o && (this.indexes[u] = o + i.length); + return this.markDirty(), this; + } + normalize(e, s) { + if (typeof e == "string") e = Yi(Wi(e).nodes); + else if (typeof e > "u") e = []; + else if (Array.isArray(e)) { + e = e.slice(0); + for (let n of e) n.parent && n.parent.removeChild(n, "ignore"); + } else if (e.type === "root" && this.type !== "document") { + e = e.nodes.slice(0); + for (let n of e) n.parent && n.parent.removeChild(n, "ignore"); + } else if (e.type) e = [e]; + else if (e.prop) { + if (typeof e.value > "u") throw new Error("Value field is missed in node creation"); + typeof e.value != "string" && (e.value = String(e.value)), e = [new Ui(e)]; + } else if (e.selector || e.selectors) e = [new ps(e)]; + else if (e.name) e = [new fs(e)]; + else if (e.text) e = [new Bi(e)]; + else throw new Error("Unknown node type in node creation"); + return e.map((n) => (n[$i] || t.rebuild(n), n = n.proxyOf, n.parent && n.parent.removeChild(n), n[Fi] && Vi(n), n.raws || (n.raws = {}), typeof n.raws.before > "u" && s && typeof s.raws.before < "u" && (n.raws.before = s.raws.before.replace(/\S/g, "")), n.parent = this.proxyOf, n)); + } + prepend(...e) { + e = e.reverse(); + for (let s of e) { + let r = this.normalize(s, this.first, "prepend").reverse(); + for (let n of r) this.proxyOf.nodes.unshift(n); + for (let n in this.indexes) this.indexes[n] = this.indexes[n] + r.length; + } + return this.markDirty(), this; + } + push(e) { + return e.parent = this, this.proxyOf.nodes.push(e), this; + } + removeAll() { + for (let e of this.proxyOf.nodes) e.parent = void 0; + return this.proxyOf.nodes = [], this.markDirty(), this; + } + removeChild(e) { + e = this.index(e), this.proxyOf.nodes[e].parent = void 0, this.proxyOf.nodes.splice(e, 1); + let s; + for (let r in this.indexes) s = this.indexes[r], s >= e && (this.indexes[r] = s - 1); + return this.markDirty(), this; + } + replaceValues(e, s, r) { + return r || (r = s, s = {}), this.walkDecls((n) => { + s.props && !s.props.includes(n.prop) || s.fast && !n.value.includes(s.fast) || (n.value = n.value.replace(e, r)); + }), this.markDirty(), this; + } + some(e) { + return this.nodes.some(e); + } + walk(e) { + return this.each((s, r) => { + let n; + try { + n = e(s, r); + } catch (i) { + throw s.addToError(i); + } + return n !== !1 && s.walk && (n = s.walk(e)), n; + }); + } + walkAtRules(e, s) { + return s ? e instanceof RegExp ? this.walk((r, n) => { + if (r.type === "atrule" && e.test(r.name)) return s(r, n); + }) : this.walk((r, n) => { + if (r.type === "atrule" && r.name === e) return s(r, n); + }) : (s = e, this.walk((r, n) => { + if (r.type === "atrule") return s(r, n); + })); + } + walkComments(e) { + return this.walk((s, r) => { + if (s.type === "comment") return e(s, r); + }); + } + walkDecls(e, s) { + return s ? e instanceof RegExp ? this.walk((r, n) => { + if (r.type === "decl" && e.test(r.prop)) return s(r, n); + }) : this.walk((r, n) => { + if (r.type === "decl" && r.prop === e) return s(r, n); + }) : (s = e, this.walk((r, n) => { + if (r.type === "decl") return s(r, n); + })); + } + walkRules(e, s) { + return s ? e instanceof RegExp ? this.walk((r, n) => { + if (r.type === "rule" && e.test(r.selector)) return s(r, n); + }) : this.walk((r, n) => { + if (r.type === "rule" && r.selector === e) return s(r, n); + }) : (s = e, this.walk((r, n) => { + if (r.type === "rule") return s(r, n); + })); + } + }; + z.registerParse = (t) => { + Wi = t; + }; + z.registerRule = (t) => { + ps = t; + }; + z.registerAtRule = (t) => { + fs = t; + }; + z.registerRoot = (t) => { + Gi = t; + }; + zi.exports = z; + z.default = z; + z.rebuild = (t) => { + t.type === "atrule" ? Object.setPrototypeOf(t, fs.prototype) : t.type === "rule" ? Object.setPrototypeOf(t, ps.prototype) : t.type === "decl" ? Object.setPrototypeOf(t, Ui.prototype) : t.type === "comment" ? Object.setPrototypeOf(t, Bi.prototype) : t.type === "root" && Object.setPrototypeOf(t, Gi.prototype), t[$i] = !0, t.nodes && t.nodes.forEach((e) => { + z.rebuild(e); + }); + }; + }); + Hi = w((vx, ji) => { + var $c = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Wc = (t, e = 21) => (s = e) => { + let r = "", n = s | 0; + for (; n--;) r += t[Math.random() * t.length | 0]; + return r; + }, Gc = (t = 21) => { + let e = "", s = t | 0; + for (; s--;) e += $c[Math.random() * 64 | 0]; + return e; + }; + ji.exports = { + nanoid: Gc, + customAlphabet: Wc + }; + }); + Ki = w(() => {}); + hs = w((bx, Qi) => { + Qi.exports = class {}; + }); + Ue = w((Sx, to) => { + "use strict"; + var { nanoid: Yc } = Hi(), { isAbsolute: ys, resolve: gs } = {}, { SourceMapConsumer: Vc, SourceMapGenerator: zc } = Ki(), { fileURLToPath: Xi, pathToFileURL: Kt } = {}, Ji = zt(), jc = hs(), ds = as(), ms = Symbol("lineToIndexCache"), Hc = !!(Vc && zc), Zi = !!(gs && ys); + function eo(t) { + if (t[ms]) return t[ms]; + let e = t.css.split(` +`), s = new Array(e.length), r = 0; + for (let n = 0, i = e.length; n < i; n++) s[n] = r, r += e[n].length + 1; + return t[ms] = s, s; + } + var Be = class { + get from() { + return this.file || this.id; + } + constructor(e, s = {}) { + if (e === null || typeof e > "u" || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`); + if (this.css = e.toString(), this.css[0] === "" || this.css[0] === "￾" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, this.document = this.css, s.document && (this.document = s.document.toString()), s.from && (!Zi || /^\w+:\/\//.test(s.from) || ys(s.from) ? this.file = s.from : this.file = gs(s.from)), Zi && Hc) { + let r = new jc(this.css, s); + if (r.text) { + this.map = r; + let n = r.consumer().file; + !this.file && n && (this.file = this.mapResolve(n)); + } + } + this.file || (this.id = ""), this.map && (this.map.file = this.from); + } + error(e, s, r, n = {}) { + let i, o, u, a, l; + if (s && typeof s == "object") { + let h = s, c = r; + if (typeof h.offset == "number") { + a = h.offset; + let g = this.fromOffset(a); + s = g.line, r = g.col; + } else s = h.line, r = h.column, a = this.fromLineAndColumn(s, r); + if (typeof c.offset == "number") { + u = c.offset; + let g = this.fromOffset(u); + o = g.line, i = g.col; + } else o = c.line, i = c.column, u = this.fromLineAndColumn(c.line, c.column); + } else if (r) a = this.fromLineAndColumn(s, r); + else { + a = s; + let h = this.fromOffset(a); + s = h.line, r = h.col; + } + let f = this.origin(s, r, o, i); + return f ? l = new Ji(e, f.endLine === void 0 ? f.line : { + column: f.column, + line: f.line + }, f.endLine === void 0 ? f.column : { + column: f.endColumn, + line: f.endLine + }, f.source, f.file, n.plugin) : l = new Ji(e, o === void 0 ? s : { + column: r, + line: s + }, o === void 0 ? r : { + column: i, + line: o + }, this.css, this.file, n.plugin), l.input = { + column: r, + endColumn: i, + endLine: o, + endOffset: u, + line: s, + offset: a, + source: this.css + }, this.file && (Kt && (l.input.url = Kt(this.file).toString()), l.input.file = this.file), l; + } + fromLineAndColumn(e, s) { + return eo(this)[e - 1] + s - 1; + } + fromOffset(e) { + let s = eo(this), r = s[s.length - 1], n = 0; + if (e >= r) n = s.length - 1; + else { + let i = s.length - 2, o; + for (; n < i;) if (o = n + (i - n >> 1), e < s[o]) i = o - 1; + else if (e >= s[o + 1]) n = o + 1; + else { + n = o; + break; + } + } + return { + col: e - s[n] + 1, + line: n + 1 + }; + } + mapResolve(e) { + return /^\w+:\/\//.test(e) ? e : gs(this.map.consumer().sourceRoot || this.map.root || ".", e); + } + origin(e, s, r, n) { + if (!this.map) return !1; + let i = this.map.consumer(), o = i.originalPositionFor({ + column: s, + line: e + }); + if (!o.source) return !1; + let u; + typeof r == "number" && (u = i.originalPositionFor({ + column: n, + line: r + })); + let a; + ys(o.source) ? a = Kt(o.source) : a = new URL(o.source, this.map.consumer().sourceRoot || Kt(this.map.mapFile)); + let l = { + column: o.column, + endColumn: u && u.column, + endLine: u && u.line, + line: o.line, + url: a.toString() + }; + if (a.protocol === "file:") if (Xi) l.file = Xi(a); + else throw new Error("file: protocol is not available in this PostCSS build"); + let f = i.sourceContentFor(o.source); + return f && (l.source = f), l; + } + toJSON() { + let e = {}; + for (let s of [ + "hasBOM", + "css", + "file", + "id" + ]) this[s] != null && (e[s] = this[s]); + return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e; + } + }; + to.exports = Be; + Be.default = Be; + ds && ds.registerInput && ds.registerInput(Be); + }); + Qt = w((kx, so) => { + "use strict"; + var ro = fe(), Fe = class extends ro { + constructor(e) { + super(e), this.type = "atrule"; + } + append(...e) { + return this.proxyOf.nodes || (this.nodes = []), super.append(...e); + } + prepend(...e) { + return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e); + } + }; + so.exports = Fe; + Fe.default = Fe; + ro.registerAtRule(Fe); + }); + $e = w((Tx, ao) => { + "use strict"; + var no = fe(), io, oo, pe = class extends no { + constructor(e) { + super(e), this.type = "root", this.nodes || (this.nodes = []); + } + normalize(e, s, r) { + let n = super.normalize(e); + if (s) { + if (r === "prepend") this.nodes.length > 1 ? s.raws.before = this.nodes[1].raws.before : delete s.raws.before; + else if (this.first !== s) for (let i of n) i.raws.before = s.raws.before; + } + return n; + } + removeChild(e, s) { + let r = this.index(e); + return !s && r === 0 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[r].raws.before), super.removeChild(e); + } + toResult(e = {}) { + return new io(new oo(), this, e).stringify(); + } + }; + pe.registerLazyResult = (t) => { + io = t; + }; + pe.registerProcessor = (t) => { + oo = t; + }; + ao.exports = pe; + pe.default = pe; + no.registerRoot(pe); + }); + ws = w((Ax, uo) => { + "use strict"; + var pt = { + comma(t) { + return pt.split(t, [","], !0); + }, + space(t) { + return pt.split(t, [ + " ", + ` +`, + " " + ]); + }, + split(t, e, s) { + let r = [], n = "", i = !1, o = 0, u = !1, a = "", l = !1; + for (let f of t) l ? l = !1 : f === "\\" ? l = !0 : u ? f === a && (u = !1) : f === "\"" || f === "'" ? (u = !0, a = f) : f === "(" ? o += 1 : f === ")" ? o > 0 && (o -= 1) : o === 0 && e.includes(f) && (i = !0), i ? (n !== "" && r.push(n.trim()), n = "", i = !1) : n += f; + return (s || n !== "") && r.push(n.trim()), r; + } + }; + uo.exports = pt; + pt.default = pt; + }); + Xt = w((Ox, co) => { + "use strict"; + var lo = fe(), Kc = ws(), We = class extends lo { + get selectors() { + return Kc.comma(this.selector); + } + set selectors(e) { + let s = this.selector ? this.selector.match(/,\s*/) : null, r = s ? s[0] : "," + this.raw("between", "beforeOpen"); + this.selector = e.join(r); + } + constructor(e) { + super(e), this.type = "rule", this.nodes || (this.nodes = []); + } + }; + co.exports = We; + We.default = We; + lo.registerRule(We); + }); + er = w((Cx, po) => { + "use strict"; + var Jt = /[\t\n\f\r "#'()/;[\\\]{}]/g, Zt = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Qc = /.[\r\n"'(/\\]/, fo = /[\da-f]/i; + po.exports = function(e, s = {}) { + let r = e.css.valueOf(), n = s.ignoreErrors, i, o, u, a, l, f, h, c, g, b, d = r.length, p = 0, m = [], y = []; + function v() { + return p; + } + function O(W) { + throw e.error("Unclosed " + W, p); + } + function q() { + return y.length === 0 && p >= d; + } + function H(W) { + if (y.length) return y.pop(); + if (p >= d) return; + let A = W ? W.ignoreUnclosed : !1; + switch (i = r.charCodeAt(p), i) { + case 10: + case 32: + case 9: + case 13: + case 12: + a = p; + do + a += 1, i = r.charCodeAt(a); + while (i === 32 || i === 10 || i === 9 || i === 13 || i === 12); + f = ["space", r.slice(p, a)], p = a - 1; + break; + case 91: + case 93: + case 123: + case 125: + case 58: + case 59: + case 41: { + let k = String.fromCharCode(i); + f = [ + k, + k, + p + ]; + break; + } + case 40: + if (b = m.length ? m.pop()[1] : "", g = r.charCodeAt(p + 1), b === "url" && g !== 39 && g !== 34 && g !== 32 && g !== 10 && g !== 9 && g !== 12 && g !== 13) { + a = p; + do { + if (h = !1, a = r.indexOf(")", a + 1), a === -1) if (n || A) { + a = p; + break; + } else O("bracket"); + for (c = a; r.charCodeAt(c - 1) === 92;) c -= 1, h = !h; + } while (h); + f = [ + "brackets", + r.slice(p, a + 1), + p, + a + ], p = a; + } else a = r.indexOf(")", p + 1), o = r.slice(p, a + 1), a === -1 || Qc.test(o) ? f = [ + "(", + "(", + p + ] : (f = [ + "brackets", + o, + p, + a + ], p = a); + break; + case 39: + case 34: + l = i === 39 ? "'" : "\"", a = p; + do { + if (h = !1, a = r.indexOf(l, a + 1), a === -1) if (n || A) { + a = p + 1; + break; + } else O("string"); + for (c = a; r.charCodeAt(c - 1) === 92;) c -= 1, h = !h; + } while (h); + f = [ + "string", + r.slice(p, a + 1), + p, + a + ], p = a; + break; + case 64: + Jt.lastIndex = p + 1, Jt.test(r), Jt.lastIndex === 0 ? a = r.length - 1 : a = Jt.lastIndex - 2, f = [ + "at-word", + r.slice(p, a + 1), + p, + a + ], p = a; + break; + case 92: + for (a = p, u = !0; r.charCodeAt(a + 1) === 92;) a += 1, u = !u; + if (i = r.charCodeAt(a + 1), u && i !== 47 && i !== 32 && i !== 10 && i !== 9 && i !== 13 && i !== 12 && (a += 1, fo.test(r.charAt(a)))) { + for (; fo.test(r.charAt(a + 1));) a += 1; + r.charCodeAt(a + 1) === 32 && (a += 1); + } + f = [ + "word", + r.slice(p, a + 1), + p, + a + ], p = a; + break; + default: + i === 47 && r.charCodeAt(p + 1) === 42 ? (a = r.indexOf("*/", p + 2) + 1, a === 0 && (n || A ? a = r.length : O("comment")), f = [ + "comment", + r.slice(p, a + 1), + p, + a + ], p = a) : (Zt.lastIndex = p + 1, Zt.test(r), Zt.lastIndex === 0 ? a = r.length - 1 : a = Zt.lastIndex - 2, f = [ + "word", + r.slice(p, a + 1), + p, + a + ], m.push(f), p = a); + break; + } + return p++, f; + } + function ne(W) { + y.push(W); + } + return { + back: ne, + endOfFile: q, + nextToken: H, + position: v + }; + }; + }); + tr = w((Nx, yo) => { + "use strict"; + var Xc = Qt(), Jc = Me(), Zc = ft(), ef = $e(), ho = Xt(), tf = er(), mo = { + empty: !0, + space: !0 + }; + function rf(t) { + for (let e = t.length - 1; e >= 0; e--) { + let s = t[e], r = s[3] || s[2]; + if (r) return r; + } + } + var vs = class { + constructor(e) { + this.input = e, this.root = new ef(), this.current = this.root, this.spaces = "", this.semicolon = !1, this.createTokenizer(), this.root.source = { + input: e, + start: { + column: 1, + line: 1, + offset: 0 + } + }; + } + atrule(e) { + let s = new Xc(); + s.name = e[1].slice(1), s.name === "" && this.unnamedAtrule(s, e), this.init(s, e[2]); + let r, n, i, o = !1, u = !1, a = [], l = []; + for (; !this.tokenizer.endOfFile();) { + if (e = this.tokenizer.nextToken(), r = e[0], r === "(" || r === "[" ? l.push(r === "(" ? ")" : "]") : r === "{" && l.length > 0 ? l.push("}") : r === l[l.length - 1] && l.pop(), l.length === 0) if (r === ";") { + s.source.end = this.getPosition(e[2]), s.source.end.offset++, this.semicolon = !0; + break; + } else if (r === "{") { + u = !0; + break; + } else if (r === "}") { + if (a.length > 0) { + for (i = a.length - 1, n = a[i]; n && n[0] === "space";) n = a[--i]; + n && (s.source.end = this.getPosition(n[3] || n[2]), s.source.end.offset++); + } + this.end(e); + break; + } else a.push(e); + else a.push(e); + if (this.tokenizer.endOfFile()) { + o = !0; + break; + } + } + s.raws.between = this.spacesAndCommentsFromEnd(a), a.length ? (s.raws.afterName = this.spacesAndCommentsFromStart(a), this.raw(s, "params", a), o && (e = a[a.length - 1], s.source.end = this.getPosition(e[3] || e[2]), s.source.end.offset++, this.spaces = s.raws.between, s.raws.between = "")) : (s.raws.afterName = "", s.params = ""), u && (s.nodes = [], this.current = s); + } + checkMissedSemicolon(e) { + let s = this.colon(e); + if (s === !1) return; + let r = 0, n; + for (let i = s - 1; i >= 0 && (n = e[i], !(n[0] !== "space" && (r += 1, r === 2))); i--); + throw this.input.error("Missed semicolon", n[0] === "word" ? n[3] + 1 : n[2]); + } + colon(e) { + let s = 0, r, n, i; + for (let [o, u] of e.entries()) { + if (n = u, i = n[0], i === "(" && (s += 1), i === ")" && (s -= 1), s === 0 && i === ":") if (!r) this.doubleColon(n); + else { + if (r[0] === "word" && r[1] === "progid") continue; + return o; + } + r = n; + } + return !1; + } + comment(e) { + let s = new Jc(); + this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.source.end.offset++; + let r = e[1].slice(2, -2); + if (/^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = ""; + else { + let n = r.match(/^(\s*)([^]*\S)(\s*)$/); + s.text = n[2], s.raws.left = n[1], s.raws.right = n[3]; + } + } + createTokenizer() { + this.tokenizer = tf(this.input); + } + decl(e, s) { + let r = new Zc(); + this.init(r, e[0][2]); + let n = e[e.length - 1]; + for (n[0] === ";" && (this.semicolon = !0, e.pop()), r.source.end = this.getPosition(n[3] || n[2] || rf(e)), r.source.end.offset++; e[0][0] !== "word";) e.length === 1 && this.unknownWord(e), r.raws.before += e.shift()[1]; + for (r.source.start = this.getPosition(e[0][2]), r.prop = ""; e.length;) { + let l = e[0][0]; + if (l === ":" || l === "space" || l === "comment") break; + r.prop += e.shift()[1]; + } + r.raws.between = ""; + let i; + for (; e.length;) if (i = e.shift(), i[0] === ":") { + r.raws.between += i[1]; + break; + } else i[0] === "word" && /\w/.test(i[1]) && this.unknownWord([i]), r.raws.between += i[1]; + (r.prop[0] === "_" || r.prop[0] === "*") && (r.raws.before += r.prop[0], r.prop = r.prop.slice(1)); + let o = [], u; + for (; e.length && (u = e[0][0], !(u !== "space" && u !== "comment"));) o.push(e.shift()); + this.precheckMissedSemicolon(e); + for (let l = e.length - 1; l >= 0; l--) { + if (i = e[l], i[1].toLowerCase() === "!important") { + r.important = !0; + let f = this.stringFrom(e, l); + f = this.spacesFromEnd(e) + f, f !== " !important" && (r.raws.important = f); + break; + } else if (i[1].toLowerCase() === "important") { + let f = e.slice(0), h = ""; + for (let c = l; c > 0; c--) { + let g = f[c][0]; + if (h.trim().startsWith("!") && g !== "space") break; + h = f.pop()[1] + h; + } + h.trim().startsWith("!") && (r.important = !0, r.raws.important = h, e = f); + } + if (i[0] !== "space" && i[0] !== "comment") break; + } + e.some((l) => l[0] !== "space" && l[0] !== "comment") && (r.raws.between += o.map((l) => l[1]).join(""), o = []), this.raw(r, "value", o.concat(e), s), r.value.includes(":") && !s && this.checkMissedSemicolon(e); + } + doubleColon(e) { + throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length }); + } + emptyRule(e) { + let s = new ho(); + this.init(s, e[2]), s.selector = "", s.raws.between = "", this.current = s; + } + end(e) { + this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.semicolon = !1, this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.spaces = "", this.current.parent ? (this.current.source.end = this.getPosition(e[2]), this.current.source.end.offset++, this.current = this.current.parent) : this.unexpectedClose(e); + } + endFile() { + this.current.parent && this.unclosedBlock(), this.current.nodes && this.current.nodes.length && (this.current.raws.semicolon = this.semicolon), this.current.raws.after = (this.current.raws.after || "") + this.spaces, this.root.source.end = this.getPosition(this.tokenizer.position()); + } + freeSemicolon(e) { + if (this.spaces += e[1], this.current.nodes) { + let s = this.current.nodes[this.current.nodes.length - 1]; + s && s.type === "rule" && !s.raws.ownSemicolon && (s.raws.ownSemicolon = this.spaces, this.spaces = "", s.source.end = this.getPosition(e[2]), s.source.end.offset += s.raws.ownSemicolon.length); + } + } + getPosition(e) { + let s = this.input.fromOffset(e); + return { + column: s.col, + line: s.line, + offset: e + }; + } + init(e, s) { + this.current.push(e), e.source = { + input: this.input, + start: this.getPosition(s) + }, e.raws.before = this.spaces, this.spaces = "", e.type !== "comment" && (this.semicolon = !1); + } + other(e) { + let s = !1, r = null, n = !1, i = null, o = [], u = e[1].startsWith("--"), a = [], l = e; + for (; l;) { + if (r = l[0], a.push(l), r === "(" || r === "[") i || (i = l), o.push(r === "(" ? ")" : "]"); + else if (u && n && r === "{") i || (i = l), o.push("}"); + else if (o.length === 0) if (r === ";") if (n) { + this.decl(a, u); + return; + } else break; + else if (r === "{") { + this.rule(a); + return; + } else if (r === "}") { + this.tokenizer.back(a.pop()), s = !0; + break; + } else r === ":" && (n = !0); + else r === o[o.length - 1] && (o.pop(), o.length === 0 && (i = null)); + l = this.tokenizer.nextToken(); + } + if (this.tokenizer.endOfFile() && (s = !0), o.length > 0 && this.unclosedBracket(i), s && n) { + if (!u) for (; a.length && (l = a[a.length - 1][0], !(l !== "space" && l !== "comment"));) this.tokenizer.back(a.pop()); + this.decl(a, u); + } else this.unknownWord(a); + } + parse() { + let e; + for (; !this.tokenizer.endOfFile();) switch (e = this.tokenizer.nextToken(), e[0]) { + case "space": + this.spaces += e[1]; + break; + case ";": + this.freeSemicolon(e); + break; + case "}": + this.end(e); + break; + case "comment": + this.comment(e); + break; + case "at-word": + this.atrule(e); + break; + case "{": + this.emptyRule(e); + break; + default: + this.other(e); + break; + } + this.endFile(); + } + precheckMissedSemicolon() {} + raw(e, s, r, n) { + let i, o, u = r.length, a = "", l = !0, f, h; + for (let c = 0; c < u; c += 1) i = r[c], o = i[0], o === "space" && c === u - 1 && !n ? l = !1 : o === "comment" ? (h = r[c - 1] ? r[c - 1][0] : "empty", f = r[c + 1] ? r[c + 1][0] : "empty", !mo[h] && !mo[f] ? a.slice(-1) === "," ? l = !1 : a += i[1] : l = !1) : a += i[1]; + if (!l) { + let c = r.reduce((g, b) => g + b[1], ""); + e.raws[s] = { + raw: c, + value: a + }; + } + e[s] = a; + } + rule(e) { + e.pop(); + let s = new ho(); + this.init(s, e[0][2]), s.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(s, "selector", e), this.current = s; + } + spacesAndCommentsFromEnd(e) { + let s, r = ""; + for (; e.length && (s = e[e.length - 1][0], !(s !== "space" && s !== "comment"));) r = e.pop()[1] + r; + return r; + } + spacesAndCommentsFromStart(e) { + let s, r = ""; + for (; e.length && (s = e[0][0], !(s !== "space" && s !== "comment"));) r += e.shift()[1]; + return r; + } + spacesFromEnd(e) { + let s, r = ""; + for (; e.length && (s = e[e.length - 1][0], s === "space");) r = e.pop()[1] + r; + return r; + } + stringFrom(e, s) { + let r = ""; + for (let n = s; n < e.length; n++) r += e[n][1]; + return e.splice(s, e.length - s), r; + } + unclosedBlock() { + let e = this.current.source.start; + throw this.input.error("Unclosed block", e.line, e.column); + } + unclosedBracket(e) { + throw this.input.error("Unclosed bracket", { offset: e[2] }, { offset: e[2] + 1 }); + } + unexpectedClose(e) { + throw this.input.error("Unexpected }", { offset: e[2] }, { offset: e[2] + 1 }); + } + unknownWord(e) { + throw this.input.error("Unknown word " + e[0][1], { offset: e[0][2] }, { offset: e[0][2] + e[0][1].length }); + } + unnamedAtrule(e, s) { + throw this.input.error("At-rule without name", { offset: s[2] }, { offset: s[2] + s[1].length }); + } + }; + yo.exports = vs; + }); + ht = w((Px, go) => { + "use strict"; + var sf = fe(), nf = Ue(), of = tr(); + function rr(t, e) { + let r = new of(new nf(t, e)); + try { + r.parse(); + } catch (n) { + throw n; + } + return r.root; + } + go.exports = rr; + rr.default = rr; + sf.registerParse(rr); + }); + wo = w((Rx, xs) => { + var af = er(), uf = Ue(); + xs.exports = { isInlineComment(t) { + if (t[0] === "word" && t[1].slice(0, 2) === "//") { + let e = t, s = [], r, n; + for (; t;) { + if (/\r?\n/.test(t[1])) { + if (/['"].*\r?\n/.test(t[1])) { + s.push(t[1].substring(0, t[1].indexOf(` +`))), n = t[1].substring(t[1].indexOf(` +`)); + let o = this.input.css.valueOf().substring(this.tokenizer.position()); + n += o, r = t[3] + o.length - n.length; + } else this.tokenizer.back(t); + break; + } + s.push(t[1]), r = t[2], t = this.tokenizer.nextToken({ ignoreUnclosed: !0 }); + } + let i = [ + "comment", + s.join(""), + e[2], + r + ]; + return this.inlineComment(i), n && (this.input = new uf(n), this.tokenizer = af(this.input)), !0; + } else if (t[1] === "/") { + let e = this.tokenizer.nextToken({ ignoreUnclosed: !0 }); + if (e[0] === "comment" && /^\/\*/.test(e[1])) return e[0] = "word", e[1] = e[1].slice(1), t[1] = "//", this.tokenizer.back(e), xs.exports.isInlineComment.bind(this)(t); + } + return !1; + } }; + }); + xo = w((Ix, vo) => { + vo.exports = { interpolation(t) { + let e = [t, this.tokenizer.nextToken()], s = ["word", "}"]; + if (e[0][1].length > 1 || e[1][0] !== "{") return this.tokenizer.back(e[1]), !1; + for (t = this.tokenizer.nextToken(); t && s.includes(t[0]);) e.push(t), t = this.tokenizer.nextToken(); + let r = e.map((u) => u[1]), [n] = e, i = e.pop(), o = [ + "word", + r.join(""), + n[2], + i[2] + ]; + return this.tokenizer.back(t), this.tokenizer.back(o), !0; + } }; + }); + bo = w((qx, _o) => { + var lf = /^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/, cf = /\.[0-9]/, ff = (t) => { + let [, e] = t, [s] = e; + return (s === "." || s === "#") && lf.test(e) === !1 && cf.test(e) === !1; + }; + _o.exports = { isMixinToken: ff }; + }); + So = w((Lx, Eo) => { + var pf = er(), hf = /^url\((.+)\)/; + Eo.exports = (t) => { + let { name: e, params: s = "" } = t; + if (e === "import" && s.length) { + t.import = !0; + let r = pf({ css: s }); + for (t.filename = s.replace(hf, "$1"); !r.endOfFile();) { + let [n, i] = r.nextToken(); + if (n === "word" && i === "url") return; + if (n === "brackets") { + t.options = i, t.filename = s.replace(i, "").trim(); + break; + } + } + } + }; + }); + Oo = w((Dx, Ao) => { + var ko = /:$/, To = /^:(\s+)?/; + Ao.exports = (t) => { + let { name: e, params: s = "" } = t; + if (t.name.slice(-1) === ":") { + if (ko.test(e)) { + let [r] = e.match(ko); + t.name = e.replace(r, ""), t.raws.afterName = r + (t.raws.afterName || ""), t.variable = !0, t.value = t.params; + } + if (To.test(s)) { + let [r] = s.match(To); + t.value = s.replace(r, ""), t.raws.afterName = (t.raws.afterName || "") + r, t.variable = !0; + } + } + }; + }); + Po = w((Bx, No) => { + var df = Me(), mf = tr(), { isInlineComment: yf } = wo(), { interpolation: Co } = xo(), { isMixinToken: gf } = bo(), wf = So(), vf = Oo(), xf = /(!\s*important)$/i; + No.exports = class extends mf { + constructor(...e) { + super(...e), this.lastNode = null; + } + atrule(e) { + Co.bind(this)(e) || (super.atrule(e), wf(this.lastNode), vf(this.lastNode)); + } + decl(...e) { + super.decl(...e), /extend\(.+\)/i.test(this.lastNode.value) && (this.lastNode.extend = !0); + } + each(e) { + e[0][1] = ` ${e[0][1]}`; + let s = e.findIndex((u) => u[0] === "("), r = e.reverse().find((u) => u[0] === ")"), n = e.reverse().indexOf(r), o = e.splice(s, n).map((u) => u[1]).join(""); + for (let u of e.reverse()) this.tokenizer.back(u); + this.atrule(this.tokenizer.nextToken()), this.lastNode.function = !0, this.lastNode.params = o; + } + init(e, s, r) { + super.init(e, s, r), this.lastNode = e; + } + inlineComment(e) { + let s = new df(), r = e[1].slice(2); + if (this.init(s, e[2]), s.source.end = this.getPosition(e[3] || e[2]), s.inline = !0, s.raws.begin = "//", /^\s*$/.test(r)) s.text = "", s.raws.left = r, s.raws.right = ""; + else { + let n = r.match(/^(\s*)([^]*[^\s])(\s*)$/); + [, s.raws.left, s.text, s.raws.right] = n; + } + } + mixin(e) { + let [s] = e, r = s[1].slice(0, 1), n = e.findIndex((l) => l[0] === "brackets"), i = e.findIndex((l) => l[0] === "("), o = ""; + if ((n < 0 || n > 3) && i > 0) { + let l = e.reduce((v, O, q) => O[0] === ")" ? q : v), h = e.slice(i, l + i).map((v) => v[1]).join(""), [c] = e.slice(i), g = [c[2], c[3]], [b] = e.slice(l, l + 1), d = [b[2], b[3]], p = ["brackets", h].concat(g, d), m = e.slice(0, i), y = e.slice(l + 1); + e = m, e.push(p), e = e.concat(y); + } + let u = []; + for (let l of e) if ((l[1] === "!" || u.length) && u.push(l), l[1] === "important") break; + if (u.length) { + let [l] = u, f = e.indexOf(l), h = u[u.length - 1], c = [l[2], l[3]], g = [h[4], h[5]], d = ["word", u.map((p) => p[1]).join("")].concat(c, g); + e.splice(f, u.length, d); + } + let a = e.findIndex((l) => xf.test(l[1])); + a > 0 && ([, o] = e[a], e.splice(a, 1)); + for (let l of e.reverse()) this.tokenizer.back(l); + this.atrule(this.tokenizer.nextToken()), this.lastNode.mixin = !0, this.lastNode.raws.identifier = r, o && (this.lastNode.important = !0, this.lastNode.raws.important = o); + } + other(e) { + yf.bind(this)(e) || super.other(e); + } + rule(e) { + let s = e[e.length - 1], r = e[e.length - 2]; + if (r[0] === "at-word" && s[0] === "{" && (this.tokenizer.back(s), Co.bind(this)(r))) { + let i = this.tokenizer.nextToken(); + e = e.slice(0, e.length - 2).concat([i]); + for (let o of e.reverse()) this.tokenizer.back(o); + return; + } + super.rule(e), /:extend\(.+\)/i.test(this.lastNode.selector) && (this.lastNode.extend = !0); + } + unknownWord(e) { + let [s] = e; + if (e[0][1] === "each" && e[1][0] === "(") { + this.each(e); + return; + } + if (gf(s)) { + this.mixin(e); + return; + } + super.unknownWord(e); + } + }; + }); + Io = w((Fx, Ro) => { + var _f = jt(); + Ro.exports = class extends _f { + atrule(e, s) { + if (!e.mixin && !e.variable && !e.function) { + super.atrule(e, s); + return; + } + let n = `${e.function ? "" : e.raws.identifier || "@"}${e.name}`, i = e.params ? this.rawValue(e, "params") : "", o = e.raws.important || ""; + if (e.variable && (i = e.value), typeof e.raws.afterName < "u" ? n += e.raws.afterName : i && (n += " "), e.nodes) this.block(e, n + i + o); + else { + let u = (e.raws.between || "") + o + (s ? ";" : ""); + this.builder(n + i + u, e); + } + } + comment(e) { + if (e.inline) { + let s = this.raw(e, "left", "commentLeft"), r = this.raw(e, "right", "commentRight"); + this.builder(`//${s}${e.text}${r}`, e); + } else super.comment(e); + } + }; + }); + qo = w(($x, _s) => { + var bf = Ue(), Ef = Po(), Sf = Io(); + _s.exports = { + parse(t, e) { + let s = new bf(t, e), r = new Ef(s); + return r.parse(), r.root.walk((n) => { + let i = s.css.lastIndexOf(n.source.input.css); + if (i === 0) return; + if (i + n.source.input.css.length !== s.css.length) throw new Error("Invalid state detected in postcss-less"); + let o = i + n.source.start.offset, u = s.fromOffset(i + n.source.start.offset); + if (n.source.start = { + offset: o, + line: u.line, + column: u.col + }, n.source.end) { + let a = i + n.source.end.offset, l = s.fromOffset(i + n.source.end.offset); + n.source.end = { + offset: a, + line: l.line, + column: l.col + }; + } + }), r.root; + }, + stringify(t, e) { + new Sf(e).stringify(t); + }, + nodeToString(t) { + let e = ""; + return _s.exports.stringify(t, (s) => { + e += s; + }), e; + } + }; + }); + sr = w((Wx, Mo) => { + "use strict"; + var kf = fe(), Lo, Do, be = class extends kf { + constructor(e) { + super({ + type: "document", + ...e + }), this.nodes || (this.nodes = []); + } + toResult(e = {}) { + return new Lo(new Do(), this, e).stringify(); + } + }; + be.registerLazyResult = (t) => { + Lo = t; + }; + be.registerProcessor = (t) => { + Do = t; + }; + Mo.exports = be; + be.default = be; + }); + Uo = w((Gx, Bo) => { + "use strict"; + var Tf = Qt(), Af = Me(), Of = ft(), Cf = Ue(), Nf = hs(), Pf = $e(), Rf = Xt(); + function dt(t, e) { + if (Array.isArray(t)) return t.map((n) => dt(n)); + let { inputs: s, ...r } = t; + if (s) { + e = []; + for (let n of s) { + let i = { + ...n, + __proto__: Cf.prototype + }; + i.map && (i.map = { + ...i.map, + __proto__: Nf.prototype + }), e.push(i); + } + } + if (r.nodes && (r.nodes = t.nodes.map((n) => dt(n, e))), r.source) { + let { inputId: n, ...i } = r.source; + r.source = i, n != null && (r.source.input = e[n]); + } + if (r.type === "root") return new Pf(r); + if (r.type === "decl") return new Of(r); + if (r.type === "rule") return new Rf(r); + if (r.type === "comment") return new Af(r); + if (r.type === "atrule") return new Tf(r); + throw new Error("Unknown node type: " + t.type); + } + Bo.exports = dt; + dt.default = dt; + }); + bs = w((Yx, Fo) => { + Fo.exports = class { + generate() {} + }; + }); + Es = w((zx, $o) => { + "use strict"; + var mt = class { + constructor(e, s = {}) { + if (this.type = "warning", this.text = e, s.node && s.node.source) { + let r = s.node.rangeBy(s); + this.line = r.start.line, this.column = r.start.column, this.endLine = r.end.line, this.endColumn = r.end.column; + } + for (let r in s) this[r] = s[r]; + } + toString() { + return this.node ? this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message : this.plugin ? this.plugin + ": " + this.text : this.text; + } + }; + $o.exports = mt; + mt.default = mt; + }); + nr = w((jx, Wo) => { + "use strict"; + var If = Es(), yt = class { + get content() { + return this.css; + } + constructor(e, s, r) { + this.processor = e, this.messages = [], this.root = s, this.opts = r, this.css = "", this.map = void 0; + } + toString() { + return this.css; + } + warn(e, s = {}) { + s.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (s.plugin = this.lastPlugin.postcssPlugin); + let r = new If(e, s); + return this.messages.push(r), r; + } + warnings() { + return this.messages.filter((e) => e.type === "warning"); + } + }; + Wo.exports = yt; + yt.default = yt; + }); + Ss = w((Hx, Yo) => { + "use strict"; + var Go = {}; + Yo.exports = function(e) { + Go[e] || (Go[e] = !0, typeof console < "u" && console.warn && console.warn(e)); + }; + }); + As = w((Qx, Ho) => { + "use strict"; + var qf = fe(), Lf = sr(), Df = bs(), Mf = ht(), Vo = nr(), Bf = $e(), Uf = it(), { isClean: Q, my: Ff } = Ht(); + Ss(); + var $f = { + atrule: "AtRule", + comment: "Comment", + decl: "Declaration", + document: "Document", + root: "Root", + rule: "Rule" + }, Wf = { + AtRule: !0, + AtRuleExit: !0, + Comment: !0, + CommentExit: !0, + Declaration: !0, + DeclarationExit: !0, + Document: !0, + DocumentExit: !0, + Once: !0, + OnceExit: !0, + postcssPlugin: !0, + prepare: !0, + Root: !0, + RootExit: !0, + Rule: !0, + RuleExit: !0 + }, Gf = { + Once: !0, + postcssPlugin: !0, + prepare: !0 + }, Ge = 0; + function gt(t) { + return typeof t == "object" && typeof t.then == "function"; + } + function jo(t) { + let e = !1, s = $f[t.type]; + return t.type === "decl" ? e = t.prop.toLowerCase() : t.type === "atrule" && (e = t.name.toLowerCase()), e && t.append ? [ + s, + s + "-" + e, + Ge, + s + "Exit", + s + "Exit-" + e + ] : e ? [ + s, + s + "-" + e, + s + "Exit", + s + "Exit-" + e + ] : t.append ? [ + s, + Ge, + s + "Exit" + ] : [s, s + "Exit"]; + } + function zo(t) { + let e; + return t.type === "document" ? e = [ + "Document", + Ge, + "DocumentExit" + ] : t.type === "root" ? e = [ + "Root", + Ge, + "RootExit" + ] : e = jo(t), { + eventIndex: 0, + events: e, + iterator: 0, + node: t, + visitorIndex: 0, + visitors: [] + }; + } + function ks(t) { + return t[Q] = !1, t.nodes && t.nodes.forEach((e) => ks(e)), t; + } + var Ts = {}, he = class t { + get content() { + return this.stringify().content; + } + get css() { + return this.stringify().css; + } + get map() { + return this.stringify().map; + } + get messages() { + return this.sync().messages; + } + get opts() { + return this.result.opts; + } + get processor() { + return this.result.processor; + } + get root() { + return this.sync().root; + } + get [Symbol.toStringTag]() { + return "LazyResult"; + } + constructor(e, s, r) { + this.stringified = !1, this.processed = !1; + let n; + if (typeof s == "object" && s !== null && (s.type === "root" || s.type === "document")) n = ks(s); + else if (s instanceof t || s instanceof Vo) n = ks(s.root), s.map && (typeof r.map > "u" && (r.map = {}), r.map.inline || (r.map.inline = !1), r.map.prev = s.map); + else { + let i = Mf; + r.syntax && (i = r.syntax.parse), r.parser && (i = r.parser), i.parse && (i = i.parse); + try { + n = i(s, r); + } catch (o) { + this.processed = !0, this.error = o; + } + n && !n[Ff] && qf.rebuild(n); + } + this.result = new Vo(e, n, r), this.helpers = { + ...Ts, + postcss: Ts, + result: this.result + }, this.plugins = this.processor.plugins.map((i) => typeof i == "object" && i.prepare ? { + ...i, + ...i.prepare(this.result) + } : i); + } + async() { + return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing); + } + catch(e) { + return this.async().catch(e); + } + finally(e) { + return this.async().then(e, e); + } + getAsyncError() { + throw new Error("Use process(css).then(cb) to work with async plugins"); + } + handleError(e, s) { + let r = this.result.lastPlugin; + try { + s && s.addToError(e), this.error = e, e.name === "CssSyntaxError" && !e.plugin ? (e.plugin = r.postcssPlugin, e.setMessage()) : r.postcssVersion; + } catch (n) { + console && console.error && console.error(n); + } + return e; + } + prepareVisitors() { + this.listeners = {}; + let e = (s, r, n) => { + this.listeners[r] || (this.listeners[r] = []), this.listeners[r].push([s, n]); + }; + for (let s of this.plugins) if (typeof s == "object") for (let r in s) { + if (!Wf[r] && /^[A-Z]/.test(r)) throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`); + if (!Gf[r]) if (typeof s[r] == "object") for (let n in s[r]) n === "*" ? e(s, r, s[r][n]) : e(s, r + "-" + n.toLowerCase(), s[r][n]); + else typeof s[r] == "function" && e(s, r, s[r]); + } + this.hasListener = Object.keys(this.listeners).length > 0; + } + async runAsync() { + this.plugin = 0; + for (let e = 0; e < this.plugins.length; e++) { + let s = this.plugins[e], r = this.runOnRoot(s); + if (gt(r)) try { + await r; + } catch (n) { + throw this.handleError(n); + } + } + if (this.prepareVisitors(), this.hasListener) { + let e = this.result.root; + for (; !e[Q];) { + e[Q] = !0; + let s = [zo(e)]; + for (; s.length > 0;) { + let r = this.visitTick(s); + if (gt(r)) try { + await r; + } catch (n) { + let i = s[s.length - 1].node; + throw this.handleError(n, i); + } + } + } + if (this.listeners.OnceExit) for (let [s, r] of this.listeners.OnceExit) { + this.result.lastPlugin = s; + try { + if (e.type === "document") { + let n = e.nodes.map((i) => r(i, this.helpers)); + await Promise.all(n); + } else await r(e, this.helpers); + } catch (n) { + throw this.handleError(n); + } + } + } + return this.processed = !0, this.stringify(); + } + runOnRoot(e) { + this.result.lastPlugin = e; + try { + if (typeof e == "object" && e.Once) { + if (this.result.root.type === "document") { + let s = this.result.root.nodes.map((r) => e.Once(r, this.helpers)); + return gt(s[0]) ? Promise.all(s) : s; + } + return e.Once(this.result.root, this.helpers); + } else if (typeof e == "function") return e(this.result.root, this.result); + } catch (s) { + throw this.handleError(s); + } + } + stringify() { + if (this.error) throw this.error; + if (this.stringified) return this.result; + this.stringified = !0, this.sync(); + let e = this.result.opts, s = Uf; + e.syntax && (s = e.syntax.stringify), e.stringifier && (s = e.stringifier), s.stringify && (s = s.stringify); + let n = new Df(s, this.result.root, this.result.opts).generate(); + return this.result.css = n[0], this.result.map = n[1], this.result; + } + sync() { + if (this.error) throw this.error; + if (this.processed) return this.result; + if (this.processed = !0, this.processing) throw this.getAsyncError(); + for (let e of this.plugins) if (gt(this.runOnRoot(e))) throw this.getAsyncError(); + if (this.prepareVisitors(), this.hasListener) { + let e = this.result.root; + for (; !e[Q];) e[Q] = !0, this.walkSync(e); + if (this.listeners.OnceExit) if (e.type === "document") for (let s of e.nodes) this.visitSync(this.listeners.OnceExit, s); + else this.visitSync(this.listeners.OnceExit, e); + } + return this.result; + } + then(e, s) { + return this.async().then(e, s); + } + toString() { + return this.css; + } + visitSync(e, s) { + for (let [r, n] of e) { + this.result.lastPlugin = r; + let i; + try { + i = n(s, this.helpers); + } catch (o) { + throw this.handleError(o, s.proxyOf); + } + if (s.type !== "root" && s.type !== "document" && !s.parent) return !0; + if (gt(i)) throw this.getAsyncError(); + } + } + visitTick(e) { + let s = e[e.length - 1], { node: r, visitors: n } = s; + if (r.type !== "root" && r.type !== "document" && !r.parent) { + e.pop(); + return; + } + if (n.length > 0 && s.visitorIndex < n.length) { + let [o, u] = n[s.visitorIndex]; + s.visitorIndex += 1, s.visitorIndex === n.length && (s.visitors = [], s.visitorIndex = 0), this.result.lastPlugin = o; + try { + return u(r.toProxy(), this.helpers); + } catch (a) { + throw this.handleError(a, r); + } + } + if (s.iterator !== 0) { + let o = s.iterator, u; + for (; u = r.nodes[r.indexes[o]];) if (r.indexes[o] += 1, !u[Q]) { + u[Q] = !0, e.push(zo(u)); + return; + } + s.iterator = 0, delete r.indexes[o]; + } + let i = s.events; + for (; s.eventIndex < i.length;) { + let o = i[s.eventIndex]; + if (s.eventIndex += 1, o === Ge) { + r.nodes && r.nodes.length && (r[Q] = !0, s.iterator = r.getIterator()); + return; + } else if (this.listeners[o]) { + s.visitors = this.listeners[o]; + return; + } + } + e.pop(); + } + walkSync(e) { + e[Q] = !0; + let s = jo(e); + for (let r of s) if (r === Ge) e.nodes && e.each((n) => { + n[Q] || this.walkSync(n); + }); + else { + let n = this.listeners[r]; + if (n && this.visitSync(n, e.toProxy())) return; + } + } + warnings() { + return this.sync().warnings(); + } + }; + he.registerPostcss = (t) => { + Ts = t; + }; + Ho.exports = he; + he.default = he; + Bf.registerLazyResult(he); + Lf.registerLazyResult(he); + }); + Qo = w((Jx, Ko) => { + "use strict"; + var Yf = bs(), Vf = ht(), zf = nr(), jf = it(); + Ss(); + var wt = class { + get content() { + return this.result.css; + } + get css() { + return this.result.css; + } + get map() { + return this.result.map; + } + get messages() { + return []; + } + get opts() { + return this.result.opts; + } + get processor() { + return this.result.processor; + } + get root() { + if (this._root) return this._root; + let e, s = Vf; + try { + e = s(this._css, this._opts); + } catch (r) { + this.error = r; + } + if (this.error) throw this.error; + return this._root = e, e; + } + get [Symbol.toStringTag]() { + return "NoWorkResult"; + } + constructor(e, s, r) { + s = s.toString(), this.stringified = !1, this._processor = e, this._css = s, this._opts = r, this._map = void 0; + let n, i = jf; + this.result = new zf(this._processor, n, this._opts), this.result.css = s; + let o = this; + Object.defineProperty(this.result, "root", { get() { + return o.root; + } }); + let u = new Yf(i, n, this._opts, s); + if (u.isMap()) { + let [a, l] = u.generate(); + a && (this.result.css = a), l && (this.result.map = l); + } else u.clearAnnotation(), this.result.css = u.css; + } + async() { + return this.error ? Promise.reject(this.error) : Promise.resolve(this.result); + } + catch(e) { + return this.async().catch(e); + } + finally(e) { + return this.async().then(e, e); + } + sync() { + if (this.error) throw this.error; + return this.result; + } + then(e, s) { + return this.async().then(e, s); + } + toString() { + return this._css; + } + warnings() { + return []; + } + }; + Ko.exports = wt; + wt.default = wt; + }); + Jo = w((Zx, Xo) => { + "use strict"; + var Hf = sr(), Kf = As(), Qf = Qo(), Xf = $e(), Ee = class { + constructor(e = []) { + this.version = "8.5.6", this.plugins = this.normalize(e); + } + normalize(e) { + let s = []; + for (let r of e) if (r.postcss === !0 ? r = r() : r.postcss && (r = r.postcss), typeof r == "object" && Array.isArray(r.plugins)) s = s.concat(r.plugins); + else if (typeof r == "object" && r.postcssPlugin) s.push(r); + else if (typeof r == "function") s.push(r); + else if (!(typeof r == "object" && (r.parse || r.stringify))) throw new Error(r + " is not a PostCSS plugin"); + return s; + } + process(e, s = {}) { + return !this.plugins.length && !s.parser && !s.stringifier && !s.syntax ? new Qf(this, e, s) : new Kf(this, e, s); + } + use(e) { + return this.plugins = this.plugins.concat(this.normalize([e])), this; + } + }; + Xo.exports = Ee; + Ee.default = Ee; + Xf.registerProcessor(Ee); + Hf.registerProcessor(Ee); + }); + ir = w((e_, ia) => { + "use strict"; + var Zo = Qt(), ea = Me(), Jf = fe(), Zf = zt(), ta = ft(), ra = sr(), ep = Uo(), tp = Ue(), rp = As(), sp = ws(), np = ut(), ip = ht(), Os = Jo(), op = nr(), sa = $e(), na = Xt(), ap = it(), up = Es(); + function S(...t) { + return t.length === 1 && Array.isArray(t[0]) && (t = t[0]), new Os(t); + } + S.plugin = function(e, s) { + let r = !1; + function n(...o) { + console && console.warn && !r && (r = !0, console.warn(e + `: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`)); + let u = s(...o); + return u.postcssPlugin = e, u.postcssVersion = new Os().version, u; + } + let i; + return Object.defineProperty(n, "postcss", { get() { + return i || (i = n()), i; + } }), n.process = function(o, u, a) { + return S([n(a)]).process(o, u); + }, n; + }; + S.stringify = ap; + S.parse = ip; + S.fromJSON = ep; + S.list = sp; + S.comment = (t) => new ea(t); + S.atRule = (t) => new Zo(t); + S.decl = (t) => new ta(t); + S.rule = (t) => new na(t); + S.root = (t) => new sa(t); + S.document = (t) => new ra(t); + S.CssSyntaxError = Zf; + S.Declaration = ta; + S.Container = Jf; + S.Processor = Os; + S.Document = ra; + S.Comment = ea; + S.Warning = up; + S.AtRule = Zo; + S.Result = op; + S.Input = tp; + S.Rule = na; + S.Root = sa; + S.Node = np; + rp.registerPostcss(S); + ia.exports = S; + S.default = S; + }); + aa = w((t_, oa) => { + var { Container: lp } = ir(), Cs = class extends lp { + constructor(e) { + super(e), this.type = "decl", this.isNested = !0, this.nodes || (this.nodes = []); + } + }; + oa.exports = Cs; + }); + ca = w((r_, la) => { + "use strict"; + var or = /[\t\n\f\r "#'()/;[\\\]{}]/g, ar = /[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, cp = /.[\r\n"'(/\\]/, ua = /[\da-f]/i, ur = /[\n\f\r]/g; + la.exports = function(e, s = {}) { + let r = e.css.valueOf(), n = s.ignoreErrors, i, o, u, a, l, f, h, c, g, b = r.length, d = 0, p = [], m = [], y; + function v() { + return d; + } + function O(A) { + throw e.error("Unclosed " + A, d); + } + function q() { + return m.length === 0 && d >= b; + } + function H() { + let A = 1, k = !1, N = !1; + for (; A > 0;) o += 1, r.length <= o && O("interpolation"), i = r.charCodeAt(o), c = r.charCodeAt(o + 1), k ? !N && i === k ? (k = !1, N = !1) : i === 92 ? N = !N : N && (N = !1) : i === 39 || i === 34 ? k = i : i === 125 ? A -= 1 : i === 35 && c === 123 && (A += 1); + } + function ne(A) { + if (m.length) return m.pop(); + if (d >= b) return; + let k = A ? A.ignoreUnclosed : !1; + switch (i = r.charCodeAt(d), i) { + case 10: + case 32: + case 9: + case 13: + case 12: + o = d; + do + o += 1, i = r.charCodeAt(o); + while (i === 32 || i === 10 || i === 9 || i === 13 || i === 12); + g = ["space", r.slice(d, o)], d = o - 1; + break; + case 91: + case 93: + case 123: + case 125: + case 58: + case 59: + case 41: { + let N = String.fromCharCode(i); + g = [ + N, + N, + d + ]; + break; + } + case 44: + g = [ + "word", + ",", + d, + d + 1 + ]; + break; + case 40: + if (h = p.length ? p.pop()[1] : "", c = r.charCodeAt(d + 1), h === "url" && c !== 39 && c !== 34) { + for (y = 1, f = !1, o = d + 1; o <= r.length - 1;) { + if (c = r.charCodeAt(o), c === 92) f = !f; + else if (c === 40) y += 1; + else if (c === 41 && (y -= 1, y === 0)) break; + o += 1; + } + a = r.slice(d, o + 1), g = [ + "brackets", + a, + d, + o + ], d = o; + } else o = r.indexOf(")", d + 1), a = r.slice(d, o + 1), o === -1 || cp.test(a) ? g = [ + "(", + "(", + d + ] : (g = [ + "brackets", + a, + d, + o + ], d = o); + break; + case 39: + case 34: + for (u = i, o = d, f = !1; o < b && (o++, o === b && O("string"), i = r.charCodeAt(o), c = r.charCodeAt(o + 1), !(!f && i === u));) i === 92 ? f = !f : f ? f = !1 : i === 35 && c === 123 && H(); + g = [ + "string", + r.slice(d, o + 1), + d, + o + ], d = o; + break; + case 64: + or.lastIndex = d + 1, or.test(r), or.lastIndex === 0 ? o = r.length - 1 : o = or.lastIndex - 2, g = [ + "at-word", + r.slice(d, o + 1), + d, + o + ], d = o; + break; + case 92: + for (o = d, l = !0; r.charCodeAt(o + 1) === 92;) o += 1, l = !l; + if (i = r.charCodeAt(o + 1), l && i !== 47 && i !== 32 && i !== 10 && i !== 9 && i !== 13 && i !== 12 && (o += 1, ua.test(r.charAt(o)))) { + for (; ua.test(r.charAt(o + 1));) o += 1; + r.charCodeAt(o + 1) === 32 && (o += 1); + } + g = [ + "word", + r.slice(d, o + 1), + d, + o + ], d = o; + break; + default: + c = r.charCodeAt(d + 1), i === 35 && c === 123 ? (o = d, H(), a = r.slice(d, o + 1), g = [ + "word", + a, + d, + o + ], d = o) : i === 47 && c === 42 ? (o = r.indexOf("*/", d + 2) + 1, o === 0 && (n || k ? o = r.length : O("comment")), g = [ + "comment", + r.slice(d, o + 1), + d, + o + ], d = o) : i === 47 && c === 47 ? (ur.lastIndex = d + 1, ur.test(r), ur.lastIndex === 0 ? o = r.length - 1 : o = ur.lastIndex - 2, a = r.slice(d, o + 1), g = [ + "comment", + a, + d, + o, + "inline" + ], d = o) : (ar.lastIndex = d + 1, ar.test(r), ar.lastIndex === 0 ? o = r.length - 1 : o = ar.lastIndex - 2, g = [ + "word", + r.slice(d, o + 1), + d, + o + ], p.push(g), d = o); + break; + } + return d++, g; + } + function W(A) { + m.push(A); + } + return { + back: W, + endOfFile: q, + nextToken: ne, + position: v + }; + }; + }); + pa = w((s_, fa) => { + var { Comment: fp } = ir(), pp = tr(), hp = aa(), dp = ca(), Ns = class extends pp { + atrule(e) { + let s = e[1], r = e; + for (; !this.tokenizer.endOfFile();) { + let n = this.tokenizer.nextToken(); + if (n[0] === "word" && n[2] === r[3] + 1) s += n[1], r = n; + else { + this.tokenizer.back(n); + break; + } + } + super.atrule([ + "at-word", + s, + e[2], + r[3] + ]); + } + comment(e) { + if (e[4] === "inline") { + let s = new fp(); + this.init(s, e[2]), s.raws.inline = !0; + let r = this.input.fromOffset(e[3]); + s.source.end = { + column: r.col, + line: r.line, + offset: e[3] + 1 + }; + let n = e[1].slice(2); + if (/^\s*$/.test(n)) s.text = "", s.raws.left = n, s.raws.right = ""; + else { + let i = n.match(/^(\s*)([^]*\S)(\s*)$/); + s.text = i[2].replace(/(\*\/|\/\*)/g, "*//*"), s.raws.left = i[1], s.raws.right = i[3], s.raws.text = i[2]; + } + } else super.comment(e); + } + createTokenizer() { + this.tokenizer = dp(this.input); + } + raw(e, s, r, n) { + if (super.raw(e, s, r, n), e.raws[s]) { + let i = e.raws[s].raw; + e.raws[s].raw = r.reduce((o, u) => { + if (u[0] === "comment" && u[4] === "inline") { + let a = u[1].slice(2).replace(/(\*\/|\/\*)/g, "*//*"); + return o + "/*" + a + "*/"; + } else return o + u[1]; + }, ""), i !== e.raws[s].raw && (e.raws[s].scss = i); + } + } + rule(e) { + let s = !1, r = 0, n = ""; + for (let i of e) if (s) i[0] !== "comment" && i[0] !== "{" && (n += i[1]); + else { + if (i[0] === "space" && i[1].includes(` +`)) break; + i[0] === "(" ? r += 1 : i[0] === ")" ? r -= 1 : r === 0 && i[0] === ":" && (s = !0); + } + if (!s || n.trim() === "" || /^[#:A-Za-z-]/.test(n)) super.rule(e); + else { + e.pop(); + let i = new hp(); + this.init(i, e[0][2]); + let o; + for (let a = e.length - 1; a >= 0; a--) if (e[a][0] !== "space") { + o = e[a]; + break; + } + if (o[3]) { + let a = this.input.fromOffset(o[3]); + i.source.end = { + column: a.col, + line: a.line, + offset: o[3] + 1 + }; + } else { + let a = this.input.fromOffset(o[2]); + i.source.end = { + column: a.col, + line: a.line, + offset: o[2] + 1 + }; + } + for (; e[0][0] !== "word";) i.raws.before += e.shift()[1]; + if (e[0][2]) { + let a = this.input.fromOffset(e[0][2]); + i.source.start = { + column: a.col, + line: a.line, + offset: e[0][2] + }; + } + for (i.prop = ""; e.length;) { + let a = e[0][0]; + if (a === ":" || a === "space" || a === "comment") break; + i.prop += e.shift()[1]; + } + i.raws.between = ""; + let u; + for (; e.length;) if (u = e.shift(), u[0] === ":") { + i.raws.between += u[1]; + break; + } else i.raws.between += u[1]; + (i.prop[0] === "_" || i.prop[0] === "*") && (i.raws.before += i.prop[0], i.prop = i.prop.slice(1)), i.raws.between += this.spacesAndCommentsFromStart(e), this.precheckMissedSemicolon(e); + for (let a = e.length - 1; a > 0; a--) { + if (u = e[a], u[1] === "!important") { + i.important = !0; + let l = this.stringFrom(e, a); + l = this.spacesFromEnd(e) + l, l !== " !important" && (i.raws.important = l); + break; + } else if (u[1] === "important") { + let l = e.slice(0), f = ""; + for (let h = a; h > 0; h--) { + let c = l[h][0]; + if (f.trim().indexOf("!") === 0 && c !== "space") break; + f = l.pop()[1] + f; + } + f.trim().indexOf("!") === 0 && (i.important = !0, i.raws.important = f, e = l); + } + if (u[0] !== "space" && u[0] !== "comment") break; + } + this.raw(i, "value", e), i.value.includes(":") && this.checkMissedSemicolon(e), this.current = i; + } + } + }; + fa.exports = Ns; + }); + da = w((n_, ha) => { + var { Input: mp } = ir(), yp = pa(); + ha.exports = function(e, s) { + let n = new yp(new mp(e, s)); + return n.parse(), n.root; + }; + }); + Rs = w((Ps) => { + "use strict"; + Object.defineProperty(Ps, "__esModule", { value: !0 }); + function vp(t) { + this.after = t.after, this.before = t.before, this.type = t.type, this.value = t.value, this.sourceIndex = t.sourceIndex; + } + Ps.default = vp; + }); + qs = w((Is) => { + "use strict"; + Object.defineProperty(Is, "__esModule", { value: !0 }); + var ya = _p(Rs()); + function _p(t) { + return t && t.__esModule ? t : { default: t }; + } + function vt(t) { + var e = this; + this.constructor(t), this.nodes = t.nodes, this.after === void 0 && (this.after = this.nodes.length > 0 ? this.nodes[this.nodes.length - 1].after : ""), this.before === void 0 && (this.before = this.nodes.length > 0 ? this.nodes[0].before : ""), this.sourceIndex === void 0 && (this.sourceIndex = this.before.length), this.nodes.forEach(function(s) { + s.parent = e; + }); + } + vt.prototype = Object.create(ya.default.prototype); + vt.constructor = ya.default; + vt.prototype.walk = function(e, s) { + for (var r = typeof e == "string" || e instanceof RegExp, n = r ? s : e, i = typeof e == "string" ? new RegExp(e) : e, o = 0; o < this.nodes.length; o++) { + var u = this.nodes[o]; + if ((r ? i.test(u.type) : !0) && n && n(u, o, this.nodes) === !1 || u.nodes && u.walk(e, s) === !1) return !1; + } + return !0; + }; + vt.prototype.each = function() { + for (var e = arguments.length <= 0 || arguments[0] === void 0 ? function() {} : arguments[0], s = 0; s < this.nodes.length; s++) { + var r = this.nodes[s]; + if (e(r, s, this.nodes) === !1) return !1; + } + return !0; + }; + Is.default = vt; + }); + xa = w((xt) => { + "use strict"; + Object.defineProperty(xt, "__esModule", { value: !0 }); + xt.parseMediaFeature = va; + xt.parseMediaQuery = Ds; + xt.parseMediaList = Sp; + var ga = wa(Rs()), Ls = wa(qs()); + function wa(t) { + return t && t.__esModule ? t : { default: t }; + } + function va(t) { + var e = arguments.length <= 1 || arguments[1] === void 0 ? 0 : arguments[1], s = [{ + mode: "normal", + character: null + }], r = [], n = 0, i = "", o = null, u = null, a = e, l = t; + t[0] === "(" && t[t.length - 1] === ")" && (l = t.substring(1, t.length - 1), a++); + for (var f = 0; f < l.length; f++) { + var h = l[f]; + if ((h === "'" || h === "\"") && (s[n].isCalculationEnabled === !0 ? (s.push({ + mode: "string", + isCalculationEnabled: !1, + character: h + }), n++) : s[n].mode === "string" && s[n].character === h && l[f - 1] !== "\\" && (s.pop(), n--)), h === "{" ? (s.push({ + mode: "interpolation", + isCalculationEnabled: !0 + }), n++) : h === "}" && (s.pop(), n--), s[n].mode === "normal" && h === ":") { + var c = l.substring(f + 1); + u = { + type: "value", + before: /^(\s*)/.exec(c)[1], + after: /(\s*)$/.exec(c)[1], + value: c.trim() + }, u.sourceIndex = u.before.length + f + 1 + a, o = { + type: "colon", + sourceIndex: f + a, + after: u.before, + value: ":" + }; + break; + } + i += h; + } + return i = { + type: "media-feature", + before: /^(\s*)/.exec(i)[1], + after: /(\s*)$/.exec(i)[1], + value: i.trim() + }, i.sourceIndex = i.before.length + a, r.push(i), o !== null && (o.before = i.after, r.push(o)), u !== null && r.push(u), r; + } + function Ds(t) { + var e = arguments.length <= 1 || arguments[1] === void 0 ? 0 : arguments[1], s = [], r = 0, n = !1, i = void 0; + function o() { + return { + before: "", + after: "", + value: "" + }; + } + i = o(); + for (var u = 0; u < t.length; u++) { + var a = t[u]; + n ? (i.value += a, (a === "{" || a === "(") && r++, (a === ")" || a === "}") && r--) : a.search(/\s/) !== -1 ? i.before += a : (a === "(" && (i.type = "media-feature-expression", r++), i.value = a, i.sourceIndex = e + u, n = !0), n && r === 0 && (a === ")" || u === t.length - 1 || t[u + 1].search(/\s/) !== -1) && ([ + "not", + "only", + "and" + ].indexOf(i.value) !== -1 && (i.type = "keyword"), i.type === "media-feature-expression" && (i.nodes = va(i.value, i.sourceIndex)), s.push(Array.isArray(i.nodes) ? new Ls.default(i) : new ga.default(i)), i = o(), n = !1); + } + for (var l = 0; l < s.length; l++) if (i = s[l], l > 0 && (s[l - 1].after = i.before), i.type === void 0) { + if (l > 0) { + if (s[l - 1].type === "media-feature-expression") { + i.type = "keyword"; + continue; + } + if (s[l - 1].value === "not" || s[l - 1].value === "only") { + i.type = "media-type"; + continue; + } + if (s[l - 1].value === "and") { + i.type = "media-feature-expression"; + continue; + } + s[l - 1].type === "media-type" && (s[l + 1] ? i.type = s[l + 1].type === "media-feature-expression" ? "keyword" : "media-feature-expression" : i.type = "media-feature-expression"); + } + if (l === 0) { + if (!s[l + 1]) { + i.type = "media-type"; + continue; + } + if (s[l + 1] && (s[l + 1].type === "media-feature-expression" || s[l + 1].type === "keyword")) { + i.type = "media-type"; + continue; + } + if (s[l + 2]) { + if (s[l + 2].type === "media-feature-expression") { + i.type = "media-type", s[l + 1].type = "keyword"; + continue; + } + if (s[l + 2].type === "keyword") { + i.type = "keyword", s[l + 1].type = "media-type"; + continue; + } + } + if (s[l + 3] && s[l + 3].type === "media-feature-expression") { + i.type = "keyword", s[l + 1].type = "media-type", s[l + 2].type = "keyword"; + continue; + } + } + } + return s; + } + function Sp(t) { + var e = [], s = 0, r = 0, n = /^(\s*)url\s*\(/.exec(t); + if (n !== null) { + for (var i = n[0].length, o = 1; o > 0;) { + var u = t[i]; + u === "(" && o++, u === ")" && o--, i++; + } + e.unshift(new ga.default({ + type: "url", + value: t.substring(0, i).trim(), + sourceIndex: n[1].length, + before: n[1], + after: /^(\s*)/.exec(t.substring(i))[1] + })), s = i; + } + for (var a = s; a < t.length; a++) { + var l = t[a]; + if (l === "(" && r++, l === ")" && r--, r === 0 && l === ",") { + var f = t.substring(s, a), h = /^(\s*)/.exec(f)[1]; + e.push(new Ls.default({ + type: "media-query", + value: f.trim(), + sourceIndex: s + h.length, + nodes: Ds(f, s), + before: h, + after: /(\s*)$/.exec(f)[1] + })), s = a + 1; + } + } + var c = t.substring(s), g = /^(\s*)/.exec(c)[1]; + return e.push(new Ls.default({ + type: "media-query", + value: c.trim(), + sourceIndex: s + g.length, + nodes: Ds(c, s), + before: g, + after: /(\s*)$/.exec(c)[1] + })), e; + } + }); + _a = w((Ms) => { + "use strict"; + Object.defineProperty(Ms, "__esModule", { value: !0 }); + Ms.default = Cp; + var Tp = Op(qs()), Ap = xa(); + function Op(t) { + return t && t.__esModule ? t : { default: t }; + } + function Cp(t) { + return new Tp.default({ + nodes: (0, Ap.parseMediaList)(t), + type: "media-query-list", + value: t.trim() + }); + } + }); + Us = w((m_, Sa) => { + Sa.exports = function(e, s) { + if (s = typeof s == "number" ? s : Infinity, !s) return Array.isArray(e) ? e.map(function(n) { + return n; + }) : e; + return r(e, 1); + function r(n, i) { + return n.reduce(function(o, u) { + return Array.isArray(u) && i < s ? o.concat(r(u, i + 1)) : o.concat(u); + }, []); + } + }; + }); + Fs = w((y_, ka) => { + ka.exports = function(t, e) { + for (var s = -1, r = []; (s = t.indexOf(e, s + 1)) !== -1;) r.push(s); + return r; + }; + }); + $s = w((g_, Ta) => { + "use strict"; + function Rp(t, e) { + for (var s = 1, r = t.length, n = t[0], i = t[0], o = 1; o < r; ++o) if (i = n, n = t[o], e(n, i)) { + if (o === s) { + s++; + continue; + } + t[s++] = n; + } + return t.length = s, t; + } + function Ip(t) { + for (var e = 1, s = t.length, r = t[0], n = t[0], i = 1; i < s; ++i, n = r) if (n = r, r = t[i], r !== n) { + if (i === e) { + e++; + continue; + } + t[e++] = r; + } + return t.length = e, t; + } + function qp(t, e, s) { + return t.length === 0 ? t : e ? (s || t.sort(e), Rp(t, e)) : (s || t.sort(), Ip(t)); + } + Ta.exports = qp; + }); + ke = w((lr, Oa) => { + "use strict"; + lr.__esModule = !0; + var Aa = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { + return typeof t; + } : function(t) { + return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; + }; + function Lp(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + var Dp = function t(e, s) { + if ((typeof e > "u" ? "undefined" : Aa(e)) !== "object") return e; + var r = new e.constructor(); + for (var n in e) if (e.hasOwnProperty(n)) { + var i = e[n], o = typeof i > "u" ? "undefined" : Aa(i); + n === "parent" && o === "object" ? s && (r[n] = s) : i instanceof Array ? r[n] = i.map(function(u) { + return t(u, r); + }) : r[n] = t(i, r); + } + return r; + }; + lr.default = (function() { + function t() { + var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + Lp(this, t); + for (var s in e) this[s] = e[s]; + var r = e.spaces; + r = r === void 0 ? {} : r; + var n = r.before, i = n === void 0 ? "" : n, o = r.after, u = o === void 0 ? "" : o; + this.spaces = { + before: i, + after: u + }; + } + return t.prototype.remove = function() { + return this.parent && this.parent.removeChild(this), this.parent = void 0, this; + }, t.prototype.replaceWith = function() { + if (this.parent) { + for (var s in arguments) this.parent.insertBefore(this, arguments[s]); + this.remove(); + } + return this; + }, t.prototype.next = function() { + return this.parent.at(this.parent.index(this) + 1); + }, t.prototype.prev = function() { + return this.parent.at(this.parent.index(this) - 1); + }, t.prototype.clone = function() { + var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = Dp(this); + for (var n in s) r[n] = s[n]; + return r; + }, t.prototype.toString = function() { + return [ + this.spaces.before, + String(this.value), + this.spaces.after + ].join(""); + }, t; + })(); + Oa.exports = lr.default; + }); + B = w((U) => { + "use strict"; + U.__esModule = !0; + U.TAG = "tag"; + U.STRING = "string"; + U.SELECTOR = "selector"; + U.ROOT = "root"; + U.PSEUDO = "pseudo"; + U.NESTING = "nesting"; + U.ID = "id"; + U.COMMENT = "comment"; + U.COMBINATOR = "combinator"; + U.CLASS = "class"; + U.ATTRIBUTE = "attribute"; + U.UNIVERSAL = "universal"; + }); + fr = w((cr, Ca) => { + "use strict"; + cr.__esModule = !0; + var Bp = (function() { + function t(e, s) { + for (var r = 0; r < s.length; r++) { + var n = s[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); + } + } + return function(e, s, r) { + return s && t(e.prototype, s), r && t(e, r), e; + }; + })(), Fp = Gp(ke()), re = Wp(B()); + function Wp(t) { + if (t && t.__esModule) return t; + var e = {}; + if (t != null) for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]); + return e.default = t, e; + } + function Gp(t) { + return t && t.__esModule ? t : { default: t }; + } + function Yp(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Vp(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function zp(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + cr.default = (function(t) { + zp(e, t); + function e(s) { + Yp(this, e); + var r = Vp(this, t.call(this, s)); + return r.nodes || (r.nodes = []), r; + } + return e.prototype.append = function(r) { + return r.parent = this, this.nodes.push(r), this; + }, e.prototype.prepend = function(r) { + return r.parent = this, this.nodes.unshift(r), this; + }, e.prototype.at = function(r) { + return this.nodes[r]; + }, e.prototype.index = function(r) { + return typeof r == "number" ? r : this.nodes.indexOf(r); + }, e.prototype.removeChild = function(r) { + r = this.index(r), this.at(r).parent = void 0, this.nodes.splice(r, 1); + var n = void 0; + for (var i in this.indexes) n = this.indexes[i], n >= r && (this.indexes[i] = n - 1); + return this; + }, e.prototype.removeAll = function() { + for (var i = this.nodes, r = Array.isArray(i), n = 0, i = r ? i : i[Symbol.iterator]();;) { + var o; + if (r) { + if (n >= i.length) break; + o = i[n++]; + } else { + if (n = i.next(), n.done) break; + o = n.value; + } + var u = o; + u.parent = void 0; + } + return this.nodes = [], this; + }, e.prototype.empty = function() { + return this.removeAll(); + }, e.prototype.insertAfter = function(r, n) { + var i = this.index(r); + this.nodes.splice(i + 1, 0, n); + var o = void 0; + for (var u in this.indexes) o = this.indexes[u], i <= o && (this.indexes[u] = o + this.nodes.length); + return this; + }, e.prototype.insertBefore = function(r, n) { + var i = this.index(r); + this.nodes.splice(i, 0, n); + var o = void 0; + for (var u in this.indexes) o = this.indexes[u], i <= o && (this.indexes[u] = o + this.nodes.length); + return this; + }, e.prototype.each = function(r) { + this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach++; + var n = this.lastEach; + if (this.indexes[n] = 0, !!this.length) { + for (var i = void 0, o = void 0; this.indexes[n] < this.length && (i = this.indexes[n], o = r(this.at(i), i), o !== !1);) this.indexes[n] += 1; + if (delete this.indexes[n], o === !1) return !1; + } + }, e.prototype.walk = function(r) { + return this.each(function(n, i) { + var o = r(n, i); + if (o !== !1 && n.length && (o = n.walk(r)), o === !1) return !1; + }); + }, e.prototype.walkAttributes = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.ATTRIBUTE) return r.call(n, i); + }); + }, e.prototype.walkClasses = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.CLASS) return r.call(n, i); + }); + }, e.prototype.walkCombinators = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.COMBINATOR) return r.call(n, i); + }); + }, e.prototype.walkComments = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.COMMENT) return r.call(n, i); + }); + }, e.prototype.walkIds = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.ID) return r.call(n, i); + }); + }, e.prototype.walkNesting = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.NESTING) return r.call(n, i); + }); + }, e.prototype.walkPseudos = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.PSEUDO) return r.call(n, i); + }); + }, e.prototype.walkTags = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.TAG) return r.call(n, i); + }); + }, e.prototype.walkUniversals = function(r) { + var n = this; + return this.walk(function(i) { + if (i.type === re.UNIVERSAL) return r.call(n, i); + }); + }, e.prototype.split = function(r) { + var n = this, i = []; + return this.reduce(function(o, u, a) { + var l = r.call(n, u); + return i.push(u), l ? (o.push(i), i = []) : a === n.length - 1 && o.push(i), o; + }, []); + }, e.prototype.map = function(r) { + return this.nodes.map(r); + }, e.prototype.reduce = function(r, n) { + return this.nodes.reduce(r, n); + }, e.prototype.every = function(r) { + return this.nodes.every(r); + }, e.prototype.some = function(r) { + return this.nodes.some(r); + }, e.prototype.filter = function(r) { + return this.nodes.filter(r); + }, e.prototype.sort = function(r) { + return this.nodes.sort(r); + }, e.prototype.toString = function() { + return this.map(String).join(""); + }, Bp(e, [ + { + key: "first", + get: function() { + return this.at(0); + } + }, + { + key: "last", + get: function() { + return this.at(this.length - 1); + } + }, + { + key: "length", + get: function() { + return this.nodes.length; + } + } + ]), e; + })(Fp.default); + Ca.exports = cr.default; + }); + Pa = w((pr, Na) => { + "use strict"; + pr.__esModule = !0; + var Kp = Xp(fr()), Qp = B(); + function Xp(t) { + return t && t.__esModule ? t : { default: t }; + } + function Jp(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Zp(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function eh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + pr.default = (function(t) { + eh(e, t); + function e(s) { + Jp(this, e); + var r = Zp(this, t.call(this, s)); + return r.type = Qp.ROOT, r; + } + return e.prototype.toString = function() { + var r = this.reduce(function(n, i) { + var o = String(i); + return o ? n + o + "," : ""; + }, "").slice(0, -1); + return this.trailingComma ? r + "," : r; + }, e; + })(Kp.default); + Na.exports = pr.default; + }); + Ia = w((hr, Ra) => { + "use strict"; + hr.__esModule = !0; + var sh = ih(fr()), nh = B(); + function ih(t) { + return t && t.__esModule ? t : { default: t }; + } + function oh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function ah(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function uh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + hr.default = (function(t) { + uh(e, t); + function e(s) { + oh(this, e); + var r = ah(this, t.call(this, s)); + return r.type = nh.SELECTOR, r; + } + return e; + })(sh.default); + Ra.exports = hr.default; + }); + Ye = w((dr, qa) => { + "use strict"; + dr.__esModule = !0; + var ch = (function() { + function t(e, s) { + for (var r = 0; r < s.length; r++) { + var n = s[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); + } + } + return function(e, s, r) { + return s && t(e.prototype, s), r && t(e, r), e; + }; + })(), ph = hh(ke()); + function hh(t) { + return t && t.__esModule ? t : { default: t }; + } + function dh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function mh(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function yh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + dr.default = (function(t) { + yh(e, t); + function e() { + return dh(this, e), mh(this, t.apply(this, arguments)); + } + return e.prototype.toString = function() { + return [ + this.spaces.before, + this.ns, + String(this.value), + this.spaces.after + ].join(""); + }, ch(e, [{ + key: "ns", + get: function() { + var r = this.namespace; + return r ? (typeof r == "string" ? r : "") + "|" : ""; + } + }]), e; + })(ph.default); + qa.exports = dr.default; + }); + Da = w((mr, La) => { + "use strict"; + mr.__esModule = !0; + var vh = _h(Ye()), xh = B(); + function _h(t) { + return t && t.__esModule ? t : { default: t }; + } + function bh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Eh(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Sh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + mr.default = (function(t) { + Sh(e, t); + function e(s) { + bh(this, e); + var r = Eh(this, t.call(this, s)); + return r.type = xh.CLASS, r; + } + return e.prototype.toString = function() { + return [ + this.spaces.before, + this.ns, + "." + this.value, + this.spaces.after + ].join(""); + }, e; + })(vh.default); + La.exports = mr.default; + }); + Ba = w((yr, Ma) => { + "use strict"; + yr.__esModule = !0; + var Ah = Ch(ke()), Oh = B(); + function Ch(t) { + return t && t.__esModule ? t : { default: t }; + } + function Nh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Ph(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Rh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + yr.default = (function(t) { + Rh(e, t); + function e(s) { + Nh(this, e); + var r = Ph(this, t.call(this, s)); + return r.type = Oh.COMMENT, r; + } + return e; + })(Ah.default); + Ma.exports = yr.default; + }); + Fa = w((gr, Ua) => { + "use strict"; + gr.__esModule = !0; + var Lh = Mh(Ye()), Dh = B(); + function Mh(t) { + return t && t.__esModule ? t : { default: t }; + } + function Bh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Uh(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Fh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + gr.default = (function(t) { + Fh(e, t); + function e(s) { + Bh(this, e); + var r = Uh(this, t.call(this, s)); + return r.type = Dh.ID, r; + } + return e.prototype.toString = function() { + return [ + this.spaces.before, + this.ns, + "#" + this.value, + this.spaces.after + ].join(""); + }, e; + })(Lh.default); + Ua.exports = gr.default; + }); + Wa = w((wr, $a) => { + "use strict"; + wr.__esModule = !0; + var Gh = Vh(Ye()), Yh = B(); + function Vh(t) { + return t && t.__esModule ? t : { default: t }; + } + function zh(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function jh(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Hh(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + wr.default = (function(t) { + Hh(e, t); + function e(s) { + zh(this, e); + var r = jh(this, t.call(this, s)); + return r.type = Yh.TAG, r; + } + return e; + })(Gh.default); + $a.exports = wr.default; + }); + Ya = w((vr, Ga) => { + "use strict"; + vr.__esModule = !0; + var Xh = Zh(ke()), Jh = B(); + function Zh(t) { + return t && t.__esModule ? t : { default: t }; + } + function ed(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function td(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function rd(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + vr.default = (function(t) { + rd(e, t); + function e(s) { + ed(this, e); + var r = td(this, t.call(this, s)); + return r.type = Jh.STRING, r; + } + return e; + })(Xh.default); + Ga.exports = vr.default; + }); + za = w((xr, Va) => { + "use strict"; + xr.__esModule = !0; + var id = ad(fr()), od = B(); + function ad(t) { + return t && t.__esModule ? t : { default: t }; + } + function ud(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function ld(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function cd(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + xr.default = (function(t) { + cd(e, t); + function e(s) { + ud(this, e); + var r = ld(this, t.call(this, s)); + return r.type = od.PSEUDO, r; + } + return e.prototype.toString = function() { + var r = this.length ? "(" + this.map(String).join(",") + ")" : ""; + return [ + this.spaces.before, + String(this.value), + r, + this.spaces.after + ].join(""); + }, e; + })(id.default); + Va.exports = xr.default; + }); + Ha = w((_r, ja) => { + "use strict"; + _r.__esModule = !0; + var hd = md(Ye()), dd = B(); + function md(t) { + return t && t.__esModule ? t : { default: t }; + } + function yd(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function gd(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function wd(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + _r.default = (function(t) { + wd(e, t); + function e(s) { + yd(this, e); + var r = gd(this, t.call(this, s)); + return r.type = dd.ATTRIBUTE, r.raws = {}, r; + } + return e.prototype.toString = function() { + var r = [ + this.spaces.before, + "[", + this.ns, + this.attribute + ]; + return this.operator && r.push(this.operator), this.value && r.push(this.value), this.raws.insensitive ? r.push(this.raws.insensitive) : this.insensitive && r.push(" i"), r.push("]"), r.concat(this.spaces.after).join(""); + }, e; + })(hd.default); + ja.exports = _r.default; + }); + Qa = w((br, Ka) => { + "use strict"; + br.__esModule = !0; + var _d = Ed(Ye()), bd = B(); + function Ed(t) { + return t && t.__esModule ? t : { default: t }; + } + function Sd(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function kd(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Td(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + br.default = (function(t) { + Td(e, t); + function e(s) { + Sd(this, e); + var r = kd(this, t.call(this, s)); + return r.type = bd.UNIVERSAL, r.value = "*", r; + } + return e; + })(_d.default); + Ka.exports = br.default; + }); + Ja = w((Er, Xa) => { + "use strict"; + Er.__esModule = !0; + var Cd = Pd(ke()), Nd = B(); + function Pd(t) { + return t && t.__esModule ? t : { default: t }; + } + function Rd(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function Id(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function qd(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + Er.default = (function(t) { + qd(e, t); + function e(s) { + Rd(this, e); + var r = Id(this, t.call(this, s)); + return r.type = Nd.COMBINATOR, r; + } + return e; + })(Cd.default); + Xa.exports = Er.default; + }); + eu = w((Sr, Za) => { + "use strict"; + Sr.__esModule = !0; + var Md = Ud(ke()), Bd = B(); + function Ud(t) { + return t && t.__esModule ? t : { default: t }; + } + function Fd(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + function $d(t, e) { + if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e && (typeof e == "object" || typeof e == "function") ? e : t; + } + function Wd(t, e) { + if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function, not " + typeof e); + t.prototype = Object.create(e && e.prototype, { constructor: { + value: t, + enumerable: !1, + writable: !0, + configurable: !0 + } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e); + } + Sr.default = (function(t) { + Wd(e, t); + function e(s) { + Fd(this, e); + var r = $d(this, t.call(this, s)); + return r.type = Bd.NESTING, r.value = "&", r; + } + return e; + })(Md.default); + Za.exports = Sr.default; + }); + ru = w((kr, tu) => { + "use strict"; + kr.__esModule = !0; + kr.default = Yd; + function Yd(t) { + return t.sort(function(e, s) { + return e - s; + }); + } + tu.exports = kr.default; + }); + fu = w((Or, cu) => { + "use strict"; + Or.__esModule = !0; + Or.default = tm; + var su = 39, Vd = 34, Ws = 92, nu = 47, _t = 10, Gs = 32, Ys = 12, Vs = 9, zs = 13, iu = 43, ou = 62, au = 126, uu = 124, zd = 44, jd = 40, Hd = 41, Kd = 91, Qd = 93, Xd = 59, lu = 42, Jd = 58, Zd = 38, em = 64, Tr = /[ \n\t\r\{\(\)'"\\;/]/g, Ar = /[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g; + function tm(t) { + for (var e = [], s = t.css.valueOf(), r = void 0, n = void 0, i = void 0, o = void 0, u = void 0, a = void 0, l = void 0, f = void 0, h = void 0, c = void 0, g = void 0, b = s.length, d = -1, p = 1, m = 0, y = function(O, q) { + if (t.safe) s += q, n = s.length - 1; + else throw t.error("Unclosed " + O, p, m - d, m); + }; m < b;) { + switch (r = s.charCodeAt(m), r === _t && (d = m, p += 1), r) { + case _t: + case Gs: + case Vs: + case zs: + case Ys: + n = m; + do + n += 1, r = s.charCodeAt(n), r === _t && (d = n, p += 1); + while (r === Gs || r === _t || r === Vs || r === zs || r === Ys); + e.push([ + "space", + s.slice(m, n), + p, + m - d, + m + ]), m = n - 1; + break; + case iu: + case ou: + case au: + case uu: + n = m; + do + n += 1, r = s.charCodeAt(n); + while (r === iu || r === ou || r === au || r === uu); + e.push([ + "combinator", + s.slice(m, n), + p, + m - d, + m + ]), m = n - 1; + break; + case lu: + e.push([ + "*", + "*", + p, + m - d, + m + ]); + break; + case Zd: + e.push([ + "&", + "&", + p, + m - d, + m + ]); + break; + case zd: + e.push([ + ",", + ",", + p, + m - d, + m + ]); + break; + case Kd: + e.push([ + "[", + "[", + p, + m - d, + m + ]); + break; + case Qd: + e.push([ + "]", + "]", + p, + m - d, + m + ]); + break; + case Jd: + e.push([ + ":", + ":", + p, + m - d, + m + ]); + break; + case Xd: + e.push([ + ";", + ";", + p, + m - d, + m + ]); + break; + case jd: + e.push([ + "(", + "(", + p, + m - d, + m + ]); + break; + case Hd: + e.push([ + ")", + ")", + p, + m - d, + m + ]); + break; + case su: + case Vd: + i = r === su ? "'" : "\"", n = m; + do + for (c = !1, n = s.indexOf(i, n + 1), n === -1 && y("quote", i), g = n; s.charCodeAt(g - 1) === Ws;) g -= 1, c = !c; + while (c); + e.push([ + "string", + s.slice(m, n + 1), + p, + m - d, + p, + n - d, + m + ]), m = n; + break; + case em: + Tr.lastIndex = m + 1, Tr.test(s), Tr.lastIndex === 0 ? n = s.length - 1 : n = Tr.lastIndex - 2, e.push([ + "at-word", + s.slice(m, n + 1), + p, + m - d, + p, + n - d, + m + ]), m = n; + break; + case Ws: + for (n = m, l = !0; s.charCodeAt(n + 1) === Ws;) n += 1, l = !l; + r = s.charCodeAt(n + 1), l && r !== nu && r !== Gs && r !== _t && r !== Vs && r !== zs && r !== Ys && (n += 1), e.push([ + "word", + s.slice(m, n + 1), + p, + m - d, + p, + n - d, + m + ]), m = n; + break; + default: + r === nu && s.charCodeAt(m + 1) === lu ? (n = s.indexOf("*/", m + 2) + 1, n === 0 && y("comment", "*/"), a = s.slice(m, n + 1), o = a.split(` +`), u = o.length - 1, u > 0 ? (f = p + u, h = n - o[u].length) : (f = p, h = d), e.push([ + "comment", + a, + p, + m - d, + f, + n - h, + m + ]), d = h, p = f, m = n) : (Ar.lastIndex = m + 1, Ar.test(s), Ar.lastIndex === 0 ? n = s.length - 1 : n = Ar.lastIndex - 2, e.push([ + "word", + s.slice(m, n + 1), + p, + m - d, + p, + n - d, + m + ]), m = n); + break; + } + m++; + } + return e; + } + cu.exports = Or.default; + }); + du = w((Cr, hu) => { + "use strict"; + Cr.__esModule = !0; + var rm = (function() { + function t(e, s) { + for (var r = 0; r < s.length; r++) { + var n = s[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); + } + } + return function(e, s, r) { + return s && t(e.prototype, s), r && t(e, r), e; + }; + })(), nm = I(Us()), js = I(Fs()), am = I($s()), lm = I(Pa()), Hs = I(Ia()), pm = I(Da()), dm = I(Ba()), ym = I(Fa()), wm = I(Wa()), xm = I(Ya()), bm = I(za()), Sm = I(Ha()), Tm = I(Qa()), Om = I(Ja()), Nm = I(eu()), Rm = I(ru()), pu = I(fu()), Lm = Dm(B()); + function Dm(t) { + if (t && t.__esModule) return t; + var e = {}; + if (t != null) for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]); + return e.default = t, e; + } + function I(t) { + return t && t.__esModule ? t : { default: t }; + } + function Mm(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + Cr.default = (function() { + function t(e) { + Mm(this, t), this.input = e, this.lossy = e.options.lossless === !1, this.position = 0, this.root = new lm.default(); + var s = new Hs.default(); + return this.root.append(s), this.current = s, this.lossy ? this.tokens = (0, pu.default)({ + safe: e.safe, + css: e.css.trim() + }) : this.tokens = (0, pu.default)(e), this.loop(); + } + return t.prototype.attribute = function() { + var s = "", r = void 0, n = this.currToken; + for (this.position++; this.position < this.tokens.length && this.currToken[0] !== "]";) s += this.tokens[this.position][1], this.position++; + this.position === this.tokens.length && !~s.indexOf("]") && this.error("Expected a closing square bracket."); + var i = s.split(/((?:[*~^$|]?=))([^]*)/), o = i[0].split(/(\|)/g), u = { + operator: i[1], + value: i[2], + source: { + start: { + line: n[2], + column: n[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: n[4] + }; + if (o.length > 1 ? (o[0] === "" && (o[0] = !0), u.attribute = this.parseValue(o[2]), u.namespace = this.parseNamespace(o[0])) : u.attribute = this.parseValue(i[0]), r = new Sm.default(u), i[2]) { + var a = i[2].split(/(\s+i\s*?)$/), l = a[0].trim(); + r.value = this.lossy ? l : a[0], a[1] && (r.insensitive = !0, this.lossy || (r.raws.insensitive = a[1])), r.quoted = l[0] === "'" || l[0] === "\"", r.raws.unquoted = r.quoted ? l.slice(1, -1) : l; + } + this.newNode(r), this.position++; + }, t.prototype.combinator = function() { + if (this.currToken[1] === "|") return this.namespace(); + for (var s = new Om.default({ + value: "", + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }); this.position < this.tokens.length && this.currToken && (this.currToken[0] === "space" || this.currToken[0] === "combinator");) this.nextToken && this.nextToken[0] === "combinator" ? (s.spaces.before = this.parseSpace(this.currToken[1]), s.source.start.line = this.nextToken[2], s.source.start.column = this.nextToken[3], s.source.end.column = this.nextToken[3], s.source.end.line = this.nextToken[2], s.sourceIndex = this.nextToken[4]) : this.prevToken && this.prevToken[0] === "combinator" ? s.spaces.after = this.parseSpace(this.currToken[1]) : this.currToken[0] === "combinator" ? s.value = this.currToken[1] : this.currToken[0] === "space" && (s.value = this.parseSpace(this.currToken[1], " ")), this.position++; + return this.newNode(s); + }, t.prototype.comma = function() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = !0, this.position++; + return; + } + var s = new Hs.default(); + this.current.parent.append(s), this.current = s, this.position++; + }, t.prototype.comment = function() { + var s = new dm.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + }); + this.newNode(s), this.position++; + }, t.prototype.error = function(s) { + throw new this.input.error(s); + }, t.prototype.missingBackslash = function() { + return this.error("Expected a backslash preceding the semicolon."); + }, t.prototype.missingParenthesis = function() { + return this.error("Expected opening parenthesis."); + }, t.prototype.missingSquareBracket = function() { + return this.error("Expected opening square bracket."); + }, t.prototype.namespace = function() { + var s = this.prevToken && this.prevToken[1] || !0; + if (this.nextToken[0] === "word") return this.position++, this.word(s); + if (this.nextToken[0] === "*") return this.position++, this.universal(s); + }, t.prototype.nesting = function() { + this.newNode(new Nm.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + })), this.position++; + }, t.prototype.parentheses = function() { + var s = this.current.last; + if (s && s.type === Lm.PSEUDO) { + var r = new Hs.default(), n = this.current; + s.append(r), this.current = r; + var i = 1; + for (this.position++; this.position < this.tokens.length && i;) this.currToken[0] === "(" && i++, this.currToken[0] === ")" && i--, i ? this.parse() : (r.parent.source.end.line = this.currToken[2], r.parent.source.end.column = this.currToken[3], this.position++); + i && this.error("Expected closing parenthesis."), this.current = n; + } else { + var o = 1; + for (this.position++, s.value += "("; this.position < this.tokens.length && o;) this.currToken[0] === "(" && o++, this.currToken[0] === ")" && o--, s.value += this.parseParenthesisToken(this.currToken), this.position++; + o && this.error("Expected closing parenthesis."); + } + }, t.prototype.pseudo = function() { + for (var s = this, r = "", n = this.currToken; this.currToken && this.currToken[0] === ":";) r += this.currToken[1], this.position++; + if (!this.currToken) return this.error("Expected pseudo-class or pseudo-element"); + if (this.currToken[0] === "word") { + var i = void 0; + this.splitWord(!1, function(o, u) { + r += o, i = new bm.default({ + value: r, + source: { + start: { + line: n[2], + column: n[3] + }, + end: { + line: s.currToken[4], + column: s.currToken[5] + } + }, + sourceIndex: n[4] + }), s.newNode(i), u > 1 && s.nextToken && s.nextToken[0] === "(" && s.error("Misplaced parenthesis."); + }); + } else this.error("Unexpected \"" + this.currToken[0] + "\" found."); + }, t.prototype.space = function() { + var s = this.currToken; + this.position === 0 || this.prevToken[0] === "," || this.prevToken[0] === "(" ? (this.spaces = this.parseSpace(s[1]), this.position++) : this.position === this.tokens.length - 1 || this.nextToken[0] === "," || this.nextToken[0] === ")" ? (this.current.last.spaces.after = this.parseSpace(s[1]), this.position++) : this.combinator(); + }, t.prototype.string = function() { + var s = this.currToken; + this.newNode(new xm.default({ + value: this.currToken[1], + source: { + start: { + line: s[2], + column: s[3] + }, + end: { + line: s[4], + column: s[5] + } + }, + sourceIndex: s[6] + })), this.position++; + }, t.prototype.universal = function(s) { + var r = this.nextToken; + if (r && r[1] === "|") return this.position++, this.namespace(); + this.newNode(new Tm.default({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }), s), this.position++; + }, t.prototype.splitWord = function(s, r) { + for (var n = this, i = this.nextToken, o = this.currToken[1]; i && i[0] === "word";) { + this.position++; + var u = this.currToken[1]; + if (o += u, u.lastIndexOf("\\") === u.length - 1) { + var a = this.nextToken; + a && a[0] === "space" && (o += this.parseSpace(a[1], " "), this.position++); + } + i = this.nextToken; + } + var l = (0, js.default)(o, "."), f = (0, js.default)(o, "#"), h = (0, js.default)(o, "#{"); + h.length && (f = f.filter(function(g) { + return !~h.indexOf(g); + })); + var c = (0, Rm.default)((0, am.default)((0, nm.default)([ + [0], + l, + f + ]))); + c.forEach(function(g, b) { + var d = c[b + 1] || o.length, p = o.slice(g, d); + if (b === 0 && r) return r.call(n, p, c.length); + var m = void 0; + ~l.indexOf(g) ? m = new pm.default({ + value: p.slice(1), + source: { + start: { + line: n.currToken[2], + column: n.currToken[3] + g + }, + end: { + line: n.currToken[4], + column: n.currToken[3] + (d - 1) + } + }, + sourceIndex: n.currToken[6] + c[b] + }) : ~f.indexOf(g) ? m = new ym.default({ + value: p.slice(1), + source: { + start: { + line: n.currToken[2], + column: n.currToken[3] + g + }, + end: { + line: n.currToken[4], + column: n.currToken[3] + (d - 1) + } + }, + sourceIndex: n.currToken[6] + c[b] + }) : m = new wm.default({ + value: p, + source: { + start: { + line: n.currToken[2], + column: n.currToken[3] + g + }, + end: { + line: n.currToken[4], + column: n.currToken[3] + (d - 1) + } + }, + sourceIndex: n.currToken[6] + c[b] + }), n.newNode(m, s); + }), this.position++; + }, t.prototype.word = function(s) { + var r = this.nextToken; + return r && r[1] === "|" ? (this.position++, this.namespace()) : this.splitWord(s); + }, t.prototype.loop = function() { + for (; this.position < this.tokens.length;) this.parse(!0); + return this.root; + }, t.prototype.parse = function(s) { + switch (this.currToken[0]) { + case "space": + this.space(); + break; + case "comment": + this.comment(); + break; + case "(": + this.parentheses(); + break; + case ")": + s && this.missingParenthesis(); + break; + case "[": + this.attribute(); + break; + case "]": + this.missingSquareBracket(); + break; + case "at-word": + case "word": + this.word(); + break; + case ":": + this.pseudo(); + break; + case ";": + this.missingBackslash(); + break; + case ",": + this.comma(); + break; + case "*": + this.universal(); + break; + case "&": + this.nesting(); + break; + case "combinator": + this.combinator(); + break; + case "string": + this.string(); + break; + } + }, t.prototype.parseNamespace = function(s) { + if (this.lossy && typeof s == "string") { + var r = s.trim(); + return r.length ? r : !0; + } + return s; + }, t.prototype.parseSpace = function(s, r) { + return this.lossy ? r || "" : s; + }, t.prototype.parseValue = function(s) { + return this.lossy && s && typeof s == "string" ? s.trim() : s; + }, t.prototype.parseParenthesisToken = function(s) { + return this.lossy ? s[0] === "space" ? this.parseSpace(s[1], " ") : this.parseValue(s[1]) : s[1]; + }, t.prototype.newNode = function(s, r) { + return r && (s.namespace = this.parseNamespace(r)), this.spaces && (s.spaces.before = this.spaces, this.spaces = ""), this.current.append(s); + }, rm(t, [ + { + key: "currToken", + get: function() { + return this.tokens[this.position]; + } + }, + { + key: "nextToken", + get: function() { + return this.tokens[this.position + 1]; + } + }, + { + key: "prevToken", + get: function() { + return this.tokens[this.position - 1]; + } + } + ]), t; + })(); + hu.exports = Cr.default; + }); + yu = w((Nr, mu) => { + "use strict"; + Nr.__esModule = !0; + var Um = (function() { + function t(e, s) { + for (var r = 0; r < s.length; r++) { + var n = s[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n); + } + } + return function(e, s, r) { + return s && t(e.prototype, s), r && t(e, r), e; + }; + })(), $m = Wm(du()); + function Wm(t) { + return t && t.__esModule ? t : { default: t }; + } + function Gm(t, e) { + if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function"); + } + Nr.default = (function() { + function t(e) { + return Gm(this, t), this.func = e || function() {}, this; + } + return t.prototype.process = function(s) { + var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = new $m.default({ + css: s, + error: function(o) { + throw new Error(o); + }, + options: r + }); + return this.res = n, this.func(n), this; + }, Um(t, [{ + key: "result", + get: function() { + return String(this.res); + } + }]), t; + })(); + mu.exports = Nr.default; + }); + j = w((L_, wu) => { + "use strict"; + var Ks = function(t, e) { + let s = new t.constructor(); + for (let r in t) { + if (!t.hasOwnProperty(r)) continue; + let n = t[r], i = typeof n; + r === "parent" && i === "object" ? e && (s[r] = e) : r === "source" ? s[r] = n : n instanceof Array ? s[r] = n.map((o) => Ks(o, s)) : r !== "before" && r !== "after" && r !== "between" && r !== "semicolon" && (i === "object" && n !== null && (n = Ks(n)), s[r] = n); + } + return s; + }; + wu.exports = class { + constructor(e) { + e = e || {}, this.raws = { + before: "", + after: "" + }; + for (let s in e) this[s] = e[s]; + } + remove() { + return this.parent && this.parent.removeChild(this), this.parent = void 0, this; + } + toString() { + return [ + this.raws.before, + String(this.value), + this.raws.after + ].join(""); + } + clone(e) { + e = e || {}; + let s = Ks(this); + for (let r in e) s[r] = e[r]; + return s; + } + cloneBefore(e) { + e = e || {}; + let s = this.clone(e); + return this.parent.insertBefore(this, s), s; + } + cloneAfter(e) { + e = e || {}; + let s = this.clone(e); + return this.parent.insertAfter(this, s), s; + } + replaceWith() { + let e = Array.prototype.slice.call(arguments); + if (this.parent) { + for (let s of e) this.parent.insertBefore(this, s); + this.remove(); + } + return this; + } + moveTo(e) { + return this.cleanRaws(this.root() === e.root()), this.remove(), e.append(this), this; + } + moveBefore(e) { + return this.cleanRaws(this.root() === e.root()), this.remove(), e.parent.insertBefore(e, this), this; + } + moveAfter(e) { + return this.cleanRaws(this.root() === e.root()), this.remove(), e.parent.insertAfter(e, this), this; + } + next() { + let e = this.parent.index(this); + return this.parent.nodes[e + 1]; + } + prev() { + let e = this.parent.index(this); + return this.parent.nodes[e - 1]; + } + toJSON() { + let e = {}; + for (let s in this) { + if (!this.hasOwnProperty(s) || s === "parent") continue; + let r = this[s]; + r instanceof Array ? e[s] = r.map((n) => typeof n == "object" && n.toJSON ? n.toJSON() : n) : typeof r == "object" && r.toJSON ? e[s] = r.toJSON() : e[s] = r; + } + return e; + } + root() { + let e = this; + for (; e.parent;) e = e.parent; + return e; + } + cleanRaws(e) { + delete this.raws.before, delete this.raws.after, e || delete this.raws.between; + } + positionInside(e) { + let s = this.toString(), r = this.source.start.column, n = this.source.start.line; + for (let i = 0; i < e; i++) s[i] === ` +` ? (r = 1, n += 1) : r += 1; + return { + line: n, + column: r + }; + } + positionBy(e) { + let s = this.source.start; + if (Object(e).index) s = this.positionInside(e.index); + else if (Object(e).word) { + let r = this.toString().indexOf(e.word); + r !== -1 && (s = this.positionInside(r)); + } + return s; + } + }; + }); + F = w((D_, vu) => { + "use strict"; + var zm = j(), Ve = class extends zm { + constructor(e) { + super(e), this.nodes || (this.nodes = []); + } + push(e) { + return e.parent = this, this.nodes.push(e), this; + } + each(e) { + this.lastEach || (this.lastEach = 0), this.indexes || (this.indexes = {}), this.lastEach += 1; + let s = this.lastEach, r, n; + if (this.indexes[s] = 0, !!this.nodes) { + for (; this.indexes[s] < this.nodes.length && (r = this.indexes[s], n = e(this.nodes[r], r), n !== !1);) this.indexes[s] += 1; + return delete this.indexes[s], n; + } + } + walk(e) { + return this.each((s, r) => { + let n = e(s, r); + return n !== !1 && s.walk && (n = s.walk(e)), n; + }); + } + walkType(e, s) { + if (!e || !s) throw new Error("Parameters {type} and {callback} are required."); + let r = typeof e == "function"; + return this.walk((n, i) => { + if (r && n instanceof e || !r && n.type === e) return s.call(this, n, i); + }); + } + append(e) { + return e.parent = this, this.nodes.push(e), this; + } + prepend(e) { + return e.parent = this, this.nodes.unshift(e), this; + } + cleanRaws(e) { + if (super.cleanRaws(e), this.nodes) for (let s of this.nodes) s.cleanRaws(e); + } + insertAfter(e, s) { + let r = this.index(e), n; + this.nodes.splice(r + 1, 0, s); + for (let i in this.indexes) n = this.indexes[i], r <= n && (this.indexes[i] = n + this.nodes.length); + return this; + } + insertBefore(e, s) { + let r = this.index(e), n; + this.nodes.splice(r, 0, s); + for (let i in this.indexes) n = this.indexes[i], r <= n && (this.indexes[i] = n + this.nodes.length); + return this; + } + removeChild(e) { + e = this.index(e), this.nodes[e].parent = void 0, this.nodes.splice(e, 1); + let s; + for (let r in this.indexes) s = this.indexes[r], s >= e && (this.indexes[r] = s - 1); + return this; + } + removeAll() { + for (let e of this.nodes) e.parent = void 0; + return this.nodes = [], this; + } + every(e) { + return this.nodes.every(e); + } + some(e) { + return this.nodes.some(e); + } + index(e) { + return typeof e == "number" ? e : this.nodes.indexOf(e); + } + get first() { + if (this.nodes) return this.nodes[0]; + } + get last() { + if (this.nodes) return this.nodes[this.nodes.length - 1]; + } + toString() { + let e = this.nodes.map(String).join(""); + return this.value && (e = this.value + e), this.raws.before && (e = this.raws.before + e), this.raws.after && (e += this.raws.after), e; + } + }; + Ve.registerWalker = (t) => { + let e = "walk" + t.name; + e.lastIndexOf("s") !== e.length - 1 && (e += "s"), !Ve.prototype[e] && (Ve.prototype[e] = function(s) { + return this.walkType(t, s); + }); + }; + vu.exports = Ve; + }); + _u = w((B_, xu) => { + "use strict"; + var jm = F(); + xu.exports = class extends jm { + constructor(e) { + super(e), this.type = "root"; + } + }; + }); + Eu = w((F_, bu) => { + "use strict"; + var Hm = F(); + bu.exports = class extends Hm { + constructor(e) { + super(e), this.type = "value", this.unbalanced = 0; + } + }; + }); + Tu = w(($_, ku) => { + "use strict"; + var Su = F(), Pr = class extends Su { + constructor(e) { + super(e), this.type = "atword"; + } + toString() { + this.quoted && this.raws.quote; + return [ + this.raws.before, + "@", + String.prototype.toString.call(this.value), + this.raws.after + ].join(""); + } + }; + Su.registerWalker(Pr); + ku.exports = Pr; + }); + Ou = w((W_, Au) => { + "use strict"; + var Km = F(), Qm = j(), Rr = class extends Qm { + constructor(e) { + super(e), this.type = "colon"; + } + }; + Km.registerWalker(Rr); + Au.exports = Rr; + }); + Nu = w((G_, Cu) => { + "use strict"; + var Xm = F(), Jm = j(), Ir = class extends Jm { + constructor(e) { + super(e), this.type = "comma"; + } + }; + Xm.registerWalker(Ir); + Cu.exports = Ir; + }); + Ru = w((Y_, Pu) => { + "use strict"; + var Zm = F(), ey = j(), qr = class extends ey { + constructor(e) { + super(e), this.type = "comment", this.inline = Object(e).inline || !1; + } + toString() { + return [ + this.raws.before, + this.inline ? "//" : "/*", + String(this.value), + this.inline ? "" : "*/", + this.raws.after + ].join(""); + } + }; + Zm.registerWalker(qr); + Pu.exports = qr; + }); + Lu = w((V_, qu) => { + "use strict"; + var Iu = F(), Lr = class extends Iu { + constructor(e) { + super(e), this.type = "func", this.unbalanced = -1; + } + }; + Iu.registerWalker(Lr); + qu.exports = Lr; + }); + Mu = w((z_, Du) => { + "use strict"; + var ty = F(), ry = j(), Dr = class extends ry { + constructor(e) { + super(e), this.type = "number", this.unit = Object(e).unit || ""; + } + toString() { + return [ + this.raws.before, + String(this.value), + this.unit, + this.raws.after + ].join(""); + } + }; + ty.registerWalker(Dr); + Du.exports = Dr; + }); + Uu = w((j_, Bu) => { + "use strict"; + var sy = F(), ny = j(), Mr = class extends ny { + constructor(e) { + super(e), this.type = "operator"; + } + }; + sy.registerWalker(Mr); + Bu.exports = Mr; + }); + $u = w((H_, Fu) => { + "use strict"; + var iy = F(), oy = j(), Br = class extends oy { + constructor(e) { + super(e), this.type = "paren", this.parenType = ""; + } + }; + iy.registerWalker(Br); + Fu.exports = Br; + }); + Gu = w((K_, Wu) => { + "use strict"; + var ay = F(), uy = j(), Ur = class extends uy { + constructor(e) { + super(e), this.type = "string"; + } + toString() { + let e = this.quoted ? this.raws.quote : ""; + return [ + this.raws.before, + e, + this.value + "", + e, + this.raws.after + ].join(""); + } + }; + ay.registerWalker(Ur); + Wu.exports = Ur; + }); + Vu = w((Q_, Yu) => { + "use strict"; + var ly = F(), cy = j(), Fr = class extends cy { + constructor(e) { + super(e), this.type = "word"; + } + }; + ly.registerWalker(Fr); + Yu.exports = Fr; + }); + ju = w((X_, zu) => { + "use strict"; + var fy = F(), py = j(), $r = class extends py { + constructor(e) { + super(e), this.type = "unicode-range"; + } + }; + fy.registerWalker($r); + zu.exports = $r; + }); + Ku = w((J_, Hu) => { + "use strict"; + var Qs = class extends Error { + constructor(e) { + super(e), this.name = this.constructor.name, this.message = e || "An error ocurred while tokzenizing.", typeof Error.captureStackTrace == "function" ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(e).stack; + } + }; + Hu.exports = Qs; + }); + Ju = w((Z_, Xu) => { + "use strict"; + var Wr = /[ \n\t\r\{\(\)'"\\;,/]/g, hy = /[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g, ze = /[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g, dy = /^[a-z0-9]/i, my = /^[a-f0-9?\-]/i, Qu = Ku(); + Xu.exports = function(e, s) { + s = s || {}; + let r = [], n = e.valueOf(), i = n.length, o = -1, u = 1, a = 0, l = 0, f = null, h, c, g, b, d, p, y, v, O, q, H; + function ne(A) { + throw new Qu(`Unclosed ${A} at line: ${u}, column: ${a - o}, token: ${a}`); + } + for (; a < i;) { + switch (h = n.charCodeAt(a), h === 10 && (o = a, u += 1), h) { + case 10: + case 32: + case 9: + case 13: + case 12: + c = a; + do + c += 1, h = n.charCodeAt(c), h === 10 && (o = c, u += 1); + while (h === 32 || h === 10 || h === 9 || h === 13 || h === 12); + r.push([ + "space", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + break; + case 58: + c = a + 1, r.push([ + "colon", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + break; + case 44: + c = a + 1, r.push([ + "comma", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + break; + case 123: + r.push([ + "{", + "{", + u, + a - o, + u, + c - o, + a + ]); + break; + case 125: + r.push([ + "}", + "}", + u, + a - o, + u, + c - o, + a + ]); + break; + case 40: + l++, f = !f && l === 1 && r.length > 0 && r[r.length - 1][0] === "word" && r[r.length - 1][1] === "url", r.push([ + "(", + "(", + u, + a - o, + u, + c - o, + a + ]); + break; + case 41: + l--, f = f && l > 0, r.push([ + ")", + ")", + u, + a - o, + u, + c - o, + a + ]); + break; + case 39: + case 34: + g = h === 39 ? "'" : "\"", c = a; + do + for (O = !1, c = n.indexOf(g, c + 1), c === -1 && ne("quote", g), q = c; n.charCodeAt(q - 1) === 92;) q -= 1, O = !O; + while (O); + r.push([ + "string", + n.slice(a, c + 1), + u, + a - o, + u, + c - o, + a + ]), a = c; + break; + case 64: + Wr.lastIndex = a + 1, Wr.test(n), Wr.lastIndex === 0 ? c = n.length - 1 : c = Wr.lastIndex - 2, r.push([ + "atword", + n.slice(a, c + 1), + u, + a - o, + u, + c - o, + a + ]), a = c; + break; + case 92: + c = a, h = n.charCodeAt(c + 1), r.push([ + "word", + n.slice(a, c + 1), + u, + a - o, + u, + c - o, + a + ]), a = c; + break; + case 43: + case 45: + case 42: + c = a + 1, H = n.slice(a + 1, c + 1); + n.slice(a - 1, a); + if (h === 45 && H.charCodeAt(0) === 45) { + c++, r.push([ + "word", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + break; + } + r.push([ + "operator", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + break; + default: + if (h === 47 && (n.charCodeAt(a + 1) === 42 || s.loose && !f && n.charCodeAt(a + 1) === 47)) { + if (n.charCodeAt(a + 1) === 42) c = n.indexOf("*/", a + 2) + 1, c === 0 && ne("comment", "*/"); + else { + let N = n.indexOf(` +`, a + 2); + c = N !== -1 ? N - 1 : i; + } + p = n.slice(a, c + 1), b = p.split(` +`), d = b.length - 1, d > 0 ? (y = u + d, v = c - b[d].length) : (y = u, v = o), r.push([ + "comment", + p, + u, + a - o, + y, + c - v, + a + ]), o = v, u = y, a = c; + } else if (h === 35 && !dy.test(n.slice(a + 1, a + 2))) c = a + 1, r.push([ + "#", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + else if ((h === 117 || h === 85) && n.charCodeAt(a + 1) === 43) { + c = a + 2; + do + c += 1, h = n.charCodeAt(c); + while (c < i && my.test(n.slice(c, c + 1))); + r.push([ + "unicoderange", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + } else if (h === 47) c = a + 1, r.push([ + "operator", + n.slice(a, c), + u, + a - o, + u, + c - o, + a + ]), a = c - 1; + else { + let k = hy; + if (h >= 48 && h <= 57 && (k = ze), k.lastIndex = a + 1, k.test(n), k.lastIndex === 0 ? c = n.length - 1 : c = k.lastIndex - 2, k === ze || h === 46) { + let N = n.charCodeAt(c), tn = n.charCodeAt(c + 1), rn = n.charCodeAt(c + 2); + (N === 101 || N === 69) && (tn === 45 || tn === 43) && rn >= 48 && rn <= 57 && (ze.lastIndex = c + 2, ze.test(n), ze.lastIndex === 0 ? c = n.length - 1 : c = ze.lastIndex - 2); + } + r.push([ + "word", + n.slice(a, c + 1), + u, + a - o, + u, + c - o, + a + ]), a = c; + } + break; + } + a++; + } + return r; + }; + }); + el = w((eb, Zu) => { + "use strict"; + var Xs = class extends Error { + constructor(e) { + super(e), this.name = this.constructor.name, this.message = e || "An error ocurred while parsing.", typeof Error.captureStackTrace == "function" ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error(e).stack; + } + }; + Zu.exports = Xs; + }); + nl = w((rb, sl) => { + "use strict"; + var yy = _u(), gy = Eu(), wy = Tu(), vy = Ou(), xy = Nu(), _y = Ru(), by = Lu(), Ey = Mu(), Sy = Uu(), tl = $u(), ky = Gu(), rl = Vu(), Ty = ju(), Ay = Ju(), Oy = Us(), Cy = Fs(), Ny = $s(), Py = el(); + function Ry(t) { + return t.sort((e, s) => e - s); + } + sl.exports = class { + constructor(e, s) { + let r = { loose: !1 }; + this.cache = [], this.input = e, this.options = Object.assign({}, r, s), this.position = 0, this.unbalanced = 0, this.root = new yy(); + let n = new gy(); + this.root.append(n), this.current = n, this.tokens = Ay(e, this.options); + } + parse() { + return this.loop(); + } + colon() { + let e = this.currToken; + this.newNode(new vy({ + value: e[1], + source: { + start: { + line: e[2], + column: e[3] + }, + end: { + line: e[4], + column: e[5] + } + }, + sourceIndex: e[6] + })), this.position++; + } + comma() { + let e = this.currToken; + this.newNode(new xy({ + value: e[1], + source: { + start: { + line: e[2], + column: e[3] + }, + end: { + line: e[4], + column: e[5] + } + }, + sourceIndex: e[6] + })), this.position++; + } + comment() { + let e = !1, s = this.currToken[1].replace(/\/\*|\*\//g, ""), r; + this.options.loose && s.startsWith("//") && (s = s.substring(2), e = !0), r = new _y({ + value: s, + inline: e, + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + }), this.newNode(r), this.position++; + } + error(e, s) { + throw new Py(e + ` at line: ${s[2]}, column ${s[3]}`); + } + loop() { + for (; this.position < this.tokens.length;) this.parseTokens(); + return !this.current.last && this.spaces ? this.current.raws.before += this.spaces : this.spaces && (this.current.last.raws.after += this.spaces), this.spaces = "", this.root; + } + operator() { + let e = this.currToken[1], s; + if (e === "+" || e === "-") { + if (this.options.loose || this.position > 0 && (this.current.type === "func" && this.current.value === "calc" ? this.prevToken[0] !== "space" && this.prevToken[0] !== "(" ? this.error("Syntax Error", this.currToken) : this.nextToken[0] !== "space" && this.nextToken[0] !== "word" ? this.error("Syntax Error", this.currToken) : this.nextToken[0] === "word" && this.current.last.type !== "operator" && this.current.last.value !== "(" && this.error("Syntax Error", this.currToken) : (this.nextToken[0] === "space" || this.nextToken[0] === "operator" || this.prevToken[0] === "operator") && this.error("Syntax Error", this.currToken)), this.options.loose) { + if ((!this.current.nodes.length || this.current.last && this.current.last.type === "operator") && this.nextToken[0] === "word") return this.word(); + } else if (this.nextToken[0] === "word") return this.word(); + } + return s = new Sy({ + value: this.currToken[1], + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + }, + end: { + line: this.currToken[2], + column: this.currToken[3] + } + }, + sourceIndex: this.currToken[4] + }), this.position++, this.newNode(s); + } + parseTokens() { + switch (this.currToken[0]) { + case "space": + this.space(); + break; + case "colon": + this.colon(); + break; + case "comma": + this.comma(); + break; + case "comment": + this.comment(); + break; + case "(": + this.parenOpen(); + break; + case ")": + this.parenClose(); + break; + case "atword": + case "word": + this.word(); + break; + case "operator": + this.operator(); + break; + case "string": + this.string(); + break; + case "unicoderange": + this.unicodeRange(); + break; + default: + this.word(); + break; + } + } + parenOpen() { + let e = 1, s = this.position + 1, r = this.currToken, n; + for (; s < this.tokens.length && e;) { + let i = this.tokens[s]; + i[0] === "(" && e++, i[0] === ")" && e--, s++; + } + if (e && this.error("Expected closing parenthesis", r), n = this.current.last, n && n.type === "func" && n.unbalanced < 0 && (n.unbalanced = 0, this.current = n), this.current.unbalanced++, this.newNode(new tl({ + value: r[1], + source: { + start: { + line: r[2], + column: r[3] + }, + end: { + line: r[4], + column: r[5] + } + }, + sourceIndex: r[6] + })), this.position++, this.current.type === "func" && this.current.unbalanced && this.current.value === "url" && this.currToken[0] !== "string" && this.currToken[0] !== ")" && !this.options.loose) { + let i = this.nextToken, o = this.currToken[1], u = { + line: this.currToken[2], + column: this.currToken[3] + }; + for (; i && i[0] !== ")" && this.current.unbalanced;) this.position++, o += this.currToken[1], i = this.nextToken; + this.position !== this.tokens.length - 1 && (this.position++, this.newNode(new rl({ + value: o, + source: { + start: u, + end: { + line: this.currToken[4], + column: this.currToken[5] + } + }, + sourceIndex: this.currToken[6] + }))); + } + } + parenClose() { + let e = this.currToken; + this.newNode(new tl({ + value: e[1], + source: { + start: { + line: e[2], + column: e[3] + }, + end: { + line: e[4], + column: e[5] + } + }, + sourceIndex: e[6] + })), this.position++, !(this.position >= this.tokens.length - 1 && !this.current.unbalanced) && (this.current.unbalanced--, this.current.unbalanced < 0 && this.error("Expected opening parenthesis", e), !this.current.unbalanced && this.cache.length && (this.current = this.cache.pop())); + } + space() { + let e = this.currToken; + this.position === this.tokens.length - 1 || this.nextToken[0] === "," || this.nextToken[0] === ")" ? (this.current.last.raws.after += e[1], this.position++) : (this.spaces = e[1], this.position++); + } + unicodeRange() { + let e = this.currToken; + this.newNode(new Ty({ + value: e[1], + source: { + start: { + line: e[2], + column: e[3] + }, + end: { + line: e[4], + column: e[5] + } + }, + sourceIndex: e[6] + })), this.position++; + } + splitWord() { + let e = this.nextToken, s = this.currToken[1], r = /^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/, n = /^(?!\#([a-z0-9]+))[\#\{\}]/gi, i, o; + if (!n.test(s)) for (; e && e[0] === "word";) { + this.position++; + let u = this.currToken[1]; + s += u, e = this.nextToken; + } + i = Cy(s, "@"), o = Ry(Ny(Oy([[0], i]))), o.forEach((u, a) => { + let l = o[a + 1] || s.length, f = s.slice(u, l), h; + if (~i.indexOf(u)) h = new wy({ + value: f.slice(1), + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + u + }, + end: { + line: this.currToken[4], + column: this.currToken[3] + (l - 1) + } + }, + sourceIndex: this.currToken[6] + o[a] + }); + else if (r.test(this.currToken[1])) { + let c = f.replace(r, ""); + h = new Ey({ + value: f.replace(c, ""), + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + u + }, + end: { + line: this.currToken[4], + column: this.currToken[3] + (l - 1) + } + }, + sourceIndex: this.currToken[6] + o[a], + unit: c + }); + } else h = new (e && e[0] === "(" ? by : rl)({ + value: f, + source: { + start: { + line: this.currToken[2], + column: this.currToken[3] + u + }, + end: { + line: this.currToken[4], + column: this.currToken[3] + (l - 1) + } + }, + sourceIndex: this.currToken[6] + o[a] + }), h.type === "word" ? (h.isHex = /^#(.+)/.test(f), h.isColor = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(f)) : this.cache.push(this.current); + this.newNode(h); + }), this.position++; + } + string() { + let e = this.currToken, s = this.currToken[1], r = /^(\"|\')/, n = r.test(s), i = "", o; + n && (i = s.match(r)[0], s = s.slice(1, s.length - 1)), o = new ky({ + value: s, + source: { + start: { + line: e[2], + column: e[3] + }, + end: { + line: e[4], + column: e[5] + } + }, + sourceIndex: e[6], + quoted: n + }), o.raws.quote = i, this.newNode(o), this.position++; + } + word() { + return this.splitWord(); + } + newNode(e) { + return this.spaces && (e.raws.before += this.spaces, this.spaces = ""), this.current.append(e); + } + get currToken() { + return this.tokens[this.position]; + } + get nextToken() { + return this.tokens[this.position + 1]; + } + get prevToken() { + return this.tokens[this.position - 1]; + } + }; + }); + _l = {}; + sn(_l, { + languages: () => Si, + options: () => Ti, + parsers: () => en, + printers: () => Hy + }); + bt = (t, e) => (s, r, ...n) => s | 1 && r == null ? void 0 : (e.call(r) ?? r[t]).apply(r, n); + Ol = String.prototype.replaceAll ?? function(t, e) { + return t.global ? this.replace(t, e) : this.split(t).join(e); + }, E = bt("replaceAll", function() { + if (typeof this == "string") return Ol; + }); + G = bt("at", function() { + if (Array.isArray(this) || typeof this == "string") return Nl; + }); + Rl = () => {}, K = Rl; + je = "string", He = "array", Et = "cursor", ie = "indent", Ae = "align", St = "trim", oe = "group", ae = "fill", me = "if-break", kt = "indent-if-break", Oe = "line-suffix", Tt = "line-suffix-boundary", X = "line", At = "label", Ce = "break-parent", Ot = /* @__PURE__ */ new Set([ + Et, + ie, + Ae, + St, + oe, + ae, + me, + kt, + Oe, + Tt, + X, + At, + Ce + ]); + ue = Il; + ql = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t); + zr = class extends Error { + name = "InvalidDocError"; + constructor(e) { + super(Ll(e)), this.doc = e; + } + }, nn = zr; + $ = K, ye = K, an = K, un = K; + Ne = { type: Ce }; + C = { type: X }, M = { + type: X, + soft: !0 + }, T = [{ + type: X, + hard: !0 + }, Ne]; + ce = $l; + cn = Object.freeze({ + character: "'", + codePoint: 39 + }), fn = Object.freeze({ + character: "\"", + codePoint: 34 + }), Wl = Object.freeze({ + preferred: cn, + alternate: fn + }), Gl = Object.freeze({ + preferred: fn, + alternate: cn + }); + pn = Yl; + Vl = /\\(["'\\])|(["'])/gu; + hn = zl; + Nt = jl; + jr = class extends Error { + name = "UnexpectedNodeError"; + constructor(e, s, r = "type") { + super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e; + } + }, dn = jr; + Pt = Symbol.for("PRETTIER_IS_FRONT_MATTER"); + Re = Hl; + Ke = 3; + ge = Ql; + Xl = /* @__PURE__ */ new Set([ + "raw", + "raws", + "sourceIndex", + "source", + "before", + "after", + "trailingComma", + "spaces" + ]); + mn.ignoredProperties = Xl; + yn = mn; + gn.getVisitorKeys = (t) => t.type === "css-root" ? ["frontMatter"] : []; + wn = gn; + Qe = null; + Zl = 10; + for (let t = 0; t <= Zl; t++) Xe(); + vn = ec; + _ = [ + [], + ["nodes"], + ["group"] + ]; + _n = vn({ + "css-root": ["frontMatter", "nodes"], + "css-comment": _[0], + "css-rule": ["selector", "nodes"], + "css-decl": [ + "value", + "selector", + "nodes" + ], + "css-atrule": [ + "selector", + "params", + "value", + "nodes" + ], + "media-query-list": _[1], + "media-query": _[1], + "media-type": _[0], + "media-feature-expression": _[1], + "media-feature": _[0], + "media-colon": _[0], + "media-value": _[0], + "media-keyword": _[0], + "media-url": _[0], + "media-unknown": _[0], + "selector-root": _[1], + "selector-selector": _[1], + "selector-comment": _[0], + "selector-string": _[0], + "selector-tag": _[0], + "selector-id": _[0], + "selector-class": _[0], + "selector-attribute": _[0], + "selector-combinator": _[1], + "selector-universal": _[0], + "selector-pseudo": _[1], + "selector-nesting": _[0], + "selector-unknown": _[0], + "value-value": _[2], + "value-root": _[2], + "value-comment": _[0], + "value-comma_group": ["groups"], + "value-paren_group": [ + "open", + "groups", + "close" + ], + "value-func": _[2], + "value-paren": _[0], + "value-number": _[0], + "value-operator": _[0], + "value-word": _[0], + "value-colon": _[0], + "value-comma": _[0], + "value-string": _[0], + "value-atword": _[0], + "value-unicode-range": _[0], + "value-unknown": _[0] + }); + Kr = rc; + It = Rt(" "), bn = Rt(",; "), qt = Rt(/[^\n\r]/u); + P = (t) => t.source?.startOffset, R = (t) => t.source?.endOffset; + nc = /\*\/$/, ic = /^\/\*\*?/, Nn = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, oc = /(^|\s+)\/\/([^\n\r]*)/g, An = /^(\r?\n)+/, ac = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, On = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, uc = /(\r?\n|^) *\* ?/g, Pn = []; + Dn = ["noformat", "noprettier"], Mn = ["format", "prettier"], Bn = "format"; + Un = lc; + Gn = (t) => Fn(ge(t).content), Yn = (t) => $n(ge(t).content), Vn = (t) => { + let { frontMatter: e, content: s } = ge(t); + return (e ? e.raw + ` + +` : "") + Wn(s); + }; + cc = /* @__PURE__ */ new Set([ + "red", + "green", + "blue", + "alpha", + "a", + "rgb", + "hue", + "h", + "saturation", + "s", + "lightness", + "l", + "whiteness", + "w", + "blackness", + "b", + "tint", + "shade", + "blend", + "blenda", + "contrast", + "hsl", + "hsla", + "hwb", + "hwba" + ]); + fc = /* @__PURE__ */ new Set([ + "initial", + "inherit", + "unset", + "revert" + ]); + di = hc; + mi = dc; + Wt = /* @__PURE__ */ new Map([ + ["em", "em"], + ["rem", "rem"], + ["ex", "ex"], + ["rex", "rex"], + ["cap", "cap"], + ["rcap", "rcap"], + ["ch", "ch"], + ["rch", "rch"], + ["ic", "ic"], + ["ric", "ric"], + ["lh", "lh"], + ["rlh", "rlh"], + ["vw", "vw"], + ["svw", "svw"], + ["lvw", "lvw"], + ["dvw", "dvw"], + ["vh", "vh"], + ["svh", "svh"], + ["lvh", "lvh"], + ["dvh", "dvh"], + ["vi", "vi"], + ["svi", "svi"], + ["lvi", "lvi"], + ["dvi", "dvi"], + ["vb", "vb"], + ["svb", "svb"], + ["lvb", "lvb"], + ["dvb", "dvb"], + ["vmin", "vmin"], + ["svmin", "svmin"], + ["lvmin", "lvmin"], + ["dvmin", "dvmin"], + ["vmax", "vmax"], + ["svmax", "svmax"], + ["lvmax", "lvmax"], + ["dvmax", "dvmax"], + ["cm", "cm"], + ["mm", "mm"], + ["q", "Q"], + ["in", "in"], + ["pt", "pt"], + ["pc", "pc"], + ["px", "px"], + ["deg", "deg"], + ["grad", "grad"], + ["rad", "rad"], + ["turn", "turn"], + ["s", "s"], + ["ms", "ms"], + ["hz", "Hz"], + ["khz", "kHz"], + ["dpi", "dpi"], + ["dpcm", "dpcm"], + ["dppx", "dppx"], + ["x", "x"], + ["cqw", "cqw"], + ["cqh", "cqh"], + ["cqi", "cqi"], + ["cqb", "cqb"], + ["cqmin", "cqmin"], + ["cqmax", "cqmax"], + ["fr", "fr"] + ]); + yi = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gsu, wc = new RegExp(yi.source + `|(${/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/giu.source})?(${/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/giu.source})(${/[a-z]+/giu.source})?`, "giu"); + vi = (t) => t === ` +` || t === "\r" || t === "\u2028" || t === "\u2029"; + Gt = vc; + Yt = xc; + xi = _c; + _i = bc; + Vt = Ec; + De = Oc; + Ei = { + features: { experimental_frontMatterSupport: { + massageAstNode: !0, + embed: !0, + print: !0 + } }, + print: Cc, + embed: wn, + insertPragma: Vn, + massageAstNode: yn, + getVisitorKeys: _n + }; + Si = [ + { + name: "CSS", + type: "markup", + aceMode: "css", + extensions: [".css", ".wxss"], + tmScope: "source.css", + codemirrorMode: "css", + codemirrorMimeType: "text/css", + parsers: ["css"], + vscodeLanguageIds: ["css"], + linguistLanguageId: 50 + }, + { + name: "PostCSS", + type: "markup", + aceMode: "text", + extensions: [".pcss", ".postcss"], + tmScope: "source.postcss", + group: "CSS", + parsers: ["css"], + vscodeLanguageIds: ["postcss"], + linguistLanguageId: 262764437 + }, + { + name: "Less", + type: "markup", + aceMode: "less", + extensions: [".less"], + tmScope: "source.css.less", + aliases: ["less-css"], + codemirrorMode: "css", + codemirrorMimeType: "text/x-less", + parsers: ["less"], + vscodeLanguageIds: ["less"], + linguistLanguageId: 198 + }, + { + name: "SCSS", + type: "markup", + aceMode: "scss", + extensions: [".scss"], + tmScope: "source.css.scss", + codemirrorMode: "css", + codemirrorMimeType: "text/x-scss", + parsers: ["scss"], + vscodeLanguageIds: ["scss"], + linguistLanguageId: 329 + } + ]; + Ti = { singleQuote: { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }.singleQuote }; + en = {}; + sn(en, { + css: () => Vy, + less: () => zy, + scss: () => jy + }); + dl = Te(ht(), 1), ml = Te(qo(), 1), yl = Te(da(), 1); + ma = gp; + Se = wp; + ba = Te(_a(), 1); + Np = ba.default.default; + Ea = Pp; + gu = Te(yu(), 1); + se = Vm; + cl = Te(nl(), 1); + Iy = (t) => { + for (; t.parent;) t = t.parent; + return t; + }, Gr = Iy; + il = qy; + ol = Ly; + al = Dy; + ul = My; + ll = (t) => t.type === "paren" && t.value === ")"; + de = Uy; + Fy = /* @__PURE__ */ new Set([ + "import", + "use", + "forward" + ]); + pl = $y; + hl = Wy; + Gy = /(\s*)(!default).*$/u, Yy = /(\s*)(!global).*$/u; + Zs = { + astFormat: "postcss", + hasPragma: Gn, + hasIgnorePragma: Yn, + locStart: P, + locEnd: R + }, Vy = { + ...Zs, + parse: wl + }, zy = { + ...Zs, + parse: vl + }, jy = { + ...Zs, + parse: xl + }; + Hy = { postcss: Ei }; +}))(); +export { _l as default, Si as languages, Ti as options, en as parsers, Hy as printers }; diff --git a/.github/actions/check-public-api/dist/prettier-Cmm04Op1.js b/.github/actions/check-public-api/dist/prettier-Cmm04Op1.js new file mode 100644 index 0000000000..84f93c7421 --- /dev/null +++ b/.github/actions/check-public-api/dist/prettier-Cmm04Op1.js @@ -0,0 +1,15585 @@ +import { __esmMin, __exportAll } from "./rolldown-runtime-aR1ZRE-I.js"; +import fs3, { realpathSync, statSync } from "fs"; +import * as path from "path"; +import path10, { dirname } from "path"; +import assert2, { ok, strictEqual } from "assert"; +import { format, inspect } from "util"; +import * as url from "url"; +import url2, { fileURLToPath, pathToFileURL } from "url"; +import { builtinModules, createRequire } from "module"; +import * as fs from "fs/promises"; +import fs2 from "fs/promises"; +import process2 from "process"; +import v8 from "v8"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/doc.mjs +var doc_exports = /* @__PURE__ */ __exportAll({ + builders: () => builders, + default: () => public_exports$1, + printer: () => printer, + utils: () => utils +}); +function stringOrArrayAt$1(index) { + return this[index < 0 ? this.length + index : index]; +} +function trimNewlinesEnd(string) { + let end = string.length; + while (end > 0 && (string[end - 1] === "\r" || string[end - 1] === "\n")) end--; + return end < string.length ? string.slice(0, end) : string; +} +function getDocType(doc) { + if (typeof doc === "string") return DOC_TYPE_STRING; + if (Array.isArray(doc)) return DOC_TYPE_ARRAY; + if (!doc) return; + const { type } = doc; + if (VALID_OBJECT_DOC_TYPES.has(type)) return type; +} +function getDocErrorMessage(doc) { + const type = doc === null ? "null" : typeof doc; + if (type !== "string" && type !== "object") return `Unexpected doc '${type}', +Expected it to be 'string' or 'object'.`; + if (get_doc_type_default(doc)) throw new Error("doc is valid."); + const objectType = Object.prototype.toString.call(doc); + if (objectType !== "[object Object]") return `Unexpected doc '${objectType}'.`; + const EXPECTED_TYPE_VALUES = disjunctionListFormat([...VALID_OBJECT_DOC_TYPES].map((type2) => `'${type2}'`)); + return `Unexpected doc.type '${doc.type}'. +Expected it to be ${EXPECTED_TYPE_VALUES}.`; +} +function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { + const docsStack = [doc]; + while (docsStack.length > 0) { + const doc2 = docsStack.pop(); + if (doc2 === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + if (onExit) docsStack.push(doc2, traverseDocOnExitStackMarker); + const docType = get_doc_type_default(doc2); + if (!docType) throw new invalid_doc_error_default(doc2); + if (onEnter?.(doc2) === false) continue; + switch (docType) { + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL$1: { + const parts = docType === DOC_TYPE_ARRAY ? doc2 : doc2.parts; + for (let i = parts.length - 1; i >= 0; --i) docsStack.push(parts[i]); + break; + } + case DOC_TYPE_IF_BREAK$1: + docsStack.push(doc2.flatContents, doc2.breakContents); + break; + case DOC_TYPE_GROUP$1: + if (shouldTraverseConditionalGroups && doc2.expandedStates) for (let i = doc2.expandedStates.length - 1; i >= 0; --i) docsStack.push(doc2.expandedStates[i]); + else docsStack.push(doc2.contents); + break; + case DOC_TYPE_ALIGN$1: + case DOC_TYPE_INDENT$1: + case DOC_TYPE_INDENT_IF_BREAK$1: + case DOC_TYPE_LABEL$1: + case DOC_TYPE_LINE_SUFFIX$1: + docsStack.push(doc2.contents); + break; + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR$1: + case DOC_TYPE_TRIM$1: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + case DOC_TYPE_LINE$1: + case DOC_TYPE_BREAK_PARENT$1: break; + default: throw new invalid_doc_error_default(doc2); + } + } +} +function mapDoc(doc, cb) { + if (typeof doc === "string") return cb(doc); + const mapped = /* @__PURE__ */ new Map(); + return rec(doc); + function rec(doc2) { + if (mapped.has(doc2)) return mapped.get(doc2); + const result = process2(doc2); + mapped.set(doc2, result); + return result; + } + function process2(doc2) { + switch (get_doc_type_default(doc2)) { + case DOC_TYPE_ARRAY: return cb(doc2.map(rec)); + case DOC_TYPE_FILL$1: return cb({ + ...doc2, + parts: doc2.parts.map(rec) + }); + case DOC_TYPE_IF_BREAK$1: return cb({ + ...doc2, + breakContents: rec(doc2.breakContents), + flatContents: rec(doc2.flatContents) + }); + case DOC_TYPE_GROUP$1: { + let { expandedStates, contents } = doc2; + if (expandedStates) { + expandedStates = expandedStates.map(rec); + contents = expandedStates[0]; + } else contents = rec(contents); + return cb({ + ...doc2, + contents, + expandedStates + }); + } + case DOC_TYPE_ALIGN$1: + case DOC_TYPE_INDENT$1: + case DOC_TYPE_INDENT_IF_BREAK$1: + case DOC_TYPE_LABEL$1: + case DOC_TYPE_LINE_SUFFIX$1: return cb({ + ...doc2, + contents: rec(doc2.contents) + }); + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR$1: + case DOC_TYPE_TRIM$1: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + case DOC_TYPE_LINE$1: + case DOC_TYPE_BREAK_PARENT$1: return cb(doc2); + default: throw new invalid_doc_error_default(doc2); + } + } +} +function findInDoc(doc, fn, defaultValue) { + let result = defaultValue; + let shouldSkipFurtherProcessing = false; + function findInDocOnEnterFn(doc2) { + if (shouldSkipFurtherProcessing) return false; + const maybeResult = fn(doc2); + if (maybeResult !== void 0) { + shouldSkipFurtherProcessing = true; + result = maybeResult; + } + } + traverse_doc_default(doc, findInDocOnEnterFn); + return result; +} +function willBreakFn(doc) { + if (doc.type === DOC_TYPE_GROUP$1 && doc.break) return true; + if (doc.type === DOC_TYPE_LINE$1 && doc.hard) return true; + if (doc.type === DOC_TYPE_BREAK_PARENT$1) return true; +} +function willBreak(doc) { + return findInDoc(doc, willBreakFn, false); +} +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + const parentGroup = method_at_default$1(0, groupStack, -1); + if (!parentGroup.expandedStates && !parentGroup.break) parentGroup.break = "propagated"; + } + return null; +} +function propagateBreaks(doc) { + const alreadyVisitedSet = /* @__PURE__ */ new Set(); + const groupStack = []; + function propagateBreaksOnEnterFn(doc2) { + if (doc2.type === DOC_TYPE_BREAK_PARENT$1) breakParentGroup(groupStack); + if (doc2.type === DOC_TYPE_GROUP$1) { + groupStack.push(doc2); + if (alreadyVisitedSet.has(doc2)) return false; + alreadyVisitedSet.add(doc2); + } + } + function propagateBreaksOnExitFn(doc2) { + if (doc2.type === DOC_TYPE_GROUP$1) { + if (groupStack.pop().break) breakParentGroup(groupStack); + } + } + traverse_doc_default(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, true); +} +function removeLinesFn(doc) { + if (doc.type === DOC_TYPE_LINE$1 && !doc.hard) return doc.soft ? "" : " "; + if (doc.type === DOC_TYPE_IF_BREAK$1) return doc.flatContents; + return doc; +} +function removeLines(doc) { + return mapDoc(doc, removeLinesFn); +} +function stripTrailingHardlineFromParts(parts) { + parts = [...parts]; + while (parts.length >= 2 && method_at_default$1(0, parts, -2).type === DOC_TYPE_LINE$1 && method_at_default$1(0, parts, -1).type === DOC_TYPE_BREAK_PARENT$1) parts.length -= 2; + if (parts.length > 0) { + const lastPart = stripTrailingHardlineFromDoc(method_at_default$1(0, parts, -1)); + parts[parts.length - 1] = lastPart; + } + return parts; +} +function stripTrailingHardlineFromDoc(doc) { + switch (get_doc_type_default(doc)) { + case DOC_TYPE_INDENT$1: + case DOC_TYPE_INDENT_IF_BREAK$1: + case DOC_TYPE_GROUP$1: + case DOC_TYPE_LINE_SUFFIX$1: + case DOC_TYPE_LABEL$1: { + const contents = stripTrailingHardlineFromDoc(doc.contents); + return { + ...doc, + contents + }; + } + case DOC_TYPE_IF_BREAK$1: return { + ...doc, + breakContents: stripTrailingHardlineFromDoc(doc.breakContents), + flatContents: stripTrailingHardlineFromDoc(doc.flatContents) + }; + case DOC_TYPE_FILL$1: return { + ...doc, + parts: stripTrailingHardlineFromParts(doc.parts) + }; + case DOC_TYPE_ARRAY: return stripTrailingHardlineFromParts(doc); + case DOC_TYPE_STRING: return trimNewlinesEnd(doc); + case DOC_TYPE_ALIGN$1: + case DOC_TYPE_CURSOR$1: + case DOC_TYPE_TRIM$1: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + case DOC_TYPE_LINE$1: + case DOC_TYPE_BREAK_PARENT$1: break; + default: throw new invalid_doc_error_default(doc); + } + return doc; +} +function stripTrailingHardline$1(doc) { + return stripTrailingHardlineFromDoc(cleanDoc(doc)); +} +function cleanDocFn(doc) { + switch (get_doc_type_default(doc)) { + case DOC_TYPE_FILL$1: + if (doc.parts.every((part) => part === "")) return ""; + break; + case DOC_TYPE_GROUP$1: + if (!doc.contents && !doc.id && !doc.break && !doc.expandedStates) return ""; + if (doc.contents.type === DOC_TYPE_GROUP$1 && doc.contents.id === doc.id && doc.contents.break === doc.break && doc.contents.expandedStates === doc.expandedStates) return doc.contents; + break; + case DOC_TYPE_ALIGN$1: + case DOC_TYPE_INDENT$1: + case DOC_TYPE_INDENT_IF_BREAK$1: + case DOC_TYPE_LINE_SUFFIX$1: + if (!doc.contents) return ""; + break; + case DOC_TYPE_IF_BREAK$1: + if (!doc.flatContents && !doc.breakContents) return ""; + break; + case DOC_TYPE_ARRAY: { + const parts = []; + for (const part of doc) { + if (!part) continue; + const [currentPart, ...restParts] = Array.isArray(part) ? part : [part]; + if (typeof currentPart === "string" && typeof method_at_default$1(0, parts, -1) === "string") parts[parts.length - 1] += currentPart; + else parts.push(currentPart); + parts.push(...restParts); + } + if (parts.length === 0) return ""; + if (parts.length === 1) return parts[0]; + return parts; + } + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR$1: + case DOC_TYPE_TRIM$1: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + case DOC_TYPE_LINE$1: + case DOC_TYPE_LABEL$1: + case DOC_TYPE_BREAK_PARENT$1: break; + default: throw new invalid_doc_error_default(doc); + } + return doc; +} +function cleanDoc(doc) { + return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc)); +} +function replaceEndOfLine(doc, replacement = literalline) { + return mapDoc(doc, (currentDoc) => typeof currentDoc === "string" ? join(replacement, currentDoc.split("\n")) : currentDoc); +} +function canBreakFn(doc) { + if (doc.type === DOC_TYPE_LINE$1) return true; +} +function canBreak(doc) { + return findInDoc(doc, canBreakFn, false); +} +function indent$1(contents) { + assertDoc(contents); + return { + type: DOC_TYPE_INDENT$1, + contents + }; +} +function align(alignType, contents) { + assertAlignType(alignType); + assertDoc(contents); + return { + type: DOC_TYPE_ALIGN$1, + contents, + n: alignType + }; +} +function dedentToRoot(contents) { + return align(Number.NEGATIVE_INFINITY, contents); +} +function markAsRoot$1(contents) { + return align({ type: "root" }, contents); +} +function dedent(contents) { + return align(-1, contents); +} +function addAlignmentToDoc$1(doc, size, tabWidth) { + assertDoc(doc); + let aligned = doc; + if (size > 0) { + for (let level = 0; level < Math.floor(size / tabWidth); ++level) aligned = indent$1(aligned); + aligned = align(size % tabWidth, aligned); + aligned = align(Number.NEGATIVE_INFINITY, aligned); + } + return aligned; +} +function fill(parts) { + assertDocFillParts(parts); + return { + type: DOC_TYPE_FILL$1, + parts + }; +} +function group(contents, options = {}) { + assertDoc(contents); + assertDocArray(options.expandedStates, true); + return { + type: DOC_TYPE_GROUP$1, + id: options.id, + contents, + break: Boolean(options.shouldBreak), + expandedStates: options.expandedStates + }; +} +function conditionalGroup(states, options) { + return group(states[0], { + ...options, + expandedStates: states + }); +} +function ifBreak(breakContents, flatContents = "", options = {}) { + assertDoc(breakContents); + if (flatContents !== "") assertDoc(flatContents); + return { + type: DOC_TYPE_IF_BREAK$1, + breakContents, + flatContents, + groupId: options.groupId + }; +} +function indentIfBreak(contents, options) { + assertDoc(contents); + return { + type: DOC_TYPE_INDENT_IF_BREAK$1, + contents, + groupId: options.groupId, + negate: options.negate + }; +} +function join(separator, docs) { + assertDoc(separator); + assertDocArray(docs); + const parts = []; + for (let i = 0; i < docs.length; i++) { + if (i !== 0) parts.push(separator); + parts.push(docs[i]); + } + return parts; +} +function label(label2, contents) { + assertDoc(contents); + return label2 ? { + type: DOC_TYPE_LABEL$1, + label: label2, + contents + } : contents; +} +function lineSuffix$1(contents) { + assertDoc(contents); + return { + type: DOC_TYPE_LINE_SUFFIX$1, + contents + }; +} +function convertEndOfLineOptionToCharacter$1(endOfLineOption) { + return endOfLineOption === OPTION_CR$1 ? CHARACTER_CR$1 : endOfLineOption === OPTION_CRLF$1 ? CHARACTER_CRLF$1 : DEFAULT_EOL$1; +} +function isFullWidth$1(x) { + return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510; +} +function isWide$1(x) { + return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141; +} +function getStringWidth$1(text) { + if (!text) return 0; + if (!notAsciiRegex$1.test(text)) return text.length; + text = text.replace(emoji_regex_default$1(), (match) => narrowEmojisSet$1.has(match) ? " " : " "); + let width = 0; + for (const character of text) { + const codePoint = character.codePointAt(0); + if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue; + if (codePoint >= 768 && codePoint <= 879) continue; + if (codePoint >= 65024 && codePoint <= 65039) continue; + width += isFullWidth$1(codePoint) || isWide$1(codePoint) ? 2 : 1; + } + return width; +} +function generateIndent(indent2, command, options) { + const queue = command.type === INDENT_COMMAND_TYPE_DEDENT ? indent2.queue.slice(0, -1) : [...indent2.queue, command]; + let value = ""; + let length = 0; + let lastTabs = 0; + let lastSpaces = 0; + for (const command2 of queue) switch (command2.type) { + case INDENT_COMMAND_TYPE_INDENT: + flush(); + if (options.useTabs) addTabs(1); + else addSpaces(options.tabWidth); + break; + case INDENT_COMMAND_TYPE_STRING: { + const { string } = command2; + flush(); + value += string; + length += string.length; + break; + } + case INDENT_COMMAND_TYPE_WIDTH: { + const { width } = command2; + lastTabs += 1; + lastSpaces += width; + break; + } + default: throw new Error(`Unexpected indent comment '${command2.type}'.`); + } + flushSpaces(); + return { + ...indent2, + value, + length, + queue + }; + function addTabs(count) { + value += " ".repeat(count); + length += options.tabWidth * count; + } + function addSpaces(count) { + value += " ".repeat(count); + length += count; + } + function flush() { + if (options.useTabs) flushTabs(); + else flushSpaces(); + } + function flushTabs() { + if (lastTabs > 0) addTabs(lastTabs); + resetLast(); + } + function flushSpaces() { + if (lastSpaces > 0) addSpaces(lastSpaces); + resetLast(); + } + function resetLast() { + lastTabs = 0; + lastSpaces = 0; + } +} +function makeAlign(indent2, indentOptions, options) { + if (!indentOptions) return indent2; + if (indentOptions.type === "root") return { + ...indent2, + root: indent2 + }; + if (indentOptions === Number.NEGATIVE_INFINITY) return indent2.root; + let command; + if (typeof indentOptions === "number") if (indentOptions < 0) command = INDENT_COMMAND_DEDENT; + else command = { + type: INDENT_COMMAND_TYPE_WIDTH, + width: indentOptions + }; + else command = { + type: INDENT_COMMAND_TYPE_STRING, + string: indentOptions + }; + return generateIndent(indent2, command, options); +} +function makeIndent(indent2, options) { + return generateIndent(indent2, INDENT_COMMAND_INDENT, options); +} +function getTrailingIndentionLength(text) { + let length = 0; + for (let index = text.length - 1; index >= 0; index--) { + const character = text[index]; + if (character === " " || character === " ") length++; + else break; + } + return length; +} +function trimIndentation(text) { + const length = getTrailingIndentionLength(text); + return { + text: length === 0 ? text : text.slice(0, text.length - length), + count: length + }; +} +function fits(next, restCommands, remainingWidth, hasLineSuffix, groupModeMap, mustBeFlat) { + if (remainingWidth === Number.POSITIVE_INFINITY) return true; + let restCommandsIndex = restCommands.length; + let hasPendingSpace = false; + const commands = [next]; + let output = ""; + while (remainingWidth >= 0) { + if (commands.length === 0) { + if (restCommandsIndex === 0) return true; + commands.push(restCommands[--restCommandsIndex]); + continue; + } + const { mode, doc } = commands.pop(); + const docType = get_doc_type_default(doc); + switch (docType) { + case DOC_TYPE_STRING: + if (doc) { + if (hasPendingSpace) { + output += " "; + remainingWidth -= 1; + hasPendingSpace = false; + } + output += doc; + remainingWidth -= get_string_width_default$1(doc); + } + break; + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL$1: { + const parts = docType === DOC_TYPE_ARRAY ? doc : doc.parts; + const end = doc[DOC_FILL_PRINTED_LENGTH] ?? 0; + for (let index = parts.length - 1; index >= end; index--) commands.push({ + mode, + doc: parts[index] + }); + break; + } + case DOC_TYPE_INDENT$1: + case DOC_TYPE_ALIGN$1: + case DOC_TYPE_INDENT_IF_BREAK$1: + case DOC_TYPE_LABEL$1: + commands.push({ + mode, + doc: doc.contents + }); + break; + case DOC_TYPE_TRIM$1: { + const { text, count } = trimIndentation(output); + output = text; + remainingWidth += count; + break; + } + case DOC_TYPE_GROUP$1: { + if (mustBeFlat && doc.break) return false; + const groupMode = doc.break ? MODE_BREAK : mode; + const contents = doc.expandedStates && groupMode === MODE_BREAK ? method_at_default$1(0, doc.expandedStates, -1) : doc.contents; + commands.push({ + mode: groupMode, + doc: contents + }); + break; + } + case DOC_TYPE_IF_BREAK$1: { + const contents = (doc.groupId ? groupModeMap[doc.groupId] || MODE_FLAT : mode) === MODE_BREAK ? doc.breakContents : doc.flatContents; + if (contents) commands.push({ + mode, + doc: contents + }); + break; + } + case DOC_TYPE_LINE$1: + if (mode === MODE_BREAK || doc.hard) return true; + if (!doc.soft) hasPendingSpace = true; + break; + case DOC_TYPE_LINE_SUFFIX$1: + hasLineSuffix = true; + break; + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + if (hasLineSuffix) return false; + break; + } + } + return false; +} +function printDocToString$1(doc, options) { + const groupModeMap = /* @__PURE__ */ Object.create(null); + const width = options.printWidth; + const newLine = convertEndOfLineOptionToCharacter$1(options.endOfLine); + let position = 0; + const commands = [{ + indent: ROOT_INDENT, + mode: MODE_BREAK, + doc + }]; + let output = ""; + let shouldRemeasure = false; + const lineSuffix2 = []; + const cursorPositions = []; + const settledOutput = []; + const settledCursorPositions = []; + let settledTextLength = 0; + propagateBreaks(doc); + while (commands.length > 0) { + const { indent: indent2, mode, doc: doc2 } = commands.pop(); + switch (get_doc_type_default(doc2)) { + case DOC_TYPE_STRING: { + const formatted2 = newLine !== "\n" ? method_replace_all_default$1(0, doc2, "\n", newLine) : doc2; + if (formatted2) { + output += formatted2; + if (commands.length > 0) position += get_string_width_default$1(formatted2); + } + break; + } + case DOC_TYPE_ARRAY: + for (let index = doc2.length - 1; index >= 0; index--) commands.push({ + indent: indent2, + mode, + doc: doc2[index] + }); + break; + case DOC_TYPE_CURSOR$1: + if (cursorPositions.length >= 2) throw new Error("There are too many 'cursor' in doc."); + cursorPositions.push(settledTextLength + output.length); + break; + case DOC_TYPE_INDENT$1: + commands.push({ + indent: makeIndent(indent2, options), + mode, + doc: doc2.contents + }); + break; + case DOC_TYPE_ALIGN$1: + commands.push({ + indent: makeAlign(indent2, doc2.n, options), + mode, + doc: doc2.contents + }); + break; + case DOC_TYPE_TRIM$1: + trim2(); + break; + case DOC_TYPE_GROUP$1: + switch (mode) { + case MODE_FLAT: if (!shouldRemeasure) { + commands.push({ + indent: indent2, + mode: doc2.break ? MODE_BREAK : MODE_FLAT, + doc: doc2.contents + }); + break; + } + case MODE_BREAK: { + shouldRemeasure = false; + const next = { + indent: indent2, + mode: MODE_FLAT, + doc: doc2.contents + }; + const remainingWidth = width - position; + const hasLineSuffix = lineSuffix2.length > 0; + if (!doc2.break && fits(next, commands, remainingWidth, hasLineSuffix, groupModeMap)) commands.push(next); + else if (doc2.expandedStates) { + const mostExpanded = method_at_default$1(0, doc2.expandedStates, -1); + if (doc2.break) { + commands.push({ + indent: indent2, + mode: MODE_BREAK, + doc: mostExpanded + }); + break; + } else for (let index = 1; index < doc2.expandedStates.length + 1; index++) if (index >= doc2.expandedStates.length) { + commands.push({ + indent: indent2, + mode: MODE_BREAK, + doc: mostExpanded + }); + break; + } else { + const cmd = { + indent: indent2, + mode: MODE_FLAT, + doc: doc2.expandedStates[index] + }; + if (fits(cmd, commands, remainingWidth, hasLineSuffix, groupModeMap)) { + commands.push(cmd); + break; + } + } + } else commands.push({ + indent: indent2, + mode: MODE_BREAK, + doc: doc2.contents + }); + break; + } + } + if (doc2.id) groupModeMap[doc2.id] = method_at_default$1(0, commands, -1).mode; + break; + case DOC_TYPE_FILL$1: { + const remainingWidth = width - position; + const offset = doc2[DOC_FILL_PRINTED_LENGTH] ?? 0; + const { parts } = doc2; + const length = parts.length - offset; + if (length === 0) break; + const content = parts[offset + 0]; + const whitespace = parts[offset + 1]; + const contentFlatCommand = { + indent: indent2, + mode: MODE_FLAT, + doc: content + }; + const contentBreakCommand = { + indent: indent2, + mode: MODE_BREAK, + doc: content + }; + const contentFits = fits(contentFlatCommand, [], remainingWidth, lineSuffix2.length > 0, groupModeMap, true); + if (length === 1) { + if (contentFits) commands.push(contentFlatCommand); + else commands.push(contentBreakCommand); + break; + } + const whitespaceFlatCommand = { + indent: indent2, + mode: MODE_FLAT, + doc: whitespace + }; + const whitespaceBreakCommand = { + indent: indent2, + mode: MODE_BREAK, + doc: whitespace + }; + if (length === 2) { + if (contentFits) commands.push(whitespaceFlatCommand, contentFlatCommand); + else commands.push(whitespaceBreakCommand, contentBreakCommand); + break; + } + const secondContent = parts[offset + 2]; + const remainingCommand = { + indent: indent2, + mode, + doc: { + ...doc2, + [DOC_FILL_PRINTED_LENGTH]: offset + 2 + } + }; + const firstAndSecondContentFits = fits({ + indent: indent2, + mode: MODE_FLAT, + doc: [ + content, + whitespace, + secondContent + ] + }, [], remainingWidth, lineSuffix2.length > 0, groupModeMap, true); + commands.push(remainingCommand); + if (firstAndSecondContentFits) commands.push(whitespaceFlatCommand, contentFlatCommand); + else if (contentFits) commands.push(whitespaceBreakCommand, contentFlatCommand); + else commands.push(whitespaceBreakCommand, contentBreakCommand); + break; + } + case DOC_TYPE_IF_BREAK$1: + case DOC_TYPE_INDENT_IF_BREAK$1: { + const groupMode = doc2.groupId ? groupModeMap[doc2.groupId] : mode; + if (groupMode === MODE_BREAK) { + const breakContents = doc2.type === DOC_TYPE_IF_BREAK$1 ? doc2.breakContents : doc2.negate ? doc2.contents : indent$1(doc2.contents); + if (breakContents) commands.push({ + indent: indent2, + mode, + doc: breakContents + }); + } + if (groupMode === MODE_FLAT) { + const flatContents = doc2.type === DOC_TYPE_IF_BREAK$1 ? doc2.flatContents : doc2.negate ? indent$1(doc2.contents) : doc2.contents; + if (flatContents) commands.push({ + indent: indent2, + mode, + doc: flatContents + }); + } + break; + } + case DOC_TYPE_LINE_SUFFIX$1: + lineSuffix2.push({ + indent: indent2, + mode, + doc: doc2.contents + }); + break; + case DOC_TYPE_LINE_SUFFIX_BOUNDARY$1: + if (lineSuffix2.length > 0) commands.push({ + indent: indent2, + mode, + doc: hardlineWithoutBreakParent + }); + break; + case DOC_TYPE_LINE$1: + switch (mode) { + case MODE_FLAT: if (!doc2.hard) { + if (!doc2.soft) { + output += " "; + position += 1; + } + break; + } else shouldRemeasure = true; + case MODE_BREAK: + if (lineSuffix2.length > 0) { + commands.push({ + indent: indent2, + mode, + doc: doc2 + }, ...lineSuffix2.reverse()); + lineSuffix2.length = 0; + break; + } + if (doc2.literal) { + output += newLine; + position = 0; + if (indent2.root) { + if (indent2.root.value) output += indent2.root.value; + position = indent2.root.length; + } + } else { + trim2(); + output += newLine + indent2.value; + position = indent2.length; + } + break; + } + break; + case DOC_TYPE_LABEL$1: + commands.push({ + indent: indent2, + mode, + doc: doc2.contents + }); + break; + case DOC_TYPE_BREAK_PARENT$1: break; + default: throw new invalid_doc_error_default(doc2); + } + if (commands.length === 0 && lineSuffix2.length > 0) { + commands.push(...lineSuffix2.reverse()); + lineSuffix2.length = 0; + } + } + const formatted = settledOutput.join("") + output; + const finalCursorPositions = [...settledCursorPositions, ...cursorPositions]; + if (finalCursorPositions.length !== 2) return { formatted }; + const cursorNodeStart = finalCursorPositions[0]; + return { + formatted, + cursorNodeStart, + cursorNodeText: formatted.slice(cursorNodeStart, method_at_default$1(0, finalCursorPositions, -1)) + }; + function trim2() { + const { text: trimmed, count } = trimIndentation(output); + if (trimmed) { + settledOutput.push(trimmed); + settledTextLength += trimmed.length; + } + output = ""; + position -= count; + if (cursorPositions.length > 0) { + settledCursorPositions.push(...cursorPositions.map((position2) => Math.min(position2, settledTextLength))); + cursorPositions.length = 0; + } + } +} +var __defProp$1, __export$1, public_exports$1, OPTIONAL_OBJECT$1, createMethodShim$1, method_at_default$1, noop$1, noop_default$1, DOC_TYPE_STRING, DOC_TYPE_ARRAY, DOC_TYPE_CURSOR$1, DOC_TYPE_INDENT$1, DOC_TYPE_ALIGN$1, DOC_TYPE_TRIM$1, DOC_TYPE_GROUP$1, DOC_TYPE_FILL$1, DOC_TYPE_IF_BREAK$1, DOC_TYPE_INDENT_IF_BREAK$1, DOC_TYPE_LINE_SUFFIX$1, DOC_TYPE_LINE_SUFFIX_BOUNDARY$1, DOC_TYPE_LINE$1, DOC_TYPE_LABEL$1, DOC_TYPE_BREAK_PARENT$1, VALID_OBJECT_DOC_TYPES, get_doc_type_default, disjunctionListFormat, InvalidDocError, invalid_doc_error_default, traverseDocOnExitStackMarker, traverse_doc_default, assertDoc, assertDocArray, assertDocFillParts, assertAlignType, breakParent$1, cursor$1, line$1, softline, hardlineWithoutBreakParent, hardline$1, literallineWithoutBreakParent, literalline, lineSuffixBoundary, trim, stringReplaceAll$1, method_replace_all_default$1, OPTION_CR$1, OPTION_CRLF$1, CHARACTER_CR$1, CHARACTER_CRLF$1, DEFAULT_EOL$1, emoji_regex_default$1, narrow_emojis_evaluate_default$1, notAsciiRegex$1, narrowEmojisSet$1, get_string_width_default$1, INDENT_COMMAND_TYPE_INDENT, INDENT_COMMAND_TYPE_DEDENT, INDENT_COMMAND_TYPE_WIDTH, INDENT_COMMAND_TYPE_STRING, INDENT_COMMAND_INDENT, INDENT_COMMAND_DEDENT, ROOT_INDENT, MODE_BREAK, MODE_FLAT, DOC_FILL_PRINTED_LENGTH, builders, printer, utils; +var init_doc = __esmMin((() => { + __defProp$1 = Object.defineProperty; + __export$1 = (target, all) => { + for (var name in all) __defProp$1(target, name, { + get: all[name], + enumerable: true + }); + }; + public_exports$1 = {}; + __export$1(public_exports$1, { + builders: () => builders, + printer: () => printer, + utils: () => utils + }); + OPTIONAL_OBJECT$1 = 1; + createMethodShim$1 = (methodName, getImplementation) => (flags, object, ...arguments_) => { + if (flags | OPTIONAL_OBJECT$1 && (object === void 0 || object === null)) return; + return (getImplementation.call(object) ?? object[methodName]).apply(object, arguments_); + }; + method_at_default$1 = createMethodShim$1("at", function() { + if (Array.isArray(this) || typeof this === "string") return stringOrArrayAt$1; + }); + noop$1 = () => {}; + noop_default$1 = noop$1; + DOC_TYPE_STRING = "string"; + DOC_TYPE_ARRAY = "array"; + DOC_TYPE_CURSOR$1 = "cursor"; + DOC_TYPE_INDENT$1 = "indent"; + DOC_TYPE_ALIGN$1 = "align"; + DOC_TYPE_TRIM$1 = "trim"; + DOC_TYPE_GROUP$1 = "group"; + DOC_TYPE_FILL$1 = "fill"; + DOC_TYPE_IF_BREAK$1 = "if-break"; + DOC_TYPE_INDENT_IF_BREAK$1 = "indent-if-break"; + DOC_TYPE_LINE_SUFFIX$1 = "line-suffix"; + DOC_TYPE_LINE_SUFFIX_BOUNDARY$1 = "line-suffix-boundary"; + DOC_TYPE_LINE$1 = "line"; + DOC_TYPE_LABEL$1 = "label"; + DOC_TYPE_BREAK_PARENT$1 = "break-parent"; + VALID_OBJECT_DOC_TYPES = /* @__PURE__ */ new Set([ + DOC_TYPE_CURSOR$1, + DOC_TYPE_INDENT$1, + DOC_TYPE_ALIGN$1, + DOC_TYPE_TRIM$1, + DOC_TYPE_GROUP$1, + DOC_TYPE_FILL$1, + DOC_TYPE_IF_BREAK$1, + DOC_TYPE_INDENT_IF_BREAK$1, + DOC_TYPE_LINE_SUFFIX$1, + DOC_TYPE_LINE_SUFFIX_BOUNDARY$1, + DOC_TYPE_LINE$1, + DOC_TYPE_LABEL$1, + DOC_TYPE_BREAK_PARENT$1 + ]); + get_doc_type_default = getDocType; + disjunctionListFormat = (list) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list); + InvalidDocError = class extends Error { + name = "InvalidDocError"; + constructor(doc) { + super(getDocErrorMessage(doc)); + this.doc = doc; + } + }; + invalid_doc_error_default = InvalidDocError; + traverseDocOnExitStackMarker = {}; + traverse_doc_default = traverseDoc; + assertDoc = noop_default$1; + assertDocArray = noop_default$1; + assertDocFillParts = noop_default$1; + assertAlignType = noop_default$1; + breakParent$1 = { type: DOC_TYPE_BREAK_PARENT$1 }; + cursor$1 = { type: DOC_TYPE_CURSOR$1 }; + line$1 = { type: DOC_TYPE_LINE$1 }; + softline = { + type: DOC_TYPE_LINE$1, + soft: true + }; + hardlineWithoutBreakParent = { + type: DOC_TYPE_LINE$1, + hard: true + }; + hardline$1 = [hardlineWithoutBreakParent, breakParent$1]; + literallineWithoutBreakParent = { + type: DOC_TYPE_LINE$1, + hard: true, + literal: true + }; + literalline = [literallineWithoutBreakParent, breakParent$1]; + lineSuffixBoundary = { type: DOC_TYPE_LINE_SUFFIX_BOUNDARY$1 }; + trim = { type: DOC_TYPE_TRIM$1 }; + stringReplaceAll$1 = String.prototype.replaceAll ?? function(pattern, replacement) { + if (pattern.global) return this.replace(pattern, replacement); + return this.split(pattern).join(replacement); + }; + method_replace_all_default$1 = createMethodShim$1("replaceAll", function() { + if (typeof this === "string") return stringReplaceAll$1; + }); + OPTION_CR$1 = "cr"; + OPTION_CRLF$1 = "crlf"; + CHARACTER_CR$1 = "\r"; + CHARACTER_CRLF$1 = "\r\n"; + DEFAULT_EOL$1 = "\n"; + emoji_regex_default$1 = () => { + return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-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DD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; + }; + narrow_emojis_evaluate_default$1 = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇"; + notAsciiRegex$1 = /[^\x20-\x7F]/u; + narrowEmojisSet$1 = new Set(narrow_emojis_evaluate_default$1); + get_string_width_default$1 = getStringWidth$1; + INDENT_COMMAND_TYPE_INDENT = 0; + INDENT_COMMAND_TYPE_DEDENT = 1; + INDENT_COMMAND_TYPE_WIDTH = 2; + INDENT_COMMAND_TYPE_STRING = 3; + INDENT_COMMAND_INDENT = { type: INDENT_COMMAND_TYPE_INDENT }; + INDENT_COMMAND_DEDENT = { type: INDENT_COMMAND_TYPE_DEDENT }; + ROOT_INDENT = { + value: "", + length: 0, + queue: [], + get root() { + return ROOT_INDENT; + } + }; + MODE_BREAK = Symbol("MODE_BREAK"); + MODE_FLAT = Symbol("MODE_FLAT"); + DOC_FILL_PRINTED_LENGTH = Symbol("DOC_FILL_PRINTED_LENGTH"); + builders = { + join, + line: line$1, + softline, + hardline: hardline$1, + literalline, + group, + conditionalGroup, + fill, + lineSuffix: lineSuffix$1, + lineSuffixBoundary, + cursor: cursor$1, + breakParent: breakParent$1, + ifBreak, + trim, + indent: indent$1, + indentIfBreak, + align, + addAlignmentToDoc: addAlignmentToDoc$1, + markAsRoot: markAsRoot$1, + dedentToRoot, + dedent, + hardlineWithoutBreakParent, + literallineWithoutBreakParent, + label, + concat: (parts) => parts + }; + printer = { printDocToString: printDocToString$1 }; + utils = { + willBreak, + traverseDoc: traverse_doc_default, + findInDoc, + mapDoc, + removeLines, + stripTrailingHardline: stripTrailingHardline$1, + replaceEndOfLine, + canBreak + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/index.mjs +function diffLines(oldStr, newStr, options8) { + return lineDiff.diff(oldStr, newStr, options8); +} +function tokenize(value, options8) { + if (options8.stripTrailingCr) value = value.replace(/\r\n/g, "\n"); + const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + if (!linesAndNewlines[linesAndNewlines.length - 1]) linesAndNewlines.pop(); + for (let i = 0; i < linesAndNewlines.length; i++) { + const line3 = linesAndNewlines[i]; + if (i % 2 && !options8.newlineIsToken) retLines[retLines.length - 1] += line3; + else retLines.push(line3); + } + return retLines; +} +function diffArrays(oldArr, newArr, options8) { + return arrayDiff.diff(oldArr, newArr, options8); +} +function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options8) { + let optionsObj; + if (!options8) optionsObj = {}; + else if (typeof options8 === "function") optionsObj = { callback: options8 }; + else optionsObj = options8; + if (typeof optionsObj.context === "undefined") optionsObj.context = 4; + const context = optionsObj.context; + if (optionsObj.newlineIsToken) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions"); + if (!optionsObj.callback) return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj)); + else { + const { callback } = optionsObj; + diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => { + callback(diffLinesResultToPatch(diff)); + } })); + } + function diffLinesResultToPatch(diff) { + if (!diff) return; + diff.push({ + value: "", + lines: [] + }); + function contextLines(lines) { + return lines.map(function(entry) { + return " " + entry; + }); + } + const hunks = []; + let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + for (let i = 0; i < diff.length; i++) { + const current = diff[i], lines = current.lines || splitLines(current.value); + current.lines = lines; + if (current.added || current.removed) { + if (!oldRangeStart) { + const prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + for (const line3 of lines) curRange.push((current.added ? "+" : "-") + line3); + if (current.added) newLine += lines.length; + else oldLine += lines.length; + } else { + if (oldRangeStart) if (lines.length <= context * 2 && i < diff.length - 2) for (const line3 of contextLines(lines)) curRange.push(line3); + else { + const contextSize = Math.min(lines.length, context); + for (const line3 of contextLines(lines.slice(0, contextSize))) curRange.push(line3); + const hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + oldLine += lines.length; + newLine += lines.length; + } + } + for (const hunk of hunks) for (let i = 0; i < hunk.lines.length; i++) if (hunk.lines[i].endsWith("\n")) hunk.lines[i] = hunk.lines[i].slice(0, -1); + else { + hunk.lines.splice(i + 1, 0, "\\ No newline at end of file"); + i++; + } + return { + oldFileName, + newFileName, + oldHeader, + newHeader, + hunks + }; + } +} +function formatPatch(patch) { + if (Array.isArray(patch)) return patch.map(formatPatch).join("\n"); + const ret = []; + if (patch.oldFileName == patch.newFileName) ret.push("Index: " + patch.oldFileName); + ret.push("==================================================================="); + ret.push("--- " + patch.oldFileName + (typeof patch.oldHeader === "undefined" ? "" : " " + patch.oldHeader)); + ret.push("+++ " + patch.newFileName + (typeof patch.newHeader === "undefined" ? "" : " " + patch.newHeader)); + for (let i = 0; i < patch.hunks.length; i++) { + const hunk = patch.hunks[i]; + if (hunk.oldLines === 0) hunk.oldStart -= 1; + if (hunk.newLines === 0) hunk.newStart -= 1; + ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@"); + for (const line3 of hunk.lines) ret.push(line3); + } + return ret.join("\n") + "\n"; +} +function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options8) { + if (typeof options8 === "function") options8 = { callback: options8 }; + if (!(options8 === null || options8 === void 0 ? void 0 : options8.callback)) { + const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options8); + if (!patchObj) return; + return formatPatch(patchObj); + } else { + const { callback } = options8; + structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options8), { callback: (patchObj) => { + if (!patchObj) callback(void 0); + else callback(formatPatch(patchObj)); + } })); + } +} +function splitLines(text) { + const hasTrailingNl = text.endsWith("\n"); + const result = text.split("\n").map((line3) => line3 + "\n"); + if (hasTrailingNl) result.pop(); + else result.push(result.pop().slice(0, -1)); + return result; +} +function leven(first, second, options8) { + if (first === second) return 0; + const maxDistance = options8?.maxDistance; + const swap = first; + if (first.length > second.length) { + first = second; + second = swap; + } + let firstLength = first.length; + let secondLength = second.length; + while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) { + firstLength--; + secondLength--; + } + let start = 0; + while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) start++; + firstLength -= start; + secondLength -= start; + if (maxDistance !== void 0 && secondLength - firstLength > maxDistance) return maxDistance; + if (firstLength === 0) return maxDistance !== void 0 && secondLength > maxDistance ? maxDistance : secondLength; + let bCharacterCode; + let result; + let temporary; + let temporary2; + let index = 0; + let index2 = 0; + while (index < firstLength) { + characterCodeCache[index] = first.charCodeAt(start + index); + array[index] = ++index; + } + while (index2 < secondLength) { + bCharacterCode = second.charCodeAt(start + index2); + temporary = index2++; + result = index2; + for (index = 0; index < firstLength; index++) { + temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1; + temporary = array[index]; + result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2; + } + if (maxDistance !== void 0) { + let rowMinimum = result; + for (index = 0; index < firstLength; index++) if (array[index] < rowMinimum) rowMinimum = array[index]; + if (rowMinimum > maxDistance) return maxDistance; + } + } + array.length = firstLength; + characterCodeCache.length = firstLength; + return maxDistance !== void 0 && result > maxDistance ? maxDistance : result; +} +function closestMatch(target, candidates, options8) { + if (!Array.isArray(candidates) || candidates.length === 0) return; + const userMax = options8?.maxDistance; + const targetLength = target.length; + for (const candidate of candidates) if (candidate === target) return candidate; + if (userMax === 0) return; + let best; + let bestDist = Number.POSITIVE_INFINITY; + const seen = /* @__PURE__ */ new Set(); + for (const candidate of candidates) { + if (seen.has(candidate)) continue; + seen.add(candidate); + const lengthDiff = Math.abs(candidate.length - targetLength); + if (lengthDiff >= bestDist) continue; + if (userMax !== void 0 && lengthDiff > userMax) continue; + const cap = Number.isFinite(bestDist) ? userMax === void 0 ? bestDist : Math.min(bestDist, userMax) : userMax; + const distance = cap === void 0 ? leven(target, candidate) : leven(target, candidate, { maxDistance: cap }); + if (userMax !== void 0 && distance > userMax) continue; + let actualD = distance; + if (cap !== void 0 && distance === cap && cap === userMax) actualD = leven(target, candidate); + if (actualD < bestDist) { + bestDist = actualD; + best = candidate; + if (bestDist === 0) break; + } + } + if (userMax !== void 0 && bestDist > userMax) return; + return best; +} +function getDescription(key2, value, expected, descriptor) { + return [ + `Invalid ${import_picocolors2.default.red(descriptor.key(key2))} value.`, + `Expected ${import_picocolors2.default.blue(expected)},`, + `but received ${value === VALUE_NOT_EXIST ? import_picocolors2.default.gray("nothing") : import_picocolors2.default.red(descriptor.value(value))}.` + ].join(" "); +} +function getListDescription({ text, list }, printWidth) { + const descriptions = []; + if (text) descriptions.push(`- ${import_picocolors2.default.blue(text)}`); + if (list) descriptions.push([`- ${import_picocolors2.default.blue(list.title)}:`].concat(list.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join("\n")); + return chooseDescription(descriptions, printWidth); +} +function chooseDescription(descriptions, printWidth) { + if (descriptions.length === 1) return descriptions[0]; + const [firstDescription, secondDescription] = descriptions; + const [firstWidth, secondWidth] = descriptions.map((description) => description.split("\n", 1)[0].length); + return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription; +} +function createSchema(SchemaConstructor, parameters) { + const schema = new SchemaConstructor(parameters); + const subSchema = Object.create(schema); + for (const handlerKey of HANDLER_KEYS) if (handlerKey in parameters) subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); + return subSchema; +} +function normalizeHandler(handler, superSchema, handlerArgumentsLength) { + return typeof handler === "function" ? (...args) => handler(...args.slice(0, handlerArgumentsLength - 1), superSchema, ...args.slice(handlerArgumentsLength - 1)) : () => handler; +} +function wrapTransferResult({ from, to }) { + return { + from: [from], + to + }; +} +function recordFromArray(array2, mainKey) { + const record = /* @__PURE__ */ Object.create(null); + for (const value of array2) { + const key2 = value[mainKey]; + if (record[key2]) throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key2)}`); + record[key2] = value; + } + return record; +} +function mapFromArray(array2, mainKey) { + const map = /* @__PURE__ */ new Map(); + for (const value of array2) { + const key2 = value[mainKey]; + if (map.has(key2)) throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key2)}`); + map.set(key2, value); + } + return map; +} +function createAutoChecklist() { + const map = /* @__PURE__ */ Object.create(null); + return (id) => { + const idString = JSON.stringify(id); + if (map[idString]) return true; + map[idString] = true; + return false; + }; +} +function partition(array2, predicate) { + const trueArray = []; + const falseArray = []; + for (const value of array2) if (predicate(value)) trueArray.push(value); + else falseArray.push(value); + return [trueArray, falseArray]; +} +function isInt(value) { + return value === Math.floor(value); +} +function comparePrimitive(a, b) { + if (a === b) return 0; + const typeofA = typeof a; + const typeofB = typeof b; + const orders = [ + "undefined", + "object", + "boolean", + "number", + "string" + ]; + if (typeofA !== typeofB) return orders.indexOf(typeofA) - orders.indexOf(typeofB); + if (typeofA !== "string") return Number(a) - Number(b); + return a.localeCompare(b); +} +function normalizeInvalidHandler(invalidHandler) { + return (...args) => { + const errorMessageOrError = invalidHandler(...args); + return typeof errorMessageOrError === "string" ? new Error(errorMessageOrError) : errorMessageOrError; + }; +} +function normalizeDefaultResult(result) { + return result === void 0 ? {} : result; +} +function normalizeExpectedResult(result) { + if (typeof result === "string") return { text: result }; + const { text, list } = result; + assert((text || list) !== void 0, "Unexpected `expected` result, there should be at least one field."); + if (!list) return { text }; + return { + text, + list: { + title: list.title, + values: list.values.map(normalizeExpectedResult) + } + }; +} +function normalizeValidateResult(result, value) { + return result === true ? true : result === false ? { value } : result; +} +function normalizeDeprecatedResult(result, value, doNotNormalizeTrue = false) { + return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ value }] : "value" in result ? [result] : result.length === 0 ? false : result; +} +function normalizeTransferResult(result, value) { + return typeof result === "string" || "key" in result ? { + from: value, + to: result + } : "from" in result ? { + from: result.from, + to: result.to + } : { + from: value, + to: result.to + }; +} +function normalizeForwardResult(result, value) { + return result === void 0 ? [] : Array.isArray(result) ? result.map((transferResult) => normalizeTransferResult(transferResult, value)) : [normalizeTransferResult(result, value)]; +} +function normalizeRedirectResult(result, value) { + const redirect = normalizeForwardResult(typeof result === "object" && "redirect" in result ? result.redirect : result, value); + return redirect.length === 0 ? { + remain: value, + redirect + } : typeof result === "object" && "remain" in result ? { + remain: result.remain, + redirect + } : { redirect }; +} +function assert(isValid, message) { + if (!isValid) throw new Error(message); +} +function createMockable(implementations) { + const mocked = { ...implementations }; + const mockImplementation = (functionality, implementation) => { + if (!Object.prototype.hasOwnProperty.call(implementations, functionality)) throw new Error(`Unexpected mock '${functionality}'.`); + mocked[functionality] = implementation; + }; + const mockImplementations = (overrideImplementations) => { + for (const [functionality, implementation] of Object.entries(overrideImplementations)) mockImplementation(functionality, implementation); + }; + const mockRestore = () => { + Object.assign(mocked, implementations); + }; + return { + mocked, + implementations, + mockImplementation, + mockImplementations, + mockRestore + }; +} +function partition2(array2, predicate) { + const result = [[], []]; + for (const value of array2) result[predicate(value) ? 0 : 1].push(value); + return result; +} +async function findInDirectory(nameOrNames, { typeCheck, cwd, allowSymlinks = true, filter: filter2 }) { + const directory = toAbsolutePath(cwd) ?? process2.cwd(); + const names = Array.isArray(nameOrNames) ? nameOrNames : [nameOrNames]; + for (const name of names) { + const fileOrDirectory = path.join(directory, name); + const stats = await safeStat(fileOrDirectory, allowSymlinks); + if (await typeCheck(stats) && (!filter2 || await filter2({ + name, + path: fileOrDirectory, + stats + }))) return fileOrDirectory; + } +} +async function safeStat(path15, allowSymlinks = true) { + try { + return await (allowSymlinks ? fs.stat : fs.lstat)(path15); + } catch {} +} +function findFile(nameOrNames, options8) { + return findInDirectory(nameOrNames, { + ...options8, + typeCheck: isFile + }); +} +function findDirectory(nameOrNames, options8) { + return findInDirectory(nameOrNames, { + ...options8, + typeCheck: isDirectory + }); +} +function* iterateDirectoryUp(from, to) { + let directory = toAbsolutePath(from) ?? process2.cwd(); + let stopDirectory = toAbsolutePath(to); + if (stopDirectory) { + const relation = path.relative(stopDirectory, directory); + if (relation[0] === "." || relation === directory) return; + } + stopDirectory = stopDirectory ? directory.slice(0, stopDirectory.length) : path.parse(directory).root; + while (directory !== stopDirectory) { + yield directory; + directory = path.dirname(directory); + } + yield stopDirectory; +} +async function findProjectRoot(startDirectory, options8) { + searcher ?? (searcher = new DirectorySearcher(DIRECTORIES, { allowSymlinks: false })); + const directory = await searcher.search(startDirectory, { cache: options8.shouldCache }); + return directory ? path.dirname(directory) : void 0; +} +function clearFindProjectRootCache() { + searcher?.clearCache(); +} +function editorConfigToPrettier(editorConfig) { + if (!editorConfig) return; + const result = {}; + const { indent_style, indent_size, tab_width, max_line_length, quote_type, end_of_line } = editorConfig; + if (indent_style === "space") result.useTabs = false; + else if (indent_style === "tab" || indent_size === "tab") result.useTabs = true; + if (result.useTabs === false && isPositiveInteger(indent_size)) result.tabWidth = indent_size; + else if (isPositiveInteger(tab_width)) result.tabWidth = tab_width; + if (max_line_length === "off") result.printWidth = Number.POSITIVE_INFINITY; + else if (isPositiveInteger(max_line_length)) result.printWidth = max_line_length; + if (quote_type === "single") result.singleQuote = true; + else if (quote_type === "double") result.singleQuote = false; + if (end_of_line === "lf" || end_of_line === "crlf" || end_of_line === "cr") result.endOfLine = end_of_line; + if (Object.keys(result).length === 0) return; + return result; +} +function clearEditorconfigCache() { + clearFindProjectRootCache(); + editorconfigCache.clear(); +} +async function loadEditorconfigInternal(file, { shouldCache }) { + const root2 = await findProjectRoot(path10.dirname(file), { shouldCache }); + return editorconfig_to_prettier_default(await import_editorconfig.default.parse(file, { root: root2 })); +} +function loadEditorconfig(file, { shouldCache }) { + file = path10.resolve(file); + if (!shouldCache || !editorconfigCache.has(file)) editorconfigCache.set(file, loadEditorconfigInternal(file, { shouldCache })); + return editorconfigCache.get(file); +} +function internalize(holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === "object") if (Array.isArray(value)) for (let i = 0; i < value.length; i++) { + const key2 = String(i); + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) delete value[key2]; + else Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + else for (const key2 in value) { + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) delete value[key2]; + else Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + return reviver.call(holder, name, value); +} +function lex() { + lexState = "default"; + buffer = ""; + doubleQuote = false; + sign = 1; + for (;;) { + c = peek(); + const token2 = lexStates[lexState](); + if (token2) return token2; + } +} +function peek() { + if (source[pos]) return String.fromCodePoint(source.codePointAt(pos)); +} +function read() { + const c2 = peek(); + if (c2 === "\n") { + line++; + column = 0; + } else if (c2) column += c2.length; + else column++; + if (c2) pos += c2.length; + return c2; +} +function newToken(type, value) { + return { + type, + value, + line, + column + }; +} +function literal(s) { + for (const c2 of s) { + if (peek() !== c2) throw invalidChar(read()); + read(); + } +} +function escape() { + switch (peek()) { + case "b": + read(); + return "\b"; + case "f": + read(); + return "\f"; + case "n": + read(); + return "\n"; + case "r": + read(); + return "\r"; + case "t": + read(); + return " "; + case "v": + read(); + return "\v"; + case "0": + read(); + if (util.isDigit(peek())) throw invalidChar(read()); + return "\0"; + case "x": + read(); + return hexEscape(); + case "u": + read(); + return unicodeEscape(); + case "\n": + case "\u2028": + case "\u2029": + read(); + return ""; + case "\r": + read(); + if (peek() === "\n") read(); + return ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": throw invalidChar(read()); + case void 0: throw invalidChar(read()); + } + return read(); +} +function hexEscape() { + let buffer2 = ""; + let c2 = peek(); + if (!util.isHexDigit(c2)) throw invalidChar(read()); + buffer2 += read(); + c2 = peek(); + if (!util.isHexDigit(c2)) throw invalidChar(read()); + buffer2 += read(); + return String.fromCodePoint(parseInt(buffer2, 16)); +} +function unicodeEscape() { + let buffer2 = ""; + let count = 4; + while (count-- > 0) { + const c2 = peek(); + if (!util.isHexDigit(c2)) throw invalidChar(read()); + buffer2 += read(); + } + return String.fromCodePoint(parseInt(buffer2, 16)); +} +function push() { + let value; + switch (token.type) { + case "punctuator": + switch (token.value) { + case "{": + value = {}; + break; + case "[": + value = []; + break; + } + break; + case "null": + case "boolean": + case "numeric": + case "string": + value = token.value; + break; + } + if (root === void 0) root = value; + else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) parent.push(value); + else Object.defineProperty(parent, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + if (value !== null && typeof value === "object") { + stack.push(value); + if (Array.isArray(value)) parseState = "beforeArrayValue"; + else parseState = "beforePropertyName"; + } else { + const current = stack[stack.length - 1]; + if (current == null) parseState = "end"; + else if (Array.isArray(current)) parseState = "afterArrayValue"; + else parseState = "afterPropertyValue"; + } +} +function pop() { + stack.pop(); + const current = stack[stack.length - 1]; + if (current == null) parseState = "end"; + else if (Array.isArray(current)) parseState = "afterArrayValue"; + else parseState = "afterPropertyValue"; +} +function invalidChar(c2) { + if (c2 === void 0) return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`); +} +function invalidEOF() { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); +} +function invalidIdentifier() { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); +} +function separatorChar(c2) { + console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); +} +function formatChar(c2) { + const replacements = { + "'": "\\'", + "\"": "\\\"", + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + if (replacements[c2]) return replacements[c2]; + if (c2 < " ") { + const hexString = c2.charCodeAt(0).toString(16); + return "\\x" + ("00" + hexString).substring(hexString.length); + } + return c2; +} +function syntaxError(message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err; +} +function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; +} +function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); +} +function isKeyword(word) { + return keywords.has(word); +} +function isColorSupported() { + return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : import_picocolors4.default.isColorSupported; +} +function buildDefs(colors) { + return { + keyword: colors.cyan, + capitalized: colors.yellow, + jsxIdentifier: colors.yellow, + punctuator: colors.yellow, + number: colors.magenta, + string: colors.green, + regex: colors.magenta, + comment: colors.gray, + invalid: compose(compose(colors.white, colors.bgRed), colors.bold), + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold), + reset: colors.reset + }; +} +function getDefs(enabled) { + return enabled ? defsOn : defsOff; +} +function highlight(text) { + if (text === "") return ""; + const defs = getDefs(true); + let highlighted = ""; + for (const { type, value } of tokenize2(text)) if (type in defs) highlighted += value.split(NEWLINE$1).map((str) => defs[type](str)).join("\n"); + else highlighted += value; + return highlighted; +} +function getMarkerLines(loc, source2, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { linesAbove = 2, linesBelow = 3 } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source2.length, endLine + linesBelow); + if (startLine === -1) start = 0; + if (endLine === -1) end = source2.length; + const lineDiff2 = endLine - startLine; + const markerLines = {}; + if (lineDiff2) for (let i = 0; i <= lineDiff2; i++) { + const lineNumber = i + startLine; + if (!startColumn) markerLines[lineNumber] = true; + else if (i === 0) markerLines[lineNumber] = [startColumn, source2[lineNumber - 1].length - startColumn + 1]; + else if (i === lineDiff2) markerLines[lineNumber] = [0, endColumn]; + else markerLines[lineNumber] = [0, source2[lineNumber - i].length]; + } + else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0]; + else markerLines[startLine] = true; + else markerLines[startLine] = [startColumn, endColumn - startColumn]; + return { + start, + end, + markerLines + }; +} +function codeFrameColumns(rawLines, loc, opts = {}) { + const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; + const defs = getDefs(shouldHighlight); + const { start, end, markerLines } = getMarkerLines(loc, rawLines.split(NEWLINE), opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + let frame = (shouldHighlight ? highlight(rawLines) : rawLines).split(NEWLINE, end).slice(start, end).map((line3, index) => { + const number = start + 1 + index; + const gutter = ` ${` ${number}`.slice(-numberMaxWidth)} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line3.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = [ + "\n ", + defs.gutter(gutter.replace(/\d/g, " ")), + " ", + markerSpacing, + defs.marker("^").repeat(numberOfMarkers) + ].join(""); + if (lastMarkerLine && opts.message) markerLine += " " + defs.message(opts.message); + } + return [ + defs.marker(">"), + defs.gutter(gutter), + line3.length > 0 ? ` ${line3}` : "", + markerLine + ].join(""); + } else return ` ${defs.gutter(gutter)}${line3.length > 0 ? ` ${line3}` : ""}`; + }).join("\n"); + if (opts.message && !hasColumns) frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; + if (shouldHighlight) return defs.reset(frame); + else return frame; +} +function getPosition(text, textIndex, options8) { + const lineBreakBefore = textIndex === 0 ? -1 : text.lastIndexOf("\n", textIndex - 1); + const [lineOffset, columnOffset] = getOffsets(options8); + return { + line: lineBreakBefore === -1 ? lineOffset : text.slice(0, lineBreakBefore + 1).match(/\n/g).length + lineOffset, + column: textIndex - lineBreakBefore - 1 + columnOffset + }; +} +function indexToPosition(text, textIndex, options8) { + if (typeof text !== "string") throw new TypeError("Text parameter should be a string"); + if (!Number.isInteger(textIndex)) throw new TypeError("Index parameter should be an integer"); + if (textIndex < 0 || textIndex > text.length) throw new RangeError("Index out of bounds"); + return getPosition(text, textIndex, options8); +} +function parseJson(string, reviver, fileName) { + if (typeof reviver === "string") { + fileName = reviver; + reviver = void 0; + } + try { + return JSON.parse(string, reviver); + } catch (error) { + throw new JSONError({ + jsonParseError: error, + fileName, + input: string + }); + } +} +function getLineColFromPtr(string, ptr) { + let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g); + return [lines.length, lines.pop().length + 1]; +} +function makeCodeBlock(string, line3, column2) { + let lines = string.split(/\r\n|\n|\r/g); + let codeblock = ""; + let numberLen = (Math.log10(line3 + 1) | 0) + 1; + for (let i = line3 - 1; i <= line3 + 1; i++) { + let l = lines[i - 1]; + if (!l) continue; + codeblock += i.toString().padEnd(numberLen, " "); + codeblock += ": "; + codeblock += l; + codeblock += "\n"; + if (i === line3) { + codeblock += " ".repeat(numberLen + column2 + 2); + codeblock += "^\n"; + } + } + return codeblock; +} +function isEscaped(str, ptr) { + let i = 0; + while (str[ptr - ++i] === "\\"); + return --i && i % 2; +} +function indexOfNewline(str, start = 0, end = str.length) { + let idx = str.indexOf("\n", start); + if (str[idx - 1] === "\r") idx--; + return idx <= end ? idx : -1; +} +function skipComment(str, ptr) { + for (let i = ptr; i < str.length; i++) { + let c2 = str[i]; + if (c2 === "\n") return i; + if (c2 === "\r" && str[i + 1] === "\n") return i + 1; + if (c2 < " " && c2 !== " " || c2 === "") throw new TomlError("control characters are not allowed in comments", { + toml: str, + ptr + }); + } + return str.length; +} +function skipVoid(str, ptr, banNewLines, banComments) { + let c2; + while ((c2 = str[ptr]) === " " || c2 === " " || !banNewLines && (c2 === "\n" || c2 === "\r" && str[ptr + 1] === "\n")) ptr++; + return banComments || c2 !== "#" ? ptr : skipVoid(str, skipComment(str, ptr), banNewLines); +} +function skipUntil(str, ptr, sep, end, banNewLines = false) { + if (!end) { + ptr = indexOfNewline(str, ptr); + return ptr < 0 ? str.length : ptr; + } + for (let i = ptr; i < str.length; i++) { + let c2 = str[i]; + if (c2 === "#") i = indexOfNewline(str, i); + else if (c2 === sep) return i + 1; + else if (c2 === end || banNewLines && (c2 === "\n" || c2 === "\r" && str[i + 1] === "\n")) return i; + } + throw new TomlError("cannot find end of structure", { + toml: str, + ptr + }); +} +function getStringEnd(str, seek) { + let first = str[seek]; + let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first; + seek += target.length - 1; + do + seek = str.indexOf(target, ++seek); + while (seek > -1 && first !== "'" && isEscaped(str, seek)); + if (seek > -1) { + seek += target.length; + if (target.length > 1) { + if (str[seek] === first) seek++; + if (str[seek] === first) seek++; + } + } + return seek; +} +function parseString(str, ptr = 0, endPtr = str.length) { + let isLiteral = str[ptr] === "'"; + let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1]; + if (isMultiline) { + endPtr -= 2; + if (str[ptr += 2] === "\r") ptr++; + if (str[ptr] === "\n") ptr++; + } + let tmp = 0; + let isEscape; + let parsed = ""; + let sliceStart = ptr; + while (ptr < endPtr - 1) { + let c2 = str[ptr++]; + if (c2 === "\n" || c2 === "\r" && str[ptr] === "\n") { + if (!isMultiline) throw new TomlError("newlines are not allowed in strings", { + toml: str, + ptr: ptr - 1 + }); + } else if (c2 < " " && c2 !== " " || c2 === "") throw new TomlError("control characters are not allowed in strings", { + toml: str, + ptr: ptr - 1 + }); + if (isEscape) { + isEscape = false; + if (c2 === "u" || c2 === "U") { + let code = str.slice(ptr, ptr += c2 === "u" ? 4 : 8); + if (!ESCAPE_REGEX.test(code)) throw new TomlError("invalid unicode escape", { + toml: str, + ptr: tmp + }); + try { + parsed += String.fromCodePoint(parseInt(code, 16)); + } catch { + throw new TomlError("invalid unicode escape", { + toml: str, + ptr: tmp + }); + } + } else if (isMultiline && (c2 === "\n" || c2 === " " || c2 === " " || c2 === "\r")) { + ptr = skipVoid(str, ptr - 1, true); + if (str[ptr] !== "\n" && str[ptr] !== "\r") throw new TomlError("invalid escape: only line-ending whitespace may be escaped", { + toml: str, + ptr: tmp + }); + ptr = skipVoid(str, ptr); + } else if (c2 in ESC_MAP) parsed += ESC_MAP[c2]; + else throw new TomlError("unrecognized escape sequence", { + toml: str, + ptr: tmp + }); + sliceStart = ptr; + } else if (!isLiteral && c2 === "\\") { + tmp = ptr - 1; + isEscape = true; + parsed += str.slice(sliceStart, tmp); + } + } + return parsed + str.slice(sliceStart, endPtr - 1); +} +function parseValue(value, toml, ptr, integersAsBigInt) { + if (value === "true") return true; + if (value === "false") return false; + if (value === "-inf") return -Infinity; + if (value === "inf" || value === "+inf") return Infinity; + if (value === "nan" || value === "+nan" || value === "-nan") return NaN; + if (value === "-0") return integersAsBigInt ? 0n : 0; + let isInt2 = INT_REGEX.test(value); + if (isInt2 || FLOAT_REGEX.test(value)) { + if (LEADING_ZERO.test(value)) throw new TomlError("leading zeroes are not allowed", { + toml, + ptr + }); + value = value.replace(/_/g, ""); + let numeric = +value; + if (isNaN(numeric)) throw new TomlError("invalid number", { + toml, + ptr + }); + if (isInt2) { + if ((isInt2 = !Number.isSafeInteger(numeric)) && !integersAsBigInt) throw new TomlError("integer value cannot be represented losslessly", { + toml, + ptr + }); + if (isInt2 || integersAsBigInt === true) numeric = BigInt(value); + } + return numeric; + } + const date = new TomlDate(value); + if (!date.isValid()) throw new TomlError("invalid value", { + toml, + ptr + }); + return date; +} +function sliceAndTrimEndOf(str, startPtr, endPtr, allowNewLines) { + let value = str.slice(startPtr, endPtr); + let commentIdx = value.indexOf("#"); + if (commentIdx > -1) { + skipComment(str, commentIdx); + value = value.slice(0, commentIdx); + } + let trimmed = value.trimEnd(); + if (!allowNewLines) { + let newlineIdx = value.indexOf("\n", trimmed.length); + if (newlineIdx > -1) throw new TomlError("newlines are not allowed in inline tables", { + toml: str, + ptr: startPtr + newlineIdx + }); + } + return [trimmed, commentIdx]; +} +function extractValue(str, ptr, end, depth, integersAsBigInt) { + if (depth === 0) throw new TomlError("document contains excessively nested structures. aborting.", { + toml: str, + ptr + }); + let c2 = str[ptr]; + if (c2 === "[" || c2 === "{") { + let [value, endPtr2] = c2 === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt); + let newPtr = end ? skipUntil(str, endPtr2, ",", end) : endPtr2; + if (endPtr2 - newPtr && end === "}") { + let nextNewLine = indexOfNewline(str, endPtr2, newPtr); + if (nextNewLine > -1) throw new TomlError("newlines are not allowed in inline tables", { + toml: str, + ptr: nextNewLine + }); + } + return [value, newPtr]; + } + let endPtr; + if (c2 === "\"" || c2 === "'") { + endPtr = getStringEnd(str, ptr); + let parsed = parseString(str, ptr, endPtr); + if (end) { + endPtr = skipVoid(str, endPtr, end !== "]"); + if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") throw new TomlError("unexpected character encountered", { + toml: str, + ptr: endPtr + }); + endPtr += +(str[endPtr] === ","); + } + return [parsed, endPtr]; + } + endPtr = skipUntil(str, ptr, ",", end); + let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","), end === "]"); + if (!slice[0]) throw new TomlError("incomplete key-value declaration: no value specified", { + toml: str, + ptr + }); + if (end && slice[1] > -1) { + endPtr = skipVoid(str, ptr + slice[1]); + endPtr += +(str[endPtr] === ","); + } + return [parseValue(slice[0], str, ptr, integersAsBigInt), endPtr]; +} +function parseKey(str, ptr, end = "=") { + let dot = ptr - 1; + let parsed = []; + let endPtr = str.indexOf(end, ptr); + if (endPtr < 0) throw new TomlError("incomplete key-value: cannot find end of key", { + toml: str, + ptr + }); + do { + let c2 = str[ptr = ++dot]; + if (c2 !== " " && c2 !== " ") if (c2 === "\"" || c2 === "'") { + if (c2 === str[ptr + 1] && c2 === str[ptr + 2]) throw new TomlError("multiline strings are not allowed in keys", { + toml: str, + ptr + }); + let eos = getStringEnd(str, ptr); + if (eos < 0) throw new TomlError("unfinished string encountered", { + toml: str, + ptr + }); + dot = str.indexOf(".", eos); + let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot); + let newLine = indexOfNewline(strEnd); + if (newLine > -1) throw new TomlError("newlines are not allowed in keys", { + toml: str, + ptr: ptr + dot + newLine + }); + if (strEnd.trimStart()) throw new TomlError("found extra tokens after the string part", { + toml: str, + ptr: eos + }); + if (endPtr < eos) { + endPtr = str.indexOf(end, eos); + if (endPtr < 0) throw new TomlError("incomplete key-value: cannot find end of key", { + toml: str, + ptr + }); + } + parsed.push(parseString(str, ptr, eos)); + } else { + dot = str.indexOf(".", ptr); + let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot); + if (!KEY_PART_RE.test(part)) throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", { + toml: str, + ptr + }); + parsed.push(part.trimEnd()); + } + } while (dot + 1 && dot < endPtr); + return [parsed, skipVoid(str, endPtr + 1, true, true)]; +} +function parseInlineTable(str, ptr, depth, integersAsBigInt) { + let res = {}; + let seen = /* @__PURE__ */ new Set(); + let c2; + let comma = 0; + ptr++; + while ((c2 = str[ptr++]) !== "}" && c2) { + let err = { + toml: str, + ptr: ptr - 1 + }; + if (c2 === "\n") throw new TomlError("newlines are not allowed in inline tables", err); + else if (c2 === "#") throw new TomlError("inline tables cannot contain comments", err); + else if (c2 === ",") throw new TomlError("expected key-value, found comma", err); + else if (c2 !== " " && c2 !== " ") { + let k; + let t = res; + let hasOwn = false; + let [key2, keyEndPtr] = parseKey(str, ptr - 1); + for (let i = 0; i < key2.length; i++) { + if (i) t = hasOwn ? t[k] : t[k] = {}; + k = key2[i]; + if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) throw new TomlError("trying to redefine an already defined value", { + toml: str, + ptr + }); + if (!hasOwn && k === "__proto__") Object.defineProperty(t, k, { + enumerable: true, + configurable: true, + writable: true + }); + } + if (hasOwn) throw new TomlError("trying to redefine an already defined value", { + toml: str, + ptr + }); + let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt); + seen.add(value); + t[k] = value; + ptr = valueEndPtr; + comma = str[ptr - 1] === "," ? ptr - 1 : 0; + } + } + if (comma) throw new TomlError("trailing commas are not allowed in inline tables", { + toml: str, + ptr: comma + }); + if (!c2) throw new TomlError("unfinished table encountered", { + toml: str, + ptr + }); + return [res, ptr]; +} +function parseArray(str, ptr, depth, integersAsBigInt) { + let res = []; + let c2; + ptr++; + while ((c2 = str[ptr++]) !== "]" && c2) if (c2 === ",") throw new TomlError("expected value, found comma", { + toml: str, + ptr: ptr - 1 + }); + else if (c2 === "#") ptr = skipComment(str, ptr); + else if (c2 !== " " && c2 !== " " && c2 !== "\n" && c2 !== "\r") { + let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt); + res.push(e[0]); + ptr = e[1]; + } + if (!c2) throw new TomlError("unfinished array encountered", { + toml: str, + ptr + }); + return [res, ptr]; +} +function peekTable(key2, table, meta, type) { + let t = table; + let m = meta; + let k; + let hasOwn = false; + let state; + for (let i = 0; i < key2.length; i++) { + if (i) { + t = hasOwn ? t[k] : t[k] = {}; + m = (state = m[k]).c; + if (type === 0 && (state.t === 1 || state.t === 2)) return null; + if (state.t === 2) { + let l = t.length - 1; + t = t[l]; + m = m[l].c; + } + } + k = key2[i]; + if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) return null; + if (!hasOwn) { + if (k === "__proto__") { + Object.defineProperty(t, k, { + enumerable: true, + configurable: true, + writable: true + }); + Object.defineProperty(m, k, { + enumerable: true, + configurable: true, + writable: true + }); + } + m[k] = { + t: i < key2.length - 1 && type === 2 ? 3 : type, + d: false, + i: 0, + c: {} + }; + } + } + state = m[k]; + if (state.t !== type && !(type === 1 && state.t === 3)) return null; + if (type === 2) { + if (!state.d) { + state.d = true; + t[k] = []; + } + t[k].push(t = {}); + state.c[state.i++] = state = { + t: 1, + d: false, + i: 0, + c: {} + }; + } + if (state.d) return null; + state.d = true; + if (type === 1) t = hasOwn ? t[k] : t[k] = {}; + else if (type === 0 && hasOwn) return null; + return [ + k, + t, + state.c + ]; +} +function parse4(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { + let res = {}; + let meta = {}; + let tbl = res; + let m = meta; + for (let ptr = skipVoid(toml, 0); ptr < toml.length;) { + if (toml[ptr] === "[") { + let isTableArray = toml[++ptr] === "["; + let k = parseKey(toml, ptr += +isTableArray, "]"); + if (isTableArray) { + if (toml[k[1] - 1] !== "]") throw new TomlError("expected end of table declaration", { + toml, + ptr: k[1] - 1 + }); + k[1]++; + } + let p = peekTable(k[0], res, meta, isTableArray ? 2 : 1); + if (!p) throw new TomlError("trying to redefine an already defined table or value", { + toml, + ptr + }); + m = p[2]; + tbl = p[1]; + ptr = k[1]; + } else { + let k = parseKey(toml, ptr); + let p = peekTable(k[0], tbl, m, 0); + if (!p) throw new TomlError("trying to redefine an already defined table or value", { + toml, + ptr + }); + let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt); + p[1][p[0]] = v[0]; + ptr = v[1]; + } + ptr = skipVoid(toml, ptr, true); + if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") throw new TomlError("each key-value declaration must be followed by an end-of-line", { + toml, + ptr + }); + ptr = skipVoid(toml, ptr); + } + return res; +} +async function readFile(file) { + if (isUrlString(file)) file = new URL(file); + try { + return await fs2.readFile(file, "utf8"); + } catch (error) { + if (error.code === "ENOENT") return; + throw new Error(`Unable to read '${file}': ${error.message}`); + } +} +async function readJson(file) { + const content = await read_file_default(file); + try { + return parseJson(content); + } catch (error) { + error.message = `JSON Error in ${file}: +${error.message}`; + throw error; + } +} +async function importModuleDefault(file) { + return (await import(pathToFileURL(file).href)).default; +} +async function readBunPackageJson(file) { + try { + return await readJson(file); + } catch (error) { + try { + return await importModuleDefault(file); + } catch {} + throw error; + } +} +async function loadConfigFromPackageYaml(file) { + const { prettier } = await loadYaml(file); + return prettier; +} +async function loadYaml(file) { + const content = await read_file_default(file); + if (!parseYaml) ({__parsePrettierYamlConfig: parseYaml} = await import("./yaml-EkSMxulB.js")); + try { + return parseYaml(content); + } catch (error) { + error.message = `YAML Error in ${file}: +${error.message}`; + throw error; + } +} +async function loadToml(file) { + const content = await read_file_default(file); + try { + return parse4(content); + } catch (error) { + error.message = `TOML Error in ${file}: +${error.message}`; + throw error; + } +} +async function loadJson5(file) { + const content = await read_file_default(file); + try { + return dist_default.parse(content); + } catch (error) { + error.message = `JSON5 Error in ${file}: +${error.message}`; + throw error; + } +} +async function filter({ name, path: file }) { + if (name === "package.json") try { + return Boolean(await loadConfigFromPackageJson(file)); + } catch { + return false; + } + if (name === "package.yaml") try { + return Boolean(await loadConfigFromPackageYaml(file)); + } catch { + return false; + } + return true; +} +function getSearcher(stopDirectory) { + return new FileSearcher(CONFIG_FILE_NAMES, { + filter, + stopDirectory + }); +} +function formatList(array2, type = "and") { + return array2.length < 3 ? array2.join(` ${type} `) : `${array2.slice(0, -1).join(", ")}, ${type} ${array2[array2.length - 1]}`; +} +function createError(sym, value, constructor) { + messages.set(sym, value); + return makeNodeErrorWithCode(constructor, sym); +} +function makeNodeErrorWithCode(Base, key2) { + return NodeError; + function NodeError(...parameters) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; + const error = new Base(); + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; + const message = getMessage(key2, parameters, error); + Object.defineProperties(error, { + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + /** @this {Error} */ + value() { + return `${this.name} [${key2}]: ${this.message}`; + }, + enumerable: false, + writable: true, + configurable: true + } + }); + captureLargerStackTrace(error); + error.code = key2; + return error; + } +} +function isErrorStackTraceLimitWritable() { + try { + if (v8.startupSnapshot.isBuildingSnapshot()) return false; + } catch {} + const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); + if (desc === void 0) return Object.isExtensible(Error); + return own.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; +} +function hideStackFrames(wrappedFunction) { + const hidden = nodeInternalPrefix + wrappedFunction.name; + Object.defineProperty(wrappedFunction, "name", { value: hidden }); + return wrappedFunction; +} +function getMessage(key2, parameters, self) { + const message = messages.get(key2); + assert2.ok(message !== void 0, "expected `message` to be found"); + if (typeof message === "function") { + assert2.ok(message.length <= parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`); + return Reflect.apply(message, self, parameters); + } + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) expectedLength++; + assert2.ok(expectedLength === parameters.length, `Code: ${key2}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`); + if (parameters.length === 0) return message; + parameters.unshift(message); + return Reflect.apply(format, null, parameters); +} +function determineSpecificType(value) { + if (value === null || value === void 0) return String(value); + if (typeof value === "function" && value.name) return `function ${value.name}`; + if (typeof value === "object") { + if (value.constructor && value.constructor.name) return `an instance of ${value.constructor.name}`; + return `${inspect(value, { depth: -1 })}`; + } + let inspected = inspect(value, { colors: false }); + if (inspected.length > 28) inspected = `${inspected.slice(0, 25)}...`; + return `type ${typeof value} (${inspected})`; +} +function read2(jsonPath, { base, specifier }) { + const existing = cache.get(jsonPath); + if (existing) return existing; + let string; + try { + string = fs3.readFileSync(path10.toNamespacedPath(jsonPath), "utf8"); + } catch (error) { + const exception = error; + if (exception.code !== "ENOENT") throw exception; + } + const result = { + exists: false, + pjsonPath: jsonPath, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; + if (string !== void 0) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const cause = error_; + const error = new ERR_INVALID_PACKAGE_CONFIG(jsonPath, (base ? `"${specifier}" from ` : "") + fileURLToPath(base || specifier), cause.message); + error.cause = cause; + throw error; + } + result.exists = true; + if (hasOwnProperty.call(parsed, "name") && typeof parsed.name === "string") result.name = parsed.name; + if (hasOwnProperty.call(parsed, "main") && typeof parsed.main === "string") result.main = parsed.main; + if (hasOwnProperty.call(parsed, "exports")) result.exports = parsed.exports; + if (hasOwnProperty.call(parsed, "imports")) result.imports = parsed.imports; + if (hasOwnProperty.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) result.type = parsed.type; + } + cache.set(jsonPath, result); + return result; +} +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL("package.json", resolved); + while (true) { + if (packageJSONUrl.pathname.endsWith("node_modules/package.json")) break; + const packageConfig = read2(fileURLToPath(packageJSONUrl), { specifier: resolved }); + if (packageConfig.exists) return packageConfig; + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) break; + } + return { + pjsonPath: fileURLToPath(packageJSONUrl), + exists: false, + type: "none" + }; +} +function getPackageType(url3) { + return getPackageScopeConfig(url3).type; +} +function mimeToFormat(mime) { + if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module"; + if (mime === "application/json") return "json"; + return null; +} +function getDataProtocolModuleFormat(parsed) { + const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [ + null, + null, + null + ]; + return mimeToFormat(mime); +} +function extname$1(url3) { + const pathname = url3.pathname; + let index = pathname.length; + while (index--) { + const code = pathname.codePointAt(index); + if (code === 47) return ""; + if (code === 46) return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); + } + return ""; +} +function getFileProtocolModuleFormat(url3, _context, ignoreErrors) { + const value = extname$1(url3); + if (value === ".js") { + const packageType = getPackageType(url3); + if (packageType !== "none") return packageType; + return "commonjs"; + } + if (value === "") { + const packageType = getPackageType(url3); + if (packageType === "none" || packageType === "commonjs") return "commonjs"; + return "module"; + } + const format3 = extensionFormatMap[value]; + if (format3) return format3; + if (ignoreErrors) return; + throw new ERR_UNKNOWN_FILE_EXTENSION(value, fileURLToPath(url3)); +} +function getHttpProtocolModuleFormat() {} +function defaultGetFormatWithoutErrors(url3, context) { + const protocol = url3.protocol; + if (!hasOwnProperty2.call(protocolHandlers, protocol)) return null; + return protocolHandlers[protocol](url3, context, true) || null; +} +function getDefaultConditions() { + return DEFAULT_CONDITIONS; +} +function getDefaultConditionsSet() { + return DEFAULT_CONDITIONS_SET; +} +function getConditionsSet(conditions) { + if (conditions !== void 0 && conditions !== getDefaultConditions()) { + if (!Array.isArray(conditions)) throw new ERR_INVALID_ARG_VALUE("conditions", conditions, "expected an array"); + return new Set(conditions); + } + return getDefaultConditionsSet(); +} +function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + if (process2.noDeprecation) return; + const pjsonPath = fileURLToPath(packageJsonUrl); + const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; + process2.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166"); +} +function emitLegacyIndexDeprecation(url3, packageJsonUrl, base, main) { + if (process2.noDeprecation) return; + if (defaultGetFormatWithoutErrors(url3, { parentURL: base.href }) !== "module") return; + const urlPath = fileURLToPath(url3.href); + const packagePath = fileURLToPath(new URL(".", packageJsonUrl)); + const basePath = fileURLToPath(base); + if (!main) process2.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}. +Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151"); + else if (path10.resolve(packagePath, main) !== urlPath) process2.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}. + Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151"); +} +function tryStatSync(path15) { + try { + return statSync(path15); + } catch {} +} +function fileExists(url3) { + const stats = statSync(url3, { throwIfNoEntry: false }); + const isFile2 = stats ? stats.isFile() : void 0; + return isFile2 === null || isFile2 === void 0 ? false : isFile2; +} +function legacyMainResolve(packageJsonUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== void 0) { + guess = new URL(packageConfig.main, packageJsonUrl); + if (fileExists(guess)) return guess; + const tries2 = [ + `./${packageConfig.main}.js`, + `./${packageConfig.main}.json`, + `./${packageConfig.main}.node`, + `./${packageConfig.main}/index.js`, + `./${packageConfig.main}/index.json`, + `./${packageConfig.main}/index.node` + ]; + let i2 = -1; + while (++i2 < tries2.length) { + guess = new URL(tries2[i2], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + } + const tries = [ + "./index.js", + "./index.json", + "./index.node" + ]; + let i = -1; + while (++i < tries.length) { + guess = new URL(tries[i], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + throw new ERR_MODULE_NOT_FOUND(fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base)); +} +function finalizeResolution(resolved, base, preserveSymlinks) { + if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, "must not include encoded \"/\" or \"\\\" characters", fileURLToPath(base)); + let filePath; + try { + filePath = fileURLToPath(resolved); + } catch (error) { + const cause = error; + Object.defineProperty(cause, "input", { value: String(resolved) }); + Object.defineProperty(cause, "module", { value: String(base) }); + throw cause; + } + const stats = tryStatSync(filePath.endsWith("/") ? filePath.slice(-1) : filePath); + if (stats && stats.isDirectory()) { + const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base)); + error.url = String(resolved); + throw error; + } + if (!stats || !stats.isFile()) { + const error = new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && fileURLToPath(base), true); + error.url = String(resolved); + throw error; + } + if (!preserveSymlinks) { + const real = realpathSync(filePath); + const { search, hash } = resolved; + resolved = pathToFileURL(real + (filePath.endsWith(path10.sep) ? "/" : "")); + resolved.search = search; + resolved.hash = hash; + } + return resolved; +} +function importNotDefined(specifier, packageJsonUrl, base) { + return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && fileURLToPath(new URL(".", packageJsonUrl)), fileURLToPath(base)); +} +function exportsNotFound(subpath, packageJsonUrl, base) { + return new ERR_PACKAGE_PATH_NOT_EXPORTED(fileURLToPath(new URL(".", packageJsonUrl)), subpath, base && fileURLToPath(base)); +} +function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { + throw new ERR_INVALID_MODULE_SPECIFIER(request, `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`, base && fileURLToPath(base)); +} +function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { + target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; + return new ERR_INVALID_PACKAGE_TARGET(fileURLToPath(new URL(".", packageJsonUrl)), subpath, target, internal, base && fileURLToPath(base)); +} +function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { + if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (!target.startsWith("./")) { + if (internal && !target.startsWith("../") && !target.startsWith("/")) { + let isURL2 = false; + try { + new URL(target); + isURL2 = true; + } catch {} + if (!isURL2) return packageResolve(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target + subpath, packageJsonUrl, conditions); + } + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + if (invalidSegmentRegEx.exec(target.slice(2)) !== null) if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { + if (!isPathMap) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, true); + } + } else throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + const resolved = new URL(target, packageJsonUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL(".", packageJsonUrl).pathname; + if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (subpath === "") return resolved; + if (invalidSegmentRegEx.exec(subpath) !== null) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { + if (!isPathMap) emitInvalidSegmentDeprecation(pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target, request, match, packageJsonUrl, internal, base, false); + } else throwInvalidSubpath(request, match, packageJsonUrl, internal, base); + } + if (pattern) return new URL(RegExpPrototypeSymbolReplace.call(patternRegEx, resolved.href, () => subpath)); + return new URL(subpath, resolved); +} +function isArrayIndex(key2) { + const keyNumber = Number(key2); + if (`${keyNumber}` !== key2) return false; + return keyNumber >= 0 && keyNumber < 4294967295; +} +function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { + if (typeof target === "string") return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions); + if (Array.isArray(target)) { + const targetList = target; + if (targetList.length === 0) return null; + let lastException; + let i = -1; + while (++i < targetList.length) { + const targetItem = targetList[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); + } catch (error) { + const exception = error; + lastException = exception; + if (exception.code === "ERR_INVALID_PACKAGE_TARGET") continue; + throw error; + } + if (resolveResult === void 0) continue; + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === void 0 || lastException === null) return null; + throw lastException; + } + if (typeof target === "object" && target !== null) { + const keys = Object.getOwnPropertyNames(target); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + if (isArrayIndex(key2)) throw new ERR_INVALID_PACKAGE_CONFIG2(fileURLToPath(packageJsonUrl), base, "\"exports\" cannot contain numeric property keys."); + } + i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + if (key2 === "default" || conditions && conditions.has(key2)) { + const conditionalTarget = target[key2]; + const resolveResult = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions); + if (resolveResult === void 0) continue; + return resolveResult; + } + } + return null; + } + if (target === null) return null; + throw invalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base); +} +function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { + if (typeof exports === "string" || Array.isArray(exports)) return true; + if (typeof exports !== "object" || exports === null) return false; + const keys = Object.getOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + let keyIndex = -1; + while (++keyIndex < keys.length) { + const key2 = keys[keyIndex]; + const currentIsConditionalSugar = key2 === "" || key2[0] !== "."; + if (i++ === 0) isConditionalSugar = currentIsConditionalSugar; + else if (isConditionalSugar !== currentIsConditionalSugar) throw new ERR_INVALID_PACKAGE_CONFIG2(fileURLToPath(packageJsonUrl), base, `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`); + } + return isConditionalSugar; +} +function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + if (process2.noDeprecation) return; + const pjsonPath = fileURLToPath(pjsonUrl); + if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; + emittedPackageWarnings.add(pjsonPath + "|" + match); + process2.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155"); +} +function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) exports = { ".": exports }; + if (own2.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { + const target = exports[packageSubpath]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, "", packageSubpath, base, false, false, false, conditions); + if (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base); + return resolveResult; + } + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(exports); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + const patternIndex = key2.indexOf("*"); + if (patternIndex !== -1 && packageSubpath.startsWith(key2.slice(0, patternIndex))) { + if (packageSubpath.endsWith("/")) emitTrailingSlashPatternDeprecation(packageSubpath, packageJsonUrl, base); + const patternTrailer = key2.slice(patternIndex + 1); + if (packageSubpath.length >= key2.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key2) === 1 && key2.lastIndexOf("*") === patternIndex) { + bestMatch = key2; + bestMatchSubpath = packageSubpath.slice(patternIndex, packageSubpath.length - patternTrailer.length); + } + } + } + if (bestMatch) { + const target = exports[bestMatch]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith("/"), conditions); + if (resolveResult === null || resolveResult === void 0) throw exportsNotFound(packageSubpath, packageJsonUrl, base); + return resolveResult; + } + throw exportsNotFound(packageSubpath, packageJsonUrl, base); +} +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf("*"); + const bPatternIndex = b.indexOf("*"); + const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLengthA > baseLengthB) return -1; + if (baseLengthB > baseLengthA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; + return 0; +} +function packageImportsResolve(name, base, conditions) { + if (name === "#" || name.startsWith("#/") || name.endsWith("/")) throw new ERR_INVALID_MODULE_SPECIFIER(name, "is not a valid internal imports specifier name", fileURLToPath(base)); + let packageJsonUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJsonUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) if (own2.call(imports, name) && !name.includes("*")) { + const resolveResult = resolvePackageTarget(packageJsonUrl, imports[name], "", name, base, false, true, false, conditions); + if (resolveResult !== null && resolveResult !== void 0) return resolveResult; + } else { + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(imports); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + const patternIndex = key2.indexOf("*"); + if (patternIndex !== -1 && name.startsWith(key2.slice(0, -1))) { + const patternTrailer = key2.slice(patternIndex + 1); + if (name.length >= key2.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key2) === 1 && key2.lastIndexOf("*") === patternIndex) { + bestMatch = key2; + bestMatchSubpath = name.slice(patternIndex, name.length - patternTrailer.length); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget(packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions); + if (resolveResult !== null && resolveResult !== void 0) return resolveResult; + } + } + } + throw importNotDefined(name, packageJsonUrl, base); +} +function parsePackageName(specifier, base) { + let separatorIndex = specifier.indexOf("/"); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === "@") { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) validPackageName = false; + else separatorIndex = specifier.indexOf("/", separatorIndex + 1); + } + const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); + if (invalidPackageNameRegEx.exec(packageName) !== null) validPackageName = false; + if (!validPackageName) throw new ERR_INVALID_MODULE_SPECIFIER(specifier, "is not a valid package name", fileURLToPath(base)); + return { + packageName, + packageSubpath: "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)), + isScoped + }; +} +function packageResolve(specifier, base, conditions) { + if (builtinModules.includes(specifier)) return new URL("node:" + specifier); + const { packageName, packageSubpath, isScoped } = parsePackageName(specifier, base); + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + const packageJsonUrl2 = pathToFileURL(packageConfig.pjsonPath); + if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl2, packageSubpath, packageConfig, base, conditions); + } + let packageJsonUrl = new URL("./node_modules/" + packageName + "/package.json", base); + let packageJsonPath = fileURLToPath(packageJsonUrl); + let lastPath; + do { + const stat2 = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat2 || !stat2.isDirectory()) { + lastPath = packageJsonPath; + packageJsonUrl = new URL((isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl); + packageJsonPath = fileURLToPath(packageJsonUrl); + continue; + } + const packageConfig2 = read2(packageJsonPath, { + base, + specifier + }); + if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig2, base, conditions); + if (packageSubpath === ".") return legacyMainResolve(packageJsonUrl, packageConfig2, base); + return new URL(packageSubpath, packageJsonUrl); + } while (packageJsonPath.length !== lastPath.length); + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false); +} +function isRelativeSpecifier(specifier) { + if (specifier[0] === ".") { + if (specifier.length === 1 || specifier[1] === "/") return true; + if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) return true; + } + return false; +} +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === "") return false; + if (specifier[0] === "/") return true; + return isRelativeSpecifier(specifier); +} +function moduleResolve(specifier, base, conditions, preserveSymlinks) { + if (conditions === void 0) conditions = getConditionsSet(); + const protocol = base.protocol; + const isRemote = protocol === "data:" || protocol === "http:" || protocol === "https:"; + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) try { + resolved = new URL(specifier, base); + } catch (error_) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + else if (protocol === "file:" && specifier[0] === "#") resolved = packageImportsResolve(specifier, base, conditions); + else try { + resolved = new URL(specifier); + } catch (error_) { + if (isRemote && !builtinModules.includes(specifier)) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + resolved = packageResolve(specifier, base, conditions); + } + assert2.ok(resolved !== void 0, "expected to be defined"); + if (resolved.protocol !== "file:") return resolved; + return finalizeResolution(resolved, base, preserveSymlinks); +} +function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { + if (parsedParentURL) { + const parentProtocol = parsedParentURL.protocol; + if (parentProtocol === "http:" || parentProtocol === "https:") { + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + const parsedProtocol = parsed?.protocol; + if (parsedProtocol && parsedProtocol !== "https:" && parsedProtocol !== "http:") throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, "remote imports cannot import from a local location."); + return { url: parsed?.href || "" }; + } + if (builtinModules.includes(specifier)) throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, "remote imports cannot import from a local location."); + throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier, parsedParentURL, "only relative and absolute specifiers are supported."); + } + } +} +function isURL(self) { + return Boolean(self && typeof self === "object" && "href" in self && typeof self.href === "string" && "protocol" in self && typeof self.protocol === "string" && self.href && self.protocol); +} +function throwIfInvalidParentURL(parentURL) { + if (parentURL === void 0) return; + if (typeof parentURL !== "string" && !isURL(parentURL)) throw new codes.ERR_INVALID_ARG_TYPE("parentURL", ["string", "URL"], parentURL); +} +function defaultResolve(specifier, context = {}) { + const { parentURL } = context; + assert2.ok(parentURL !== void 0, "expected `parentURL` to be defined"); + throwIfInvalidParentURL(parentURL); + let parsedParentURL; + if (parentURL) try { + parsedParentURL = new URL(parentURL); + } catch {} + let parsed; + let protocol; + try { + parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new URL(specifier, parsedParentURL) : new URL(specifier); + protocol = parsed.protocol; + if (protocol === "data:") return { + url: parsed.href, + format: null + }; + } catch {} + const maybeReturn = checkIfDisallowedImport(specifier, parsed, parsedParentURL); + if (maybeReturn) return maybeReturn; + if (protocol === void 0 && parsed) protocol = parsed.protocol; + if (protocol === "node:") return { url: specifier }; + if (parsed && parsed.protocol === "node:") return { url: specifier }; + const conditions = getConditionsSet(context.conditions); + const url3 = moduleResolve(specifier, new URL(parentURL), conditions, false); + return { + url: url3.href, + format: defaultGetFormatWithoutErrors(url3, { parentURL }) + }; +} +function resolve2(specifier, parent) { + if (!parent) throw new Error("Please pass `parent`: `import-meta-resolve` cannot ponyfill that"); + try { + return defaultResolve(specifier, { parentURL: parent }).url; + } catch (error) { + const exception = error; + if ((exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" || exception.code === "ERR_MODULE_NOT_FOUND") && typeof exception.url === "string") return exception.url; + throw error; + } +} +function importFromFile(specifier, parent) { + return import(resolve2(specifier, pathToFileURL(parent).href)); +} +function requireFromFile(id, parent) { + return createRequire(parent)(id); +} +async function loadExternalConfig(externalConfig, configFile) { + try { + const required = require_from_file_default(externalConfig, configFile); + if (process.features.require_module && required.__esModule) return required.default; + return required; + } catch (error) { + if (!requireErrorCodesShouldBeIgnored.has(error?.code)) throw error; + } + return (await import_from_file_default(externalConfig, configFile)).default; +} +async function loadConfig(configFile) { + const { base: fileName, ext: extension } = path10.parse(configFile); + const load = fileName === "package.json" ? loadConfigFromPackageJson : fileName === "package.yaml" ? loadConfigFromPackageYaml : loaders_default[extension]; + if (!load) throw new Error(`No loader specified for extension "${extension || "noExt"}"`); + let config = await load(configFile); + if (!config) return; + if (typeof config === "string") config = await load_external_config_default(config, configFile); + if (typeof config !== "object") throw new TypeError(`Config is only allowed to be an object, but received ${typeof config} in "${configFile}"`); + delete config.$schema; + return config; +} +function clearPrettierConfigCache() { + loadCache.clear(); + searchCache.clear(); +} +function loadPrettierConfig(configFile, { shouldCache }) { + configFile = path10.resolve(configFile); + if (!shouldCache || !loadCache.has(configFile)) loadCache.set(configFile, load_config_default(configFile)); + return loadCache.get(configFile); +} +function getSearchFunction(stopDirectory) { + stopDirectory = stopDirectory ? path10.resolve(stopDirectory) : void 0; + if (!searchCache.has(stopDirectory)) { + const searcher2 = config_searcher_default(stopDirectory); + const searchFunction = searcher2.search.bind(searcher2); + searchCache.set(stopDirectory, searchFunction); + } + return searchCache.get(stopDirectory); +} +function searchPrettierConfig(startDirectory, options8 = {}) { + startDirectory = startDirectory ? path10.resolve(startDirectory) : process.cwd(); + return getSearchFunction(mockable_default.getPrettierConfigSearchStopDirectory())(startDirectory, { cache: options8.shouldCache }); +} +function clearCache() { + clearPrettierConfigCache(); + clearEditorconfigCache(); +} +function loadEditorconfig2(file, options8) { + if (!file || !options8.editorconfig) return; + const shouldCache = options8.useCache; + return loadEditorconfig(file, { shouldCache }); +} +async function loadPrettierConfig2(file, options8) { + const shouldCache = options8.useCache; + let configFile = options8.config; + if (!configFile) configFile = await searchPrettierConfig(file ? path10.dirname(path10.resolve(file)) : void 0, { shouldCache }); + if (!configFile) return; + configFile = toPath(configFile); + return { + config: await loadPrettierConfig(configFile, { shouldCache }), + configFile + }; +} +async function resolveConfig(fileUrlOrPath, options8) { + options8 = { + useCache: true, + ...options8 + }; + const filePath = toPath(fileUrlOrPath); + const [result, editorConfigured] = await Promise.all([loadPrettierConfig2(filePath, options8), loadEditorconfig2(filePath, options8)]); + if (!result && !editorConfigured) return null; + const merged = { + ...editorConfigured, + ...mergeOverrides(result, filePath) + }; + if (Array.isArray(merged.plugins)) merged.plugins = merged.plugins.map((value) => typeof value === "string" && value.startsWith(".") ? path10.resolve(path10.dirname(result.configFile), value) : value); + return merged; +} +async function resolveConfigFile(fileUrlOrPath) { + return await searchPrettierConfig(fileUrlOrPath ? path10.dirname(path10.resolve(toPath(fileUrlOrPath))) : void 0, { shouldCache: false }) ?? null; +} +function mergeOverrides(configResult, filePath) { + const { config, configFile } = configResult || {}; + const { overrides, ...options8 } = config || {}; + if (filePath && overrides) { + const relativeFilePath = path10.relative(path10.dirname(configFile), filePath); + for (const override of overrides) if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) Object.assign(options8, override.options); + } + return options8; +} +function pathMatchesGlobs(filePath, patterns, excludedPatterns) { + const [withSlashes, withoutSlashes] = partition_default(Array.isArray(patterns) ? patterns : [patterns], (pattern) => pattern.includes("/")); + return import_micromatch.default.isMatch(filePath, withoutSlashes, { + ignore: excludedPatterns, + basename: true, + dot: true + }) || import_micromatch.default.isMatch(filePath, withSlashes, { + ignore: excludedPatterns, + basename: false, + dot: true + }); +} +function guessEndOfLine(text) { + const index = text.indexOf(CHARACTER_CR); + if (index !== -1) return text.charAt(index + 1) === CHARACTER_LF ? OPTION_CRLF : OPTION_CR; + return DEFAULT_OPTION; +} +function convertEndOfLineOptionToCharacter(endOfLineOption) { + return endOfLineOption === OPTION_CR ? CHARACTER_CR : endOfLineOption === OPTION_CRLF ? CHARACTER_CRLF : DEFAULT_EOL; +} +function countEndOfLineCharacters(text, endOfLineCharacter) { + const regex = regexps.get(endOfLineCharacter); + return text.match(regex)?.length ?? 0; +} +function normalizeEndOfLine(text) { + return method_replace_all_default(0, text, END_OF_LINE_REGEXP, CHARACTER_LF); +} +function stringOrArrayAt(index) { + return this[index < 0 ? this.length + index : index]; +} +function inheritLabel(doc2, fn) { + return doc2.type === DOC_TYPE_LABEL ? { + ...doc2, + contents: fn(doc2.contents) + } : fn(doc2); +} +function flattenDoc(doc2) { + if (!doc2) return ""; + if (Array.isArray(doc2)) { + const res = []; + for (const part of doc2) if (Array.isArray(part)) res.push(...flattenDoc(part)); + else { + const flattened = flattenDoc(part); + if (flattened !== "") res.push(flattened); + } + return res; + } + if (doc2.type === DOC_TYPE_IF_BREAK) return { + ...doc2, + breakContents: flattenDoc(doc2.breakContents), + flatContents: flattenDoc(doc2.flatContents) + }; + if (doc2.type === DOC_TYPE_GROUP) return { + ...doc2, + contents: flattenDoc(doc2.contents), + expandedStates: doc2.expandedStates?.map(flattenDoc) + }; + if (doc2.type === DOC_TYPE_FILL) return { + type: "fill", + parts: doc2.parts.map(flattenDoc) + }; + if (doc2.contents) return { + ...doc2, + contents: flattenDoc(doc2.contents) + }; + return doc2; +} +function printDocToDebug(doc2) { + const printedSymbols = /* @__PURE__ */ Object.create(null); + const usedKeysForSymbols = /* @__PURE__ */ new Set(); + return printDoc(flattenDoc(doc2)); + function printDoc(doc3, index, parentParts) { + if (typeof doc3 === "string") return JSON.stringify(doc3); + if (Array.isArray(doc3)) { + const printed = doc3.map(printDoc).filter(Boolean); + return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`; + } + if (doc3.type === DOC_TYPE_LINE) { + const withBreakParent = parentParts?.[index + 1]?.type === DOC_TYPE_BREAK_PARENT; + if (doc3.literal) return withBreakParent ? "literalline" : "literallineWithoutBreakParent"; + if (doc3.hard) return withBreakParent ? "hardline" : "hardlineWithoutBreakParent"; + if (doc3.soft) return "softline"; + return "line"; + } + if (doc3.type === DOC_TYPE_BREAK_PARENT) return parentParts?.[index - 1]?.type === DOC_TYPE_LINE && parentParts[index - 1].hard ? void 0 : "breakParent"; + if (doc3.type === DOC_TYPE_TRIM) return "trim"; + if (doc3.type === DOC_TYPE_INDENT) return "indent(" + printDoc(doc3.contents) + ")"; + if (doc3.type === DOC_TYPE_ALIGN) return doc3.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + printDoc(doc3.contents) + ")" : doc3.n < 0 ? "dedent(" + printDoc(doc3.contents) + ")" : doc3.n.type === "root" ? "markAsRoot(" + printDoc(doc3.contents) + ")" : "align(" + JSON.stringify(doc3.n) + ", " + printDoc(doc3.contents) + ")"; + if (doc3.type === DOC_TYPE_IF_BREAK) return "ifBreak(" + printDoc(doc3.breakContents) + (doc3.flatContents ? ", " + printDoc(doc3.flatContents) : "") + (doc3.groupId ? (!doc3.flatContents ? ", \"\"" : "") + `, { groupId: ${printGroupId(doc3.groupId)} }` : "") + ")"; + if (doc3.type === DOC_TYPE_INDENT_IF_BREAK) { + const optionsParts = []; + if (doc3.negate) optionsParts.push("negate: true"); + if (doc3.groupId) optionsParts.push(`groupId: ${printGroupId(doc3.groupId)}`); + const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + return `indentIfBreak(${printDoc(doc3.contents)}${options8})`; + } + if (doc3.type === DOC_TYPE_GROUP) { + const optionsParts = []; + if (doc3.break && doc3.break !== "propagated") optionsParts.push("shouldBreak: true"); + if (doc3.id) optionsParts.push(`id: ${printGroupId(doc3.id)}`); + const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + if (doc3.expandedStates) return `conditionalGroup([${doc3.expandedStates.map((part) => printDoc(part)).join(",")}]${options8})`; + return `group(${printDoc(doc3.contents)}${options8})`; + } + if (doc3.type === DOC_TYPE_FILL) return `fill([${doc3.parts.map((part) => printDoc(part)).join(", ")}])`; + if (doc3.type === DOC_TYPE_LINE_SUFFIX) return "lineSuffix(" + printDoc(doc3.contents) + ")"; + if (doc3.type === DOC_TYPE_LINE_SUFFIX_BOUNDARY) return "lineSuffixBoundary"; + if (doc3.type === DOC_TYPE_LABEL) return `label(${JSON.stringify(doc3.label)}, ${printDoc(doc3.contents)})`; + if (doc3.type === DOC_TYPE_CURSOR) return "cursor"; + throw new Error("Unknown doc type " + doc3.type); + } + function printGroupId(id) { + if (typeof id !== "symbol") return JSON.stringify(String(id)); + if (id in printedSymbols) return printedSymbols[id]; + const prefix = id.description || "symbol"; + for (let counter = 0;; counter++) { + const key2 = prefix + (counter > 0 ? ` #${counter}` : ""); + if (!usedKeysForSymbols.has(key2)) { + usedKeysForSymbols.add(key2); + return printedSymbols[id] = `Symbol.for(${JSON.stringify(key2)})`; + } + } + } +} +function isFullWidth(x) { + return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510; +} +function isWide(x) { + return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x >= 94192 && x <= 94198 || x >= 94208 && x <= 101589 || x >= 101631 && x <= 101662 || x >= 101760 && x <= 101874 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128728 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129674 || x >= 129678 && x <= 129734 || x === 129736 || x >= 129741 && x <= 129756 || x >= 129759 && x <= 129770 || x >= 129775 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141; +} +function getStringWidth(text) { + if (!text) return 0; + if (!notAsciiRegex.test(text)) return text.length; + text = text.replace(emoji_regex_default(), (match) => narrowEmojisSet.has(match) ? " " : " "); + let width = 0; + for (const character of text) { + const codePoint = character.codePointAt(0); + if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue; + if (codePoint >= 768 && codePoint <= 879) continue; + if (codePoint >= 65024 && codePoint <= 65039) continue; + width += isFullWidth(codePoint) || isWide(codePoint) ? 2 : 1; + } + return width; +} +function getAlignmentSize(text, tabWidth, startIndex = 0) { + let size = 0; + for (let i = startIndex; i < text.length; ++i) if (text[i] === " ") size = size + tabWidth - size % tabWidth; + else size++; + return size; +} +function isObject(object) { + return object !== null && typeof object === "object"; +} +function skip(characters) { + return (text, startIndex, options8) => { + const backwards = Boolean(options8?.backwards); + if (startIndex === false) return false; + const { length } = text; + let cursor2 = startIndex; + while (cursor2 >= 0 && cursor2 < length) { + const character = text.charAt(cursor2); + if (characters instanceof RegExp) { + if (!characters.test(character)) return cursor2; + } else if (!characters.includes(character)) return cursor2; + backwards ? cursor2-- : cursor2++; + } + if (cursor2 === -1 || cursor2 === length) return cursor2; + return false; + }; +} +function skipNewline(text, startIndex, options8) { + const backwards = Boolean(options8?.backwards); + if (startIndex === false) return false; + const character = text.charAt(startIndex); + if (backwards) { + if (text.charAt(startIndex - 1) === "\r" && character === "\n") return startIndex - 2; + if (isNewlineCharacter(character)) return startIndex - 1; + } else { + if (character === "\r" && text.charAt(startIndex + 1) === "\n") return startIndex + 2; + if (isNewlineCharacter(character)) return startIndex + 1; + } + return startIndex; +} +function hasNewline(text, startIndex, options8 = {}) { + const idx = skipSpaces(text, options8.backwards ? startIndex - 1 : startIndex, options8); + return idx !== skip_newline_default(text, idx, options8); +} +function isNonEmptyArray(object) { + return Array.isArray(object) && object.length > 0; +} +function* getChildren(node, options8) { + const { getVisitorKeys, filter: filter2 = () => true } = options8; + const isMatchedNode = (node2) => is_object_default(node2) && filter2(node2); + for (const key2 of getVisitorKeys(node)) { + const value = node[key2]; + if (Array.isArray(value)) { + for (const child of value) if (isMatchedNode(child)) yield child; + } else if (isMatchedNode(value)) yield value; + } +} +function* getDescendants(node, options8) { + const queue = [node]; + for (let index = 0; index < queue.length; index++) { + const node2 = queue[index]; + for (const child of getChildren(node2, options8)) { + yield child; + queue.push(child); + } + } +} +function isLeaf(node, options8) { + return getChildren(node, options8).next().done; +} +function getSortedChildNodes(node, ancestors, options8) { + const { cache: childNodesCache2 } = options8; + if (childNodesCache2.has(node)) return childNodesCache2.get(node); + const { filter: filter2 } = options8; + if (!filter2) return []; + let childAncestors; + const childNodes = (options8.getChildren?.(node, options8) ?? [...getChildren(node, { getVisitorKeys: options8.getVisitorKeys })]).flatMap((child) => { + childAncestors ?? (childAncestors = [node, ...ancestors]); + return filter2(child, childAncestors) ? [child] : getSortedChildNodes(child, childAncestors, options8); + }); + const { locStart, locEnd } = options8; + childNodes.sort((nodeA, nodeB) => locStart(nodeA) - locStart(nodeB) || locEnd(nodeA) - locEnd(nodeB)); + childNodesCache2.set(node, childNodes); + return childNodes; +} +function describeNodeForDebugging(node) { + const nodeType = node.type || node.kind || "(unknown type)"; + let nodeName = String(node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || ""); + if (nodeName.length > 20) nodeName = nodeName.slice(0, 19) + "…"; + return nodeType + (nodeName ? " " + nodeName : ""); +} +function addCommentHelper(node, comment) { + (node.comments ?? (node.comments = [])).push(comment); + comment.printed = false; + comment.nodeDescription = describeNodeForDebugging(node); +} +function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} +function addDanglingComment(node, comment, marker) { + comment.leading = false; + comment.trailing = false; + if (marker) comment.marker = marker; + addCommentHelper(node, comment); +} +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} +function decorateComment(node, comment, options8, enclosingNode, ancestors = []) { + const { locStart, locEnd } = options8; + const commentStart = locStart(comment); + const commentEnd = locEnd(comment); + const childNodes = get_sorted_child_nodes_default(node, ancestors, { + cache: childNodesCache, + locStart, + locEnd, + getVisitorKeys: options8.getVisitorKeys, + filter: options8.printer.canAttachComment, + getChildren: options8.printer.getCommentChildNodes + }); + let precedingNode; + let followingNode; + let left = 0; + let right = childNodes.length; + while (left < right) { + const middle = left + right >> 1; + const child = childNodes[middle]; + const start = locStart(child); + const end = locEnd(child); + if (start <= commentStart && commentEnd <= end) return decorateComment(child, comment, options8, child, [child, ...ancestors]); + if (end <= commentStart) { + precedingNode = child; + left = middle + 1; + continue; + } + if (commentEnd <= start) { + followingNode = child; + right = middle; + continue; + } + throw new Error("Comment location overlaps with node location"); + } + if (enclosingNode?.type === "TemplateLiteral") { + const { quasis } = enclosingNode; + const commentIndex = findExpressionIndexForComment(quasis, comment, options8); + if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options8) !== commentIndex) precedingNode = null; + if (followingNode && findExpressionIndexForComment(quasis, followingNode, options8) !== commentIndex) followingNode = null; + } + return { + enclosingNode, + precedingNode, + followingNode + }; +} +function attachComments(ast, options8) { + const { comments } = ast; + delete ast.comments; + if (!is_non_empty_array_default(comments) || !options8.printer.canAttachComment) return; + const tiesToBreak = []; + const { printer: { features: { experimental_avoidAstMutation: avoidAstMutation }, handleComments = {} }, originalText: text } = options8; + const { ownLine: handleOwnLineComment = returnFalse, endOfLine: handleEndOfLineComment = returnFalse, remaining: handleRemainingComment = returnFalse } = handleComments; + const decoratedComments = comments.map((comment, index) => ({ + ...decorateComment(ast, comment, options8), + comment, + text, + options: options8, + ast, + isLastComment: comments.length - 1 === index + })); + for (const [index, context] of decoratedComments.entries()) { + const { comment, precedingNode, enclosingNode, followingNode, text: text2, options: options9, ast: ast2, isLastComment } = context; + let args; + if (avoidAstMutation) args = [context]; + else { + comment.enclosingNode = enclosingNode; + comment.precedingNode = precedingNode; + comment.followingNode = followingNode; + args = [ + comment, + text2, + options9, + ast2, + isLastComment + ]; + } + if (isOwnLineComment(text2, options9, decoratedComments, index)) { + comment.placement = "ownLine"; + if (handleOwnLineComment(...args)) {} else if (followingNode) addLeadingComment(followingNode, comment); + else if (precedingNode) addTrailingComment(precedingNode, comment); + else if (enclosingNode) addDanglingComment(enclosingNode, comment); + else addDanglingComment(ast2, comment); + } else if (isEndOfLineComment(text2, options9, decoratedComments, index)) { + comment.placement = "endOfLine"; + if (handleEndOfLineComment(...args)) {} else if (precedingNode) addTrailingComment(precedingNode, comment); + else if (followingNode) addLeadingComment(followingNode, comment); + else if (enclosingNode) addDanglingComment(enclosingNode, comment); + else addDanglingComment(ast2, comment); + } else { + comment.placement = "remaining"; + if (handleRemainingComment(...args)) {} else if (precedingNode && followingNode) { + const tieCount = tiesToBreak.length; + if (tieCount > 0) { + if (tiesToBreak[tieCount - 1].followingNode !== followingNode) breakTies(tiesToBreak, options9); + } + tiesToBreak.push(context); + } else if (precedingNode) addTrailingComment(precedingNode, comment); + else if (followingNode) addLeadingComment(followingNode, comment); + else if (enclosingNode) addDanglingComment(enclosingNode, comment); + else addDanglingComment(ast2, comment); + } + } + breakTies(tiesToBreak, options8); + if (!avoidAstMutation) for (const comment of comments) { + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + } +} +function isOwnLineComment(text, options8, decoratedComments, commentIndex) { + const { comment, precedingNode } = decoratedComments[commentIndex]; + const { locStart, locEnd } = options8; + let start = locStart(comment); + if (precedingNode) for (let index = commentIndex - 1; index >= 0; index--) { + const { comment: comment2, precedingNode: currentCommentPrecedingNode } = decoratedComments[index]; + if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text.slice(locEnd(comment2), start))) break; + start = locStart(comment2); + } + return has_newline_default(text, start, { backwards: true }); +} +function isEndOfLineComment(text, options8, decoratedComments, commentIndex) { + const { comment, followingNode } = decoratedComments[commentIndex]; + const { locStart, locEnd } = options8; + let end = locEnd(comment); + if (followingNode) for (let index = commentIndex + 1; index < decoratedComments.length; index++) { + const { comment: comment2, followingNode: currentCommentFollowingNode } = decoratedComments[index]; + if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text.slice(end, locStart(comment2)))) break; + end = locEnd(comment2); + } + return has_newline_default(text, end); +} +function breakTies(tiesToBreak, options8) { + const tieCount = tiesToBreak.length; + if (tieCount === 0) return; + const { precedingNode, followingNode } = tiesToBreak[0]; + let gapEndPos = options8.locStart(followingNode); + let indexOfFirstLeadingComment; + for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { + const { comment, precedingNode: currentCommentPrecedingNode, followingNode: currentCommentFollowingNode } = tiesToBreak[indexOfFirstLeadingComment - 1]; + strictEqual(currentCommentPrecedingNode, precedingNode); + strictEqual(currentCommentFollowingNode, followingNode); + const gap = options8.originalText.slice(options8.locEnd(comment), gapEndPos); + if (options8.printer.isGap?.(gap, options8) ?? /^[\s(]*$/u.test(gap)) gapEndPos = options8.locStart(comment); + else break; + } + for (const [i, { comment }] of tiesToBreak.entries()) if (i < indexOfFirstLeadingComment) addTrailingComment(precedingNode, comment); + else addLeadingComment(followingNode, comment); + for (const node of [precedingNode, followingNode]) if (node.comments && node.comments.length > 1) node.comments.sort((a, b) => options8.locStart(a) - options8.locStart(b)); + tiesToBreak.length = 0; +} +function findExpressionIndexForComment(quasis, comment, options8) { + const startPos = options8.locStart(comment) - 1; + for (let i = 1; i < quasis.length; ++i) if (startPos < options8.locStart(quasis[i])) return i - 1; + return 0; +} +function isPreviousLineEmpty(text, startIndex) { + let idx = startIndex - 1; + idx = skipSpaces(text, idx, { backwards: true }); + idx = skip_newline_default(text, idx, { backwards: true }); + idx = skipSpaces(text, idx, { backwards: true }); + const idx2 = skip_newline_default(text, idx, { backwards: true }); + return idx !== idx2; +} +function printComment(path15, options8) { + const comment = path15.node; + comment.printed = true; + return options8.printer.printComment(path15, options8); +} +function printLeadingComment(path15, options8) { + const comment = path15.node; + const parts = [printComment(path15, options8)]; + const { printer, originalText, locStart, locEnd } = options8; + if (printer.isBlockComment?.(comment)) { + const lineBreak = has_newline_default(originalText, locEnd(comment)) ? has_newline_default(originalText, locStart(comment), { backwards: true }) ? hardline : line2 : " "; + parts.push(lineBreak); + } else parts.push(hardline); + const index = skip_newline_default(originalText, skipSpaces(originalText, locEnd(comment))); + if (index !== false && has_newline_default(originalText, index)) parts.push(hardline); + return parts; +} +function printTrailingComment(path15, options8, previousComment) { + const comment = path15.node; + const printed = printComment(path15, options8); + const { printer, originalText, locStart } = options8; + const isBlock = printer.isBlockComment?.(comment); + if (previousComment?.hasLineSuffix && !previousComment?.isBlock || has_newline_default(originalText, locStart(comment), { backwards: true })) return { + doc: lineSuffix([ + hardline, + is_previous_line_empty_default(originalText, locStart(comment)) ? hardline : "", + printed + ]), + isBlock, + hasLineSuffix: true + }; + if (!isBlock || previousComment?.hasLineSuffix) return { + doc: [lineSuffix([" ", printed]), breakParent], + isBlock, + hasLineSuffix: true + }; + return { + doc: [" ", printed], + isBlock, + hasLineSuffix: false + }; +} +function printCommentsSeparately(path15, options8) { + const value = path15.node; + if (!value) return {}; + const ignored = options8[Symbol.for("printedComments")]; + if ((value.comments || []).filter((comment) => !ignored.has(comment)).length === 0) return { + leading: "", + trailing: "" + }; + const leadingParts = []; + const trailingParts = []; + let printedTrailingComment; + path15.each(() => { + const comment = path15.node; + if (ignored?.has(comment)) return; + const { leading, trailing } = comment; + if (leading) leadingParts.push(printLeadingComment(path15, options8)); + else if (trailing) { + printedTrailingComment = printTrailingComment(path15, options8, printedTrailingComment); + trailingParts.push(printedTrailingComment.doc); + } + }, "comments"); + return { + leading: leadingParts, + trailing: trailingParts + }; +} +function printComments(path15, doc2, options8) { + const { leading, trailing } = printCommentsSeparately(path15, options8); + if (!leading && !trailing) return doc2; + return inheritLabel(doc2, (doc3) => [ + leading, + doc3, + trailing + ]); +} +function ensureAllCommentsPrinted(options8) { + const { [Symbol.for("comments")]: comments, [Symbol.for("printedComments")]: printedComments } = options8; + for (const comment of comments) { + if (!comment.printed && !printedComments.has(comment)) throw new Error("Comment \"" + comment.value.trim() + "\" was not printed. Please report this error!"); + delete comment.printed; + } +} +function getSupportInfo({ plugins = [], showDeprecated = false } = {}) { + const languages2 = plugins.flatMap((plugin) => plugin.languages ?? []); + const options8 = []; + for (const option of normalizeOptionSettings(Object.assign({}, ...plugins.map(({ options: options9 }) => options9), core_options_evaluate_default))) { + if (!showDeprecated && option.deprecated) continue; + if (Array.isArray(option.choices)) { + if (!showDeprecated) option.choices = option.choices.filter((choice) => !choice.deprecated); + if (option.name === "parser") option.choices = [...option.choices, ...collectParsersFromLanguages(option.choices, languages2, plugins)]; + } + option.pluginDefaults = Object.fromEntries(plugins.filter((plugin) => plugin.defaultOptions?.[option.name] !== void 0).map((plugin) => [plugin.name, plugin.defaultOptions[option.name]])); + options8.push(option); + } + return { + languages: languages2, + options: options8 + }; +} +function* collectParsersFromLanguages(parserChoices, languages2, plugins) { + const existingParsers = new Set(parserChoices.map((choice) => choice.value)); + for (const language of languages2) if (language.parsers) { + for (const parserName of language.parsers) if (!existingParsers.has(parserName)) { + existingParsers.add(parserName); + const plugin = plugins.find((plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)); + let description = language.name; + if (plugin?.name) description += ` (plugin: ${plugin.name})`; + yield { + value: parserName, + description + }; + } + } +} +function normalizeOptionSettings(settings) { + const options8 = []; + for (const [name, originalOption] of Object.entries(settings)) { + const option = { + name, + ...originalOption + }; + if (Array.isArray(option.default)) option.default = method_at_default(0, option.default, -1).value; + options8.push(option); + } + return options8; +} +function getInterpreter(file) { + try { + const liner = new import_n_readlines.default(file); + const firstLineBuffer = liner.next(); + if (firstLineBuffer === false) return; + liner.close(); + const firstLine = firstLineBuffer.toString("utf8"); + const m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/u); + if (m1) return m1[1]; + const m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/u); + if (m2) return m2[1]; + } catch {} +} +function getLanguageByFileName(languages2, file) { + if (!file) return; + const basename = getFileBasename(file).toLowerCase(); + return languages2.find(({ filenames }) => filenames?.some((name) => name.toLowerCase() === basename)) ?? languages2.find(({ extensions }) => extensions?.some((extension) => basename.endsWith(extension))); +} +function getLanguageByLanguageName(languages2, languageName) { + if (!languageName) return; + return languages2.find(({ name }) => name.toLowerCase() === languageName) ?? languages2.find(({ aliases }) => aliases?.includes(languageName)) ?? languages2.find(({ extensions }) => extensions?.includes(`.${languageName}`)); +} +function getLanguageByInterpreterNodejs(languages2, file) { + if (!file || getFileBasename(file).includes(".")) return; + const languagesWithInterpreters = languages2.filter(({ interpreters }) => is_non_empty_array_default(interpreters)); + if (languagesWithInterpreters.length === 0) return; + const interpreter = get_interpreter_default(file); + if (!interpreter) return; + return languagesWithInterpreters.find(({ interpreters }) => interpreters.includes(interpreter)); +} +function getLanguageByIsSupported(languages2, file) { + if (!file) return; + if (isUrl(file)) try { + file = fileURLToPath(file); + } catch { + return; + } + if (typeof file !== "string") return; + return languages2.find(({ isSupported }) => isSupported?.({ filepath: file })); +} +function inferParser(options8, fileInfo) { + const languages2 = method_to_reversed_default(0, options8.plugins).flatMap((plugin) => plugin.languages ?? []); + return (getLanguageByLanguageName(languages2, fileInfo.language) ?? getLanguageByFileName(languages2, fileInfo.physicalFile) ?? getLanguageByFileName(languages2, fileInfo.file) ?? getLanguageByIsSupported(languages2, fileInfo.physicalFile) ?? getLanguageByIsSupported(languages2, fileInfo.file) ?? getLanguageByInterpreter?.(languages2, fileInfo.physicalFile))?.parsers[0]; +} +function normalizeOptions(options8, optionInfos, { logger = false, isCLI = false, passThrough = false, FlagSchema, descriptor } = {}) { + if (isCLI) { + if (!FlagSchema) throw new Error("'FlagSchema' option is required."); + if (!descriptor) throw new Error("'descriptor' option is required."); + } else descriptor = apiDescriptor; + const unknown = !passThrough ? (key2, value, options9) => { + const { _, ...schemas2 } = options9.schemas; + return levenUnknownHandler(key2, value, { + ...options9, + schemas: schemas2 + }); + } : Array.isArray(passThrough) ? (key2, value) => !passThrough.includes(key2) ? void 0 : { [key2]: value } : (key2, value) => ({ [key2]: value }); + const normalizer = new Normalizer(optionInfosToSchemas(optionInfos, { + isCLI, + FlagSchema + }), { + logger, + unknown, + descriptor + }); + const shouldSuppressDuplicateDeprecationWarnings = logger !== false; + if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) normalizer._hasDeprecationWarned = hasDeprecationWarned; + const normalized = normalizer.normalize(options8); + if (shouldSuppressDuplicateDeprecationWarnings) hasDeprecationWarned = normalizer._hasDeprecationWarned; + return normalized; +} +function optionInfosToSchemas(optionInfos, { isCLI, FlagSchema }) { + const schemas = []; + if (isCLI) schemas.push(AnySchema.create({ name: "_" })); + for (const optionInfo of optionInfos) { + schemas.push(optionInfoToSchema(optionInfo, { + isCLI, + optionInfos, + FlagSchema + })); + if (optionInfo.alias && isCLI) schemas.push(AliasSchema.create({ + name: optionInfo.alias, + sourceName: optionInfo.name + })); + } + return schemas; +} +function optionInfoToSchema(optionInfo, { isCLI, optionInfos, FlagSchema }) { + const { name } = optionInfo; + const parameters = { name }; + let SchemaConstructor; + const handlers = {}; + switch (optionInfo.type) { + case "int": + SchemaConstructor = IntegerSchema; + if (isCLI) parameters.preprocess = Number; + break; + case "string": + SchemaConstructor = StringSchema; + break; + case "choice": + SchemaConstructor = ChoiceSchema; + parameters.choices = optionInfo.choices.map((choiceInfo) => choiceInfo?.redirect ? { + ...choiceInfo, + redirect: { to: { + key: optionInfo.name, + value: choiceInfo.redirect + } } + } : choiceInfo); + break; + case "boolean": + SchemaConstructor = BooleanSchema; + break; + case "flag": + SchemaConstructor = FlagSchema; + parameters.flags = optionInfos.flatMap((optionInfo2) => [ + optionInfo2.alias, + optionInfo2.description && optionInfo2.name, + optionInfo2.oppositeDescription && `no-${optionInfo2.name}` + ].filter(Boolean)); + break; + case "path": + SchemaConstructor = StringSchema; + break; + default: throw new Error(`Unexpected type ${optionInfo.type}`); + } + if (optionInfo.exception) parameters.validate = (value, schema, utils) => optionInfo.exception(value) || schema.validate(value, utils); + else parameters.validate = (value, schema, utils) => value === void 0 || schema.validate(value, utils); + if (optionInfo.redirect) handlers.redirect = (value) => !value ? void 0 : { to: typeof optionInfo.redirect === "string" ? optionInfo.redirect : { + key: optionInfo.redirect.option, + value: optionInfo.redirect.value + } }; + if (optionInfo.deprecated) handlers.deprecated = true; + if (isCLI && !optionInfo.array) { + const originalPreprocess = parameters.preprocess || ((x) => x); + parameters.preprocess = (value, schema, utils) => schema.preprocess(originalPreprocess(Array.isArray(value) ? method_at_default(0, value, -1) : value), utils); + } + return optionInfo.array ? ArraySchema.create({ + ...isCLI ? { preprocess: (v) => Array.isArray(v) ? v : [v] } : {}, + ...handlers, + valueSchema: SchemaConstructor.create(parameters) + }) : SchemaConstructor.create({ + ...parameters, + ...handlers + }); +} +function isFrontMatter(node) { + return Boolean(node?.[FRONT_MATTER_MARK]); +} +async function printEmbedFrontMatter(textToDoc2, print, path15, options8) { + const { node } = path15; + const { language } = node; + if (!SUPPORTED_EMBED_LANGUAGES.has(language)) return; + const value = node.value.trim(); + let doc2; + if (value) { + const parser = language === "yaml" ? language : infer_parser_default(options8, { language }); + if (!parser) return; + doc2 = value ? await textToDoc2(value, { parser }) : ""; + } else doc2 = value; + return markAsRoot([ + node.startDelimiter, + node.explicitLanguage ?? "", + hardline2, + doc2, + doc2 ? hardline2 : "", + node.endDelimiter + ]); +} +function clean(original, cloned) { + if (isEmbedFrontMatter({ node: original })) { + delete cloned.end; + delete cloned.raw; + delete cloned.value; + } + return cloned; +} +function printFrontMatter({ node }) { + return node.raw; +} +function createGetVisitorKeysFunction(printerGetVisitorKeys, supportFrontMatter) { + const getVisitorKeys = printerGetVisitorKeys ? (node) => printerGetVisitorKeys(node, nonTraversableKeys) : defaultGetVisitorKeys; + if (!supportFrontMatter) return getVisitorKeys; + return new Proxy(getVisitorKeys, { apply: (target, thisArgument, argumentsList) => is_front_matter_default(argumentsList[0]) ? FRONT_MATTER_VISITOR_KEYS : Reflect.apply(target, thisArgument, argumentsList) }); +} +function getParserPluginByParserName(plugins, parserName) { + if (!parserName) throw new Error("parserName is required."); + const plugin = method_find_last_default(0, plugins, (plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)); + if (plugin) return plugin; + throw new ConfigError(`Couldn't resolve parser "${parserName}".`); +} +function getPrinterPluginByAstFormat(plugins, astFormat) { + if (!astFormat) throw new Error("astFormat is required."); + const plugin = method_find_last_default(0, plugins, (plugin2) => plugin2.printers && Object.prototype.hasOwnProperty.call(plugin2.printers, astFormat)); + if (plugin) return plugin; + throw new ConfigError(`Couldn't find plugin for AST format "${astFormat}".`); +} +function resolveParser({ plugins, parser }) { + return initParser(getParserPluginByParserName(plugins, parser), parser); +} +function initParser(plugin, parserName) { + const parserOrParserInitFunction = plugin.parsers[parserName]; + return typeof parserOrParserInitFunction === "function" ? parserOrParserInitFunction() : parserOrParserInitFunction; +} +async function initPrinter(plugin, astFormat) { + const printerOrPrinterInitFunction = plugin.printers[astFormat]; + return normalizePrinter(typeof printerOrPrinterInitFunction === "function" ? await printerOrPrinterInitFunction() : printerOrPrinterInitFunction); +} +function normalizePrinter(printer) { + if (normalizedPrinters.has(printer)) return normalizedPrinters.get(printer); + let { features, getVisitorKeys, embed: originalEmbed, massageAstNode: originalCleanFunction, print: originalPrint, ...printerRestProperties } = printer; + features = normalizePrinterFeatures(features); + const frontMatterSupport = features.experimental_frontMatterSupport; + getVisitorKeys = create_get_visitor_keys_function_default( + getVisitorKeys, + /** frontMatterVisitorKeys */ + frontMatterSupport.massageAstNode || frontMatterSupport.embed || frontMatterSupport.print + ); + let massageAstNode = originalCleanFunction; + if (originalCleanFunction && frontMatterSupport.massageAstNode) massageAstNode = new Proxy(originalCleanFunction, { apply(target, thisArgument, argumentsList) { + clean_default(...argumentsList); + return Reflect.apply(target, thisArgument, argumentsList); + } }); + let embed = originalEmbed; + if (originalEmbed) { + let embedGetVisitorKeys; + embed = new Proxy(originalEmbed, { + get(target, property, receiver) { + if (property === "getVisitorKeys") { + embedGetVisitorKeys ?? (embedGetVisitorKeys = originalEmbed.getVisitorKeys ? create_get_visitor_keys_function_default( + originalEmbed.getVisitorKeys, + /** frontMatterVisitorKeys */ + frontMatterSupport.massageAstNode || frontMatterSupport.embed + ) : getVisitorKeys); + return embedGetVisitorKeys; + } + return Reflect.get(target, property, receiver); + }, + apply: (target, thisArgument, argumentsList) => frontMatterSupport.embed && isEmbedFrontMatter(...argumentsList) ? printEmbedFrontMatter : Reflect.apply(target, thisArgument, argumentsList) + }); + } + let print = originalPrint; + if (frontMatterSupport.print) print = new Proxy(originalPrint, { apply(target, thisArgument, argumentsList) { + const [path15] = argumentsList; + if (is_front_matter_default(path15.node)) return print_default(path15); + return Reflect.apply(target, thisArgument, argumentsList); + } }); + const normalizedPrinter = { + features, + getVisitorKeys, + embed, + massageAstNode, + print, + ...printerRestProperties + }; + normalizedPrinters.set(printer, normalizedPrinter); + return normalizedPrinter; +} +function normalizePrinterFrontMatterSupport(frontMatterSupport) { + return { + ...PRINTER_FRONT_MATTER_SUPPORT_OFF, + ...frontMatterSupport + }; +} +function normalizePrinterFeatures(features) { + return { + experimental_avoidAstMutation: false, + ...features, + experimental_frontMatterSupport: normalizePrinterFrontMatterSupport(features?.experimental_frontMatterSupport) + }; +} +async function normalizeFormatOptions(options8, opts = {}) { + const rawOptions = { ...options8 }; + if (!rawOptions.parser) if (!rawOptions.filepath) throw new UndefinedParserError("No parser and no file path given, couldn't infer a parser."); + else { + rawOptions.parser = infer_parser_default(rawOptions, { physicalFile: rawOptions.filepath }); + if (!rawOptions.parser) throw new UndefinedParserError(`No parser could be inferred for file "${rawOptions.filepath}".`); + } + const supportOptions = getSupportInfo({ + plugins: options8.plugins, + showDeprecated: true + }).options; + const defaults = { + ...formatOptionsHiddenDefaults, + ...Object.fromEntries(supportOptions.filter((optionInfo) => optionInfo.default !== void 0).map((option) => [option.name, option.default])) + }; + const parserPlugin = getParserPluginByParserName(rawOptions.plugins, rawOptions.parser); + const parser = await initParser(parserPlugin, rawOptions.parser); + rawOptions.astFormat = parser.astFormat; + rawOptions.locEnd = parser.locEnd; + rawOptions.locStart = parser.locStart; + const printerPlugin = parserPlugin.printers?.[parser.astFormat] ? parserPlugin : getPrinterPluginByAstFormat(rawOptions.plugins, parser.astFormat); + const printer = await initPrinter(printerPlugin, parser.astFormat); + rawOptions.printer = printer; + rawOptions.getVisitorKeys = printer.getVisitorKeys; + const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries(Object.entries(printerPlugin.defaultOptions).filter(([, value]) => value !== void 0)) : {}; + const mixedDefaults = { + ...defaults, + ...pluginDefaults + }; + for (const [k, value] of Object.entries(mixedDefaults)) if (rawOptions[k] === null || rawOptions[k] === void 0) rawOptions[k] = value; + if (rawOptions.parser === "json") rawOptions.trailingComma = "none"; + return normalize_options_default(rawOptions, supportOptions, { + passThrough: Object.keys(formatOptionsHiddenDefaults), + ...opts + }); +} +async function parse5(originalText, options8) { + const parser = await resolveParser(options8); + const text = parser.preprocess ? await parser.preprocess(originalText, options8) : originalText; + options8.originalText = text; + let ast; + try { + ast = await parser.parse(text, options8, options8); + } catch (error) { + handleParseError(error, originalText); + } + return { + text, + ast + }; +} +function handleParseError(error, text) { + const { loc } = error; + if (loc) { + const codeFrame = codeFrameColumns(text, loc, { highlightCode: true }); + error.message += "\n" + codeFrame; + error.codeFrame = codeFrame; + throw error; + } + throw error; +} +async function printEmbeddedLanguages(path15, genericPrint, options8, printAstToDoc2, embeds) { + if (options8.embeddedLanguageFormatting !== "auto") return; + const { printer } = options8; + const { embed } = printer; + if (!embed) return; + if (embed.length > 2) throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed"); + const { hasPrettierIgnore } = printer; + const { getVisitorKeys } = embed; + const embedCallResults = []; + recurse(); + const originalPathStack = path15.stack; + for (const { print, node, pathStack } of embedCallResults) try { + path15.stack = pathStack; + const doc2 = await print(textToDocForEmbed, genericPrint, path15, options8); + if (doc2) embeds.set(node, doc2); + } catch (error) { + if (process.env.PRETTIER_DEBUG) throw error; + } + path15.stack = originalPathStack; + function textToDocForEmbed(text, partialNextOptions) { + return textToDoc(text, partialNextOptions, options8, printAstToDoc2); + } + function recurse() { + const { node } = path15; + if (node === null || typeof node !== "object" || hasPrettierIgnore?.(path15)) return; + for (const key2 of getVisitorKeys(node)) if (Array.isArray(node[key2])) path15.each(recurse, key2); + else path15.call(recurse, key2); + const result = embed(path15, options8); + if (!result) return; + if (typeof result === "function") { + embedCallResults.push({ + print: result, + node, + pathStack: [...path15.stack] + }); + return; + } + embeds.set(node, result); + } +} +async function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc2) { + const options8 = await normalize_format_options_default({ + ...parentOptions, + ...partialNextOptions, + parentParser: parentOptions.parser, + originalText: text, + cursorOffset: void 0, + rangeStart: void 0, + rangeEnd: void 0 + }, { passThrough: true }); + const { ast } = await parse_default(text, options8); + return stripTrailingHardline(await printAstToDoc2(ast, options8)); +} +function printIgnored(path15, options8, printPath, args) { + const { originalText, [Symbol.for("comments")]: comments, locStart, locEnd, [Symbol.for("printedComments")]: printedComments } = options8; + const { node } = path15; + const start = locStart(node); + const end = locEnd(node); + for (const comment of comments) if (locStart(comment) >= start && locEnd(comment) <= end) printedComments.add(comment); + const { printPrettierIgnored } = options8.printer; + return printPrettierIgnored ? printPrettierIgnored(path15, options8, printPath, args) : originalText.slice(start, end); +} +async function printAstToDoc(ast, options8) { + ({ast} = await prepareToPrint(ast, options8)); + const cache3 = /* @__PURE__ */ new Map(); + const path15 = new ast_path_default(ast); + const ensurePrintingNode = create_print_pre_check_function_default(options8); + const embeds = /* @__PURE__ */ new Map(); + await printEmbeddedLanguages(path15, mainPrint, options8, printAstToDoc, embeds); + const doc2 = await callPluginPrintFunction(path15, options8, mainPrint, void 0, embeds); + ensureAllCommentsPrinted(options8); + if (options8.cursorOffset >= 0) { + if (options8.nodeAfterCursor && !options8.nodeBeforeCursor) return [cursor, doc2]; + if (options8.nodeBeforeCursor && !options8.nodeAfterCursor) return [doc2, cursor]; + } + return doc2; + function mainPrint(selector, args) { + if (selector === void 0 || selector === path15) return mainPrintInternal(args); + if (Array.isArray(selector)) return path15.call(() => mainPrintInternal(args), ...selector); + return path15.call(() => mainPrintInternal(args), selector); + } + function mainPrintInternal(args) { + ensurePrintingNode(path15); + const value = path15.node; + if (value === void 0 || value === null) return ""; + const shouldCache = is_object_default(value) && args === void 0; + if (shouldCache && cache3.has(value)) return cache3.get(value); + const doc3 = callPluginPrintFunction(path15, options8, mainPrint, args, embeds); + if (shouldCache) cache3.set(value, doc3); + return doc3; + } +} +function callPluginPrintFunction(path15, options8, printPath, args, embeds) { + const { node } = path15; + const { printer } = options8; + let doc2; + if (printer.hasPrettierIgnore?.(path15)) doc2 = print_ignored_default(path15, options8, printPath, args); + else if (embeds.has(node)) doc2 = embeds.get(node); + else doc2 = printer.print(path15, options8, printPath, args); + switch (node) { + case options8.cursorNode: + doc2 = inheritLabel(doc2, (doc3) => [ + cursor, + doc3, + cursor + ]); + break; + case options8.nodeBeforeCursor: + doc2 = inheritLabel(doc2, (doc3) => [doc3, cursor]); + break; + case options8.nodeAfterCursor: + doc2 = inheritLabel(doc2, (doc3) => [cursor, doc3]); + break; + } + if (printer.printComment && !printer.willPrintOwnComments?.(path15, options8)) doc2 = printComments(path15, doc2, options8); + return doc2; +} +async function prepareToPrint(ast, options8) { + const comments = ast.comments ?? []; + options8[Symbol.for("comments")] = comments; + options8[Symbol.for("printedComments")] = /* @__PURE__ */ new Set(); + attachComments(ast, options8); + const { printer: { preprocess } } = options8; + ast = preprocess ? await preprocess(ast, options8) : ast; + return { + ast, + comments + }; +} +function getCursorLocation(ast, options8) { + const { cursorOffset, locStart, locEnd, getVisitorKeys } = options8; + const nodeContainsCursor = (node) => locStart(node) <= cursorOffset && locEnd(node) >= cursorOffset; + let cursorNode = ast; + const nodesContainingCursor = [ast]; + for (const node of getDescendants(ast, { + getVisitorKeys, + filter: nodeContainsCursor + })) { + nodesContainingCursor.push(node); + cursorNode = node; + } + if (isLeaf(cursorNode, { getVisitorKeys })) return { cursorNode }; + let nodeBeforeCursor; + let nodeAfterCursor; + let nodeBeforeCursorEndIndex = -1; + let nodeAfterCursorStartIndex = Number.POSITIVE_INFINITY; + while (nodesContainingCursor.length > 0 && (nodeBeforeCursor === void 0 || nodeAfterCursor === void 0)) { + cursorNode = nodesContainingCursor.pop(); + const foundBeforeNode = nodeBeforeCursor !== void 0; + const foundAfterNode = nodeAfterCursor !== void 0; + for (const node of getChildren(cursorNode, { getVisitorKeys })) { + if (!foundBeforeNode) { + const nodeEnd = locEnd(node); + if (nodeEnd <= cursorOffset && nodeEnd > nodeBeforeCursorEndIndex) { + nodeBeforeCursor = node; + nodeBeforeCursorEndIndex = nodeEnd; + } + } + if (!foundAfterNode) { + const nodeStart = locStart(node); + if (nodeStart >= cursorOffset && nodeStart < nodeAfterCursorStartIndex) { + nodeAfterCursor = node; + nodeAfterCursorStartIndex = nodeStart; + } + } + } + } + return { + nodeBeforeCursor, + nodeAfterCursor + }; +} +function massageAst(ast, options8) { + const { printer } = options8; + const clean2 = printer.massageAstNode; + if (!clean2) return ast; + const { getVisitorKeys } = printer; + const { ignoredProperties } = clean2; + return recurse(ast); + function recurse(original, parent) { + if (!is_object_default(original)) return original; + if (Array.isArray(original)) return original.map((child) => recurse(child, parent)).filter(Boolean); + const cloned = {}; + const childrenKeys = new Set(getVisitorKeys(original)); + for (const key2 in original) { + if (!Object.prototype.hasOwnProperty.call(original, key2) || ignoredProperties?.has(key2)) continue; + if (childrenKeys.has(key2)) cloned[key2] = recurse(original[key2], original); + else cloned[key2] = original[key2]; + } + const result = clean2(original, cloned, parent); + if (result === null) return; + return result ?? cloned; + } +} +function findCommonAncestor(startNodeAndAncestors, endNodeAndAncestors) { + endNodeAndAncestors = new Set(endNodeAndAncestors); + return startNodeAndAncestors.find((node) => jsonSourceElements.has(node.type) && endNodeAndAncestors.has(node)); +} +function dropRootParents(parents) { + const index = method_find_last_index_default(0, parents, (node) => node.type !== "Program" && node.type !== "File"); + if (index === -1) return parents; + return parents.slice(0, index + 1); +} +function findSiblingAncestors(startNodeAndAncestors, endNodeAndAncestors, { locStart, locEnd }) { + let [resultStartNode, ...startNodeAncestors] = startNodeAndAncestors; + let [resultEndNode, ...endNodeAncestors] = endNodeAndAncestors; + if (resultStartNode === resultEndNode) return [resultStartNode, resultEndNode]; + const startNodeStart = locStart(resultStartNode); + for (const endAncestor of dropRootParents(endNodeAncestors)) if (locStart(endAncestor) >= startNodeStart) resultEndNode = endAncestor; + else break; + const endNodeEnd = locEnd(resultEndNode); + for (const startAncestor of dropRootParents(startNodeAncestors)) { + if (locEnd(startAncestor) <= endNodeEnd) resultStartNode = startAncestor; + else break; + if (resultStartNode === resultEndNode) break; + } + return [resultStartNode, resultEndNode]; +} +function findNodeAtOffset(node, offset, options8, predicate, ancestors = [], type) { + const { locStart, locEnd } = options8; + const start = locStart(node); + const end = locEnd(node); + if (offset > end || offset < start || type === "rangeEnd" && offset === start || type === "rangeStart" && offset === end) return; + const nodeAndAncestors = [node, ...ancestors]; + const childNodes = get_sorted_child_nodes_default(node, nodeAndAncestors, { + cache: childNodesCache, + locStart, + locEnd, + getVisitorKeys: options8.getVisitorKeys, + filter: options8.printer.canAttachComment, + getChildren: options8.printer.getCommentChildNodes + }); + for (const child of childNodes) { + const childAndAncestors = findNodeAtOffset(child, offset, options8, predicate, nodeAndAncestors, type); + if (childAndAncestors) return childAndAncestors; + } + if (predicate(node, ancestors[0])) return nodeAndAncestors; +} +function isJsSourceElement(type, parentType) { + return parentType !== "DeclareExportDeclaration" && type !== "TypeParameterDeclaration" && (type === "Directive" || type === "TypeAlias" || type === "TSExportAssignment" || type.startsWith("Declare") || type.startsWith("TSDeclare") || type.endsWith("Statement") || type.endsWith("Declaration")); +} +function isSourceElement(opts, node, parentNode) { + if (!node) return false; + switch (opts.parser) { + case "flow": + case "hermes": + case "babel": + case "babel-flow": + case "babel-ts": + case "typescript": + case "acorn": + case "espree": + case "meriyah": + case "oxc": + case "oxc-ts": + case "__babel_estree": return isJsSourceElement(node.type, parentNode?.type); + case "json": + case "json5": + case "jsonc": + case "json-stringify": return jsonSourceElements.has(node.type); + case "graphql": return graphqlSourceElements.has(node.kind); + case "vue": return node.tag !== "root"; + } + return false; +} +function calculateRange(text, opts, ast) { + let { rangeStart: start, rangeEnd: end, locStart, locEnd } = opts; + ok(end > start); + const firstNonWhitespaceCharacterIndex = text.slice(start, end).search(/\S/u); + const isAllWhitespace = firstNonWhitespaceCharacterIndex === -1; + if (!isAllWhitespace) { + start += firstNonWhitespaceCharacterIndex; + for (; end > start; --end) if (/\S/u.test(text[end - 1])) break; + } + const startNodeAndAncestors = findNodeAtOffset(ast, start, opts, (node, parentNode) => isSourceElement(opts, node, parentNode), [], "rangeStart"); + if (!startNodeAndAncestors) return; + const endNodeAndAncestors = isAllWhitespace ? startNodeAndAncestors : findNodeAtOffset(ast, end, opts, (node) => isSourceElement(opts, node), [], "rangeEnd"); + if (!endNodeAndAncestors) return; + let startNode; + let endNode; + if (isJsonParser(opts)) { + const commonAncestor = findCommonAncestor(startNodeAndAncestors, endNodeAndAncestors); + startNode = commonAncestor; + endNode = commonAncestor; + } else [startNode, endNode] = findSiblingAncestors(startNodeAndAncestors, endNodeAndAncestors, opts); + return [Math.min(locStart(startNode), locStart(endNode)), Math.max(locEnd(startNode), locEnd(endNode))]; +} +async function coreFormat(originalText, opts, addAlignmentSize = 0) { + if (!originalText || originalText.trim().length === 0) return { + formatted: "", + cursorOffset: -1, + comments: [] + }; + const { ast, text } = await parse_default(originalText, opts); + if (opts.cursorOffset >= 0) opts = { + ...opts, + ...get_cursor_node_default(ast, opts) + }; + let doc2 = await printAstToDoc(ast, opts, addAlignmentSize); + if (addAlignmentSize > 0) doc2 = addAlignmentToDoc([hardline3, doc2], addAlignmentSize, opts.tabWidth); + const result = printDocToStringWithoutNormalizeOptions(doc2, opts); + if (addAlignmentSize > 0) { + const trimmed = result.formatted.trim(); + if (result.cursorNodeStart !== void 0) { + result.cursorNodeStart -= result.formatted.indexOf(trimmed); + if (result.cursorNodeStart < 0) { + result.cursorNodeStart = 0; + result.cursorNodeText = result.cursorNodeText.trimStart(); + } + if (result.cursorNodeStart + result.cursorNodeText.length > trimmed.length) result.cursorNodeText = result.cursorNodeText.trimEnd(); + } + result.formatted = trimmed + convertEndOfLineOptionToCharacter(opts.endOfLine); + } + const comments = opts[Symbol.for("comments")]; + if (opts.cursorOffset >= 0) { + let oldCursorRegionStart; + let oldCursorRegionText; + let newCursorRegionStart; + let newCursorRegionText; + if ((opts.cursorNode || opts.nodeBeforeCursor || opts.nodeAfterCursor) && result.cursorNodeText) { + newCursorRegionStart = result.cursorNodeStart; + newCursorRegionText = result.cursorNodeText; + if (opts.cursorNode) { + oldCursorRegionStart = opts.locStart(opts.cursorNode); + oldCursorRegionText = text.slice(oldCursorRegionStart, opts.locEnd(opts.cursorNode)); + } else { + if (!opts.nodeBeforeCursor && !opts.nodeAfterCursor) throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor"); + oldCursorRegionStart = opts.nodeBeforeCursor ? opts.locEnd(opts.nodeBeforeCursor) : 0; + const oldCursorRegionEnd = opts.nodeAfterCursor ? opts.locStart(opts.nodeAfterCursor) : text.length; + oldCursorRegionText = text.slice(oldCursorRegionStart, oldCursorRegionEnd); + } + } else { + oldCursorRegionStart = 0; + oldCursorRegionText = text; + newCursorRegionStart = 0; + newCursorRegionText = result.formatted; + } + const cursorOffsetRelativeToOldCursorRegionStart = opts.cursorOffset - oldCursorRegionStart; + if (oldCursorRegionText === newCursorRegionText) return { + formatted: result.formatted, + cursorOffset: newCursorRegionStart + cursorOffsetRelativeToOldCursorRegionStart, + comments + }; + const oldCursorNodeCharArray = oldCursorRegionText.split(""); + oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorRegionStart, 0, CURSOR); + const cursorNodeDiff = diffArrays(oldCursorNodeCharArray, newCursorRegionText.split("")); + let cursorOffset = newCursorRegionStart; + for (const entry of cursorNodeDiff) if (entry.removed) { + if (entry.value.includes(CURSOR)) break; + } else cursorOffset += entry.count; + return { + formatted: result.formatted, + cursorOffset, + comments + }; + } + return { + formatted: result.formatted, + cursorOffset: -1, + comments + }; +} +async function formatRange(originalText, opts) { + const { ast, text } = await parse_default(originalText, opts); + const [rangeStart, rangeEnd] = calculateRange(text, opts, ast) ?? [0, 0]; + const rangeString = text.slice(rangeStart, rangeEnd); + const rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); + const indentString = text.slice(rangeStart2, rangeStart).match(/^\s*/u)[0]; + const alignmentSize = get_alignment_size_default(indentString, opts.tabWidth); + const rangeResult = await coreFormat(rangeString, { + ...opts, + rangeStart: 0, + rangeEnd: Number.POSITIVE_INFINITY, + cursorOffset: opts.cursorOffset > rangeStart && opts.cursorOffset <= rangeEnd ? opts.cursorOffset - rangeStart : -1, + endOfLine: "lf" + }, alignmentSize); + const rangeTrimmed = rangeResult.formatted.trimEnd(); + let { cursorOffset } = opts; + if (cursorOffset > rangeEnd) cursorOffset += rangeTrimmed.length - rangeString.length; + else if (rangeResult.cursorOffset >= 0) cursorOffset = rangeResult.cursorOffset + rangeStart; + let formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); + if (opts.endOfLine !== "lf") { + const eol = convertEndOfLineOptionToCharacter(opts.endOfLine); + if (cursorOffset >= 0 && eol === "\r\n") cursorOffset += countEndOfLineCharacters(formatted.slice(0, cursorOffset), "\n"); + formatted = method_replace_all_default(0, formatted, "\n", eol); + } + return { + formatted, + cursorOffset, + comments: rangeResult.comments + }; +} +function ensureIndexInText(text, index, defaultValue) { + if (typeof index !== "number" || Number.isNaN(index) || index < 0 || index > text.length) return defaultValue; + return index; +} +function normalizeIndexes(text, options8) { + let { cursorOffset, rangeStart, rangeEnd } = options8; + cursorOffset = ensureIndexInText(text, cursorOffset, -1); + rangeStart = ensureIndexInText(text, rangeStart, 0); + rangeEnd = ensureIndexInText(text, rangeEnd, text.length); + return { + ...options8, + cursorOffset, + rangeStart, + rangeEnd + }; +} +function normalizeInputAndOptions(text, options8) { + let { cursorOffset, rangeStart, rangeEnd, endOfLine } = normalizeIndexes(text, options8); + const hasBOM = text.charAt(0) === BOM; + if (hasBOM) { + text = text.slice(1); + cursorOffset--; + rangeStart--; + rangeEnd--; + } + if (endOfLine === "auto") endOfLine = guessEndOfLine(text); + if (text.includes("\r")) { + const countCrlfBefore = (index) => countEndOfLineCharacters(text.slice(0, Math.max(index, 0)), "\r\n"); + cursorOffset -= countCrlfBefore(cursorOffset); + rangeStart -= countCrlfBefore(rangeStart); + rangeEnd -= countCrlfBefore(rangeEnd); + text = normalizeEndOfLine(text); + } + return { + hasBOM, + text, + options: normalizeIndexes(text, { + ...options8, + cursorOffset, + rangeStart, + rangeEnd, + endOfLine + }) + }; +} +async function hasPragma(text, options8) { + const selectedParser = await resolveParser(options8); + return !selectedParser.hasPragma || selectedParser.hasPragma(text); +} +async function hasIgnorePragma(text, options8) { + return (await resolveParser(options8)).hasIgnorePragma?.(text); +} +async function formatWithCursor(originalText, originalOptions) { + let { hasBOM, text, options: options8 } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); + if (options8.rangeStart >= options8.rangeEnd && text !== "" || options8.requirePragma && !await hasPragma(text, options8) || options8.checkIgnorePragma && await hasIgnorePragma(text, options8)) return { + formatted: originalText, + cursorOffset: originalOptions.cursorOffset, + comments: [] + }; + let result; + if (options8.rangeStart > 0 || options8.rangeEnd < text.length) result = await formatRange(text, options8); + else { + if (!options8.requirePragma && options8.insertPragma && options8.printer.insertPragma && !await hasPragma(text, options8)) text = options8.printer.insertPragma(text); + result = await coreFormat(text, options8); + } + if (hasBOM) { + result.formatted = BOM + result.formatted; + if (result.cursorOffset >= 0) result.cursorOffset++; + } + return result; +} +async function parse6(originalText, originalOptions, devOptions) { + const { text, options: options8 } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); + const parsed = await parse_default(text, options8); + if (devOptions) { + if (devOptions.preprocessForPrint) parsed.ast = await prepareToPrint(parsed.ast, options8); + if (devOptions.massage) parsed.ast = massage_ast_default(parsed.ast, options8); + } + return parsed; +} +async function formatAst(ast, options8) { + options8 = await normalize_format_options_default(options8); + return printDocToStringWithoutNormalizeOptions(await printAstToDoc(ast, options8), options8); +} +async function formatDoc(doc2, options8) { + const { formatted } = await formatWithCursor(printDocToDebug(doc2), { + ...options8, + parser: "__js_expression" + }); + return formatted; +} +async function printToDoc(originalText, options8) { + options8 = await normalize_format_options_default(options8); + const { ast } = await parse_default(originalText, options8); + if (options8.cursorOffset >= 0) options8 = { + ...options8, + ...get_cursor_node_default(ast, options8) + }; + return printAstToDoc(ast, options8); +} +async function printDocToString(doc2, options8) { + return printDocToStringWithoutNormalizeOptions(doc2, await normalize_format_options_default(options8)); +} +function createParsersAndPrinters(modules) { + const parsers2 = /* @__PURE__ */ Object.create(null); + const printers2 = /* @__PURE__ */ Object.create(null); + for (const { importPlugin: importPlugin2, parsers: parserNames = [], printers: printerNames = [] } of modules) { + const loadPlugin2 = async () => { + const plugin = await importPlugin2(); + Object.assign(parsers2, plugin.parsers); + Object.assign(printers2, plugin.printers); + return plugin; + }; + for (const parserName of parserNames) parsers2[parserName] = async () => (await loadPlugin2()).parsers[parserName]; + for (const printerName of printerNames) printers2[printerName] = async () => (await loadPlugin2()).printers[printerName]; + } + return { + parsers: parsers2, + printers: printers2 + }; +} +function loadBuiltinPlugins() { + return builtin_plugins_proxy_default; +} +function importFromDirectory(specifier, directory) { + return import_from_file_default(specifier, path10.join(directory, "noop.js")); +} +async function importPlugin(name, cwd) { + if (isUrl(name)) return import(name); + if (path10.isAbsolute(name)) return import(pathToFileURL(name).href); + try { + return await import(pathToFileURL(path10.resolve(name)).href); + } catch { + return import_from_directory_default(name, cwd); + } +} +async function loadPluginWithoutCache(plugin, cwd) { + const module = await importPlugin(plugin, cwd); + const implementation = module.default ?? module; + return { + name: isUrl(plugin) ? toPath(plugin) : plugin, + ...implementation + }; +} +function loadPlugin(plugin) { + if (typeof plugin !== "string" && !(plugin instanceof URL)) return plugin; + const cwd = process.cwd(); + const cacheKey = JSON.stringify({ + name: plugin, + cwd + }); + if (!cache2.has(cacheKey)) cache2.set(cacheKey, loadPluginWithoutCache(plugin, cwd)); + return cache2.get(cacheKey); +} +function clearCache2() { + cache2.clear(); +} +function loadPlugins(plugins = []) { + return Promise.all(plugins.map((plugin) => loadPlugin(plugin))); +} +function getRelativePath(file, ignoreFile) { + const ignoreFilePath = toPath(ignoreFile); + const filePath = isUrl(file) ? url2.fileURLToPath(file) : path10.resolve(file); + return path10.relative(ignoreFilePath ? path10.dirname(ignoreFilePath) : process.cwd(), filePath); +} +async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) { + let content = ""; + if (ignoreFile) content += await read_file_default(ignoreFile) ?? ""; + if (!withNodeModules) content += "\nnode_modules"; + if (!content) return; + const ignore = (0, import_ignore.default)({ allowRelativePaths: true }).add(content); + return (file) => ignore.checkIgnore(slash(getRelativePath(file, ignoreFile))).ignored; +} +async function createIsIgnoredFunction(ignoreFiles, withNodeModules) { + if (ignoreFiles.length === 0 && !withNodeModules) ignoreFiles = [void 0]; + const isIgnoredFunctions = (await Promise.all(ignoreFiles.map((ignoreFile) => createSingleIsIgnoredFunction(ignoreFile, withNodeModules)))).filter(Boolean); + return (file) => isIgnoredFunctions.some((isIgnored2) => isIgnored2(file)); +} +async function isIgnored(file, options8) { + const { ignorePath: ignoreFiles, withNodeModules } = options8; + return (await createIsIgnoredFunction(ignoreFiles, withNodeModules))(file); +} +function omit(object, keys) { + keys = new Set(keys); + return Object.fromEntries(Object.entries(object).filter(([key2]) => !keys.has(key2))); +} +async function getFileInfo(file, options8 = {}) { + if (typeof file !== "string" && !(file instanceof URL)) throw new TypeError(`expect \`file\` to be a string or URL, got \`${typeof file}\``); + let { ignorePath, withNodeModules } = options8; + if (!Array.isArray(ignorePath)) ignorePath = [ignorePath]; + const ignored = await isIgnored(file, { + ignorePath, + withNodeModules + }); + let inferredParser; + if (!ignored) inferredParser = options8.parser ?? await getParser(file, options8); + return { + ignored, + inferredParser: inferredParser ?? null + }; +} +async function getParser(file, options8) { + let config; + if (options8.resolveConfig !== false) config = await resolveConfig(file, { editorconfig: false }); + if (config?.parser) return config.parser; + let plugins = options8.plugins ?? config?.plugins ?? []; + plugins = (await Promise.all([load_builtin_plugins_default(), load_plugins_default(plugins)])).flat(); + return infer_parser_default({ plugins }, { physicalFile: file }); +} +function skipInlineComment(text, startIndex) { + if (startIndex === false) return false; + if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "*") { + for (let i = startIndex + 2; i < text.length; ++i) if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") return i + 2; + } + return startIndex; +} +function skipTrailingComment(text, startIndex) { + if (startIndex === false) return false; + if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "/") return skipEverythingButNewLine(text, startIndex); + return startIndex; +} +function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) { + let oldIdx = null; + let nextIdx = startIndex; + while (nextIdx !== oldIdx) { + oldIdx = nextIdx; + nextIdx = skipSpaces(text, nextIdx); + nextIdx = skip_inline_comment_default(text, nextIdx); + nextIdx = skip_trailing_comment_default(text, nextIdx); + nextIdx = skip_newline_default(text, nextIdx); + } + return nextIdx; +} +function isNextLineEmpty(text, startIndex) { + let oldIdx = null; + let idx = startIndex; + while (idx !== oldIdx) { + oldIdx = idx; + idx = skipToLineEnd(text, idx); + idx = skip_inline_comment_default(text, idx); + idx = skipSpaces(text, idx); + } + idx = skip_trailing_comment_default(text, idx); + idx = skip_newline_default(text, idx); + return idx !== false && has_newline_default(text, idx); +} +function getIndentSize(value, tabWidth) { + const lastNewlineIndex = value.lastIndexOf("\n"); + if (lastNewlineIndex === -1) return 0; + return get_alignment_size_default(value.slice(lastNewlineIndex + 1).match(/^[\t ]*/u)[0], tabWidth); +} +function escapeStringRegexp(string) { + if (typeof string !== "string") throw new TypeError("Expected a string"); + return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); +} +function getMaxContinuousCount(text, searchString) { + let results = text.matchAll(new RegExp(`(?:${escapeStringRegexp(searchString)})+`, "gu")); + if (!results.reduce) results = [...results]; + return results.reduce((maxCount, [result]) => Math.max(maxCount, result.length), 0) / searchString.length; +} +function getNextNonSpaceNonCommentCharacter(text, startIndex) { + const index = get_next_non_space_non_comment_character_index_default(text, startIndex); + return index === false ? "" : text.charAt(index); +} +function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) { + const { preferred, alternate } = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE_SETTINGS : DOUBLE_QUOTE_SETTINGS; + const { length } = text; + let preferredQuoteCount = 0; + let alternateQuoteCount = 0; + for (let index = 0; index < length; index++) { + const codePoint = text.charCodeAt(index); + if (codePoint === preferred.codePoint) preferredQuoteCount++; + else if (codePoint === alternate.codePoint) alternateQuoteCount++; + } + return (preferredQuoteCount > alternateQuoteCount ? alternate : preferred).character; +} +function hasNewlineInRange(text, startIndex, endIndex) { + for (let i = startIndex; i < endIndex; ++i) if (text.charAt(i) === "\n") return true; + return false; +} +function hasSpaces(text, startIndex, options8 = {}) { + return skipSpaces(text, options8.backwards ? startIndex - 1 : startIndex, options8) !== startIndex; +} +function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { + return get_next_non_space_non_comment_character_index_default(text, locEnd(node)); +} +function getNextNonSpaceNonCommentCharacterIndex2(text, startIndex) { + return arguments.length === 2 || typeof startIndex === "number" ? get_next_non_space_non_comment_character_index_default(text, startIndex) : legacyGetNextNonSpaceNonCommentCharacterIndex(...arguments); +} +function legacyIsPreviousLineEmpty(text, node, locStart) { + return is_previous_line_empty_default(text, locStart(node)); +} +function isPreviousLineEmpty2(text, startIndex) { + return arguments.length === 2 || typeof startIndex === "number" ? is_previous_line_empty_default(text, startIndex) : legacyIsPreviousLineEmpty(...arguments); +} +function legacyIsNextLineEmpty(text, node, locEnd) { + return is_next_line_empty_default(text, locEnd(node)); +} +function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) { + const otherQuote = enclosingQuote === "\"" ? "'" : "\""; + return enclosingQuote + method_replace_all_default(0, rawText, /\\(.)|(["'])/gsu, (match, escaped, quote) => { + if (escaped === otherQuote) return escaped; + if (quote === enclosingQuote) return "\\" + quote; + if (quote) return quote; + return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped; + }) + enclosingQuote; +} +function isNextLineEmpty2(text, startIndex) { + return arguments.length === 2 || typeof startIndex === "number" ? is_next_line_empty_default(text, startIndex) : legacyIsNextLineEmpty(...arguments); +} +function withPlugins(fn, optionsArgumentIndex = 1) { + return async (...args) => { + const options8 = args[optionsArgumentIndex] ?? {}; + const { plugins = [] } = options8; + args[optionsArgumentIndex] = { + ...options8, + plugins: (await Promise.all([load_builtin_plugins_default(), load_plugins_default(plugins)])).flat() + }; + return fn(...args); + }; +} +async function format2(text, options8) { + const { formatted } = await formatWithCursor2(text, { + ...options8, + cursorOffset: -1 + }); + return formatted; +} +async function check(text, options8) { + return await format2(text, options8) === text; +} +async function clearCache3() { + clearCache(); + clearCache2(); +} +var require, __create, __defProp, __getOwnPropDesc, __getOwnPropNames, __getProtoOf, __hasOwnProp, __require, __commonJS, __export, __copyProps, __toESM, require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils, require_stringify, require_is_number, require_to_regex_range, require_fill_range, require_compile, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils2, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern, require_merge2, require_stream, require_string, require_utils3, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils4, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver, require_compare, require_gte, require_pseudomap, require_map, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src, require_js_tokens, require_readlines, require_ignore, index_exports, Diff, LineDiff, lineDiff, ArrayDiff, arrayDiff, import_fast_glob, array, characterCodeCache, import_picocolors5, apiDescriptor, import_picocolors, commonDeprecatedHandler, import_picocolors2, VALUE_NOT_EXIST, VALUE_UNCHANGED, INDENTATION, commonInvalidHandler, import_picocolors3, levenUnknownHandler, HANDLER_KEYS, Schema, AliasSchema, AnySchema, ArraySchema, BooleanSchema, ChoiceSchema, NumberSchema, IntegerSchema, StringSchema, defaultDescriptor, defaultUnknownHandler, defaultInvalidHandler, defaultDeprecatedHandler, Normalizer, errors_exports, ConfigError, UndefinedParserError, ArgExpansionBailout, create_mockable_default, mockable, mockable_default, import_micromatch, URL_STRING_PREFIX, isUrlInstance, isUrlString, isUrl, toPath, toAbsolutePath, partition_default, import_editorconfig, isFile, isDirectory, iterate_directory_up_default, Searcher, FileSearcher, DirectorySearcher, DIRECTORIES, searcher, isPositiveInteger, editorconfig_to_prettier_default, editorconfigCache, unicode, util, source, parseState, stack, pos, line, column, token, key, root, parse2, lexState, buffer, doubleQuote, sign, c, lexStates, parseStates, dist_default, import_picocolors4, import_js_tokens, nonASCIIidentifierStartChars, nonASCIIidentifierChars, reservedWords, keywords, reservedWordsStrictSet, compose, defsOn, defsOff, sometimesKeywords, NEWLINE$1, BRACKET, tokenize2, NEWLINE, getOffsets, getCodePoint, JSONError, getErrorLocation, addCodePointToUnexpectedToken, TomlError, DATE_TIME_RE, TomlDate, INT_REGEX, FLOAT_REGEX, LEADING_ZERO, ESCAPE_REGEX, ESC_MAP, KEY_PART_RE, read_file_default, loadConfigFromPackageJson, parseYaml, loaders_default, CONFIG_FILE_NAMES, config_searcher_default, own, classRegExp, kTypes, codes, messages, nodeInternalPrefix, userStackTraceLimit, captureLargerStackTrace, hasOwnProperty, ERR_INVALID_PACKAGE_CONFIG, cache, ERR_UNKNOWN_FILE_EXTENSION, hasOwnProperty2, extensionFormatMap, protocolHandlers, ERR_INVALID_ARG_VALUE, DEFAULT_CONDITIONS, DEFAULT_CONDITIONS_SET, RegExpPrototypeSymbolReplace, ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG2, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST, own2, invalidSegmentRegEx, deprecatedInvalidSegmentRegEx, invalidPackageNameRegEx, patternRegEx, encodedSeparatorRegEx, emittedPackageWarnings, doubleSlashRegEx, import_from_file_default, require_from_file_default, requireErrorCodesShouldBeIgnored, load_external_config_default, load_config_default, loadCache, searchCache, OPTIONAL_OBJECT, createMethodShim, stringReplaceAll, method_replace_all_default, OPTION_CR, OPTION_CRLF, DEFAULT_OPTION, CHARACTER_CR, CHARACTER_CRLF, CHARACTER_LF, DEFAULT_EOL, regexps, END_OF_LINE_REGEXP, method_at_default, noop, noop_default, DOC_TYPE_CURSOR, DOC_TYPE_INDENT, DOC_TYPE_ALIGN, DOC_TYPE_TRIM, DOC_TYPE_GROUP, DOC_TYPE_FILL, DOC_TYPE_IF_BREAK, DOC_TYPE_INDENT_IF_BREAK, DOC_TYPE_LINE_SUFFIX, DOC_TYPE_LINE_SUFFIX_BOUNDARY, DOC_TYPE_LINE, DOC_TYPE_LABEL, DOC_TYPE_BREAK_PARENT, emoji_regex_default, narrow_emojis_evaluate_default, notAsciiRegex, narrowEmojisSet, get_string_width_default, get_alignment_size_default, AstPath, ast_path_default, is_object_default, skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine, isNewlineCharacter, skip_newline_default, has_newline_default, is_non_empty_array_default, get_sorted_child_nodes_default, childNodesCache, returnFalse, isAllEmptyAndNoLineBreak, is_previous_line_empty_default, breakParent, hardline, indent, join3, line2, lineSuffix, create_print_pre_check_function_default, core_options_evaluate_default, arrayToReversed, method_to_reversed_default, import_n_readlines, get_interpreter_default, getFileBasename, getLanguageByInterpreter, infer_parser_default, hasDeprecationWarned, normalize_options_default, arrayFindLast, method_find_last_default, FRONT_MATTER_MARK, FRONT_MATTER_VISITOR_KEYS, is_front_matter_default, hardline2, markAsRoot, SUPPORTED_EMBED_LANGUAGES, isEmbedFrontMatter, clean_default, print_default, nonTraversableKeys, defaultGetVisitorKeys, create_get_visitor_keys_function_default, normalizedPrinters, PRINTER_FRONT_MATTER_SUPPORT_OFF, formatOptionsHiddenDefaults, normalize_format_options_default, parse_default, stripTrailingHardline, print_ignored_default, cursor, get_cursor_node_default, massage_ast_default, arrayFindLastIndex, method_find_last_index_default, isJsonParser, jsonSourceElements, graphqlSourceElements, addAlignmentToDoc, hardline3, printDocToStringWithoutNormalizeOptions, BOM, CURSOR, option_categories_exports, CATEGORY_CONFIG, CATEGORY_EDITOR, CATEGORY_FORMAT, CATEGORY_OTHER, CATEGORY_OUTPUT, CATEGORY_GLOBAL, CATEGORY_SPECIAL, languages_evaluate_default, common_options_evaluate_default, options_default, languages_evaluate_default2, options_default2, languages_evaluate_default3, languages_evaluate_default4, CATEGORY_HTML, options_default3, languages_evaluate_default5, CATEGORY_JAVASCRIPT, options_default4, languages_evaluate_default6, languages_evaluate_default7, options_default5, languages_evaluate_default8, options_default6, estreePlugin, options7, languages, parsers, printers, builtin_plugins_proxy_default, load_builtin_plugins_default, import_from_directory_default, cache2, load_plugins_default, import_ignore, slash, object_omit_default, get_file_info_default, version_evaluate_default, public_exports, skip_inline_comment_default, skip_trailing_comment_default, get_next_non_space_non_comment_character_index_default, is_next_line_empty_default, get_indent_size_default, get_max_continuous_count_default, get_next_non_space_non_comment_character_default, SINGLE_QUOTE, DOUBLE_QUOTE, SINGLE_QUOTE_DATA, DOUBLE_QUOTE_DATA, SINGLE_QUOTE_SETTINGS, DOUBLE_QUOTE_SETTINGS, get_preferred_quote_default, has_newline_in_range_default, has_spaces_default, formatWithCursor2, getSupportInfo2, inferParser2, sharedWithCli, debugApis; +//#endregion +__esmMin((() => { + init_doc(); + require = createRequire(import.meta.url); + fileURLToPath(import.meta.url); + dirname(import.meta.filename); + __create = Object.create; + __defProp = Object.defineProperty; + __getOwnPropDesc = Object.getOwnPropertyDescriptor; + __getOwnPropNames = Object.getOwnPropertyNames; + __getProtoOf = Object.getPrototypeOf; + __hasOwnProp = Object.prototype.hasOwnProperty; + __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error("Dynamic require of \"" + x + "\" is not supported"); + }); + __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + __export = (target, all) => { + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + }; + __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key2 of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key2) && key2 !== except) __defProp(to, key2, { + get: () => from[key2], + enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable + }); + } + return to; + }; + __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true + }) : target, mod)); + require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.splitWhen = exports.flatten = void 0; + function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); + } + exports.flatten = flatten; + function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } else result[groupIndex].push(item); + return result; + } + exports.splitWhen = splitWhen; + } }); + require_errno = __commonJS({ "node_modules/fast-glob/out/utils/errno.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEnoentCodeError = void 0; + function isEnoentCodeError(error) { + return error.code === "ENOENT"; + } + exports.isEnoentCodeError = isEnoentCodeError; + } }); + require_fs = __commonJS({ "node_modules/fast-glob/out/utils/fs.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; + } }); + require_path = __commonJS({ "node_modules/fast-glob/out/utils/path.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; + var os = __require("os"); + var path15 = __require("path"); + var IS_WINDOWS_PLATFORM = os.platform() === "win32"; + var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; + var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; + var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; + var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; + var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; + function unixify(filepath) { + return filepath.replace(/\\/g, "/"); + } + exports.unixify = unixify; + function makeAbsolute(cwd, filepath) { + return path15.resolve(cwd, filepath); + } + exports.makeAbsolute = makeAbsolute; + function removeLeadingDotSegment(entry) { + if (entry.charAt(0) === ".") { + const secondCharactery = entry.charAt(1); + if (secondCharactery === "/" || secondCharactery === "\\") return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + return entry; + } + exports.removeLeadingDotSegment = removeLeadingDotSegment; + exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; + function escapeWindowsPath(pattern) { + return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapeWindowsPath = escapeWindowsPath; + function escapePosixPath(pattern) { + return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapePosixPath = escapePosixPath; + exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; + function convertWindowsPathToPattern(filepath) { + return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); + } + exports.convertWindowsPathToPattern = convertWindowsPathToPattern; + function convertPosixPathToPattern(filepath) { + return escapePosixPath(filepath); + } + exports.convertPosixPathToPattern = convertPosixPathToPattern; + } }); + require_is_extglob = __commonJS({ "node_modules/is-extglob/index.js"(exports, module) { + module.exports = function isExtglob(str) { + if (typeof str !== "string" || str === "") return false; + var match; + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; + }; + } }); + require_is_glob = __commonJS({ "node_modules/is-glob/index.js"(exports, module) { + var isExtglob = require_is_extglob(); + var chars = { + "{": "}", + "(": ")", + "[": "]" + }; + var strictCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === "*") return true; + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) return true; + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { + if (closeSquareIndex < index) closeSquareIndex = str.indexOf("]", index); + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + } + } + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) return true; + } + } + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { + if (pipeIndex < index) pipeIndex = str.indexOf("|", index); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf("\\", pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + } + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + var relaxedCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) return true; + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + module.exports = function isGlob(str, options8) { + if (typeof str !== "string" || str === "") return false; + if (isExtglob(str)) return true; + var check2 = strictCheck; + if (options8 && options8.strict === false) check2 = relaxedCheck; + return check2(str); + }; + } }); + require_glob_parent = __commonJS({ "node_modules/fast-glob/node_modules/glob-parent/index.js"(exports, module) { + "use strict"; + var isGlob = require_is_glob(); + var pathPosixDirname = __require("path").posix.dirname; + var isWin32 = __require("os").platform() === "win32"; + var slash2 = "/"; + var backslash = /\\/g; + var enclosure = /[\{\[].*[\}\]]$/; + var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + module.exports = function globParent(str, opts) { + if (Object.assign({ flipBackslashes: true }, opts).flipBackslashes && isWin32 && str.indexOf(slash2) < 0) str = str.replace(backslash, slash2); + if (enclosure.test(str)) str += slash2; + str += "a"; + do + str = pathPosixDirname(str); + while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); + }; + } }); + require_utils = __commonJS({ "node_modules/braces/lib/utils.js"(exports) { + "use strict"; + exports.isInteger = (num) => { + if (typeof num === "number") return Number.isInteger(num); + if (typeof num === "string" && num.trim() !== "") return Number.isInteger(Number(num)); + return false; + }; + exports.find = (node, type) => node.nodes.find((node2) => node2.type === type); + exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return (Number(max) - Number(min)) / Number(step) >= limit; + }; + exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + if (type && node.type === type || node.type === "open" || node.type === "close") { + if (node.escaped !== true) { + node.value = "\\" + node.value; + node.escaped = true; + } + } + }; + exports.encloseBrace = (node) => { + if (node.type !== "brace") return false; + if (node.commas >> 0 + node.ranges >> 0 === 0) { + node.invalid = true; + return true; + } + return false; + }; + exports.isInvalidBrace = (block) => { + if (block.type !== "brace") return false; + if (block.invalid === true || block.dollar) return true; + if (block.commas >> 0 + block.ranges >> 0 === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; + }; + exports.isOpenOrClose = (node) => { + if (node.type === "open" || node.type === "close") return true; + return node.open === true || node.close === true; + }; + exports.reduce = (nodes) => nodes.reduce((acc, node) => { + if (node.type === "text") acc.push(node.value); + if (node.type === "range") node.type = "text"; + return acc; + }, []); + exports.flatten = (...args) => { + const result = []; + const flat = (arr) => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + if (Array.isArray(ele)) { + flat(ele); + continue; + } + if (ele !== void 0) result.push(ele); + } + return result; + }; + flat(args); + return result; + }; + } }); + require_stringify = __commonJS({ "node_modules/braces/lib/stringify.js"(exports, module) { + "use strict"; + var utils = require_utils(); + module.exports = (ast, options8 = {}) => { + const stringify2 = (node, parent = {}) => { + const invalidBlock = options8.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options8.escapeInvalid === true; + let output = ""; + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) return "\\" + node.value; + return node.value; + } + if (node.value) return node.value; + if (node.nodes) for (const child of node.nodes) output += stringify2(child); + return output; + }; + return stringify2(ast); + }; + } }); + require_is_number = __commonJS({ "node_modules/is-number/index.js"(exports, module) { + "use strict"; + module.exports = function(num) { + if (typeof num === "number") return num - num === 0; + if (typeof num === "string" && num.trim() !== "") return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + return false; + }; + } }); + require_to_regex_range = __commonJS({ "node_modules/to-regex-range/index.js"(exports, module) { + "use strict"; + var isNumber = require_is_number(); + var toRegexRange = (min, max, options8) => { + if (isNumber(min) === false) throw new TypeError("toRegexRange: expected the first argument to be a number"); + if (max === void 0 || min === max) return String(min); + if (isNumber(max) === false) throw new TypeError("toRegexRange: expected the second argument to be a number."); + let opts = { + relaxZeros: true, + ...options8 + }; + if (typeof opts.strictZeros === "boolean") opts.relaxZeros = opts.strictZeros === false; + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; + if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result; + let a = Math.min(min, max); + let b = Math.max(min, max); + if (Math.abs(a - b) === 1) { + let result = min + "|" + max; + if (opts.capture) return `(${result})`; + if (opts.wrap === false) return result; + return `(?:${result})`; + } + let isPadded = hasPadding(min) || hasPadding(max); + let state = { + min, + max, + a, + b + }; + let positives = []; + let negatives = []; + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + if (a < 0) { + negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts); + a = state.a = 0; + } + if (b >= 0) positives = splitToPatterns(a, b, state, opts); + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + if (opts.capture === true) state.result = `(${state.result})`; + else if (opts.wrap !== false && positives.length + negatives.length > 1) state.result = `(?:${state.result})`; + toRegexRange.cache[cacheKey] = state; + return state.result; + }; + function collatePatterns(neg, pos2, options8) { + let onlyNegative = filterPatterns(neg, pos2, "-", false, options8) || []; + let onlyPositive = filterPatterns(pos2, neg, "", false, options8) || []; + let intersected = filterPatterns(neg, pos2, "-?", true, options8) || []; + return onlyNegative.concat(intersected).concat(onlyPositive).join("|"); + } + function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + let stop = countNines(min, nines); + let stops = /* @__PURE__ */ new Set([max]); + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + stop = countZeros(max + 1, zeros) - 1; + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + stops = [...stops]; + stops.sort(compare); + return stops; + } + function rangeToPattern(start, stop, options8) { + if (start === stop) return { + pattern: start, + count: [], + digits: 0 + }; + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ""; + let count = 0; + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + if (startDigit === stopDigit) pattern += startDigit; + else if (startDigit !== "0" || stopDigit !== "9") pattern += toCharacterClass(startDigit, stopDigit, options8); + else count++; + } + if (count) pattern += options8.shorthand === true ? "\\d" : "[0-9]"; + return { + pattern, + count: [count], + digits + }; + } + function splitToPatterns(min, max, tok, options8) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + for (let i = 0; i < ranges.length; i++) { + let max2 = ranges[i]; + let obj = rangeToPattern(String(start), String(max2), options8); + let zeros = ""; + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) prev.count.pop(); + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max2 + 1; + continue; + } + if (tok.isPadded) zeros = padZeros(max2, tok, options8); + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max2 + 1; + prev = obj; + } + return tokens; + } + function filterPatterns(arr, comparison, prefix, intersection, options8) { + let result = []; + for (let ele of arr) { + let { string } = ele; + if (!intersection && !contains(comparison, "string", string)) result.push(prefix + string); + if (intersection && contains(comparison, "string", string)) result.push(prefix + string); + } + return result; + } + function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; + } + function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; + } + function contains(arr, key2, val) { + return arr.some((ele) => ele[key2] === val); + } + function countNines(min, len) { + return Number(String(min).slice(0, -len) + "9".repeat(len)); + } + function countZeros(integer, zeros) { + return integer - integer % Math.pow(10, zeros); + } + function toQuantifier(digits) { + let [start = 0, stop = ""] = digits; + if (stop || start > 1) return `{${start + (stop ? "," + stop : "")}}`; + return ""; + } + function toCharacterClass(a, b, options8) { + return `[${a}${b - a === 1 ? "" : "-"}${b}]`; + } + function hasPadding(str) { + return /^-?(0+)\d/.test(str); + } + function padZeros(value, tok, options8) { + if (!tok.isPadded) return value; + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options8.relaxZeros !== false; + switch (diff) { + case 0: return ""; + case 1: return relax ? "0?" : "0"; + case 2: return relax ? "0{0,2}" : "00"; + default: return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } + toRegexRange.cache = {}; + toRegexRange.clearCache = () => toRegexRange.cache = {}; + module.exports = toRegexRange; + } }); + require_fill_range = __commonJS({ "node_modules/fill-range/index.js"(exports, module) { + "use strict"; + var util2 = __require("util"); + var toRegexRange = require_to_regex_range(); + var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var transform = (toNumber) => { + return (value) => toNumber === true ? Number(value) : String(value); + }; + var isValidValue = (value) => { + return typeof value === "number" || typeof value === "string" && value !== ""; + }; + var isNumber = (num) => Number.isInteger(+num); + var zeros = (input) => { + let value = `${input}`; + let index = -1; + if (value[0] === "-") value = value.slice(1); + if (value === "0") return false; + while (value[++index] === "0"); + return index > 0; + }; + var stringify2 = (start, end, options8) => { + if (typeof start === "string" || typeof end === "string") return true; + return options8.stringify === true; + }; + var pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === "-" ? "-" : ""; + if (dash) input = input.slice(1); + input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); + } + if (toNumber === false) return String(input); + return input; + }; + var toMaxLen = (input, maxLength) => { + let negative = input[0] === "-" ? "-" : ""; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = "0" + input; + return negative ? "-" + input : input; + }; + var toSequence = (parts, options8, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + let prefix = options8.capture ? "" : "?:"; + let positives = ""; + let negatives = ""; + let result; + if (parts.positives.length) positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); + if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; + if (positives && negatives) result = `${positives}|${negatives}`; + else result = positives || negatives; + if (options8.wrap) return `(${prefix}${result})`; + return result; + }; + var toRange = (a, b, isNumbers, options8) => { + if (isNumbers) return toRegexRange(a, b, { + wrap: false, + ...options8 + }); + let start = String.fromCharCode(a); + if (a === b) return start; + return `[${start}-${String.fromCharCode(b)}]`; + }; + var toRegex = (start, end, options8) => { + if (Array.isArray(start)) { + let wrap = options8.wrap === true; + let prefix = options8.capture ? "" : "?:"; + return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); + } + return toRegexRange(start, end, options8); + }; + var rangeError = (...args) => { + return /* @__PURE__ */ new RangeError("Invalid range arguments: " + util2.inspect(...args)); + }; + var invalidRange = (start, end, options8) => { + if (options8.strictRanges === true) throw rangeError([start, end]); + return []; + }; + var invalidStep = (step, options8) => { + if (options8.strictRanges === true) throw new TypeError(`Expected step "${step}" to be a number`); + return []; + }; + var fillNumbers = (start, end, step = 1, options8 = {}) => { + let a = Number(start); + let b = Number(end); + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options8.strictRanges === true) throw rangeError([start, end]); + return []; + } + if (a === 0) a = 0; + if (b === 0) b = 0; + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify2(start, end, options8) === false; + let format3 = options8.transform || transform(toNumber); + if (options8.toRegex && step === 1) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options8); + let parts = { + negatives: [], + positives: [] + }; + let push2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + if (options8.toRegex === true && step > 1) push2(a); + else range.push(pad(format3(a, index), maxLen, toNumber)); + a = descending ? a - step : a + step; + index++; + } + if (options8.toRegex === true) return step > 1 ? toSequence(parts, options8, maxLen) : toRegex(range, null, { + wrap: false, + ...options8 + }); + return range; + }; + var fillLetters = (start, end, step = 1, options8 = {}) => { + if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) return invalidRange(start, end, options8); + let format3 = options8.transform || ((val) => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + if (options8.toRegex && step === 1) return toRange(min, max, false, options8); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + range.push(format3(a, index)); + a = descending ? a - step : a + step; + index++; + } + if (options8.toRegex === true) return toRegex(range, null, { + wrap: false, + options: options8 + }); + return range; + }; + var fill = (start, end, step, options8 = {}) => { + if (end == null && isValidValue(start)) return [start]; + if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options8); + if (typeof step === "function") return fill(start, end, 1, { transform: step }); + if (isObject2(step)) return fill(start, end, 0, step); + let opts = { ...options8 }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + if (!isNumber(step)) { + if (step != null && !isObject2(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + if (isNumber(start) && isNumber(end)) return fillNumbers(start, end, step, opts); + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); + }; + module.exports = fill; + } }); + require_compile = __commonJS({ "node_modules/braces/lib/compile.js"(exports, module) { + "use strict"; + var fill = require_fill_range(); + var utils = require_utils(); + var compile = (ast, options8 = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options8.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options8.escapeInvalid === true ? "\\" : ""; + let output = ""; + if (node.isOpen === true) return prefix + node.value; + if (node.isClose === true) { + console.log("node.isClose", prefix, node.value); + return prefix + node.value; + } + if (node.type === "open") return invalid ? prefix + node.value : "("; + if (node.type === "close") return invalid ? prefix + node.value : ")"; + if (node.type === "comma") return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; + if (node.value) return node.value; + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { + ...options8, + wrap: false, + toRegex: true, + strictZeros: true + }); + if (range.length !== 0) return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + if (node.nodes) for (const child of node.nodes) output += walk(child, node); + return output; + }; + return walk(ast); + }; + module.exports = compile; + } }); + require_expand = __commonJS({ "node_modules/braces/lib/expand.js"(exports, module) { + "use strict"; + var fill = require_fill_range(); + var stringify2 = require_stringify(); + var utils = require_utils(); + var append = (queue = "", stash = "", enclose = false) => { + const result = []; + queue = [].concat(queue); + stash = [].concat(stash); + if (!stash.length) return queue; + if (!queue.length) return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; + for (const item of queue) if (Array.isArray(item)) for (const value of item) result.push(append(value, stash, enclose)); + else for (let ele of stash) { + if (enclose === true && typeof ele === "string") ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + return utils.flatten(result); + }; + var expand = (ast, options8 = {}) => { + const rangeLimit = options8.rangeLimit === void 0 ? 1e3 : options8.rangeLimit; + const walk = (node, parent = {}) => { + node.queue = []; + let p = parent; + let q = parent.queue; + while (p.type !== "brace" && p.type !== "root" && p.parent) { + p = p.parent; + q = p.queue; + } + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify2(node, options8))); + return; + } + if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ["{}"])); + return; + } + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + if (utils.exceedsLimit(...args, options8.step, rangeLimit)) throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); + let range = fill(...args, options8); + if (range.length === 0) range = stringify2(node, options8); + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + while (block.type !== "brace" && block.type !== "root" && block.parent) { + block = block.parent; + queue = block.queue; + } + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + if (child.type === "comma" && node.type === "brace") { + if (i === 1) queue.push(""); + queue.push(""); + continue; + } + if (child.type === "close") { + q.push(append(q.pop(), queue, enclose)); + continue; + } + if (child.value && child.type !== "open") { + queue.push(append(queue.pop(), child.value)); + continue; + } + if (child.nodes) walk(child, node); + } + return queue; + }; + return utils.flatten(walk(ast)); + }; + module.exports = expand; + } }); + require_constants = __commonJS({ "node_modules/braces/lib/constants.js"(exports, module) { + "use strict"; + module.exports = { + MAX_LENGTH: 1e4, + CHAR_0: "0", + CHAR_9: "9", + CHAR_UPPERCASE_A: "A", + CHAR_LOWERCASE_A: "a", + CHAR_UPPERCASE_Z: "Z", + CHAR_LOWERCASE_Z: "z", + CHAR_LEFT_PARENTHESES: "(", + CHAR_RIGHT_PARENTHESES: ")", + CHAR_ASTERISK: "*", + CHAR_AMPERSAND: "&", + CHAR_AT: "@", + CHAR_BACKSLASH: "\\", + CHAR_BACKTICK: "`", + CHAR_CARRIAGE_RETURN: "\r", + CHAR_CIRCUMFLEX_ACCENT: "^", + CHAR_COLON: ":", + CHAR_COMMA: ",", + CHAR_DOLLAR: "$", + CHAR_DOT: ".", + CHAR_DOUBLE_QUOTE: "\"", + CHAR_EQUAL: "=", + CHAR_EXCLAMATION_MARK: "!", + CHAR_FORM_FEED: "\f", + CHAR_FORWARD_SLASH: "/", + CHAR_HASH: "#", + CHAR_HYPHEN_MINUS: "-", + CHAR_LEFT_ANGLE_BRACKET: "<", + CHAR_LEFT_CURLY_BRACE: "{", + CHAR_LEFT_SQUARE_BRACKET: "[", + CHAR_LINE_FEED: "\n", + CHAR_NO_BREAK_SPACE: "\xA0", + CHAR_PERCENT: "%", + CHAR_PLUS: "+", + CHAR_QUESTION_MARK: "?", + CHAR_RIGHT_ANGLE_BRACKET: ">", + CHAR_RIGHT_CURLY_BRACE: "}", + CHAR_RIGHT_SQUARE_BRACKET: "]", + CHAR_SEMICOLON: ";", + CHAR_SINGLE_QUOTE: "'", + CHAR_SPACE: " ", + CHAR_TAB: " ", + CHAR_UNDERSCORE: "_", + CHAR_VERTICAL_LINE: "|", + CHAR_ZERO_WIDTH_NOBREAK_SPACE: "" + }; + } }); + require_parse = __commonJS({ "node_modules/braces/lib/parse.js"(exports, module) { + "use strict"; + var stringify2 = require_stringify(); + var { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants(); + var parse7 = (input, options8 = {}) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + const opts = options8 || {}; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + const ast = { + type: "root", + input, + nodes: [] + }; + const stack2 = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + const advance = () => input[index++]; + const push2 = (node) => { + if (node.type === "text" && prev.type === "dot") prev.type = "text"; + if (prev && prev.type === "text" && node.type === "text") { + prev.value += node.value; + return; + } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + push2({ type: "bos" }); + while (index < length) { + block = stack2[stack2.length - 1]; + value = advance(); + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) continue; + if (value === CHAR_BACKSLASH) { + push2({ + type: "text", + value: (options8.keepEscaping ? value : "") + advance() + }); + continue; + } + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push2({ + type: "text", + value: "\\" + value + }); + continue; + } + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + let next; + while (index < length && (next = advance())) { + value += next; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + if (brackets === 0) break; + } + } + push2({ + type: "text", + value + }); + continue; + } + if (value === CHAR_LEFT_PARENTHESES) { + block = push2({ + type: "paren", + nodes: [] + }); + stack2.push(block); + push2({ + type: "text", + value + }); + continue; + } + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== "paren") { + push2({ + type: "text", + value + }); + continue; + } + block = stack2.pop(); + push2({ + type: "text", + value + }); + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + if (options8.keepQuotes !== true) value = ""; + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + if (next === open) { + if (options8.keepQuotes === true) value += next; + break; + } + value += next; + } + push2({ + type: "text", + value + }); + continue; + } + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + block = push2({ + type: "brace", + open: true, + close: false, + dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === true, + depth, + commas: 0, + ranges: 0, + nodes: [] + }); + stack2.push(block); + push2({ + type: "open", + value + }); + continue; + } + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== "brace") { + push2({ + type: "text", + value + }); + continue; + } + const type = "close"; + block = stack2.pop(); + block.close = true; + push2({ + type, + value + }); + depth--; + block = stack2[stack2.length - 1]; + continue; + } + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { + type: "text", + value: stringify2(block) + }]; + } + push2({ + type: "comma", + value + }); + block.commas++; + continue; + } + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + if (depth === 0 || siblings.length === 0) { + push2({ + type: "text", + value + }); + continue; + } + if (prev.type === "dot") { + block.range = []; + prev.value += value; + prev.type = "range"; + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = "text"; + continue; + } + block.ranges++; + block.args = []; + continue; + } + if (prev.type === "range") { + siblings.pop(); + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + push2({ + type: "dot", + value + }); + continue; + } + push2({ + type: "text", + value + }); + } + do { + block = stack2.pop(); + if (block.type !== "root") { + block.nodes.forEach((node) => { + if (!node.nodes) { + if (node.type === "open") node.isOpen = true; + if (node.type === "close") node.isClose = true; + if (!node.nodes) node.type = "text"; + node.invalid = true; + } + }); + const parent = stack2[stack2.length - 1]; + const index2 = parent.nodes.indexOf(block); + parent.nodes.splice(index2, 1, ...block.nodes); + } + } while (stack2.length > 0); + push2({ type: "eos" }); + return ast; + }; + module.exports = parse7; + } }); + require_braces = __commonJS({ "node_modules/braces/index.js"(exports, module) { + "use strict"; + var stringify2 = require_stringify(); + var compile = require_compile(); + var expand = require_expand(); + var parse7 = require_parse(); + var braces = (input, options8 = {}) => { + let output = []; + if (Array.isArray(input)) for (const pattern of input) { + const result = braces.create(pattern, options8); + if (Array.isArray(result)) output.push(...result); + else output.push(result); + } + else output = [].concat(braces.create(input, options8)); + if (options8 && options8.expand === true && options8.nodupes === true) output = [...new Set(output)]; + return output; + }; + braces.parse = (input, options8 = {}) => parse7(input, options8); + braces.stringify = (input, options8 = {}) => { + if (typeof input === "string") return stringify2(braces.parse(input, options8), options8); + return stringify2(input, options8); + }; + braces.compile = (input, options8 = {}) => { + if (typeof input === "string") input = braces.parse(input, options8); + return compile(input, options8); + }; + braces.expand = (input, options8 = {}) => { + if (typeof input === "string") input = braces.parse(input, options8); + let result = expand(input, options8); + if (options8.noempty === true) result = result.filter(Boolean); + if (options8.nodupes === true) result = [...new Set(result)]; + return result; + }; + braces.create = (input, options8 = {}) => { + if (input === "" || input.length < 3) return [input]; + return options8.expand !== true ? braces.compile(input, options8) : braces.expand(input, options8); + }; + module.exports = braces; + } }); + require_constants2 = __commonJS({ "node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports, module) { + "use strict"; + var path15 = __require("path"); + var WIN_SLASH = "\\\\/"; + var WIN_NO_SLASH = `[^${WIN_SLASH}]`; + var DOT_LITERAL = "\\."; + var PLUS_LITERAL = "\\+"; + var QMARK_LITERAL = "\\?"; + var SLASH_LITERAL = "\\/"; + var ONE_CHAR = "(?=.)"; + var QMARK = "[^/]"; + var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + var POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, + NO_DOTS_SLASH: `(?!${DOTS_SLASH})`, + QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`, + STAR: `${QMARK}*?`, + START_ANCHOR + }; + var WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: { + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }, + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + REPLACEMENTS: { + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + CHAR_0: 48, + CHAR_9: 57, + CHAR_UPPERCASE_A: 65, + CHAR_LOWERCASE_A: 97, + CHAR_UPPERCASE_Z: 90, + CHAR_LOWERCASE_Z: 122, + CHAR_LEFT_PARENTHESES: 40, + CHAR_RIGHT_PARENTHESES: 41, + CHAR_ASTERISK: 42, + CHAR_AMPERSAND: 38, + CHAR_AT: 64, + CHAR_BACKWARD_SLASH: 92, + CHAR_CARRIAGE_RETURN: 13, + CHAR_CIRCUMFLEX_ACCENT: 94, + CHAR_COLON: 58, + CHAR_COMMA: 44, + CHAR_DOT: 46, + CHAR_DOUBLE_QUOTE: 34, + CHAR_EQUAL: 61, + CHAR_EXCLAMATION_MARK: 33, + CHAR_FORM_FEED: 12, + CHAR_FORWARD_SLASH: 47, + CHAR_GRAVE_ACCENT: 96, + CHAR_HASH: 35, + CHAR_HYPHEN_MINUS: 45, + CHAR_LEFT_ANGLE_BRACKET: 60, + CHAR_LEFT_CURLY_BRACE: 123, + CHAR_LEFT_SQUARE_BRACKET: 91, + CHAR_LINE_FEED: 10, + CHAR_NO_BREAK_SPACE: 160, + CHAR_PERCENT: 37, + CHAR_PLUS: 43, + CHAR_QUESTION_MARK: 63, + CHAR_RIGHT_ANGLE_BRACKET: 62, + CHAR_RIGHT_CURLY_BRACE: 125, + CHAR_RIGHT_SQUARE_BRACKET: 93, + CHAR_SEMICOLON: 59, + CHAR_SINGLE_QUOTE: 39, + CHAR_SPACE: 32, + CHAR_TAB: 9, + CHAR_UNDERSCORE: 95, + CHAR_VERTICAL_LINE: 124, + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + SEP: path15.sep, + /** + * Create EXTGLOB_CHARS + */ + extglobChars(chars) { + return { + "!": { + type: "negate", + open: "(?:(?!(?:", + close: `))${chars.STAR})` + }, + "?": { + type: "qmark", + open: "(?:", + close: ")?" + }, + "+": { + type: "plus", + open: "(?:", + close: ")+" + }, + "*": { + type: "star", + open: "(?:", + close: ")*" + }, + "@": { + type: "at", + open: "(?:", + close: ")" + } + }; + }, + /** + * Create GLOB_CHARS + */ + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; + } }); + require_utils2 = __commonJS({ "node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports) { + "use strict"; + var path15 = __require("path"); + var win32 = process.platform === "win32"; + var { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants2(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) return true; + return false; + }; + exports.isWindows = (options8) => { + if (options8 && typeof options8.windows === "boolean") return options8.windows; + return win32 === true || path15.sep === "\\"; + }; + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports.wrapOutput = (input, state = {}, options8 = {}) => { + let output = `${options8.contains ? "" : "^"}(?:${input})${options8.contains ? "" : "$"}`; + if (state.negated === true) output = `(?:^(?!${output}).*$)`; + return output; + }; + } }); + require_scan = __commonJS({ "node_modules/micromatch/node_modules/picomatch/lib/scan.js"(exports, module) { + "use strict"; + var utils = require_utils2(); + var { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants2(); + var isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + var depth = (token2) => { + if (token2.isPrefix !== true) token2.depth = token2.isGlobstar ? Infinity : 1; + }; + var scan = (input, options8) => { + const opts = options8 || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token2 = { + value: "", + depth: 0, + isGlob: false + }; + const eos = () => index >= length; + const peek2 = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token2.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) braceEscaped = true; + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token2.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token2.isBrace = true; + isGlob = token2.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token2.isBrace = true; + isGlob = token2.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token2.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token2); + token2 = { + value: "", + depth: 0, + isGlob: false + }; + if (finished === true) continue; + if (prev === CHAR_DOT && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + if ((code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === true && peek2() === CHAR_LEFT_PARENTHESES) { + isGlob = token2.isGlob = true; + isExtglob = token2.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token2.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token2.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token2.isGlobstar = true; + isGlob = token2.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_QUESTION_MARK) { + isGlob = token2.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token2.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token2.isBracket = true; + isGlob = token2.isGlob = true; + finished = true; + break; + } + } + if (scanToEnd === true) continue; + break; + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token2.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token2.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token2.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) continue; + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else base = str; + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1); + } + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + if (base && backslashes === true) base = utils.removeBackslashes(base); + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) tokens.push(token2); + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else tokens[idx].value = value; + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") parts.push(value); + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module.exports = scan; + } }); + require_parse2 = __commonJS({ "node_modules/micromatch/node_modules/picomatch/lib/parse.js"(exports, module) { + "use strict"; + var constants = require_constants2(); + var utils = require_utils2(); + var { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants; + var expandRange = (args, options8) => { + if (typeof options8.expandRange === "function") return options8.expandRange(...args, options8); + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + var syntaxError2 = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + var parse7 = (input, options8) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + input = REPLACEMENTS[input] || input; + const opts = { ...options8 }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + const bos = { + type: "bos", + value: "", + output: opts.prepend || "" + }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const win32 = utils.isWindows(options8); + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS; + const globstar = (opts2) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) star = `(${star})`; + if (typeof opts.noext === "boolean") opts.noextglob = opts.noext; + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack2 = []; + let prev = bos; + let value; + const eos = () => state.index === len - 1; + const peek2 = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ""; + const remaining = () => input.slice(state.index + 1); + const consume = (value2 = "", num = 0) => { + state.consumed += value2; + state.index += num; + }; + const append = (token2) => { + state.output += token2.output != null ? token2.output : token2.value; + consume(token2.value); + }; + const negate = () => { + let count = 1; + while (peek2() === "!" && (peek2(2) !== "(" || peek2(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) return false; + state.negated = true; + state.start++; + return true; + }; + const increment = (type) => { + state[type]++; + stack2.push(type); + }; + const decrement = (type) => { + state[type]--; + stack2.pop(); + }; + const push2 = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren") extglobs[extglobs.length - 1].inner += tok.value; + if (tok.value || tok.output) append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type, value2) => { + const token2 = { + ...EXTGLOB_CHARS[value2], + conditions: 1, + inner: "" + }; + token2.prev = prev; + token2.parens = state.parens; + token2.output = state.output; + const output = (opts.capture ? "(" : "") + token2.open; + increment("parens"); + push2({ + type, + value: value2, + output: state.output ? "" : ONE_CHAR + }); + push2({ + type: "paren", + extglob: true, + value: advance(), + output + }); + extglobs.push(token2); + }; + const extglobClose = (token2) => { + let output = token2.close + (opts.capture ? ")" : ""); + let rest; + if (token2.type === "negate") { + let extglobStar = star; + if (token2.inner && token2.inner.length > 1 && token2.inner.includes("/")) extglobStar = globstar(opts); + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token2.close = `)$))${extglobStar}`; + if (token2.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) output = token2.close = `)${parse7(rest, { + ...options8, + fastpaths: false + }).output})${extglobStar})`; + if (token2.prev.type === "bos") state.negatedExtglob = true; + } + push2({ + type: "paren", + extglob: true, + value, + output + }); + decrement("parens"); + }; + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + return QMARK.repeat(chars.length); + } + if (first === ".") return DOT_LITERAL.repeat(chars.length); + if (first === "*") { + if (esc) return esc + first + (rest ? star : ""); + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) if (opts.unescape === true) output = output.replace(/\\/g, ""); + else output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options8); + return state; + } + while (!eos()) { + value = advance(); + if (value === "\0") continue; + if (value === "\\") { + const next = peek2(); + if (next === "/" && opts.bash !== true) continue; + if (next === "." || next === ";") continue; + if (!next) { + value += "\\"; + push2({ + type: "text", + value + }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) value += "\\"; + } + if (opts.unescape === true) value = advance(); + else value += advance(); + if (state.brackets === 0) { + push2({ + type: "text", + value + }); + continue; + } + } + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) bos.output = ONE_CHAR; + continue; + } + } + } + } + if (value === "[" && peek2() !== ":" || value === "-" && peek2() === "]") value = `\\${value}`; + if (value === "]" && (prev.value === "[" || prev.value === "[^")) value = `\\${value}`; + if (opts.posix === true && value === "!" && prev.value === "[") value = "^"; + prev.value += value; + append({ value }); + continue; + } + if (state.quotes === 1 && value !== "\"") { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + if (value === "\"") { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) push2({ + type: "text", + value + }); + continue; + } + if (value === "(") { + increment("parens"); + push2({ + type: "paren", + value + }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError(syntaxError2("opening", "(")); + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push2({ + type: "paren", + value, + output: state.parens ? ")" : "\\)" + }); + decrement("parens"); + continue; + } + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError2("closing", "]")); + value = `\\${value}`; + } else increment("brackets"); + push2({ + type: "bracket", + value + }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push2({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError2("opening", "[")); + push2({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) value = `/${value}`; + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) continue; + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push2(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push2({ + type: "text", + value, + output: value + }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") break; + if (arr[i].type !== "dots") range.unshift(arr[i].value); + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t of toks) state.output += t.output || t.value; + } + push2({ + type: "brace", + value, + output + }); + decrement("braces"); + braces.pop(); + continue; + } + if (value === "|") { + if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++; + push2({ + type: "text", + value + }); + continue; + } + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack2[stack2.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push2({ + type: "comma", + value, + output + }); + continue; + } + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push2({ + type: "slash", + value, + output: SLASH_LITERAL + }); + continue; + } + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push2({ + type: "text", + value, + output: DOT_LITERAL + }); + continue; + } + push2({ + type: "dot", + value, + output: DOT_LITERAL + }); + continue; + } + if (value === "?") { + if (!(prev && prev.value === "(") && opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek2(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`; + push2({ + type: "text", + value, + output + }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push2({ + type: "qmark", + value, + output: QMARK_NO_DOT + }); + continue; + } + push2({ + type: "qmark", + value, + output: QMARK + }); + continue; + } + if (value === "!") { + if (opts.noextglob !== true && peek2() === "(") { + if (peek2(2) !== "?" || !/[!=<:]/.test(peek2(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + if (value === "+") { + if (opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push2({ + type: "plus", + value, + output: PLUS_LITERAL + }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push2({ + type: "plus", + value + }); + continue; + } + push2({ + type: "plus", + value: PLUS_LITERAL + }); + continue; + } + if (value === "@") { + if (opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { + push2({ + type: "at", + extglob: true, + value, + output: "" + }); + continue; + } + push2({ + type: "text", + value + }); + continue; + } + if (value !== "*") { + if (value === "$" || value === "^") value = `\\${value}`; + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push2({ + type: "text", + value + }); + continue; + } + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push2({ + type: "star", + value, + output: "" + }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push2({ + type: "star", + value, + output: "" + }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") break; + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push2({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push2({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token2 = { + type: "star", + value, + output: star + }; + if (opts.bash === true) { + token2.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") token2.output = nodot + token2.output; + push2(token2); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token2.output = value; + push2(token2); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek2() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push2(token2); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError2("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError2("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError2("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push2({ + type: "maybe_slash", + value: "", + output: `${SLASH_LITERAL}?` + }); + if (state.backtrack === true) { + state.output = ""; + for (const token2 of state.tokens) { + state.output += token2.output != null ? token2.output : token2.value; + if (token2.suffix) state.output += token2.suffix; + } + } + return state; + }; + parse7.fastpaths = (input, options8) => { + const opts = { ...options8 }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options8); + const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { + negated: false, + prefix: "" + }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) star = `(${star})`; + const globstar = (opts2) => { + if (opts2.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": return `${nodot}${ONE_CHAR}${star}`; + case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": return nodot + globstar(opts); + case "**/*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + const source3 = create(match[1]); + if (!source3) return; + return source3 + DOT_LITERAL + match[2]; + } + } + }; + let source2 = create(utils.removePrefix(input, state)); + if (source2 && opts.strictSlashes !== true) source2 += `${SLASH_LITERAL}?`; + return source2; + }; + module.exports = parse7; + } }); + require_picomatch = __commonJS({ "node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports, module) { + "use strict"; + var path15 = __require("path"); + var scan = require_scan(); + var parse7 = require_parse2(); + var utils = require_utils2(); + var constants = require_constants2(); + var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); + var picomatch = (glob, options8, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch(input, options8, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state2 = isMatch(str); + if (state2) return state2; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject2(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string"); + const opts = options8 || {}; + const posix = utils.isWindows(options8); + const regex = isState ? picomatch.compileRe(glob, options8) : picomatch.makeRe(glob, options8, false, true); + const state = regex.state; + delete regex.state; + let isIgnored2 = () => false; + if (opts.ignore) { + const ignoreOpts = { + ...options8, + ignore: null, + onMatch: null, + onResult: null + }; + isIgnored2 = picomatch(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options8, { + glob, + posix + }); + const result = { + glob, + state, + regex, + posix, + input, + output, + match, + isMatch + }; + if (typeof opts.onResult === "function") opts.onResult(result); + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored2(input)) { + if (typeof opts.onIgnore === "function") opts.onIgnore(result); + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") opts.onMatch(result); + return returnObject ? result : true; + }; + if (returnState) matcher.state = state; + return matcher; + }; + picomatch.test = (input, regex, options8, { glob, posix } = {}) => { + if (typeof input !== "string") throw new TypeError("Expected input to be a string"); + if (input === "") return { + isMatch: false, + output: "" + }; + const opts = options8 || {}; + const format3 = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format3 ? format3(input) : input; + if (match === false) { + output = format3 ? format3(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) if (opts.matchBase === true || opts.basename === true) match = picomatch.matchBase(input, regex, options8, posix); + else match = regex.exec(output); + return { + isMatch: Boolean(match), + match, + output + }; + }; + picomatch.matchBase = (input, glob, options8, posix = utils.isWindows(options8)) => { + return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8)).test(path15.basename(input)); + }; + picomatch.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str); + picomatch.parse = (pattern, options8) => { + if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options8)); + return parse7(pattern, { + ...options8, + fastpaths: false + }); + }; + picomatch.scan = (input, options8) => scan(input, options8); + picomatch.compileRe = (state, options8, returnOutput = false, returnState = false) => { + if (returnOutput === true) return state.output; + const opts = options8 || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source2 = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) source2 = `^(?!${source2}).*$`; + const regex = picomatch.toRegex(source2, options8); + if (returnState === true) regex.state = state; + return regex; + }; + picomatch.makeRe = (input, options8 = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string"); + let parsed = { + negated: false, + fastpaths: true + }; + if (options8.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse7.fastpaths(input, options8); + if (!parsed.output) parsed = parse7(input, options8); + return picomatch.compileRe(parsed, options8, returnOutput, returnState); + }; + picomatch.toRegex = (source2, options8) => { + try { + const opts = options8 || {}; + return new RegExp(source2, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options8 && options8.debug === true) throw err; + return /$^/; + } + }; + picomatch.constants = constants; + module.exports = picomatch; + } }); + require_picomatch2 = __commonJS({ "node_modules/micromatch/node_modules/picomatch/index.js"(exports, module) { + "use strict"; + module.exports = require_picomatch(); + } }); + require_micromatch = __commonJS({ "node_modules/micromatch/index.js"(exports, module) { + "use strict"; + var util2 = __require("util"); + var braces = require_braces(); + var picomatch = require_picomatch2(); + var utils = require_utils2(); + var isEmptyString = (v) => v === "" || v === "./"; + var hasBraces = (v) => { + const index = v.indexOf("{"); + return index > -1 && v.indexOf("}", index) > -1; + }; + var micromatch2 = (list, patterns, options8) => { + patterns = [].concat(patterns); + list = [].concat(list); + let omit2 = /* @__PURE__ */ new Set(); + let keep = /* @__PURE__ */ new Set(); + let items = /* @__PURE__ */ new Set(); + let negatives = 0; + let onResult = (state) => { + items.add(state.output); + if (options8 && options8.onResult) options8.onResult(state); + }; + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { + ...options8, + onResult + }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) negatives++; + for (let item of list) { + let matched = isMatch(item, true); + if (!(negated ? !matched.isMatch : matched.isMatch)) continue; + if (negated) omit2.add(matched.output); + else { + omit2.delete(matched.output); + keep.add(matched.output); + } + } + } + let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit2.has(item)); + if (options8 && matches.length === 0) { + if (options8.failglob === true) throw new Error(`No matches found for "${patterns.join(", ")}"`); + if (options8.nonull === true || options8.nullglob === true) return options8.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; + } + return matches; + }; + micromatch2.match = micromatch2; + micromatch2.matcher = (pattern, options8) => picomatch(pattern, options8); + micromatch2.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str); + micromatch2.any = micromatch2.isMatch; + micromatch2.not = (list, patterns, options8 = {}) => { + patterns = [].concat(patterns).map(String); + let result = /* @__PURE__ */ new Set(); + let items = []; + let onResult = (state) => { + if (options8.onResult) options8.onResult(state); + items.push(state.output); + }; + let matches = new Set(micromatch2(list, patterns, { + ...options8, + onResult + })); + for (let item of items) if (!matches.has(item)) result.add(item); + return [...result]; + }; + micromatch2.contains = (str, pattern, options8) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util2.inspect(str)}"`); + if (Array.isArray(pattern)) return pattern.some((p) => micromatch2.contains(str, p, options8)); + if (typeof pattern === "string") { + if (isEmptyString(str) || isEmptyString(pattern)) return false; + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) return true; + } + return micromatch2.isMatch(str, pattern, { + ...options8, + contains: true + }); + }; + micromatch2.matchKeys = (obj, patterns, options8) => { + if (!utils.isObject(obj)) throw new TypeError("Expected the first argument to be an object"); + let keys = micromatch2(Object.keys(obj), patterns, options8); + let res = {}; + for (let key2 of keys) res[key2] = obj[key2]; + return res; + }; + micromatch2.some = (list, patterns, options8) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options8); + if (items.some((item) => isMatch(item))) return true; + } + return false; + }; + micromatch2.every = (list, patterns, options8) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options8); + if (!items.every((item) => isMatch(item))) return false; + } + return true; + }; + micromatch2.all = (str, patterns, options8) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util2.inspect(str)}"`); + return [].concat(patterns).every((p) => picomatch(p, options8)(str)); + }; + micromatch2.capture = (glob, input, options8) => { + let posix = utils.isWindows(options8); + let match = picomatch.makeRe(String(glob), { + ...options8, + capture: true + }).exec(posix ? utils.toPosixSlashes(input) : input); + if (match) return match.slice(1).map((v) => v === void 0 ? "" : v); + }; + micromatch2.makeRe = (...args) => picomatch.makeRe(...args); + micromatch2.scan = (...args) => picomatch.scan(...args); + micromatch2.parse = (patterns, options8) => { + let res = []; + for (let pattern of [].concat(patterns || [])) for (let str of braces(String(pattern), options8)) res.push(picomatch.parse(str, options8)); + return res; + }; + micromatch2.braces = (pattern, options8) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + if (options8 && options8.nobrace === true || !hasBraces(pattern)) return [pattern]; + return braces(pattern, options8); + }; + micromatch2.braceExpand = (pattern, options8) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + return micromatch2.braces(pattern, { + ...options8, + expand: true + }); + }; + micromatch2.hasBraces = hasBraces; + module.exports = micromatch2; + } }); + require_pattern = __commonJS({ "node_modules/fast-glob/out/utils/pattern.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; + var path15 = __require("path"); + var globParent = require_glob_parent(); + var micromatch2 = require_micromatch(); + var GLOBSTAR = "**"; + var ESCAPE_SYMBOL = "\\"; + var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; + var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; + var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; + var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; + var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; + var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; + function isStaticPattern(pattern, options8 = {}) { + return !isDynamicPattern(pattern, options8); + } + exports.isStaticPattern = isStaticPattern; + function isDynamicPattern(pattern, options8 = {}) { + if (pattern === "") return false; + if (options8.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) return true; + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) return true; + if (options8.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) return true; + if (options8.braceExpansion !== false && hasBraceExpansion(pattern)) return true; + return false; + } + exports.isDynamicPattern = isDynamicPattern; + function hasBraceExpansion(pattern) { + const openingBraceIndex = pattern.indexOf("{"); + if (openingBraceIndex === -1) return false; + const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); + if (closingBraceIndex === -1) return false; + const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); + return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); + } + function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + } + exports.convertToPositivePattern = convertToPositivePattern; + function convertToNegativePattern(pattern) { + return "!" + pattern; + } + exports.convertToNegativePattern = convertToNegativePattern; + function isNegativePattern(pattern) { + return pattern.startsWith("!") && pattern[1] !== "("; + } + exports.isNegativePattern = isNegativePattern; + function isPositivePattern(pattern) { + return !isNegativePattern(pattern); + } + exports.isPositivePattern = isPositivePattern; + function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); + } + exports.getNegativePatterns = getNegativePatterns; + function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); + } + exports.getPositivePatterns = getPositivePatterns; + function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); + } + exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; + function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); + } + exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; + function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith("..") || pattern.startsWith("./.."); + } + exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; + function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); + } + exports.getBaseDirectory = getBaseDirectory; + function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); + } + exports.hasGlobStar = hasGlobStar; + function endsWithSlashGlobStar(pattern) { + return pattern.endsWith("/" + GLOBSTAR); + } + exports.endsWithSlashGlobStar = endsWithSlashGlobStar; + function isAffectDepthOfReadingPattern(pattern) { + const basename = path15.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); + } + exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; + function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); + } + exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; + function expandBraceExpansion(pattern) { + const patterns = micromatch2.braces(pattern, { + expand: true, + nodupes: true, + keepEscaping: true + }); + patterns.sort((a, b) => a.length - b.length); + return patterns.filter((pattern2) => pattern2 !== ""); + } + exports.expandBraceExpansion = expandBraceExpansion; + function getPatternParts(pattern, options8) { + let { parts } = micromatch2.scan(pattern, Object.assign(Object.assign({}, options8), { parts: true })); + if (parts.length === 0) parts = [pattern]; + if (parts[0].startsWith("/")) { + parts[0] = parts[0].slice(1); + parts.unshift(""); + } + return parts; + } + exports.getPatternParts = getPatternParts; + function makeRe(pattern, options8) { + return micromatch2.makeRe(pattern, options8); + } + exports.makeRe = makeRe; + function convertPatternsToRe(patterns, options8) { + return patterns.map((pattern) => makeRe(pattern, options8)); + } + exports.convertPatternsToRe = convertPatternsToRe; + function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); + } + exports.matchAny = matchAny; + function removeDuplicateSlashes(pattern) { + return pattern.replace(DOUBLE_SLASH_RE, "/"); + } + exports.removeDuplicateSlashes = removeDuplicateSlashes; + function partitionAbsoluteAndRelative(patterns) { + const absolute = []; + const relative2 = []; + for (const pattern of patterns) if (isAbsolute(pattern)) absolute.push(pattern); + else relative2.push(pattern); + return [absolute, relative2]; + } + exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; + function isAbsolute(pattern) { + return path15.isAbsolute(pattern); + } + exports.isAbsolute = isAbsolute; + } }); + require_merge2 = __commonJS({ "node_modules/merge2/index.js"(exports, module) { + "use strict"; + var PassThrough = __require("stream").PassThrough; + var slice = Array.prototype.slice; + module.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options8 = args[args.length - 1]; + if (options8 && !Array.isArray(options8) && options8.pipe == null) args.pop(); + else options8 = {}; + const doEnd = options8.end !== false; + const doPipeError = options8.pipeError === true; + if (options8.objectMode == null) options8.objectMode = true; + if (options8.highWaterMark == null) options8.highWaterMark = 64 * 1024; + const mergedStream = PassThrough(options8); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) streamsQueue.push(pauseStreams(arguments[i], options8)); + mergeStream(); + return this; + } + function mergeStream() { + if (merging) return; + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream); + return; + } + if (!Array.isArray(streams)) streams = [streams]; + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) return; + merging = false; + mergeStream(); + } + function pipe(stream) { + function onend() { + stream.removeListener("merge2UnpipeEnd", onend); + stream.removeListener("end", onend); + if (doPipeError) stream.removeListener("error", onerror); + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream._readableState.endEmitted) return next(); + stream.on("merge2UnpipeEnd", onend); + stream.on("end", onend); + if (doPipeError) stream.on("error", onerror); + stream.pipe(mergedStream, { end: false }); + stream.resume(); + } + for (let i = 0; i < streams.length; i++) pipe(streams[i]); + next(); + } + function endStream() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) mergedStream.end(); + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream) { + stream.emit("merge2UnpipeEnd"); + }); + if (args.length) addStream.apply(null, args); + return mergedStream; + } + function pauseStreams(streams, options8) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options8)); + if (!streams._readableState || !streams.pause || !streams.pipe) throw new Error("Only readable stream can be merged."); + streams.pause(); + } else for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options8); + return streams; + } + } }); + require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.merge = void 0; + var merge2 = require_merge2(); + function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once("error", (error) => mergedStream.emit("error", error)); + }); + mergedStream.once("close", () => propagateCloseEventToSources(streams)); + mergedStream.once("end", () => propagateCloseEventToSources(streams)); + return mergedStream; + } + exports.merge = merge; + function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit("close")); + } + } }); + require_string = __commonJS({ "node_modules/fast-glob/out/utils/string.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEmpty = exports.isString = void 0; + function isString(input) { + return typeof input === "string"; + } + exports.isString = isString; + function isEmpty(input) { + return input === ""; + } + exports.isEmpty = isEmpty; + } }); + require_utils3 = __commonJS({ "node_modules/fast-glob/out/utils/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; + exports.array = require_array(); + exports.errno = require_errno(); + exports.fs = require_fs(); + exports.path = require_path(); + exports.pattern = require_pattern(); + exports.stream = require_stream(); + exports.string = require_string(); + } }); + require_tasks = __commonJS({ "node_modules/fast-glob/out/managers/tasks.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; + var utils = require_utils3(); + function generate(input, settings) { + const patterns = processPatterns(input, settings); + const ignore = processPatterns(settings.ignore, settings); + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); + return staticTasks.concat(dynamicTasks); + } + exports.generate = generate; + function processPatterns(input, settings) { + let patterns = input; + if (settings.braceExpansion) patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); + if (settings.baseNameMatch) patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); + return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); + } + function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + if ("." in insideCurrentDirectoryGroup) tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); + else tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + return tasks; + } + exports.convertPatternsToTasks = convertPatternsToTasks; + function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); + } + exports.getPositivePatterns = getPositivePatterns; + function getNegativePatternsAsPositive(patterns, ignore) { + return utils.pattern.getNegativePatterns(patterns).concat(ignore).map(utils.pattern.convertToPositivePattern); + } + exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; + function groupPatternsByBaseDirectory(patterns) { + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) collection[base].push(pattern); + else collection[base] = [pattern]; + return collection; + }, {}); + } + exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; + function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); + } + exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; + function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; + } + exports.convertPatternGroupToTask = convertPatternGroupToTask; + } }); + require_async = __commonJS({ "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read3(path15, settings, callback) { + settings.fs.lstat(path15, (lstatError, lstat2) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat2.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat2); + return; + } + settings.fs.stat(path15, (statError, stat2) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat2); + return; + } + if (settings.markSymbolicLink) stat2.isSymbolicLink = () => true; + callSuccessCallback(callback, stat2); + }); + }); + } + exports.read = read3; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } }); + require_sync = __commonJS({ "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read3(path15, settings) { + const lstat2 = settings.fs.lstatSync(path15); + if (!lstat2.isSymbolicLink() || !settings.followSymbolicLink) return lstat2; + try { + const stat2 = settings.fs.statSync(path15); + if (settings.markSymbolicLink) stat2.isSymbolicLink = () => true; + return stat2; + } catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) return lstat2; + throw error; + } + } + exports.read = read3; + } }); + require_fs2 = __commonJS({ "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + var fs4 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs4.lstat, + stat: fs4.stat, + lstatSync: fs4.lstatSync, + statSync: fs4.statSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; + } }); + require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var fs4 = require_fs2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs4.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; + } }); + require_out = __commonJS({ "node_modules/@nodelib/fs.stat/out/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.statSync = exports.stat = exports.Settings = void 0; + var async = require_async(); + var sync = require_sync(); + var settings_1 = require_settings(); + exports.Settings = settings_1.default; + function stat2(path15, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path15, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.stat = stat2; + function statSync2(path15, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path15, settings); + } + exports.statSync = statSync2; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } + } }); + require_queue_microtask = __commonJS({ "node_modules/queue-microtask/index.js"(exports, module) { + var promise; + module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); + } }); + require_run_parallel = __commonJS({ "node_modules/run-parallel/index.js"(exports, module) { + module.exports = runParallel; + var queueMicrotask2 = require_queue_microtask(); + function runParallel(tasks, cb) { + let results, pending, keys; + let isSync = true; + if (Array.isArray(tasks)) { + results = []; + pending = tasks.length; + } else { + keys = Object.keys(tasks); + results = {}; + pending = keys.length; + } + function done(err) { + function end() { + if (cb) cb(err, results); + cb = null; + } + if (isSync) queueMicrotask2(end); + else end(); + } + function each(i, err, result) { + results[i] = result; + if (--pending === 0 || err) done(err); + } + if (!pending) done(null); + else if (keys) keys.forEach(function(key2) { + tasks[key2](function(err, result) { + each(key2, err, result); + }); + }); + else tasks.forEach(function(task, i) { + task(function(err, result) { + each(i, err, result); + }); + }); + isSync = false; + } + } }); + require_constants3 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/constants.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; + var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); + if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); + var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); + var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); + var SUPPORTED_MAJOR_VERSION = 10; + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION || MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= 10; + } }); + require_fs3 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; + } }); + require_utils4 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.fs = void 0; + exports.fs = require_fs3(); + } }); + require_common = __commonJS({ "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = void 0; + function joinPathSegments(a, b, separator) { + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; + } }); + require_async2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + var fsStat = require_out(); + var rpl = require_run_parallel(); + var constants_1 = require_constants3(); + var utils = require_utils4(); + var common = require_common(); + function read3(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); + } + exports.read = read3; + function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + rpl(entries.map((entry) => makeRplTaskEntry(entry, settings)), (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; + } + function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + rpl(names.map((name) => { + const path15 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path15, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path: path15, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + done(null, entry); + }); + }; + }), (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); + } + exports.readdir = readdir; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } + } }); + require_sync2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + var fsStat = require_out(); + var constants_1 = require_constants3(); + var utils = require_utils4(); + var common = require_common(); + function read3(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return readdirWithFileTypes(directory, settings); + return readdir(directory, settings); + } + exports.read = read3; + function readdirWithFileTypes(directory, settings) { + return settings.fs.readdirSync(directory, { withFileTypes: true }).map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) throw error; + } + return entry; + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function readdir(directory, settings) { + return settings.fs.readdirSync(directory).map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + return entry; + }); + } + exports.readdir = readdir; + } }); + require_fs4 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + var fs4 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs4.lstat, + stat: fs4.stat, + lstatSync: fs4.lstatSync, + statSync: fs4.statSync, + readdir: fs4.readdir, + readdirSync: fs4.readdirSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; + } }); + require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var path15 = __require("path"); + var fsStat = require_out(); + var fs4 = require_fs4(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs4.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; + } }); + require_out2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.scandirSync = exports.scandir = void 0; + var async = require_async2(); + var sync = require_sync2(); + var settings_1 = require_settings2(); + exports.Settings = settings_1.default; + function scandir(path15, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path15, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.scandir = scandir; + function scandirSync(path15, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path15, settings); + } + exports.scandirSync = scandirSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } + } }); + require_reusify = __commonJS({ "node_modules/reusify/reusify.js"(exports, module) { + "use strict"; + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) head = current.next; + else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module.exports = reusify; + } }); + require_queue = __commonJS({ "node_modules/fastq/queue.js"(exports, module) { + "use strict"; + var reusify = require_reusify(); + function fastqueue(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + if (!(_concurrency >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + var cache3 = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self = { + push: push2, + drain: noop2, + saturated: noop2, + pause, + paused: false, + get concurrency() { + return _concurrency; + }, + set concurrency(value) { + if (!(value >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + _concurrency = value; + if (self.paused) return; + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + }, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop2, + kill, + killAndDrain, + error + }; + return self; + function running() { + return _running; + } + function pause() { + self.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self.paused) return; + self.paused = false; + if (queueHead === null) { + _running++; + release(); + return; + } + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self.length() === 0; + } + function push2(value, done) { + var current = cache3.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop2; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache3.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop2; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) cache3.release(holder); + var next = queueHead; + if (next && _running <= _concurrency) if (!self.paused) { + if (queueTail === queueHead) queueTail = null; + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) self.empty(); + } else _running--; + else if (--_running === 0) self.drain(); + } + function kill() { + queueHead = null; + queueTail = null; + self.drain = noop2; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self.drain(); + self.drain = noop2; + } + function error(handler) { + errorHandler = handler; + } + } + function noop2() {} + function Task() { + this.value = null; + this.callback = noop2; + this.next = null; + this.release = noop2; + this.context = null; + this.errorHandler = null; + var self = this; + this.worked = function worked(err, result) { + var callback = self.callback; + var errorHandler = self.errorHandler; + var val = self.value; + self.value = null; + self.callback = noop2; + if (self.errorHandler) errorHandler(err, val); + callback.call(self.context, err, result); + self.release(self); + }; + } + function queueAsPromised(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, _concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push2; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push2(value) { + var p = new Promise(function(resolve3, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve3(result); + }); + }); + p.catch(noop2); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve3, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve3(result); + }); + }); + p.catch(noop2); + return p; + } + function drained() { + return new Promise(function(resolve3) { + process.nextTick(function() { + if (queue.idle()) resolve3(); + else { + var previousDrain = queue.drain; + queue.drain = function() { + if (typeof previousDrain === "function") previousDrain(); + resolve3(); + queue.drain = previousDrain; + }; + } + }); + }); + } + } + module.exports = fastqueue; + module.exports.promise = queueAsPromised; + } }); + require_common2 = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; + function isFatalError(settings, error) { + if (settings.errorFilter === null) return true; + return !settings.errorFilter(error); + } + exports.isFatalError = isFatalError; + function isAppliedFilter(filter2, value) { + return filter2 === null || filter2(value); + } + exports.isAppliedFilter = isAppliedFilter; + function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); + } + exports.replacePathSegmentSeparator = replacePathSegmentSeparator; + function joinPathSegments(a, b, separator) { + if (a === "") return b; + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; + } }); + require_reader = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var common = require_common2(); + var Reader = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } + }; + exports.default = Reader; + } }); + require_async3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var events_1 = __require("events"); + var fsScandir = require_out2(); + var fastq = require_queue(); + var common = require_common2(); + var reader_1 = require_reader(); + var AsyncReader = class extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) this._emitter.emit("end"); + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) throw new Error("The reader is already destroyed"); + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on("entry", callback); + } + onError(callback) { + this._emitter.once("error", callback); + } + onEnd(callback) { + this._emitter.once("end", callback); + } + _pushToQueue(directory, base) { + const queueItem = { + directory, + base + }; + this._queue.push(queueItem, (error) => { + if (error !== null) this._handleError(error); + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, void 0); + return; + } + for (const entry of entries) this._handleEntry(entry, item.base); + done(null, void 0); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) return; + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit("error", error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) return; + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._emitEntry(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _emitEntry(entry) { + this._emitter.emit("entry", entry); + } + }; + exports.default = AsyncReader; + } }); + require_async4 = __commonJS({ "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var async_1 = require_async3(); + var AsyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } + }; + exports.default = AsyncProvider; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, entries) { + callback(null, entries); + } + } }); + require_stream2 = __commonJS({ "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var stream_1 = __require("stream"); + var async_1 = require_async3(); + var StreamProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => {}, + destroy: () => { + if (!this._reader.isDestroyed) this._reader.destroy(); + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit("error", error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } + }; + exports.default = StreamProvider; + } }); + require_sync3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var fsScandir = require_out2(); + var common = require_common2(); + var reader_1 = require_reader(); + var SyncReader = class extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = /* @__PURE__ */ new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ + directory, + base + }); + } + _handleQueue() { + for (const item of this._queue.values()) this._handleDirectory(item.directory, item.base); + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) this._handleEntry(entry, base); + } catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) return; + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._pushToStorage(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _pushToStorage(entry) { + this._storage.push(entry); + } + }; + exports.default = SyncReader; + } }); + require_sync4 = __commonJS({ "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var sync_1 = require_sync3(); + var SyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } + }; + exports.default = SyncProvider; + } }); + require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var path15 = __require("path"); + var fsScandir = require_out2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, void 0); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; + } }); + require_out3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; + var async_1 = require_async4(); + var stream_1 = require_stream2(); + var sync_1 = require_sync4(); + var settings_1 = require_settings3(); + exports.Settings = settings_1.default; + function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); + } + exports.walk = walk; + function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new sync_1.default(directory, settings).read(); + } + exports.walkSync = walkSync; + function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new stream_1.default(directory, settings).read(); + } + exports.walkStream = walkStream; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } + } }); + require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var path15 = __require("path"); + var fsStat = require_out(); + var utils = require_utils3(); + var Reader = class { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path15.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) entry.stats = stats; + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } + }; + exports.default = Reader; + } }); + require_stream3 = __commonJS({ "node_modules/fast-glob/out/readers/stream.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var stream_1 = __require("stream"); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderStream = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root2, options8) { + return this._walkStream(root2, options8); + } + static(patterns, options8) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options8).then((entry) => { + if (entry !== null && options8.entryFilter(entry)) stream.push(entry); + if (index === filepaths.length - 1) stream.end(); + done(); + }).catch(done); + }; + for (let i = 0; i < filepaths.length; i++) stream.write(i); + return stream; + } + _getEntry(filepath, pattern, options8) { + return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { + if (options8.errorFilter(error)) return null; + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve3, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve3(stats) : reject(error); + }); + }); + } + }; + exports.default = ReaderStream; + } }); + require_async5 = __commonJS({ "node_modules/fast-glob/out/readers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var stream_1 = require_stream3(); + var ReaderAsync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkAsync = fsWalk.walk; + this._readerStream = new stream_1.default(this._settings); + } + dynamic(root2, options8) { + return new Promise((resolve3, reject) => { + this._walkAsync(root2, options8, (error, entries) => { + if (error === null) resolve3(entries); + else reject(error); + }); + }); + } + async static(patterns, options8) { + const entries = []; + const stream = this._readerStream.static(patterns, options8); + return new Promise((resolve3, reject) => { + stream.once("error", reject); + stream.on("data", (entry) => entries.push(entry)); + stream.once("end", () => resolve3(entries)); + }); + } + }; + exports.default = ReaderAsync; + } }); + require_matcher = __commonJS({ "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var utils = require_utils3(); + var Matcher = class { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + for (const pattern of this._patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + return utils.pattern.getPatternParts(pattern, this._micromatchOptions).map((part) => { + if (!utils.pattern.isDynamicPattern(part, this._settings)) return { + dynamic: false, + pattern: part + }; + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } + }; + exports.default = Matcher; + } }); + require_partial = __commonJS({ "node_modules/fast-glob/out/providers/matchers/partial.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var matcher_1 = require_matcher(); + var PartialMatcher = class extends matcher_1.default { + match(filepath) { + const parts = filepath.split("/"); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + if (!pattern.complete && levels > section.length) return true; + if (parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) return true; + if (!segment.dynamic && segment.pattern === part) return true; + return false; + })) return true; + } + return false; + } + }; + exports.default = PartialMatcher; + } }); + require_deep = __commonJS({ "node_modules/fast-glob/out/providers/filters/deep.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var utils = require_utils3(); + var partial_1 = require_partial(); + var DeepFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath, entry.path)) return false; + if (this._isSkippedSymbolicLink(entry)) return false; + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) return false; + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath, entryPath) { + if (this._settings.deep === Infinity) return false; + return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath, entryPath) { + const entryPathDepth = entryPath.split("/").length; + if (basePath === "") return entryPathDepth; + return entryPathDepth - basePath.split("/").length; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } + }; + exports.default = DeepFilter; + } }); + require_entry = __commonJS({ "node_modules/fast-glob/out/providers/filters/entry.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var utils = require_utils3(); + var EntryFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = /* @__PURE__ */ new Map(); + } + getFilter(positive, negative) { + const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); + const patterns = { + positive: { all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) }, + negative: { + absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), + relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) + } + }; + return (entry) => this._filter(entry, patterns); + } + _filter(entry, patterns) { + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._settings.unique && this._isDuplicateEntry(filepath)) return false; + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) return false; + const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); + if (this._settings.unique && isMatched) this._createIndexRecord(filepath); + return isMatched; + } + _isDuplicateEntry(filepath) { + return this.index.has(filepath); + } + _createIndexRecord(filepath) { + this.index.set(filepath, void 0); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + if (!this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2)) return false; + if (this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2)) return false; + if (this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2)) return false; + return true; + } + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { + if (patternsRe.length === 0) return false; + const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); + } + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { + if (patternsRe.length === 0) return false; + const isMatched = utils.pattern.matchAny(filepath, patternsRe); + if (!isMatched && isDirectory2) return utils.pattern.matchAny(filepath + "/", patternsRe); + return isMatched; + } + }; + exports.default = EntryFilter; + } }); + require_error = __commonJS({ "node_modules/fast-glob/out/providers/filters/error.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var utils = require_utils3(); + var ErrorFilter = class { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } + }; + exports.default = ErrorFilter; + } }); + require_entry2 = __commonJS({ "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var utils = require_utils3(); + var EntryTransformer = class { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) filepath += "/"; + if (!this._settings.objectMode) return filepath; + return Object.assign(Object.assign({}, entry), { path: filepath }); + } + }; + exports.default = EntryTransformer; + } }); + require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var path15 = __require("path"); + var deep_1 = require_deep(); + var entry_1 = require_entry(); + var error_1 = require_error(); + var entry_2 = require_entry2(); + var Provider = class { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path15.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath = task.base === "." ? "" : task.base; + return { + basePath, + pathSegmentSeparator: "/", + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } + }; + exports.default = Provider; + } }); + require_async6 = __commonJS({ "node_modules/fast-glob/out/providers/async.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var async_1 = require_async5(); + var provider_1 = require_provider(); + var ProviderAsync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new async_1.default(this._settings); + } + async read(task) { + const root2 = this._getRootDirectory(task); + const options8 = this._getReaderOptions(task); + return (await this.api(root2, task, options8)).map((entry) => options8.transform(entry)); + } + api(root2, task, options8) { + if (task.dynamic) return this._reader.dynamic(root2, options8); + return this._reader.static(task.patterns, options8); + } + }; + exports.default = ProviderAsync; + } }); + require_stream4 = __commonJS({ "node_modules/fast-glob/out/providers/stream.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var stream_1 = __require("stream"); + var stream_2 = require_stream3(); + var provider_1 = require_provider(); + var ProviderStream = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root2 = this._getRootDirectory(task); + const options8 = this._getReaderOptions(task); + const source2 = this.api(root2, task, options8); + const destination = new stream_1.Readable({ + objectMode: true, + read: () => {} + }); + source2.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options8.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source2.destroy()); + return destination; + } + api(root2, task, options8) { + if (task.dynamic) return this._reader.dynamic(root2, options8); + return this._reader.static(task.patterns, options8); + } + }; + exports.default = ProviderStream; + } }); + require_sync5 = __commonJS({ "node_modules/fast-glob/out/readers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var fsStat = require_out(); + var fsWalk = require_out3(); + var reader_1 = require_reader2(); + var ReaderSync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root2, options8) { + return this._walkSync(root2, options8); + } + static(patterns, options8) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options8); + if (entry === null || !options8.entryFilter(entry)) continue; + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options8) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } catch (error) { + if (options8.errorFilter(error)) return null; + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } + }; + exports.default = ReaderSync; + } }); + require_sync6 = __commonJS({ "node_modules/fast-glob/out/providers/sync.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var sync_1 = require_sync5(); + var provider_1 = require_provider(); + var ProviderSync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root2 = this._getRootDirectory(task); + const options8 = this._getReaderOptions(task); + return this.api(root2, task, options8).map(options8.transform); + } + api(root2, task, options8) { + if (task.dynamic) return this._reader.dynamic(root2, options8); + return this._reader.static(task.patterns, options8); + } + }; + exports.default = ProviderSync; + } }); + require_settings4 = __commonJS({ "node_modules/fast-glob/out/settings.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; + var fs4 = __require("fs"); + var os = __require("os"); + var CPU_COUNT = Math.max(os.cpus().length, 1); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs4.lstat, + lstatSync: fs4.lstatSync, + stat: fs4.stat, + statSync: fs4.statSync, + readdir: fs4.readdir, + readdirSync: fs4.readdirSync + }; + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) this.onlyFiles = false; + if (this.stats) this.objectMode = true; + this.ignore = [].concat(this.ignore); + } + _getValue(option, value) { + return option === void 0 ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } + }; + exports.default = Settings; + } }); + require_out4 = __commonJS({ "node_modules/fast-glob/out/index.js"(exports, module) { + "use strict"; + var taskManager = require_tasks(); + var async_1 = require_async6(); + var stream_1 = require_stream4(); + var sync_1 = require_sync6(); + var settings_1 = require_settings4(); + var utils = require_utils3(); + async function FastGlob(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, async_1.default, options8); + const result = await Promise.all(works); + return utils.array.flatten(result); + } + (function(FastGlob2) { + FastGlob2.glob = FastGlob2; + FastGlob2.globSync = sync; + FastGlob2.globStream = stream; + FastGlob2.async = FastGlob2; + function sync(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, sync_1.default, options8); + return utils.array.flatten(works); + } + FastGlob2.sync = sync; + function stream(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, stream_1.default, options8); + return utils.stream.merge(works); + } + FastGlob2.stream = stream; + function generateTasks(source2, options8) { + assertPatternsInput(source2); + const patterns = [].concat(source2); + const settings = new settings_1.default(options8); + return taskManager.generate(patterns, settings); + } + FastGlob2.generateTasks = generateTasks; + function isDynamicPattern(source2, options8) { + assertPatternsInput(source2); + const settings = new settings_1.default(options8); + return utils.pattern.isDynamicPattern(source2, settings); + } + FastGlob2.isDynamicPattern = isDynamicPattern; + function escapePath(source2) { + assertPatternsInput(source2); + return utils.path.escape(source2); + } + FastGlob2.escapePath = escapePath; + function convertPathToPattern(source2) { + assertPatternsInput(source2); + return utils.path.convertPathToPattern(source2); + } + FastGlob2.convertPathToPattern = convertPathToPattern; + (function(posix2) { + function escapePath2(source2) { + assertPatternsInput(source2); + return utils.path.escapePosixPath(source2); + } + posix2.escapePath = escapePath2; + function convertPathToPattern2(source2) { + assertPatternsInput(source2); + return utils.path.convertPosixPathToPattern(source2); + } + posix2.convertPathToPattern = convertPathToPattern2; + })(FastGlob2.posix || (FastGlob2.posix = {})); + (function(win322) { + function escapePath2(source2) { + assertPatternsInput(source2); + return utils.path.escapeWindowsPath(source2); + } + win322.escapePath = escapePath2; + function convertPathToPattern2(source2) { + assertPatternsInput(source2); + return utils.path.convertWindowsPathToPattern(source2); + } + win322.convertPathToPattern = convertPathToPattern2; + })(FastGlob2.win32 || (FastGlob2.win32 = {})); + })(FastGlob || (FastGlob = {})); + function getWorks(source2, _Provider, options8) { + const patterns = [].concat(source2); + const settings = new settings_1.default(options8); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); + } + function assertPatternsInput(input) { + if (![].concat(input).every((item) => utils.string.isString(item) && !utils.string.isEmpty(item))) throw new TypeError("Patterns must be a string (non empty) or an array of strings"); + } + module.exports = FastGlob; + } }); + require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports, module) { + var p = process || {}; + var argv = p.argv || []; + var env = p.env || {}; + var isColorSupported2 = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI); + var formatter = (open, close, replace = open) => (input) => { + let string = "" + input, index = string.indexOf(close, open.length); + return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close; + }; + var replaceClose = (string, close, replace, index) => { + let result = "", cursor2 = 0; + do { + result += string.substring(cursor2, index) + replace; + cursor2 = index + close.length; + index = string.indexOf(close, cursor2); + } while (~index); + return result + string.substring(cursor2); + }; + var createColors2 = (enabled = isColorSupported2) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1B[0m", "\x1B[0m"), + bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), + dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), + italic: f("\x1B[3m", "\x1B[23m"), + underline: f("\x1B[4m", "\x1B[24m"), + inverse: f("\x1B[7m", "\x1B[27m"), + hidden: f("\x1B[8m", "\x1B[28m"), + strikethrough: f("\x1B[9m", "\x1B[29m"), + black: f("\x1B[30m", "\x1B[39m"), + red: f("\x1B[31m", "\x1B[39m"), + green: f("\x1B[32m", "\x1B[39m"), + yellow: f("\x1B[33m", "\x1B[39m"), + blue: f("\x1B[34m", "\x1B[39m"), + magenta: f("\x1B[35m", "\x1B[39m"), + cyan: f("\x1B[36m", "\x1B[39m"), + white: f("\x1B[37m", "\x1B[39m"), + gray: f("\x1B[90m", "\x1B[39m"), + bgBlack: f("\x1B[40m", "\x1B[49m"), + bgRed: f("\x1B[41m", "\x1B[49m"), + bgGreen: f("\x1B[42m", "\x1B[49m"), + bgYellow: f("\x1B[43m", "\x1B[49m"), + bgBlue: f("\x1B[44m", "\x1B[49m"), + bgMagenta: f("\x1B[45m", "\x1B[49m"), + bgCyan: f("\x1B[46m", "\x1B[49m"), + bgWhite: f("\x1B[47m", "\x1B[49m"), + blackBright: f("\x1B[90m", "\x1B[39m"), + redBright: f("\x1B[91m", "\x1B[39m"), + greenBright: f("\x1B[92m", "\x1B[39m"), + yellowBright: f("\x1B[93m", "\x1B[39m"), + blueBright: f("\x1B[94m", "\x1B[39m"), + magentaBright: f("\x1B[95m", "\x1B[39m"), + cyanBright: f("\x1B[96m", "\x1B[39m"), + whiteBright: f("\x1B[97m", "\x1B[39m"), + bgBlackBright: f("\x1B[100m", "\x1B[49m"), + bgRedBright: f("\x1B[101m", "\x1B[49m"), + bgGreenBright: f("\x1B[102m", "\x1B[49m"), + bgYellowBright: f("\x1B[103m", "\x1B[49m"), + bgBlueBright: f("\x1B[104m", "\x1B[49m"), + bgMagentaBright: f("\x1B[105m", "\x1B[49m"), + bgCyanBright: f("\x1B[106m", "\x1B[49m"), + bgWhiteBright: f("\x1B[107m", "\x1B[49m") + }; + }; + module.exports = createColors2(); + module.exports.createColors = createColors2; + } }); + require_debug = __commonJS({ "node_modules/semver/internal/debug.js"(exports, module) { + "use strict"; + module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {}; + } }); + require_constants4 = __commonJS({ "node_modules/semver/internal/constants.js"(exports, module) { + "use strict"; + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH: 16, + MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6, + MAX_SAFE_INTEGER, + RELEASE_TYPES: [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ], + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } }); + require_re = __commonJS({ "node_modules/semver/internal/re.js"(exports, module) { + "use strict"; + var { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants4(); + var debug = require_debug(); + exports = module.exports = {}; + var re = exports.re = []; + var safeRe = exports.safeRe = []; + var src = exports.src = []; + var safeSrc = exports.safeSrc = []; + var t = exports.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token2, max] of safeRegexReplacements) value = value.split(`${token2}*`).join(`${token2}{0,${max}}`).split(`${token2}+`).join(`${token2}{1,${max}}`); + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } }); + require_parse_options = __commonJS({ "node_modules/semver/internal/parse-options.js"(exports, module) { + "use strict"; + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options8) => { + if (!options8) return emptyOpts; + if (typeof options8 !== "object") return looseOption; + return options8; + }; + module.exports = parseOptions; + } }); + require_identifiers = __commonJS({ "node_modules/semver/internal/identifiers.js"(exports, module) { + "use strict"; + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1; + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } }); + require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports, module) { + "use strict"; + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + module.exports = class _SemVer { + constructor(version, options8) { + options8 = parseOptions(options8); + if (version instanceof _SemVer) if (version.loose === !!options8.loose && version.includePrerelease === !!options8.includePrerelease) return version; + else version = version.version; + else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); + if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`); + debug("SemVer", version, options8); + this.options = options8; + this.loose = !!options8.loose; + this.includePrerelease = !!options8.includePrerelease; + const m = version.trim().match(options8.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) throw new TypeError(`Invalid Version: ${version}`); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version"); + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version"); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version"); + if (!m[4]) this.prerelease = []; + else this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) return num; + } + return id; + }); + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`; + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) return 0; + other = new _SemVer(other, this.options); + } + if (other.version === this.version) return 0; + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) other = new _SemVer(other, this.options); + if (this.major < other.major) return -1; + if (this.major > other.major) return 1; + if (this.minor < other.minor) return -1; + if (this.minor > other.minor) return 1; + if (this.patch < other.patch) return -1; + if (this.patch > other.patch) return 1; + return 0; + } + comparePre(other) { + if (!(other instanceof _SemVer)) other = new _SemVer(other, this.options); + if (this.prerelease.length && !other.prerelease.length) return -1; + else if (!this.prerelease.length && other.prerelease.length) return 1; + else if (!this.prerelease.length && !other.prerelease.length) return 0; + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) other = new _SemVer(other, this.options); + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) return 0; + else if (b === void 0) return 1; + else if (a === void 0) return -1; + else if (a === b) continue; + else return compareIdentifiers(a, b); + } while (++i); + } + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty"); + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`); + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`); + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) this.patch++; + this.prerelease = []; + break; + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) this.prerelease = [base]; + else { + let i = this.prerelease.length; + while (--i >= 0) if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists"); + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) prerelease = [identifier]; + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) this.prerelease = prerelease; + } else this.prerelease = prerelease; + } + break; + } + default: throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) this.raw += `+${this.build.join(".")}`; + return this; + } + }; + } }); + require_compare = __commonJS({ "node_modules/semver/functions/compare.js"(exports, module) { + "use strict"; + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module.exports = compare; + } }); + require_gte = __commonJS({ "node_modules/semver/functions/gte.js"(exports, module) { + "use strict"; + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module.exports = gte; + } }); + require_pseudomap = __commonJS({ "node_modules/pseudomap/pseudomap.js"(exports, module) { + var hasOwnProperty3 = Object.prototype.hasOwnProperty; + module.exports = PseudoMap; + function PseudoMap(set2) { + if (!(this instanceof PseudoMap)) throw new TypeError("Constructor PseudoMap requires 'new'"); + this.clear(); + if (set2) if (set2 instanceof PseudoMap || typeof Map === "function" && set2 instanceof Map) set2.forEach(function(value, key2) { + this.set(key2, value); + }, this); + else if (Array.isArray(set2)) set2.forEach(function(kv) { + this.set(kv[0], kv[1]); + }, this); + else throw new TypeError("invalid argument"); + } + PseudoMap.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + Object.keys(this._data).forEach(function(k) { + if (k !== "size") fn.call(thisp, this._data[k].value, this._data[k].key); + }, this); + }; + PseudoMap.prototype.has = function(k) { + return !!find(this._data, k); + }; + PseudoMap.prototype.get = function(k) { + var res = find(this._data, k); + return res && res.value; + }; + PseudoMap.prototype.set = function(k, v) { + set(this._data, k, v); + }; + PseudoMap.prototype.delete = function(k) { + var res = find(this._data, k); + if (res) { + delete this._data[res._index]; + this._data.size--; + } + }; + PseudoMap.prototype.clear = function() { + var data = /* @__PURE__ */ Object.create(null); + data.size = 0; + Object.defineProperty(this, "_data", { + value: data, + enumerable: false, + configurable: true, + writable: false + }); + }; + Object.defineProperty(PseudoMap.prototype, "size", { + get: function() { + return this._data.size; + }, + set: function(n) {}, + enumerable: true, + configurable: true + }); + PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function() { + throw new Error("iterators are not implemented in this version"); + }; + function same(a, b) { + return a === b || a !== a && b !== b; + } + function Entry(k, v, i) { + this.key = k; + this.value = v; + this._index = i; + } + function find(data, k) { + for (var i = 0, s = "_" + k, key2 = s; hasOwnProperty3.call(data, key2); key2 = s + i++) if (same(data[key2].key, k)) return data[key2]; + } + function set(data, k, v) { + for (var i = 0, s = "_" + k, key2 = s; hasOwnProperty3.call(data, key2); key2 = s + i++) if (same(data[key2].key, k)) { + data[key2].value = v; + return; + } + data.size++; + data[key2] = new Entry(k, v, key2); + } + } }); + require_map = __commonJS({ "node_modules/pseudomap/map.js"(exports, module) { + if (process.env.npm_package_name === "pseudomap" && process.env.npm_lifecycle_script === "test") process.env.TEST_PSEUDOMAP = "true"; + if (typeof Map === "function" && !process.env.TEST_PSEUDOMAP) module.exports = Map; + else module.exports = require_pseudomap(); + } }); + require_yallist = __commonJS({ "node_modules/yallist/yallist.js"(exports, module) { + module.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self = this; + if (!(self instanceof Yallist)) self = new Yallist(); + self.tail = null; + self.head = null; + self.length = 0; + if (list && typeof list.forEach === "function") list.forEach(function(item) { + self.push(item); + }); + else if (arguments.length > 0) for (var i = 0, l = arguments.length; i < l; i++) self.push(arguments[i]); + return self; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) throw new Error("removing node which does not belong to this list"); + var next = node.next; + var prev = node.prev; + if (next) next.prev = prev; + if (prev) prev.next = next; + if (node === this.head) this.head = next; + if (node === this.tail) this.tail = prev; + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + }; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) return; + if (node.list) node.list.removeNode(node); + var head = this.head; + node.list = this; + node.next = head; + if (head) head.prev = node; + this.head = node; + if (!this.tail) this.tail = node; + this.length++; + }; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) return; + if (node.list) node.list.removeNode(node); + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) tail.next = node; + this.tail = node; + if (!this.head) this.head = node; + this.length++; + }; + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) push2(this, arguments[i]); + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) unshift(this, arguments[i]); + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) return; + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) this.tail.next = null; + else this.head = null; + this.length--; + return res; + }; + Yallist.prototype.shift = function() { + if (!this.head) return; + var res = this.head.value; + this.head = this.head.next; + if (this.head) this.head.prev = null; + else this.tail = null; + this.length--; + return res; + }; + Yallist.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } + }; + Yallist.prototype.forEachReverse = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } + }; + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) walker = walker.next; + if (i === n && walker !== null) return walker.value; + }; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) walker = walker.prev; + if (i === n && walker !== null) return walker.value; + }; + Yallist.prototype.map = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + }; + Yallist.prototype.mapReverse = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + }; + Yallist.prototype.reduce = function(fn, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) acc = initial; + else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } else throw new TypeError("Reduce of empty list with no initial value"); + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + return acc; + }; + Yallist.prototype.reduceReverse = function(fn, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) acc = initial; + else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else throw new TypeError("Reduce of empty list with no initial value"); + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + return acc; + }; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + }; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) to += this.length; + from = from || 0; + if (from < 0) from += this.length; + var ret = new Yallist(); + if (to < from || to < 0) return ret; + if (from < 0) from = 0; + if (to > this.length) to = this.length; + for (var i = 0, walker = this.head; walker !== null && i < from; i++) walker = walker.next; + for (; walker !== null && i < to; i++, walker = walker.next) ret.push(walker.value); + return ret; + }; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) to += this.length; + from = from || 0; + if (from < 0) from += this.length; + var ret = new Yallist(); + if (to < from || to < 0) return ret; + if (from < 0) from = 0; + if (to > this.length) to = this.length; + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) walker = walker.prev; + for (; walker !== null && i > from; i--, walker = walker.prev) ret.push(walker.value); + return ret; + }; + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + }; + function push2(self, item) { + self.tail = new Node(item, self.tail, null, self); + if (!self.head) self.head = self.tail; + self.length++; + } + function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + if (!self.tail) self.tail = self.head; + self.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) return new Node(value, prev, next, list); + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else this.prev = null; + if (next) { + next.prev = this; + this.next = next; + } else this.next = null; + } + } }); + require_lru_cache = __commonJS({ "node_modules/editorconfig/node_modules/lru-cache/index.js"(exports, module) { + "use strict"; + module.exports = LRUCache; + var Map2 = require_map(); + var util2 = __require("util"); + var Yallist = require_yallist(); + var hasSymbol = typeof Symbol === "function" && process.env._nodeLRUCacheForceNoSymbol !== "1"; + var makeSymbol; + if (hasSymbol) makeSymbol = function(key2) { + return Symbol(key2); + }; + else makeSymbol = function(key2) { + return "_" + key2; + }; + var MAX = makeSymbol("max"); + var LENGTH = makeSymbol("length"); + var LENGTH_CALCULATOR = makeSymbol("lengthCalculator"); + var ALLOW_STALE = makeSymbol("allowStale"); + var MAX_AGE = makeSymbol("maxAge"); + var DISPOSE = makeSymbol("dispose"); + var NO_DISPOSE_ON_SET = makeSymbol("noDisposeOnSet"); + var LRU_LIST = makeSymbol("lruList"); + var CACHE = makeSymbol("cache"); + function naiveLength() { + return 1; + } + function LRUCache(options8) { + if (!(this instanceof LRUCache)) return new LRUCache(options8); + if (typeof options8 === "number") options8 = { max: options8 }; + if (!options8) options8 = {}; + var max = this[MAX] = options8.max; + if (!max || !(typeof max === "number") || max <= 0) this[MAX] = Infinity; + var lc = options8.length || naiveLength; + if (typeof lc !== "function") lc = naiveLength; + this[LENGTH_CALCULATOR] = lc; + this[ALLOW_STALE] = options8.stale || false; + this[MAX_AGE] = options8.maxAge || 0; + this[DISPOSE] = options8.dispose; + this[NO_DISPOSE_ON_SET] = options8.noDisposeOnSet || false; + this.reset(); + } + Object.defineProperty(LRUCache.prototype, "max", { + set: function(mL) { + if (!mL || !(typeof mL === "number") || mL <= 0) mL = Infinity; + this[MAX] = mL; + trim(this); + }, + get: function() { + return this[MAX]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "allowStale", { + set: function(allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function() { + return this[ALLOW_STALE]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "maxAge", { + set: function(mA) { + if (!mA || !(typeof mA === "number") || mA < 0) mA = 0; + this[MAX_AGE] = mA; + trim(this); + }, + get: function() { + return this[MAX_AGE]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "lengthCalculator", { + set: function(lC) { + if (typeof lC !== "function") lC = naiveLength; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach(function(hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }, this); + } + trim(this); + }, + get: function() { + return this[LENGTH_CALCULATOR]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "length", { + get: function() { + return this[LENGTH]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "itemCount", { + get: function() { + return this[LRU_LIST].length; + }, + enumerable: true + }); + LRUCache.prototype.rforEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; + } + }; + function forEachStep(self, fn, node, thisp) { + var hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) hit = void 0; + } + if (hit) fn.call(thisp, hit.value, hit.key, self); + } + LRUCache.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; + } + }; + LRUCache.prototype.keys = function() { + return this[LRU_LIST].toArray().map(function(k) { + return k.key; + }, this); + }; + LRUCache.prototype.values = function() { + return this[LRU_LIST].toArray().map(function(k) { + return k.value; + }, this); + }; + LRUCache.prototype.reset = function() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) this[LRU_LIST].forEach(function(hit) { + this[DISPOSE](hit.key, hit.value); + }, this); + this[CACHE] = new Map2(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; + }; + LRUCache.prototype.dump = function() { + return this[LRU_LIST].map(function(hit) { + if (!isStale(this, hit)) return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + }; + }, this).toArray().filter(function(h) { + return h; + }); + }; + LRUCache.prototype.dumpLru = function() { + return this[LRU_LIST]; + }; + LRUCache.prototype.inspect = function(n, opts) { + var str = "LRUCache {"; + var extras = false; + if (this[ALLOW_STALE]) { + str += "\n allowStale: true"; + extras = true; + } + var max = this[MAX]; + if (max && max !== Infinity) { + if (extras) str += ","; + str += "\n max: " + util2.inspect(max, opts); + extras = true; + } + var maxAge = this[MAX_AGE]; + if (maxAge) { + if (extras) str += ","; + str += "\n maxAge: " + util2.inspect(maxAge, opts); + extras = true; + } + var lc = this[LENGTH_CALCULATOR]; + if (lc && lc !== naiveLength) { + if (extras) str += ","; + str += "\n length: " + util2.inspect(this[LENGTH], opts); + extras = true; + } + var didFirst = false; + this[LRU_LIST].forEach(function(item) { + if (didFirst) str += ",\n "; + else { + if (extras) str += ",\n"; + didFirst = true; + str += "\n "; + } + var key2 = util2.inspect(item.key).split("\n").join("\n "); + var val = { value: item.value }; + if (item.maxAge !== maxAge) val.maxAge = item.maxAge; + if (lc !== naiveLength) val.length = item.length; + if (isStale(this, item)) val.stale = true; + val = util2.inspect(val, opts).split("\n").join("\n "); + str += key2 + " => " + val; + }); + if (didFirst || extras) str += "\n"; + str += "}"; + return str; + }; + LRUCache.prototype.set = function(key2, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + var now = maxAge ? Date.now() : 0; + var len = this[LENGTH_CALCULATOR](value, key2); + if (this[CACHE].has(key2)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key2)); + return false; + } + var item = this[CACHE].get(key2).value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key2, item.value); + } + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key2); + trim(this); + return true; + } + var hit = new Entry(key2, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) this[DISPOSE](key2, value); + return false; + } + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key2, this[LRU_LIST].head); + trim(this); + return true; + }; + LRUCache.prototype.has = function(key2) { + if (!this[CACHE].has(key2)) return false; + var hit = this[CACHE].get(key2).value; + if (isStale(this, hit)) return false; + return true; + }; + LRUCache.prototype.get = function(key2) { + return get(this, key2, true); + }; + LRUCache.prototype.peek = function(key2) { + return get(this, key2, false); + }; + LRUCache.prototype.pop = function() { + var node = this[LRU_LIST].tail; + if (!node) return null; + del(this, node); + return node.value; + }; + LRUCache.prototype.del = function(key2) { + del(this, this[CACHE].get(key2)); + }; + LRUCache.prototype.load = function(arr) { + this.reset(); + var now = Date.now(); + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l]; + var expiresAt = hit.e || 0; + if (expiresAt === 0) this.set(hit.k, hit.v); + else { + var maxAge = expiresAt - now; + if (maxAge > 0) this.set(hit.k, hit.v, maxAge); + } + } + }; + LRUCache.prototype.prune = function() { + var self = this; + this[CACHE].forEach(function(value, key2) { + get(self, key2, false); + }); + }; + function get(self, key2, doUse) { + var node = self[CACHE].get(key2); + if (node) { + var hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) hit = void 0; + } else if (doUse) self[LRU_LIST].unshiftNode(node); + if (hit) hit = hit.value; + } + return hit; + } + function isStale(self, hit) { + if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; + var stale = false; + var diff = Date.now() - hit.now; + if (hit.maxAge) stale = diff > hit.maxAge; + else stale = self[MAX_AGE] && diff > self[MAX_AGE]; + return stale; + } + function trim(self) { + if (self[LENGTH] > self[MAX]) for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { + var prev = walker.prev; + del(self, walker); + walker = prev; + } + } + function del(self, node) { + if (node) { + var hit = node.value; + if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); + } + } + function Entry(key2, value, length, now, maxAge) { + this.key = key2; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; + } + } }); + require_sigmund = __commonJS({ "node_modules/sigmund/sigmund.js"(exports, module) { + module.exports = sigmund; + function sigmund(subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ""; + var RE = RegExp; + function psychoAnalyze(subject2, session) { + if (session > maxSessions) return; + if (typeof subject2 === "function" || typeof subject2 === "undefined") return; + if (typeof subject2 !== "object" || !subject2 || subject2 instanceof RE) { + analysis += subject2; + return; + } + if (notes.indexOf(subject2) !== -1 || session === maxSessions) return; + notes.push(subject2); + analysis += "{"; + Object.keys(subject2).forEach(function(issue, _, __) { + if (issue.charAt(0) === "_") return; + var to = typeof subject2[issue]; + if (to === "function" || to === "undefined") return; + analysis += issue; + psychoAnalyze(subject2[issue], session + 1); + }); + } + psychoAnalyze(subject, 0); + return analysis; + } + } }); + require_fnmatch = __commonJS({ "node_modules/editorconfig/src/lib/fnmatch.js"(exports, module) { + var platform = typeof process === "object" ? process.platform : "win32"; + if (module) module.exports = minimatch; + else exports.minimatch = minimatch; + minimatch.Minimatch = Minimatch; + var cache3 = minimatch.cache = new (require_lru_cache())({ max: 100 }); + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var sigmund = require_sigmund(); + var path15 = __require("path"); + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c2) { + set[c2] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.monkeyPatch = monkeyPatch; + function monkeyPatch() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + var orig = desc.value; + desc.value = function(p) { + if (p instanceof Minimatch) return p.match(this); + return orig.call(this, p); + }; + Object.defineProperty(String.prototype, desc); + } + minimatch.filter = filter2; + function filter2(pattern, options8) { + options8 = options8 || {}; + return function(p, i, list) { + return minimatch(p, pattern, options8); + }; + } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options8) { + return orig.minimatch(p, pattern, ext(def, options8)); + }; + m.Minimatch = function Minimatch2(pattern, options8) { + return new orig.Minimatch(pattern, ext(def, options8)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options8) { + if (typeof pattern !== "string") throw new TypeError("glob pattern string required"); + if (!options8) options8 = {}; + if (!options8.nocomment && pattern.charAt(0) === "#") return false; + if (pattern.trim() === "") return p === ""; + return new Minimatch(pattern, options8).match(p); + } + function Minimatch(pattern, options8) { + if (!(this instanceof Minimatch)) return new Minimatch(pattern, options8, cache3); + if (typeof pattern !== "string") throw new TypeError("glob pattern string required"); + if (!options8) options8 = {}; + if (platform === "win32") pattern = pattern.split("\\").join("/"); + var cacheKey = pattern + "\n" + sigmund(options8); + var cached = minimatch.cache.get(cacheKey); + if (cached) return cached; + minimatch.cache.set(cacheKey, this); + this.options = options8; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); + } + Minimatch.prototype.make = make; + function make() { + if (this._made) return; + var pattern = this.pattern; + var options8 = this.options; + if (!options8.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options8.debug) console.error(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + if (options8.debug) console.error(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + if (options8.debug) console.error(this.pattern, set); + set = set.filter(function(s) { + return -1 === s.indexOf(false); + }); + if (options8.debug) console.error(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern, negate = false, options8 = this.options, negateOffset = 0; + if (options8.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options8) { + return new Minimatch(pattern, options8).braceExpand(); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options8) { + options8 = options8 || this.options; + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + if (typeof pattern === "undefined") throw new Error("undefined pattern"); + if (options8.nobrace || !pattern.match(/\{.*\}/)) return [pattern]; + var escaping = false; + if (pattern.charAt(0) !== "{") { + var prefix = null; + for (var i = 0, l = pattern.length; i < l; i++) { + var c2 = pattern.charAt(i); + if (c2 === "\\") escaping = !escaping; + else if (c2 === "{" && !escaping) { + prefix = pattern.substr(0, i); + break; + } + } + if (prefix === null) return [pattern]; + return braceExpand(pattern.substr(i), options8).map(function(t) { + return prefix + t; + }); + } + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/); + if (numset) { + var suf = braceExpand(pattern.substr(numset[0].length), options8), start = +numset[1], end = +numset[2], inc = start > end ? -1 : 1, set = []; + for (var i = start; i != end + inc; i += inc) for (var ii = 0, ll = suf.length; ii < ll; ii++) set.push(i + suf[ii]); + return set; + } + var i = 1, depth = 1, set = [], member = "", escaping = false; + function addMember() { + set.push(member); + member = ""; + } + FOR: for (i = 1, l = pattern.length; i < l; i++) { + var c2 = pattern.charAt(i); + if (escaping) { + escaping = false; + member += "\\" + c2; + } else switch (c2) { + case "\\": + escaping = true; + continue; + case "{": + depth++; + member += "{"; + continue; + case "}": + depth--; + if (depth === 0) { + addMember(); + i++; + break FOR; + } else { + member += c2; + continue; + } + case ",": + if (depth === 1) addMember(); + else member += c2; + continue; + default: + member += c2; + continue; + } + } + if (depth !== 0) return braceExpand("\\" + pattern, options8); + var suf = braceExpand(pattern.substr(i), options8); + var addBraces = set.length === 1; + set = set.map(function(p) { + return braceExpand(p, options8); + }); + set = set.reduce(function(l2, r) { + return l2.concat(r); + }); + if (addBraces) set = set.map(function(s) { + return "{" + s + "}"; + }); + var ret = []; + for (var i = 0, l = set.length; i < l; i++) for (var ii = 0, ll = suf.length; ii < ll; ii++) ret.push(set[i] + suf[ii]); + return ret; + } + Minimatch.prototype.parse = parse7; + var SUBPARSE = {}; + function parse7(pattern, isSub) { + var options8 = this.options; + if (!options8.noglobstar && pattern === "**") return GLOBSTAR; + if (pattern === "") return ""; + var re = "", hasMagic = !!options8.nocase, escaping = false, patternListStack = [], plType, stateChar, inClass = false, reClassStart = -1, classStart = -1, patternStart = pattern.charAt(0) === "." ? "" : options8.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c2; i < len && (c2 = pattern.charAt(i)); i++) { + if (options8.debug) console.error("%s %s %s %j", pattern, i, re, c2); + if (escaping && reSpecials[c2]) { + re += "\\" + c2; + escaping = false; + continue; + } + SWITCH: switch (c2) { + case "/": return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + if (options8.debug) console.error("%s %s %s %j <-- stateChar", pattern, i, re, c2); + if (inClass) { + if (c2 === "!" && i === classStart + 1) c2 = "^"; + re += c2; + continue; + } + clearStateChar(); + stateChar = c2; + if (options8.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + plType = stateChar; + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }); + re += stateChar === "!" ? "(?:(?!" : "(?:"; + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + hasMagic = true; + re += ")"; + plType = patternListStack.pop().type; + switch (plType) { + case "!": + re += "[^/]*?)"; + break; + case "?": + case "+": + case "*": re += plType; + case "@": break; + } + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c2; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c2; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c2; + escaping = false; + continue; + } + hasMagic = true; + inClass = false; + re += c2; + continue; + default: + clearStateChar(); + if (escaping) escaping = false; + else if (reSpecials[c2] && !(c2 === "^" && inClass)) re += "\\"; + re += c2; + } + } + if (inClass) { + var cs = pattern.substr(classStart + 1), sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + var pl; + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3); + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function(_, $1, $2) { + if (!$2) $2 = "\\"; + return $1 + $1 + $2 + "|"; + }); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) re += "\\\\"; + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": addPatternStart = true; + } + if (re !== "" && hasMagic) re = "(?=.)" + re; + if (addPatternStart) re = patternStart + re; + if (isSub === SUBPARSE) return [re, hasMagic]; + if (!hasMagic) return globUnescape(pattern); + var flags = options8.nocase ? "i" : "", regExp = new RegExp("^" + re + "$", flags); + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options8) { + return new Minimatch(pattern, options8 || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set = this.set; + if (!set.length) return this.regexp = false; + var options8 = this.options; + var twoStar = options8.noglobstar ? star : options8.dot ? twoStarDot : twoStarNoDot, flags = options8.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + return this.regexp = new RegExp(re, flags); + } catch (ex) { + return this.regexp = false; + } + } + minimatch.match = function(list, pattern, options8) { + var mm = new Minimatch(pattern, options8); + list = list.filter(function(f) { + return mm.match(f); + }); + if (options8.nonull && !list.length) list.push(pattern); + return list; + }; + Minimatch.prototype.match = match; + function match(f, partial) { + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options8 = this.options; + if (platform === "win32") f = f.split("\\").join("/"); + f = f.split(slashSplit); + if (options8.debug) console.error(this.pattern, "split", f); + var set = this.set; + for (var i = 0, l = set.length; i < l; i++) { + var pattern = set[i]; + if (this.matchOne(f, pattern, partial)) { + if (options8.flipNegate) return true; + return !this.negate; + } + } + if (options8.flipNegate) return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options8 = this.options; + if (options8.debug) console.error("matchOne", { + "this": this, + file, + pattern + }); + if (options8.matchBase && pattern.length === 1) file = path15.basename(file.join("/")).split("/"); + if (options8.debug) console.error("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + if (options8.debug) console.error("matchOne loop"); + var p = pattern[pi], f = file[fi]; + if (options8.debug) console.error(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + if (options8.debug) console.error("GLOBSTAR", [ + pattern, + p, + f + ]); + var fr = fi, pr = pi + 1; + if (pr === pl) { + if (options8.debug) console.error("** at the end"); + for (; fi < fl; fi++) if (file[fi] === "." || file[fi] === ".." || !options8.dot && file[fi].charAt(0) === ".") return false; + return true; + } + WHILE: while (fr < fl) { + var swallowee = file[fr]; + if (options8.debug) console.error("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + if (options8.debug) console.error("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options8.dot && swallowee.charAt(0) === ".") { + if (options8.debug) console.error("dot detected!", file, fr, pattern, pr); + break WHILE; + } + if (options8.debug) console.error("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + if (options8.nocase) hit = f.toLowerCase() === p.toLowerCase(); + else hit = f === p; + if (options8.debug) console.error("string match", p, f, hit); + } else { + hit = f.match(p); + if (options8.debug) console.error("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) return true; + else if (fi === fl) return partial; + else if (pi === pl) return fi === fl - 1 && file[fi] === ""; + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } }); + require_ini = __commonJS({ "node_modules/editorconfig/src/lib/ini.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve3, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve3(result.value) : new P(function(resolve4) { + resolve4(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = exports && exports.__generator || function(thisArg, body) { + var _ = { + label: 0, + sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, f, y, t, g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { + value: op[1], + done: false + }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + var fs4 = __importStar(__require("fs")); + var regex = { + section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, + param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, + comment: /^\s*[#;].*$/ + }; + function parse7(file) { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a) { + return [2, new Promise(function(resolve3, reject) { + fs4.readFile(file, "utf8", function(err, data) { + if (err) { + reject(err); + return; + } + resolve3(parseString2(data)); + }); + })]; + }); + }); + } + exports.parse = parse7; + function parseSync(file) { + return parseString2(fs4.readFileSync(file, "utf8")); + } + exports.parseSync = parseSync; + function parseString2(data) { + var sectionBody = {}; + var sectionName = null; + var value = [[sectionName, sectionBody]]; + data.split(/\r\n|\r|\n/).forEach(function(line3) { + var match; + if (regex.comment.test(line3)) return; + if (regex.param.test(line3)) { + match = line3.match(regex.param); + sectionBody[match[1]] = match[2]; + } else if (regex.section.test(line3)) { + match = line3.match(regex.section); + sectionName = match[1]; + sectionBody = {}; + value.push([sectionName, sectionBody]); + } + }); + return value; + } + exports.parseString = parseString2; + } }); + require_package = __commonJS({ "node_modules/editorconfig/package.json"(exports, module) { + module.exports = { + name: "editorconfig", + version: "0.15.3", + description: "EditorConfig File Locator and Interpreter for Node.js", + keywords: ["editorconfig", "core"], + main: "src/index.js", + contributors: [ + "Hong Xu (topbug.net)", + "Jed Mao (https://github.com/jedmao/)", + "Trey Hunner (http://treyhunner.com)" + ], + directories: { + bin: "./bin", + lib: "./lib" + }, + scripts: { + clean: "rimraf dist", + prebuild: "npm run clean", + build: "tsc", + pretest: "npm run lint && npm run build && npm run copy && cmake .", + test: "ctest .", + "pretest:ci": "npm run pretest", + "test:ci": "ctest -VV --output-on-failure .", + lint: "npm run eclint && npm run tslint", + eclint: "eclint check --indent_size ignore \"src/**\"", + tslint: "tslint --project tsconfig.json --exclude package.json", + copy: "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", + prepub: "npm run lint && npm run build && npm run copy", + pub: "npm publish ./dist" + }, + repository: { + type: "git", + url: "git://github.com/editorconfig/editorconfig-core-js.git" + }, + bugs: "https://github.com/editorconfig/editorconfig-core-js/issues", + author: "EditorConfig Team", + license: "MIT", + dependencies: { + commander: "^2.19.0", + "lru-cache": "^4.1.5", + semver: "^5.6.0", + sigmund: "^1.0.1" + }, + devDependencies: { + "@types/mocha": "^5.2.6", + "@types/node": "^10.12.29", + "@types/semver": "^5.5.0", + "cpy-cli": "^2.0.0", + eclint: "^2.8.1", + mocha: "^5.2.0", + rimraf: "^2.6.3", + should: "^13.2.3", + tslint: "^5.13.1", + typescript: "^3.3.3333" + } + }; + } }); + require_src = __commonJS({ "node_modules/editorconfig/src/index.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve3, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve3(result.value) : new P(function(resolve4) { + resolve4(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = exports && exports.__generator || function(thisArg, body) { + var _ = { + label: 0, + sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, f, y, t, g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { + value: op[1], + done: false + }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } + }; + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + var fs4 = __importStar(__require("fs")); + var path15 = __importStar(__require("path")); + var semver = { gte: require_gte() }; + var fnmatch_1 = __importDefault(require_fnmatch()); + var ini_1 = require_ini(); + exports.parseString = ini_1.parseString; + var package_json_1 = __importDefault(require_package()); + var knownProps = { + end_of_line: true, + indent_style: true, + indent_size: true, + insert_final_newline: true, + trim_trailing_whitespace: true, + charset: true + }; + function fnmatch(filepath, glob) { + var matchOptions = { + matchBase: true, + dot: true, + noext: true + }; + glob = glob.replace(/\*\*/g, "{*,**/**/**}"); + return fnmatch_1.default(filepath, glob, matchOptions); + } + function getConfigFileNames(filepath, options8) { + var paths = []; + do { + filepath = path15.dirname(filepath); + paths.push(path15.join(filepath, options8.config)); + } while (filepath !== options8.root); + return paths; + } + function processMatches(matches, version) { + if ("indent_style" in matches && matches.indent_style === "tab" && !("indent_size" in matches) && semver.gte(version, "0.10.0")) matches.indent_size = "tab"; + if ("indent_size" in matches && !("tab_width" in matches) && matches.indent_size !== "tab") matches.tab_width = matches.indent_size; + if ("indent_size" in matches && "tab_width" in matches && matches.indent_size === "tab") matches.indent_size = matches.tab_width; + return matches; + } + function processOptions(options8, filepath) { + if (options8 === void 0) options8 = {}; + return { + config: options8.config || ".editorconfig", + version: options8.version || package_json_1.default.version, + root: path15.resolve(options8.root || path15.parse(filepath).root) + }; + } + function buildFullGlob(pathPrefix, glob) { + switch (glob.indexOf("/")) { + case -1: + glob = "**/" + glob; + break; + case 0: + glob = glob.substring(1); + break; + default: break; + } + return path15.join(pathPrefix, glob); + } + function extendProps(props, options8) { + if (props === void 0) props = {}; + if (options8 === void 0) options8 = {}; + for (var key2 in options8) if (options8.hasOwnProperty(key2)) { + var value = options8[key2]; + var key22 = key2.toLowerCase(); + var value2 = value; + if (knownProps[key22]) value2 = value.toLowerCase(); + try { + value2 = JSON.parse(value); + } catch (e) {} + if (typeof value === "undefined" || value === null) value2 = String(value); + props[key22] = value2; + } + return props; + } + function parseFromConfigs(configs, filepath, options8) { + return processMatches(configs.reverse().reduce(function(matches, file) { + var pathPrefix = path15.dirname(file.name); + file.contents.forEach(function(section) { + var glob = section[0]; + var options22 = section[1]; + if (!glob) return; + if (!fnmatch(filepath, buildFullGlob(pathPrefix, glob))) return; + matches = extendProps(matches, options22); + }); + return matches; + }, {}), options8.version); + } + function getConfigsForFiles(files) { + var configs = []; + for (var i in files) if (files.hasOwnProperty(i)) { + var file = files[i]; + var contents = ini_1.parseString(file.contents); + configs.push({ + name: file.name, + contents + }); + if ((contents[0][1].root || "").toLowerCase() === "true") break; + } + return configs; + } + function readConfigFiles(filepaths) { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a) { + return [2, Promise.all(filepaths.map(function(name) { + return new Promise(function(resolve3) { + fs4.readFile(name, "utf8", function(err, data) { + resolve3({ + name, + contents: err ? "" : data + }); + }); + }); + }))]; + }); + }); + } + function readConfigFilesSync(filepaths) { + var files = []; + var file; + filepaths.forEach(function(filepath) { + try { + file = fs4.readFileSync(filepath, "utf8"); + } catch (e) { + file = ""; + } + files.push({ + name: filepath, + contents: file + }); + }); + return files; + } + function opts(filepath, options8) { + if (options8 === void 0) options8 = {}; + var resolvedFilePath = path15.resolve(filepath); + return [resolvedFilePath, processOptions(options8, resolvedFilePath)]; + } + function parseFromFiles(filepath, files, options8) { + if (options8 === void 0) options8 = {}; + return __awaiter(this, void 0, void 0, function() { + var _a, resolvedFilePath, processedOptions; + return __generator(this, function(_b) { + _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; + return [2, files.then(getConfigsForFiles).then(function(configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + exports.parseFromFiles = parseFromFiles; + function parseFromFilesSync(filepath, files, options8) { + if (options8 === void 0) options8 = {}; + var _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + exports.parseFromFilesSync = parseFromFilesSync; + function parse7(_filepath, _options) { + if (_options === void 0) _options = {}; + return __awaiter(this, void 0, void 0, function() { + var _a, resolvedFilePath, processedOptions, filepaths; + return __generator(this, function(_b) { + _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + return [2, readConfigFiles(filepaths).then(getConfigsForFiles).then(function(configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); + } + exports.parse = parse7; + function parseSync(_filepath, _options) { + if (_options === void 0) _options = {}; + var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + return parseFromConfigs(getConfigsForFiles(readConfigFilesSync(getConfigFileNames(resolvedFilePath, processedOptions))), resolvedFilePath, processedOptions); + } + exports.parseSync = parseSync; + } }); + require_js_tokens = __commonJS({ "node_modules/@babel/code-frame/node_modules/js-tokens/index.js"(exports, module) { + var Identifier; + var JSXIdentifier; + var JSXPunctuator; + var JSXString; + var JSXText; + var KeywordsWithExpressionAfter; + var KeywordsWithNoLineTerminatorAfter; + var LineTerminatorSequence; + var MultiLineComment; + var Newline; + var NumericLiteral; + var Punctuator; + var RegularExpressionLiteral; + var SingleLineComment; + var StringLiteral; + var Template; + var TokensNotPrecedingObjectLiteral; + var TokensPrecedingExpression; + var WhiteSpace; + RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy; + Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y; + Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy; + StringLiteral = /(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y; + NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y; + Template = /[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y; + WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/uy; + LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y; + MultiLineComment = /\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y; + SingleLineComment = /\/\/.*/y; + JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y; + JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy; + JSXString = /(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y; + JSXText = /[^<>{}]+/y; + TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/; + TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/; + KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/; + KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/; + Newline = RegExp(LineTerminatorSequence.source); + module.exports = function* (input, { jsx = false } = {}) { + var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack2; + ({length} = input); + lastIndex = 0; + lastSignificantToken = ""; + stack2 = [{ tag: "JS" }]; + braces = []; + parenNesting = 0; + postfixIncDec = false; + while (lastIndex < length) { + mode = stack2[stack2.length - 1]; + switch (mode.tag) { + case "JS": + case "JSNonExpressionParen": + case "InterpolationInTemplate": + case "InterpolationInJSX": + if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + RegularExpressionLiteral.lastIndex = lastIndex; + if (match = RegularExpressionLiteral.exec(input)) { + lastIndex = RegularExpressionLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield { + type: "RegularExpressionLiteral", + value: match[0], + closed: match[1] !== void 0 && match[1] !== "\\" + }; + continue; + } + } + Punctuator.lastIndex = lastIndex; + if (match = Punctuator.exec(input)) { + punctuator = match[0]; + nextLastIndex = Punctuator.lastIndex; + nextLastSignificantToken = punctuator; + switch (punctuator) { + case "(": + if (lastSignificantToken === "?NonExpressionParenKeyword") stack2.push({ + tag: "JSNonExpressionParen", + nesting: parenNesting + }); + parenNesting++; + postfixIncDec = false; + break; + case ")": + parenNesting--; + postfixIncDec = true; + if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) { + stack2.pop(); + nextLastSignificantToken = "?NonExpressionParenEnd"; + postfixIncDec = false; + } + break; + case "{": + Punctuator.lastIndex = 0; + isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)); + braces.push(isExpression); + postfixIncDec = false; + break; + case "}": + switch (mode.tag) { + case "InterpolationInTemplate": + if (braces.length === mode.nesting) { + Template.lastIndex = lastIndex; + match = Template.exec(input); + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + postfixIncDec = false; + yield { + type: "TemplateMiddle", + value: match[0] + }; + } else { + stack2.pop(); + postfixIncDec = true; + yield { + type: "TemplateTail", + value: match[0], + closed: match[1] === "`" + }; + } + continue; + } + break; + case "InterpolationInJSX": if (braces.length === mode.nesting) { + stack2.pop(); + lastIndex += 1; + lastSignificantToken = "}"; + yield { + type: "JSXPunctuator", + value: "}" + }; + continue; + } + } + postfixIncDec = braces.pop(); + nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}"; + break; + case "]": + postfixIncDec = true; + break; + case "++": + case "--": + nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec"; + break; + case "<": + if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + stack2.push({ tag: "JSXTag" }); + lastIndex += 1; + lastSignificantToken = "<"; + yield { + type: "JSXPunctuator", + value: punctuator + }; + continue; + } + postfixIncDec = false; + break; + default: postfixIncDec = false; + } + lastIndex = nextLastIndex; + lastSignificantToken = nextLastSignificantToken; + yield { + type: "Punctuator", + value: punctuator + }; + continue; + } + Identifier.lastIndex = lastIndex; + if (match = Identifier.exec(input)) { + lastIndex = Identifier.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "for": + case "if": + case "while": + case "with": if (lastSignificantToken !== "." && lastSignificantToken !== "?.") nextLastSignificantToken = "?NonExpressionParenKeyword"; + } + lastSignificantToken = nextLastSignificantToken; + postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]); + yield { + type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName", + value: match[0] + }; + continue; + } + StringLiteral.lastIndex = lastIndex; + if (match = StringLiteral.exec(input)) { + lastIndex = StringLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield { + type: "StringLiteral", + value: match[0], + closed: match[2] !== void 0 + }; + continue; + } + NumericLiteral.lastIndex = lastIndex; + if (match = NumericLiteral.exec(input)) { + lastIndex = NumericLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield { + type: "NumericLiteral", + value: match[0] + }; + continue; + } + Template.lastIndex = lastIndex; + if (match = Template.exec(input)) { + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + stack2.push({ + tag: "InterpolationInTemplate", + nesting: braces.length + }); + postfixIncDec = false; + yield { + type: "TemplateHead", + value: match[0] + }; + } else { + postfixIncDec = true; + yield { + type: "NoSubstitutionTemplate", + value: match[0], + closed: match[1] === "`" + }; + } + continue; + } + break; + case "JSXTag": + case "JSXTagEnd": + JSXPunctuator.lastIndex = lastIndex; + if (match = JSXPunctuator.exec(input)) { + lastIndex = JSXPunctuator.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "<": + stack2.push({ tag: "JSXTag" }); + break; + case ">": + stack2.pop(); + if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") { + nextLastSignificantToken = "?JSX"; + postfixIncDec = true; + } else stack2.push({ tag: "JSXChildren" }); + break; + case "{": + stack2.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + nextLastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + break; + case "/": if (lastSignificantToken === "<") { + stack2.pop(); + if (stack2[stack2.length - 1].tag === "JSXChildren") stack2.pop(); + stack2.push({ tag: "JSXTagEnd" }); + } + } + lastSignificantToken = nextLastSignificantToken; + yield { + type: "JSXPunctuator", + value: match[0] + }; + continue; + } + JSXIdentifier.lastIndex = lastIndex; + if (match = JSXIdentifier.exec(input)) { + lastIndex = JSXIdentifier.lastIndex; + lastSignificantToken = match[0]; + yield { + type: "JSXIdentifier", + value: match[0] + }; + continue; + } + JSXString.lastIndex = lastIndex; + if (match = JSXString.exec(input)) { + lastIndex = JSXString.lastIndex; + lastSignificantToken = match[0]; + yield { + type: "JSXString", + value: match[0], + closed: match[2] !== void 0 + }; + continue; + } + break; + case "JSXChildren": + JSXText.lastIndex = lastIndex; + if (match = JSXText.exec(input)) { + lastIndex = JSXText.lastIndex; + lastSignificantToken = match[0]; + yield { + type: "JSXText", + value: match[0] + }; + continue; + } + switch (input[lastIndex]) { + case "<": + stack2.push({ tag: "JSXTag" }); + lastIndex++; + lastSignificantToken = "<"; + yield { + type: "JSXPunctuator", + value: "<" + }; + continue; + case "{": + stack2.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + lastIndex++; + lastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + yield { + type: "JSXPunctuator", + value: "{" + }; + continue; + } + } + WhiteSpace.lastIndex = lastIndex; + if (match = WhiteSpace.exec(input)) { + lastIndex = WhiteSpace.lastIndex; + yield { + type: "WhiteSpace", + value: match[0] + }; + continue; + } + LineTerminatorSequence.lastIndex = lastIndex; + if (match = LineTerminatorSequence.exec(input)) { + lastIndex = LineTerminatorSequence.lastIndex; + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) lastSignificantToken = "?NoLineTerminatorHere"; + yield { + type: "LineTerminatorSequence", + value: match[0] + }; + continue; + } + MultiLineComment.lastIndex = lastIndex; + if (match = MultiLineComment.exec(input)) { + lastIndex = MultiLineComment.lastIndex; + if (Newline.test(match[0])) { + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) lastSignificantToken = "?NoLineTerminatorHere"; + } + yield { + type: "MultiLineComment", + value: match[0], + closed: match[1] !== void 0 + }; + continue; + } + SingleLineComment.lastIndex = lastIndex; + if (match = SingleLineComment.exec(input)) { + lastIndex = SingleLineComment.lastIndex; + postfixIncDec = false; + yield { + type: "SingleLineComment", + value: match[0] + }; + continue; + } + firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex)); + lastIndex += firstCodePoint.length; + lastSignificantToken = firstCodePoint; + postfixIncDec = false; + yield { + type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid", + value: firstCodePoint + }; + } + }; + } }); + require_readlines = __commonJS({ "node_modules/n-readlines/readlines.js"(exports, module) { + "use strict"; + var fs4 = __require("fs"); + var LineByLine = class { + constructor(file, options8) { + options8 = options8 || {}; + if (!options8.readChunk) options8.readChunk = 1024; + if (!options8.newLineCharacter) options8.newLineCharacter = 10; + else options8.newLineCharacter = options8.newLineCharacter.charCodeAt(0); + if (typeof file === "number") this.fd = file; + else this.fd = fs4.openSync(file, "r"); + this.options = options8; + this.newLineCharacter = options8.newLineCharacter; + this.reset(); + } + _searchInBuffer(buffer2, hexNeedle) { + let found = -1; + for (let i = 0; i <= buffer2.length; i++) if (buffer2[i] === hexNeedle) { + found = i; + break; + } + return found; + } + reset() { + this.eofReached = false; + this.linesCache = []; + this.fdPosition = 0; + } + close() { + fs4.closeSync(this.fd); + this.fd = null; + } + _extractLines(buffer2) { + let line3; + const lines = []; + let bufferPosition = 0; + let lastNewLineBufferPosition = 0; + while (true) { + let bufferPositionValue = buffer2[bufferPosition++]; + if (bufferPositionValue === this.newLineCharacter) { + line3 = buffer2.slice(lastNewLineBufferPosition, bufferPosition); + lines.push(line3); + lastNewLineBufferPosition = bufferPosition; + } else if (bufferPositionValue === void 0) break; + } + let leftovers = buffer2.slice(lastNewLineBufferPosition, bufferPosition); + if (leftovers.length) lines.push(leftovers); + return lines; + } + _readChunk(lineLeftovers) { + let totalBytesRead = 0; + let bytesRead; + const buffers = []; + do { + const readBuffer = Buffer.alloc(this.options.readChunk); + bytesRead = fs4.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); + totalBytesRead = totalBytesRead + bytesRead; + this.fdPosition = this.fdPosition + bytesRead; + buffers.push(readBuffer); + } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); + let bufferData = Buffer.concat(buffers); + if (bytesRead < this.options.readChunk) { + this.eofReached = true; + bufferData = bufferData.slice(0, totalBytesRead); + } + if (totalBytesRead) { + this.linesCache = this._extractLines(bufferData); + if (lineLeftovers) this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + } + return totalBytesRead; + } + next() { + if (!this.fd) return false; + let line3 = false; + if (this.eofReached && this.linesCache.length === 0) return line3; + let bytesRead; + if (!this.linesCache.length) bytesRead = this._readChunk(); + if (this.linesCache.length) { + line3 = this.linesCache.shift(); + if (line3[line3.length - 1] !== this.newLineCharacter) { + bytesRead = this._readChunk(line3); + if (bytesRead) line3 = this.linesCache.shift(); + } + } + if (this.eofReached && this.linesCache.length === 0) this.close(); + if (line3 && line3[line3.length - 1] === this.newLineCharacter) line3 = line3.slice(0, line3.length - 1); + return line3; + } + }; + module.exports = LineByLine; + } }); + require_ignore = __commonJS({ "node_modules/ignore/index.js"(exports, module) { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var UNDEFINED = void 0; + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") TMP_KEY_IGNORE = Symbol.for("node-ignore"); + var KEY_IGNORE = TMP_KEY_IGNORE; + var define = (object, key2, value) => { + Object.defineProperty(object, key2, { value }); + return value; + }; + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var RETURN_FALSE = () => false; + var sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [/^\uFEFF/, () => EMPTY], + [/((?:\\\\)*?)(\\?\s+)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)], + [/(\\+?)\s/g, (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + }], + [/[\\$.|*+(){^]/g, (match) => `\\${match}`], + [/(?!\\)\?/g, () => "[^/]"], + [/^\//, () => "^"], + [/\//g, () => "\\/"], + [/^\^*\\\*\\\*\\\//, () => "^(?:.*\\/)?"], + [/^(?=[^^])/, function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + }], + [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"], + [/(^|[^\\]+)(\\\*)+(?=.+)/g, (_, p1, p2) => { + return p1 + p2.replace(/\\\*/g, "[^\\/]*"); + }], + [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE], + [/\\\\/g, () => ESCAPE], + [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"], + [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`] + ]; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_, p1) { + return `${p1 ? `${p1}[^/]+` : "[^/]*"}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_, p1) { + return `${p1 ? `${p1}[^/]*` : "[^/]*"}(?=$|\\/$)`; + } + }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern); + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); + var IgnoreRule = class { + constructor(pattern, mark, body, ignoreCase, negative, prefix) { + this.pattern = pattern; + this.mark = mark; + this.negative = negative; + define(this, "body", body); + define(this, "ignoreCase", ignoreCase); + define(this, "regexPrefix", prefix); + } + get regex() { + const key2 = UNDERSCORE + MODE_IGNORE; + if (this[key2]) return this[key2]; + return this._make(MODE_IGNORE, key2); + } + get checkRegex() { + const key2 = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key2]) return this[key2]; + return this._make(MODE_CHECK_IGNORE, key2); + } + _make(mode, key2) { + const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]); + const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str); + return define(this, key2, regex); + } + }; + var createRule = ({ pattern, mark }, ignoreCase) => { + let negative = false; + let body = pattern; + if (body.indexOf("!") === 0) { + negative = true; + body = body.substr(1); + } + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); + return new IgnoreRule(pattern, mark, body, ignoreCase, negative, regexPrefix); + }; + var RuleManager = class { + constructor(ignoreCase) { + this._ignoreCase = ignoreCase; + this._rules = []; + } + _add(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules._rules); + this._added = true; + return; + } + if (isString(pattern)) pattern = { pattern }; + if (checkPattern(pattern.pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + add(pattern) { + this._added = false; + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this); + return this._added; + } + test(path15, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return; + if (!rule[mode].test(path15)) return; + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) ret.rule = matchedRule; + return ret; + } + }; + var throwError = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path15, originalPath, doThrow) => { + if (!isString(path15)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError); + if (!path15) return doThrow(`path must not be empty`, TypeError); + if (checkPath.isNotRelative(path15)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError); + return true; + }; + var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ ignorecase = true, ignoreCase = ignorecase, allowRelativePaths = false } = {}) { + define(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) this._initCache(); + return this; + } + addPattern(pattern) { + return this.add(pattern); + } + _test(originalPath, cache3, checkUnignored, slices) { + const path15 = originalPath && checkPath.convert(originalPath); + checkPath(path15, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE); + return this._t(path15, cache3, checkUnignored, slices); + } + checkIgnore(path15) { + if (!REGEX_TEST_TRAILING_SLASH.test(path15)) return this.test(path15); + const slices = path15.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices); + if (parent.ignored) return parent; + } + return this._rules.test(path15, false, MODE_CHECK_IGNORE); + } + _t(path15, cache3, checkUnignored, slices) { + if (path15 in cache3) return cache3[path15]; + if (!slices) slices = path15.split(SLASH).filter(Boolean); + slices.pop(); + if (!slices.length) return cache3[path15] = this._rules.test(path15, checkUnignored, MODE_IGNORE); + const parent = this._t(slices.join(SLASH) + SLASH, cache3, checkUnignored, slices); + return cache3[path15] = parent.ignored ? parent : this._rules.test(path15, checkUnignored, MODE_IGNORE); + } + ignores(path15) { + return this._test(path15, this._ignoreCache, false).ignored; + } + createFilter() { + return (path15) => !this.ignores(path15); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + test(path15) { + return this._test(path15, this._testCache, true); + } + }; + var factory = (options8) => new Ignore(options8); + var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE); + var setupWindows = () => { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path15) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15); + }; + if (typeof process !== "undefined" && process.platform === "win32") setupWindows(); + module.exports = factory; + factory.default = factory; + module.exports.isPathValid = isPathValid; + define(module.exports, Symbol.for("setupWindows"), setupWindows); + } }); + index_exports = {}; + __export(index_exports, { + __debug: () => debugApis, + __internal: () => sharedWithCli, + check: () => check, + clearConfigCache: () => clearCache3, + doc: () => doc_exports, + format: () => format2, + formatWithCursor: () => formatWithCursor2, + getFileInfo: () => get_file_info_default, + getSupportInfo: () => getSupportInfo2, + resolveConfig: () => resolveConfig, + resolveConfigFile: () => resolveConfigFile, + util: () => public_exports, + version: () => version_evaluate_default + }); + Diff = class { + diff(oldStr, newStr, options8 = {}) { + let callback; + if (typeof options8 === "function") { + callback = options8; + options8 = {}; + } else if ("callback" in options8) callback = options8.callback; + const oldString = this.castInput(oldStr, options8); + const newString = this.castInput(newStr, options8); + const oldTokens = this.removeEmpty(this.tokenize(oldString, options8)); + const newTokens = this.removeEmpty(this.tokenize(newString, options8)); + return this.diffWithOptionsObj(oldTokens, newTokens, options8, callback); + } + diffWithOptionsObj(oldTokens, newTokens, options8, callback) { + var _a; + const done = (value) => { + value = this.postProcess(value, options8); + if (callback) { + setTimeout(function() { + callback(value); + }, 0); + return; + } else return value; + }; + const newLen = newTokens.length, oldLen = oldTokens.length; + let editLength = 1; + let maxEditLength = newLen + oldLen; + if (options8.maxEditLength != null) maxEditLength = Math.min(maxEditLength, options8.maxEditLength); + const maxExecutionTime = (_a = options8.timeout) !== null && _a !== void 0 ? _a : Infinity; + const abortAfterTimestamp = Date.now() + maxExecutionTime; + const bestPath = [{ + oldPos: -1, + lastComponent: void 0 + }]; + let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options8); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens)); + let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + const execEditLength = () => { + for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + let basePath; + const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) bestPath[diagonalPath - 1] = void 0; + let canAdd = false; + if (addPath) { + const addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + const canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = void 0; + continue; + } + if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) basePath = this.addToPath(addPath, true, false, 0, options8); + else basePath = this.addToPath(removePath, false, true, 1, options8); + newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options8); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true; + else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + if (newPos + 1 >= newLen) minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + editLength++; + }; + if (callback) (function exec() { + setTimeout(function() { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) return callback(void 0); + if (!execEditLength()) exec(); + }, 0); + })(); + else while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + const ret = execEditLength(); + if (ret) return ret; + } + } + addToPath(path15, added, removed, oldPosInc, options8) { + const last = path15.lastComponent; + if (last && !options8.oneChangePerToken && last.added === added && last.removed === removed) return { + oldPos: path15.oldPos + oldPosInc, + lastComponent: { + count: last.count + 1, + added, + removed, + previousComponent: last.previousComponent + } + }; + else return { + oldPos: path15.oldPos + oldPosInc, + lastComponent: { + count: 1, + added, + removed, + previousComponent: last + } + }; + } + extractCommon(basePath, newTokens, oldTokens, diagonalPath, options8) { + const newLen = newTokens.length, oldLen = oldTokens.length; + let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options8)) { + newPos++; + oldPos++; + commonCount++; + if (options8.oneChangePerToken) basePath.lastComponent = { + count: 1, + previousComponent: basePath.lastComponent, + added: false, + removed: false + }; + } + if (commonCount && !options8.oneChangePerToken) basePath.lastComponent = { + count: commonCount, + previousComponent: basePath.lastComponent, + added: false, + removed: false + }; + basePath.oldPos = oldPos; + return newPos; + } + equals(left, right, options8) { + if (options8.comparator) return options8.comparator(left, right); + else return left === right || !!options8.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + removeEmpty(array2) { + const ret = []; + for (let i = 0; i < array2.length; i++) if (array2[i]) ret.push(array2[i]); + return ret; + } + castInput(value, options8) { + return value; + } + tokenize(value, options8) { + return Array.from(value); + } + join(chars) { + return chars.join(""); + } + postProcess(changeObjects, options8) { + return changeObjects; + } + get useLongestToken() { + return false; + } + buildValues(lastComponent, newTokens, oldTokens) { + const components = []; + let nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + const componentLen = components.length; + let componentPos = 0, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + const component = components[componentPos]; + if (!component.removed) { + if (!component.added && this.useLongestToken) { + let value = newTokens.slice(newPos, newPos + component.count); + value = value.map(function(value2, i) { + const oldValue = oldTokens[oldPos + i]; + return oldValue.length > value2.length ? oldValue : value2; + }); + component.value = this.join(value); + } else component.value = this.join(newTokens.slice(newPos, newPos + component.count)); + newPos += component.count; + if (!component.added) oldPos += component.count; + } else { + component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + } + } + return components; + } + }; + LineDiff = class extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + equals(left, right, options8) { + if (options8.ignoreWhitespace) { + if (!options8.newlineIsToken || !left.includes("\n")) left = left.trim(); + if (!options8.newlineIsToken || !right.includes("\n")) right = right.trim(); + } else if (options8.ignoreNewlineAtEof && !options8.newlineIsToken) { + if (left.endsWith("\n")) left = left.slice(0, -1); + if (right.endsWith("\n")) right = right.slice(0, -1); + } + return super.equals(left, right, options8); + } + }; + lineDiff = new LineDiff(); + ArrayDiff = class extends Diff { + tokenize(value) { + return value.slice(); + } + join(value) { + return value; + } + removeEmpty(value) { + return value; + } + }; + arrayDiff = new ArrayDiff(); + import_fast_glob = __toESM(require_out4(), 1); + array = []; + characterCodeCache = []; + import_picocolors5 = __toESM(require_picocolors(), 1); + apiDescriptor = { + key: (key2) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(key2) ? key2 : JSON.stringify(key2), + value(value) { + if (value === null || typeof value !== "object") return JSON.stringify(value); + if (Array.isArray(value)) return `[${value.map((subValue) => apiDescriptor.value(subValue)).join(", ")}]`; + const keys = Object.keys(value); + return keys.length === 0 ? "{}" : `{ ${keys.map((key2) => `${apiDescriptor.key(key2)}: ${apiDescriptor.value(value[key2])}`).join(", ")} }`; + }, + pair: ({ key: key2, value }) => apiDescriptor.value({ [key2]: value }) + }; + import_picocolors = __toESM(require_picocolors(), 1); + commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => { + const messages2 = [`${import_picocolors.default.yellow(typeof keyOrPair === "string" ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated`]; + if (redirectTo) messages2.push(`we now treat it as ${import_picocolors.default.blue(typeof redirectTo === "string" ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`); + return messages2.join("; ") + "."; + }; + import_picocolors2 = __toESM(require_picocolors(), 1); + VALUE_NOT_EXIST = Symbol.for("vnopts.VALUE_NOT_EXIST"); + VALUE_UNCHANGED = Symbol.for("vnopts.VALUE_UNCHANGED"); + INDENTATION = " ".repeat(2); + commonInvalidHandler = (key2, value, utils) => { + const { text, list } = utils.normalizeExpectedResult(utils.schemas[key2].expected(utils)); + const descriptions = []; + if (text) descriptions.push(getDescription(key2, value, text, utils.descriptor)); + if (list) descriptions.push([getDescription(key2, value, list.title, utils.descriptor)].concat(list.values.map((valueDescription) => getListDescription(valueDescription, utils.loggerPrintWidth))).join("\n")); + return chooseDescription(descriptions, utils.loggerPrintWidth); + }; + import_picocolors3 = __toESM(require_picocolors(), 1); + levenUnknownHandler = (key2, value, { descriptor, logger, schemas }) => { + const messages2 = [`Ignored unknown option ${import_picocolors3.default.yellow(descriptor.pair({ + key: key2, + value + }))}.`]; + const suggestion = closestMatch(key2, Object.keys(schemas), { maxDistance: 3 }); + if (suggestion) messages2.push(`Did you mean ${import_picocolors3.default.blue(descriptor.key(suggestion))}?`); + logger.warn(messages2.join(" ")); + }; + HANDLER_KEYS = [ + "default", + "expected", + "validate", + "deprecated", + "forward", + "redirect", + "overlap", + "preprocess", + "postprocess" + ]; + Schema = class { + static create(parameters) { + return createSchema(this, parameters); + } + constructor(parameters) { + this.name = parameters.name; + } + default(_utils) {} + /* c8 ignore start */ + expected(_utils) { + return "nothing"; + } + /* c8 ignore stop */ + /* c8 ignore start */ + validate(_value, _utils) { + return false; + } + /* c8 ignore stop */ + deprecated(_value, _utils) { + return false; + } + forward(_value, _utils) {} + redirect(_value, _utils) {} + overlap(currentValue, _newValue, _utils) { + return currentValue; + } + preprocess(value, _utils) { + return value; + } + postprocess(_value, _utils) { + return VALUE_UNCHANGED; + } + }; + AliasSchema = class extends Schema { + constructor(parameters) { + super(parameters); + this._sourceName = parameters.sourceName; + } + expected(utils) { + return utils.schemas[this._sourceName].expected(utils); + } + validate(value, utils) { + return utils.schemas[this._sourceName].validate(value, utils); + } + redirect(_value, _utils) { + return this._sourceName; + } + }; + AnySchema = class extends Schema { + expected() { + return "anything"; + } + validate() { + return true; + } + }; + ArraySchema = class extends Schema { + constructor({ valueSchema, name = valueSchema.name, ...handlers }) { + super({ + ...handlers, + name + }); + this._valueSchema = valueSchema; + } + expected(utils) { + const { text, list } = utils.normalizeExpectedResult(this._valueSchema.expected(utils)); + return { + text: text && `an array of ${text}`, + list: list && { + title: `an array of the following values`, + values: [{ list }] + } + }; + } + validate(value, utils) { + if (!Array.isArray(value)) return false; + const invalidValues = []; + for (const subValue of value) { + const subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); + if (subValidateResult !== true) invalidValues.push(subValidateResult.value); + } + return invalidValues.length === 0 ? true : { value: invalidValues }; + } + deprecated(value, utils) { + const deprecatedResult = []; + for (const subValue of value) { + const subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); + if (subDeprecatedResult !== false) deprecatedResult.push(...subDeprecatedResult.map(({ value: deprecatedValue }) => ({ value: [deprecatedValue] }))); + } + return deprecatedResult; + } + forward(value, utils) { + const forwardResult = []; + for (const subValue of value) { + const subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); + forwardResult.push(...subForwardResult.map(wrapTransferResult)); + } + return forwardResult; + } + redirect(value, utils) { + const remain = []; + const redirect = []; + for (const subValue of value) { + const subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); + if ("remain" in subRedirectResult) remain.push(subRedirectResult.remain); + redirect.push(...subRedirectResult.redirect.map(wrapTransferResult)); + } + return remain.length === 0 ? { redirect } : { + redirect, + remain + }; + } + overlap(currentValue, newValue) { + return currentValue.concat(newValue); + } + }; + BooleanSchema = class extends Schema { + expected() { + return "true or false"; + } + validate(value) { + return typeof value === "boolean"; + } + }; + ChoiceSchema = class extends Schema { + constructor(parameters) { + super(parameters); + this._choices = mapFromArray(parameters.choices.map((choice) => choice && typeof choice === "object" ? choice : { value: choice }), "value"); + } + expected({ descriptor }) { + const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor.value); + const head = choiceDescriptions.slice(0, -2); + const tail = choiceDescriptions.slice(-2); + return { + text: head.concat(tail.join(" or ")).join(", "), + list: { + title: "one of the following values", + values: choiceDescriptions + } + }; + } + validate(value) { + return this._choices.has(value); + } + deprecated(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo && choiceInfo.deprecated ? { value } : false; + } + forward(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo ? choiceInfo.forward : void 0; + } + redirect(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo ? choiceInfo.redirect : void 0; + } + }; + NumberSchema = class extends Schema { + expected() { + return "a number"; + } + validate(value, _utils) { + return typeof value === "number"; + } + }; + IntegerSchema = class extends NumberSchema { + expected() { + return "an integer"; + } + validate(value, utils) { + return utils.normalizeValidateResult(super.validate(value, utils), value) === true && isInt(value); + } + }; + StringSchema = class extends Schema { + expected() { + return "a string"; + } + validate(value) { + return typeof value === "string"; + } + }; + defaultDescriptor = apiDescriptor; + defaultUnknownHandler = levenUnknownHandler; + defaultInvalidHandler = commonInvalidHandler; + defaultDeprecatedHandler = commonDeprecatedHandler; + Normalizer = class { + constructor(schemas, opts) { + const { logger = console, loggerPrintWidth = 80, descriptor = defaultDescriptor, unknown = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required = () => false, preprocess = (x) => x, postprocess = () => VALUE_UNCHANGED } = opts || {}; + this._utils = { + descriptor, + logger: logger || { warn: () => {} }, + loggerPrintWidth, + schemas: recordFromArray(schemas, "name"), + normalizeDefaultResult, + normalizeExpectedResult, + normalizeDeprecatedResult, + normalizeForwardResult, + normalizeRedirectResult, + normalizeValidateResult + }; + this._unknownHandler = unknown; + this._invalidHandler = normalizeInvalidHandler(invalid); + this._deprecatedHandler = deprecated; + this._identifyMissing = (k, o) => !(k in o) || missing(k, o); + this._identifyRequired = required; + this._preprocess = preprocess; + this._postprocess = postprocess; + this.cleanHistory(); + } + cleanHistory() { + this._hasDeprecationWarned = createAutoChecklist(); + } + normalize(options8) { + const newOptions = {}; + const restOptionsArray = [this._preprocess(options8, this._utils)]; + const applyNormalization = () => { + while (restOptionsArray.length !== 0) { + const currentOptions = restOptionsArray.shift(); + const transferredOptionsArray = this._applyNormalization(currentOptions, newOptions); + restOptionsArray.push(...transferredOptionsArray); + } + }; + applyNormalization(); + for (const key2 of Object.keys(this._utils.schemas)) { + const schema = this._utils.schemas[key2]; + if (!(key2 in newOptions)) { + const defaultResult = normalizeDefaultResult(schema.default(this._utils)); + if ("value" in defaultResult) restOptionsArray.push({ [key2]: defaultResult.value }); + } + } + applyNormalization(); + for (const key2 of Object.keys(this._utils.schemas)) { + if (!(key2 in newOptions)) continue; + const schema = this._utils.schemas[key2]; + const value = newOptions[key2]; + const newValue = schema.postprocess(value, this._utils); + if (newValue === VALUE_UNCHANGED) continue; + this._applyValidation(newValue, key2, schema); + newOptions[key2] = newValue; + } + this._applyPostprocess(newOptions); + this._applyRequiredCheck(newOptions); + return newOptions; + } + _applyNormalization(options8, newOptions) { + const transferredOptionsArray = []; + const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8); + for (const key2 of knownKeys) { + const schema = this._utils.schemas[key2]; + const value = schema.preprocess(options8[key2], this._utils); + this._applyValidation(value, key2, schema); + const appendTransferredOptions = ({ from, to }) => { + transferredOptionsArray.push(typeof to === "string" ? { [to]: from } : { [to.key]: to.value }); + }; + const warnDeprecated = ({ value: currentValue, redirectTo }) => { + const deprecatedResult = normalizeDeprecatedResult(schema.deprecated(currentValue, this._utils), value, true); + if (deprecatedResult === false) return; + if (deprecatedResult === true) { + if (!this._hasDeprecationWarned(key2)) this._utils.logger.warn(this._deprecatedHandler(key2, redirectTo, this._utils)); + } else for (const { value: deprecatedValue } of deprecatedResult) { + const pair = { + key: key2, + value: deprecatedValue + }; + if (!this._hasDeprecationWarned(pair)) { + const redirectToPair = typeof redirectTo === "string" ? { + key: redirectTo, + value: deprecatedValue + } : redirectTo; + this._utils.logger.warn(this._deprecatedHandler(pair, redirectToPair, this._utils)); + } + } + }; + normalizeForwardResult(schema.forward(value, this._utils), value).forEach(appendTransferredOptions); + const redirectResult = normalizeRedirectResult(schema.redirect(value, this._utils), value); + redirectResult.redirect.forEach(appendTransferredOptions); + if ("remain" in redirectResult) { + const remainingValue = redirectResult.remain; + newOptions[key2] = key2 in newOptions ? schema.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue; + warnDeprecated({ value: remainingValue }); + } + for (const { from, to } of redirectResult.redirect) warnDeprecated({ + value: from, + redirectTo: to + }); + } + for (const key2 of unknownKeys) { + const value = options8[key2]; + this._applyUnknownHandler(key2, value, newOptions, (knownResultKey, knownResultValue) => { + transferredOptionsArray.push({ [knownResultKey]: knownResultValue }); + }); + } + return transferredOptionsArray; + } + _applyRequiredCheck(options8) { + for (const key2 of Object.keys(this._utils.schemas)) if (this._identifyMissing(key2, options8)) { + if (this._identifyRequired(key2)) throw this._invalidHandler(key2, VALUE_NOT_EXIST, this._utils); + } + } + _partitionOptionKeys(options8) { + const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key2) => !this._identifyMissing(key2, options8)), (key2) => key2 in this._utils.schemas); + return { + knownKeys, + unknownKeys + }; + } + _applyValidation(value, key2, schema) { + const validateResult = normalizeValidateResult(schema.validate(value, this._utils), value); + if (validateResult !== true) throw this._invalidHandler(key2, validateResult.value, this._utils); + } + _applyUnknownHandler(key2, value, newOptions, knownResultHandler) { + const unknownResult = this._unknownHandler(key2, value, this._utils); + if (!unknownResult) return; + for (const resultKey of Object.keys(unknownResult)) { + if (this._identifyMissing(resultKey, unknownResult)) continue; + const resultValue = unknownResult[resultKey]; + if (resultKey in this._utils.schemas) knownResultHandler(resultKey, resultValue); + else newOptions[resultKey] = resultValue; + } + } + _applyPostprocess(options8) { + const postprocessed = this._postprocess(options8, this._utils); + if (postprocessed === VALUE_UNCHANGED) return; + if (postprocessed.delete) for (const deleteKey of postprocessed.delete) delete options8[deleteKey]; + if (postprocessed.override) { + const { knownKeys, unknownKeys } = this._partitionOptionKeys(postprocessed.override); + for (const key2 of knownKeys) { + const value = postprocessed.override[key2]; + this._applyValidation(value, key2, this._utils.schemas[key2]); + options8[key2] = value; + } + for (const key2 of unknownKeys) { + const value = postprocessed.override[key2]; + this._applyUnknownHandler(key2, value, options8, (knownResultKey, knownResultValue) => { + const schema = this._utils.schemas[knownResultKey]; + this._applyValidation(knownResultValue, knownResultKey, schema); + options8[knownResultKey] = knownResultValue; + }); + } + } + } + }; + errors_exports = {}; + __export(errors_exports, { + ArgExpansionBailout: () => ArgExpansionBailout, + ConfigError: () => ConfigError, + UndefinedParserError: () => UndefinedParserError + }); + ConfigError = class extends Error { + name = "ConfigError"; + }; + UndefinedParserError = class extends Error { + name = "UndefinedParserError"; + }; + ArgExpansionBailout = class extends Error { + name = "ArgExpansionBailout"; + }; + create_mockable_default = createMockable; + mockable = create_mockable_default({ getPrettierConfigSearchStopDirectory: () => void 0 }); + mockable_default = mockable.mocked; + import_micromatch = __toESM(require_micromatch(), 1); + URL_STRING_PREFIX = "file:"; + isUrlInstance = (value) => value instanceof URL; + isUrlString = (value) => typeof value === "string" && value.startsWith(URL_STRING_PREFIX); + isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath); + toPath = (urlOrPath) => isUrl(urlOrPath) ? url.fileURLToPath(urlOrPath) : urlOrPath; + toAbsolutePath = (urlOrPath) => urlOrPath ? path.resolve(isUrl(urlOrPath) ? url.fileURLToPath(urlOrPath) : urlOrPath) : urlOrPath; + partition_default = partition2; + import_editorconfig = __toESM(require_src(), 1); + isFile = (stats) => stats?.isFile(); + isDirectory = (stats) => stats?.isDirectory(); + iterate_directory_up_default = iterateDirectoryUp; + Searcher = class { + #stopDirectory; + #cache; + #resultCache = /* @__PURE__ */ new Map(); + #searchWithoutCache; + /** + @protected + @type {typeof findFile | typeof findDirectory} + */ + findInDirectory; + /** + @param {NameOrNames} nameOrNames + @param {SearcherOptions} [options] + */ + constructor(nameOrNames, { allowSymlinks, filter: filter2, stopDirectory, cache: cache3 } = {}) { + this.#stopDirectory = stopDirectory; + this.#cache = cache3 ?? true; + this.#searchWithoutCache = (directory) => this.findInDirectory(nameOrNames, { + cwd: directory, + filter: filter2, + allowSymlinks + }); + } + #search(directory, cache3 = true) { + const resultCache = this.#resultCache; + if (!cache3 || !resultCache.has(directory)) resultCache.set(directory, this.#searchWithoutCache(directory)); + return resultCache.get(directory); + } + /** + Find closest file or directory matches name or names. + + @param {OptionalUrlOrPath} [startDirectory] + @param {SearchOptions} [options] + @returns {SearchResult} + */ + async search(startDirectory, options8) { + for (const directory of iterate_directory_up_default(startDirectory, this.#stopDirectory)) { + const result = await this.#search(directory, options8?.cache ?? this.#cache); + if (result) return result; + } + } + /** + Clear caches. + + @returns {void} + */ + clearCache() { + this.#resultCache.clear(); + } + }; + FileSearcher = class extends Searcher { + /** @protected */ + findInDirectory = findFile; + }; + DirectorySearcher = class extends Searcher { + /** @protected */ + findInDirectory = findDirectory; + }; + DIRECTORIES = [".git", ".hg"]; + isPositiveInteger = (value) => Number.isSafeInteger(value) && value > 0; + editorconfig_to_prettier_default = editorConfigToPrettier; + editorconfigCache = /* @__PURE__ */ new Map(); + unicode = { + Space_Separator: /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, + ID_Start: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78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30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, + ID_Continue: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0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E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uA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E15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }; + util = { + isSpaceSeparator(c2) { + return typeof c2 === "string" && unicode.Space_Separator.test(c2); + }, + isIdStartChar(c2) { + return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 === "$" || c2 === "_" || unicode.ID_Start.test(c2)); + }, + isIdContinueChar(c2) { + return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 >= "0" && c2 <= "9" || c2 === "$" || c2 === "_" || c2 === "‌" || c2 === "‍" || unicode.ID_Continue.test(c2)); + }, + isDigit(c2) { + return typeof c2 === "string" && /[0-9]/.test(c2); + }, + isHexDigit(c2) { + return typeof c2 === "string" && /[0-9A-Fa-f]/.test(c2); + } + }; + parse2 = function parse3(text, reviver) { + source = String(text); + parseState = "start"; + stack = []; + pos = 0; + line = 1; + column = 0; + token = void 0; + key = void 0; + root = void 0; + do { + token = lex(); + parseStates[parseState](); + } while (token.type !== "eof"); + if (typeof reviver === "function") return internalize({ "": root }, "", reviver); + return root; + }; + lexStates = { + default() { + switch (c) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + return; + case "/": + read(); + lexState = "comment"; + return; + case void 0: + read(); + return newToken("eof"); + } + if (util.isSpaceSeparator(c)) { + read(); + return; + } + return lexStates[parseState](); + }, + comment() { + switch (c) { + case "*": + read(); + lexState = "multiLineComment"; + return; + case "/": + read(); + lexState = "singleLineComment"; + return; + } + throw invalidChar(read()); + }, + multiLineComment() { + switch (c) { + case "*": + read(); + lexState = "multiLineCommentAsterisk"; + return; + case void 0: throw invalidChar(read()); + } + read(); + }, + multiLineCommentAsterisk() { + switch (c) { + case "*": + read(); + return; + case "/": + read(); + lexState = "default"; + return; + case void 0: throw invalidChar(read()); + } + read(); + lexState = "multiLineComment"; + }, + singleLineComment() { + switch (c) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + lexState = "default"; + return; + case void 0: + read(); + return newToken("eof"); + } + read(); + }, + value() { + switch (c) { + case "{": + case "[": return newToken("punctuator", read()); + case "n": + read(); + literal("ull"); + return newToken("null", null); + case "t": + read(); + literal("rue"); + return newToken("boolean", true); + case "f": + read(); + literal("alse"); + return newToken("boolean", false); + case "-": + case "+": + if (read() === "-") sign = -1; + lexState = "sign"; + return; + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + case "\"": + case "'": + doubleQuote = read() === "\""; + buffer = ""; + lexState = "string"; + return; + } + throw invalidChar(read()); + }, + identifierNameStartEscape() { + if (c !== "u") throw invalidChar(read()); + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": break; + default: + if (!util.isIdStartChar(u)) throw invalidIdentifier(); + break; + } + buffer += u; + lexState = "identifierName"; + }, + identifierName() { + switch (c) { + case "$": + case "_": + case "‌": + case "‍": + buffer += read(); + return; + case "\\": + read(); + lexState = "identifierNameEscape"; + return; + } + if (util.isIdContinueChar(c)) { + buffer += read(); + return; + } + return newToken("identifier", buffer); + }, + identifierNameEscape() { + if (c !== "u") throw invalidChar(read()); + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + case "‌": + case "‍": break; + default: + if (!util.isIdContinueChar(u)) throw invalidIdentifier(); + break; + } + buffer += u; + lexState = "identifierName"; + }, + sign() { + switch (c) { + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", sign * Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + } + throw invalidChar(read()); + }, + zero() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + case "x": + case "X": + buffer += read(); + lexState = "hexadecimal"; + return; + } + return newToken("numeric", sign * 0); + }, + decimalInteger() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalPointLeading() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + throw invalidChar(read()); + }, + decimalPoint() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalFraction() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalExponent() { + switch (c) { + case "+": + case "-": + buffer += read(); + lexState = "decimalExponentSign"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentSign() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentInteger() { + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + hexadecimal() { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = "hexadecimalInteger"; + return; + } + throw invalidChar(read()); + }, + hexadecimalInteger() { + if (util.isHexDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + string() { + switch (c) { + case "\\": + read(); + buffer += escape(); + return; + case "\"": + if (doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "'": + if (!doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "\n": + case "\r": throw invalidChar(read()); + case "\u2028": + case "\u2029": + separatorChar(c); + break; + case void 0: throw invalidChar(read()); + } + buffer += read(); + }, + start() { + switch (c) { + case "{": + case "[": return newToken("punctuator", read()); + } + lexState = "value"; + }, + beforePropertyName() { + switch (c) { + case "$": + case "_": + buffer = read(); + lexState = "identifierName"; + return; + case "\\": + read(); + lexState = "identifierNameStartEscape"; + return; + case "}": return newToken("punctuator", read()); + case "\"": + case "'": + doubleQuote = read() === "\""; + lexState = "string"; + return; + } + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = "identifierName"; + return; + } + throw invalidChar(read()); + }, + afterPropertyName() { + if (c === ":") return newToken("punctuator", read()); + throw invalidChar(read()); + }, + beforePropertyValue() { + lexState = "value"; + }, + afterPropertyValue() { + switch (c) { + case ",": + case "}": return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + beforeArrayValue() { + if (c === "]") return newToken("punctuator", read()); + lexState = "value"; + }, + afterArrayValue() { + switch (c) { + case ",": + case "]": return newToken("punctuator", read()); + } + throw invalidChar(read()); + }, + end() { + throw invalidChar(read()); + } + }; + parseStates = { + start() { + if (token.type === "eof") throw invalidEOF(); + push(); + }, + beforePropertyName() { + switch (token.type) { + case "identifier": + case "string": + key = token.value; + parseState = "afterPropertyName"; + return; + case "punctuator": + pop(); + return; + case "eof": throw invalidEOF(); + } + }, + afterPropertyName() { + if (token.type === "eof") throw invalidEOF(); + parseState = "beforePropertyValue"; + }, + beforePropertyValue() { + if (token.type === "eof") throw invalidEOF(); + push(); + }, + beforeArrayValue() { + if (token.type === "eof") throw invalidEOF(); + if (token.type === "punctuator" && token.value === "]") { + pop(); + return; + } + push(); + }, + afterPropertyValue() { + if (token.type === "eof") throw invalidEOF(); + switch (token.value) { + case ",": + parseState = "beforePropertyName"; + return; + case "}": pop(); + } + }, + afterArrayValue() { + if (token.type === "eof") throw invalidEOF(); + switch (token.value) { + case ",": + parseState = "beforeArrayValue"; + return; + case "]": pop(); + } + }, + end() {} + }; + dist_default = { parse: parse2 }; + import_picocolors4 = __toESM(require_picocolors(), 1); + import_js_tokens = __toESM(require_js_tokens(), 1); + nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; + nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・"; + new RegExp("[" + nonASCIIidentifierStartChars + "]"); + new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + reservedWords = { + keyword: [ + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "do", + "else", + "finally", + "for", + "function", + "if", + "return", + "switch", + "throw", + "try", + "var", + "const", + "while", + "with", + "new", + "this", + "super", + "class", + "extends", + "export", + "import", + "null", + "true", + "false", + "in", + "instanceof", + "typeof", + "void", + "delete" + ], + strict: [ + "implements", + "interface", + "let", + "package", + "private", + "protected", + "public", + "static", + "yield" + ], + strictBind: ["eval", "arguments"] + }; + keywords = new Set(reservedWords.keyword); + reservedWordsStrictSet = new Set(reservedWords.strict); + new Set(reservedWords.strictBind); + compose = (f, g) => (v) => f(g(v)); + defsOn = buildDefs((0, import_picocolors4.createColors)(true)); + defsOff = buildDefs((0, import_picocolors4.createColors)(false)); + sometimesKeywords = /* @__PURE__ */ new Set([ + "as", + "async", + "from", + "get", + "of", + "set" + ]); + NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; + BRACKET = /^[()[\]{}]$/; + { + const getTokenType = function(token2) { + if (token2.type === "IdentifierName") { + if (isKeyword(token2.value) || isStrictReservedWord(token2.value, true) || sometimesKeywords.has(token2.value)) return "keyword"; + if (token2.value[0] !== token2.value[0].toLowerCase()) return "capitalized"; + } + if (token2.type === "Punctuator" && BRACKET.test(token2.value)) return "uncolored"; + if (token2.type === "Invalid" && token2.value === "@") return "punctuator"; + switch (token2.type) { + case "NumericLiteral": return "number"; + case "StringLiteral": + case "JSXString": + case "NoSubstitutionTemplate": return "string"; + case "RegularExpressionLiteral": return "regex"; + case "Punctuator": + case "JSXPunctuator": return "punctuator"; + case "MultiLineComment": + case "SingleLineComment": return "comment"; + case "Invalid": + case "JSXInvalid": return "invalid"; + case "JSXIdentifier": return "jsxIdentifier"; + default: return "uncolored"; + } + }; + tokenize2 = function* (text) { + for (const token2 of (0, import_js_tokens.default)(text, { jsx: true })) switch (token2.type) { + case "TemplateHead": + yield { + type: "string", + value: token2.value.slice(0, -2) + }; + yield { + type: "punctuator", + value: "${" + }; + break; + case "TemplateMiddle": + yield { + type: "punctuator", + value: "}" + }; + yield { + type: "string", + value: token2.value.slice(1, -2) + }; + yield { + type: "punctuator", + value: "${" + }; + break; + case "TemplateTail": + yield { + type: "punctuator", + value: "}" + }; + yield { + type: "string", + value: token2.value.slice(1) + }; + break; + default: yield { + type: getTokenType(token2), + value: token2.value + }; + } + }; + } + NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + getOffsets = ({ oneBased, oneBasedLine = oneBased, oneBasedColumn = oneBased } = {}) => [oneBasedLine ? 1 : 0, oneBasedColumn ? 1 : 0]; + getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}`; + JSONError = class _JSONError extends Error { + name = "JSONError"; + fileName; + #input; + #jsonParseError; + #message; + #codeFrame; + #rawCodeFrame; + constructor(messageOrOptions) { + if (typeof messageOrOptions === "string") { + super(); + this.#message = messageOrOptions; + } else { + const { jsonParseError, fileName, input } = messageOrOptions; + super(void 0, { cause: jsonParseError }); + this.#input = input; + this.#jsonParseError = jsonParseError; + this.fileName = fileName; + } + Error.captureStackTrace?.(this, _JSONError); + } + get message() { + this.#message ?? (this.#message = `${addCodePointToUnexpectedToken(this.#jsonParseError.message)}${this.#input === "" ? " while parsing empty string" : ""}`); + const { codeFrame } = this; + return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${codeFrame ? ` + +${codeFrame} +` : ""}`; + } + set message(message) { + this.#message = message; + } + #getCodeFrame(highlightCode) { + if (!this.#jsonParseError) return; + const input = this.#input; + const location = getErrorLocation(input, this.#jsonParseError.message); + if (!location) return; + return codeFrameColumns(input, { start: location }, { highlightCode }); + } + get codeFrame() { + this.#codeFrame ?? (this.#codeFrame = this.#getCodeFrame(true)); + return this.#codeFrame; + } + get rawCodeFrame() { + this.#rawCodeFrame ?? (this.#rawCodeFrame = this.#getCodeFrame(false)); + return this.#rawCodeFrame; + } + }; + getErrorLocation = (string, message) => { + const match = message.match(/in JSON at position (?\d+)(?: \(line (?\d+) column (?\d+)\))?$/); + if (!match) return; + const { index, line: line3, column: column2 } = match.groups; + if (line3 && column2) return { + line: Number(line3), + column: Number(column2) + }; + return indexToPosition(string, Number(index), { oneBased: true }); + }; + addCodePointToUnexpectedToken = (message) => message.replace(/(?<=^Unexpected token )(?')?(.)\k/, (_, _quote, token2) => `"${token2}"(${getCodePoint(token2)})`); + TomlError = class extends Error { + line; + column; + codeblock; + constructor(message, options8) { + const [line3, column2] = getLineColFromPtr(options8.toml, options8.ptr); + const codeblock = makeCodeBlock(options8.toml, line3, column2); + super(`Invalid TOML document: ${message} + +${codeblock}`, options8); + this.line = line3; + this.column = column2; + this.codeblock = codeblock; + } + }; + DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i; + TomlDate = class _TomlDate extends Date { + #hasDate = false; + #hasTime = false; + #offset = null; + constructor(date) { + let hasDate = true; + let hasTime = true; + let offset = "Z"; + if (typeof date === "string") { + let match = date.match(DATE_TIME_RE); + if (match) { + if (!match[1]) { + hasDate = false; + date = `0000-01-01T${date}`; + } + hasTime = !!match[2]; + hasTime && date[10] === " " && (date = date.replace(" ", "T")); + if (match[2] && +match[2] > 23) date = ""; + else { + offset = match[3] || null; + date = date.toUpperCase(); + if (!offset && hasTime) date += "Z"; + } + } else date = ""; + } + super(date); + if (!isNaN(this.getTime())) { + this.#hasDate = hasDate; + this.#hasTime = hasTime; + this.#offset = offset; + } + } + isDateTime() { + return this.#hasDate && this.#hasTime; + } + isLocal() { + return !this.#hasDate || !this.#hasTime || !this.#offset; + } + isDate() { + return this.#hasDate && !this.#hasTime; + } + isTime() { + return this.#hasTime && !this.#hasDate; + } + isValid() { + return this.#hasDate || this.#hasTime; + } + toISOString() { + let iso = super.toISOString(); + if (this.isDate()) return iso.slice(0, 10); + if (this.isTime()) return iso.slice(11, 23); + if (this.#offset === null) return iso.slice(0, -1); + if (this.#offset === "Z") return iso; + let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6); + offset = this.#offset[0] === "-" ? offset : -offset; + return (/* @__PURE__ */ new Date(this.getTime() - offset * 6e4)).toISOString().slice(0, -1) + this.#offset; + } + static wrapAsOffsetDateTime(jsDate, offset = "Z") { + let date = new _TomlDate(jsDate); + date.#offset = offset; + return date; + } + static wrapAsLocalDateTime(jsDate) { + let date = new _TomlDate(jsDate); + date.#offset = null; + return date; + } + static wrapAsLocalDate(jsDate) { + let date = new _TomlDate(jsDate); + date.#hasTime = false; + date.#offset = null; + return date; + } + static wrapAsLocalTime(jsDate) { + let date = new _TomlDate(jsDate); + date.#hasDate = false; + date.#offset = null; + return date; + } + }; + INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/; + FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/; + LEADING_ZERO = /^[+-]?0[0-9_]/; + ESCAPE_REGEX = /^[0-9a-f]{4,8}$/i; + ESC_MAP = { + b: "\b", + t: " ", + n: "\n", + f: "\f", + r: "\r", + "\"": "\"", + "\\": "\\" + }; + KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/; + read_file_default = readFile; + loadConfigFromPackageJson = process.versions.bun ? async function loadConfigFromBunPackageJson(file) { + const { prettier } = await readBunPackageJson(file); + return prettier; + } : async function loadConfigFromPackageJson2(file) { + const { prettier } = await readJson(file); + return prettier; + }; + loaders_default = { + ".toml": loadToml, + ".json5": loadJson5, + ".json": readJson, + ".js": importModuleDefault, + ".mjs": importModuleDefault, + ".cjs": importModuleDefault, + ".ts": importModuleDefault, + ".mts": importModuleDefault, + ".cts": importModuleDefault, + ".yaml": loadYaml, + ".yml": loadYaml, + "": loadYaml + }; + CONFIG_FILE_NAMES = [ + "package.json", + "package.yaml", + ".prettierrc", + ".prettierrc.json", + ".prettierrc.yml", + ".prettierrc.yaml", + ".prettierrc.json5", + ".prettierrc.js", + "prettier.config.js", + ".prettierrc.ts", + "prettier.config.ts", + ".prettierrc.mjs", + "prettier.config.mjs", + ".prettierrc.mts", + "prettier.config.mts", + ".prettierrc.cjs", + "prettier.config.cjs", + ".prettierrc.cts", + "prettier.config.cts", + ".prettierrc.toml" + ]; + config_searcher_default = getSearcher; + own = {}.hasOwnProperty; + classRegExp = /^([A-Z][a-z\d]*)+$/; + kTypes = /* @__PURE__ */ new Set([ + "string", + "function", + "number", + "object", + "Function", + "Object", + "boolean", + "bigint", + "symbol" + ]); + codes = {}; + messages = /* @__PURE__ */ new Map(); + nodeInternalPrefix = "__node_internal_"; + codes.ERR_INVALID_ARG_TYPE = createError( + "ERR_INVALID_ARG_TYPE", + /** + * @param {string} name + * @param {Array | string} expected + * @param {unknown} actual + */ + (name, expected, actual) => { + assert2.ok(typeof name === "string", "'name' must be a string"); + if (!Array.isArray(expected)) expected = [expected]; + let message = "The "; + if (name.endsWith(" argument")) message += `${name} `; + else { + const type = name.includes(".") ? "property" : "argument"; + message += `"${name}" ${type} `; + } + message += "must be "; + const types = []; + const instances = []; + const other = []; + for (const value of expected) { + assert2.ok(typeof value === "string", "All expected entries have to be of type string"); + if (kTypes.has(value)) types.push(value.toLowerCase()); + else if (classRegExp.exec(value) === null) { + assert2.ok(value !== "object", "The value \"object\" should be written as \"Object\""); + other.push(value); + } else instances.push(value); + } + if (instances.length > 0) { + const pos2 = types.indexOf("object"); + if (pos2 !== -1) { + types.slice(pos2, 1); + instances.push("Object"); + } + } + if (types.length > 0) { + message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`; + if (instances.length > 0 || other.length > 0) message += " or "; + } + if (instances.length > 0) { + message += `an instance of ${formatList(instances, "or")}`; + if (other.length > 0) message += " or "; + } + if (other.length > 0) if (other.length > 1) message += `one of ${formatList(other, "or")}`; + else { + if (other[0].toLowerCase() !== other[0]) message += "an "; + message += `${other[0]}`; + } + message += `. Received ${determineSpecificType(actual)}`; + return message; + }, + TypeError + ); + codes.ERR_INVALID_MODULE_SPECIFIER = createError( + "ERR_INVALID_MODULE_SPECIFIER", + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base = void 0) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; + }, + TypeError + ); + codes.ERR_INVALID_PACKAGE_CONFIG = createError( + "ERR_INVALID_PACKAGE_CONFIG", + /** + * @param {string} path + * @param {string} [base] + * @param {string} [message] + */ + (path15, base, message) => { + return `Invalid package config ${path15}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; + }, + Error + ); + codes.ERR_INVALID_PACKAGE_TARGET = createError( + "ERR_INVALID_PACKAGE_TARGET", + /** + * @param {string} packagePath + * @param {string} key + * @param {unknown} target + * @param {boolean} [isImport=false] + * @param {string} [base] + */ + (packagePath, key2, target, isImport = false, base = void 0) => { + const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); + if (key2 === ".") { + assert2.ok(isImport === false); + return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`; + } + return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key2}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`; + }, + Error + ); + codes.ERR_MODULE_NOT_FOUND = createError( + "ERR_MODULE_NOT_FOUND", + /** + * @param {string} path + * @param {string} base + * @param {boolean} [exactUrl] + */ + (path15, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? "module" : "package"} '${path15}' imported from ${base}`; + }, + Error + ); + codes.ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error); + codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( + "ERR_PACKAGE_IMPORT_NOT_DEFINED", + /** + * @param {string} specifier + * @param {string} packagePath + * @param {string} base + */ + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`; + }, + TypeError + ); + codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError( + "ERR_PACKAGE_PATH_NOT_EXPORTED", + /** + * @param {string} packagePath + * @param {string} subpath + * @param {string} [base] + */ + (packagePath, subpath, base = void 0) => { + if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + }, + Error + ); + codes.ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error); + codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError); + codes.ERR_UNKNOWN_FILE_EXTENSION = createError( + "ERR_UNKNOWN_FILE_EXTENSION", + /** + * @param {string} extension + * @param {string} path + */ + (extension, path15) => { + return `Unknown file extension "${extension}" for ${path15}`; + }, + TypeError + ); + codes.ERR_INVALID_ARG_VALUE = createError( + "ERR_INVALID_ARG_VALUE", + /** + * @param {string} name + * @param {unknown} value + * @param {string} [reason='is invalid'] + */ + (name, value, reason = "is invalid") => { + let inspected = inspect(value); + if (inspected.length > 128) inspected = `${inspected.slice(0, 128)}...`; + return `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`; + }, + TypeError + ); + captureLargerStackTrace = hideStackFrames( + /** + * @param {Error} error + * @returns {Error} + */ + function(error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; + } + Error.captureStackTrace(error); + if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; + return error; + } + ); + hasOwnProperty = {}.hasOwnProperty; + ({ERR_INVALID_PACKAGE_CONFIG} = codes); + cache = /* @__PURE__ */ new Map(); + ({ERR_UNKNOWN_FILE_EXTENSION} = codes); + hasOwnProperty2 = {}.hasOwnProperty; + extensionFormatMap = { + __proto__: null, + ".cjs": "commonjs", + ".js": "module", + ".json": "json", + ".mjs": "module" + }; + protocolHandlers = { + __proto__: null, + "data:": getDataProtocolModuleFormat, + "file:": getFileProtocolModuleFormat, + "http:": getHttpProtocolModuleFormat, + "https:": getHttpProtocolModuleFormat, + "node:"() { + return "builtin"; + } + }; + ({ERR_INVALID_ARG_VALUE} = codes); + DEFAULT_CONDITIONS = Object.freeze(["node", "import"]); + DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); + RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; + ({ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG2, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST} = codes); + own2 = {}.hasOwnProperty; + invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; + deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; + invalidPackageNameRegEx = /^\.|%|\\/; + patternRegEx = /\*/g; + encodedSeparatorRegEx = /%2f|%5c/i; + emittedPackageWarnings = /* @__PURE__ */ new Set(); + doubleSlashRegEx = /[/\\]{2}/; + import_from_file_default = importFromFile; + require_from_file_default = requireFromFile; + requireErrorCodesShouldBeIgnored = /* @__PURE__ */ new Set([ + "MODULE_NOT_FOUND", + "ERR_REQUIRE_ESM", + "ERR_PACKAGE_PATH_NOT_EXPORTED", + "ERR_REQUIRE_ASYNC_MODULE" + ]); + load_external_config_default = loadExternalConfig; + load_config_default = loadConfig; + loadCache = /* @__PURE__ */ new Map(); + searchCache = /* @__PURE__ */ new Map(); + OPTIONAL_OBJECT = 1; + createMethodShim = (methodName, getImplementation) => (flags, object, ...arguments_) => { + if (flags | OPTIONAL_OBJECT && (object === void 0 || object === null)) return; + return (getImplementation.call(object) ?? object[methodName]).apply(object, arguments_); + }; + stringReplaceAll = String.prototype.replaceAll ?? function(pattern, replacement) { + if (pattern.global) return this.replace(pattern, replacement); + return this.split(pattern).join(replacement); + }; + method_replace_all_default = createMethodShim("replaceAll", function() { + if (typeof this === "string") return stringReplaceAll; + }); + OPTION_CR = "cr"; + OPTION_CRLF = "crlf"; + DEFAULT_OPTION = "lf"; + CHARACTER_CR = "\r"; + CHARACTER_CRLF = "\r\n"; + CHARACTER_LF = "\n"; + DEFAULT_EOL = CHARACTER_LF; + regexps = /* @__PURE__ */ new Map([ + [CHARACTER_LF, /\n/gu], + [CHARACTER_CR, /\r/gu], + [CHARACTER_CRLF, /\r\n/gu] + ]); + END_OF_LINE_REGEXP = /\r\n?/gu; + method_at_default = createMethodShim("at", function() { + if (Array.isArray(this) || typeof this === "string") return stringOrArrayAt; + }); + noop = () => {}; + noop_default = noop; + DOC_TYPE_CURSOR = "cursor"; + DOC_TYPE_INDENT = "indent"; + DOC_TYPE_ALIGN = "align"; + DOC_TYPE_TRIM = "trim"; + DOC_TYPE_GROUP = "group"; + DOC_TYPE_FILL = "fill"; + DOC_TYPE_IF_BREAK = "if-break"; + DOC_TYPE_INDENT_IF_BREAK = "indent-if-break"; + DOC_TYPE_LINE_SUFFIX = "line-suffix"; + DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary"; + DOC_TYPE_LINE = "line"; + DOC_TYPE_LABEL = "label"; + DOC_TYPE_BREAK_PARENT = "break-parent"; + emoji_regex_default = () => { + return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\u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DD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; + }; + narrow_emojis_evaluate_default = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇"; + notAsciiRegex = /[^\x20-\x7F]/u; + narrowEmojisSet = new Set(narrow_emojis_evaluate_default); + get_string_width_default = getStringWidth; + get_alignment_size_default = getAlignmentSize; + AstPath = class { + constructor(value) { + this.stack = [value]; + } + /** @type {string | null} */ + get key() { + const { stack: stack2, siblings } = this; + return method_at_default(0, stack2, siblings === null ? -2 : -4) ?? null; + } + /** @type {number | null} */ + get index() { + return this.siblings === null ? null : method_at_default(0, this.stack, -2); + } + /** @type {object} */ + get node() { + return method_at_default(0, this.stack, -1); + } + /** @type {object | null} */ + get parent() { + return this.getNode(1); + } + /** @type {object | null} */ + get grandparent() { + return this.getNode(2); + } + /** @type {boolean} */ + get isInArray() { + return this.siblings !== null; + } + /** @type {object[] | null} */ + get siblings() { + const { stack: stack2 } = this; + const maybeArray = method_at_default(0, stack2, -3); + return Array.isArray(maybeArray) ? maybeArray : null; + } + /** @type {object | null} */ + get next() { + const { siblings } = this; + return siblings === null ? null : siblings[this.index + 1]; + } + /** @type {object | null} */ + get previous() { + const { siblings } = this; + return siblings === null ? null : siblings[this.index - 1]; + } + /** @type {boolean} */ + get isFirst() { + return this.index === 0; + } + /** @type {boolean} */ + get isLast() { + const { siblings, index } = this; + return siblings !== null && index === siblings.length - 1; + } + /** @type {boolean} */ + get isRoot() { + return this.stack.length === 1; + } + /** @type {object} */ + get root() { + return this.stack[0]; + } + /** @type {object[]} */ + get ancestors() { + return [...this.#getAncestors()]; + } + getName() { + const { stack: stack2 } = this; + const { length } = stack2; + if (length > 1) return method_at_default(0, stack2, -2); + return null; + } + getValue() { + return method_at_default(0, this.stack, -1); + } + getNode(count = 0) { + const stackIndex = this.#getNodeStackIndex(count); + return stackIndex === -1 ? null : this.stack[stackIndex]; + } + getParentNode(count = 0) { + return this.getNode(count + 1); + } + #getNodeStackIndex(count) { + const { stack: stack2 } = this; + for (let i = stack2.length - 1; i >= 0; i -= 2) if (!Array.isArray(stack2[i]) && --count < 0) return i; + return -1; + } + call(callback, ...names) { + const { stack: stack2 } = this; + const { length } = stack2; + let value = method_at_default(0, stack2, -1); + for (const name of names) { + value = value?.[name]; + stack2.push(name, value); + } + try { + return callback(this); + } finally { + stack2.length = length; + } + } + /** + * @template {(path: AstPath) => any} T + * @param {T} callback + * @param {number} [count=0] + * @returns {ReturnType} + */ + callParent(callback, count = 0) { + const stackIndex = this.#getNodeStackIndex(count + 1); + const parentValues = this.stack.splice(stackIndex + 1); + try { + return callback(this); + } finally { + this.stack.push(...parentValues); + } + } + each(callback, ...names) { + const { stack: stack2 } = this; + const { length } = stack2; + let value = method_at_default(0, stack2, -1); + for (const name of names) { + value = value[name]; + stack2.push(name, value); + } + try { + for (let i = 0; i < value.length; ++i) { + stack2.push(i, value[i]); + callback(this, i, value); + stack2.length -= 2; + } + } finally { + stack2.length = length; + } + } + map(callback, ...names) { + const result = []; + this.each((path15, index, value) => { + result[index] = callback(path15, index, value); + }, ...names); + return result; + } + /** + * @param {...( + * | ((node: any, name: string | null, number: number | null) => boolean) + * | undefined + * )} predicates + */ + match(...predicates) { + let stackPointer = this.stack.length - 1; + let name = null; + let node = this.stack[stackPointer--]; + for (const predicate of predicates) { + if (node === void 0) return false; + let number = null; + if (typeof name === "number") { + number = name; + name = this.stack[stackPointer--]; + node = this.stack[stackPointer--]; + } + if (predicate && !predicate(node, name, number)) return false; + name = this.stack[stackPointer--]; + node = this.stack[stackPointer--]; + } + return true; + } + /** + * Traverses the ancestors of the current node heading toward the tree root + * until it finds a node that matches the provided predicate function. Will + * return the first matching ancestor. If no such node exists, returns undefined. + * @param {(node: any) => boolean} predicate + * @internal Unstable API. Don't use in plugins for now. + */ + findAncestor(predicate) { + for (const node of this.#getAncestors()) if (predicate(node)) return node; + } + /** + * Traverses the ancestors of the current node heading toward the tree root + * until it finds a node that matches the provided predicate function. + * returns true if matched node found. + * @param {(node: any) => boolean} predicate + * @returns {boolean} + * @internal Unstable API. Don't use in plugins for now. + */ + hasAncestor(predicate) { + for (const node of this.#getAncestors()) if (predicate(node)) return true; + return false; + } + *#getAncestors() { + const { stack: stack2 } = this; + for (let index = stack2.length - 3; index >= 0; index -= 2) { + const value = stack2[index]; + if (!Array.isArray(value)) yield value; + } + } + }; + ast_path_default = AstPath; + is_object_default = isObject; + skipWhitespace = skip(/\s/u); + skipSpaces = skip(" "); + skipToLineEnd = skip(",; "); + skipEverythingButNewLine = skip(/[^\n\r]/u); + isNewlineCharacter = (character) => character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029"; + skip_newline_default = skipNewline; + has_newline_default = hasNewline; + is_non_empty_array_default = isNonEmptyArray; + get_sorted_child_nodes_default = getSortedChildNodes; + childNodesCache = /* @__PURE__ */ new WeakMap(); + returnFalse = () => false; + isAllEmptyAndNoLineBreak = (text) => !/[\S\n\u2028\u2029]/u.test(text); + is_previous_line_empty_default = isPreviousLineEmpty; + ({breakParent, hardline, indent, join: join3, line: line2, lineSuffix} = builders); + create_print_pre_check_function_default = () => noop_default; + core_options_evaluate_default = { + "checkIgnorePragma": { + "category": "Special", + "type": "boolean", + "default": false, + "description": "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", + "cliCategory": "Other" + }, + "cursorOffset": { + "category": "Special", + "type": "int", + "default": -1, + "range": { + "start": -1, + "end": Infinity, + "step": 1 + }, + "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", + "cliCategory": "Editor" + }, + "endOfLine": { + "category": "Global", + "type": "choice", + "default": "lf", + "description": "Which end of line characters to apply.", + "choices": [ + { + "value": "lf", + "description": "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" + }, + { + "value": "crlf", + "description": "Carriage Return + Line Feed characters (\\r\\n), common on Windows" + }, + { + "value": "cr", + "description": "Carriage Return character only (\\r), used very rarely" + }, + { + "value": "auto", + "description": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)" + } + ] + }, + "filepath": { + "category": "Special", + "type": "path", + "description": "Specify the input filepath. This will be used to do parser inference.", + "cliName": "stdin-filepath", + "cliCategory": "Other", + "cliDescription": "Path to the file to pretend that stdin comes from." + }, + "insertPragma": { + "category": "Special", + "type": "boolean", + "default": false, + "description": "Insert @format pragma into file's first docblock comment.", + "cliCategory": "Other" + }, + "parser": { + "category": "Global", + "type": "choice", + "default": void 0, + "description": "Which parser to use.", + "exception": (value) => typeof value === "string" || typeof value === "function", + "choices": [ + { + "value": "flow", + "description": "Flow" + }, + { + "value": "babel", + "description": "JavaScript" + }, + { + "value": "babel-flow", + "description": "Flow" + }, + { + "value": "babel-ts", + "description": "TypeScript" + }, + { + "value": "typescript", + "description": "TypeScript" + }, + { + "value": "acorn", + "description": "JavaScript" + }, + { + "value": "espree", + "description": "JavaScript" + }, + { + "value": "meriyah", + "description": "JavaScript" + }, + { + "value": "css", + "description": "CSS" + }, + { + "value": "less", + "description": "Less" + }, + { + "value": "scss", + "description": "SCSS" + }, + { + "value": "json", + "description": "JSON" + }, + { + "value": "json5", + "description": "JSON5" + }, + { + "value": "jsonc", + "description": "JSON with Comments" + }, + { + "value": "json-stringify", + "description": "JSON.stringify" + }, + { + "value": "graphql", + "description": "GraphQL" + }, + { + "value": "markdown", + "description": "Markdown" + }, + { + "value": "mdx", + "description": "MDX" + }, + { + "value": "vue", + "description": "Vue" + }, + { + "value": "yaml", + "description": "YAML" + }, + { + "value": "glimmer", + "description": "Ember / Handlebars" + }, + { + "value": "html", + "description": "HTML" + }, + { + "value": "angular", + "description": "Angular" + }, + { + "value": "lwc", + "description": "Lightning Web Components" + }, + { + "value": "mjml", + "description": "MJML" + } + ] + }, + "plugins": { + "type": "path", + "array": true, + "default": [{ "value": [] }], + "category": "Global", + "description": "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", + "exception": (value) => typeof value === "string" || typeof value === "object", + "cliName": "plugin", + "cliCategory": "Config" + }, + "printWidth": { + "category": "Global", + "type": "int", + "default": 80, + "description": "The line length where Prettier will try wrap.", + "range": { + "start": 0, + "end": Infinity, + "step": 1 + } + }, + "rangeEnd": { + "category": "Special", + "type": "int", + "default": Infinity, + "range": { + "start": 0, + "end": Infinity, + "step": 1 + }, + "description": "Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.", + "cliCategory": "Editor" + }, + "rangeStart": { + "category": "Special", + "type": "int", + "default": 0, + "range": { + "start": 0, + "end": Infinity, + "step": 1 + }, + "description": "Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.", + "cliCategory": "Editor" + }, + "requirePragma": { + "category": "Special", + "type": "boolean", + "default": false, + "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", + "cliCategory": "Other" + }, + "tabWidth": { + "type": "int", + "category": "Global", + "default": 2, + "description": "Number of spaces per indentation level.", + "range": { + "start": 0, + "end": Infinity, + "step": 1 + } + }, + "useTabs": { + "category": "Global", + "type": "boolean", + "default": false, + "description": "Indent with tabs instead of spaces." + }, + "embeddedLanguageFormatting": { + "category": "Global", + "type": "choice", + "default": "auto", + "description": "Control how Prettier formats quoted code embedded in the file.", + "choices": [{ + "value": "auto", + "description": "Format embedded code if Prettier can automatically identify it." + }, { + "value": "off", + "description": "Never automatically format embedded code." + }] + } + }; + arrayToReversed = Array.prototype.toReversed ?? function() { + return [...this].reverse(); + }; + method_to_reversed_default = createMethodShim("toReversed", function() { + if (Array.isArray(this)) return arrayToReversed; + }); + import_n_readlines = __toESM(require_readlines(), 1); + get_interpreter_default = getInterpreter; + getFileBasename = (file) => { + try { + return path10.basename(toPath(file)); + } catch { + return ""; + } + }; + getLanguageByInterpreter = getLanguageByInterpreterNodejs; + infer_parser_default = inferParser; + normalize_options_default = normalizeOptions; + arrayFindLast = Array.prototype.findLast ?? function(callback) { + for (let index = this.length - 1; index >= 0; index--) { + const element = this[index]; + if (callback(element, index, this)) return element; + } + }; + method_find_last_default = createMethodShim("findLast", function() { + if (Array.isArray(this)) return arrayFindLast; + }); + FRONT_MATTER_MARK = Symbol.for("PRETTIER_IS_FRONT_MATTER"); + FRONT_MATTER_VISITOR_KEYS = []; + is_front_matter_default = isFrontMatter; + ({hardline: hardline2, markAsRoot} = builders); + SUPPORTED_EMBED_LANGUAGES = /* @__PURE__ */ new Set(["yaml", "toml"]); + isEmbedFrontMatter = ({ node }) => is_front_matter_default(node) && SUPPORTED_EMBED_LANGUAGES.has(node.language); + clean_default = clean; + print_default = printFrontMatter; + nonTraversableKeys = /* @__PURE__ */ new Set([ + "tokens", + "comments", + "parent", + "enclosingNode", + "precedingNode", + "followingNode" + ]); + defaultGetVisitorKeys = (node) => Object.keys(node).filter((key2) => !nonTraversableKeys.has(key2)); + create_get_visitor_keys_function_default = createGetVisitorKeysFunction; + normalizedPrinters = /* @__PURE__ */ new WeakMap(); + PRINTER_FRONT_MATTER_SUPPORT_OFF = Object.fromEntries([ + "clean", + "embed", + "print" + ].map((feature) => [feature, false])); + formatOptionsHiddenDefaults = { + astFormat: "estree", + printer: {}, + originalText: void 0, + locStart: null, + locEnd: null, + getVisitorKeys: null + }; + normalize_format_options_default = normalizeFormatOptions; + parse_default = parse5; + ({stripTrailingHardline} = utils); + print_ignored_default = printIgnored; + ({cursor} = builders); + get_cursor_node_default = getCursorLocation; + massage_ast_default = massageAst; + arrayFindLastIndex = Array.prototype.findLastIndex ?? function(callback) { + for (let index = this.length - 1; index >= 0; index--) { + const element = this[index]; + if (callback(element, index, this)) return index; + } + return -1; + }; + method_find_last_index_default = createMethodShim("findLastIndex", function() { + if (Array.isArray(this)) return arrayFindLastIndex; + }); + isJsonParser = ({ parser }) => parser === "json" || parser === "json5" || parser === "jsonc" || parser === "json-stringify"; + jsonSourceElements = /* @__PURE__ */ new Set([ + "JsonRoot", + "ObjectExpression", + "ArrayExpression", + "StringLiteral", + "NumericLiteral", + "BooleanLiteral", + "NullLiteral", + "UnaryExpression", + "TemplateLiteral" + ]); + graphqlSourceElements = /* @__PURE__ */ new Set([ + "OperationDefinition", + "FragmentDefinition", + "VariableDefinition", + "TypeExtensionDefinition", + "ObjectTypeDefinition", + "FieldDefinition", + "DirectiveDefinition", + "EnumTypeDefinition", + "EnumValueDefinition", + "InputValueDefinition", + "InputObjectTypeDefinition", + "SchemaDefinition", + "OperationTypeDefinition", + "InterfaceTypeDefinition", + "UnionTypeDefinition", + "ScalarTypeDefinition" + ]); + ({addAlignmentToDoc, hardline: hardline3} = builders); + ({printDocToString: printDocToStringWithoutNormalizeOptions} = printer); + BOM = ""; + CURSOR = Symbol("cursor"); + option_categories_exports = {}; + __export(option_categories_exports, { + CATEGORY_CONFIG: () => CATEGORY_CONFIG, + CATEGORY_EDITOR: () => CATEGORY_EDITOR, + CATEGORY_FORMAT: () => CATEGORY_FORMAT, + CATEGORY_GLOBAL: () => CATEGORY_GLOBAL, + CATEGORY_OTHER: () => CATEGORY_OTHER, + CATEGORY_OUTPUT: () => CATEGORY_OUTPUT, + CATEGORY_SPECIAL: () => CATEGORY_SPECIAL + }); + CATEGORY_CONFIG = "Config"; + CATEGORY_EDITOR = "Editor"; + CATEGORY_FORMAT = "Format"; + CATEGORY_OTHER = "Other"; + CATEGORY_OUTPUT = "Output"; + CATEGORY_GLOBAL = "Global"; + CATEGORY_SPECIAL = "Special"; + languages_evaluate_default = [ + { + "name": "CSS", + "type": "markup", + "aceMode": "css", + "extensions": [".css", ".wxss"], + "tmScope": "source.css", + "codemirrorMode": "css", + "codemirrorMimeType": "text/css", + "parsers": ["css"], + "vscodeLanguageIds": ["css"], + "linguistLanguageId": 50 + }, + { + "name": "PostCSS", + "type": "markup", + "aceMode": "text", + "extensions": [".pcss", ".postcss"], + "tmScope": "source.postcss", + "group": "CSS", + "parsers": ["css"], + "vscodeLanguageIds": ["postcss"], + "linguistLanguageId": 262764437 + }, + { + "name": "Less", + "type": "markup", + "aceMode": "less", + "extensions": [".less"], + "tmScope": "source.css.less", + "aliases": ["less-css"], + "codemirrorMode": "css", + "codemirrorMimeType": "text/x-less", + "parsers": ["less"], + "vscodeLanguageIds": ["less"], + "linguistLanguageId": 198 + }, + { + "name": "SCSS", + "type": "markup", + "aceMode": "scss", + "extensions": [".scss"], + "tmScope": "source.css.scss", + "codemirrorMode": "css", + "codemirrorMimeType": "text/x-scss", + "parsers": ["scss"], + "vscodeLanguageIds": ["scss"], + "linguistLanguageId": 329 + } + ]; + common_options_evaluate_default = { + "bracketSpacing": { + "category": "Common", + "type": "boolean", + "default": true, + "description": "Print spaces between brackets.", + "oppositeDescription": "Do not print spaces between brackets." + }, + "objectWrap": { + "category": "Common", + "type": "choice", + "default": "preserve", + "description": "How to wrap object literals.", + "choices": [{ + "value": "preserve", + "description": "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + "value": "collapse", + "description": "Fit to a single line when possible." + }] + }, + "singleQuote": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Use single quotes instead of double quotes." + }, + "proseWrap": { + "category": "Common", + "type": "choice", + "default": "preserve", + "description": "How to wrap prose.", + "choices": [ + { + "value": "always", + "description": "Wrap prose if it exceeds the print width." + }, + { + "value": "never", + "description": "Do not wrap prose." + }, + { + "value": "preserve", + "description": "Wrap prose as-is." + } + ] + }, + "bracketSameLine": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Put > of opening tags on the last line instead of on a new line." + }, + "singleAttributePerLine": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Enforce single attribute per line in HTML, Vue and JSX." + } + }; + options_default = { singleQuote: common_options_evaluate_default.singleQuote }; + languages_evaluate_default2 = [{ + "name": "GraphQL", + "type": "data", + "aceMode": "graphqlschema", + "extensions": [ + ".graphql", + ".gql", + ".graphqls" + ], + "tmScope": "source.graphql", + "parsers": ["graphql"], + "vscodeLanguageIds": ["graphql"], + "linguistLanguageId": 139 + }]; + options_default2 = { bracketSpacing: common_options_evaluate_default.bracketSpacing }; + languages_evaluate_default3 = [{ + "name": "Handlebars", + "type": "markup", + "aceMode": "handlebars", + "extensions": [".handlebars", ".hbs"], + "tmScope": "text.html.handlebars", + "aliases": ["hbs", "htmlbars"], + "parsers": ["glimmer"], + "vscodeLanguageIds": ["handlebars"], + "linguistLanguageId": 155 + }]; + languages_evaluate_default4 = [ + { + "name": "Angular", + "type": "markup", + "aceMode": "html", + "extensions": [".component.html"], + "tmScope": "text.html.basic", + "aliases": ["xhtml"], + "codemirrorMode": "htmlmixed", + "codemirrorMimeType": "text/html", + "parsers": ["angular"], + "vscodeLanguageIds": ["html"], + "filenames": [], + "linguistLanguageId": 146 + }, + { + "name": "HTML", + "type": "markup", + "aceMode": "html", + "extensions": [ + ".html", + ".hta", + ".htm", + ".html.hl", + ".inc", + ".xht", + ".xhtml" + ], + "tmScope": "text.html.basic", + "aliases": ["xhtml"], + "codemirrorMode": "htmlmixed", + "codemirrorMimeType": "text/html", + "parsers": ["html"], + "vscodeLanguageIds": ["html"], + "linguistLanguageId": 146 + }, + { + "name": "Lightning Web Components", + "type": "markup", + "aceMode": "html", + "extensions": [], + "tmScope": "text.html.basic", + "aliases": ["xhtml"], + "codemirrorMode": "htmlmixed", + "codemirrorMimeType": "text/html", + "parsers": ["lwc"], + "vscodeLanguageIds": ["html"], + "filenames": [], + "linguistLanguageId": 146 + }, + { + "name": "MJML", + "type": "markup", + "aceMode": "html", + "extensions": [".mjml"], + "tmScope": "text.mjml.basic", + "aliases": ["MJML", "mjml"], + "codemirrorMode": "htmlmixed", + "codemirrorMimeType": "text/html", + "parsers": ["mjml"], + "filenames": [], + "vscodeLanguageIds": ["mjml"], + "linguistLanguageId": 146 + }, + { + "name": "Vue", + "type": "markup", + "aceMode": "vue", + "extensions": [".vue"], + "tmScope": "source.vue", + "codemirrorMode": "vue", + "codemirrorMimeType": "text/x-vue", + "parsers": ["vue"], + "vscodeLanguageIds": ["vue"], + "linguistLanguageId": 391 + } + ]; + CATEGORY_HTML = "HTML"; + options_default3 = { + bracketSameLine: common_options_evaluate_default.bracketSameLine, + htmlWhitespaceSensitivity: { + category: CATEGORY_HTML, + type: "choice", + default: "css", + description: "How to handle whitespaces in HTML.", + choices: [ + { + value: "css", + description: "Respect the default value of CSS display property." + }, + { + value: "strict", + description: "Whitespaces are considered sensitive." + }, + { + value: "ignore", + description: "Whitespaces are considered insensitive." + } + ] + }, + singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine, + vueIndentScriptAndStyle: { + category: CATEGORY_HTML, + type: "boolean", + default: false, + description: "Indent script and style tags in Vue files." + } + }; + languages_evaluate_default5 = [ + { + "name": "JavaScript", + "type": "programming", + "aceMode": "javascript", + "extensions": [ + ".js", + "._js", + ".bones", + ".cjs", + ".es", + ".es6", + ".gs", + ".jake", + ".javascript", + ".jsb", + ".jscad", + ".jsfl", + ".jslib", + ".jsm", + ".jspre", + ".jss", + ".mjs", + ".njs", + ".pac", + ".sjs", + ".ssjs", + ".xsjs", + ".xsjslib", + ".start.frag", + ".end.frag", + ".wxs" + ], + "filenames": [ + "Jakefile", + "start.frag", + "end.frag" + ], + "tmScope": "source.js", + "aliases": ["js", "node"], + "codemirrorMode": "javascript", + "codemirrorMimeType": "text/javascript", + "interpreters": [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell", + "zx" + ], + "parsers": [ + "babel", + "acorn", + "espree", + "meriyah", + "babel-flow", + "babel-ts", + "flow", + "typescript" + ], + "vscodeLanguageIds": ["javascript", "mongo"], + "linguistLanguageId": 183 + }, + { + "name": "Flow", + "type": "programming", + "aceMode": "javascript", + "extensions": [".js.flow"], + "filenames": [], + "tmScope": "source.js", + "aliases": [], + "codemirrorMode": "javascript", + "codemirrorMimeType": "text/javascript", + "interpreters": [ + "chakra", + "d8", + "gjs", + "js", + "node", + "nodejs", + "qjs", + "rhino", + "v8", + "v8-shell" + ], + "parsers": ["flow", "babel-flow"], + "vscodeLanguageIds": ["javascript"], + "linguistLanguageId": 183 + }, + { + "name": "JSX", + "type": "programming", + "aceMode": "javascript", + "extensions": [".jsx"], + "filenames": void 0, + "tmScope": "source.js.jsx", + "aliases": void 0, + "codemirrorMode": "jsx", + "codemirrorMimeType": "text/jsx", + "interpreters": void 0, + "parsers": [ + "babel", + "babel-flow", + "babel-ts", + "flow", + "typescript", + "espree", + "meriyah" + ], + "vscodeLanguageIds": ["javascriptreact"], + "group": "JavaScript", + "linguistLanguageId": 183 + }, + { + "name": "TypeScript", + "type": "programming", + "aceMode": "typescript", + "extensions": [ + ".ts", + ".cts", + ".mts" + ], + "tmScope": "source.ts", + "aliases": ["ts"], + "codemirrorMode": "javascript", + "codemirrorMimeType": "application/typescript", + "interpreters": [ + "bun", + "deno", + "ts-node", + "tsx" + ], + "parsers": ["typescript", "babel-ts"], + "vscodeLanguageIds": ["typescript"], + "linguistLanguageId": 378 + }, + { + "name": "TSX", + "type": "programming", + "aceMode": "tsx", + "extensions": [".tsx"], + "tmScope": "source.tsx", + "codemirrorMode": "jsx", + "codemirrorMimeType": "text/typescript-jsx", + "group": "TypeScript", + "parsers": ["typescript", "babel-ts"], + "vscodeLanguageIds": ["typescriptreact"], + "linguistLanguageId": 94901924 + } + ]; + CATEGORY_JAVASCRIPT = "JavaScript"; + options_default4 = { + arrowParens: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "always", + description: "Include parentheses around a sole arrow function parameter.", + choices: [{ + value: "always", + description: "Always include parens. Example: `(x) => x`" + }, { + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + }] + }, + bracketSameLine: common_options_evaluate_default.bracketSameLine, + objectWrap: common_options_evaluate_default.objectWrap, + bracketSpacing: common_options_evaluate_default.bracketSpacing, + jsxBracketSameLine: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + description: "Put > on the last line instead of at a new line.", + deprecated: "2.4.0" + }, + semi: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + experimentalOperatorPosition: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "end", + description: "Where to print operators when binary expressions wrap lines.", + choices: [{ + value: "start", + description: "Print operators at the start of new lines." + }, { + value: "end", + description: "Print operators at the end of previous lines." + }] + }, + experimentalTernaries: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use curious ternaries, with the question mark after the condition.", + oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." + }, + singleQuote: common_options_evaluate_default.singleQuote, + jsxSingleQuote: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes in JSX." + }, + quoteProps: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "as-needed", + description: "Change when properties in objects are quoted.", + choices: [ + { + value: "as-needed", + description: "Only add quotes around object properties where required." + }, + { + value: "consistent", + description: "If at least one property in an object requires quotes, quote all properties." + }, + { + value: "preserve", + description: "Respect the input use of quotes in object properties." + } + ] + }, + trailingComma: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "all", + description: "Print trailing commas wherever possible when multi-line.", + choices: [ + { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, + { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, + { + value: "none", + description: "No trailing commas." + } + ] + }, + singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine + }; + languages_evaluate_default6 = [ + { + "name": "JSON.stringify", + "type": "data", + "aceMode": "json", + "extensions": [".importmap"], + "filenames": [ + "package.json", + "package-lock.json", + "composer.json" + ], + "tmScope": "source.json", + "aliases": [ + "geojson", + "jsonl", + "sarif", + "topojson" + ], + "codemirrorMode": "javascript", + "codemirrorMimeType": "application/json", + "parsers": ["json-stringify"], + "vscodeLanguageIds": ["json"], + "linguistLanguageId": 174 + }, + { + "name": "JSON", + "type": "data", + "aceMode": "json", + "extensions": [ + ".json", + ".4DForm", + ".4DProject", + ".avsc", + ".geojson", + ".gltf", + ".har", + ".ice", + ".JSON-tmLanguage", + ".json.example", + ".mcmeta", + ".sarif", + ".tact", + ".tfstate", + ".tfstate.backup", + ".topojson", + ".webapp", + ".webmanifest", + ".yy", + ".yyp" + ], + "filenames": [ + ".all-contributorsrc", + ".arcconfig", + ".auto-changelog", + ".c8rc", + ".htmlhintrc", + ".imgbotconfig", + ".nycrc", + ".tern-config", + ".tern-project", + ".watchmanconfig", + ".babelrc", + ".jscsrc", + ".jshintrc", + ".jslintrc", + ".swcrc" + ], + "tmScope": "source.json", + "aliases": [ + "geojson", + "jsonl", + "sarif", + "topojson" + ], + "codemirrorMode": "javascript", + "codemirrorMimeType": "application/json", + "parsers": ["json"], + "vscodeLanguageIds": ["json"], + "linguistLanguageId": 174 + }, + { + "name": "JSON with Comments", + "type": "data", + "aceMode": "javascript", + "extensions": [ + ".jsonc", + ".code-snippets", + ".code-workspace", + ".sublime-build", + ".sublime-color-scheme", + ".sublime-commands", + ".sublime-completions", + ".sublime-keymap", + ".sublime-macro", + ".sublime-menu", + ".sublime-mousemap", + ".sublime-project", + ".sublime-settings", + ".sublime-theme", + ".sublime-workspace", + ".sublime_metrics", + ".sublime_session" + ], + "filenames": [], + "tmScope": "source.json.comments", + "aliases": ["jsonc"], + "codemirrorMode": "javascript", + "codemirrorMimeType": "text/javascript", + "group": "JSON", + "parsers": ["jsonc"], + "vscodeLanguageIds": ["jsonc"], + "linguistLanguageId": 423 + }, + { + "name": "JSON5", + "type": "data", + "aceMode": "json5", + "extensions": [".json5"], + "tmScope": "source.js", + "codemirrorMode": "javascript", + "codemirrorMimeType": "application/json", + "parsers": ["json5"], + "vscodeLanguageIds": ["json5"], + "linguistLanguageId": 175 + } + ]; + languages_evaluate_default7 = [{ + "name": "Markdown", + "type": "prose", + "aceMode": "markdown", + "extensions": [ + ".md", + ".livemd", + ".markdown", + ".mdown", + ".mdwn", + ".mkd", + ".mkdn", + ".mkdown", + ".ronn", + ".scd", + ".workbook" + ], + "filenames": ["contents.lr", "README"], + "tmScope": "text.md", + "aliases": ["md", "pandoc"], + "codemirrorMode": "gfm", + "codemirrorMimeType": "text/x-gfm", + "wrap": true, + "parsers": ["markdown"], + "vscodeLanguageIds": ["markdown"], + "linguistLanguageId": 222 + }, { + "name": "MDX", + "type": "prose", + "aceMode": "markdown", + "extensions": [".mdx"], + "filenames": [], + "tmScope": "text.md", + "aliases": ["md", "pandoc"], + "codemirrorMode": "gfm", + "codemirrorMimeType": "text/x-gfm", + "wrap": true, + "parsers": ["mdx"], + "vscodeLanguageIds": ["mdx"], + "linguistLanguageId": 222 + }]; + options_default5 = { + proseWrap: common_options_evaluate_default.proseWrap, + singleQuote: common_options_evaluate_default.singleQuote + }; + languages_evaluate_default8 = [{ + "name": "YAML", + "type": "data", + "aceMode": "yaml", + "extensions": [ + ".yml", + ".mir", + ".reek", + ".rviz", + ".sublime-syntax", + ".syntax", + ".yaml", + ".yaml-tmlanguage", + ".yaml.sed", + ".yml.mysql" + ], + "filenames": [ + ".clang-format", + ".clang-tidy", + ".clangd", + ".gemrc", + "CITATION.cff", + "glide.lock", + "pixi.lock", + ".prettierrc", + ".stylelintrc", + ".lintstagedrc" + ], + "tmScope": "source.yaml", + "aliases": ["yml"], + "codemirrorMode": "yaml", + "codemirrorMimeType": "text/x-yaml", + "parsers": ["yaml"], + "vscodeLanguageIds": [ + "yaml", + "ansible", + "dockercompose", + "github-actions-workflow", + "home-assistant" + ], + "linguistLanguageId": 407 + }]; + options_default6 = { + bracketSpacing: common_options_evaluate_default.bracketSpacing, + singleQuote: common_options_evaluate_default.singleQuote, + proseWrap: common_options_evaluate_default.proseWrap + }; + estreePlugin = createParsersAndPrinters([{ + importPlugin: () => import("./estree-D3wK6kDg.js"), + printers: ["estree", "estree-json"] + }]); + options7 = { + ...options_default, + ...options_default2, + ...options_default3, + ...options_default4, + ...options_default5, + ...options_default6 + }; + languages = [ + ...languages_evaluate_default, + ...languages_evaluate_default2, + ...languages_evaluate_default3, + ...languages_evaluate_default4, + ...languages_evaluate_default5, + ...languages_evaluate_default6, + ...languages_evaluate_default7, + ...languages_evaluate_default8 + ]; + ({parsers, printers} = createParsersAndPrinters([ + { + importPlugin: () => import("./acorn-Lo8hV0QE.js"), + parsers: ["acorn", "espree"] + }, + { + importPlugin: () => import("./angular-BDq8CpSH.js"), + parsers: [ + "__ng_action", + "__ng_binding", + "__ng_interpolation", + "__ng_directive" + ] + }, + { + importPlugin: () => import("./babel-CZV-nXip.js"), + parsers: [ + "babel", + "babel-flow", + "babel-ts", + "__js_expression", + "__ts_expression", + "__vue_expression", + "__vue_ts_expression", + "__vue_event_binding", + "__vue_ts_event_binding", + "__babel_estree", + "json", + "json5", + "jsonc", + "json-stringify" + ] + }, + { + importPlugin: () => import("./flow-DKIme0c4.js"), + parsers: ["flow"] + }, + { + importPlugin: () => import("./glimmer-C2CSmn_t.js"), + parsers: ["glimmer"], + printers: ["glimmer"] + }, + { + importPlugin: () => import("./graphql-DMUfcyR9.js"), + parsers: ["graphql"], + printers: ["graphql"] + }, + { + importPlugin: () => import("./html-CGnTnh3H.js"), + parsers: [ + "html", + "angular", + "vue", + "lwc", + "mjml" + ], + printers: ["html"] + }, + { + importPlugin: () => import("./markdown-CujGU574.js"), + parsers: [ + "markdown", + "mdx", + "remark" + ], + printers: ["mdast"] + }, + { + importPlugin: () => import("./meriyah-UhC-PINz.js"), + parsers: ["meriyah"] + }, + { + importPlugin: () => import("./postcss-CFOfUTlp.js"), + parsers: [ + "css", + "less", + "scss" + ], + printers: ["postcss"] + }, + { + importPlugin: () => import("./typescript-DMmyaOpv.js"), + parsers: ["typescript"] + }, + { + importPlugin: () => import("./yaml-EkSMxulB.js"), + parsers: ["yaml"], + printers: ["yaml"] + } + ])); + builtin_plugins_proxy_default = [estreePlugin, { + options: options7, + languages, + parsers, + printers + }]; + load_builtin_plugins_default = loadBuiltinPlugins; + import_from_directory_default = importFromDirectory; + cache2 = /* @__PURE__ */ new Map(); + load_plugins_default = loadPlugins; + import_ignore = __toESM(require_ignore(), 1); + slash = path10.sep === "\\" ? (filePath) => method_replace_all_default(0, filePath, "\\", "/") : (filePath) => filePath; + object_omit_default = omit; + get_file_info_default = getFileInfo; + version_evaluate_default = "3.8.4"; + public_exports = {}; + __export(public_exports, { + addDanglingComment: () => addDanglingComment, + addLeadingComment: () => addLeadingComment, + addTrailingComment: () => addTrailingComment, + getAlignmentSize: () => get_alignment_size_default, + getIndentSize: () => get_indent_size_default, + getMaxContinuousCount: () => get_max_continuous_count_default, + getNextNonSpaceNonCommentCharacter: () => get_next_non_space_non_comment_character_default, + getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2, + getPreferredQuote: () => get_preferred_quote_default, + getStringWidth: () => get_string_width_default, + hasNewline: () => has_newline_default, + hasNewlineInRange: () => has_newline_in_range_default, + hasSpaces: () => has_spaces_default, + isNextLineEmpty: () => isNextLineEmpty2, + isNextLineEmptyAfterIndex: () => is_next_line_empty_default, + isPreviousLineEmpty: () => isPreviousLineEmpty2, + makeString: () => makeString, + skip: () => skip, + skipEverythingButNewLine: () => skipEverythingButNewLine, + skipInlineComment: () => skip_inline_comment_default, + skipNewline: () => skip_newline_default, + skipSpaces: () => skipSpaces, + skipToLineEnd: () => skipToLineEnd, + skipTrailingComment: () => skip_trailing_comment_default, + skipWhitespace: () => skipWhitespace + }); + skip_inline_comment_default = skipInlineComment; + skip_trailing_comment_default = skipTrailingComment; + get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex; + is_next_line_empty_default = isNextLineEmpty; + get_indent_size_default = getIndentSize; + get_max_continuous_count_default = getMaxContinuousCount; + get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; + SINGLE_QUOTE = "'"; + DOUBLE_QUOTE = "\""; + SINGLE_QUOTE_DATA = Object.freeze({ + character: SINGLE_QUOTE, + codePoint: 39 + }); + DOUBLE_QUOTE_DATA = Object.freeze({ + character: DOUBLE_QUOTE, + codePoint: 34 + }); + SINGLE_QUOTE_SETTINGS = Object.freeze({ + preferred: SINGLE_QUOTE_DATA, + alternate: DOUBLE_QUOTE_DATA + }); + DOUBLE_QUOTE_SETTINGS = Object.freeze({ + preferred: DOUBLE_QUOTE_DATA, + alternate: SINGLE_QUOTE_DATA + }); + get_preferred_quote_default = getPreferredQuote; + has_newline_in_range_default = hasNewlineInRange; + has_spaces_default = hasSpaces; + formatWithCursor2 = withPlugins(formatWithCursor); + getSupportInfo2 = withPlugins(getSupportInfo, 0); + inferParser2 = withPlugins((file, options8) => infer_parser_default(options8, { physicalFile: file })); + sharedWithCli = { + errors: errors_exports, + optionCategories: option_categories_exports, + createIsIgnoredFunction, + formatOptionsHiddenDefaults, + normalizeOptions: normalize_options_default, + getSupportInfoWithoutPlugins: getSupportInfo, + normalizeOptionSettings, + inferParser: (file, options8) => Promise.resolve(options8?.parser ?? inferParser2(file, options8)), + vnopts: { + ChoiceSchema, + apiDescriptor + }, + fastGlob: import_fast_glob.default, + createTwoFilesPatch, + picocolors: import_picocolors5.default, + closetLevenshteinMatch: closestMatch, + utilities: { + omit: object_omit_default, + createMockable: create_mockable_default + } + }; + debugApis = { + parse: withPlugins(parse6), + formatAST: withPlugins(formatAst), + formatDoc: withPlugins(formatDoc), + printToDoc: withPlugins(printToDoc), + printDocToString: withPlugins(printDocToString), + mockable + }; +}))(); +export { debugApis as __debug, sharedWithCli as __internal, check, clearCache3 as clearConfigCache, index_exports as default, doc_exports as doc, format2 as format, formatWithCursor2 as formatWithCursor, get_file_info_default as getFileInfo, getSupportInfo2 as getSupportInfo, resolveConfig, resolveConfigFile, public_exports as util, version_evaluate_default as version }; diff --git a/.github/actions/check-public-api/dist/rolldown-runtime-aR1ZRE-I.js b/.github/actions/check-public-api/dist/rolldown-runtime-aR1ZRE-I.js new file mode 100644 index 0000000000..0237d97e6b --- /dev/null +++ b/.github/actions/check-public-api/dist/rolldown-runtime-aR1ZRE-I.js @@ -0,0 +1,44 @@ +import { createRequire } from "node:module"; +//#region \0rolldown/runtime.js +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esmMin = (fn, res, err) => () => { + if (err) throw err[0]; + try { + return fn && (res = fn(fn = 0)), res; + } catch (e) { + throw err = [e], e; + } +}; +var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true +}) : target, mod)); +var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +export { __commonJSMin, __esmMin, __exportAll, __require, __toCommonJS, __toESM }; diff --git a/.github/actions/check-public-api/dist/typescript-DMmyaOpv.js b/.github/actions/check-public-api/dist/typescript-DMmyaOpv.js new file mode 100644 index 0000000000..1da921885a --- /dev/null +++ b/.github/actions/check-public-api/dist/typescript-DMmyaOpv.js @@ -0,0 +1,22899 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/typescript.mjs +function e_(e) { + return e !== void 0 ? e.length : 0; +} +function jn(e, t) { + if (e !== void 0) for (let a = 0; a < e.length; a++) { + let _ = t(e[a], a); + if (_) return _; + } +} +function sy(e, t) { + if (e !== void 0) for (let a = 0; a < e.length; a++) { + let _ = t(e[a], a); + if (_ !== void 0) return _; + } +} +function yd(e, t, a) { + let _ = []; + q.assertEqual(e.length, t.length); + for (let f = 0; f < e.length; f++) _.push(a(e[f], t[f], f)); + return _; +} +function Gp(e, t) { + if (e !== void 0) { + for (let a = 0; a < e.length; a++) if (!t(e[a], a)) return !1; + } + return !0; +} +function bm(e, t, a) { + if (e !== void 0) for (let _ = a ?? 0; _ < e.length; _++) { + let f = e[_]; + if (t(f, _)) return f; + } +} +function gp(e, t, a) { + if (e === void 0) return -1; + for (let _ = a ?? 0; _ < e.length; _++) if (t(e[_], _)) return _; + return -1; +} +function _y(e, t, a = Xp) { + if (e !== void 0) { + for (let _ = 0; _ < e.length; _++) if (a(e[_], t)) return !0; + } + return !1; +} +function Hr(e, t) { + if (e !== void 0) { + let a = e.length, _ = 0; + for (; _ < a && t(e[_]);) _++; + if (_ < a) { + let f = e.slice(0, _); + for (_++; _ < a;) { + let h = e[_]; + t(h) && f.push(h), _++; + } + return f; + } + } + return e; +} +function Pp(e, t) { + let a; + if (e !== void 0) { + a = []; + for (let _ = 0; _ < e.length; _++) a.push(t(e[_], _)); + } + return a; +} +function vm(e) { + let t = []; + for (let a = 0; a < e.length; a++) { + let _ = e[a]; + _ && ($r(_) ? En(t, _) : t.push(_)); + } + return t; +} +function Tm(e, t) { + let a; + if (e !== void 0) for (let _ = 0; _ < e.length; _++) { + let f = t(e[_], _); + f && ($r(f) ? a = En(a, f) : a = wn(a, f)); + } + return a ?? vt; +} +function oy(e, t) { + let a; + if (e !== void 0) for (let _ = 0; _ < e.length; _++) { + let f = e[_], h = t(f, _); + (a || f !== h || $r(h)) && (a || (a = e.slice(0, _)), $r(h) ? En(a, h) : a.push(h)); + } + return a ?? e; +} +function cy(e, t) { + let a = []; + if (e !== void 0) for (let _ = 0; _ < e.length; _++) { + let f = t(e[_], _); + f !== void 0 && a.push(f); + } + return a; +} +function Zt(e, t) { + if (e !== void 0) if (t !== void 0) { + for (let a = 0; a < e.length; a++) if (t(e[a])) return !0; + } else return e.length > 0; + return !1; +} +function Yp(e, t) { + return t === void 0 || t.length === 0 ? e : e === void 0 || e.length === 0 ? t : [...e, ...t]; +} +function ly(e, t, a = Xp) { + if (e === void 0 || t === void 0) return e === t; + if (e.length !== t.length) return !1; + for (let _ = 0; _ < e.length; _++) if (!a(e[_], t[_], _)) return !1; + return !0; +} +function wn(e, t) { + return t === void 0 ? e : e === void 0 ? [t] : (e.push(t), e); +} +function Np(e, t) { + return t < 0 ? e.length + t : t; +} +function En(e, t, a, _) { + if (t === void 0 || t.length === 0) return e; + if (e === void 0) return t.slice(a, _); + a = a === void 0 ? 0 : Np(t, a), _ = _ === void 0 ? t.length : Np(t, _); + for (let f = a; f < _ && f < t.length; f++) t[f] !== void 0 && e.push(t[f]); + return e; +} +function uy(e, t, a) { + return _y(e, t, a) ? !1 : (e.push(t), !0); +} +function py(e, t, a) { + return e !== void 0 ? (uy(e, t, a), e) : [t]; +} +function fy(e, t) { + return e.length === 0 ? vt : e.slice().sort(t); +} +function Hp(e) { + return e === void 0 || e.length === 0 ? void 0 : e[0]; +} +function Ba(e) { + return e === void 0 || e.length === 0 ? void 0 : e[e.length - 1]; +} +function dy(e) { + return q.assert(e.length !== 0), e[e.length - 1]; +} +function my(e) { + return e !== void 0 && e.length === 1 ? e[0] : void 0; +} +function hy(e, t, a, _, f) { + return yy(e, a(t), a, _, f); +} +function yy(e, t, a, _, f) { + if (!Zt(e)) return -1; + let h = f ?? 0, T = e.length - 1; + for (; h <= T;) { + let k = h + (T - h >> 1); + switch (_(a(e[k], k), t)) { + case -1: + h = k + 1; + break; + case 0: return k; + case 1: + T = k - 1; + break; + } + } + return ~h; +} +function gy(e, t, a, _, f) { + if (e && e.length > 0) { + let h = e.length; + if (h > 0) { + let T = _ === void 0 || _ < 0 ? 0 : _, k = f === void 0 || T + f > h - 1 ? h - 1 : T + f, c; + for (arguments.length <= 2 ? (c = e[T], T++) : c = a; T <= k;) c = t(c, e[T], T), T++; + return c; + } + } + return a; +} +function Dr(e, t) { + return xm.call(e, t); +} +function by(e) { + let t = []; + for (let a in e) xm.call(e, a) && t.push(a); + return t; +} +function vy() { + let e = /* @__PURE__ */ new Map(); + return e.add = Ty, e.remove = xy, e; +} +function Ty(e, t) { + let a = this.get(e); + return a !== void 0 ? a.push(t) : this.set(e, a = [t]), a; +} +function xy(e, t) { + let a = this.get(e); + a !== void 0 && (Ny(a, t), a.length || this.delete(e)); +} +function $r(e) { + return Array.isArray(e); +} +function bp(e) { + return $r(e) ? e : [e]; +} +function Sy(e, t) { + return e !== void 0 && t(e) ? e : void 0; +} +function Er(e, t) { + return e !== void 0 && t(e) ? e : q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(t)}'.`); +} +function Va(e) {} +function wy() { + return !0; +} +function bt(e) { + return e; +} +function gd(e) { + let t; + return () => (e && (t = e(), e = void 0), t); +} +function Kn(e) { + let t = /* @__PURE__ */ new Map(); + return (a) => { + let _ = `${typeof a}:${a}`, f = t.get(_); + return f === void 0 && !t.has(_) && (f = e(a), t.set(_, f)), f; + }; +} +function Xp(e, t) { + return e === t; +} +function $p(e, t) { + return e === t || e !== void 0 && t !== void 0 && e.toUpperCase() === t.toUpperCase(); +} +function ky(e, t) { + return Xp(e, t); +} +function Ey(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : e < t ? -1 : 1; +} +function Sm(e, t) { + return Ey(e, t); +} +function Ay(e, t, a) { + for (let _ = 0; _ < e.length; _++) t = Math.max(t, a(e[_])); + return t; +} +function t_(e, t, a) { + let _ = Math.max(2, Math.floor(e.length * .34)), f = Math.floor(e.length * .4) + 1, h; + for (let T of t) { + let k = a(T); + if (k !== void 0 && Math.abs(k.length - e.length) <= _) { + if (k === e || k.length < 3 && k.toLowerCase() !== e.toLowerCase()) continue; + let c = Cy(e, k, f - .1); + if (c === void 0) continue; + q.assert(c < f), f = c, h = T; + } + } + return h; +} +function Cy(e, t, a) { + let _ = new Array(t.length + 1), f = new Array(t.length + 1), h = a + .01; + for (let k = 0; k <= t.length; k++) _[k] = k; + for (let k = 1; k <= e.length; k++) { + let c = e.charCodeAt(k - 1), W = Math.ceil(k > a ? k - a : 1), y = Math.floor(t.length > a + k ? a + k : t.length); + f[0] = k; + let G = k; + for (let D = 1; D < W; D++) f[D] = h; + for (let D = W; D <= y; D++) { + let R = e[k - 1].toLowerCase() === t[D - 1].toLowerCase() ? _[D - 1] + .1 : _[D - 1] + 2, ue = c === t.charCodeAt(D - 1) ? _[D - 1] : Math.min(_[D] + 1, f[D - 1] + 1, R); + f[D] = ue, G = Math.min(G, ue); + } + for (let D = y + 1; D <= t.length; D++) f[D] = h; + if (G > a) return; + let E = _; + _ = f, f = E; + } + let T = _[t.length]; + return T > a ? void 0 : T; +} +function Dy(e, t, a) { + let _ = e.length - t.length; + return _ >= 0 && (a ? $p(e.slice(_), t) : e.indexOf(t, _) === _); +} +function Py(e, t) { + e[t] = e[e.length - 1], e.pop(); +} +function Ny(e, t) { + return Iy(e, (a) => a === t); +} +function Iy(e, t) { + for (let a = 0; a < e.length; a++) if (t(e[a])) return Py(e, a), !0; + return !1; +} +function ml(e, t, a) { + return a ? $p(e.slice(0, t.length), t) : e.lastIndexOf(t, 0) === 0; +} +function Ip(e) { + return e === void 0 ? void 0 : [e]; +} +function Jy(e) { + return e === 47 || e === 92; +} +function jy(e, t) { + return e.length > t.length && Dy(e, t); +} +function ef(e) { + return e.length > 0 && Jy(e.charCodeAt(e.length - 1)); +} +function Td(e) { + return e >= 97 && e <= 122 || e >= 65 && e <= 90; +} +function Ry(e, t) { + let a = e.charCodeAt(t); + if (a === 58) return t + 1; + if (a === 37 && e.charCodeAt(t + 1) === 51) { + let _ = e.charCodeAt(t + 2); + if (_ === 97 || _ === 65) return t + 3; + } + return -1; +} +function Uy(e) { + if (!e) return 0; + let t = e.charCodeAt(0); + if (t === 47 || t === 92) { + if (e.charCodeAt(1) !== t) return 1; + let _ = e.indexOf(t === 47 ? Xr : My, 2); + return _ < 0 ? e.length : _ + 1; + } + if (Td(t) && e.charCodeAt(1) === 58) { + let _ = e.charCodeAt(2); + if (_ === 47 || _ === 92) return 3; + if (e.length === 2) return 2; + } + let a = e.indexOf(vd); + if (a !== -1) { + let _ = a + vd.length, f = e.indexOf(Xr, _); + if (f !== -1) { + let h = e.slice(0, a), T = e.slice(_, f); + if (h === "file" && (T === "" || T === "localhost") && Td(e.charCodeAt(f + 1))) { + let k = Ry(e, f + 2); + if (k !== -1) { + if (e.charCodeAt(k) === 47) return ~(k + 1); + if (k === e.length) return ~k; + } + } + return ~(f + 1); + } + return ~e.length; + } + return 0; +} +function o_(e) { + let t = Uy(e); + return t < 0 ? ~t : t; +} +function Nm(e, t, a) { + if (e = c_(e), o_(e) === e.length) return ""; + e = hl(e); + let f = e.slice(Math.max(o_(e), e.lastIndexOf(Xr) + 1)), h = t !== void 0 && a !== void 0 ? Im(f, t, a) : void 0; + return h ? f.slice(0, f.length - h.length) : f; +} +function xd(e, t, a) { + if (ml(t, ".") || (t = "." + t), e.length >= t.length && e.charCodeAt(e.length - t.length) === 46) { + let _ = e.slice(e.length - t.length); + if (a(_, t)) return _; + } +} +function By(e, t, a) { + if (typeof t == "string") return xd(e, t, a) || ""; + for (let _ of t) { + let f = xd(e, _, a); + if (f) return f; + } + return ""; +} +function Im(e, t, a) { + if (t) return By(hl(e), t, a ? $p : ky); + let _ = Nm(e), f = _.lastIndexOf("."); + return f >= 0 ? _.substring(f) : ""; +} +function c_(e) { + return e.includes("\\") ? e.replace(Ly, Xr) : e; +} +function qy(e, ...t) { + e && (e = c_(e)); + for (let a of t) a && (a = c_(a), !e || o_(a) !== 0 ? e = a : e = Mm(e) + a); + return e; +} +function Fy(e, t) { + let a = o_(e); + a === 0 && t ? (e = qy(t, e), a = o_(e)) : e = c_(e); + let _ = Om(e); + if (_ !== void 0) return _.length > a ? hl(_) : _; + let f = e.length, h = e.substring(0, a), T, k = a, c = k, W = k, y = a !== 0; + for (; k < f;) { + c = k; + let G = e.charCodeAt(k); + for (; G === 47 && k + 1 < f;) k++, G = e.charCodeAt(k); + k > c && (T ?? (T = e.substring(0, c - 1)), c = k); + let E = e.indexOf(Xr, k + 1); + E === -1 && (E = f); + let D = E - c; + if (D === 1 && e.charCodeAt(k) === 46) T ?? (T = e.substring(0, W)); + else if (D === 2 && e.charCodeAt(k) === 46 && e.charCodeAt(k + 1) === 46) if (!y) T !== void 0 ? T += T.length === a ? ".." : "/.." : W = k + 2; + else if (T === void 0) W - 2 >= 0 ? T = e.substring(0, Math.max(a, e.lastIndexOf(Xr, W - 2))) : T = e.substring(0, W); + else { + let R = T.lastIndexOf(Xr); + R !== -1 ? T = T.substring(0, Math.max(a, R)) : T = h, T.length === a && (y = a !== 0); + } + else T !== void 0 ? (T.length !== a && (T += Xr), y = !0, T += e.substring(c, E)) : (y = !0, W = E); + k = E + 1; + } + return T ?? (f > a ? hl(e) : e); +} +function zy(e) { + e = c_(e); + let t = Om(e); + return t !== void 0 ? t : (t = Fy(e, ""), t && ef(e) ? Mm(t) : t); +} +function Om(e) { + if (!Sd.test(e)) return e; + let t = e.replace(/\/\.\//g, "/"); + if (t.startsWith("./") && (t = t.slice(2)), t !== e && (e = t, !Sd.test(e))) return e; +} +function hl(e) { + return ef(e) ? e.substr(0, e.length - 1) : e; +} +function Mm(e) { + return ef(e) ? e : e + Xr; +} +function r(e, t, a, _, f, h, T) { + return { + code: e, + category: t, + key: a, + message: _, + reportsUnnecessary: f, + elidedInCompatabilityPyramid: h, + reportsDeprecated: T + }; +} +function St(e) { + return e >= 80; +} +function Vy(e) { + return e === 32 || St(e); +} +function yl(e, t) { + if (e < t[0]) return !1; + let a = 0, _ = t.length, f; + for (; a + 1 < _;) { + if (f = a + (_ - a) / 2, f -= f % 2, t[f] <= e && e <= t[f + 1]) return !0; + e < t[f] ? _ = f : a = f + 2; + } + return !1; +} +function eg(e, t) { + return t >= 2 ? yl(e, Xy) : yl(e, Yy); +} +function tg(e, t) { + return t >= 2 ? yl(e, $y) : yl(e, Hy); +} +function jm(e) { + let t = []; + return e.forEach((a, _) => { + t[a] = _; + }), t; +} +function nt(e) { + return ng[e]; +} +function Rm(e) { + return Lm.get(e); +} +function wd(e) { + return Jm.get(e); +} +function Um(e) { + let t = [], a = 0, _ = 0; + for (; a < e.length;) { + let f = e.charCodeAt(a); + switch (a++, f) { + case 13: e.charCodeAt(a) === 10 && a++; + case 10: + t.push(_), _ = a; + break; + default: + f > 127 && kn(f) && (t.push(_), _ = a); + break; + } + } + return t.push(_), t; +} +function rg(e, t, a, _, f) { + (t < 0 || t >= e.length) && (f ? t = t < 0 ? 0 : t >= e.length ? e.length - 1 : t : q.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${_ !== void 0 ? ly(e, Um(_)) : "unknown"}`)); + let h = e[t] + a; + return f ? h > e[t + 1] ? e[t + 1] : typeof _ == "string" && h > _.length ? _.length : h : (t < e.length - 1 ? q.assert(h < e[t + 1]) : _ !== void 0 && q.assert(h <= _.length), h); +} +function Mp(e) { + return e.lineMap || (e.lineMap = Um(e.text)); +} +function ig(e, t) { + let a = ag(e, t); + return { + line: a, + character: t - e[a] + }; +} +function ag(e, t, a) { + let _ = hy(e, t, bt, Sm, a); + return _ < 0 && (_ = ~_ - 1, q.assert(_ !== -1, "position cannot precede the beginning of the file")), _; +} +function Bm(e, t) { + return ig(Mp(e), t); +} +function qa(e) { + return n_(e) || kn(e); +} +function n_(e) { + return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e === 133 || e === 5760 || e >= 8192 && e <= 8203 || e === 8239 || e === 8287 || e === 12288 || e === 65279; +} +function kn(e) { + return e === 10 || e === 13 || e === 8232 || e === 8233; +} +function fi(e) { + return e >= 48 && e <= 57; +} +function vp(e) { + return fi(e) || e >= 65 && e <= 70 || e >= 97 && e <= 102; +} +function nf(e) { + return e >= 65 && e <= 90 || e >= 97 && e <= 122; +} +function qm(e) { + return nf(e) || fi(e) || e === 95; +} +function Tp(e) { + return e >= 48 && e <= 55; +} +function Cr(e, t, a, _, f) { + if (d_(t)) return t; + let h = !1; + for (;;) { + let T = e.charCodeAt(t); + switch (T) { + case 13: e.charCodeAt(t + 1) === 10 && t++; + case 10: + if (t++, a) return t; + h = !!f; + continue; + case 9: + case 11: + case 12: + case 32: + t++; + continue; + case 47: + if (_) break; + if (e.charCodeAt(t + 1) === 47) { + for (t += 2; t < e.length && !kn(e.charCodeAt(t));) t++; + h = !1; + continue; + } + if (e.charCodeAt(t + 1) === 42) { + for (t += 2; t < e.length;) { + if (e.charCodeAt(t) === 42 && e.charCodeAt(t + 1) === 47) { + t += 2; + break; + } + t++; + } + h = !1; + continue; + } + break; + case 60: + case 124: + case 61: + case 62: + if ($i(e, t)) { + t = Ma(e, t), h = !1; + continue; + } + break; + case 35: + if (t === 0 && Fm(e, t)) { + t = zm(e, t), h = !1; + continue; + } + break; + case 42: + if (h) { + t++, h = !1; + continue; + } + break; + default: + if (T > 127 && qa(T)) { + t++; + continue; + } + break; + } + return t; + } +} +function $i(e, t) { + if (q.assert(t >= 0), t === 0 || kn(e.charCodeAt(t - 1))) { + let a = e.charCodeAt(t); + if (t + ul < e.length) { + for (let _ = 0; _ < ul; _++) if (e.charCodeAt(t + _) !== a) return !1; + return a === 61 || e.charCodeAt(t + ul) === 32; + } + } + return !1; +} +function Ma(e, t, a) { + a && a(A.Merge_conflict_marker_encountered, t, ul); + let _ = e.charCodeAt(t), f = e.length; + if (_ === 60 || _ === 62) for (; t < f && !kn(e.charCodeAt(t));) t++; + else for (q.assert(_ === 124 || _ === 61); t < f;) { + let h = e.charCodeAt(t); + if ((h === 61 || h === 62) && h !== _ && $i(e, t)) break; + t++; + } + return t; +} +function Fm(e, t) { + return q.assert(t === 0), rf.test(e); +} +function zm(e, t) { + let a = rf.exec(e)[0]; + return t = t + a.length, t; +} +function kl(e, t, a, _, f, h, T) { + let k, c, W, y, G = !1, E = _, D = T; + if (a === 0) { + E = !0; + let R = af(t); + R && (a = R.length); + } + e: for (; a >= 0 && a < t.length;) { + let R = t.charCodeAt(a); + switch (R) { + case 13: t.charCodeAt(a + 1) === 10 && a++; + case 10: + if (a++, _) break e; + E = !0, G && (y = !0); + continue; + case 9: + case 11: + case 12: + case 32: + a++; + continue; + case 47: + let ue = t.charCodeAt(a + 1), be = !1; + if (ue === 47 || ue === 42) { + let he = ue === 47 ? 2 : 3, de = a; + if (a += 2, ue === 47) for (; a < t.length;) { + if (kn(t.charCodeAt(a))) { + be = !0; + break; + } + a++; + } + else for (; a < t.length;) { + if (t.charCodeAt(a) === 42 && t.charCodeAt(a + 1) === 47) { + a += 2; + break; + } + a++; + } + if (E) { + if (G && (D = f(k, c, W, y, h, D), !e && D)) return D; + k = de, c = a, W = he, y = be, G = !0; + } + continue; + } + break e; + default: + if (R > 127 && qa(R)) { + G && kn(R) && (y = !0), a++; + continue; + } + break e; + } + } + return G && (D = f(k, c, W, y, h, D)), D; +} +function Vm(e, t, a, _) { + return kl(!1, e, t, !1, a, _); +} +function Wm(e, t, a, _) { + return kl(!1, e, t, !0, a, _); +} +function sg(e, t, a, _, f) { + return kl(!0, e, t, !1, a, _, f); +} +function _g(e, t, a, _, f) { + return kl(!0, e, t, !0, a, _, f); +} +function Gm(e, t, a, _, f, h = []) { + return h.push({ + kind: a, + pos: e, + end: t, + hasTrailingNewLine: _ + }), h; +} +function Lp(e, t) { + return sg(e, t, Gm, void 0, void 0); +} +function og(e, t) { + return _g(e, t, Gm, void 0, void 0); +} +function af(e) { + let t = rf.exec(e); + if (t) return t[0]; +} +function Zn(e, t) { + return nf(e) || e === 36 || e === 95 || e > 127 && eg(e, t); +} +function Ar(e, t, a) { + return qm(e) || e === 36 || (a === 1 ? e === 45 || e === 58 : !1) || e > 127 && tg(e, t); +} +function cg(e, t, a) { + let _ = Qi(e, 0); + if (!Zn(_, t)) return !1; + for (let f = Vt(_); f < e.length; f += Vt(_)) if (!Ar(_ = Qi(e, f), t, a)) return !1; + return !0; +} +function sf(e, t, a = 0, _, f, h, T) { + var k = _, c, W, y, G, E, D, R, ue, be = 0, he = 0, de = 0; + Ct(k, h, T); + var O = { + getTokenFullStart: () => y, + getStartPos: () => y, + getTokenEnd: () => c, + getTextPos: () => c, + getToken: () => E, + getTokenStart: () => G, + getTokenPos: () => G, + getTokenText: () => k.substring(G, c), + getTokenValue: () => D, + hasUnicodeEscape: () => (R & 1024) !== 0, + hasExtendedUnicodeEscape: () => (R & 8) !== 0, + hasPrecedingLineBreak: () => (R & 1) !== 0, + hasPrecedingJSDocComment: () => (R & 2) !== 0, + hasPrecedingJSDocLeadingAsterisks: () => (R & 32768) !== 0, + isIdentifier: () => E === 80 || E > 118, + isReservedWord: () => E >= 83 && E <= 118, + isUnterminated: () => (R & 4) !== 0, + getCommentDirectives: () => ue, + getNumericLiteralFlags: () => R & 25584, + getTokenFlags: () => R, + reScanGreaterToken: ct, + reScanAsteriskEqualsToken: ar, + reScanSlashToken: dt, + reScanTemplateToken: qt, + reScanTemplateHeadOrNoSubstitutionTemplate: tn, + scanJsxIdentifier: Or, + scanJsxAttributeValue: Vn, + reScanJsxAttributeValue: Ce, + reScanJsxToken: sr, + reScanLessThanToken: mr, + reScanHashToken: hr, + reScanQuestionToken: Fn, + reScanInvalidIdentifier: Bt, + scanJsxToken: zn, + scanJsDocToken: L, + scanJSDocCommentTextToken: yr, + scan: ot, + getText: Qe, + clearCommentDirectives: st, + setText: Ct, + setScriptTarget: lt, + setLanguageVariant: Mr, + setScriptKind: gr, + setJSDocParsingMode: Nn, + setOnError: Tt, + resetTokenState: Wn, + setTextPos: Wn, + setSkipJsDocLeadingAsterisks: wi, + tryScan: He, + lookAhead: Te, + scanRange: fe + }; + return q.isDebugging && Object.defineProperty(O, "__debugShowCurrentPositionInText", { get: () => { + let U = O.getText(); + return U.slice(0, O.getTokenFullStart()) + "║" + U.slice(O.getTokenFullStart()); + } }), O; + function ae(U) { + return Qi(k, U); + } + function Oe(U) { + return U >= 0 && U < W ? ae(U) : -1; + } + function V(U) { + return k.charCodeAt(U); + } + function oe(U) { + return U >= 0 && U < W ? V(U) : -1; + } + function Y(U, K = c, Z, xe) { + if (f) { + let Se = c; + c = K, f(U, Z || 0, xe), c = Se; + } + } + function ft() { + let U = c, K = !1, Z = !1, xe = ""; + for (;;) { + let Se = V(c); + if (Se === 95) { + R |= 512, K ? (K = !1, Z = !0, xe += k.substring(U, c)) : (R |= 16384, Y(Z ? A.Multiple_consecutive_numeric_separators_are_not_permitted : A.Numeric_separators_are_not_allowed_here, c, 1)), c++, U = c; + continue; + } + if (fi(Se)) { + K = !0, Z = !1, c++; + continue; + } + break; + } + return V(c - 1) === 95 && (R |= 16384, Y(A.Numeric_separators_are_not_allowed_here, c - 1, 1)), xe + k.substring(U, c); + } + function nr() { + let U = c, K; + if (V(c) === 48) if (c++, V(c) === 95) R |= 16896, Y(A.Numeric_separators_are_not_allowed_here, c, 1), c--, K = ft(); + else if (!rr()) R |= 8192, K = "" + +D; + else if (!D) K = "0"; + else { + D = "" + parseInt(D, 8), R |= 32; + let me = E === 41, Ve = (me ? "-" : "") + "0o" + (+D).toString(8); + return me && U--, Y(A.Octal_literals_are_not_allowed_Use_the_syntax_0, U, c - U, Ve), 9; + } + else K = ft(); + let Z, xe; + V(c) === 46 && (c++, Z = ft()); + let Se = c; + if (V(c) === 69 || V(c) === 101) { + c++, R |= 16, (V(c) === 43 || V(c) === 45) && c++; + let me = c, Ve = ft(); + Ve ? (xe = k.substring(Se, me) + Ve, Se = c) : Y(A.Digit_expected); + } + let we; + if (R & 512 ? (we = K, Z && (we += "." + Z), xe && (we += xe)) : we = k.substring(U, Se), R & 8192) return Y(A.Decimals_with_leading_zeros_are_not_allowed, U, Se - U), D = "" + +we, 9; + if (Z !== void 0 || R & 16) return mn(U, Z === void 0 && !!(R & 16)), D = "" + +we, 9; + { + D = we; + let me = $t(); + return mn(U), me; + } + } + function mn(U, K) { + if (!Zn(ae(c), e)) return; + let Z = c, { length: xe } = ht(); + xe === 1 && k[Z] === "n" ? Y(K ? A.A_bigint_literal_cannot_use_exponential_notation : A.A_bigint_literal_must_be_an_integer, U, Z - U + 1) : (Y(A.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, Z, xe), c = Z); + } + function rr() { + let U = c, K = !0; + for (; fi(oe(c));) Tp(V(c)) || (K = !1), c++; + return D = k.substring(U, c), K; + } + function hn(U, K) { + let Z = We(U, !1, K); + return Z ? parseInt(Z, 16) : -1; + } + function Dn(U, K) { + return We(U, !0, K); + } + function We(U, K, Z) { + let xe = [], Se = !1, we = !1; + for (; xe.length < U || K;) { + let me = V(c); + if (Z && me === 95) { + R |= 512, Se ? (Se = !1, we = !0) : Y(we ? A.Multiple_consecutive_numeric_separators_are_not_permitted : A.Numeric_separators_are_not_allowed_here, c, 1), c++; + continue; + } + if (Se = Z, me >= 65 && me <= 70) me += 32; + else if (!(me >= 48 && me <= 57 || me >= 97 && me <= 102)) break; + xe.push(me), c++, we = !1; + } + return xe.length < U && (xe = []), V(c - 1) === 95 && Y(A.Numeric_separators_are_not_allowed_here, c - 1, 1), String.fromCharCode(...xe); + } + function ir(U = !1) { + let K = V(c); + c++; + let Z = "", xe = c; + for (;;) { + if (c >= W) { + Z += k.substring(xe, c), R |= 4, Y(A.Unterminated_string_literal); + break; + } + let Se = V(c); + if (Se === K) { + Z += k.substring(xe, c), c++; + break; + } + if (Se === 92 && !U) { + Z += k.substring(xe, c), Z += Ot(3), xe = c; + continue; + } + if ((Se === 10 || Se === 13) && !U) { + Z += k.substring(xe, c), R |= 4, Y(A.Unterminated_string_literal); + break; + } + c++; + } + return Z; + } + function Ir(U) { + let K = V(c) === 96; + c++; + let Z = c, xe = "", Se; + for (;;) { + if (c >= W) { + xe += k.substring(Z, c), R |= 4, Y(A.Unterminated_template_literal), Se = K ? 15 : 18; + break; + } + let we = V(c); + if (we === 96) { + xe += k.substring(Z, c), c++, Se = K ? 15 : 18; + break; + } + if (we === 36 && c + 1 < W && V(c + 1) === 123) { + xe += k.substring(Z, c), c += 2, Se = K ? 16 : 17; + break; + } + if (we === 92) { + xe += k.substring(Z, c), xe += Ot(1 | (U ? 2 : 0)), Z = c; + continue; + } + if (we === 13) { + xe += k.substring(Z, c), c++, c < W && V(c) === 10 && c++, xe += ` +`, Z = c; + continue; + } + c++; + } + return q.assert(Se !== void 0), D = xe, Se; + } + function Ot(U) { + let K = c; + if (c++, c >= W) return Y(A.Unexpected_end_of_text), ""; + let Z = V(c); + switch (c++, Z) { + case 48: if (c >= W || !fi(V(c))) return "\0"; + case 49: + case 50: + case 51: c < W && Tp(V(c)) && c++; + case 52: + case 53: + case 54: + case 55: + if (c < W && Tp(V(c)) && c++, R |= 2048, U & 6) { + let we = parseInt(k.substring(K + 1, c), 8); + return U & 4 && !(U & 32) && Z !== 48 ? Y(A.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead, K, c - K, "\\x" + we.toString(16).padStart(2, "0")) : Y(A.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, K, c - K, "\\x" + we.toString(16).padStart(2, "0")), String.fromCharCode(we); + } + return k.substring(K, c); + case 56: + case 57: return R |= 2048, U & 6 ? (U & 4 && !(U & 32) ? Y(A.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class, K, c - K) : Y(A.Escape_sequence_0_is_not_allowed, K, c - K, k.substring(K, c)), String.fromCharCode(Z)) : k.substring(K, c); + case 98: return "\b"; + case 116: return " "; + case 110: return ` +`; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 39: return "'"; + case 34: return "\""; + case 117: + if (c < W && V(c) === 123) { + c -= 2; + let we = Bn(!!(U & 6)); + return U & 17 || (R |= 2048, U & 6 && Y(A.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, K, c - K)), we; + } + for (; c < K + 6; c++) if (!(c < W && vp(V(c)))) return R |= 2048, U & 6 && Y(A.Hexadecimal_digit_expected), k.substring(K, c); + R |= 1024; + let xe = parseInt(k.substring(K + 2, c), 16), Se = String.fromCharCode(xe); + if (U & 16 && xe >= 55296 && xe <= 56319 && c + 6 < W && k.substring(c, c + 2) === "\\u" && V(c + 2) !== 123) { + let we = c, me = c + 2; + for (; me < we + 6; me++) if (!vp(V(me))) return Se; + let Ve = parseInt(k.substring(we + 2, me), 16); + if (Ve >= 56320 && Ve <= 57343) return c = me, Se + String.fromCharCode(Ve); + } + return Se; + case 120: + for (; c < K + 4; c++) if (!(c < W && vp(V(c)))) return R |= 2048, U & 6 && Y(A.Hexadecimal_digit_expected), k.substring(K, c); + return R |= 4096, String.fromCharCode(parseInt(k.substring(K + 2, c), 16)); + case 13: c < W && V(c) === 10 && c++; + case 10: + case 8232: + case 8233: return ""; + default: return (U & 16 || U & 4 && !(U & 8) && Ar(Z, e)) && Y(A.This_character_cannot_be_escaped_in_a_regular_expression, c - 2, 2), String.fromCharCode(Z); + } + } + function Bn(U) { + let K = c; + c += 3; + let Z = c, xe = Dn(1, !1), Se = xe ? parseInt(xe, 16) : -1, we = !1; + return Se < 0 ? (U && Y(A.Hexadecimal_digit_expected), we = !0) : Se > 1114111 && (U && Y(A.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, Z, c - Z), we = !0), c >= W ? (U && Y(A.Unexpected_end_of_text), we = !0) : V(c) === 125 ? c++ : (U && Y(A.Unterminated_Unicode_escape_sequence), we = !0), we ? (R |= 2048, k.substring(K, c)) : (R |= 8, kd(Se)); + } + function Pn() { + if (c + 5 < W && V(c + 1) === 117) { + let U = c; + c += 2; + let K = hn(4, !1); + return c = U, K; + } + return -1; + } + function Mt() { + if (ae(c + 1) === 117 && ae(c + 2) === 123) { + let U = c; + c += 3; + let K = Dn(1, !1), Z = K ? parseInt(K, 16) : -1; + return c = U, Z; + } + return -1; + } + function ht() { + let U = "", K = c; + for (; c < W;) { + let Z = ae(c); + if (Ar(Z, e)) c += Vt(Z); + else if (Z === 92) { + if (Z = Mt(), Z >= 0 && Ar(Z, e)) { + U += Bn(!0), K = c; + continue; + } + if (Z = Pn(), !(Z >= 0 && Ar(Z, e))) break; + R |= 1024, U += k.substring(K, c), U += kd(Z), c += 6, K = c; + } else break; + } + return U += k.substring(K, c), U; + } + function $e() { + let U = D.length; + if (U >= 2 && U <= 12) { + let K = D.charCodeAt(0); + if (K >= 97 && K <= 122) { + let Z = Wy.get(D); + if (Z !== void 0) return E = Z; + } + } + return E = 80; + } + function qn(U) { + let K = "", Z = !1, xe = !1; + for (;;) { + let Se = V(c); + if (Se === 95) { + R |= 512, Z ? (Z = !1, xe = !0) : Y(xe ? A.Multiple_consecutive_numeric_separators_are_not_permitted : A.Numeric_separators_are_not_allowed_here, c, 1), c++; + continue; + } + if (Z = !0, !fi(Se) || Se - 48 >= U) break; + K += k[c], c++, xe = !1; + } + return V(c - 1) === 95 && Y(A.Numeric_separators_are_not_allowed_here, c - 1, 1), K; + } + function $t() { + return V(c) === 110 ? (D += "n", R & 384 && (D = vb(D) + "n"), c++, 10) : (D = "" + (R & 128 ? parseInt(D.slice(2), 2) : R & 256 ? parseInt(D.slice(2), 8) : +D), 9); + } + function ot() { + for (y = c, R = 0;;) { + if (G = c, c >= W) return E = 1; + let U = ae(c); + if (c === 0 && U === 35 && Fm(k, c)) { + if (c = zm(k, c), t) continue; + return E = 6; + } + switch (U) { + case 10: + case 13: if (R |= 1, t) { + c++; + continue; + } else return U === 13 && c + 1 < W && V(c + 1) === 10 ? c += 2 : c++, E = 4; + case 9: + case 11: + case 12: + case 32: + case 160: + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8203: + case 8239: + case 8287: + case 12288: + case 65279: if (t) { + c++; + continue; + } else { + for (; c < W && n_(V(c));) c++; + return E = 5; + } + case 33: return V(c + 1) === 61 ? V(c + 2) === 61 ? (c += 3, E = 38) : (c += 2, E = 36) : (c++, E = 54); + case 34: + case 39: return D = ir(), E = 11; + case 96: return E = Ir(!1); + case 37: return V(c + 1) === 61 ? (c += 2, E = 70) : (c++, E = 45); + case 38: return V(c + 1) === 38 ? V(c + 2) === 61 ? (c += 3, E = 77) : (c += 2, E = 56) : V(c + 1) === 61 ? (c += 2, E = 74) : (c++, E = 51); + case 40: return c++, E = 21; + case 41: return c++, E = 22; + case 42: + if (V(c + 1) === 61) return c += 2, E = 67; + if (V(c + 1) === 42) return V(c + 2) === 61 ? (c += 3, E = 68) : (c += 2, E = 43); + if (c++, be && (R & 32768) === 0 && R & 1) { + R |= 32768; + continue; + } + return E = 42; + case 43: return V(c + 1) === 43 ? (c += 2, E = 46) : V(c + 1) === 61 ? (c += 2, E = 65) : (c++, E = 40); + case 44: return c++, E = 28; + case 45: return V(c + 1) === 45 ? (c += 2, E = 47) : V(c + 1) === 61 ? (c += 2, E = 66) : (c++, E = 41); + case 46: return fi(V(c + 1)) ? (nr(), E = 9) : V(c + 1) === 46 && V(c + 2) === 46 ? (c += 3, E = 26) : (c++, E = 25); + case 47: + if (V(c + 1) === 47) { + for (c += 2; c < W && !kn(V(c));) c++; + if (ue = _n(ue, k.slice(G, c), Qy, G), t) continue; + return E = 2; + } + if (V(c + 1) === 42) { + c += 2; + let me = V(c) === 42 && V(c + 1) !== 47, Ve = !1, Ze = G; + for (; c < W;) { + let Ye = V(c); + if (Ye === 42 && V(c + 1) === 47) { + c += 2, Ve = !0; + break; + } + c++, kn(Ye) && (Ze = c, R |= 1); + } + if (me && at() && (R |= 2), ue = _n(ue, k.slice(Ze, c), Ky, Ze), Ve || Y(A.Asterisk_Slash_expected), t) continue; + return Ve || (R |= 4), E = 3; + } + return V(c + 1) === 61 ? (c += 2, E = 69) : (c++, E = 44); + case 48: + if (c + 2 < W && (V(c + 1) === 88 || V(c + 1) === 120)) return c += 2, D = Dn(1, !0), D || (Y(A.Hexadecimal_digit_expected), D = "0"), D = "0x" + D, R |= 64, E = $t(); + if (c + 2 < W && (V(c + 1) === 66 || V(c + 1) === 98)) return c += 2, D = qn(2), D || (Y(A.Binary_digit_expected), D = "0"), D = "0b" + D, R |= 128, E = $t(); + if (c + 2 < W && (V(c + 1) === 79 || V(c + 1) === 111)) return c += 2, D = qn(8), D || (Y(A.Octal_digit_expected), D = "0"), D = "0o" + D, R |= 256, E = $t(); + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: return E = nr(); + case 58: return c++, E = 59; + case 59: return c++, E = 27; + case 60: + if ($i(k, c)) { + if (c = Ma(k, c, Y), t) continue; + return E = 7; + } + return V(c + 1) === 60 ? V(c + 2) === 61 ? (c += 3, E = 71) : (c += 2, E = 48) : V(c + 1) === 61 ? (c += 2, E = 33) : a === 1 && V(c + 1) === 47 && V(c + 2) !== 42 ? (c += 2, E = 31) : (c++, E = 30); + case 61: + if ($i(k, c)) { + if (c = Ma(k, c, Y), t) continue; + return E = 7; + } + return V(c + 1) === 61 ? V(c + 2) === 61 ? (c += 3, E = 37) : (c += 2, E = 35) : V(c + 1) === 62 ? (c += 2, E = 39) : (c++, E = 64); + case 62: + if ($i(k, c)) { + if (c = Ma(k, c, Y), t) continue; + return E = 7; + } + return c++, E = 32; + case 63: return V(c + 1) === 46 && !fi(V(c + 2)) ? (c += 2, E = 29) : V(c + 1) === 63 ? V(c + 2) === 61 ? (c += 3, E = 78) : (c += 2, E = 61) : (c++, E = 58); + case 91: return c++, E = 23; + case 93: return c++, E = 24; + case 94: return V(c + 1) === 61 ? (c += 2, E = 79) : (c++, E = 53); + case 123: return c++, E = 19; + case 124: + if ($i(k, c)) { + if (c = Ma(k, c, Y), t) continue; + return E = 7; + } + return V(c + 1) === 124 ? V(c + 2) === 61 ? (c += 3, E = 76) : (c += 2, E = 57) : V(c + 1) === 61 ? (c += 2, E = 75) : (c++, E = 52); + case 125: return c++, E = 20; + case 126: return c++, E = 55; + case 64: return c++, E = 60; + case 92: + let K = Mt(); + if (K >= 0 && Zn(K, e)) return D = Bn(!0) + ht(), E = $e(); + let Z = Pn(); + return Z >= 0 && Zn(Z, e) ? (c += 6, R |= 1024, D = String.fromCharCode(Z) + ht(), E = $e()) : (Y(A.Invalid_character), c++, E = 0); + case 35: + if (c !== 0 && k[c + 1] === "!") return Y(A.can_only_be_used_at_the_start_of_a_file, c, 2), c++, E = 0; + let xe = ae(c + 1); + if (xe === 92) { + c++; + let me = Mt(); + if (me >= 0 && Zn(me, e)) return D = "#" + Bn(!0) + ht(), E = 81; + let Ve = Pn(); + if (Ve >= 0 && Zn(Ve, e)) return c += 6, R |= 1024, D = "#" + String.fromCharCode(Ve) + ht(), E = 81; + c--; + } + return Zn(xe, e) ? (c++, Lt(xe, e)) : (D = "#", Y(A.Invalid_character, c++, Vt(U))), E = 81; + case 65533: return Y(A.File_appears_to_be_binary, 0, 0), c = W, E = 8; + default: + let Se = Lt(U, e); + if (Se) return E = Se; + if (n_(U)) { + c += Vt(U); + continue; + } else if (kn(U)) { + R |= 1, c += Vt(U); + continue; + } + let we = Vt(U); + return Y(A.Invalid_character, c, we), c += we, E = 0; + } + } + } + function at() { + switch (de) { + case 0: return !0; + case 1: return !1; + } + return he !== 3 && he !== 4 ? !0 : de === 3 ? !1 : Zy.test(k.slice(y, c)); + } + function Bt() { + q.assert(E === 0, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."), c = G = y, R = 0; + let U = ae(c), K = Lt(U, 99); + return K ? E = K : (c += Vt(U), E); + } + function Lt(U, K) { + let Z = U; + if (Zn(Z, K)) { + for (c += Vt(Z); c < W && Ar(Z = ae(c), K);) c += Vt(Z); + return D = k.substring(G, c), Z === 92 && (D += ht()), $e(); + } + } + function ct() { + if (E === 32) { + if (V(c) === 62) return V(c + 1) === 62 ? V(c + 2) === 61 ? (c += 3, E = 73) : (c += 2, E = 50) : V(c + 1) === 61 ? (c += 2, E = 72) : (c++, E = 49); + if (V(c) === 61) return c++, E = 34; + } + return E; + } + function ar() { + return q.assert(E === 67, "'reScanAsteriskEqualsToken' should only be called on a '*='"), c = G + 1, E = 64; + } + function dt(U) { + if (E === 44 || E === 69) { + let K = G + 1; + c = K; + let Z = !1, xe = !1, Se = !1; + for (;;) { + let me = oe(c); + if (me === -1 || kn(me)) { + R |= 4; + break; + } + if (Z) Z = !1; + else { + if (me === 47 && !Se) break; + me === 91 ? Se = !0 : me === 92 ? Z = !0 : me === 93 ? Se = !1 : !Se && me === 40 && oe(c + 1) === 63 && oe(c + 2) === 60 && oe(c + 3) !== 61 && oe(c + 3) !== 33 && (xe = !0); + } + c++; + } + let we = c; + if (R & 4) { + c = K, Z = !1; + let me = 0, Ve = !1, Ze = 0; + for (; c < we;) { + let Ye = V(c); + if (Z) Z = !1; + else if (Ye === 92) Z = !0; + else if (Ye === 91) me++; + else if (Ye === 93 && me) me--; + else if (!me) { + if (Ye === 123) Ve = !0; + else if (Ye === 125 && Ve) Ve = !1; + else if (!Ve) { + if (Ye === 40) Ze++; + else if (Ye === 41 && Ze) Ze--; + else if (Ye === 41 || Ye === 93 || Ye === 125) break; + } + } + c++; + } + for (; qa(oe(c - 1)) || oe(c - 1) === 59;) c--; + Y(A.Unterminated_regular_expression_literal, G, c - G); + } else { + c++; + let me = 0; + for (;;) { + let Ve = Oe(c); + if (Ve === -1 || !Ar(Ve, e)) break; + let Ze = Vt(Ve); + if (U) { + let Ye = wd(Ve); + Ye === void 0 ? Y(A.Unknown_regular_expression_flag, c, Ze) : me & Ye ? Y(A.Duplicate_regular_expression_flag, c, Ze) : ((me | Ye) & 96) === 96 ? Y(A.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, c, Ze) : (me |= Ye, yt(Ye, Ze)); + } + c += Ze; + } + U && fe(K, we - K, () => { + yn(me, !0, xe); + }); + } + D = k.substring(G, c), E = 14; + } + return E; + } + function yn(U, K, Z) { + var xe = !!(U & 64), Se = !!(U & 96), we = Se || !K, me = !1, Ve = 0, Ze, Ye, Ee, gn = [], rt; + function on(H) { + for (;;) { + if (gn.push(rt), rt = void 0, Zr(H), rt = gn.pop(), oe(c) !== 124) return; + c++; + } + } + function Zr(H) { + let le = !1; + for (;;) { + let qe = c, ve = oe(c); + switch (ve) { + case -1: return; + case 94: + case 36: + c++, le = !1; + break; + case 92: + switch (c++, oe(c)) { + case 98: + case 66: + c++, le = !1; + break; + default: + Ue(), le = !0; + break; + } + break; + case 40: + if (c++, oe(c) === 63) switch (c++, oe(c)) { + case 61: + case 33: + c++, le = !we; + break; + case 60: + let xt = c; + switch (c++, oe(c)) { + case 61: + case 33: + c++, le = !1; + break; + default: + Me(!1), cn(62), e < 5 && Y(A.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, xt, c - xt), Ve++, le = !0; + break; + } + break; + default: + let Jt = c, ln = M(0); + oe(c) === 45 && (c++, M(ln), c === Jt + 1 && Y(A.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, Jt, c - Jt)), cn(58), le = !0; + break; + } + else Ve++, le = !0; + on(!0), cn(41); + break; + case 123: + c++; + let J = c; + rr(); + let mt = D; + if (!we && !mt) { + le = !0; + break; + } + if (oe(c) === 44) { + c++, rr(); + let xt = D; + if (mt) xt && Number.parseInt(mt) > Number.parseInt(xt) && (we || oe(c) === 125) && Y(A.Numbers_out_of_order_in_quantifier, J, c - J); + else if (xt || oe(c) === 125) Y(A.Incomplete_quantifier_Digit_expected, J, 0); + else { + Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, qe, 1, String.fromCharCode(ve)), le = !0; + break; + } + } else if (!mt) { + we && Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, qe, 1, String.fromCharCode(ve)), le = !0; + break; + } + if (oe(c) !== 125) if (we) Y(A._0_expected, c, 0, "}"), c--; + else { + le = !0; + break; + } + case 42: + case 43: + case 63: + c++, oe(c) === 63 && c++, le || Y(A.There_is_nothing_available_for_repetition, qe, c - qe), le = !1; + break; + case 46: + c++, le = !0; + break; + case 91: + c++, xe ? nn() : Be(), cn(93), le = !0; + break; + case 41: if (H) return; + case 93: + case 125: + (we || ve === 41) && Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c, 1, String.fromCharCode(ve)), c++, le = !0; + break; + case 47: + case 124: return; + default: + ki(), le = !0; + break; + } + } + } + function M(H) { + for (;;) { + let le = Oe(c); + if (le === -1 || !Ar(le, e)) break; + let qe = Vt(le), ve = wd(le); + ve === void 0 ? Y(A.Unknown_regular_expression_flag, c, qe) : H & ve ? Y(A.Duplicate_regular_expression_flag, c, qe) : ve & 28 ? (H |= ve, yt(ve, qe)) : Y(A.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, c, qe), c += qe; + } + return H; + } + function Ue() { + switch (q.assertEqual(V(c - 1), 92), oe(c)) { + case 107: + c++, oe(c) === 60 ? (c++, Me(!0), cn(62)) : (we || Z) && Y(A.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, c - 2, 2); + break; + case 113: if (xe) { + c++, Y(A.q_is_only_available_inside_character_class, c - 2, 2); + break; + } + default: + q.assert(Ft() || u() || Ie(!0)); + break; + } + } + function u() { + q.assertEqual(V(c - 1), 92); + let H = oe(c); + if (H >= 49 && H <= 57) { + let le = c; + return rr(), Ee = wn(Ee, { + pos: le, + end: c, + value: +D + }), !0; + } + return !1; + } + function Ie(H) { + q.assertEqual(V(c - 1), 92); + let le = oe(c); + switch (le) { + case -1: return Y(A.Undetermined_character_escape, c - 1, 1), "\\"; + case 99: + if (c++, le = oe(c), nf(le)) return c++, String.fromCharCode(le & 31); + if (we) Y(A.c_must_be_followed_by_an_ASCII_letter, c - 2, 2); + else if (H) return c--, "\\"; + return String.fromCharCode(le); + case 94: + case 36: + case 47: + case 92: + case 46: + case 42: + case 43: + case 63: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 124: return c++, String.fromCharCode(le); + default: return c--, Ot(4 | (K ? 8 : 0) | (Se ? 16 : 0) | (H ? 32 : 0)); + } + } + function Me(H) { + q.assertEqual(V(c - 1), 60), G = c, Lt(Oe(c), e), c === G ? Y(A.Expected_a_capturing_group_name) : H ? Ye = wn(Ye, { + pos: G, + end: c, + name: D + }) : rt?.has(D) || gn.some((le) => le?.has(D)) ? Y(A.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, G, c - G) : (rt ?? (rt = /* @__PURE__ */ new Set()), rt.add(D), Ze ?? (Ze = /* @__PURE__ */ new Set()), Ze.add(D)); + } + function B(H) { + return H === 93 || H === -1 || c >= W; + } + function Be() { + for (q.assertEqual(V(c - 1), 91), oe(c) === 94 && c++;;) { + if (B(oe(c))) return; + let le = c, qe = Pt(); + if (oe(c) === 45) { + c++; + if (B(oe(c))) return; + !qe && we && Y(A.A_character_class_range_must_not_be_bounded_by_another_character_class, le, c - 1 - le); + let J = c, mt = Pt(); + if (!mt && we) { + Y(A.A_character_class_range_must_not_be_bounded_by_another_character_class, J, c - J); + continue; + } + if (!qe) continue; + let xt = Qi(qe, 0), Jt = Qi(mt, 0); + qe.length === Vt(xt) && mt.length === Vt(Jt) && xt > Jt && Y(A.Range_out_of_order_in_character_class, le, c - le); + } + } + } + function nn() { + q.assertEqual(V(c - 1), 91); + let H = !1; + oe(c) === 94 && (c++, H = !0); + let le = !1, qe = oe(c); + if (B(qe)) return; + let ve = c, J; + switch (k.slice(c, c + 2)) { + case "--": + case "&&": + Y(A.Expected_a_class_set_operand), me = !1; + break; + default: + J = Xe(); + break; + } + switch (oe(c)) { + case 45: + if (oe(c + 1) === 45) { + H && me && Y(A.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, ve, c - ve), le = me, ze(3), me = !H && le; + return; + } + break; + case 38: + if (oe(c + 1) === 38) { + ze(2), H && me && Y(A.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, ve, c - ve), le = me, me = !H && le; + return; + } else Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c, 1, String.fromCharCode(qe)); + break; + default: + H && me && Y(A.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, ve, c - ve), le = me; + break; + } + for (; qe = oe(c), qe !== -1;) { + switch (qe) { + case 45: + if (c++, qe = oe(c), B(qe)) { + me = !H && le; + return; + } + if (qe === 45) { + c++, Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c - 2, 2), ve = c - 2, J = k.slice(ve, c); + continue; + } else { + J || Y(A.A_character_class_range_must_not_be_bounded_by_another_character_class, ve, c - 1 - ve); + let mt = c, xt = Xe(); + if (H && me && Y(A.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, mt, c - mt), le || (le = me), !xt) { + Y(A.A_character_class_range_must_not_be_bounded_by_another_character_class, mt, c - mt); + break; + } + if (!J) break; + let Jt = Qi(J, 0), ln = Qi(xt, 0); + J.length === Vt(Jt) && xt.length === Vt(ln) && Jt > ln && Y(A.Range_out_of_order_in_character_class, ve, c - ve); + } + break; + case 38: + ve = c, c++, oe(c) === 38 ? (c++, Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c - 2, 2), oe(c) === 38 && (Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c, 1, String.fromCharCode(qe)), c++)) : Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c - 1, 1, String.fromCharCode(qe)), J = k.slice(ve, c); + continue; + } + if (B(oe(c))) break; + switch (ve = c, k.slice(c, c + 2)) { + case "--": + case "&&": + Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c, 2), c += 2, J = k.slice(ve, c); + break; + default: + J = Xe(); + break; + } + } + me = !H && le; + } + function ze(H) { + let le = me; + for (;;) { + let qe = oe(c); + if (B(qe)) break; + switch (qe) { + case 45: + c++, oe(c) === 45 ? (c++, H !== 3 && Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c - 2, 2)) : Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c - 1, 1); + break; + case 38: + c++, oe(c) === 38 ? (c++, H !== 2 && Y(A.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, c - 2, 2), oe(c) === 38 && (Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c, 1, String.fromCharCode(qe)), c++)) : Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c - 1, 1, String.fromCharCode(qe)); + break; + default: + switch (H) { + case 3: + Y(A._0_expected, c, 0, "--"); + break; + case 2: + Y(A._0_expected, c, 0, "&&"); + break; + default: break; + } + break; + } + if (qe = oe(c), B(qe)) { + Y(A.Expected_a_class_set_operand); + break; + } + Xe(), le && (le = me); + } + me = le; + } + function Xe() { + switch (me = !1, oe(c)) { + case -1: return ""; + case 91: return c++, nn(), cn(93), ""; + case 92: + if (c++, Ft()) return ""; + if (oe(c) === 113) return c++, oe(c) === 123 ? (c++, Dt(), cn(125), "") : (Y(A.q_must_be_followed_by_string_alternatives_enclosed_in_braces, c - 2, 2), "q"); + c--; + default: return wt(); + } + } + function Dt() { + q.assertEqual(V(c - 1), 123); + let H = 0; + for (;;) switch (oe(c)) { + case -1: return; + case 125: + H !== 1 && (me = !0); + return; + case 124: + H !== 1 && (me = !0), c++, h = c, H = 0; + break; + default: + wt(), H++; + break; + } + } + function wt() { + let H = oe(c); + if (H === -1) return ""; + if (H === 92) { + c++; + let le = oe(c); + switch (le) { + case 98: return c++, "\b"; + case 38: + case 45: + case 33: + case 35: + case 37: + case 44: + case 58: + case 59: + case 60: + case 61: + case 62: + case 64: + case 96: + case 126: return c++, String.fromCharCode(le); + default: return Ie(!1); + } + } else if (H === oe(c + 1)) switch (H) { + case 38: + case 33: + case 35: + case 37: + case 42: + case 43: + case 44: + case 46: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 96: + case 126: return Y(A.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, c, 2), c += 2, k.substring(c - 2, c); + } + switch (H) { + case 47: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 45: + case 124: return Y(A.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, c, 1, String.fromCharCode(H)), c++, String.fromCharCode(H); + } + return ki(); + } + function Pt() { + if (oe(c) === 92) { + c++; + let H = oe(c); + switch (H) { + case 98: return c++, "\b"; + case 45: return c++, String.fromCharCode(H); + default: return Ft() ? "" : Ie(!1); + } + } else return ki(); + } + function Ft() { + q.assertEqual(V(c - 1), 92); + let H = !1, le = c - 1, qe = oe(c); + switch (qe) { + case 100: + case 68: + case 115: + case 83: + case 119: + case 87: return c++, !0; + case 80: H = !0; + case 112: + if (c++, oe(c) === 123) { + c++; + let ve = c, J = Gn(); + if (oe(c) === 61) { + let mt = Ed.get(J); + if (c === ve) Y(A.Expected_a_Unicode_property_name); + else if (mt === void 0) { + Y(A.Unknown_Unicode_property_name, ve, c - ve); + let ln = t_(J, Ed.keys(), bt); + ln && Y(A.Did_you_mean_0, ve, c - ve, ln); + } + c++; + let xt = c, Jt = Gn(); + if (c === xt) Y(A.Expected_a_Unicode_property_value); + else if (mt !== void 0 && !Ra[mt].has(Jt)) { + Y(A.Unknown_Unicode_property_value, xt, c - xt); + let ln = t_(Jt, Ra[mt], bt); + ln && Y(A.Did_you_mean_0, xt, c - xt, ln); + } + } else if (c === ve) Y(A.Expected_a_Unicode_property_name_or_value); + else if (Cd.has(J)) xe ? H ? Y(A.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, ve, c - ve) : me = !0 : Y(A.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, ve, c - ve); + else if (!Ra.General_Category.has(J) && !Ad.has(J)) { + Y(A.Unknown_Unicode_property_name_or_value, ve, c - ve); + let mt = t_(J, [ + ...Ra.General_Category, + ...Ad, + ...Cd + ], bt); + mt && Y(A.Did_you_mean_0, ve, c - ve, mt); + } + cn(125), Se || Y(A.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, le, c - le); + } else if (we) Y(A._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, c - 2, 2, String.fromCharCode(qe)); + else return c--, !1; + return !0; + } + return !1; + } + function Gn() { + let H = ""; + for (;;) { + let le = oe(c); + if (le === -1 || !qm(le)) break; + H += String.fromCharCode(le), c++; + } + return H; + } + function ki() { + let H = Se ? Vt(Oe(c)) : 1; + return c += H, H > 0 ? k.substring(c - H, c) : ""; + } + function cn(H) { + oe(c) === H ? c++ : Y(A._0_expected, c, 0, String.fromCharCode(H)); + } + on(!1), jn(Ye, (H) => { + if (!Ze?.has(H.name) && (Y(A.There_is_no_capturing_group_named_0_in_this_regular_expression, H.pos, H.end - H.pos, H.name), Ze)) { + let le = t_(H.name, Ze, bt); + le && Y(A.Did_you_mean_0, H.pos, H.end - H.pos, le); + } + }), jn(Ee, (H) => { + H.value > Ve && (Ve ? Y(A.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression, H.pos, H.end - H.pos, Ve) : Y(A.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression, H.pos, H.end - H.pos)); + }); + } + function yt(U, K) { + let Z = Gy.get(U); + Z && e < Z && Y(A.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, c, K, ub(Z)); + } + function _n(U, K, Z, xe) { + let Se = tt(K.trimStart(), Z); + return Se === void 0 ? U : wn(U, { + range: { + pos: xe, + end: c + }, + type: Se + }); + } + function tt(U, K) { + let Z = K.exec(U); + if (Z) switch (Z[1]) { + case "ts-expect-error": return 0; + case "ts-ignore": return 1; + } + } + function qt(U) { + return c = G, E = Ir(!U); + } + function tn() { + return c = G, E = Ir(!0); + } + function sr(U = !0) { + return c = G = y, E = zn(U); + } + function mr() { + return E === 48 ? (c = G + 1, E = 30) : E; + } + function hr() { + return E === 81 ? (c = G + 1, E = 63) : E; + } + function Fn() { + return q.assert(E === 61, "'reScanQuestionToken' should only be called on a '??'"), c = G + 1, E = 58; + } + function zn(U = !0) { + if (y = G = c, c >= W) return E = 1; + let K = V(c); + if (K === 60) return V(c + 1) === 47 ? (c += 2, E = 31) : (c++, E = 30); + if (K === 123) return c++, E = 19; + let Z = 0; + for (; c < W && (K = V(c), K !== 123);) { + if (K === 60) { + if ($i(k, c)) return c = Ma(k, c, Y), E = 7; + break; + } + if (K === 62 && Y(A.Unexpected_token_Did_you_mean_or_gt, c, 1), K === 125 && Y(A.Unexpected_token_Did_you_mean_or_rbrace, c, 1), kn(K) && Z === 0) Z = -1; + else { + if (!U && kn(K) && Z > 0) break; + qa(K) || (Z = c); + } + c++; + } + return D = k.substring(y, c), Z === -1 ? 13 : 12; + } + function Or() { + if (St(E)) { + for (; c < W;) { + if (V(c) === 45) { + D += "-", c++; + continue; + } + let K = c; + if (D += ht(), c === K) break; + } + return $e(); + } + return E; + } + function Vn() { + switch (y = c, V(c)) { + case 34: + case 39: return D = ir(!0), E = 11; + default: return ot(); + } + } + function Ce() { + return c = G = y, Vn(); + } + function yr(U) { + if (y = G = c, R = 0, c >= W) return E = 1; + for (let K = V(c); c < W && !kn(K) && K !== 96; K = ae(++c)) if (!U) { + if (K === 123) break; + if (K === 64 && c - 1 >= 0 && n_(V(c - 1)) && !(c + 1 < W && qa(V(c + 1)))) break; + } + return c === G ? L() : (D = k.substring(G, c), E = 82); + } + function L() { + if (y = G = c, R = 0, c >= W) return E = 1; + let U = ae(c); + switch (c += Vt(U), U) { + case 9: + case 11: + case 12: + case 32: + for (; c < W && n_(V(c));) c++; + return E = 5; + case 64: return E = 60; + case 13: V(c) === 10 && c++; + case 10: return R |= 1, E = 4; + case 42: return E = 42; + case 123: return E = 19; + case 125: return E = 20; + case 91: return E = 23; + case 93: return E = 24; + case 40: return E = 21; + case 41: return E = 22; + case 60: return E = 30; + case 62: return E = 32; + case 61: return E = 64; + case 44: return E = 28; + case 46: return E = 25; + case 96: return E = 62; + case 35: return E = 63; + case 92: + c--; + let K = Mt(); + if (K >= 0 && Zn(K, e)) return D = Bn(!0) + ht(), E = $e(); + let Z = Pn(); + return Z >= 0 && Zn(Z, e) ? (c += 6, R |= 1024, D = String.fromCharCode(Z) + ht(), E = $e()) : (c++, E = 0); + } + if (Zn(U, e)) { + let K = U; + for (; c < W && Ar(K = ae(c), e) || K === 45;) c += Vt(K); + return D = k.substring(G, c), K === 92 && (D += ht()), E = $e(); + } else return E = 0; + } + function se(U, K) { + let Z = c, xe = y, Se = G, we = E, me = D, Ve = R, Ze = U(); + return (!Ze || K) && (c = Z, y = xe, G = Se, E = we, D = me, R = Ve), Ze; + } + function fe(U, K, Z) { + let xe = W, Se = c, we = y, me = G, Ve = E, Ze = D, Ye = R, Ee = ue; + Ct(k, U, K); + let gn = Z(); + return W = xe, c = Se, y = we, G = me, E = Ve, D = Ze, R = Ye, ue = Ee, gn; + } + function Te(U) { + return se(U, !0); + } + function He(U) { + return se(U, !1); + } + function Qe() { + return k; + } + function st() { + ue = void 0; + } + function Ct(U, K, Z) { + k = U || "", W = Z === void 0 ? k.length : K + Z, Wn(K || 0); + } + function Tt(U) { + f = U; + } + function lt(U) { + e = U; + } + function Mr(U) { + a = U; + } + function gr(U) { + he = U; + } + function Nn(U) { + de = U; + } + function Wn(U) { + q.assert(U >= 0), c = U, y = U, G = U, E = 0, D = void 0, R = 0; + } + function wi(U) { + be += U ? 1 : -1; + } +} +function Qi(e, t) { + return e.codePointAt(t); +} +function Vt(e) { + return e >= 65536 ? 2 : e === -1 ? 0 : 1; +} +function lg(e) { + if (q.assert(0 <= e && e <= 1114111), e <= 65535) return String.fromCharCode(e); + let t = Math.floor((e - 65536) / 1024) + 55296, a = (e - 65536) % 1024 + 56320; + return String.fromCharCode(t, a); +} +function kd(e) { + return ug(e); +} +function kr(e) { + return e.start + e.length; +} +function pg(e) { + return e.length === 0; +} +function _f(e, t) { + if (e < 0) throw new Error("start < 0"); + if (t < 0) throw new Error("length < 0"); + return { + start: e, + length: t + }; +} +function fg(e, t) { + return _f(e, t - e); +} +function Qs(e) { + return _f(e.span.start, e.newLength); +} +function dg(e) { + return pg(e.span) && e.newLength === 0; +} +function Ym(e, t) { + if (t < 0) throw new Error("newLength < 0"); + return { + span: e, + newLength: t + }; +} +function of(e, t) { + for (; e;) { + let a = t(e); + if (a === "quit") return; + if (a) return e; + e = e.parent; + } +} +function gl(e) { + return (e.flags & 16) === 0; +} +function mg(e, t) { + if (e === void 0 || gl(e)) return e; + for (e = e.original; e;) { + if (gl(e)) return !t || t(e) ? e : void 0; + e = e.original; + } +} +function La(e) { + return e.length >= 2 && e.charCodeAt(0) === 95 && e.charCodeAt(1) === 95 ? "_" + e : e; +} +function l_(e) { + let t = e; + return t.length >= 3 && t.charCodeAt(0) === 95 && t.charCodeAt(1) === 95 && t.charCodeAt(2) === 95 ? t.substr(1) : t; +} +function An(e) { + return l_(e.escapedText); +} +function cf(e) { + let t = Rm(e.escapedText); + return t ? Sy(t, di) : void 0; +} +function Jp(e) { + return e.valueDeclaration && jg(e.valueDeclaration) ? An(e.valueDeclaration.name) : l_(e.escapedName); +} +function Hm(e) { + let t = e.parent.parent; + if (t) { + if (Nd(t)) return rl(t); + switch (t.kind) { + case 244: + if (t.declarationList && t.declarationList.declarations[0]) return rl(t.declarationList.declarations[0]); + break; + case 245: + let a = t.expression; + switch (a.kind === 227 && a.operatorToken.kind === 64 && (a = a.left), a.kind) { + case 212: return a.name; + case 213: + let _ = a.argumentExpression; + if (Ke(_)) return _; + } + break; + case 218: return rl(t.expression); + case 257: + if (Nd(t.statement) || _1(t.statement)) return rl(t.statement); + break; + } + } +} +function rl(e) { + let t = Xm(e); + return t && Ke(t) ? t : void 0; +} +function hg(e) { + return e.name || Hm(e); +} +function yg(e) { + return !!e.name; +} +function lf(e) { + switch (e.kind) { + case 80: return e; + case 349: + case 342: { + let { name: a } = e; + if (a.kind === 167) return a.right; + break; + } + case 214: + case 227: { + let a = e; + switch (yf(a)) { + case 1: + case 4: + case 5: + case 3: return gf(a.left); + case 7: + case 8: + case 9: return a.arguments[1]; + default: return; + } + } + case 347: return hg(e); + case 341: return Hm(e); + case 278: { + let { expression: a } = e; + return Ke(a) ? a : void 0; + } + case 213: + let t = e; + if (d1(t)) return t.argumentExpression; + } + return e.name; +} +function Xm(e) { + if (e !== void 0) return lf(e) || (Mf(e) || Lf(e) || xl(e) ? gg(e) : void 0); +} +function gg(e) { + if (e.parent) { + if (K1(e.parent) || B1(e.parent)) return e.parent.name; + if (na(e.parent) && e === e.parent.right) { + if (Ke(e.parent.left)) return e.parent.left; + if (v1(e.parent.left)) return gf(e.parent.left); + } else if (Jf(e.parent) && Ke(e.parent.name)) return e.parent.name; + } else return; +} +function uf(e) { + if (F2(e)) return Hr(e.modifiers, Cl); +} +function $m(e) { + if (v_(e, 98303)) return Hr(e.modifiers, Bg); +} +function Qm(e, t) { + if (e.name) if (Ke(e.name)) { + let a = e.name.escapedText; + return u_(e.parent, t).filter((_) => zp(_) && Ke(_.name) && _.name.escapedText === a); + } else { + let a = e.parent.parameters.indexOf(e); + q.assert(a > -1, "Parameters should always be in their parents' parameter list"); + let _ = u_(e.parent, t).filter(zp); + if (a < _.length) return [_[a]]; + } + return vt; +} +function bg(e) { + return Qm(e, !1); +} +function vg(e) { + return Qm(e, !0); +} +function Km(e, t) { + let a = e.name.escapedText; + return u_(e.parent, t).filter((_) => ih(_) && _.typeParameters.some((f) => f.name.escapedText === a)); +} +function Tg(e) { + return Km(e, !1); +} +function xg(e) { + return Km(e, !0); +} +function Sg(e) { + return bi(e, a6); +} +function wg(e) { + return Ig(e, d6); +} +function kg(e) { + return bi(e, s6, !0); +} +function Eg(e) { + return bi(e, _6, !0); +} +function Ag(e) { + return bi(e, o6, !0); +} +function Cg(e) { + return bi(e, c6, !0); +} +function Dg(e) { + return bi(e, l6, !0); +} +function Pg(e) { + return bi(e, p6, !0); +} +function Ng(e) { + let t = bi(e, zf); + if (t && t.typeExpression && t.typeExpression.type) return t; +} +function u_(e, t) { + var a; + if (!bf(e)) return vt; + let _ = (a = e.jsDoc) == null ? void 0 : a.jsDocCache; + if (_ === void 0 || t) { + let f = E2(e, t); + q.assert(f.length < 2 || f[0] !== f[1]), _ = Tm(f, (h) => rh(h) ? h.tags : h), t || (e.jsDoc ?? (e.jsDoc = []), e.jsDoc.jsDocCache = _); + } + return _; +} +function Zm(e) { + return u_(e, !1); +} +function bi(e, t, a) { + return bm(u_(e, a), t); +} +function Ig(e, t) { + return Zm(e).filter(t); +} +function jp(e) { + return e.kind === 80 || e.kind === 81; +} +function Og(e) { + return dr(e) && !!(e.flags & 64); +} +function Mg(e) { + return Ha(e) && !!(e.flags & 64); +} +function Dd(e) { + return Of(e) && !!(e.flags & 64); +} +function e1(e) { + let t = e.kind; + return !!(e.flags & 64) && (t === 212 || t === 213 || t === 214 || t === 236); +} +function pf(e) { + return Vf(e, 8); +} +function Lg(e) { + return fl(e) && !!(e.flags & 64); +} +function ff(e) { + return e >= 167; +} +function df(e) { + return e >= 0 && e <= 166; +} +function t1(e) { + return df(e.kind); +} +function mi(e) { + return Dr(e, "pos") && Dr(e, "end"); +} +function Jg(e) { + return 9 <= e && e <= 15; +} +function Pd(e) { + return 15 <= e && e <= 18; +} +function Ua(e) { + var t; + return Ke(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; +} +function n1(e) { + var t; + return gi(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; +} +function jg(e) { + return (Wa(e) || zg(e)) && gi(e.name); +} +function Yr(e) { + switch (e) { + case 128: + case 129: + case 134: + case 87: + case 138: + case 90: + case 95: + case 103: + case 125: + case 123: + case 124: + case 148: + case 126: + case 147: + case 164: return !0; + } + return !1; +} +function Rg(e) { + return !!(g1(e) & 31); +} +function Ug(e) { + return Rg(e) || e === 126 || e === 164 || e === 129; +} +function Bg(e) { + return Yr(e.kind); +} +function r1(e) { + let t = e.kind; + return t === 80 || t === 81 || t === 11 || t === 9 || t === 168; +} +function mf(e) { + return !!e && Fg(e.kind); +} +function qg(e) { + switch (e) { + case 263: + case 175: + case 177: + case 178: + case 179: + case 219: + case 220: return !0; + default: return !1; + } +} +function Fg(e) { + switch (e) { + case 174: + case 180: + case 324: + case 181: + case 182: + case 185: + case 318: + case 186: return !0; + default: return qg(e); + } +} +function ra(e) { + return e && (e.kind === 264 || e.kind === 232); +} +function zg(e) { + switch (e.kind) { + case 175: + case 178: + case 179: return !0; + default: return !1; + } +} +function Vg(e) { + let t = e.kind; + return t === 304 || t === 305 || t === 306 || t === 175 || t === 178 || t === 179; +} +function i1(e) { + return Z2(e.kind); +} +function Wg(e) { + if (e) { + let t = e.kind; + return t === 208 || t === 207; + } + return !1; +} +function Gg(e) { + let t = e.kind; + return t === 210 || t === 211; +} +function Yg(e) { + switch (e.kind) { + case 261: + case 170: + case 209: return !0; + } + return !1; +} +function Fa(e) { + return a1(pf(e).kind); +} +function a1(e) { + switch (e) { + case 212: + case 213: + case 215: + case 214: + case 285: + case 286: + case 289: + case 216: + case 210: + case 218: + case 211: + case 232: + case 219: + case 80: + case 81: + case 14: + case 9: + case 10: + case 11: + case 15: + case 229: + case 97: + case 106: + case 110: + case 112: + case 108: + case 236: + case 234: + case 237: + case 102: + case 283: return !0; + default: return !1; + } +} +function Hg(e) { + return s1(pf(e).kind); +} +function s1(e) { + switch (e) { + case 225: + case 226: + case 221: + case 222: + case 223: + case 224: + case 217: return !0; + default: return a1(e); + } +} +function _1(e) { + return Xg(pf(e).kind); +} +function Xg(e) { + switch (e) { + case 228: + case 230: + case 220: + case 227: + case 231: + case 235: + case 233: + case 357: + case 356: + case 239: return !0; + default: return s1(e); + } +} +function $g(e) { + return e === 220 || e === 209 || e === 264 || e === 232 || e === 176 || e === 177 || e === 267 || e === 307 || e === 282 || e === 263 || e === 219 || e === 178 || e === 274 || e === 272 || e === 277 || e === 265 || e === 292 || e === 175 || e === 174 || e === 268 || e === 271 || e === 275 || e === 281 || e === 170 || e === 304 || e === 173 || e === 172 || e === 179 || e === 305 || e === 266 || e === 169 || e === 261 || e === 347 || e === 339 || e === 349 || e === 203; +} +function o1(e) { + return e === 263 || e === 283 || e === 264 || e === 265 || e === 266 || e === 267 || e === 268 || e === 273 || e === 272 || e === 279 || e === 278 || e === 271; +} +function c1(e) { + return e === 253 || e === 252 || e === 260 || e === 247 || e === 245 || e === 243 || e === 250 || e === 251 || e === 249 || e === 246 || e === 257 || e === 254 || e === 256 || e === 258 || e === 259 || e === 244 || e === 248 || e === 255 || e === 354; +} +function Nd(e) { + return e.kind === 169 ? e.parent && e.parent.kind !== 346 || ia(e) : $g(e.kind); +} +function Qg(e) { + let t = e.kind; + return c1(t) || o1(t) || Kg(e); +} +function Kg(e) { + return e.kind !== 242 || e.parent !== void 0 && (e.parent.kind === 259 || e.parent.kind === 300) ? !1 : !f2(e); +} +function Zg(e) { + let t = e.kind; + return c1(t) || o1(t) || t === 242; +} +function l1(e) { + return e.kind >= 310 && e.kind <= 352; +} +function e2(e) { + return e.kind === 321 || e.kind === 320 || e.kind === 322 || r2(e) || t2(e) || i6(e) || Il(e); +} +function t2(e) { + return e.kind >= 328 && e.kind <= 352; +} +function il(e) { + return e.kind === 179; +} +function al(e) { + return e.kind === 178; +} +function Ki(e) { + if (!bf(e)) return !1; + let { jsDoc: t } = e; + return !!t && t.length > 0; +} +function n2(e) { + return !!e.initializer; +} +function El(e) { + return e.kind === 11 || e.kind === 15; +} +function r2(e) { + return e.kind === 325 || e.kind === 326 || e.kind === 327; +} +function Id(e) { + return (e.flags & 33554432) !== 0; +} +function a2(e, t) { + let a = e.entries(); + for (let [_, f] of a) { + let h = t(f, _); + if (h) return h; + } +} +function s2(e) { + return e.end - e.pos; +} +function u1(e) { + return _2(e), (e.flags & 1048576) !== 0; +} +function _2(e) { + e.flags & 2097152 || ((e.flags & 262144 || Xt(e, u1)) && (e.flags |= 1048576), e.flags |= 2097152); +} +function hi(e) { + for (; e && e.kind !== 308;) e = e.parent; + return e; +} +function Zi(e) { + return e === void 0 ? !0 : e.pos === e.end && e.pos >= 0 && e.kind !== 1; +} +function Rp(e) { + return !Zi(e); +} +function bl(e, t, a) { + if (Zi(e)) return e.pos; + if (l1(e) || e.kind === 12) return Cr((t ?? hi(e)).text, e.pos, !1, !0); + if (a && Ki(e)) return bl(e.jsDoc[0], t); + if (e.kind === 353) { + t ?? (t = hi(e)); + let _ = Hp(ah(e, t)); + if (_) return bl(_, t, a); + } + return Cr((t ?? hi(e)).text, e.pos, !1, !1, d2(e)); +} +function Od(e, t, a = !1) { + return r_(e.text, t, a); +} +function o2(e) { + return !!of(e, eh); +} +function r_(e, t, a = !1) { + if (Zi(t)) return ""; + let _ = e.substring(a ? t.pos : Cr(e, t.pos), t.end); + return o2(t) && (_ = _.split(/\r\n|\n|\r/).map((f) => f.replace(/^\s*\*/, "").trimStart()).join(` +`)), _; +} +function za(e) { + let t = e.emitNode; + return t && t.flags || 0; +} +function c2(e, t, a) { + q.assertGreaterThanOrEqual(t, 0), q.assertGreaterThanOrEqual(a, 0), q.assertLessThanOrEqual(t, e.length), q.assertLessThanOrEqual(t + a, e.length); +} +function pl(e) { + return e.kind === 245 && e.expression.kind === 11; +} +function hf(e) { + return !!(za(e) & 2097152); +} +function Md(e) { + return hf(e) && jf(e); +} +function l2(e) { + return Ke(e.name) && !e.initializer; +} +function Ld(e) { + return hf(e) && Xa(e) && Gp(e.declarationList.declarations, l2); +} +function u2(e, t) { + return Hr(e.kind === 170 || e.kind === 169 || e.kind === 219 || e.kind === 220 || e.kind === 218 || e.kind === 261 || e.kind === 282 ? Yp(og(t, e.pos), Lp(t, e.pos)) : Lp(t, e.pos), (_) => _.end <= e.end && t.charCodeAt(_.pos + 1) === 42 && t.charCodeAt(_.pos + 2) === 42 && t.charCodeAt(_.pos + 3) !== 47); +} +function p2(e) { + if (e) switch (e.kind) { + case 209: + case 307: + case 170: + case 304: + case 173: + case 172: + case 305: + case 261: return !0; + } + return !1; +} +function f2(e) { + return e && e.kind === 242 && mf(e.parent); +} +function Jd(e) { + let t = e.kind; + return (t === 212 || t === 213) && e.expression.kind === 108; +} +function ia(e) { + return !!e && !!(e.flags & 524288); +} +function d2(e) { + return !!e && !!(e.flags & 16777216); +} +function m2(e) { + for (; vl(e, !0);) e = e.right; + return e; +} +function h2(e) { + return Ke(e) && e.escapedText === "exports"; +} +function y2(e) { + return Ke(e) && e.escapedText === "module"; +} +function p1(e) { + return (dr(e) || f1(e)) && y2(e.expression) && f_(e) === "exports"; +} +function yf(e) { + let t = b2(e); + return t === 5 || ia(e) ? t : 0; +} +function g2(e) { + return e_(e.arguments) === 3 && dr(e.expression) && Ke(e.expression.expression) && An(e.expression.expression) === "Object" && An(e.expression.name) === "defineProperty" && Al(e.arguments[1]) && p_(e.arguments[0], !0); +} +function f1(e) { + return Ha(e) && Al(e.argumentExpression); +} +function b_(e, t) { + return dr(e) && (!t && e.expression.kind === 110 || Ke(e.name) && p_(e.expression, !0)) || d1(e, t); +} +function d1(e, t) { + return f1(e) && (!t && e.expression.kind === 110 || xf(e.expression) || b_(e.expression, !0)); +} +function p_(e, t) { + return xf(e) || b_(e, t); +} +function b2(e) { + if (Of(e)) { + if (!g2(e)) return 0; + let t = e.arguments[0]; + return h2(t) || p1(t) ? 8 : b_(t) && f_(t) === "prototype" ? 9 : 7; + } + return e.operatorToken.kind !== 64 || !v1(e.left) || v2(m2(e)) ? 0 : p_(e.left.expression, !0) && f_(e.left) === "prototype" && If(x2(e)) ? 6 : T2(e.left); +} +function v2(e) { + return Kb(e) && aa(e.expression) && e.expression.text === "0"; +} +function gf(e) { + if (dr(e)) return e.name; + let t = vf(e.argumentExpression); + return aa(t) || El(t) ? t : e; +} +function f_(e) { + let t = gf(e); + if (t) { + if (Ke(t)) return t.escapedText; + if (El(t) || aa(t)) return La(t.text); + } +} +function T2(e) { + if (e.expression.kind === 110) return 4; + if (p1(e)) return 2; + if (p_(e.expression, !0)) { + if (Q2(e.expression)) return 3; + let t = e; + for (; !Ke(t.expression);) t = t.expression; + let a = t.expression; + if ((a.escapedText === "exports" || a.escapedText === "module" && f_(t) === "exports") && b_(e)) return 1; + if (p_(e, !0) || Ha(e) && J2(e)) return 5; + } + return 0; +} +function x2(e) { + for (; na(e.right);) e = e.right; + return e.right; +} +function S2(e) { + return Pl(e) && na(e.expression) && yf(e.expression) !== 0 && na(e.expression.right) && (e.expression.right.operatorToken.kind === 57 || e.expression.right.operatorToken.kind === 61) ? e.expression.right.right : void 0; +} +function w2(e) { + switch (e.kind) { + case 244: + let t = Up(e); + return t && t.initializer; + case 173: return e.initializer; + case 304: return e.initializer; + } +} +function Up(e) { + return Xa(e) ? Hp(e.declarationList.declarations) : void 0; +} +function k2(e) { + return Ti(e) && e.body && e.body.kind === 268 ? e.body : void 0; +} +function bf(e) { + switch (e.kind) { + case 220: + case 227: + case 242: + case 253: + case 180: + case 297: + case 264: + case 232: + case 176: + case 177: + case 186: + case 181: + case 252: + case 260: + case 247: + case 213: + case 243: + case 1: + case 267: + case 307: + case 278: + case 279: + case 282: + case 245: + case 250: + case 251: + case 249: + case 263: + case 219: + case 185: + case 178: + case 80: + case 246: + case 273: + case 272: + case 182: + case 265: + case 318: + case 324: + case 257: + case 175: + case 174: + case 268: + case 203: + case 271: + case 211: + case 170: + case 218: + case 212: + case 304: + case 173: + case 172: + case 254: + case 241: + case 179: + case 305: + case 306: + case 256: + case 258: + case 259: + case 266: + case 169: + case 261: + case 244: + case 248: + case 255: return !0; + default: return !1; + } +} +function E2(e, t) { + let a; + p2(e) && n2(e) && Ki(e.initializer) && (a = En(a, jd(e, e.initializer.jsDoc))); + let _ = e; + for (; _ && _.parent;) { + if (Ki(_) && (a = En(a, jd(e, _.jsDoc))), _.kind === 170) { + a = En(a, (t ? vg : bg)(_)); + break; + } + if (_.kind === 169) { + a = En(a, (t ? xg : Tg)(_)); + break; + } + _ = C2(_); + } + return a || vt; +} +function jd(e, t) { + let a = dy(t); + return Tm(t, (_) => { + if (_ === a) { + let f = Hr(_.tags, (h) => A2(e, h)); + return _.tags === f ? [_] : f; + } else return Hr(_.tags, u6); + }); +} +function A2(e, t) { + return !(zf(t) || m6(t)) || !t.parent || !rh(t.parent) || !Dl(t.parent.parent) || t.parent.parent === e; +} +function C2(e) { + let t = e.parent; + if (t.kind === 304 || t.kind === 278 || t.kind === 173 || t.kind === 245 && e.kind === 212 || t.kind === 254 || k2(t) || vl(e)) return t; + if (t.parent && (Up(t.parent) === e || vl(t))) return t.parent; + if (t.parent && t.parent.parent && (Up(t.parent.parent) || w2(t.parent.parent) === e || S2(t.parent.parent))) return t.parent.parent; +} +function vf(e, t) { + return Vf(e, t ? -2147483647 : 1); +} +function D2(e) { + let t = P2(e); + if (t && ia(e)) { + let a = Sg(e); + if (a) return a.class; + } + return t; +} +function P2(e) { + let t = Tf(e.heritageClauses, 96); + return t && t.types.length > 0 ? t.types[0] : void 0; +} +function N2(e) { + if (ia(e)) return wg(e).map((t) => t.class); + return Tf(e.heritageClauses, 119)?.types; +} +function I2(e) { + return T_(e) ? O2(e) || vt : ra(e) && Yp(Ip(D2(e)), N2(e)) || vt; +} +function O2(e) { + let t = Tf(e.heritageClauses, 96); + return t ? t.types : void 0; +} +function Tf(e, t) { + if (e) { + for (let a of e) if (a.token === t) return a; + } +} +function di(e) { + return 83 <= e && e <= 166; +} +function M2(e) { + return 19 <= e && e <= 79; +} +function xp(e) { + return di(e) || M2(e); +} +function Al(e) { + return El(e) || aa(e); +} +function L2(e) { + return z1(e) && (e.operator === 40 || e.operator === 41) && aa(e.operand); +} +function J2(e) { + if (!(e.kind === 168 || e.kind === 213)) return !1; + let t = Ha(e) ? vf(e.argumentExpression) : e.expression; + return !Al(t) && !L2(t); +} +function j2(e) { + return jp(e) ? An(e) : Q1(e) ? Eb(e) : e.text; +} +function Ja(e) { + return d_(e.pos) || d_(e.end); +} +function Sp(e) { + switch (e) { + case 61: return 5; + case 57: return 5; + case 56: return 6; + case 52: return 7; + case 53: return 8; + case 51: return 9; + case 35: + case 36: + case 37: + case 38: return 10; + case 30: + case 32: + case 33: + case 34: + case 104: + case 103: + case 130: + case 152: return 11; + case 48: + case 49: + case 50: return 12; + case 40: + case 41: return 13; + case 42: + case 44: + case 45: return 14; + case 43: return 15; + } + return -1; +} +function wp(e) { + return !!((e.templateFlags || 0) & 2048); +} +function R2(e) { + return e && !!(E1(e) ? wp(e) : wp(e.head) || Zt(e.templateSpans, (t) => wp(t.literal))); +} +function U2(e) { + return !!e && e.kind === 80 && B2(e); +} +function B2(e) { + return e.escapedText === "this"; +} +function v_(e, t) { + return !!z2(e, t); +} +function q2(e) { + return v_(e, 256); +} +function F2(e) { + return v_(e, 32768); +} +function z2(e, t) { + return W2(e) & t; +} +function V2(e, t, a) { + return e.kind >= 0 && e.kind <= 166 ? 0 : (e.modifierFlagsCache & 536870912 || (e.modifierFlagsCache = y1(e) | 536870912), a || t && ia(e) ? (!(e.modifierFlagsCache & 268435456) && e.parent && (e.modifierFlagsCache |= m1(e) | 268435456), h1(e.modifierFlagsCache)) : G2(e.modifierFlagsCache)); +} +function W2(e) { + return V2(e, !1); +} +function m1(e) { + let t = 0; + return e.parent && !m_(e) && (ia(e) && (kg(e) && (t |= 8388608), Eg(e) && (t |= 16777216), Ag(e) && (t |= 33554432), Cg(e) && (t |= 67108864), Dg(e) && (t |= 134217728)), Pg(e) && (t |= 65536)), t; +} +function G2(e) { + return e & 65535; +} +function h1(e) { + return e & 131071 | (e & 260046848) >>> 23; +} +function Y2(e) { + return h1(m1(e)); +} +function H2(e) { + return y1(e) | Y2(e); +} +function y1(e) { + let t = Ol(e) ? Jn(e.modifiers) : 0; + return (e.flags & 8 || e.kind === 80 && e.flags & 4096) && (t |= 32), t; +} +function Jn(e) { + let t = 0; + if (e) for (let a of e) t |= g1(a.kind); + return t; +} +function g1(e) { + switch (e) { + case 126: return 256; + case 125: return 1; + case 124: return 4; + case 123: return 2; + case 128: return 64; + case 129: return 512; + case 95: return 32; + case 138: return 128; + case 87: return 4096; + case 90: return 2048; + case 134: return 1024; + case 148: return 8; + case 164: return 16; + case 103: return 8192; + case 147: return 16384; + case 171: return 32768; + } + return 0; +} +function X2(e) { + return e === 76 || e === 77 || e === 78; +} +function b1(e) { + return e >= 64 && e <= 79; +} +function vl(e, t) { + return na(e) && (t ? e.operatorToken.kind === 64 : b1(e.operatorToken.kind)) && Fa(e.left); +} +function xf(e) { + return e.kind === 80 || $2(e); +} +function $2(e) { + return dr(e) && Ke(e.name) && xf(e.expression); +} +function Q2(e) { + return b_(e) && f_(e) === "prototype"; +} +function kp(e) { + return e.flags & 3899393 ? e.objectFlags : 0; +} +function K2(e) { + let t; + return Xt(e, (a) => { + Rp(a) && (t = a); + }, (a) => { + for (let _ = a.length - 1; _ >= 0; _--) if (Rp(a[_])) { + t = a[_]; + break; + } + }), t; +} +function Z2(e) { + return e >= 183 && e <= 206 || e === 133 || e === 159 || e === 150 || e === 163 || e === 151 || e === 136 || e === 154 || e === 155 || e === 116 || e === 157 || e === 146 || e === 141 || e === 234 || e === 313 || e === 314 || e === 315 || e === 316 || e === 317 || e === 318 || e === 319; +} +function v1(e) { + return e.kind === 212 || e.kind === 213; +} +function eb(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; +} +function tb(e, t) { + this.flags = t, (q.isDebugging || ll) && (this.checker = e); +} +function nb(e, t) { + this.flags = t, q.isDebugging && (this.checker = e); +} +function Ep(e, t, a) { + this.pos = t, this.end = a, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; +} +function rb(e, t, a) { + this.pos = t, this.end = a, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; +} +function ib(e, t, a) { + this.pos = t, this.end = a, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; +} +function ab(e, t, a) { + this.fileName = e, this.text = t, this.skipTrivia = a || ((_) => _); +} +function _b(e) { + Object.assign(Et, e), jn(sb, (t) => t(Et)); +} +function ob(e, t) { + return e.replace(/\{(\d+)\}/g, (a, _) => "" + q.checkDefined(t[+_])); +} +function cb(e) { + return Rd && Rd[e.key] || e.message; +} +function Oa(e, t, a, _, f, ...h) { + a + _ > t.length && (_ = t.length - a), c2(t, a, _); + let T = cb(f); + return Zt(h) && (T = ob(T, h)), { + file: void 0, + start: a, + length: _, + messageText: T, + category: f.category, + code: f.code, + reportsUnnecessary: f.reportsUnnecessary, + fileName: e + }; +} +function lb(e) { + return e.file === void 0 && e.start !== void 0 && e.length !== void 0 && typeof e.fileName == "string"; +} +function T1(e, t) { + let a = t.fileName || "", _ = t.text.length; + q.assertEqual(e.fileName, a), q.assertLessThanOrEqual(e.start, _), q.assertLessThanOrEqual(e.start + e.length, _); + let f = { + file: t, + start: e.start, + length: e.length, + messageText: e.messageText, + category: e.category, + code: e.code, + reportsUnnecessary: e.reportsUnnecessary + }; + if (e.relatedInformation) { + f.relatedInformation = []; + for (let h of e.relatedInformation) lb(h) && h.fileName === a ? (q.assertLessThanOrEqual(h.start, _), q.assertLessThanOrEqual(h.start + h.length, _), f.relatedInformation.push(T1(h, t))) : f.relatedInformation.push(h); + } + return f; +} +function Yi(e, t) { + let a = []; + for (let _ of e) a.push(T1(_, t)); + return a; +} +function Ud(e) { + return e === 4 || e === 2 || e === 1 || e === 6 ? 1 : 0; +} +function Bd(e) { + return e >= 3 && e <= 99 || e === 100; +} +function Gr(e, t) { + return e[t] === void 0 ? !!e.strict : !!e[t]; +} +function ub(e) { + return a2(targetOptionDeclaration.type, (t, a) => t === e ? a : void 0); +} +function S1(e, t) { + return e === "*" ? t : e === "?" ? "[^/]" : "\\" + e; +} +function mb(e, t) { + return t || hb(e) || 3; +} +function hb(e) { + switch (e.substr(e.lastIndexOf(".")).toLowerCase()) { + case ".js": + case ".cjs": + case ".mjs": return 1; + case ".jsx": return 2; + case ".ts": + case ".cts": + case ".mts": return 3; + case ".tsx": return 4; + case ".json": return 6; + default: return 0; + } +} +function d_(e) { + return !(e >= 0); +} +function sl(e, ...t) { + return t.length && (e.relatedInformation || (e.relatedInformation = []), q.assert(e.relatedInformation !== vt, "Diagnostic had empty array singleton for related info, but is still being constructed!"), e.relatedInformation.push(...t)), e; +} +function vb(e) { + let t; + switch (e.charCodeAt(1)) { + case 98: + case 66: + t = 1; + break; + case 111: + case 79: + t = 3; + break; + case 120: + case 88: + t = 4; + break; + default: + let W = e.length - 1, y = 0; + for (; e.charCodeAt(y) === 48;) y++; + return e.slice(y, W) || "0"; + } + let a = 2, _ = e.length - 1, f = (_ - a) * t, h = new Uint16Array((f >>> 4) + (f & 15 ? 1 : 0)); + for (let W = _ - 1, y = 0; W >= a; W--, y += t) { + let G = y >>> 4, E = e.charCodeAt(W), R = (E <= 57 ? E - 48 : 10 + E - (E <= 70 ? 65 : 97)) << (y & 15); + h[G] |= R; + let ue = R >>> 16; + ue && (h[G + 1] |= ue); + } + let T = "", k = h.length - 1, c = !0; + for (; c;) { + let W = 0; + c = !1; + for (let y = k; y >= 0; y--) { + let G = W << 16 | h[y], E = G / 10 | 0; + h[y] = E, W = G - E * 10, E && !c && (k = y, c = !0); + } + T = W + T; + } + return T; +} +function Tb({ negative: e, base10Value: t }) { + return (e && t !== "0" ? "-" : "") + t; +} +function Bp(e, t) { + return e.pos = t, e; +} +function xb(e, t) { + return e.end = t, e; +} +function yi(e, t, a) { + return xb(Bp(e, t), a); +} +function qd(e, t, a) { + return yi(e, t, t + a); +} +function Sf(e, t) { + return e && t && (e.parent = t), e; +} +function Sb(e, t) { + if (!e) return e; + return dm(e, l1(e) ? a : f), e; + function a(h, T) { + if (t && h.parent === T) return "skip"; + Sf(h, T); + } + function _(h) { + if (Ki(h)) for (let T of h.jsDoc) a(T, h), dm(T, a); + } + function f(h, T) { + return a(h, T) || _(h); + } +} +function wb(e) { + return !!(e.flags & 262144 && e.isThisType); +} +function kb(e) { + var t; + return ((t = getSnippetElement(e)) == null ? void 0 : t.kind) === 0; +} +function Eb(e) { + return `${An(e.namespace)}:${An(e.name)}`; +} +function Cb() { + let e, t, a, _, f; + return { + createBaseSourceFileNode: h, + createBaseIdentifierNode: T, + createBasePrivateIdentifierNode: k, + createBaseTokenNode: c, + createBaseNode: W + }; + function h(y) { + return new (f || (f = (Et.getSourceFileConstructor())))(y, -1, -1); + } + function T(y) { + return new (a || (a = (Et.getIdentifierConstructor())))(y, -1, -1); + } + function k(y) { + return new (_ || (_ = (Et.getPrivateIdentifierConstructor())))(y, -1, -1); + } + function c(y) { + return new (t || (t = (Et.getTokenConstructor())))(y, -1, -1); + } + function W(y) { + return new (e || (e = (Et.getNodeConstructor())))(y, -1, -1); + } +} +function wf(e, t) { + let a = e & 8 ? bt : Lb, _ = gd(() => e & 1 ? Db : createParenthesizerRules(he)), f = gd(() => e & 2 ? nullNodeConverters : createNodeConverters(he)), h = Kn((n) => (i, s) => da(i, n, s)), T = Kn((n) => (i) => Ur(n, i)), k = Kn((n) => (i) => ni(i, n)), c = Kn((n) => () => Qo(n)), W = Kn((n) => (i) => Cs(n, i)), y = Kn((n) => (i, s) => wu(n, i, s)), G = Kn((n) => (i, s) => Ko(n, i, s)), E = Kn((n) => (i, s) => Su(n, i, s)), D = Kn((n) => (i, s) => hc(n, i, s)), R = Kn((n) => (i, s, l) => Lu(n, i, s, l)), ue = Kn((n) => (i, s, l) => yc(n, i, s, l)), be = Kn((n) => (i, s, l, d) => Ju(n, i, s, l, d)), he = { + get parenthesizer() { + return _(); + }, + get converters() { + return f(); + }, + baseFactory: t, + flags: e, + createNodeArray: de, + createNumericLiteral: V, + createBigIntLiteral: oe, + createStringLiteral: ft, + createStringLiteralFromNode: nr, + createRegularExpressionLiteral: mn, + createLiteralLikeNode: rr, + createIdentifier: We, + createTempVariable: ir, + createLoopVariable: Ir, + createUniqueName: Ot, + getGeneratedNameForNode: Bn, + createPrivateIdentifier: Mt, + createUniquePrivateName: $e, + getGeneratedPrivateNameForNode: qn, + createToken: ot, + createSuper: at, + createThis: Bt, + createNull: Lt, + createTrue: ct, + createFalse: ar, + createModifier: dt, + createModifiersFromModifierFlags: yn, + createQualifiedName: yt, + updateQualifiedName: _n, + createComputedPropertyName: tt, + updateComputedPropertyName: qt, + createTypeParameterDeclaration: tn, + updateTypeParameterDeclaration: sr, + createParameterDeclaration: mr, + updateParameterDeclaration: hr, + createDecorator: Fn, + updateDecorator: zn, + createPropertySignature: Or, + updatePropertySignature: Vn, + createPropertyDeclaration: yr, + updatePropertyDeclaration: L, + createMethodSignature: se, + updateMethodSignature: fe, + createMethodDeclaration: Te, + updateMethodDeclaration: He, + createConstructorDeclaration: lt, + updateConstructorDeclaration: Mr, + createGetAccessorDeclaration: Nn, + updateGetAccessorDeclaration: Wn, + createSetAccessorDeclaration: U, + updateSetAccessorDeclaration: K, + createCallSignature: xe, + updateCallSignature: Se, + createConstructSignature: we, + updateConstructSignature: me, + createIndexSignature: Ve, + updateIndexSignature: Ze, + createClassStaticBlockDeclaration: st, + updateClassStaticBlockDeclaration: Ct, + createTemplateLiteralTypeSpan: Ye, + updateTemplateLiteralTypeSpan: Ee, + createKeywordTypeNode: gn, + createTypePredicateNode: rt, + updateTypePredicateNode: on, + createTypeReferenceNode: Zr, + updateTypeReferenceNode: M, + createFunctionTypeNode: Ue, + updateFunctionTypeNode: u, + createConstructorTypeNode: Me, + updateConstructorTypeNode: nn, + createTypeQueryNode: Dt, + updateTypeQueryNode: wt, + createTypeLiteralNode: Pt, + updateTypeLiteralNode: Ft, + createArrayTypeNode: Gn, + updateArrayTypeNode: ki, + createTupleTypeNode: cn, + updateTupleTypeNode: H, + createNamedTupleMember: le, + updateNamedTupleMember: qe, + createOptionalTypeNode: ve, + updateOptionalTypeNode: J, + createRestTypeNode: mt, + updateRestTypeNode: xt, + createUnionTypeNode: ql, + updateUnionTypeNode: C_, + createIntersectionTypeNode: Lr, + updateIntersectionTypeNode: Le, + createConditionalTypeNode: pt, + updateConditionalTypeNode: Fl, + createInferTypeNode: Yn, + updateInferTypeNode: zl, + createImportTypeNode: _r, + updateImportTypeNode: oa, + createParenthesizedType: Qt, + updateParenthesizedType: At, + createThisTypeNode: P, + createTypeOperatorNode: Gt, + updateTypeOperatorNode: Jr, + createIndexedAccessTypeNode: or, + updateIndexedAccessTypeNode: Ka, + createMappedTypeNode: gt, + updateMappedTypeNode: jt, + createLiteralTypeNode: ei, + updateLiteralTypeNode: br, + createTemplateLiteralType: Wt, + updateTemplateLiteralType: Vl, + createObjectBindingPattern: D_, + updateObjectBindingPattern: Wl, + createArrayBindingPattern: jr, + updateArrayBindingPattern: Gl, + createBindingElement: ca, + updateBindingElement: ti, + createArrayLiteralExpression: Za, + updateArrayLiteralExpression: P_, + createObjectLiteralExpression: Ei, + updateObjectLiteralExpression: Yl, + createPropertyAccessExpression: e & 4 ? (n, i) => setEmitFlags(cr(n, i), 262144) : cr, + updatePropertyAccessExpression: Hl, + createPropertyAccessChain: e & 4 ? (n, i, s) => setEmitFlags(Ai(n, i, s), 262144) : Ai, + updatePropertyAccessChain: la, + createElementAccessExpression: Ci, + updateElementAccessExpression: Xl, + createElementAccessChain: O_, + updateElementAccessChain: es, + createCallExpression: Di, + updateCallExpression: ua, + createCallChain: ts, + updateCallChain: L_, + createNewExpression: bn, + updateNewExpression: ns, + createTaggedTemplateExpression: pa, + updateTaggedTemplateExpression: J_, + createTypeAssertion: j_, + updateTypeAssertion: R_, + createParenthesizedExpression: rs, + updateParenthesizedExpression: U_, + createFunctionExpression: is, + updateFunctionExpression: B_, + createArrowFunction: as, + updateArrowFunction: q_, + createDeleteExpression: F_, + updateDeleteExpression: z_, + createTypeOfExpression: fa, + updateTypeOfExpression: un, + createVoidExpression: ss, + updateVoidExpression: lr, + createAwaitExpression: V_, + updateAwaitExpression: Rr, + createPrefixUnaryExpression: Ur, + updatePrefixUnaryExpression: $l, + createPostfixUnaryExpression: ni, + updatePostfixUnaryExpression: Ql, + createBinaryExpression: da, + updateBinaryExpression: Kl, + createConditionalExpression: G_, + updateConditionalExpression: Y_, + createTemplateExpression: H_, + updateTemplateExpression: Hn, + createTemplateHead: $_, + createTemplateMiddle: ma, + createTemplateTail: _s, + createNoSubstitutionTemplateLiteral: eu, + createTemplateLiteralLikeNode: ii, + createYieldExpression: os, + updateYieldExpression: tu, + createSpreadElement: Q_, + updateSpreadElement: nu, + createClassExpression: K_, + updateClassExpression: cs, + createOmittedExpression: ls, + createExpressionWithTypeArguments: Z_, + updateExpressionWithTypeArguments: eo, + createAsExpression: pn, + updateAsExpression: ha, + createNonNullExpression: to, + updateNonNullExpression: no, + createSatisfiesExpression: us, + updateSatisfiesExpression: ro, + createNonNullChain: ps, + updateNonNullChain: In, + createMetaProperty: io, + updateMetaProperty: fs, + createTemplateSpan: Xn, + updateTemplateSpan: ya, + createSemicolonClassElement: ao, + createBlock: Br, + updateBlock: ru, + createVariableStatement: ds, + updateVariableStatement: so, + createEmptyStatement: _o, + createExpressionStatement: Ni, + updateExpressionStatement: oo, + createIfStatement: co, + updateIfStatement: lo, + createDoStatement: uo, + updateDoStatement: po, + createWhileStatement: fo, + updateWhileStatement: iu, + createForStatement: mo, + updateForStatement: ho, + createForInStatement: ms, + updateForInStatement: au, + createForOfStatement: yo, + updateForOfStatement: su, + createContinueStatement: go, + updateContinueStatement: _u, + createBreakStatement: hs, + updateBreakStatement: bo, + createReturnStatement: ys, + updateReturnStatement: ou, + createWithStatement: gs, + updateWithStatement: vo, + createSwitchStatement: bs, + updateSwitchStatement: ai, + createLabeledStatement: To, + updateLabeledStatement: xo, + createThrowStatement: So, + updateThrowStatement: cu, + createTryStatement: wo, + updateTryStatement: lu, + createDebuggerStatement: ko, + createVariableDeclaration: ga, + updateVariableDeclaration: Eo, + createVariableDeclarationList: vs, + updateVariableDeclarationList: uu, + createFunctionDeclaration: Ao, + updateFunctionDeclaration: Ts, + createClassDeclaration: Co, + updateClassDeclaration: ba, + createInterfaceDeclaration: Do, + updateInterfaceDeclaration: Po, + createTypeAliasDeclaration: _t, + updateTypeAliasDeclaration: vr, + createEnumDeclaration: xs, + updateEnumDeclaration: Tr, + createModuleDeclaration: No, + updateModuleDeclaration: kt, + createModuleBlock: xr, + updateModuleBlock: zt, + createCaseBlock: Io, + updateCaseBlock: fu, + createNamespaceExportDeclaration: Oo, + updateNamespaceExportDeclaration: Mo, + createImportEqualsDeclaration: Lo, + updateImportEqualsDeclaration: Jo, + createImportDeclaration: jo, + updateImportDeclaration: Ro, + createImportClause: Uo, + updateImportClause: Bo, + createAssertClause: Ss, + updateAssertClause: mu, + createAssertEntry: Ii, + updateAssertEntry: qo, + createImportTypeAssertionContainer: ws, + updateImportTypeAssertionContainer: Fo, + createImportAttributes: zo, + updateImportAttributes: ks, + createImportAttribute: Vo, + updateImportAttribute: Wo, + createNamespaceImport: Go, + updateNamespaceImport: hu, + createNamespaceExport: Yo, + updateNamespaceExport: yu, + createNamedImports: Ho, + updateNamedImports: Xo, + createImportSpecifier: Sr, + updateImportSpecifier: gu, + createExportAssignment: va, + updateExportAssignment: Oi, + createExportDeclaration: Ta, + updateExportDeclaration: $o, + createNamedExports: Es, + updateNamedExports: bu, + createExportSpecifier: xa, + updateExportSpecifier: vu, + createMissingDeclaration: Tu, + createExternalModuleReference: As, + updateExternalModuleReference: xu, + get createJSDocAllType() { + return c(313); + }, + get createJSDocUnknownType() { + return c(314); + }, + get createJSDocNonNullableType() { + return G(316); + }, + get updateJSDocNonNullableType() { + return E(316); + }, + get createJSDocNullableType() { + return G(315); + }, + get updateJSDocNullableType() { + return E(315); + }, + get createJSDocOptionalType() { + return W(317); + }, + get updateJSDocOptionalType() { + return y(317); + }, + get createJSDocVariadicType() { + return W(319); + }, + get updateJSDocVariadicType() { + return y(319); + }, + get createJSDocNamepathType() { + return W(320); + }, + get updateJSDocNamepathType() { + return y(320); + }, + createJSDocFunctionType: Zo, + updateJSDocFunctionType: ku, + createJSDocTypeLiteral: ec, + updateJSDocTypeLiteral: Eu, + createJSDocTypeExpression: tc, + updateJSDocTypeExpression: Ds, + createJSDocSignature: nc, + updateJSDocSignature: Au, + createJSDocTemplateTag: Ps, + updateJSDocTemplateTag: rc, + createJSDocTypedefTag: Sa, + updateJSDocTypedefTag: Cu, + createJSDocParameterTag: Ns, + updateJSDocParameterTag: Du, + createJSDocPropertyTag: ic, + updateJSDocPropertyTag: ac, + createJSDocCallbackTag: sc, + updateJSDocCallbackTag: _c, + createJSDocOverloadTag: oc, + updateJSDocOverloadTag: Is, + createJSDocAugmentsTag: Os, + updateJSDocAugmentsTag: Li, + createJSDocImplementsTag: cc, + updateJSDocImplementsTag: Mu, + createJSDocSeeTag: Fr, + updateJSDocSeeTag: wa, + createJSDocImportTag: vc, + updateJSDocImportTag: Tc, + createJSDocNameReference: lc, + updateJSDocNameReference: Pu, + createJSDocMemberName: uc, + updateJSDocMemberName: Nu, + createJSDocLink: pc, + updateJSDocLink: fc, + createJSDocLinkCode: dc, + updateJSDocLinkCode: Iu, + createJSDocLinkPlain: mc, + updateJSDocLinkPlain: Ou, + get createJSDocTypeTag() { + return ue(345); + }, + get updateJSDocTypeTag() { + return be(345); + }, + get createJSDocReturnTag() { + return ue(343); + }, + get updateJSDocReturnTag() { + return be(343); + }, + get createJSDocThisTag() { + return ue(344); + }, + get updateJSDocThisTag() { + return be(344); + }, + get createJSDocAuthorTag() { + return D(331); + }, + get updateJSDocAuthorTag() { + return R(331); + }, + get createJSDocClassTag() { + return D(333); + }, + get updateJSDocClassTag() { + return R(333); + }, + get createJSDocPublicTag() { + return D(334); + }, + get updateJSDocPublicTag() { + return R(334); + }, + get createJSDocPrivateTag() { + return D(335); + }, + get updateJSDocPrivateTag() { + return R(335); + }, + get createJSDocProtectedTag() { + return D(336); + }, + get updateJSDocProtectedTag() { + return R(336); + }, + get createJSDocReadonlyTag() { + return D(337); + }, + get updateJSDocReadonlyTag() { + return R(337); + }, + get createJSDocOverrideTag() { + return D(338); + }, + get updateJSDocOverrideTag() { + return R(338); + }, + get createJSDocDeprecatedTag() { + return D(332); + }, + get updateJSDocDeprecatedTag() { + return R(332); + }, + get createJSDocThrowsTag() { + return ue(350); + }, + get updateJSDocThrowsTag() { + return be(350); + }, + get createJSDocSatisfiesTag() { + return ue(351); + }, + get updateJSDocSatisfiesTag() { + return be(351); + }, + createJSDocEnumTag: bc, + updateJSDocEnumTag: Ms, + createJSDocUnknownTag: gc, + updateJSDocUnknownTag: ju, + createJSDocText: Ls, + updateJSDocText: Ru, + createJSDocComment: Ji, + updateJSDocComment: xc, + createJsxElement: Sc, + updateJsxElement: Uu, + createJsxSelfClosingElement: wc, + updateJsxSelfClosingElement: Bu, + createJsxOpeningElement: ka, + updateJsxOpeningElement: kc, + createJsxClosingElement: Js, + updateJsxClosingElement: js, + createJsxFragment: Yt, + createJsxText: ji, + updateJsxText: qu, + createJsxOpeningFragment: Ac, + createJsxJsxClosingFragment: Cc, + updateJsxFragment: Ec, + createJsxAttribute: Dc, + updateJsxAttribute: Fu, + createJsxAttributes: Ri, + updateJsxAttributes: zu, + createJsxSpreadAttribute: Pc, + updateJsxSpreadAttribute: Vu, + createJsxExpression: Nc, + updateJsxExpression: Rs, + createJsxNamespacedName: si, + updateJsxNamespacedName: Wu, + createCaseClause: Ea, + updateCaseClause: Ic, + createDefaultClause: Oc, + updateDefaultClause: Ui, + createHeritageClause: Us, + updateHeritageClause: Gu, + createCatchClause: Mc, + updateCatchClause: Lc, + createPropertyAssignment: Aa, + updatePropertyAssignment: Bs, + createShorthandPropertyAssignment: Jc, + updateShorthandPropertyAssignment: Yu, + createSpreadAssignment: jc, + updateSpreadAssignment: Rc, + createEnumMember: qs, + updateEnumMember: On, + createSourceFile: Uc, + updateSourceFile: Qu, + createRedirectedSourceFile: Bc, + createBundle: qc, + updateBundle: Fc, + createSyntheticExpression: Ku, + createSyntaxList: Zu, + createNotEmittedStatement: Ca, + createNotEmittedTypeElement: ep, + createPartiallyEmittedExpression: Vs, + updatePartiallyEmittedExpression: zc, + createCommaListExpression: Ws, + updateCommaListExpression: np, + createSyntheticReferenceExpression: Gs, + updateSyntheticReferenceExpression: Vc, + cloneNode: Da, + get createComma() { + return h(28); + }, + get createAssignment() { + return h(64); + }, + get createLogicalOr() { + return h(57); + }, + get createLogicalAnd() { + return h(56); + }, + get createBitwiseOr() { + return h(52); + }, + get createBitwiseXor() { + return h(53); + }, + get createBitwiseAnd() { + return h(51); + }, + get createStrictEquality() { + return h(37); + }, + get createStrictInequality() { + return h(38); + }, + get createEquality() { + return h(35); + }, + get createInequality() { + return h(36); + }, + get createLessThan() { + return h(30); + }, + get createLessThanEquals() { + return h(33); + }, + get createGreaterThan() { + return h(32); + }, + get createGreaterThanEquals() { + return h(34); + }, + get createLeftShift() { + return h(48); + }, + get createRightShift() { + return h(49); + }, + get createUnsignedRightShift() { + return h(50); + }, + get createAdd() { + return h(40); + }, + get createSubtract() { + return h(41); + }, + get createMultiply() { + return h(42); + }, + get createDivide() { + return h(44); + }, + get createModulo() { + return h(45); + }, + get createExponent() { + return h(43); + }, + get createPrefixPlus() { + return T(40); + }, + get createPrefixMinus() { + return T(41); + }, + get createPrefixIncrement() { + return T(46); + }, + get createPrefixDecrement() { + return T(47); + }, + get createBitwiseNot() { + return T(55); + }, + get createLogicalNot() { + return T(54); + }, + get createPostfixIncrement() { + return k(46); + }, + get createPostfixDecrement() { + return k(47); + }, + createImmediatelyInvokedFunctionExpression: ap, + createImmediatelyInvokedArrowFunction: sp, + createVoidZero: Bi, + createExportDefault: Yc, + createExternalModuleExport: Hc, + createTypeCheck: _p, + createIsNotTypeCheck: Ys, + createMethodCall: zr, + createGlobalMethodCall: qi, + createFunctionBindCall: op, + createFunctionCallCall: cp, + createFunctionApplyCall: lp, + createArraySliceCall: up, + createArrayConcatCall: Fi, + createObjectDefinePropertyCall: pp, + createObjectGetOwnPropertyDescriptorCall: Hs, + createReflectGetCall: oi, + createReflectSetCall: Xc, + createPropertyDescriptor: fp, + createCallBinding: Zc, + createAssignmentTargetWrapper: el, + inlineExpressions: o, + getInternalName: m, + getLocalName: g, + getExportName: b, + getDeclarationName: N, + getNamespaceMemberName: Q, + getExternalModuleOrNamespaceExportName: _e, + restoreOuterExpressions: Qc, + restoreEnclosingLabel: Kc, + createUseStrictPrologue: ce, + copyPrologue: ee, + copyStandardPrologue: je, + copyCustomPrologue: Je, + ensureUseStrict: De, + liftToBlock: Ht, + mergeLexicalEnvironment: ur, + replaceModifiers: pr, + replaceDecoratorsAndModifiers: Mn, + replacePropertyName: Vr + }; + return jn(Pb, (n) => n(he)), he; + function de(n, i) { + if (n === void 0 || n === vt) n = []; + else if (mi(n)) { + if (i === void 0 || n.hasTrailingComma === i) return n.transformFlags === void 0 && zd(n), q.attachNodeArrayDebugInfo(n), n; + let d = n.slice(); + return d.pos = n.pos, d.end = n.end, d.hasTrailingComma = i, d.transformFlags = n.transformFlags, q.attachNodeArrayDebugInfo(d), d; + } + let s = n.length, l = s >= 1 && s <= 4 ? n.slice() : n; + return l.pos = -1, l.end = -1, l.hasTrailingComma = !!i, l.transformFlags = 0, zd(l), q.attachNodeArrayDebugInfo(l), l; + } + function O(n) { + return t.createBaseNode(n); + } + function ae(n) { + let i = O(n); + return i.symbol = void 0, i.localSymbol = void 0, i; + } + function Oe(n, i) { + return n !== i && (n.typeArguments = i.typeArguments), j(n, i); + } + function V(n, i = 0) { + let s = typeof n == "number" ? n + "" : n; + q.assert(s.charCodeAt(0) !== 45, "Negative numbers should be created in combination with createPrefixUnaryExpression"); + let l = ae(9); + return l.text = s, l.numericLiteralFlags = i, i & 384 && (l.transformFlags |= 1024), l; + } + function oe(n) { + let i = $t(10); + return i.text = typeof n == "string" ? n : Tb(n) + "n", i.transformFlags |= 32, i; + } + function Y(n, i) { + let s = ae(11); + return s.text = n, s.singleQuote = i, s; + } + function ft(n, i, s) { + let l = Y(n, i); + return l.hasExtendedUnicodeEscape = s, s && (l.transformFlags |= 1024), l; + } + function nr(n) { + let i = Y(j2(n), void 0); + return i.textSourceNode = n, i; + } + function mn(n) { + let i = $t(14); + return i.text = n, i; + } + function rr(n, i) { + switch (n) { + case 9: return V(i, 0); + case 10: return oe(i); + case 11: return ft(i, void 0); + case 12: return ji(i, !1); + case 13: return ji(i, !0); + case 14: return mn(i); + case 15: return ii(n, i, void 0, 0); + } + } + function hn(n) { + let i = t.createBaseIdentifierNode(80); + return i.escapedText = n, i.jsDoc = void 0, i.flowNode = void 0, i.symbol = void 0, i; + } + function Dn(n, i, s, l) { + let d = hn(La(n)); + return setIdentifierAutoGenerate(d, { + flags: i, + id: _l, + prefix: s, + suffix: l + }), _l++, d; + } + function We(n, i, s) { + i === void 0 && n && (i = Rm(n)), i === 80 && (i = void 0); + let l = hn(La(n)); + return s && (l.flags |= 256), l.escapedText === "await" && (l.transformFlags |= 67108864), l.flags & 256 && (l.transformFlags |= 1024), l; + } + function ir(n, i, s, l) { + let d = 1; + i && (d |= 8); + let v = Dn("", d, s, l); + return n && n(v), v; + } + function Ir(n) { + let i = 2; + return n && (i |= 8), Dn("", i, void 0, void 0); + } + function Ot(n, i = 0, s, l) { + return q.assert(!(i & 7), "Argument out of range: flags"), q.assert((i & 48) !== 32, "GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"), Dn(n, 3 | i, s, l); + } + function Bn(n, i = 0, s, l) { + q.assert(!(i & 7), "Argument out of range: flags"); + let d = n ? jp(n) ? Vp(!1, s, n, l, An) : `generated@${getNodeId(n)}` : ""; + (s || l) && (i |= 16); + let v = Dn(d, 4 | i, s, l); + return v.original = n, v; + } + function Pn(n) { + let i = t.createBasePrivateIdentifierNode(81); + return i.escapedText = n, i.transformFlags |= 16777216, i; + } + function Mt(n) { + return ml(n, "#") || q.fail("First character of private identifier must be #: " + n), Pn(La(n)); + } + function ht(n, i, s, l) { + let d = Pn(La(n)); + return setIdentifierAutoGenerate(d, { + flags: i, + id: _l, + prefix: s, + suffix: l + }), _l++, d; + } + function $e(n, i, s) { + n && !ml(n, "#") && q.fail("First character of private identifier must be #: " + n); + return ht(n ?? "", 8 | (n ? 3 : 1), i, s); + } + function qn(n, i, s) { + let v = ht(jp(n) ? Vp(!0, i, n, s, An) : `#generated@${getNodeId(n)}`, 4 | (i || s ? 16 : 0), i, s); + return v.original = n, v; + } + function $t(n) { + return t.createBaseTokenNode(n); + } + function ot(n) { + q.assert(n >= 0 && n <= 166, "Invalid token"), q.assert(n <= 15 || n >= 18, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."), q.assert(n <= 9 || n >= 15, "Invalid token. Use 'createLiteralLikeNode' to create literals."), q.assert(n !== 80, "Invalid token. Use 'createIdentifier' to create identifiers"); + let i = $t(n), s = 0; + switch (n) { + case 134: + s = 384; + break; + case 160: + s = 4; + break; + case 125: + case 123: + case 124: + case 148: + case 128: + case 138: + case 87: + case 133: + case 150: + case 163: + case 146: + case 151: + case 103: + case 147: + case 164: + case 154: + case 136: + case 155: + case 116: + case 159: + case 157: + s = 1; + break; + case 108: + s = 134218752, i.flowNode = void 0; + break; + case 126: + s = 1024; + break; + case 129: + s = 16777216; + break; + case 110: + s = 16384, i.flowNode = void 0; + break; + } + return s && (i.transformFlags |= s), i; + } + function at() { + return ot(108); + } + function Bt() { + return ot(110); + } + function Lt() { + return ot(106); + } + function ct() { + return ot(112); + } + function ar() { + return ot(97); + } + function dt(n) { + return ot(n); + } + function yn(n) { + let i = []; + return n & 32 && i.push(dt(95)), n & 128 && i.push(dt(138)), n & 2048 && i.push(dt(90)), n & 4096 && i.push(dt(87)), n & 1 && i.push(dt(125)), n & 2 && i.push(dt(123)), n & 4 && i.push(dt(124)), n & 64 && i.push(dt(128)), n & 256 && i.push(dt(126)), n & 16 && i.push(dt(164)), n & 8 && i.push(dt(148)), n & 512 && i.push(dt(129)), n & 1024 && i.push(dt(134)), n & 8192 && i.push(dt(103)), n & 16384 && i.push(dt(147)), i.length ? i : void 0; + } + function yt(n, i) { + let s = O(167); + return s.left = n, s.right = et(i), s.transformFlags |= z(s.left) | ja(s.right), s.flowNode = void 0, s; + } + function _n(n, i, s) { + return n.left !== i || n.right !== s ? j(yt(i, s), n) : n; + } + function tt(n) { + let i = O(168); + return i.expression = _().parenthesizeExpressionOfComputedPropertyName(n), i.transformFlags |= z(i.expression) | 132096, i; + } + function qt(n, i) { + return n.expression !== i ? j(tt(i), n) : n; + } + function tn(n, i, s, l) { + let d = ae(169); + return d.modifiers = Pe(n), d.name = et(i), d.constraint = s, d.default = l, d.transformFlags = 1, d.expression = void 0, d.jsDoc = void 0, d; + } + function sr(n, i, s, l, d) { + return n.modifiers !== i || n.name !== s || n.constraint !== l || n.default !== d ? j(tn(i, s, l, d), n) : n; + } + function mr(n, i, s, l, d, v) { + let F = ae(170); + return F.modifiers = Pe(n), F.dotDotDotToken = i, F.name = et(s), F.questionToken = l, F.type = d, F.initializer = zi(v), U2(F.name) ? F.transformFlags = 1 : F.transformFlags = ke(F.modifiers) | z(F.dotDotDotToken) | Ln(F.name) | z(F.questionToken) | z(F.initializer) | (F.questionToken ?? F.type ? 1 : 0) | (F.dotDotDotToken ?? F.initializer ? 1024 : 0) | (Jn(F.modifiers) & 31 ? 8192 : 0), F.jsDoc = void 0, F; + } + function hr(n, i, s, l, d, v, F) { + return n.modifiers !== i || n.dotDotDotToken !== s || n.name !== l || n.questionToken !== d || n.type !== v || n.initializer !== F ? j(mr(i, s, l, d, v, F), n) : n; + } + function Fn(n) { + let i = O(171); + return i.expression = _().parenthesizeLeftSideOfAccess(n, !1), i.transformFlags |= z(i.expression) | 33562625, i; + } + function zn(n, i) { + return n.expression !== i ? j(Fn(i), n) : n; + } + function Or(n, i, s, l) { + let d = ae(172); + return d.modifiers = Pe(n), d.name = et(i), d.type = l, d.questionToken = s, d.transformFlags = 1, d.initializer = void 0, d.jsDoc = void 0, d; + } + function Vn(n, i, s, l, d) { + return n.modifiers !== i || n.name !== s || n.questionToken !== l || n.type !== d ? Ce(Or(i, s, l, d), n) : n; + } + function Ce(n, i) { + return n !== i && (n.initializer = i.initializer), j(n, i); + } + function yr(n, i, s, l, d) { + let v = ae(173); + v.modifiers = Pe(n), v.name = et(i), v.questionToken = s && Wd(s) ? s : void 0, v.exclamationToken = s && Vd(s) ? s : void 0, v.type = l, v.initializer = zi(d); + let F = v.flags & 33554432 || Jn(v.modifiers) & 128; + return v.transformFlags = ke(v.modifiers) | Ln(v.name) | z(v.initializer) | (F || v.questionToken || v.exclamationToken || v.type ? 1 : 0) | (kf(v.name) || Jn(v.modifiers) & 256 && v.initializer ? 8192 : 0) | 16777216, v.jsDoc = void 0, v; + } + function L(n, i, s, l, d, v) { + return n.modifiers !== i || n.name !== s || n.questionToken !== (l !== void 0 && Wd(l) ? l : void 0) || n.exclamationToken !== (l !== void 0 && Vd(l) ? l : void 0) || n.type !== d || n.initializer !== v ? j(yr(i, s, l, d, v), n) : n; + } + function se(n, i, s, l, d, v) { + let F = ae(174); + return F.modifiers = Pe(n), F.name = et(i), F.questionToken = s, F.typeParameters = Pe(l), F.parameters = Pe(d), F.type = v, F.transformFlags = 1, F.jsDoc = void 0, F.locals = void 0, F.nextContainer = void 0, F.typeArguments = void 0, F; + } + function fe(n, i, s, l, d, v, F) { + return n.modifiers !== i || n.name !== s || n.questionToken !== l || n.typeParameters !== d || n.parameters !== v || n.type !== F ? Oe(se(i, s, l, d, v, F), n) : n; + } + function Te(n, i, s, l, d, v, F, pe) { + let Fe = ae(175); + if (Fe.modifiers = Pe(n), Fe.asteriskToken = i, Fe.name = et(s), Fe.questionToken = l, Fe.exclamationToken = void 0, Fe.typeParameters = Pe(d), Fe.parameters = de(v), Fe.type = F, Fe.body = pe, !Fe.body) Fe.transformFlags = 1; + else { + let It = Jn(Fe.modifiers) & 1024, fr = !!Fe.asteriskToken, xn = It && fr; + Fe.transformFlags = ke(Fe.modifiers) | z(Fe.asteriskToken) | Ln(Fe.name) | z(Fe.questionToken) | ke(Fe.typeParameters) | ke(Fe.parameters) | z(Fe.type) | z(Fe.body) & -67108865 | (xn ? 128 : It ? 256 : fr ? 2048 : 0) | (Fe.questionToken || Fe.typeParameters || Fe.type ? 1 : 0) | 1024; + } + return Fe.typeArguments = void 0, Fe.jsDoc = void 0, Fe.locals = void 0, Fe.nextContainer = void 0, Fe.flowNode = void 0, Fe.endFlowNode = void 0, Fe.returnFlowNode = void 0, Fe; + } + function He(n, i, s, l, d, v, F, pe, Fe) { + return n.modifiers !== i || n.asteriskToken !== s || n.name !== l || n.questionToken !== d || n.typeParameters !== v || n.parameters !== F || n.type !== pe || n.body !== Fe ? Qe(Te(i, s, l, d, v, F, pe, Fe), n) : n; + } + function Qe(n, i) { + return n !== i && (n.exclamationToken = i.exclamationToken), j(n, i); + } + function st(n) { + let i = ae(176); + return i.body = n, i.transformFlags = z(n) | 16777216, i.modifiers = void 0, i.jsDoc = void 0, i.locals = void 0, i.nextContainer = void 0, i.endFlowNode = void 0, i.returnFlowNode = void 0, i; + } + function Ct(n, i) { + return n.body !== i ? Tt(st(i), n) : n; + } + function Tt(n, i) { + return n !== i && (n.modifiers = i.modifiers), j(n, i); + } + function lt(n, i, s) { + let l = ae(177); + return l.modifiers = Pe(n), l.parameters = de(i), l.body = s, l.body ? l.transformFlags = ke(l.modifiers) | ke(l.parameters) | z(l.body) & -67108865 | 1024 : l.transformFlags = 1, l.typeParameters = void 0, l.type = void 0, l.typeArguments = void 0, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.endFlowNode = void 0, l.returnFlowNode = void 0, l; + } + function Mr(n, i, s, l) { + return n.modifiers !== i || n.parameters !== s || n.body !== l ? gr(lt(i, s, l), n) : n; + } + function gr(n, i) { + return n !== i && (n.typeParameters = i.typeParameters, n.type = i.type), Oe(n, i); + } + function Nn(n, i, s, l, d) { + let v = ae(178); + return v.modifiers = Pe(n), v.name = et(i), v.parameters = de(s), v.type = l, v.body = d, v.body ? v.transformFlags = ke(v.modifiers) | Ln(v.name) | ke(v.parameters) | z(v.type) | z(v.body) & -67108865 | (v.type ? 1 : 0) : v.transformFlags = 1, v.typeArguments = void 0, v.typeParameters = void 0, v.jsDoc = void 0, v.locals = void 0, v.nextContainer = void 0, v.flowNode = void 0, v.endFlowNode = void 0, v.returnFlowNode = void 0, v; + } + function Wn(n, i, s, l, d, v) { + return n.modifiers !== i || n.name !== s || n.parameters !== l || n.type !== d || n.body !== v ? wi(Nn(i, s, l, d, v), n) : n; + } + function wi(n, i) { + return n !== i && (n.typeParameters = i.typeParameters), Oe(n, i); + } + function U(n, i, s, l) { + let d = ae(179); + return d.modifiers = Pe(n), d.name = et(i), d.parameters = de(s), d.body = l, d.body ? d.transformFlags = ke(d.modifiers) | Ln(d.name) | ke(d.parameters) | z(d.body) & -67108865 | (d.type ? 1 : 0) : d.transformFlags = 1, d.typeArguments = void 0, d.typeParameters = void 0, d.type = void 0, d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d.flowNode = void 0, d.endFlowNode = void 0, d.returnFlowNode = void 0, d; + } + function K(n, i, s, l, d) { + return n.modifiers !== i || n.name !== s || n.parameters !== l || n.body !== d ? Z(U(i, s, l, d), n) : n; + } + function Z(n, i) { + return n !== i && (n.typeParameters = i.typeParameters, n.type = i.type), Oe(n, i); + } + function xe(n, i, s) { + let l = ae(180); + return l.typeParameters = Pe(n), l.parameters = Pe(i), l.type = s, l.transformFlags = 1, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.typeArguments = void 0, l; + } + function Se(n, i, s, l) { + return n.typeParameters !== i || n.parameters !== s || n.type !== l ? Oe(xe(i, s, l), n) : n; + } + function we(n, i, s) { + let l = ae(181); + return l.typeParameters = Pe(n), l.parameters = Pe(i), l.type = s, l.transformFlags = 1, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.typeArguments = void 0, l; + } + function me(n, i, s, l) { + return n.typeParameters !== i || n.parameters !== s || n.type !== l ? Oe(we(i, s, l), n) : n; + } + function Ve(n, i, s) { + let l = ae(182); + return l.modifiers = Pe(n), l.parameters = Pe(i), l.type = s, l.transformFlags = 1, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.typeArguments = void 0, l; + } + function Ze(n, i, s, l) { + return n.parameters !== s || n.type !== l || n.modifiers !== i ? Oe(Ve(i, s, l), n) : n; + } + function Ye(n, i) { + let s = O(205); + return s.type = n, s.literal = i, s.transformFlags = 1, s; + } + function Ee(n, i, s) { + return n.type !== i || n.literal !== s ? j(Ye(i, s), n) : n; + } + function gn(n) { + return ot(n); + } + function rt(n, i, s) { + let l = O(183); + return l.assertsModifier = n, l.parameterName = et(i), l.type = s, l.transformFlags = 1, l; + } + function on(n, i, s, l) { + return n.assertsModifier !== i || n.parameterName !== s || n.type !== l ? j(rt(i, s, l), n) : n; + } + function Zr(n, i) { + let s = O(184); + return s.typeName = et(n), s.typeArguments = i && _().parenthesizeTypeArguments(de(i)), s.transformFlags = 1, s; + } + function M(n, i, s) { + return n.typeName !== i || n.typeArguments !== s ? j(Zr(i, s), n) : n; + } + function Ue(n, i, s) { + let l = ae(185); + return l.typeParameters = Pe(n), l.parameters = Pe(i), l.type = s, l.transformFlags = 1, l.modifiers = void 0, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.typeArguments = void 0, l; + } + function u(n, i, s, l) { + return n.typeParameters !== i || n.parameters !== s || n.type !== l ? Ie(Ue(i, s, l), n) : n; + } + function Ie(n, i) { + return n !== i && (n.modifiers = i.modifiers), Oe(n, i); + } + function Me(...n) { + return n.length === 4 ? B(...n) : n.length === 3 ? Be(...n) : q.fail("Incorrect number of arguments specified."); + } + function B(n, i, s, l) { + let d = ae(186); + return d.modifiers = Pe(n), d.typeParameters = Pe(i), d.parameters = Pe(s), d.type = l, d.transformFlags = 1, d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d.typeArguments = void 0, d; + } + function Be(n, i, s) { + return B(void 0, n, i, s); + } + function nn(...n) { + return n.length === 5 ? ze(...n) : n.length === 4 ? Xe(...n) : q.fail("Incorrect number of arguments specified."); + } + function ze(n, i, s, l, d) { + return n.modifiers !== i || n.typeParameters !== s || n.parameters !== l || n.type !== d ? Oe(Me(i, s, l, d), n) : n; + } + function Xe(n, i, s, l) { + return ze(n, n.modifiers, i, s, l); + } + function Dt(n, i) { + let s = O(187); + return s.exprName = n, s.typeArguments = i && _().parenthesizeTypeArguments(i), s.transformFlags = 1, s; + } + function wt(n, i, s) { + return n.exprName !== i || n.typeArguments !== s ? j(Dt(i, s), n) : n; + } + function Pt(n) { + let i = ae(188); + return i.members = de(n), i.transformFlags = 1, i; + } + function Ft(n, i) { + return n.members !== i ? j(Pt(i), n) : n; + } + function Gn(n) { + let i = O(189); + return i.elementType = _().parenthesizeNonArrayTypeOfPostfixType(n), i.transformFlags = 1, i; + } + function ki(n, i) { + return n.elementType !== i ? j(Gn(i), n) : n; + } + function cn(n) { + let i = O(190); + return i.elements = de(_().parenthesizeElementTypesOfTupleType(n)), i.transformFlags = 1, i; + } + function H(n, i) { + return n.elements !== i ? j(cn(i), n) : n; + } + function le(n, i, s, l) { + let d = ae(203); + return d.dotDotDotToken = n, d.name = i, d.questionToken = s, d.type = l, d.transformFlags = 1, d.jsDoc = void 0, d; + } + function qe(n, i, s, l, d) { + return n.dotDotDotToken !== i || n.name !== s || n.questionToken !== l || n.type !== d ? j(le(i, s, l, d), n) : n; + } + function ve(n) { + let i = O(191); + return i.type = _().parenthesizeTypeOfOptionalType(n), i.transformFlags = 1, i; + } + function J(n, i) { + return n.type !== i ? j(ve(i), n) : n; + } + function mt(n) { + let i = O(192); + return i.type = n, i.transformFlags = 1, i; + } + function xt(n, i) { + return n.type !== i ? j(mt(i), n) : n; + } + function Jt(n, i, s) { + let l = O(n); + return l.types = he.createNodeArray(s(i)), l.transformFlags = 1, l; + } + function ln(n, i, s) { + return n.types !== i ? j(Jt(n.kind, i, s), n) : n; + } + function ql(n) { + return Jt(193, n, _().parenthesizeConstituentTypesOfUnionType); + } + function C_(n, i) { + return ln(n, i, _().parenthesizeConstituentTypesOfUnionType); + } + function Lr(n) { + return Jt(194, n, _().parenthesizeConstituentTypesOfIntersectionType); + } + function Le(n, i) { + return ln(n, i, _().parenthesizeConstituentTypesOfIntersectionType); + } + function pt(n, i, s, l) { + let d = O(195); + return d.checkType = _().parenthesizeCheckTypeOfConditionalType(n), d.extendsType = _().parenthesizeExtendsTypeOfConditionalType(i), d.trueType = s, d.falseType = l, d.transformFlags = 1, d.locals = void 0, d.nextContainer = void 0, d; + } + function Fl(n, i, s, l, d) { + return n.checkType !== i || n.extendsType !== s || n.trueType !== l || n.falseType !== d ? j(pt(i, s, l, d), n) : n; + } + function Yn(n) { + let i = O(196); + return i.typeParameter = n, i.transformFlags = 1, i; + } + function zl(n, i) { + return n.typeParameter !== i ? j(Yn(i), n) : n; + } + function Wt(n, i) { + let s = O(204); + return s.head = n, s.templateSpans = de(i), s.transformFlags = 1, s; + } + function Vl(n, i, s) { + return n.head !== i || n.templateSpans !== s ? j(Wt(i, s), n) : n; + } + function _r(n, i, s, l, d = !1) { + let v = O(206); + return v.argument = n, v.attributes = i, v.assertions && v.assertions.assertClause && v.attributes && (v.assertions.assertClause = v.attributes), v.qualifier = s, v.typeArguments = l && _().parenthesizeTypeArguments(l), v.isTypeOf = d, v.transformFlags = 1, v; + } + function oa(n, i, s, l, d, v = n.isTypeOf) { + return n.argument !== i || n.attributes !== s || n.qualifier !== l || n.typeArguments !== d || n.isTypeOf !== v ? j(_r(i, s, l, d, v), n) : n; + } + function Qt(n) { + let i = O(197); + return i.type = n, i.transformFlags = 1, i; + } + function At(n, i) { + return n.type !== i ? j(Qt(i), n) : n; + } + function P() { + let n = O(198); + return n.transformFlags = 1, n; + } + function Gt(n, i) { + let s = O(199); + return s.operator = n, s.type = n === 148 ? _().parenthesizeOperandOfReadonlyTypeOperator(i) : _().parenthesizeOperandOfTypeOperator(i), s.transformFlags = 1, s; + } + function Jr(n, i) { + return n.type !== i ? j(Gt(n.operator, i), n) : n; + } + function or(n, i) { + let s = O(200); + return s.objectType = _().parenthesizeNonArrayTypeOfPostfixType(n), s.indexType = i, s.transformFlags = 1, s; + } + function Ka(n, i, s) { + return n.objectType !== i || n.indexType !== s ? j(or(i, s), n) : n; + } + function gt(n, i, s, l, d, v) { + let F = ae(201); + return F.readonlyToken = n, F.typeParameter = i, F.nameType = s, F.questionToken = l, F.type = d, F.members = v && de(v), F.transformFlags = 1, F.locals = void 0, F.nextContainer = void 0, F; + } + function jt(n, i, s, l, d, v, F) { + return n.readonlyToken !== i || n.typeParameter !== s || n.nameType !== l || n.questionToken !== d || n.type !== v || n.members !== F ? j(gt(i, s, l, d, v, F), n) : n; + } + function ei(n) { + let i = O(202); + return i.literal = n, i.transformFlags = 1, i; + } + function br(n, i) { + return n.literal !== i ? j(ei(i), n) : n; + } + function D_(n) { + let i = O(207); + return i.elements = de(n), i.transformFlags |= ke(i.elements) | 525312, i.transformFlags & 32768 && (i.transformFlags |= 65664), i; + } + function Wl(n, i) { + return n.elements !== i ? j(D_(i), n) : n; + } + function jr(n) { + let i = O(208); + return i.elements = de(n), i.transformFlags |= ke(i.elements) | 525312, i; + } + function Gl(n, i) { + return n.elements !== i ? j(jr(i), n) : n; + } + function ca(n, i, s, l) { + let d = ae(209); + return d.dotDotDotToken = n, d.propertyName = et(i), d.name = et(s), d.initializer = zi(l), d.transformFlags |= z(d.dotDotDotToken) | Ln(d.propertyName) | Ln(d.name) | z(d.initializer) | (d.dotDotDotToken ? 32768 : 0) | 1024, d.flowNode = void 0, d; + } + function ti(n, i, s, l, d) { + return n.propertyName !== s || n.dotDotDotToken !== i || n.name !== l || n.initializer !== d ? j(ca(i, s, l, d), n) : n; + } + function Za(n, i) { + let s = O(210), l = n && Ba(n), d = de(n, l && W1(l) ? !0 : void 0); + return s.elements = _().parenthesizeExpressionsOfCommaDelimitedList(d), s.multiLine = i, s.transformFlags |= ke(s.elements), s; + } + function P_(n, i) { + return n.elements !== i ? j(Za(i, n.multiLine), n) : n; + } + function Ei(n, i) { + let s = ae(211); + return s.properties = de(n), s.multiLine = i, s.transformFlags |= ke(s.properties), s.jsDoc = void 0, s; + } + function Yl(n, i) { + return n.properties !== i ? j(Ei(i, n.multiLine), n) : n; + } + function N_(n, i, s) { + let l = ae(212); + return l.expression = n, l.questionDotToken = i, l.name = s, l.transformFlags = z(l.expression) | z(l.questionDotToken) | (Ke(l.name) ? ja(l.name) : z(l.name) | 536870912), l.jsDoc = void 0, l.flowNode = void 0, l; + } + function cr(n, i) { + let s = N_(_().parenthesizeLeftSideOfAccess(n, !1), void 0, et(i)); + return Ap(n) && (s.transformFlags |= 384), s; + } + function Hl(n, i, s) { + return Og(n) ? la(n, i, n.questionDotToken, Er(s, Ke)) : n.expression !== i || n.name !== s ? j(cr(i, s), n) : n; + } + function Ai(n, i, s) { + let l = N_(_().parenthesizeLeftSideOfAccess(n, !0), i, et(s)); + return l.flags |= 64, l.transformFlags |= 32, l; + } + function la(n, i, s, l) { + return q.assert(!!(n.flags & 64), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."), n.expression !== i || n.questionDotToken !== s || n.name !== l ? j(Ai(i, s, l), n) : n; + } + function I_(n, i, s) { + let l = ae(213); + return l.expression = n, l.questionDotToken = i, l.argumentExpression = s, l.transformFlags |= z(l.expression) | z(l.questionDotToken) | z(l.argumentExpression), l.jsDoc = void 0, l.flowNode = void 0, l; + } + function Ci(n, i) { + let s = I_(_().parenthesizeLeftSideOfAccess(n, !1), void 0, wr(i)); + return Ap(n) && (s.transformFlags |= 384), s; + } + function Xl(n, i, s) { + return Mg(n) ? es(n, i, n.questionDotToken, s) : n.expression !== i || n.argumentExpression !== s ? j(Ci(i, s), n) : n; + } + function O_(n, i, s) { + let l = I_(_().parenthesizeLeftSideOfAccess(n, !0), i, wr(s)); + return l.flags |= 64, l.transformFlags |= 32, l; + } + function es(n, i, s, l) { + return q.assert(!!(n.flags & 64), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."), n.expression !== i || n.questionDotToken !== s || n.argumentExpression !== l ? j(O_(i, s, l), n) : n; + } + function M_(n, i, s, l) { + let d = ae(214); + return d.expression = n, d.questionDotToken = i, d.typeArguments = s, d.arguments = l, d.transformFlags |= z(d.expression) | z(d.questionDotToken) | ke(d.typeArguments) | ke(d.arguments), d.typeArguments && (d.transformFlags |= 1), Jd(d.expression) && (d.transformFlags |= 16384), d; + } + function Di(n, i, s) { + let l = M_(_().parenthesizeLeftSideOfAccess(n, !1), void 0, Pe(i), _().parenthesizeExpressionsOfCommaDelimitedList(de(s))); + return Bb(l.expression) && (l.transformFlags |= 8388608), l; + } + function ua(n, i, s, l) { + return Dd(n) ? L_(n, i, n.questionDotToken, s, l) : n.expression !== i || n.typeArguments !== s || n.arguments !== l ? j(Di(i, s, l), n) : n; + } + function ts(n, i, s, l) { + let d = M_(_().parenthesizeLeftSideOfAccess(n, !0), i, Pe(s), _().parenthesizeExpressionsOfCommaDelimitedList(de(l))); + return d.flags |= 64, d.transformFlags |= 32, d; + } + function L_(n, i, s, l, d) { + return q.assert(!!(n.flags & 64), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."), n.expression !== i || n.questionDotToken !== s || n.typeArguments !== l || n.arguments !== d ? j(ts(i, s, l, d), n) : n; + } + function bn(n, i, s) { + let l = ae(215); + return l.expression = _().parenthesizeExpressionOfNew(n), l.typeArguments = Pe(i), l.arguments = s ? _().parenthesizeExpressionsOfCommaDelimitedList(s) : void 0, l.transformFlags |= z(l.expression) | ke(l.typeArguments) | ke(l.arguments) | 32, l.typeArguments && (l.transformFlags |= 1), l; + } + function ns(n, i, s, l) { + return n.expression !== i || n.typeArguments !== s || n.arguments !== l ? j(bn(i, s, l), n) : n; + } + function pa(n, i, s) { + let l = O(216); + return l.tag = _().parenthesizeLeftSideOfAccess(n, !1), l.typeArguments = Pe(i), l.template = s, l.transformFlags |= z(l.tag) | ke(l.typeArguments) | z(l.template) | 1024, l.typeArguments && (l.transformFlags |= 1), R2(l.template) && (l.transformFlags |= 128), l; + } + function J_(n, i, s, l) { + return n.tag !== i || n.typeArguments !== s || n.template !== l ? j(pa(i, s, l), n) : n; + } + function j_(n, i) { + let s = O(217); + return s.expression = _().parenthesizeOperandOfPrefixUnary(i), s.type = n, s.transformFlags |= z(s.expression) | z(s.type) | 1, s; + } + function R_(n, i, s) { + return n.type !== i || n.expression !== s ? j(j_(i, s), n) : n; + } + function rs(n) { + let i = O(218); + return i.expression = n, i.transformFlags = z(i.expression), i.jsDoc = void 0, i; + } + function U_(n, i) { + return n.expression !== i ? j(rs(i), n) : n; + } + function is(n, i, s, l, d, v, F) { + let pe = ae(219); + pe.modifiers = Pe(n), pe.asteriskToken = i, pe.name = et(s), pe.typeParameters = Pe(l), pe.parameters = de(d), pe.type = v, pe.body = F; + let Fe = Jn(pe.modifiers) & 1024, It = !!pe.asteriskToken, fr = Fe && It; + return pe.transformFlags = ke(pe.modifiers) | z(pe.asteriskToken) | Ln(pe.name) | ke(pe.typeParameters) | ke(pe.parameters) | z(pe.type) | z(pe.body) & -67108865 | (fr ? 128 : Fe ? 256 : It ? 2048 : 0) | (pe.typeParameters || pe.type ? 1 : 0) | 4194304, pe.typeArguments = void 0, pe.jsDoc = void 0, pe.locals = void 0, pe.nextContainer = void 0, pe.flowNode = void 0, pe.endFlowNode = void 0, pe.returnFlowNode = void 0, pe; + } + function B_(n, i, s, l, d, v, F, pe) { + return n.name !== l || n.modifiers !== i || n.asteriskToken !== s || n.typeParameters !== d || n.parameters !== v || n.type !== F || n.body !== pe ? Oe(is(i, s, l, d, v, F, pe), n) : n; + } + function as(n, i, s, l, d, v) { + let F = ae(220); + F.modifiers = Pe(n), F.typeParameters = Pe(i), F.parameters = de(s), F.type = l, F.equalsGreaterThanToken = d ?? ot(39), F.body = _().parenthesizeConciseBodyOfArrowFunction(v); + let pe = Jn(F.modifiers) & 1024; + return F.transformFlags = ke(F.modifiers) | ke(F.typeParameters) | ke(F.parameters) | z(F.type) | z(F.equalsGreaterThanToken) | z(F.body) & -67108865 | (F.typeParameters || F.type ? 1 : 0) | (pe ? 16640 : 0) | 1024, F.typeArguments = void 0, F.jsDoc = void 0, F.locals = void 0, F.nextContainer = void 0, F.flowNode = void 0, F.endFlowNode = void 0, F.returnFlowNode = void 0, F; + } + function q_(n, i, s, l, d, v, F) { + return n.modifiers !== i || n.typeParameters !== s || n.parameters !== l || n.type !== d || n.equalsGreaterThanToken !== v || n.body !== F ? Oe(as(i, s, l, d, v, F), n) : n; + } + function F_(n) { + let i = O(221); + return i.expression = _().parenthesizeOperandOfPrefixUnary(n), i.transformFlags |= z(i.expression), i; + } + function z_(n, i) { + return n.expression !== i ? j(F_(i), n) : n; + } + function fa(n) { + let i = O(222); + return i.expression = _().parenthesizeOperandOfPrefixUnary(n), i.transformFlags |= z(i.expression), i; + } + function un(n, i) { + return n.expression !== i ? j(fa(i), n) : n; + } + function ss(n) { + let i = O(223); + return i.expression = _().parenthesizeOperandOfPrefixUnary(n), i.transformFlags |= z(i.expression), i; + } + function lr(n, i) { + return n.expression !== i ? j(ss(i), n) : n; + } + function V_(n) { + let i = O(224); + return i.expression = _().parenthesizeOperandOfPrefixUnary(n), i.transformFlags |= z(i.expression) | 2097536, i; + } + function Rr(n, i) { + return n.expression !== i ? j(V_(i), n) : n; + } + function Ur(n, i) { + let s = O(225); + return s.operator = n, s.operand = _().parenthesizeOperandOfPrefixUnary(i), s.transformFlags |= z(s.operand), (n === 46 || n === 47) && Ke(s.operand) && !Ua(s.operand) && !Yd(s.operand) && (s.transformFlags |= 268435456), s; + } + function $l(n, i) { + return n.operand !== i ? j(Ur(n.operator, i), n) : n; + } + function ni(n, i) { + let s = O(226); + return s.operator = i, s.operand = _().parenthesizeOperandOfPostfixUnary(n), s.transformFlags |= z(s.operand), Ke(s.operand) && !Ua(s.operand) && !Yd(s.operand) && (s.transformFlags |= 268435456), s; + } + function Ql(n, i) { + return n.operand !== i ? j(ni(i, n.operator), n) : n; + } + function da(n, i, s) { + let l = ae(227), d = mp(i), v = d.kind; + return l.left = _().parenthesizeLeftSideOfBinary(v, n), l.operatorToken = d, l.right = _().parenthesizeRightSideOfBinary(v, l.left, s), l.transformFlags |= z(l.left) | z(l.operatorToken) | z(l.right), v === 61 ? l.transformFlags |= 32 : v === 64 ? If(l.left) ? l.transformFlags |= 5248 | W_(l.left) : q1(l.left) && (l.transformFlags |= 5120 | W_(l.left)) : v === 43 || v === 68 ? l.transformFlags |= 512 : X2(v) && (l.transformFlags |= 16), v === 103 && gi(l.left) && (l.transformFlags |= 536870912), l.jsDoc = void 0, l; + } + function W_(n) { + return _h(n) ? 65536 : 0; + } + function Kl(n, i, s, l) { + return n.left !== i || n.operatorToken !== s || n.right !== l ? j(da(i, s, l), n) : n; + } + function G_(n, i, s, l, d) { + let v = O(228); + return v.condition = _().parenthesizeConditionOfConditionalExpression(n), v.questionToken = i ?? ot(58), v.whenTrue = _().parenthesizeBranchOfConditionalExpression(s), v.colonToken = l ?? ot(59), v.whenFalse = _().parenthesizeBranchOfConditionalExpression(d), v.transformFlags |= z(v.condition) | z(v.questionToken) | z(v.whenTrue) | z(v.colonToken) | z(v.whenFalse), v.flowNodeWhenFalse = void 0, v.flowNodeWhenTrue = void 0, v; + } + function Y_(n, i, s, l, d, v) { + return n.condition !== i || n.questionToken !== s || n.whenTrue !== l || n.colonToken !== d || n.whenFalse !== v ? j(G_(i, s, l, d, v), n) : n; + } + function H_(n, i) { + let s = O(229); + return s.head = n, s.templateSpans = de(i), s.transformFlags |= z(s.head) | ke(s.templateSpans) | 1024, s; + } + function Hn(n, i, s) { + return n.head !== i || n.templateSpans !== s ? j(H_(i, s), n) : n; + } + function Pi(n, i, s, l = 0) { + q.assert(!(l & -7177), "Unsupported template flags."); + let d; + if (s !== void 0 && s !== i && (d = Nb(n, s), typeof d == "object")) return q.fail("Invalid raw text"); + if (i === void 0) { + if (d === void 0) return q.fail("Arguments 'text' and 'rawText' may not both be undefined."); + i = d; + } else d !== void 0 && q.assert(i === d, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."); + return i; + } + function X_(n) { + let i = 1024; + return n && (i |= 128), i; + } + function Zl(n, i, s, l) { + let d = $t(n); + return d.text = i, d.rawText = s, d.templateFlags = l & 7176, d.transformFlags = X_(d.templateFlags), d; + } + function ri(n, i, s, l) { + let d = ae(n); + return d.text = i, d.rawText = s, d.templateFlags = l & 7176, d.transformFlags = X_(d.templateFlags), d; + } + function ii(n, i, s, l) { + return n === 15 ? ri(n, i, s, l) : Zl(n, i, s, l); + } + function $_(n, i, s) { + return n = Pi(16, n, i, s), ii(16, n, i, s); + } + function ma(n, i, s) { + return n = Pi(16, n, i, s), ii(17, n, i, s); + } + function _s(n, i, s) { + return n = Pi(16, n, i, s), ii(18, n, i, s); + } + function eu(n, i, s) { + return n = Pi(16, n, i, s), ri(15, n, i, s); + } + function os(n, i) { + q.assert(!n || !!i, "A `YieldExpression` with an asteriskToken must have an expression."); + let s = O(230); + return s.expression = i && _().parenthesizeExpressionForDisallowedComma(i), s.asteriskToken = n, s.transformFlags |= z(s.expression) | z(s.asteriskToken) | 1049728, s; + } + function tu(n, i, s) { + return n.expression !== s || n.asteriskToken !== i ? j(os(i, s), n) : n; + } + function Q_(n) { + let i = O(231); + return i.expression = _().parenthesizeExpressionForDisallowedComma(n), i.transformFlags |= z(i.expression) | 33792, i; + } + function nu(n, i) { + return n.expression !== i ? j(Q_(i), n) : n; + } + function K_(n, i, s, l, d) { + let v = ae(232); + return v.modifiers = Pe(n), v.name = et(i), v.typeParameters = Pe(s), v.heritageClauses = Pe(l), v.members = de(d), v.transformFlags |= ke(v.modifiers) | Ln(v.name) | ke(v.typeParameters) | ke(v.heritageClauses) | ke(v.members) | (v.typeParameters ? 1 : 0) | 1024, v.jsDoc = void 0, v; + } + function cs(n, i, s, l, d, v) { + return n.modifiers !== i || n.name !== s || n.typeParameters !== l || n.heritageClauses !== d || n.members !== v ? j(K_(i, s, l, d, v), n) : n; + } + function ls() { + return O(233); + } + function Z_(n, i) { + let s = O(234); + return s.expression = _().parenthesizeLeftSideOfAccess(n, !1), s.typeArguments = i && _().parenthesizeTypeArguments(i), s.transformFlags |= z(s.expression) | ke(s.typeArguments) | 1024, s; + } + function eo(n, i, s) { + return n.expression !== i || n.typeArguments !== s ? j(Z_(i, s), n) : n; + } + function pn(n, i) { + let s = O(235); + return s.expression = n, s.type = i, s.transformFlags |= z(s.expression) | z(s.type) | 1, s; + } + function ha(n, i, s) { + return n.expression !== i || n.type !== s ? j(pn(i, s), n) : n; + } + function to(n) { + let i = O(236); + return i.expression = _().parenthesizeLeftSideOfAccess(n, !1), i.transformFlags |= z(i.expression) | 1, i; + } + function no(n, i) { + return Lg(n) ? In(n, i) : n.expression !== i ? j(to(i), n) : n; + } + function us(n, i) { + let s = O(239); + return s.expression = n, s.type = i, s.transformFlags |= z(s.expression) | z(s.type) | 1, s; + } + function ro(n, i, s) { + return n.expression !== i || n.type !== s ? j(us(i, s), n) : n; + } + function ps(n) { + let i = O(236); + return i.flags |= 64, i.expression = _().parenthesizeLeftSideOfAccess(n, !0), i.transformFlags |= z(i.expression) | 1, i; + } + function In(n, i) { + return q.assert(!!(n.flags & 64), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."), n.expression !== i ? j(ps(i), n) : n; + } + function io(n, i) { + let s = O(237); + switch (s.keywordToken = n, s.name = i, s.transformFlags |= z(s.name), n) { + case 105: + s.transformFlags |= 1024; + break; + case 102: + s.transformFlags |= 32; + break; + default: return q.assertNever(n); + } + return s.flowNode = void 0, s; + } + function fs(n, i) { + return n.name !== i ? j(io(n.keywordToken, i), n) : n; + } + function Xn(n, i) { + let s = O(240); + return s.expression = n, s.literal = i, s.transformFlags |= z(s.expression) | z(s.literal) | 1024, s; + } + function ya(n, i, s) { + return n.expression !== i || n.literal !== s ? j(Xn(i, s), n) : n; + } + function ao() { + let n = O(241); + return n.transformFlags |= 1024, n; + } + function Br(n, i) { + let s = O(242); + return s.statements = de(n), s.multiLine = i, s.transformFlags |= ke(s.statements), s.jsDoc = void 0, s.locals = void 0, s.nextContainer = void 0, s; + } + function ru(n, i) { + return n.statements !== i ? j(Br(i, n.multiLine), n) : n; + } + function ds(n, i) { + let s = O(244); + return s.modifiers = Pe(n), s.declarationList = $r(i) ? vs(i) : i, s.transformFlags |= ke(s.modifiers) | z(s.declarationList), Jn(s.modifiers) & 128 && (s.transformFlags = 1), s.jsDoc = void 0, s.flowNode = void 0, s; + } + function so(n, i, s) { + return n.modifiers !== i || n.declarationList !== s ? j(ds(i, s), n) : n; + } + function _o() { + let n = O(243); + return n.jsDoc = void 0, n; + } + function Ni(n) { + let i = O(245); + return i.expression = _().parenthesizeExpressionOfExpressionStatement(n), i.transformFlags |= z(i.expression), i.jsDoc = void 0, i.flowNode = void 0, i; + } + function oo(n, i) { + return n.expression !== i ? j(Ni(i), n) : n; + } + function co(n, i, s) { + let l = O(246); + return l.expression = n, l.thenStatement = $n(i), l.elseStatement = $n(s), l.transformFlags |= z(l.expression) | z(l.thenStatement) | z(l.elseStatement), l.jsDoc = void 0, l.flowNode = void 0, l; + } + function lo(n, i, s, l) { + return n.expression !== i || n.thenStatement !== s || n.elseStatement !== l ? j(co(i, s, l), n) : n; + } + function uo(n, i) { + let s = O(247); + return s.statement = $n(n), s.expression = i, s.transformFlags |= z(s.statement) | z(s.expression), s.jsDoc = void 0, s.flowNode = void 0, s; + } + function po(n, i, s) { + return n.statement !== i || n.expression !== s ? j(uo(i, s), n) : n; + } + function fo(n, i) { + let s = O(248); + return s.expression = n, s.statement = $n(i), s.transformFlags |= z(s.expression) | z(s.statement), s.jsDoc = void 0, s.flowNode = void 0, s; + } + function iu(n, i, s) { + return n.expression !== i || n.statement !== s ? j(fo(i, s), n) : n; + } + function mo(n, i, s, l) { + let d = O(249); + return d.initializer = n, d.condition = i, d.incrementor = s, d.statement = $n(l), d.transformFlags |= z(d.initializer) | z(d.condition) | z(d.incrementor) | z(d.statement), d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d.flowNode = void 0, d; + } + function ho(n, i, s, l, d) { + return n.initializer !== i || n.condition !== s || n.incrementor !== l || n.statement !== d ? j(mo(i, s, l, d), n) : n; + } + function ms(n, i, s) { + let l = O(250); + return l.initializer = n, l.expression = i, l.statement = $n(s), l.transformFlags |= z(l.initializer) | z(l.expression) | z(l.statement), l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l.flowNode = void 0, l; + } + function au(n, i, s, l) { + return n.initializer !== i || n.expression !== s || n.statement !== l ? j(ms(i, s, l), n) : n; + } + function yo(n, i, s, l) { + let d = O(251); + return d.awaitModifier = n, d.initializer = i, d.expression = _().parenthesizeExpressionForDisallowedComma(s), d.statement = $n(l), d.transformFlags |= z(d.awaitModifier) | z(d.initializer) | z(d.expression) | z(d.statement) | 1024, n && (d.transformFlags |= 128), d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d.flowNode = void 0, d; + } + function su(n, i, s, l, d) { + return n.awaitModifier !== i || n.initializer !== s || n.expression !== l || n.statement !== d ? j(yo(i, s, l, d), n) : n; + } + function go(n) { + let i = O(252); + return i.label = et(n), i.transformFlags |= z(i.label) | 4194304, i.jsDoc = void 0, i.flowNode = void 0, i; + } + function _u(n, i) { + return n.label !== i ? j(go(i), n) : n; + } + function hs(n) { + let i = O(253); + return i.label = et(n), i.transformFlags |= z(i.label) | 4194304, i.jsDoc = void 0, i.flowNode = void 0, i; + } + function bo(n, i) { + return n.label !== i ? j(hs(i), n) : n; + } + function ys(n) { + let i = O(254); + return i.expression = n, i.transformFlags |= z(i.expression) | 4194432, i.jsDoc = void 0, i.flowNode = void 0, i; + } + function ou(n, i) { + return n.expression !== i ? j(ys(i), n) : n; + } + function gs(n, i) { + let s = O(255); + return s.expression = n, s.statement = $n(i), s.transformFlags |= z(s.expression) | z(s.statement), s.jsDoc = void 0, s.flowNode = void 0, s; + } + function vo(n, i, s) { + return n.expression !== i || n.statement !== s ? j(gs(i, s), n) : n; + } + function bs(n, i) { + let s = O(256); + return s.expression = _().parenthesizeExpressionForDisallowedComma(n), s.caseBlock = i, s.transformFlags |= z(s.expression) | z(s.caseBlock), s.jsDoc = void 0, s.flowNode = void 0, s.possiblyExhaustive = !1, s; + } + function ai(n, i, s) { + return n.expression !== i || n.caseBlock !== s ? j(bs(i, s), n) : n; + } + function To(n, i) { + let s = O(257); + return s.label = et(n), s.statement = $n(i), s.transformFlags |= z(s.label) | z(s.statement), s.jsDoc = void 0, s.flowNode = void 0, s; + } + function xo(n, i, s) { + return n.label !== i || n.statement !== s ? j(To(i, s), n) : n; + } + function So(n) { + let i = O(258); + return i.expression = n, i.transformFlags |= z(i.expression), i.jsDoc = void 0, i.flowNode = void 0, i; + } + function cu(n, i) { + return n.expression !== i ? j(So(i), n) : n; + } + function wo(n, i, s) { + let l = O(259); + return l.tryBlock = n, l.catchClause = i, l.finallyBlock = s, l.transformFlags |= z(l.tryBlock) | z(l.catchClause) | z(l.finallyBlock), l.jsDoc = void 0, l.flowNode = void 0, l; + } + function lu(n, i, s, l) { + return n.tryBlock !== i || n.catchClause !== s || n.finallyBlock !== l ? j(wo(i, s, l), n) : n; + } + function ko() { + let n = O(260); + return n.jsDoc = void 0, n.flowNode = void 0, n; + } + function ga(n, i, s, l) { + let d = ae(261); + return d.name = et(n), d.exclamationToken = i, d.type = s, d.initializer = zi(l), d.transformFlags |= Ln(d.name) | z(d.initializer) | (d.exclamationToken ?? d.type ? 1 : 0), d.jsDoc = void 0, d; + } + function Eo(n, i, s, l, d) { + return n.name !== i || n.type !== l || n.exclamationToken !== s || n.initializer !== d ? j(ga(i, s, l, d), n) : n; + } + function vs(n, i = 0) { + let s = O(262); + return s.flags |= i & 7, s.declarations = de(n), s.transformFlags |= ke(s.declarations) | 4194304, i & 7 && (s.transformFlags |= 263168), i & 4 && (s.transformFlags |= 4), s; + } + function uu(n, i) { + return n.declarations !== i ? j(vs(i, n.flags), n) : n; + } + function Ao(n, i, s, l, d, v, F) { + let pe = ae(263); + if (pe.modifiers = Pe(n), pe.asteriskToken = i, pe.name = et(s), pe.typeParameters = Pe(l), pe.parameters = de(d), pe.type = v, pe.body = F, !pe.body || Jn(pe.modifiers) & 128) pe.transformFlags = 1; + else { + let Fe = Jn(pe.modifiers) & 1024, It = !!pe.asteriskToken, fr = Fe && It; + pe.transformFlags = ke(pe.modifiers) | z(pe.asteriskToken) | Ln(pe.name) | ke(pe.typeParameters) | ke(pe.parameters) | z(pe.type) | z(pe.body) & -67108865 | (fr ? 128 : Fe ? 256 : It ? 2048 : 0) | (pe.typeParameters || pe.type ? 1 : 0) | 4194304; + } + return pe.typeArguments = void 0, pe.jsDoc = void 0, pe.locals = void 0, pe.nextContainer = void 0, pe.endFlowNode = void 0, pe.returnFlowNode = void 0, pe; + } + function Ts(n, i, s, l, d, v, F, pe) { + return n.modifiers !== i || n.asteriskToken !== s || n.name !== l || n.typeParameters !== d || n.parameters !== v || n.type !== F || n.body !== pe ? pu(Ao(i, s, l, d, v, F, pe), n) : n; + } + function pu(n, i) { + return n !== i && n.modifiers === i.modifiers && (n.modifiers = i.modifiers), Oe(n, i); + } + function Co(n, i, s, l, d) { + let v = ae(264); + return v.modifiers = Pe(n), v.name = et(i), v.typeParameters = Pe(s), v.heritageClauses = Pe(l), v.members = de(d), Jn(v.modifiers) & 128 ? v.transformFlags = 1 : (v.transformFlags |= ke(v.modifiers) | Ln(v.name) | ke(v.typeParameters) | ke(v.heritageClauses) | ke(v.members) | (v.typeParameters ? 1 : 0) | 1024, v.transformFlags & 8192 && (v.transformFlags |= 1)), v.jsDoc = void 0, v; + } + function ba(n, i, s, l, d, v) { + return n.modifiers !== i || n.name !== s || n.typeParameters !== l || n.heritageClauses !== d || n.members !== v ? j(Co(i, s, l, d, v), n) : n; + } + function Do(n, i, s, l, d) { + let v = ae(265); + return v.modifiers = Pe(n), v.name = et(i), v.typeParameters = Pe(s), v.heritageClauses = Pe(l), v.members = de(d), v.transformFlags = 1, v.jsDoc = void 0, v; + } + function Po(n, i, s, l, d, v) { + return n.modifiers !== i || n.name !== s || n.typeParameters !== l || n.heritageClauses !== d || n.members !== v ? j(Do(i, s, l, d, v), n) : n; + } + function _t(n, i, s, l) { + let d = ae(266); + return d.modifiers = Pe(n), d.name = et(i), d.typeParameters = Pe(s), d.type = l, d.transformFlags = 1, d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d; + } + function vr(n, i, s, l, d) { + return n.modifiers !== i || n.name !== s || n.typeParameters !== l || n.type !== d ? j(_t(i, s, l, d), n) : n; + } + function xs(n, i, s) { + let l = ae(267); + return l.modifiers = Pe(n), l.name = et(i), l.members = de(s), l.transformFlags |= ke(l.modifiers) | z(l.name) | ke(l.members) | 1, l.transformFlags &= -67108865, l.jsDoc = void 0, l; + } + function Tr(n, i, s, l) { + return n.modifiers !== i || n.name !== s || n.members !== l ? j(xs(i, s, l), n) : n; + } + function No(n, i, s, l = 0) { + let d = ae(268); + return d.modifiers = Pe(n), d.flags |= l & 2088, d.name = i, d.body = s, Jn(d.modifiers) & 128 ? d.transformFlags = 1 : d.transformFlags |= ke(d.modifiers) | z(d.name) | z(d.body) | 1, d.transformFlags &= -67108865, d.jsDoc = void 0, d.locals = void 0, d.nextContainer = void 0, d; + } + function kt(n, i, s, l) { + return n.modifiers !== i || n.name !== s || n.body !== l ? j(No(i, s, l, n.flags), n) : n; + } + function xr(n) { + let i = O(269); + return i.statements = de(n), i.transformFlags |= ke(i.statements), i.jsDoc = void 0, i; + } + function zt(n, i) { + return n.statements !== i ? j(xr(i), n) : n; + } + function Io(n) { + let i = O(270); + return i.clauses = de(n), i.transformFlags |= ke(i.clauses), i.locals = void 0, i.nextContainer = void 0, i; + } + function fu(n, i) { + return n.clauses !== i ? j(Io(i), n) : n; + } + function Oo(n) { + let i = ae(271); + return i.name = et(n), i.transformFlags |= ja(i.name) | 1, i.modifiers = void 0, i.jsDoc = void 0, i; + } + function Mo(n, i) { + return n.name !== i ? du(Oo(i), n) : n; + } + function du(n, i) { + return n !== i && (n.modifiers = i.modifiers), j(n, i); + } + function Lo(n, i, s, l) { + let d = ae(272); + return d.modifiers = Pe(n), d.name = et(s), d.isTypeOnly = i, d.moduleReference = l, d.transformFlags |= ke(d.modifiers) | ja(d.name) | z(d.moduleReference), Ff(d.moduleReference) || (d.transformFlags |= 1), d.transformFlags &= -67108865, d.jsDoc = void 0, d; + } + function Jo(n, i, s, l, d) { + return n.modifiers !== i || n.isTypeOnly !== s || n.name !== l || n.moduleReference !== d ? j(Lo(i, s, l, d), n) : n; + } + function jo(n, i, s, l) { + let d = O(273); + return d.modifiers = Pe(n), d.importClause = i, d.moduleSpecifier = s, d.attributes = d.assertClause = l, d.transformFlags |= z(d.importClause) | z(d.moduleSpecifier), d.transformFlags &= -67108865, d.jsDoc = void 0, d; + } + function Ro(n, i, s, l, d) { + return n.modifiers !== i || n.importClause !== s || n.moduleSpecifier !== l || n.attributes !== d ? j(jo(i, s, l, d), n) : n; + } + function Uo(n, i, s) { + let l = ae(274); + return typeof n == "boolean" && (n = n ? 156 : void 0), l.isTypeOnly = n === 156, l.phaseModifier = n, l.name = i, l.namedBindings = s, l.transformFlags |= z(l.name) | z(l.namedBindings), n === 156 && (l.transformFlags |= 1), l.transformFlags &= -67108865, l; + } + function Bo(n, i, s, l) { + return typeof i == "boolean" && (i = i ? 156 : void 0), n.phaseModifier !== i || n.name !== s || n.namedBindings !== l ? j(Uo(i, s, l), n) : n; + } + function Ss(n, i) { + let s = O(301); + return s.elements = de(n), s.multiLine = i, s.token = 132, s.transformFlags |= 4, s; + } + function mu(n, i, s) { + return n.elements !== i || n.multiLine !== s ? j(Ss(i, s), n) : n; + } + function Ii(n, i) { + let s = O(302); + return s.name = n, s.value = i, s.transformFlags |= 4, s; + } + function qo(n, i, s) { + return n.name !== i || n.value !== s ? j(Ii(i, s), n) : n; + } + function ws(n, i) { + let s = O(303); + return s.assertClause = n, s.multiLine = i, s; + } + function Fo(n, i, s) { + return n.assertClause !== i || n.multiLine !== s ? j(ws(i, s), n) : n; + } + function zo(n, i, s) { + let l = O(301); + return l.token = s ?? 118, l.elements = de(n), l.multiLine = i, l.transformFlags |= 4, l; + } + function ks(n, i, s) { + return n.elements !== i || n.multiLine !== s ? j(zo(i, s, n.token), n) : n; + } + function Vo(n, i) { + let s = O(302); + return s.name = n, s.value = i, s.transformFlags |= 4, s; + } + function Wo(n, i, s) { + return n.name !== i || n.value !== s ? j(Vo(i, s), n) : n; + } + function Go(n) { + let i = ae(275); + return i.name = n, i.transformFlags |= z(i.name), i.transformFlags &= -67108865, i; + } + function hu(n, i) { + return n.name !== i ? j(Go(i), n) : n; + } + function Yo(n) { + let i = ae(281); + return i.name = n, i.transformFlags |= z(i.name) | 32, i.transformFlags &= -67108865, i; + } + function yu(n, i) { + return n.name !== i ? j(Yo(i), n) : n; + } + function Ho(n) { + let i = O(276); + return i.elements = de(n), i.transformFlags |= ke(i.elements), i.transformFlags &= -67108865, i; + } + function Xo(n, i) { + return n.elements !== i ? j(Ho(i), n) : n; + } + function Sr(n, i, s) { + let l = ae(277); + return l.isTypeOnly = n, l.propertyName = i, l.name = s, l.transformFlags |= z(l.propertyName) | z(l.name), l.transformFlags &= -67108865, l; + } + function gu(n, i, s, l) { + return n.isTypeOnly !== i || n.propertyName !== s || n.name !== l ? j(Sr(i, s, l), n) : n; + } + function va(n, i, s) { + let l = ae(278); + return l.modifiers = Pe(n), l.isExportEquals = i, l.expression = i ? _().parenthesizeRightSideOfBinary(64, void 0, s) : _().parenthesizeExpressionOfExportDefault(s), l.transformFlags |= ke(l.modifiers) | z(l.expression), l.transformFlags &= -67108865, l.jsDoc = void 0, l; + } + function Oi(n, i, s) { + return n.modifiers !== i || n.expression !== s ? j(va(i, n.isExportEquals, s), n) : n; + } + function Ta(n, i, s, l, d) { + let v = ae(279); + return v.modifiers = Pe(n), v.isTypeOnly = i, v.exportClause = s, v.moduleSpecifier = l, v.attributes = v.assertClause = d, v.transformFlags |= ke(v.modifiers) | z(v.exportClause) | z(v.moduleSpecifier), v.transformFlags &= -67108865, v.jsDoc = void 0, v; + } + function $o(n, i, s, l, d, v) { + return n.modifiers !== i || n.isTypeOnly !== s || n.exportClause !== l || n.moduleSpecifier !== d || n.attributes !== v ? Mi(Ta(i, s, l, d, v), n) : n; + } + function Mi(n, i) { + return n !== i && n.modifiers === i.modifiers && (n.modifiers = i.modifiers), j(n, i); + } + function Es(n) { + let i = O(280); + return i.elements = de(n), i.transformFlags |= ke(i.elements), i.transformFlags &= -67108865, i; + } + function bu(n, i) { + return n.elements !== i ? j(Es(i), n) : n; + } + function xa(n, i, s) { + let l = O(282); + return l.isTypeOnly = n, l.propertyName = et(i), l.name = et(s), l.transformFlags |= z(l.propertyName) | z(l.name), l.transformFlags &= -67108865, l.jsDoc = void 0, l; + } + function vu(n, i, s, l) { + return n.isTypeOnly !== i || n.propertyName !== s || n.name !== l ? j(xa(i, s, l), n) : n; + } + function Tu() { + let n = ae(283); + return n.jsDoc = void 0, n; + } + function As(n) { + let i = O(284); + return i.expression = n, i.transformFlags |= z(i.expression), i.transformFlags &= -67108865, i; + } + function xu(n, i) { + return n.expression !== i ? j(As(i), n) : n; + } + function Qo(n) { + return O(n); + } + function Ko(n, i, s = !1) { + let l = Cs(n, s ? i && _().parenthesizeNonArrayTypeOfPostfixType(i) : i); + return l.postfix = s, l; + } + function Cs(n, i) { + let s = O(n); + return s.type = i, s; + } + function Su(n, i, s) { + return i.type !== s ? j(Ko(n, s, i.postfix), i) : i; + } + function wu(n, i, s) { + return i.type !== s ? j(Cs(n, s), i) : i; + } + function Zo(n, i) { + let s = ae(318); + return s.parameters = Pe(n), s.type = i, s.transformFlags = ke(s.parameters) | (s.type ? 1 : 0), s.jsDoc = void 0, s.locals = void 0, s.nextContainer = void 0, s.typeArguments = void 0, s; + } + function ku(n, i, s) { + return n.parameters !== i || n.type !== s ? j(Zo(i, s), n) : n; + } + function ec(n, i = !1) { + let s = ae(323); + return s.jsDocPropertyTags = Pe(n), s.isArrayType = i, s; + } + function Eu(n, i, s) { + return n.jsDocPropertyTags !== i || n.isArrayType !== s ? j(ec(i, s), n) : n; + } + function tc(n) { + let i = O(310); + return i.type = n, i; + } + function Ds(n, i) { + return n.type !== i ? j(tc(i), n) : n; + } + function nc(n, i, s) { + let l = ae(324); + return l.typeParameters = Pe(n), l.parameters = de(i), l.type = s, l.jsDoc = void 0, l.locals = void 0, l.nextContainer = void 0, l; + } + function Au(n, i, s, l) { + return n.typeParameters !== i || n.parameters !== s || n.type !== l ? j(nc(i, s, l), n) : n; + } + function rn(n) { + let i = ol(n.kind); + return n.tagName.escapedText === La(i) ? n.tagName : We(i); + } + function vn(n, i, s) { + let l = O(n); + return l.tagName = i, l.comment = s, l; + } + function qr(n, i, s) { + let l = ae(n); + return l.tagName = i, l.comment = s, l; + } + function Ps(n, i, s, l) { + let d = vn(346, n ?? We("template"), l); + return d.constraint = i, d.typeParameters = de(s), d; + } + function rc(n, i = rn(n), s, l, d) { + return n.tagName !== i || n.constraint !== s || n.typeParameters !== l || n.comment !== d ? j(Ps(i, s, l, d), n) : n; + } + function Sa(n, i, s, l) { + let d = qr(347, n ?? We("typedef"), l); + return d.typeExpression = i, d.fullName = s, d.name = Hd(s), d.locals = void 0, d.nextContainer = void 0, d; + } + function Cu(n, i = rn(n), s, l, d) { + return n.tagName !== i || n.typeExpression !== s || n.fullName !== l || n.comment !== d ? j(Sa(i, s, l, d), n) : n; + } + function Ns(n, i, s, l, d, v) { + let F = qr(342, n ?? We("param"), v); + return F.typeExpression = l, F.name = i, F.isNameFirst = !!d, F.isBracketed = s, F; + } + function Du(n, i = rn(n), s, l, d, v, F) { + return n.tagName !== i || n.name !== s || n.isBracketed !== l || n.typeExpression !== d || n.isNameFirst !== v || n.comment !== F ? j(Ns(i, s, l, d, v, F), n) : n; + } + function ic(n, i, s, l, d, v) { + let F = qr(349, n ?? We("prop"), v); + return F.typeExpression = l, F.name = i, F.isNameFirst = !!d, F.isBracketed = s, F; + } + function ac(n, i = rn(n), s, l, d, v, F) { + return n.tagName !== i || n.name !== s || n.isBracketed !== l || n.typeExpression !== d || n.isNameFirst !== v || n.comment !== F ? j(ic(i, s, l, d, v, F), n) : n; + } + function sc(n, i, s, l) { + let d = qr(339, n ?? We("callback"), l); + return d.typeExpression = i, d.fullName = s, d.name = Hd(s), d.locals = void 0, d.nextContainer = void 0, d; + } + function _c(n, i = rn(n), s, l, d) { + return n.tagName !== i || n.typeExpression !== s || n.fullName !== l || n.comment !== d ? j(sc(i, s, l, d), n) : n; + } + function oc(n, i, s) { + let l = vn(340, n ?? We("overload"), s); + return l.typeExpression = i, l; + } + function Is(n, i = rn(n), s, l) { + return n.tagName !== i || n.typeExpression !== s || n.comment !== l ? j(oc(i, s, l), n) : n; + } + function Os(n, i, s) { + let l = vn(329, n ?? We("augments"), s); + return l.class = i, l; + } + function Li(n, i = rn(n), s, l) { + return n.tagName !== i || n.class !== s || n.comment !== l ? j(Os(i, s, l), n) : n; + } + function cc(n, i, s) { + let l = vn(330, n ?? We("implements"), s); + return l.class = i, l; + } + function Fr(n, i, s) { + let l = vn(348, n ?? We("see"), s); + return l.name = i, l; + } + function wa(n, i, s, l) { + return n.tagName !== i || n.name !== s || n.comment !== l ? j(Fr(i, s, l), n) : n; + } + function lc(n) { + let i = O(311); + return i.name = n, i; + } + function Pu(n, i) { + return n.name !== i ? j(lc(i), n) : n; + } + function uc(n, i) { + let s = O(312); + return s.left = n, s.right = i, s.transformFlags |= z(s.left) | z(s.right), s; + } + function Nu(n, i, s) { + return n.left !== i || n.right !== s ? j(uc(i, s), n) : n; + } + function pc(n, i) { + let s = O(325); + return s.name = n, s.text = i, s; + } + function fc(n, i, s) { + return n.name !== i ? j(pc(i, s), n) : n; + } + function dc(n, i) { + let s = O(326); + return s.name = n, s.text = i, s; + } + function Iu(n, i, s) { + return n.name !== i ? j(dc(i, s), n) : n; + } + function mc(n, i) { + let s = O(327); + return s.name = n, s.text = i, s; + } + function Ou(n, i, s) { + return n.name !== i ? j(mc(i, s), n) : n; + } + function Mu(n, i = rn(n), s, l) { + return n.tagName !== i || n.class !== s || n.comment !== l ? j(cc(i, s, l), n) : n; + } + function hc(n, i, s) { + return vn(n, i ?? We(ol(n)), s); + } + function Lu(n, i, s = rn(i), l) { + return i.tagName !== s || i.comment !== l ? j(hc(n, s, l), i) : i; + } + function yc(n, i, s, l) { + let d = vn(n, i ?? We(ol(n)), l); + return d.typeExpression = s, d; + } + function Ju(n, i, s = rn(i), l, d) { + return i.tagName !== s || i.typeExpression !== l || i.comment !== d ? j(yc(n, s, l, d), i) : i; + } + function gc(n, i) { + return vn(328, n, i); + } + function ju(n, i, s) { + return n.tagName !== i || n.comment !== s ? j(gc(i, s), n) : n; + } + function bc(n, i, s) { + let l = qr(341, n ?? We(ol(341)), s); + return l.typeExpression = i, l.locals = void 0, l.nextContainer = void 0, l; + } + function Ms(n, i = rn(n), s, l) { + return n.tagName !== i || n.typeExpression !== s || n.comment !== l ? j(bc(i, s, l), n) : n; + } + function vc(n, i, s, l, d) { + let v = vn(352, n ?? We("import"), d); + return v.importClause = i, v.moduleSpecifier = s, v.attributes = l, v.comment = d, v; + } + function Tc(n, i, s, l, d, v) { + return n.tagName !== i || n.comment !== v || n.importClause !== s || n.moduleSpecifier !== l || n.attributes !== d ? j(vc(i, s, l, d, v), n) : n; + } + function Ls(n) { + let i = O(322); + return i.text = n, i; + } + function Ru(n, i) { + return n.text !== i ? j(Ls(i), n) : n; + } + function Ji(n, i) { + let s = O(321); + return s.comment = n, s.tags = Pe(i), s; + } + function xc(n, i, s) { + return n.comment !== i || n.tags !== s ? j(Ji(i, s), n) : n; + } + function Sc(n, i, s) { + let l = O(285); + return l.openingElement = n, l.children = de(i), l.closingElement = s, l.transformFlags |= z(l.openingElement) | ke(l.children) | z(l.closingElement) | 2, l; + } + function Uu(n, i, s, l) { + return n.openingElement !== i || n.children !== s || n.closingElement !== l ? j(Sc(i, s, l), n) : n; + } + function wc(n, i, s) { + let l = O(286); + return l.tagName = n, l.typeArguments = Pe(i), l.attributes = s, l.transformFlags |= z(l.tagName) | ke(l.typeArguments) | z(l.attributes) | 2, l.typeArguments && (l.transformFlags |= 1), l; + } + function Bu(n, i, s, l) { + return n.tagName !== i || n.typeArguments !== s || n.attributes !== l ? j(wc(i, s, l), n) : n; + } + function ka(n, i, s) { + let l = O(287); + return l.tagName = n, l.typeArguments = Pe(i), l.attributes = s, l.transformFlags |= z(l.tagName) | ke(l.typeArguments) | z(l.attributes) | 2, i && (l.transformFlags |= 1), l; + } + function kc(n, i, s, l) { + return n.tagName !== i || n.typeArguments !== s || n.attributes !== l ? j(ka(i, s, l), n) : n; + } + function Js(n) { + let i = O(288); + return i.tagName = n, i.transformFlags |= z(i.tagName) | 2, i; + } + function js(n, i) { + return n.tagName !== i ? j(Js(i), n) : n; + } + function Yt(n, i, s) { + let l = O(289); + return l.openingFragment = n, l.children = de(i), l.closingFragment = s, l.transformFlags |= z(l.openingFragment) | ke(l.children) | z(l.closingFragment) | 2, l; + } + function Ec(n, i, s, l) { + return n.openingFragment !== i || n.children !== s || n.closingFragment !== l ? j(Yt(i, s, l), n) : n; + } + function ji(n, i) { + let s = O(12); + return s.text = n, s.containsOnlyTriviaWhiteSpaces = !!i, s.transformFlags |= 2, s; + } + function qu(n, i, s) { + return n.text !== i || n.containsOnlyTriviaWhiteSpaces !== s ? j(ji(i, s), n) : n; + } + function Ac() { + let n = O(290); + return n.transformFlags |= 2, n; + } + function Cc() { + let n = O(291); + return n.transformFlags |= 2, n; + } + function Dc(n, i) { + let s = ae(292); + return s.name = n, s.initializer = i, s.transformFlags |= z(s.name) | z(s.initializer) | 2, s; + } + function Fu(n, i, s) { + return n.name !== i || n.initializer !== s ? j(Dc(i, s), n) : n; + } + function Ri(n) { + let i = ae(293); + return i.properties = de(n), i.transformFlags |= ke(i.properties) | 2, i; + } + function zu(n, i) { + return n.properties !== i ? j(Ri(i), n) : n; + } + function Pc(n) { + let i = O(294); + return i.expression = n, i.transformFlags |= z(i.expression) | 2, i; + } + function Vu(n, i) { + return n.expression !== i ? j(Pc(i), n) : n; + } + function Nc(n, i) { + let s = O(295); + return s.dotDotDotToken = n, s.expression = i, s.transformFlags |= z(s.dotDotDotToken) | z(s.expression) | 2, s; + } + function Rs(n, i) { + return n.expression !== i ? j(Nc(n.dotDotDotToken, i), n) : n; + } + function si(n, i) { + let s = O(296); + return s.namespace = n, s.name = i, s.transformFlags |= z(s.namespace) | z(s.name) | 2, s; + } + function Wu(n, i, s) { + return n.namespace !== i || n.name !== s ? j(si(i, s), n) : n; + } + function Ea(n, i) { + let s = O(297); + return s.expression = _().parenthesizeExpressionForDisallowedComma(n), s.statements = de(i), s.transformFlags |= z(s.expression) | ke(s.statements), s.jsDoc = void 0, s; + } + function Ic(n, i, s) { + return n.expression !== i || n.statements !== s ? j(Ea(i, s), n) : n; + } + function Oc(n) { + let i = O(298); + return i.statements = de(n), i.transformFlags = ke(i.statements), i; + } + function Ui(n, i) { + return n.statements !== i ? j(Oc(i), n) : n; + } + function Us(n, i) { + let s = O(299); + switch (s.token = n, s.types = de(i), s.transformFlags |= ke(s.types), n) { + case 96: + s.transformFlags |= 1024; + break; + case 119: + s.transformFlags |= 1; + break; + default: return q.assertNever(n); + } + return s; + } + function Gu(n, i) { + return n.types !== i ? j(Us(n.token, i), n) : n; + } + function Mc(n, i) { + let s = O(300); + return s.variableDeclaration = Tn(n), s.block = i, s.transformFlags |= z(s.variableDeclaration) | z(s.block) | (n ? 0 : 64), s.locals = void 0, s.nextContainer = void 0, s; + } + function Lc(n, i, s) { + return n.variableDeclaration !== i || n.block !== s ? j(Mc(i, s), n) : n; + } + function Aa(n, i) { + let s = ae(304); + return s.name = et(n), s.initializer = _().parenthesizeExpressionForDisallowedComma(i), s.transformFlags |= Ln(s.name) | z(s.initializer), s.modifiers = void 0, s.questionToken = void 0, s.exclamationToken = void 0, s.jsDoc = void 0, s; + } + function Bs(n, i, s) { + return n.name !== i || n.initializer !== s ? _i(Aa(i, s), n) : n; + } + function _i(n, i) { + return n !== i && (n.modifiers = i.modifiers, n.questionToken = i.questionToken, n.exclamationToken = i.exclamationToken), j(n, i); + } + function Jc(n, i) { + let s = ae(305); + return s.name = et(n), s.objectAssignmentInitializer = i && _().parenthesizeExpressionForDisallowedComma(i), s.transformFlags |= ja(s.name) | z(s.objectAssignmentInitializer) | 1024, s.equalsToken = void 0, s.modifiers = void 0, s.questionToken = void 0, s.exclamationToken = void 0, s.jsDoc = void 0, s; + } + function Yu(n, i, s) { + return n.name !== i || n.objectAssignmentInitializer !== s ? Hu(Jc(i, s), n) : n; + } + function Hu(n, i) { + return n !== i && (n.modifiers = i.modifiers, n.questionToken = i.questionToken, n.exclamationToken = i.exclamationToken, n.equalsToken = i.equalsToken), j(n, i); + } + function jc(n) { + let i = ae(306); + return i.expression = _().parenthesizeExpressionForDisallowedComma(n), i.transformFlags |= z(i.expression) | 65664, i.jsDoc = void 0, i; + } + function Rc(n, i) { + return n.expression !== i ? j(jc(i), n) : n; + } + function qs(n, i) { + let s = ae(307); + return s.name = et(n), s.initializer = i && _().parenthesizeExpressionForDisallowedComma(i), s.transformFlags |= z(s.name) | z(s.initializer) | 1, s.jsDoc = void 0, s; + } + function On(n, i, s) { + return n.name !== i || n.initializer !== s ? j(qs(i, s), n) : n; + } + function Uc(n, i, s) { + let l = t.createBaseSourceFileNode(308); + return l.statements = de(n), l.endOfFileToken = i, l.flags |= s, l.text = "", l.fileName = "", l.path = "", l.resolvedPath = "", l.originalFileName = "", l.languageVersion = 1, l.languageVariant = 0, l.scriptKind = 0, l.isDeclarationFile = !1, l.hasNoDefaultLib = !1, l.transformFlags |= ke(l.statements) | z(l.endOfFileToken), l.locals = void 0, l.nextContainer = void 0, l.endFlowNode = void 0, l.nodeCount = 0, l.identifierCount = 0, l.symbolCount = 0, l.parseDiagnostics = void 0, l.bindDiagnostics = void 0, l.bindSuggestionDiagnostics = void 0, l.lineMap = void 0, l.externalModuleIndicator = void 0, l.setExternalModuleIndicator = void 0, l.pragmas = void 0, l.checkJsDirective = void 0, l.referencedFiles = void 0, l.typeReferenceDirectives = void 0, l.libReferenceDirectives = void 0, l.amdDependencies = void 0, l.commentDirectives = void 0, l.identifiers = void 0, l.packageJsonLocations = void 0, l.packageJsonScope = void 0, l.imports = void 0, l.moduleAugmentations = void 0, l.ambientModuleNames = void 0, l.classifiableNames = void 0, l.impliedNodeFormat = void 0, l; + } + function Bc(n) { + let i = Object.create(n.redirectTarget); + return Object.defineProperties(i, { + id: { + get() { + return this.redirectInfo.redirectTarget.id; + }, + set(s) { + this.redirectInfo.redirectTarget.id = s; + } + }, + symbol: { + get() { + return this.redirectInfo.redirectTarget.symbol; + }, + set(s) { + this.redirectInfo.redirectTarget.symbol = s; + } + } + }), i.redirectInfo = n, i; + } + function Xu(n) { + let i = Bc(n.redirectInfo); + return i.flags |= n.flags & -17, i.fileName = n.fileName, i.path = n.path, i.resolvedPath = n.resolvedPath, i.originalFileName = n.originalFileName, i.packageJsonLocations = n.packageJsonLocations, i.packageJsonScope = n.packageJsonScope, i.emitNode = void 0, i; + } + function $u(n) { + let i = t.createBaseSourceFileNode(308); + i.flags |= n.flags & -17; + for (let s in n) if (!(Dr(i, s) || !Dr(n, s))) { + if (s === "emitNode") { + i.emitNode = void 0; + continue; + } + i[s] = n[s]; + } + return i; + } + function Fs(n) { + let i = n.redirectInfo ? Xu(n) : $u(n); + return a(i, n), i; + } + function zs(n, i, s, l, d, v, F) { + let pe = Fs(n); + return pe.statements = de(i), pe.isDeclarationFile = s, pe.referencedFiles = l, pe.typeReferenceDirectives = d, pe.hasNoDefaultLib = v, pe.libReferenceDirectives = F, pe.transformFlags = ke(pe.statements) | z(pe.endOfFileToken), pe; + } + function Qu(n, i, s = n.isDeclarationFile, l = n.referencedFiles, d = n.typeReferenceDirectives, v = n.hasNoDefaultLib, F = n.libReferenceDirectives) { + return n.statements !== i || n.isDeclarationFile !== s || n.referencedFiles !== l || n.typeReferenceDirectives !== d || n.hasNoDefaultLib !== v || n.libReferenceDirectives !== F ? j(zs(n, i, s, l, d, v, F), n) : n; + } + function qc(n) { + let i = O(309); + return i.sourceFiles = n, i.syntheticFileReferences = void 0, i.syntheticTypeReferences = void 0, i.syntheticLibReferences = void 0, i.hasNoDefaultLib = void 0, i; + } + function Fc(n, i) { + return n.sourceFiles !== i ? j(qc(i), n) : n; + } + function Ku(n, i = !1, s) { + let l = O(238); + return l.type = n, l.isSpread = i, l.tupleNameSource = s, l; + } + function Zu(n) { + let i = O(353); + return i._children = n, i; + } + function Ca(n) { + let i = O(354); + return i.original = n, dn(i, n), i; + } + function Vs(n, i) { + let s = O(356); + return s.expression = n, s.original = i, s.transformFlags |= z(s.expression) | 1, dn(s, i), s; + } + function zc(n, i) { + return n.expression !== i ? j(Vs(i, n.original), n) : n; + } + function ep() { + return O(355); + } + function tp(n) { + if (Ja(n) && !gl(n) && !n.original && !n.emitNode && !n.id) { + if (e6(n)) return n.elements; + if (na(n) && Rb(n.operatorToken)) return [n.left, n.right]; + } + return n; + } + function Ws(n) { + let i = O(357); + return i.elements = de(oy(n, tp)), i.transformFlags |= ke(i.elements), i; + } + function np(n, i) { + return n.elements !== i ? j(Ws(i), n) : n; + } + function Gs(n, i) { + let s = O(358); + return s.expression = n, s.thisArg = i, s.transformFlags |= z(s.expression) | z(s.thisArg), s; + } + function Vc(n, i, s) { + return n.expression !== i || n.thisArg !== s ? j(Gs(i, s), n) : n; + } + function Wc(n) { + let i = hn(n.escapedText); + return i.flags |= n.flags & -17, i.transformFlags = n.transformFlags, a(i, n), setIdentifierAutoGenerate(i, { ...n.emitNode.autoGenerate }), i; + } + function rp(n) { + let i = hn(n.escapedText); + i.flags |= n.flags & -17, i.jsDoc = n.jsDoc, i.flowNode = n.flowNode, i.symbol = n.symbol, i.transformFlags = n.transformFlags, a(i, n); + let s = getIdentifierTypeArguments(n); + return s && setIdentifierTypeArguments(i, s), i; + } + function ip(n) { + let i = Pn(n.escapedText); + return i.flags |= n.flags & -17, i.transformFlags = n.transformFlags, a(i, n), setIdentifierAutoGenerate(i, { ...n.emitNode.autoGenerate }), i; + } + function Gc(n) { + let i = Pn(n.escapedText); + return i.flags |= n.flags & -17, i.transformFlags = n.transformFlags, a(i, n), i; + } + function Da(n) { + if (n === void 0) return n; + if (Z1(n)) return Fs(n); + if (Ua(n)) return Wc(n); + if (Ke(n)) return rp(n); + if (n1(n)) return ip(n); + if (gi(n)) return Gc(n); + let i = ff(n.kind) ? t.createBaseNode(n.kind) : t.createBaseTokenNode(n.kind); + i.flags |= n.flags & -17, i.transformFlags = n.transformFlags, a(i, n); + for (let s in n) Dr(i, s) || !Dr(n, s) || (i[s] = n[s]); + return i; + } + function ap(n, i, s) { + return Di(is(void 0, void 0, void 0, void 0, i ? [i] : [], void 0, Br(n, !0)), void 0, s ? [s] : []); + } + function sp(n, i, s) { + return Di(as(void 0, void 0, i ? [i] : [], void 0, void 0, Br(n, !0)), void 0, s ? [s] : []); + } + function Bi() { + return ss(V("0")); + } + function Yc(n) { + return va(void 0, !1, n); + } + function Hc(n) { + return Ta(void 0, !1, Es([xa(!1, void 0, n)])); + } + function _p(n, i) { + return i === "null" ? he.createStrictEquality(n, Lt()) : i === "undefined" ? he.createStrictEquality(n, Bi()) : he.createStrictEquality(fa(n), ft(i)); + } + function Ys(n, i) { + return i === "null" ? he.createStrictInequality(n, Lt()) : i === "undefined" ? he.createStrictInequality(n, Bi()) : he.createStrictInequality(fa(n), ft(i)); + } + function zr(n, i, s) { + return Dd(n) ? ts(Ai(n, void 0, i), void 0, void 0, s) : Di(cr(n, i), void 0, s); + } + function op(n, i, s) { + return zr(n, "bind", [i, ...s]); + } + function cp(n, i, s) { + return zr(n, "call", [i, ...s]); + } + function lp(n, i, s) { + return zr(n, "apply", [i, s]); + } + function qi(n, i, s) { + return zr(We(n), i, s); + } + function up(n, i) { + return zr(n, "slice", i === void 0 ? [] : [wr(i)]); + } + function Fi(n, i) { + return zr(n, "concat", i); + } + function pp(n, i, s) { + return qi("Object", "defineProperty", [ + n, + wr(i), + s + ]); + } + function Hs(n, i) { + return qi("Object", "getOwnPropertyDescriptor", [n, wr(i)]); + } + function oi(n, i, s) { + return qi("Reflect", "get", s ? [ + n, + i, + s + ] : [n, i]); + } + function Xc(n, i, s, l) { + return qi("Reflect", "set", l ? [ + n, + i, + s, + l + ] : [ + n, + i, + s + ]); + } + function ci(n, i, s) { + return s ? (n.push(Aa(i, s)), !0) : !1; + } + function fp(n, i) { + let s = []; + ci(s, "enumerable", wr(n.enumerable)), ci(s, "configurable", wr(n.configurable)); + let l = ci(s, "writable", wr(n.writable)); + l = ci(s, "value", n.value) || l; + let d = ci(s, "get", n.get); + return d = ci(s, "set", n.set) || d, q.assert(!(l && d), "A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."), Ei(s, !i); + } + function $c(n, i) { + switch (n.kind) { + case 218: return U_(n, i); + case 217: return R_(n, n.type, i); + case 235: return ha(n, i, n.type); + case 239: return ro(n, i, n.type); + case 236: return no(n, i); + case 234: return eo(n, i, n.typeArguments); + case 356: return zc(n, i); + } + } + function dp(n) { + return Dl(n) && Ja(n) && Ja(getSourceMapRange(n)) && Ja(getCommentRange(n)) && !Zt(getSyntheticLeadingComments(n)) && !Zt(getSyntheticTrailingComments(n)); + } + function Qc(n, i, s = 63) { + return n && sh(n, s) && !dp(n) ? $c(n, Qc(n.expression, i)) : i; + } + function Kc(n, i, s) { + if (!i) return n; + let l = xo(i, i.label, Y1(i.statement) ? Kc(n, i.statement) : n); + return s && s(i), l; + } + function Xs(n, i) { + let s = vf(n); + switch (s.kind) { + case 80: return i; + case 110: + case 9: + case 10: + case 11: return !1; + case 210: return s.elements.length !== 0; + case 211: return s.properties.length > 0; + default: return !0; + } + } + function Zc(n, i, s, l = !1) { + let d = Vf(n, 63), v, F; + return Jd(d) ? (v = Bt(), F = d) : Ap(d) ? (v = Bt(), F = s !== void 0 && s < 2 ? dn(We("_super"), d) : d) : za(d) & 8192 ? (v = Bi(), F = _().parenthesizeLeftSideOfAccess(d, !1)) : dr(d) ? Xs(d.expression, l) ? (v = ir(i), F = cr(dn(he.createAssignment(v, d.expression), d.expression), d.name), dn(F, d)) : (v = d.expression, F = d) : Ha(d) ? Xs(d.expression, l) ? (v = ir(i), F = Ci(dn(he.createAssignment(v, d.expression), d.expression), d.argumentExpression), dn(F, d)) : (v = d.expression, F = d) : (v = Bi(), F = _().parenthesizeLeftSideOfAccess(n, !1)), { + target: F, + thisArg: v + }; + } + function el(n, i) { + return cr(rs(Ei([U(void 0, "value", [mr(void 0, void 0, n, void 0, void 0, void 0)], Br([Ni(i)]))])), "value"); + } + function o(n) { + return n.length > 10 ? Ws(n) : gy(n, he.createComma); + } + function p(n, i, s, l = 0, d) { + let v = d ? n && lf(n) : Xm(n); + if (v && Ke(v) && !Ua(v)) { + let F = Sf(dn(Da(v), v), v.parent); + return l |= za(v), s || (l |= 96), i || (l |= 3072), l && setEmitFlags(F, l), F; + } + return Bn(n); + } + function m(n, i, s) { + return p(n, i, s, 98304); + } + function g(n, i, s, l) { + return p(n, i, s, 32768, l); + } + function b(n, i, s) { + return p(n, i, s, 16384); + } + function N(n, i, s) { + return p(n, i, s); + } + function Q(n, i, s, l) { + let d = cr(n, Ja(i) ? i : Da(i)); + dn(d, i); + let v = 0; + return l || (v |= 96), s || (v |= 3072), v && setEmitFlags(d, v), d; + } + function _e(n, i, s, l) { + return n && v_(i, 32) ? Q(n, p(i), s, l) : b(i, s, l); + } + function ee(n, i, s, l) { + return Je(n, i, je(n, i, 0, s), l); + } + function te(n) { + return vi(n.expression) && n.expression.text === "use strict"; + } + function ce() { + return T6(Ni(ft("use strict"))); + } + function je(n, i, s = 0, l) { + q.assert(i.length === 0, "Prologue directives should be at the first statement in the target statements array"); + let d = !1, v = n.length; + for (; s < v;) { + let F = n[s]; + if (pl(F)) te(F) && (d = !0), i.push(F); + else break; + s++; + } + return l && !d && i.push(ce()), s; + } + function Je(n, i, s, l, d = wy) { + let v = n.length; + for (; s !== void 0 && s < v;) { + let F = n[s]; + if (za(F) & 2097152 && d(F)) wn(i, l ? visitNode(F, l, Qg) : F); + else break; + s++; + } + return s; + } + function De(n) { + return b6(n) ? n : dn(de([ce(), ...n]), n); + } + function Ht(n) { + return q.assert(Gp(n, Zg), "Cannot lift nodes to a Block."), my(n) || Br(n); + } + function Nt(n, i, s) { + let l = s; + for (; l < n.length && i(n[l]);) l++; + return l; + } + function ur(n, i) { + if (!Zt(i)) return n; + let s = Nt(n, pl, 0), l = Nt(n, Md, s), d = Nt(n, Ld, l), v = Nt(i, pl, 0), F = Nt(i, Md, v), pe = Nt(i, Ld, F), Fe = Nt(i, hf, pe); + q.assert(Fe === i.length, "Expected declarations to be valid standard or custom prologues"); + let It = mi(n) ? n.slice() : n; + if (Fe > pe && It.splice(d, 0, ...i.slice(pe, Fe)), pe > F && It.splice(l, 0, ...i.slice(F, pe)), F > v && It.splice(s, 0, ...i.slice(v, F)), v > 0) if (s === 0) It.splice(0, 0, ...i.slice(0, v)); + else { + let fr = /* @__PURE__ */ new Map(); + for (let xn = 0; xn < s; xn++) { + let Vi = n[xn]; + fr.set(Vi.expression.text, !0); + } + for (let xn = v - 1; xn >= 0; xn--) { + let Vi = i[xn]; + fr.has(Vi.expression.text) || It.unshift(Vi); + } + } + return mi(n) ? dn(de(It, n.hasTrailingComma), n) : n; + } + function pr(n, i) { + let s; + return typeof i == "number" ? s = yn(i) : s = i, Ef(n) ? sr(n, s, n.name, n.constraint, n.default) : m_(n) ? hr(n, s, n.dotDotDotToken, n.name, n.questionToken, n.type, n.initializer) : Nf(n) ? ze(n, s, n.typeParameters, n.parameters, n.type) : C1(n) ? Vn(n, s, n.name, n.questionToken, n.type) : Wa(n) ? L(n, s, n.name, n.questionToken ?? n.exclamationToken, n.type, n.initializer) : D1(n) ? fe(n, s, n.name, n.questionToken, n.typeParameters, n.parameters, n.type) : h_(n) ? He(n, s, n.asteriskToken, n.name, n.questionToken, n.typeParameters, n.parameters, n.type, n.body) : Af(n) ? Mr(n, s, n.parameters, n.body) : Tl(n) ? Wn(n, s, n.name, n.parameters, n.type, n.body) : y_(n) ? K(n, s, n.name, n.parameters, n.body) : Cf(n) ? Ze(n, s, n.parameters, n.type) : Mf(n) ? B_(n, s, n.asteriskToken, n.name, n.typeParameters, n.parameters, n.type, n.body) : Lf(n) ? q_(n, s, n.typeParameters, n.parameters, n.type, n.equalsGreaterThanToken, n.body) : xl(n) ? cs(n, s, n.name, n.typeParameters, n.heritageClauses, n.members) : Xa(n) ? so(n, s, n.declarationList) : jf(n) ? Ts(n, s, n.asteriskToken, n.name, n.typeParameters, n.parameters, n.type, n.body) : Ga(n) ? ba(n, s, n.name, n.typeParameters, n.heritageClauses, n.members) : T_(n) ? Po(n, s, n.name, n.typeParameters, n.heritageClauses, n.members) : Nl(n) ? vr(n, s, n.name, n.typeParameters, n.type) : X1(n) ? Tr(n, s, n.name, n.members) : Ti(n) ? kt(n, s, n.name, n.body) : Rf(n) ? Jo(n, s, n.isTypeOnly, n.name, n.moduleReference) : Uf(n) ? Ro(n, s, n.importClause, n.moduleSpecifier, n.attributes) : Bf(n) ? Oi(n, s, n.expression) : qf(n) ? $o(n, s, n.isTypeOnly, n.exportClause, n.moduleSpecifier, n.attributes) : q.assertNever(n); + } + function Mn(n, i) { + return m_(n) ? hr(n, i, n.dotDotDotToken, n.name, n.questionToken, n.type, n.initializer) : Wa(n) ? L(n, i, n.name, n.questionToken ?? n.exclamationToken, n.type, n.initializer) : h_(n) ? He(n, i, n.asteriskToken, n.name, n.questionToken, n.typeParameters, n.parameters, n.type, n.body) : Tl(n) ? Wn(n, i, n.name, n.parameters, n.type, n.body) : y_(n) ? K(n, i, n.name, n.parameters, n.body) : xl(n) ? cs(n, i, n.name, n.typeParameters, n.heritageClauses, n.members) : Ga(n) ? ba(n, i, n.name, n.typeParameters, n.heritageClauses, n.members) : q.assertNever(n); + } + function Vr(n, i) { + switch (n.kind) { + case 178: return Wn(n, n.modifiers, i, n.parameters, n.type, n.body); + case 179: return K(n, n.modifiers, i, n.parameters, n.body); + case 175: return He(n, n.modifiers, n.asteriskToken, i, n.questionToken, n.typeParameters, n.parameters, n.type, n.body); + case 174: return fe(n, n.modifiers, i, n.questionToken, n.typeParameters, n.parameters, n.type); + case 173: return L(n, n.modifiers, i, n.questionToken ?? n.exclamationToken, n.type, n.initializer); + case 172: return Vn(n, n.modifiers, i, n.questionToken, n.type); + case 304: return Bs(n, i, n.initializer); + } + } + function Pe(n) { + return n ? de(n) : void 0; + } + function et(n) { + return typeof n == "string" ? We(n) : n; + } + function wr(n) { + return typeof n == "string" ? ft(n) : typeof n == "number" ? V(n) : typeof n == "boolean" ? n ? ct() : ar() : n; + } + function zi(n) { + return n && _().parenthesizeExpressionForDisallowedComma(n); + } + function mp(n) { + return typeof n == "number" ? ot(n) : n; + } + function $n(n) { + return n && t6(n) ? dn(a(_o(), n), n) : n; + } + function Tn(n) { + return typeof n == "string" || n && !Jf(n) ? ga(n, void 0, void 0, void 0) : n; + } + function j(n, i) { + return n !== i && (a(n, i), dn(n, i)), n; + } +} +function ol(e) { + switch (e) { + case 345: return "type"; + case 343: return "returns"; + case 344: return "this"; + case 341: return "enum"; + case 331: return "author"; + case 333: return "class"; + case 334: return "public"; + case 335: return "private"; + case 336: return "protected"; + case 337: return "readonly"; + case 338: return "override"; + case 346: return "template"; + case 347: return "typedef"; + case 342: return "param"; + case 349: return "prop"; + case 339: return "callback"; + case 340: return "overload"; + case 329: return "augments"; + case 330: return "implements"; + case 352: return "import"; + default: return q.fail(`Unsupported kind: ${q.formatSyntaxKind(e)}`); + } +} +function Nb(e, t) { + switch (Sn || (Sn = sf(99, !1, 0)), e) { + case 15: + Sn.setText("`" + t + "`"); + break; + case 16: + Sn.setText("`" + t + "${"); + break; + case 17: + Sn.setText("}" + t + "${"); + break; + case 18: + Sn.setText("}" + t + "`"); + break; + } + let a = Sn.scan(); + if (a === 20 && (a = Sn.reScanTemplateToken(!1)), Sn.isUnterminated()) return Sn.setText(void 0), Fd; + let _; + switch (a) { + case 15: + case 16: + case 17: + case 18: + _ = Sn.getTokenValue(); + break; + } + return _ === void 0 || Sn.scan() !== 1 ? (Sn.setText(void 0), Fd) : (Sn.setText(void 0), _); +} +function Ln(e) { + return e && Ke(e) ? ja(e) : z(e); +} +function ja(e) { + return z(e) & -67108865; +} +function Ib(e, t) { + return t | e.transformFlags & 134234112; +} +function z(e) { + if (!e) return 0; + let t = e.transformFlags & ~Ob(e.kind); + return yg(e) && r1(e.name) ? Ib(e.name, t) : t; +} +function ke(e) { + return e ? e.transformFlags : 0; +} +function zd(e) { + let t = 0; + for (let a of e) t |= z(a); + e.transformFlags = t; +} +function Ob(e) { + if (e >= 183 && e <= 206) return -2; + switch (e) { + case 214: + case 215: + case 210: return -2147450880; + case 268: return -1941676032; + case 170: return -2147483648; + case 220: return -2072174592; + case 219: + case 263: return -1937940480; + case 262: return -2146893824; + case 264: + case 232: return -2147344384; + case 177: return -1937948672; + case 173: return -2013249536; + case 175: + case 178: + case 179: return -2005057536; + case 133: + case 150: + case 163: + case 146: + case 154: + case 151: + case 136: + case 155: + case 116: + case 169: + case 172: + case 174: + case 180: + case 181: + case 182: + case 265: + case 266: return -2; + case 211: return -2147278848; + case 300: return -2147418112; + case 207: + case 208: return -2147450880; + case 217: + case 239: + case 235: + case 356: + case 218: + case 108: return -2147483648; + case 212: + case 213: return -2147483648; + default: return -2147483648; + } +} +function Zs(e) { + return e.flags |= 16, e; +} +function Lb(e, t) { + if (e.original !== t && (e.original = t, t)) { + let a = t.emitNode; + a && (e.emitNode = Jb(a, e.emitNode)); + } + return e; +} +function Jb(e, t) { + let { flags: a, internalFlags: _, leadingComments: f, trailingComments: h, commentRange: T, sourceMapRange: k, tokenSourceMapRanges: c, constantValue: W, helpers: y, startsOnNewLine: G, snippetElement: E, classThis: D, assignedName: R } = e; + if (t || (t = {}), a && (t.flags = a), _ && (t.internalFlags = _ & -9), f && (t.leadingComments = En(f.slice(), t.leadingComments)), h && (t.trailingComments = En(h.slice(), t.trailingComments)), T && (t.commentRange = T), k && (t.sourceMapRange = k), c && (t.tokenSourceMapRanges = jb(c, t.tokenSourceMapRanges)), W !== void 0 && (t.constantValue = W), y) for (let ue of y) t.helpers = py(t.helpers, ue); + return G !== void 0 && (t.startsOnNewLine = G), E !== void 0 && (t.snippetElement = E), D && (t.classThis = D), R && (t.assignedName = R), t; +} +function jb(e, t) { + t || (t = []); + for (let a in e) t[a] = e[a]; + return t; +} +function aa(e) { + return e.kind === 9; +} +function k1(e) { + return e.kind === 10; +} +function vi(e) { + return e.kind === 11; +} +function E1(e) { + return e.kind === 15; +} +function Rb(e) { + return e.kind === 28; +} +function Vd(e) { + return e.kind === 54; +} +function Wd(e) { + return e.kind === 58; +} +function Ke(e) { + return e.kind === 80; +} +function gi(e) { + return e.kind === 81; +} +function Ub(e) { + return e.kind === 95; +} +function cl(e) { + return e.kind === 134; +} +function Ap(e) { + return e.kind === 108; +} +function Bb(e) { + return e.kind === 102; +} +function A1(e) { + return e.kind === 167; +} +function kf(e) { + return e.kind === 168; +} +function Ef(e) { + return e.kind === 169; +} +function m_(e) { + return e.kind === 170; +} +function Cl(e) { + return e.kind === 171; +} +function C1(e) { + return e.kind === 172; +} +function Wa(e) { + return e.kind === 173; +} +function D1(e) { + return e.kind === 174; +} +function h_(e) { + return e.kind === 175; +} +function Af(e) { + return e.kind === 177; +} +function Tl(e) { + return e.kind === 178; +} +function y_(e) { + return e.kind === 179; +} +function P1(e) { + return e.kind === 180; +} +function N1(e) { + return e.kind === 181; +} +function Cf(e) { + return e.kind === 182; +} +function I1(e) { + return e.kind === 183; +} +function Df(e) { + return e.kind === 184; +} +function Pf(e) { + return e.kind === 185; +} +function Nf(e) { + return e.kind === 186; +} +function qb(e) { + return e.kind === 187; +} +function O1(e) { + return e.kind === 188; +} +function Fb(e) { + return e.kind === 189; +} +function zb(e) { + return e.kind === 190; +} +function M1(e) { + return e.kind === 203; +} +function Vb(e) { + return e.kind === 191; +} +function Wb(e) { + return e.kind === 192; +} +function L1(e) { + return e.kind === 193; +} +function J1(e) { + return e.kind === 194; +} +function Gb(e) { + return e.kind === 195; +} +function Yb(e) { + return e.kind === 196; +} +function j1(e) { + return e.kind === 197; +} +function Hb(e) { + return e.kind === 198; +} +function R1(e) { + return e.kind === 199; +} +function Xb(e) { + return e.kind === 200; +} +function U1(e) { + return e.kind === 201; +} +function $b(e) { + return e.kind === 202; +} +function Qb(e) { + return e.kind === 206; +} +function B1(e) { + return e.kind === 209; +} +function q1(e) { + return e.kind === 210; +} +function If(e) { + return e.kind === 211; +} +function dr(e) { + return e.kind === 212; +} +function Ha(e) { + return e.kind === 213; +} +function Of(e) { + return e.kind === 214; +} +function F1(e) { + return e.kind === 216; +} +function Dl(e) { + return e.kind === 218; +} +function Mf(e) { + return e.kind === 219; +} +function Lf(e) { + return e.kind === 220; +} +function Kb(e) { + return e.kind === 223; +} +function z1(e) { + return e.kind === 225; +} +function na(e) { + return e.kind === 227; +} +function V1(e) { + return e.kind === 231; +} +function xl(e) { + return e.kind === 232; +} +function W1(e) { + return e.kind === 233; +} +function G1(e) { + return e.kind === 234; +} +function fl(e) { + return e.kind === 236; +} +function Zb(e) { + return e.kind === 237; +} +function e6(e) { + return e.kind === 357; +} +function Xa(e) { + return e.kind === 244; +} +function Pl(e) { + return e.kind === 245; +} +function Y1(e) { + return e.kind === 257; +} +function Jf(e) { + return e.kind === 261; +} +function H1(e) { + return e.kind === 262; +} +function jf(e) { + return e.kind === 263; +} +function Ga(e) { + return e.kind === 264; +} +function T_(e) { + return e.kind === 265; +} +function Nl(e) { + return e.kind === 266; +} +function X1(e) { + return e.kind === 267; +} +function Ti(e) { + return e.kind === 268; +} +function Rf(e) { + return e.kind === 272; +} +function Uf(e) { + return e.kind === 273; +} +function Bf(e) { + return e.kind === 278; +} +function qf(e) { + return e.kind === 279; +} +function $1(e) { + return e.kind === 280; +} +function t6(e) { + return e.kind === 354; +} +function Ff(e) { + return e.kind === 284; +} +function Fp(e) { + return e.kind === 287; +} +function n6(e) { + return e.kind === 290; +} +function Q1(e) { + return e.kind === 296; +} +function r6(e) { + return e.kind === 298; +} +function K1(e) { + return e.kind === 304; +} +function Z1(e) { + return e.kind === 308; +} +function eh(e) { + return e.kind === 310; +} +function th(e) { + return e.kind === 315; +} +function nh(e) { + return e.kind === 318; +} +function rh(e) { + return e.kind === 321; +} +function i6(e) { + return e.kind === 323; +} +function Il(e) { + return e.kind === 324; +} +function a6(e) { + return e.kind === 329; +} +function s6(e) { + return e.kind === 334; +} +function _6(e) { + return e.kind === 335; +} +function o6(e) { + return e.kind === 336; +} +function c6(e) { + return e.kind === 337; +} +function l6(e) { + return e.kind === 338; +} +function u6(e) { + return e.kind === 340; +} +function p6(e) { + return e.kind === 332; +} +function zp(e) { + return e.kind === 342; +} +function f6(e) { + return e.kind === 343; +} +function zf(e) { + return e.kind === 345; +} +function ih(e) { + return e.kind === 346; +} +function d6(e) { + return e.kind === 330; +} +function m6(e) { + return e.kind === 351; +} +function ah(e, t) { + var a; + let _ = e.kind; + return ff(_) ? _ === 353 ? e._children : (a = ea.get(t)) == null ? void 0 : a.get(e) : vt; +} +function h6(e, t, a) { + e.kind === 353 && q.fail("Should not need to re-set the children of a SyntaxList."); + let _ = ea.get(t); + return _ === void 0 && (_ = /* @__PURE__ */ new WeakMap(), ea.set(t, _)), _.set(e, a), a; +} +function Gd(e, t) { + var a; + e.kind === 353 && q.fail("Did not expect to unset the children of a SyntaxList."), (a = ea.get(t)) == null || a.delete(e); +} +function y6(e, t) { + let a = ea.get(e); + a !== void 0 && (ea.delete(e), ea.set(t, a)); +} +function Yd(e) { + return (za(e) & 32768) !== 0; +} +function g6(e) { + return vi(e.expression) && e.expression.text === "use strict"; +} +function b6(e) { + for (let t of e) if (pl(t)) { + if (g6(t)) return t; + } else break; +} +function v6(e) { + return Dl(e) && ia(e) && !!Ng(e); +} +function sh(e, t = 63) { + switch (e.kind) { + case 218: return t & -2147483648 && v6(e) ? !1 : (t & 1) !== 0; + case 217: + case 235: return (t & 2) !== 0; + case 239: return (t & 34) !== 0; + case 234: return (t & 16) !== 0; + case 236: return (t & 4) !== 0; + case 356: return (t & 8) !== 0; + } + return !1; +} +function Vf(e, t = 63) { + for (; sh(e, t);) e = e.expression; + return e; +} +function T6(e) { + return setStartsOnNewLine(e, !0); +} +function i_(e) { + if (Yg(e)) return e.name; + if (Vg(e)) { + switch (e.kind) { + case 304: return i_(e.initializer); + case 305: return e.name; + case 306: return i_(e.expression); + } + return; + } + return vl(e, !0) ? i_(e.left) : V1(e) ? i_(e.expression) : e; +} +function x6(e) { + switch (e.kind) { + case 207: + case 208: + case 210: return e.elements; + case 211: return e.properties; + } +} +function Hd(e) { + if (e) { + let t = e; + for (;;) { + if (Ke(t) || !t.body) return Ke(t) ? t : t.name; + t = t.body; + } + } +} +function $d(e, t) { + return typeof e == "object" ? Vp(!1, e.prefix, e.node, e.suffix, t) : typeof e == "string" ? e.length > 0 && e.charCodeAt(0) === 35 ? e.slice(1) : e : ""; +} +function S6(e, t) { + return typeof e == "string" ? e : w6(e, q.checkDefined(t)); +} +function w6(e, t) { + return n1(e) ? t(e).slice(1) : Ua(e) ? t(e) : gi(e) ? e.escapedText.slice(1) : An(e); +} +function Vp(e, t, a, _, f) { + return t = $d(t, f), _ = $d(_, f), a = S6(a, f), `${e ? "#" : ""}${t}${a}${_}`; +} +function _h(e) { + if (e.transformFlags & 65536) return !0; + if (e.transformFlags & 128) for (let t of x6(e)) { + let a = i_(t); + if (a && Gg(a) && (a.transformFlags & 65536 || a.transformFlags & 128 && _h(a))) return !0; + } + return !1; +} +function dn(e, t) { + return t ? yi(e, t.pos, t.end) : e; +} +function Ol(e) { + let t = e.kind; + return t === 169 || t === 170 || t === 172 || t === 173 || t === 174 || t === 175 || t === 177 || t === 178 || t === 179 || t === 182 || t === 186 || t === 219 || t === 220 || t === 232 || t === 244 || t === 263 || t === 264 || t === 265 || t === 266 || t === 267 || t === 268 || t === 272 || t === 273 || t === 278 || t === 279; +} +function Wf(e) { + let t = e.kind; + return t === 170 || t === 173 || t === 175 || t === 178 || t === 179 || t === 232 || t === 264; +} +function S(e, t) { + return t && e(t); +} +function ie(e, t, a) { + if (a) { + if (t) return t(a); + for (let _ of a) { + let f = e(_); + if (f) return f; + } + } +} +function E6(e, t) { + return e.charCodeAt(t + 1) === 42 && e.charCodeAt(t + 2) === 42 && e.charCodeAt(t + 3) !== 47; +} +function A6(e) { + return jn(e.statements, C6) || D6(e); +} +function C6(e) { + return Ol(e) && P6(e, 95) || Rf(e) && Ff(e.moduleReference) || Uf(e) || Bf(e) || qf(e) ? e : void 0; +} +function D6(e) { + return e.flags & 8388608 ? oh(e) : void 0; +} +function oh(e) { + return N6(e) ? e : Xt(e, oh); +} +function P6(e, t) { + return Zt(e.modifiers, (a) => a.kind === t); +} +function N6(e) { + return Zb(e) && e.keywordToken === 102 && e.name.escapedText === "meta"; +} +function nm(e, t, a) { + return ie(t, a, e.typeParameters) || ie(t, a, e.parameters) || S(t, e.type); +} +function rm(e, t, a) { + return ie(t, a, e.types); +} +function im(e, t, a) { + return S(t, e.type); +} +function am(e, t, a) { + return ie(t, a, e.elements); +} +function sm(e, t, a) { + return S(t, e.expression) || S(t, e.questionDotToken) || ie(t, a, e.typeArguments) || ie(t, a, e.arguments); +} +function _m(e, t, a) { + return ie(t, a, e.statements); +} +function om(e, t, a) { + return S(t, e.label); +} +function cm(e, t, a) { + return ie(t, a, e.modifiers) || S(t, e.name) || ie(t, a, e.typeParameters) || ie(t, a, e.heritageClauses) || ie(t, a, e.members); +} +function lm(e, t, a) { + return ie(t, a, e.elements); +} +function um(e, t, a) { + return S(t, e.propertyName) || S(t, e.name); +} +function pm(e, t, a) { + return S(t, e.tagName) || ie(t, a, e.typeArguments) || S(t, e.attributes); +} +function Hi(e, t, a) { + return S(t, e.type); +} +function fm(e, t, a) { + return S(t, e.tagName) || (e.isNameFirst ? S(t, e.name) || S(t, e.typeExpression) : S(t, e.typeExpression) || S(t, e.name)) || (typeof e.comment == "string" ? void 0 : ie(t, a, e.comment)); +} +function Xi(e, t, a) { + return S(t, e.tagName) || S(t, e.typeExpression) || (typeof e.comment == "string" ? void 0 : ie(t, a, e.comment)); +} +function Cp(e, t, a) { + return S(t, e.name); +} +function ui(e, t, a) { + return S(t, e.tagName) || (typeof e.comment == "string" ? void 0 : ie(t, a, e.comment)); +} +function O6(e, t, a) { + return S(t, e.tagName) || S(t, e.importClause) || S(t, e.moduleSpecifier) || S(t, e.attributes) || (typeof e.comment == "string" ? void 0 : ie(t, a, e.comment)); +} +function M6(e, t, a) { + return S(t, e.expression); +} +function Xt(e, t, a) { + if (e === void 0 || e.kind <= 166) return; + let _ = I6[e.kind]; + return _ === void 0 ? void 0 : _(e, t, a); +} +function dm(e, t, a) { + let _ = mm(e), f = []; + for (; f.length < _.length;) f.push(e); + for (; _.length !== 0;) { + let h = _.pop(), T = f.pop(); + if ($r(h)) { + if (a) { + let k = a(h, T); + if (k) { + if (k === "skip") continue; + return k; + } + } + for (let k = h.length - 1; k >= 0; --k) _.push(h[k]), f.push(T); + } else { + let k = t(h, T); + if (k) { + if (k === "skip") continue; + return k; + } + if (h.kind >= 167) for (let c of mm(h)) _.push(c), f.push(h); + } + } +} +function mm(e) { + let t = []; + return Xt(e, a, a), t; + function a(_) { + t.unshift(_); + } +} +function ch(e) { + e.externalModuleIndicator = A6(e); +} +function lh(e, t, a, _ = !1, f) { + var h, T; + (h = ll) == null || h.push(ll.Phase.Parse, "createSourceFile", { path: e }, !0); + let k, { languageVersion: c, setExternalModuleIndicator: W, impliedNodeFormat: y, jsDocParsingMode: G } = typeof a == "object" ? a : { languageVersion: a }; + if (c === 100) k = ta.parseSourceFile(e, t, c, void 0, _, 6, Va, G); + else { + let E = y === void 0 ? W : (D) => (D.impliedNodeFormat = y, (W || ch)(D)); + k = ta.parseSourceFile(e, t, c, void 0, _, f, E, G); + } + return (T = ll) == null || T.pop(), k; +} +function uh(e) { + return e.externalModuleIndicator !== void 0; +} +function L6(e, t, a, _ = !1) { + let f = Sl.updateSourceFile(e, t, a, _); + return f.flags |= e.flags & 12582912, f; +} +function J6(e) { + hm.has(e) && q.fail("Source file has already been incrementally parsed"), hm.add(e); +} +function j6(e) { + return ph.has(e); +} +function Wp(e) { + ph.add(e); +} +function R6(e) { + return U6(e) !== void 0; +} +function U6(e) { + let t = Im(e, bb, !1); + if (t) return t; + if (jy(e, ".ts")) { + let a = Nm(e), _ = a.lastIndexOf(".d."); + if (_ >= 0) return a.substring(_); + } +} +function B6(e, t, a, _) { + if (e) { + if (e === "import") return 99; + if (e === "require") return 1; + _(t, a - t, A.resolution_mode_should_be_either_require_or_import); + } +} +function q6(e, t) { + let a = []; + for (let _ of Lp(t, 0) || vt) G6(a, _, t.substring(_.pos, _.end)); + e.pragmas = /* @__PURE__ */ new Map(); + for (let _ of a) { + if (e.pragmas.has(_.name)) { + let f = e.pragmas.get(_.name); + f instanceof Array ? f.push(_.args) : e.pragmas.set(_.name, [f, _.args]); + continue; + } + e.pragmas.set(_.name, _.args); + } +} +function F6(e, t) { + e.checkJsDirective = void 0, e.referencedFiles = [], e.typeReferenceDirectives = [], e.libReferenceDirectives = [], e.amdDependencies = [], e.hasNoDefaultLib = !1, e.pragmas.forEach((a, _) => { + switch (_) { + case "reference": { + let f = e.referencedFiles, h = e.typeReferenceDirectives, T = e.libReferenceDirectives; + jn(bp(a), (k) => { + let { types: c, lib: W, path: y, ["resolution-mode"]: G, preserve: E } = k.arguments, D = E === "true" ? !0 : void 0; + if (k.arguments["no-default-lib"] === "true") e.hasNoDefaultLib = !0; + else if (c) { + let R = B6(G, c.pos, c.end, t); + h.push({ + pos: c.pos, + end: c.end, + fileName: c.value, + ...R ? { resolutionMode: R } : {}, + ...D ? { preserve: D } : {} + }); + } else W ? T.push({ + pos: W.pos, + end: W.end, + fileName: W.value, + ...D ? { preserve: D } : {} + }) : y ? f.push({ + pos: y.pos, + end: y.end, + fileName: y.value, + ...D ? { preserve: D } : {} + }) : t(k.range.pos, k.range.end - k.range.pos, A.Invalid_reference_directive_syntax); + }); + break; + } + case "amd-dependency": + e.amdDependencies = Pp(bp(a), (f) => ({ + name: f.arguments.name, + path: f.arguments.path + })); + break; + case "amd-module": + if (a instanceof Array) for (let f of a) e.moduleName && t(f.range.pos, f.range.end - f.range.pos, A.An_AMD_module_cannot_have_multiple_name_assignments), e.moduleName = f.arguments.name; + else e.moduleName = a.arguments.name; + break; + case "ts-nocheck": + case "ts-check": + jn(bp(a), (f) => { + (!e.checkJsDirective || f.range.pos > e.checkJsDirective.pos) && (e.checkJsDirective = { + enabled: _ === "ts-check", + end: f.range.end, + pos: f.range.pos + }); + }); + break; + case "jsx": + case "jsxfrag": + case "jsximportsource": + case "jsxruntime": return; + default: q.fail("Unhandled pragma kind"); + } + }); +} +function z6(e) { + if (Dp.has(e)) return Dp.get(e); + let t = new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`, "im"); + return Dp.set(e, t), t; +} +function G6(e, t, a) { + let _ = t.kind === 2 && V6.exec(a); + if (_) { + let h = _[1].toLowerCase(), T = Pm[h]; + if (!T || !(T.kind & 1)) return; + if (T.args) { + let k = {}; + for (let c of T.args) { + let y = z6(c.name).exec(a); + if (!y && !c.optional) return; + if (y) { + let G = y[2] || y[3]; + if (c.captureSpan) { + let E = t.pos + y.index + y[1].length + 1; + k[c.name] = { + value: G, + pos: E, + end: E + G.length + }; + } else k[c.name] = G; + } + } + e.push({ + name: h, + args: { + arguments: k, + range: t + } + }); + } else e.push({ + name: h, + args: { + arguments: {}, + range: t + } + }); + return; + } + let f = t.kind === 2 && W6.exec(a); + if (f) return ym(e, t, 2, f); + if (t.kind === 3) { + let h = /@(\S+)(\s+(?:\S.*)?)?$/gm, T; + for (; T = h.exec(a);) ym(e, t, 4, T); + } +} +function ym(e, t, a, _) { + if (!_) return; + let f = _[1].toLowerCase(), h = Pm[f]; + if (!h || !(h.kind & a)) return; + let T = _[2], k = Y6(h, T); + k !== "fail" && e.push({ + name: f, + args: { + arguments: k, + range: t + } + }); +} +function Y6(e, t) { + if (!t) return {}; + if (!e.args) return {}; + let a = t.trim().split(/\s+/), _ = {}; + for (let f = 0; f < e.args.length; f++) { + let h = e.args[f]; + if (!a[f] && !h.optional) return "fail"; + if (h.captureSpan) return q.fail("Capture spans not yet implemented for non-xml pragmas"); + _[h.name] = a[f]; + } + return _; +} +function pi(e, t) { + return e.kind !== t.kind ? !1 : e.kind === 80 ? e.escapedText === t.escapedText : e.kind === 110 ? !0 : e.kind === 296 ? e.namespace.escapedText === t.namespace.escapedText && e.name.escapedText === t.name.escapedText : e.name.escapedText === t.name.escapedText && pi(e.expression, t.expression); +} +function fh(e, t, a, _) { + let f = ff(e) ? new Gf(e, t, a) : e === 80 ? new mh(80, t, a) : e === 81 ? new hh(81, t, a) : new dh(e, t, a); + return f.parent = _, f.flags = _.flags & 101441536, f; +} +function H6(e, t) { + let a = []; + if (e2(e)) return e.forEachChild((T) => { + a.push(T); + }), a; + s_.setText((t || e.getSourceFile()).text); + let _ = e.pos, f = (T) => { + __(a, _, T.pos, e), a.push(T), _ = T.end; + }, h = (T) => { + __(a, _, T.pos, e), a.push(X6(T, e)), _ = T.end; + }; + return jn(e.jsDoc, f), _ = e.pos, e.forEachChild(f, h), __(a, _, e.end, e), s_.setText(void 0), a; +} +function __(e, t, a, _) { + for (s_.resetTokenState(t); t < a;) { + let f = s_.scan(), h = s_.getTokenEnd(); + if (h <= a) { + if (f === 80) { + if (kb(_)) continue; + q.fail(`Did not expect ${q.formatSyntaxKind(_.kind)} to have an Identifier in its trivia`); + } + e.push(fh(f, t, h, _)); + } + if (t = h, f === 1) break; + } +} +function X6(e, t) { + let a = fh(353, e.pos, e.end, t), _ = [], f = e.pos; + for (let h of e) __(_, f, h.pos, t), _.push(h), f = h.end; + return __(_, f, e.end, t), a._children = _, a; +} +function yh(e) { + return Zm(e).some((t) => t.tagName.text === "inheritDoc" || t.tagName.text === "inheritdoc"); +} +function dl(e, t) { + if (!e) return vt; + let a = ts_JsDoc_exports.getJsDocTagsFromDeclarations(e, t); + if (t && (a.length === 0 || e.some(yh))) { + let _ = /* @__PURE__ */ new Set(); + for (let f of e) { + let h = gh(t, f, (T) => { + var k; + if (!_.has(T)) return _.add(T), f.kind === 178 || f.kind === 179 ? T.getContextualJsDocTags(f, t) : ((k = T.declarations) == null ? void 0 : k.length) === 1 ? T.getJsDocTags(t) : void 0; + }); + h && (a = [...h, ...a]); + } + } + return a; +} +function a_(e, t) { + if (!e) return vt; + let a = ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e, t); + if (t && (a.length === 0 || e.some(yh))) { + let _ = /* @__PURE__ */ new Set(); + for (let f of e) { + let h = gh(t, f, (T) => { + if (!_.has(T)) return _.add(T), f.kind === 178 || f.kind === 179 ? T.getContextualDocumentationComment(f, t) : T.getDocumentationComment(t); + }); + h && (a = a.length === 0 ? h.slice() : h.concat(lineBreakPart(), a)); + } + } + return a; +} +function gh(e, t, a) { + var _; + let f = ((_ = t.parent) == null ? void 0 : _.kind) === 177 ? t.parent.parent : t.parent; + if (!f) return; + let h = q2(t); + return sy(I2(f), (T) => { + let k = e.getTypeAtLocation(T), c = h && k.symbol ? e.getTypeOfSymbol(k.symbol) : k, W = e.getPropertyOfType(c, t.symbol.name); + return W ? a(W) : void 0; + }); +} +function tv() { + return { + getNodeConstructor: () => Gf, + getTokenConstructor: () => dh, + getIdentifierConstructor: () => mh, + getPrivateIdentifierConstructor: () => hh, + getSourceFileConstructor: () => Z6, + getSymbolConstructor: () => $6, + getTypeConstructor: () => Q6, + getSignatureConstructor: () => K6, + getSourceMapSourceConstructor: () => ev + }; +} +function Rn(e, t = !1) { + if (e != null) { + if (vh) { + if (t || Ol(e)) { + let a = $m(e); + return a ? [...a] : void 0; + } + return; + } + return e.modifiers?.filter((a) => !Cl(a)); + } +} +function xi(e, t = !1) { + if (e != null) { + if (vh) { + if (t || Wf(e)) { + let a = uf(e); + return a ? [...a] : void 0; + } + return; + } + return e.decorators?.filter(Cl); + } +} +function cv(e) { + return _v.has(e.kind); +} +function lv(e) { + return sv.has(e.kind); +} +function uv(e) { + return ov.has(e.kind); +} +function Qr(e) { + return nt(e); +} +function wh(e) { + return e.kind !== ye.SemicolonClassElement; +} +function Ge(e, t) { + return Rn(t)?.some((_) => _.kind === e) === !0; +} +function kh(e) { + let t = Rn(e); + return t == null ? null : t[t.length - 1] ?? null; +} +function Eh(e) { + return e.kind === ye.CommaToken; +} +function pv(e) { + return e.kind === ye.SingleLineCommentTrivia || e.kind === ye.MultiLineCommentTrivia; +} +function fv(e) { + return e.kind === ye.JSDocComment; +} +function Ah(e) { + if (cv(e)) return { + type: C.AssignmentExpression, + operator: Qr(e.kind) + }; + if (lv(e)) return { + type: C.LogicalExpression, + operator: Qr(e.kind) + }; + if (uv(e)) return { + type: C.BinaryExpression, + operator: Qr(e.kind) + }; + throw new Error(`Unexpected binary operator ${nt(e.kind)}`); +} +function x_(e, t) { + let a = t.getLineAndCharacterOfPosition(e); + return { + column: a.character, + line: a.line + 1 + }; +} +function Kr(e, t) { + let [a, _] = e.map((f) => x_(f, t)); + return { + end: _, + start: a + }; +} +function Ch(e) { + if (e.kind === Ae.Block) switch (e.parent.kind) { + case Ae.Constructor: + case Ae.GetAccessor: + case Ae.SetAccessor: + case Ae.ArrowFunction: + case Ae.FunctionExpression: + case Ae.FunctionDeclaration: + case Ae.MethodDeclaration: return !0; + default: return !1; + } + return !0; +} +function sa(e, t) { + return [e.getStart(t), e.getEnd()]; +} +function dv(e) { + return e.kind >= ye.FirstToken && e.kind <= ye.LastToken; +} +function Dh(e) { + return e.kind >= ye.JsxElement && e.kind <= ye.JsxAttribute; +} +function S_(e) { + return e.flags & sn.Let ? "let" : (e.flags & sn.AwaitUsing) === sn.AwaitUsing ? "await using" : e.flags & sn.Const ? "const" : e.flags & sn.Using ? "using" : "var"; +} +function Si(e) { + let t = Rn(e); + if (t != null) for (let a of t) switch (a.kind) { + case ye.PublicKeyword: return "public"; + case ye.ProtectedKeyword: return "protected"; + case ye.PrivateKeyword: return "private"; + default: break; + } +} +function er(e, t, a) { + return _(t); + function _(f) { + return t1(f) && f.pos === e.end ? f : vv(f.getChildren(a), (h) => (h.pos <= e.pos && h.end > e.end || h.pos === e.end) && bv(h, a) ? _(h) : void 0); + } +} +function mv(e, t) { + let a = e; + for (; a;) { + if (t(a)) return a; + a = a.parent; + } +} +function hv(e) { + return !!mv(e, Dh); +} +function Kf(e) { + return Wr(0, e, /&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g, (t) => { + let a = t.slice(1, -1); + if (a[0] === "#") { + let _ = a[1] === "x" ? parseInt(a.slice(2), 16) : parseInt(a.slice(1), 10); + return _ > 1114111 ? t : String.fromCodePoint(_); + } + return Th[a] || t; + }); +} +function _a(e) { + return e.kind === ye.ComputedPropertyName; +} +function Zf(e) { + return !!e.questionToken; +} +function ed(e) { + return e.type === C.ChainExpression; +} +function Ph(e, t) { + return ed(t) && e.expression.kind !== Ae.ParenthesizedExpression; +} +function yv(e) { + if (e.kind === ye.NullKeyword) return Rt.Null; + if (e.kind >= ye.FirstKeyword && e.kind <= ye.LastFutureReservedWord) return e.kind === ye.FalseKeyword || e.kind === ye.TrueKeyword ? Rt.Boolean : Rt.Keyword; + if (e.kind >= ye.FirstPunctuation && e.kind <= ye.LastPunctuation) return Rt.Punctuator; + if (e.kind >= ye.NoSubstitutionTemplateLiteral && e.kind <= ye.TemplateTail) return Rt.Template; + switch (e.kind) { + case ye.NumericLiteral: + case ye.BigIntLiteral: return Rt.Numeric; + case ye.PrivateIdentifier: return Rt.PrivateIdentifier; + case ye.JsxText: return Rt.JSXText; + case ye.StringLiteral: return e.parent.kind === ye.JsxAttribute || e.parent.kind === ye.JsxElement ? Rt.JSXText : Rt.String; + case ye.RegularExpressionLiteral: return Rt.RegularExpression; + case ye.Identifier: + case ye.ConstructorKeyword: + case ye.GetKeyword: + case ye.SetKeyword: + default: + } + if (e.kind === ye.Identifier) { + if (Dh(e.parent)) return Rt.JSXIdentifier; + if (e.parent.kind === ye.PropertyAccessExpression && hv(e)) return Rt.JSXIdentifier; + } + return Rt.Identifier; +} +function gv(e, t) { + let a = e.kind === ye.JsxText ? e.getFullStart() : e.getStart(t), _ = e.getEnd(), f = t.text.slice(a, _), h = yv(e), T = [a, _], k = Kr(T, t); + return h === Rt.RegularExpression ? { + type: h, + loc: k, + range: T, + regex: { + flags: f.slice(f.lastIndexOf("/") + 1), + pattern: f.slice(1, f.lastIndexOf("/")) + }, + value: f + } : h === Rt.PrivateIdentifier ? { + type: h, + loc: k, + range: T, + value: f.slice(1) + } : { + type: h, + loc: k, + range: T, + value: f + }; +} +function Nh(e) { + let t = []; + function a(_) { + pv(_) || fv(_) || (dv(_) && _.kind !== ye.EndOfFileToken ? t.push(gv(_, e)) : _.getChildren(e).forEach(a)); + } + return a(e), t; +} +function w_(e, t, a, _ = a) { + let [f, h] = [a, _].map((T) => { + let { character: k, line: c } = t.getLineAndCharacterOfPosition(T); + return { + column: k, + line: c + 1, + offset: T + }; + }); + return new Qf(e, t.fileName, { + end: h, + start: f + }); +} +function bv(e, t) { + return e.kind === ye.EndOfFileToken ? !!e.jsDoc : e.getWidth(t) !== 0; +} +function vv(e, t) { + if (e !== void 0) for (let a = 0; a < e.length; a++) { + let _ = t(e[a], a); + if (_ !== void 0) return _; + } +} +function Tv(e) { + return (av ? cf(e) : e.originalKeywordKind) === ye.ThisKeyword; +} +function td(e) { + return !!e && e.kind === ye.Identifier && Tv(e); +} +function Ih(e) { + if (!td(e)) return !1; + for (; A1(e.parent) && e.parent.left === e;) e = e.parent; + return e.parent.kind === ye.TypeQuery; +} +function Jl(e) { + switch (e.kind) { + case ye.Identifier: return !0; + case ye.PropertyAccessExpression: + case ye.ElementAccessExpression: return !(e.flags & sn.OptionalChain); + case ye.ParenthesizedExpression: + case ye.TypeAssertionExpression: + case ye.AsExpression: + case ye.SatisfiesExpression: + case ye.ExpressionWithTypeArguments: + case ye.NonNullExpression: return Jl(e.expression); + default: return !1; + } +} +function Oh(e) { + let t = Rn(e), a = e; + for (; (!t || t.length === 0) && Ti(a.parent);) { + let _ = Rn(a.parent); + _?.length && (t = _), a = a.parent; + } + return t; +} +function Mh(e, t) { + return t.text.slice(e.pos, e.end).trimStart() || "(Missing)"; +} +function xv(e) { + return e == null ? !0 : e.pos === e.end && e.pos >= 0 && e.kind !== ge.EndOfFileToken; +} +function Lh(e) { + return !xv(e); +} +function Sv(e) { + return Ge(ge.AbstractKeyword, e); +} +function wv(e) { + if (e.parameters.length && !Il(e)) { + let t = e.parameters[0]; + if (kv(t)) return t; + } + return null; +} +function kv(e) { + return td(e.name); +} +function Ev(e) { + return of(e.parent, mf); +} +function Av(e) { + switch (e.kind) { + case ge.ClassDeclaration: return !0; + case ge.ClassExpression: return !0; + case ge.PropertyDeclaration: { + let { parent: t } = e; + return !!(Ga(t) || ra(t) && !Sv(e)); + } + case ge.GetAccessor: + case ge.SetAccessor: + case ge.MethodDeclaration: { + let { parent: t } = e; + return !!e.body && (Ga(t) || ra(t)); + } + case ge.Parameter: { + let { parent: t } = e, a = t.parent; + return !!t && "body" in t && !!t.body && (t.kind === ge.Constructor || t.kind === ge.MethodDeclaration || t.kind === ge.SetAccessor) && wv(t) !== e && !!a && a.kind === ge.ClassDeclaration; + } + } + return !1; +} +function Cv(e) { + return !!("illegalDecorators" in e && e.illegalDecorators?.length); +} +function Ut(e, t) { + let a = e.getSourceFile(); + throw w_(t, a, e.getStart(a), e.getEnd()); +} +function Jh(e) { + Cv(e) && Ut(e.illegalDecorators[0], "Decorators are not valid here."); + for (let t of xi(e, !0) ?? []) Av(e) || (h_(e) && !Lh(e.body) ? Ut(t, "A decorator can only decorate a method implementation, not an overload.") : Ut(t, "Decorators are not valid here.")); + for (let t of Rn(e, !0) ?? []) { + if (t.kind !== ge.ReadonlyKeyword && ((e.kind === ge.PropertySignature || e.kind === ge.MethodSignature) && Ut(t, `'${nt(t.kind)}' modifier cannot appear on a type member`), e.kind === ge.IndexSignature && (t.kind !== ge.StaticKeyword || !ra(e.parent)) && Ut(t, `'${nt(t.kind)}' modifier cannot appear on an index signature`)), t.kind !== ge.InKeyword && t.kind !== ge.OutKeyword && t.kind !== ge.ConstKeyword && e.kind === ge.TypeParameter && Ut(t, `'${nt(t.kind)}' modifier cannot appear on a type parameter`), (t.kind === ge.InKeyword || t.kind === ge.OutKeyword) && (e.kind !== ge.TypeParameter || !(T_(e.parent) || ra(e.parent) || Nl(e.parent))) && Ut(t, `'${nt(t.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`), t.kind === ge.ReadonlyKeyword && e.kind !== ge.PropertyDeclaration && e.kind !== ge.PropertySignature && e.kind !== ge.IndexSignature && e.kind !== ge.Parameter && Ut(t, "'readonly' modifier can only appear on a property declaration or index signature."), t.kind === ge.DeclareKeyword && ra(e.parent) && !Wa(e) && Ut(t, `'${nt(t.kind)}' modifier cannot appear on class elements of this kind.`), t.kind === ge.DeclareKeyword && Xa(e)) { + let a = S_(e.declarationList); + (a === "using" || a === "await using") && Ut(t, `'declare' modifier cannot appear on a '${a}' declaration.`); + } + if (t.kind === ge.AbstractKeyword && e.kind !== ge.ClassDeclaration && e.kind !== ge.ConstructorType && e.kind !== ge.MethodDeclaration && e.kind !== ge.PropertyDeclaration && e.kind !== ge.GetAccessor && e.kind !== ge.SetAccessor && Ut(t, `'${nt(t.kind)}' modifier can only appear on a class, method, or property declaration.`), (t.kind === ge.StaticKeyword || t.kind === ge.PublicKeyword || t.kind === ge.ProtectedKeyword || t.kind === ge.PrivateKeyword) && (e.parent.kind === ge.ModuleBlock || e.parent.kind === ge.SourceFile) && Ut(t, `'${nt(t.kind)}' modifier cannot appear on a module or namespace element.`), t.kind === ge.AccessorKeyword && e.kind !== ge.PropertyDeclaration && Ut(t, "'accessor' modifier can only appear on a property declaration."), t.kind === ge.AsyncKeyword && e.kind !== ge.MethodDeclaration && e.kind !== ge.FunctionDeclaration && e.kind !== ge.FunctionExpression && e.kind !== ge.ArrowFunction && Ut(t, "'async' modifier cannot be used here."), e.kind === ge.Parameter && (t.kind === ge.StaticKeyword || t.kind === ge.ExportKeyword || t.kind === ge.DeclareKeyword || t.kind === ge.AsyncKeyword) && Ut(t, `'${nt(t.kind)}' modifier cannot appear on a parameter.`), t.kind === ge.PublicKeyword || t.kind === ge.ProtectedKeyword || t.kind === ge.PrivateKeyword) for (let a of Rn(e) ?? []) a !== t && (a.kind === ge.PublicKeyword || a.kind === ge.ProtectedKeyword || a.kind === ge.PrivateKeyword) && Ut(a, "Accessibility modifier already seen."); + if (e.kind === ge.Parameter && (t.kind === ge.PublicKeyword || t.kind === ge.PrivateKeyword || t.kind === ge.ProtectedKeyword || t.kind === ge.ReadonlyKeyword || t.kind === ge.OverrideKeyword)) { + let a = Ev(e); + a?.kind === ge.Constructor && Lh(a.body) || Ut(t, "A parameter property is only allowed in a constructor implementation."); + let _ = e; + _.dotDotDotToken && Ut(t, "A parameter property cannot be a rest parameter."), (_.name.kind === ge.ArrayBindingPattern || _.name.kind === ge.ObjectBindingPattern) && Ut(t, "A parameter property may not be declared using a binding pattern."); + } + t.kind !== ge.AsyncKeyword && e.kind === ge.MethodDeclaration && e.parent.kind === ge.ObjectLiteralExpression && Ut(t, `'${nt(t.kind)}' modifier cannot be used here.`); + } +} +function nd(e) { + return w_("message" in e && e.message || e.messageText, e.file, e.start); +} +function Pv(e) { + return dr(e) && Ke(e.name) && jh(e.expression); +} +function jh(e) { + return e.kind === x.Identifier || Pv(e); +} +function Nv(e, t, a = e.getSourceFile()) { + let _ = []; + for (;;) { + if (df(e.kind)) t(e); + else { + let f = e.getChildren(a); + if (f.length === 1) { + e = f[0]; + continue; + } + for (let h = f.length - 1; h >= 0; --h) _.push(f[h]); + } + if (_.length === 0) break; + e = _.pop(); + } +} +function Uh(e, t, a = e.getSourceFile()) { + let _ = a.text, f = a.languageVariant !== wl.JSX; + return Nv(e, (T) => { + if (T.pos !== T.end && (T.kind !== Ae.JsxText && Vm(_, T.pos === 0 ? (af(_) ?? "").length : T.pos, h), f || Iv(T))) return Wm(_, T.end, h); + }, a); + function h(T, k, c) { + t(_, { + end: k, + kind: c, + pos: T + }); + } +} +function Iv(e) { + switch (e.kind) { + case Ae.CloseBraceToken: return e.parent.kind !== Ae.JsxExpression || !rd(e.parent.parent); + case Ae.GreaterThanToken: switch (e.parent.kind) { + case Ae.JsxClosingElement: + case Ae.JsxClosingFragment: return !rd(e.parent.parent.parent); + case Ae.JsxOpeningElement: return e.end !== e.parent.end; + case Ae.JsxOpeningFragment: return !1; + case Ae.JsxSelfClosingElement: return e.end !== e.parent.end || !rd(e.parent.parent); + } + } + return !0; +} +function rd(e) { + return e.kind === Ae.JsxElement || e.kind === Ae.JsxFragment; +} +function Bh(e, t) { + let a = []; + return Uh(e, (_, f) => { + let h = f.kind === Ae.SingleLineCommentTrivia ? Rt.Line : Rt.Block, T = [f.pos, f.end], k = Kr(T, e), c = T[0] + 2, W = f.kind === Ae.SingleLineCommentTrivia ? T[1] : T[1] - 2; + a.push({ + type: h, + loc: k, + range: T, + value: t.slice(c, W) + }); + }, e), a; +} +function Fh(e, t, a) { + let { parseDiagnostics: _ } = e; + if (_.length) throw nd(_[0]); + let f = new Rl(e, { + allowInvalidAST: t.allowInvalidAST, + errorOnUnknownASTType: t.errorOnUnknownASTType, + shouldPreserveNodeMaps: a, + suppressDeprecatedPropertyWarnings: t.suppressDeprecatedPropertyWarnings + }), h = f.convertProgram(); + return !t.range || t.loc, t.tokens && (h.tokens = Nh(e)), t.comment && (h.comments = Bh(e, t.codeFullText)), { + astMaps: f.getASTMaps(), + estree: h + }; +} +function Ul(e) { + if (typeof e != "object" || e == null) return !1; + let t = e; + return t.kind === Ae.SourceFile && typeof t.getFullText == "function"; +} +function Vh(e, t) { + switch (Bv.default.extname(e).toLowerCase()) { + case Cn.Cjs: + case Cn.Js: + case Cn.Mjs: return Pr.JS; + case Cn.Cts: + case Cn.Mts: + case Cn.Ts: return Pr.TS; + case Cn.Json: return Pr.JSON; + case Cn.Jsx: return Pr.JSX; + case Cn.Tsx: return Pr.TSX; + default: return t ? Pr.TSX : Pr.TS; + } +} +function Wh(e) { + return zv("Getting AST without type information in %s mode for: %s", e.jsx ? "TSX" : "TS", e.filePath), Ul(e.code) ? e.code : lh(e.filePath, e.codeFullText, { + jsDocParsingMode: e.jsDocParsingMode, + languageVersion: g_.Latest, + setExternalModuleIndicator: e.setExternalModuleIndicator + }, !0, Vh(e.filePath, e.jsx)); +} +function Zh(e, t = {}) { + let a = _4(e), _ = $h(t), f = void 0; + t.loggerFn; + let T = Gh(typeof t.filePath == "string" && t.filePath !== "" ? t.filePath : o4(t.jsx), f), k = i4.default.extname(T).toLowerCase(), c = (() => { + switch (t.jsDocParsingMode) { + case "all": return k_.ParseAll; + case "none": return k_.ParseNone; + case "type-info": return k_.ParseForTypeInfo; + default: return k_.ParseAll; + } + })(), W = { + loc: t.loc === !0, + range: t.range === !0, + allowInvalidAST: t.allowInvalidAST === !0, + code: e, + codeFullText: a, + comment: t.comment === !0, + comments: [], + debugLevel: t.debugLevel === !0 ? /* @__PURE__ */ new Set(["typescript-eslint"]) : Array.isArray(t.debugLevel) ? new Set(t.debugLevel) : /* @__PURE__ */ new Set(), + errorOnTypeScriptSyntacticAndSemanticIssues: !1, + errorOnUnknownASTType: t.errorOnUnknownASTType === !0, + extraFileExtensions: Array.isArray(t.extraFileExtensions) && t.extraFileExtensions.every((y) => typeof y == "string") ? t.extraFileExtensions : [], + filePath: T, + jsDocParsingMode: c, + jsx: t.jsx === !0, + log: typeof t.loggerFn == "function" ? t.loggerFn : t.loggerFn === !1 ? () => {} : console.log, + preserveNodeMaps: t.preserveNodeMaps !== !1, + programs: Array.isArray(t.programs) ? t.programs : null, + projects: /* @__PURE__ */ new Map(), + projectService: t.projectService || t.project && t.projectService !== !1 && (void 0).env.TYPESCRIPT_ESLINT_PROJECT_SERVICE === "true" ? c4(t.projectService, { + jsDocParsingMode: c, + tsconfigRootDir: f + }) : void 0, + setExternalModuleIndicator: t.sourceType === "module" || t.sourceType == null && k === Cn.Mjs || t.sourceType == null && k === Cn.Mts ? (y) => { + y.externalModuleIndicator = !0; + } : void 0, + singleRun: _, + suppressDeprecatedPropertyWarnings: t.suppressDeprecatedPropertyWarnings ?? !0, + tokens: t.tokens === !0 ? [] : null, + tsconfigMatchCache: s4 ?? (s4 = new Hh(_ ? "Infinity" : t.cacheLifetime?.glob ?? void 0)), + tsconfigRootDir: f + }; + if (W.projectService && t.project && (void 0).env.TYPESCRIPT_ESLINT_IGNORE_PROJECT_AND_PROJECT_SERVICE_ERROR !== "true") throw new Error("Enabling \"project\" does nothing when \"projectService\" is enabled. You can remove the \"project\" setting."); + if (W.debugLevel.size > 0) { + let y = []; + W.debugLevel.has("typescript-eslint") && y.push("typescript-eslint:*"), (W.debugLevel.has("eslint") || id.default.enabled("eslint:*,-eslint:code-path")) && y.push("eslint:*,-eslint:code-path"), id.default.enable(y.join(",")); + } + if (Array.isArray(t.programs)) { + if (!t.programs.length) throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting."); + a4("parserOptions.programs was provided, so parserOptions.project will be ignored."); + } + return !W.programs && !W.projectService && (W.projects = /* @__PURE__ */ new Map()), t.jsDocParsingMode == null && W.projects.size === 0 && W.programs == null && W.projectService == null && (W.jsDocParsingMode = k_.ParseNone), W; +} +function _4(e) { + return Ul(e) ? e.getFullText(e) : typeof e == "string" ? e : String(e); +} +function o4(e) { + return e ? "estree.tsx" : "estree.ts"; +} +function c4(e, t) { + let a = typeof e == "object" ? e : {}; + return a.allowDefaultProject, Kh ?? (Kh = (0, r4.createProjectService)({ + options: a, + ...t + })), Kh; +} +function e0(e, t) { + let { ast: a } = d4(e, t, !1); + return a; +} +function d4(e, t, a) { + let _ = Zh(e, t); + if (t?.errorOnTypeScriptSyntacticAndSemanticIssues) throw new Error("\"errorOnTypeScriptSyntacticAndSemanticIssues\" is only supported for parseAndGenerateServices()"); + let { astMaps: h, estree: T } = Fh(Wh(_), _, a); + return { + ast: T, + esTreeNodeToTSNodeMap: h.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: h.tsNodeToESTreeNodeMap + }; +} +function m4(e, t) { + let a = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")"); + return Object.assign(a, t); +} +function n0(e) { + let t = []; + for (let a of e) try { + return a(); + } catch (_) { + t.push(_); + } + throw Object.assign(/* @__PURE__ */ new Error("All combinations failed"), { errors: t }); +} +function g4(e) { + return this[e < 0 ? this.length + e : e]; +} +function tr(e) { + let t = e.range?.[0] ?? e.start, a = (e.declaration?.decorators ?? e.decorators)?.[0]; + return a ? Math.min(tr(a), t) : t; +} +function Un(e) { + return e.range?.[1] ?? e.end; +} +function v4(e) { + let t = new Set(e); + return (a) => t.has(a?.type); +} +function S4(e) { + return ad.has(e) || ad.set(e, Qa(e) && e.value[0] === "*" && /@(?:type|satisfies)\b/u.test(e.value)), ad.get(e); +} +function w4(e) { + if (!Qa(e)) return !1; + let t = `*${e.value}*`.split(` +`); + return t.length > 1 && t.every((a) => a.trimStart()[0] === "*"); +} +function k4(e) { + return sd.has(e) || sd.set(e, w4(e)), sd.get(e); +} +function E4(e) { + if (e.length < 2) return; + let t; + for (let a = e.length - 1; a >= 0; a--) { + let _ = e[a]; + if (t && Un(_) === tr(t) && _d(_) && _d(t) && (e.splice(a + 1, 1), _.value += "*//*" + t.value, _.range = [tr(_), Un(t)]), !a0(_) && !Qa(_)) throw new TypeError(`Unknown comment type: "${_.type}".`); + t = _; + } +} +function A4(e) { + return e !== null && typeof e == "object"; +} +function A_(e) { + if (E_ !== null && typeof E_.property) { + let t = E_; + return E_ = A_.prototype = null, t; + } + return E_ = A_.prototype = e ?? Object.create(null), new A_(); +} +function od(e) { + return A_(e); +} +function D4(e, t = "type") { + od(e); + function a(_) { + let f = _[t], h = e[f]; + if (!Array.isArray(h)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${f}'.`), { node: _ }); + return h; + } + return a; +} +function Bl(e, t) { + if (!o0(e)) return e; + if (Array.isArray(e)) { + for (let _ = 0; _ < e.length; _++) e[_] = Bl(e[_], t); + return e; + } + if (t.onEnter) { + let _ = t.onEnter(e) ?? e; + if (_ !== e) return Bl(_, t); + e = _; + } + let a = u0(e); + for (let _ = 0; _ < a.length; _++) e[a[_]] = Bl(e[a[_]], t); + return t.onLeave && (e = t.onLeave(e) || e), e; +} +function N4(e, t) { + let { parser: a, text: _ } = t, { comments: f } = e, h = a === "oxc" && t.oxcAstType === "ts"; + _0(f); + let T = e.type === "File" ? e.program : e; + T.interpreter && (f.unshift(T.interpreter), delete T.interpreter), h && e.hashbang && (f.unshift(e.hashbang), delete e.hashbang), e.type === "Program" && (e.range = [0, _.length]); + let k; + return e = p0(e, { + onEnter(c) { + switch (c.type) { + case "ParenthesizedExpression": { + let { expression: W } = c, y = tr(c); + if (W.type === "TypeCastExpression") return W.range = [y, Un(c)], W; + let G = !1; + if (!h) { + if (!k) { + k = []; + for (let D of f) s0(D) && k.push(Un(D)); + } + let E = r0(0, k, (D) => D <= y); + G = E && _.slice(E, y).trim().length === 0; + } + return G ? void 0 : (W.extra = { + ...W.extra, + parenthesized: !0 + }, W); + } + case "TemplateLiteral": + if (c.expressions.length !== c.quasis.length - 1) throw new Error("Malformed template literal."); + break; + case "TemplateElement": + if (a === "flow" || a === "hermes" || a === "espree" || a === "typescript" || h) c.range = [tr(c) + 1, Un(c) - (c.tail ? 1 : 2)]; + break; + case "VariableDeclaration": { + let W = i0(0, c.declarations, -1); + W?.init && _[Un(W)] !== ";" && (c.range = [tr(c), Un(W)]); + break; + } + case "TSParenthesizedType": return c.typeAnnotation; + case "TopicReference": + e.extra = { + ...e.extra, + __isUsingHackPipeline: !0 + }; + break; + case "TSUnionType": + case "TSIntersectionType": + if (c.types.length === 1) return c.types[0]; + break; + case "ImportExpression": + a === "hermes" && c.attributes && !c.options && (c.options = c.attributes); + break; + } + }, + onLeave(c) { + switch (c.type) { + case "LogicalExpression": + if (f0(c)) return cd(c); + break; + case "TSImportType": + !c.source && c.argument.type === "TSLiteralType" && (c.source = c.argument.literal, delete c.argument); + break; + } + } + }), e; +} +function f0(e) { + return e.type === "LogicalExpression" && e.right.type === "LogicalExpression" && e.operator === e.right.operator; +} +function cd(e) { + return f0(e) ? cd({ + type: "LogicalExpression", + operator: e.operator, + left: cd({ + type: "LogicalExpression", + operator: e.operator, + left: e.left, + right: e.right.left, + range: [tr(e.left), Un(e.right.left)] + }), + right: e.right.right, + range: [tr(e), Un(e)] + }) : e; +} +function y0(e) { + let t = e.match(M4); + return t ? t[0].trimStart() : ""; +} +function g0(e) { + e = Wr(0, e.replace(O4, "").replace(I4, ""), j4, "$1"); + let a = ""; + for (; a !== e;) a = e, e = Wr(0, e, J4, ` +$1 $2 +`); + e = e.replace(m0, "").trimEnd(); + let _ = Object.create(null), f = Wr(0, e, h0, "").replace(m0, "").trimEnd(), h; + for (; h = h0.exec(e);) { + let T = Wr(0, h[2], L4, ""); + if (typeof _[h[1]] == "string" || Array.isArray(_[h[1]])) { + let k = _[h[1]]; + _[h[1]] = [ + ...R4, + ...Array.isArray(k) ? k : [k], + T + ]; + } else _[h[1]] = T; + } + return { + comments: f, + pragmas: _ + }; +} +function U4(e) { + if (!e.startsWith("#!")) return ""; + let t = e.indexOf(` +`); + return t === -1 ? e : e.slice(0, t); +} +function x0(e) { + let t = T0(e); + t && (e = e.slice(t.length + 1)); + let { pragmas: _, comments: f } = g0(y0(e)); + return { + shebang: t, + text: e, + pragmas: _, + comments: f + }; +} +function S0(e) { + let { pragmas: t } = x0(e); + return v0.some((a) => Object.prototype.hasOwnProperty.call(t, a)); +} +function w0(e) { + let { pragmas: t } = x0(e); + return b0.some((a) => Object.prototype.hasOwnProperty.call(t, a)); +} +function B4(e) { + return e = typeof e == "function" ? { parse: e } : e, { + astFormat: "estree", + hasPragma: S0, + hasIgnorePragma: w0, + locStart: tr, + locEnd: Un, + ...e + }; +} +function q4(e) { + return e.charAt(0) === "#" && e.charAt(1) === "!" ? "//" + e.slice(2) : e; +} +function N0(e) { + if (typeof e == "string") { + if (e = e.toLowerCase(), /\.(?:mjs|mts)$/iu.test(e)) return C0; + if (/\.(?:cjs|cts)$/iu.test(e)) return D0; + } +} +function z4(e) { + let { message: t, location: a } = e; + if (!a) return e; + let { start: _, end: f } = a; + return t0(t, { + loc: { + start: { + line: _.line, + column: _.column + 1 + }, + end: { + line: f.line, + column: f.column + 1 + } + }, + cause: e + }); +} +function W4(e, t) { + let a = [{ + ...F4, + filePath: t + }], _ = N0(t); + if (_ ? a = a.map((h) => ({ + ...h, + sourceType: _ + })) : a = P0.flatMap((h) => a.map((T) => ({ + ...T, + sourceType: h + }))), V4(t)) return a; + let f = E0.test(e); + return [f, !f].flatMap((h) => a.map((T) => ({ + ...T, + jsx: h + }))); +} +function G4(e, t) { + let a = t?.filepath; + typeof a != "string" && (a = void 0); + let _ = A0(e), f = W4(e, a), h; + try { + h = n0(f.map((T) => () => e0(_, T))); + } catch ({ errors: [T] }) { + throw z4(T); + } + return d0(h, { + parser: "typescript", + text: e + }); +} +var ty, hd, I0, ld, ny, Na, Ia, ry, Wr, gm, vt, ay, xm, q, ll, Ae, sn, Qp, wm, Op, Kp, km, en, Zp, Em, Pr, g_, wl, Cn, Am, Cm, Dm, $s, Pm, Ya, Xr, My, vd, Ly, Sd, A, tf, Wy, Lm, Jm, Gy, Yy, Hy, Xy, $y, Qy, Ky, Zy, ng, ul, rf, ug, Ed, Ad, Cd, Ra, Et, sb, Rd, it, x1, fb, db, w1, bb, qp, Ab, Db, _l, Pb, Sn, Fd, Ks, ea, Xd, Qd, Kd, Zd, em, tm, I6, ta, hm, ph, Sl, Dp, V6, W6, s_, Gf, Yf, $6, dh, mh, hh, Q6, K6, Z6, ev, Ml, vh, Th, Ll, xh, Sh, C, Rt, av, ye, sv, _v, ov, Qf, ge, x, Rl, rx, ix, Uv, Bv, zv, Gh, Hh, $h, n4, r4, id, i4, a4, s4, Kh, k_, t0, h4, r0, i0, $a, Qa, a0, ad, s0, sd, _d, _0, o0, E_, C4, c0, w, u0, p0, d0, I4, O4, M4, L4, m0, J4, h0, j4, R4, b0, v0, T0, k0, E0, A0, C0, D0, P0, F4, V4, Y4; +//#endregion +__esmMin((() => { + ty = Object.defineProperty; + hd = (e, t) => { + for (var a in t) ty(e, a, { + get: t[a], + enumerable: !0 + }); + }; + I0 = {}; + hd(I0, { parsers: () => ld }); + ld = {}; + hd(ld, { typescript: () => Y4 }); + ny = () => () => {}, Na = ny; + Ia = (e, t) => (a, _, ...f) => a | 1 && _ == null ? void 0 : (t.call(_) ?? _[e]).apply(_, f); + ry = String.prototype.replaceAll ?? function(e, t) { + return e.global ? this.replace(e, t) : this.split(e).join(t); + }, Wr = Ia("replaceAll", function() { + if (typeof this == "string") return ry; + }); + gm = "5.9"; + vt = [], ay = /* @__PURE__ */ new Map(); + Array.prototype.at; + xm = Object.prototype.hasOwnProperty; + ((e) => { + let t = 0; + e.currentLogLevel = 2, e.isDebugging = !1; + function a(L) { + return e.currentLogLevel <= L; + } + e.shouldLog = a; + function _(L, se) { + e.loggingHost && a(L) && e.loggingHost.log(L, se); + } + function f(L) { + _(3, L); + } + e.log = f, ((L) => { + function se(Qe) { + _(1, Qe); + } + L.error = se; + function fe(Qe) { + _(2, Qe); + } + L.warn = fe; + function Te(Qe) { + _(3, Qe); + } + L.log = Te; + function He(Qe) { + _(4, Qe); + } + L.trace = He; + })(f = e.log || (e.log = {})); + let h = {}; + function T() { + return t; + } + e.getAssertionLevel = T; + function k(L) { + let se = t; + if (t = L, L > se) for (let fe of by(h)) { + let Te = h[fe]; + Te !== void 0 && e[fe] !== Te.assertion && L >= Te.level && (e[fe] = Te, h[fe] = void 0); + } + } + e.setAssertionLevel = k; + function c(L) { + return t >= L; + } + e.shouldAssert = c; + function W(L, se) { + return c(L) ? !0 : (h[se] = { + level: L, + assertion: e[se] + }, e[se] = Va, !1); + } + function y(L, se) { + debugger; + let fe = /* @__PURE__ */ new Error(L ? `Debug Failure. ${L}` : "Debug Failure."); + throw Error.captureStackTrace && Error.captureStackTrace(fe, se || y), fe; + } + e.fail = y; + function G(L, se, fe) { + return y(`${se || "Unexpected node."}\r +Node ${Ot(L.kind)} was unexpected.`, fe || G); + } + e.failBadSyntaxKind = G; + function E(L, se, fe, Te) { + L || (se = se ? `False expression: ${se}` : "False expression.", fe && (se += `\r +Verbose Debug Information: ` + (typeof fe == "string" ? fe : fe())), y(se, Te || E)); + } + e.assert = E; + function D(L, se, fe, Te, He) { + if (L !== se) y(`Expected ${L} === ${se}. ${fe ? Te ? `${fe} ${Te}` : fe : ""}`, He || D); + } + e.assertEqual = D; + function R(L, se, fe, Te) { + L >= se && y(`Expected ${L} < ${se}. ${fe || ""}`, Te || R); + } + e.assertLessThan = R; + function ue(L, se, fe) { + L > se && y(`Expected ${L} <= ${se}`, fe || ue); + } + e.assertLessThanOrEqual = ue; + function be(L, se, fe) { + L < se && y(`Expected ${L} >= ${se}`, fe || be); + } + e.assertGreaterThanOrEqual = be; + function he(L, se, fe) { + L ?? y(se, fe || he); + } + e.assertIsDefined = he; + function de(L, se, fe) { + return he(L, se, fe || de), L; + } + e.checkDefined = de; + function O(L, se, fe) { + for (let Te of L) he(Te, se, fe || O); + } + e.assertEachIsDefined = O; + function ae(L, se, fe) { + return O(L, se, fe || ae), L; + } + e.checkEachDefined = ae; + function Oe(L, se = "Illegal value:", fe) { + return y(`${se} ${typeof L == "object" && Dr(L, "kind") && Dr(L, "pos") ? "SyntaxKind: " + Ot(L.kind) : JSON.stringify(L)}`, fe || Oe); + } + e.assertNever = Oe; + function V(L, se, fe, Te) { + W(1, "assertEachNode") && E(se === void 0 || Gp(L, se), fe || "Unexpected node.", () => `Node array did not pass test '${hn(se)}'.`, Te || V); + } + e.assertEachNode = V; + function oe(L, se, fe, Te) { + W(1, "assertNode") && E(L !== void 0 && (se === void 0 || se(L)), fe || "Unexpected node.", () => `Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`, Te || oe); + } + e.assertNode = oe; + function Y(L, se, fe, Te) { + W(1, "assertNotNode") && E(L === void 0 || se === void 0 || !se(L), fe || "Unexpected node.", () => `Node ${Ot(L.kind)} should not have passed test '${hn(se)}'.`, Te || Y); + } + e.assertNotNode = Y; + function ft(L, se, fe, Te) { + W(1, "assertOptionalNode") && E(se === void 0 || L === void 0 || se(L), fe || "Unexpected node.", () => `Node ${Ot(L?.kind)} did not pass test '${hn(se)}'.`, Te || ft); + } + e.assertOptionalNode = ft; + function nr(L, se, fe, Te) { + W(1, "assertOptionalToken") && E(se === void 0 || L === void 0 || L.kind === se, fe || "Unexpected node.", () => `Node ${Ot(L?.kind)} was not a '${Ot(se)}' token.`, Te || nr); + } + e.assertOptionalToken = nr; + function mn(L, se, fe) { + W(1, "assertMissingNode") && E(L === void 0, se || "Unexpected node.", () => `Node ${Ot(L.kind)} was unexpected'.`, fe || mn); + } + e.assertMissingNode = mn; + function rr(L) {} + e.type = rr; + function hn(L) { + if (typeof L != "function") return ""; + if (Dr(L, "name")) return L.name; + { + let se = Function.prototype.toString.call(L), fe = /^function\s+([\w$]+)\s*\(/.exec(se); + return fe ? fe[1] : ""; + } + } + e.getFunctionName = hn; + function Dn(L) { + return `{ name: ${l_(L.escapedName)}; flags: ${ot(L.flags)}; declarations: ${Pp(L.declarations, (se) => Ot(se.kind))} }`; + } + e.formatSymbol = Dn; + function We(L = 0, se, fe) { + let Te = Ir(se); + if (L === 0) return Te.length > 0 && Te[0][0] === 0 ? Te[0][1] : "0"; + if (fe) { + let He = [], Qe = L; + for (let [st, Ct] of Te) { + if (st > L) break; + st !== 0 && st & L && (He.push(Ct), Qe &= ~st); + } + if (Qe === 0) return He.join("|"); + } else for (let [He, Qe] of Te) if (He === L) return Qe; + return L.toString(); + } + e.formatEnum = We; + let ir = /* @__PURE__ */ new Map(); + function Ir(L) { + let se = ir.get(L); + if (se) return se; + let fe = []; + for (let He in L) { + let Qe = L[He]; + typeof Qe == "number" && fe.push([Qe, He]); + } + let Te = fy(fe, (He, Qe) => Sm(He[0], Qe[0])); + return ir.set(L, Te), Te; + } + function Ot(L) { + return We(L, Ae, !1); + } + e.formatSyntaxKind = Ot; + function Bn(L) { + return We(L, Cm, !1); + } + e.formatSnippetKind = Bn; + function Pn(L) { + return We(L, Pr, !1); + } + e.formatScriptKind = Pn; + function Mt(L) { + return We(L, sn, !0); + } + e.formatNodeFlags = Mt; + function ht(L) { + return We(L, km, !0); + } + e.formatNodeCheckFlags = ht; + function $e(L) { + return We(L, Qp, !0); + } + e.formatModifierFlags = $e; + function qn(L) { + return We(L, Am, !0); + } + e.formatTransformFlags = qn; + function $t(L) { + return We(L, Dm, !0); + } + e.formatEmitFlags = $t; + function ot(L) { + return We(L, Kp, !0); + } + e.formatSymbolFlags = ot; + function at(L) { + return We(L, en, !0); + } + e.formatTypeFlags = at; + function Bt(L) { + return We(L, Em, !0); + } + e.formatSignatureFlags = Bt; + function Lt(L) { + return We(L, Zp, !0); + } + e.formatObjectFlags = Lt; + function ct(L) { + return We(L, Op, !0); + } + e.formatFlowFlags = ct; + function ar(L) { + return We(L, wm, !0); + } + e.formatRelationComparisonResult = ar; + function dt(L) { + return We(L, CheckMode, !0); + } + e.formatCheckMode = dt; + function yn(L) { + return We(L, SignatureCheckMode, !0); + } + e.formatSignatureCheckMode = yn; + function yt(L) { + return We(L, TypeFacts, !0); + } + e.formatTypeFacts = yt; + let _n = !1, tt; + function qt(L) { + "__debugFlowFlags" in L || Object.defineProperties(L, { + __tsDebuggerDisplay: { value() { + let se = this.flags & 2 ? "FlowStart" : this.flags & 4 ? "FlowBranchLabel" : this.flags & 8 ? "FlowLoopLabel" : this.flags & 16 ? "FlowAssignment" : this.flags & 32 ? "FlowTrueCondition" : this.flags & 64 ? "FlowFalseCondition" : this.flags & 128 ? "FlowSwitchClause" : this.flags & 256 ? "FlowArrayMutation" : this.flags & 512 ? "FlowCall" : this.flags & 1024 ? "FlowReduceLabel" : this.flags & 1 ? "FlowUnreachable" : "UnknownFlow", fe = this.flags & -2048; + return `${se}${fe ? ` (${ct(fe)})` : ""}`; + } }, + __debugFlowFlags: { get() { + return We(this.flags, Op, !0); + } }, + __debugToString: { value() { + return yr(this); + } } + }); + } + function tn(L) { + return _n && (typeof Object.setPrototypeOf == "function" ? (tt || (tt = Object.create(Object.prototype), qt(tt)), Object.setPrototypeOf(L, tt)) : qt(L)), L; + } + e.attachFlowNodeDebugInfo = tn; + let sr; + function mr(L) { + "__tsDebuggerDisplay" in L || Object.defineProperties(L, { __tsDebuggerDisplay: { value(se) { + return se = String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/, "]"), `NodeArray ${se}`; + } } }); + } + function hr(L) { + _n && (typeof Object.setPrototypeOf == "function" ? (sr || (sr = Object.create(Array.prototype), mr(sr)), Object.setPrototypeOf(L, sr)) : mr(L)); + } + e.attachNodeArrayDebugInfo = hr; + function Fn() { + if (_n) return; + let L = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(); + Object.defineProperties(Et.getSymbolConstructor().prototype, { + __tsDebuggerDisplay: { value() { + let Te = this.flags & 33554432 ? "TransientSymbol" : "Symbol", He = this.flags & -33554433; + return `${Te} '${Jp(this)}'${He ? ` (${ot(He)})` : ""}`; + } }, + __debugFlags: { get() { + return ot(this.flags); + } } + }), Object.defineProperties(Et.getTypeConstructor().prototype, { + __tsDebuggerDisplay: { value() { + let Te = this.flags & 67359327 ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 ? "NullableType" : this.flags & 384 ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 ? "UniqueESSymbolType" : this.flags & 32 ? "EnumType" : this.flags & 1048576 ? "UnionType" : this.flags & 2097152 ? "IntersectionType" : this.flags & 4194304 ? "IndexType" : this.flags & 8388608 ? "IndexedAccessType" : this.flags & 16777216 ? "ConditionalType" : this.flags & 33554432 ? "SubstitutionType" : this.flags & 262144 ? "TypeParameter" : this.flags & 524288 ? this.objectFlags & 3 ? "InterfaceType" : this.objectFlags & 4 ? "TypeReference" : this.objectFlags & 8 ? "TupleType" : this.objectFlags & 16 ? "AnonymousType" : this.objectFlags & 32 ? "MappedType" : this.objectFlags & 1024 ? "ReverseMappedType" : this.objectFlags & 256 ? "EvolvingArrayType" : "ObjectType" : "Type", He = this.flags & 524288 ? this.objectFlags & -1344 : 0; + return `${Te}${this.symbol ? ` '${Jp(this.symbol)}'` : ""}${He ? ` (${Lt(He)})` : ""}`; + } }, + __debugFlags: { get() { + return at(this.flags); + } }, + __debugObjectFlags: { get() { + return this.flags & 524288 ? Lt(this.objectFlags) : ""; + } }, + __debugTypeToString: { value() { + let Te = L.get(this); + return Te === void 0 && (Te = this.checker.typeToString(this), L.set(this, Te)), Te; + } } + }), Object.defineProperties(Et.getSignatureConstructor().prototype, { + __debugFlags: { get() { + return Bt(this.flags); + } }, + __debugSignatureToString: { value() { + var Te; + return (Te = this.checker) == null ? void 0 : Te.signatureToString(this); + } } + }); + let fe = [ + Et.getNodeConstructor(), + Et.getIdentifierConstructor(), + Et.getTokenConstructor(), + Et.getSourceFileConstructor() + ]; + for (let Te of fe) Dr(Te.prototype, "__debugKind") || Object.defineProperties(Te.prototype, { + __tsDebuggerDisplay: { value() { + return `${Ua(this) ? "GeneratedIdentifier" : Ke(this) ? `Identifier '${An(this)}'` : gi(this) ? `PrivateIdentifier '${An(this)}'` : vi(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : aa(this) ? `NumericLiteral ${this.text}` : k1(this) ? `BigIntLiteral ${this.text}n` : Ef(this) ? "TypeParameterDeclaration" : m_(this) ? "ParameterDeclaration" : Af(this) ? "ConstructorDeclaration" : Tl(this) ? "GetAccessorDeclaration" : y_(this) ? "SetAccessorDeclaration" : P1(this) ? "CallSignatureDeclaration" : N1(this) ? "ConstructSignatureDeclaration" : Cf(this) ? "IndexSignatureDeclaration" : I1(this) ? "TypePredicateNode" : Df(this) ? "TypeReferenceNode" : Pf(this) ? "FunctionTypeNode" : Nf(this) ? "ConstructorTypeNode" : qb(this) ? "TypeQueryNode" : O1(this) ? "TypeLiteralNode" : Fb(this) ? "ArrayTypeNode" : zb(this) ? "TupleTypeNode" : Vb(this) ? "OptionalTypeNode" : Wb(this) ? "RestTypeNode" : L1(this) ? "UnionTypeNode" : J1(this) ? "IntersectionTypeNode" : Gb(this) ? "ConditionalTypeNode" : Yb(this) ? "InferTypeNode" : j1(this) ? "ParenthesizedTypeNode" : Hb(this) ? "ThisTypeNode" : R1(this) ? "TypeOperatorNode" : Xb(this) ? "IndexedAccessTypeNode" : U1(this) ? "MappedTypeNode" : $b(this) ? "LiteralTypeNode" : M1(this) ? "NamedTupleMember" : Qb(this) ? "ImportTypeNode" : Ot(this.kind)}${this.flags ? ` (${Mt(this.flags)})` : ""}`; + } }, + __debugKind: { get() { + return Ot(this.kind); + } }, + __debugNodeFlags: { get() { + return Mt(this.flags); + } }, + __debugModifierFlags: { get() { + return $e(H2(this)); + } }, + __debugTransformFlags: { get() { + return qn(this.transformFlags); + } }, + __debugIsParseTreeNode: { get() { + return gl(this); + } }, + __debugEmitFlags: { get() { + return $t(za(this)); + } }, + __debugGetText: { value(He) { + if (Ja(this)) return ""; + let Qe = se.get(this); + if (Qe === void 0) { + let st = mg(this), Ct = st && hi(st); + Qe = Ct ? Od(Ct, st, He) : "", se.set(this, Qe); + } + return Qe; + } } + }); + _n = !0; + } + e.enableDebugInfo = Fn; + function zn(L) { + let se = L & 7, fe = se === 0 ? "in out" : se === 3 ? "[bivariant]" : se === 2 ? "in" : se === 1 ? "out" : se === 4 ? "[independent]" : ""; + return L & 8 ? fe += " (unmeasurable)" : L & 16 && (fe += " (unreliable)"), fe; + } + e.formatVariance = zn; + class Or { + __debugToString() { + var se; + switch (this.kind) { + case 3: return ((se = this.debugInfo) == null ? void 0 : se.call(this)) || "(function mapper)"; + case 0: return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`; + case 1: return yd(this.sources, this.targets || Pp(this.sources, () => "any"), (fe, Te) => `${fe.__debugTypeToString()} -> ${typeof Te == "string" ? Te : Te.__debugTypeToString()}`).join(", "); + case 2: return yd(this.sources, this.targets, (fe, Te) => `${fe.__debugTypeToString()} -> ${Te().__debugTypeToString()}`).join(", "); + case 5: + case 4: return `m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`; + default: return Oe(this); + } + } + } + e.DebugTypeMapper = Or; + function Vn(L) { + return e.isDebugging ? Object.setPrototypeOf(L, Or.prototype) : L; + } + e.attachDebugPrototypeIfDebug = Vn; + function Ce(L) { + return console.log(yr(L)); + } + e.printControlFlowGraph = Ce; + function yr(L) { + let se = -1; + function fe(u) { + return u.id || (u.id = se, se--), u.id; + } + let Te; + ((u) => { + u.lr = "─", u.ud = "│", u.dr = "╭", u.dl = "╮", u.ul = "╯", u.ur = "╰", u.udr = "├", u.udl = "┤", u.dlr = "┬", u.ulr = "┴", u.udlr = "╫"; + })(Te || (Te = {})); + let He; + ((u) => { + u[u.None = 0] = "None", u[u.Up = 1] = "Up", u[u.Down = 2] = "Down", u[u.Left = 4] = "Left", u[u.Right = 8] = "Right", u[u.UpDown = 3] = "UpDown", u[u.LeftRight = 12] = "LeftRight", u[u.UpLeft = 5] = "UpLeft", u[u.UpRight = 9] = "UpRight", u[u.DownLeft = 6] = "DownLeft", u[u.DownRight = 10] = "DownRight", u[u.UpDownLeft = 7] = "UpDownLeft", u[u.UpDownRight = 11] = "UpDownRight", u[u.UpLeftRight = 13] = "UpLeftRight", u[u.DownLeftRight = 14] = "DownLeftRight", u[u.UpDownLeftRight = 15] = "UpDownLeftRight", u[u.NoChildren = 16] = "NoChildren"; + })(He || (He = {})); + let Qe = 2032, st = 882, Ct = Object.create(null), Tt = [], lt = [], Mr = Se(L, /* @__PURE__ */ new Set()); + for (let u of Tt) u.text = rt(u.flowNode, u.circular), me(u); + let Nn = Ze(Ve(Mr)); + return Ye(Mr, 0), on(); + function Wn(u) { + return !!(u.flags & 128); + } + function wi(u) { + return !!(u.flags & 12) && !!u.antecedent; + } + function U(u) { + return !!(u.flags & Qe); + } + function K(u) { + return !!(u.flags & st); + } + function Z(u) { + let Ie = []; + for (let Me of u.edges) Me.source === u && Ie.push(Me.target); + return Ie; + } + function xe(u) { + let Ie = []; + for (let Me of u.edges) Me.target === u && Ie.push(Me.source); + return Ie; + } + function Se(u, Ie) { + let Me = fe(u), B = Ct[Me]; + if (B && Ie.has(u)) return B.circular = !0, B = { + id: -1, + flowNode: u, + edges: [], + text: "", + lane: -1, + endLane: -1, + level: -1, + circular: "circularity" + }, Tt.push(B), B; + if (Ie.add(u), !B) if (Ct[Me] = B = { + id: Me, + flowNode: u, + edges: [], + text: "", + lane: -1, + endLane: -1, + level: -1, + circular: !1 + }, Tt.push(B), wi(u)) for (let Be of u.antecedent) we(B, Be, Ie); + else U(u) && we(B, u.antecedent, Ie); + return Ie.delete(u), B; + } + function we(u, Ie, Me) { + let B = Se(Ie, Me), Be = { + source: u, + target: B + }; + lt.push(Be), u.edges.push(Be), B.edges.push(Be); + } + function me(u) { + if (u.level !== -1) return u.level; + let Ie = 0; + for (let Me of xe(u)) Ie = Math.max(Ie, me(Me) + 1); + return u.level = Ie; + } + function Ve(u) { + let Ie = 0; + for (let Me of Z(u)) Ie = Math.max(Ie, Ve(Me)); + return Ie + 1; + } + function Ze(u) { + let Ie = M(Array(u), 0); + for (let Me of Tt) Ie[Me.level] = Math.max(Ie[Me.level], Me.text.length); + return Ie; + } + function Ye(u, Ie) { + if (u.lane === -1) { + u.lane = Ie, u.endLane = Ie; + let Me = Z(u); + for (let B = 0; B < Me.length; B++) { + B > 0 && Ie++; + let Be = Me[B]; + Ye(Be, Ie), Be.endLane > u.endLane && (Ie = Be.endLane); + } + u.endLane = Ie; + } + } + function Ee(u) { + if (u & 2) return "Start"; + if (u & 4) return "Branch"; + if (u & 8) return "Loop"; + if (u & 16) return "Assignment"; + if (u & 32) return "True"; + if (u & 64) return "False"; + if (u & 128) return "SwitchClause"; + if (u & 256) return "ArrayMutation"; + if (u & 512) return "Call"; + if (u & 1024) return "ReduceLabel"; + if (u & 1) return "Unreachable"; + throw new Error(); + } + function gn(u) { + return Od(hi(u), u, !1); + } + function rt(u, Ie) { + let Me = Ee(u.flags); + if (Ie && (Me = `${Me}#${fe(u)}`), Wn(u)) { + let B = [], { switchStatement: Be, clauseStart: nn, clauseEnd: ze } = u.node; + for (let Xe = nn; Xe < ze; Xe++) { + let Dt = Be.caseBlock.clauses[Xe]; + r6(Dt) ? B.push("default") : B.push(gn(Dt.expression)); + } + Me += ` (${B.join(", ")})`; + } else K(u) && u.node && (Me += ` (${gn(u.node)})`); + return Ie === "circularity" ? `Circular(${Me})` : Me; + } + function on() { + let u = Nn.length, Ie = Ay(Tt, 0, (ze) => ze.lane) + 1, Me = M(Array(Ie), ""), B = Nn.map(() => Array(Ie)), Be = Nn.map(() => M(Array(Ie), 0)); + for (let ze of Tt) { + B[ze.level][ze.lane] = ze; + let Xe = Z(ze); + for (let wt = 0; wt < Xe.length; wt++) { + let Pt = Xe[wt], Ft = 8; + Pt.lane === ze.lane && (Ft |= 4), wt > 0 && (Ft |= 1), wt < Xe.length - 1 && (Ft |= 2), Be[ze.level][Pt.lane] |= Ft; + } + Xe.length === 0 && (Be[ze.level][ze.lane] |= 16); + let Dt = xe(ze); + for (let wt = 0; wt < Dt.length; wt++) { + let Pt = Dt[wt], Ft = 4; + wt > 0 && (Ft |= 1), wt < Dt.length - 1 && (Ft |= 2), Be[ze.level - 1][Pt.lane] |= Ft; + } + } + for (let ze = 0; ze < u; ze++) for (let Xe = 0; Xe < Ie; Xe++) { + let Dt = ze > 0 ? Be[ze - 1][Xe] : 0, wt = Xe > 0 ? Be[ze][Xe - 1] : 0, Pt = Be[ze][Xe]; + Pt || (Dt & 8 && (Pt |= 12), wt & 2 && (Pt |= 3), Be[ze][Xe] = Pt); + } + for (let ze = 0; ze < u; ze++) for (let Xe = 0; Xe < Me.length; Xe++) { + let Dt = Be[ze][Xe], wt = Dt & 4 ? "─" : " ", Pt = B[ze][Xe]; + Pt ? (nn(Xe, Pt.text), ze < u - 1 && (nn(Xe, " "), nn(Xe, Ue(wt, Nn[ze] - Pt.text.length)))) : ze < u - 1 && nn(Xe, Ue(wt, Nn[ze] + 1)), nn(Xe, Zr(Dt)), nn(Xe, Dt & 8 && ze < u - 1 && !B[ze + 1][Xe] ? "─" : " "); + } + return ` +${Me.join(` +`)} +`; + function nn(ze, Xe) { + Me[ze] += Xe; + } + } + function Zr(u) { + switch (u) { + case 3: return "│"; + case 12: return "─"; + case 5: return "╯"; + case 9: return "╰"; + case 6: return "╮"; + case 10: return "╭"; + case 7: return "┤"; + case 11: return "├"; + case 13: return "┴"; + case 14: return "┬"; + case 15: return "╫"; + } + return " "; + } + function M(u, Ie) { + if (u.fill) u.fill(Ie); + else for (let Me = 0; Me < u.length; Me++) u[Me] = Ie; + return u; + } + function Ue(u, Ie) { + if (u.repeat) return Ie > 0 ? u.repeat(Ie) : ""; + let Me = ""; + for (; Me.length < Ie;) Me += u; + return Me; + } + } + e.formatControlFlowGraph = yr; + })(q || (q = {})); + Date.now; + Ae = ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.SingleLineCommentTrivia = 2] = "SingleLineCommentTrivia", e[e.MultiLineCommentTrivia = 3] = "MultiLineCommentTrivia", e[e.NewLineTrivia = 4] = "NewLineTrivia", e[e.WhitespaceTrivia = 5] = "WhitespaceTrivia", e[e.ShebangTrivia = 6] = "ShebangTrivia", e[e.ConflictMarkerTrivia = 7] = "ConflictMarkerTrivia", e[e.NonTextFileMarkerTrivia = 8] = "NonTextFileMarkerTrivia", e[e.NumericLiteral = 9] = "NumericLiteral", e[e.BigIntLiteral = 10] = "BigIntLiteral", e[e.StringLiteral = 11] = "StringLiteral", e[e.JsxText = 12] = "JsxText", e[e.JsxTextAllWhiteSpaces = 13] = "JsxTextAllWhiteSpaces", e[e.RegularExpressionLiteral = 14] = "RegularExpressionLiteral", e[e.NoSubstitutionTemplateLiteral = 15] = "NoSubstitutionTemplateLiteral", e[e.TemplateHead = 16] = "TemplateHead", e[e.TemplateMiddle = 17] = "TemplateMiddle", e[e.TemplateTail = 18] = "TemplateTail", e[e.OpenBraceToken = 19] = "OpenBraceToken", e[e.CloseBraceToken = 20] = "CloseBraceToken", e[e.OpenParenToken = 21] = "OpenParenToken", e[e.CloseParenToken = 22] = "CloseParenToken", e[e.OpenBracketToken = 23] = "OpenBracketToken", e[e.CloseBracketToken = 24] = "CloseBracketToken", e[e.DotToken = 25] = "DotToken", e[e.DotDotDotToken = 26] = "DotDotDotToken", e[e.SemicolonToken = 27] = "SemicolonToken", e[e.CommaToken = 28] = "CommaToken", e[e.QuestionDotToken = 29] = "QuestionDotToken", e[e.LessThanToken = 30] = "LessThanToken", e[e.LessThanSlashToken = 31] = "LessThanSlashToken", e[e.GreaterThanToken = 32] = "GreaterThanToken", e[e.LessThanEqualsToken = 33] = "LessThanEqualsToken", e[e.GreaterThanEqualsToken = 34] = "GreaterThanEqualsToken", e[e.EqualsEqualsToken = 35] = "EqualsEqualsToken", e[e.ExclamationEqualsToken = 36] = "ExclamationEqualsToken", e[e.EqualsEqualsEqualsToken = 37] = "EqualsEqualsEqualsToken", e[e.ExclamationEqualsEqualsToken = 38] = "ExclamationEqualsEqualsToken", e[e.EqualsGreaterThanToken = 39] = "EqualsGreaterThanToken", e[e.PlusToken = 40] = "PlusToken", e[e.MinusToken = 41] = "MinusToken", e[e.AsteriskToken = 42] = "AsteriskToken", e[e.AsteriskAsteriskToken = 43] = "AsteriskAsteriskToken", e[e.SlashToken = 44] = "SlashToken", e[e.PercentToken = 45] = "PercentToken", e[e.PlusPlusToken = 46] = "PlusPlusToken", e[e.MinusMinusToken = 47] = "MinusMinusToken", e[e.LessThanLessThanToken = 48] = "LessThanLessThanToken", e[e.GreaterThanGreaterThanToken = 49] = "GreaterThanGreaterThanToken", e[e.GreaterThanGreaterThanGreaterThanToken = 50] = "GreaterThanGreaterThanGreaterThanToken", e[e.AmpersandToken = 51] = "AmpersandToken", e[e.BarToken = 52] = "BarToken", e[e.CaretToken = 53] = "CaretToken", e[e.ExclamationToken = 54] = "ExclamationToken", e[e.TildeToken = 55] = "TildeToken", e[e.AmpersandAmpersandToken = 56] = "AmpersandAmpersandToken", e[e.BarBarToken = 57] = "BarBarToken", e[e.QuestionToken = 58] = "QuestionToken", e[e.ColonToken = 59] = "ColonToken", e[e.AtToken = 60] = "AtToken", e[e.QuestionQuestionToken = 61] = "QuestionQuestionToken", e[e.BacktickToken = 62] = "BacktickToken", e[e.HashToken = 63] = "HashToken", e[e.EqualsToken = 64] = "EqualsToken", e[e.PlusEqualsToken = 65] = "PlusEqualsToken", e[e.MinusEqualsToken = 66] = "MinusEqualsToken", e[e.AsteriskEqualsToken = 67] = "AsteriskEqualsToken", e[e.AsteriskAsteriskEqualsToken = 68] = "AsteriskAsteriskEqualsToken", e[e.SlashEqualsToken = 69] = "SlashEqualsToken", e[e.PercentEqualsToken = 70] = "PercentEqualsToken", e[e.LessThanLessThanEqualsToken = 71] = "LessThanLessThanEqualsToken", e[e.GreaterThanGreaterThanEqualsToken = 72] = "GreaterThanGreaterThanEqualsToken", e[e.GreaterThanGreaterThanGreaterThanEqualsToken = 73] = "GreaterThanGreaterThanGreaterThanEqualsToken", e[e.AmpersandEqualsToken = 74] = "AmpersandEqualsToken", e[e.BarEqualsToken = 75] = "BarEqualsToken", e[e.BarBarEqualsToken = 76] = "BarBarEqualsToken", e[e.AmpersandAmpersandEqualsToken = 77] = "AmpersandAmpersandEqualsToken", e[e.QuestionQuestionEqualsToken = 78] = "QuestionQuestionEqualsToken", e[e.CaretEqualsToken = 79] = "CaretEqualsToken", e[e.Identifier = 80] = "Identifier", e[e.PrivateIdentifier = 81] = "PrivateIdentifier", e[e.JSDocCommentTextToken = 82] = "JSDocCommentTextToken", e[e.BreakKeyword = 83] = "BreakKeyword", e[e.CaseKeyword = 84] = "CaseKeyword", e[e.CatchKeyword = 85] = "CatchKeyword", e[e.ClassKeyword = 86] = "ClassKeyword", e[e.ConstKeyword = 87] = "ConstKeyword", e[e.ContinueKeyword = 88] = "ContinueKeyword", e[e.DebuggerKeyword = 89] = "DebuggerKeyword", e[e.DefaultKeyword = 90] = "DefaultKeyword", e[e.DeleteKeyword = 91] = "DeleteKeyword", e[e.DoKeyword = 92] = "DoKeyword", e[e.ElseKeyword = 93] = "ElseKeyword", e[e.EnumKeyword = 94] = "EnumKeyword", e[e.ExportKeyword = 95] = "ExportKeyword", e[e.ExtendsKeyword = 96] = "ExtendsKeyword", e[e.FalseKeyword = 97] = "FalseKeyword", e[e.FinallyKeyword = 98] = "FinallyKeyword", e[e.ForKeyword = 99] = "ForKeyword", e[e.FunctionKeyword = 100] = "FunctionKeyword", e[e.IfKeyword = 101] = "IfKeyword", e[e.ImportKeyword = 102] = "ImportKeyword", e[e.InKeyword = 103] = "InKeyword", e[e.InstanceOfKeyword = 104] = "InstanceOfKeyword", e[e.NewKeyword = 105] = "NewKeyword", e[e.NullKeyword = 106] = "NullKeyword", e[e.ReturnKeyword = 107] = "ReturnKeyword", e[e.SuperKeyword = 108] = "SuperKeyword", e[e.SwitchKeyword = 109] = "SwitchKeyword", e[e.ThisKeyword = 110] = "ThisKeyword", e[e.ThrowKeyword = 111] = "ThrowKeyword", e[e.TrueKeyword = 112] = "TrueKeyword", e[e.TryKeyword = 113] = "TryKeyword", e[e.TypeOfKeyword = 114] = "TypeOfKeyword", e[e.VarKeyword = 115] = "VarKeyword", e[e.VoidKeyword = 116] = "VoidKeyword", e[e.WhileKeyword = 117] = "WhileKeyword", e[e.WithKeyword = 118] = "WithKeyword", e[e.ImplementsKeyword = 119] = "ImplementsKeyword", e[e.InterfaceKeyword = 120] = "InterfaceKeyword", e[e.LetKeyword = 121] = "LetKeyword", e[e.PackageKeyword = 122] = "PackageKeyword", e[e.PrivateKeyword = 123] = "PrivateKeyword", e[e.ProtectedKeyword = 124] = "ProtectedKeyword", e[e.PublicKeyword = 125] = "PublicKeyword", e[e.StaticKeyword = 126] = "StaticKeyword", e[e.YieldKeyword = 127] = "YieldKeyword", e[e.AbstractKeyword = 128] = "AbstractKeyword", e[e.AccessorKeyword = 129] = "AccessorKeyword", e[e.AsKeyword = 130] = "AsKeyword", e[e.AssertsKeyword = 131] = "AssertsKeyword", e[e.AssertKeyword = 132] = "AssertKeyword", e[e.AnyKeyword = 133] = "AnyKeyword", e[e.AsyncKeyword = 134] = "AsyncKeyword", e[e.AwaitKeyword = 135] = "AwaitKeyword", e[e.BooleanKeyword = 136] = "BooleanKeyword", e[e.ConstructorKeyword = 137] = "ConstructorKeyword", e[e.DeclareKeyword = 138] = "DeclareKeyword", e[e.GetKeyword = 139] = "GetKeyword", e[e.InferKeyword = 140] = "InferKeyword", e[e.IntrinsicKeyword = 141] = "IntrinsicKeyword", e[e.IsKeyword = 142] = "IsKeyword", e[e.KeyOfKeyword = 143] = "KeyOfKeyword", e[e.ModuleKeyword = 144] = "ModuleKeyword", e[e.NamespaceKeyword = 145] = "NamespaceKeyword", e[e.NeverKeyword = 146] = "NeverKeyword", e[e.OutKeyword = 147] = "OutKeyword", e[e.ReadonlyKeyword = 148] = "ReadonlyKeyword", e[e.RequireKeyword = 149] = "RequireKeyword", e[e.NumberKeyword = 150] = "NumberKeyword", e[e.ObjectKeyword = 151] = "ObjectKeyword", e[e.SatisfiesKeyword = 152] = "SatisfiesKeyword", e[e.SetKeyword = 153] = "SetKeyword", e[e.StringKeyword = 154] = "StringKeyword", e[e.SymbolKeyword = 155] = "SymbolKeyword", e[e.TypeKeyword = 156] = "TypeKeyword", e[e.UndefinedKeyword = 157] = "UndefinedKeyword", e[e.UniqueKeyword = 158] = "UniqueKeyword", e[e.UnknownKeyword = 159] = "UnknownKeyword", e[e.UsingKeyword = 160] = "UsingKeyword", e[e.FromKeyword = 161] = "FromKeyword", e[e.GlobalKeyword = 162] = "GlobalKeyword", e[e.BigIntKeyword = 163] = "BigIntKeyword", e[e.OverrideKeyword = 164] = "OverrideKeyword", e[e.OfKeyword = 165] = "OfKeyword", e[e.DeferKeyword = 166] = "DeferKeyword", e[e.QualifiedName = 167] = "QualifiedName", e[e.ComputedPropertyName = 168] = "ComputedPropertyName", e[e.TypeParameter = 169] = "TypeParameter", e[e.Parameter = 170] = "Parameter", e[e.Decorator = 171] = "Decorator", e[e.PropertySignature = 172] = "PropertySignature", e[e.PropertyDeclaration = 173] = "PropertyDeclaration", e[e.MethodSignature = 174] = "MethodSignature", e[e.MethodDeclaration = 175] = "MethodDeclaration", e[e.ClassStaticBlockDeclaration = 176] = "ClassStaticBlockDeclaration", e[e.Constructor = 177] = "Constructor", e[e.GetAccessor = 178] = "GetAccessor", e[e.SetAccessor = 179] = "SetAccessor", e[e.CallSignature = 180] = "CallSignature", e[e.ConstructSignature = 181] = "ConstructSignature", e[e.IndexSignature = 182] = "IndexSignature", e[e.TypePredicate = 183] = "TypePredicate", e[e.TypeReference = 184] = "TypeReference", e[e.FunctionType = 185] = "FunctionType", e[e.ConstructorType = 186] = "ConstructorType", e[e.TypeQuery = 187] = "TypeQuery", e[e.TypeLiteral = 188] = "TypeLiteral", e[e.ArrayType = 189] = "ArrayType", e[e.TupleType = 190] = "TupleType", e[e.OptionalType = 191] = "OptionalType", e[e.RestType = 192] = "RestType", e[e.UnionType = 193] = "UnionType", e[e.IntersectionType = 194] = "IntersectionType", e[e.ConditionalType = 195] = "ConditionalType", e[e.InferType = 196] = "InferType", e[e.ParenthesizedType = 197] = "ParenthesizedType", e[e.ThisType = 198] = "ThisType", e[e.TypeOperator = 199] = "TypeOperator", e[e.IndexedAccessType = 200] = "IndexedAccessType", e[e.MappedType = 201] = "MappedType", e[e.LiteralType = 202] = "LiteralType", e[e.NamedTupleMember = 203] = "NamedTupleMember", e[e.TemplateLiteralType = 204] = "TemplateLiteralType", e[e.TemplateLiteralTypeSpan = 205] = "TemplateLiteralTypeSpan", e[e.ImportType = 206] = "ImportType", e[e.ObjectBindingPattern = 207] = "ObjectBindingPattern", e[e.ArrayBindingPattern = 208] = "ArrayBindingPattern", e[e.BindingElement = 209] = "BindingElement", e[e.ArrayLiteralExpression = 210] = "ArrayLiteralExpression", e[e.ObjectLiteralExpression = 211] = "ObjectLiteralExpression", e[e.PropertyAccessExpression = 212] = "PropertyAccessExpression", e[e.ElementAccessExpression = 213] = "ElementAccessExpression", e[e.CallExpression = 214] = "CallExpression", e[e.NewExpression = 215] = "NewExpression", e[e.TaggedTemplateExpression = 216] = "TaggedTemplateExpression", e[e.TypeAssertionExpression = 217] = "TypeAssertionExpression", e[e.ParenthesizedExpression = 218] = "ParenthesizedExpression", e[e.FunctionExpression = 219] = "FunctionExpression", e[e.ArrowFunction = 220] = "ArrowFunction", e[e.DeleteExpression = 221] = "DeleteExpression", e[e.TypeOfExpression = 222] = "TypeOfExpression", e[e.VoidExpression = 223] = "VoidExpression", e[e.AwaitExpression = 224] = "AwaitExpression", e[e.PrefixUnaryExpression = 225] = "PrefixUnaryExpression", e[e.PostfixUnaryExpression = 226] = "PostfixUnaryExpression", e[e.BinaryExpression = 227] = "BinaryExpression", e[e.ConditionalExpression = 228] = "ConditionalExpression", e[e.TemplateExpression = 229] = "TemplateExpression", e[e.YieldExpression = 230] = "YieldExpression", e[e.SpreadElement = 231] = "SpreadElement", e[e.ClassExpression = 232] = "ClassExpression", e[e.OmittedExpression = 233] = "OmittedExpression", e[e.ExpressionWithTypeArguments = 234] = "ExpressionWithTypeArguments", e[e.AsExpression = 235] = "AsExpression", e[e.NonNullExpression = 236] = "NonNullExpression", e[e.MetaProperty = 237] = "MetaProperty", e[e.SyntheticExpression = 238] = "SyntheticExpression", e[e.SatisfiesExpression = 239] = "SatisfiesExpression", e[e.TemplateSpan = 240] = "TemplateSpan", e[e.SemicolonClassElement = 241] = "SemicolonClassElement", e[e.Block = 242] = "Block", e[e.EmptyStatement = 243] = "EmptyStatement", e[e.VariableStatement = 244] = "VariableStatement", e[e.ExpressionStatement = 245] = "ExpressionStatement", e[e.IfStatement = 246] = "IfStatement", e[e.DoStatement = 247] = "DoStatement", e[e.WhileStatement = 248] = "WhileStatement", e[e.ForStatement = 249] = "ForStatement", e[e.ForInStatement = 250] = "ForInStatement", e[e.ForOfStatement = 251] = "ForOfStatement", e[e.ContinueStatement = 252] = "ContinueStatement", e[e.BreakStatement = 253] = "BreakStatement", e[e.ReturnStatement = 254] = "ReturnStatement", e[e.WithStatement = 255] = "WithStatement", e[e.SwitchStatement = 256] = "SwitchStatement", e[e.LabeledStatement = 257] = "LabeledStatement", e[e.ThrowStatement = 258] = "ThrowStatement", e[e.TryStatement = 259] = "TryStatement", e[e.DebuggerStatement = 260] = "DebuggerStatement", e[e.VariableDeclaration = 261] = "VariableDeclaration", e[e.VariableDeclarationList = 262] = "VariableDeclarationList", e[e.FunctionDeclaration = 263] = "FunctionDeclaration", e[e.ClassDeclaration = 264] = "ClassDeclaration", e[e.InterfaceDeclaration = 265] = "InterfaceDeclaration", e[e.TypeAliasDeclaration = 266] = "TypeAliasDeclaration", e[e.EnumDeclaration = 267] = "EnumDeclaration", e[e.ModuleDeclaration = 268] = "ModuleDeclaration", e[e.ModuleBlock = 269] = "ModuleBlock", e[e.CaseBlock = 270] = "CaseBlock", e[e.NamespaceExportDeclaration = 271] = "NamespaceExportDeclaration", e[e.ImportEqualsDeclaration = 272] = "ImportEqualsDeclaration", e[e.ImportDeclaration = 273] = "ImportDeclaration", e[e.ImportClause = 274] = "ImportClause", e[e.NamespaceImport = 275] = "NamespaceImport", e[e.NamedImports = 276] = "NamedImports", e[e.ImportSpecifier = 277] = "ImportSpecifier", e[e.ExportAssignment = 278] = "ExportAssignment", e[e.ExportDeclaration = 279] = "ExportDeclaration", e[e.NamedExports = 280] = "NamedExports", e[e.NamespaceExport = 281] = "NamespaceExport", e[e.ExportSpecifier = 282] = "ExportSpecifier", e[e.MissingDeclaration = 283] = "MissingDeclaration", e[e.ExternalModuleReference = 284] = "ExternalModuleReference", e[e.JsxElement = 285] = "JsxElement", e[e.JsxSelfClosingElement = 286] = "JsxSelfClosingElement", e[e.JsxOpeningElement = 287] = "JsxOpeningElement", e[e.JsxClosingElement = 288] = "JsxClosingElement", e[e.JsxFragment = 289] = "JsxFragment", e[e.JsxOpeningFragment = 290] = "JsxOpeningFragment", e[e.JsxClosingFragment = 291] = "JsxClosingFragment", e[e.JsxAttribute = 292] = "JsxAttribute", e[e.JsxAttributes = 293] = "JsxAttributes", e[e.JsxSpreadAttribute = 294] = "JsxSpreadAttribute", e[e.JsxExpression = 295] = "JsxExpression", e[e.JsxNamespacedName = 296] = "JsxNamespacedName", e[e.CaseClause = 297] = "CaseClause", e[e.DefaultClause = 298] = "DefaultClause", e[e.HeritageClause = 299] = "HeritageClause", e[e.CatchClause = 300] = "CatchClause", e[e.ImportAttributes = 301] = "ImportAttributes", e[e.ImportAttribute = 302] = "ImportAttribute", e[e.AssertClause = 301] = "AssertClause", e[e.AssertEntry = 302] = "AssertEntry", e[e.ImportTypeAssertionContainer = 303] = "ImportTypeAssertionContainer", e[e.PropertyAssignment = 304] = "PropertyAssignment", e[e.ShorthandPropertyAssignment = 305] = "ShorthandPropertyAssignment", e[e.SpreadAssignment = 306] = "SpreadAssignment", e[e.EnumMember = 307] = "EnumMember", e[e.SourceFile = 308] = "SourceFile", e[e.Bundle = 309] = "Bundle", e[e.JSDocTypeExpression = 310] = "JSDocTypeExpression", e[e.JSDocNameReference = 311] = "JSDocNameReference", e[e.JSDocMemberName = 312] = "JSDocMemberName", e[e.JSDocAllType = 313] = "JSDocAllType", e[e.JSDocUnknownType = 314] = "JSDocUnknownType", e[e.JSDocNullableType = 315] = "JSDocNullableType", e[e.JSDocNonNullableType = 316] = "JSDocNonNullableType", e[e.JSDocOptionalType = 317] = "JSDocOptionalType", e[e.JSDocFunctionType = 318] = "JSDocFunctionType", e[e.JSDocVariadicType = 319] = "JSDocVariadicType", e[e.JSDocNamepathType = 320] = "JSDocNamepathType", e[e.JSDoc = 321] = "JSDoc", e[e.JSDocComment = 321] = "JSDocComment", e[e.JSDocText = 322] = "JSDocText", e[e.JSDocTypeLiteral = 323] = "JSDocTypeLiteral", e[e.JSDocSignature = 324] = "JSDocSignature", e[e.JSDocLink = 325] = "JSDocLink", e[e.JSDocLinkCode = 326] = "JSDocLinkCode", e[e.JSDocLinkPlain = 327] = "JSDocLinkPlain", e[e.JSDocTag = 328] = "JSDocTag", e[e.JSDocAugmentsTag = 329] = "JSDocAugmentsTag", e[e.JSDocImplementsTag = 330] = "JSDocImplementsTag", e[e.JSDocAuthorTag = 331] = "JSDocAuthorTag", e[e.JSDocDeprecatedTag = 332] = "JSDocDeprecatedTag", e[e.JSDocClassTag = 333] = "JSDocClassTag", e[e.JSDocPublicTag = 334] = "JSDocPublicTag", e[e.JSDocPrivateTag = 335] = "JSDocPrivateTag", e[e.JSDocProtectedTag = 336] = "JSDocProtectedTag", e[e.JSDocReadonlyTag = 337] = "JSDocReadonlyTag", e[e.JSDocOverrideTag = 338] = "JSDocOverrideTag", e[e.JSDocCallbackTag = 339] = "JSDocCallbackTag", e[e.JSDocOverloadTag = 340] = "JSDocOverloadTag", e[e.JSDocEnumTag = 341] = "JSDocEnumTag", e[e.JSDocParameterTag = 342] = "JSDocParameterTag", e[e.JSDocReturnTag = 343] = "JSDocReturnTag", e[e.JSDocThisTag = 344] = "JSDocThisTag", e[e.JSDocTypeTag = 345] = "JSDocTypeTag", e[e.JSDocTemplateTag = 346] = "JSDocTemplateTag", e[e.JSDocTypedefTag = 347] = "JSDocTypedefTag", e[e.JSDocSeeTag = 348] = "JSDocSeeTag", e[e.JSDocPropertyTag = 349] = "JSDocPropertyTag", e[e.JSDocThrowsTag = 350] = "JSDocThrowsTag", e[e.JSDocSatisfiesTag = 351] = "JSDocSatisfiesTag", e[e.JSDocImportTag = 352] = "JSDocImportTag", e[e.SyntaxList = 353] = "SyntaxList", e[e.NotEmittedStatement = 354] = "NotEmittedStatement", e[e.NotEmittedTypeElement = 355] = "NotEmittedTypeElement", e[e.PartiallyEmittedExpression = 356] = "PartiallyEmittedExpression", e[e.CommaListExpression = 357] = "CommaListExpression", e[e.SyntheticReferenceExpression = 358] = "SyntheticReferenceExpression", e[e.Count = 359] = "Count", e[e.FirstAssignment = 64] = "FirstAssignment", e[e.LastAssignment = 79] = "LastAssignment", e[e.FirstCompoundAssignment = 65] = "FirstCompoundAssignment", e[e.LastCompoundAssignment = 79] = "LastCompoundAssignment", e[e.FirstReservedWord = 83] = "FirstReservedWord", e[e.LastReservedWord = 118] = "LastReservedWord", e[e.FirstKeyword = 83] = "FirstKeyword", e[e.LastKeyword = 166] = "LastKeyword", e[e.FirstFutureReservedWord = 119] = "FirstFutureReservedWord", e[e.LastFutureReservedWord = 127] = "LastFutureReservedWord", e[e.FirstTypeNode = 183] = "FirstTypeNode", e[e.LastTypeNode = 206] = "LastTypeNode", e[e.FirstPunctuation = 19] = "FirstPunctuation", e[e.LastPunctuation = 79] = "LastPunctuation", e[e.FirstToken = 0] = "FirstToken", e[e.LastToken = 166] = "LastToken", e[e.FirstTriviaToken = 2] = "FirstTriviaToken", e[e.LastTriviaToken = 7] = "LastTriviaToken", e[e.FirstLiteralToken = 9] = "FirstLiteralToken", e[e.LastLiteralToken = 15] = "LastLiteralToken", e[e.FirstTemplateToken = 15] = "FirstTemplateToken", e[e.LastTemplateToken = 18] = "LastTemplateToken", e[e.FirstBinaryOperator = 30] = "FirstBinaryOperator", e[e.LastBinaryOperator = 79] = "LastBinaryOperator", e[e.FirstStatement = 244] = "FirstStatement", e[e.LastStatement = 260] = "LastStatement", e[e.FirstNode = 167] = "FirstNode", e[e.FirstJSDocNode = 310] = "FirstJSDocNode", e[e.LastJSDocNode = 352] = "LastJSDocNode", e[e.FirstJSDocTagNode = 328] = "FirstJSDocTagNode", e[e.LastJSDocTagNode = 352] = "LastJSDocTagNode", e[e.FirstContextualKeyword = 128] = "FirstContextualKeyword", e[e.LastContextualKeyword = 166] = "LastContextualKeyword", e))(Ae || {}), sn = ((e) => (e[e.None = 0] = "None", e[e.Let = 1] = "Let", e[e.Const = 2] = "Const", e[e.Using = 4] = "Using", e[e.AwaitUsing = 6] = "AwaitUsing", e[e.NestedNamespace = 8] = "NestedNamespace", e[e.Synthesized = 16] = "Synthesized", e[e.Namespace = 32] = "Namespace", e[e.OptionalChain = 64] = "OptionalChain", e[e.ExportContext = 128] = "ExportContext", e[e.ContainsThis = 256] = "ContainsThis", e[e.HasImplicitReturn = 512] = "HasImplicitReturn", e[e.HasExplicitReturn = 1024] = "HasExplicitReturn", e[e.GlobalAugmentation = 2048] = "GlobalAugmentation", e[e.HasAsyncFunctions = 4096] = "HasAsyncFunctions", e[e.DisallowInContext = 8192] = "DisallowInContext", e[e.YieldContext = 16384] = "YieldContext", e[e.DecoratorContext = 32768] = "DecoratorContext", e[e.AwaitContext = 65536] = "AwaitContext", e[e.DisallowConditionalTypesContext = 131072] = "DisallowConditionalTypesContext", e[e.ThisNodeHasError = 262144] = "ThisNodeHasError", e[e.JavaScriptFile = 524288] = "JavaScriptFile", e[e.ThisNodeOrAnySubNodesHasError = 1048576] = "ThisNodeOrAnySubNodesHasError", e[e.HasAggregatedChildData = 2097152] = "HasAggregatedChildData", e[e.PossiblyContainsDynamicImport = 4194304] = "PossiblyContainsDynamicImport", e[e.PossiblyContainsImportMeta = 8388608] = "PossiblyContainsImportMeta", e[e.JSDoc = 16777216] = "JSDoc", e[e.Ambient = 33554432] = "Ambient", e[e.InWithStatement = 67108864] = "InWithStatement", e[e.JsonFile = 134217728] = "JsonFile", e[e.TypeCached = 268435456] = "TypeCached", e[e.Deprecated = 536870912] = "Deprecated", e[e.BlockScoped = 7] = "BlockScoped", e[e.Constant = 6] = "Constant", e[e.ReachabilityCheckFlags = 1536] = "ReachabilityCheckFlags", e[e.ReachabilityAndEmitFlags = 5632] = "ReachabilityAndEmitFlags", e[e.ContextFlags = 101441536] = "ContextFlags", e[e.TypeExcludesFlags = 81920] = "TypeExcludesFlags", e[e.PermanentlySetIncrementalFlags = 12582912] = "PermanentlySetIncrementalFlags", e[e.IdentifierHasExtendedUnicodeEscape = 256] = "IdentifierHasExtendedUnicodeEscape", e[e.IdentifierIsInJSDocNamespace = 4096] = "IdentifierIsInJSDocNamespace", e))(sn || {}), Qp = ((e) => (e[e.None = 0] = "None", e[e.Public = 1] = "Public", e[e.Private = 2] = "Private", e[e.Protected = 4] = "Protected", e[e.Readonly = 8] = "Readonly", e[e.Override = 16] = "Override", e[e.Export = 32] = "Export", e[e.Abstract = 64] = "Abstract", e[e.Ambient = 128] = "Ambient", e[e.Static = 256] = "Static", e[e.Accessor = 512] = "Accessor", e[e.Async = 1024] = "Async", e[e.Default = 2048] = "Default", e[e.Const = 4096] = "Const", e[e.In = 8192] = "In", e[e.Out = 16384] = "Out", e[e.Decorator = 32768] = "Decorator", e[e.Deprecated = 65536] = "Deprecated", e[e.JSDocPublic = 8388608] = "JSDocPublic", e[e.JSDocPrivate = 16777216] = "JSDocPrivate", e[e.JSDocProtected = 33554432] = "JSDocProtected", e[e.JSDocReadonly = 67108864] = "JSDocReadonly", e[e.JSDocOverride = 134217728] = "JSDocOverride", e[e.SyntacticOrJSDocModifiers = 31] = "SyntacticOrJSDocModifiers", e[e.SyntacticOnlyModifiers = 65504] = "SyntacticOnlyModifiers", e[e.SyntacticModifiers = 65535] = "SyntacticModifiers", e[e.JSDocCacheOnlyModifiers = 260046848] = "JSDocCacheOnlyModifiers", e[e.JSDocOnlyModifiers = 65536] = "JSDocOnlyModifiers", e[e.NonCacheOnlyModifiers = 131071] = "NonCacheOnlyModifiers", e[e.HasComputedJSDocModifiers = 268435456] = "HasComputedJSDocModifiers", e[e.HasComputedFlags = 536870912] = "HasComputedFlags", e[e.AccessibilityModifier = 7] = "AccessibilityModifier", e[e.ParameterPropertyModifier = 31] = "ParameterPropertyModifier", e[e.NonPublicAccessibilityModifier = 6] = "NonPublicAccessibilityModifier", e[e.TypeScriptModifier = 28895] = "TypeScriptModifier", e[e.ExportDefault = 2080] = "ExportDefault", e[e.All = 131071] = "All", e[e.Modifier = 98303] = "Modifier", e))(Qp || {}); + wm = ((e) => (e[e.None = 0] = "None", e[e.Succeeded = 1] = "Succeeded", e[e.Failed = 2] = "Failed", e[e.ReportsUnmeasurable = 8] = "ReportsUnmeasurable", e[e.ReportsUnreliable = 16] = "ReportsUnreliable", e[e.ReportsMask = 24] = "ReportsMask", e[e.ComplexityOverflow = 32] = "ComplexityOverflow", e[e.StackDepthOverflow = 64] = "StackDepthOverflow", e[e.Overflow = 96] = "Overflow", e))(wm || {}); + Op = ((e) => (e[e.Unreachable = 1] = "Unreachable", e[e.Start = 2] = "Start", e[e.BranchLabel = 4] = "BranchLabel", e[e.LoopLabel = 8] = "LoopLabel", e[e.Assignment = 16] = "Assignment", e[e.TrueCondition = 32] = "TrueCondition", e[e.FalseCondition = 64] = "FalseCondition", e[e.SwitchClause = 128] = "SwitchClause", e[e.ArrayMutation = 256] = "ArrayMutation", e[e.Call = 512] = "Call", e[e.ReduceLabel = 1024] = "ReduceLabel", e[e.Referenced = 2048] = "Referenced", e[e.Shared = 4096] = "Shared", e[e.Label = 12] = "Label", e[e.Condition = 96] = "Condition", e))(Op || {}); + Kp = ((e) => (e[e.None = 0] = "None", e[e.FunctionScopedVariable = 1] = "FunctionScopedVariable", e[e.BlockScopedVariable = 2] = "BlockScopedVariable", e[e.Property = 4] = "Property", e[e.EnumMember = 8] = "EnumMember", e[e.Function = 16] = "Function", e[e.Class = 32] = "Class", e[e.Interface = 64] = "Interface", e[e.ConstEnum = 128] = "ConstEnum", e[e.RegularEnum = 256] = "RegularEnum", e[e.ValueModule = 512] = "ValueModule", e[e.NamespaceModule = 1024] = "NamespaceModule", e[e.TypeLiteral = 2048] = "TypeLiteral", e[e.ObjectLiteral = 4096] = "ObjectLiteral", e[e.Method = 8192] = "Method", e[e.Constructor = 16384] = "Constructor", e[e.GetAccessor = 32768] = "GetAccessor", e[e.SetAccessor = 65536] = "SetAccessor", e[e.Signature = 131072] = "Signature", e[e.TypeParameter = 262144] = "TypeParameter", e[e.TypeAlias = 524288] = "TypeAlias", e[e.ExportValue = 1048576] = "ExportValue", e[e.Alias = 2097152] = "Alias", e[e.Prototype = 4194304] = "Prototype", e[e.ExportStar = 8388608] = "ExportStar", e[e.Optional = 16777216] = "Optional", e[e.Transient = 33554432] = "Transient", e[e.Assignment = 67108864] = "Assignment", e[e.ModuleExports = 134217728] = "ModuleExports", e[e.All = -1] = "All", e[e.Enum = 384] = "Enum", e[e.Variable = 3] = "Variable", e[e.Value = 111551] = "Value", e[e.Type = 788968] = "Type", e[e.Namespace = 1920] = "Namespace", e[e.Module = 1536] = "Module", e[e.Accessor = 98304] = "Accessor", e[e.FunctionScopedVariableExcludes = 111550] = "FunctionScopedVariableExcludes", e[e.BlockScopedVariableExcludes = 111551] = "BlockScopedVariableExcludes", e[e.ParameterExcludes = 111551] = "ParameterExcludes", e[e.PropertyExcludes = 0] = "PropertyExcludes", e[e.EnumMemberExcludes = 900095] = "EnumMemberExcludes", e[e.FunctionExcludes = 110991] = "FunctionExcludes", e[e.ClassExcludes = 899503] = "ClassExcludes", e[e.InterfaceExcludes = 788872] = "InterfaceExcludes", e[e.RegularEnumExcludes = 899327] = "RegularEnumExcludes", e[e.ConstEnumExcludes = 899967] = "ConstEnumExcludes", e[e.ValueModuleExcludes = 110735] = "ValueModuleExcludes", e[e.NamespaceModuleExcludes = 0] = "NamespaceModuleExcludes", e[e.MethodExcludes = 103359] = "MethodExcludes", e[e.GetAccessorExcludes = 46015] = "GetAccessorExcludes", e[e.SetAccessorExcludes = 78783] = "SetAccessorExcludes", e[e.AccessorExcludes = 13247] = "AccessorExcludes", e[e.TypeParameterExcludes = 526824] = "TypeParameterExcludes", e[e.TypeAliasExcludes = 788968] = "TypeAliasExcludes", e[e.AliasExcludes = 2097152] = "AliasExcludes", e[e.ModuleMember = 2623475] = "ModuleMember", e[e.ExportHasLocal = 944] = "ExportHasLocal", e[e.BlockScoped = 418] = "BlockScoped", e[e.PropertyOrAccessor = 98308] = "PropertyOrAccessor", e[e.ClassMember = 106500] = "ClassMember", e[e.ExportSupportsDefaultModifier = 112] = "ExportSupportsDefaultModifier", e[e.ExportDoesNotSupportDefaultModifier = -113] = "ExportDoesNotSupportDefaultModifier", e[e.Classifiable = 2885600] = "Classifiable", e[e.LateBindingContainer = 6256] = "LateBindingContainer", e))(Kp || {}); + km = ((e) => (e[e.None = 0] = "None", e[e.TypeChecked = 1] = "TypeChecked", e[e.LexicalThis = 2] = "LexicalThis", e[e.CaptureThis = 4] = "CaptureThis", e[e.CaptureNewTarget = 8] = "CaptureNewTarget", e[e.SuperInstance = 16] = "SuperInstance", e[e.SuperStatic = 32] = "SuperStatic", e[e.ContextChecked = 64] = "ContextChecked", e[e.MethodWithSuperPropertyAccessInAsync = 128] = "MethodWithSuperPropertyAccessInAsync", e[e.MethodWithSuperPropertyAssignmentInAsync = 256] = "MethodWithSuperPropertyAssignmentInAsync", e[e.CaptureArguments = 512] = "CaptureArguments", e[e.EnumValuesComputed = 1024] = "EnumValuesComputed", e[e.LexicalModuleMergesWithClass = 2048] = "LexicalModuleMergesWithClass", e[e.LoopWithCapturedBlockScopedBinding = 4096] = "LoopWithCapturedBlockScopedBinding", e[e.ContainsCapturedBlockScopeBinding = 8192] = "ContainsCapturedBlockScopeBinding", e[e.CapturedBlockScopedBinding = 16384] = "CapturedBlockScopedBinding", e[e.BlockScopedBindingInLoop = 32768] = "BlockScopedBindingInLoop", e[e.NeedsLoopOutParameter = 65536] = "NeedsLoopOutParameter", e[e.AssignmentsMarked = 131072] = "AssignmentsMarked", e[e.ContainsConstructorReference = 262144] = "ContainsConstructorReference", e[e.ConstructorReference = 536870912] = "ConstructorReference", e[e.ContainsClassWithPrivateIdentifiers = 1048576] = "ContainsClassWithPrivateIdentifiers", e[e.ContainsSuperPropertyInStaticInitializer = 2097152] = "ContainsSuperPropertyInStaticInitializer", e[e.InCheckIdentifier = 4194304] = "InCheckIdentifier", e[e.PartiallyTypeChecked = 8388608] = "PartiallyTypeChecked", e[e.LazyFlags = 539358128] = "LazyFlags", e))(km || {}), en = ((e) => (e[e.Any = 1] = "Any", e[e.Unknown = 2] = "Unknown", e[e.String = 4] = "String", e[e.Number = 8] = "Number", e[e.Boolean = 16] = "Boolean", e[e.Enum = 32] = "Enum", e[e.BigInt = 64] = "BigInt", e[e.StringLiteral = 128] = "StringLiteral", e[e.NumberLiteral = 256] = "NumberLiteral", e[e.BooleanLiteral = 512] = "BooleanLiteral", e[e.EnumLiteral = 1024] = "EnumLiteral", e[e.BigIntLiteral = 2048] = "BigIntLiteral", e[e.ESSymbol = 4096] = "ESSymbol", e[e.UniqueESSymbol = 8192] = "UniqueESSymbol", e[e.Void = 16384] = "Void", e[e.Undefined = 32768] = "Undefined", e[e.Null = 65536] = "Null", e[e.Never = 131072] = "Never", e[e.TypeParameter = 262144] = "TypeParameter", e[e.Object = 524288] = "Object", e[e.Union = 1048576] = "Union", e[e.Intersection = 2097152] = "Intersection", e[e.Index = 4194304] = "Index", e[e.IndexedAccess = 8388608] = "IndexedAccess", e[e.Conditional = 16777216] = "Conditional", e[e.Substitution = 33554432] = "Substitution", e[e.NonPrimitive = 67108864] = "NonPrimitive", e[e.TemplateLiteral = 134217728] = "TemplateLiteral", e[e.StringMapping = 268435456] = "StringMapping", e[e.Reserved1 = 536870912] = "Reserved1", e[e.Reserved2 = 1073741824] = "Reserved2", e[e.AnyOrUnknown = 3] = "AnyOrUnknown", e[e.Nullable = 98304] = "Nullable", e[e.Literal = 2944] = "Literal", e[e.Unit = 109472] = "Unit", e[e.Freshable = 2976] = "Freshable", e[e.StringOrNumberLiteral = 384] = "StringOrNumberLiteral", e[e.StringOrNumberLiteralOrUnique = 8576] = "StringOrNumberLiteralOrUnique", e[e.DefinitelyFalsy = 117632] = "DefinitelyFalsy", e[e.PossiblyFalsy = 117724] = "PossiblyFalsy", e[e.Intrinsic = 67359327] = "Intrinsic", e[e.StringLike = 402653316] = "StringLike", e[e.NumberLike = 296] = "NumberLike", e[e.BigIntLike = 2112] = "BigIntLike", e[e.BooleanLike = 528] = "BooleanLike", e[e.EnumLike = 1056] = "EnumLike", e[e.ESSymbolLike = 12288] = "ESSymbolLike", e[e.VoidLike = 49152] = "VoidLike", e[e.Primitive = 402784252] = "Primitive", e[e.DefinitelyNonNullable = 470302716] = "DefinitelyNonNullable", e[e.DisjointDomains = 469892092] = "DisjointDomains", e[e.UnionOrIntersection = 3145728] = "UnionOrIntersection", e[e.StructuredType = 3670016] = "StructuredType", e[e.TypeVariable = 8650752] = "TypeVariable", e[e.InstantiableNonPrimitive = 58982400] = "InstantiableNonPrimitive", e[e.InstantiablePrimitive = 406847488] = "InstantiablePrimitive", e[e.Instantiable = 465829888] = "Instantiable", e[e.StructuredOrInstantiable = 469499904] = "StructuredOrInstantiable", e[e.ObjectFlagsType = 3899393] = "ObjectFlagsType", e[e.Simplifiable = 25165824] = "Simplifiable", e[e.Singleton = 67358815] = "Singleton", e[e.Narrowable = 536624127] = "Narrowable", e[e.IncludesMask = 473694207] = "IncludesMask", e[e.IncludesMissingType = 262144] = "IncludesMissingType", e[e.IncludesNonWideningType = 4194304] = "IncludesNonWideningType", e[e.IncludesWildcard = 8388608] = "IncludesWildcard", e[e.IncludesEmptyObject = 16777216] = "IncludesEmptyObject", e[e.IncludesInstantiable = 33554432] = "IncludesInstantiable", e[e.IncludesConstrainedTypeVariable = 536870912] = "IncludesConstrainedTypeVariable", e[e.IncludesError = 1073741824] = "IncludesError", e[e.NotPrimitiveUnion = 36323331] = "NotPrimitiveUnion", e))(en || {}), Zp = ((e) => (e[e.None = 0] = "None", e[e.Class = 1] = "Class", e[e.Interface = 2] = "Interface", e[e.Reference = 4] = "Reference", e[e.Tuple = 8] = "Tuple", e[e.Anonymous = 16] = "Anonymous", e[e.Mapped = 32] = "Mapped", e[e.Instantiated = 64] = "Instantiated", e[e.ObjectLiteral = 128] = "ObjectLiteral", e[e.EvolvingArray = 256] = "EvolvingArray", e[e.ObjectLiteralPatternWithComputedProperties = 512] = "ObjectLiteralPatternWithComputedProperties", e[e.ReverseMapped = 1024] = "ReverseMapped", e[e.JsxAttributes = 2048] = "JsxAttributes", e[e.JSLiteral = 4096] = "JSLiteral", e[e.FreshLiteral = 8192] = "FreshLiteral", e[e.ArrayLiteral = 16384] = "ArrayLiteral", e[e.PrimitiveUnion = 32768] = "PrimitiveUnion", e[e.ContainsWideningType = 65536] = "ContainsWideningType", e[e.ContainsObjectOrArrayLiteral = 131072] = "ContainsObjectOrArrayLiteral", e[e.NonInferrableType = 262144] = "NonInferrableType", e[e.CouldContainTypeVariablesComputed = 524288] = "CouldContainTypeVariablesComputed", e[e.CouldContainTypeVariables = 1048576] = "CouldContainTypeVariables", e[e.SingleSignatureType = 134217728] = "SingleSignatureType", e[e.ClassOrInterface = 3] = "ClassOrInterface", e[e.RequiresWidening = 196608] = "RequiresWidening", e[e.PropagatingFlags = 458752] = "PropagatingFlags", e[e.InstantiatedMapped = 96] = "InstantiatedMapped", e[e.ObjectTypeKindMask = 1343] = "ObjectTypeKindMask", e[e.ContainsSpread = 2097152] = "ContainsSpread", e[e.ObjectRestType = 4194304] = "ObjectRestType", e[e.InstantiationExpressionType = 8388608] = "InstantiationExpressionType", e[e.IsClassInstanceClone = 16777216] = "IsClassInstanceClone", e[e.IdenticalBaseTypeCalculated = 33554432] = "IdenticalBaseTypeCalculated", e[e.IdenticalBaseTypeExists = 67108864] = "IdenticalBaseTypeExists", e[e.IsGenericTypeComputed = 2097152] = "IsGenericTypeComputed", e[e.IsGenericObjectType = 4194304] = "IsGenericObjectType", e[e.IsGenericIndexType = 8388608] = "IsGenericIndexType", e[e.IsGenericType = 12582912] = "IsGenericType", e[e.ContainsIntersections = 16777216] = "ContainsIntersections", e[e.IsUnknownLikeUnionComputed = 33554432] = "IsUnknownLikeUnionComputed", e[e.IsUnknownLikeUnion = 67108864] = "IsUnknownLikeUnion", e[e.IsNeverIntersectionComputed = 16777216] = "IsNeverIntersectionComputed", e[e.IsNeverIntersection = 33554432] = "IsNeverIntersection", e[e.IsConstrainedTypeVariable = 67108864] = "IsConstrainedTypeVariable", e))(Zp || {}); + Em = ((e) => (e[e.None = 0] = "None", e[e.HasRestParameter = 1] = "HasRestParameter", e[e.HasLiteralTypes = 2] = "HasLiteralTypes", e[e.Abstract = 4] = "Abstract", e[e.IsInnerCallChain = 8] = "IsInnerCallChain", e[e.IsOuterCallChain = 16] = "IsOuterCallChain", e[e.IsUntypedSignatureInJSFile = 32] = "IsUntypedSignatureInJSFile", e[e.IsNonInferrable = 64] = "IsNonInferrable", e[e.IsSignatureCandidateForOverloadFailure = 128] = "IsSignatureCandidateForOverloadFailure", e[e.PropagatingFlags = 167] = "PropagatingFlags", e[e.CallChainFlags = 24] = "CallChainFlags", e))(Em || {}); + Pr = ((e) => (e[e.Unknown = 0] = "Unknown", e[e.JS = 1] = "JS", e[e.JSX = 2] = "JSX", e[e.TS = 3] = "TS", e[e.TSX = 4] = "TSX", e[e.External = 5] = "External", e[e.JSON = 6] = "JSON", e[e.Deferred = 7] = "Deferred", e))(Pr || {}), g_ = ((e) => (e[e.ES3 = 0] = "ES3", e[e.ES5 = 1] = "ES5", e[e.ES2015 = 2] = "ES2015", e[e.ES2016 = 3] = "ES2016", e[e.ES2017 = 4] = "ES2017", e[e.ES2018 = 5] = "ES2018", e[e.ES2019 = 6] = "ES2019", e[e.ES2020 = 7] = "ES2020", e[e.ES2021 = 8] = "ES2021", e[e.ES2022 = 9] = "ES2022", e[e.ES2023 = 10] = "ES2023", e[e.ES2024 = 11] = "ES2024", e[e.ESNext = 99] = "ESNext", e[e.JSON = 100] = "JSON", e[e.Latest = 99] = "Latest", e))(g_ || {}), wl = ((e) => (e[e.Standard = 0] = "Standard", e[e.JSX = 1] = "JSX", e))(wl || {}); + Cn = ((e) => (e.Ts = ".ts", e.Tsx = ".tsx", e.Dts = ".d.ts", e.Js = ".js", e.Jsx = ".jsx", e.Json = ".json", e.TsBuildInfo = ".tsbuildinfo", e.Mjs = ".mjs", e.Mts = ".mts", e.Dmts = ".d.mts", e.Cjs = ".cjs", e.Cts = ".cts", e.Dcts = ".d.cts", e))(Cn || {}), Am = ((e) => (e[e.None = 0] = "None", e[e.ContainsTypeScript = 1] = "ContainsTypeScript", e[e.ContainsJsx = 2] = "ContainsJsx", e[e.ContainsESNext = 4] = "ContainsESNext", e[e.ContainsES2022 = 8] = "ContainsES2022", e[e.ContainsES2021 = 16] = "ContainsES2021", e[e.ContainsES2020 = 32] = "ContainsES2020", e[e.ContainsES2019 = 64] = "ContainsES2019", e[e.ContainsES2018 = 128] = "ContainsES2018", e[e.ContainsES2017 = 256] = "ContainsES2017", e[e.ContainsES2016 = 512] = "ContainsES2016", e[e.ContainsES2015 = 1024] = "ContainsES2015", e[e.ContainsGenerator = 2048] = "ContainsGenerator", e[e.ContainsDestructuringAssignment = 4096] = "ContainsDestructuringAssignment", e[e.ContainsTypeScriptClassSyntax = 8192] = "ContainsTypeScriptClassSyntax", e[e.ContainsLexicalThis = 16384] = "ContainsLexicalThis", e[e.ContainsRestOrSpread = 32768] = "ContainsRestOrSpread", e[e.ContainsObjectRestOrSpread = 65536] = "ContainsObjectRestOrSpread", e[e.ContainsComputedPropertyName = 131072] = "ContainsComputedPropertyName", e[e.ContainsBlockScopedBinding = 262144] = "ContainsBlockScopedBinding", e[e.ContainsBindingPattern = 524288] = "ContainsBindingPattern", e[e.ContainsYield = 1048576] = "ContainsYield", e[e.ContainsAwait = 2097152] = "ContainsAwait", e[e.ContainsHoistedDeclarationOrCompletion = 4194304] = "ContainsHoistedDeclarationOrCompletion", e[e.ContainsDynamicImport = 8388608] = "ContainsDynamicImport", e[e.ContainsClassFields = 16777216] = "ContainsClassFields", e[e.ContainsDecorators = 33554432] = "ContainsDecorators", e[e.ContainsPossibleTopLevelAwait = 67108864] = "ContainsPossibleTopLevelAwait", e[e.ContainsLexicalSuper = 134217728] = "ContainsLexicalSuper", e[e.ContainsUpdateExpressionForIdentifier = 268435456] = "ContainsUpdateExpressionForIdentifier", e[e.ContainsPrivateIdentifierInExpression = 536870912] = "ContainsPrivateIdentifierInExpression", e[e.HasComputedFlags = -2147483648] = "HasComputedFlags", e[e.AssertTypeScript = 1] = "AssertTypeScript", e[e.AssertJsx = 2] = "AssertJsx", e[e.AssertESNext = 4] = "AssertESNext", e[e.AssertES2022 = 8] = "AssertES2022", e[e.AssertES2021 = 16] = "AssertES2021", e[e.AssertES2020 = 32] = "AssertES2020", e[e.AssertES2019 = 64] = "AssertES2019", e[e.AssertES2018 = 128] = "AssertES2018", e[e.AssertES2017 = 256] = "AssertES2017", e[e.AssertES2016 = 512] = "AssertES2016", e[e.AssertES2015 = 1024] = "AssertES2015", e[e.AssertGenerator = 2048] = "AssertGenerator", e[e.AssertDestructuringAssignment = 4096] = "AssertDestructuringAssignment", e[e.OuterExpressionExcludes = -2147483648] = "OuterExpressionExcludes", e[e.PropertyAccessExcludes = -2147483648] = "PropertyAccessExcludes", e[e.NodeExcludes = -2147483648] = "NodeExcludes", e[e.ArrowFunctionExcludes = -2072174592] = "ArrowFunctionExcludes", e[e.FunctionExcludes = -1937940480] = "FunctionExcludes", e[e.ConstructorExcludes = -1937948672] = "ConstructorExcludes", e[e.MethodOrAccessorExcludes = -2005057536] = "MethodOrAccessorExcludes", e[e.PropertyExcludes = -2013249536] = "PropertyExcludes", e[e.ClassExcludes = -2147344384] = "ClassExcludes", e[e.ModuleExcludes = -1941676032] = "ModuleExcludes", e[e.TypeExcludes = -2] = "TypeExcludes", e[e.ObjectLiteralExcludes = -2147278848] = "ObjectLiteralExcludes", e[e.ArrayLiteralOrCallOrNewExcludes = -2147450880] = "ArrayLiteralOrCallOrNewExcludes", e[e.VariableDeclarationListExcludes = -2146893824] = "VariableDeclarationListExcludes", e[e.ParameterExcludes = -2147483648] = "ParameterExcludes", e[e.CatchClauseExcludes = -2147418112] = "CatchClauseExcludes", e[e.BindingPatternExcludes = -2147450880] = "BindingPatternExcludes", e[e.ContainsLexicalThisOrSuper = 134234112] = "ContainsLexicalThisOrSuper", e[e.PropertyNamePropagatingFlags = 134234112] = "PropertyNamePropagatingFlags", e))(Am || {}), Cm = ((e) => (e[e.TabStop = 0] = "TabStop", e[e.Placeholder = 1] = "Placeholder", e[e.Choice = 2] = "Choice", e[e.Variable = 3] = "Variable", e))(Cm || {}), Dm = ((e) => (e[e.None = 0] = "None", e[e.SingleLine = 1] = "SingleLine", e[e.MultiLine = 2] = "MultiLine", e[e.AdviseOnEmitNode = 4] = "AdviseOnEmitNode", e[e.NoSubstitution = 8] = "NoSubstitution", e[e.CapturesThis = 16] = "CapturesThis", e[e.NoLeadingSourceMap = 32] = "NoLeadingSourceMap", e[e.NoTrailingSourceMap = 64] = "NoTrailingSourceMap", e[e.NoSourceMap = 96] = "NoSourceMap", e[e.NoNestedSourceMaps = 128] = "NoNestedSourceMaps", e[e.NoTokenLeadingSourceMaps = 256] = "NoTokenLeadingSourceMaps", e[e.NoTokenTrailingSourceMaps = 512] = "NoTokenTrailingSourceMaps", e[e.NoTokenSourceMaps = 768] = "NoTokenSourceMaps", e[e.NoLeadingComments = 1024] = "NoLeadingComments", e[e.NoTrailingComments = 2048] = "NoTrailingComments", e[e.NoComments = 3072] = "NoComments", e[e.NoNestedComments = 4096] = "NoNestedComments", e[e.HelperName = 8192] = "HelperName", e[e.ExportName = 16384] = "ExportName", e[e.LocalName = 32768] = "LocalName", e[e.InternalName = 65536] = "InternalName", e[e.Indented = 131072] = "Indented", e[e.NoIndentation = 262144] = "NoIndentation", e[e.AsyncFunctionBody = 524288] = "AsyncFunctionBody", e[e.ReuseTempVariableScope = 1048576] = "ReuseTempVariableScope", e[e.CustomPrologue = 2097152] = "CustomPrologue", e[e.NoHoisting = 4194304] = "NoHoisting", e[e.Iterator = 8388608] = "Iterator", e[e.NoAsciiEscaping = 16777216] = "NoAsciiEscaping", e))(Dm || {}); + $s = { + Classes: 2, + ForOf: 2, + Generators: 2, + Iteration: 2, + SpreadElements: 2, + RestElements: 2, + TaggedTemplates: 2, + DestructuringAssignment: 2, + BindingPatterns: 2, + ArrowFunctions: 2, + BlockScopedVariables: 2, + ObjectAssign: 2, + RegularExpressionFlagsUnicode: 2, + RegularExpressionFlagsSticky: 2, + Exponentiation: 3, + AsyncFunctions: 4, + ForAwaitOf: 5, + AsyncGenerators: 5, + AsyncIteration: 5, + ObjectSpreadRest: 5, + RegularExpressionFlagsDotAll: 5, + BindinglessCatch: 6, + BigInt: 7, + NullishCoalesce: 7, + OptionalChaining: 7, + LogicalAssignment: 8, + TopLevelAwait: 9, + ClassFields: 9, + PrivateNamesAndClassStaticBlocks: 9, + RegularExpressionFlagsHasIndices: 9, + ShebangComments: 10, + RegularExpressionFlagsUnicodeSets: 11, + UsingAndAwaitUsing: 99, + ClassAndClassElementDecorators: 99 + }; + Pm = { + reference: { + args: [ + { + name: "types", + optional: !0, + captureSpan: !0 + }, + { + name: "lib", + optional: !0, + captureSpan: !0 + }, + { + name: "path", + optional: !0, + captureSpan: !0 + }, + { + name: "no-default-lib", + optional: !0 + }, + { + name: "resolution-mode", + optional: !0 + }, + { + name: "preserve", + optional: !0 + } + ], + kind: 1 + }, + "amd-dependency": { + args: [{ name: "path" }, { + name: "name", + optional: !0 + }], + kind: 1 + }, + "amd-module": { + args: [{ name: "name" }], + kind: 1 + }, + "ts-check": { kind: 2 }, + "ts-nocheck": { kind: 2 }, + jsx: { + args: [{ name: "factory" }], + kind: 4 + }, + jsxfrag: { + args: [{ name: "factory" }], + kind: 4 + }, + jsximportsource: { + args: [{ name: "factory" }], + kind: 4 + }, + jsxruntime: { + args: [{ name: "factory" }], + kind: 4 + } + }, Ya = ((e) => (e[e.ParseAll = 0] = "ParseAll", e[e.ParseNone = 1] = "ParseNone", e[e.ParseForTypeErrors = 2] = "ParseForTypeErrors", e[e.ParseForTypeInfo = 3] = "ParseForTypeInfo", e))(Ya || {}); + Xr = "/", My = "\\", vd = "://", Ly = /\\/g; + Sd = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; + A = { + Unterminated_string_literal: r(1002, 1, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: r(1003, 1, "Identifier_expected_1003", "Identifier expected."), + _0_expected: r(1005, 1, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: r(1006, 1, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + The_parser_expected_to_find_a_1_to_match_the_0_token_here: r(1007, 1, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), + Trailing_comma_not_allowed: r(1009, 1, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: r(1010, 1, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: r(1011, 1, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: r(1012, 1, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: r(1013, 1, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: r(1014, 1, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: r(1015, 1, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: r(1016, 1, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: r(1017, 1, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: r(1018, 1, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: r(1019, 1, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: r(1020, 1, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: r(1021, 1, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: r(1022, 1, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: r(1024, 1, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + An_index_signature_cannot_have_a_trailing_comma: r(1025, 1, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), + Accessibility_modifier_already_seen: r(1028, 1, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: r(1029, 1, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: r(1030, 1, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_class_elements_of_this_kind: r(1031, 1, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), + super_must_be_followed_by_an_argument_list_or_member_access: r(1034, 1, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: r(1035, 1, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: r(1036, 1, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: r(1038, 1, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: r(1039, 1, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: r(1040, 1, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_here: r(1042, 1, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: r(1044, 1, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: r(1046, 1, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), + A_rest_parameter_cannot_be_optional: r(1047, 1, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: r(1048, 1, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: r(1049, 1, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: r(1051, 1, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: r(1052, 1, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: r(1053, 1, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: r(1054, 1, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: r(1055, 1, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055", "Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: r(1056, 1, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: r(1058, 1, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: r(1059, 1, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: r(1060, 1, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: r(1061, 1, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: r(1062, 1, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: r(1063, 1, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: r(1064, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: r(1065, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: r(1066, 1, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: r(1068, 1, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: r(1069, 1, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: r(1070, 1, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: r(1071, 1, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: r(1079, 1, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: r(1084, 1, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + _0_modifier_cannot_appear_on_a_constructor_declaration: r(1089, 1, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: r(1090, 1, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: r(1091, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: r(1092, 1, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: r(1093, 1, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: r(1094, 1, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: r(1095, 1, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: r(1096, 1, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: r(1097, 1, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: r(1098, 1, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: r(1099, 1, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: r(1100, 1, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: r(1101, 1, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: r(1102, 1, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: r(1103, 1, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: r(1104, 1, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: r(1105, 1, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + The_left_hand_side_of_a_for_of_statement_may_not_be_async: r(1106, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), + Jump_target_cannot_cross_function_boundary: r(1107, 1, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: r(1108, 1, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: r(1109, 1, "Expression_expected_1109", "Expression expected."), + Type_expected: r(1110, 1, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: r(1111, 1, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: r(1113, 1, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: r(1114, 1, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: r(1115, 1, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: r(1116, 1, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name: r(1117, 1, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: r(1118, 1, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: r(1119, 1, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: r(1120, 1, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_Use_the_syntax_0: r(1121, 1, "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", "Octal literals are not allowed. Use the syntax '{0}'."), + Variable_declaration_list_cannot_be_empty: r(1123, 1, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: r(1124, 1, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: r(1125, 1, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: r(1126, 1, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: r(1127, 1, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: r(1128, 1, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: r(1129, 1, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: r(1130, 1, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: r(1131, 1, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: r(1132, 1, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: r(1134, 1, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: r(1135, 1, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: r(1136, 1, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: r(1137, 1, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: r(1138, 1, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: r(1139, 1, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: r(1140, 1, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: r(1141, 1, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: r(1142, 1, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: r(1144, 1, "or_expected_1144", "'{' or ';' expected."), + or_JSX_element_expected: r(1145, 1, "or_JSX_element_expected_1145", "'{' or JSX element expected."), + Declaration_expected: r(1146, 1, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: r(1147, 1, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: r(1148, 1, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: r(1149, 1, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + _0_declarations_must_be_initialized: r(1155, 1, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: r(1156, 1, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), + Unterminated_template_literal: r(1160, 1, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: r(1161, 1, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: r(1162, 1, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: r(1163, 1, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: r(1164, 1, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: r(1165, 1, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: r(1166, 1, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: r(1168, 1, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: r(1169, 1, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: r(1170, 1, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: r(1171, 1, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: r(1172, 1, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: r(1173, 1, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: r(1174, 1, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: r(1175, 1, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: r(1176, 1, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: r(1177, 1, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: r(1178, 1, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: r(1179, 1, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: r(1180, 1, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: r(1181, 1, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: r(1182, 1, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: r(1183, 1, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: r(1184, 1, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: r(1185, 1, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: r(1186, 1, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: r(1187, 1, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: r(1188, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: r(1189, 1, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: r(1190, 1, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: r(1191, 1, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: r(1192, 1, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: r(1193, 1, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: r(1194, 1, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + export_Asterisk_does_not_re_export_a_default: r(1195, 1, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), + Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: r(1196, 1, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), + Catch_clause_variable_cannot_have_an_initializer: r(1197, 1, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: r(1198, 1, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: r(1199, 1, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: r(1200, 1, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: r(1202, 1, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", `Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: r(1203, 1, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Re_exporting_a_type_when_0_is_enabled_requires_using_export_type: r(1205, 1, "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", "Re-exporting a type when '{0}' is enabled requires using 'export type'."), + Decorators_are_not_valid_here: r(1206, 1, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: r(1207, 1, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: r(1209, 1, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), + Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: r(1210, 1, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: r(1211, 1, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: r(1212, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: r(1213, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: r(1214, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: r(1215, 1, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: r(1216, 1, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: r(1218, 1, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Generators_are_not_allowed_in_an_ambient_context: r(1221, 1, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: r(1222, 1, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: r(1223, 1, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: r(1224, 1, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: r(1225, 1, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: r(1226, 1, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: r(1227, 1, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: r(1228, 1, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: r(1229, 1, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: r(1230, 1, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: r(1231, 1, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: r(1232, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: r(1233, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: r(1234, 1, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: r(1235, 1, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: r(1236, 1, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: r(1237, 1, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: r(1238, 1, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: r(1239, 1, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: r(1240, 1, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: r(1241, 1, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: r(1242, 1, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: r(1243, 1, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: r(1244, 1, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: r(1245, 1, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: r(1246, 1, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: r(1247, 1, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: r(1248, 1, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: r(1249, 1, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5: r(1250, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode: r(1251, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode: r(1252, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."), + Abstract_properties_can_only_appear_within_an_abstract_class: r(1253, 1, "Abstract_properties_can_only_appear_within_an_abstract_class_1253", "Abstract properties can only appear within an abstract class."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: r(1254, 1, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: r(1255, 1, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + A_required_element_cannot_follow_an_optional_element: r(1257, 1, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), + A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: r(1258, 1, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), + Module_0_can_only_be_default_imported_using_the_1_flag: r(1259, 1, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: r(1260, 1, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), + Already_included_file_name_0_differs_from_file_name_1_only_in_casing: r(1261, 1, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), + Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: r(1262, 1, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), + Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: r(1263, 1, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), + Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: r(1264, 1, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), + A_rest_element_cannot_follow_another_rest_element: r(1265, 1, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), + An_optional_element_cannot_follow_a_rest_element: r(1266, 1, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), + Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: r(1267, 1, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), + An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: r(1268, 1, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), + Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: r(1269, 1, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."), + Decorator_function_return_type_0_is_not_assignable_to_type_1: r(1270, 1, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), + Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: r(1271, 1, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), + A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: r(1272, 1, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), + _0_modifier_cannot_appear_on_a_type_parameter: r(1273, 1, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: r(1274, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), + accessor_modifier_can_only_appear_on_a_property_declaration: r(1275, 1, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), + An_accessor_property_cannot_be_declared_optional: r(1276, 1, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: r(1277, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: r(1278, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: r(1279, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."), + Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: r(1280, 1, "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."), + Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: r(1281, 1, "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."), + An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: r(1282, 1, "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: r(1283, 1, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: r(1284, 1, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: r(1285, 1, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax: r(1286, 1, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."), + A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: r(1287, 1, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: r(1288, 1, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: r(1289, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: r(1290, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: r(1291, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: r(1292, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: r(1293, 1, "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."), + This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled: r(1294, 1, "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."), + ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript: r(1295, 1, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."), + with_statements_are_not_allowed_in_an_async_function_block: r(1300, 1, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: r(1308, 1, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), + The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: r(1309, 1, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), + Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: r(1312, 1, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: r(1313, 1, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: r(1314, 1, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: r(1315, 1, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: r(1316, 1, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: r(1317, 1, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: r(1318, 1, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: r(1319, 1, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: r(1320, 1, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: r(1321, 1, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: r(1322, 1, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext: r(1323, 1, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve: r(1324, 1, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'."), + Argument_of_dynamic_import_cannot_be_spread_element: r(1325, 1, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), + This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: r(1326, 1, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), + String_literal_with_double_quotes_expected: r(1327, 1, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: r(1328, 1, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: r(1329, 1, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: r(1330, 1, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: r(1331, 1, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: r(1332, 1, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: r(1333, 1, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: r(1334, 1, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: r(1335, 1, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: r(1337, 1, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: r(1338, 1, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: r(1339, 1, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: r(1340, 1, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), + Class_constructor_may_not_be_an_accessor: r(1341, 1, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext: r(1343, 1, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."), + A_label_is_not_allowed_here: r(1344, 1, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), + An_expression_of_type_void_cannot_be_tested_for_truthiness: r(1345, 1, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), + This_parameter_is_not_allowed_with_use_strict_directive: r(1346, 1, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), + use_strict_directive_cannot_be_used_with_non_simple_parameter_list: r(1347, 1, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), + Non_simple_parameter_declared_here: r(1348, 1, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), + use_strict_directive_used_here: r(1349, 1, "use_strict_directive_used_here_1349", "'use strict' directive used here."), + Print_the_final_configuration_instead_of_building: r(1350, 3, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), + An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: r(1351, 1, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), + A_bigint_literal_cannot_use_exponential_notation: r(1352, 1, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), + A_bigint_literal_must_be_an_integer: r(1353, 1, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), + readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: r(1354, 1, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), + A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: r(1355, 1, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), + Did_you_mean_to_mark_this_function_as_async: r(1356, 1, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), + An_enum_member_name_must_be_followed_by_a_or: r(1357, 1, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), + Tagged_template_expressions_are_not_permitted_in_an_optional_chain: r(1358, 1, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), + Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: r(1359, 1, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Type_0_does_not_satisfy_the_expected_type_1: r(1360, 1, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: r(1361, 1, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: r(1362, 1, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), + A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: r(1363, 1, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), + Convert_to_type_only_export: r(1364, 3, "Convert_to_type_only_export_1364", "Convert to type-only export"), + Convert_all_re_exported_types_to_type_only_exports: r(1365, 3, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), + Split_into_two_separate_import_declarations: r(1366, 3, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), + Split_all_invalid_type_only_imports: r(1367, 3, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), + Class_constructor_may_not_be_a_generator: r(1368, 1, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), + Did_you_mean_0: r(1369, 3, "Did_you_mean_0_1369", "Did you mean '{0}'?"), + await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: r(1375, 1, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + _0_was_imported_here: r(1376, 3, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: r(1377, 3, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: r(1378, 1, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: r(1379, 1, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: r(1380, 1, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: r(1381, 1, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: r(1382, 1, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), + Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: r(1385, 1, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: r(1386, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), + Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: r(1387, 1, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: r(1388, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), + _0_is_not_allowed_as_a_variable_declaration_name: r(1389, 1, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), + _0_is_not_allowed_as_a_parameter_name: r(1390, 1, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), + An_import_alias_cannot_use_import_type: r(1392, 1, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), + Imported_via_0_from_file_1: r(1393, 3, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), + Imported_via_0_from_file_1_with_packageId_2: r(1394, 3, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), + Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: r(1395, 3, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: r(1396, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: r(1397, 3, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: r(1398, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), + File_is_included_via_import_here: r(1399, 3, "File_is_included_via_import_here_1399", "File is included via import here."), + Referenced_via_0_from_file_1: r(1400, 3, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), + File_is_included_via_reference_here: r(1401, 3, "File_is_included_via_reference_here_1401", "File is included via reference here."), + Type_library_referenced_via_0_from_file_1: r(1402, 3, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), + Type_library_referenced_via_0_from_file_1_with_packageId_2: r(1403, 3, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), + File_is_included_via_type_library_reference_here: r(1404, 3, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), + Library_referenced_via_0_from_file_1: r(1405, 3, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), + File_is_included_via_library_reference_here: r(1406, 3, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), + Matched_by_include_pattern_0_in_1: r(1407, 3, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), + File_is_matched_by_include_pattern_specified_here: r(1408, 3, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), + Part_of_files_list_in_tsconfig_json: r(1409, 3, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), + File_is_matched_by_files_list_specified_here: r(1410, 3, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), + Output_from_referenced_project_0_included_because_1_specified: r(1411, 3, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), + Output_from_referenced_project_0_included_because_module_is_specified_as_none: r(1412, 3, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_output_from_referenced_project_specified_here: r(1413, 3, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), + Source_from_referenced_project_0_included_because_1_specified: r(1414, 3, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), + Source_from_referenced_project_0_included_because_module_is_specified_as_none: r(1415, 3, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_source_from_referenced_project_specified_here: r(1416, 3, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), + Entry_point_of_type_library_0_specified_in_compilerOptions: r(1417, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), + Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: r(1418, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), + File_is_entry_point_of_type_library_specified_here: r(1419, 3, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), + Entry_point_for_implicit_type_library_0: r(1420, 3, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), + Entry_point_for_implicit_type_library_0_with_packageId_1: r(1421, 3, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), + Library_0_specified_in_compilerOptions: r(1422, 3, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), + File_is_library_specified_here: r(1423, 3, "File_is_library_specified_here_1423", "File is library specified here."), + Default_library: r(1424, 3, "Default_library_1424", "Default library"), + Default_library_for_target_0: r(1425, 3, "Default_library_for_target_0_1425", "Default library for target '{0}'"), + File_is_default_library_for_target_specified_here: r(1426, 3, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), + Root_file_specified_for_compilation: r(1427, 3, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), + File_is_output_of_project_reference_source_0: r(1428, 3, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), + File_redirects_to_file_0: r(1429, 3, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), + The_file_is_in_the_program_because_Colon: r(1430, 3, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), + for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: r(1431, 1, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: r(1432, 1, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: r(1433, 1, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."), + Unexpected_keyword_or_identifier: r(1434, 1, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), + Unknown_keyword_or_identifier_Did_you_mean_0: r(1435, 1, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), + Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: r(1436, 1, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), + Namespace_must_be_given_a_name: r(1437, 1, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), + Interface_must_be_given_a_name: r(1438, 1, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), + Type_alias_must_be_given_a_name: r(1439, 1, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), + Variable_declaration_not_allowed_at_this_location: r(1440, 1, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), + Cannot_start_a_function_call_in_a_type_annotation: r(1441, 1, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), + Expected_for_property_initializer: r(1442, 1, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), + Module_declaration_names_may_only_use_or_quoted_strings: r(1443, 1, "Module_declaration_names_may_only_use_or_quoted_strings_1443", `Module declaration names may only use ' or " quoted strings.`), + _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: r(1448, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), + Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: r(1449, 3, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: r(1450, 3, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), + Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: r(1451, 1, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), + resolution_mode_should_be_either_require_or_import: r(1453, 1, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), + resolution_mode_can_only_be_set_for_type_only_imports: r(1454, 1, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), + resolution_mode_is_the_only_valid_key_for_type_import_assertions: r(1455, 1, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), + Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: r(1456, 1, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), + Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: r(1457, 3, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), + File_is_ECMAScript_module_because_0_has_field_type_with_value_module: r(1458, 3, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", `File is ECMAScript module because '{0}' has field "type" with value "module"`), + File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: r(1459, 3, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), + File_is_CommonJS_module_because_0_does_not_have_field_type: r(1460, 3, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), + File_is_CommonJS_module_because_package_json_was_not_found: r(1461, 3, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: r(1463, 1, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: r(1464, 1, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), + The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: r(1470, 1, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), + Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: r(1471, 1, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), + catch_or_finally_expected: r(1472, 1, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: r(1473, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: r(1474, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), + Control_what_method_is_used_to_detect_module_format_JS_files: r(1475, 3, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), + auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: r(1476, 3, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."), + An_instantiation_expression_cannot_be_followed_by_a_property_access: r(1477, 1, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), + Identifier_or_string_literal_expected: r(1478, 1, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), + The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: r(1479, 1, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", `The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: r(1480, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: r(1481, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`), + To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: r(1482, 3, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."), + To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: r(1483, 3, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."), + _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: r(1484, 1, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: r(1485, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + Decorator_used_before_export_here: r(1486, 1, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."), + Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: r(1487, 1, "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", "Octal escape sequences are not allowed. Use the syntax '{0}'."), + Escape_sequence_0_is_not_allowed: r(1488, 1, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), + Decimals_with_leading_zeros_are_not_allowed: r(1489, 1, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), + File_appears_to_be_binary: r(1490, 1, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: r(1491, 1, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: r(1492, 1, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: r(1493, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: r(1494, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: r(1495, 1, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: r(1496, 1, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), + Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: r(1497, 1, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."), + Invalid_syntax_in_decorator: r(1498, 1, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."), + Unknown_regular_expression_flag: r(1499, 1, "Unknown_regular_expression_flag_1499", "Unknown regular expression flag."), + Duplicate_regular_expression_flag: r(1500, 1, "Duplicate_regular_expression_flag_1500", "Duplicate regular expression flag."), + This_regular_expression_flag_is_only_available_when_targeting_0_or_later: r(1501, 1, "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501", "This regular expression flag is only available when targeting '{0}' or later."), + The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: r(1502, 1, "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502", "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."), + Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: r(1503, 1, "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503", "Named capturing groups are only available when targeting 'ES2018' or later."), + Subpattern_flags_must_be_present_when_there_is_a_minus_sign: r(1504, 1, "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504", "Subpattern flags must be present when there is a minus sign."), + Incomplete_quantifier_Digit_expected: r(1505, 1, "Incomplete_quantifier_Digit_expected_1505", "Incomplete quantifier. Digit expected."), + Numbers_out_of_order_in_quantifier: r(1506, 1, "Numbers_out_of_order_in_quantifier_1506", "Numbers out of order in quantifier."), + There_is_nothing_available_for_repetition: r(1507, 1, "There_is_nothing_available_for_repetition_1507", "There is nothing available for repetition."), + Unexpected_0_Did_you_mean_to_escape_it_with_backslash: r(1508, 1, "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508", "Unexpected '{0}'. Did you mean to escape it with backslash?"), + This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: r(1509, 1, "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509", "This regular expression flag cannot be toggled within a subpattern."), + k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: r(1510, 1, "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510", "'\\k' must be followed by a capturing group name enclosed in angle brackets."), + q_is_only_available_inside_character_class: r(1511, 1, "q_is_only_available_inside_character_class_1511", "'\\q' is only available inside character class."), + c_must_be_followed_by_an_ASCII_letter: r(1512, 1, "c_must_be_followed_by_an_ASCII_letter_1512", "'\\c' must be followed by an ASCII letter."), + Undetermined_character_escape: r(1513, 1, "Undetermined_character_escape_1513", "Undetermined character escape."), + Expected_a_capturing_group_name: r(1514, 1, "Expected_a_capturing_group_name_1514", "Expected a capturing group name."), + Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: r(1515, 1, "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515", "Named capturing groups with the same name must be mutually exclusive to each other."), + A_character_class_range_must_not_be_bounded_by_another_character_class: r(1516, 1, "A_character_class_range_must_not_be_bounded_by_another_character_class_1516", "A character class range must not be bounded by another character class."), + Range_out_of_order_in_character_class: r(1517, 1, "Range_out_of_order_in_character_class_1517", "Range out of order in character class."), + Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: r(1518, 1, "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518", "Anything that would possibly match more than a single character is invalid inside a negated character class."), + Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: r(1519, 1, "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519", "Operators must not be mixed within a character class. Wrap it in a nested class instead."), + Expected_a_class_set_operand: r(1520, 1, "Expected_a_class_set_operand_1520", "Expected a class set operand."), + q_must_be_followed_by_string_alternatives_enclosed_in_braces: r(1521, 1, "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521", "'\\q' must be followed by string alternatives enclosed in braces."), + A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: r(1522, 1, "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522", "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"), + Expected_a_Unicode_property_name: r(1523, 1, "Expected_a_Unicode_property_name_1523", "Expected a Unicode property name."), + Unknown_Unicode_property_name: r(1524, 1, "Unknown_Unicode_property_name_1524", "Unknown Unicode property name."), + Expected_a_Unicode_property_value: r(1525, 1, "Expected_a_Unicode_property_value_1525", "Expected a Unicode property value."), + Unknown_Unicode_property_value: r(1526, 1, "Unknown_Unicode_property_value_1526", "Unknown Unicode property value."), + Expected_a_Unicode_property_name_or_value: r(1527, 1, "Expected_a_Unicode_property_name_or_value_1527", "Expected a Unicode property name or value."), + Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: r(1528, 1, "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528", "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."), + Unknown_Unicode_property_name_or_value: r(1529, 1, "Unknown_Unicode_property_name_or_value_1529", "Unknown Unicode property name or value."), + Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: r(1530, 1, "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530", "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + _0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: r(1531, 1, "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531", "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."), + There_is_no_capturing_group_named_0_in_this_regular_expression: r(1532, 1, "There_is_no_capturing_group_named_0_in_this_regular_expression_1532", "There is no capturing group named '{0}' in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression: r(1533, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533", "This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression: r(1534, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534", "This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."), + This_character_cannot_be_escaped_in_a_regular_expression: r(1535, 1, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."), + Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: r(1536, 1, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."), + Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: r(1537, 1, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."), + Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: r(1538, 1, "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + A_bigint_literal_cannot_be_used_as_a_property_name: r(1539, 1, "A_bigint_literal_cannot_be_used_as_a_property_name_1539", "A 'bigint' literal cannot be used as a property name."), + A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: r(1540, 2, "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.", void 0, void 0, !0), + Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: r(1541, 1, "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: r(1542, 1, "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: r(1543, 1, "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", `Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`), + Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0: r(1544, 1, "Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544", "Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."), + using_declarations_are_not_allowed_in_ambient_contexts: r(1545, 1, "using_declarations_are_not_allowed_in_ambient_contexts_1545", "'using' declarations are not allowed in ambient contexts."), + await_using_declarations_are_not_allowed_in_ambient_contexts: r(1546, 1, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."), + The_types_of_0_are_incompatible_between_these_types: r(2200, 1, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), + The_types_returned_by_0_are_incompatible_between_these_types: r(2201, 1, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), + Call_signature_return_types_0_and_1_are_incompatible: r(2202, 1, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", void 0, !0), + Construct_signature_return_types_0_and_1_are_incompatible: r(2203, 1, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", void 0, !0), + Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: r(2204, 1, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", void 0, !0), + Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: r(2205, 1, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", void 0, !0), + The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: r(2206, 1, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), + The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: r(2207, 1, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), + This_type_parameter_might_need_an_extends_0_constraint: r(2208, 1, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), + The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: r(2209, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: r(2210, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + Add_extends_constraint: r(2211, 3, "Add_extends_constraint_2211", "Add `extends` constraint."), + Add_extends_constraint_to_all_type_parameters: r(2212, 3, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), + Duplicate_identifier_0: r(2300, 1, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: r(2301, 1, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: r(2302, 1, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: r(2303, 1, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: r(2304, 1, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: r(2305, 1, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: r(2306, 1, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0_or_its_corresponding_type_declarations: r(2307, 1, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: r(2308, 1, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: r(2309, 1, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: r(2310, 1, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: r(2311, 1, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), + An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: r(2312, 1, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), + Type_parameter_0_has_a_circular_constraint: r(2313, 1, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: r(2314, 1, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: r(2315, 1, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: r(2316, 1, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: r(2317, 1, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: r(2318, 1, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: r(2319, 1, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: r(2320, 1, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: r(2321, 1, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: r(2322, 1, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: r(2323, 1, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: r(2324, 1, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: r(2325, 1, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: r(2326, 1, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: r(2327, 1, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: r(2328, 1, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_for_type_0_is_missing_in_type_1: r(2329, 1, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), + _0_and_1_index_signatures_are_incompatible: r(2330, 1, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: r(2331, 1, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: r(2332, 1, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_a_static_property_initializer: r(2334, 1, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: r(2335, 1, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: r(2336, 1, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: r(2337, 1, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: r(2338, 1, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: r(2339, 1, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: r(2340, 1, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: r(2341, 1, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: r(2343, 1, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), + Type_0_does_not_satisfy_the_constraint_1: r(2344, 1, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: r(2345, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Call_target_does_not_contain_any_signatures: r(2346, 1, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), + Untyped_function_calls_may_not_accept_type_arguments: r(2347, 1, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: r(2348, 1, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + This_expression_is_not_callable: r(2349, 1, "This_expression_is_not_callable_2349", "This expression is not callable."), + Only_a_void_function_can_be_called_with_the_new_keyword: r(2350, 1, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + This_expression_is_not_constructable: r(2351, 1, "This_expression_is_not_constructable_2351", "This expression is not constructable."), + Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: r(2352, 1, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: r(2353, 1, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: r(2354, 1, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value: r(2355, 1, "A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: r(2356, 1, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: r(2357, 1, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: r(2358, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: r(2359, 1, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: r(2362, 1, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: r(2363, 1, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: r(2364, 1, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: r(2365, 1, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: r(2366, 1, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: r(2367, 1, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), + Type_parameter_name_cannot_be_0: r(2368, 1, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: r(2369, 1, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: r(2370, 1, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: r(2371, 1, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_reference_itself: r(2372, 1, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), + Parameter_0_cannot_reference_identifier_1_declared_after_it: r(2373, 1, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_index_signature_for_type_0: r(2374, 1, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: r(2375, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: r(2376, 1, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), + Constructors_for_derived_classes_must_contain_a_super_call: r(2377, 1, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: r(2378, 1, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: r(2379, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + Overload_signatures_must_all_be_exported_or_non_exported: r(2383, 1, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: r(2384, 1, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: r(2385, 1, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: r(2386, 1, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: r(2387, 1, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: r(2388, 1, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: r(2389, 1, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: r(2390, 1, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: r(2391, 1, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: r(2392, 1, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: r(2393, 1, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + This_overload_signature_is_not_compatible_with_its_implementation_signature: r(2394, 1, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: r(2395, 1, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: r(2396, 1, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: r(2397, 1, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + constructor_cannot_be_used_as_a_parameter_property_name: r(2398, 1, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: r(2399, 1, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: r(2400, 1, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: r(2401, 1, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: r(2402, 1, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: r(2403, 1, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: r(2404, 1, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: r(2405, 1, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: r(2406, 1, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: r(2407, 1, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: r(2408, 1, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: r(2409, 1, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: r(2410, 1, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: r(2412, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), + Property_0_of_type_1_is_not_assignable_to_2_index_type_3: r(2411, 1, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), + _0_index_type_1_is_not_assignable_to_2_index_type_3: r(2413, 1, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), + Class_name_cannot_be_0: r(2414, 1, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: r(2415, 1, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: r(2416, 1, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: r(2417, 1, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: r(2418, 1, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), + Types_of_construct_signatures_are_incompatible: r(2419, 1, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), + Class_0_incorrectly_implements_interface_1: r(2420, 1, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: r(2422, 1, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: r(2423, 1, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: r(2425, 1, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: r(2426, 1, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: r(2427, 1, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: r(2428, 1, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: r(2430, 1, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: r(2431, 1, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: r(2432, 1, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: r(2433, 1, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: r(2434, 1, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: r(2435, 1, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: r(2436, 1, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: r(2437, 1, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: r(2438, 1, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: r(2439, 1, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: r(2440, 1, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: r(2441, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: r(2442, 1, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: r(2443, 1, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: r(2444, 1, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: r(2445, 1, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: r(2446, 1, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: r(2447, 1, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: r(2448, 1, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: r(2449, 1, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: r(2450, 1, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: r(2451, 1, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: r(2452, 1, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + Variable_0_is_used_before_being_assigned: r(2454, 1, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_alias_0_circularly_references_itself: r(2456, 1, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: r(2457, 1, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: r(2458, 1, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: r(2459, 1, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: r(2460, 1, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), + Type_0_is_not_an_array_type: r(2461, 1, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: r(2462, 1, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: r(2463, 1, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: r(2464, 1, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: r(2465, 1, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: r(2466, 1, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: r(2467, 1, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: r(2468, 1, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: r(2469, 1, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: r(2472, 1, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: r(2473, 1, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + const_enum_member_initializers_must_be_constant_expressions: r(2474, 1, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: r(2475, 1, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: r(2476, 1, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: r(2477, 1, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: r(2478, 1, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: r(2480, 1, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: r(2481, 1, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: r(2483, 1, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: r(2484, 1, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: r(2487, 1, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: r(2488, 1, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: r(2489, 1, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: r(2490, 1, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: r(2491, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: r(2492, 1, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_of_length_1_has_no_element_at_index_2: r(2493, 1, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: r(2494, 1, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: r(2495, 1, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression: r(2496, 1, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496", "The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."), + This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: r(2497, 1, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: r(2498, 1, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: r(2499, 1, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: r(2500, 1, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: r(2501, 1, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: r(2502, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: r(2503, 1, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: r(2504, 1, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: r(2505, 1, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: r(2506, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: r(2507, 1, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: r(2508, 1, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: r(2509, 1, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), + Base_constructors_must_all_have_the_same_return_type: r(2510, 1, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: r(2511, 1, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: r(2512, 1, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: r(2513, 1, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + A_tuple_type_cannot_be_indexed_with_a_negative_value: r(2514, 1, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: r(2515, 1, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: r(2516, 1, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: r(2517, 1, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: r(2518, 1, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: r(2519, 1, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: r(2520, 1, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method: r(2522, 1, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522", "The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: r(2523, 1, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: r(2524, 1, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: r(2526, 1, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: r(2527, 1, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: r(2528, 1, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: r(2529, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: r(2530, 1, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: r(2531, 1, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: r(2532, 1, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: r(2533, 1, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: r(2534, 1, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Type_0_cannot_be_used_to_index_type_1: r(2536, 1, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: r(2537, 1, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: r(2538, 1, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: r(2539, 1, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_read_only_property: r(2540, 1, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), + Index_signature_in_type_0_only_permits_reading: r(2542, 1, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: r(2543, 1, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: r(2544, 1, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: r(2545, 1, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: r(2547, 1, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: r(2548, 1, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: r(2549, 1, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: r(2550, 1, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: r(2551, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: r(2552, 1, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: r(2553, 1, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: r(2554, 1, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: r(2555, 1, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: r(2556, 1, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), + Expected_0_type_arguments_but_got_1: r(2558, 1, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: r(2559, 1, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: r(2560, 1, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: r(2561, 1, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: r(2562, 1, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: r(2563, 1, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: r(2564, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: r(2565, 1, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: r(2566, 1, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: r(2567, 1, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Property_0_may_not_exist_on_type_1_Did_you_mean_2: r(2568, 1, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), + Could_not_find_name_0_Did_you_mean_1: r(2570, 1, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), + Object_is_of_type_unknown: r(2571, 1, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + A_rest_element_type_must_be_an_array_type: r(2574, 1, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), + No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: r(2575, 1, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), + Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: r(2576, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), + Return_type_annotation_circularly_references_itself: r(2577, 1, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), + Unused_ts_expect_error_directive: r(2578, 1, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: r(2580, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: r(2581, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: r(2582, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: r(2583, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: r(2584, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: r(2585, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), + Cannot_assign_to_0_because_it_is_a_constant: r(2588, 1, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), + Type_instantiation_is_excessively_deep_and_possibly_infinite: r(2589, 1, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), + Expression_produces_a_union_type_that_is_too_complex_to_represent: r(2590, 1, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: r(2591, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: r(2592, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: r(2593, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), + This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: r(2594, 1, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), + _0_can_only_be_imported_by_using_a_default_import: r(2595, 1, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), + _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: r(2596, 1, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: r(2597, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: r(2598, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: r(2602, 1, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: r(2603, 1, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: r(2604, 1, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: r(2606, 1, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: r(2607, 1, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: r(2608, 1, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: r(2609, 1, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: r(2610, 1, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: r(2611, 1, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), + Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: r(2612, 1, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), + Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: r(2613, 1, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), + Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: r(2614, 1, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), + Type_of_property_0_circularly_references_itself_in_mapped_type_1: r(2615, 1, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), + _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: r(2616, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), + _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: r(2617, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), + Source_has_0_element_s_but_target_requires_1: r(2618, 1, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), + Source_has_0_element_s_but_target_allows_only_1: r(2619, 1, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), + Target_requires_0_element_s_but_source_may_have_fewer: r(2620, 1, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), + Target_allows_only_0_element_s_but_source_may_have_more: r(2621, 1, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), + Source_provides_no_match_for_required_element_at_position_0_in_target: r(2623, 1, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), + Source_provides_no_match_for_variadic_element_at_position_0_in_target: r(2624, 1, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), + Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: r(2625, 1, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), + Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: r(2626, 1, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), + Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: r(2627, 1, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), + Cannot_assign_to_0_because_it_is_an_enum: r(2628, 1, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), + Cannot_assign_to_0_because_it_is_a_class: r(2629, 1, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), + Cannot_assign_to_0_because_it_is_a_function: r(2630, 1, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), + Cannot_assign_to_0_because_it_is_a_namespace: r(2631, 1, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), + Cannot_assign_to_0_because_it_is_an_import: r(2632, 1, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), + JSX_property_access_expressions_cannot_include_JSX_namespace_names: r(2633, 1, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), + _0_index_signatures_are_incompatible: r(2634, 1, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), + Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: r(2635, 1, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), + Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: r(2636, 1, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), + Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: r(2637, 1, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), + Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: r(2638, 1, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), + React_components_cannot_include_JSX_namespace_names: r(2639, 1, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: r(2649, 1, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: r(2650, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: r(2651, 1, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: r(2652, 1, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: r(2653, 1, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: r(2654, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: r(2655, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: r(2656, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."), + JSX_expressions_must_have_one_parent_element: r(2657, 1, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: r(2658, 1, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: r(2659, 1, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: r(2660, 1, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: r(2661, 1, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: r(2662, 1, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: r(2663, 1, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: r(2664, 1, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: r(2665, 1, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: r(2666, 1, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: r(2667, 1, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: r(2668, 1, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: r(2669, 1, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: r(2670, 1, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: r(2671, 1, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: r(2672, 1, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: r(2673, 1, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: r(2674, 1, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: r(2675, 1, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: r(2676, 1, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: r(2677, 1, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: r(2678, 1, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: r(2679, 1, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: r(2680, 1, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: r(2681, 1, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: r(2683, 1, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: r(2684, 1, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: r(2685, 1, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: r(2686, 1, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: r(2687, 1, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: r(2688, 1, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: r(2689, 1, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: r(2690, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: r(2692, 1, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: r(2693, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: r(2694, 1, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: r(2695, 1, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", !0), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: r(2696, 1, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: r(2697, 1, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + Spread_types_may_only_be_created_from_object_types: r(2698, 1, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: r(2699, 1, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: r(2700, 1, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: r(2701, 1, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: r(2702, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: r(2703, 1, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: r(2704, 1, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: r(2705, 1, "An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705", "An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Required_type_parameters_may_not_follow_optional_type_parameters: r(2706, 1, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: r(2707, 1, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: r(2708, 1, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: r(2709, 1, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: r(2710, 1, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: r(2711, 1, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: r(2712, 1, "A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712", "A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: r(2713, 1, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", `Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: r(2714, 1, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: r(2715, 1, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: r(2716, 1, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: r(2717, 1, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_property_0: r(2718, 1, "Duplicate_property_0_2718", "Duplicate property '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: r(2719, 1, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: r(2720, 1, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: r(2721, 1, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: r(2722, 1, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: r(2723, 1, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + _0_has_no_exported_member_named_1_Did_you_mean_2: r(2724, 1, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0: r(2725, 1, "Class_name_cannot_be_Object_when_targeting_ES5_and_above_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 and above with module {0}."), + Cannot_find_lib_definition_for_0: r(2726, 1, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: r(2727, 1, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + _0_is_declared_here: r(2728, 3, "_0_is_declared_here_2728", "'{0}' is declared here."), + Property_0_is_used_before_its_initialization: r(2729, 1, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), + An_arrow_function_cannot_have_a_this_parameter: r(2730, 1, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), + Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: r(2731, 1, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), + Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: r(2732, 1, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), + Property_0_was_also_declared_here: r(2733, 1, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), + Are_you_missing_a_semicolon: r(2734, 1, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), + Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: r(2735, 1, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), + Operator_0_cannot_be_applied_to_type_1: r(2736, 1, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), + BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: r(2737, 1, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), + An_outer_value_of_this_is_shadowed_by_this_container: r(2738, 3, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2: r(2739, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: r(2740, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), + Property_0_is_missing_in_type_1_but_required_in_type_2: r(2741, 1, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), + The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: r(2742, 1, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), + No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: r(2743, 1, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), + Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: r(2744, 1, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), + This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: r(2745, 1, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), + This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: r(2746, 1, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), + _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: r(2747, 1, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), + Cannot_access_ambient_const_enums_when_0_is_enabled: r(2748, 1, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."), + _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: r(2749, 1, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), + The_implementation_signature_is_declared_here: r(2750, 1, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), + Circularity_originates_in_type_at_this_location: r(2751, 1, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), + The_first_export_default_is_here: r(2752, 1, "The_first_export_default_is_here_2752", "The first export default is here."), + Another_export_default_is_here: r(2753, 1, "Another_export_default_is_here_2753", "Another export default is here."), + super_may_not_use_type_arguments: r(2754, 1, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: r(2755, 1, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: r(2756, 1, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: r(2757, 1, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: r(2758, 1, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: r(2759, 1, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: r(2760, 1, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: r(2761, 1, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: r(2762, 1, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: r(2763, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: r(2764, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: r(2765, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: r(2766, 1, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: r(2767, 1, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: r(2768, 1, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: r(2769, 1, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: r(2770, 1, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: r(2771, 1, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: r(2772, 1, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: r(2773, 1, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), + This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: r(2774, 1, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), + Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: r(2775, 1, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), + Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: r(2776, 1, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), + The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: r(2777, 1, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), + The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: r(2778, 1, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), + The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: r(2779, 1, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), + The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: r(2780, 1, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), + The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: r(2781, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), + _0_needs_an_explicit_type_annotation: r(2782, 3, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: r(2783, 1, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), + get_and_set_accessors_cannot_declare_this_parameters: r(2784, 1, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), + This_spread_always_overwrites_this_property: r(2785, 1, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), + _0_cannot_be_used_as_a_JSX_component: r(2786, 1, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), + Its_return_type_0_is_not_a_valid_JSX_element: r(2787, 1, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), + Its_instance_type_0_is_not_a_valid_JSX_element: r(2788, 1, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), + Its_element_type_0_is_not_a_valid_JSX_element: r(2789, 1, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), + The_operand_of_a_delete_operator_must_be_optional: r(2790, 1, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), + Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: r(2791, 1, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), + Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: r(2792, 1, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"), + The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: r(2793, 1, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), + Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: r(2794, 1, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), + The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: r(2795, 1, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), + It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: r(2796, 1, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), + A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: r(2797, 1, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), + The_declaration_was_marked_as_deprecated_here: r(2798, 1, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), + Type_produces_a_tuple_type_that_is_too_large_to_represent: r(2799, 1, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), + Expression_produces_a_tuple_type_that_is_too_large_to_represent: r(2800, 1, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), + This_condition_will_always_return_true_since_this_0_is_always_defined: r(2801, 1, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), + Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: r(2802, 1, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), + Cannot_assign_to_private_method_0_Private_methods_are_not_writable: r(2803, 1, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), + Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: r(2804, 1, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), + Private_accessor_was_defined_without_a_getter: r(2806, 1, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), + This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: r(2807, 1, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), + A_get_accessor_must_be_at_least_as_accessible_as_the_setter: r(2808, 1, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), + Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses: r(2809, 1, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."), + Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: r(2810, 1, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), + Initializer_for_property_0: r(2811, 1, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), + Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: r(2812, 1, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), + Class_declaration_cannot_implement_overload_list_for_0: r(2813, 1, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), + Function_with_bodies_can_only_merge_with_classes_that_are_ambient: r(2814, 1, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), + arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks: r(2815, 1, "arguments_cannot_be_referenced_in_property_initializers_or_class_static_initialization_blocks_2815", "'arguments' cannot be referenced in property initializers or class static initialization blocks."), + Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: r(2816, 1, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: r(2817, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), + Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: r(2818, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), + Namespace_name_cannot_be_0: r(2819, 1, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), + Type_0_is_not_assignable_to_type_1_Did_you_mean_2: r(2820, 1, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve: r(2821, 1, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."), + Import_assertions_cannot_be_used_with_type_only_imports_or_exports: r(2822, 1, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve: r(2823, 1, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext__2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'."), + Cannot_find_namespace_0_Did_you_mean_1: r(2833, 1, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: r(2834, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: r(2835, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: r(2836, 1, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), + Import_assertion_values_must_be_string_literal_expressions: r(2837, 1, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), + All_declarations_of_0_must_have_identical_constraints: r(2838, 1, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), + This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: r(2839, 1, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: r(2840, 1, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), + _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: r(2842, 1, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), + We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: r(2843, 1, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), + Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: r(2844, 1, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + This_condition_will_always_return_0: r(2845, 1, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), + A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: r(2846, 1, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), + The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: r(2848, 1, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), + Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: r(2849, 1, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: r(2850, 1, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: r(2851, 1, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: r(2852, 1, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: r(2853, 1, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: r(2854, 1, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: r(2855, 1, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: r(2856, 1, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: r(2857, 1, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: r(2858, 1, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: r(2859, 1, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: r(2860, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: r(2861, 1, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: r(2862, 1, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: r(2863, 1, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: r(2864, 1, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), + Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: r(2865, 1, "Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865", "Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: r(2866, 1, "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: r(2867, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: r(2868, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."), + Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish: r(2869, 1, "Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869", "Right operand of ?? is unreachable because the left operand is never nullish."), + This_binary_expression_is_never_nullish_Are_you_missing_parentheses: r(2870, 1, "This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870", "This binary expression is never nullish. Are you missing parentheses?"), + This_expression_is_always_nullish: r(2871, 1, "This_expression_is_always_nullish_2871", "This expression is always nullish."), + This_kind_of_expression_is_always_truthy: r(2872, 1, "This_kind_of_expression_is_always_truthy_2872", "This kind of expression is always truthy."), + This_kind_of_expression_is_always_falsy: r(2873, 1, "This_kind_of_expression_is_always_falsy_2873", "This kind of expression is always falsy."), + This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found: r(2874, 1, "This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874", "This JSX tag requires '{0}' to be in scope, but it could not be found."), + This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed: r(2875, 1, "This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875", "This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."), + This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0: r(2876, 1, "This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876", "This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to \"{0}\"."), + This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: r(2877, 1, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."), + This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: r(2878, 1, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."), + Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: r(2879, 1, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."), + Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert: r(2880, 1, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."), + This_expression_is_never_nullish: r(2881, 1, "This_expression_is_never_nullish_2881", "This expression is never nullish."), + Import_declaration_0_is_using_private_name_1: r(4e3, 1, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: r(4002, 1, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: r(4004, 1, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: r(4006, 1, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: r(4008, 1, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: r(4010, 1, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: r(4012, 1, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: r(4014, 1, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: r(4016, 1, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: r(4019, 1, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: r(4020, 1, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_has_or_is_using_private_name_0: r(4021, 1, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: r(4022, 1, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4023, 1, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: r(4024, 1, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: r(4025, 1, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4026, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: r(4027, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: r(4028, 1, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4029, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: r(4030, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: r(4031, 1, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4032, 1, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: r(4033, 1, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4034, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: r(4035, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4036, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: r(4037, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4038, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4039, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: r(4040, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4041, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4042, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: r(4043, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: r(4044, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: r(4045, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: r(4046, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: r(4047, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: r(4048, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: r(4049, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: r(4050, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: r(4051, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: r(4052, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: r(4053, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: r(4054, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: r(4055, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: r(4056, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: r(4057, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: r(4058, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: r(4059, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: r(4060, 1, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4061, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4062, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: r(4063, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4064, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: r(4065, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4066, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: r(4067, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4068, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4069, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: r(4070, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4071, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: r(4072, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: r(4073, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4074, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: r(4075, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4076, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: r(4077, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: r(4078, 1, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: r(4081, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: r(4082, 1, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: r(4083, 1, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: r(4084, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), + Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: r(4085, 1, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' has or is using private name '{1}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4091, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: r(4092, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected: r(4094, 1, "Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094", "Property '{0}' of exported anonymous class type may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4095, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: r(4096, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: r(4097, 1, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4098, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: r(4099, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: r(4100, 1, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: r(4101, 1, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: r(4102, 1, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: r(4103, 1, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), + The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: r(4104, 1, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: r(4105, 1, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), + Parameter_0_of_accessor_has_or_is_using_private_name_1: r(4106, 1, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: r(4107, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: r(4108, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: r(4109, 1, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: r(4110, 1, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), + Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: r(4111, 1, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), + This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: r(4112, 1, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: r(4113, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: r(4114, 1, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: r(4115, 1, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: r(4116, 1, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: r(4117, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: r(4118, 1, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), + This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: r(4119, 1, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: r(4120, 1, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: r(4121, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: r(4122, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: r(4123, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: r(4124, 1, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: r(4125, 1, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."), + One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: r(4126, 1, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."), + This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: r(4127, 1, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: r(4128, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."), + The_current_host_does_not_support_the_0_option: r(5001, 1, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: r(5009, 1, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: r(5010, 1, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: r(5012, 1, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Unknown_compiler_option_0: r(5023, 1, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: r(5024, 1, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: r(5025, 1, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), + Could_not_write_file_0_Colon_1: r(5033, 1, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: r(5042, 1, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: r(5047, 1, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: r(5051, 1, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: r(5052, 1, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: r(5053, 1, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: r(5054, 1, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: r(5055, 1, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: r(5056, 1, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: r(5057, 1, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: r(5058, 1, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: r(5059, 1, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Pattern_0_can_have_at_most_one_Asterisk_character: r(5061, 1, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: r(5062, 1, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: r(5063, 1, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: r(5064, 1, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: r(5065, 1, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: r(5066, 1, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: r(5067, 1, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: r(5068, 1, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: r(5069, 1, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: r(5070, 1, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."), + Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd: r(5071, 1, "Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071", "Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."), + Unknown_build_option_0: r(5072, 1, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), + Build_option_0_requires_a_value_of_type_1: r(5073, 1, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), + Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: r(5074, 1, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), + _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: r(5075, 1, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), + _0_and_1_operations_cannot_be_mixed_without_parentheses: r(5076, 1, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: r(5077, 1, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), + Unknown_watch_option_0: r(5078, 1, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), + Unknown_watch_option_0_Did_you_mean_1: r(5079, 1, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), + Watch_option_0_requires_a_value_of_type_1: r(5080, 1, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), + Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: r(5081, 1, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), + _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: r(5082, 1, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), + Cannot_read_file_0: r(5083, 1, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), + A_tuple_member_cannot_be_both_optional_and_rest: r(5085, 1, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), + A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: r(5086, 1, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), + A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: r(5087, 1, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), + The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: r(5088, 1, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), + Option_0_cannot_be_specified_when_option_jsx_is_1: r(5089, 1, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), + Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: r(5090, 1, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), + Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: r(5091, 1, "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."), + The_root_value_of_a_0_file_must_be_an_object: r(5092, 1, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), + Compiler_option_0_may_only_be_used_with_build: r(5093, 1, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), + Compiler_option_0_may_not_be_used_with_build: r(5094, 1, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), + Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: r(5095, 1, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."), + Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: r(5096, 1, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), + An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: r(5097, 1, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), + Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: r(5098, 1, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: r(5101, 1, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: r(5102, 1, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), + Invalid_value_for_ignoreDeprecations: r(5103, 1, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), + Option_0_is_redundant_and_cannot_be_specified_with_option_1: r(5104, 1, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), + Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: r(5105, 1, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), + Use_0_instead: r(5106, 3, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: r(5107, 1, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: r(5108, 1, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: r(5109, 1, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: r(5110, 1, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: r(6e3, 3, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: r(6001, 3, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: r(6002, 3, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: r(6004, 3, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: r(6005, 3, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: r(6006, 3, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: r(6007, 3, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: r(6008, 3, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: r(6009, 3, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: r(6010, 3, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: r(6011, 3, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: r(6012, 3, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: r(6013, 3, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: r(6014, 3, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version: r(6015, 3, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), + Specify_module_code_generation: r(6016, 3, "Specify_module_code_generation_6016", "Specify module code generation."), + Print_this_message: r(6017, 3, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: r(6019, 3, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: r(6020, 3, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: r(6023, 3, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: r(6024, 3, "options_6024", "options"), + file: r(6025, 3, "file_6025", "file"), + Examples_Colon_0: r(6026, 3, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: r(6027, 3, "Options_Colon_6027", "Options:"), + Version_0: r(6029, 3, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: r(6030, 3, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: r(6031, 3, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: r(6032, 3, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: r(6034, 3, "KIND_6034", "KIND"), + FILE: r(6035, 3, "FILE_6035", "FILE"), + VERSION: r(6036, 3, "VERSION_6036", "VERSION"), + LOCATION: r(6037, 3, "LOCATION_6037", "LOCATION"), + DIRECTORY: r(6038, 3, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: r(6039, 3, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: r(6040, 3, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Errors_Files: r(6041, 3, "Errors_Files_6041", "Errors Files"), + Generates_corresponding_map_file: r(6043, 3, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: r(6044, 1, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: r(6045, 1, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: r(6046, 1, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: r(6048, 1, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unable_to_open_file_0: r(6050, 1, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: r(6051, 1, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: r(6052, 3, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: r(6053, 1, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: r(6054, 1, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: r(6055, 3, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: r(6056, 3, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: r(6058, 3, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: r(6059, 1, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: r(6060, 3, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: r(6061, 3, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: r(6064, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), + Enables_experimental_support_for_ES7_decorators: r(6065, 3, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: r(6066, 3, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: r(6070, 3, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: r(6071, 3, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: r(6072, 3, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: r(6073, 3, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: r(6074, 3, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: r(6075, 3, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: r(6076, 3, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: r(6077, 3, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: r(6078, 3, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: r(6079, 3, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation: r(6080, 3, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), + Only_amd_and_system_modules_are_supported_alongside_0: r(6082, 1, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: r(6083, 3, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: r(6084, 3, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: r(6085, 3, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: r(6086, 3, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: r(6087, 3, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: r(6088, 3, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: r(6089, 3, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: r(6090, 3, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: r(6091, 3, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: r(6092, 3, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: r(6093, 3, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: r(6094, 3, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: r(6095, 3, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), + File_0_does_not_exist: r(6096, 3, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exists_use_it_as_a_name_resolution_result: r(6097, 3, "File_0_exists_use_it_as_a_name_resolution_result_6097", "File '{0}' exists - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: r(6098, 3, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), + Found_package_json_at_0: r(6099, 3, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: r(6100, 3, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: r(6101, 3, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: r(6102, 3, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: r(6104, 3, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_1_got_2: r(6105, 3, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: r(6106, 3, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: r(6107, 3, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: r(6108, 3, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: r(6109, 3, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: r(6110, 3, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: r(6111, 3, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: r(6112, 3, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: r(6113, 3, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: r(6114, 1, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: r(6115, 3, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: r(6116, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: r(6119, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: r(6120, 3, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: r(6121, 3, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: r(6122, 3, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: r(6123, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: r(6124, 3, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: r(6125, 3, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: r(6126, 3, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: r(6127, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: r(6128, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: r(6130, 3, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: r(6131, 1, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: r(6132, 3, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: r(6133, 1, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", !0), + Report_errors_on_unused_locals: r(6134, 3, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: r(6135, 3, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: r(6136, 3, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: r(6137, 1, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: r(6138, 1, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", !0), + Import_emit_helpers_from_tslib: r(6139, 3, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: r(6140, 1, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: r(6141, 3, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), + Module_0_was_resolved_to_1_but_jsx_is_not_set: r(6142, 1, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: r(6144, 3, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: r(6146, 3, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: r(6147, 3, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: r(6148, 3, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: r(6149, 3, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: r(6150, 3, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: r(6151, 3, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: r(6152, 3, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: r(6153, 3, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: r(6154, 3, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: r(6155, 3, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: r(6156, 3, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: r(6157, 3, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: r(6158, 3, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: r(6159, 3, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: r(6160, 3, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: r(6161, 3, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: r(6162, 3, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: r(6163, 3, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1: r(6164, 3, "Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164", "Skipping module '{0}' that looks like an absolute URI, target file types: {1}."), + Do_not_truncate_error_messages: r(6165, 3, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: r(6166, 3, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: r(6167, 3, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: r(6168, 3, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: r(6169, 3, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: r(6170, 3, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: r(6171, 3, "Command_line_Options_6171", "Command-line Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5: r(6179, 3, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."), + Enable_all_strict_type_checking_options: r(6180, 3, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + Scoped_package_detected_looking_in_0: r(6182, 3, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: r(6183, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: r(6184, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Enable_strict_checking_of_function_types: r(6186, 3, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: r(6187, 3, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: r(6188, 1, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: r(6189, 1, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: r(6191, 3, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: r(6192, 1, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", !0), + Found_1_error_Watching_for_file_changes: r(6193, 3, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: r(6194, 3, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: r(6195, 3, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: r(6196, 1, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", !0), + Include_modules_imported_with_json_extension: r(6197, 3, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: r(6198, 1, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", !0), + All_variables_are_unused: r(6199, 1, "All_variables_are_unused_6199", "All variables are unused.", !0), + Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: r(6200, 1, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), + Conflicts_are_in_this_file: r(6201, 3, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: r(6202, 1, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + _0_was_also_declared_here: r(6203, 3, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), + and_here: r(6204, 3, "and_here_6204", "and here."), + All_type_parameters_are_unused: r(6205, 1, "All_type_parameters_are_unused_6205", "All type parameters are unused."), + package_json_has_a_typesVersions_field_with_version_specific_path_mappings: r(6206, 3, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), + package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: r(6207, 3, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), + package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: r(6208, 3, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), + package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: r(6209, 3, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), + An_argument_for_0_was_not_provided: r(6210, 3, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), + An_argument_matching_this_binding_pattern_was_not_provided: r(6211, 3, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), + Did_you_mean_to_call_this_expression: r(6212, 3, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), + Did_you_mean_to_use_new_with_this_expression: r(6213, 3, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), + Enable_strict_bind_call_and_apply_methods_on_functions: r(6214, 3, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), + Using_compiler_options_of_project_reference_redirect_0: r(6215, 3, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), + Found_1_error: r(6216, 3, "Found_1_error_6216", "Found 1 error."), + Found_0_errors: r(6217, 3, "Found_0_errors_6217", "Found {0} errors."), + Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: r(6218, 3, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: r(6219, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), + package_json_had_a_falsy_0_field: r(6220, 3, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), + Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: r(6221, 3, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), + Emit_class_fields_with_Define_instead_of_Set: r(6222, 3, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), + Generates_a_CPU_profile: r(6223, 3, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), + Disable_solution_searching_for_this_project: r(6224, 3, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), + Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: r(6225, 3, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), + Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: r(6226, 3, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), + Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: r(6227, 3, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: r(6229, 1, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: r(6230, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), + Could_not_resolve_the_path_0_with_the_extensions_Colon_1: r(6231, 1, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), + Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: r(6232, 1, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), + This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: r(6233, 1, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), + This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: r(6234, 1, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), + Disable_loading_referenced_projects: r(6235, 3, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), + Arguments_for_the_rest_parameter_0_were_not_provided: r(6236, 1, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), + Generates_an_event_trace_and_a_list_of_types: r(6237, 3, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), + Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: r(6238, 1, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), + File_0_exists_according_to_earlier_cached_lookups: r(6239, 3, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), + File_0_does_not_exist_according_to_earlier_cached_lookups: r(6240, 3, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), + Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: r(6241, 3, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), + Resolving_type_reference_directive_0_containing_file_1: r(6242, 3, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), + Interpret_optional_property_types_as_written_rather_than_adding_undefined: r(6243, 3, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), + Modules: r(6244, 3, "Modules_6244", "Modules"), + File_Management: r(6245, 3, "File_Management_6245", "File Management"), + Emit: r(6246, 3, "Emit_6246", "Emit"), + JavaScript_Support: r(6247, 3, "JavaScript_Support_6247", "JavaScript Support"), + Type_Checking: r(6248, 3, "Type_Checking_6248", "Type Checking"), + Editor_Support: r(6249, 3, "Editor_Support_6249", "Editor Support"), + Watch_and_Build_Modes: r(6250, 3, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), + Compiler_Diagnostics: r(6251, 3, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), + Interop_Constraints: r(6252, 3, "Interop_Constraints_6252", "Interop Constraints"), + Backwards_Compatibility: r(6253, 3, "Backwards_Compatibility_6253", "Backwards Compatibility"), + Language_and_Environment: r(6254, 3, "Language_and_Environment_6254", "Language and Environment"), + Projects: r(6255, 3, "Projects_6255", "Projects"), + Output_Formatting: r(6256, 3, "Output_Formatting_6256", "Output Formatting"), + Completeness: r(6257, 3, "Completeness_6257", "Completeness"), + _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: r(6258, 1, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), + Found_1_error_in_0: r(6259, 3, "Found_1_error_in_0_6259", "Found 1 error in {0}"), + Found_0_errors_in_the_same_file_starting_at_Colon_1: r(6260, 3, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), + Found_0_errors_in_1_files: r(6261, 3, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), + File_name_0_has_a_1_extension_looking_up_2_instead: r(6262, 3, "File_name_0_has_a_1_extension_looking_up_2_instead_6262", "File name '{0}' has a '{1}' extension - looking up '{2}' instead."), + Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set: r(6263, 1, "Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263", "Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."), + Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present: r(6264, 3, "Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264", "Enable importing files with any extension, provided a declaration file is present."), + Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder: r(6265, 3, "Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265", "Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."), + Option_0_can_only_be_specified_on_command_line: r(6266, 1, "Option_0_can_only_be_specified_on_command_line_6266", "Option '{0}' can only be specified on command line."), + Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: r(6270, 3, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), + Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: r(6271, 3, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), + Invalid_import_specifier_0_has_no_possible_resolutions: r(6272, 3, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), + package_json_scope_0_has_no_imports_defined: r(6273, 3, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), + package_json_scope_0_explicitly_maps_specifier_1_to_null: r(6274, 3, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), + package_json_scope_0_has_invalid_type_for_target_of_specifier_1: r(6275, 3, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), + Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: r(6276, 3, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), + Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: r(6277, 3, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: r(6278, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`), + Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: r(6279, 3, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: r(6280, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."), + package_json_has_a_peerDependencies_field: r(6281, 3, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."), + Found_peerDependency_0_with_1_version: r(6282, 3, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."), + Failed_to_find_peerDependency_0: r(6283, 3, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."), + File_Layout: r(6284, 3, "File_Layout_6284", "File Layout"), + Environment_Settings: r(6285, 3, "Environment_Settings_6285", "Environment Settings"), + See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule: r(6286, 3, "See_also_https_Colon_Slash_Slashaka_ms_Slashtsconfig_Slashmodule_6286", "See also https://aka.ms/tsconfig/module"), + For_nodejs_Colon: r(6287, 3, "For_nodejs_Colon_6287", "For nodejs:"), + and_npm_install_D_types_Slashnode: r(6290, 3, "and_npm_install_D_types_Slashnode_6290", "and npm install -D @types/node"), + Other_Outputs: r(6291, 3, "Other_Outputs_6291", "Other Outputs"), + Stricter_Typechecking_Options: r(6292, 3, "Stricter_Typechecking_Options_6292", "Stricter Typechecking Options"), + Style_Options: r(6293, 3, "Style_Options_6293", "Style Options"), + Recommended_Options: r(6294, 3, "Recommended_Options_6294", "Recommended Options"), + Enable_project_compilation: r(6302, 3, "Enable_project_compilation_6302", "Enable project compilation"), + Composite_projects_may_not_disable_declaration_emit: r(6304, 1, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: r(6305, 1, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: r(6306, 1, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", `Referenced project '{0}' must have setting "composite": true.`), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: r(6307, 1, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), + Referenced_project_0_may_not_disable_emit: r(6310, 1, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), + Project_0_is_out_of_date_because_output_1_is_older_than_input_2: r(6350, 3, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: r(6351, 3, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: r(6352, 3, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: r(6353, 3, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: r(6354, 3, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: r(6355, 3, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: r(6356, 3, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: r(6357, 3, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: r(6358, 3, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: r(6359, 3, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + Project_0_is_up_to_date: r(6361, 3, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: r(6362, 3, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: r(6363, 3, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: r(6364, 3, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: r(6365, 3, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), + Show_what_would_be_built_or_deleted_if_specified_with_clean: r(6367, 3, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Option_build_must_be_the_first_command_line_argument: r(6369, 1, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: r(6370, 1, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Updating_unchanged_output_timestamps_of_project_0: r(6371, 3, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), + A_non_dry_build_would_update_timestamps_for_output_of_project_0: r(6374, 3, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), + Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: r(6377, 1, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), + Composite_projects_may_not_disable_incremental_compilation: r(6379, 1, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), + Specify_file_to_store_incremental_compilation_information: r(6380, 3, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), + Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: r(6381, 3, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), + Skipping_build_of_project_0_because_its_dependency_1_was_not_built: r(6382, 3, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), + Project_0_can_t_be_built_because_its_dependency_1_was_not_built: r(6383, 3, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), + Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: r(6384, 3, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), + _0_is_deprecated: r(6385, 2, "_0_is_deprecated_6385", "'{0}' is deprecated.", void 0, void 0, !0), + Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: r(6386, 3, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), + The_signature_0_of_1_is_deprecated: r(6387, 2, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", void 0, void 0, !0), + Project_0_is_being_forcibly_rebuilt: r(6388, 3, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: r(6389, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: r(6390, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: r(6391, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: r(6392, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: r(6393, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: r(6394, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: r(6395, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: r(6396, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: r(6397, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: r(6398, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: r(6399, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), + Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: r(6400, 3, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), + Project_0_is_out_of_date_because_there_was_error_reading_file_1: r(6401, 3, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), + Resolving_in_0_mode_with_conditions_1: r(6402, 3, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), + Matched_0_condition_1: r(6403, 3, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), + Using_0_subpath_1_with_target_2: r(6404, 3, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), + Saw_non_matching_condition_0: r(6405, 3, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: r(6406, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), + Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set: r(6407, 3, "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407", "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."), + Use_the_package_json_exports_field_when_resolving_package_imports: r(6408, 3, "Use_the_package_json_exports_field_when_resolving_package_imports_6408", "Use the package.json 'exports' field when resolving package imports."), + Use_the_package_json_imports_field_when_resolving_imports: r(6409, 3, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."), + Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: r(6410, 3, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."), + true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: r(6411, 3, "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: r(6412, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."), + Entering_conditional_exports: r(6413, 3, "Entering_conditional_exports_6413", "Entering conditional exports."), + Resolved_under_condition_0: r(6414, 3, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), + Failed_to_resolve_under_condition_0: r(6415, 3, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), + Exiting_conditional_exports: r(6416, 3, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: r(6417, 3, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: r(6418, 3, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors: r(6419, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419", "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."), + Project_0_is_out_of_date_because_1: r(6420, 3, "Project_0_is_out_of_date_because_1_6420", "Project '{0}' is out of date because {1}."), + Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files: r(6421, 3, "Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421", "Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."), + The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: r(6500, 3, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), + The_expected_type_comes_from_this_index_signature: r(6501, 3, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), + The_expected_type_comes_from_the_return_type_of_this_signature: r(6502, 3, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: r(6503, 3, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: r(6504, 1, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), + Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: r(6505, 3, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), + Consider_adding_a_declare_modifier_to_this_class: r(6506, 3, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these_files: r(6600, 3, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJs_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files."), + Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: r(6601, 3, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), + Allow_accessing_UMD_globals_from_modules: r(6602, 3, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), + Disable_error_reporting_for_unreachable_code: r(6603, 3, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), + Disable_error_reporting_for_unused_labels: r(6604, 3, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), + Ensure_use_strict_is_always_emitted: r(6605, 3, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), + Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: r(6606, 3, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), + Specify_the_base_directory_to_resolve_non_relative_module_names: r(6607, 3, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), + No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: r(6608, 3, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), + Enable_error_reporting_in_type_checked_JavaScript_files: r(6609, 3, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), + Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: r(6611, 3, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), + Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: r(6612, 3, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), + Specify_the_output_directory_for_generated_declaration_files: r(6613, 3, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), + Create_sourcemaps_for_d_ts_files: r(6614, 3, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), + Output_compiler_performance_information_after_building: r(6615, 3, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), + Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: r(6616, 3, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), + Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: r(6617, 3, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), + Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: r(6618, 3, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), + Opt_a_project_out_of_multi_project_reference_checking_when_editing: r(6619, 3, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), + Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: r(6620, 3, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), + Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: r(6621, 3, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: r(6622, 3, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Only_output_d_ts_files_and_not_JavaScript_files: r(6623, 3, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), + Emit_design_type_metadata_for_decorated_declarations_in_source_files: r(6624, 3, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), + Disable_the_type_acquisition_for_JavaScript_projects: r(6625, 3, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), + Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: r(6626, 3, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), + Filters_results_from_the_include_option: r(6627, 3, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), + Remove_a_list_of_directories_from_the_watch_process: r(6628, 3, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), + Remove_a_list_of_files_from_the_watch_mode_s_processing: r(6629, 3, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), + Enable_experimental_support_for_legacy_experimental_decorators: r(6630, 3, "Enable_experimental_support_for_legacy_experimental_decorators_6630", "Enable experimental support for legacy experimental decorators."), + Print_files_read_during_the_compilation_including_why_it_was_included: r(6631, 3, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), + Output_more_detailed_compiler_performance_information_after_building: r(6632, 3, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), + Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: r(6633, 3, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), + Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: r(6634, 3, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), + Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: r(6635, 3, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), + Build_all_projects_including_those_that_appear_to_be_up_to_date: r(6636, 3, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), + Ensure_that_casing_is_correct_in_imports: r(6637, 3, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), + Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: r(6638, 3, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), + Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: r(6639, 3, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Skip_building_downstream_projects_on_error_in_upstream_project: r(6640, 3, "Skip_building_downstream_projects_on_error_in_upstream_project_6640", "Skip building downstream projects on error in upstream project."), + Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: r(6641, 3, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), + Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: r(6642, 3, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), + Include_sourcemap_files_inside_the_emitted_JavaScript: r(6643, 3, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), + Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: r(6644, 3, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), + Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: r(6645, 3, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), + Specify_what_JSX_code_is_generated: r(6646, 3, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), + Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: r(6647, 3, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), + Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: r(6648, 3, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), + Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: r(6649, 3, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), + Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: r(6650, 3, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), + Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: r(6651, 3, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), + Print_the_names_of_emitted_files_after_a_compilation: r(6652, 3, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), + Print_all_of_the_files_read_during_the_compilation: r(6653, 3, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), + Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: r(6654, 3, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: r(6655, 3, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: r(6656, 3, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), + Specify_what_module_code_is_generated: r(6657, 3, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), + Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: r(6658, 3, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), + Set_the_newline_character_for_emitting_files: r(6659, 3, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), + Disable_emitting_files_from_a_compilation: r(6660, 3, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), + Disable_generating_custom_helper_functions_like_extends_in_compiled_output: r(6661, 3, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), + Disable_emitting_files_if_any_type_checking_errors_are_reported: r(6662, 3, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), + Disable_truncating_types_in_error_messages: r(6663, 3, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), + Enable_error_reporting_for_fallthrough_cases_in_switch_statements: r(6664, 3, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), + Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: r(6665, 3, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), + Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: r(6666, 3, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), + Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: r(6667, 3, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), + Enable_error_reporting_when_this_is_given_the_type_any: r(6668, 3, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), + Disable_adding_use_strict_directives_in_emitted_JavaScript_files: r(6669, 3, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), + Disable_including_any_library_files_including_the_default_lib_d_ts: r(6670, 3, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), + Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: r(6671, 3, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), + Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: r(6672, 3, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), + Disable_strict_checking_of_generic_signatures_in_function_types: r(6673, 3, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), + Add_undefined_to_a_type_when_accessed_using_an_index: r(6674, 3, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), + Enable_error_reporting_when_local_variables_aren_t_read: r(6675, 3, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), + Raise_an_error_when_a_function_parameter_isn_t_read: r(6676, 3, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), + Deprecated_setting_Use_outFile_instead: r(6677, 3, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), + Specify_an_output_folder_for_all_emitted_files: r(6678, 3, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), + Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: r(6679, 3, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), + Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: r(6680, 3, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), + Specify_a_list_of_language_service_plugins_to_include: r(6681, 3, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), + Disable_erasing_const_enum_declarations_in_generated_code: r(6682, 3, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), + Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: r(6683, 3, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), + Disable_wiping_the_console_in_watch_mode: r(6684, 3, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), + Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: r(6685, 3, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), + Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: r(6686, 3, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), + Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: r(6687, 3, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), + Disable_emitting_comments: r(6688, 3, "Disable_emitting_comments_6688", "Disable emitting comments."), + Enable_importing_json_files: r(6689, 3, "Enable_importing_json_files_6689", "Enable importing .json files."), + Specify_the_root_folder_within_your_source_files: r(6690, 3, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), + Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: r(6691, 3, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), + Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: r(6692, 3, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), + Skip_type_checking_all_d_ts_files: r(6693, 3, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), + Create_source_map_files_for_emitted_JavaScript_files: r(6694, 3, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), + Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: r(6695, 3, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), + Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: r(6697, 3, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), + When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: r(6698, 3, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), + When_type_checking_take_into_account_null_and_undefined: r(6699, 3, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), + Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: r(6700, 3, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), + Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: r(6701, 3, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), + Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: r(6702, 3, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), + Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: r(6703, 3, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), + Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: r(6704, 3, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), + Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: r(6705, 3, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), + Log_paths_used_during_the_moduleResolution_process: r(6706, 3, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), + Specify_the_path_to_tsbuildinfo_incremental_compilation_file: r(6707, 3, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), + Specify_options_for_automatic_acquisition_of_declaration_files: r(6709, 3, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), + Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: r(6710, 3, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), + Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: r(6711, 3, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), + Emit_ECMAScript_standard_compliant_class_fields: r(6712, 3, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), + Enable_verbose_logging: r(6713, 3, "Enable_verbose_logging_6713", "Enable verbose logging."), + Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: r(6714, 3, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), + Specify_how_the_TypeScript_watch_mode_works: r(6715, 3, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), + Require_undeclared_properties_from_index_signatures_to_use_element_accesses: r(6717, 3, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), + Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: r(6718, 3, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), + Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: r(6719, 3, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."), + Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any: r(6720, 3, "Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720", "Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."), + Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript: r(6721, 3, "Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721", "Do not allow runtime constructs that are not part of ECMAScript."), + Default_catch_clause_variables_as_unknown_instead_of_any: r(6803, 3, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), + Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: r(6804, 3, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."), + Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: r(6805, 3, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."), + Check_side_effect_imports: r(6806, 3, "Check_side_effect_imports_6806", "Check side effect imports."), + This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: r(6807, 1, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."), + Enable_lib_replacement: r(6808, 3, "Enable_lib_replacement_6808", "Enable lib replacement."), + one_of_Colon: r(6900, 3, "one_of_Colon_6900", "one of:"), + one_or_more_Colon: r(6901, 3, "one_or_more_Colon_6901", "one or more:"), + type_Colon: r(6902, 3, "type_Colon_6902", "type:"), + default_Colon: r(6903, 3, "default_Colon_6903", "default:"), + module_system_or_esModuleInterop: r(6904, 3, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"), + false_unless_strict_is_set: r(6905, 3, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), + false_unless_composite_is_set: r(6906, 3, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), + node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: r(6907, 3, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."), + if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: r(6908, 3, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"), + true_if_composite_false_otherwise: r(6909, 3, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), + module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: r(69010, 3, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), + Computed_from_the_list_of_input_files: r(6911, 3, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), + Platform_specific: r(6912, 3, "Platform_specific_6912", "Platform specific"), + You_can_learn_about_all_of_the_compiler_options_at_0: r(6913, 3, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), + Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: r(6914, 3, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), + Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: r(6915, 3, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), + COMMON_COMMANDS: r(6916, 3, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), + ALL_COMPILER_OPTIONS: r(6917, 3, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), + WATCH_OPTIONS: r(6918, 3, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), + BUILD_OPTIONS: r(6919, 3, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), + COMMON_COMPILER_OPTIONS: r(6920, 3, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), + COMMAND_LINE_FLAGS: r(6921, 3, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), + tsc_Colon_The_TypeScript_Compiler: r(6922, 3, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), + Compiles_the_current_project_tsconfig_json_in_the_working_directory: r(6923, 3, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), + Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: r(6924, 3, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), + Build_a_composite_project_in_the_working_directory: r(6925, 3, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), + Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: r(6926, 3, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), + Compiles_the_TypeScript_project_located_at_the_specified_path: r(6927, 3, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), + An_expanded_version_of_this_information_showing_all_possible_compiler_options: r(6928, 3, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), + Compiles_the_current_project_with_additional_settings: r(6929, 3, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), + true_for_ES2022_and_above_including_ESNext: r(6930, 3, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), + List_of_file_name_suffixes_to_search_when_resolving_a_module: r(6931, 1, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), + Variable_0_implicitly_has_an_1_type: r(7005, 1, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: r(7006, 1, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: r(7008, 1, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: r(7009, 1, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: r(7010, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: r(7011, 1, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: r(7012, 1, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: r(7013, 1, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: r(7014, 1, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: r(7015, 1, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: r(7016, 1, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: r(7017, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: r(7018, 1, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: r(7019, 1, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: r(7020, 1, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: r(7022, 1, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: r(7023, 1, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: r(7024, 1, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation: r(7025, 1, "Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025", "Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: r(7026, 1, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: r(7027, 1, "Unreachable_code_detected_7027", "Unreachable code detected.", !0), + Unused_label: r(7028, 1, "Unused_label_7028", "Unused label.", !0), + Fallthrough_case_in_switch: r(7029, 1, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: r(7030, 1, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: r(7031, 1, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: r(7032, 1, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: r(7033, 1, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: r(7034, 1, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: r(7035, 1, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: r(7036, 1, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: r(7037, 3, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: r(7038, 3, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), + Mapped_object_type_implicitly_has_an_any_template_type: r(7039, 1, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: r(7040, 1, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), + The_containing_arrow_function_captures_the_global_value_of_this: r(7041, 1, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), + Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: r(7042, 1, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), + Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: r(7043, 2, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: r(7044, 2, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: r(7045, 2, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: r(7046, 2, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), + Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: r(7047, 2, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: r(7048, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: r(7049, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), + _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: r(7050, 2, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), + Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: r(7051, 1, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: r(7052, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), + Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: r(7053, 1, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), + No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: r(7054, 1, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: r(7055, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), + The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: r(7056, 1, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), + yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: r(7057, 1, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), + If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: r(7058, 1, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: r(7059, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: r(7060, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), + A_mapped_type_may_not_declare_properties_or_methods: r(7061, 1, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), + You_cannot_rename_this_element: r(8e3, 1, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: r(8001, 1, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_TypeScript_files: r(8002, 1, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), + export_can_only_be_used_in_TypeScript_files: r(8003, 1, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), + Type_parameter_declarations_can_only_be_used_in_TypeScript_files: r(8004, 1, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), + implements_clauses_can_only_be_used_in_TypeScript_files: r(8005, 1, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), + _0_declarations_can_only_be_used_in_TypeScript_files: r(8006, 1, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), + Type_aliases_can_only_be_used_in_TypeScript_files: r(8008, 1, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), + The_0_modifier_can_only_be_used_in_TypeScript_files: r(8009, 1, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), + Type_annotations_can_only_be_used_in_TypeScript_files: r(8010, 1, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), + Type_arguments_can_only_be_used_in_TypeScript_files: r(8011, 1, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), + Parameter_modifiers_can_only_be_used_in_TypeScript_files: r(8012, 1, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), + Non_null_assertions_can_only_be_used_in_TypeScript_files: r(8013, 1, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), + Type_assertion_expressions_can_only_be_used_in_TypeScript_files: r(8016, 1, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: r(8017, 1, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), + Report_errors_in_js_files: r(8019, 3, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: r(8020, 1, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: r(8021, 1, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: r(8022, 1, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: r(8023, 1, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: r(8024, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: r(8025, 1, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: r(8026, 1, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: r(8027, 1, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: r(8028, 1, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: r(8029, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + The_type_of_a_function_declaration_must_match_the_function_s_signature: r(8030, 1, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), + You_cannot_rename_a_module_via_a_global_import: r(8031, 1, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), + Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: r(8032, 1, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), + A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: r(8033, 1, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), + The_tag_was_first_specified_here: r(8034, 1, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), + You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: r(8035, 1, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), + You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: r(8036, 1, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), + Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: r(8037, 1, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), + Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: r(8038, 1, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."), + A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag: r(8039, 1, "A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039", "A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"), + Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: r(9005, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: r(9006, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), + Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: r(9007, 1, "Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007", "Function must have an explicit return type annotation with --isolatedDeclarations."), + Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: r(9008, 1, "Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008", "Method must have an explicit return type annotation with --isolatedDeclarations."), + At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations: r(9009, 1, "At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009", "At least one accessor must have an explicit type annotation with --isolatedDeclarations."), + Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations: r(9010, 1, "Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010", "Variable must have an explicit type annotation with --isolatedDeclarations."), + Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations: r(9011, 1, "Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011", "Parameter must have an explicit type annotation with --isolatedDeclarations."), + Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations: r(9012, 1, "Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012", "Property must have an explicit type annotation with --isolatedDeclarations."), + Expression_type_can_t_be_inferred_with_isolatedDeclarations: r(9013, 1, "Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013", "Expression type can't be inferred with --isolatedDeclarations."), + Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations: r(9014, 1, "Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014", "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."), + Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations: r(9015, 1, "Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015", "Objects that contain spread assignments can't be inferred with --isolatedDeclarations."), + Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations: r(9016, 1, "Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016", "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."), + Only_const_arrays_can_be_inferred_with_isolatedDeclarations: r(9017, 1, "Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017", "Only const arrays can be inferred with --isolatedDeclarations."), + Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations: r(9018, 1, "Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018", "Arrays with spread elements can't inferred with --isolatedDeclarations."), + Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations: r(9019, 1, "Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019", "Binding elements can't be exported directly with --isolatedDeclarations."), + Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations: r(9020, 1, "Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020", "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."), + Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations: r(9021, 1, "Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021", "Extends clause can't contain an expression with --isolatedDeclarations."), + Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations: r(9022, 1, "Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022", "Inference from class expressions is not supported with --isolatedDeclarations."), + Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function: r(9023, 1, "Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023", "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."), + Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations: r(9025, 1, "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025", "Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."), + Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations: r(9026, 1, "Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026", "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."), + Add_a_type_annotation_to_the_variable_0: r(9027, 1, "Add_a_type_annotation_to_the_variable_0_9027", "Add a type annotation to the variable {0}."), + Add_a_type_annotation_to_the_parameter_0: r(9028, 1, "Add_a_type_annotation_to_the_parameter_0_9028", "Add a type annotation to the parameter {0}."), + Add_a_type_annotation_to_the_property_0: r(9029, 1, "Add_a_type_annotation_to_the_property_0_9029", "Add a type annotation to the property {0}."), + Add_a_return_type_to_the_function_expression: r(9030, 1, "Add_a_return_type_to_the_function_expression_9030", "Add a return type to the function expression."), + Add_a_return_type_to_the_function_declaration: r(9031, 1, "Add_a_return_type_to_the_function_declaration_9031", "Add a return type to the function declaration."), + Add_a_return_type_to_the_get_accessor_declaration: r(9032, 1, "Add_a_return_type_to_the_get_accessor_declaration_9032", "Add a return type to the get accessor declaration."), + Add_a_type_to_parameter_of_the_set_accessor_declaration: r(9033, 1, "Add_a_type_to_parameter_of_the_set_accessor_declaration_9033", "Add a type to parameter of the set accessor declaration."), + Add_a_return_type_to_the_method: r(9034, 1, "Add_a_return_type_to_the_method_9034", "Add a return type to the method"), + Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit: r(9035, 1, "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035", "Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."), + Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it: r(9036, 1, "Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036", "Move the expression in default export to a variable and add a type annotation to it."), + Default_exports_can_t_be_inferred_with_isolatedDeclarations: r(9037, 1, "Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037", "Default exports can't be inferred with --isolatedDeclarations."), + Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations: r(9038, 1, "Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038", "Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."), + Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations: r(9039, 1, "Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039", "Type containing private name '{0}' can't be used with --isolatedDeclarations."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: r(17e3, 1, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: r(17001, 1, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: r(17002, 1, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: r(17004, 1, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: r(17005, 1, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: r(17006, 1, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: r(17007, 1, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: r(17008, 1, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: r(17009, 1, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: r(17010, 1, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: r(17011, 1, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: r(17012, 1, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: r(17013, 1, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: r(17014, 1, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: r(17015, 1, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: r(17016, 1, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), + An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: r(17017, 1, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), + Unknown_type_acquisition_option_0_Did_you_mean_1: r(17018, 1, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), + _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: r(17019, 1, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: r(17020, 1, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: r(17021, 1, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), + Circularity_detected_while_resolving_configuration_Colon_0: r(18e3, 1, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + The_files_list_in_config_file_0_is_empty: r(18002, 1, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: r(18003, 1, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: r(80001, 2, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), + This_constructor_function_may_be_converted_to_a_class_declaration: r(80002, 2, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: r(80003, 2, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: r(80004, 2, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: r(80005, 2, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + This_may_be_converted_to_an_async_function: r(80006, 2, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: r(80007, 2, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), + Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: r(80008, 2, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), + JSDoc_typedef_may_be_converted_to_TypeScript_type: r(80009, 2, "JSDoc_typedef_may_be_converted_to_TypeScript_type_80009", "JSDoc typedef may be converted to TypeScript type."), + JSDoc_typedefs_may_be_converted_to_TypeScript_types: r(80010, 2, "JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010", "JSDoc typedefs may be converted to TypeScript types."), + Add_missing_super_call: r(90001, 3, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: r(90002, 3, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: r(90003, 3, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_unused_declaration_for_Colon_0: r(90004, 3, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), + Remove_import_from_0: r(90005, 3, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: r(90006, 3, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: r(90007, 3, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: r(90008, 3, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_variable_statement: r(90010, 3, "Remove_variable_statement_90010", "Remove variable statement"), + Remove_template_tag: r(90011, 3, "Remove_template_tag_90011", "Remove template tag"), + Remove_type_parameters: r(90012, 3, "Remove_type_parameters_90012", "Remove type parameters"), + Import_0_from_1: r(90013, 3, "Import_0_from_1_90013", `Import '{0}' from "{1}"`), + Change_0_to_1: r(90014, 3, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Declare_property_0: r(90016, 3, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: r(90017, 3, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: r(90018, 3, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: r(90019, 3, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: r(90020, 3, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: r(90021, 3, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: r(90022, 3, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: r(90023, 3, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: r(90024, 3, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: r(90025, 3, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: r(90026, 3, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: r(90027, 3, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: r(90028, 3, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: r(90029, 3, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Replace_infer_0_with_unknown: r(90030, 3, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), + Replace_all_unused_infer_with_unknown: r(90031, 3, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), + Add_parameter_name: r(90034, 3, "Add_parameter_name_90034", "Add parameter name"), + Declare_private_property_0: r(90035, 3, "Declare_private_property_0_90035", "Declare private property '{0}'"), + Replace_0_with_Promise_1: r(90036, 3, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), + Fix_all_incorrect_return_type_of_an_async_functions: r(90037, 3, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), + Declare_private_method_0: r(90038, 3, "Declare_private_method_0_90038", "Declare private method '{0}'"), + Remove_unused_destructuring_declaration: r(90039, 3, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), + Remove_unused_declarations_for_Colon_0: r(90041, 3, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), + Declare_a_private_field_named_0: r(90053, 3, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), + Includes_imports_of_types_referenced_by_0: r(90054, 3, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), + Remove_type_from_import_declaration_from_0: r(90055, 3, "Remove_type_from_import_declaration_from_0_90055", `Remove 'type' from import declaration from "{0}"`), + Remove_type_from_import_of_0_from_1: r(90056, 3, "Remove_type_from_import_of_0_from_1_90056", `Remove 'type' from import of '{0}' from "{1}"`), + Add_import_from_0: r(90057, 3, "Add_import_from_0_90057", "Add import from \"{0}\""), + Update_import_from_0: r(90058, 3, "Update_import_from_0_90058", "Update import from \"{0}\""), + Export_0_from_module_1: r(90059, 3, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), + Export_all_referenced_locals: r(90060, 3, "Export_all_referenced_locals_90060", "Export all referenced locals"), + Update_modifiers_of_0: r(90061, 3, "Update_modifiers_of_0_90061", "Update modifiers of '{0}'"), + Add_annotation_of_type_0: r(90062, 3, "Add_annotation_of_type_0_90062", "Add annotation of type '{0}'"), + Add_return_type_0: r(90063, 3, "Add_return_type_0_90063", "Add return type '{0}'"), + Extract_base_class_to_variable: r(90064, 3, "Extract_base_class_to_variable_90064", "Extract base class to variable"), + Extract_default_export_to_variable: r(90065, 3, "Extract_default_export_to_variable_90065", "Extract default export to variable"), + Extract_binding_expressions_to_variable: r(90066, 3, "Extract_binding_expressions_to_variable_90066", "Extract binding expressions to variable"), + Add_all_missing_type_annotations: r(90067, 3, "Add_all_missing_type_annotations_90067", "Add all missing type annotations"), + Add_satisfies_and_an_inline_type_assertion_with_0: r(90068, 3, "Add_satisfies_and_an_inline_type_assertion_with_0_90068", "Add satisfies and an inline type assertion with '{0}'"), + Extract_to_variable_and_replace_with_0_as_typeof_0: r(90069, 3, "Extract_to_variable_and_replace_with_0_as_typeof_0_90069", "Extract to variable and replace with '{0} as typeof {0}'"), + Mark_array_literal_as_const: r(90070, 3, "Mark_array_literal_as_const_90070", "Mark array literal as const"), + Annotate_types_of_properties_expando_function_in_a_namespace: r(90071, 3, "Annotate_types_of_properties_expando_function_in_a_namespace_90071", "Annotate types of properties expando function in a namespace"), + Convert_function_to_an_ES2015_class: r(95001, 3, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_0_to_1_in_0: r(95003, 3, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), + Extract_to_0_in_1: r(95004, 3, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: r(95005, 3, "Extract_function_95005", "Extract function"), + Extract_constant: r(95006, 3, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: r(95007, 3, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: r(95008, 3, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: r(95009, 3, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Infer_type_of_0_from_usage: r(95011, 3, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: r(95012, 3, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: r(95013, 3, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: r(95014, 3, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: r(95015, 3, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: r(95016, 3, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES_module: r(95017, 3, "Convert_to_ES_module_95017", "Convert to ES module"), + Add_undefined_type_to_property_0: r(95018, 3, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: r(95019, 3, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: r(95020, 3, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Convert_all_type_literals_to_mapped_type: r(95021, 3, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), + Add_all_missing_members: r(95022, 3, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: r(95023, 3, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: r(95024, 3, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: r(95025, 3, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: r(95026, 3, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: r(95027, 3, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: r(95028, 3, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: r(95029, 3, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: r(95030, 3, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: r(95031, 3, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: r(95032, 3, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: r(95033, 3, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: r(95034, 3, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: r(95035, 3, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: r(95036, 3, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: r(95037, 3, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: r(95038, 3, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: r(95039, 3, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: r(95040, 3, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: r(95041, 3, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: r(95042, 3, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: r(95043, 3, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: r(95044, 3, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: r(95045, 3, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: r(95046, 3, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: r(95047, 3, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: r(95048, 3, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: r(95049, 3, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: r(95050, 3, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: r(95051, 3, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: r(95052, 3, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: r(95053, 3, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: r(95054, 3, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: r(95055, 3, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: r(95056, 3, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: r(95057, 3, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + Add_or_remove_braces_in_an_arrow_function: r(95058, 3, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), + Add_braces_to_arrow_function: r(95059, 3, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), + Remove_braces_from_arrow_function: r(95060, 3, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), + Convert_default_export_to_named_export: r(95061, 3, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), + Convert_named_export_to_default_export: r(95062, 3, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), + Add_missing_enum_member_0: r(95063, 3, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), + Add_all_missing_imports: r(95064, 3, "Add_all_missing_imports_95064", "Add all missing imports"), + Convert_to_async_function: r(95065, 3, "Convert_to_async_function_95065", "Convert to async function"), + Convert_all_to_async_functions: r(95066, 3, "Convert_all_to_async_functions_95066", "Convert all to async functions"), + Add_missing_call_parentheses: r(95067, 3, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), + Add_all_missing_call_parentheses: r(95068, 3, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), + Add_unknown_conversion_for_non_overlapping_types: r(95069, 3, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), + Add_unknown_to_all_conversions_of_non_overlapping_types: r(95070, 3, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), + Add_missing_new_operator_to_call: r(95071, 3, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), + Add_missing_new_operator_to_all_calls: r(95072, 3, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), + Add_names_to_all_parameters_without_names: r(95073, 3, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), + Enable_the_experimentalDecorators_option_in_your_configuration_file: r(95074, 3, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), + Convert_parameters_to_destructured_object: r(95075, 3, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), + Extract_type: r(95077, 3, "Extract_type_95077", "Extract type"), + Extract_to_type_alias: r(95078, 3, "Extract_to_type_alias_95078", "Extract to type alias"), + Extract_to_typedef: r(95079, 3, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: r(95080, 3, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: r(95081, 3, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: r(95082, 3, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: r(95083, 3, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: r(95084, 3, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: r(95085, 3, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: r(95086, 3, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: r(95087, 3, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), + Enable_the_jsx_flag_in_your_configuration_file: r(95088, 3, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), + Add_await_to_initializers: r(95089, 3, "Add_await_to_initializers_95089", "Add 'await' to initializers"), + Extract_to_interface: r(95090, 3, "Extract_to_interface_95090", "Extract to interface"), + Convert_to_a_bigint_numeric_literal: r(95091, 3, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), + Convert_all_to_bigint_numeric_literals: r(95092, 3, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), + Convert_const_to_let: r(95093, 3, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), + Prefix_with_declare: r(95094, 3, "Prefix_with_declare_95094", "Prefix with 'declare'"), + Prefix_all_incorrect_property_declarations_with_declare: r(95095, 3, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), + Convert_to_template_string: r(95096, 3, "Convert_to_template_string_95096", "Convert to template string"), + Add_export_to_make_this_file_into_a_module: r(95097, 3, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), + Set_the_target_option_in_your_configuration_file_to_0: r(95098, 3, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), + Set_the_module_option_in_your_configuration_file_to_0: r(95099, 3, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: r(95100, 3, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Convert_all_invalid_characters_to_HTML_entity_code: r(95101, 3, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), + Convert_all_const_to_let: r(95102, 3, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), + Convert_function_expression_0_to_arrow_function: r(95105, 3, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), + Convert_function_declaration_0_to_arrow_function: r(95106, 3, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), + Fix_all_implicit_this_errors: r(95107, 3, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), + Wrap_invalid_character_in_an_expression_container: r(95108, 3, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), + Wrap_all_invalid_characters_in_an_expression_container: r(95109, 3, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), + Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: r(95110, 3, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), + Add_a_return_statement: r(95111, 3, "Add_a_return_statement_95111", "Add a return statement"), + Remove_braces_from_arrow_function_body: r(95112, 3, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), + Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: r(95113, 3, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), + Add_all_missing_return_statement: r(95114, 3, "Add_all_missing_return_statement_95114", "Add all missing return statement"), + Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: r(95115, 3, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), + Wrap_all_object_literal_with_parentheses: r(95116, 3, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), + Move_labeled_tuple_element_modifiers_to_labels: r(95117, 3, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), + Convert_overload_list_to_single_signature: r(95118, 3, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), + Generate_get_and_set_accessors_for_all_overriding_properties: r(95119, 3, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), + Wrap_in_JSX_fragment: r(95120, 3, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), + Wrap_all_unparented_JSX_in_JSX_fragment: r(95121, 3, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), + Convert_arrow_function_or_function_expression: r(95122, 3, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), + Convert_to_anonymous_function: r(95123, 3, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), + Convert_to_named_function: r(95124, 3, "Convert_to_named_function_95124", "Convert to named function"), + Convert_to_arrow_function: r(95125, 3, "Convert_to_arrow_function_95125", "Convert to arrow function"), + Remove_parentheses: r(95126, 3, "Remove_parentheses_95126", "Remove parentheses"), + Could_not_find_a_containing_arrow_function: r(95127, 3, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), + Containing_function_is_not_an_arrow_function: r(95128, 3, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), + Could_not_find_export_statement: r(95129, 3, "Could_not_find_export_statement_95129", "Could not find export statement"), + This_file_already_has_a_default_export: r(95130, 3, "This_file_already_has_a_default_export_95130", "This file already has a default export"), + Could_not_find_import_clause: r(95131, 3, "Could_not_find_import_clause_95131", "Could not find import clause"), + Could_not_find_namespace_import_or_named_imports: r(95132, 3, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), + Selection_is_not_a_valid_type_node: r(95133, 3, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), + No_type_could_be_extracted_from_this_type_node: r(95134, 3, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), + Could_not_find_property_for_which_to_generate_accessor: r(95135, 3, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), + Name_is_not_valid: r(95136, 3, "Name_is_not_valid_95136", "Name is not valid"), + Can_only_convert_property_with_modifier: r(95137, 3, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), + Switch_each_misused_0_to_1: r(95138, 3, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), + Convert_to_optional_chain_expression: r(95139, 3, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), + Could_not_find_convertible_access_expression: r(95140, 3, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), + Could_not_find_matching_access_expressions: r(95141, 3, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), + Can_only_convert_logical_AND_access_chains: r(95142, 3, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), + Add_void_to_Promise_resolved_without_a_value: r(95143, 3, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), + Add_void_to_all_Promises_resolved_without_a_value: r(95144, 3, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), + Use_element_access_for_0: r(95145, 3, "Use_element_access_for_0_95145", "Use element access for '{0}'"), + Use_element_access_for_all_undeclared_properties: r(95146, 3, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), + Delete_all_unused_imports: r(95147, 3, "Delete_all_unused_imports_95147", "Delete all unused imports"), + Infer_function_return_type: r(95148, 3, "Infer_function_return_type_95148", "Infer function return type"), + Return_type_must_be_inferred_from_a_function: r(95149, 3, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), + Could_not_determine_function_return_type: r(95150, 3, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), + Could_not_convert_to_arrow_function: r(95151, 3, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), + Could_not_convert_to_named_function: r(95152, 3, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), + Could_not_convert_to_anonymous_function: r(95153, 3, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), + Can_only_convert_string_concatenations_and_string_literals: r(95154, 3, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), + Selection_is_not_a_valid_statement_or_statements: r(95155, 3, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), + Add_missing_function_declaration_0: r(95156, 3, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), + Add_all_missing_function_declarations: r(95157, 3, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), + Method_not_implemented: r(95158, 3, "Method_not_implemented_95158", "Method not implemented."), + Function_not_implemented: r(95159, 3, "Function_not_implemented_95159", "Function not implemented."), + Add_override_modifier: r(95160, 3, "Add_override_modifier_95160", "Add 'override' modifier"), + Remove_override_modifier: r(95161, 3, "Remove_override_modifier_95161", "Remove 'override' modifier"), + Add_all_missing_override_modifiers: r(95162, 3, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), + Remove_all_unnecessary_override_modifiers: r(95163, 3, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), + Can_only_convert_named_export: r(95164, 3, "Can_only_convert_named_export_95164", "Can only convert named export"), + Add_missing_properties: r(95165, 3, "Add_missing_properties_95165", "Add missing properties"), + Add_all_missing_properties: r(95166, 3, "Add_all_missing_properties_95166", "Add all missing properties"), + Add_missing_attributes: r(95167, 3, "Add_missing_attributes_95167", "Add missing attributes"), + Add_all_missing_attributes: r(95168, 3, "Add_all_missing_attributes_95168", "Add all missing attributes"), + Add_undefined_to_optional_property_type: r(95169, 3, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), + Convert_named_imports_to_default_import: r(95170, 3, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), + Delete_unused_param_tag_0: r(95171, 3, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), + Delete_all_unused_param_tags: r(95172, 3, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), + Rename_param_tag_name_0_to_1: r(95173, 3, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), + Use_0: r(95174, 3, "Use_0_95174", "Use `{0}`."), + Use_Number_isNaN_in_all_conditions: r(95175, 3, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), + Convert_typedef_to_TypeScript_type: r(95176, 3, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."), + Convert_all_typedef_to_TypeScript_types: r(95177, 3, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), + Move_to_file: r(95178, 3, "Move_to_file_95178", "Move to file"), + Cannot_move_to_file_selected_file_is_invalid: r(95179, 3, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: r(95180, 3, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: r(95181, 3, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: r(95182, 3, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: r(95183, 3, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: r(95184, 3, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: r(95185, 3, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: r(95186, 3, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: r(95187, 3, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), + Add_missing_parameter_to_0: r(95188, 3, "Add_missing_parameter_to_0_95188", "Add missing parameter to '{0}'"), + Add_missing_parameters_to_0: r(95189, 3, "Add_missing_parameters_to_0_95189", "Add missing parameters to '{0}'"), + Add_all_missing_parameters: r(95190, 3, "Add_all_missing_parameters_95190", "Add all missing parameters"), + Add_optional_parameter_to_0: r(95191, 3, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"), + Add_optional_parameters_to_0: r(95192, 3, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"), + Add_all_optional_parameters: r(95193, 3, "Add_all_optional_parameters_95193", "Add all optional parameters"), + Wrap_in_parentheses: r(95194, 3, "Wrap_in_parentheses_95194", "Wrap in parentheses"), + Wrap_all_invalid_decorator_expressions_in_parentheses: r(95195, 3, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"), + Add_resolution_mode_import_attribute: r(95196, 3, "Add_resolution_mode_import_attribute_95196", "Add 'resolution-mode' import attribute"), + Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it: r(95197, 3, "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197", "Add 'resolution-mode' import attribute to all type-only imports that need it"), + No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: r(18004, 1, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), + Classes_may_not_have_a_field_named_constructor: r(18006, 1, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: r(18007, 1, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), + Private_identifiers_cannot_be_used_as_parameters: r(18009, 1, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), + An_accessibility_modifier_cannot_be_used_with_a_private_identifier: r(18010, 1, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), + The_operand_of_a_delete_operator_cannot_be_a_private_identifier: r(18011, 1, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), + constructor_is_a_reserved_word: r(18012, 1, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), + Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: r(18013, 1, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), + The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: r(18014, 1, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), + Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: r(18015, 1, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), + Private_identifiers_are_not_allowed_outside_class_bodies: r(18016, 1, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), + The_shadowing_declaration_of_0_is_defined_here: r(18017, 1, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), + The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: r(18018, 1, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), + _0_modifier_cannot_be_used_with_a_private_identifier: r(18019, 1, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), + An_enum_member_cannot_be_named_with_a_private_identifier: r(18024, 1, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), + can_only_be_used_at_the_start_of_a_file: r(18026, 1, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), + Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: r(18027, 1, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), + Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: r(18028, 1, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), + Private_identifiers_are_not_allowed_in_variable_declarations: r(18029, 1, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), + An_optional_chain_cannot_contain_private_identifiers: r(18030, 1, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), + The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: r(18031, 1, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), + The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: r(18032, 1, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), + Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: r(18033, 1, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), + Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: r(18034, 3, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), + Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: r(18035, 1, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), + Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: r(18036, 1, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), + await_expression_cannot_be_used_inside_a_class_static_block: r(18037, 1, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: r(18038, 1, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), + Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: r(18039, 1, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), + A_return_statement_cannot_be_used_inside_a_class_static_block: r(18041, 1, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), + _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: r(18042, 1, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), + Types_cannot_appear_in_export_declarations_in_JavaScript_files: r(18043, 1, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), + _0_is_automatically_exported_here: r(18044, 3, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), + Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: r(18045, 1, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), + _0_is_of_type_unknown: r(18046, 1, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), + _0_is_possibly_null: r(18047, 1, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), + _0_is_possibly_undefined: r(18048, 1, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), + _0_is_possibly_null_or_undefined: r(18049, 1, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), + The_value_0_cannot_be_used_here: r(18050, 1, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), + Compiler_option_0_cannot_be_given_an_empty_string: r(18051, 1, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), + Its_type_0_is_not_a_valid_JSX_element_type: r(18053, 1, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: r(18054, 1, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block."), + _0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled: r(18055, 1, "_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055", "'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."), + Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: r(18056, 1, "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."), + String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020: r(18057, 1, "String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057", "String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'."), + Default_imports_are_not_allowed_in_a_deferred_import: r(18058, 1, "Default_imports_are_not_allowed_in_a_deferred_import_18058", "Default imports are not allowed in a deferred import."), + Named_imports_are_not_allowed_in_a_deferred_import: r(18059, 1, "Named_imports_are_not_allowed_in_a_deferred_import_18059", "Named imports are not allowed in a deferred import."), + Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve: r(18060, 1, "Deferred_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_or_preserve_18060", "Deferred imports are only supported when the '--module' flag is set to 'esnext' or 'preserve'."), + _0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer: r(18061, 1, "_0_is_not_a_valid_meta_property_for_keyword_import_Did_you_mean_meta_or_defer_18061", "'{0}' is not a valid meta-property for keyword 'import'. Did you mean 'meta' or 'defer'?") + }; + tf = { + abstract: 128, + accessor: 129, + any: 133, + as: 130, + asserts: 131, + assert: 132, + bigint: 163, + boolean: 136, + break: 83, + case: 84, + catch: 85, + class: 86, + continue: 88, + const: 87, + constructor: 137, + debugger: 89, + declare: 138, + default: 90, + defer: 166, + delete: 91, + do: 92, + else: 93, + enum: 94, + export: 95, + extends: 96, + false: 97, + finally: 98, + for: 99, + from: 161, + function: 100, + get: 139, + if: 101, + implements: 119, + import: 102, + in: 103, + infer: 140, + instanceof: 104, + interface: 120, + intrinsic: 141, + is: 142, + keyof: 143, + let: 121, + module: 144, + namespace: 145, + never: 146, + new: 105, + null: 106, + number: 150, + object: 151, + package: 122, + private: 123, + protected: 124, + public: 125, + override: 164, + out: 147, + readonly: 148, + require: 149, + global: 162, + return: 107, + satisfies: 152, + set: 153, + static: 126, + string: 154, + super: 108, + switch: 109, + symbol: 155, + this: 110, + throw: 111, + true: 112, + try: 113, + type: 156, + typeof: 114, + undefined: 157, + unique: 158, + unknown: 159, + using: 160, + var: 115, + void: 116, + while: 117, + with: 118, + yield: 127, + async: 134, + await: 135, + of: 165 + }, Wy = new Map(Object.entries(tf)), Lm = new Map(Object.entries({ + ...tf, + "{": 19, + "}": 20, + "(": 21, + ")": 22, + "[": 23, + "]": 24, + ".": 25, + "...": 26, + ";": 27, + ",": 28, + "<": 30, + ">": 32, + "<=": 33, + ">=": 34, + "==": 35, + "!=": 36, + "===": 37, + "!==": 38, + "=>": 39, + "+": 40, + "-": 41, + "**": 43, + "*": 42, + "/": 44, + "%": 45, + "++": 46, + "--": 47, + "<<": 48, + ">": 49, + ">>>": 50, + "&": 51, + "|": 52, + "^": 53, + "!": 54, + "~": 55, + "&&": 56, + "||": 57, + "?": 58, + "??": 61, + "?.": 29, + ":": 59, + "=": 64, + "+=": 65, + "-=": 66, + "*=": 67, + "**=": 68, + "/=": 69, + "%=": 70, + "<<=": 71, + ">>=": 72, + ">>>=": 73, + "&=": 74, + "|=": 75, + "^=": 79, + "||=": 76, + "&&=": 77, + "??=": 78, + "@": 60, + "#": 63, + "`": 62 + })), Jm = /* @__PURE__ */ new Map([ + [100, 1], + [103, 2], + [105, 4], + [109, 8], + [115, 16], + [117, 32], + [118, 64], + [121, 128] + ]), Gy = /* @__PURE__ */ new Map([ + [1, $s.RegularExpressionFlagsHasIndices], + [16, $s.RegularExpressionFlagsDotAll], + [32, $s.RegularExpressionFlagsUnicode], + [64, $s.RegularExpressionFlagsUnicodeSets], + [128, $s.RegularExpressionFlagsSticky] + ]), Yy = [ + 170, + 170, + 181, + 181, + 186, + 186, + 192, + 214, + 216, + 246, + 248, + 705, + 710, + 721, + 736, + 740, + 748, + 748, + 750, + 750, + 880, + 884, + 886, + 887, + 890, + 893, + 902, + 902, + 904, + 906, + 908, + 908, + 910, + 929, + 931, + 1013, + 1015, + 1153, + 1162, + 1319, + 1329, + 1366, + 1369, + 1369, + 1377, + 1415, + 1488, + 1514, + 1520, + 1522, + 1568, + 1610, + 1646, + 1647, + 1649, + 1747, + 1749, + 1749, + 1765, + 1766, + 1774, + 1775, + 1786, + 1788, + 1791, + 1791, + 1808, + 1808, + 1810, + 1839, + 1869, + 1957, + 1969, + 1969, + 1994, + 2026, + 2036, + 2037, + 2042, + 2042, + 2048, + 2069, + 2074, + 2074, + 2084, + 2084, + 2088, + 2088, + 2112, + 2136, + 2208, + 2208, + 2210, + 2220, + 2308, + 2361, + 2365, + 2365, + 2384, + 2384, + 2392, + 2401, + 2417, + 2423, + 2425, + 2431, + 2437, + 2444, + 2447, + 2448, + 2451, + 2472, + 2474, + 2480, + 2482, + 2482, + 2486, + 2489, + 2493, + 2493, + 2510, + 2510, + 2524, + 2525, + 2527, + 2529, + 2544, + 2545, + 2565, + 2570, + 2575, + 2576, + 2579, + 2600, + 2602, + 2608, + 2610, + 2611, + 2613, + 2614, + 2616, + 2617, + 2649, + 2652, + 2654, + 2654, + 2674, + 2676, + 2693, + 2701, + 2703, + 2705, + 2707, + 2728, + 2730, + 2736, + 2738, + 2739, + 2741, + 2745, + 2749, + 2749, + 2768, + 2768, + 2784, + 2785, + 2821, + 2828, + 2831, + 2832, + 2835, + 2856, + 2858, + 2864, + 2866, + 2867, + 2869, + 2873, + 2877, + 2877, + 2908, + 2909, + 2911, + 2913, + 2929, + 2929, + 2947, + 2947, + 2949, + 2954, + 2958, + 2960, + 2962, + 2965, + 2969, + 2970, + 2972, + 2972, + 2974, + 2975, + 2979, + 2980, + 2984, + 2986, + 2990, + 3001, + 3024, + 3024, + 3077, + 3084, + 3086, + 3088, + 3090, + 3112, + 3114, + 3123, + 3125, + 3129, + 3133, + 3133, + 3160, + 3161, + 3168, + 3169, + 3205, + 3212, + 3214, + 3216, + 3218, + 3240, + 3242, + 3251, + 3253, + 3257, + 3261, + 3261, + 3294, + 3294, + 3296, + 3297, + 3313, + 3314, + 3333, + 3340, + 3342, + 3344, + 3346, + 3386, + 3389, + 3389, + 3406, + 3406, + 3424, + 3425, + 3450, + 3455, + 3461, + 3478, + 3482, + 3505, + 3507, + 3515, + 3517, + 3517, + 3520, + 3526, + 3585, + 3632, + 3634, + 3635, + 3648, + 3654, + 3713, + 3714, + 3716, + 3716, + 3719, + 3720, + 3722, + 3722, + 3725, + 3725, + 3732, + 3735, + 3737, + 3743, + 3745, + 3747, + 3749, + 3749, + 3751, + 3751, + 3754, + 3755, + 3757, + 3760, + 3762, + 3763, + 3773, + 3773, + 3776, + 3780, + 3782, + 3782, + 3804, + 3807, + 3840, + 3840, + 3904, + 3911, + 3913, + 3948, + 3976, + 3980, + 4096, + 4138, + 4159, + 4159, + 4176, + 4181, + 4186, + 4189, + 4193, + 4193, + 4197, + 4198, + 4206, + 4208, + 4213, + 4225, + 4238, + 4238, + 4256, + 4293, + 4295, + 4295, + 4301, + 4301, + 4304, + 4346, + 4348, + 4680, + 4682, + 4685, + 4688, + 4694, + 4696, + 4696, + 4698, + 4701, + 4704, + 4744, + 4746, + 4749, + 4752, + 4784, + 4786, + 4789, + 4792, + 4798, + 4800, + 4800, + 4802, + 4805, + 4808, + 4822, + 4824, + 4880, + 4882, + 4885, + 4888, + 4954, + 4992, + 5007, + 5024, + 5108, + 5121, + 5740, + 5743, + 5759, + 5761, + 5786, + 5792, + 5866, + 5870, + 5872, + 5888, + 5900, + 5902, + 5905, + 5920, + 5937, + 5952, + 5969, + 5984, + 5996, + 5998, + 6e3, + 6016, + 6067, + 6103, + 6103, + 6108, + 6108, + 6176, + 6263, + 6272, + 6312, + 6314, + 6314, + 6320, + 6389, + 6400, + 6428, + 6480, + 6509, + 6512, + 6516, + 6528, + 6571, + 6593, + 6599, + 6656, + 6678, + 6688, + 6740, + 6823, + 6823, + 6917, + 6963, + 6981, + 6987, + 7043, + 7072, + 7086, + 7087, + 7098, + 7141, + 7168, + 7203, + 7245, + 7247, + 7258, + 7293, + 7401, + 7404, + 7406, + 7409, + 7413, + 7414, + 7424, + 7615, + 7680, + 7957, + 7960, + 7965, + 7968, + 8005, + 8008, + 8013, + 8016, + 8023, + 8025, + 8025, + 8027, + 8027, + 8029, + 8029, + 8031, + 8061, + 8064, + 8116, + 8118, + 8124, + 8126, + 8126, + 8130, + 8132, + 8134, + 8140, + 8144, + 8147, + 8150, + 8155, + 8160, + 8172, + 8178, + 8180, + 8182, + 8188, + 8305, + 8305, + 8319, + 8319, + 8336, + 8348, + 8450, + 8450, + 8455, + 8455, + 8458, + 8467, + 8469, + 8469, + 8473, + 8477, + 8484, + 8484, + 8486, + 8486, + 8488, + 8488, + 8490, + 8493, + 8495, + 8505, + 8508, + 8511, + 8517, + 8521, + 8526, + 8526, + 8544, + 8584, + 11264, + 11310, + 11312, + 11358, + 11360, + 11492, + 11499, + 11502, + 11506, + 11507, + 11520, + 11557, + 11559, + 11559, + 11565, + 11565, + 11568, + 11623, + 11631, + 11631, + 11648, + 11670, + 11680, + 11686, + 11688, + 11694, + 11696, + 11702, + 11704, + 11710, + 11712, + 11718, + 11720, + 11726, + 11728, + 11734, + 11736, + 11742, + 11823, + 11823, + 12293, + 12295, + 12321, + 12329, + 12337, + 12341, + 12344, + 12348, + 12353, + 12438, + 12445, + 12447, + 12449, + 12538, + 12540, + 12543, + 12549, + 12589, + 12593, + 12686, + 12704, + 12730, + 12784, + 12799, + 13312, + 19893, + 19968, + 40908, + 40960, + 42124, + 42192, + 42237, + 42240, + 42508, + 42512, + 42527, + 42538, + 42539, + 42560, + 42606, + 42623, + 42647, + 42656, + 42735, + 42775, + 42783, + 42786, + 42888, + 42891, + 42894, + 42896, + 42899, + 42912, + 42922, + 43e3, + 43009, + 43011, + 43013, + 43015, + 43018, + 43020, + 43042, + 43072, + 43123, + 43138, + 43187, + 43250, + 43255, + 43259, + 43259, + 43274, + 43301, + 43312, + 43334, + 43360, + 43388, + 43396, + 43442, + 43471, + 43471, + 43520, + 43560, + 43584, + 43586, + 43588, + 43595, + 43616, + 43638, + 43642, + 43642, + 43648, + 43695, + 43697, + 43697, + 43701, + 43702, + 43705, + 43709, + 43712, + 43712, + 43714, + 43714, + 43739, + 43741, + 43744, + 43754, + 43762, + 43764, + 43777, + 43782, + 43785, + 43790, + 43793, + 43798, + 43808, + 43814, + 43816, + 43822, + 43968, + 44002, + 44032, + 55203, + 55216, + 55238, + 55243, + 55291, + 63744, + 64109, + 64112, + 64217, + 64256, + 64262, + 64275, + 64279, + 64285, + 64285, + 64287, + 64296, + 64298, + 64310, + 64312, + 64316, + 64318, + 64318, + 64320, + 64321, + 64323, + 64324, + 64326, + 64433, + 64467, + 64829, + 64848, + 64911, + 64914, + 64967, + 65008, + 65019, + 65136, + 65140, + 65142, + 65276, + 65313, + 65338, + 65345, + 65370, + 65382, + 65470, + 65474, + 65479, + 65482, + 65487, + 65490, + 65495, + 65498, + 65500 + ], Hy = [ + 170, + 170, + 181, + 181, + 186, + 186, + 192, + 214, + 216, + 246, + 248, + 705, + 710, + 721, + 736, + 740, + 748, + 748, + 750, + 750, + 768, + 884, + 886, + 887, + 890, + 893, + 902, + 902, + 904, + 906, + 908, + 908, + 910, + 929, + 931, + 1013, + 1015, + 1153, + 1155, + 1159, + 1162, + 1319, + 1329, + 1366, + 1369, + 1369, + 1377, + 1415, + 1425, + 1469, + 1471, + 1471, + 1473, + 1474, + 1476, + 1477, + 1479, + 1479, + 1488, + 1514, + 1520, + 1522, + 1552, + 1562, + 1568, + 1641, + 1646, + 1747, + 1749, + 1756, + 1759, + 1768, + 1770, + 1788, + 1791, + 1791, + 1808, + 1866, + 1869, + 1969, + 1984, + 2037, + 2042, + 2042, + 2048, + 2093, + 2112, + 2139, + 2208, + 2208, + 2210, + 2220, + 2276, + 2302, + 2304, + 2403, + 2406, + 2415, + 2417, + 2423, + 2425, + 2431, + 2433, + 2435, + 2437, + 2444, + 2447, + 2448, + 2451, + 2472, + 2474, + 2480, + 2482, + 2482, + 2486, + 2489, + 2492, + 2500, + 2503, + 2504, + 2507, + 2510, + 2519, + 2519, + 2524, + 2525, + 2527, + 2531, + 2534, + 2545, + 2561, + 2563, + 2565, + 2570, + 2575, + 2576, + 2579, + 2600, + 2602, + 2608, + 2610, + 2611, + 2613, + 2614, + 2616, + 2617, + 2620, + 2620, + 2622, + 2626, + 2631, + 2632, + 2635, + 2637, + 2641, + 2641, + 2649, + 2652, + 2654, + 2654, + 2662, + 2677, + 2689, + 2691, + 2693, + 2701, + 2703, + 2705, + 2707, + 2728, + 2730, + 2736, + 2738, + 2739, + 2741, + 2745, + 2748, + 2757, + 2759, + 2761, + 2763, + 2765, + 2768, + 2768, + 2784, + 2787, + 2790, + 2799, + 2817, + 2819, + 2821, + 2828, + 2831, + 2832, + 2835, + 2856, + 2858, + 2864, + 2866, + 2867, + 2869, + 2873, + 2876, + 2884, + 2887, + 2888, + 2891, + 2893, + 2902, + 2903, + 2908, + 2909, + 2911, + 2915, + 2918, + 2927, + 2929, + 2929, + 2946, + 2947, + 2949, + 2954, + 2958, + 2960, + 2962, + 2965, + 2969, + 2970, + 2972, + 2972, + 2974, + 2975, + 2979, + 2980, + 2984, + 2986, + 2990, + 3001, + 3006, + 3010, + 3014, + 3016, + 3018, + 3021, + 3024, + 3024, + 3031, + 3031, + 3046, + 3055, + 3073, + 3075, + 3077, + 3084, + 3086, + 3088, + 3090, + 3112, + 3114, + 3123, + 3125, + 3129, + 3133, + 3140, + 3142, + 3144, + 3146, + 3149, + 3157, + 3158, + 3160, + 3161, + 3168, + 3171, + 3174, + 3183, + 3202, + 3203, + 3205, + 3212, + 3214, + 3216, + 3218, + 3240, + 3242, + 3251, + 3253, + 3257, + 3260, + 3268, + 3270, + 3272, + 3274, + 3277, + 3285, + 3286, + 3294, + 3294, + 3296, + 3299, + 3302, + 3311, + 3313, + 3314, + 3330, + 3331, + 3333, + 3340, + 3342, + 3344, + 3346, + 3386, + 3389, + 3396, + 3398, + 3400, + 3402, + 3406, + 3415, + 3415, + 3424, + 3427, + 3430, + 3439, + 3450, + 3455, + 3458, + 3459, + 3461, + 3478, + 3482, + 3505, + 3507, + 3515, + 3517, + 3517, + 3520, + 3526, + 3530, + 3530, + 3535, + 3540, + 3542, + 3542, + 3544, + 3551, + 3570, + 3571, + 3585, + 3642, + 3648, + 3662, + 3664, + 3673, + 3713, + 3714, + 3716, + 3716, + 3719, + 3720, + 3722, + 3722, + 3725, + 3725, + 3732, + 3735, + 3737, + 3743, + 3745, + 3747, + 3749, + 3749, + 3751, + 3751, + 3754, + 3755, + 3757, + 3769, + 3771, + 3773, + 3776, + 3780, + 3782, + 3782, + 3784, + 3789, + 3792, + 3801, + 3804, + 3807, + 3840, + 3840, + 3864, + 3865, + 3872, + 3881, + 3893, + 3893, + 3895, + 3895, + 3897, + 3897, + 3902, + 3911, + 3913, + 3948, + 3953, + 3972, + 3974, + 3991, + 3993, + 4028, + 4038, + 4038, + 4096, + 4169, + 4176, + 4253, + 4256, + 4293, + 4295, + 4295, + 4301, + 4301, + 4304, + 4346, + 4348, + 4680, + 4682, + 4685, + 4688, + 4694, + 4696, + 4696, + 4698, + 4701, + 4704, + 4744, + 4746, + 4749, + 4752, + 4784, + 4786, + 4789, + 4792, + 4798, + 4800, + 4800, + 4802, + 4805, + 4808, + 4822, + 4824, + 4880, + 4882, + 4885, + 4888, + 4954, + 4957, + 4959, + 4992, + 5007, + 5024, + 5108, + 5121, + 5740, + 5743, + 5759, + 5761, + 5786, + 5792, + 5866, + 5870, + 5872, + 5888, + 5900, + 5902, + 5908, + 5920, + 5940, + 5952, + 5971, + 5984, + 5996, + 5998, + 6e3, + 6002, + 6003, + 6016, + 6099, + 6103, + 6103, + 6108, + 6109, + 6112, + 6121, + 6155, + 6157, + 6160, + 6169, + 6176, + 6263, + 6272, + 6314, + 6320, + 6389, + 6400, + 6428, + 6432, + 6443, + 6448, + 6459, + 6470, + 6509, + 6512, + 6516, + 6528, + 6571, + 6576, + 6601, + 6608, + 6617, + 6656, + 6683, + 6688, + 6750, + 6752, + 6780, + 6783, + 6793, + 6800, + 6809, + 6823, + 6823, + 6912, + 6987, + 6992, + 7001, + 7019, + 7027, + 7040, + 7155, + 7168, + 7223, + 7232, + 7241, + 7245, + 7293, + 7376, + 7378, + 7380, + 7414, + 7424, + 7654, + 7676, + 7957, + 7960, + 7965, + 7968, + 8005, + 8008, + 8013, + 8016, + 8023, + 8025, + 8025, + 8027, + 8027, + 8029, + 8029, + 8031, + 8061, + 8064, + 8116, + 8118, + 8124, + 8126, + 8126, + 8130, + 8132, + 8134, + 8140, + 8144, + 8147, + 8150, + 8155, + 8160, + 8172, + 8178, + 8180, + 8182, + 8188, + 8204, + 8205, + 8255, + 8256, + 8276, + 8276, + 8305, + 8305, + 8319, + 8319, + 8336, + 8348, + 8400, + 8412, + 8417, + 8417, + 8421, + 8432, + 8450, + 8450, + 8455, + 8455, + 8458, + 8467, + 8469, + 8469, + 8473, + 8477, + 8484, + 8484, + 8486, + 8486, + 8488, + 8488, + 8490, + 8493, + 8495, + 8505, + 8508, + 8511, + 8517, + 8521, + 8526, + 8526, + 8544, + 8584, + 11264, + 11310, + 11312, + 11358, + 11360, + 11492, + 11499, + 11507, + 11520, + 11557, + 11559, + 11559, + 11565, + 11565, + 11568, + 11623, + 11631, + 11631, + 11647, + 11670, + 11680, + 11686, + 11688, + 11694, + 11696, + 11702, + 11704, + 11710, + 11712, + 11718, + 11720, + 11726, + 11728, + 11734, + 11736, + 11742, + 11744, + 11775, + 11823, + 11823, + 12293, + 12295, + 12321, + 12335, + 12337, + 12341, + 12344, + 12348, + 12353, + 12438, + 12441, + 12442, + 12445, + 12447, + 12449, + 12538, + 12540, + 12543, + 12549, + 12589, + 12593, + 12686, + 12704, + 12730, + 12784, + 12799, + 13312, + 19893, + 19968, + 40908, + 40960, + 42124, + 42192, + 42237, + 42240, + 42508, + 42512, + 42539, + 42560, + 42607, + 42612, + 42621, + 42623, + 42647, + 42655, + 42737, + 42775, + 42783, + 42786, + 42888, + 42891, + 42894, + 42896, + 42899, + 42912, + 42922, + 43e3, + 43047, + 43072, + 43123, + 43136, + 43204, + 43216, + 43225, + 43232, + 43255, + 43259, + 43259, + 43264, + 43309, + 43312, + 43347, + 43360, + 43388, + 43392, + 43456, + 43471, + 43481, + 43520, + 43574, + 43584, + 43597, + 43600, + 43609, + 43616, + 43638, + 43642, + 43643, + 43648, + 43714, + 43739, + 43741, + 43744, + 43759, + 43762, + 43766, + 43777, + 43782, + 43785, + 43790, + 43793, + 43798, + 43808, + 43814, + 43816, + 43822, + 43968, + 44010, + 44012, + 44013, + 44016, + 44025, + 44032, + 55203, + 55216, + 55238, + 55243, + 55291, + 63744, + 64109, + 64112, + 64217, + 64256, + 64262, + 64275, + 64279, + 64285, + 64296, + 64298, + 64310, + 64312, + 64316, + 64318, + 64318, + 64320, + 64321, + 64323, + 64324, + 64326, + 64433, + 64467, + 64829, + 64848, + 64911, + 64914, + 64967, + 65008, + 65019, + 65024, + 65039, + 65056, + 65062, + 65075, + 65076, + 65101, + 65103, + 65136, + 65140, + 65142, + 65276, + 65296, + 65305, + 65313, + 65338, + 65343, + 65343, + 65345, + 65370, + 65382, + 65470, + 65474, + 65479, + 65482, + 65487, + 65490, + 65495, + 65498, + 65500 + ], Xy = [ + 65, + 90, + 97, + 122, + 170, + 170, + 181, + 181, + 186, + 186, + 192, + 214, + 216, + 246, + 248, + 705, + 710, + 721, + 736, + 740, + 748, + 748, + 750, + 750, + 880, + 884, + 886, + 887, + 890, + 893, + 895, + 895, + 902, + 902, + 904, + 906, + 908, + 908, + 910, + 929, + 931, + 1013, + 1015, + 1153, + 1162, + 1327, + 1329, + 1366, + 1369, + 1369, + 1376, + 1416, + 1488, + 1514, + 1519, + 1522, + 1568, + 1610, + 1646, + 1647, + 1649, + 1747, + 1749, + 1749, + 1765, + 1766, + 1774, + 1775, + 1786, + 1788, + 1791, + 1791, + 1808, + 1808, + 1810, + 1839, + 1869, + 1957, + 1969, + 1969, + 1994, + 2026, + 2036, + 2037, + 2042, + 2042, + 2048, + 2069, + 2074, + 2074, + 2084, + 2084, + 2088, + 2088, + 2112, + 2136, + 2144, + 2154, + 2160, + 2183, + 2185, + 2190, + 2208, + 2249, + 2308, + 2361, + 2365, + 2365, + 2384, + 2384, + 2392, + 2401, + 2417, + 2432, + 2437, + 2444, + 2447, + 2448, + 2451, + 2472, + 2474, + 2480, + 2482, + 2482, + 2486, + 2489, + 2493, + 2493, + 2510, + 2510, + 2524, + 2525, + 2527, + 2529, + 2544, + 2545, + 2556, + 2556, + 2565, + 2570, + 2575, + 2576, + 2579, + 2600, + 2602, + 2608, + 2610, + 2611, + 2613, + 2614, + 2616, + 2617, + 2649, + 2652, + 2654, + 2654, + 2674, + 2676, + 2693, + 2701, + 2703, + 2705, + 2707, + 2728, + 2730, + 2736, + 2738, + 2739, + 2741, + 2745, + 2749, + 2749, + 2768, + 2768, + 2784, + 2785, + 2809, + 2809, + 2821, + 2828, + 2831, + 2832, + 2835, + 2856, + 2858, + 2864, + 2866, + 2867, + 2869, + 2873, + 2877, + 2877, + 2908, + 2909, + 2911, + 2913, + 2929, + 2929, + 2947, + 2947, + 2949, + 2954, + 2958, + 2960, + 2962, + 2965, + 2969, + 2970, + 2972, + 2972, + 2974, + 2975, + 2979, + 2980, + 2984, + 2986, + 2990, + 3001, + 3024, + 3024, + 3077, + 3084, + 3086, + 3088, + 3090, + 3112, + 3114, + 3129, + 3133, + 3133, + 3160, + 3162, + 3165, + 3165, + 3168, + 3169, + 3200, + 3200, + 3205, + 3212, + 3214, + 3216, + 3218, + 3240, + 3242, + 3251, + 3253, + 3257, + 3261, + 3261, + 3293, + 3294, + 3296, + 3297, + 3313, + 3314, + 3332, + 3340, + 3342, + 3344, + 3346, + 3386, + 3389, + 3389, + 3406, + 3406, + 3412, + 3414, + 3423, + 3425, + 3450, + 3455, + 3461, + 3478, + 3482, + 3505, + 3507, + 3515, + 3517, + 3517, + 3520, + 3526, + 3585, + 3632, + 3634, + 3635, + 3648, + 3654, + 3713, + 3714, + 3716, + 3716, + 3718, + 3722, + 3724, + 3747, + 3749, + 3749, + 3751, + 3760, + 3762, + 3763, + 3773, + 3773, + 3776, + 3780, + 3782, + 3782, + 3804, + 3807, + 3840, + 3840, + 3904, + 3911, + 3913, + 3948, + 3976, + 3980, + 4096, + 4138, + 4159, + 4159, + 4176, + 4181, + 4186, + 4189, + 4193, + 4193, + 4197, + 4198, + 4206, + 4208, + 4213, + 4225, + 4238, + 4238, + 4256, + 4293, + 4295, + 4295, + 4301, + 4301, + 4304, + 4346, + 4348, + 4680, + 4682, + 4685, + 4688, + 4694, + 4696, + 4696, + 4698, + 4701, + 4704, + 4744, + 4746, + 4749, + 4752, + 4784, + 4786, + 4789, + 4792, + 4798, + 4800, + 4800, + 4802, + 4805, + 4808, + 4822, + 4824, + 4880, + 4882, + 4885, + 4888, + 4954, + 4992, + 5007, + 5024, + 5109, + 5112, + 5117, + 5121, + 5740, + 5743, + 5759, + 5761, + 5786, + 5792, + 5866, + 5870, + 5880, + 5888, + 5905, + 5919, + 5937, + 5952, + 5969, + 5984, + 5996, + 5998, + 6e3, + 6016, + 6067, + 6103, + 6103, + 6108, + 6108, + 6176, + 6264, + 6272, + 6312, + 6314, + 6314, + 6320, + 6389, + 6400, + 6430, + 6480, + 6509, + 6512, + 6516, + 6528, + 6571, + 6576, + 6601, + 6656, + 6678, + 6688, + 6740, + 6823, + 6823, + 6917, + 6963, + 6981, + 6988, + 7043, + 7072, + 7086, + 7087, + 7098, + 7141, + 7168, + 7203, + 7245, + 7247, + 7258, + 7293, + 7296, + 7304, + 7312, + 7354, + 7357, + 7359, + 7401, + 7404, + 7406, + 7411, + 7413, + 7414, + 7418, + 7418, + 7424, + 7615, + 7680, + 7957, + 7960, + 7965, + 7968, + 8005, + 8008, + 8013, + 8016, + 8023, + 8025, + 8025, + 8027, + 8027, + 8029, + 8029, + 8031, + 8061, + 8064, + 8116, + 8118, + 8124, + 8126, + 8126, + 8130, + 8132, + 8134, + 8140, + 8144, + 8147, + 8150, + 8155, + 8160, + 8172, + 8178, + 8180, + 8182, + 8188, + 8305, + 8305, + 8319, + 8319, + 8336, + 8348, + 8450, + 8450, + 8455, + 8455, + 8458, + 8467, + 8469, + 8469, + 8472, + 8477, + 8484, + 8484, + 8486, + 8486, + 8488, + 8488, + 8490, + 8505, + 8508, + 8511, + 8517, + 8521, + 8526, + 8526, + 8544, + 8584, + 11264, + 11492, + 11499, + 11502, + 11506, + 11507, + 11520, + 11557, + 11559, + 11559, + 11565, + 11565, + 11568, + 11623, + 11631, + 11631, + 11648, + 11670, + 11680, + 11686, + 11688, + 11694, + 11696, + 11702, + 11704, + 11710, + 11712, + 11718, + 11720, + 11726, + 11728, + 11734, + 11736, + 11742, + 12293, + 12295, + 12321, + 12329, + 12337, + 12341, + 12344, + 12348, + 12353, + 12438, + 12443, + 12447, + 12449, + 12538, + 12540, + 12543, + 12549, + 12591, + 12593, + 12686, + 12704, + 12735, + 12784, + 12799, + 13312, + 19903, + 19968, + 42124, + 42192, + 42237, + 42240, + 42508, + 42512, + 42527, + 42538, + 42539, + 42560, + 42606, + 42623, + 42653, + 42656, + 42735, + 42775, + 42783, + 42786, + 42888, + 42891, + 42954, + 42960, + 42961, + 42963, + 42963, + 42965, + 42969, + 42994, + 43009, + 43011, + 43013, + 43015, + 43018, + 43020, + 43042, + 43072, + 43123, + 43138, + 43187, + 43250, + 43255, + 43259, + 43259, + 43261, + 43262, + 43274, + 43301, + 43312, + 43334, + 43360, + 43388, + 43396, + 43442, + 43471, + 43471, + 43488, + 43492, + 43494, + 43503, + 43514, + 43518, + 43520, + 43560, + 43584, + 43586, + 43588, + 43595, + 43616, + 43638, + 43642, + 43642, + 43646, + 43695, + 43697, + 43697, + 43701, + 43702, + 43705, + 43709, + 43712, + 43712, + 43714, + 43714, + 43739, + 43741, + 43744, + 43754, + 43762, + 43764, + 43777, + 43782, + 43785, + 43790, + 43793, + 43798, + 43808, + 43814, + 43816, + 43822, + 43824, + 43866, + 43868, + 43881, + 43888, + 44002, + 44032, + 55203, + 55216, + 55238, + 55243, + 55291, + 63744, + 64109, + 64112, + 64217, + 64256, + 64262, + 64275, + 64279, + 64285, + 64285, + 64287, + 64296, + 64298, + 64310, + 64312, + 64316, + 64318, + 64318, + 64320, + 64321, + 64323, + 64324, + 64326, + 64433, + 64467, + 64829, + 64848, + 64911, + 64914, + 64967, + 65008, + 65019, + 65136, + 65140, + 65142, + 65276, + 65313, + 65338, + 65345, + 65370, + 65382, + 65470, + 65474, + 65479, + 65482, + 65487, + 65490, + 65495, + 65498, + 65500, + 65536, + 65547, + 65549, + 65574, + 65576, + 65594, + 65596, + 65597, + 65599, + 65613, + 65616, + 65629, + 65664, + 65786, + 65856, + 65908, + 66176, + 66204, + 66208, + 66256, + 66304, + 66335, + 66349, + 66378, + 66384, + 66421, + 66432, + 66461, + 66464, + 66499, + 66504, + 66511, + 66513, + 66517, + 66560, + 66717, + 66736, + 66771, + 66776, + 66811, + 66816, + 66855, + 66864, + 66915, + 66928, + 66938, + 66940, + 66954, + 66956, + 66962, + 66964, + 66965, + 66967, + 66977, + 66979, + 66993, + 66995, + 67001, + 67003, + 67004, + 67072, + 67382, + 67392, + 67413, + 67424, + 67431, + 67456, + 67461, + 67463, + 67504, + 67506, + 67514, + 67584, + 67589, + 67592, + 67592, + 67594, + 67637, + 67639, + 67640, + 67644, + 67644, + 67647, + 67669, + 67680, + 67702, + 67712, + 67742, + 67808, + 67826, + 67828, + 67829, + 67840, + 67861, + 67872, + 67897, + 67968, + 68023, + 68030, + 68031, + 68096, + 68096, + 68112, + 68115, + 68117, + 68119, + 68121, + 68149, + 68192, + 68220, + 68224, + 68252, + 68288, + 68295, + 68297, + 68324, + 68352, + 68405, + 68416, + 68437, + 68448, + 68466, + 68480, + 68497, + 68608, + 68680, + 68736, + 68786, + 68800, + 68850, + 68864, + 68899, + 69248, + 69289, + 69296, + 69297, + 69376, + 69404, + 69415, + 69415, + 69424, + 69445, + 69488, + 69505, + 69552, + 69572, + 69600, + 69622, + 69635, + 69687, + 69745, + 69746, + 69749, + 69749, + 69763, + 69807, + 69840, + 69864, + 69891, + 69926, + 69956, + 69956, + 69959, + 69959, + 69968, + 70002, + 70006, + 70006, + 70019, + 70066, + 70081, + 70084, + 70106, + 70106, + 70108, + 70108, + 70144, + 70161, + 70163, + 70187, + 70207, + 70208, + 70272, + 70278, + 70280, + 70280, + 70282, + 70285, + 70287, + 70301, + 70303, + 70312, + 70320, + 70366, + 70405, + 70412, + 70415, + 70416, + 70419, + 70440, + 70442, + 70448, + 70450, + 70451, + 70453, + 70457, + 70461, + 70461, + 70480, + 70480, + 70493, + 70497, + 70656, + 70708, + 70727, + 70730, + 70751, + 70753, + 70784, + 70831, + 70852, + 70853, + 70855, + 70855, + 71040, + 71086, + 71128, + 71131, + 71168, + 71215, + 71236, + 71236, + 71296, + 71338, + 71352, + 71352, + 71424, + 71450, + 71488, + 71494, + 71680, + 71723, + 71840, + 71903, + 71935, + 71942, + 71945, + 71945, + 71948, + 71955, + 71957, + 71958, + 71960, + 71983, + 71999, + 71999, + 72001, + 72001, + 72096, + 72103, + 72106, + 72144, + 72161, + 72161, + 72163, + 72163, + 72192, + 72192, + 72203, + 72242, + 72250, + 72250, + 72272, + 72272, + 72284, + 72329, + 72349, + 72349, + 72368, + 72440, + 72704, + 72712, + 72714, + 72750, + 72768, + 72768, + 72818, + 72847, + 72960, + 72966, + 72968, + 72969, + 72971, + 73008, + 73030, + 73030, + 73056, + 73061, + 73063, + 73064, + 73066, + 73097, + 73112, + 73112, + 73440, + 73458, + 73474, + 73474, + 73476, + 73488, + 73490, + 73523, + 73648, + 73648, + 73728, + 74649, + 74752, + 74862, + 74880, + 75075, + 77712, + 77808, + 77824, + 78895, + 78913, + 78918, + 82944, + 83526, + 92160, + 92728, + 92736, + 92766, + 92784, + 92862, + 92880, + 92909, + 92928, + 92975, + 92992, + 92995, + 93027, + 93047, + 93053, + 93071, + 93760, + 93823, + 93952, + 94026, + 94032, + 94032, + 94099, + 94111, + 94176, + 94177, + 94179, + 94179, + 94208, + 100343, + 100352, + 101589, + 101632, + 101640, + 110576, + 110579, + 110581, + 110587, + 110589, + 110590, + 110592, + 110882, + 110898, + 110898, + 110928, + 110930, + 110933, + 110933, + 110948, + 110951, + 110960, + 111355, + 113664, + 113770, + 113776, + 113788, + 113792, + 113800, + 113808, + 113817, + 119808, + 119892, + 119894, + 119964, + 119966, + 119967, + 119970, + 119970, + 119973, + 119974, + 119977, + 119980, + 119982, + 119993, + 119995, + 119995, + 119997, + 120003, + 120005, + 120069, + 120071, + 120074, + 120077, + 120084, + 120086, + 120092, + 120094, + 120121, + 120123, + 120126, + 120128, + 120132, + 120134, + 120134, + 120138, + 120144, + 120146, + 120485, + 120488, + 120512, + 120514, + 120538, + 120540, + 120570, + 120572, + 120596, + 120598, + 120628, + 120630, + 120654, + 120656, + 120686, + 120688, + 120712, + 120714, + 120744, + 120746, + 120770, + 120772, + 120779, + 122624, + 122654, + 122661, + 122666, + 122928, + 122989, + 123136, + 123180, + 123191, + 123197, + 123214, + 123214, + 123536, + 123565, + 123584, + 123627, + 124112, + 124139, + 124896, + 124902, + 124904, + 124907, + 124909, + 124910, + 124912, + 124926, + 124928, + 125124, + 125184, + 125251, + 125259, + 125259, + 126464, + 126467, + 126469, + 126495, + 126497, + 126498, + 126500, + 126500, + 126503, + 126503, + 126505, + 126514, + 126516, + 126519, + 126521, + 126521, + 126523, + 126523, + 126530, + 126530, + 126535, + 126535, + 126537, + 126537, + 126539, + 126539, + 126541, + 126543, + 126545, + 126546, + 126548, + 126548, + 126551, + 126551, + 126553, + 126553, + 126555, + 126555, + 126557, + 126557, + 126559, + 126559, + 126561, + 126562, + 126564, + 126564, + 126567, + 126570, + 126572, + 126578, + 126580, + 126583, + 126585, + 126588, + 126590, + 126590, + 126592, + 126601, + 126603, + 126619, + 126625, + 126627, + 126629, + 126633, + 126635, + 126651, + 131072, + 173791, + 173824, + 177977, + 177984, + 178205, + 178208, + 183969, + 183984, + 191456, + 191472, + 192093, + 194560, + 195101, + 196608, + 201546, + 201552, + 205743 + ], $y = [ + 48, + 57, + 65, + 90, + 95, + 95, + 97, + 122, + 170, + 170, + 181, + 181, + 183, + 183, + 186, + 186, + 192, + 214, + 216, + 246, + 248, + 705, + 710, + 721, + 736, + 740, + 748, + 748, + 750, + 750, + 768, + 884, + 886, + 887, + 890, + 893, + 895, + 895, + 902, + 906, + 908, + 908, + 910, + 929, + 931, + 1013, + 1015, + 1153, + 1155, + 1159, + 1162, + 1327, + 1329, + 1366, + 1369, + 1369, + 1376, + 1416, + 1425, + 1469, + 1471, + 1471, + 1473, + 1474, + 1476, + 1477, + 1479, + 1479, + 1488, + 1514, + 1519, + 1522, + 1552, + 1562, + 1568, + 1641, + 1646, + 1747, + 1749, + 1756, + 1759, + 1768, + 1770, + 1788, + 1791, + 1791, + 1808, + 1866, + 1869, + 1969, + 1984, + 2037, + 2042, + 2042, + 2045, + 2045, + 2048, + 2093, + 2112, + 2139, + 2144, + 2154, + 2160, + 2183, + 2185, + 2190, + 2200, + 2273, + 2275, + 2403, + 2406, + 2415, + 2417, + 2435, + 2437, + 2444, + 2447, + 2448, + 2451, + 2472, + 2474, + 2480, + 2482, + 2482, + 2486, + 2489, + 2492, + 2500, + 2503, + 2504, + 2507, + 2510, + 2519, + 2519, + 2524, + 2525, + 2527, + 2531, + 2534, + 2545, + 2556, + 2556, + 2558, + 2558, + 2561, + 2563, + 2565, + 2570, + 2575, + 2576, + 2579, + 2600, + 2602, + 2608, + 2610, + 2611, + 2613, + 2614, + 2616, + 2617, + 2620, + 2620, + 2622, + 2626, + 2631, + 2632, + 2635, + 2637, + 2641, + 2641, + 2649, + 2652, + 2654, + 2654, + 2662, + 2677, + 2689, + 2691, + 2693, + 2701, + 2703, + 2705, + 2707, + 2728, + 2730, + 2736, + 2738, + 2739, + 2741, + 2745, + 2748, + 2757, + 2759, + 2761, + 2763, + 2765, + 2768, + 2768, + 2784, + 2787, + 2790, + 2799, + 2809, + 2815, + 2817, + 2819, + 2821, + 2828, + 2831, + 2832, + 2835, + 2856, + 2858, + 2864, + 2866, + 2867, + 2869, + 2873, + 2876, + 2884, + 2887, + 2888, + 2891, + 2893, + 2901, + 2903, + 2908, + 2909, + 2911, + 2915, + 2918, + 2927, + 2929, + 2929, + 2946, + 2947, + 2949, + 2954, + 2958, + 2960, + 2962, + 2965, + 2969, + 2970, + 2972, + 2972, + 2974, + 2975, + 2979, + 2980, + 2984, + 2986, + 2990, + 3001, + 3006, + 3010, + 3014, + 3016, + 3018, + 3021, + 3024, + 3024, + 3031, + 3031, + 3046, + 3055, + 3072, + 3084, + 3086, + 3088, + 3090, + 3112, + 3114, + 3129, + 3132, + 3140, + 3142, + 3144, + 3146, + 3149, + 3157, + 3158, + 3160, + 3162, + 3165, + 3165, + 3168, + 3171, + 3174, + 3183, + 3200, + 3203, + 3205, + 3212, + 3214, + 3216, + 3218, + 3240, + 3242, + 3251, + 3253, + 3257, + 3260, + 3268, + 3270, + 3272, + 3274, + 3277, + 3285, + 3286, + 3293, + 3294, + 3296, + 3299, + 3302, + 3311, + 3313, + 3315, + 3328, + 3340, + 3342, + 3344, + 3346, + 3396, + 3398, + 3400, + 3402, + 3406, + 3412, + 3415, + 3423, + 3427, + 3430, + 3439, + 3450, + 3455, + 3457, + 3459, + 3461, + 3478, + 3482, + 3505, + 3507, + 3515, + 3517, + 3517, + 3520, + 3526, + 3530, + 3530, + 3535, + 3540, + 3542, + 3542, + 3544, + 3551, + 3558, + 3567, + 3570, + 3571, + 3585, + 3642, + 3648, + 3662, + 3664, + 3673, + 3713, + 3714, + 3716, + 3716, + 3718, + 3722, + 3724, + 3747, + 3749, + 3749, + 3751, + 3773, + 3776, + 3780, + 3782, + 3782, + 3784, + 3790, + 3792, + 3801, + 3804, + 3807, + 3840, + 3840, + 3864, + 3865, + 3872, + 3881, + 3893, + 3893, + 3895, + 3895, + 3897, + 3897, + 3902, + 3911, + 3913, + 3948, + 3953, + 3972, + 3974, + 3991, + 3993, + 4028, + 4038, + 4038, + 4096, + 4169, + 4176, + 4253, + 4256, + 4293, + 4295, + 4295, + 4301, + 4301, + 4304, + 4346, + 4348, + 4680, + 4682, + 4685, + 4688, + 4694, + 4696, + 4696, + 4698, + 4701, + 4704, + 4744, + 4746, + 4749, + 4752, + 4784, + 4786, + 4789, + 4792, + 4798, + 4800, + 4800, + 4802, + 4805, + 4808, + 4822, + 4824, + 4880, + 4882, + 4885, + 4888, + 4954, + 4957, + 4959, + 4969, + 4977, + 4992, + 5007, + 5024, + 5109, + 5112, + 5117, + 5121, + 5740, + 5743, + 5759, + 5761, + 5786, + 5792, + 5866, + 5870, + 5880, + 5888, + 5909, + 5919, + 5940, + 5952, + 5971, + 5984, + 5996, + 5998, + 6e3, + 6002, + 6003, + 6016, + 6099, + 6103, + 6103, + 6108, + 6109, + 6112, + 6121, + 6155, + 6157, + 6159, + 6169, + 6176, + 6264, + 6272, + 6314, + 6320, + 6389, + 6400, + 6430, + 6432, + 6443, + 6448, + 6459, + 6470, + 6509, + 6512, + 6516, + 6528, + 6571, + 6576, + 6601, + 6608, + 6618, + 6656, + 6683, + 6688, + 6750, + 6752, + 6780, + 6783, + 6793, + 6800, + 6809, + 6823, + 6823, + 6832, + 6845, + 6847, + 6862, + 6912, + 6988, + 6992, + 7001, + 7019, + 7027, + 7040, + 7155, + 7168, + 7223, + 7232, + 7241, + 7245, + 7293, + 7296, + 7304, + 7312, + 7354, + 7357, + 7359, + 7376, + 7378, + 7380, + 7418, + 7424, + 7957, + 7960, + 7965, + 7968, + 8005, + 8008, + 8013, + 8016, + 8023, + 8025, + 8025, + 8027, + 8027, + 8029, + 8029, + 8031, + 8061, + 8064, + 8116, + 8118, + 8124, + 8126, + 8126, + 8130, + 8132, + 8134, + 8140, + 8144, + 8147, + 8150, + 8155, + 8160, + 8172, + 8178, + 8180, + 8182, + 8188, + 8204, + 8205, + 8255, + 8256, + 8276, + 8276, + 8305, + 8305, + 8319, + 8319, + 8336, + 8348, + 8400, + 8412, + 8417, + 8417, + 8421, + 8432, + 8450, + 8450, + 8455, + 8455, + 8458, + 8467, + 8469, + 8469, + 8472, + 8477, + 8484, + 8484, + 8486, + 8486, + 8488, + 8488, + 8490, + 8505, + 8508, + 8511, + 8517, + 8521, + 8526, + 8526, + 8544, + 8584, + 11264, + 11492, + 11499, + 11507, + 11520, + 11557, + 11559, + 11559, + 11565, + 11565, + 11568, + 11623, + 11631, + 11631, + 11647, + 11670, + 11680, + 11686, + 11688, + 11694, + 11696, + 11702, + 11704, + 11710, + 11712, + 11718, + 11720, + 11726, + 11728, + 11734, + 11736, + 11742, + 11744, + 11775, + 12293, + 12295, + 12321, + 12335, + 12337, + 12341, + 12344, + 12348, + 12353, + 12438, + 12441, + 12447, + 12449, + 12543, + 12549, + 12591, + 12593, + 12686, + 12704, + 12735, + 12784, + 12799, + 13312, + 19903, + 19968, + 42124, + 42192, + 42237, + 42240, + 42508, + 42512, + 42539, + 42560, + 42607, + 42612, + 42621, + 42623, + 42737, + 42775, + 42783, + 42786, + 42888, + 42891, + 42954, + 42960, + 42961, + 42963, + 42963, + 42965, + 42969, + 42994, + 43047, + 43052, + 43052, + 43072, + 43123, + 43136, + 43205, + 43216, + 43225, + 43232, + 43255, + 43259, + 43259, + 43261, + 43309, + 43312, + 43347, + 43360, + 43388, + 43392, + 43456, + 43471, + 43481, + 43488, + 43518, + 43520, + 43574, + 43584, + 43597, + 43600, + 43609, + 43616, + 43638, + 43642, + 43714, + 43739, + 43741, + 43744, + 43759, + 43762, + 43766, + 43777, + 43782, + 43785, + 43790, + 43793, + 43798, + 43808, + 43814, + 43816, + 43822, + 43824, + 43866, + 43868, + 43881, + 43888, + 44010, + 44012, + 44013, + 44016, + 44025, + 44032, + 55203, + 55216, + 55238, + 55243, + 55291, + 63744, + 64109, + 64112, + 64217, + 64256, + 64262, + 64275, + 64279, + 64285, + 64296, + 64298, + 64310, + 64312, + 64316, + 64318, + 64318, + 64320, + 64321, + 64323, + 64324, + 64326, + 64433, + 64467, + 64829, + 64848, + 64911, + 64914, + 64967, + 65008, + 65019, + 65024, + 65039, + 65056, + 65071, + 65075, + 65076, + 65101, + 65103, + 65136, + 65140, + 65142, + 65276, + 65296, + 65305, + 65313, + 65338, + 65343, + 65343, + 65345, + 65370, + 65381, + 65470, + 65474, + 65479, + 65482, + 65487, + 65490, + 65495, + 65498, + 65500, + 65536, + 65547, + 65549, + 65574, + 65576, + 65594, + 65596, + 65597, + 65599, + 65613, + 65616, + 65629, + 65664, + 65786, + 65856, + 65908, + 66045, + 66045, + 66176, + 66204, + 66208, + 66256, + 66272, + 66272, + 66304, + 66335, + 66349, + 66378, + 66384, + 66426, + 66432, + 66461, + 66464, + 66499, + 66504, + 66511, + 66513, + 66517, + 66560, + 66717, + 66720, + 66729, + 66736, + 66771, + 66776, + 66811, + 66816, + 66855, + 66864, + 66915, + 66928, + 66938, + 66940, + 66954, + 66956, + 66962, + 66964, + 66965, + 66967, + 66977, + 66979, + 66993, + 66995, + 67001, + 67003, + 67004, + 67072, + 67382, + 67392, + 67413, + 67424, + 67431, + 67456, + 67461, + 67463, + 67504, + 67506, + 67514, + 67584, + 67589, + 67592, + 67592, + 67594, + 67637, + 67639, + 67640, + 67644, + 67644, + 67647, + 67669, + 67680, + 67702, + 67712, + 67742, + 67808, + 67826, + 67828, + 67829, + 67840, + 67861, + 67872, + 67897, + 67968, + 68023, + 68030, + 68031, + 68096, + 68099, + 68101, + 68102, + 68108, + 68115, + 68117, + 68119, + 68121, + 68149, + 68152, + 68154, + 68159, + 68159, + 68192, + 68220, + 68224, + 68252, + 68288, + 68295, + 68297, + 68326, + 68352, + 68405, + 68416, + 68437, + 68448, + 68466, + 68480, + 68497, + 68608, + 68680, + 68736, + 68786, + 68800, + 68850, + 68864, + 68903, + 68912, + 68921, + 69248, + 69289, + 69291, + 69292, + 69296, + 69297, + 69373, + 69404, + 69415, + 69415, + 69424, + 69456, + 69488, + 69509, + 69552, + 69572, + 69600, + 69622, + 69632, + 69702, + 69734, + 69749, + 69759, + 69818, + 69826, + 69826, + 69840, + 69864, + 69872, + 69881, + 69888, + 69940, + 69942, + 69951, + 69956, + 69959, + 69968, + 70003, + 70006, + 70006, + 70016, + 70084, + 70089, + 70092, + 70094, + 70106, + 70108, + 70108, + 70144, + 70161, + 70163, + 70199, + 70206, + 70209, + 70272, + 70278, + 70280, + 70280, + 70282, + 70285, + 70287, + 70301, + 70303, + 70312, + 70320, + 70378, + 70384, + 70393, + 70400, + 70403, + 70405, + 70412, + 70415, + 70416, + 70419, + 70440, + 70442, + 70448, + 70450, + 70451, + 70453, + 70457, + 70459, + 70468, + 70471, + 70472, + 70475, + 70477, + 70480, + 70480, + 70487, + 70487, + 70493, + 70499, + 70502, + 70508, + 70512, + 70516, + 70656, + 70730, + 70736, + 70745, + 70750, + 70753, + 70784, + 70853, + 70855, + 70855, + 70864, + 70873, + 71040, + 71093, + 71096, + 71104, + 71128, + 71133, + 71168, + 71232, + 71236, + 71236, + 71248, + 71257, + 71296, + 71352, + 71360, + 71369, + 71424, + 71450, + 71453, + 71467, + 71472, + 71481, + 71488, + 71494, + 71680, + 71738, + 71840, + 71913, + 71935, + 71942, + 71945, + 71945, + 71948, + 71955, + 71957, + 71958, + 71960, + 71989, + 71991, + 71992, + 71995, + 72003, + 72016, + 72025, + 72096, + 72103, + 72106, + 72151, + 72154, + 72161, + 72163, + 72164, + 72192, + 72254, + 72263, + 72263, + 72272, + 72345, + 72349, + 72349, + 72368, + 72440, + 72704, + 72712, + 72714, + 72758, + 72760, + 72768, + 72784, + 72793, + 72818, + 72847, + 72850, + 72871, + 72873, + 72886, + 72960, + 72966, + 72968, + 72969, + 72971, + 73014, + 73018, + 73018, + 73020, + 73021, + 73023, + 73031, + 73040, + 73049, + 73056, + 73061, + 73063, + 73064, + 73066, + 73102, + 73104, + 73105, + 73107, + 73112, + 73120, + 73129, + 73440, + 73462, + 73472, + 73488, + 73490, + 73530, + 73534, + 73538, + 73552, + 73561, + 73648, + 73648, + 73728, + 74649, + 74752, + 74862, + 74880, + 75075, + 77712, + 77808, + 77824, + 78895, + 78912, + 78933, + 82944, + 83526, + 92160, + 92728, + 92736, + 92766, + 92768, + 92777, + 92784, + 92862, + 92864, + 92873, + 92880, + 92909, + 92912, + 92916, + 92928, + 92982, + 92992, + 92995, + 93008, + 93017, + 93027, + 93047, + 93053, + 93071, + 93760, + 93823, + 93952, + 94026, + 94031, + 94087, + 94095, + 94111, + 94176, + 94177, + 94179, + 94180, + 94192, + 94193, + 94208, + 100343, + 100352, + 101589, + 101632, + 101640, + 110576, + 110579, + 110581, + 110587, + 110589, + 110590, + 110592, + 110882, + 110898, + 110898, + 110928, + 110930, + 110933, + 110933, + 110948, + 110951, + 110960, + 111355, + 113664, + 113770, + 113776, + 113788, + 113792, + 113800, + 113808, + 113817, + 113821, + 113822, + 118528, + 118573, + 118576, + 118598, + 119141, + 119145, + 119149, + 119154, + 119163, + 119170, + 119173, + 119179, + 119210, + 119213, + 119362, + 119364, + 119808, + 119892, + 119894, + 119964, + 119966, + 119967, + 119970, + 119970, + 119973, + 119974, + 119977, + 119980, + 119982, + 119993, + 119995, + 119995, + 119997, + 120003, + 120005, + 120069, + 120071, + 120074, + 120077, + 120084, + 120086, + 120092, + 120094, + 120121, + 120123, + 120126, + 120128, + 120132, + 120134, + 120134, + 120138, + 120144, + 120146, + 120485, + 120488, + 120512, + 120514, + 120538, + 120540, + 120570, + 120572, + 120596, + 120598, + 120628, + 120630, + 120654, + 120656, + 120686, + 120688, + 120712, + 120714, + 120744, + 120746, + 120770, + 120772, + 120779, + 120782, + 120831, + 121344, + 121398, + 121403, + 121452, + 121461, + 121461, + 121476, + 121476, + 121499, + 121503, + 121505, + 121519, + 122624, + 122654, + 122661, + 122666, + 122880, + 122886, + 122888, + 122904, + 122907, + 122913, + 122915, + 122916, + 122918, + 122922, + 122928, + 122989, + 123023, + 123023, + 123136, + 123180, + 123184, + 123197, + 123200, + 123209, + 123214, + 123214, + 123536, + 123566, + 123584, + 123641, + 124112, + 124153, + 124896, + 124902, + 124904, + 124907, + 124909, + 124910, + 124912, + 124926, + 124928, + 125124, + 125136, + 125142, + 125184, + 125259, + 125264, + 125273, + 126464, + 126467, + 126469, + 126495, + 126497, + 126498, + 126500, + 126500, + 126503, + 126503, + 126505, + 126514, + 126516, + 126519, + 126521, + 126521, + 126523, + 126523, + 126530, + 126530, + 126535, + 126535, + 126537, + 126537, + 126539, + 126539, + 126541, + 126543, + 126545, + 126546, + 126548, + 126548, + 126551, + 126551, + 126553, + 126553, + 126555, + 126555, + 126557, + 126557, + 126559, + 126559, + 126561, + 126562, + 126564, + 126564, + 126567, + 126570, + 126572, + 126578, + 126580, + 126583, + 126585, + 126588, + 126590, + 126590, + 126592, + 126601, + 126603, + 126619, + 126625, + 126627, + 126629, + 126633, + 126635, + 126651, + 130032, + 130041, + 131072, + 173791, + 173824, + 177977, + 177984, + 178205, + 178208, + 183969, + 183984, + 191456, + 191472, + 192093, + 194560, + 195101, + 196608, + 201546, + 201552, + 205743, + 917760, + 917999 + ], Qy = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/, Ky = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/, Zy = /@(?:see|link)/i; + ng = jm(Lm); + jm(Jm); + ul = 7; + rf = /^#!.*/; + ug = String.fromCodePoint ? (e) => String.fromCodePoint(e) : lg; + Ed = new Map(Object.entries({ + General_Category: "General_Category", + gc: "General_Category", + Script: "Script", + sc: "Script", + Script_Extensions: "Script_Extensions", + scx: "Script_Extensions" + })), Ad = /* @__PURE__ */ new Set([ + "ASCII", + "ASCII_Hex_Digit", + "AHex", + "Alphabetic", + "Alpha", + "Any", + "Assigned", + "Bidi_Control", + "Bidi_C", + "Bidi_Mirrored", + "Bidi_M", + "Case_Ignorable", + "CI", + "Cased", + "Changes_When_Casefolded", + "CWCF", + "Changes_When_Casemapped", + "CWCM", + "Changes_When_Lowercased", + "CWL", + "Changes_When_NFKC_Casefolded", + "CWKCF", + "Changes_When_Titlecased", + "CWT", + "Changes_When_Uppercased", + "CWU", + "Dash", + "Default_Ignorable_Code_Point", + "DI", + "Deprecated", + "Dep", + "Diacritic", + "Dia", + "Emoji", + "Emoji_Component", + "EComp", + "Emoji_Modifier", + "EMod", + "Emoji_Modifier_Base", + "EBase", + "Emoji_Presentation", + "EPres", + "Extended_Pictographic", + "ExtPict", + "Extender", + "Ext", + "Grapheme_Base", + "Gr_Base", + "Grapheme_Extend", + "Gr_Ext", + "Hex_Digit", + "Hex", + "IDS_Binary_Operator", + "IDSB", + "IDS_Trinary_Operator", + "IDST", + "ID_Continue", + "IDC", + "ID_Start", + "IDS", + "Ideographic", + "Ideo", + "Join_Control", + "Join_C", + "Logical_Order_Exception", + "LOE", + "Lowercase", + "Lower", + "Math", + "Noncharacter_Code_Point", + "NChar", + "Pattern_Syntax", + "Pat_Syn", + "Pattern_White_Space", + "Pat_WS", + "Quotation_Mark", + "QMark", + "Radical", + "Regional_Indicator", + "RI", + "Sentence_Terminal", + "STerm", + "Soft_Dotted", + "SD", + "Terminal_Punctuation", + "Term", + "Unified_Ideograph", + "UIdeo", + "Uppercase", + "Upper", + "Variation_Selector", + "VS", + "White_Space", + "space", + "XID_Continue", + "XIDC", + "XID_Start", + "XIDS" + ]), Cd = /* @__PURE__ */ new Set([ + "Basic_Emoji", + "Emoji_Keycap_Sequence", + "RGI_Emoji_Modifier_Sequence", + "RGI_Emoji_Flag_Sequence", + "RGI_Emoji_Tag_Sequence", + "RGI_Emoji_ZWJ_Sequence", + "RGI_Emoji" + ]), Ra = { + General_Category: /* @__PURE__ */ new Set([ + "C", + "Other", + "Cc", + "Control", + "cntrl", + "Cf", + "Format", + "Cn", + "Unassigned", + "Co", + "Private_Use", + "Cs", + "Surrogate", + "L", + "Letter", + "LC", + "Cased_Letter", + "Ll", + "Lowercase_Letter", + "Lm", + "Modifier_Letter", + "Lo", + "Other_Letter", + "Lt", + "Titlecase_Letter", + "Lu", + "Uppercase_Letter", + "M", + "Mark", + "Combining_Mark", + "Mc", + "Spacing_Mark", + "Me", + "Enclosing_Mark", + "Mn", + "Nonspacing_Mark", + "N", + "Number", + "Nd", + "Decimal_Number", + "digit", + "Nl", + "Letter_Number", + "No", + "Other_Number", + "P", + "Punctuation", + "punct", + "Pc", + "Connector_Punctuation", + "Pd", + "Dash_Punctuation", + "Pe", + "Close_Punctuation", + "Pf", + "Final_Punctuation", + "Pi", + "Initial_Punctuation", + "Po", + "Other_Punctuation", + "Ps", + "Open_Punctuation", + "S", + "Symbol", + "Sc", + "Currency_Symbol", + "Sk", + "Modifier_Symbol", + "Sm", + "Math_Symbol", + "So", + "Other_Symbol", + "Z", + "Separator", + "Zl", + "Line_Separator", + "Zp", + "Paragraph_Separator", + "Zs", + "Space_Separator" + ]), + Script: /* @__PURE__ */ new Set([ + "Adlm", + "Adlam", + "Aghb", + "Caucasian_Albanian", + "Ahom", + "Arab", + "Arabic", + "Armi", + "Imperial_Aramaic", + "Armn", + "Armenian", + "Avst", + "Avestan", + "Bali", + "Balinese", + "Bamu", + "Bamum", + "Bass", + "Bassa_Vah", + "Batk", + "Batak", + "Beng", + "Bengali", + "Bhks", + "Bhaiksuki", + "Bopo", + "Bopomofo", + "Brah", + "Brahmi", + "Brai", + "Braille", + "Bugi", + "Buginese", + "Buhd", + "Buhid", + "Cakm", + "Chakma", + "Cans", + "Canadian_Aboriginal", + "Cari", + "Carian", + "Cham", + "Cher", + "Cherokee", + "Chrs", + "Chorasmian", + "Copt", + "Coptic", + "Qaac", + "Cpmn", + "Cypro_Minoan", + "Cprt", + "Cypriot", + "Cyrl", + "Cyrillic", + "Deva", + "Devanagari", + "Diak", + "Dives_Akuru", + "Dogr", + "Dogra", + "Dsrt", + "Deseret", + "Dupl", + "Duployan", + "Egyp", + "Egyptian_Hieroglyphs", + "Elba", + "Elbasan", + "Elym", + "Elymaic", + "Ethi", + "Ethiopic", + "Geor", + "Georgian", + "Glag", + "Glagolitic", + "Gong", + "Gunjala_Gondi", + "Gonm", + "Masaram_Gondi", + "Goth", + "Gothic", + "Gran", + "Grantha", + "Grek", + "Greek", + "Gujr", + "Gujarati", + "Guru", + "Gurmukhi", + "Hang", + "Hangul", + "Hani", + "Han", + "Hano", + "Hanunoo", + "Hatr", + "Hatran", + "Hebr", + "Hebrew", + "Hira", + "Hiragana", + "Hluw", + "Anatolian_Hieroglyphs", + "Hmng", + "Pahawh_Hmong", + "Hmnp", + "Nyiakeng_Puachue_Hmong", + "Hrkt", + "Katakana_Or_Hiragana", + "Hung", + "Old_Hungarian", + "Ital", + "Old_Italic", + "Java", + "Javanese", + "Kali", + "Kayah_Li", + "Kana", + "Katakana", + "Kawi", + "Khar", + "Kharoshthi", + "Khmr", + "Khmer", + "Khoj", + "Khojki", + "Kits", + "Khitan_Small_Script", + "Knda", + "Kannada", + "Kthi", + "Kaithi", + "Lana", + "Tai_Tham", + "Laoo", + "Lao", + "Latn", + "Latin", + "Lepc", + "Lepcha", + "Limb", + "Limbu", + "Lina", + "Linear_A", + "Linb", + "Linear_B", + "Lisu", + "Lyci", + "Lycian", + "Lydi", + "Lydian", + "Mahj", + "Mahajani", + "Maka", + "Makasar", + "Mand", + "Mandaic", + "Mani", + "Manichaean", + "Marc", + "Marchen", + "Medf", + "Medefaidrin", + "Mend", + "Mende_Kikakui", + "Merc", + "Meroitic_Cursive", + "Mero", + "Meroitic_Hieroglyphs", + "Mlym", + "Malayalam", + "Modi", + "Mong", + "Mongolian", + "Mroo", + "Mro", + "Mtei", + "Meetei_Mayek", + "Mult", + "Multani", + "Mymr", + "Myanmar", + "Nagm", + "Nag_Mundari", + "Nand", + "Nandinagari", + "Narb", + "Old_North_Arabian", + "Nbat", + "Nabataean", + "Newa", + "Nkoo", + "Nko", + "Nshu", + "Nushu", + "Ogam", + "Ogham", + "Olck", + "Ol_Chiki", + "Orkh", + "Old_Turkic", + "Orya", + "Oriya", + "Osge", + "Osage", + "Osma", + "Osmanya", + "Ougr", + "Old_Uyghur", + "Palm", + "Palmyrene", + "Pauc", + "Pau_Cin_Hau", + "Perm", + "Old_Permic", + "Phag", + "Phags_Pa", + "Phli", + "Inscriptional_Pahlavi", + "Phlp", + "Psalter_Pahlavi", + "Phnx", + "Phoenician", + "Plrd", + "Miao", + "Prti", + "Inscriptional_Parthian", + "Rjng", + "Rejang", + "Rohg", + "Hanifi_Rohingya", + "Runr", + "Runic", + "Samr", + "Samaritan", + "Sarb", + "Old_South_Arabian", + "Saur", + "Saurashtra", + "Sgnw", + "SignWriting", + "Shaw", + "Shavian", + "Shrd", + "Sharada", + "Sidd", + "Siddham", + "Sind", + "Khudawadi", + "Sinh", + "Sinhala", + "Sogd", + "Sogdian", + "Sogo", + "Old_Sogdian", + "Sora", + "Sora_Sompeng", + "Soyo", + "Soyombo", + "Sund", + "Sundanese", + "Sylo", + "Syloti_Nagri", + "Syrc", + "Syriac", + "Tagb", + "Tagbanwa", + "Takr", + "Takri", + "Tale", + "Tai_Le", + "Talu", + "New_Tai_Lue", + "Taml", + "Tamil", + "Tang", + "Tangut", + "Tavt", + "Tai_Viet", + "Telu", + "Telugu", + "Tfng", + "Tifinagh", + "Tglg", + "Tagalog", + "Thaa", + "Thaana", + "Thai", + "Tibt", + "Tibetan", + "Tirh", + "Tirhuta", + "Tnsa", + "Tangsa", + "Toto", + "Ugar", + "Ugaritic", + "Vaii", + "Vai", + "Vith", + "Vithkuqi", + "Wara", + "Warang_Citi", + "Wcho", + "Wancho", + "Xpeo", + "Old_Persian", + "Xsux", + "Cuneiform", + "Yezi", + "Yezidi", + "Yiii", + "Yi", + "Zanb", + "Zanabazar_Square", + "Zinh", + "Inherited", + "Qaai", + "Zyyy", + "Common", + "Zzzz", + "Unknown" + ]), + Script_Extensions: void 0 + }; + Ra.Script_Extensions = Ra.Script; + Ym(_f(0, 0), 0); + new Map(Object.entries({ + " ": "\\t", + "\v": "\\v", + "\f": "\\f", + "\b": "\\b", + "\r": "\\r", + "\n": "\\n", + "\\": "\\\\", + "\"": "\\\"", + "'": "\\'", + "`": "\\`", + "\u2028": "\\u2028", + "\u2029": "\\u2029", + "…": "\\u0085", + "\r\n": "\\r\\n" + })); + new Map(Object.entries({ + "\"": """, + "'": "'" + })); + Et = { + getNodeConstructor: () => Ep, + getTokenConstructor: () => rb, + getIdentifierConstructor: () => ib, + getPrivateIdentifierConstructor: () => Ep, + getSourceFileConstructor: () => Ep, + getSymbolConstructor: () => eb, + getTypeConstructor: () => tb, + getSignatureConstructor: () => nb, + getSourceMapSourceConstructor: () => ab + }, sb = []; + it = { + allowImportingTsExtensions: { + dependencies: ["rewriteRelativeImportExtensions"], + computeValue: (e) => !!(e.allowImportingTsExtensions || e.rewriteRelativeImportExtensions) + }, + target: { + dependencies: ["module"], + computeValue: (e) => (e.target === 0 ? void 0 : e.target) ?? (e.module === 100 && 9 || e.module === 101 && 9 || e.module === 102 && 10 || e.module === 199 && 99 || 1) + }, + module: { + dependencies: ["target"], + computeValue: (e) => typeof e.module == "number" ? e.module : it.target.computeValue(e) >= 2 ? 5 : 1 + }, + moduleResolution: { + dependencies: ["module", "target"], + computeValue: (e) => { + let t = e.moduleResolution; + if (t === void 0) switch (it.module.computeValue(e)) { + case 1: + t = 2; + break; + case 100: + case 101: + case 102: + t = 3; + break; + case 199: + t = 99; + break; + case 200: + t = 100; + break; + default: + t = 1; + break; + } + return t; + } + }, + moduleDetection: { + dependencies: ["module", "target"], + computeValue: (e) => { + if (e.moduleDetection !== void 0) return e.moduleDetection; + let t = it.module.computeValue(e); + return 100 <= t && t <= 199 ? 3 : 2; + } + }, + isolatedModules: { + dependencies: ["verbatimModuleSyntax"], + computeValue: (e) => !!(e.isolatedModules || e.verbatimModuleSyntax) + }, + esModuleInterop: { + dependencies: ["module", "target"], + computeValue: (e) => { + if (e.esModuleInterop !== void 0) return e.esModuleInterop; + switch (it.module.computeValue(e)) { + case 100: + case 101: + case 102: + case 199: + case 200: return !0; + } + return !1; + } + }, + allowSyntheticDefaultImports: { + dependencies: [ + "module", + "target", + "moduleResolution" + ], + computeValue: (e) => e.allowSyntheticDefaultImports !== void 0 ? e.allowSyntheticDefaultImports : it.esModuleInterop.computeValue(e) || it.module.computeValue(e) === 4 || it.moduleResolution.computeValue(e) === 100 + }, + resolvePackageJsonExports: { + dependencies: ["moduleResolution"], + computeValue: (e) => { + let t = it.moduleResolution.computeValue(e); + if (!Bd(t)) return !1; + if (e.resolvePackageJsonExports !== void 0) return e.resolvePackageJsonExports; + switch (t) { + case 3: + case 99: + case 100: return !0; + } + return !1; + } + }, + resolvePackageJsonImports: { + dependencies: ["moduleResolution", "resolvePackageJsonExports"], + computeValue: (e) => { + let t = it.moduleResolution.computeValue(e); + if (!Bd(t)) return !1; + if (e.resolvePackageJsonImports !== void 0) return e.resolvePackageJsonImports; + switch (t) { + case 3: + case 99: + case 100: return !0; + } + return !1; + } + }, + resolveJsonModule: { + dependencies: [ + "moduleResolution", + "module", + "target" + ], + computeValue: (e) => { + if (e.resolveJsonModule !== void 0) return e.resolveJsonModule; + switch (it.module.computeValue(e)) { + case 102: + case 199: return !0; + } + return it.moduleResolution.computeValue(e) === 100; + } + }, + declaration: { + dependencies: ["composite"], + computeValue: (e) => !!(e.declaration || e.composite) + }, + preserveConstEnums: { + dependencies: ["isolatedModules", "verbatimModuleSyntax"], + computeValue: (e) => !!(e.preserveConstEnums || it.isolatedModules.computeValue(e)) + }, + incremental: { + dependencies: ["composite"], + computeValue: (e) => !!(e.incremental || e.composite) + }, + declarationMap: { + dependencies: ["declaration", "composite"], + computeValue: (e) => !!(e.declarationMap && it.declaration.computeValue(e)) + }, + allowJs: { + dependencies: ["checkJs"], + computeValue: (e) => e.allowJs === void 0 ? !!e.checkJs : e.allowJs + }, + useDefineForClassFields: { + dependencies: ["target", "module"], + computeValue: (e) => e.useDefineForClassFields === void 0 ? it.target.computeValue(e) >= 9 : e.useDefineForClassFields + }, + noImplicitAny: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "noImplicitAny") + }, + noImplicitThis: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "noImplicitThis") + }, + strictNullChecks: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "strictNullChecks") + }, + strictFunctionTypes: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "strictFunctionTypes") + }, + strictBindCallApply: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "strictBindCallApply") + }, + strictPropertyInitialization: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "strictPropertyInitialization") + }, + strictBuiltinIteratorReturn: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "strictBuiltinIteratorReturn") + }, + alwaysStrict: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "alwaysStrict") + }, + useUnknownInCatchVariables: { + dependencies: ["strict"], + computeValue: (e) => Gr(e, "useUnknownInCatchVariables") + } + }; + it.allowImportingTsExtensions.computeValue; + it.target.computeValue; + it.module.computeValue; + it.moduleResolution.computeValue; + it.moduleDetection.computeValue; + it.isolatedModules.computeValue; + it.esModuleInterop.computeValue; + it.allowSyntheticDefaultImports.computeValue; + it.resolvePackageJsonExports.computeValue; + it.resolvePackageJsonImports.computeValue; + it.resolveJsonModule.computeValue; + it.declaration.computeValue; + it.preserveConstEnums.computeValue; + it.incremental.computeValue; + it.declarationMap.computeValue; + it.allowJs.computeValue; + it.useDefineForClassFields.computeValue; + x1 = `(?!(?:${[ + "node_modules", + "bower_components", + "jspm_packages" + ].join("|")})(?:/|$))`, fb = { + singleAsteriskRegexFragment: "(?:[^./]|(?:\\.(?!min\\.js$))?)*", + doubleAsteriskRegexFragment: `(?:/${x1}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => S1(e, fb.singleAsteriskRegexFragment) + }, db = { + singleAsteriskRegexFragment: "[^/]*", + doubleAsteriskRegexFragment: `(?:/${x1}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => S1(e, db.singleAsteriskRegexFragment) + }; + w1 = [ + [ + ".ts", + ".tsx", + ".d.ts" + ], + [".cts", ".d.cts"], + [".mts", ".d.mts"] + ]; + vm(w1); + [...w1]; + vm([ + [".js", ".jsx"], + [".mjs"], + [".cjs"] + ]); + bb = [ + ".d.ts", + ".d.cts", + ".d.mts" + ]; + String.prototype.replace; + qp = [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "test/mock_loader", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" + ]; + new Set(qp); + Ab = /* @__PURE__ */ new Set([ + "node:sea", + "node:sqlite", + "node:test", + "node:test/reporters" + ]); + [ + ...qp, + ...qp.map((e) => `node:${e}`), + ...Ab + ]; + Db = { + getParenthesizeLeftSideOfBinaryForOperator: (e) => bt, + getParenthesizeRightSideOfBinaryForOperator: (e) => bt, + parenthesizeLeftSideOfBinary: (e, t) => t, + parenthesizeRightSideOfBinary: (e, t, a) => a, + parenthesizeExpressionOfComputedPropertyName: bt, + parenthesizeConditionOfConditionalExpression: bt, + parenthesizeBranchOfConditionalExpression: bt, + parenthesizeExpressionOfExportDefault: bt, + parenthesizeExpressionOfNew: (e) => Er(e, Fa), + parenthesizeLeftSideOfAccess: (e) => Er(e, Fa), + parenthesizeOperandOfPostfixUnary: (e) => Er(e, Fa), + parenthesizeOperandOfPrefixUnary: (e) => Er(e, Hg), + parenthesizeExpressionsOfCommaDelimitedList: (e) => Er(e, mi), + parenthesizeExpressionForDisallowedComma: bt, + parenthesizeExpressionOfExpressionStatement: bt, + parenthesizeConciseBodyOfArrowFunction: bt, + parenthesizeCheckTypeOfConditionalType: bt, + parenthesizeExtendsTypeOfConditionalType: bt, + parenthesizeConstituentTypesOfUnionType: (e) => Er(e, mi), + parenthesizeConstituentTypeOfUnionType: bt, + parenthesizeConstituentTypesOfIntersectionType: (e) => Er(e, mi), + parenthesizeConstituentTypeOfIntersectionType: bt, + parenthesizeOperandOfTypeOperator: bt, + parenthesizeOperandOfReadonlyTypeOperator: bt, + parenthesizeNonArrayTypeOfPostfixType: bt, + parenthesizeElementTypesOfTupleType: (e) => Er(e, mi), + parenthesizeElementTypeOfTupleType: bt, + parenthesizeTypeOfOptionalType: bt, + parenthesizeTypeArguments: (e) => e && Er(e, mi), + parenthesizeLeadingTypeArgument: bt + }, _l = 0; + Pb = []; + Fd = {}; + Ks = Cb(); + wf(4, { + createBaseSourceFileNode: (e) => Zs(Ks.createBaseSourceFileNode(e)), + createBaseIdentifierNode: (e) => Zs(Ks.createBaseIdentifierNode(e)), + createBasePrivateIdentifierNode: (e) => Zs(Ks.createBasePrivateIdentifierNode(e)), + createBaseTokenNode: (e) => Zs(Ks.createBaseTokenNode(e)), + createBaseNode: (e) => Zs(Ks.createBaseNode(e)) + }); + ea = /* @__PURE__ */ new WeakMap(); + ((e) => { + function t(y, G, E, D, R, ue, be) { + let he = G > 0 ? R[G - 1] : void 0; + return q.assertEqual(E[G], t), R[G] = y.onEnter(D[G], he, be), E[G] = k(y, t), G; + } + e.enter = t; + function a(y, G, E, D, R, ue, be) { + q.assertEqual(E[G], a), q.assertIsDefined(y.onLeft), E[G] = k(y, a); + let he = y.onLeft(D[G].left, R[G], D[G]); + return he ? (W(G, D, he), c(G, E, D, R, he)) : G; + } + e.left = a; + function _(y, G, E, D, R, ue, be) { + return q.assertEqual(E[G], _), q.assertIsDefined(y.onOperator), E[G] = k(y, _), y.onOperator(D[G].operatorToken, R[G], D[G]), G; + } + e.operator = _; + function f(y, G, E, D, R, ue, be) { + q.assertEqual(E[G], f), q.assertIsDefined(y.onRight), E[G] = k(y, f); + let he = y.onRight(D[G].right, R[G], D[G]); + return he ? (W(G, D, he), c(G, E, D, R, he)) : G; + } + e.right = f; + function h(y, G, E, D, R, ue, be) { + q.assertEqual(E[G], h), E[G] = k(y, h); + let he = y.onExit(D[G], R[G]); + if (G > 0) { + if (G--, y.foldState) { + let de = E[G] === h ? "right" : "left"; + R[G] = y.foldState(R[G], he, de); + } + } else ue.value = he; + return G; + } + e.exit = h; + function T(y, G, E, D, R, ue, be) { + return q.assertEqual(E[G], T), G; + } + e.done = T; + function k(y, G) { + switch (G) { + case t: if (y.onLeft) return a; + case a: if (y.onOperator) return _; + case _: if (y.onRight) return f; + case f: return h; + case h: return T; + case T: return T; + default: q.fail("Invalid state"); + } + } + e.nextState = k; + function c(y, G, E, D, R) { + return y++, G[y] = t, E[y] = R, D[y] = void 0, y; + } + function W(y, G, E) { + if (q.shouldAssert(2)) for (; y >= 0;) q.assert(G[y] !== E, "Circular traversal detected."), y--; + } + })(Xd || (Xd = {})); + wf(1, { + createBaseSourceFileNode: (e) => new (tm || (tm = (Et.getSourceFileConstructor())))(e, -1, -1), + createBaseIdentifierNode: (e) => new (Zd || (Zd = (Et.getIdentifierConstructor())))(e, -1, -1), + createBasePrivateIdentifierNode: (e) => new (em || (em = (Et.getPrivateIdentifierConstructor())))(e, -1, -1), + createBaseTokenNode: (e) => new (Kd || (Kd = (Et.getTokenConstructor())))(e, -1, -1), + createBaseNode: (e) => new (Qd || (Qd = (Et.getNodeConstructor())))(e, -1, -1) + }); + I6 = { + 167: function(t, a, _) { + return S(a, t.left) || S(a, t.right); + }, + 169: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.constraint) || S(a, t.default) || S(a, t.expression); + }, + 305: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.questionToken) || S(a, t.exclamationToken) || S(a, t.equalsToken) || S(a, t.objectAssignmentInitializer); + }, + 306: function(t, a, _) { + return S(a, t.expression); + }, + 170: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.dotDotDotToken) || S(a, t.name) || S(a, t.questionToken) || S(a, t.type) || S(a, t.initializer); + }, + 173: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.questionToken) || S(a, t.exclamationToken) || S(a, t.type) || S(a, t.initializer); + }, + 172: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.questionToken) || S(a, t.type) || S(a, t.initializer); + }, + 304: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.questionToken) || S(a, t.exclamationToken) || S(a, t.initializer); + }, + 261: function(t, a, _) { + return S(a, t.name) || S(a, t.exclamationToken) || S(a, t.type) || S(a, t.initializer); + }, + 209: function(t, a, _) { + return S(a, t.dotDotDotToken) || S(a, t.propertyName) || S(a, t.name) || S(a, t.initializer); + }, + 182: function(t, a, _) { + return ie(a, _, t.modifiers) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type); + }, + 186: function(t, a, _) { + return ie(a, _, t.modifiers) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type); + }, + 185: function(t, a, _) { + return ie(a, _, t.modifiers) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type); + }, + 180: nm, + 181: nm, + 175: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.asteriskToken) || S(a, t.name) || S(a, t.questionToken) || S(a, t.exclamationToken) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 174: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.questionToken) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type); + }, + 177: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 178: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 179: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 263: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.asteriskToken) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 219: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.asteriskToken) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.body); + }, + 220: function(t, a, _) { + return ie(a, _, t.modifiers) || ie(a, _, t.typeParameters) || ie(a, _, t.parameters) || S(a, t.type) || S(a, t.equalsGreaterThanToken) || S(a, t.body); + }, + 176: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.body); + }, + 184: function(t, a, _) { + return S(a, t.typeName) || ie(a, _, t.typeArguments); + }, + 183: function(t, a, _) { + return S(a, t.assertsModifier) || S(a, t.parameterName) || S(a, t.type); + }, + 187: function(t, a, _) { + return S(a, t.exprName) || ie(a, _, t.typeArguments); + }, + 188: function(t, a, _) { + return ie(a, _, t.members); + }, + 189: function(t, a, _) { + return S(a, t.elementType); + }, + 190: function(t, a, _) { + return ie(a, _, t.elements); + }, + 193: rm, + 194: rm, + 195: function(t, a, _) { + return S(a, t.checkType) || S(a, t.extendsType) || S(a, t.trueType) || S(a, t.falseType); + }, + 196: function(t, a, _) { + return S(a, t.typeParameter); + }, + 206: function(t, a, _) { + return S(a, t.argument) || S(a, t.attributes) || S(a, t.qualifier) || ie(a, _, t.typeArguments); + }, + 303: function(t, a, _) { + return S(a, t.assertClause); + }, + 197: im, + 199: im, + 200: function(t, a, _) { + return S(a, t.objectType) || S(a, t.indexType); + }, + 201: function(t, a, _) { + return S(a, t.readonlyToken) || S(a, t.typeParameter) || S(a, t.nameType) || S(a, t.questionToken) || S(a, t.type) || ie(a, _, t.members); + }, + 202: function(t, a, _) { + return S(a, t.literal); + }, + 203: function(t, a, _) { + return S(a, t.dotDotDotToken) || S(a, t.name) || S(a, t.questionToken) || S(a, t.type); + }, + 207: am, + 208: am, + 210: function(t, a, _) { + return ie(a, _, t.elements); + }, + 211: function(t, a, _) { + return ie(a, _, t.properties); + }, + 212: function(t, a, _) { + return S(a, t.expression) || S(a, t.questionDotToken) || S(a, t.name); + }, + 213: function(t, a, _) { + return S(a, t.expression) || S(a, t.questionDotToken) || S(a, t.argumentExpression); + }, + 214: sm, + 215: sm, + 216: function(t, a, _) { + return S(a, t.tag) || S(a, t.questionDotToken) || ie(a, _, t.typeArguments) || S(a, t.template); + }, + 217: function(t, a, _) { + return S(a, t.type) || S(a, t.expression); + }, + 218: function(t, a, _) { + return S(a, t.expression); + }, + 221: function(t, a, _) { + return S(a, t.expression); + }, + 222: function(t, a, _) { + return S(a, t.expression); + }, + 223: function(t, a, _) { + return S(a, t.expression); + }, + 225: function(t, a, _) { + return S(a, t.operand); + }, + 230: function(t, a, _) { + return S(a, t.asteriskToken) || S(a, t.expression); + }, + 224: function(t, a, _) { + return S(a, t.expression); + }, + 226: function(t, a, _) { + return S(a, t.operand); + }, + 227: function(t, a, _) { + return S(a, t.left) || S(a, t.operatorToken) || S(a, t.right); + }, + 235: function(t, a, _) { + return S(a, t.expression) || S(a, t.type); + }, + 236: function(t, a, _) { + return S(a, t.expression); + }, + 239: function(t, a, _) { + return S(a, t.expression) || S(a, t.type); + }, + 237: function(t, a, _) { + return S(a, t.name); + }, + 228: function(t, a, _) { + return S(a, t.condition) || S(a, t.questionToken) || S(a, t.whenTrue) || S(a, t.colonToken) || S(a, t.whenFalse); + }, + 231: function(t, a, _) { + return S(a, t.expression); + }, + 242: _m, + 269: _m, + 308: function(t, a, _) { + return ie(a, _, t.statements) || S(a, t.endOfFileToken); + }, + 244: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.declarationList); + }, + 262: function(t, a, _) { + return ie(a, _, t.declarations); + }, + 245: function(t, a, _) { + return S(a, t.expression); + }, + 246: function(t, a, _) { + return S(a, t.expression) || S(a, t.thenStatement) || S(a, t.elseStatement); + }, + 247: function(t, a, _) { + return S(a, t.statement) || S(a, t.expression); + }, + 248: function(t, a, _) { + return S(a, t.expression) || S(a, t.statement); + }, + 249: function(t, a, _) { + return S(a, t.initializer) || S(a, t.condition) || S(a, t.incrementor) || S(a, t.statement); + }, + 250: function(t, a, _) { + return S(a, t.initializer) || S(a, t.expression) || S(a, t.statement); + }, + 251: function(t, a, _) { + return S(a, t.awaitModifier) || S(a, t.initializer) || S(a, t.expression) || S(a, t.statement); + }, + 252: om, + 253: om, + 254: function(t, a, _) { + return S(a, t.expression); + }, + 255: function(t, a, _) { + return S(a, t.expression) || S(a, t.statement); + }, + 256: function(t, a, _) { + return S(a, t.expression) || S(a, t.caseBlock); + }, + 270: function(t, a, _) { + return ie(a, _, t.clauses); + }, + 297: function(t, a, _) { + return S(a, t.expression) || ie(a, _, t.statements); + }, + 298: function(t, a, _) { + return ie(a, _, t.statements); + }, + 257: function(t, a, _) { + return S(a, t.label) || S(a, t.statement); + }, + 258: function(t, a, _) { + return S(a, t.expression); + }, + 259: function(t, a, _) { + return S(a, t.tryBlock) || S(a, t.catchClause) || S(a, t.finallyBlock); + }, + 300: function(t, a, _) { + return S(a, t.variableDeclaration) || S(a, t.block); + }, + 171: function(t, a, _) { + return S(a, t.expression); + }, + 264: cm, + 232: cm, + 265: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.typeParameters) || ie(a, _, t.heritageClauses) || ie(a, _, t.members); + }, + 266: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.typeParameters) || S(a, t.type); + }, + 267: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || ie(a, _, t.members); + }, + 307: function(t, a, _) { + return S(a, t.name) || S(a, t.initializer); + }, + 268: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.body); + }, + 272: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name) || S(a, t.moduleReference); + }, + 273: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.importClause) || S(a, t.moduleSpecifier) || S(a, t.attributes); + }, + 274: function(t, a, _) { + return S(a, t.name) || S(a, t.namedBindings); + }, + 301: function(t, a, _) { + return ie(a, _, t.elements); + }, + 302: function(t, a, _) { + return S(a, t.name) || S(a, t.value); + }, + 271: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.name); + }, + 275: function(t, a, _) { + return S(a, t.name); + }, + 281: function(t, a, _) { + return S(a, t.name); + }, + 276: lm, + 280: lm, + 279: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.exportClause) || S(a, t.moduleSpecifier) || S(a, t.attributes); + }, + 277: um, + 282: um, + 278: function(t, a, _) { + return ie(a, _, t.modifiers) || S(a, t.expression); + }, + 229: function(t, a, _) { + return S(a, t.head) || ie(a, _, t.templateSpans); + }, + 240: function(t, a, _) { + return S(a, t.expression) || S(a, t.literal); + }, + 204: function(t, a, _) { + return S(a, t.head) || ie(a, _, t.templateSpans); + }, + 205: function(t, a, _) { + return S(a, t.type) || S(a, t.literal); + }, + 168: function(t, a, _) { + return S(a, t.expression); + }, + 299: function(t, a, _) { + return ie(a, _, t.types); + }, + 234: function(t, a, _) { + return S(a, t.expression) || ie(a, _, t.typeArguments); + }, + 284: function(t, a, _) { + return S(a, t.expression); + }, + 283: function(t, a, _) { + return ie(a, _, t.modifiers); + }, + 357: function(t, a, _) { + return ie(a, _, t.elements); + }, + 285: function(t, a, _) { + return S(a, t.openingElement) || ie(a, _, t.children) || S(a, t.closingElement); + }, + 289: function(t, a, _) { + return S(a, t.openingFragment) || ie(a, _, t.children) || S(a, t.closingFragment); + }, + 286: pm, + 287: pm, + 293: function(t, a, _) { + return ie(a, _, t.properties); + }, + 292: function(t, a, _) { + return S(a, t.name) || S(a, t.initializer); + }, + 294: function(t, a, _) { + return S(a, t.expression); + }, + 295: function(t, a, _) { + return S(a, t.dotDotDotToken) || S(a, t.expression); + }, + 288: function(t, a, _) { + return S(a, t.tagName); + }, + 296: function(t, a, _) { + return S(a, t.namespace) || S(a, t.name); + }, + 191: Hi, + 192: Hi, + 310: Hi, + 316: Hi, + 315: Hi, + 317: Hi, + 319: Hi, + 318: function(t, a, _) { + return ie(a, _, t.parameters) || S(a, t.type); + }, + 321: function(t, a, _) { + return (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)) || ie(a, _, t.tags); + }, + 348: function(t, a, _) { + return S(a, t.tagName) || S(a, t.name) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 311: function(t, a, _) { + return S(a, t.name); + }, + 312: function(t, a, _) { + return S(a, t.left) || S(a, t.right); + }, + 342: fm, + 349: fm, + 331: function(t, a, _) { + return S(a, t.tagName) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 330: function(t, a, _) { + return S(a, t.tagName) || S(a, t.class) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 329: function(t, a, _) { + return S(a, t.tagName) || S(a, t.class) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 346: function(t, a, _) { + return S(a, t.tagName) || S(a, t.constraint) || ie(a, _, t.typeParameters) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 347: function(t, a, _) { + return S(a, t.tagName) || (t.typeExpression && t.typeExpression.kind === 310 ? S(a, t.typeExpression) || S(a, t.fullName) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)) : S(a, t.fullName) || S(a, t.typeExpression) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment))); + }, + 339: function(t, a, _) { + return S(a, t.tagName) || S(a, t.fullName) || S(a, t.typeExpression) || (typeof t.comment == "string" ? void 0 : ie(a, _, t.comment)); + }, + 343: Xi, + 345: Xi, + 344: Xi, + 341: Xi, + 351: Xi, + 350: Xi, + 340: Xi, + 324: function(t, a, _) { + return jn(t.typeParameters, a) || jn(t.parameters, a) || S(a, t.type); + }, + 325: Cp, + 326: Cp, + 327: Cp, + 323: function(t, a, _) { + return jn(t.jsDocPropertyTags, a); + }, + 328: ui, + 333: ui, + 334: ui, + 335: ui, + 336: ui, + 337: ui, + 332: ui, + 338: ui, + 352: O6, + 356: M6 + }; + ((e) => { + var t = sf(99, !0), a = 40960, _, f, h, T, k; + function c(o) { + return ar++, o; + } + var y = wf(11, { + createBaseSourceFileNode: (o) => c(new k(o, 0, 0)), + createBaseIdentifierNode: (o) => c(new h(o, 0, 0)), + createBasePrivateIdentifierNode: (o) => c(new T(o, 0, 0)), + createBaseTokenNode: (o) => c(new f(o, 0, 0)), + createBaseNode: (o) => c(new _(o, 0, 0)) + }), { createNodeArray: G, createNumericLiteral: E, createStringLiteral: D, createLiteralLikeNode: R, createIdentifier: ue, createPrivateIdentifier: be, createToken: he, createArrayLiteralExpression: de, createObjectLiteralExpression: O, createPropertyAccessExpression: ae, createPropertyAccessChain: Oe, createElementAccessExpression: V, createElementAccessChain: oe, createCallExpression: Y, createCallChain: ft, createNewExpression: nr, createParenthesizedExpression: mn, createBlock: rr, createVariableStatement: hn, createExpressionStatement: Dn, createIfStatement: We, createWhileStatement: ir, createForStatement: Ir, createForOfStatement: Ot, createVariableDeclaration: Bn, createVariableDeclarationList: Pn } = y, Mt, ht, $e, qn, $t, ot, at, Bt, Lt, ct, ar, dt, yn, yt, _n, tt, qt = !0, tn = !1; + function sr(o, p, m, g, b = !1, N, Q, _e = 0) { + var ee; + if (N = mb(o, N), N === 6) { + let ce = hr(o, p, m, g, b); + return convertToJson(ce, (ee = ce.statements[0]) == null ? void 0 : ee.expression, ce.parseDiagnostics, !1, void 0), ce.referencedFiles = vt, ce.typeReferenceDirectives = vt, ce.libReferenceDirectives = vt, ce.amdDependencies = vt, ce.hasNoDefaultLib = !1, ce.pragmas = ay, ce; + } + Fn(o, p, m, g, N, _e); + let te = Or(m, b, N, Q || ch, _e); + return zn(), te; + } + e.parseSourceFile = sr; + function mr(o, p) { + Fn("", o, p, void 0, 1, 0), B(); + let m = Ur(!0), g = u() === 1 && !at.length; + return zn(), g ? m : void 0; + } + e.parseIsolatedEntityName = mr; + function hr(o, p, m = 2, g, b = !1) { + Fn(o, p, m, g, 6, 0), ht = tt, B(); + let N = M(), Q, _e; + if (u() === 1) Q = At([], N, N), _e = Wt(); + else { + let ce; + for (; u() !== 1;) { + let De; + switch (u()) { + case 23: + De = _c(); + break; + case 112: + case 97: + case 106: + De = Wt(); + break; + case 41: + H(() => B() === 9 && B() !== 59) ? De = Wo() : De = Is(); + break; + case 9: + case 11: if (H(() => B() !== 59)) { + De = Hn(); + break; + } + default: + De = Is(); + break; + } + ce && $r(ce) ? ce.push(De) : ce ? ce = [ce, De] : (ce = De, u() !== 1 && Ee(A.Unexpected_token)); + } + let Je = Dn($r(ce) ? P(de(ce), N) : q.checkDefined(ce)); + P(Je, N), Q = At([Je], N), _e = Yn(1, A.Unexpected_token); + } + let ee = se(o, 2, 6, !1, Q, _e, ht, Va); + b && L(ee), ee.nodeCount = ar, ee.identifierCount = yn, ee.identifiers = dt, ee.parseDiagnostics = Yi(at, ee), Bt && (ee.jsDocDiagnostics = Yi(Bt, ee)); + let te = ee; + return zn(), te; + } + e.parseJsonText = hr; + function Fn(o, p, m, g, b, N) { + switch (_ = Et.getNodeConstructor(), f = Et.getTokenConstructor(), h = Et.getIdentifierConstructor(), T = Et.getPrivateIdentifierConstructor(), k = Et.getSourceFileConstructor(), Mt = zy(o), $e = p, qn = m, Lt = g, $t = b, ot = Ud(b), at = [], yt = 0, dt = /* @__PURE__ */ new Map(), yn = 0, ar = 0, ht = 0, qt = !0, $t) { + case 1: + case 2: + tt = 524288; + break; + case 6: + tt = 134742016; + break; + default: + tt = 0; + break; + } + tn = !1, t.setText($e), t.setOnError(Zr), t.setScriptTarget(qn), t.setLanguageVariant(ot), t.setScriptKind($t), t.setJSDocParsingMode(N); + } + function zn() { + t.clearCommentDirectives(), t.setText(""), t.setOnError(void 0), t.setScriptKind(0), t.setJSDocParsingMode(0), $e = void 0, qn = void 0, Lt = void 0, $t = void 0, ot = void 0, ht = 0, at = void 0, Bt = void 0, yt = 0, dt = void 0, _n = void 0, qt = !0; + } + function Or(o, p, m, g, b) { + let N = R6(Mt); + N && (tt |= 33554432), ht = tt, B(); + let Q = bn(0, Yt); + q.assert(u() === 1); + let _e = Ue(), ee = Ce(Wt(), _e), te = se(Mt, o, m, N, Q, ee, ht, g); + return q6(te, $e), F6(te, ce), te.commentDirectives = t.getCommentDirectives(), te.nodeCount = ar, te.identifierCount = yn, te.identifiers = dt, te.parseDiagnostics = Yi(at, te), te.jsDocParsingMode = b, Bt && (te.jsDocDiagnostics = Yi(Bt, te)), p && L(te), te; + function ce(je, Je, De) { + at.push(Oa(Mt, $e, je, Je, De)); + } + } + let Vn = !1; + function Ce(o, p) { + if (!p) return o; + q.assert(!o.jsDoc); + let m = cy(u2(o, $e), (g) => el.parseJSDocComment(o, g.pos, g.end - g.pos)); + return m.length && (o.jsDoc = m), Vn && (Vn = !1, o.flags |= 536870912), o; + } + function yr(o) { + let p = Lt, m = Sl.createSyntaxCursor(o); + Lt = { currentNode: ce }; + let g = [], b = at; + at = []; + let N = 0, Q = ee(o.statements, 0); + for (; Q !== -1;) { + let je = o.statements[N], Je = o.statements[Q]; + En(g, o.statements, N, Q), N = te(o.statements, Q); + let De = gp(b, (Nt) => Nt.start >= je.pos), Ht = De >= 0 ? gp(b, (Nt) => Nt.start >= Je.pos, De) : -1; + De >= 0 && En(at, b, De, Ht >= 0 ? Ht : void 0), cn(() => { + let Nt = tt; + for (tt |= 65536, t.resetTokenState(Je.pos), B(); u() !== 1;) { + let ur = t.getTokenFullStart(), pr = ns(0, Yt); + if (g.push(pr), ur === t.getTokenFullStart() && B(), N >= 0) { + let Mn = o.statements[N]; + if (pr.end === Mn.pos) break; + pr.end > Mn.pos && (N = te(o.statements, N + 1)); + } + } + tt = Nt; + }, 2), Q = N >= 0 ? ee(o.statements, N) : -1; + } + if (N >= 0) { + let je = o.statements[N]; + En(g, o.statements, N); + let Je = gp(b, (De) => De.start >= je.pos); + Je >= 0 && En(at, b, Je); + } + return Lt = p, y.updateSourceFile(o, dn(G(g), o.statements)); + function _e(je) { + return !(je.flags & 65536) && !!(je.transformFlags & 67108864); + } + function ee(je, Je) { + for (let De = Je; De < je.length; De++) if (_e(je[De])) return De; + return -1; + } + function te(je, Je) { + for (let De = Je; De < je.length; De++) if (!_e(je[De])) return De; + return -1; + } + function ce(je) { + let Je = m.currentNode(je); + return qt && Je && _e(Je) && Wp(Je), Je; + } + } + function L(o) { + Sb(o, !0); + } + e.fixupParentReferences = L; + function se(o, p, m, g, b, N, Q, _e) { + let ee = y.createSourceFile(b, N, Q); + if (qd(ee, 0, $e.length), te(ee), !g && uh(ee) && ee.transformFlags & 67108864) { + let ce = ee; + ee = yr(ee), ce !== ee && te(ee); + } + return ee; + function te(ce) { + ce.text = $e, ce.bindDiagnostics = [], ce.bindSuggestionDiagnostics = void 0, ce.languageVersion = p, ce.fileName = o, ce.languageVariant = Ud(m), ce.isDeclarationFile = g, ce.scriptKind = m, _e(ce), ce.setExternalModuleIndicator = _e; + } + } + function fe(o, p) { + o ? tt |= p : tt &= ~p; + } + function Te(o) { + fe(o, 8192); + } + function He(o) { + fe(o, 16384); + } + function Qe(o) { + fe(o, 32768); + } + function st(o) { + fe(o, 65536); + } + function Ct(o, p) { + let m = o & tt; + if (m) { + fe(!1, m); + let g = p(); + return fe(!0, m), g; + } + return p(); + } + function Tt(o, p) { + let m = o & ~tt; + if (m) { + fe(!0, m); + let g = p(); + return fe(!1, m), g; + } + return p(); + } + function lt(o) { + return Ct(8192, o); + } + function Mr(o) { + return Tt(8192, o); + } + function gr(o) { + return Ct(131072, o); + } + function Nn(o) { + return Tt(131072, o); + } + function Wn(o) { + return Tt(16384, o); + } + function wi(o) { + return Tt(32768, o); + } + function U(o) { + return Tt(65536, o); + } + function K(o) { + return Ct(65536, o); + } + function Z(o) { + return Tt(81920, o); + } + function xe(o) { + return Ct(81920, o); + } + function Se(o) { + return (tt & o) !== 0; + } + function we() { + return Se(16384); + } + function me() { + return Se(8192); + } + function Ve() { + return Se(131072); + } + function Ze() { + return Se(32768); + } + function Ye() { + return Se(65536); + } + function Ee(o, ...p) { + return rt(t.getTokenStart(), t.getTokenEnd(), o, ...p); + } + function gn(o, p, m, ...g) { + let b = Ba(at), N; + return (!b || o !== b.start) && (N = Oa(Mt, $e, o, p, m, ...g), at.push(N)), tn = !0, N; + } + function rt(o, p, m, ...g) { + return gn(o, p - o, m, ...g); + } + function on(o, p, ...m) { + rt(o.pos, o.end, p, ...m); + } + function Zr(o, p, m) { + gn(t.getTokenEnd(), p, o, m); + } + function M() { + return t.getTokenFullStart(); + } + function Ue() { + return t.hasPrecedingJSDocComment(); + } + function u() { + return ct; + } + function Ie() { + return ct = t.scan(); + } + function Me(o) { + return B(), o(); + } + function B() { + return di(ct) && (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && rt(t.getTokenStart(), t.getTokenEnd(), A.Keywords_cannot_contain_escape_characters), Ie(); + } + function Be() { + return ct = t.scanJsDocToken(); + } + function nn(o) { + return ct = t.scanJSDocCommentTextToken(o); + } + function ze() { + return ct = t.reScanGreaterToken(); + } + function Xe() { + return ct = t.reScanSlashToken(); + } + function Dt(o) { + return ct = t.reScanTemplateToken(o); + } + function wt() { + return ct = t.reScanLessThanToken(); + } + function Pt() { + return ct = t.reScanHashToken(); + } + function Ft() { + return ct = t.scanJsxIdentifier(); + } + function Gn() { + return ct = t.scanJsxToken(); + } + function ki() { + return ct = t.scanJsxAttributeValue(); + } + function cn(o, p) { + let m = ct, g = at.length, b = tn, N = tt, Q = p !== 0 ? t.lookAhead(o) : t.tryScan(o); + return q.assert(N === tt), (!Q || p !== 0) && (ct = m, p !== 2 && (at.length = g), tn = b), Q; + } + function H(o) { + return cn(o, 1); + } + function le(o) { + return cn(o, 0); + } + function qe() { + return u() === 80 ? !0 : u() > 118; + } + function ve() { + return u() === 80 ? !0 : u() === 127 && we() || u() === 135 && Ye() ? !1 : u() > 118; + } + function J(o, p, m = !0) { + return u() === o ? (m && B(), !0) : (p ? Ee(p) : Ee(A._0_expected, nt(o)), !1); + } + let mt = Object.keys(tf).filter((o) => o.length > 2); + function xt(o) { + if (F1(o)) { + rt(Cr($e, o.template.pos), o.template.end, A.Module_declaration_names_may_only_use_or_quoted_strings); + return; + } + let p = Ke(o) ? An(o) : void 0; + if (!p || !cg(p, qn)) { + Ee(A._0_expected, nt(27)); + return; + } + let m = Cr($e, o.pos); + switch (p) { + case "const": + case "let": + case "var": + rt(m, o.end, A.Variable_declaration_not_allowed_at_this_location); + return; + case "declare": return; + case "interface": + Jt(A.Interface_name_cannot_be_0, A.Interface_must_be_given_a_name, 19); + return; + case "is": + rt(m, t.getTokenStart(), A.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + return; + case "module": + case "namespace": + Jt(A.Namespace_name_cannot_be_0, A.Namespace_must_be_given_a_name, 19); + return; + case "type": + Jt(A.Type_alias_name_cannot_be_0, A.Type_alias_must_be_given_a_name, 64); + return; + } + let g = t_(p, mt, bt) ?? ln(p); + if (g) { + rt(m, o.end, A.Unknown_keyword_or_identifier_Did_you_mean_0, g); + return; + } + u() !== 0 && rt(m, o.end, A.Unexpected_keyword_or_identifier); + } + function Jt(o, p, m) { + u() === m ? Ee(p) : Ee(o, t.getTokenValue()); + } + function ln(o) { + for (let p of mt) if (o.length > p.length + 2 && ml(o, p)) return `${p} ${o.slice(p.length)}`; + } + function ql(o, p, m) { + if (u() === 60 && !t.hasPrecedingLineBreak()) { + Ee(A.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations); + return; + } + if (u() === 21) { + Ee(A.Cannot_start_a_function_call_in_a_type_annotation), B(); + return; + } + if (p && !_r()) { + m ? Ee(A._0_expected, nt(27)) : Ee(A.Expected_for_property_initializer); + return; + } + if (!oa()) { + if (m) { + Ee(A._0_expected, nt(27)); + return; + } + xt(o); + } + } + function C_(o) { + return u() === o ? (Be(), !0) : (q.assert(xp(o)), Ee(A._0_expected, nt(o)), !1); + } + function Lr(o, p, m, g) { + if (u() === p) { + B(); + return; + } + let b = Ee(A._0_expected, nt(p)); + m && b && sl(b, Oa(Mt, $e, g, 1, A.The_parser_expected_to_find_a_1_to_match_the_0_token_here, nt(o), nt(p))); + } + function Le(o) { + return u() === o ? (B(), !0) : !1; + } + function pt(o) { + if (u() === o) return Wt(); + } + function Fl(o) { + if (u() === o) return Vl(); + } + function Yn(o, p, m) { + return pt(o) || Gt(o, !1, p || A._0_expected, m || nt(o)); + } + function zl(o) { + return Fl(o) || (q.assert(xp(o)), Gt(o, !1, A._0_expected, nt(o))); + } + function Wt() { + let o = M(), p = u(); + return B(), P(he(p), o); + } + function Vl() { + let o = M(), p = u(); + return Be(), P(he(p), o); + } + function _r() { + return u() === 27 ? !0 : u() === 20 || u() === 1 || t.hasPrecedingLineBreak(); + } + function oa() { + return _r() ? (u() === 27 && B(), !0) : !1; + } + function Qt() { + return oa() || J(27); + } + function At(o, p, m, g) { + let b = G(o, g); + return yi(b, p, m ?? t.getTokenFullStart()), b; + } + function P(o, p, m) { + return yi(o, p, m ?? t.getTokenFullStart()), tt && (o.flags |= tt), tn && (tn = !1, o.flags |= 262144), o; + } + function Gt(o, p, m, ...g) { + p ? gn(t.getTokenFullStart(), 0, m, ...g) : m && Ee(m, ...g); + let b = M(); + return P(o === 80 ? ue("", void 0) : Pd(o) ? y.createTemplateLiteralLikeNode(o, "", "", void 0) : o === 9 ? E("", void 0) : o === 11 ? D("", void 0) : o === 283 ? y.createMissingDeclaration() : he(o), b); + } + function Jr(o) { + let p = dt.get(o); + return p === void 0 && dt.set(o, p = o), p; + } + function or(o, p, m) { + if (o) { + yn++; + let _e = t.hasPrecedingJSDocLeadingAsterisks() ? t.getTokenStart() : M(), ee = u(), te = Jr(t.getTokenValue()), ce = t.hasExtendedUnicodeEscape(); + return Ie(), P(ue(te, ee, ce), _e); + } + if (u() === 81) return Ee(m || A.Private_identifiers_are_not_allowed_outside_class_bodies), or(!0); + if (u() === 0 && t.tryScan(() => t.reScanInvalidIdentifier() === 80)) return or(!0); + yn++; + let g = u() === 1, b = t.isReservedWord(), N = t.getTokenText(), Q = b ? A.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here : A.Identifier_expected; + return Gt(80, g, p || Q, N); + } + function Ka(o) { + return or(qe(), void 0, o); + } + function gt(o, p) { + return or(ve(), o, p); + } + function jt(o) { + return or(St(u()), o); + } + function ei() { + return (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && Ee(A.Unicode_escape_sequence_cannot_appear_here), or(St(u())); + } + function br() { + return St(u()) || u() === 11 || u() === 9 || u() === 10; + } + function D_() { + return St(u()) || u() === 11; + } + function Wl(o) { + if (u() === 11 || u() === 9 || u() === 10) { + let p = Hn(); + return p.text = Jr(p.text), p; + } + return o && u() === 23 ? Gl() : u() === 81 ? ca() : jt(); + } + function jr() { + return Wl(!0); + } + function Gl() { + let o = M(); + J(23); + let p = lt(kt); + return J(24), P(y.createComputedPropertyName(p), o); + } + function ca() { + let o = M(), p = be(Jr(t.getTokenValue())); + return B(), P(p, o); + } + function ti(o) { + return u() === o && le(P_); + } + function Za() { + return B(), t.hasPrecedingLineBreak() ? !1 : cr(); + } + function P_() { + switch (u()) { + case 87: return B() === 94; + case 95: return B(), u() === 90 ? H(Ai) : u() === 156 ? H(Yl) : Ei(); + case 90: return Ai(); + case 126: return B(), cr(); + case 139: + case 153: return B(), Hl(); + default: return Za(); + } + } + function Ei() { + return u() === 60 || u() !== 42 && u() !== 130 && u() !== 19 && cr(); + } + function Yl() { + return B(), Ei(); + } + function N_() { + return Yr(u()) && le(P_); + } + function cr() { + return u() === 23 || u() === 19 || u() === 42 || u() === 26 || br(); + } + function Hl() { + return u() === 23 || br(); + } + function Ai() { + return B(), u() === 86 || u() === 100 || u() === 120 || u() === 60 || u() === 128 && H(vc) || u() === 134 && H(Tc); + } + function la(o, p) { + if (pa(o)) return !0; + switch (o) { + case 0: + case 1: + case 3: return !(u() === 27 && p) && xc(); + case 2: return u() === 84 || u() === 90; + case 4: return H(_o); + case 5: return H(Jc) || u() === 27 && !p; + case 6: return u() === 23 || br(); + case 12: switch (u()) { + case 23: + case 42: + case 26: + case 25: return !0; + default: return br(); + } + case 18: return br(); + case 9: return u() === 23 || u() === 26 || br(); + case 24: return D_(); + case 7: return u() === 19 ? H(I_) : p ? ve() && !es() : xs() && !es(); + case 8: return Rs(); + case 10: return u() === 28 || u() === 26 || Rs(); + case 19: return u() === 103 || u() === 87 || ve(); + case 15: switch (u()) { + case 28: + case 25: return !0; + } + case 11: return u() === 26 || Tr(); + case 16: return ha(!1); + case 17: return ha(!0); + case 20: + case 21: return u() === 28 || ai(); + case 22: return Vs(); + case 23: return u() === 161 && H(Cc) ? !1 : u() === 11 ? !0 : St(u()); + case 13: return St(u()) || u() === 19; + case 14: return !0; + case 25: return !0; + case 26: return q.fail("ParsingContext.Count used as a context"); + default: q.assertNever(o, "Non-exhaustive case in 'isListElement'."); + } + } + function I_() { + if (q.assert(u() === 19), B() === 20) { + let o = B(); + return o === 28 || o === 19 || o === 96 || o === 119; + } + return !0; + } + function Ci() { + return B(), ve(); + } + function Xl() { + return B(), St(u()); + } + function O_() { + return B(), Vy(u()); + } + function es() { + return u() === 119 || u() === 96 ? H(M_) : !1; + } + function M_() { + return B(), Tr(); + } + function Di() { + return B(), ai(); + } + function ua(o) { + if (u() === 1) return !0; + switch (o) { + case 1: + case 2: + case 4: + case 5: + case 6: + case 12: + case 9: + case 23: + case 24: return u() === 20; + case 3: return u() === 20 || u() === 84 || u() === 90; + case 7: return u() === 19 || u() === 96 || u() === 119; + case 8: return ts(); + case 19: return u() === 32 || u() === 21 || u() === 19 || u() === 96 || u() === 119; + case 11: return u() === 22 || u() === 27; + case 15: + case 21: + case 10: return u() === 24; + case 17: + case 16: + case 18: return u() === 22 || u() === 24; + case 20: return u() !== 28; + case 22: return u() === 19 || u() === 20; + case 13: return u() === 32 || u() === 44; + case 14: return u() === 30 && H(ap); + default: return !1; + } + } + function ts() { + return !!(_r() || qo(u()) || u() === 39); + } + function L_() { + q.assert(yt, "Missing parsing context"); + for (let o = 0; o < 26; o++) if (yt & 1 << o && (la(o, !0) || ua(o))) return !0; + return !1; + } + function bn(o, p) { + let m = yt; + yt |= 1 << o; + let g = [], b = M(); + for (; !ua(o);) { + if (la(o, !1)) { + g.push(ns(o, p)); + continue; + } + if (z_(o)) break; + } + return yt = m, At(g, b); + } + function ns(o, p) { + let m = pa(o); + return m ? J_(m) : p(); + } + function pa(o, p) { + var m; + if (!Lt || !j_(o) || tn) return; + let g = Lt.currentNode(p ?? t.getTokenFullStart()); + if (!(Zi(g) || j6(g) || u1(g) || (g.flags & 101441536) !== tt) && R_(g, o)) return bf(g) && (m = g.jsDoc) != null && m.jsDocCache && (g.jsDoc.jsDocCache = void 0), g; + } + function J_(o) { + return t.resetTokenState(o.end), B(), o; + } + function j_(o) { + switch (o) { + case 5: + case 2: + case 0: + case 1: + case 3: + case 6: + case 4: + case 8: + case 17: + case 16: return !0; + } + return !1; + } + function R_(o, p) { + switch (p) { + case 5: return rs(o); + case 2: return U_(o); + case 0: + case 1: + case 3: return is(o); + case 6: return B_(o); + case 4: return as(o); + case 8: return q_(o); + case 17: + case 16: return F_(o); + } + return !1; + } + function rs(o) { + if (o) switch (o.kind) { + case 177: + case 182: + case 178: + case 179: + case 173: + case 241: return !0; + case 175: + let p = o; + return !(p.name.kind === 80 && p.name.escapedText === "constructor"); + } + return !1; + } + function U_(o) { + if (o) switch (o.kind) { + case 297: + case 298: return !0; + } + return !1; + } + function is(o) { + if (o) switch (o.kind) { + case 263: + case 244: + case 242: + case 246: + case 245: + case 258: + case 254: + case 256: + case 253: + case 252: + case 250: + case 251: + case 249: + case 248: + case 255: + case 243: + case 259: + case 257: + case 247: + case 260: + case 273: + case 272: + case 279: + case 278: + case 268: + case 264: + case 265: + case 267: + case 266: return !0; + } + return !1; + } + function B_(o) { + return o.kind === 307; + } + function as(o) { + if (o) switch (o.kind) { + case 181: + case 174: + case 182: + case 172: + case 180: return !0; + } + return !1; + } + function q_(o) { + return o.kind !== 261 ? !1 : o.initializer === void 0; + } + function F_(o) { + return o.kind !== 170 ? !1 : o.initializer === void 0; + } + function z_(o) { + return fa(o), L_() ? !0 : (B(), !1); + } + function fa(o) { + switch (o) { + case 0: return u() === 90 ? Ee(A._0_expected, nt(95)) : Ee(A.Declaration_or_statement_expected); + case 1: return Ee(A.Declaration_or_statement_expected); + case 2: return Ee(A.case_or_default_expected); + case 3: return Ee(A.Statement_expected); + case 18: + case 4: return Ee(A.Property_or_signature_expected); + case 5: return Ee(A.Unexpected_token_A_constructor_method_accessor_or_property_was_expected); + case 6: return Ee(A.Enum_member_expected); + case 7: return Ee(A.Expression_expected); + case 8: return di(u()) ? Ee(A._0_is_not_allowed_as_a_variable_declaration_name, nt(u())) : Ee(A.Variable_declaration_expected); + case 9: return Ee(A.Property_destructuring_pattern_expected); + case 10: return Ee(A.Array_element_destructuring_pattern_expected); + case 11: return Ee(A.Argument_expression_expected); + case 12: return Ee(A.Property_assignment_expected); + case 15: return Ee(A.Expression_or_comma_expected); + case 17: return Ee(A.Parameter_declaration_expected); + case 16: return di(u()) ? Ee(A._0_is_not_allowed_as_a_parameter_name, nt(u())) : Ee(A.Parameter_declaration_expected); + case 19: return Ee(A.Type_parameter_declaration_expected); + case 20: return Ee(A.Type_argument_expected); + case 21: return Ee(A.Type_expected); + case 22: return Ee(A.Unexpected_token_expected); + case 23: return u() === 161 ? Ee(A._0_expected, "}") : Ee(A.Identifier_expected); + case 13: return Ee(A.Identifier_expected); + case 14: return Ee(A.Identifier_expected); + case 24: return Ee(A.Identifier_or_string_literal_expected); + case 25: return Ee(A.Identifier_expected); + case 26: return q.fail("ParsingContext.Count used as a context"); + default: q.assertNever(o); + } + } + function un(o, p, m) { + let g = yt; + yt |= 1 << o; + let b = [], N = M(), Q = -1; + for (;;) { + if (la(o, !1)) { + let _e = t.getTokenFullStart(), ee = ns(o, p); + if (!ee) { + yt = g; + return; + } + if (b.push(ee), Q = t.getTokenStart(), Le(28)) continue; + if (Q = -1, ua(o)) break; + J(28, ss(o)), m && u() === 27 && !t.hasPrecedingLineBreak() && B(), _e === t.getTokenFullStart() && B(); + continue; + } + if (ua(o) || z_(o)) break; + } + return yt = g, At(b, N, void 0, Q >= 0); + } + function ss(o) { + return o === 6 ? A.An_enum_member_name_must_be_followed_by_a_or : void 0; + } + function lr() { + let o = At([], M()); + return o.isMissingList = !0, o; + } + function V_(o) { + return !!o.isMissingList; + } + function Rr(o, p, m, g) { + if (J(m)) { + let b = un(o, p); + return J(g), b; + } + return lr(); + } + function Ur(o, p) { + let m = M(), g = o ? jt(p) : gt(p); + for (; Le(25) && u() !== 30;) g = P(y.createQualifiedName(g, ni(o, !1, !0)), m); + return g; + } + function $l(o, p) { + return P(y.createQualifiedName(o, p), o.pos); + } + function ni(o, p, m) { + if (t.hasPrecedingLineBreak() && St(u()) && H(Ms)) return Gt(80, !0, A.Identifier_expected); + if (u() === 81) { + let g = ca(); + return p ? g : Gt(80, !0, A.Identifier_expected); + } + return o ? m ? jt() : ei() : gt(); + } + function Ql(o) { + let p = M(), m = [], g; + do + g = H_(o), m.push(g); + while (g.literal.kind === 17); + return At(m, p); + } + function da(o) { + let p = M(); + return P(y.createTemplateExpression(Pi(o), Ql(o)), p); + } + function W_() { + let o = M(); + return P(y.createTemplateLiteralType(Pi(!1), Kl()), o); + } + function Kl() { + let o = M(), p = [], m; + do + m = G_(), p.push(m); + while (m.literal.kind === 17); + return At(p, o); + } + function G_() { + let o = M(); + return P(y.createTemplateLiteralTypeSpan(_t(), Y_(!1)), o); + } + function Y_(o) { + return u() === 20 ? (Dt(o), X_()) : Yn(18, A._0_expected, nt(20)); + } + function H_(o) { + let p = M(); + return P(y.createTemplateSpan(lt(kt), Y_(o)), p); + } + function Hn() { + return ri(u()); + } + function Pi(o) { + !o && t.getTokenFlags() & 26656 && Dt(!1); + let p = ri(u()); + return q.assert(p.kind === 16, "Template head has wrong token kind"), p; + } + function X_() { + let o = ri(u()); + return q.assert(o.kind === 17 || o.kind === 18, "Template fragment has wrong token kind"), o; + } + function Zl(o) { + let p = o === 15 || o === 18, m = t.getTokenText(); + return m.substring(1, m.length - (t.isUnterminated() ? 0 : p ? 1 : 2)); + } + function ri(o) { + let p = M(), m = Pd(o) ? y.createTemplateLiteralLikeNode(o, t.getTokenValue(), Zl(o), t.getTokenFlags() & 7176) : o === 9 ? E(t.getTokenValue(), t.getNumericLiteralFlags()) : o === 11 ? D(t.getTokenValue(), void 0, t.hasExtendedUnicodeEscape()) : Jg(o) ? R(o, t.getTokenValue()) : q.fail(); + return t.hasExtendedUnicodeEscape() && (m.hasExtendedUnicodeEscape = !0), t.isUnterminated() && (m.isUnterminated = !0), B(), P(m, p); + } + function ii() { + return Ur(!0, A.Type_expected); + } + function $_() { + if (!t.hasPrecedingLineBreak() && wt() === 30) return Rr(20, _t, 30, 32); + } + function ma() { + let o = M(); + return P(y.createTypeReferenceNode(ii(), $_()), o); + } + function _s(o) { + switch (o.kind) { + case 184: return Zi(o.typeName); + case 185: + case 186: { + let { parameters: p, type: m } = o; + return V_(p) || _s(m); + } + case 197: return _s(o.type); + default: return !1; + } + } + function eu(o) { + return B(), P(y.createTypePredicateNode(void 0, o, _t()), o.pos); + } + function os() { + let o = M(); + return B(), P(y.createThisTypeNode(), o); + } + function tu() { + let o = M(); + return B(), P(y.createJSDocAllType(), o); + } + function Q_() { + let o = M(); + return B(), P(y.createJSDocNonNullableType(bs(), !1), o); + } + function nu() { + let o = M(); + return B(), u() === 28 || u() === 20 || u() === 22 || u() === 32 || u() === 64 || u() === 52 ? P(y.createJSDocUnknownType(), o) : P(y.createJSDocNullableType(_t(), !1), o); + } + function K_() { + let o = M(), p = Ue(); + if (le(Gc)) { + let m = Xn(36), g = In(59, !1); + return Ce(P(y.createJSDocFunctionType(m, g), o), p); + } + return P(y.createTypeReferenceNode(jt(), void 0), o); + } + function cs() { + let o = M(), p; + return (u() === 110 || u() === 105) && (p = jt(), J(59)), P(y.createParameterDeclaration(void 0, void 0, p, void 0, ls(), void 0), o); + } + function ls() { + t.setSkipJsDocLeadingAsterisks(!0); + let o = M(); + if (Le(144)) { + let g = y.createJSDocNamepathType(void 0); + e: for (;;) switch (u()) { + case 20: + case 1: + case 28: + case 5: break e; + default: Be(); + } + return t.setSkipJsDocLeadingAsterisks(!1), P(g, o); + } + let p = Le(26), m = ba(); + return t.setSkipJsDocLeadingAsterisks(!1), p && (m = P(y.createJSDocVariadicType(m), o)), u() === 64 ? (B(), P(y.createJSDocOptionalType(m), o)) : m; + } + function Z_() { + let o = M(); + J(114); + let p = Ur(!0), m = t.hasPrecedingLineBreak() ? void 0 : Ca(); + return P(y.createTypeQueryNode(p, m), o); + } + function eo() { + let o = M(), p = On(!1, !0), m = gt(), g, b; + Le(96) && (ai() || !Tr() ? g = _t() : b = Xo()); + let N = Le(64) ? _t() : void 0, Q = y.createTypeParameterDeclaration(p, m, g, N); + return Q.expression = b, P(Q, o); + } + function pn() { + if (u() === 30) return Rr(19, eo, 30, 32); + } + function ha(o) { + return u() === 26 || Rs() || Yr(u()) || u() === 60 || ai(!o); + } + function to(o) { + let p = si(A.Private_identifiers_cannot_be_used_as_parameters); + return s2(p) === 0 && !Zt(o) && Yr(u()) && B(), p; + } + function no() { + return qe() || u() === 23 || u() === 19; + } + function us(o) { + return ps(o); + } + function ro(o) { + return ps(o, !1); + } + function ps(o, p = !0) { + let m = M(), g = Ue(), b = o ? U(() => On(!0)) : K(() => On(!0)); + if (u() === 110) { + let ee = y.createParameterDeclaration(b, void 0, or(!0), void 0, vr(), void 0), te = Hp(b); + return te && on(te, A.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters), Ce(P(ee, m), g); + } + let N = qt; + qt = !1; + let Q = pt(26); + if (!p && !no()) return; + let _e = Ce(P(y.createParameterDeclaration(b, Q, to(b), pt(58), vr(), xr()), m), g); + return qt = N, _e; + } + function In(o, p) { + if (io(o, p)) return gr(ba); + } + function io(o, p) { + return o === 39 ? (J(o), !0) : Le(59) ? !0 : p && u() === 39 ? (Ee(A._0_expected, nt(59)), B(), !0) : !1; + } + function fs(o, p) { + let m = we(), g = Ye(); + He(!!(o & 1)), st(!!(o & 2)); + let b = o & 32 ? un(17, cs) : un(16, () => p ? us(g) : ro(g)); + return He(m), st(g), b; + } + function Xn(o) { + if (!J(21)) return lr(); + let p = fs(o, !0); + return J(22), p; + } + function ya() { + Le(28) || Qt(); + } + function ao(o) { + let p = M(), m = Ue(); + o === 181 && J(105); + let g = pn(), b = Xn(4), N = In(59, !0); + ya(); + return Ce(P(o === 180 ? y.createCallSignature(g, b, N) : y.createConstructSignature(g, b, N), p), m); + } + function Br() { + return u() === 23 && H(ru); + } + function ru() { + if (B(), u() === 26 || u() === 24) return !0; + if (Yr(u())) { + if (B(), ve()) return !0; + } else if (ve()) B(); + else return !1; + return u() === 59 || u() === 28 ? !0 : u() !== 58 ? !1 : (B(), u() === 59 || u() === 28 || u() === 24); + } + function ds(o, p, m) { + let g = Rr(16, () => us(!1), 23, 24), b = vr(); + ya(); + return Ce(P(y.createIndexSignature(m, g, b), o), p); + } + function so(o, p, m) { + let g = jr(), b = pt(58), N; + if (u() === 21 || u() === 30) { + let Q = pn(), _e = Xn(4), ee = In(59, !0); + N = y.createMethodSignature(m, g, b, Q, _e, ee); + } else { + let Q = vr(); + N = y.createPropertySignature(m, g, b, Q), u() === 64 && (N.initializer = xr()); + } + return ya(), Ce(P(N, o), p); + } + function _o() { + if (u() === 21 || u() === 30 || u() === 139 || u() === 153) return !0; + let o = !1; + for (; Yr(u());) o = !0, B(); + return u() === 23 ? !0 : (br() && (o = !0, B()), o ? u() === 21 || u() === 30 || u() === 58 || u() === 59 || u() === 28 || _r() : !1); + } + function Ni() { + if (u() === 21 || u() === 30) return ao(180); + if (u() === 105 && H(oo)) return ao(181); + let o = M(), p = Ue(), m = On(!1); + return ti(139) ? _i(o, p, m, 178, 4) : ti(153) ? _i(o, p, m, 179, 4) : Br() ? ds(o, p, m) : so(o, p, m); + } + function oo() { + return B(), u() === 21 || u() === 30; + } + function co() { + return B() === 25; + } + function lo() { + switch (B()) { + case 21: + case 30: + case 25: return !0; + } + return !1; + } + function uo() { + let o = M(); + return P(y.createTypeLiteralNode(po()), o); + } + function po() { + let o; + return J(19) ? (o = bn(4, Ni), J(20)) : o = lr(), o; + } + function fo() { + return B(), u() === 40 || u() === 41 ? B() === 148 : (u() === 148 && B(), u() === 23 && Ci() && B() === 103); + } + function iu() { + let o = M(), p = jt(); + J(103); + let m = _t(); + return P(y.createTypeParameterDeclaration(void 0, p, m, void 0), o); + } + function mo() { + let o = M(); + J(19); + let p; + (u() === 148 || u() === 40 || u() === 41) && (p = Wt(), p.kind !== 148 && J(148)), J(23); + let m = iu(), g = Le(130) ? _t() : void 0; + J(24); + let b; + (u() === 58 || u() === 40 || u() === 41) && (b = Wt(), b.kind !== 58 && J(58)); + let N = vr(); + Qt(); + let Q = bn(4, Ni); + return J(20), P(y.createMappedTypeNode(p, m, g, b, N, Q), o); + } + function ho() { + let o = M(); + if (Le(26)) return P(y.createRestTypeNode(_t()), o); + let p = _t(); + if (th(p) && p.pos === p.type.pos) { + let m = y.createOptionalTypeNode(p.type); + return dn(m, p), m.flags = p.flags, m; + } + return p; + } + function ms() { + return B() === 59 || u() === 58 && B() === 59; + } + function au() { + return u() === 26 ? St(B()) && ms() : St(u()) && ms(); + } + function yo() { + if (H(au)) { + let o = M(), p = Ue(), m = pt(26), g = jt(), b = pt(58); + J(59); + let N = ho(); + return Ce(P(y.createNamedTupleMember(m, g, b, N), o), p); + } + return ho(); + } + function su() { + let o = M(); + return P(y.createTupleTypeNode(Rr(21, yo, 23, 24)), o); + } + function go() { + let o = M(); + J(21); + let p = _t(); + return J(22), P(y.createParenthesizedType(p), o); + } + function _u() { + let o; + if (u() === 128) { + let p = M(); + B(); + o = At([P(he(128), p)], p); + } + return o; + } + function hs() { + let o = M(), p = Ue(), m = _u(), g = Le(105); + q.assert(!m || g, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); + let b = pn(), N = Xn(4), Q = In(39, !1); + return Ce(P(g ? y.createConstructorTypeNode(m, b, N, Q) : y.createFunctionTypeNode(b, N, Q), o), p); + } + function bo() { + let o = Wt(); + return u() === 25 ? void 0 : o; + } + function ys(o) { + let p = M(); + o && B(); + let m = u() === 112 || u() === 97 || u() === 106 ? Wt() : ri(u()); + return o && (m = P(y.createPrefixUnaryExpression(41, m), p)), P(y.createLiteralTypeNode(m), p); + } + function ou() { + return B(), u() === 102; + } + function gs() { + ht |= 4194304; + let o = M(), p = Le(114); + J(102), J(21); + let m = _t(), g; + if (Le(28)) { + let Q = t.getTokenStart(); + J(19); + let _e = u(); + if (_e === 118 || _e === 132 ? B() : Ee(A._0_expected, nt(118)), J(59), g = Ys(_e, !0), Le(28), !J(20)) { + let ee = Ba(at); + ee && ee.code === A._0_expected.code && sl(ee, Oa(Mt, $e, Q, 1, A.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")); + } + } + J(22); + let b = Le(25) ? ii() : void 0, N = $_(); + return P(y.createImportTypeNode(m, g, b, N, p), o); + } + function vo() { + return B(), u() === 9 || u() === 10; + } + function bs() { + switch (u()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 155: + case 136: + case 157: + case 146: + case 151: return le(bo) || ma(); + case 67: t.reScanAsteriskEqualsToken(); + case 42: return tu(); + case 61: t.reScanQuestionToken(); + case 58: return nu(); + case 100: return K_(); + case 54: return Q_(); + case 15: + case 11: + case 9: + case 10: + case 112: + case 97: + case 106: return ys(); + case 41: return H(vo) ? ys(!0) : ma(); + case 116: return Wt(); + case 110: { + let o = os(); + return u() === 142 && !t.hasPrecedingLineBreak() ? eu(o) : o; + } + case 114: return H(ou) ? gs() : Z_(); + case 19: return H(fo) ? mo() : uo(); + case 23: return su(); + case 21: return go(); + case 102: return gs(); + case 131: return H(Ms) ? Po() : ma(); + case 16: return W_(); + default: return ma(); + } + } + function ai(o) { + switch (u()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 136: + case 148: + case 155: + case 158: + case 116: + case 157: + case 106: + case 110: + case 114: + case 146: + case 19: + case 23: + case 30: + case 52: + case 51: + case 105: + case 11: + case 9: + case 10: + case 112: + case 97: + case 151: + case 42: + case 58: + case 54: + case 26: + case 140: + case 102: + case 131: + case 15: + case 16: return !0; + case 100: return !o; + case 41: return !o && H(vo); + case 21: return !o && H(To); + default: return ve(); + } + } + function To() { + return B(), u() === 22 || ha(!1) || ai(); + } + function xo() { + let o = M(), p = bs(); + for (; !t.hasPrecedingLineBreak();) switch (u()) { + case 54: + B(), p = P(y.createJSDocNonNullableType(p, !0), o); + break; + case 58: + if (H(Di)) return p; + B(), p = P(y.createJSDocNullableType(p, !0), o); + break; + case 23: + if (J(23), ai()) { + let m = _t(); + J(24), p = P(y.createIndexedAccessTypeNode(p, m), o); + } else J(24), p = P(y.createArrayTypeNode(p), o); + break; + default: return p; + } + return p; + } + function So(o) { + let p = M(); + return J(o), P(y.createTypeOperatorNode(o, ko()), p); + } + function cu() { + if (Le(96)) { + let o = Nn(_t); + if (Ve() || u() !== 58) return o; + } + } + function wo() { + let o = M(), p = gt(), m = le(cu); + return P(y.createTypeParameterDeclaration(void 0, p, m), o); + } + function lu() { + let o = M(); + return J(140), P(y.createInferTypeNode(wo()), o); + } + function ko() { + let o = u(); + switch (o) { + case 143: + case 158: + case 148: return So(o); + case 140: return lu(); + } + return gr(xo); + } + function ga(o) { + if (Ts()) { + let p = hs(), m; + return Pf(p) ? m = o ? A.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type : A.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type : m = o ? A.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type : A.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type, on(p, m), p; + } + } + function Eo(o, p, m) { + let g = M(), b = o === 52, N = Le(o), Q = N && ga(b) || p(); + if (u() === o || N) { + let _e = [Q]; + for (; Le(o);) _e.push(ga(b) || p()); + Q = P(m(At(_e, g)), g); + } + return Q; + } + function vs() { + return Eo(51, ko, y.createIntersectionTypeNode); + } + function uu() { + return Eo(52, vs, y.createUnionTypeNode); + } + function Ao() { + return B(), u() === 105; + } + function Ts() { + return u() === 30 || u() === 21 && H(Co) ? !0 : u() === 105 || u() === 128 && H(Ao); + } + function pu() { + if (Yr(u()) && On(!1), ve() || u() === 110) return B(), !0; + if (u() === 23 || u() === 19) { + let o = at.length; + return si(), o === at.length; + } + return !1; + } + function Co() { + return B(), !!(u() === 22 || u() === 26 || pu() && (u() === 59 || u() === 28 || u() === 58 || u() === 64 || u() === 22 && (B(), u() === 39))); + } + function ba() { + let o = M(), p = ve() && le(Do), m = _t(); + return p ? P(y.createTypePredicateNode(void 0, p, m), o) : m; + } + function Do() { + let o = gt(); + if (u() === 142 && !t.hasPrecedingLineBreak()) return B(), o; + } + function Po() { + let o = M(), p = Yn(131), m = u() === 110 ? os() : gt(), g = Le(142) ? _t() : void 0; + return P(y.createTypePredicateNode(p, m, g), o); + } + function _t() { + if (tt & 81920) return Ct(81920, _t); + if (Ts()) return hs(); + let o = M(), p = uu(); + if (!Ve() && !t.hasPrecedingLineBreak() && Le(96)) { + let m = Nn(_t); + J(58); + let g = gr(_t); + J(59); + let b = gr(_t); + return P(y.createConditionalTypeNode(p, m, g, b), o); + } + return p; + } + function vr() { + return Le(59) ? _t() : void 0; + } + function xs() { + switch (u()) { + case 110: + case 108: + case 106: + case 112: + case 97: + case 9: + case 10: + case 11: + case 15: + case 16: + case 21: + case 23: + case 19: + case 100: + case 86: + case 105: + case 44: + case 69: + case 80: return !0; + case 102: return H(lo); + default: return ve(); + } + } + function Tr() { + if (xs()) return !0; + switch (u()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 46: + case 47: + case 30: + case 135: + case 127: + case 81: + case 60: return !0; + default: return Fo() ? !0 : ve(); + } + } + function No() { + return u() !== 19 && u() !== 100 && u() !== 86 && u() !== 60 && Tr(); + } + function kt() { + let o = Ze(); + o && Qe(!1); + let p = M(), m = zt(!0), g; + for (; g = pt(28);) m = ks(m, g, zt(!0), p); + return o && Qe(!0), m; + } + function xr() { + return Le(64) ? zt(!0) : void 0; + } + function zt(o) { + if (Io()) return Oo(); + let p = du(o) || Ro(o); + if (p) return p; + let m = M(), g = Ue(), b = Ii(0); + return b.kind === 80 && u() === 39 ? Mo(m, b, o, g, void 0) : Fa(b) && b1(ze()) ? ks(b, Wt(), zt(o), m) : mu(b, m, o); + } + function Io() { + return u() === 127 ? we() ? !0 : H(Ls) : !1; + } + function fu() { + return B(), !t.hasPrecedingLineBreak() && ve(); + } + function Oo() { + let o = M(); + return B(), !t.hasPrecedingLineBreak() && (u() === 42 || Tr()) ? P(y.createYieldExpression(pt(42), zt(!0)), o) : P(y.createYieldExpression(void 0, void 0), o); + } + function Mo(o, p, m, g, b) { + q.assert(u() === 39, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + let N = y.createParameterDeclaration(void 0, void 0, p, void 0, void 0, void 0); + P(N, p.pos); + let Q = At([N], N.pos, N.end), _e = Yn(39), ee = Ss(!!b, m); + return Ce(P(y.createArrowFunction(b, void 0, Q, void 0, _e, ee), o), g); + } + function du(o) { + let p = Lo(); + if (p !== 0) return p === 1 ? Bo(!0, !0) : le(() => jo(o)); + } + function Lo() { + return u() === 21 || u() === 30 || u() === 134 ? H(Jo) : u() === 39 ? 1 : 0; + } + function Jo() { + if (u() === 134 && (B(), t.hasPrecedingLineBreak() || u() !== 21 && u() !== 30)) return 0; + let o = u(), p = B(); + if (o === 21) { + if (p === 22) switch (B()) { + case 39: + case 59: + case 19: return 1; + default: return 0; + } + if (p === 23 || p === 19) return 2; + if (p === 26) return 1; + if (Yr(p) && p !== 134 && H(Ci)) return B() === 130 ? 0 : 1; + if (!ve() && p !== 110) return 0; + switch (B()) { + case 59: return 1; + case 58: return B(), u() === 59 || u() === 28 || u() === 64 || u() === 22 ? 1 : 0; + case 28: + case 64: + case 22: return 2; + } + return 0; + } else return q.assert(o === 30), !ve() && u() !== 87 ? 0 : ot === 1 ? H(() => { + Le(87); + let g = B(); + if (g === 96) switch (B()) { + case 64: + case 32: + case 44: return !1; + default: return !0; + } + else if (g === 28 || g === 64) return !0; + return !1; + }) ? 1 : 0 : 2; + } + function jo(o) { + let p = t.getTokenStart(); + if (_n?.has(p)) return; + let m = Bo(!1, o); + return m || (_n || (_n = /* @__PURE__ */ new Set())).add(p), m; + } + function Ro(o) { + if (u() === 134 && H(Uo) === 1) { + let p = M(), m = Ue(), g = Uc(); + return Mo(p, Ii(0), o, m, g); + } + } + function Uo() { + if (u() === 134) { + if (B(), t.hasPrecedingLineBreak() || u() === 39) return 0; + let o = Ii(0); + if (!t.hasPrecedingLineBreak() && o.kind === 80 && u() === 39) return 1; + } + return 0; + } + function Bo(o, p) { + let m = M(), g = Ue(), b = Uc(), N = Zt(b, cl) ? 2 : 0, Q = pn(), _e; + if (J(21)) { + if (o) _e = fs(N, o); + else { + let ur = fs(N, o); + if (!ur) return; + _e = ur; + } + if (!J(22) && !o) return; + } else { + if (!o) return; + _e = lr(); + } + let ee = u() === 59, te = In(59, !1); + if (te && !o && _s(te)) return; + let ce = te; + for (; ce?.kind === 197;) ce = ce.type; + let je = ce && nh(ce); + if (!o && u() !== 39 && (je || u() !== 19)) return; + let Je = u(), De = Yn(39), Ht = Je === 39 || Je === 19 ? Ss(Zt(b, cl), p) : gt(); + if (!p && ee && u() !== 59) return; + return Ce(P(y.createArrowFunction(b, Q, _e, te, De, Ht), m), g); + } + function Ss(o, p) { + if (u() === 19) return wa(o ? 2 : 0); + if (u() !== 27 && u() !== 100 && u() !== 86 && xc() && !No()) return wa(16 | (o ? 2 : 0)); + let m = we(); + He(!1); + let g = qt; + qt = !1; + let b = o ? U(() => zt(p)) : K(() => zt(p)); + return qt = g, He(m), b; + } + function mu(o, p, m) { + let g = pt(58); + if (!g) return o; + let b; + return P(y.createConditionalExpression(o, g, Ct(a, () => zt(!1)), b = Yn(59), Rp(b) ? zt(m) : Gt(80, !1, A._0_expected, nt(59))), p); + } + function Ii(o) { + let p = M(); + return ws(o, Xo(), p); + } + function qo(o) { + return o === 103 || o === 165; + } + function ws(o, p, m) { + for (;;) { + ze(); + let g = Sp(u()); + if (!(u() === 43 ? g >= o : g > o) || u() === 103 && me()) break; + if (u() === 130 || u() === 152) { + if (t.hasPrecedingLineBreak()) break; + { + let N = u(); + B(), p = N === 152 ? zo(p, _t()) : Vo(p, _t()); + } + } else p = ks(p, Wt(), Ii(g), m); + } + return p; + } + function Fo() { + return me() && u() === 103 ? !1 : Sp(u()) > 0; + } + function zo(o, p) { + return P(y.createSatisfiesExpression(o, p), o.pos); + } + function ks(o, p, m, g) { + return P(y.createBinaryExpression(o, p, m), g); + } + function Vo(o, p) { + return P(y.createAsExpression(o, p), o.pos); + } + function Wo() { + let o = M(); + return P(y.createPrefixUnaryExpression(u(), Me(Sr)), o); + } + function Go() { + let o = M(); + return P(y.createDeleteExpression(Me(Sr)), o); + } + function hu() { + let o = M(); + return P(y.createTypeOfExpression(Me(Sr)), o); + } + function Yo() { + let o = M(); + return P(y.createVoidExpression(Me(Sr)), o); + } + function yu() { + return u() === 135 ? Ye() ? !0 : H(Ls) : !1; + } + function Ho() { + let o = M(); + return P(y.createAwaitExpression(Me(Sr)), o); + } + function Xo() { + if (gu()) { + let m = M(), g = va(); + return u() === 43 ? ws(Sp(u()), g, m) : g; + } + let o = u(), p = Sr(); + if (u() === 43) { + let m = Cr($e, p.pos), { end: g } = p; + p.kind === 217 ? rt(m, g, A.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses) : (q.assert(xp(o)), rt(m, g, A.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, nt(o))); + } + return p; + } + function Sr() { + switch (u()) { + case 40: + case 41: + case 55: + case 54: return Wo(); + case 91: return Go(); + case 114: return hu(); + case 116: return Yo(); + case 30: return ot === 1 ? Mi(!0, void 0, void 0, !0) : ec(); + case 135: if (yu()) return Ho(); + default: return va(); + } + } + function gu() { + switch (u()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 135: return !1; + case 30: if (ot !== 1) return !1; + default: return !0; + } + } + function va() { + if (u() === 46 || u() === 47) { + let p = M(); + return P(y.createPrefixUnaryExpression(u(), Me(Oi)), p); + } else if (ot === 1 && u() === 30 && H(O_)) return Mi(!0); + let o = Oi(); + if (q.assert(Fa(o)), (u() === 46 || u() === 47) && !t.hasPrecedingLineBreak()) { + let p = u(); + return B(), P(y.createPostfixUnaryExpression(o, p), o.pos); + } + return o; + } + function Oi() { + let o = M(), p; + return u() === 102 ? H(oo) ? (ht |= 4194304, p = Wt()) : H(co) ? (B(), B(), p = P(y.createMetaProperty(102, jt()), o), p.name.escapedText === "defer" ? (u() === 21 || u() === 30) && (ht |= 4194304) : ht |= 8388608) : p = Ta() : p = u() === 108 ? $o() : Ta(), Ps(o, p); + } + function Ta() { + return rn(M(), Ns(), !0); + } + function $o() { + let o = M(), p = Wt(); + if (u() === 30) { + let m = M(), g = le(Sa); + g !== void 0 && (rt(m, M(), A.super_may_not_use_type_arguments), vn() || (p = y.createExpressionWithTypeArguments(p, g))); + } + return u() === 21 || u() === 25 || u() === 23 ? p : (Yn(25, A.super_must_be_followed_by_an_argument_list_or_member_access), P(ae(p, ni(!0, !0, !0)), o)); + } + function Mi(o, p, m, g = !1) { + let b = M(), N = Tu(o), Q; + if (N.kind === 287) { + let _e = xa(N), ee, te = _e[_e.length - 1]; + if (te?.kind === 285 && !pi(te.openingElement.tagName, te.closingElement.tagName) && pi(N.tagName, te.closingElement.tagName)) { + let ce = te.children.end, je = P(y.createJsxElement(te.openingElement, te.children, P(y.createJsxClosingElement(P(ue(""), ce, ce)), ce, ce)), te.openingElement.pos, ce); + _e = At([..._e.slice(0, _e.length - 1), je], _e.pos, ce), ee = te.closingElement; + } else ee = Zo(N, o), pi(N.tagName, ee.tagName) || (m && Fp(m) && pi(ee.tagName, m.tagName) ? on(N.tagName, A.JSX_element_0_has_no_corresponding_closing_tag, r_($e, N.tagName)) : on(ee.tagName, A.Expected_corresponding_JSX_closing_tag_for_0, r_($e, N.tagName))); + Q = P(y.createJsxElement(N, _e, ee), b); + } else N.kind === 290 ? Q = P(y.createJsxFragment(N, xa(N), ku(o)), b) : (q.assert(N.kind === 286), Q = N); + if (!g && o && u() === 30) { + let _e = typeof p > "u" ? Q.pos : p, ee = le(() => Mi(!0, _e)); + if (ee) { + let te = Gt(28, !1); + return qd(te, ee.pos, 0), rt(Cr($e, _e), ee.end, A.JSX_expressions_must_have_one_parent_element), P(y.createBinaryExpression(Q, te, ee), b); + } + } + return Q; + } + function Es() { + let o = M(), p = y.createJsxText(t.getTokenValue(), ct === 13); + return ct = t.scanJsxToken(), P(p, o); + } + function bu(o, p) { + switch (p) { + case 1: + if (n6(o)) on(o, A.JSX_fragment_has_no_corresponding_closing_tag); + else { + let m = o.tagName; + rt(Math.min(Cr($e, m.pos), m.end), m.end, A.JSX_element_0_has_no_corresponding_closing_tag, r_($e, o.tagName)); + } + return; + case 31: + case 7: return; + case 12: + case 13: return Es(); + case 19: return Qo(!1); + case 30: return Mi(!1, void 0, o); + default: return q.assertNever(p); + } + } + function xa(o) { + let p = [], m = M(), g = yt; + for (yt |= 16384;;) { + let b = bu(o, ct = t.reScanJsxToken()); + if (!b || (p.push(b), Fp(o) && b?.kind === 285 && !pi(b.openingElement.tagName, b.closingElement.tagName) && pi(o.tagName, b.closingElement.tagName))) break; + } + return yt = g, At(p, m); + } + function vu() { + let o = M(); + return P(y.createJsxAttributes(bn(13, Ko)), o); + } + function Tu(o) { + let p = M(); + if (J(30), u() === 32) return Gn(), P(y.createJsxOpeningFragment(), p); + let m = As(), g = (tt & 524288) === 0 ? Ca() : void 0, b = vu(), N; + return u() === 32 ? (Gn(), N = y.createJsxOpeningElement(m, g, b)) : (J(44), J(32, void 0, !1) && (o ? B() : Gn()), N = y.createJsxSelfClosingElement(m, g, b)), P(N, p); + } + function As() { + let o = M(), p = xu(); + if (Q1(p)) return p; + let m = p; + for (; Le(25);) m = P(ae(m, ni(!0, !1, !1)), o); + return m; + } + function xu() { + let o = M(); + Ft(); + let p = u() === 110, m = ei(); + return Le(59) ? (Ft(), P(y.createJsxNamespacedName(m, ei()), o)) : p ? P(y.createToken(110), o) : m; + } + function Qo(o) { + let p = M(); + if (!J(19)) return; + let m, g; + return u() !== 20 && (o || (m = pt(26)), g = kt()), o ? J(20) : J(20, void 0, !1) && Gn(), P(y.createJsxExpression(m, g), p); + } + function Ko() { + if (u() === 19) return wu(); + let o = M(); + return P(y.createJsxAttribute(Su(), Cs()), o); + } + function Cs() { + if (u() === 64) { + if (ki() === 11) return Hn(); + if (u() === 19) return Qo(!0); + if (u() === 30) return Mi(!0); + Ee(A.or_JSX_element_expected); + } + } + function Su() { + let o = M(); + Ft(); + let p = ei(); + return Le(59) ? (Ft(), P(y.createJsxNamespacedName(p, ei()), o)) : p; + } + function wu() { + let o = M(); + J(19), J(26); + let p = kt(); + return J(20), P(y.createJsxSpreadAttribute(p), o); + } + function Zo(o, p) { + let m = M(); + J(31); + let g = As(); + return J(32, void 0, !1) && (p || !pi(o.tagName, g) ? B() : Gn()), P(y.createJsxClosingElement(g), m); + } + function ku(o) { + let p = M(); + return J(31), J(32, A.Expected_corresponding_closing_tag_for_JSX_fragment, !1) && (o ? B() : Gn()), P(y.createJsxJsxClosingFragment(), p); + } + function ec() { + q.assert(ot !== 1, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments."); + let o = M(); + J(30); + let p = _t(); + J(32); + let m = Sr(); + return P(y.createTypeAssertion(p, m), o); + } + function Eu() { + return B(), St(u()) || u() === 23 || vn(); + } + function tc() { + return u() === 29 && H(Eu); + } + function Ds(o) { + if (o.flags & 64) return !0; + if (fl(o)) { + let p = o.expression; + for (; fl(p) && !(p.flags & 64);) p = p.expression; + if (p.flags & 64) { + for (; fl(o);) o.flags |= 64, o = o.expression; + return !0; + } + } + return !1; + } + function nc(o, p, m) { + let g = ni(!0, !0, !0), b = m || Ds(p), N = b ? Oe(p, m, g) : ae(p, g); + if (b && gi(N.name) && on(N.name, A.An_optional_chain_cannot_contain_private_identifiers), G1(p) && p.typeArguments) rt(p.typeArguments.pos - 1, Cr($e, p.typeArguments.end) + 1, A.An_instantiation_expression_cannot_be_followed_by_a_property_access); + return P(N, o); + } + function Au(o, p, m) { + let g; + if (u() === 24) g = Gt(80, !0, A.An_element_access_expression_should_take_an_argument); + else { + let N = lt(kt); + Al(N) && (N.text = Jr(N.text)), g = N; + } + J(24); + return P(m || Ds(p) ? oe(p, m, g) : V(p, g), o); + } + function rn(o, p, m) { + for (;;) { + let g, b = !1; + if (m && tc() ? (g = Yn(29), b = St(u())) : b = Le(25), b) { + p = nc(o, p, g); + continue; + } + if ((g || !Ze()) && Le(23)) { + p = Au(o, p, g); + continue; + } + if (vn()) { + p = !g && p.kind === 234 ? qr(o, p.expression, g, p.typeArguments) : qr(o, p, g, void 0); + continue; + } + if (!g) { + if (u() === 54 && !t.hasPrecedingLineBreak()) { + B(), p = P(y.createNonNullExpression(p), o); + continue; + } + let N = le(Sa); + if (N) { + p = P(y.createExpressionWithTypeArguments(p, N), o); + continue; + } + } + return p; + } + } + function vn() { + return u() === 15 || u() === 16; + } + function qr(o, p, m, g) { + let b = y.createTaggedTemplateExpression(p, g, u() === 15 ? (Dt(!0), Hn()) : da(!0)); + return (m || p.flags & 64) && (b.flags |= 64), b.questionDotToken = m, P(b, o); + } + function Ps(o, p) { + for (;;) { + p = rn(o, p, !0); + let m, g = pt(29); + if (g && (m = le(Sa), vn())) { + p = qr(o, p, g, m); + continue; + } + if (m || u() === 21) { + !g && p.kind === 234 && (m = p.typeArguments, p = p.expression); + let b = rc(); + p = P(g || Ds(p) ? ft(p, g, m, b) : Y(p, m, b), o); + continue; + } + if (g) { + let b = Gt(80, !1, A.Identifier_expected); + p = P(Oe(p, g, b), o); + } + break; + } + return p; + } + function rc() { + J(21); + let o = un(11, sc); + return J(22), o; + } + function Sa() { + if ((tt & 524288) !== 0 || wt() !== 30) return; + B(); + let o = un(20, _t); + if (ze() === 32) return B(), o && Cu() ? o : void 0; + } + function Cu() { + switch (u()) { + case 21: + case 15: + case 16: return !0; + case 30: + case 32: + case 40: + case 41: return !1; + } + return t.hasPrecedingLineBreak() || Fo() || !Tr(); + } + function Ns() { + switch (u()) { + case 15: t.getTokenFlags() & 26656 && Dt(!1); + case 9: + case 10: + case 11: return Hn(); + case 110: + case 108: + case 106: + case 112: + case 97: return Wt(); + case 21: return Du(); + case 23: return _c(); + case 19: return Is(); + case 134: + if (!H(Tc)) break; + return Os(); + case 60: return Xu(); + case 86: return $u(); + case 100: return Os(); + case 105: return cc(); + case 44: + case 69: + if (Xe() === 14) return Hn(); + break; + case 16: return da(!1); + case 81: return ca(); + } + return gt(A.Expression_expected); + } + function Du() { + let o = M(), p = Ue(); + J(21); + let m = lt(kt); + return J(22), Ce(P(mn(m), o), p); + } + function ic() { + let o = M(); + J(26); + let p = zt(!0); + return P(y.createSpreadElement(p), o); + } + function ac() { + return u() === 26 ? ic() : u() === 28 ? P(y.createOmittedExpression(), M()) : zt(!0); + } + function sc() { + return Ct(a, ac); + } + function _c() { + let o = M(), p = t.getTokenStart(), m = J(23), g = t.hasPrecedingLineBreak(), b = un(15, ac); + return Lr(23, 24, m, p), P(de(b, g), o); + } + function oc() { + let o = M(), p = Ue(); + if (pt(26)) { + let ce = zt(!0); + return Ce(P(y.createSpreadAssignment(ce), o), p); + } + let m = On(!0); + if (ti(139)) return _i(o, p, m, 178, 0); + if (ti(153)) return _i(o, p, m, 179, 0); + let g = pt(42), b = ve(), N = jr(), Q = pt(58), _e = pt(54); + if (g || u() === 21 || u() === 30) return Lc(o, p, m, g, N, Q, _e); + let ee; + if (b && u() !== 59) { + let ce = pt(64), je = ce ? lt(() => zt(!0)) : void 0; + ee = y.createShorthandPropertyAssignment(N, je), ee.equalsToken = ce; + } else { + J(59); + let ce = lt(() => zt(!0)); + ee = y.createPropertyAssignment(N, ce); + } + return ee.modifiers = m, ee.questionToken = Q, ee.exclamationToken = _e, Ce(P(ee, o), p); + } + function Is() { + let o = M(), p = t.getTokenStart(), m = J(19), g = t.hasPrecedingLineBreak(), b = un(12, oc, !0); + return Lr(19, 20, m, p), P(O(b, g), o); + } + function Os() { + let o = Ze(); + Qe(!1); + let p = M(), m = Ue(), g = On(!1); + J(100); + let b = pt(42), N = b ? 1 : 0, Q = Zt(g, cl) ? 2 : 0, _e = N && Q ? Z(Li) : N ? Wn(Li) : Q ? U(Li) : Li(), ee = pn(), te = Xn(N | Q), ce = In(59, !1), je = wa(N | Q); + Qe(o); + return Ce(P(y.createFunctionExpression(g, b, _e, ee, te, ce, je), p), m); + } + function Li() { + return qe() ? Ka() : void 0; + } + function cc() { + let o = M(); + if (J(105), Le(25)) { + let N = jt(); + return P(y.createMetaProperty(105, N), o); + } + let m = rn(M(), Ns(), !1), g; + m.kind === 234 && (g = m.typeArguments, m = m.expression), u() === 29 && Ee(A.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, r_($e, m)); + let b = u() === 21 ? rc() : void 0; + return P(nr(m, g, b), o); + } + function Fr(o, p) { + let m = M(), g = Ue(), b = t.getTokenStart(), N = J(19, p); + if (N || o) { + let Q = t.hasPrecedingLineBreak(), _e = bn(1, Yt); + Lr(19, 20, N, b); + let ee = Ce(P(rr(_e, Q), m), g); + return u() === 64 && (Ee(A.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses), B()), ee; + } else return Ce(P(rr(lr(), void 0), m), g); + } + function wa(o, p) { + let m = we(); + He(!!(o & 1)); + let g = Ye(); + st(!!(o & 2)); + let b = qt; + qt = !1; + let N = Ze(); + N && Qe(!1); + let Q = Fr(!!(o & 16), p); + return N && Qe(!0), qt = b, He(m), st(g), Q; + } + function lc() { + let o = M(), p = Ue(); + return J(27), Ce(P(y.createEmptyStatement(), o), p); + } + function Pu() { + let o = M(), p = Ue(); + J(101); + let m = t.getTokenStart(), g = J(21), b = lt(kt); + Lr(21, 22, g, m); + return Ce(P(We(b, Yt(), Le(93) ? Yt() : void 0), o), p); + } + function uc() { + let o = M(), p = Ue(); + J(92); + let m = Yt(); + J(117); + let g = t.getTokenStart(), b = J(21), N = lt(kt); + return Lr(21, 22, b, g), Le(27), Ce(P(y.createDoStatement(m, N), o), p); + } + function Nu() { + let o = M(), p = Ue(); + J(117); + let m = t.getTokenStart(), g = J(21), b = lt(kt); + Lr(21, 22, g, m); + return Ce(P(ir(b, Yt()), o), p); + } + function pc() { + let o = M(), p = Ue(); + J(99); + let m = pt(135); + J(21); + let g; + u() !== 27 && (u() === 115 || u() === 121 || u() === 87 || u() === 160 && H(wc) || u() === 135 && H(Js) ? g = Ic(!0) : g = Mr(kt)); + let b; + if (m ? J(165) : Le(165)) { + let N = lt(() => zt(!0)); + J(22), b = Ot(m, g, N, Yt()); + } else if (Le(103)) { + let N = lt(kt); + J(22), b = y.createForInStatement(g, N, Yt()); + } else { + J(27); + let N = u() !== 27 && u() !== 22 ? lt(kt) : void 0; + J(27); + let Q = u() !== 22 ? lt(kt) : void 0; + J(22), b = Ir(g, N, Q, Yt()); + } + return Ce(P(b, o), p); + } + function fc(o) { + let p = M(), m = Ue(); + J(o === 253 ? 83 : 88); + let g = _r() ? void 0 : gt(); + Qt(); + return Ce(P(o === 253 ? y.createBreakStatement(g) : y.createContinueStatement(g), p), m); + } + function dc() { + let o = M(), p = Ue(); + J(107); + let m = _r() ? void 0 : lt(kt); + return Qt(), Ce(P(y.createReturnStatement(m), o), p); + } + function Iu() { + let o = M(), p = Ue(); + J(118); + let m = t.getTokenStart(), g = J(21), b = lt(kt); + Lr(21, 22, g, m); + let N = Tt(67108864, Yt); + return Ce(P(y.createWithStatement(b, N), o), p); + } + function mc() { + let o = M(), p = Ue(); + J(84); + let m = lt(kt); + J(59); + let g = bn(3, Yt); + return Ce(P(y.createCaseClause(m, g), o), p); + } + function Ou() { + let o = M(); + J(90), J(59); + let p = bn(3, Yt); + return P(y.createDefaultClause(p), o); + } + function Mu() { + return u() === 84 ? mc() : Ou(); + } + function hc() { + let o = M(); + J(19); + let p = bn(2, Mu); + return J(20), P(y.createCaseBlock(p), o); + } + function Lu() { + let o = M(), p = Ue(); + J(109), J(21); + let m = lt(kt); + J(22); + let g = hc(); + return Ce(P(y.createSwitchStatement(m, g), o), p); + } + function yc() { + let o = M(), p = Ue(); + J(111); + let m = t.hasPrecedingLineBreak() ? void 0 : lt(kt); + return m === void 0 && (yn++, m = P(ue(""), M())), oa() || xt(m), Ce(P(y.createThrowStatement(m), o), p); + } + function Ju() { + let o = M(), p = Ue(); + J(113); + let m = Fr(!1), g = u() === 85 ? gc() : void 0, b; + return (!g || u() === 98) && (J(98, A.catch_or_finally_expected), b = Fr(!1)), Ce(P(y.createTryStatement(m, g, b), o), p); + } + function gc() { + let o = M(); + J(85); + let p; + Le(21) ? (p = Ea(), J(22)) : p = void 0; + let m = Fr(!1); + return P(y.createCatchClause(p, m), o); + } + function ju() { + let o = M(), p = Ue(); + return J(89), Qt(), Ce(P(y.createDebuggerStatement(), o), p); + } + function bc() { + let o = M(), p = Ue(), m, g = u() === 21, b = lt(kt); + return Ke(b) && Le(59) ? m = y.createLabeledStatement(b, Yt()) : (oa() || xt(b), m = Dn(b), g && (p = !1)), Ce(P(m, o), p); + } + function Ms() { + return B(), St(u()) && !t.hasPrecedingLineBreak(); + } + function vc() { + return B(), u() === 86 && !t.hasPrecedingLineBreak(); + } + function Tc() { + return B(), u() === 100 && !t.hasPrecedingLineBreak(); + } + function Ls() { + return B(), (St(u()) || u() === 9 || u() === 10 || u() === 11) && !t.hasPrecedingLineBreak(); + } + function Ru() { + for (;;) switch (u()) { + case 115: + case 121: + case 87: + case 100: + case 86: + case 94: return !0; + case 160: return kc(); + case 135: return js(); + case 120: + case 156: + case 166: return fu(); + case 144: + case 145: return Fu(); + case 128: + case 129: + case 134: + case 138: + case 123: + case 124: + case 125: + case 148: + let o = u(); + if (B(), t.hasPrecedingLineBreak()) return !1; + if (o === 138 && u() === 156) return !0; + continue; + case 162: return B(), u() === 19 || u() === 80 || u() === 95; + case 102: return B(), u() === 166 || u() === 11 || u() === 42 || u() === 19 || St(u()); + case 95: + let p = B(); + if (p === 156 && (p = H(B)), p === 64 || p === 42 || p === 19 || p === 90 || p === 130 || p === 60) return !0; + continue; + case 126: + B(); + continue; + default: return !1; + } + } + function Ji() { + return H(Ru); + } + function xc() { + switch (u()) { + case 60: + case 27: + case 19: + case 115: + case 121: + case 160: + case 100: + case 86: + case 94: + case 101: + case 92: + case 117: + case 99: + case 88: + case 83: + case 107: + case 118: + case 109: + case 111: + case 113: + case 89: + case 85: + case 98: return !0; + case 102: return Ji() || H(lo); + case 87: + case 95: return Ji(); + case 134: + case 138: + case 120: + case 144: + case 145: + case 156: + case 162: + case 166: return !0; + case 129: + case 125: + case 123: + case 124: + case 126: + case 148: return Ji() || !H(Ms); + default: return Tr(); + } + } + function Sc() { + return B(), qe() || u() === 19 || u() === 23; + } + function Uu() { + return H(Sc); + } + function wc() { + return ka(!0); + } + function Bu() { + return B(), u() === 64 || u() === 27 || u() === 59; + } + function ka(o) { + return B(), o && u() === 165 ? H(Bu) : (qe() || u() === 19) && !t.hasPrecedingLineBreak(); + } + function kc() { + return H(ka); + } + function Js(o) { + return B() === 160 ? ka(o) : !1; + } + function js() { + return H(Js); + } + function Yt() { + switch (u()) { + case 27: return lc(); + case 19: return Fr(!1); + case 115: return Ui(M(), Ue(), void 0); + case 121: + if (Uu()) return Ui(M(), Ue(), void 0); + break; + case 135: + if (js()) return Ui(M(), Ue(), void 0); + break; + case 160: + if (kc()) return Ui(M(), Ue(), void 0); + break; + case 100: return Us(M(), Ue(), void 0); + case 86: return Fs(M(), Ue(), void 0); + case 101: return Pu(); + case 92: return uc(); + case 117: return Nu(); + case 99: return pc(); + case 88: return fc(252); + case 83: return fc(253); + case 107: return dc(); + case 118: return Iu(); + case 109: return Lu(); + case 111: return yc(); + case 113: + case 85: + case 98: return Ju(); + case 89: return ju(); + case 60: return ji(); + case 134: + case 120: + case 156: + case 144: + case 145: + case 138: + case 87: + case 94: + case 95: + case 102: + case 123: + case 124: + case 125: + case 128: + case 129: + case 126: + case 148: + case 162: + if (Ji()) return ji(); + break; + } + return bc(); + } + function Ec(o) { + return o.kind === 138; + } + function ji() { + let o = M(), p = Ue(), m = On(!0); + if (Zt(m, Ec)) { + let b = qu(o); + if (b) return b; + for (let N of m) N.flags |= 33554432; + return Tt(33554432, () => Ac(o, p, m)); + } else return Ac(o, p, m); + } + function qu(o) { + return Tt(33554432, () => { + let p = pa(yt, o); + if (p) return J_(p); + }); + } + function Ac(o, p, m) { + switch (u()) { + case 115: + case 121: + case 87: + case 160: + case 135: return Ui(o, p, m); + case 100: return Us(o, p, m); + case 86: return Fs(o, p, m); + case 120: return ep(o, p, m); + case 156: return tp(o, p, m); + case 94: return np(o, p, m); + case 162: + case 144: + case 145: return rp(o, p, m); + case 102: return Bi(o, p, m); + case 95: switch (B(), u()) { + case 90: + case 64: return Kc(o, p, m); + case 130: return sp(o, p, m); + default: return Qc(o, p, m); + } + default: + if (m) { + let g = Gt(283, !0, A.Declaration_expected); + return Bp(g, o), g.modifiers = m, g; + } + return; + } + } + function Cc() { + return B() === 11; + } + function Dc() { + return B(), u() === 161 || u() === 64; + } + function Fu() { + return B(), !t.hasPrecedingLineBreak() && (ve() || u() === 11); + } + function Ri(o, p) { + if (u() !== 19) { + if (o & 4) { + ya(); + return; + } + if (_r()) { + Qt(); + return; + } + } + return wa(o, p); + } + function zu() { + let o = M(); + if (u() === 28) return P(y.createOmittedExpression(), o); + let p = pt(26), m = si(), g = xr(); + return P(y.createBindingElement(p, void 0, m, g), o); + } + function Pc() { + let o = M(), p = pt(26), m = qe(), g = jr(), b; + m && u() !== 59 ? (b = g, g = void 0) : (J(59), b = si()); + let N = xr(); + return P(y.createBindingElement(p, g, b, N), o); + } + function Vu() { + let o = M(); + J(19); + let p = lt(() => un(9, Pc)); + return J(20), P(y.createObjectBindingPattern(p), o); + } + function Nc() { + let o = M(); + J(23); + let p = lt(() => un(10, zu)); + return J(24), P(y.createArrayBindingPattern(p), o); + } + function Rs() { + return u() === 19 || u() === 23 || u() === 81 || qe(); + } + function si(o) { + return u() === 23 ? Nc() : u() === 19 ? Vu() : Ka(o); + } + function Wu() { + return Ea(!0); + } + function Ea(o) { + let p = M(), m = Ue(), g = si(A.Private_identifiers_are_not_allowed_in_variable_declarations), b; + o && g.kind === 80 && u() === 54 && !t.hasPrecedingLineBreak() && (b = Wt()); + let N = vr(), Q = qo(u()) ? void 0 : xr(); + return Ce(P(Bn(g, b, N, Q), p), m); + } + function Ic(o) { + let p = M(), m = 0; + switch (u()) { + case 115: break; + case 121: + m |= 1; + break; + case 87: + m |= 2; + break; + case 160: + m |= 4; + break; + case 135: + q.assert(js()), m |= 6, B(); + break; + default: q.fail(); + } + B(); + let g; + if (u() === 165 && H(Oc)) g = lr(); + else { + let b = me(); + Te(o), g = un(8, o ? Ea : Wu), Te(b); + } + return P(Pn(g, m), p); + } + function Oc() { + return Ci() && B() === 22; + } + function Ui(o, p, m) { + let g = Ic(!1); + Qt(); + return Ce(P(hn(m, g), o), p); + } + function Us(o, p, m) { + let g = Ye(), b = Jn(m); + J(100); + let N = pt(42), Q = b & 2048 ? Li() : Ka(), _e = N ? 1 : 0, ee = b & 1024 ? 2 : 0, te = pn(); + b & 32 && st(!0); + let ce = Xn(_e | ee), je = In(59, !1), Je = Ri(_e | ee, A.or_expected); + st(g); + return Ce(P(y.createFunctionDeclaration(m, N, Q, te, ce, je, Je), o), p); + } + function Gu() { + if (u() === 137) return J(137); + if (u() === 11 && H(B) === 21) return le(() => { + let o = Hn(); + return o.text === "constructor" ? o : void 0; + }); + } + function Mc(o, p, m) { + return le(() => { + if (Gu()) { + let g = pn(), b = Xn(0), N = In(59, !1), Q = Ri(0, A.or_expected), _e = y.createConstructorDeclaration(m, b, Q); + return _e.typeParameters = g, _e.type = N, Ce(P(_e, o), p); + } + }); + } + function Lc(o, p, m, g, b, N, Q, _e) { + let ee = g ? 1 : 0, te = Zt(m, cl) ? 2 : 0, ce = pn(), je = Xn(ee | te), Je = In(59, !1), De = Ri(ee | te, _e), Ht = y.createMethodDeclaration(m, g, b, N, ce, je, Je, De); + return Ht.exclamationToken = Q, Ce(P(Ht, o), p); + } + function Aa(o, p, m, g, b) { + let N = !b && !t.hasPrecedingLineBreak() ? pt(54) : void 0, Q = vr(), _e = Ct(90112, xr); + ql(g, Q, _e); + return Ce(P(y.createPropertyDeclaration(m, g, b || N, Q, _e), o), p); + } + function Bs(o, p, m) { + let g = pt(42), b = jr(), N = pt(58); + return g || u() === 21 || u() === 30 ? Lc(o, p, m, g, b, N, void 0, A.or_expected) : Aa(o, p, m, b, N); + } + function _i(o, p, m, g, b) { + let N = jr(), Q = pn(), _e = Xn(0), ee = In(59, !1), te = Ri(b), ce = g === 178 ? y.createGetAccessorDeclaration(m, N, _e, ee, te) : y.createSetAccessorDeclaration(m, N, _e, te); + return ce.typeParameters = Q, y_(ce) && (ce.type = ee), Ce(P(ce, o), p); + } + function Jc() { + let o; + if (u() === 60) return !0; + for (; Yr(u());) { + if (o = u(), Ug(o)) return !0; + B(); + } + if (u() === 42 || (br() && (o = u(), B()), u() === 23)) return !0; + if (o !== void 0) { + if (!di(o) || o === 153 || o === 139) return !0; + switch (u()) { + case 21: + case 30: + case 54: + case 59: + case 64: + case 58: return !0; + default: return _r(); + } + } + return !1; + } + function Yu(o, p, m) { + Yn(126); + let g = Hu(), b = Ce(P(y.createClassStaticBlockDeclaration(g), o), p); + return b.modifiers = m, b; + } + function Hu() { + let o = we(), p = Ye(); + He(!1), st(!0); + let m = Fr(!1); + return He(o), st(p), m; + } + function jc() { + if (Ye() && u() === 135) { + let o = M(), p = gt(A.Expression_expected); + B(); + return Ps(o, rn(o, p, !0)); + } + return Oi(); + } + function Rc() { + let o = M(); + if (!Le(60)) return; + let p = wi(jc); + return P(y.createDecorator(p), o); + } + function qs(o, p, m) { + let g = M(), b = u(); + if (u() === 87 && p) { + if (!le(Za)) return; + } else { + if (m && u() === 126 && H(Da)) return; + if (o && u() === 126) return; + if (!N_()) return; + } + return P(he(b), g); + } + function On(o, p, m) { + let g = M(), b, N, Q, _e = !1, ee = !1, te = !1; + if (o && u() === 60) for (; N = Rc();) b = wn(b, N); + for (; Q = qs(_e, p, m);) Q.kind === 126 && (_e = !0), b = wn(b, Q), ee = !0; + if (ee && o && u() === 60) for (; N = Rc();) b = wn(b, N), te = !0; + if (te) for (; Q = qs(_e, p, m);) Q.kind === 126 && (_e = !0), b = wn(b, Q); + return b && At(b, g); + } + function Uc() { + let o; + if (u() === 134) { + let p = M(); + B(); + o = At([P(he(134), p)], p); + } + return o; + } + function Bc() { + let o = M(), p = Ue(); + if (u() === 27) return B(), Ce(P(y.createSemicolonClassElement(), o), p); + let m = On(!0, !0, !0); + if (u() === 126 && H(Da)) return Yu(o, p, m); + if (ti(139)) return _i(o, p, m, 178, 0); + if (ti(153)) return _i(o, p, m, 179, 0); + if (u() === 137 || u() === 11) { + let g = Mc(o, p, m); + if (g) return g; + } + if (Br()) return ds(o, p, m); + if (St(u()) || u() === 11 || u() === 9 || u() === 10 || u() === 42 || u() === 23) if (Zt(m, Ec)) { + for (let b of m) b.flags |= 33554432; + return Tt(33554432, () => Bs(o, p, m)); + } else return Bs(o, p, m); + if (m) return Aa(o, p, m, Gt(80, !0, A.Declaration_expected), void 0); + return q.fail("Should not have attempted to parse class member declaration."); + } + function Xu() { + let o = M(), p = Ue(), m = On(!0); + if (u() === 86) return zs(o, p, m, 232); + let g = Gt(283, !0, A.Expression_expected); + return Bp(g, o), g.modifiers = m, g; + } + function $u() { + return zs(M(), Ue(), void 0, 232); + } + function Fs(o, p, m) { + return zs(o, p, m, 264); + } + function zs(o, p, m, g) { + let b = Ye(); + J(86); + let N = Qu(), Q = pn(); + Zt(m, Ub) && st(!0); + let _e = Fc(), ee; + J(19) ? (ee = zc(), J(20)) : ee = lr(), st(b); + return Ce(P(g === 264 ? y.createClassDeclaration(m, N, Q, _e, ee) : y.createClassExpression(m, N, Q, _e, ee), o), p); + } + function Qu() { + return qe() && !qc() ? or(qe()) : void 0; + } + function qc() { + return u() === 119 && H(Xl); + } + function Fc() { + if (Vs()) return bn(22, Ku); + } + function Ku() { + let o = M(), p = u(); + q.assert(p === 96 || p === 119), B(); + let m = un(7, Zu); + return P(y.createHeritageClause(p, m), o); + } + function Zu() { + let o = M(), p = Oi(); + if (p.kind === 234) return p; + let m = Ca(); + return P(y.createExpressionWithTypeArguments(p, m), o); + } + function Ca() { + return u() === 30 ? Rr(20, _t, 30, 32) : void 0; + } + function Vs() { + return u() === 96 || u() === 119; + } + function zc() { + return bn(5, Bc); + } + function ep(o, p, m) { + J(120); + let g = gt(), b = pn(), N = Fc(), Q = po(); + return Ce(P(y.createInterfaceDeclaration(m, g, b, N, Q), o), p); + } + function tp(o, p, m) { + J(156), t.hasPrecedingLineBreak() && Ee(A.Line_break_not_permitted_here); + let g = gt(), b = pn(); + J(64); + let N = u() === 141 && le(bo) || _t(); + Qt(); + return Ce(P(y.createTypeAliasDeclaration(m, g, b, N), o), p); + } + function Ws() { + let o = M(), p = Ue(), m = jr(), g = lt(xr); + return Ce(P(y.createEnumMember(m, g), o), p); + } + function np(o, p, m) { + J(94); + let g = gt(), b; + J(19) ? (b = xe(() => un(6, Ws)), J(20)) : b = lr(); + return Ce(P(y.createEnumDeclaration(m, g, b), o), p); + } + function Gs() { + let o = M(), p; + return J(19) ? (p = bn(1, Yt), J(20)) : p = lr(), P(y.createModuleBlock(p), o); + } + function Vc(o, p, m, g) { + let b = g & 32, N = g & 8 ? jt() : gt(), Q = Le(25) ? Vc(M(), !1, void 0, 8 | b) : Gs(); + return Ce(P(y.createModuleDeclaration(m, N, Q, g), o), p); + } + function Wc(o, p, m) { + let g = 0, b; + u() === 162 ? (b = gt(), g |= 2048) : (b = Hn(), b.text = Jr(b.text)); + let N; + u() === 19 ? N = Gs() : Qt(); + return Ce(P(y.createModuleDeclaration(m, b, N, g), o), p); + } + function rp(o, p, m) { + let g = 0; + if (u() === 162) return Wc(o, p, m); + if (Le(145)) g |= 32; + else if (J(144), u() === 11) return Wc(o, p, m); + return Vc(o, p, m, g); + } + function ip() { + return u() === 149 && H(Gc); + } + function Gc() { + return B() === 21; + } + function Da() { + return B() === 19; + } + function ap() { + return B() === 44; + } + function sp(o, p, m) { + J(130), J(145); + let g = gt(); + Qt(); + let b = y.createNamespaceExportDeclaration(g); + return b.modifiers = m, Ce(P(b, o), p); + } + function Bi(o, p, m) { + J(102); + let g = t.getTokenFullStart(), b; + ve() && (b = gt()); + let N; + if (b?.escapedText === "type" && (u() !== 161 || ve() && H(Dc)) && (ve() || zr()) ? (N = 156, b = ve() ? gt() : void 0) : b?.escapedText === "defer" && (u() === 161 ? !H(Cc) : u() !== 28 && u() !== 64) && (N = 166, b = ve() ? gt() : void 0), b && !op() && N !== 166) return cp(o, p, m, b, N === 156); + let Q = Yc(b, g, N, void 0), _e = Fi(), ee = Hc(); + Qt(); + return Ce(P(y.createImportDeclaration(m, Q, _e, ee), o), p); + } + function Yc(o, p, m, g = !1) { + let b; + return (o || u() === 42 || u() === 19) && (b = lp(o, p, m, g), J(161)), b; + } + function Hc() { + let o = u(); + if ((o === 118 || o === 132) && !t.hasPrecedingLineBreak()) return Ys(o); + } + function _p() { + let o = M(), p = St(u()) ? jt() : ri(11); + J(59); + let m = zt(!0); + return P(y.createImportAttribute(p, m), o); + } + function Ys(o, p) { + let m = M(); + p || J(o); + let g = t.getTokenStart(); + if (J(19)) { + let b = t.hasPrecedingLineBreak(), N = un(24, _p, !0); + if (!J(20)) { + let Q = Ba(at); + Q && Q.code === A._0_expected.code && sl(Q, Oa(Mt, $e, g, 1, A.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}")); + } + return P(y.createImportAttributes(N, b, o), m); + } else { + let b = At([], M(), void 0, !1); + return P(y.createImportAttributes(b, !1, o), m); + } + } + function zr() { + return u() === 42 || u() === 19; + } + function op() { + return u() === 28 || u() === 161; + } + function cp(o, p, m, g, b) { + J(64); + let N = qi(); + Qt(); + return Ce(P(y.createImportEqualsDeclaration(m, b, g, N), o), p); + } + function lp(o, p, m, g) { + let b; + return (!o || Le(28)) && (g && t.setSkipJsDocLeadingAsterisks(!0), u() === 42 ? b = pp() : b = Xc(276), g && t.setSkipJsDocLeadingAsterisks(!1)), P(y.createImportClause(m, o, b), p); + } + function qi() { + return ip() ? up() : Ur(!1); + } + function up() { + let o = M(); + J(149), J(21); + let p = Fi(); + return J(22), P(y.createExternalModuleReference(p), o); + } + function Fi() { + if (u() === 11) { + let o = Hn(); + return o.text = Jr(o.text), o; + } else return kt(); + } + function pp() { + let o = M(); + J(42), J(130); + let p = gt(); + return P(y.createNamespaceImport(p), o); + } + function Hs() { + return St(u()) || u() === 11; + } + function oi(o) { + return u() === 11 ? Hn() : o(); + } + function Xc(o) { + let p = M(); + return P(o === 276 ? y.createNamedImports(Rr(23, fp, 19, 20)) : y.createNamedExports(Rr(23, ci, 19, 20)), p); + } + function ci() { + let o = Ue(); + return Ce($c(282), o); + } + function fp() { + return $c(277); + } + function $c(o) { + let p = M(), m = di(u()) && !ve(), g = t.getTokenStart(), b = t.getTokenEnd(), N = !1, Q, _e = !0, ee = oi(jt); + if (ee.kind === 80 && ee.escapedText === "type") if (u() === 130) { + let je = jt(); + if (u() === 130) { + let Je = jt(); + Hs() ? (N = !0, Q = je, ee = oi(ce), _e = !1) : (Q = ee, ee = Je, _e = !1); + } else Hs() ? (Q = ee, _e = !1, ee = oi(ce)) : (N = !0, ee = je); + } else Hs() && (N = !0, ee = oi(ce)); + _e && u() === 130 && (Q = ee, J(130), ee = oi(ce)), o === 277 && (ee.kind !== 80 ? (rt(Cr($e, ee.pos), ee.end, A.Identifier_expected), ee = yi(Gt(80, !1), ee.pos, ee.pos)) : m && rt(g, b, A.Identifier_expected)); + return P(o === 277 ? y.createImportSpecifier(N, Q, ee) : y.createExportSpecifier(N, Q, ee), p); + function ce() { + return m = di(u()) && !ve(), g = t.getTokenStart(), b = t.getTokenEnd(), jt(); + } + } + function dp(o) { + return P(y.createNamespaceExport(oi(jt)), o); + } + function Qc(o, p, m) { + let g = Ye(); + st(!0); + let b, N, Q, _e = Le(156), ee = M(); + Le(42) ? (Le(130) && (b = dp(ee)), J(161), N = Fi()) : (b = Xc(280), (u() === 161 || u() === 11 && !t.hasPrecedingLineBreak()) && (J(161), N = Fi())); + let te = u(); + N && (te === 118 || te === 132) && !t.hasPrecedingLineBreak() && (Q = Ys(te)), Qt(), st(g); + return Ce(P(y.createExportDeclaration(m, _e, b, N, Q), o), p); + } + function Kc(o, p, m) { + let g = Ye(); + st(!0); + let b; + Le(64) ? b = !0 : J(90); + let N = zt(!0); + Qt(), st(g); + return Ce(P(y.createExportAssignment(m, b, N), o), p); + } + let Xs; + ((o) => { + o[o.SourceElements = 0] = "SourceElements", o[o.BlockStatements = 1] = "BlockStatements", o[o.SwitchClauses = 2] = "SwitchClauses", o[o.SwitchClauseStatements = 3] = "SwitchClauseStatements", o[o.TypeMembers = 4] = "TypeMembers", o[o.ClassMembers = 5] = "ClassMembers", o[o.EnumMembers = 6] = "EnumMembers", o[o.HeritageClauseElement = 7] = "HeritageClauseElement", o[o.VariableDeclarations = 8] = "VariableDeclarations", o[o.ObjectBindingElements = 9] = "ObjectBindingElements", o[o.ArrayBindingElements = 10] = "ArrayBindingElements", o[o.ArgumentExpressions = 11] = "ArgumentExpressions", o[o.ObjectLiteralMembers = 12] = "ObjectLiteralMembers", o[o.JsxAttributes = 13] = "JsxAttributes", o[o.JsxChildren = 14] = "JsxChildren", o[o.ArrayLiteralMembers = 15] = "ArrayLiteralMembers", o[o.Parameters = 16] = "Parameters", o[o.JSDocParameters = 17] = "JSDocParameters", o[o.RestProperties = 18] = "RestProperties", o[o.TypeParameters = 19] = "TypeParameters", o[o.TypeArguments = 20] = "TypeArguments", o[o.TupleElementTypes = 21] = "TupleElementTypes", o[o.HeritageClauses = 22] = "HeritageClauses", o[o.ImportOrExportSpecifiers = 23] = "ImportOrExportSpecifiers", o[o.ImportAttributes = 24] = "ImportAttributes", o[o.JSDocComment = 25] = "JSDocComment", o[o.Count = 26] = "Count"; + })(Xs || (Xs = {})); + let Zc; + ((o) => { + o[o.False = 0] = "False", o[o.True = 1] = "True", o[o.Unknown = 2] = "Unknown"; + })(Zc || (Zc = {})); + let el; + ((o) => { + function p(te, ce, je) { + Fn("file.js", te, 99, void 0, 1, 0), t.setText(te, ce, je), ct = t.scan(); + let Je = m(), De = se("file.js", 99, 1, !1, [], he(1), 0, Va), Ht = Yi(at, De); + return Bt && (De.jsDocDiagnostics = Yi(Bt, De)), zn(), Je ? { + jsDocTypeExpression: Je, + diagnostics: Ht + } : void 0; + } + o.parseJSDocTypeExpressionForTests = p; + function m(te) { + let ce = M(), je = (te ? Le : J)(19), Je = Tt(16777216, ls); + (!te || je) && C_(20); + let De = y.createJSDocTypeExpression(Je); + return L(De), P(De, ce); + } + o.parseJSDocTypeExpression = m; + function g() { + let te = M(), ce = Le(19), je = M(), Je = Ur(!1); + for (; u() === 81;) Pt(), Be(), Je = P(y.createJSDocMemberName(Je, gt()), je); + ce && C_(20); + let De = y.createJSDocNameReference(Je); + return L(De), P(De, te); + } + o.parseJSDocNameReference = g; + function b(te, ce, je) { + Fn("", te, 99, void 0, 1, 0); + let Je = Tt(16777216, () => ee(ce, je)), Ht = Yi(at, { + languageVariant: 0, + text: te + }); + return zn(), Je ? { + jsDoc: Je, + diagnostics: Ht + } : void 0; + } + o.parseIsolatedJSDocComment = b; + function N(te, ce, je) { + let Je = ct, De = at.length, Ht = tn, Nt = Tt(16777216, () => ee(ce, je)); + return Sf(Nt, te), tt & 524288 && (Bt || (Bt = []), En(Bt, at, De)), ct = Je, at.length = De, tn = Ht, Nt; + } + o.parseJSDocComment = N; + let Q; + ((te) => { + te[te.BeginningOfLine = 0] = "BeginningOfLine", te[te.SawAsterisk = 1] = "SawAsterisk", te[te.SavingComments = 2] = "SavingComments", te[te.SavingBackticks = 3] = "SavingBackticks"; + })(Q || (Q = {})); + let _e; + ((te) => { + te[te.Property = 1] = "Property", te[te.Parameter = 2] = "Parameter", te[te.CallbackParameter = 4] = "CallbackParameter"; + })(_e || (_e = {})); + function ee(te = 0, ce) { + let je = $e, Je = ce === void 0 ? je.length : te + ce; + if (ce = Je - te, q.assert(te >= 0), q.assert(te <= Je), q.assert(Je <= je.length), !E6(je, te)) return; + let De, Ht, Nt, ur, pr, Mn = [], Vr = [], Pe = yt; + yt |= 1 << 25; + let et = t.scanRange(te + 3, ce - 5, wr); + return yt = Pe, et; + function wr() { + let I = 1, X, $ = te - (je.lastIndexOf(` +`, te) + 1) + 4; + function ne(Re) { + X || (X = $), Mn.push(Re), $ += Re.length; + } + for (Be(); Gi(5);); + Gi(4) && (I = 0, $ = 0); + e: for (;;) { + switch (u()) { + case 60: + mp(Mn), pr || (pr = M()), Fe(n($)), I = 0, X = void 0; + break; + case 4: + Mn.push(t.getTokenText()), I = 0, $ = 0; + break; + case 42: + let Re = t.getTokenText(); + I === 1 ? (I = 2, ne(Re)) : (q.assert(I === 0), I = 1, $ += Re.length); + break; + case 5: + q.assert(I !== 2, "whitespace shouldn't come from the scanner while saving top-level comment text"); + let ut = t.getTokenText(); + X !== void 0 && $ + ut.length > X && Mn.push(ut.slice(X - $)), $ += ut.length; + break; + case 1: break e; + case 82: + I = 2, ne(t.getTokenValue()); + break; + case 19: + I = 2; + let fn = t.getTokenFullStart(), Kt = l(t.getTokenEnd() - 1); + if (Kt) { + ur || zi(Mn), Vr.push(P(y.createJSDocText(Mn.join("")), ur ?? te, fn)), Vr.push(Kt), Mn = [], ur = t.getTokenEnd(); + break; + } + default: + I = 2, ne(t.getTokenText()); + break; + } + I === 2 ? nn(!1) : Be(); + } + let re = Mn.join("").trimEnd(); + Vr.length && re.length && Vr.push(P(y.createJSDocText(re), ur ?? te, pr)), Vr.length && De && q.assertIsDefined(pr, "having parsed tags implies that the end of the comment span should be set"); + let Ne = De && At(De, Ht, Nt); + return P(y.createJSDocComment(Vr.length ? At(Vr, te, pr) : re.length ? re : void 0, Ne), te, Je); + } + function zi(I) { + for (; I.length && (I[0] === ` +` || I[0] === "\r");) I.shift(); + } + function mp(I) { + for (; I.length;) { + let X = I[I.length - 1].trimEnd(); + if (X === "") I.pop(); + else if (X.length < I[I.length - 1].length) { + I[I.length - 1] = X; + break; + } else break; + } + } + function $n() { + for (;;) { + if (Be(), u() === 1) return !0; + if (!(u() === 5 || u() === 4)) return !1; + } + } + function Tn() { + if (!((u() === 5 || u() === 4) && H($n))) for (; u() === 5 || u() === 4;) Be(); + } + function j() { + if ((u() === 5 || u() === 4) && H($n)) return ""; + let I = t.hasPrecedingLineBreak(), X = !1, $ = ""; + for (; I && u() === 42 || u() === 5 || u() === 4;) $ += t.getTokenText(), u() === 4 ? (I = !0, X = !0, $ = "") : u() === 42 && (I = !1), Be(); + return X ? $ : ""; + } + function n(I) { + q.assert(u() === 60); + let X = t.getTokenStart(); + Be(); + let $ = li(void 0), ne = j(), re; + switch ($.escapedText) { + case "author": + re = j0(X, $, I, ne); + break; + case "implements": + re = U0(X, $, I, ne); + break; + case "augments": + case "extends": + re = B0(X, $, I, ne); + break; + case "class": + case "constructor": + re = Wi(X, y.createJSDocClassTag, $, I, ne); + break; + case "public": + re = Wi(X, y.createJSDocPublicTag, $, I, ne); + break; + case "private": + re = Wi(X, y.createJSDocPrivateTag, $, I, ne); + break; + case "protected": + re = Wi(X, y.createJSDocProtectedTag, $, I, ne); + break; + case "readonly": + re = Wi(X, y.createJSDocReadonlyTag, $, I, ne); + break; + case "override": + re = Wi(X, y.createJSDocOverrideTag, $, I, ne); + break; + case "deprecated": + Vn = !0, re = Wi(X, y.createJSDocDeprecatedTag, $, I, ne); + break; + case "this": + re = fd(X, $, I, ne); + break; + case "enum": + re = V0(X, $, I, ne); + break; + case "arg": + case "argument": + case "param": return Vi(X, $, 2, I); + case "return": + case "returns": + re = M0(X, $, I, ne); + break; + case "template": + re = md(X, $, I, ne); + break; + case "type": + re = ud(X, $, I, ne); + break; + case "typedef": + re = W0(X, $, I, ne); + break; + case "callback": + re = Y0(X, $, I, ne); + break; + case "overload": + re = H0(X, $, I, ne); + break; + case "satisfies": + re = q0(X, $, I, ne); + break; + case "see": + re = L0(X, $, I, ne); + break; + case "exception": + case "throws": + re = J0(X, $, I, ne); + break; + case "import": + re = F0(X, $, I, ne); + break; + default: + re = pe(X, $, I, ne); + break; + } + return re; + } + function i(I, X, $, ne) { + return ne || ($ += X - I), s($, ne.slice($)); + } + function s(I, X) { + let $ = M(), ne = [], re = [], Ne, Re = 0, ut; + function fn(Qn) { + ut || (ut = I), ne.push(Qn), I += Qn.length; + } + X !== void 0 && (X !== "" && fn(X), Re = 1); + let an = u(); + e: for (;;) { + switch (an) { + case 4: + Re = 0, ne.push(t.getTokenText()), I = 0; + break; + case 60: + t.resetTokenState(t.getTokenEnd() - 1); + break e; + case 1: break e; + case 5: + q.assert(Re !== 2 && Re !== 3, "whitespace shouldn't come from the scanner while saving comment text"); + let Qn = t.getTokenText(); + ut !== void 0 && I + Qn.length > ut && (ne.push(Qn.slice(ut - I)), Re = 2), I += Qn.length; + break; + case 19: + Re = 2; + let tl = t.getTokenFullStart(), nl = l(t.getTokenEnd() - 1); + nl ? (re.push(P(y.createJSDocText(ne.join("")), Ne ?? $, tl)), re.push(nl), ne = [], Ne = t.getTokenEnd()) : fn(t.getTokenText()); + break; + case 62: + Re === 3 ? Re = 2 : Re = 3, fn(t.getTokenText()); + break; + case 82: + Re !== 3 && (Re = 2), fn(t.getTokenValue()); + break; + case 42: if (Re === 0) { + Re = 1, I += 1; + break; + } + default: + Re !== 3 && (Re = 2), fn(t.getTokenText()); + break; + } + Re === 2 || Re === 3 ? an = nn(Re === 3) : an = Be(); + } + zi(ne); + let Kt = ne.join("").trimEnd(); + if (re.length) return Kt.length && re.push(P(y.createJSDocText(Kt), Ne ?? $)), At(re, $, t.getTokenEnd()); + if (Kt.length) return Kt; + } + function l(I) { + let X = le(v); + if (!X) return; + Be(), Tn(); + let $ = d(), ne = []; + for (; u() !== 20 && u() !== 4 && u() !== 1;) ne.push(t.getTokenText()), Be(); + return P((X === "link" ? y.createJSDocLink : X === "linkcode" ? y.createJSDocLinkCode : y.createJSDocLinkPlain)($, ne.join("")), I, t.getTokenEnd()); + } + function d() { + if (St(u())) { + let I = M(), X = jt(); + for (; Le(25);) X = P(y.createQualifiedName(X, u() === 81 ? Gt(80, !1) : jt()), I); + for (; u() === 81;) Pt(), Be(), X = P(y.createJSDocMemberName(X, gt()), I); + return X; + } + } + function v() { + if (j(), u() === 19 && Be() === 60 && St(Be())) { + let I = t.getTokenValue(); + if (F(I)) return I; + } + } + function F(I) { + return I === "link" || I === "linkcode" || I === "linkplain"; + } + function pe(I, X, $, ne) { + return P(y.createJSDocUnknownTag(X, i(I, M(), $, ne)), I); + } + function Fe(I) { + I && (De ? De.push(I) : (De = [I], Ht = I.pos), Nt = I.end); + } + function It() { + return j(), u() === 19 ? m() : void 0; + } + function fr() { + let I = Gi(23); + I && Tn(); + let X = Gi(62), $ = ey(); + return X && zl(62), I && (Tn(), pt(64) && kt(), J(24)), { + name: $, + isBracketed: I + }; + } + function xn(I) { + switch (I.kind) { + case 151: return !0; + case 189: return xn(I.elementType); + default: return Df(I) && Ke(I.typeName) && I.typeName.escapedText === "Object" && !I.typeArguments; + } + } + function Vi(I, X, $, ne) { + let re = It(), Ne = !re; + j(); + let { name: Re, isBracketed: ut } = fr(), fn = j(); + Ne && !H(v) && (re = It()); + let an = i(I, M(), ne, fn), Kt = O0(re, Re, $, ne); + Kt && (re = Kt, Ne = !0); + return P($ === 1 ? y.createJSDocPropertyTag(X, Re, ut, re, Ne, an) : y.createJSDocParameterTag(X, Re, ut, re, Ne, an), I); + } + function O0(I, X, $, ne) { + if (I && xn(I.type)) { + let re = M(), Ne, Re; + for (; Ne = le(() => yp($, ne, X));) Ne.kind === 342 || Ne.kind === 349 ? Re = wn(Re, Ne) : Ne.kind === 346 && on(Ne.tagName, A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + if (Re) { + let ut = P(y.createJSDocTypeLiteral(Re, I.type.kind === 189), re); + return P(y.createJSDocTypeExpression(ut), re); + } + } + } + function M0(I, X, $, ne) { + Zt(De, f6) && rt(X.pos, t.getTokenStart(), A._0_tag_already_specified, l_(X.escapedText)); + let re = It(); + return P(y.createJSDocReturnTag(X, re, i(I, M(), $, ne)), I); + } + function ud(I, X, $, ne) { + Zt(De, zf) && rt(X.pos, t.getTokenStart(), A._0_tag_already_specified, l_(X.escapedText)); + let re = m(!0), Ne = $ !== void 0 && ne !== void 0 ? i(I, M(), $, ne) : void 0; + return P(y.createJSDocTypeTag(X, re, Ne), I); + } + function L0(I, X, $, ne) { + let Ne = u() === 23 || H(() => Be() === 60 && St(Be()) && F(t.getTokenValue())) ? void 0 : g(), Re = $ !== void 0 && ne !== void 0 ? i(I, M(), $, ne) : void 0; + return P(y.createJSDocSeeTag(X, Ne, Re), I); + } + function J0(I, X, $, ne) { + let re = It(), Ne = i(I, M(), $, ne); + return P(y.createJSDocThrowsTag(X, re, Ne), I); + } + function j0(I, X, $, ne) { + let re = M(), Ne = R0(), Re = t.getTokenFullStart(), ut = i(I, Re, $, ne); + ut || (Re = t.getTokenFullStart()); + let fn = typeof ut != "string" ? At(Yp([P(Ne, re, Re)], ut), re) : Ne.text + ut; + return P(y.createJSDocAuthorTag(X, fn), I); + } + function R0() { + let I = [], X = !1, $ = t.getToken(); + for (; $ !== 1 && $ !== 4;) { + if ($ === 30) X = !0; + else { + if ($ === 60 && !X) break; + if ($ === 32 && X) { + I.push(t.getTokenText()), t.resetTokenState(t.getTokenEnd()); + break; + } + } + I.push(t.getTokenText()), $ = Be(); + } + return y.createJSDocText(I.join("")); + } + function U0(I, X, $, ne) { + let re = pd(); + return P(y.createJSDocImplementsTag(X, re, i(I, M(), $, ne)), I); + } + function B0(I, X, $, ne) { + let re = pd(); + return P(y.createJSDocAugmentsTag(X, re, i(I, M(), $, ne)), I); + } + function q0(I, X, $, ne) { + let re = m(!1), Ne = $ !== void 0 && ne !== void 0 ? i(I, M(), $, ne) : void 0; + return P(y.createJSDocSatisfiesTag(X, re, Ne), I); + } + function F0(I, X, $, ne) { + let re = t.getTokenFullStart(), Ne; + ve() && (Ne = gt()); + let Re = Yc(Ne, re, 156, !0), ut = Fi(), fn = Hc(), an = $ !== void 0 && ne !== void 0 ? i(I, M(), $, ne) : void 0; + return P(y.createJSDocImportTag(X, Re, ut, fn, an), I); + } + function pd() { + let I = Le(19), X = M(), $ = z0(); + t.setSkipJsDocLeadingAsterisks(!0); + let ne = Ca(); + t.setSkipJsDocLeadingAsterisks(!1); + let Ne = P(y.createExpressionWithTypeArguments($, ne), X); + return I && (Tn(), J(20)), Ne; + } + function z0() { + let I = M(), X = li(); + for (; Le(25);) { + let $ = li(); + X = P(ae(X, $), I); + } + return X; + } + function Wi(I, X, $, ne, re) { + return P(X($, i(I, M(), ne, re)), I); + } + function fd(I, X, $, ne) { + let re = m(!0); + return Tn(), P(y.createJSDocThisTag(X, re, i(I, M(), $, ne)), I); + } + function V0(I, X, $, ne) { + let re = m(!0); + return Tn(), P(y.createJSDocEnumTag(X, re, i(I, M(), $, ne)), I); + } + function W0(I, X, $, ne) { + let re = It(); + j(); + let Ne = hp(); + Tn(); + let Re = s($), ut; + if (!re || xn(re.type)) { + let an, Kt, Qn, tl = !1; + for (; (an = le(() => $0($))) && an.kind !== 346;) if (tl = !0, an.kind === 345) if (Kt) { + let Pa = Ee(A.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); + Pa && sl(Pa, Oa(Mt, $e, 0, 0, A.The_tag_was_first_specified_here)); + break; + } else Kt = an; + else Qn = wn(Qn, an); + if (tl) { + let Pa = re && re.type.kind === 189, nl = y.createJSDocTypeLiteral(Qn, Pa); + re = Kt && Kt.typeExpression && !xn(Kt.typeExpression.type) ? Kt.typeExpression : P(nl, I), ut = re.end; + } + } + ut = ut || Re !== void 0 ? M() : (Ne ?? re ?? X).end, Re || (Re = i(I, ut, $, ne)); + return P(y.createJSDocTypedefTag(X, re, Ne, Re), I, ut); + } + function hp(I) { + let X = t.getTokenStart(); + if (!St(u())) return; + let $ = li(); + if (Le(25)) { + let ne = hp(!0); + return P(y.createModuleDeclaration(void 0, $, ne, I ? 8 : void 0), X); + } + return I && ($.flags |= 4096), $; + } + function G0(I) { + let X = M(), $, ne; + for (; $ = le(() => yp(4, I));) { + if ($.kind === 346) { + on($.tagName, A.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + break; + } + ne = wn(ne, $); + } + return At(ne || [], X); + } + function dd(I, X) { + let $ = G0(X), ne = le(() => { + if (Gi(60)) { + let re = n(X); + if (re && re.kind === 343) return re; + } + }); + return P(y.createJSDocSignature(void 0, $, ne), I); + } + function Y0(I, X, $, ne) { + let re = hp(); + Tn(); + let Ne = s($), Re = dd(I, $); + Ne || (Ne = i(I, M(), $, ne)); + let ut = Ne !== void 0 ? M() : Re.end; + return P(y.createJSDocCallbackTag(X, Re, re, Ne), I, ut); + } + function H0(I, X, $, ne) { + Tn(); + let re = s($), Ne = dd(I, $); + re || (re = i(I, M(), $, ne)); + let Re = re !== void 0 ? M() : Ne.end; + return P(y.createJSDocOverloadTag(X, Ne, re), I, Re); + } + function X0(I, X) { + for (; !Ke(I) || !Ke(X);) if (!Ke(I) && !Ke(X) && I.right.escapedText === X.right.escapedText) I = I.left, X = X.left; + else return !1; + return I.escapedText === X.escapedText; + } + function $0(I) { + return yp(1, I); + } + function yp(I, X, $) { + let ne = !0, re = !1; + for (;;) switch (Be()) { + case 60: + if (ne) { + let Ne = Q0(I, X); + return Ne && (Ne.kind === 342 || Ne.kind === 349) && $ && (Ke(Ne.name) || !X0($, Ne.name.left)) ? !1 : Ne; + } + re = !1; + break; + case 4: + ne = !0, re = !1; + break; + case 42: + re && (ne = !1), re = !0; + break; + case 80: + ne = !1; + break; + case 1: return !1; + } + } + function Q0(I, X) { + q.assert(u() === 60); + let $ = t.getTokenFullStart(); + Be(); + let ne = li(), re = j(), Ne; + switch (ne.escapedText) { + case "type": return I === 1 && ud($, ne); + case "prop": + case "property": + Ne = 1; + break; + case "arg": + case "argument": + case "param": + Ne = 6; + break; + case "template": return md($, ne, X, re); + case "this": return fd($, ne, X, re); + default: return !1; + } + return I & Ne ? Vi($, ne, I, X) : !1; + } + function K0() { + let I = M(), X = Gi(23); + X && Tn(); + let $ = On(!1, !0), ne = li(A.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces), re; + if (X && (Tn(), J(64), re = Tt(16777216, ls), J(24)), !Zi(ne)) return P(y.createTypeParameterDeclaration($, ne, void 0, re), I); + } + function Z0() { + let I = M(), X = []; + do { + Tn(); + let $ = K0(); + $ !== void 0 && X.push($), j(); + } while (Gi(28)); + return At(X, I); + } + function md(I, X, $, ne) { + let re = u() === 19 ? m() : void 0, Ne = Z0(); + return P(y.createJSDocTemplateTag(X, re, Ne, i(I, M(), $, ne)), I); + } + function Gi(I) { + return u() === I ? (Be(), !0) : !1; + } + function ey() { + let I = li(); + for (Le(23) && J(24); Le(25);) { + let X = li(); + Le(23) && J(24), I = $l(I, X); + } + return I; + } + function li(I) { + if (!St(u())) return Gt(80, !I, I || A.Identifier_expected); + yn++; + let X = t.getTokenStart(), $ = t.getTokenEnd(), ne = u(), Ne = P(ue(Jr(t.getTokenValue()), ne), X, $); + return Be(), Ne; + } + } + })(el = e.JSDocParser || (e.JSDocParser = {})); + })(ta || (ta = {})); + hm = /* @__PURE__ */ new WeakSet(); + ph = /* @__PURE__ */ new WeakSet(); + ((e) => { + function t(D, R, ue, be) { + if (be = be || q.shouldAssert(2), y(D, R, ue, be), dg(ue)) return D; + if (D.statements.length === 0) return ta.parseSourceFile(D.fileName, R, D.languageVersion, void 0, !0, D.scriptKind, D.setExternalModuleIndicator, D.jsDocParsingMode); + J6(D), ta.fixupParentReferences(D); + let he = D.text, de = G(D), O = c(D, ue); + y(D, R, O, be), q.assert(O.span.start <= ue.span.start), q.assert(kr(O.span) === kr(ue.span)), q.assert(kr(Qs(O)) === kr(Qs(ue))); + let ae = Qs(O).length - O.span.length; + k(D, O.span.start, kr(O.span), kr(Qs(O)), ae, he, R, be); + let Oe = ta.parseSourceFile(D.fileName, R, D.languageVersion, de, !0, D.scriptKind, D.setExternalModuleIndicator, D.jsDocParsingMode); + return Oe.commentDirectives = a(D.commentDirectives, Oe.commentDirectives, O.span.start, kr(O.span), ae, he, R, be), Oe.impliedNodeFormat = D.impliedNodeFormat, y6(D, Oe), Oe; + } + e.updateSourceFile = t; + function a(D, R, ue, be, he, de, O, ae) { + if (!D) return R; + let Oe, V = !1; + for (let Y of D) { + let { range: ft, type: nr } = Y; + if (ft.end < ue) Oe = wn(Oe, Y); + else if (ft.pos > be) { + oe(); + let mn = { + range: { + pos: ft.pos + he, + end: ft.end + he + }, + type: nr + }; + Oe = wn(Oe, mn), ae && q.assert(de.substring(ft.pos, ft.end) === O.substring(mn.range.pos, mn.range.end)); + } + } + return oe(), Oe; + function oe() { + V || (V = !0, Oe ? R && Oe.push(...R) : Oe = R); + } + } + function _(D, R, ue, be, he, de, O) { + ue ? Oe(D) : ae(D); + return; + function ae(V) { + let oe = ""; + if (O && f(V) && (oe = he.substring(V.pos, V.end)), Gd(V, R), yi(V, V.pos + be, V.end + be), O && f(V) && q.assert(oe === de.substring(V.pos, V.end)), Xt(V, ae, Oe), Ki(V)) for (let Y of V.jsDoc) ae(Y); + T(V, O); + } + function Oe(V) { + yi(V, V.pos + be, V.end + be); + for (let oe of V) ae(oe); + } + } + function f(D) { + switch (D.kind) { + case 11: + case 9: + case 80: return !0; + } + return !1; + } + function h(D, R, ue, be, he) { + q.assert(D.end >= R, "Adjusting an element that was entirely before the change range"), q.assert(D.pos <= ue, "Adjusting an element that was entirely after the change range"), q.assert(D.pos <= D.end); + let de = Math.min(D.pos, be), O = D.end >= ue ? D.end + he : Math.min(D.end, be); + if (q.assert(de <= O), D.parent) { + let ae = D.parent; + q.assertGreaterThanOrEqual(de, ae.pos), q.assertLessThanOrEqual(O, ae.end); + } + yi(D, de, O); + } + function T(D, R) { + if (R) { + let ue = D.pos, be = (he) => { + q.assert(he.pos >= ue), ue = he.end; + }; + if (Ki(D)) for (let he of D.jsDoc) be(he); + Xt(D, be), q.assert(ue <= D.end); + } + } + function k(D, R, ue, be, he, de, O, ae) { + Oe(D); + return; + function Oe(oe) { + if (q.assert(oe.pos <= oe.end), oe.pos > ue) { + _(oe, D, !1, he, de, O, ae); + return; + } + let Y = oe.end; + if (Y >= R) { + if (Wp(oe), Gd(oe, D), h(oe, R, ue, be, he), Xt(oe, Oe, V), Ki(oe)) for (let ft of oe.jsDoc) Oe(ft); + T(oe, ae); + return; + } + q.assert(Y < R); + } + function V(oe) { + if (q.assert(oe.pos <= oe.end), oe.pos > ue) { + _(oe, D, !0, he, de, O, ae); + return; + } + let Y = oe.end; + if (Y >= R) { + Wp(oe), h(oe, R, ue, be, he); + for (let ft of oe) Oe(ft); + return; + } + q.assert(Y < R); + } + } + function c(D, R) { + let be = R.span.start; + for (let O = 0; be > 0 && O <= 1; O++) { + let ae = W(D, be); + q.assert(ae.pos <= be); + let Oe = ae.pos; + be = Math.max(0, Oe - 1); + } + return Ym(fg(be, kr(R.span)), R.newLength + (R.span.start - be)); + } + function W(D, R) { + let ue = D, be; + if (Xt(D, de), be) { + let O = he(be); + O.pos > ue.pos && (ue = O); + } + return ue; + function he(O) { + for (;;) { + let ae = K2(O); + if (ae) O = ae; + else return O; + } + } + function de(O) { + if (!Zi(O)) if (O.pos <= R) { + if (O.pos >= ue.pos && (ue = O), R < O.end) return Xt(O, de), !0; + q.assert(O.end <= R), be = O; + } else return q.assert(O.pos > R), !0; + } + } + function y(D, R, ue, be) { + let he = D.text; + if (ue && (q.assert(he.length - ue.span.length + ue.newLength === R.length), be || q.shouldAssert(3))) { + let de = he.substr(0, ue.span.start), O = R.substr(0, ue.span.start); + q.assert(de === O); + let ae = he.substring(kr(ue.span), he.length), Oe = R.substring(kr(Qs(ue)), R.length); + q.assert(ae === Oe); + } + } + function G(D) { + let R = D.statements, ue = 0; + q.assert(ue < R.length); + let be = R[ue], he = -1; + return { currentNode(O) { + return O !== he && (be && be.end === O && ue < R.length - 1 && (ue++, be = R[ue]), (!be || be.pos !== O) && de(O)), he = O, q.assert(!be || be.pos === O), be; + } }; + function de(O) { + R = void 0, ue = -1, be = void 0, Xt(D, ae, Oe); + return; + function ae(V) { + return O >= V.pos && O < V.end ? (Xt(V, ae, Oe), !0) : !1; + } + function Oe(V) { + if (O >= V.pos && O < V.end) for (let oe = 0; oe < V.length; oe++) { + let Y = V[oe]; + if (Y) { + if (Y.pos === O) return R = V, ue = oe, be = Y, !0; + if (Y.pos < O && O < Y.end) return Xt(Y, ae, Oe), !0; + } + } + return !1; + } + } + } + e.createSyntaxCursor = G; + let E; + ((D) => { + D[D.Value = -1] = "Value"; + })(E || (E = {})); + })(Sl || (Sl = {})); + Dp = /* @__PURE__ */ new Map(); + V6 = /^\/\/\/\s*<(\S+)\s.*?\/>/m, W6 = /^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m; + s_ = sf(g_.Latest, !0); + Gf = class { + constructor(e, t, a) { + this.pos = t, this.end = a, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + assertHasRealPosition(e) { + q.assert(!d_(this.pos) && !d_(this.end), e || "Node must have a real position for this operation"); + } + getSourceFile() { + return hi(this); + } + getStart(e, t) { + return this.assertHasRealPosition(), bl(this, e, t); + } + getFullStart() { + return this.assertHasRealPosition(), this.pos; + } + getEnd() { + return this.assertHasRealPosition(), this.end; + } + getWidth(e) { + return this.assertHasRealPosition(), this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.assertHasRealPosition(), this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.assertHasRealPosition(), this.getStart(e) - this.pos; + } + getFullText(e) { + return this.assertHasRealPosition(), (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return this.assertHasRealPosition(), e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount(e) { + return this.getChildren(e).length; + } + getChildAt(e, t) { + return this.getChildren(t)[e]; + } + getChildren(e = hi(this)) { + return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"), ah(this, e) ?? h6(this, e, H6(this, e)); + } + getFirstToken(e) { + this.assertHasRealPosition(); + let t = this.getChildren(e); + if (!t.length) return; + let a = bm(t, (_) => _.kind < 310 || _.kind > 352); + return a.kind < 167 ? a : a.getFirstToken(e); + } + getLastToken(e) { + this.assertHasRealPosition(); + let a = Ba(this.getChildren(e)); + if (a) return a.kind < 167 ? a : a.getLastToken(e); + } + forEachChild(e, t) { + return Xt(this, e, t); + } + }; + Yf = class { + constructor(e, t, a) { + this.pos = t, this.end = a, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; + } + getSourceFile() { + return hi(this); + } + getStart(e, t) { + return bl(this, e, t); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(e) { + return this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.getStart(e) - this.pos; + } + getFullText(e) { + return (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount() { + return this.getChildren().length; + } + getChildAt(e) { + return this.getChildren()[e]; + } + getChildren() { + return this.kind === 1 && this.jsDoc || vt; + } + getFirstToken() {} + getLastToken() {} + forEachChild() {} + }, $6 = class { + constructor(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; + } + getFlags() { + return this.flags; + } + get name() { + return Jp(this); + } + getEscapedName() { + return this.escapedName; + } + getName() { + return this.name; + } + getDeclarations() { + return this.declarations; + } + getDocumentationComment(e) { + if (!this.documentationComment) if (this.documentationComment = vt, !this.declarations && Id(this) && this.links.target && Id(this.links.target) && this.links.target.links.tupleLabelDeclaration) { + let t = this.links.target.links.tupleLabelDeclaration; + this.documentationComment = a_([t], e); + } else this.documentationComment = a_(this.declarations, e); + return this.documentationComment; + } + getContextualDocumentationComment(e, t) { + if (e) { + if (al(e) && (this.contextualGetAccessorDocumentationComment || (this.contextualGetAccessorDocumentationComment = vt, this.contextualGetAccessorDocumentationComment = a_(Hr(this.declarations, al), t)), e_(this.contextualGetAccessorDocumentationComment))) return this.contextualGetAccessorDocumentationComment; + if (il(e) && (this.contextualSetAccessorDocumentationComment || (this.contextualSetAccessorDocumentationComment = vt, this.contextualSetAccessorDocumentationComment = a_(Hr(this.declarations, il), t)), e_(this.contextualSetAccessorDocumentationComment))) return this.contextualSetAccessorDocumentationComment; + } + return this.getDocumentationComment(t); + } + getJsDocTags(e) { + return this.tags === void 0 && (this.tags = vt, this.tags = dl(this.declarations, e)), this.tags; + } + getContextualJsDocTags(e, t) { + if (e) { + if (al(e) && (this.contextualGetAccessorTags || (this.contextualGetAccessorTags = vt, this.contextualGetAccessorTags = dl(Hr(this.declarations, al), t)), e_(this.contextualGetAccessorTags))) return this.contextualGetAccessorTags; + if (il(e) && (this.contextualSetAccessorTags || (this.contextualSetAccessorTags = vt, this.contextualSetAccessorTags = dl(Hr(this.declarations, il), t)), e_(this.contextualSetAccessorTags))) return this.contextualSetAccessorTags; + } + return this.getJsDocTags(t); + } + }, dh = class extends Yf { + constructor(e, t, a) { + super(e, t, a); + } + }, mh = class extends Yf { + constructor(e, t, a) { + super(e, t, a); + } + get text() { + return An(this); + } + }, hh = class extends Yf { + constructor(e, t, a) { + super(e, t, a); + } + get text() { + return An(this); + } + }, Q6 = class { + constructor(e, t) { + this.flags = t, this.checker = e; + } + getFlags() { + return this.flags; + } + getSymbol() { + return this.symbol; + } + getProperties() { + return this.checker.getPropertiesOfType(this); + } + getProperty(e) { + return this.checker.getPropertyOfType(this, e); + } + getApparentProperties() { + return this.checker.getAugmentedPropertiesOfType(this); + } + getCallSignatures() { + return this.checker.getSignaturesOfType(this, 0); + } + getConstructSignatures() { + return this.checker.getSignaturesOfType(this, 1); + } + getStringIndexType() { + return this.checker.getIndexTypeOfType(this, 0); + } + getNumberIndexType() { + return this.checker.getIndexTypeOfType(this, 1); + } + getBaseTypes() { + return this.isClassOrInterface() ? this.checker.getBaseTypes(this) : void 0; + } + isNullableType() { + return this.checker.isNullableType(this); + } + getNonNullableType() { + return this.checker.getNonNullableType(this); + } + getNonOptionalType() { + return this.checker.getNonOptionalType(this); + } + getConstraint() { + return this.checker.getBaseConstraintOfType(this); + } + getDefault() { + return this.checker.getDefaultFromTypeParameter(this); + } + isUnion() { + return !!(this.flags & 1048576); + } + isIntersection() { + return !!(this.flags & 2097152); + } + isUnionOrIntersection() { + return !!(this.flags & 3145728); + } + isLiteral() { + return !!(this.flags & 2432); + } + isStringLiteral() { + return !!(this.flags & 128); + } + isNumberLiteral() { + return !!(this.flags & 256); + } + isTypeParameter() { + return !!(this.flags & 262144); + } + isClassOrInterface() { + return !!(kp(this) & 3); + } + isClass() { + return !!(kp(this) & 1); + } + isIndexType() { + return !!(this.flags & 4194304); + } + get typeArguments() { + if (kp(this) & 4) return this.checker.getTypeArguments(this); + } + }, K6 = class { + constructor(e, t) { + this.flags = t, this.checker = e; + } + getDeclaration() { + return this.declaration; + } + getTypeParameters() { + return this.typeParameters; + } + getParameters() { + return this.parameters; + } + getReturnType() { + return this.checker.getReturnTypeOfSignature(this); + } + getTypeParameterAtPosition(e) { + let t = this.checker.getParameterType(this, e); + if (t.isIndexType() && wb(t.type)) { + let a = t.type.getConstraint(); + if (a) return this.checker.getIndexType(a); + } + return t; + } + getDocumentationComment() { + return this.documentationComment || (this.documentationComment = a_(Ip(this.declaration), this.checker)); + } + getJsDocTags() { + return this.jsDocTags || (this.jsDocTags = dl(Ip(this.declaration), this.checker)); + } + }; + Z6 = class extends Gf { + constructor(e, t, a) { + super(e, t, a); + } + update(e, t) { + return L6(this, e, t); + } + getLineAndCharacterOfPosition(e) { + return Bm(this, e); + } + getLineStarts() { + return Mp(this); + } + getPositionOfLineAndCharacter(e, t, a) { + return rg(Mp(this), e, t, this.text, a); + } + getLineEndOfPosition(e) { + let { line: t } = this.getLineAndCharacterOfPosition(e), a = this.getLineStarts(), _; + t + 1 >= a.length && (_ = this.getEnd()), _ || (_ = a[t + 1] - 1); + let f = this.getFullText(); + return f[_] === ` +` && f[_ - 1] === "\r" ? _ - 1 : _; + } + getNamedDeclarations() { + return this.namedDeclarations || (this.namedDeclarations = this.computeNamedDeclarations()), this.namedDeclarations; + } + computeNamedDeclarations() { + let e = vy(); + return this.forEachChild(f), e; + function t(h) { + let T = _(h); + T && e.add(T, h); + } + function a(h) { + let T = e.get(h); + return T || e.set(h, T = []), T; + } + function _(h) { + let T = lf(h); + return T && (kf(T) && dr(T.expression) ? T.expression.name.text : r1(T) ? getNameFromPropertyName(T) : void 0); + } + function f(h) { + switch (h.kind) { + case 263: + case 219: + case 175: + case 174: + let T = h, k = _(T); + if (k) { + let y = a(k), G = Ba(y); + G && T.parent === G.parent && T.symbol === G.symbol ? T.body && !G.body && (y[y.length - 1] = T) : y.push(T); + } + Xt(h, f); + break; + case 264: + case 232: + case 265: + case 266: + case 267: + case 268: + case 272: + case 282: + case 277: + case 274: + case 275: + case 178: + case 179: + case 188: + t(h), Xt(h, f); + break; + case 170: if (!v_(h, 31)) break; + case 261: + case 209: { + let y = h; + if (Wg(y.name)) { + Xt(y.name, f); + break; + } + y.initializer && f(y.initializer); + } + case 307: + case 173: + case 172: + t(h); + break; + case 279: + let c = h; + c.exportClause && ($1(c.exportClause) ? jn(c.exportClause.elements, f) : f(c.exportClause.name)); + break; + case 273: + let W = h.importClause; + W && (W.name && t(W.name), W.namedBindings && (W.namedBindings.kind === 275 ? t(W.namedBindings) : jn(W.namedBindings.elements, f))); + break; + case 227: yf(h) !== 0 && t(h); + default: Xt(h, f); + } + } + } + }, ev = class { + constructor(e, t, a) { + this.fileName = e, this.text = t, this.skipTrivia = a || ((_) => _); + } + getLineAndCharacterOfPosition(e) { + return Bm(this, e); + } + }; + _b(tv()); + Ml = new Proxy({}, { get: () => !0 }); + vh = Ml["4.8"]; + Th = {}; + Ll = new Proxy({}, { get: (e, t) => t }); + xh = Ll, Sh = Ll; + C = xh, Rt = Sh; + av = Ml["5.0"], ye = Ae, sv = /* @__PURE__ */ new Set([ + ye.AmpersandAmpersandToken, + ye.BarBarToken, + ye.QuestionQuestionToken + ]), _v = /* @__PURE__ */ new Set([ + Ae.AmpersandAmpersandEqualsToken, + Ae.AmpersandEqualsToken, + Ae.AsteriskAsteriskEqualsToken, + Ae.AsteriskEqualsToken, + Ae.BarBarEqualsToken, + Ae.BarEqualsToken, + Ae.CaretEqualsToken, + Ae.EqualsToken, + Ae.GreaterThanGreaterThanEqualsToken, + Ae.GreaterThanGreaterThanGreaterThanEqualsToken, + Ae.LessThanLessThanEqualsToken, + Ae.MinusEqualsToken, + Ae.PercentEqualsToken, + Ae.PlusEqualsToken, + Ae.QuestionQuestionEqualsToken, + Ae.SlashEqualsToken + ]), ov = /* @__PURE__ */ new Set([ + ye.AmpersandAmpersandToken, + ye.AmpersandToken, + ye.AsteriskAsteriskToken, + ye.AsteriskToken, + ye.BarBarToken, + ye.BarToken, + ye.CaretToken, + ye.EqualsEqualsEqualsToken, + ye.EqualsEqualsToken, + ye.ExclamationEqualsEqualsToken, + ye.ExclamationEqualsToken, + ye.GreaterThanEqualsToken, + ye.GreaterThanGreaterThanGreaterThanToken, + ye.GreaterThanGreaterThanToken, + ye.GreaterThanToken, + ye.InKeyword, + ye.InstanceOfKeyword, + ye.LessThanEqualsToken, + ye.LessThanLessThanToken, + ye.LessThanToken, + ye.MinusToken, + ye.PercentToken, + ye.PlusToken, + ye.SlashToken + ]); + Qf = class extends Error { + fileName; + location; + constructor(t, a, _) { + super(t), this.fileName = a, this.location = _, Object.defineProperty(this, "name", { + configurable: !0, + enumerable: !1, + value: new.target.name + }); + } + get index() { + return this.location.start.offset; + } + get lineNumber() { + return this.location.start.line; + } + get column() { + return this.location.start.column; + } + }; + ge = Ae; + x = Ae; + Rl = class { + allowPattern = !1; + ast; + esTreeNodeToTSNodeMap = /* @__PURE__ */ new WeakMap(); + options; + tsNodeToESTreeNodeMap = /* @__PURE__ */ new WeakMap(); + constructor(t, a) { + this.ast = t, this.options = { ...a }; + } + #r(t, a) { + let _ = a === Ae.ForInStatement ? "for...in" : "for...of"; + if (H1(t)) { + t.declarations.length !== 1 && this.#e(t, `Only a single variable declaration is allowed in a '${_}' statement.`); + let f = t.declarations[0]; + f.initializer ? this.#e(f, `The variable declaration of a '${_}' statement cannot have an initializer.`) : f.type && this.#e(f, `The variable declaration of a '${_}' statement cannot have a type annotation.`), a === Ae.ForInStatement && t.flags & sn.Using && this.#e(t, "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."); + } else !Jl(t) && t.kind !== Ae.ObjectLiteralExpression && t.kind !== Ae.ArrayLiteralExpression && this.#e(t, `The left-hand side of a '${_}' statement must be a variable or a property access.`); + } + #i(t) { + this.options.allowInvalidAST || Jh(t); + } + #e(t, a) { + if (this.options.allowInvalidAST) return; + let _, f; + throw Array.isArray(t) ? [_, f] = t : typeof t == "number" ? _ = f = t : (_ = t.getStart(this.ast), f = t.getEnd()), w_(a, this.ast, _, f); + } + #t(t, a, _, f = !1) { + let h = f; + return Object.defineProperty(t, a, { + configurable: !0, + get: this.options.suppressDeprecatedPropertyWarnings ? () => t[_] : () => (h || ((void 0)(`The '${a}' property is deprecated on ${t.type} nodes. Use '${_}' instead. See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`, "DeprecationWarning"), h = !0), t[_]), + set(T) { + Object.defineProperty(t, a, { + enumerable: !0, + value: T, + writable: !0 + }); + } + }), t; + } + #n(t, a, _, f) { + let h = !1; + return Object.defineProperty(t, a, { + configurable: !0, + get: this.options.suppressDeprecatedPropertyWarnings ? () => f : () => { + if (!h) { + let T = `The '${a}' property is deprecated on ${t.type} nodes.`; + _ && (T += ` Use ${_} instead.`), T += " See https://typescript-eslint.io/troubleshooting/faqs/general#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.", (void 0)(T, "DeprecationWarning"), h = !0; + } + return f; + }, + set(T) { + Object.defineProperty(t, a, { + enumerable: !0, + value: T, + writable: !0 + }); + } + }), t; + } + assertModuleSpecifier(t, a) { + !a && t.moduleSpecifier == null && this.#e(t, "Module specifier must be a string literal."), t.moduleSpecifier && t.moduleSpecifier?.kind !== x.StringLiteral && this.#e(t.moduleSpecifier, "Module specifier must be a string literal."); + } + convertBindingNameWithTypeAnnotation(t, a, _) { + let f = this.convertPattern(t); + return a && (f.typeAnnotation = this.convertTypeAnnotation(a, _), this.fixParentLocation(f, f.typeAnnotation.range)), f; + } + convertBodyExpressions(t, a) { + let _ = Ch(a); + return t.map((f) => { + let h = this.convertChild(f); + if (_) { + if (h?.expression && Pl(f) && vi(f.expression)) return h.directive = h.expression.raw.slice(1, -1), h; + _ = !1; + } + return h; + }).filter((f) => f); + } + convertChainExpression(t, a) { + let { child: _, isOptional: f } = t.type === C.MemberExpression ? { + child: t.object, + isOptional: t.optional + } : t.type === C.CallExpression ? { + child: t.callee, + isOptional: t.optional + } : { + child: t.expression, + isOptional: !1 + }, h = Ph(a, _); + if (!h && !f) return t; + if (h && ed(_)) { + let T = _.expression; + t.type === C.MemberExpression ? t.object = T : t.type === C.CallExpression ? t.callee = T : t.expression = T; + } + return this.createNode(a, { + type: C.ChainExpression, + expression: t + }); + } + convertChild(t, a) { + return this.converter(t, a, !1); + } + convertChildren(t, a) { + return t.map((_) => this.converter(_, a, !1)); + } + convertPattern(t, a) { + return this.converter(t, a, !0); + } + convertTypeAnnotation(t, a) { + let _ = a?.kind === x.FunctionType || a?.kind === x.ConstructorType ? 2 : 1, h = [t.getFullStart() - _, t.end], T = Kr(h, this.ast); + return { + type: C.TSTypeAnnotation, + loc: T, + range: h, + typeAnnotation: this.convertChild(t) + }; + } + convertTypeArgumentsToTypeParameterInstantiation(t, a) { + let _ = er(t, this.ast, this.ast), f = [t.pos - 1, _.end]; + return t.length === 0 && this.#e(f, "Type argument list cannot be empty."), this.createNode(a, { + type: C.TSTypeParameterInstantiation, + range: f, + params: this.convertChildren(t) + }); + } + convertTSTypeParametersToTypeParametersDeclaration(t) { + let a = er(t, this.ast, this.ast), _ = [t.pos - 1, a.end]; + return t.length === 0 && this.#e(_, "Type parameter list cannot be empty."), { + type: C.TSTypeParameterDeclaration, + loc: Kr(_, this.ast), + range: _, + params: this.convertChildren(t) + }; + } + convertParameters(t) { + return t?.length ? t.map((a) => { + let _ = this.convertChild(a); + return _.decorators = this.convertChildren(xi(a) ?? []), _; + }) : []; + } + converter(t, a, _) { + if (!t) return null; + this.#i(t); + let f = this.allowPattern; + _ != null && (this.allowPattern = _); + let h = this.convertNode(t, a ?? t.parent); + return this.registerTSNodeInNodeMap(t, h), this.allowPattern = f, h; + } + convertImportAttributes(t) { + let a = t.attributes ?? t.assertClause; + return this.convertChildren(a?.elements ?? []); + } + convertJSXIdentifier(t) { + let a = this.createNode(t, { + type: C.JSXIdentifier, + name: t.getText() + }); + return this.registerTSNodeInNodeMap(t, a), a; + } + convertJSXNamespaceOrIdentifier(t) { + if (t.kind === Ae.JsxNamespacedName) { + let f = this.createNode(t, { + type: C.JSXNamespacedName, + name: this.createNode(t.name, { + type: C.JSXIdentifier, + name: t.name.text + }), + namespace: this.createNode(t.namespace, { + type: C.JSXIdentifier, + name: t.namespace.text + }) + }); + return this.registerTSNodeInNodeMap(t, f), f; + } + let a = t.getText(), _ = a.indexOf(":"); + if (_ > 0) { + let f = sa(t, this.ast), h = this.createNode(t, { + type: C.JSXNamespacedName, + range: f, + name: this.createNode(t, { + type: C.JSXIdentifier, + range: [f[0] + _ + 1, f[1]], + name: a.slice(_ + 1) + }), + namespace: this.createNode(t, { + type: C.JSXIdentifier, + range: [f[0], f[0] + _], + name: a.slice(0, _) + }) + }); + return this.registerTSNodeInNodeMap(t, h), h; + } + return this.convertJSXIdentifier(t); + } + convertJSXTagName(t, a) { + let _; + switch (t.kind) { + case x.PropertyAccessExpression: + t.name.kind === x.PrivateIdentifier && this.#e(t.name, "Non-private identifier expected."), _ = this.createNode(t, { + type: C.JSXMemberExpression, + object: this.convertJSXTagName(t.expression, a), + property: this.convertJSXIdentifier(t.name) + }); + break; + case x.ThisKeyword: + case x.Identifier: + default: return this.convertJSXNamespaceOrIdentifier(t); + } + return this.registerTSNodeInNodeMap(t, _), _; + } + convertMethodSignature(t) { + return this.createNode(t, { + type: C.TSMethodSignature, + accessibility: Si(t), + computed: _a(t.name), + key: this.convertChild(t.name), + kind: (() => { + switch (t.kind) { + case x.GetAccessor: return "get"; + case x.SetAccessor: return "set"; + case x.MethodSignature: return "method"; + } + })(), + optional: Zf(t), + params: this.convertParameters(t.parameters), + readonly: Ge(x.ReadonlyKeyword, t), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + static: Ge(x.StaticKeyword, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + } + fixParentLocation(t, a) { + a[0] < t.range[0] && (t.range[0] = a[0], t.loc.start = x_(t.range[0], this.ast)), a[1] > t.range[1] && (t.range[1] = a[1], t.loc.end = x_(t.range[1], this.ast)); + } + convertNode(t, a) { + switch (t.kind) { + case x.SourceFile: return this.createNode(t, { + type: C.Program, + range: [t.getStart(this.ast), t.endOfFileToken.end], + body: this.convertBodyExpressions(t.statements, t), + comments: void 0, + sourceType: t.externalModuleIndicator ? "module" : "script", + tokens: void 0 + }); + case x.Block: return this.createNode(t, { + type: C.BlockStatement, + body: this.convertBodyExpressions(t.statements, t) + }); + case x.Identifier: return Ih(t) ? this.createNode(t, { type: C.ThisExpression }) : this.createNode(t, { + type: C.Identifier, + decorators: [], + name: t.text, + optional: !1, + typeAnnotation: void 0 + }); + case x.PrivateIdentifier: return this.createNode(t, { + type: C.PrivateIdentifier, + name: t.text.slice(1) + }); + case x.WithStatement: return this.createNode(t, { + type: C.WithStatement, + body: this.convertChild(t.statement), + object: this.convertChild(t.expression) + }); + case x.ReturnStatement: return this.createNode(t, { + type: C.ReturnStatement, + argument: this.convertChild(t.expression) + }); + case x.LabeledStatement: return this.createNode(t, { + type: C.LabeledStatement, + body: this.convertChild(t.statement), + label: this.convertChild(t.label) + }); + case x.ContinueStatement: return this.createNode(t, { + type: C.ContinueStatement, + label: this.convertChild(t.label) + }); + case x.BreakStatement: return this.createNode(t, { + type: C.BreakStatement, + label: this.convertChild(t.label) + }); + case x.IfStatement: return this.createNode(t, { + type: C.IfStatement, + alternate: this.convertChild(t.elseStatement), + consequent: this.convertChild(t.thenStatement), + test: this.convertChild(t.expression) + }); + case x.SwitchStatement: return t.caseBlock.clauses.filter((_) => _.kind === x.DefaultClause).length > 1 && this.#e(t, "A 'default' clause cannot appear more than once in a 'switch' statement."), this.createNode(t, { + type: C.SwitchStatement, + cases: this.convertChildren(t.caseBlock.clauses), + discriminant: this.convertChild(t.expression) + }); + case x.CaseClause: + case x.DefaultClause: return this.createNode(t, { + type: C.SwitchCase, + consequent: this.convertChildren(t.statements), + test: t.kind === x.CaseClause ? this.convertChild(t.expression) : null + }); + case x.ThrowStatement: return t.expression.end === t.expression.pos && this.#e(t, "A throw statement must throw an expression."), this.createNode(t, { + type: C.ThrowStatement, + argument: this.convertChild(t.expression) + }); + case x.TryStatement: return this.createNode(t, { + type: C.TryStatement, + block: this.convertChild(t.tryBlock), + finalizer: this.convertChild(t.finallyBlock), + handler: this.convertChild(t.catchClause) + }); + case x.CatchClause: return t.variableDeclaration?.initializer && this.#e(t.variableDeclaration.initializer, "Catch clause variable cannot have an initializer."), this.createNode(t, { + type: C.CatchClause, + body: this.convertChild(t.block), + param: t.variableDeclaration ? this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name, t.variableDeclaration.type) : null + }); + case x.WhileStatement: return this.createNode(t, { + type: C.WhileStatement, + body: this.convertChild(t.statement), + test: this.convertChild(t.expression) + }); + case x.DoStatement: return this.createNode(t, { + type: C.DoWhileStatement, + body: this.convertChild(t.statement), + test: this.convertChild(t.expression) + }); + case x.ForStatement: return this.createNode(t, { + type: C.ForStatement, + body: this.convertChild(t.statement), + init: this.convertChild(t.initializer), + test: this.convertChild(t.condition), + update: this.convertChild(t.incrementor) + }); + case x.ForInStatement: return this.#r(t.initializer, t.kind), this.createNode(t, { + type: C.ForInStatement, + body: this.convertChild(t.statement), + left: this.convertPattern(t.initializer), + right: this.convertChild(t.expression) + }); + case x.ForOfStatement: return this.#r(t.initializer, t.kind), this.createNode(t, { + type: C.ForOfStatement, + await: !!(t.awaitModifier && t.awaitModifier.kind === x.AwaitKeyword), + body: this.convertChild(t.statement), + left: this.convertPattern(t.initializer), + right: this.convertChild(t.expression) + }); + case x.FunctionDeclaration: { + let _ = Ge(x.DeclareKeyword, t), f = Ge(x.AsyncKeyword, t), h = !!t.asteriskToken; + _ ? t.body ? this.#e(t, "An implementation cannot be declared in ambient contexts.") : f ? this.#e(t, "'async' modifier cannot be used in an ambient context.") : h && this.#e(t, "Generators are not allowed in an ambient context.") : !t.body && h && this.#e(t, "A function signature cannot be declared as a generator."); + let T = this.createNode(t, { + type: t.body ? C.FunctionDeclaration : C.TSDeclareFunction, + async: f, + body: this.convertChild(t.body) || void 0, + declare: _, + expression: !1, + generator: h, + id: this.convertChild(t.name), + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + return this.fixExports(t, T); + } + case x.VariableDeclaration: { + let _ = !!t.exclamationToken, f = this.convertChild(t.initializer), h = this.convertBindingNameWithTypeAnnotation(t.name, t.type, t); + return _ && (f ? this.#e(t, "Declarations with initializers cannot also have definite assignment assertions.") : (h.type !== C.Identifier || !h.typeAnnotation) && this.#e(t, "Declarations with definite assignment assertions must also have type annotations.")), this.createNode(t, { + type: C.VariableDeclarator, + definite: _, + id: h, + init: f + }); + } + case x.VariableStatement: { + let _ = this.createNode(t, { + type: C.VariableDeclaration, + declarations: this.convertChildren(t.declarationList.declarations), + declare: Ge(x.DeclareKeyword, t), + kind: S_(t.declarationList) + }); + return _.declarations.length || this.#e(t, "A variable declaration list must have at least one variable declarator."), (_.kind === "using" || _.kind === "await using") && t.declarationList.declarations.forEach((f, h) => { + _.declarations[h].init ?? this.#e(f, `'${_.kind}' declarations must be initialized.`), _.declarations[h].id.type !== C.Identifier && this.#e(f.name, `'${_.kind}' declarations may not have binding patterns.`); + }), (_.declare || [ + "await using", + "const", + "using" + ].includes(_.kind)) && t.declarationList.declarations.forEach((f, h) => { + _.declarations[h].definite && this.#e(f, "A definite assignment assertion '!' is not permitted in this context."); + }), _.declare && t.declarationList.declarations.forEach((f, h) => { + _.declarations[h].init && (["let", "var"].includes(_.kind) || _.declarations[h].id.typeAnnotation) && this.#e(f, "Initializers are not permitted in ambient contexts."); + }), this.fixExports(t, _); + } + case x.VariableDeclarationList: { + let _ = this.createNode(t, { + type: C.VariableDeclaration, + declarations: this.convertChildren(t.declarations), + declare: !1, + kind: S_(t) + }); + return (_.kind === "using" || _.kind === "await using") && t.declarations.forEach((f, h) => { + _.declarations[h].init != null && this.#e(f, `'${_.kind}' declarations may not be initialized in for statement.`), _.declarations[h].id.type !== C.Identifier && this.#e(f.name, `'${_.kind}' declarations may not have binding patterns.`); + }), _; + } + case x.ExpressionStatement: return this.createNode(t, { + type: C.ExpressionStatement, + directive: void 0, + expression: this.convertChild(t.expression) + }); + case x.ThisKeyword: return this.createNode(t, { type: C.ThisExpression }); + case x.ArrayLiteralExpression: return this.allowPattern ? this.createNode(t, { + type: C.ArrayPattern, + decorators: [], + elements: t.elements.map((_) => this.convertPattern(_)), + optional: !1, + typeAnnotation: void 0 + }) : this.createNode(t, { + type: C.ArrayExpression, + elements: this.convertChildren(t.elements) + }); + case x.ObjectLiteralExpression: { + if (this.allowPattern) return this.createNode(t, { + type: C.ObjectPattern, + decorators: [], + optional: !1, + properties: t.properties.map((f) => this.convertPattern(f)), + typeAnnotation: void 0 + }); + let _ = []; + for (let f of t.properties) (f.kind === x.GetAccessor || f.kind === x.SetAccessor || f.kind === x.MethodDeclaration) && !f.body && this.#e(f.end - 1, "'{' expected."), _.push(this.convertChild(f)); + return this.createNode(t, { + type: C.ObjectExpression, + properties: _ + }); + } + case x.PropertyAssignment: { + let { exclamationToken: _, questionToken: f } = t; + return f && this.#e(f, "A property assignment cannot have a question token."), _ && this.#e(_, "A property assignment cannot have an exclamation token."), this.createNode(t, { + type: C.Property, + computed: _a(t.name), + key: this.convertChild(t.name), + kind: "init", + method: !1, + optional: !1, + shorthand: !1, + value: this.converter(t.initializer, t, this.allowPattern) + }); + } + case x.ShorthandPropertyAssignment: { + let { exclamationToken: _, modifiers: f, questionToken: h } = t; + return f && this.#e(f[0], "A shorthand property assignment cannot have modifiers."), h && this.#e(h, "A shorthand property assignment cannot have a question token."), _ && this.#e(_, "A shorthand property assignment cannot have an exclamation token."), t.objectAssignmentInitializer ? this.createNode(t, { + type: C.Property, + computed: !1, + key: this.convertChild(t.name), + kind: "init", + method: !1, + optional: !1, + shorthand: !0, + value: this.createNode(t, { + type: C.AssignmentPattern, + decorators: [], + left: this.convertPattern(t.name), + optional: !1, + right: this.convertChild(t.objectAssignmentInitializer), + typeAnnotation: void 0 + }) + }) : this.createNode(t, { + type: C.Property, + computed: !1, + key: this.convertChild(t.name), + kind: "init", + method: !1, + optional: !1, + shorthand: !0, + value: this.convertChild(t.name) + }); + } + case x.ComputedPropertyName: return this.convertChild(t.expression); + case x.PropertyDeclaration: { + let _ = Ge(x.AbstractKeyword, t); + _ && t.initializer && this.#e(t.initializer, "Abstract property cannot have an initializer."), t.name.kind === x.StringLiteral && t.name.text === "constructor" && this.#e(t.name, "Classes may not have a field named 'constructor'."); + let h = Ge(x.AccessorKeyword, t) ? _ ? C.TSAbstractAccessorProperty : C.AccessorProperty : _ ? C.TSAbstractPropertyDefinition : C.PropertyDefinition, T = this.convertChild(t.name); + return this.createNode(t, { + type: h, + accessibility: Si(t), + computed: _a(t.name), + declare: Ge(x.DeclareKeyword, t), + decorators: this.convertChildren(xi(t) ?? []), + definite: !!t.exclamationToken, + key: T, + optional: (T.type === C.Literal || t.name.kind === x.Identifier || t.name.kind === x.ComputedPropertyName || t.name.kind === x.PrivateIdentifier) && !!t.questionToken, + override: Ge(x.OverrideKeyword, t), + readonly: Ge(x.ReadonlyKeyword, t), + static: Ge(x.StaticKeyword, t), + typeAnnotation: t.type && this.convertTypeAnnotation(t.type, t), + value: _ ? null : this.convertChild(t.initializer) + }); + } + case x.GetAccessor: + case x.SetAccessor: if (t.parent.kind === x.InterfaceDeclaration || t.parent.kind === x.TypeLiteral) return this.convertMethodSignature(t); + case x.MethodDeclaration: { + let _ = Ge(x.AbstractKeyword, t); + _ && t.body && this.#e(t.name, t.kind === x.GetAccessor || t.kind === x.SetAccessor ? "An abstract accessor cannot have an implementation." : `Method '${Mh(t.name, this.ast)}' cannot have an implementation because it is marked abstract.`); + let f = this.createNode(t, { + type: t.body ? C.FunctionExpression : C.TSEmptyBodyFunctionExpression, + range: [t.parameters.pos - 1, t.end], + async: Ge(x.AsyncKeyword, t), + body: this.convertChild(t.body), + declare: !1, + expression: !1, + generator: !!t.asteriskToken, + id: null, + params: [], + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + f.typeParameters && this.fixParentLocation(f, f.typeParameters.range); + let h; + if (a.kind === x.ObjectLiteralExpression) f.params = this.convertChildren(t.parameters), h = this.createNode(t, { + type: C.Property, + computed: _a(t.name), + key: this.convertChild(t.name), + kind: "init", + method: t.kind === x.MethodDeclaration, + optional: !!t.questionToken, + shorthand: !1, + value: f + }); + else { + f.params = this.convertParameters(t.parameters); + let T = _ ? C.TSAbstractMethodDefinition : C.MethodDefinition; + h = this.createNode(t, { + type: T, + accessibility: Si(t), + computed: _a(t.name), + decorators: this.convertChildren(xi(t) ?? []), + key: this.convertChild(t.name), + kind: "method", + optional: !!t.questionToken, + override: Ge(x.OverrideKeyword, t), + static: Ge(x.StaticKeyword, t), + value: f + }); + } + return t.kind === x.GetAccessor ? h.kind = "get" : t.kind === x.SetAccessor ? h.kind = "set" : !h.static && t.name.kind === x.StringLiteral && t.name.text === "constructor" && h.type !== C.Property && (h.kind = "constructor"), h; + } + case x.Constructor: { + let _ = kh(t), f = (_ && er(_, t, this.ast)) ?? t.getFirstToken(), h = this.createNode(t, { + type: t.body ? C.FunctionExpression : C.TSEmptyBodyFunctionExpression, + range: [t.parameters.pos - 1, t.end], + async: !1, + body: this.convertChild(t.body), + declare: !1, + expression: !1, + generator: !1, + id: null, + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + h.typeParameters && this.fixParentLocation(h, h.typeParameters.range); + let T = f.kind === x.StringLiteral ? this.createNode(f, { + type: C.Literal, + raw: f.getText(), + value: "constructor" + }) : this.createNode(t, { + type: C.Identifier, + range: [f.getStart(this.ast), f.end], + decorators: [], + name: "constructor", + optional: !1, + typeAnnotation: void 0 + }), k = Ge(x.StaticKeyword, t); + return this.createNode(t, { + type: Ge(x.AbstractKeyword, t) ? C.TSAbstractMethodDefinition : C.MethodDefinition, + accessibility: Si(t), + computed: !1, + decorators: [], + key: T, + kind: k ? "method" : "constructor", + optional: !1, + override: !1, + static: k, + value: h + }); + } + case x.FunctionExpression: return this.createNode(t, { + type: C.FunctionExpression, + async: Ge(x.AsyncKeyword, t), + body: this.convertChild(t.body), + declare: !1, + expression: !1, + generator: !!t.asteriskToken, + id: this.convertChild(t.name), + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + case x.SuperKeyword: return this.createNode(t, { type: C.Super }); + case x.ArrayBindingPattern: return this.createNode(t, { + type: C.ArrayPattern, + decorators: [], + elements: t.elements.map((_) => this.convertPattern(_)), + optional: !1, + typeAnnotation: void 0 + }); + case x.OmittedExpression: return null; + case x.ObjectBindingPattern: return this.createNode(t, { + type: C.ObjectPattern, + decorators: [], + optional: !1, + properties: t.elements.map((_) => this.convertPattern(_)), + typeAnnotation: void 0 + }); + case x.BindingElement: { + if (a.kind === x.ArrayBindingPattern) { + let f = this.convertChild(t.name, a); + return t.initializer ? this.createNode(t, { + type: C.AssignmentPattern, + decorators: [], + left: f, + optional: !1, + right: this.convertChild(t.initializer), + typeAnnotation: void 0 + }) : t.dotDotDotToken ? this.createNode(t, { + type: C.RestElement, + argument: f, + decorators: [], + optional: !1, + typeAnnotation: void 0, + value: void 0 + }) : f; + } + let _; + return t.dotDotDotToken ? _ = this.createNode(t, { + type: C.RestElement, + argument: this.convertChild(t.propertyName ?? t.name), + decorators: [], + optional: !1, + typeAnnotation: void 0, + value: void 0 + }) : _ = this.createNode(t, { + type: C.Property, + computed: !!(t.propertyName && t.propertyName.kind === x.ComputedPropertyName), + key: this.convertChild(t.propertyName ?? t.name), + kind: "init", + method: !1, + optional: !1, + shorthand: !t.propertyName, + value: this.convertChild(t.name) + }), t.initializer && (_.value = this.createNode(t, { + type: C.AssignmentPattern, + range: [t.name.getStart(this.ast), t.initializer.end], + decorators: [], + left: this.convertChild(t.name), + optional: !1, + right: this.convertChild(t.initializer), + typeAnnotation: void 0 + })), _; + } + case x.ArrowFunction: return this.createNode(t, { + type: C.ArrowFunctionExpression, + async: Ge(x.AsyncKeyword, t), + body: this.convertChild(t.body), + expression: t.body.kind !== x.Block, + generator: !1, + id: null, + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + case x.YieldExpression: return this.createNode(t, { + type: C.YieldExpression, + argument: this.convertChild(t.expression), + delegate: !!t.asteriskToken + }); + case x.AwaitExpression: return this.createNode(t, { + type: C.AwaitExpression, + argument: this.convertChild(t.expression) + }); + case x.NoSubstitutionTemplateLiteral: return this.createNode(t, { + type: C.TemplateLiteral, + expressions: [], + quasis: [this.createNode(t, { + type: C.TemplateElement, + tail: !0, + value: { + cooked: t.text, + raw: this.ast.text.slice(t.getStart(this.ast) + 1, t.end - 1) + } + })] + }); + case x.TemplateExpression: { + let _ = this.createNode(t, { + type: C.TemplateLiteral, + expressions: [], + quasis: [this.convertChild(t.head)] + }); + return t.templateSpans.forEach((f) => { + _.expressions.push(this.convertChild(f.expression)), _.quasis.push(this.convertChild(f.literal)); + }), _; + } + case x.TaggedTemplateExpression: return t.tag.flags & sn.OptionalChain && this.#e(t, "Tagged template expressions are not permitted in an optional chain."), this.createNode(t, { + type: C.TaggedTemplateExpression, + quasi: this.convertChild(t.template), + tag: this.convertChild(t.tag), + typeArguments: t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) + }); + case x.TemplateHead: + case x.TemplateMiddle: + case x.TemplateTail: { + let _ = t.kind === x.TemplateTail; + return this.createNode(t, { + type: C.TemplateElement, + tail: _, + value: { + cooked: t.text, + raw: this.ast.text.slice(t.getStart(this.ast) + 1, t.end - (_ ? 1 : 2)) + } + }); + } + case x.SpreadAssignment: + case x.SpreadElement: return this.allowPattern ? this.createNode(t, { + type: C.RestElement, + argument: this.convertPattern(t.expression), + decorators: [], + optional: !1, + typeAnnotation: void 0, + value: void 0 + }) : this.createNode(t, { + type: C.SpreadElement, + argument: this.convertChild(t.expression) + }); + case x.Parameter: { + let _, f; + return t.dotDotDotToken ? _ = f = this.createNode(t, { + type: C.RestElement, + argument: this.convertChild(t.name), + decorators: [], + optional: !1, + typeAnnotation: void 0, + value: void 0 + }) : t.initializer ? (_ = this.convertChild(t.name), f = this.createNode(t, { + type: C.AssignmentPattern, + range: [t.name.getStart(this.ast), t.initializer.end], + decorators: [], + left: _, + optional: !1, + right: this.convertChild(t.initializer), + typeAnnotation: void 0 + }), Rn(t) && (f.range[0] = _.range[0], f.loc = Kr(f.range, this.ast))) : _ = f = this.convertChild(t.name, a), t.type && (_.typeAnnotation = this.convertTypeAnnotation(t.type, t), this.fixParentLocation(_, _.typeAnnotation.range)), t.questionToken && (t.questionToken.end > _.range[1] && (_.range[1] = t.questionToken.end, _.loc.end = x_(_.range[1], this.ast)), _.optional = !0), Rn(t) ? this.createNode(t, { + type: C.TSParameterProperty, + accessibility: Si(t), + decorators: [], + override: Ge(x.OverrideKeyword, t), + parameter: f, + readonly: Ge(x.ReadonlyKeyword, t), + static: Ge(x.StaticKeyword, t) + }) : f; + } + case x.ClassDeclaration: !t.name && (!Ge(Ae.ExportKeyword, t) || !Ge(Ae.DefaultKeyword, t)) && this.#e(t, "A class declaration without the 'default' modifier must have a name."); + case x.ClassExpression: { + let _ = t.heritageClauses ?? [], f = t.kind === x.ClassDeclaration ? C.ClassDeclaration : C.ClassExpression, h, T; + for (let c of _) { + let { token: W, types: y } = c; + y.length === 0 && this.#e(c, `'${nt(W)}' list cannot be empty.`), W === x.ExtendsKeyword ? (h && this.#e(c, "'extends' clause already seen."), T && this.#e(c, "'extends' clause must precede 'implements' clause."), y.length > 1 && this.#e(y[1], "Classes can only extend a single class."), h ?? (h = c)) : W === x.ImplementsKeyword && (T && this.#e(c, "'implements' clause already seen."), T ?? (T = c)); + } + let k = this.createNode(t, { + type: f, + abstract: Ge(x.AbstractKeyword, t), + body: this.createNode(t, { + type: C.ClassBody, + range: [t.members.pos - 1, t.end], + body: this.convertChildren(t.members.filter(wh)) + }), + declare: Ge(x.DeclareKeyword, t), + decorators: this.convertChildren(xi(t) ?? []), + id: this.convertChild(t.name), + implements: this.convertChildren(T?.types ?? []), + superClass: h?.types[0] ? this.convertChild(h.types[0].expression) : null, + superTypeArguments: void 0, + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + return h?.types[0]?.typeArguments && (k.superTypeArguments = this.convertTypeArgumentsToTypeParameterInstantiation(h.types[0].typeArguments, h.types[0])), this.fixExports(t, k); + } + case x.ModuleBlock: return this.createNode(t, { + type: C.TSModuleBlock, + body: this.convertBodyExpressions(t.statements, t) + }); + case x.ImportDeclaration: { + this.assertModuleSpecifier(t, !1); + let _ = this.createNode(t, this.#t({ + type: C.ImportDeclaration, + attributes: this.convertImportAttributes(t), + importKind: "value", + source: this.convertChild(t.moduleSpecifier), + specifiers: [] + }, "assertions", "attributes", !0)); + if (t.importClause && (t.importClause.isTypeOnly && (_.importKind = "type"), t.importClause.name && _.specifiers.push(this.convertChild(t.importClause)), t.importClause.namedBindings)) switch (t.importClause.namedBindings.kind) { + case x.NamespaceImport: + _.specifiers.push(this.convertChild(t.importClause.namedBindings)); + break; + case x.NamedImports: + _.specifiers.push(...this.convertChildren(t.importClause.namedBindings.elements)); + break; + } + return _; + } + case x.NamespaceImport: return this.createNode(t, { + type: C.ImportNamespaceSpecifier, + local: this.convertChild(t.name) + }); + case x.ImportSpecifier: return this.createNode(t, { + type: C.ImportSpecifier, + imported: this.convertChild(t.propertyName ?? t.name), + importKind: t.isTypeOnly ? "type" : "value", + local: this.convertChild(t.name) + }); + case x.ImportClause: { + let _ = this.convertChild(t.name); + return this.createNode(t, { + type: C.ImportDefaultSpecifier, + range: _.range, + local: _ + }); + } + case x.ExportDeclaration: return t.exportClause?.kind === x.NamedExports ? (this.assertModuleSpecifier(t, !0), this.createNode(t, this.#t({ + type: C.ExportNamedDeclaration, + attributes: this.convertImportAttributes(t), + declaration: null, + exportKind: t.isTypeOnly ? "type" : "value", + source: this.convertChild(t.moduleSpecifier), + specifiers: this.convertChildren(t.exportClause.elements, t) + }, "assertions", "attributes", !0))) : (this.assertModuleSpecifier(t, !1), this.createNode(t, this.#t({ + type: C.ExportAllDeclaration, + attributes: this.convertImportAttributes(t), + exported: t.exportClause?.kind === x.NamespaceExport ? this.convertChild(t.exportClause.name) : null, + exportKind: t.isTypeOnly ? "type" : "value", + source: this.convertChild(t.moduleSpecifier) + }, "assertions", "attributes", !0))); + case x.ExportSpecifier: { + let _ = t.propertyName ?? t.name; + return _.kind === x.StringLiteral && a.kind === x.ExportDeclaration && a.moduleSpecifier?.kind !== x.StringLiteral && this.#e(_, "A string literal cannot be used as a local exported binding without `from`."), this.createNode(t, { + type: C.ExportSpecifier, + exported: this.convertChild(t.name), + exportKind: t.isTypeOnly ? "type" : "value", + local: this.convertChild(_) + }); + } + case x.ExportAssignment: return t.isExportEquals ? this.createNode(t, { + type: C.TSExportAssignment, + expression: this.convertChild(t.expression) + }) : this.createNode(t, { + type: C.ExportDefaultDeclaration, + declaration: this.convertChild(t.expression), + exportKind: "value" + }); + case x.PrefixUnaryExpression: + case x.PostfixUnaryExpression: { + let _ = Qr(t.operator); + return _ === "++" || _ === "--" ? (Jl(t.operand) || this.#e(t.operand, "Invalid left-hand side expression in unary operation"), this.createNode(t, { + type: C.UpdateExpression, + argument: this.convertChild(t.operand), + operator: _, + prefix: t.kind === x.PrefixUnaryExpression + })) : this.createNode(t, { + type: C.UnaryExpression, + argument: this.convertChild(t.operand), + operator: _, + prefix: t.kind === x.PrefixUnaryExpression + }); + } + case x.DeleteExpression: return this.createNode(t, { + type: C.UnaryExpression, + argument: this.convertChild(t.expression), + operator: "delete", + prefix: !0 + }); + case x.VoidExpression: return this.createNode(t, { + type: C.UnaryExpression, + argument: this.convertChild(t.expression), + operator: "void", + prefix: !0 + }); + case x.TypeOfExpression: return this.createNode(t, { + type: C.UnaryExpression, + argument: this.convertChild(t.expression), + operator: "typeof", + prefix: !0 + }); + case x.TypeOperator: return this.createNode(t, { + type: C.TSTypeOperator, + operator: Qr(t.operator), + typeAnnotation: this.convertChild(t.type) + }); + case x.BinaryExpression: { + if (t.operatorToken.kind !== x.InKeyword && t.left.kind === x.PrivateIdentifier ? this.#e(t.left, "Private identifiers cannot appear on the right-hand-side of an 'in' expression.") : t.right.kind === x.PrivateIdentifier && this.#e(t.right, "Private identifiers are only allowed on the left-hand-side of an 'in' expression."), Eh(t.operatorToken)) { + let f = this.createNode(t, { + type: C.SequenceExpression, + expressions: [] + }), h = this.convertChild(t.left); + return h.type === C.SequenceExpression && t.left.kind !== x.ParenthesizedExpression ? f.expressions.push(...h.expressions) : f.expressions.push(h), f.expressions.push(this.convertChild(t.right)), f; + } + let _ = Ah(t.operatorToken); + return this.allowPattern && _.type === C.AssignmentExpression ? this.createNode(t, { + type: C.AssignmentPattern, + decorators: [], + left: this.convertPattern(t.left, t), + optional: !1, + right: this.convertChild(t.right), + typeAnnotation: void 0 + }) : this.createNode(t, { + ..._, + left: this.converter(t.left, t, _.type === C.AssignmentExpression), + right: this.convertChild(t.right) + }); + } + case x.PropertyAccessExpression: { + let _ = this.convertChild(t.expression), f = this.convertChild(t.name), T = this.createNode(t, { + type: C.MemberExpression, + computed: !1, + object: _, + optional: t.questionDotToken != null, + property: f + }); + return this.convertChainExpression(T, t); + } + case x.ElementAccessExpression: { + let _ = this.convertChild(t.expression), f = this.convertChild(t.argumentExpression), T = this.createNode(t, { + type: C.MemberExpression, + computed: !0, + object: _, + optional: t.questionDotToken != null, + property: f + }); + return this.convertChainExpression(T, t); + } + case x.CallExpression: { + if (t.expression.kind === x.ImportKeyword) return t.arguments.length !== 1 && t.arguments.length !== 2 && this.#e(t.arguments[2] ?? t, "Dynamic import requires exactly one or two arguments."), this.createNode(t, this.#t({ + type: C.ImportExpression, + options: t.arguments[1] ? this.convertChild(t.arguments[1]) : null, + source: this.convertChild(t.arguments[0]) + }, "attributes", "options", !0)); + let _ = this.convertChild(t.expression), f = this.convertChildren(t.arguments), h = t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t), T = this.createNode(t, { + type: C.CallExpression, + arguments: f, + callee: _, + optional: t.questionDotToken != null, + typeArguments: h + }); + return this.convertChainExpression(T, t); + } + case x.NewExpression: { + let _ = t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t); + return this.createNode(t, { + type: C.NewExpression, + arguments: this.convertChildren(t.arguments ?? []), + callee: this.convertChild(t.expression), + typeArguments: _ + }); + } + case x.ConditionalExpression: return this.createNode(t, { + type: C.ConditionalExpression, + alternate: this.convertChild(t.whenFalse), + consequent: this.convertChild(t.whenTrue), + test: this.convertChild(t.condition) + }); + case x.MetaProperty: return this.createNode(t, { + type: C.MetaProperty, + meta: this.createNode(t.getFirstToken(), { + type: C.Identifier, + decorators: [], + name: Qr(t.keywordToken), + optional: !1, + typeAnnotation: void 0 + }), + property: this.convertChild(t.name) + }); + case x.Decorator: return this.createNode(t, { + type: C.Decorator, + expression: this.convertChild(t.expression) + }); + case x.StringLiteral: return this.createNode(t, { + type: C.Literal, + raw: t.getText(), + value: a.kind === x.JsxAttribute ? Kf(t.text) : t.text + }); + case x.NumericLiteral: return this.createNode(t, { + type: C.Literal, + raw: t.getText(), + value: Number(t.text) + }); + case x.BigIntLiteral: { + let _ = sa(t, this.ast), f = this.ast.text.slice(_[0], _[1]), h = Wr(0, f.slice(0, -1), "_", ""), T = typeof BigInt < "u" ? BigInt(h) : null; + return this.createNode(t, { + type: C.Literal, + range: _, + bigint: T == null ? h : String(T), + raw: f, + value: T + }); + } + case x.RegularExpressionLiteral: { + let _ = t.text.slice(1, t.text.lastIndexOf("/")), f = t.text.slice(t.text.lastIndexOf("/") + 1), h = null; + try { + h = new RegExp(_, f); + } catch {} + return this.createNode(t, { + type: C.Literal, + raw: t.text, + regex: { + flags: f, + pattern: _ + }, + value: h + }); + } + case x.TrueKeyword: return this.createNode(t, { + type: C.Literal, + raw: "true", + value: !0 + }); + case x.FalseKeyword: return this.createNode(t, { + type: C.Literal, + raw: "false", + value: !1 + }); + case x.NullKeyword: return this.createNode(t, { + type: C.Literal, + raw: "null", + value: null + }); + case x.EmptyStatement: return this.createNode(t, { type: C.EmptyStatement }); + case x.DebuggerStatement: return this.createNode(t, { type: C.DebuggerStatement }); + case x.JsxElement: return this.createNode(t, { + type: C.JSXElement, + children: this.convertChildren(t.children), + closingElement: this.convertChild(t.closingElement), + openingElement: this.convertChild(t.openingElement) + }); + case x.JsxFragment: return this.createNode(t, { + type: C.JSXFragment, + children: this.convertChildren(t.children), + closingFragment: this.convertChild(t.closingFragment), + openingFragment: this.convertChild(t.openingFragment) + }); + case x.JsxSelfClosingElement: return this.createNode(t, { + type: C.JSXElement, + children: [], + closingElement: null, + openingElement: this.createNode(t, { + type: C.JSXOpeningElement, + range: sa(t, this.ast), + attributes: this.convertChildren(t.attributes.properties), + name: this.convertJSXTagName(t.tagName, t), + selfClosing: !0, + typeArguments: t.typeArguments ? this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) : void 0 + }) + }); + case x.JsxOpeningElement: return this.createNode(t, { + type: C.JSXOpeningElement, + attributes: this.convertChildren(t.attributes.properties), + name: this.convertJSXTagName(t.tagName, t), + selfClosing: !1, + typeArguments: t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) + }); + case x.JsxClosingElement: return this.createNode(t, { + type: C.JSXClosingElement, + name: this.convertJSXTagName(t.tagName, t) + }); + case x.JsxOpeningFragment: return this.createNode(t, { type: C.JSXOpeningFragment }); + case x.JsxClosingFragment: return this.createNode(t, { type: C.JSXClosingFragment }); + case x.JsxExpression: { + let _ = t.expression ? this.convertChild(t.expression) : this.createNode(t, { + type: C.JSXEmptyExpression, + range: [t.getStart(this.ast) + 1, t.getEnd() - 1] + }); + return t.dotDotDotToken ? this.createNode(t, { + type: C.JSXSpreadChild, + expression: _ + }) : this.createNode(t, { + type: C.JSXExpressionContainer, + expression: _ + }); + } + case x.JsxAttribute: return this.createNode(t, { + type: C.JSXAttribute, + name: this.convertJSXNamespaceOrIdentifier(t.name), + value: this.convertChild(t.initializer) + }); + case x.JsxText: { + let _ = t.getFullStart(), f = t.getEnd(), h = this.ast.text.slice(_, f); + return this.createNode(t, { + type: C.JSXText, + range: [_, f], + raw: h, + value: Kf(h) + }); + } + case x.JsxSpreadAttribute: return this.createNode(t, { + type: C.JSXSpreadAttribute, + argument: this.convertChild(t.expression) + }); + case x.QualifiedName: return this.createNode(t, { + type: C.TSQualifiedName, + left: this.convertChild(t.left), + right: this.convertChild(t.right) + }); + case x.TypeReference: return this.createNode(t, { + type: C.TSTypeReference, + typeArguments: t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t), + typeName: this.convertChild(t.typeName) + }); + case x.TypeParameter: return this.createNode(t, { + type: C.TSTypeParameter, + const: Ge(x.ConstKeyword, t), + constraint: t.constraint && this.convertChild(t.constraint), + default: t.default ? this.convertChild(t.default) : void 0, + in: Ge(x.InKeyword, t), + name: this.convertChild(t.name), + out: Ge(x.OutKeyword, t) + }); + case x.ThisType: return this.createNode(t, { type: C.TSThisType }); + case x.AnyKeyword: + case x.BigIntKeyword: + case x.BooleanKeyword: + case x.NeverKeyword: + case x.NumberKeyword: + case x.ObjectKeyword: + case x.StringKeyword: + case x.SymbolKeyword: + case x.UnknownKeyword: + case x.VoidKeyword: + case x.UndefinedKeyword: + case x.IntrinsicKeyword: return this.createNode(t, { type: C[`TS${x[t.kind]}`] }); + case x.NonNullExpression: { + let _ = this.createNode(t, { + type: C.TSNonNullExpression, + expression: this.convertChild(t.expression) + }); + return this.convertChainExpression(_, t); + } + case x.TypeLiteral: return this.createNode(t, { + type: C.TSTypeLiteral, + members: this.convertChildren(t.members) + }); + case x.ArrayType: return this.createNode(t, { + type: C.TSArrayType, + elementType: this.convertChild(t.elementType) + }); + case x.IndexedAccessType: return this.createNode(t, { + type: C.TSIndexedAccessType, + indexType: this.convertChild(t.indexType), + objectType: this.convertChild(t.objectType) + }); + case x.ConditionalType: return this.createNode(t, { + type: C.TSConditionalType, + checkType: this.convertChild(t.checkType), + extendsType: this.convertChild(t.extendsType), + falseType: this.convertChild(t.falseType), + trueType: this.convertChild(t.trueType) + }); + case x.TypeQuery: return this.createNode(t, { + type: C.TSTypeQuery, + exprName: this.convertChild(t.exprName), + typeArguments: t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) + }); + case x.MappedType: return t.members && t.members.length > 0 && this.#e(t.members[0], "A mapped type may not declare properties or methods."), this.createNode(t, this.#n({ + type: C.TSMappedType, + constraint: this.convertChild(t.typeParameter.constraint), + key: this.convertChild(t.typeParameter.name), + nameType: this.convertChild(t.nameType) ?? null, + optional: t.questionToken ? t.questionToken.kind === x.QuestionToken || Qr(t.questionToken.kind) : !1, + readonly: t.readonlyToken ? t.readonlyToken.kind === x.ReadonlyKeyword || Qr(t.readonlyToken.kind) : void 0, + typeAnnotation: t.type && this.convertChild(t.type) + }, "typeParameter", "'constraint' and 'key'", this.convertChild(t.typeParameter))); + case x.ParenthesizedExpression: return this.convertChild(t.expression, a); + case x.TypeAliasDeclaration: { + let _ = this.createNode(t, { + type: C.TSTypeAliasDeclaration, + declare: Ge(x.DeclareKeyword, t), + id: this.convertChild(t.name), + typeAnnotation: this.convertChild(t.type), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + return this.fixExports(t, _); + } + case x.MethodSignature: return this.convertMethodSignature(t); + case x.PropertySignature: { + let { initializer: _ } = t; + return _ && this.#e(_, "A property signature cannot have an initializer."), this.createNode(t, { + type: C.TSPropertySignature, + accessibility: Si(t), + computed: _a(t.name), + key: this.convertChild(t.name), + optional: Zf(t), + readonly: Ge(x.ReadonlyKeyword, t), + static: Ge(x.StaticKeyword, t), + typeAnnotation: t.type && this.convertTypeAnnotation(t.type, t) + }); + } + case x.IndexSignature: return this.createNode(t, { + type: C.TSIndexSignature, + accessibility: Si(t), + parameters: this.convertChildren(t.parameters), + readonly: Ge(x.ReadonlyKeyword, t), + static: Ge(x.StaticKeyword, t), + typeAnnotation: t.type && this.convertTypeAnnotation(t.type, t) + }); + case x.ConstructorType: return this.createNode(t, { + type: C.TSConstructorType, + abstract: Ge(x.AbstractKeyword, t), + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + case x.FunctionType: { + let { modifiers: _ } = t; + _ && this.#e(_[0], "A function type cannot have modifiers."); + } + case x.ConstructSignature: + case x.CallSignature: { + let _ = t.kind === x.ConstructSignature ? C.TSConstructSignatureDeclaration : t.kind === x.CallSignature ? C.TSCallSignatureDeclaration : C.TSFunctionType; + return this.createNode(t, { + type: _, + params: this.convertParameters(t.parameters), + returnType: t.type && this.convertTypeAnnotation(t.type, t), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + } + case x.ExpressionWithTypeArguments: { + let _ = a.kind, f = _ === x.InterfaceDeclaration ? C.TSInterfaceHeritage : _ === x.HeritageClause ? C.TSClassImplements : C.TSInstantiationExpression; + return this.createNode(t, { + type: f, + expression: this.convertChild(t.expression), + typeArguments: t.typeArguments && this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) + }); + } + case x.InterfaceDeclaration: { + let _ = t.heritageClauses ?? [], f = [], h = !1; + for (let k of _) { + k.token !== x.ExtendsKeyword && this.#e(k, k.token === x.ImplementsKeyword ? "Interface declaration cannot have 'implements' clause." : "Unexpected token."), h && this.#e(k, "'extends' clause already seen."), h = !0; + for (let c of k.types) (!jh(c.expression) || e1(c.expression)) && this.#e(c, "Interface declaration can only extend an identifier/qualified name with optional type arguments."), f.push(this.convertChild(c, t)); + } + let T = this.createNode(t, { + type: C.TSInterfaceDeclaration, + body: this.createNode(t, { + type: C.TSInterfaceBody, + range: [t.members.pos - 1, t.end], + body: this.convertChildren(t.members) + }), + declare: Ge(x.DeclareKeyword, t), + extends: f, + id: this.convertChild(t.name), + typeParameters: t.typeParameters && this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) + }); + return this.fixExports(t, T); + } + case x.TypePredicate: { + let _ = this.createNode(t, { + type: C.TSTypePredicate, + asserts: t.assertsModifier != null, + parameterName: this.convertChild(t.parameterName), + typeAnnotation: null + }); + return t.type && (_.typeAnnotation = this.convertTypeAnnotation(t.type, t), _.typeAnnotation.loc = _.typeAnnotation.typeAnnotation.loc, _.typeAnnotation.range = _.typeAnnotation.typeAnnotation.range), _; + } + case x.ImportType: { + let _ = sa(t, this.ast); + if (t.isTypeOf) _[0] = er(t.getFirstToken(), t, this.ast).getStart(this.ast); + let f = null; + if (t.attributes) { + let c = this.createNode(t.attributes, { + type: C.ObjectExpression, + properties: t.attributes.elements.map((be) => this.createNode(be, { + type: C.Property, + computed: !1, + key: this.convertChild(be.name), + kind: "init", + method: !1, + optional: !1, + shorthand: !1, + value: this.convertChild(be.value) + })) + }), y = er(er(t.argument, t, this.ast), t, this.ast), G = er(t.attributes, t, this.ast), E = G.kind === Ae.CommaToken ? er(G, t, this.ast) : G, D = er(y, t, this.ast), R = sa(D, this.ast), ue = D.kind === Ae.AssertKeyword ? "assert" : "with"; + f = this.createNode(t, { + type: C.ObjectExpression, + range: [y.getStart(this.ast), E.end], + properties: [this.createNode(t, { + type: C.Property, + range: [R[0], t.attributes.end], + computed: !1, + key: this.createNode(t, { + type: C.Identifier, + range: R, + decorators: [], + name: ue, + optional: !1, + typeAnnotation: void 0 + }), + kind: "init", + method: !1, + optional: !1, + shorthand: !1, + value: c + })] + }); + } + let h = this.convertChild(t.argument), T = h.literal, k = this.createNode(t, this.#n({ + type: C.TSImportType, + range: _, + options: f, + qualifier: this.convertChild(t.qualifier), + source: T, + typeArguments: t.typeArguments ? this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) : null + }, "argument", "source", h)); + return t.isTypeOf ? this.createNode(t, { + type: C.TSTypeQuery, + exprName: k, + typeArguments: void 0 + }) : k; + } + case x.EnumDeclaration: { + let _ = this.convertChildren(t.members), f = this.createNode(t, this.#n({ + type: C.TSEnumDeclaration, + body: this.createNode(t, { + type: C.TSEnumBody, + range: [t.members.pos - 1, t.end], + members: _ + }), + const: Ge(x.ConstKeyword, t), + declare: Ge(x.DeclareKeyword, t), + id: this.convertChild(t.name) + }, "members", "'body.members'", this.convertChildren(t.members))); + return this.fixExports(t, f); + } + case x.EnumMember: { + let _ = t.name.kind === Ae.ComputedPropertyName; + return _ && this.#e(t.name, "Computed property names are not allowed in enums."), (t.name.kind === x.NumericLiteral || t.name.kind === x.BigIntLiteral) && this.#e(t.name, "An enum member cannot have a numeric name."), this.createNode(t, this.#n({ + type: C.TSEnumMember, + id: this.convertChild(t.name), + initializer: t.initializer && this.convertChild(t.initializer) + }, "computed", void 0, _)); + } + case x.ModuleDeclaration: { + let _ = Ge(x.DeclareKeyword, t), f = this.createNode(t, { + type: C.TSModuleDeclaration, + ...(() => { + if (t.flags & sn.GlobalAugmentation) { + let T = this.convertChild(t.name), k = this.convertChild(t.body); + return (k == null || k.type === C.TSModuleDeclaration) && this.#e(t.body ?? t, "Expected a valid module body"), T.type !== C.Identifier && this.#e(t.name, "global module augmentation must have an Identifier id"), { + body: k, + declare: !1, + global: !1, + id: T, + kind: "global" + }; + } + if (vi(t.name)) { + let T = this.convertChild(t.body); + return { + kind: "module", + ...T != null ? { body: T } : {}, + declare: !1, + global: !1, + id: this.convertChild(t.name) + }; + } + t.body ?? this.#e(t, "Expected a module body"), t.name.kind !== Ae.Identifier && this.#e(t.name, "`namespace`s must have an Identifier id"); + let h = this.createNode(t.name, { + type: C.Identifier, + range: [t.name.getStart(this.ast), t.name.getEnd()], + decorators: [], + name: t.name.text, + optional: !1, + typeAnnotation: void 0 + }); + for (; t.body && Ti(t.body) && t.body.name;) { + t = t.body, _ || (_ = Ge(x.DeclareKeyword, t)); + let T = t.name, k = this.createNode(T, { + type: C.Identifier, + range: [T.getStart(this.ast), T.getEnd()], + decorators: [], + name: T.text, + optional: !1, + typeAnnotation: void 0 + }); + h = this.createNode(T, { + type: C.TSQualifiedName, + range: [h.range[0], k.range[1]], + left: h, + right: k + }); + } + return { + body: this.convertChild(t.body), + declare: !1, + global: !1, + id: h, + kind: t.flags & sn.Namespace ? "namespace" : "module" + }; + })() + }); + return f.declare = _, t.flags & sn.GlobalAugmentation && (f.global = !0), this.fixExports(t, f); + } + case x.ParenthesizedType: return this.convertChild(t.type); + case x.UnionType: return this.createNode(t, { + type: C.TSUnionType, + types: this.convertChildren(t.types) + }); + case x.IntersectionType: return this.createNode(t, { + type: C.TSIntersectionType, + types: this.convertChildren(t.types) + }); + case x.AsExpression: return this.createNode(t, { + type: C.TSAsExpression, + expression: this.convertChild(t.expression), + typeAnnotation: this.convertChild(t.type) + }); + case x.InferType: return this.createNode(t, { + type: C.TSInferType, + typeParameter: this.convertChild(t.typeParameter) + }); + case x.LiteralType: return t.literal.kind === x.NullKeyword ? this.createNode(t.literal, { type: C.TSNullKeyword }) : this.createNode(t, { + type: C.TSLiteralType, + literal: this.convertChild(t.literal) + }); + case x.TypeAssertionExpression: return this.createNode(t, { + type: C.TSTypeAssertion, + expression: this.convertChild(t.expression), + typeAnnotation: this.convertChild(t.type) + }); + case x.ImportEqualsDeclaration: return this.fixExports(t, this.createNode(t, { + type: C.TSImportEqualsDeclaration, + id: this.convertChild(t.name), + importKind: t.isTypeOnly ? "type" : "value", + moduleReference: this.convertChild(t.moduleReference) + })); + case x.ExternalModuleReference: return t.expression.kind !== x.StringLiteral && this.#e(t.expression, "String literal expected."), this.createNode(t, { + type: C.TSExternalModuleReference, + expression: this.convertChild(t.expression) + }); + case x.NamespaceExportDeclaration: return this.createNode(t, { + type: C.TSNamespaceExportDeclaration, + id: this.convertChild(t.name) + }); + case x.AbstractKeyword: return this.createNode(t, { type: C.TSAbstractKeyword }); + case x.TupleType: { + let _ = this.convertChildren(t.elements); + return this.createNode(t, { + type: C.TSTupleType, + elementTypes: _ + }); + } + case x.NamedTupleMember: { + let _ = this.createNode(t, { + type: C.TSNamedTupleMember, + elementType: this.convertChild(t.type, t), + label: this.convertChild(t.name, t), + optional: t.questionToken != null + }); + return t.dotDotDotToken ? (_.range[0] = _.label.range[0], _.loc.start = _.label.loc.start, this.createNode(t, { + type: C.TSRestType, + typeAnnotation: _ + })) : _; + } + case x.OptionalType: return this.createNode(t, { + type: C.TSOptionalType, + typeAnnotation: this.convertChild(t.type) + }); + case x.RestType: return this.createNode(t, { + type: C.TSRestType, + typeAnnotation: this.convertChild(t.type) + }); + case x.TemplateLiteralType: { + let _ = this.createNode(t, { + type: C.TSTemplateLiteralType, + quasis: [this.convertChild(t.head)], + types: [] + }); + return t.templateSpans.forEach((f) => { + _.types.push(this.convertChild(f.type)), _.quasis.push(this.convertChild(f.literal)); + }), _; + } + case x.ClassStaticBlockDeclaration: return this.createNode(t, { + type: C.StaticBlock, + body: this.convertBodyExpressions(t.body.statements, t) + }); + case x.AssertEntry: + case x.ImportAttribute: return this.createNode(t, { + type: C.ImportAttribute, + key: this.convertChild(t.name), + value: this.convertChild(t.value) + }); + case x.SatisfiesExpression: return this.createNode(t, { + type: C.TSSatisfiesExpression, + expression: this.convertChild(t.expression), + typeAnnotation: this.convertChild(t.type) + }); + default: return this.deeplyCopy(t); + } + } + createNode(t, a) { + let _ = a; + return _.range ?? (_.range = sa(t, this.ast)), _.loc ?? (_.loc = Kr(_.range, this.ast)), _ && this.options.shouldPreserveNodeMaps && this.esTreeNodeToTSNodeMap.set(_, t), _; + } + convertProgram() { + return this.converter(this.ast); + } + deeplyCopy(t) { + t.kind === Ae.JSDocFunctionType && this.#e(t, "JSDoc types can only be used inside documentation comments."); + let a = `TS${x[t.kind]}`; + if (this.options.errorOnUnknownASTType && !C[a]) throw new Error(`Unknown AST_NODE_TYPE: "${a}"`); + let _ = this.createNode(t, { type: a }); + "type" in t && (_.typeAnnotation = t.type && "kind" in t.type && i1(t.type) ? this.convertTypeAnnotation(t.type, t) : null), "typeArguments" in t && (_.typeArguments = t.typeArguments && "pos" in t.typeArguments ? this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments, t) : null), "typeParameters" in t && (_.typeParameters = t.typeParameters && "pos" in t.typeParameters ? this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters) : null); + let f = xi(t); + f?.length && (_.decorators = this.convertChildren(f)); + let h = /* @__PURE__ */ new Set([ + "_children", + "decorators", + "end", + "flags", + "heritageClauses", + "illegalDecorators", + "jsDoc", + "kind", + "locals", + "localSymbol", + "modifierFlagsCache", + "modifiers", + "nextContainer", + "parent", + "pos", + "symbol", + "transformFlags", + "type", + "typeArguments", + "typeParameters" + ]); + return Object.entries(t).filter(([T]) => !h.has(T)).forEach(([T, k]) => { + Array.isArray(k) ? _[T] = this.convertChildren(k) : k && typeof k == "object" && k.kind ? _[T] = this.convertChild(k) : _[T] = k; + }), _; + } + fixExports(t, a) { + let f = Ti(t) && !vi(t.name) ? Oh(t) : Rn(t); + if (f?.[0].kind === x.ExportKeyword) { + this.registerTSNodeInNodeMap(t, a); + let h = f[0], T = f[1], k = T?.kind === x.DefaultKeyword, c = k ? er(T, this.ast, this.ast) : er(h, this.ast, this.ast); + if (a.range[0] = c.getStart(this.ast), a.loc = Kr(a.range, this.ast), k) return this.createNode(t, { + type: C.ExportDefaultDeclaration, + range: [h.getStart(this.ast), a.range[1]], + declaration: a, + exportKind: "value" + }); + let W = a.type === C.TSInterfaceDeclaration || a.type === C.TSTypeAliasDeclaration, y = "declare" in a && a.declare; + return this.createNode(t, this.#t({ + type: C.ExportNamedDeclaration, + range: [h.getStart(this.ast), a.range[1]], + attributes: [], + declaration: a, + exportKind: W || y ? "type" : "value", + source: null, + specifiers: [] + }, "assertions", "attributes", !0)); + } + return a; + } + getASTMaps() { + return { + esTreeNodeToTSNodeMap: this.esTreeNodeToTSNodeMap, + tsNodeToESTreeNodeMap: this.tsNodeToESTreeNodeMap + }; + } + registerTSNodeInNodeMap(t, a) { + a && this.options.shouldPreserveNodeMaps && !this.tsNodeToESTreeNodeMap.has(t) && this.tsNodeToESTreeNodeMap.set(t, a); + } + }; + [rx, ix] = gm.split(".").map((e) => Number.parseInt(e, 10)); + en.Intrinsic ?? en.Any | en.Unknown | en.String | en.Number | en.BigInt | en.Boolean | en.BooleanLiteral | en.ESSymbol | en.Void | en.Undefined | en.Null | en.Never | en.NonPrimitive; + Uv = function(e) { + return e && e.__esModule ? e : { default: e }; + }; + Bv = Uv({ extname: (e) => "." + e.split(".").pop() }); + zv = (0, { default: Na }.default)("typescript-eslint:typescript-estree:create-program:createSourceFile"); + Gh = (e) => e; + Hh = class {}; + $h = () => !1; + n4 = function(e) { + return e && e.__esModule ? e : { default: e }; + }; + r4 = {}, id = { default: Na }, i4 = n4({ extname: (e) => "." + e.split(".").pop() }), a4 = (0, id.default)("typescript-eslint:typescript-estree:parseSettings:createParseSettings"), Kh = null, k_ = { + ParseAll: Ya?.ParseAll, + ParseForTypeErrors: Ya?.ParseForTypeErrors, + ParseForTypeInfo: Ya?.ParseForTypeInfo, + ParseNone: Ya?.ParseNone + }; + (0, { default: Na }.default)("typescript-eslint:typescript-estree:parser"); + t0 = m4; + h4 = Array.prototype.findLast ?? function(e) { + for (let t = this.length - 1; t >= 0; t--) { + let a = this[t]; + if (e(a, t, this)) return a; + } + }, r0 = Ia("findLast", function() { + if (Array.isArray(this)) return h4; + }); + i0 = Ia("at", function() { + if (Array.isArray(this) || typeof this == "string") return g4; + }); + $a = v4; + Qa = $a([ + "Block", + "CommentBlock", + "MultiLine" + ]); + a0 = $a([ + "Line", + "CommentLine", + "SingleLine", + "HashbangComment", + "HTMLOpen", + "HTMLClose", + "Hashbang", + "InterpreterDirective" + ]); + ad = /* @__PURE__ */ new WeakMap(); + s0 = S4; + sd = /* @__PURE__ */ new WeakMap(); + _d = k4; + _0 = E4; + o0 = A4; + E_ = null; + C4 = 10; + for (let e = 0; e <= C4; e++) A_(); + c0 = D4; + w = [ + [ + "decorators", + "key", + "typeAnnotation", + "value" + ], + [], + ["elementType"], + ["expression"], + ["expression", "typeAnnotation"], + ["left", "right"], + ["argument"], + ["directives", "body"], + ["label"], + [ + "callee", + "typeArguments", + "arguments" + ], + ["body"], + [ + "decorators", + "id", + "typeParameters", + "superClass", + "superTypeArguments", + "mixins", + "implements", + "body", + "superTypeParameters" + ], + ["id", "typeParameters"], + [ + "decorators", + "key", + "typeParameters", + "params", + "returnType", + "body" + ], + [ + "decorators", + "variance", + "key", + "typeAnnotation", + "value" + ], + ["name", "typeAnnotation"], + [ + "test", + "consequent", + "alternate" + ], + [ + "checkType", + "extendsType", + "trueType", + "falseType" + ], + ["value"], + ["id", "body"], + [ + "declaration", + "specifiers", + "source", + "attributes" + ], + ["id"], + [ + "id", + "typeParameters", + "extends", + "body" + ], + ["typeAnnotation"], + [ + "id", + "typeParameters", + "right" + ], + ["body", "test"], + ["members"], + ["id", "init"], + ["exported"], + [ + "left", + "right", + "body" + ], + [ + "id", + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + [ + "id", + "params", + "body", + "typeParameters", + "returnType" + ], + ["key", "value"], + ["local"], + ["objectType", "indexType"], + ["typeParameter"], + ["types"], + ["node"], + ["object", "property"], + ["argument", "cases"], + [ + "pattern", + "body", + "guard" + ], + ["literal"], + [ + "decorators", + "key", + "value" + ], + ["expressions"], + ["qualification", "id"], + [ + "decorators", + "key", + "typeAnnotation" + ], + [ + "typeParameters", + "params", + "returnType" + ], + ["expression", "typeArguments"], + ["params"], + ["parameterName", "typeAnnotation"] + ]; + u0 = c0({ + AccessorProperty: w[0], + AnyTypeAnnotation: w[1], + ArgumentPlaceholder: w[1], + ArrayExpression: ["elements"], + ArrayPattern: [ + "elements", + "typeAnnotation", + "decorators" + ], + ArrayTypeAnnotation: w[2], + ArrowFunctionExpression: [ + "typeParameters", + "params", + "predicate", + "returnType", + "body" + ], + AsConstExpression: w[3], + AsExpression: w[4], + AssignmentExpression: w[5], + AssignmentPattern: [ + "left", + "right", + "decorators", + "typeAnnotation" + ], + AwaitExpression: w[6], + BigIntLiteral: w[1], + BigIntLiteralTypeAnnotation: w[1], + BigIntTypeAnnotation: w[1], + BinaryExpression: w[5], + BindExpression: ["object", "callee"], + BlockStatement: w[7], + BooleanLiteral: w[1], + BooleanLiteralTypeAnnotation: w[1], + BooleanTypeAnnotation: w[1], + BreakStatement: w[8], + CallExpression: w[9], + CatchClause: ["param", "body"], + ChainExpression: w[3], + ClassAccessorProperty: w[0], + ClassBody: w[10], + ClassDeclaration: w[11], + ClassExpression: w[11], + ClassImplements: w[12], + ClassMethod: w[13], + ClassPrivateMethod: w[13], + ClassPrivateProperty: w[14], + ClassProperty: w[14], + ComponentDeclaration: [ + "id", + "params", + "body", + "typeParameters", + "rendersType" + ], + ComponentParameter: ["name", "local"], + ComponentTypeAnnotation: [ + "params", + "rest", + "typeParameters", + "rendersType" + ], + ComponentTypeParameter: w[15], + ConditionalExpression: w[16], + ConditionalTypeAnnotation: w[17], + ContinueStatement: w[8], + DebuggerStatement: w[1], + DeclareClass: [ + "id", + "typeParameters", + "extends", + "mixins", + "implements", + "body" + ], + DeclareComponent: [ + "id", + "params", + "rest", + "typeParameters", + "rendersType" + ], + DeclaredPredicate: w[18], + DeclareEnum: w[19], + DeclareExportAllDeclaration: ["source", "attributes"], + DeclareExportDeclaration: w[20], + DeclareFunction: ["id", "predicate"], + DeclareHook: w[21], + DeclareInterface: w[22], + DeclareModule: w[19], + DeclareModuleExports: w[23], + DeclareNamespace: w[19], + DeclareOpaqueType: [ + "id", + "typeParameters", + "supertype", + "lowerBound", + "upperBound" + ], + DeclareTypeAlias: w[24], + DeclareVariable: w[21], + Decorator: w[3], + Directive: w[18], + DirectiveLiteral: w[1], + DoExpression: w[10], + DoWhileStatement: w[25], + EmptyStatement: w[1], + EmptyTypeAnnotation: w[1], + EnumBigIntBody: w[26], + EnumBigIntMember: w[27], + EnumBooleanBody: w[26], + EnumBooleanMember: w[27], + EnumDeclaration: w[19], + EnumDefaultedMember: w[21], + EnumNumberBody: w[26], + EnumNumberMember: w[27], + EnumStringBody: w[26], + EnumStringMember: w[27], + EnumSymbolBody: w[26], + ExistsTypeAnnotation: w[1], + ExperimentalRestProperty: w[6], + ExperimentalSpreadProperty: w[6], + ExportAllDeclaration: [ + "source", + "attributes", + "exported" + ], + ExportDefaultDeclaration: ["declaration"], + ExportDefaultSpecifier: w[28], + ExportNamedDeclaration: w[20], + ExportNamespaceSpecifier: w[28], + ExportSpecifier: ["local", "exported"], + ExpressionStatement: w[3], + File: ["program"], + ForInStatement: w[29], + ForOfStatement: w[29], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: w[30], + FunctionExpression: w[30], + FunctionTypeAnnotation: [ + "typeParameters", + "this", + "params", + "rest", + "returnType" + ], + FunctionTypeParam: w[15], + GenericTypeAnnotation: w[12], + HookDeclaration: w[31], + HookTypeAnnotation: [ + "params", + "returnType", + "rest", + "typeParameters" + ], + Identifier: ["typeAnnotation", "decorators"], + IfStatement: w[16], + ImportAttribute: w[32], + ImportDeclaration: [ + "specifiers", + "source", + "attributes" + ], + ImportDefaultSpecifier: w[33], + ImportExpression: ["source", "options"], + ImportNamespaceSpecifier: w[33], + ImportSpecifier: ["imported", "local"], + IndexedAccessType: w[34], + InferredPredicate: w[1], + InferTypeAnnotation: w[35], + InterfaceDeclaration: w[22], + InterfaceExtends: w[12], + InterfaceTypeAnnotation: ["extends", "body"], + InterpreterDirective: w[1], + IntersectionTypeAnnotation: w[36], + JsExpressionRoot: w[37], + JsonRoot: w[37], + JSXAttribute: ["name", "value"], + JSXClosingElement: ["name"], + JSXClosingFragment: w[1], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: w[1], + JSXExpressionContainer: w[3], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: w[1], + JSXMemberExpression: w[38], + JSXNamespacedName: ["namespace", "name"], + JSXOpeningElement: [ + "name", + "typeArguments", + "attributes" + ], + JSXOpeningFragment: w[1], + JSXSpreadAttribute: w[6], + JSXSpreadChild: w[3], + JSXText: w[1], + KeyofTypeAnnotation: w[6], + LabeledStatement: ["label", "body"], + Literal: w[1], + LogicalExpression: w[5], + MatchArrayPattern: ["elements", "rest"], + MatchAsPattern: ["pattern", "target"], + MatchBindingPattern: w[21], + MatchExpression: w[39], + MatchExpressionCase: w[40], + MatchIdentifierPattern: w[21], + MatchLiteralPattern: w[41], + MatchMemberPattern: ["base", "property"], + MatchObjectPattern: ["properties", "rest"], + MatchObjectPatternProperty: ["key", "pattern"], + MatchOrPattern: ["patterns"], + MatchRestPattern: w[6], + MatchStatement: w[39], + MatchStatementCase: w[40], + MatchUnaryPattern: w[6], + MatchWildcardPattern: w[1], + MemberExpression: w[38], + MetaProperty: ["meta", "property"], + MethodDefinition: w[42], + MixedTypeAnnotation: w[1], + ModuleExpression: w[10], + NeverTypeAnnotation: w[1], + NewExpression: w[9], + NGChainedExpression: w[43], + NGEmptyExpression: w[1], + NGMicrosyntax: w[10], + NGMicrosyntaxAs: ["key", "alias"], + NGMicrosyntaxExpression: ["expression", "alias"], + NGMicrosyntaxKey: w[1], + NGMicrosyntaxKeyedExpression: ["key", "expression"], + NGMicrosyntaxLet: w[32], + NGPipeExpression: [ + "left", + "right", + "arguments" + ], + NGRoot: w[37], + NullableTypeAnnotation: w[23], + NullLiteral: w[1], + NullLiteralTypeAnnotation: w[1], + NumberLiteralTypeAnnotation: w[1], + NumberTypeAnnotation: w[1], + NumericLiteral: w[1], + ObjectExpression: ["properties"], + ObjectMethod: w[13], + ObjectPattern: [ + "decorators", + "properties", + "typeAnnotation" + ], + ObjectProperty: w[42], + ObjectTypeAnnotation: [ + "properties", + "indexers", + "callProperties", + "internalSlots" + ], + ObjectTypeCallProperty: w[18], + ObjectTypeIndexer: [ + "variance", + "id", + "key", + "value" + ], + ObjectTypeInternalSlot: ["id", "value"], + ObjectTypeMappedTypeProperty: [ + "keyTparam", + "propType", + "sourceType", + "variance" + ], + ObjectTypeProperty: [ + "key", + "value", + "variance" + ], + ObjectTypeSpreadProperty: w[6], + OpaqueType: [ + "id", + "typeParameters", + "supertype", + "impltype", + "lowerBound", + "upperBound" + ], + OptionalCallExpression: w[9], + OptionalIndexedAccessType: w[34], + OptionalMemberExpression: w[38], + ParenthesizedExpression: w[3], + PipelineBareFunction: ["callee"], + PipelinePrimaryTopicReference: w[1], + PipelineTopicExpression: w[3], + Placeholder: w[1], + PrivateIdentifier: w[1], + PrivateName: w[21], + Program: w[7], + Property: w[32], + PropertyDefinition: w[14], + QualifiedTypeIdentifier: w[44], + QualifiedTypeofIdentifier: w[44], + RegExpLiteral: w[1], + RestElement: [ + "argument", + "typeAnnotation", + "decorators" + ], + ReturnStatement: w[6], + SatisfiesExpression: w[4], + SequenceExpression: w[43], + SpreadElement: w[6], + StaticBlock: w[10], + StringLiteral: w[1], + StringLiteralTypeAnnotation: w[1], + StringTypeAnnotation: w[1], + Super: w[1], + SwitchCase: ["test", "consequent"], + SwitchStatement: ["discriminant", "cases"], + SymbolTypeAnnotation: w[1], + TaggedTemplateExpression: [ + "tag", + "typeArguments", + "quasi" + ], + TemplateElement: w[1], + TemplateLiteral: ["quasis", "expressions"], + ThisExpression: w[1], + ThisTypeAnnotation: w[1], + ThrowStatement: w[6], + TopicReference: w[1], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + TSAbstractAccessorProperty: w[45], + TSAbstractKeyword: w[1], + TSAbstractMethodDefinition: w[32], + TSAbstractPropertyDefinition: w[45], + TSAnyKeyword: w[1], + TSArrayType: w[2], + TSAsExpression: w[4], + TSAsyncKeyword: w[1], + TSBigIntKeyword: w[1], + TSBooleanKeyword: w[1], + TSCallSignatureDeclaration: w[46], + TSClassImplements: w[47], + TSConditionalType: w[17], + TSConstructorType: w[46], + TSConstructSignatureDeclaration: w[46], + TSDeclareFunction: w[31], + TSDeclareKeyword: w[1], + TSDeclareMethod: [ + "decorators", + "key", + "typeParameters", + "params", + "returnType" + ], + TSEmptyBodyFunctionExpression: [ + "id", + "typeParameters", + "params", + "returnType" + ], + TSEnumBody: w[26], + TSEnumDeclaration: w[19], + TSEnumMember: ["id", "initializer"], + TSExportAssignment: w[3], + TSExportKeyword: w[1], + TSExternalModuleReference: w[3], + TSFunctionType: w[46], + TSImportEqualsDeclaration: ["id", "moduleReference"], + TSImportType: [ + "options", + "qualifier", + "typeArguments", + "source" + ], + TSIndexedAccessType: w[34], + TSIndexSignature: ["parameters", "typeAnnotation"], + TSInferType: w[35], + TSInstantiationExpression: w[47], + TSInterfaceBody: w[10], + TSInterfaceDeclaration: w[22], + TSInterfaceHeritage: w[47], + TSIntersectionType: w[36], + TSIntrinsicKeyword: w[1], + TSJSDocAllType: w[1], + TSJSDocNonNullableType: w[23], + TSJSDocNullableType: w[23], + TSJSDocUnknownType: w[1], + TSLiteralType: w[41], + TSMappedType: [ + "key", + "constraint", + "nameType", + "typeAnnotation" + ], + TSMethodSignature: [ + "key", + "typeParameters", + "params", + "returnType" + ], + TSModuleBlock: w[10], + TSModuleDeclaration: w[19], + TSNamedTupleMember: ["label", "elementType"], + TSNamespaceExportDeclaration: w[21], + TSNeverKeyword: w[1], + TSNonNullExpression: w[3], + TSNullKeyword: w[1], + TSNumberKeyword: w[1], + TSObjectKeyword: w[1], + TSOptionalType: w[23], + TSParameterProperty: ["parameter", "decorators"], + TSParenthesizedType: w[23], + TSPrivateKeyword: w[1], + TSPropertySignature: ["key", "typeAnnotation"], + TSProtectedKeyword: w[1], + TSPublicKeyword: w[1], + TSQualifiedName: w[5], + TSReadonlyKeyword: w[1], + TSRestType: w[23], + TSSatisfiesExpression: w[4], + TSStaticKeyword: w[1], + TSStringKeyword: w[1], + TSSymbolKeyword: w[1], + TSTemplateLiteralType: ["quasis", "types"], + TSThisType: w[1], + TSTupleType: ["elementTypes"], + TSTypeAliasDeclaration: [ + "id", + "typeParameters", + "typeAnnotation" + ], + TSTypeAnnotation: w[23], + TSTypeAssertion: w[4], + TSTypeLiteral: w[26], + TSTypeOperator: w[23], + TSTypeParameter: [ + "name", + "constraint", + "default" + ], + TSTypeParameterDeclaration: w[48], + TSTypeParameterInstantiation: w[48], + TSTypePredicate: w[49], + TSTypeQuery: ["exprName", "typeArguments"], + TSTypeReference: ["typeName", "typeArguments"], + TSUndefinedKeyword: w[1], + TSUnionType: w[36], + TSUnknownKeyword: w[1], + TSVoidKeyword: w[1], + TupleTypeAnnotation: ["types", "elementTypes"], + TupleTypeLabeledElement: [ + "label", + "elementType", + "variance" + ], + TupleTypeSpreadElement: ["label", "typeAnnotation"], + TypeAlias: w[24], + TypeAnnotation: w[23], + TypeCastExpression: w[4], + TypeofTypeAnnotation: ["argument", "typeArguments"], + TypeOperator: w[23], + TypeParameter: [ + "bound", + "default", + "variance" + ], + TypeParameterDeclaration: w[48], + TypeParameterInstantiation: w[48], + TypePredicate: w[49], + UnaryExpression: w[6], + UndefinedTypeAnnotation: w[1], + UnionTypeAnnotation: w[36], + UnknownTypeAnnotation: w[1], + UpdateExpression: w[6], + V8IntrinsicIdentifier: w[1], + VariableDeclaration: ["declarations"], + VariableDeclarator: w[27], + Variance: w[1], + VoidPattern: w[1], + VoidTypeAnnotation: w[1], + WhileStatement: w[25], + WithStatement: ["object", "body"], + YieldExpression: w[6] + }); + p0 = Bl; + $a([ + "RegExpLiteral", + "BigIntLiteral", + "NumericLiteral", + "StringLiteral", + "DirectiveLiteral", + "Literal", + "JSXText", + "TemplateElement", + "StringLiteralTypeAnnotation", + "NumberLiteralTypeAnnotation", + "BigIntLiteralTypeAnnotation" + ]); + d0 = N4; + I4 = /\*\/$/, O4 = /^\/\*\*?/, M4 = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/, L4 = /(^|\s+)\/\/([^\n\r]*)/g, m0 = /^(\r?\n)+/, J4 = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g, h0 = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g, j4 = /(\r?\n|^) *\* ?/g, R4 = []; + b0 = ["noformat", "noprettier"], v0 = ["format", "prettier"]; + T0 = U4; + k0 = B4; + E0 = /^[^"'`]*<\/|^[^/]{2}.*\/>/mu; + A0 = q4; + C0 = "module"; + D0 = "commonjs", P0 = [C0, D0]; + F4 = { + loc: !0, + range: !0, + comment: !0, + tokens: !1, + loggerFn: !1, + project: !1, + jsDocParsingMode: "none", + suppressDeprecatedPropertyWarnings: !0 + }; + V4 = (e) => e && /\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/iu.test(e); + Y4 = k0(G4); +}))(); +export { I0 as default, ld as parsers }; diff --git a/.github/actions/check-public-api/dist/yaml-EkSMxulB.js b/.github/actions/check-public-api/dist/yaml-EkSMxulB.js new file mode 100644 index 0000000000..38302f3b5a --- /dev/null +++ b/.github/actions/check-public-api/dist/yaml-EkSMxulB.js @@ -0,0 +1,5280 @@ +import { __esmMin } from "./rolldown-runtime-aR1ZRE-I.js"; +//#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/yaml.mjs +function Ri(t) { + return this[t < 0 ? this.length + t : t]; +} +function Fi(t) { + if (typeof t == "string") return Qe; + if (Array.isArray(t)) return Ge; + if (!t) return; + let { type: e } = t; + if (bt.has(e)) return e; +} +function Ui(t) { + let e = t === null ? "null" : typeof t; + if (e !== "string" && e !== "object") return `Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`; + if (Nt(t)) throw new Error("doc is valid."); + let n = Object.prototype.toString.call(t); + if (n !== "[object Object]") return `Unexpected doc '${n}'.`; + let r = qi([...bt].map((s) => `'${s}'`)); + return `Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`; +} +function Vi(t, e) { + if (typeof t == "string") return e(t); + let n = /* @__PURE__ */ new Map(); + return r(t); + function r(i) { + if (n.has(i)) return n.get(i); + let o = s(i); + return n.set(i, o), o; + } + function s(i) { + switch (Nt(i)) { + case Ge: return e(i.map(r)); + case Te: return e({ + ...i, + parts: i.parts.map(r) + }); + case Ce: return e({ + ...i, + breakContents: r(i.breakContents), + flatContents: r(i.flatContents) + }); + case Le: { + let { expandedStates: o, contents: a } = i; + return o ? (o = o.map(r), a = o[0]) : a = r(a), e({ + ...i, + contents: a, + expandedStates: o + }); + } + case Ae: + case gt: + case Et: + case wt: + case Me: return e({ + ...i, + contents: r(i.contents) + }); + case Qe: + case dt: + case yt: + case St: + case re: + case ke: return e(i); + default: throw new ar(i); + } + } +} +function cr(t, e = He) { + return Vi(t, (n) => typeof n == "string" ? v(e, n.split(` +`)) : n); +} +function Je(t, e) { + return fr(t), Z(e), { + type: Ae, + contents: e, + n: t + }; +} +function cn(t) { + return Je(Number.NEGATIVE_INFINITY, t); +} +function ur(t) { + return Je({ type: "root" }, t); +} +function pr(t) { + return Je(-1, t); +} +function At(t) { + return lr(t), { + type: Te, + parts: t + }; +} +function Pe(t, e = {}) { + return Z(t), Ot(e.expandedStates, !0), { + type: Le, + id: e.id, + contents: t, + break: !!e.shouldBreak, + expandedStates: e.expandedStates + }; +} +function ln(t, e) { + return Pe(t[0], { + ...e, + expandedStates: t + }); +} +function ze(t, e = "", n = {}) { + return Z(t), e !== "" && Z(e), { + type: Ce, + breakContents: t, + flatContents: e, + groupId: n.groupId + }; +} +function v(t, e) { + Z(t), Ot(e); + let n = []; + for (let r = 0; r < e.length; r++) r !== 0 && n.push(t), n.push(e[r]); + return n; +} +function mr(t) { + return Z(t), { + type: Me, + contents: t + }; +} +function Tt(t) { + return (e, n, r) => { + let s = !!r?.backwards; + if (n === !1) return !1; + let { length: i } = e, o = n; + for (; o >= 0 && o < i;) { + let a = e.charAt(o); + if (t instanceof RegExp) { + if (!t.test(a)) return o; + } else if (!t.includes(a)) return o; + s ? o-- : o++; + } + return o === -1 || o === i ? o : !1; + }; +} +function ji(t, e, n) { + let r = !!n?.backwards; + if (e === !1) return !1; + let s = t.charAt(e); + if (r) { + if (t.charAt(e - 1) === "\r" && s === ` +`) return e - 2; + if (hr(s)) return e - 1; + } else { + if (s === "\r" && t.charAt(e + 1) === ` +`) return e + 2; + if (hr(s)) return e + 1; + } + return e; +} +function Qi(t, e) { + let n = e - 1; + n = fn(t, n, { backwards: !0 }), n = un(t, n, { backwards: !0 }), n = fn(t, n, { backwards: !0 }); + let r = un(t, n, { backwards: !0 }); + return n !== r; +} +function Ar(t, e) { + switch (t.type) { + case "comment": + if (wr(t.value)) return null; + break; + case "quoteDouble": + case "quoteSingle": + e.type = "quote"; + break; + case "document": + e.directivesEndMarker || delete e.directivesEndMarker, e.documentEndMarker || delete e.documentEndMarker; + break; + } +} +function Tr(t, e) { + let { node: n } = t; + if (n.type === "root" && e.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e.filepath)) return async (r) => { + let s = await r(e.originalText, { parser: "json" }); + return s ? [s, N] : void 0; + }; +} +function et(t) { + if (Ze !== null && typeof Ze.property) { + let e = Ze; + return Ze = et.prototype = null, e; + } + return Ze = et.prototype = t ?? Object.create(null), new et(); +} +function hn(t) { + return et(t); +} +function Hi(t, e = "type") { + hn(t); + function n(r) { + let s = r[e], i = t[s]; + if (!Array.isArray(i)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${s}'.`), { node: r }); + return i; + } + return n; +} +function Xi(t) { + return Array.isArray(t) && t.length > 0; +} +function W(t, e) { + return typeof t?.type == "string" && e.includes(t.type); +} +function dn(t, e, n) { + return e("children" in t ? { + ...t, + children: t.children.map((r) => dn(r, e, t)) + } : t, n); +} +function Ie(t, e, n) { + Object.defineProperty(t, e, { + get: n, + enumerable: !1 + }); +} +function _r(t, e) { + let n = 0, r = e.length; + for (let s = t.position.end.offset - 1; s < r; s++) { + let i = e[s]; + if (i === ` +` && n++, n === 1 && /\S/u.test(i)) return !1; + if (n === 2) return !0; + } + return !1; +} +function Ct(t) { + let { node: e } = t; + switch (e.type) { + case "tag": + case "anchor": + case "comment": return !1; + } + let n = t.stack.length; + for (let r = 1; r < n; r++) { + let s = t.stack[r], i = t.stack[r - 1]; + if (Array.isArray(i) && typeof s == "number" && s !== i.length - 1) return !1; + } + return !0; +} +function Mt(t) { + return ve(t.children) ? Mt(D(0, t.children, -1)) : t; +} +function Ir(t) { + return t.value.trim() === "prettier-ignore"; +} +function xr(t) { + let { node: e } = t; + if (e.type === "documentBody") { + let n = t.parent.head; + return I(n) && Ir(D(0, n.endComments, -1)); + } + return te(e) && Ir(D(0, e.leadingComments, -1)); +} +function _e(t) { + return !ve(t.children) && !zi(t); +} +function zi(t) { + return te(t) || ae(t) || gn(t) || K(t) || I(t); +} +function te(t) { + return ve(t?.leadingComments); +} +function ae(t) { + return ve(t?.middleComments); +} +function gn(t) { + return t?.indicatorComment; +} +function K(t) { + return t?.trailingComment; +} +function I(t) { + return ve(t?.endComments); +} +function Rr(t) { + return t ? t.split(/(? o === 0 && o === a.length - 1 ? i : o !== 0 && o !== a.length - 1 ? i.trim() : o === 0 ? i.trimEnd() : i.trimStart()); + if (n.proseWrap === "preserve") return r.map((i) => i ? [i] : []); + let s = []; + for (let [i, o] of r.entries()) { + let a = Rr(o); + i > 0 && r[i - 1].length > 0 && a.length > 0 && !(t === "quoteDouble" && D(0, D(0, s, -1), -1).endsWith("\\")) ? s[s.length - 1] = [...D(0, s, -1), ...a] : s.push(a); + } + return n.proseWrap === "never" ? s.map((i) => [i.join(" ")]) : s; +} +function $r(t, { parentIndent: e, isLastDescendant: n, options: r }) { + let s = t.position.start.line === t.position.end.line ? "" : r.originalText.slice(t.position.start.offset, t.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1], i; + if (t.indent === null) { + let l = s.match(/^(? *)[^\n\r ]/mu); + i = l ? l.groups.leadingSpace.length : Number.POSITIVE_INFINITY; + } else i = t.indent - 1 + e; + let o = s.split(` +`).map((l) => l.slice(i)); + if (r.proseWrap === "preserve" || t.type === "blockLiteral") return c(o.map((l) => l ? [l] : [])); + let a = []; + for (let [l, f] of o.entries()) { + let m = Rr(f); + l > 0 && m.length > 0 && o[l - 1].length > 0 && !/^\s/u.test(m[0]) && !/^\s|\s$/u.test(D(0, a, -1)) ? a[a.length - 1] = [...D(0, a, -1), ...m] : a.push(m); + } + return a = a.map((l) => { + let f = []; + for (let m of l) f.length > 0 && /\s$/u.test(D(0, f, -1)) ? f[f.length - 1] += " " + m : f.push(m); + return f; + }), r.proseWrap === "never" && (a = a.map((l) => [l.join(" ")])), c(a); + function c(l) { + if (t.chomping === "keep") return D(0, l, -1).length === 0 ? l.slice(0, -1) : l; + let f = 0; + for (let m = l.length - 1; m >= 0 && l[m].length === 0; m--) f++; + return f === 0 ? l : f >= 2 && !n ? l.slice(0, -(f - 1)) : l.slice(0, -f); + } +} +function nt(t) { + if (!t) return !0; + switch (t.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": + case "alias": + case "flowMapping": + case "flowSequence": return !0; + default: return !1; + } +} +function kt(t, e) { + let { node: n, root: r } = t, s; + return yn.has(r) ? s = yn.get(r) : (s = /* @__PURE__ */ new Set(), yn.set(r, s)), !s.has(n.position.end.line) && (s.add(n.position.end.line), _r(n, e) && !En(t.parent)) ? Lt : ""; +} +function En(t) { + return I(t) && !W(t, [ + "documentHead", + "documentBody", + "flowMapping", + "flowSequence" + ]); +} +function _(t, e) { + return Je(" ".repeat(t), e); +} +function Zi(t, e, n) { + let { node: r } = t, s = t.ancestors.filter((l) => l.type === "sequence" || l.type === "mapping").length, i = Ct(t), o = [r.type === "blockFolded" ? ">" : "|"]; + r.indent !== null && o.push(r.indent.toString()), r.chomping !== "clip" && o.push(r.chomping === "keep" ? "+" : "-"), gn(r) && o.push(" ", n("indicatorComment")); + let a = $r(r, { + parentIndent: s, + isLastDescendant: i, + options: e + }), c = []; + for (let [l, f] of a.entries()) l === 0 && c.push(N), c.push(At(v(se, f))), l !== a.length - 1 ? c.push(f.length === 0 ? N : ur(He)) : r.chomping === "keep" && i && c.push(cn(f.length === 0 ? N : He)); + return r.indent === null ? o.push(pr(_(e.tabWidth, c))) : o.push(cn(_(r.indent - 1 + s, c))), o; +} +function Pt(t, e, n) { + let { node: r } = t, s = r.type === "flowMapping", i = s ? "{" : "[", o = s ? "}" : "]", a = Lt; + s && r.children.length > 0 && e.bracketSpacing && (a = se); + let c = D(0, r.children, -1), l = c?.type === "flowMappingItem" && _e(c.key) && _e(c.value); + return [ + i, + _(e.tabWidth, [ + a, + eo(t, e, n), + e.trailingComma === "none" ? "" : ze(","), + I(r) ? [N, v(N, t.map(n, "endComments"))] : "" + ]), + l ? "" : a, + o + ]; +} +function eo(t, e, n) { + return t.map(({ isLast: r, node: s, next: i }) => [n(), r ? "" : [ + ",", + se, + s.position.start.line !== i.position.start.line ? kt(t, e.originalText) : "" + ]], "children"); +} +function to(t, e, n) { + let { node: r, parent: s } = t, { key: i, value: o } = r, a = _e(i), c = _e(o); + if (a && c) return ": "; + let l = n("key"), f = no(r) ? " " : ""; + if (c) return r.type === "flowMappingItem" && s.type === "flowMapping" ? l : r.type === "mappingItem" && Sn(i.content, e) && !K(i.content) && s.tag?.value !== "tag:yaml.org,2002:set" ? [ + l, + f, + ":" + ] : ["? ", _(2, l)]; + let m = n("value"); + if (a) return [": ", _(2, m)]; + if (te(o) || !nt(i.content)) return [ + "? ", + _(2, l), + N, + ...t.map(() => [n(), N], "value", "leadingComments"), + ": ", + _(2, m) + ]; + if (ro(i.content) && !te(i.content) && !ae(i.content) && !K(i.content) && !I(i) && !te(o.content) && !ae(o.content) && !I(o) && Sn(o.content, e)) return [ + l, + f, + ": ", + m + ]; + let g = Symbol("mappingKey"), y = Pe([ze("? "), Pe(_(2, l), { id: g })]), h = [ + N, + ": ", + _(2, m) + ], d = [f, ":"]; + I(o) && o.content && W(o.content, ["flowMapping", "flowSequence"]) && o.content.children.length === 0 ? d.push(" ") : te(o.content) || I(o) && o.content && !W(o.content, ["mapping", "sequence"]) || s.type === "mapping" && K(i.content) && nt(o.content) || W(o.content, ["mapping", "sequence"]) && o.content.tag === null && o.content.anchor === null ? d.push(N) : o.content ? d.push(se) : K(o) && d.push(" "), d.push(m); + let w = _(e.tabWidth, d); + return Sn(i.content, e) && !te(i.content) && !ae(i.content) && !K(i.content) && !I(i) ? ln([[l, w]]) : ln([[y, ze(h, w, { groupId: g })]]); +} +function Sn(t, e) { + if (!t) return !0; + switch (t.type) { + case "plain": + case "quoteSingle": + case "quoteDouble": break; + case "alias": return !0; + default: return !1; + } + if (e.proseWrap === "preserve") return t.position.start.line === t.position.end.line; + if (/\\$/mu.test(e.originalText.slice(t.position.start.offset, t.position.end.offset))) return !1; + switch (e.proseWrap) { + case "never": return !t.value.includes(` +`); + case "always": return !/[\n ]/u.test(t.value); + default: return !1; + } +} +function no(t) { + return t.key.content?.type === "alias"; +} +function ro(t) { + if (!t) return !0; + switch (t.type) { + case "plain": + case "quoteDouble": + case "quoteSingle": return t.position.start.line === t.position.end.line; + case "alias": return !0; + default: return !1; + } +} +function so(t) { + return dn(t, io); +} +function io(t) { + switch (t.type) { + case "document": + Ie(t, "head", () => t.children[0]), Ie(t, "body", () => t.children[1]); + break; + case "documentBody": + case "sequenceItem": + case "flowSequenceItem": + case "mappingKey": + case "mappingValue": + Ie(t, "content", () => t.children[0]); + break; + case "mappingItem": + case "flowMappingItem": + Ie(t, "key", () => t.children[0]), Ie(t, "value", () => t.children[1]); + break; + } + return t; +} +function oo(t, e, n) { + let { node: r } = t, s = []; + r.type !== "mappingValue" && te(r) && s.push([v(N, t.map(n, "leadingComments")), N]); + let { tag: i, anchor: o } = r; + i && s.push(n("tag")), i && o && s.push(" "), o && s.push(n("anchor")); + let a = ""; + return W(r, [ + "mapping", + "sequence", + "comment", + "directive", + "mappingItem", + "sequenceItem" + ]) && !Ct(t) && (a = kt(t, e.originalText)), (i || o) && (W(r, ["sequence", "mapping"]) && !ae(r) ? s.push(N) : s.push(" ")), ae(r) && s.push([ + r.middleComments.length === 1 ? "" : N, + v(N, t.map(n, "middleComments")), + N + ]), xr(t) ? s.push(cr(e.originalText.slice(r.position.start.offset, r.position.end.offset).trimEnd())) : s.push(Pe(ao(t, e, n))), K(r) && !W(r, ["document", "documentHead"]) && s.push(mr([ + r.type === "mappingValue" && !r.content ? "" : " ", + t.parent.type === "mappingKey" && t.getParentNode(2).type === "mapping" && nt(r) ? "" : Xe, + n("trailingComment") + ])), En(r) && s.push(_(r.type === "sequenceItem" ? 2 : 0, [N, v(N, t.map(({ node: c }) => [pn(e.originalText, tt(c)) ? N : "", n()], "endComments"))])), s.push(a), s; +} +function ao(t, e, n) { + let { node: r } = t; + switch (r.type) { + case "root": { + let s = Mt(r), i = !(W(s, ["blockLiteral", "blockFolded"]) && s.chomping === "keep"), o = []; + return t.each(({ node: a, isFirst: c }) => { + c || o.push(N), o.push(n()), lo(t) && (i && o.push(N), o.push("..."), K(a) && o.push(" ", n("trailingComment"))); + }, "children"), i && o.push(N), o; + } + case "document": { + let s = []; + return fo(t) && ((r.head.children.length > 0 || r.head.endComments.length > 0) && s.push(n("head")), K(r.head) ? s.push([ + "---", + " ", + n(["head", "trailingComment"]) + ]) : s.push("---")), co(r) && s.push(n("body")), v(N, s); + } + case "documentHead": return v(N, [...t.map(n, "children"), ...t.map(n, "endComments")]); + case "documentBody": { + let { children: s, endComments: i } = r, o = ""; + if (s.length > 0 && i.length > 0) { + let a = Mt(r); + if (W(a, ["blockFolded", "blockLiteral"])) a.chomping !== "keep" && (o = [N, N]); + else o = W(D(0, s, -1), ["mapping"]) && pn(e.originalText, tt(i[0])) ? [N, N] : N; + } + return [ + v(N, t.map(n, "children")), + o, + v(N, t.map(n, "endComments")) + ]; + } + case "directive": return ["%", v(" ", [r.name, ...r.parameters])]; + case "comment": return ["#", r.value]; + case "alias": return ["*", r.value]; + case "tag": return e.originalText.slice(r.position.start.offset, r.position.end.offset); + case "anchor": return ["&", r.value]; + case "plain": return rt(r.type, e.originalText.slice(r.position.start.offset, r.position.end.offset), e); + case "quoteDouble": + case "quoteSingle": { + let o = e.originalText.slice(r.position.start.offset + 1, r.position.end.offset - 1); + if (r.type === "quoteSingle" && o.includes("\\") || r.type === "quoteDouble" && /\\[^"]/u.test(o)) { + let c = r.type === "quoteDouble" ? "\"" : "'"; + return [ + c, + rt(r.type, o, e), + c + ]; + } + if (o.includes("\"")) return [ + "'", + rt(r.type, r.type === "quoteDouble" ? ht(0, ht(0, o, "\\\"", "\""), "'", "'".repeat(2)) : o, e), + "'" + ]; + if (o.includes("'")) return [ + "\"", + rt(r.type, r.type === "quoteSingle" ? ht(0, o, "''", "'") : o, e), + "\"" + ]; + let a = e.singleQuote ? "'" : "\""; + return [ + a, + rt(r.type, o, e), + a + ]; + } + case "blockFolded": + case "blockLiteral": return Yr(t, e, n); + case "mapping": + case "sequence": return v(N, t.map(n, "children")); + case "sequenceItem": return ["- ", _(2, r.content ? n("content") : "")]; + case "mappingKey": + case "mappingValue": return r.content ? n("content") : ""; + case "mappingItem": + case "flowMappingItem": return Br(t, e, n); + case "flowMapping": return Pt(t, e, n); + case "flowSequence": return Pt(t, e, n); + case "flowSequenceItem": return n("content"); + default: throw new dr(r, "YAML"); + } +} +function co(t) { + return t.body.children.length > 0 || I(t.body); +} +function lo(t) { + let e = t.node; + if (e.documentEndMarker || K(e)) return !0; + if (t.isLast) return !1; + let n = t.next; + return n.head.children.length > 0 || I(n.head); +} +function fo(t) { + let e = t.node; + return e.directivesEndMarker || e.head.children.length > 0 || I(e.head) || K(e.head); +} +function rt(t, e, n) { + return v(N, Dr(t, e, n).map((s) => At(v(se, s)))); +} +function F(t, e = null) { + "children" in t && t.children.forEach((n) => F(n, t)), "anchor" in t && t.anchor && F(t.anchor, t), "tag" in t && t.tag && F(t.tag, t), "leadingComments" in t && t.leadingComments.forEach((n) => F(n, t)), "middleComments" in t && t.middleComments.forEach((n) => F(n, t)), "indicatorComment" in t && t.indicatorComment && F(t.indicatorComment, t), "trailingComment" in t && t.trailingComment && F(t.trailingComment, t), "endComments" in t && t.endComments.forEach((n) => F(n, t)), Object.defineProperty(t, "_parent", { + value: e, + enumerable: !1 + }); +} +function Oe(t) { + return `${t.line}:${t.column}`; +} +function Is(t) { + F(t); + let e = _a(t), n = t.children.slice(); + t.comments.sort((r, s) => r.position.start.offset - s.position.end.offset).filter((r) => !r._parent).forEach((r) => { + for (; n.length > 1 && r.position.start.line > n[0].position.end.line;) n.shift(); + xa(r, e, n[0]); + }); +} +function _a(t) { + let e = Array.from(new Array(t.position.end.line), () => ({})); + for (let n of t.comments) e[n.position.start.line - 1].comment = n; + return _s(e, t), e; +} +function _s(t, e) { + if (e.position.start.offset !== e.position.end.offset) { + if ("leadingComments" in e) { + let { start: n } = e.position, { leadingAttachableNode: r } = t[n.line - 1]; + (!r || n.column < r.position.start.column) && (t[n.line - 1].leadingAttachableNode = e); + } + if ("trailingComment" in e && e.position.end.column > 1 && e.type !== "document" && e.type !== "documentHead") { + let { end: n } = e.position, { trailingAttachableNode: r } = t[n.line - 1]; + (!r || n.column >= r.position.end.column) && (t[n.line - 1].trailingAttachableNode = e); + } + if (e.type !== "root" && e.type !== "document" && e.type !== "documentHead" && e.type !== "documentBody") { + let { start: n, end: r } = e.position, s = [r.line].concat(n.line === r.line ? [] : n.line); + for (let i of s) { + let o = t[i - 1].trailingNode; + (!o || r.column >= o.position.end.column) && (t[i - 1].trailingNode = e); + } + } + "children" in e && e.children.forEach((n) => { + _s(t, n); + }); + } +} +function xa(t, e, n) { + let r = t.position.start.line, { trailingAttachableNode: s } = e[r - 1]; + if (s) { + if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${Oe(t.position.start)}`); + F(t, s), s.trailingComment = t; + return; + } + for (let o = r; o >= n.position.start.line; o--) { + let { trailingNode: a } = e[o - 1], c; + if (a) c = a; + else if (o !== r && e[o - 1].comment) c = e[o - 1].comment._parent; + else continue; + if ((c.type === "sequence" || c.type === "mapping") && (c = c.children[0]), c.type === "mappingItem") { + let [l, f] = c.children; + c = xs(l) ? l : f; + } + for (;;) { + if (Ra(c, t)) { + F(t, c), c.endComments.push(t); + return; + } + if (!c._parent) break; + c = c._parent; + } + break; + } + for (let o = r + 1; o <= n.position.end.line; o++) { + let { leadingAttachableNode: a } = e[o - 1]; + if (a) { + F(t, a), a.leadingComments.push(t); + return; + } + } + let i = n.children[1]; + F(t, i), i.endComments.push(t); +} +function Ra(t, e) { + if (t.position.start.offset < e.position.start.offset && t.position.end.offset > e.position.end.offset) switch (t.type) { + case "flowMapping": + case "flowSequence": return t.children.length === 0 || e.position.start.line > t.children[t.children.length - 1].position.end.line; + } + if (e.position.end.offset < t.position.end.offset) return !1; + switch (t.type) { + case "sequenceItem": return e.position.start.column > t.position.start.column; + case "mappingKey": + case "mappingValue": return e.position.start.column > t._parent.position.start.column && (t.children.length === 0 || t.children.length === 1 && t.children[0].type !== "blockFolded" && t.children[0].type !== "blockLiteral") && (t.type === "mappingValue" || xs(t)); + default: return !1; + } +} +function xs(t) { + return t.position.start !== t.position.end && (t.children.length === 0 || t.position.start.offset !== t.children[0].position.start.offset); +} +function b(t, e) { + return { + type: t, + position: e + }; +} +function Rs(t, e, n) { + return { + ...b("root", t), + children: e, + comments: n + }; +} +function pt(t) { + switch (t.type) { + case "DOCUMENT": + for (let e = t.contents.length - 1; e >= 0; e--) t.contents[e].type === "BLANK_LINE" ? t.contents.splice(e, 1) : pt(t.contents[e]); + for (let e = t.directives.length - 1; e >= 0; e--) t.directives[e].type === "BLANK_LINE" && t.directives.splice(e, 1); + break; + case "FLOW_MAP": + case "FLOW_SEQ": + case "MAP": + case "SEQ": + for (let e = t.items.length - 1; e >= 0; e--) { + let n = t.items[e]; + "char" in n || (n.type === "BLANK_LINE" ? t.items.splice(e, 1) : pt(n)); + } + break; + case "MAP_KEY": + case "MAP_VALUE": + case "SEQ_ITEM": + t.node && pt(t.node); + break; + case "ALIAS": + case "BLANK_LINE": + case "BLOCK_FOLDED": + case "BLOCK_LITERAL": + case "COMMENT": + case "DIRECTIVE": + case "PLAIN": + case "QUOTE_DOUBLE": + case "QUOTE_SINGLE": break; + default: throw new Error(`Unexpected node type ${JSON.stringify(t.type)}`); + } +} +function X(t, e) { + return { + start: t, + end: e + }; +} +function Hn(t) { + return { + start: t, + end: t + }; +} +function Ds(t, e) { + return { + ...b("anchor", t), + value: e + }; +} +function Ve(t, e) { + return { + ...b("comment", t), + value: e + }; +} +function $s(t, e, n) { + return { + anchor: e, + tag: t, + middleComments: n + }; +} +function Ys(t, e) { + return { + ...b("tag", t), + value: e + }; +} +function Ht(t, e, n = () => !1) { + let r = t.cstNode, s = [], i = null, o = null, a = null; + for (let c of r.props) { + let l = e.text[c.origStart]; + switch (l) { + case me.Tag: + i = i || c, o = Ys(e.transformRange(c), t.tag); + break; + case me.Anchor: + i = i || c, a = Ds(e.transformRange(c), r.anchor); + break; + case me.Comment: { + let f = Ve(e.transformRange(c), e.text.slice(c.origStart + 1, c.origEnd)); + e.comments.push(f), !n(f) && i && i.origEnd <= c.origStart && c.origEnd <= r.valueRange.origStart && s.push(f); + break; + } + default: throw new Error(`Unexpected leading character ${JSON.stringify(l)}`); + } + } + return $s(o, a, s); +} +function z() { + return { leadingComments: [] }; +} +function he(t = null) { + return { trailingComment: t }; +} +function q() { + return { + ...z(), + ...he() + }; +} +function Bs(t, e, n) { + return { + ...b("alias", t), + ...q(), + ...e, + value: n + }; +} +function Fs(t, e) { + let n = t.cstNode; + return Bs(e.transformRange({ + origStart: n.valueRange.origStart - 1, + origEnd: n.valueRange.origEnd + }), e.transformContent(t), n.rawValue); +} +function qs(t) { + return { + ...t, + type: "blockFolded" + }; +} +function Us(t, e, n, r, s, i) { + return { + ...b("blockValue", t), + ...z(), + ...e, + chomping: n, + indent: r, + value: s, + indicatorComment: i + }; +} +function Jt(t, e) { + let n = t.cstNode, r = 1, s = n.chomping === "CLIP" ? 0 : 1, o = n.header.origEnd - n.header.origStart - r - s !== 0, a = e.transformRange({ + origStart: n.header.origStart, + origEnd: n.valueRange.origEnd + }), c = null; + return Us(a, Ht(t, e, (f) => { + if (!(a.start.offset < f.position.start.offset && f.position.end.offset < a.end.offset)) return !1; + if (c) throw new Error(`Unexpected multiple indicator comments at ${Oe(f.position.start)}`); + return c = f, !0; + }), Jn[n.chomping], o ? n.blockIndent : null, n.strValue, c); +} +function Vs(t, e) { + return qs(Jt(t, e)); +} +function Ws(t) { + return { + ...t, + type: "blockLiteral" + }; +} +function Ks(t, e) { + return Ws(Jt(t, e)); +} +function js(t, e) { + return Ve(e.transformRange(t.range), t.comment); +} +function Qs(t, e, n) { + return { + ...b("directive", t), + ...q(), + name: e, + parameters: n + }; +} +function We(t, e) { + for (let n of t.props) { + let r = e.text[n.origStart]; + switch (r) { + case me.Comment: + e.comments.push(Ve(e.transformRange(n), e.text.slice(n.origStart + 1, n.origEnd))); + break; + default: throw new Error(`Unexpected leading character ${JSON.stringify(r)}`); + } + } +} +function Gs(t, e) { + return We(t, e), Qs(e.transformRange(t.range), t.name, t.parameters); +} +function Hs(t, e, n, r, s, i) { + return { + ...b("document", t), + ...he(i), + directivesEndMarker: e, + documentEndMarker: n, + children: [r, s] + }; +} +function U(t = []) { + return { endComments: t }; +} +function Js(t, e, n) { + return { + ...b("documentBody", t), + ...U(n), + children: e ? [e] : [] + }; +} +function V(t) { + return t[t.length - 1]; +} +function Xt(t, e) { + let n = t.match(e); + return n ? n.index : -1; +} +function Xs(t, e, n) { + let r = t.cstNode, { comments: s, endComments: i, documentTrailingComment: o, documentHeadTrailingComment: a } = Da(r, e, n), c = e.transformNode(t.contents), { position: l, documentEndPoint: f } = $a(r, c, e); + return e.comments.push(...s, ...i), { + documentBody: Js(l, c, i), + documentEndPoint: f, + documentTrailingComment: o, + documentHeadTrailingComment: a + }; +} +function Da(t, e, n) { + let r = [], s = [], i = [], o = [], a = !1; + for (let c = t.contents.length - 1; c >= 0; c--) { + let l = t.contents[c]; + if (l.type === "COMMENT") { + let f = e.transformNode(l); + n && n.line === f.position.start.line ? o.unshift(f) : a ? r.unshift(f) : f.position.start.offset >= t.valueRange.origEnd ? i.unshift(f) : r.unshift(f); + } else a = !0; + } + if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${Oe(i[1].position.start)}`); + if (o.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${Oe(o[1].position.start)}`); + return { + comments: r, + endComments: s, + documentTrailingComment: V(i) || null, + documentHeadTrailingComment: V(o) || null + }; +} +function $a(t, e, n) { + let r = Xt(n.text.slice(t.valueRange.origEnd), /^\.\.\./), s = r === -1 ? t.valueRange.origEnd : Math.max(0, t.valueRange.origEnd - 1); + n.text[s - 1] === "\r" && s--; + let i = n.transformRange({ + origStart: e !== null ? e.position.start.offset : s, + origEnd: s + }); + return { + position: i, + documentEndPoint: r === -1 ? i.end : n.transformOffset(t.valueRange.origEnd + 3) + }; +} +function zs(t, e, n, r) { + return { + ...b("documentHead", t), + ...U(n), + ...he(r), + children: e + }; +} +function Zs(t, e) { + let n = t.cstNode, { directives: r, comments: s, endComments: i } = Ya(n, e), { position: o, documentEndMarkererPoint: a } = Ba(n, r, e); + return e.comments.push(...s, ...i), { + createDocumentHeadWithTrailingComment: (l) => (l && e.comments.push(l), zs(o, r, i, l)), + documentHeadEndMarkerPoint: a + }; +} +function Ya(t, e) { + let n = [], r = [], s = [], i = !1; + for (let o = t.directives.length - 1; o >= 0; o--) { + let a = e.transformNode(t.directives[o]); + a.type === "comment" ? i ? r.unshift(a) : s.unshift(a) : (i = !0, n.unshift(a)); + } + return { + directives: n, + comments: r, + endComments: s + }; +} +function Ba(t, e, n) { + let r = Xt(n.text.slice(0, t.valueRange.origStart), /---\s*$/); + r > 0 && !/[\r\n]/.test(n.text[r - 1]) && (r = -1); + let s = r === -1 ? { + origStart: t.valueRange.origStart, + origEnd: t.valueRange.origStart + } : { + origStart: r, + origEnd: r + 3 + }; + return e.length !== 0 && (s.origStart = e[0].position.start.offset), { + position: n.transformRange(s), + documentEndMarkererPoint: r === -1 ? null : n.transformOffset(r) + }; +} +function ei(t, e) { + let { createDocumentHeadWithTrailingComment: n, documentHeadEndMarkerPoint: r } = Zs(t, e), { documentBody: s, documentEndPoint: i, documentTrailingComment: o, documentHeadTrailingComment: a } = Xs(t, e, r), c = n(a); + o && e.comments.push(o); + let l = t.cstNode; + return Hs(X(c.position.start, i), !!l.directivesEndMarker, !!l.documentEndMarker, c, s, o); +} +function zt(t, e, n) { + return { + ...b("flowCollection", t), + ...q(), + ...U(), + ...e, + children: n + }; +} +function ti(t, e, n) { + return { + ...zt(t, e, n), + type: "flowMapping" + }; +} +function Zt(t, e, n) { + return { + ...b("flowMappingItem", t), + ...z(), + children: [e, n] + }; +} +function de(t, e) { + let n = []; + for (let r of t) r && "type" in r && r.type === "COMMENT" ? e.comments.push(e.transformNode(r)) : n.push(r); + return n; +} +function en(t) { + let [e, n] = ["?", ":"].map((r) => { + let s = t.find((i) => "char" in i && i.char === r); + return s ? { + origStart: s.origOffset, + origEnd: s.origOffset + 1 + } : null; + }); + return { + additionalKeyRange: e, + additionalValueRange: n + }; +} +function tn(t, e) { + let n = e; + return (r) => t.slice(n, n = r); +} +function nn(t) { + let e = [], n = tn(t, 1), r = !1; + for (let s = 1; s < t.length - 1; s++) { + let i = t[s]; + if ("char" in i && i.char === ",") { + e.push(n(s)), n(s + 1), r = !1; + continue; + } + r = !0; + } + return r && e.push(n(t.length - 1)), e; +} +function Xn(t, e) { + return { + ...b("mappingKey", t), + ...he(), + ...U(), + children: e ? [e] : [] + }; +} +function zn(t, e) { + return { + ...b("mappingValue", t), + ...q(), + ...U(), + children: e ? [e] : [] + }; +} +function Ke(t, e, n, r, s) { + let i = e.transformNode(t.key), o = e.transformNode(t.value), a = i || r ? Xn(e.transformRange({ + origStart: r ? r.origStart : i.position.start.offset, + origEnd: i ? i.position.end.offset : r.origStart + 1 + }), i) : null, c = o || s ? zn(e.transformRange({ + origStart: s ? s.origStart : o.position.start.offset, + origEnd: o ? o.position.end.offset : s.origStart + 1 + }), o) : null; + return n(X(a ? a.position.start : c.position.start, c ? c.position.end : a.position.end), a || Xn(Hn(c.position.start), null), c || zn(Hn(a.position.end), null)); +} +function ni(t, e) { + let n = de(t.cstNode.items, e), r = nn(n), s = t.items.map((a, c) => { + let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = en(l); + return Ke(a, e, Zt, f, m); + }), i = n[0], o = V(n); + return ti(e.transformRange({ + origStart: i.origOffset, + origEnd: o.origOffset + 1 + }), e.transformContent(t), s); +} +function ri(t, e, n) { + return { + ...zt(t, e, n), + type: "flowSequence" + }; +} +function si(t, e) { + return { + ...b("flowSequenceItem", t), + children: [e] + }; +} +function ii(t, e) { + let n = de(t.cstNode.items, e), r = nn(n), s = t.items.map((a, c) => { + if (a.type !== "PAIR") { + let l = e.transformNode(a); + return si(X(l.position.start, l.position.end), l); + } else { + let l = r[c], { additionalKeyRange: f, additionalValueRange: m } = en(l); + return Ke(a, e, Zt, f, m); + } + }), i = n[0], o = V(n); + return ri(e.transformRange({ + origStart: i.origOffset, + origEnd: o.origOffset + 1 + }), e.transformContent(t), s); +} +function oi(t, e, n) { + return { + ...b("mapping", t), + ...z(), + ...e, + children: n + }; +} +function ai(t, e, n) { + return { + ...b("mappingItem", t), + ...z(), + children: [e, n] + }; +} +function ci(t, e) { + let n = t.cstNode; + n.items.filter((o) => o.type === "MAP_KEY" || o.type === "MAP_VALUE").forEach((o) => We(o, e)); + let s = Fa(de(n.items, e)), i = t.items.map((o, a) => { + let c = s[a], [l, f] = c[0].type === "MAP_VALUE" ? [null, c[0].range] : [c[0].range, c.length === 1 ? null : c[1].range]; + return Ke(o, e, ai, l, f); + }); + return oi(X(i[0].position.start, V(i).position.end), e.transformContent(t), i); +} +function Fa(t) { + let e = [], n = tn(t, 0), r = !1; + for (let s = 0; s < t.length; s++) { + if (t[s].type === "MAP_VALUE") { + e.push(n(s + 1)), r = !1; + continue; + } + r && e.push(n(s)), r = !0; + } + return r && e.push(n(Infinity)), e; +} +function li(t, e, n) { + return { + ...b("plain", t), + ...q(), + ...e, + value: n + }; +} +function fi(t, e, n) { + for (let r = e; r >= 0; r--) if (n.test(t[r])) return r; + return -1; +} +function ui(t, e) { + let n = t.cstNode; + return li(e.transformRange({ + origStart: n.valueRange.origStart, + origEnd: fi(e.text, n.valueRange.origEnd - 1, /\S/) + 1 + }), e.transformContent(t), n.strValue); +} +function pi(t) { + return { + ...t, + type: "quoteDouble" + }; +} +function mi(t, e, n) { + return { + ...b("quoteValue", t), + ...e, + ...q(), + value: n + }; +} +function rn(t, e) { + let n = t.cstNode; + return mi(e.transformRange(n.valueRange), e.transformContent(t), n.strValue); +} +function hi(t, e) { + return pi(rn(t, e)); +} +function di(t) { + return { + ...t, + type: "quoteSingle" + }; +} +function gi(t, e) { + return di(rn(t, e)); +} +function yi(t, e, n) { + return { + ...b("sequence", t), + ...z(), + ...U(), + ...e, + children: n + }; +} +function Ei(t, e) { + return { + ...b("sequenceItem", t), + ...q(), + ...U(), + children: e ? [e] : [] + }; +} +function Si(t, e) { + let r = de(t.cstNode.items, e).map((s, i) => { + We(s, e); + let o = e.transformNode(t.items[i]); + return Ei(X(e.transformOffset(s.valueRange.origStart), o === null ? e.transformOffset(s.valueRange.origStart + 1) : o.position.end), o); + }); + return yi(X(r[0].position.start, V(r).position.end), e.transformContent(t), r); +} +function wi(t, e) { + if (t === null || t.type === void 0 && t.value === null) return null; + switch (t.type) { + case "ALIAS": return Fs(t, e); + case "BLOCK_FOLDED": return Vs(t, e); + case "BLOCK_LITERAL": return Ks(t, e); + case "COMMENT": return js(t, e); + case "DIRECTIVE": return Gs(t, e); + case "DOCUMENT": return ei(t, e); + case "FLOW_MAP": return ni(t, e); + case "FLOW_SEQ": return ii(t, e); + case "MAP": return ci(t, e); + case "PLAIN": return ui(t, e); + case "QUOTE_DOUBLE": return hi(t, e); + case "QUOTE_SINGLE": return gi(t, e); + case "SEQ": return Si(t, e); + default: throw new Error(`Unexpected node type ${t.type}`); + } +} +function Ni(t, e, n) { + let r = new SyntaxError(t); + return r.name = "YAMLSyntaxError", r.source = e, r.position = n, r; +} +function Oi(t, e) { + let n = t.source.range || t.source.valueRange; + return Ni(t.message, e.text, e.transformRange(n)); +} +function tr(t) { + if ("children" in t) { + if (t.children.length === 1) { + let e = t.children[0]; + if (e.type === "plain" && e.tag === null && e.anchor === null && e.value === "") return t.children.splice(0, 1), t; + } + t.children.forEach(tr); + } + return t; +} +function nr(t, e, n, r) { + let s = e(t); + return (i) => { + r(s, i) && n(t, s = i); + }; +} +function rr(t) { + if (t === null || !("children" in t)) return; + let e = t.children; + if (e.forEach(rr), t.type === "document") { + let [i, o] = t.children; + i.position.start.offset === i.position.end.offset ? i.position.start = i.position.end = o.position.start : o.position.start.offset === o.position.end.offset && (o.position.start = o.position.end = i.position.end); + } + let n = nr(t.position, qa, Ua, Ka), r = nr(t.position, Va, Wa, ja); + "endComments" in t && t.endComments.length !== 0 && (n(t.endComments[0].position.start), r(V(t.endComments).position.end)); + let s = e.filter((i) => i !== null); + if (s.length !== 0) { + let i = s[0], o = V(s); + n(i.position.start), r(o.position.end), "leadingComments" in i && i.leadingComments.length !== 0 && n(i.leadingComments[0].position.start), "tag" in i && i.tag && n(i.tag.position.start), "anchor" in i && i.anchor && n(i.anchor.position.start), "trailingComment" in o && o.trailingComment && r(o.trailingComment.position.end); + } +} +function qa(t) { + return t.start; +} +function Ua(t, e) { + t.start = e; +} +function Va(t) { + return t.end; +} +function Wa(t, e) { + t.end = e; +} +function Ka(t, e) { + return e.offset < t.offset; +} +function ja(t, e) { + return e.offset > t.offset; +} +function Ai(t) { + let e = sr.default.parseCST(t), n = new bi(e, t); + n.setOrigRanges(); + let r = e.map((i) => new sr.default.Document({ + merge: !1, + keepCstNodes: !0 + }).parse(i)); + for (let i of r) for (let o of i.errors) if (!(o instanceof vs && o.message === "Map keys must be unique; \"<<\" is repeated")) throw Oi(o, n); + r.forEach((i) => pt(i.cstNode)); + let s = Rs(n.transformRange({ + origStart: 0, + origEnd: t.length + }), r.map((i) => n.transformNode(i)), n.comments); + return Is(s), rr(s), tr(s), s; +} +function Qa(t, e) { + let n = /* @__PURE__ */ new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")"); + return Object.assign(n, e); +} +function Ga(t) { + try { + let e = Ai(t); + return delete e.comments, e; + } catch (e) { + throw e?.position ? Li(e.message, { + loc: e.position, + cause: e + }) : e; + } +} +var ki, sn, Pi, vi, Ii, _i, ne, or, xi, on, ce, Qr, De, qn, Kn, Ls, Ms, Gn, Ps, Ci, mt, D, $i, ht, Bi, je, Qe, Ge, dt, gt, Ae, yt, Le, Te, Ce, Et, Me, St, re, wt, ke, bt, Nt, qi, an, ar, Z, Ot, lr, fr, Xe, se, Lt, N, He, fn, hr, un, pn, mn, dr, gr, yr, Er, Sr, wr, br, Nr, Or, Lr, Cr, Ze, Gi, Mr, k, Pr, tt, vr, ve, yn, Yr, Br, Fr, qr, Ur, vt, Vr, ir, sr, J, vs, me, Jn, Zn, er, bi, Li, Ha, Ja, Xa; +//#endregion +__esmMin((() => { + ki = Object.create; + sn = Object.defineProperty; + Pi = Object.getOwnPropertyDescriptor; + vi = Object.getOwnPropertyNames; + Ii = Object.getPrototypeOf, _i = Object.prototype.hasOwnProperty; + ne = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), or = (t, e) => { + for (var n in e) sn(t, n, { + get: e[n], + enumerable: !0 + }); + }, xi = (t, e, n, r) => { + if (e && typeof e == "object" || typeof e == "function") for (let s of vi(e)) !_i.call(t, s) && s !== n && sn(t, s, { + get: () => e[s], + enumerable: !(r = Pi(e, s)) || r.enumerable + }); + return t; + }; + on = (t, e, n) => (n = t != null ? ki(Ii(t)) : {}, xi(e || !t || !t.__esModule ? sn(n, "default", { + value: t, + enumerable: !0 + }) : n, t)); + ce = ne((B) => { + "use strict"; + var ie = { + ANCHOR: "&", + COMMENT: "#", + TAG: "!", + DIRECTIVES_END: "-", + DOCUMENT_END: "." + }, st = { + ALIAS: "ALIAS", + BLANK_LINE: "BLANK_LINE", + BLOCK_FOLDED: "BLOCK_FOLDED", + BLOCK_LITERAL: "BLOCK_LITERAL", + COMMENT: "COMMENT", + DIRECTIVE: "DIRECTIVE", + DOCUMENT: "DOCUMENT", + FLOW_MAP: "FLOW_MAP", + FLOW_SEQ: "FLOW_SEQ", + MAP: "MAP", + MAP_KEY: "MAP_KEY", + MAP_VALUE: "MAP_VALUE", + PLAIN: "PLAIN", + QUOTE_DOUBLE: "QUOTE_DOUBLE", + QUOTE_SINGLE: "QUOTE_SINGLE", + SEQ: "SEQ", + SEQ_ITEM: "SEQ_ITEM" + }, mo = "tag:yaml.org,2002:", ho = { + MAP: "tag:yaml.org,2002:map", + SEQ: "tag:yaml.org,2002:seq", + STR: "tag:yaml.org,2002:str" + }; + function Wr(t) { + let e = [0], n = t.indexOf(` +`); + for (; n !== -1;) n += 1, e.push(n), n = t.indexOf(` +`, n); + return e; + } + function Kr(t) { + let e, n; + return typeof t == "string" ? (e = Wr(t), n = t) : (Array.isArray(t) && (t = t[0]), t && t.context && (t.lineStarts || (t.lineStarts = Wr(t.context.src)), e = t.lineStarts, n = t.context.src)), { + lineStarts: e, + src: n + }; + } + function wn(t, e) { + if (typeof t != "number" || t < 0) return null; + let { lineStarts: n, src: r } = Kr(e); + if (!n || !r || t > r.length) return null; + for (let i = 0; i < n.length; ++i) { + let o = n[i]; + if (t < o) return { + line: i, + col: t - n[i - 1] + 1 + }; + if (t === o) return { + line: i + 1, + col: 1 + }; + } + let s = n.length; + return { + line: s, + col: t - n[s - 1] + 1 + }; + } + function go(t, e) { + let { lineStarts: n, src: r } = Kr(e); + if (!n || !(t >= 1) || t > n.length) return null; + let s = n[t - 1], i = n[t]; + for (; i && i > s && r[i - 1] === ` +`;) --i; + return r.slice(s, i); + } + function yo({ start: t, end: e }, n, r = 80) { + let s = go(t.line, n); + if (!s) return null; + let { col: i } = t; + if (s.length > r) if (i <= r - 10) s = s.substr(0, r - 1) + "…"; + else { + let f = Math.round(r / 2); + s.length > i + f && (s = s.substr(0, i + f - 1) + "…"), i -= s.length - r, s = "…" + s.substr(1 - r); + } + let o = 1, a = ""; + e && (e.line === t.line && i + (e.col - t.col) <= r + 1 ? o = e.col - t.col : (o = Math.min(s.length + 1, r) - i, a = "…")); + let c = i > 1 ? " ".repeat(i - 1) : "", l = "^".repeat(o); + return `${s} +${c}${l}${a}`; + } + var xe = class t { + static copy(e) { + return new t(e.start, e.end); + } + constructor(e, n) { + this.start = e, this.end = n || e; + } + isEmpty() { + return typeof this.start != "number" || !this.end || this.end <= this.start; + } + setOrigRange(e, n) { + let { start: r, end: s } = this; + if (e.length === 0 || s <= e[0]) return this.origStart = r, this.origEnd = s, n; + let i = n; + for (; i < e.length && !(e[i] > r);) ++i; + this.origStart = r + i; + let o = i; + for (; i < e.length && !(e[i] >= s);) ++i; + return this.origEnd = s + i, o; + } + }, oe = class t { + static addStringTerminator(e, n, r) { + if (r[r.length - 1] === ` +`) return r; + let s = t.endOfWhiteSpace(e, n); + return s >= e.length || e[s] === ` +` ? r + ` +` : r; + } + static atDocumentBoundary(e, n, r) { + let s = e[n]; + if (!s) return !0; + let i = e[n - 1]; + if (i && i !== ` +`) return !1; + if (r) { + if (s !== r) return !1; + } else if (s !== ie.DIRECTIVES_END && s !== ie.DOCUMENT_END) return !1; + let o = e[n + 1], a = e[n + 2]; + if (o !== s || a !== s) return !1; + let c = e[n + 3]; + return !c || c === ` +` || c === " " || c === " "; + } + static endOfIdentifier(e, n) { + let r = e[n], s = r === "<", i = s ? [ + ` +`, + " ", + " ", + ">" + ] : [ + ` +`, + " ", + " ", + "[", + "]", + "{", + "}", + "," + ]; + for (; r && i.indexOf(r) === -1;) r = e[n += 1]; + return s && r === ">" && (n += 1), n; + } + static endOfIndent(e, n) { + let r = e[n]; + for (; r === " ";) r = e[n += 1]; + return n; + } + static endOfLine(e, n) { + let r = e[n]; + for (; r && r !== ` +`;) r = e[n += 1]; + return n; + } + static endOfWhiteSpace(e, n) { + let r = e[n]; + for (; r === " " || r === " ";) r = e[n += 1]; + return n; + } + static startOfLine(e, n) { + let r = e[n - 1]; + if (r === ` +`) return n; + for (; r && r !== ` +`;) r = e[n -= 1]; + return n + 1; + } + static endOfBlockIndent(e, n, r) { + let s = t.endOfIndent(e, r); + if (s > r + n) return s; + { + let i = t.endOfWhiteSpace(e, s), o = e[i]; + if (!o || o === ` +`) return i; + } + return null; + } + static atBlank(e, n, r) { + let s = e[n]; + return s === ` +` || s === " " || s === " " || r && !s; + } + static nextNodeIsIndented(e, n, r) { + return !e || n < 0 ? !1 : n > 0 ? !0 : r && e === "-"; + } + static normalizeOffset(e, n) { + let r = e[n]; + return r ? r !== ` +` && e[n - 1] === ` +` ? n - 1 : t.endOfWhiteSpace(e, n) : n; + } + static foldNewline(e, n, r) { + let s = 0, i = !1, o = "", a = e[n + 1]; + for (; a === " " || a === " " || a === ` +`;) { + switch (a) { + case ` +`: + s = 0, n += 1, o += ` +`; + break; + case " ": + s <= r && (i = !0), n = t.endOfWhiteSpace(e, n + 2) - 1; + break; + case " ": + s += 1, n += 1; + break; + } + a = e[n + 1]; + } + return o || (o = " "), a && s <= r && (i = !0), { + fold: o, + offset: n, + error: i + }; + } + constructor(e, n, r) { + Object.defineProperty(this, "context", { + value: r || null, + writable: !0 + }), this.error = null, this.range = null, this.valueRange = null, this.props = n || [], this.type = e, this.value = null; + } + getPropValue(e, n, r) { + if (!this.context) return null; + let { src: s } = this.context, i = this.props[e]; + return i && s[i.start] === n ? s.slice(i.start + (r ? 1 : 0), i.end) : null; + } + get anchor() { + for (let e = 0; e < this.props.length; ++e) { + let n = this.getPropValue(e, ie.ANCHOR, !0); + if (n != null) return n; + } + return null; + } + get comment() { + let e = []; + for (let n = 0; n < this.props.length; ++n) { + let r = this.getPropValue(n, ie.COMMENT, !0); + r != null && e.push(r); + } + return e.length > 0 ? e.join(` +`) : null; + } + commentHasRequiredWhitespace(e) { + let { src: n } = this.context; + if (this.header && e === this.header.end || !this.valueRange) return !1; + let { end: r } = this.valueRange; + return e !== r || t.atBlank(n, r - 1); + } + get hasComment() { + if (this.context) { + let { src: e } = this.context; + for (let n = 0; n < this.props.length; ++n) if (e[this.props[n].start] === ie.COMMENT) return !0; + } + return !1; + } + get hasProps() { + if (this.context) { + let { src: e } = this.context; + for (let n = 0; n < this.props.length; ++n) if (e[this.props[n].start] !== ie.COMMENT) return !0; + } + return !1; + } + get includesTrailingLines() { + return !1; + } + get jsonLike() { + return [ + st.FLOW_MAP, + st.FLOW_SEQ, + st.QUOTE_DOUBLE, + st.QUOTE_SINGLE + ].indexOf(this.type) !== -1; + } + get rangeAsLinePos() { + if (!this.range || !this.context) return; + let e = wn(this.range.start, this.context.root); + if (!e) return; + return { + start: e, + end: wn(this.range.end, this.context.root) + }; + } + get rawValue() { + if (!this.valueRange || !this.context) return null; + let { start: e, end: n } = this.valueRange; + return this.context.src.slice(e, n); + } + get tag() { + for (let e = 0; e < this.props.length; ++e) { + let n = this.getPropValue(e, ie.TAG, !1); + if (n != null) { + if (n[1] === "<") return { verbatim: n.slice(2, -1) }; + { + let [r, s, i] = n.match(/^(.*!)([^!]*)$/); + return { + handle: s, + suffix: i + }; + } + } + } + return null; + } + get valueRangeContainsNewline() { + if (!this.valueRange || !this.context) return !1; + let { start: e, end: n } = this.valueRange, { src: r } = this.context; + for (let s = e; s < n; ++s) if (r[s] === ` +`) return !0; + return !1; + } + parseComment(e) { + let { src: n } = this.context; + if (n[e] === ie.COMMENT) { + let r = t.endOfLine(n, e + 1), s = new xe(e, r); + return this.props.push(s), r; + } + return e; + } + setOrigRanges(e, n) { + return this.range && (n = this.range.setOrigRange(e, n)), this.valueRange && this.valueRange.setOrigRange(e, n), this.props.forEach((r) => r.setOrigRange(e, n)), n; + } + toString() { + let { context: { src: e }, range: n, value: r } = this; + if (r != null) return r; + let s = e.slice(n.start, n.end); + return t.addStringTerminator(e, n.end, s); + } + }, ge = class extends Error { + constructor(e, n, r) { + if (!r || !(n instanceof oe)) throw new Error(`Invalid arguments for new ${e}`); + super(), this.name = e, this.message = r, this.source = n; + } + makePretty() { + if (!this.source) return; + this.nodeType = this.source.type; + let e = this.source.context && this.source.context.root; + if (typeof this.offset == "number") { + this.range = new xe(this.offset, this.offset + 1); + let n = e && wn(this.offset, e); + if (n) { + let r = { + line: n.line, + col: n.col + 1 + }; + this.linePos = { + start: n, + end: r + }; + } + delete this.offset; + } else this.range = this.source.range, this.linePos = this.source.rangeAsLinePos; + if (this.linePos) { + let { line: n, col: r } = this.linePos.start; + this.message += ` at line ${n}, column ${r}`; + let s = e && yo(this.linePos, e); + s && (this.message += `: + +${s} +`); + } + delete this.source; + } + }, bn = class extends ge { + constructor(e, n) { + super("YAMLReferenceError", e, n); + } + }, it = class extends ge { + constructor(e, n) { + super("YAMLSemanticError", e, n); + } + }, Nn = class extends ge { + constructor(e, n) { + super("YAMLSyntaxError", e, n); + } + }, On = class extends ge { + constructor(e, n) { + super("YAMLWarning", e, n); + } + }; + function Eo(t, e, n) { + return e in t ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0 + }) : t[e] = n, t; + } + var An = class t extends oe { + static endOfLine(e, n, r) { + let s = e[n], i = n; + for (; s && s !== ` +` && !(r && (s === "[" || s === "]" || s === "{" || s === "}" || s === ","));) { + let o = e[i + 1]; + if (s === ":" && (!o || o === ` +` || o === " " || o === " " || r && o === ",") || (s === " " || s === " ") && o === "#") break; + i += 1, s = o; + } + return i; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { start: e, end: n } = this.valueRange, { src: r } = this.context, s = r[n - 1]; + for (; e < n && (s === ` +` || s === " " || s === " ");) s = r[--n - 1]; + let i = ""; + for (let a = e; a < n; ++a) { + let c = r[a]; + if (c === ` +`) { + let { fold: l, offset: f } = oe.foldNewline(r, a, -1); + i += l, a = f; + } else if (c === " " || c === " ") { + let l = a, f = r[a + 1]; + for (; a < n && (f === " " || f === " ");) a += 1, f = r[a + 1]; + f !== ` +` && (i += a > l ? r.slice(l, a + 1) : c); + } else i += c; + } + let o = r[e]; + switch (o) { + case " ": return { + errors: [new it(this, "Plain value cannot start with a tab character")], + str: i + }; + case "@": + case "`": { + let a = `Plain value cannot start with reserved character ${o}`; + return { + errors: [new it(this, a)], + str: i + }; + } + default: return i; + } + } + parseBlockValue(e) { + let { indent: n, inFlow: r, src: s } = this.context, i = e, o = e; + for (let a = s[i]; a === ` +` && !oe.atDocumentBoundary(s, i + 1); a = s[i]) { + let c = oe.endOfBlockIndent(s, n, i + 1); + if (c === null || s[c] === "#") break; + s[c] === ` +` ? i = c : (o = t.endOfLine(s, c, r), i = o); + } + return this.valueRange.isEmpty() && (this.valueRange.start = e), this.valueRange.end = o, o; + } + parse(e, n) { + this.context = e; + let { inFlow: r, src: s } = e, i = n, o = s[i]; + return o && o !== "#" && o !== ` +` && (i = t.endOfLine(s, n, r)), this.valueRange = new xe(n, i), i = oe.endOfWhiteSpace(s, i), i = this.parseComment(i), (!this.hasComment || this.valueRange.isEmpty()) && (i = this.parseBlockValue(i)), i; + } + }; + B.Char = ie; + B.Node = oe; + B.PlainValue = An; + B.Range = xe; + B.Type = st; + B.YAMLError = ge; + B.YAMLReferenceError = bn; + B.YAMLSemanticError = it; + B.YAMLSyntaxError = Nn; + B.YAMLWarning = On; + B._defineProperty = Eo; + B.defaultTagPrefix = mo; + B.defaultTags = ho; + }); + Qr = ne((jr) => { + "use strict"; + var u = ce(), Ee = class extends u.Node { + constructor() { + super(u.Type.BLANK_LINE); + } + get includesTrailingLines() { + return !0; + } + parse(e, n) { + return this.context = e, this.range = new u.Range(n, n + 1), n + 1; + } + }, ot = class extends u.Node { + constructor(e, n) { + super(e, n), this.node = null; + } + get includesTrailingLines() { + return !!this.node && this.node.includesTrailingLines; + } + parse(e, n) { + this.context = e; + let { parseNode: r, src: s } = e, { atLineStart: i, lineStart: o } = e; + !i && this.type === u.Type.SEQ_ITEM && (this.error = new u.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line")); + let a = i ? n - o : e.indent, c = u.Node.endOfWhiteSpace(s, n + 1), l = s[c], f = l === "#", m = [], g = null; + for (; l === ` +` || l === "#";) { + if (l === "#") { + let h = u.Node.endOfLine(s, c + 1); + m.push(new u.Range(c, h)), c = h; + } else { + i = !0, o = c + 1; + s[u.Node.endOfWhiteSpace(s, o)] === ` +` && m.length === 0 && (g = new Ee(), o = g.parse({ src: s }, o)), c = u.Node.endOfIndent(s, o); + } + l = s[c]; + } + if (u.Node.nextNodeIsIndented(l, c - (o + a), this.type !== u.Type.SEQ_ITEM) ? this.node = r({ + atLineStart: i, + inCollection: !1, + indent: a, + lineStart: o, + parent: this + }, c) : l && o > n + 1 && (c = o - 1), this.node) { + if (g) { + let h = e.parent.items || e.parent.contents; + h && h.push(g); + } + m.length && Array.prototype.push.apply(this.props, m), c = this.node.range.end; + } else if (f) { + let h = m[0]; + this.props.push(h), c = h.end; + } else c = u.Node.endOfLine(s, n + 1); + let y = this.node ? this.node.valueRange.end : c; + return this.valueRange = new u.Range(n, y), c; + } + setOrigRanges(e, n) { + return n = super.setOrigRanges(e, n), this.node ? this.node.setOrigRanges(e, n) : n; + } + toString() { + let { context: { src: e }, node: n, range: r, value: s } = this; + if (s != null) return s; + let i = n ? e.slice(r.start, n.range.start) + String(n) : e.slice(r.start, r.end); + return u.Node.addStringTerminator(e, r.end, i); + } + }, ye = class extends u.Node { + constructor() { + super(u.Type.COMMENT); + } + parse(e, n) { + this.context = e; + let r = this.parseComment(n); + return this.range = new u.Range(n, r), r; + } + }; + function Ln(t) { + let e = t; + for (; e instanceof ot;) e = e.node; + if (!(e instanceof It)) return null; + let n = e.items.length, r = -1; + for (let o = n - 1; o >= 0; --o) { + let a = e.items[o]; + if (a.type === u.Type.COMMENT) { + let { indent: c, lineStart: l } = a.context; + if (c > 0 && a.range.start >= l + c) break; + r = o; + } else if (a.type === u.Type.BLANK_LINE) r = o; + else break; + } + if (r === -1) return null; + let s = e.items.splice(r, n - r), i = s[0].range.start; + for (; e.range.end = i, e.valueRange && e.valueRange.end > i && (e.valueRange.end = i), e !== t;) e = e.context.parent; + return s; + } + var It = class t extends u.Node { + static nextContentHasIndent(e, n, r) { + let s = u.Node.endOfLine(e, n) + 1; + n = u.Node.endOfWhiteSpace(e, s); + let i = e[n]; + return i ? n >= s + r ? !0 : i !== "#" && i !== ` +` ? !1 : t.nextContentHasIndent(e, n, r) : !1; + } + constructor(e) { + super(e.type === u.Type.SEQ_ITEM ? u.Type.SEQ : u.Type.MAP); + for (let r = e.props.length - 1; r >= 0; --r) if (e.props[r].start < e.context.lineStart) { + this.props = e.props.slice(0, r + 1), e.props = e.props.slice(r + 1); + let s = e.props[0] || e.valueRange; + e.range.start = s.start; + break; + } + this.items = [e]; + let n = Ln(e); + n && Array.prototype.push.apply(this.items, n); + } + get includesTrailingLines() { + return this.items.length > 0; + } + parse(e, n) { + this.context = e; + let { parseNode: r, src: s } = e, i = u.Node.startOfLine(s, n), o = this.items[0]; + o.context.parent = this, this.valueRange = u.Range.copy(o.valueRange); + let a = o.range.start - o.context.lineStart, c = n; + c = u.Node.normalizeOffset(s, c); + let l = s[c], f = u.Node.endOfWhiteSpace(s, i) === c, m = !1; + for (; l;) { + for (; l === ` +` || l === "#";) { + if (f && l === ` +` && !m) { + let h = new Ee(); + if (c = h.parse({ src: s }, c), this.valueRange.end = c, c >= s.length) { + l = null; + break; + } + this.items.push(h), c -= 1; + } else if (l === "#") { + if (c < i + a && !t.nextContentHasIndent(s, c, a)) return c; + let h = new ye(); + if (c = h.parse({ + indent: a, + lineStart: i, + src: s + }, c), this.items.push(h), this.valueRange.end = c, c >= s.length) { + l = null; + break; + } + } + if (i = c + 1, c = u.Node.endOfIndent(s, i), u.Node.atBlank(s, c)) { + let h = u.Node.endOfWhiteSpace(s, c), d = s[h]; + (!d || d === ` +` || d === "#") && (c = h); + } + l = s[c], f = !0; + } + if (!l) break; + if (c !== i + a && (f || l !== ":")) { + if (c < i + a) { + i > n && (c = i); + break; + } else if (!this.error) { + let h = "All collection items must start at the same column"; + this.error = new u.YAMLSyntaxError(this, h); + } + } + if (o.type === u.Type.SEQ_ITEM) { + if (l !== "-") { + i > n && (c = i); + break; + } + } else if (l === "-" && !this.error) { + let h = s[c + 1]; + if (!h || h === ` +` || h === " " || h === " ") { + let d = "A collection cannot be both a mapping and a sequence"; + this.error = new u.YAMLSyntaxError(this, d); + } + } + let g = r({ + atLineStart: f, + inCollection: !0, + indent: a, + lineStart: i, + parent: this + }, c); + if (!g) return c; + if (this.items.push(g), this.valueRange.end = g.valueRange.end, c = u.Node.normalizeOffset(s, g.range.end), l = s[c], f = !1, m = g.includesTrailingLines, l) { + let h = c - 1, d = s[h]; + for (; d === " " || d === " ";) d = s[--h]; + d === ` +` && (i = h + 1, f = !0); + } + let y = Ln(g); + y && Array.prototype.push.apply(this.items, y); + } + return c; + } + setOrigRanges(e, n) { + return n = super.setOrigRanges(e, n), this.items.forEach((r) => { + n = r.setOrigRanges(e, n); + }), n; + } + toString() { + let { context: { src: e }, items: n, range: r, value: s } = this; + if (s != null) return s; + let i = e.slice(r.start, n[0].range.start) + String(n[0]); + for (let o = 1; o < n.length; ++o) { + let a = n[o], { atLineStart: c, indent: l } = a.context; + if (c) for (let f = 0; f < l; ++f) i += " "; + i += String(a); + } + return u.Node.addStringTerminator(e, r.end, i); + } + }, Tn = class extends u.Node { + constructor() { + super(u.Type.DIRECTIVE), this.name = null; + } + get parameters() { + let e = this.rawValue; + return e ? e.trim().split(/[ \t]+/) : []; + } + parseName(e) { + let { src: n } = this.context, r = e, s = n[r]; + for (; s && s !== ` +` && s !== " " && s !== " ";) s = n[r += 1]; + return this.name = n.slice(e, r), r; + } + parseParameters(e) { + let { src: n } = this.context, r = e, s = n[r]; + for (; s && s !== ` +` && s !== "#";) s = n[r += 1]; + return this.valueRange = new u.Range(e, r), r; + } + parse(e, n) { + this.context = e; + let r = this.parseName(n + 1); + return r = this.parseParameters(r), r = this.parseComment(r), this.range = new u.Range(n, r), r; + } + }, Cn = class t extends u.Node { + static startCommentOrEndBlankLine(e, n) { + let r = u.Node.endOfWhiteSpace(e, n), s = e[r]; + return s === "#" || s === ` +` ? r : n; + } + constructor() { + super(u.Type.DOCUMENT), this.directives = null, this.contents = null, this.directivesEndMarker = null, this.documentEndMarker = null; + } + parseDirectives(e) { + let { src: n } = this.context; + this.directives = []; + let r = !0, s = !1, i = e; + for (; !u.Node.atDocumentBoundary(n, i, u.Char.DIRECTIVES_END);) switch (i = t.startCommentOrEndBlankLine(n, i), n[i]) { + case ` +`: + if (r) { + let o = new Ee(); + i = o.parse({ src: n }, i), i < n.length && this.directives.push(o); + } else i += 1, r = !0; + break; + case "#": + { + let o = new ye(); + i = o.parse({ src: n }, i), this.directives.push(o), r = !1; + } + break; + case "%": + { + let o = new Tn(); + i = o.parse({ + parent: this, + src: n + }, i), this.directives.push(o), s = !0, r = !1; + } + break; + default: return s ? this.error = new u.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), i; + } + return n[i] ? (this.directivesEndMarker = new u.Range(i, i + 3), i + 3) : (s ? this.error = new u.YAMLSemanticError(this, "Missing directives-end indicator line") : this.directives.length > 0 && (this.contents = this.directives, this.directives = []), i); + } + parseContents(e) { + let { parseNode: n, src: r } = this.context; + this.contents || (this.contents = []); + let s = e; + for (; r[s - 1] === "-";) s -= 1; + let i = u.Node.endOfWhiteSpace(r, e), o = s === e; + for (this.valueRange = new u.Range(i); !u.Node.atDocumentBoundary(r, i, u.Char.DOCUMENT_END);) { + switch (r[i]) { + case ` +`: + if (o) { + let a = new Ee(); + i = a.parse({ src: r }, i), i < r.length && this.contents.push(a); + } else i += 1, o = !0; + s = i; + break; + case "#": + { + let a = new ye(); + i = a.parse({ src: r }, i), this.contents.push(a), o = !1; + } + break; + default: { + let a = u.Node.endOfIndent(r, i), l = n({ + atLineStart: o, + indent: -1, + inFlow: !1, + inCollection: !1, + lineStart: s, + parent: this + }, a); + if (!l) return this.valueRange.end = a; + this.contents.push(l), i = l.range.end, o = !1; + let f = Ln(l); + f && Array.prototype.push.apply(this.contents, f); + } + } + i = t.startCommentOrEndBlankLine(r, i); + } + if (this.valueRange.end = i, r[i] && (this.documentEndMarker = new u.Range(i, i + 3), i += 3, r[i])) { + if (i = u.Node.endOfWhiteSpace(r, i), r[i] === "#") { + let a = new ye(); + i = a.parse({ src: r }, i), this.contents.push(a); + } + switch (r[i]) { + case ` +`: + i += 1; + break; + case void 0: break; + default: this.error = new u.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix"); + } + } + return i; + } + parse(e, n) { + e.root = this, this.context = e; + let { src: r } = e, s = r.charCodeAt(n) === 65279 ? n + 1 : n; + return s = this.parseDirectives(s), s = this.parseContents(s), s; + } + setOrigRanges(e, n) { + return n = super.setOrigRanges(e, n), this.directives.forEach((r) => { + n = r.setOrigRanges(e, n); + }), this.directivesEndMarker && (n = this.directivesEndMarker.setOrigRange(e, n)), this.contents.forEach((r) => { + n = r.setOrigRanges(e, n); + }), this.documentEndMarker && (n = this.documentEndMarker.setOrigRange(e, n)), n; + } + toString() { + let { contents: e, directives: n, value: r } = this; + if (r != null) return r; + let s = n.join(""); + return e.length > 0 && ((n.length > 0 || e[0].type === u.Type.COMMENT) && (s += `--- +`), s += e.join("")), s[s.length - 1] !== ` +` && (s += ` +`), s; + } + }, Mn = class extends u.Node { + parse(e, n) { + this.context = e; + let { src: r } = e, s = u.Node.endOfIdentifier(r, n + 1); + return this.valueRange = new u.Range(n + 1, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s; + } + }, le = { + CLIP: "CLIP", + KEEP: "KEEP", + STRIP: "STRIP" + }, kn = class extends u.Node { + constructor(e, n) { + super(e, n), this.blockIndent = null, this.chomping = le.CLIP, this.header = null; + } + get includesTrailingLines() { + return this.chomping === le.KEEP; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { start: e, end: n } = this.valueRange, { indent: r, src: s } = this.context; + if (this.valueRange.isEmpty()) return ""; + let i = null, o = s[n - 1]; + for (; o === ` +` || o === " " || o === " ";) { + if (n -= 1, n <= e) { + if (this.chomping === le.KEEP) break; + return ""; + } + o === ` +` && (i = n), o = s[n - 1]; + } + let a = n + 1; + i && (this.chomping === le.KEEP ? (a = i, n = this.valueRange.end) : n = i); + let c = r + this.blockIndent, l = this.type === u.Type.BLOCK_FOLDED, f = !0, m = "", g = "", y = !1; + for (let h = e; h < n; ++h) { + for (let w = 0; w < c && s[h] === " "; ++w) h += 1; + let d = s[h]; + if (d === ` +`) g === ` +` ? m += ` +` : g = ` +`; + else { + let w = u.Node.endOfLine(s, h), P = s.slice(h, w); + h = w, l && (d === " " || d === " ") && h < a ? (g === " " ? g = ` +` : !y && !f && g === ` +` && (g = ` + +`), m += g + P, g = w < n && s[w] || "", y = !0) : (m += g + P, g = l && h < a ? " " : ` +`, y = !1), f && P !== "" && (f = !1); + } + } + return this.chomping === le.STRIP ? m : m + ` +`; + } + parseBlockHeader(e) { + let { src: n } = this.context, r = e + 1, s = ""; + for (;;) { + let i = n[r]; + switch (i) { + case "-": + this.chomping = le.STRIP; + break; + case "+": + this.chomping = le.KEEP; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + s += i; + break; + default: return this.blockIndent = Number(s) || null, this.header = new u.Range(e, r), r; + } + r += 1; + } + } + parseBlockValue(e) { + let { indent: n, src: r } = this.context, s = !!this.blockIndent, i = e, o = e, a = 1; + for (let c = r[i]; c === ` +` && (i += 1, !u.Node.atDocumentBoundary(r, i)); c = r[i]) { + let l = u.Node.endOfBlockIndent(r, n, i); + if (l === null) break; + let f = r[l], m = l - (i + n); + if (this.blockIndent) { + if (f && f !== ` +` && m < this.blockIndent) { + if (r[l] === "#") break; + if (!this.error) { + let y = `Block scalars must not be less indented than their ${s ? "explicit indentation indicator" : "first line"}`; + this.error = new u.YAMLSemanticError(this, y); + } + } + } else if (r[l] !== ` +`) { + if (m < a) { + let g = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + this.error = new u.YAMLSemanticError(this, g); + } + this.blockIndent = m; + } else m > a && (a = m); + r[l] === ` +` ? i = l : i = o = u.Node.endOfLine(r, l); + } + return this.chomping !== le.KEEP && (i = r[o] ? o + 1 : o), this.valueRange = new u.Range(e + 1, i), i; + } + parse(e, n) { + this.context = e; + let { src: r } = e, s = this.parseBlockHeader(n); + return s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s = this.parseBlockValue(s), s; + } + setOrigRanges(e, n) { + return n = super.setOrigRanges(e, n), this.header ? this.header.setOrigRange(e, n) : n; + } + }, Pn = class extends u.Node { + constructor(e, n) { + super(e, n), this.items = null; + } + prevNodeIsJsonLike(e = this.items.length) { + let n = this.items[e - 1]; + return !!n && (n.jsonLike || n.type === u.Type.COMMENT && this.prevNodeIsJsonLike(e - 1)); + } + parse(e, n) { + this.context = e; + let { parseNode: r, src: s } = e, { indent: i, lineStart: o } = e, a = s[n]; + this.items = [{ + char: a, + offset: n + }]; + let c = u.Node.endOfWhiteSpace(s, n + 1); + for (a = s[c]; a && a !== "]" && a !== "}";) { + switch (a) { + case ` +`: + o = c + 1; + if (s[u.Node.endOfWhiteSpace(s, o)] === ` +`) { + let f = new Ee(); + o = f.parse({ src: s }, o), this.items.push(f); + } + if (c = u.Node.endOfIndent(s, o), c <= o + i && (a = s[c], c < o + i || a !== "]" && a !== "}")) { + let f = "Insufficient indentation in flow collection"; + this.error = new u.YAMLSemanticError(this, f); + } + break; + case ",": + this.items.push({ + char: a, + offset: c + }), c += 1; + break; + case "#": + { + let l = new ye(); + c = l.parse({ src: s }, c), this.items.push(l); + } + break; + case "?": + case ":": { + let l = s[c + 1]; + if (l === ` +` || l === " " || l === " " || l === "," || a === ":" && this.prevNodeIsJsonLike()) { + this.items.push({ + char: a, + offset: c + }), c += 1; + break; + } + } + default: { + let l = r({ + atLineStart: !1, + inCollection: !1, + inFlow: !0, + indent: -1, + lineStart: o, + parent: this + }, c); + if (!l) return this.valueRange = new u.Range(n, c), c; + this.items.push(l), c = u.Node.normalizeOffset(s, l.range.end); + } + } + c = u.Node.endOfWhiteSpace(s, c), a = s[c]; + } + return this.valueRange = new u.Range(n, c + 1), a && (this.items.push({ + char: a, + offset: c + }), c = u.Node.endOfWhiteSpace(s, c + 1), c = this.parseComment(c)), c; + } + setOrigRanges(e, n) { + return n = super.setOrigRanges(e, n), this.items.forEach((r) => { + if (r instanceof u.Node) n = r.setOrigRanges(e, n); + else if (e.length === 0) r.origOffset = r.offset; + else { + let s = n; + for (; s < e.length && !(e[s] > r.offset);) ++s; + r.origOffset = r.offset + s, n = s; + } + }), n; + } + toString() { + let { context: { src: e }, items: n, range: r, value: s } = this; + if (s != null) return s; + let i = n.filter((c) => c instanceof u.Node), o = "", a = r.start; + return i.forEach((c) => { + let l = e.slice(a, c.range.start); + a = c.range.end, o += l + String(c), o[o.length - 1] === ` +` && e[a - 1] !== ` +` && e[a] === ` +` && (a += 1); + }), o += e.slice(a, r.end), u.Node.addStringTerminator(e, r.end, o); + } + }, vn = class t extends u.Node { + static endOfQuote(e, n) { + let r = e[n]; + for (; r && r !== "\"";) n += r === "\\" ? 2 : 1, r = e[n]; + return n + 1; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let e = [], { start: n, end: r } = this.valueRange, { indent: s, src: i } = this.context; + i[r - 1] !== "\"" && e.push(new u.YAMLSyntaxError(this, "Missing closing \"quote")); + let o = ""; + for (let a = n + 1; a < r - 1; ++a) { + let c = i[a]; + if (c === ` +`) { + u.Node.atDocumentBoundary(i, a + 1) && e.push(new u.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + let { fold: l, offset: f, error: m } = u.Node.foldNewline(i, a, s); + o += l, a = f, m && e.push(new u.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented")); + } else if (c === "\\") switch (a += 1, i[a]) { + case "0": + o += "\0"; + break; + case "a": + o += "\x07"; + break; + case "b": + o += "\b"; + break; + case "e": + o += "\x1B"; + break; + case "f": + o += "\f"; + break; + case "n": + o += ` +`; + break; + case "r": + o += "\r"; + break; + case "t": + o += " "; + break; + case "v": + o += "\v"; + break; + case "N": + o += "…"; + break; + case "_": + o += "\xA0"; + break; + case "L": + o += "\u2028"; + break; + case "P": + o += "\u2029"; + break; + case " ": + o += " "; + break; + case "\"": + o += "\""; + break; + case "/": + o += "/"; + break; + case "\\": + o += "\\"; + break; + case " ": + o += " "; + break; + case "x": + o += this.parseCharCode(a + 1, 2, e), a += 2; + break; + case "u": + o += this.parseCharCode(a + 1, 4, e), a += 4; + break; + case "U": + o += this.parseCharCode(a + 1, 8, e), a += 8; + break; + case ` +`: + for (; i[a + 1] === " " || i[a + 1] === " ";) a += 1; + break; + default: e.push(new u.YAMLSyntaxError(this, `Invalid escape sequence ${i.substr(a - 1, 2)}`)), o += "\\" + i[a]; + } + else if (c === " " || c === " ") { + let l = a, f = i[a + 1]; + for (; f === " " || f === " ";) a += 1, f = i[a + 1]; + f !== ` +` && (o += a > l ? i.slice(l, a + 1) : c); + } else o += c; + } + return e.length > 0 ? { + errors: e, + str: o + } : o; + } + parseCharCode(e, n, r) { + let { src: s } = this.context, i = s.substr(e, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN; + return isNaN(a) ? (r.push(new u.YAMLSyntaxError(this, `Invalid escape sequence ${s.substr(e - 2, n + 2)}`)), s.substr(e - 2, n + 2)) : String.fromCodePoint(a); + } + parse(e, n) { + this.context = e; + let { src: r } = e, s = t.endOfQuote(r, n + 1); + return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s; + } + }, In = class t extends u.Node { + static endOfQuote(e, n) { + let r = e[n]; + for (; r;) if (r === "'") { + if (e[n + 1] !== "'") break; + r = e[n += 2]; + } else r = e[n += 1]; + return n + 1; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let e = [], { start: n, end: r } = this.valueRange, { indent: s, src: i } = this.context; + i[r - 1] !== "'" && e.push(new u.YAMLSyntaxError(this, "Missing closing 'quote")); + let o = ""; + for (let a = n + 1; a < r - 1; ++a) { + let c = i[a]; + if (c === ` +`) { + u.Node.atDocumentBoundary(i, a + 1) && e.push(new u.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + let { fold: l, offset: f, error: m } = u.Node.foldNewline(i, a, s); + o += l, a = f, m && e.push(new u.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented")); + } else if (c === "'") o += c, a += 1, i[a] !== "'" && e.push(new u.YAMLSyntaxError(this, "Unescaped single quote? This should not happen.")); + else if (c === " " || c === " ") { + let l = a, f = i[a + 1]; + for (; f === " " || f === " ";) a += 1, f = i[a + 1]; + f !== ` +` && (o += a > l ? i.slice(l, a + 1) : c); + } else o += c; + } + return e.length > 0 ? { + errors: e, + str: o + } : o; + } + parse(e, n) { + this.context = e; + let { src: r } = e, s = t.endOfQuote(r, n + 1); + return this.valueRange = new u.Range(n, s), s = u.Node.endOfWhiteSpace(r, s), s = this.parseComment(s), s; + } + }; + function So(t, e) { + switch (t) { + case u.Type.ALIAS: return new Mn(t, e); + case u.Type.BLOCK_FOLDED: + case u.Type.BLOCK_LITERAL: return new kn(t, e); + case u.Type.FLOW_MAP: + case u.Type.FLOW_SEQ: return new Pn(t, e); + case u.Type.MAP_KEY: + case u.Type.MAP_VALUE: + case u.Type.SEQ_ITEM: return new ot(t, e); + case u.Type.COMMENT: + case u.Type.PLAIN: return new u.PlainValue(t, e); + case u.Type.QUOTE_DOUBLE: return new vn(t, e); + case u.Type.QUOTE_SINGLE: return new In(t, e); + default: return null; + } + } + var _n = class t { + static parseType(e, n, r) { + switch (e[n]) { + case "*": return u.Type.ALIAS; + case ">": return u.Type.BLOCK_FOLDED; + case "|": return u.Type.BLOCK_LITERAL; + case "{": return u.Type.FLOW_MAP; + case "[": return u.Type.FLOW_SEQ; + case "?": return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.MAP_KEY : u.Type.PLAIN; + case ":": return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.MAP_VALUE : u.Type.PLAIN; + case "-": return !r && u.Node.atBlank(e, n + 1, !0) ? u.Type.SEQ_ITEM : u.Type.PLAIN; + case "\"": return u.Type.QUOTE_DOUBLE; + case "'": return u.Type.QUOTE_SINGLE; + default: return u.Type.PLAIN; + } + } + constructor(e = {}, { atLineStart: n, inCollection: r, inFlow: s, indent: i, lineStart: o, parent: a } = {}) { + u._defineProperty(this, "parseNode", (c, l) => { + if (u.Node.atDocumentBoundary(this.src, l)) return null; + let f = new t(this, c), { props: m, type: g, valueStart: y } = f.parseProps(l), h = So(g, m), d = h.parse(f, y); + if (h.range = new u.Range(l, d), d <= l && (h.error = /* @__PURE__ */ new Error("Node#parse consumed no characters"), h.error.parseEnd = d, h.error.source = h, h.range.end = l + 1), f.nodeStartsCollection(h)) { + !h.error && !f.atLineStart && f.parent.type === u.Type.DOCUMENT && (h.error = new u.YAMLSyntaxError(h, "Block collection must not have preceding content here (e.g. directives-end indicator)")); + let w = new It(h); + return d = w.parse(new t(f), d), w.range = new u.Range(l, d), w; + } + return h; + }), this.atLineStart = n ?? (e.atLineStart || !1), this.inCollection = r ?? (e.inCollection || !1), this.inFlow = s ?? (e.inFlow || !1), this.indent = i ?? e.indent, this.lineStart = o ?? e.lineStart, this.parent = a ?? (e.parent || {}), this.root = e.root, this.src = e.src; + } + nodeStartsCollection(e) { + let { inCollection: n, inFlow: r, src: s } = this; + if (n || r) return !1; + if (e instanceof ot) return !0; + let i = e.range.end; + return s[i] === ` +` || s[i - 1] === ` +` ? !1 : (i = u.Node.endOfWhiteSpace(s, i), s[i] === ":"); + } + parseProps(e) { + let { inFlow: n, parent: r, src: s } = this, i = [], o = !1; + e = this.atLineStart ? u.Node.endOfIndent(s, e) : u.Node.endOfWhiteSpace(s, e); + let a = s[e]; + for (; a === u.Char.ANCHOR || a === u.Char.COMMENT || a === u.Char.TAG || a === ` +`;) { + if (a === ` +`) { + let l = e, f; + do + f = l + 1, l = u.Node.endOfIndent(s, f); + while (s[l] === ` +`); + let m = l - (f + this.indent), g = r.type === u.Type.SEQ_ITEM && r.context.atLineStart; + if (s[l] !== "#" && !u.Node.nextNodeIsIndented(s[l], m, !g)) break; + this.atLineStart = !0, this.lineStart = f, o = !1, e = l; + } else if (a === u.Char.COMMENT) { + let l = u.Node.endOfLine(s, e + 1); + i.push(new u.Range(e, l)), e = l; + } else { + let l = u.Node.endOfIdentifier(s, e + 1); + a === u.Char.TAG && s[l] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e + 1, l + 13)) && (l = u.Node.endOfIdentifier(s, l + 5)), i.push(new u.Range(e, l)), o = !0, e = u.Node.endOfWhiteSpace(s, l); + } + a = s[e]; + } + o && a === ":" && u.Node.atBlank(s, e + 1, !0) && (e -= 1); + return { + props: i, + type: t.parseType(s, e, n), + valueStart: e + }; + } + }; + function wo(t) { + let e = []; + t.indexOf("\r") !== -1 && (t = t.replace(/\r\n?/g, (s, i) => (s.length > 1 && e.push(i), ` +`))); + let n = [], r = 0; + do { + let s = new Cn(), i = new _n({ src: t }); + r = s.parse(i, r), n.push(s); + } while (r < t.length); + return n.setOrigRanges = () => { + if (e.length === 0) return !1; + for (let i = 1; i < e.length; ++i) e[i] -= i; + let s = 0; + for (let i = 0; i < n.length; ++i) s = n[i].setOrigRanges(e, s); + return e.splice(0, e.length), !0; + }, n.toString = () => n.join(`... +`), n; + } + jr.parse = wo; + }); + De = ne((M) => { + "use strict"; + var p = ce(); + function bo(t, e, n) { + return n ? `#${n.replace(/[\s\S]^/gm, `$&${e}#`)} +${e}${t}` : t; + } + function Re(t, e, n) { + return n ? n.indexOf(` +`) === -1 ? `${t} #${n}` : `${t} +` + n.replace(/^/gm, `${e || ""}#`) : t; + } + var j = class {}; + function fe(t, e, n) { + if (Array.isArray(t)) return t.map((r, s) => fe(r, String(s), n)); + if (t && typeof t.toJSON == "function") { + let r = n && n.anchors && n.anchors.get(t); + r && (n.onCreate = (i) => { + r.res = i, delete n.onCreate; + }); + let s = t.toJSON(e, n); + return r && n.onCreate && n.onCreate(s), s; + } + return (!n || !n.keep) && typeof t == "bigint" ? Number(t) : t; + } + var x = class extends j { + constructor(e) { + super(), this.value = e; + } + toJSON(e, n) { + return n && n.keep ? this.value : fe(this.value, e, n); + } + toString() { + return String(this.value); + } + }; + function Gr(t, e, n) { + let r = n; + for (let s = e.length - 1; s >= 0; --s) { + let i = e[s]; + if (Number.isInteger(i) && i >= 0) { + let o = []; + o[i] = r, r = o; + } else { + let o = {}; + Object.defineProperty(o, i, { + value: r, + writable: !0, + enumerable: !0, + configurable: !0 + }), r = o; + } + } + return t.createNode(r, !1); + } + var Xr = (t) => t == null || typeof t == "object" && t[Symbol.iterator]().next().done, Q = class t extends j { + constructor(e) { + super(), p._defineProperty(this, "items", []), this.schema = e; + } + addIn(e, n) { + if (Xr(e)) this.add(n); + else { + let [r, ...s] = e, i = this.get(r, !0); + if (i instanceof t) i.addIn(s, n); + else if (i === void 0 && this.schema) this.set(r, Gr(this.schema, s, n)); + else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`); + } + } + deleteIn([e, ...n]) { + if (n.length === 0) return this.delete(e); + let r = this.get(e, !0); + if (r instanceof t) return r.deleteIn(n); + throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`); + } + getIn([e, ...n], r) { + let s = this.get(e, !0); + return n.length === 0 ? !r && s instanceof x ? s.value : s : s instanceof t ? s.getIn(n, r) : void 0; + } + hasAllNullValues() { + return this.items.every((e) => { + if (!e || e.type !== "PAIR") return !1; + let n = e.value; + return n == null || n instanceof x && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + hasIn([e, ...n]) { + if (n.length === 0) return this.has(e); + let r = this.get(e, !0); + return r instanceof t ? r.hasIn(n) : !1; + } + setIn([e, ...n], r) { + if (n.length === 0) this.set(e, r); + else { + let s = this.get(e, !0); + if (s instanceof t) s.setIn(n, r); + else if (s === void 0 && this.schema) this.set(e, Gr(this.schema, n, r)); + else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`); + } + } + toJSON() { + return null; + } + toString(e, { blockItem: n, flowChars: r, isMap: s, itemIndent: i }, o, a) { + let { indent: c, indentStep: l, stringify: f } = e, m = this.type === p.Type.FLOW_MAP || this.type === p.Type.FLOW_SEQ || e.inFlow; + m && (i += l); + let g = s && this.hasAllNullValues(); + e = Object.assign({}, e, { + allNullValues: g, + indent: i, + inFlow: m, + type: null + }); + let y = !1, h = !1, d = this.items.reduce((P, A, C) => { + let L; + A && (!y && A.spaceBefore && P.push({ + type: "comment", + str: "" + }), A.commentBefore && A.commentBefore.match(/^.*$/gm).forEach((Mi) => { + P.push({ + type: "comment", + str: `#${Mi}` + }); + }), A.comment && (L = A.comment), m && (!y && A.spaceBefore || A.commentBefore || A.comment || A.key && (A.key.commentBefore || A.key.comment) || A.value && (A.value.commentBefore || A.value.comment)) && (h = !0)), y = !1; + let R = f(A, e, () => L = null, () => y = !0); + return m && !h && R.includes(` +`) && (h = !0), m && C < this.items.length - 1 && (R += ","), R = Re(R, i, L), y && (L || m) && (y = !1), P.push({ + type: "item", + str: R + }), P; + }, []), w; + if (d.length === 0) w = r.start + r.end; + else if (m) { + let { start: P, end: A } = r, C = d.map((L) => L.str); + if (h || C.reduce((L, R) => L + R.length + 2, 2) > t.maxFlowStringSingleLineLength) { + w = P; + for (let L of C) w += L ? ` +${l}${c}${L}` : ` +`; + w += ` +${c}${A}`; + } else w = `${P} ${C.join(" ")} ${A}`; + } else { + let P = d.map(n); + w = P.shift(); + for (let A of P) w += A ? ` +${c}${A}` : ` +`; + } + return this.comment ? (w += ` +` + this.comment.replace(/^/gm, `${c}#`), o && o()) : y && a && a(), w; + } + }; + p._defineProperty(Q, "maxFlowStringSingleLineLength", 60); + function _t(t) { + let e = t instanceof x ? t.value : t; + return e && typeof e == "string" && (e = Number(e)), Number.isInteger(e) && e >= 0 ? e : null; + } + var ue = class extends Q { + add(e) { + this.items.push(e); + } + delete(e) { + let n = _t(e); + return typeof n != "number" ? !1 : this.items.splice(n, 1).length > 0; + } + get(e, n) { + let r = _t(e); + if (typeof r != "number") return; + let s = this.items[r]; + return !n && s instanceof x ? s.value : s; + } + has(e) { + let n = _t(e); + return typeof n == "number" && n < this.items.length; + } + set(e, n) { + let r = _t(e); + if (typeof r != "number") throw new Error(`Expected a valid index, not ${e}.`); + this.items[r] = n; + } + toJSON(e, n) { + let r = []; + n && n.onCreate && n.onCreate(r); + let s = 0; + for (let i of this.items) r.push(fe(i, String(s++), n)); + return r; + } + toString(e, n, r) { + return e ? super.toString(e, { + blockItem: (s) => s.type === "comment" ? s.str : `- ${s.str}`, + flowChars: { + start: "[", + end: "]" + }, + isMap: !1, + itemIndent: (e.indent || "") + " " + }, n, r) : JSON.stringify(this); + } + }, No = (t, e, n) => e === null ? "" : typeof e != "object" ? String(e) : t instanceof j && n && n.doc ? t.toString({ + anchors: Object.create(null), + doc: n.doc, + indent: "", + indentStep: n.indentStep, + inFlow: !0, + inStringifyKey: !0, + stringify: n.stringify + }) : JSON.stringify(e), T = class t extends j { + constructor(e, n = null) { + super(), this.key = e, this.value = n, this.type = t.Type.PAIR; + } + get commentBefore() { + return this.key instanceof j ? this.key.commentBefore : void 0; + } + set commentBefore(e) { + if (this.key ??= new x(null), this.key instanceof j) this.key.commentBefore = e; + else throw new Error("Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node."); + } + addToJSMap(e, n) { + let r = fe(this.key, "", e); + if (n instanceof Map) { + let s = fe(this.value, r, e); + n.set(r, s); + } else if (n instanceof Set) n.add(r); + else { + let s = No(this.key, r, e), i = fe(this.value, s, e); + s in n ? Object.defineProperty(n, s, { + value: i, + writable: !0, + enumerable: !0, + configurable: !0 + }) : n[s] = i; + } + return n; + } + toJSON(e, n) { + let r = n && n.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return this.addToJSMap(n, r); + } + toString(e, n, r) { + if (!e || !e.doc) return JSON.stringify(this); + let { indent: s, indentSeq: i, simpleKeys: o } = e.doc.options, { key: a, value: c } = this, l = a instanceof j && a.comment; + if (o) { + if (l) throw new Error("With simple keys, key nodes cannot have comments"); + if (a instanceof Q) throw new Error("With simple keys, collection cannot be used as a key value"); + } + let f = !o && (!a || l || (a instanceof j ? a instanceof Q || a.type === p.Type.BLOCK_FOLDED || a.type === p.Type.BLOCK_LITERAL : typeof a == "object")), { doc: m, indent: g, indentStep: y, stringify: h } = e; + e = Object.assign({}, e, { + implicitKey: !f, + indent: g + y + }); + let d = !1, w = h(a, e, () => l = null, () => d = !0); + if (w = Re(w, e.indent, l), !f && w.length > 1024) { + if (o) throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + f = !0; + } + if (e.allNullValues && !o) return this.comment ? (w = Re(w, e.indent, this.comment), n && n()) : d && !l && r && r(), e.inFlow && !f ? w : `? ${w}`; + w = f ? `? ${w} +${g}:` : `${w}:`, this.comment && (w = Re(w, e.indent, this.comment), n && n()); + let P = "", A = null; + if (c instanceof j) { + if (c.spaceBefore && (P = ` +`), c.commentBefore) { + let R = c.commentBefore.replace(/^/gm, `${e.indent}#`); + P += ` +${R}`; + } + A = c.comment; + } else c && typeof c == "object" && (c = m.schema.createNode(c, !0)); + e.implicitKey = !1, !f && !this.comment && c instanceof x && (e.indentAtStart = w.length + 1), d = !1, !i && s >= 2 && !e.inFlow && !f && c instanceof ue && c.type !== p.Type.FLOW_SEQ && !c.tag && !m.anchors.getName(c) && (e.indent = e.indent.substr(2)); + let C = h(c, e, () => A = null, () => d = !0), L = " "; + return P || this.comment ? L = `${P} +${e.indent}` : !f && c instanceof Q ? (!(C[0] === "[" || C[0] === "{") || C.includes(` +`)) && (L = ` +${e.indent}`) : C[0] === ` +` && (L = ""), d && !A && r && r(), Re(w + L + C, e.indent, A); + } + }; + p._defineProperty(T, "Type", { + PAIR: "PAIR", + MERGE_PAIR: "MERGE_PAIR" + }); + var xt = (t, e) => { + if (t instanceof we) { + let n = e.get(t.source); + return n.count * n.aliasCount; + } else if (t instanceof Q) { + let n = 0; + for (let r of t.items) { + let s = xt(r, e); + s > n && (n = s); + } + return n; + } else if (t instanceof T) { + let n = xt(t.key, e), r = xt(t.value, e); + return Math.max(n, r); + } + return 1; + }, we = class t extends j { + static stringify({ range: e, source: n }, { anchors: r, doc: s, implicitKey: i, inStringifyKey: o }) { + let a = Object.keys(r).find((l) => r[l] === n); + if (!a && o && (a = s.anchors.getName(n) || s.anchors.newName()), a) return `*${a}${i ? " " : ""}`; + let c = s.anchors.getName(n) ? "Alias node must be after source node" : "Source node not found for alias node"; + throw new Error(`${c} [${e}]`); + } + constructor(e) { + super(), this.source = e, this.type = p.Type.ALIAS; + } + set tag(e) { + throw new Error("Alias nodes cannot have tags"); + } + toJSON(e, n) { + if (!n) return fe(this.source, e, n); + let { anchors: r, maxAliasCount: s } = n, i = r.get(this.source); + if (!i || i.res === void 0) { + let o = "This should not happen: Alias anchor was not resolved?"; + throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : /* @__PURE__ */ new ReferenceError(o); + } + if (s >= 0 && (i.count += 1, i.aliasCount === 0 && (i.aliasCount = xt(this.source, r)), i.count * i.aliasCount > s)) { + let o = "Excessive alias count indicates a resource exhaustion attack"; + throw this.cstNode ? new p.YAMLReferenceError(this.cstNode, o) : /* @__PURE__ */ new ReferenceError(o); + } + return i.res; + } + toString(e) { + return t.stringify(this, e); + } + }; + p._defineProperty(we, "default", !0); + function at(t, e) { + let n = e instanceof x ? e.value : e; + for (let r of t) if (r instanceof T && (r.key === e || r.key === n || r.key && r.key.value === n)) return r; + } + var ct = class extends Q { + add(e, n) { + e ? e instanceof T || (e = new T(e.key || e, e.value)) : e = new T(e); + let r = at(this.items, e.key), s = this.schema && this.schema.sortMapEntries; + if (r) if (n) r.value = e.value; + else throw new Error(`Key ${e.key} already set`); + else if (s) { + let i = this.items.findIndex((o) => s(e, o) < 0); + i === -1 ? this.items.push(e) : this.items.splice(i, 0, e); + } else this.items.push(e); + } + delete(e) { + let n = at(this.items, e); + return n ? this.items.splice(this.items.indexOf(n), 1).length > 0 : !1; + } + get(e, n) { + let r = at(this.items, e), s = r && r.value; + return !n && s instanceof x ? s.value : s; + } + has(e) { + return !!at(this.items, e); + } + set(e, n) { + this.add(new T(e, n), !0); + } + toJSON(e, n, r) { + let s = r ? new r() : n && n.mapAsMap ? /* @__PURE__ */ new Map() : {}; + n && n.onCreate && n.onCreate(s); + for (let i of this.items) i.addToJSMap(n, s); + return s; + } + toString(e, n, r) { + if (!e) return JSON.stringify(this); + for (let s of this.items) if (!(s instanceof T)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`); + return super.toString(e, { + blockItem: (s) => s.str, + flowChars: { + start: "{", + end: "}" + }, + isMap: !0, + itemIndent: e.indent || "" + }, n, r); + } + }, zr = "<<", $t = class extends T { + constructor(e) { + if (e instanceof T) { + let n = e.value; + n instanceof ue || (n = new ue(), n.items.push(e.value), n.range = e.value.range), super(e.key, n), this.range = e.range; + } else super(new x(zr), new ue()); + this.type = T.Type.MERGE_PAIR; + } + addToJSMap(e, n) { + for (let { source: r } of this.value.items) { + if (!(r instanceof ct)) throw new Error("Merge sources must be maps"); + let s = r.toJSON(null, e, Map); + for (let [i, o] of s) n instanceof Map ? n.has(i) || n.set(i, o) : n instanceof Set ? n.add(i) : Object.prototype.hasOwnProperty.call(n, i) || Object.defineProperty(n, i, { + value: o, + writable: !0, + enumerable: !0, + configurable: !0 + }); + } + return n; + } + toString(e, n) { + let r = this.value; + if (r.items.length > 1) return super.toString(e, n); + this.value = r.items[0]; + let s = super.toString(e, n); + return this.value = r, s; + } + }, Oo = { + defaultType: p.Type.BLOCK_LITERAL, + lineWidth: 76 + }, Ao = { + trueStr: "true", + falseStr: "false" + }, Lo = { asBigInt: !1 }, To = { nullStr: "null" }, be = { + defaultType: p.Type.PLAIN, + doubleQuoted: { + jsonEncoding: !1, + minMultiLineLength: 40 + }, + fold: { + lineWidth: 80, + minContentWidth: 20 + } + }; + function Rn(t, e, n) { + for (let { format: r, test: s, resolve: i } of e) if (s) { + let o = t.match(s); + if (o) { + let a = i.apply(null, o); + return a instanceof x || (a = new x(a)), r && (a.format = r), a; + } + } + return n && (t = n(t)), new x(t); + } + var Zr = "flow", xn = "block", Rt = "quoted", Hr = (t, e) => { + let n = t[e + 1]; + for (; n === " " || n === " ";) { + do + n = t[e += 1]; + while (n && n !== ` +`); + n = t[e + 1]; + } + return e; + }; + function Yt(t, e, n, { indentAtStart: r, lineWidth: s = 80, minContentWidth: i = 20, onFold: o, onOverflow: a }) { + if (!s || s < 0) return t; + let c = Math.max(1 + i, 1 + s - e.length); + if (t.length <= c) return t; + let l = [], f = {}, m = s - e.length; + typeof r == "number" && (r > s - Math.max(2, i) ? l.push(0) : m = s - r); + let g, y, h = !1, d = -1, w = -1, P = -1; + n === xn && (d = Hr(t, d), d !== -1 && (m = d + c)); + for (let C; C = t[d += 1];) { + if (n === Rt && C === "\\") { + switch (w = d, t[d + 1]) { + case "x": + d += 3; + break; + case "u": + d += 5; + break; + case "U": + d += 9; + break; + default: d += 1; + } + P = d; + } + if (C === ` +`) n === xn && (d = Hr(t, d)), m = d + c, g = void 0; + else { + if (C === " " && y && y !== " " && y !== ` +` && y !== " ") { + let L = t[d + 1]; + L && L !== " " && L !== ` +` && L !== " " && (g = d); + } + if (d >= m) if (g) l.push(g), m = g + c, g = void 0; + else if (n === Rt) { + for (; y === " " || y === " ";) y = C, C = t[d += 1], h = !0; + let L = d > P + 1 ? d - 2 : w - 1; + if (f[L]) return t; + l.push(L), f[L] = !0, m = L + c, g = void 0; + } else h = !0; + } + y = C; + } + if (h && a && a(), l.length === 0) return t; + o && o(); + let A = t.slice(0, l[0]); + for (let C = 0; C < l.length; ++C) { + let L = l[C], R = l[C + 1] || t.length; + L === 0 ? A = ` +${e}${t.slice(0, R)}` : (n === Rt && f[L] && (A += `${t[L]}\\`), A += ` +${e}${t.slice(L + 1, R)}`); + } + return A; + } + var Dn = ({ indentAtStart: t }) => t ? Object.assign({ indentAtStart: t }, be.fold) : be.fold, Bt = (t) => /^(%|---|\.\.\.)/m.test(t); + function Co(t, e, n) { + if (!e || e < 0) return !1; + let r = e - n, s = t.length; + if (s <= r) return !1; + for (let i = 0, o = 0; i < s; ++i) if (t[i] === ` +`) { + if (i - o > r) return !0; + if (o = i + 1, s - o <= r) return !1; + } + return !0; + } + function Se(t, e) { + let { implicitKey: n } = e, { jsonEncoding: r, minMultiLineLength: s } = be.doubleQuoted, i = JSON.stringify(t); + if (r) return i; + let o = e.indent || (Bt(t) ? " " : ""), a = "", c = 0; + for (let l = 0, f = i[l]; f; f = i[++l]) if (f === " " && i[l + 1] === "\\" && i[l + 2] === "n" && (a += i.slice(c, l) + "\\ ", l += 1, c = l, f = "\\"), f === "\\") switch (i[l + 1]) { + case "u": + { + a += i.slice(c, l); + let m = i.substr(l + 2, 4); + switch (m) { + case "0000": + a += "\\0"; + break; + case "0007": + a += "\\a"; + break; + case "000b": + a += "\\v"; + break; + case "001b": + a += "\\e"; + break; + case "0085": + a += "\\N"; + break; + case "00a0": + a += "\\_"; + break; + case "2028": + a += "\\L"; + break; + case "2029": + a += "\\P"; + break; + default: m.substr(0, 2) === "00" ? a += "\\x" + m.substr(2) : a += i.substr(l, 6); + } + l += 5, c = l + 1; + } + break; + case "n": + if (n || i[l + 2] === "\"" || i.length < s) l += 1; + else { + for (a += i.slice(c, l) + ` + +`; i[l + 2] === "\\" && i[l + 3] === "n" && i[l + 4] !== "\"";) a += ` +`, l += 2; + a += o, i[l + 2] === " " && (a += "\\"), l += 1, c = l + 1; + } + break; + default: l += 1; + } + return a = c ? a + i.slice(c) : i, n ? a : Yt(a, o, Rt, Dn(e)); + } + function es(t, e) { + if (e.implicitKey) { + if (/\n/.test(t)) return Se(t, e); + } else if (/[ \t]\n|\n[ \t]/.test(t)) return Se(t, e); + let n = e.indent || (Bt(t) ? " " : ""), r = "'" + t.replace(/'/g, "''").replace(/\n+/g, `$& +${n}`) + "'"; + return e.implicitKey ? r : Yt(r, n, Zr, Dn(e)); + } + function Dt({ comment: t, type: e, value: n }, r, s, i) { + if (/\n[\t ]+$/.test(n) || /^\s*$/.test(n)) return Se(n, r); + let o = r.indent || (r.forceBlockIndent || Bt(n) ? " " : ""), a = o ? "2" : "1", c = e === p.Type.BLOCK_FOLDED ? !1 : e === p.Type.BLOCK_LITERAL ? !0 : !Co(n, be.fold.lineWidth, o.length), l = c ? "|" : ">"; + if (!n) return l + ` +`; + let f = "", m = ""; + if (n = n.replace(/[\n\t ]*$/, (y) => { + let h = y.indexOf(` +`); + return h === -1 ? l += "-" : (n === y || h !== y.length - 1) && (l += "+", i && i()), m = y.replace(/\n$/, ""), ""; + }).replace(/^[\n ]*/, (y) => { + y.indexOf(" ") !== -1 && (l += a); + let h = y.match(/ +$/); + return h ? (f = y.slice(0, -h[0].length), h[0]) : (f = y, ""); + }), m && (m = m.replace(/\n+(?!\n|$)/g, `$&${o}`)), f && (f = f.replace(/\n+/g, `$&${o}`)), t && (l += " #" + t.replace(/ ?[\r\n]+/g, " "), s && s()), !n) return `${l}${a} +${o}${m}`; + if (c) return n = n.replace(/\n+/g, `$&${o}`), `${l} +${o}${f}${n}${m}`; + n = n.replace(/\n+/g, ` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${o}`); + let g = Yt(`${f}${n}${m}`, o, xn, be.fold); + return `${l} +${o}${g}`; + } + function Mo(t, e, n, r) { + let { comment: s, type: i, value: o } = t, { actualString: a, implicitKey: c, indent: l, inFlow: f } = e; + if (c && /[\n[\]{},]/.test(o) || f && /[[\]{},]/.test(o)) return Se(o, e); + if (!o || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o)) return c || f || o.indexOf(` +`) === -1 ? o.indexOf("\"") !== -1 && o.indexOf("'") === -1 ? es(o, e) : Se(o, e) : Dt(t, e, n, r); + if (!c && !f && i !== p.Type.PLAIN && o.indexOf(` +`) !== -1) return Dt(t, e, n, r); + if (l === "" && Bt(o)) return e.forceBlockIndent = !0, Dt(t, e, n, r); + let m = o.replace(/\n+/g, `$& +${l}`); + if (a) { + let { tags: y } = e.doc.schema; + if (typeof Rn(m, y, y.scalarFallback).value != "string") return Se(o, e); + } + let g = c ? m : Yt(m, l, Zr, Dn(e)); + return s && !f && (g.indexOf(` +`) !== -1 || s.indexOf(` +`) !== -1) ? (n && n(), bo(g, l, s)) : g; + } + function ko(t, e, n, r) { + let { defaultType: s } = be, { implicitKey: i, inFlow: o } = e, { type: a, value: c } = t; + typeof c != "string" && (c = String(c), t = Object.assign({}, t, { value: c })); + let l = (m) => { + switch (m) { + case p.Type.BLOCK_FOLDED: + case p.Type.BLOCK_LITERAL: return Dt(t, e, n, r); + case p.Type.QUOTE_DOUBLE: return Se(c, e); + case p.Type.QUOTE_SINGLE: return es(c, e); + case p.Type.PLAIN: return Mo(t, e, n, r); + default: return null; + } + }; + (a !== p.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c) || (i || o) && (a === p.Type.BLOCK_FOLDED || a === p.Type.BLOCK_LITERAL)) && (a = p.Type.QUOTE_DOUBLE); + let f = l(a); + if (f === null && (f = l(s), f === null)) throw new Error(`Unsupported default string type ${s}`); + return f; + } + function Po({ format: t, minFractionDigits: e, tag: n, value: r }) { + if (typeof r == "bigint") return String(r); + if (!isFinite(r)) return isNaN(r) ? ".nan" : r < 0 ? "-.inf" : ".inf"; + let s = JSON.stringify(r); + if (!t && e && (!n || n === "tag:yaml.org,2002:float") && /^\d/.test(s)) { + let i = s.indexOf("."); + i < 0 && (i = s.length, s += "."); + let o = e - (s.length - i - 1); + for (; o-- > 0;) s += "0"; + } + return s; + } + function ts(t, e) { + let n, r; + switch (e.type) { + case p.Type.FLOW_MAP: + n = "}", r = "flow map"; + break; + case p.Type.FLOW_SEQ: + n = "]", r = "flow sequence"; + break; + default: + t.push(new p.YAMLSemanticError(e, "Not a flow collection!?")); + return; + } + let s; + for (let i = e.items.length - 1; i >= 0; --i) { + let o = e.items[i]; + if (!o || o.type !== p.Type.COMMENT) { + s = o; + break; + } + } + if (s && s.char !== n) { + let i = `Expected ${r} to end with ${n}`, o; + typeof s.offset == "number" ? (o = new p.YAMLSemanticError(e, i), o.offset = s.offset + 1) : (o = new p.YAMLSemanticError(s, i), s.range && s.range.end && (o.offset = s.range.end - s.range.start)), t.push(o); + } + } + function ns(t, e) { + let n = e.context.src[e.range.start - 1]; + if (n !== ` +` && n !== " " && n !== " ") t.push(new p.YAMLSemanticError(e, "Comments must be separated from other tokens by white space characters")); + } + function rs(t, e) { + let n = String(e), r = n.substr(0, 8) + "..." + n.substr(-8); + return new p.YAMLSemanticError(t, `The "${r}" key is too long`); + } + function ss(t, e) { + for (let { afterKey: n, before: r, comment: s } of e) { + let i = t.items[r]; + i ? (n && i.value && (i = i.value), s === void 0 ? (n || !i.commentBefore) && (i.spaceBefore = !0) : i.commentBefore ? i.commentBefore += ` +` + s : i.commentBefore = s) : s !== void 0 && (t.comment ? t.comment += ` +` + s : t.comment = s); + } + } + function $n(t, e) { + let n = e.strValue; + return n ? typeof n == "string" ? n : (n.errors.forEach((r) => { + r.source || (r.source = e), t.errors.push(r); + }), n.str) : ""; + } + function vo(t, e) { + let { handle: n, suffix: r } = e.tag, s = t.tagPrefixes.find((i) => i.handle === n); + if (!s) { + let i = t.getDefaults().tagPrefixes; + if (i && (s = i.find((o) => o.handle === n)), !s) throw new p.YAMLSemanticError(e, `The ${n} tag handle is non-default and was not declared.`); + } + if (!r) throw new p.YAMLSemanticError(e, `The ${n} tag has no suffix.`); + if (n === "!" && (t.version || t.options.version) === "1.0") { + if (r[0] === "^") return t.warnings.push(new p.YAMLWarning(e, "YAML 1.0 ^ tag expansion is not supported")), r; + if (/[:/]/.test(r)) { + let i = r.match(/^([a-z0-9-]+)\/(.*)/i); + return i ? `tag:${i[1]}.yaml.org,2002:${i[2]}` : `tag:${r}`; + } + } + return s.prefix + decodeURIComponent(r); + } + function Io(t, e) { + let { tag: n, type: r } = e, s = !1; + if (n) { + let { handle: i, suffix: o, verbatim: a } = n; + if (a) { + if (a !== "!" && a !== "!!") return a; + let c = `Verbatim tags aren't resolved, so ${a} is invalid.`; + t.errors.push(new p.YAMLSemanticError(e, c)); + } else if (i === "!" && !o) s = !0; + else try { + return vo(t, e); + } catch (c) { + t.errors.push(c); + } + } + switch (r) { + case p.Type.BLOCK_FOLDED: + case p.Type.BLOCK_LITERAL: + case p.Type.QUOTE_DOUBLE: + case p.Type.QUOTE_SINGLE: return p.defaultTags.STR; + case p.Type.FLOW_MAP: + case p.Type.MAP: return p.defaultTags.MAP; + case p.Type.FLOW_SEQ: + case p.Type.SEQ: return p.defaultTags.SEQ; + case p.Type.PLAIN: return s ? p.defaultTags.STR : null; + default: return null; + } + } + function Jr(t, e, n) { + let { tags: r } = t.schema, s = []; + for (let o of r) if (o.tag === n) if (o.test) s.push(o); + else { + let a = o.resolve(t, e); + return a instanceof Q ? a : new x(a); + } + let i = $n(t, e); + return typeof i == "string" && s.length > 0 ? Rn(i, s, r.scalarFallback) : null; + } + function _o({ type: t }) { + switch (t) { + case p.Type.FLOW_MAP: + case p.Type.MAP: return p.defaultTags.MAP; + case p.Type.FLOW_SEQ: + case p.Type.SEQ: return p.defaultTags.SEQ; + default: return p.defaultTags.STR; + } + } + function xo(t, e, n) { + try { + let r = Jr(t, e, n); + if (r) return n && e.tag && (r.tag = n), r; + } catch (r) { + return r.source || (r.source = e), t.errors.push(r), null; + } + try { + let r = _o(e); + if (!r) throw new Error(`The tag ${n} is unavailable`); + let s = `The tag ${n} is unavailable, falling back to ${r}`; + t.warnings.push(new p.YAMLWarning(e, s)); + let i = Jr(t, e, r); + return i.tag = n, i; + } catch (r) { + let s = new p.YAMLReferenceError(e, r.message); + return s.stack = r.stack, t.errors.push(s), null; + } + } + var Ro = (t) => { + if (!t) return !1; + let { type: e } = t; + return e === p.Type.MAP_KEY || e === p.Type.MAP_VALUE || e === p.Type.SEQ_ITEM; + }; + function Do(t, e) { + let n = { + before: [], + after: [] + }, r = !1, s = !1, i = Ro(e.context.parent) ? e.context.parent.props.concat(e.props) : e.props; + for (let { start: o, end: a } of i) switch (e.context.src[o]) { + case p.Char.COMMENT: { + if (!e.commentHasRequiredWhitespace(o)) t.push(new p.YAMLSemanticError(e, "Comments must be separated from other tokens by white space characters")); + let { header: c, valueRange: l } = e; + (l && (o > l.start || c && o > c.start) ? n.after : n.before).push(e.context.src.slice(o + 1, a)); + break; + } + case p.Char.ANCHOR: + if (r) t.push(new p.YAMLSemanticError(e, "A node can have at most one anchor")); + r = !0; + break; + case p.Char.TAG: + if (s) t.push(new p.YAMLSemanticError(e, "A node can have at most one tag")); + s = !0; + break; + } + return { + comments: n, + hasAnchor: r, + hasTag: s + }; + } + function $o(t, e) { + let { anchors: n, errors: r, schema: s } = t; + if (e.type === p.Type.ALIAS) { + let o = e.rawValue, a = n.getNode(o); + if (!a) { + let l = `Aliased anchor not found: ${o}`; + return r.push(new p.YAMLReferenceError(e, l)), null; + } + let c = new we(a); + return n._cstAliases.push(c), c; + } + let i = Io(t, e); + if (i) return xo(t, e, i); + if (e.type !== p.Type.PLAIN) { + let o = `Failed to resolve ${e.type} node here`; + return r.push(new p.YAMLSyntaxError(e, o)), null; + } + try { + return Rn($n(t, e), s.tags, s.tags.scalarFallback); + } catch (o) { + return o.source || (o.source = e), r.push(o), null; + } + } + function pe(t, e) { + if (!e) return null; + e.error && t.errors.push(e.error); + let { comments: n, hasAnchor: r, hasTag: s } = Do(t.errors, e); + if (r) { + let { anchors: o } = t, a = e.anchor, c = o.getNode(a); + c && (o.map[o.newName(a)] = c), o.map[a] = e; + } + if (e.type === p.Type.ALIAS && (r || s)) t.errors.push(new p.YAMLSemanticError(e, "An alias node must not specify any properties")); + let i = $o(t, e); + if (i) { + i.range = [e.range.start, e.range.end], t.options.keepCstNodes && (i.cstNode = e), t.options.keepNodeTypes && (i.type = e.type); + let o = n.before.join(` +`); + o && (i.commentBefore = i.commentBefore ? `${i.commentBefore} +${o}` : o); + let a = n.after.join(` +`); + a && (i.comment = i.comment ? `${i.comment} +${a}` : a); + } + return e.resolved = i; + } + function Yo(t, e) { + if (e.type !== p.Type.MAP && e.type !== p.Type.FLOW_MAP) { + let o = `A ${e.type} node cannot be resolved as a mapping`; + return t.errors.push(new p.YAMLSyntaxError(e, o)), null; + } + let { comments: n, items: r } = e.type === p.Type.FLOW_MAP ? Uo(t, e) : qo(t, e), s = new ct(); + s.items = r, ss(s, n); + let i = !1; + for (let o = 0; o < r.length; ++o) { + let { key: a } = r[o]; + if (a instanceof Q && (i = !0), t.schema.merge && a && a.value === zr) { + r[o] = new $t(r[o]); + let c = r[o].value.items, l = null; + c.some((f) => { + if (f instanceof we) { + let { type: m } = f.source; + return m === p.Type.MAP || m === p.Type.FLOW_MAP ? !1 : l = "Merge nodes aliases can only point to maps"; + } + return l = "Merge nodes can only have Alias nodes as values"; + }), l && t.errors.push(new p.YAMLSemanticError(e, l)); + } else for (let c = o + 1; c < r.length; ++c) { + let { key: l } = r[c]; + if (a === l || a && l && Object.prototype.hasOwnProperty.call(a, "value") && a.value === l.value) { + let f = `Map keys must be unique; "${a}" is repeated`; + t.errors.push(new p.YAMLSemanticError(e, f)); + break; + } + } + } + if (i && !t.options.mapAsMap) t.warnings.push(new p.YAMLWarning(e, "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")); + return e.resolved = s, s; + } + var Bo = ({ context: { lineStart: t, node: e, src: n }, props: r }) => { + if (r.length === 0) return !1; + let { start: s } = r[0]; + if (e && s > e.valueRange.start || n[s] !== p.Char.COMMENT) return !1; + for (let i = t; i < s; ++i) if (n[i] === ` +`) return !1; + return !0; + }; + function Fo(t, e) { + if (!Bo(t)) return; + let n = t.getPropValue(0, p.Char.COMMENT, !0), r = !1, s = e.value.commentBefore; + if (s && s.startsWith(n)) e.value.commentBefore = s.substr(n.length + 1), r = !0; + else { + let i = e.value.comment; + !t.node && i && i.startsWith(n) && (e.value.comment = i.substr(n.length + 1), r = !0); + } + r && (e.comment = n); + } + function qo(t, e) { + let n = [], r = [], s, i = null; + for (let o = 0; o < e.items.length; ++o) { + let a = e.items[o]; + switch (a.type) { + case p.Type.BLANK_LINE: + n.push({ + afterKey: !!s, + before: r.length + }); + break; + case p.Type.COMMENT: + n.push({ + afterKey: !!s, + before: r.length, + comment: a.comment + }); + break; + case p.Type.MAP_KEY: + s !== void 0 && r.push(new T(s)), a.error && t.errors.push(a.error), s = pe(t, a.node), i = null; + break; + case p.Type.MAP_VALUE: + { + if (s === void 0 && (s = null), a.error && t.errors.push(a.error), !a.context.atLineStart && a.node && a.node.type === p.Type.MAP && !a.node.context.atLineStart) t.errors.push(new p.YAMLSemanticError(a.node, "Nested mappings are not allowed in compact mappings")); + let c = a.node; + if (!c && a.props.length > 0) { + c = new p.PlainValue(p.Type.PLAIN, []), c.context = { + parent: a, + src: a.context.src + }; + let f = a.range.start + 1; + if (c.range = { + start: f, + end: f + }, c.valueRange = { + start: f, + end: f + }, typeof a.range.origStart == "number") { + let m = a.range.origStart + 1; + c.range.origStart = c.range.origEnd = m, c.valueRange.origStart = c.valueRange.origEnd = m; + } + } + let l = new T(s, pe(t, c)); + Fo(a, l), r.push(l), s && typeof i == "number" && a.range.start > i + 1024 && t.errors.push(rs(e, s)), s = void 0, i = null; + } + break; + default: + s !== void 0 && r.push(new T(s)), s = pe(t, a), i = a.range.start, a.error && t.errors.push(a.error); + e: for (let c = o + 1;; ++c) { + let l = e.items[c]; + switch (l && l.type) { + case p.Type.BLANK_LINE: + case p.Type.COMMENT: continue e; + case p.Type.MAP_VALUE: break e; + default: + t.errors.push(new p.YAMLSemanticError(a, "Implicit map keys need to be followed by map values")); + break e; + } + } + if (a.valueRangeContainsNewline) t.errors.push(new p.YAMLSemanticError(a, "Implicit map keys need to be on a single line")); + } + } + return s !== void 0 && r.push(new T(s)), { + comments: n, + items: r + }; + } + function Uo(t, e) { + let n = [], r = [], s, i = !1, o = "{"; + for (let a = 0; a < e.items.length; ++a) { + let c = e.items[a]; + if (typeof c.char == "string") { + let { char: l, offset: f } = c; + if (l === "?" && s === void 0 && !i) { + i = !0, o = ":"; + continue; + } + if (l === ":") { + if (s === void 0 && (s = null), o === ":") { + o = ","; + continue; + } + } else if (i && (s === void 0 && l !== "," && (s = null), i = !1), s !== void 0 && (r.push(new T(s)), s = void 0, l === ",")) { + o = ":"; + continue; + } + if (l === "}") { + if (a === e.items.length - 1) continue; + } else if (l === o) { + o = ":"; + continue; + } + let m = `Flow map contains an unexpected ${l}`, g = new p.YAMLSyntaxError(e, m); + g.offset = f, t.errors.push(g); + } else c.type === p.Type.BLANK_LINE ? n.push({ + afterKey: !!s, + before: r.length + }) : c.type === p.Type.COMMENT ? (ns(t.errors, c), n.push({ + afterKey: !!s, + before: r.length, + comment: c.comment + })) : s === void 0 ? (o === "," && t.errors.push(new p.YAMLSemanticError(c, "Separator , missing in flow map")), s = pe(t, c)) : (o !== "," && t.errors.push(new p.YAMLSemanticError(c, "Indicator : missing in flow map entry")), r.push(new T(s, pe(t, c))), s = void 0, i = !1); + } + return ts(t.errors, e), s !== void 0 && r.push(new T(s)), { + comments: n, + items: r + }; + } + function Vo(t, e) { + if (e.type !== p.Type.SEQ && e.type !== p.Type.FLOW_SEQ) { + let i = `A ${e.type} node cannot be resolved as a sequence`; + return t.errors.push(new p.YAMLSyntaxError(e, i)), null; + } + let { comments: n, items: r } = e.type === p.Type.FLOW_SEQ ? Ko(t, e) : Wo(t, e), s = new ue(); + if (s.items = r, ss(s, n), !t.options.mapAsMap && r.some((i) => i instanceof T && i.key instanceof Q)) t.warnings.push(new p.YAMLWarning(e, "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.")); + return e.resolved = s, s; + } + function Wo(t, e) { + let n = [], r = []; + for (let s = 0; s < e.items.length; ++s) { + let i = e.items[s]; + switch (i.type) { + case p.Type.BLANK_LINE: + n.push({ before: r.length }); + break; + case p.Type.COMMENT: + n.push({ + comment: i.comment, + before: r.length + }); + break; + case p.Type.SEQ_ITEM: + if (i.error && t.errors.push(i.error), r.push(pe(t, i.node)), i.hasProps) t.errors.push(new p.YAMLSemanticError(i, "Sequence items cannot have tags or anchors before the - indicator")); + break; + default: i.error && t.errors.push(i.error), t.errors.push(new p.YAMLSyntaxError(i, `Unexpected ${i.type} node in sequence`)); + } + } + return { + comments: n, + items: r + }; + } + function Ko(t, e) { + let n = [], r = [], s = !1, i, o = null, a = "[", c = null; + for (let l = 0; l < e.items.length; ++l) { + let f = e.items[l]; + if (typeof f.char == "string") { + let { char: m, offset: g } = f; + if (m !== ":" && (s || i !== void 0) && (s && i === void 0 && (i = a ? r.pop() : null), r.push(new T(i)), s = !1, i = void 0, o = null), m === a) a = null; + else if (!a && m === "?") s = !0; + else if (a !== "[" && m === ":" && i === void 0) { + if (a === ",") { + if (i = r.pop(), i instanceof T) { + let h = new p.YAMLSemanticError(e, "Chaining flow sequence pairs is invalid"); + h.offset = g, t.errors.push(h); + } + if (!s && typeof o == "number") { + let y = f.range ? f.range.start : f.offset; + y > o + 1024 && t.errors.push(rs(e, i)); + let { src: h } = c.context; + for (let d = o; d < y; ++d) if (h[d] === ` +`) { + t.errors.push(new p.YAMLSemanticError(c, "Implicit keys of flow sequence pairs need to be on a single line")); + break; + } + } + } else i = null; + o = null, s = !1, a = null; + } else if (a === "[" || m !== "]" || l < e.items.length - 1) { + let y = `Flow sequence contains an unexpected ${m}`, h = new p.YAMLSyntaxError(e, y); + h.offset = g, t.errors.push(h); + } + } else if (f.type === p.Type.BLANK_LINE) n.push({ before: r.length }); + else if (f.type === p.Type.COMMENT) ns(t.errors, f), n.push({ + comment: f.comment, + before: r.length + }); + else { + if (a) { + let g = `Expected a ${a} in flow sequence`; + t.errors.push(new p.YAMLSemanticError(f, g)); + } + let m = pe(t, f); + i === void 0 ? (r.push(m), c = f) : (r.push(new T(i, m)), i = void 0), o = f.range.start, a = ","; + } + } + return ts(t.errors, e), i !== void 0 && r.push(new T(i)), { + comments: n, + items: r + }; + } + M.Alias = we; + M.Collection = Q; + M.Merge = $t; + M.Node = j; + M.Pair = T; + M.Scalar = x; + M.YAMLMap = ct; + M.YAMLSeq = ue; + M.addComment = Re; + M.binaryOptions = Oo; + M.boolOptions = Ao; + M.findPair = at; + M.intOptions = Lo; + M.isEmptyPath = Xr; + M.nullOptions = To; + M.resolveMap = Yo; + M.resolveNode = pe; + M.resolveSeq = Vo; + M.resolveString = $n; + M.strOptions = be; + M.stringifyNumber = Po; + M.stringifyString = ko; + M.toJSON = fe; + }); + qn = ne((ee) => { + "use strict"; + var G = ce(), O = De(), jo = { + identify: (t) => t instanceof Uint8Array, + default: !1, + tag: "tag:yaml.org,2002:binary", + resolve: (t, e) => { + let n = O.resolveString(t, e); + if (typeof Buffer == "function") return Buffer.from(n, "base64"); + if (typeof atob == "function") { + let r = atob(n.replace(/[\n\r]/g, "")), s = new Uint8Array(r.length); + for (let i = 0; i < r.length; ++i) s[i] = r.charCodeAt(i); + return s; + } else return t.errors.push(new G.YAMLReferenceError(e, "This environment does not support reading binary tags; either Buffer or atob is required")), null; + }, + options: O.binaryOptions, + stringify: ({ comment: t, type: e, value: n }, r, s, i) => { + let o; + if (typeof Buffer == "function") o = n instanceof Buffer ? n.toString("base64") : Buffer.from(n.buffer).toString("base64"); + else if (typeof btoa == "function") { + let a = ""; + for (let c = 0; c < n.length; ++c) a += String.fromCharCode(n[c]); + o = btoa(a); + } else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + if (e || (e = O.binaryOptions.defaultType), e === G.Type.QUOTE_DOUBLE) n = o; + else { + let { lineWidth: a } = O.binaryOptions, c = Math.ceil(o.length / a), l = new Array(c); + for (let f = 0, m = 0; f < c; ++f, m += a) l[f] = o.substr(m, a); + n = l.join(e === G.Type.BLOCK_LITERAL ? ` +` : " "); + } + return O.stringifyString({ + comment: t, + type: e, + value: n + }, r, s, i); + } + }; + function os(t, e) { + let n = O.resolveSeq(t, e); + for (let r = 0; r < n.items.length; ++r) { + let s = n.items[r]; + if (!(s instanceof O.Pair)) { + if (s instanceof O.YAMLMap) { + if (s.items.length > 1) throw new G.YAMLSemanticError(e, "Each pair must have its own sequence indicator"); + let i = s.items[0] || new O.Pair(); + s.commentBefore && (i.commentBefore = i.commentBefore ? `${s.commentBefore} +${i.commentBefore}` : s.commentBefore), s.comment && (i.comment = i.comment ? `${s.comment} +${i.comment}` : s.comment), s = i; + } + n.items[r] = s instanceof O.Pair ? s : new O.Pair(s); + } + } + return n; + } + function as(t, e, n) { + let r = new O.YAMLSeq(t); + r.tag = "tag:yaml.org,2002:pairs"; + for (let s of e) { + let i, o; + if (Array.isArray(s)) if (s.length === 2) i = s[0], o = s[1]; + else throw new TypeError(`Expected [key, value] tuple: ${s}`); + else if (s && s instanceof Object) { + let c = Object.keys(s); + if (c.length === 1) i = c[0], o = s[i]; + else throw new TypeError(`Expected { key: value } tuple: ${s}`); + } else i = s; + let a = t.createPair(i, o, n); + r.items.push(a); + } + return r; + } + var Qo = { + default: !1, + tag: "tag:yaml.org,2002:pairs", + resolve: os, + createNode: as + }, $e = class t extends O.YAMLSeq { + constructor() { + super(), G._defineProperty(this, "add", O.YAMLMap.prototype.add.bind(this)), G._defineProperty(this, "delete", O.YAMLMap.prototype.delete.bind(this)), G._defineProperty(this, "get", O.YAMLMap.prototype.get.bind(this)), G._defineProperty(this, "has", O.YAMLMap.prototype.has.bind(this)), G._defineProperty(this, "set", O.YAMLMap.prototype.set.bind(this)), this.tag = t.tag; + } + toJSON(e, n) { + let r = /* @__PURE__ */ new Map(); + n && n.onCreate && n.onCreate(r); + for (let s of this.items) { + let i, o; + if (s instanceof O.Pair ? (i = O.toJSON(s.key, "", n), o = O.toJSON(s.value, i, n)) : i = O.toJSON(s, "", n), r.has(i)) throw new Error("Ordered maps must not include duplicate keys"); + r.set(i, o); + } + return r; + } + }; + G._defineProperty($e, "tag", "tag:yaml.org,2002:omap"); + function Go(t, e) { + let n = os(t, e), r = []; + for (let { key: s } of n.items) if (s instanceof O.Scalar) if (r.includes(s.value)) throw new G.YAMLSemanticError(e, "Ordered maps must not include duplicate keys"); + else r.push(s.value); + return Object.assign(new $e(), n); + } + function Ho(t, e, n) { + let r = as(t, e, n), s = new $e(); + return s.items = r.items, s; + } + var Jo = { + identify: (t) => t instanceof Map, + nodeClass: $e, + default: !1, + tag: "tag:yaml.org,2002:omap", + resolve: Go, + createNode: Ho + }, Ye = class t extends O.YAMLMap { + constructor() { + super(), this.tag = t.tag; + } + add(e) { + let n = e instanceof O.Pair ? e : new O.Pair(e); + O.findPair(this.items, n.key) || this.items.push(n); + } + get(e, n) { + let r = O.findPair(this.items, e); + return !n && r instanceof O.Pair ? r.key instanceof O.Scalar ? r.key.value : r.key : r; + } + set(e, n) { + if (typeof n != "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`); + let r = O.findPair(this.items, e); + r && !n ? this.items.splice(this.items.indexOf(r), 1) : !r && n && this.items.push(new O.Pair(e)); + } + toJSON(e, n) { + return super.toJSON(e, n, Set); + } + toString(e, n, r) { + if (!e) return JSON.stringify(this); + if (this.hasAllNullValues()) return super.toString(e, n, r); + throw new Error("Set items must all have null values"); + } + }; + G._defineProperty(Ye, "tag", "tag:yaml.org,2002:set"); + function Xo(t, e) { + let n = O.resolveMap(t, e); + if (!n.hasAllNullValues()) throw new G.YAMLSemanticError(e, "Set items must all have null values"); + return Object.assign(new Ye(), n); + } + function zo(t, e, n) { + let r = new Ye(); + for (let s of e) r.items.push(t.createPair(s, null, n)); + return r; + } + var Zo = { + identify: (t) => t instanceof Set, + nodeClass: Ye, + default: !1, + tag: "tag:yaml.org,2002:set", + resolve: Xo, + createNode: zo + }, Yn = (t, e) => { + let n = e.split(":").reduce((r, s) => r * 60 + Number(s), 0); + return t === "-" ? -n : n; + }, cs = ({ value: t }) => { + if (isNaN(t) || !isFinite(t)) return O.stringifyNumber(t); + let e = ""; + t < 0 && (e = "-", t = Math.abs(t)); + let n = [t % 60]; + return t < 60 ? n.unshift(0) : (t = Math.round((t - n[0]) / 60), n.unshift(t % 60), t >= 60 && (t = Math.round((t - n[0]) / 60), n.unshift(t))), e + n.map((r) => r < 10 ? "0" + String(r) : String(r)).join(":").replace(/000000\d*$/, ""); + }, ea = { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, + resolve: (t, e, n) => Yn(e, n.replace(/_/g, "")), + stringify: cs + }, ta = { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, + resolve: (t, e, n) => Yn(e, n.replace(/_/g, "")), + stringify: cs + }, na = { + identify: (t) => t instanceof Date, + default: !0, + tag: "tag:yaml.org,2002:timestamp", + test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), + resolve: (t, e, n, r, s, i, o, a, c) => { + a && (a = (a + "00").substr(1, 3)); + let l = Date.UTC(e, n - 1, r, s || 0, i || 0, o || 0, a || 0); + if (c && c !== "Z") { + let f = Yn(c[0], c.slice(1)); + Math.abs(f) < 30 && (f *= 60), l -= 6e4 * f; + } + return new Date(l); + }, + stringify: ({ value: t }) => t.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + function Bn(t) { + let e = {}; + return t ? typeof YAML_SILENCE_DEPRECATION_WARNINGS < "u" ? !YAML_SILENCE_DEPRECATION_WARNINGS : !e.YAML_SILENCE_DEPRECATION_WARNINGS : typeof YAML_SILENCE_WARNINGS < "u" ? !YAML_SILENCE_WARNINGS : !e.YAML_SILENCE_WARNINGS; + } + function Fn(t, e) { + Bn(!1) && console.warn(e ? `${e}: ${t}` : t); + } + function ra(t) { + if (Bn(!0)) Fn(`The endpoint 'yaml/${t.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/")}' will be removed in a future release.`, "DeprecationWarning"); + } + var is = {}; + function sa(t, e) { + if (!is[t] && Bn(!0)) { + is[t] = !0; + let n = `The option '${t}' will be removed in a future release`; + n += e ? `, use '${e}' instead.` : ".", Fn(n, "DeprecationWarning"); + } + } + ee.binary = jo; + ee.floatTime = ta; + ee.intTime = ea; + ee.omap = Jo; + ee.pairs = Qo; + ee.set = Zo; + ee.timestamp = na; + ee.warn = Fn; + ee.warnFileDeprecation = ra; + ee.warnOptionDeprecation = sa; + }); + Kn = ne((bs) => { + "use strict"; + var Ut = ce(), E = De(), $ = qn(); + function ia(t, e, n) { + let r = new E.YAMLMap(t); + if (e instanceof Map) for (let [s, i] of e) r.items.push(t.createPair(s, i, n)); + else if (e && typeof e == "object") for (let s of Object.keys(e)) r.items.push(t.createPair(s, e[s], n)); + return typeof t.sortMapEntries == "function" && r.items.sort(t.sortMapEntries), r; + } + var ft = { + createNode: ia, + default: !0, + nodeClass: E.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve: E.resolveMap + }; + function oa(t, e, n) { + let r = new E.YAMLSeq(t); + if (e && e[Symbol.iterator]) for (let s of e) { + let i = t.createNode(s, n.wrapScalars, null, n); + r.items.push(i); + } + return r; + } + var Vt = { + createNode: oa, + default: !0, + nodeClass: E.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve: E.resolveSeq + }, Vn = [ + ft, + Vt, + { + identify: (t) => typeof t == "string", + default: !0, + tag: "tag:yaml.org,2002:str", + resolve: E.resolveString, + stringify(t, e, n, r) { + return e = Object.assign({ actualString: !0 }, e), E.stringifyString(t, e, n, r); + }, + options: E.strOptions + } + ], Wt = (t) => typeof t == "bigint" || Number.isInteger(t), Wn = (t, e, n) => E.intOptions.asBigInt ? BigInt(t) : parseInt(e, n); + function us(t, e, n) { + let { value: r } = t; + return Wt(r) && r >= 0 ? n + r.toString(e) : E.stringifyNumber(t); + } + var ps = { + identify: (t) => t == null, + createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, + default: !0, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: E.nullOptions, + stringify: () => E.nullOptions.nullStr + }, ms = { + identify: (t) => typeof t == "boolean", + default: !0, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (t) => t[0] === "t" || t[0] === "T", + options: E.boolOptions, + stringify: ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr + }, hs = { + identify: (t) => Wt(t) && t >= 0, + default: !0, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o([0-7]+)$/, + resolve: (t, e) => Wn(t, e, 8), + options: E.intOptions, + stringify: (t) => us(t, 8, "0o") + }, ds = { + identify: Wt, + default: !0, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (t) => Wn(t, t, 10), + options: E.intOptions, + stringify: E.stringifyNumber + }, gs = { + identify: (t) => Wt(t) && t >= 0, + default: !0, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x([0-9a-fA-F]+)$/, + resolve: (t, e) => Wn(t, e, 16), + options: E.intOptions, + stringify: (t) => us(t, 16, "0x") + }, ys = { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: E.stringifyNumber + }, Es = { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (t) => parseFloat(t), + stringify: ({ value: t }) => Number(t).toExponential() + }, Ss = { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, + resolve(t, e, n) { + let r = e || n, s = new E.Scalar(parseFloat(t)); + return r && r[r.length - 1] === "0" && (s.minFractionDigits = r.length), s; + }, + stringify: E.stringifyNumber + }, ca = Vn.concat([ + ps, + ms, + hs, + ds, + gs, + ys, + Es, + Ss + ]), ls = (t) => typeof t == "bigint" || Number.isInteger(t), Ft = ({ value: t }) => JSON.stringify(t), ws = [ + ft, + Vt, + { + identify: (t) => typeof t == "string", + default: !0, + tag: "tag:yaml.org,2002:str", + resolve: E.resolveString, + stringify: Ft + }, + { + identify: (t) => t == null, + createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, + default: !0, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: Ft + }, + { + identify: (t) => typeof t == "boolean", + default: !0, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (t) => t === "true", + stringify: Ft + }, + { + identify: ls, + default: !0, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (t) => E.intOptions.asBigInt ? BigInt(t) : parseInt(t, 10), + stringify: ({ value: t }) => ls(t) ? t.toString() : JSON.stringify(t) + }, + { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (t) => parseFloat(t), + stringify: Ft + } + ]; + ws.scalarFallback = (t) => { + throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`); + }; + var fs = ({ value: t }) => t ? E.boolOptions.trueStr : E.boolOptions.falseStr, lt = (t) => typeof t == "bigint" || Number.isInteger(t); + function qt(t, e, n) { + let r = e.replace(/_/g, ""); + if (E.intOptions.asBigInt) { + switch (n) { + case 2: + r = `0b${r}`; + break; + case 8: + r = `0o${r}`; + break; + case 16: + r = `0x${r}`; + break; + } + let i = BigInt(r); + return t === "-" ? BigInt(-1) * i : i; + } + let s = parseInt(r, n); + return t === "-" ? -1 * s : s; + } + function Un(t, e, n) { + let { value: r } = t; + if (lt(r)) { + let s = r.toString(e); + return r < 0 ? "-" + n + s.substr(1) : n + s; + } + return E.stringifyNumber(t); + } + var fa = { + core: ca, + failsafe: Vn, + json: ws, + yaml11: Vn.concat([ + { + identify: (t) => t == null, + createNode: (t, e, n) => n.wrapScalars ? new E.Scalar(null) : null, + default: !0, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: E.nullOptions, + stringify: () => E.nullOptions.nullStr + }, + { + identify: (t) => typeof t == "boolean", + default: !0, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => !0, + options: E.boolOptions, + stringify: fs + }, + { + identify: (t) => typeof t == "boolean", + default: !0, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => !1, + options: E.boolOptions, + stringify: fs + }, + { + identify: lt, + default: !0, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^([-+]?)0b([0-1_]+)$/, + resolve: (t, e, n) => qt(e, n, 2), + stringify: (t) => Un(t, 2, "0b") + }, + { + identify: lt, + default: !0, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^([-+]?)0([0-7_]+)$/, + resolve: (t, e, n) => qt(e, n, 8), + stringify: (t) => Un(t, 8, "0") + }, + { + identify: lt, + default: !0, + tag: "tag:yaml.org,2002:int", + test: /^([-+]?)([0-9][0-9_]*)$/, + resolve: (t, e, n) => qt(e, n, 10), + stringify: E.stringifyNumber + }, + { + identify: lt, + default: !0, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^([-+]?)0x([0-9a-fA-F_]+)$/, + resolve: (t, e, n) => qt(e, n, 16), + stringify: (t) => Un(t, 16, "0x") + }, + { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (t, e) => e ? NaN : t[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: E.stringifyNumber + }, + { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (t) => parseFloat(t.replace(/_/g, "")), + stringify: ({ value: t }) => Number(t).toExponential() + }, + { + identify: (t) => typeof t == "number", + default: !0, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, + resolve(t, e) { + let n = new E.Scalar(parseFloat(t.replace(/_/g, ""))); + if (e) { + let r = e.replace(/_/g, ""); + r[r.length - 1] === "0" && (n.minFractionDigits = r.length); + } + return n; + }, + stringify: E.stringifyNumber + } + ], $.binary, $.omap, $.pairs, $.set, $.intTime, $.floatTime, $.timestamp) + }, ua = { + binary: $.binary, + bool: ms, + float: Ss, + floatExp: Es, + floatNaN: ys, + floatTime: $.floatTime, + int: ds, + intHex: gs, + intOct: hs, + intTime: $.intTime, + map: ft, + null: ps, + omap: $.omap, + pairs: $.pairs, + seq: Vt, + set: $.set, + timestamp: $.timestamp + }; + function pa(t, e, n) { + if (e) { + let r = n.filter((i) => i.tag === e), s = r.find((i) => !i.format) || r[0]; + if (!s) throw new Error(`Tag ${e} not found`); + return s; + } + return n.find((r) => (r.identify && r.identify(t) || r.class && t instanceof r.class) && !r.format); + } + function ma(t, e, n) { + if (t instanceof E.Node) return t; + let { defaultPrefix: r, onTagObj: s, prevObjects: i, schema: o, wrapScalars: a } = n; + e && e.startsWith("!!") && (e = r + e.slice(2)); + let c = pa(t, e, o.tags); + if (!c) { + if (typeof t.toJSON == "function" && (t = t.toJSON()), !t || typeof t != "object") return a ? new E.Scalar(t) : t; + c = t instanceof Map ? ft : t[Symbol.iterator] ? Vt : ft; + } + s && (s(c), delete n.onTagObj); + let l = { + value: void 0, + node: void 0 + }; + if (t && typeof t == "object" && i) { + let f = i.get(t); + if (f) { + let m = new E.Alias(f); + return n.aliasNodes.push(m), m; + } + l.value = t, i.set(t, l); + } + return l.node = c.createNode ? c.createNode(n.schema, t, n) : a ? new E.Scalar(t) : t, e && l.node instanceof E.Node && (l.node.tag = e), l.node; + } + function ha(t, e, n, r) { + let s = t[r.replace(/\W/g, "")]; + if (!s) { + let i = Object.keys(t).map((o) => JSON.stringify(o)).join(", "); + throw new Error(`Unknown schema "${r}"; use one of ${i}`); + } + if (Array.isArray(n)) for (let i of n) s = s.concat(i); + else typeof n == "function" && (s = n(s.slice())); + for (let i = 0; i < s.length; ++i) { + let o = s[i]; + if (typeof o == "string") { + let a = e[o]; + if (!a) { + let c = Object.keys(e).map((l) => JSON.stringify(l)).join(", "); + throw new Error(`Unknown custom tag "${o}"; use one of ${c}`); + } + s[i] = a; + } + } + return s; + } + var da = (t, e) => t.key < e.key ? -1 : t.key > e.key ? 1 : 0, ut = class t { + constructor({ customTags: e, merge: n, schema: r, sortMapEntries: s, tags: i }) { + this.merge = !!n, this.name = r, this.sortMapEntries = s === !0 ? da : s || null, !e && i && $.warnOptionDeprecation("tags", "customTags"), this.tags = ha(fa, ua, e || i, r); + } + createNode(e, n, r, s) { + let i = { + defaultPrefix: t.defaultPrefix, + schema: this, + wrapScalars: n + }; + return ma(e, r, s ? Object.assign(s, i) : i); + } + createPair(e, n, r) { + r || (r = { wrapScalars: !0 }); + let s = this.createNode(e, r.wrapScalars, null, r), i = this.createNode(n, r.wrapScalars, null, r); + return new E.Pair(s, i); + } + }; + Ut._defineProperty(ut, "defaultPrefix", Ut.defaultTagPrefix); + Ut._defineProperty(ut, "defaultTags", Ut.defaultTags); + bs.Schema = ut; + }); + Ls = ne((Gt) => { + "use strict"; + var Y = ce(), S = De(), Ns = Kn(), ga = { + anchorPrefix: "a", + customTags: null, + indent: 2, + indentSeq: !0, + keepCstNodes: !1, + keepNodeTypes: !0, + keepBlobsInJSON: !0, + mapAsMap: !1, + maxAliasCount: 100, + prettyErrors: !1, + simpleKeys: !1, + version: "1.2" + }, ya = { + get binary() { + return S.binaryOptions; + }, + set binary(t) { + Object.assign(S.binaryOptions, t); + }, + get bool() { + return S.boolOptions; + }, + set bool(t) { + Object.assign(S.boolOptions, t); + }, + get int() { + return S.intOptions; + }, + set int(t) { + Object.assign(S.intOptions, t); + }, + get null() { + return S.nullOptions; + }, + set null(t) { + Object.assign(S.nullOptions, t); + }, + get str() { + return S.strOptions; + }, + set str(t) { + Object.assign(S.strOptions, t); + } + }, As = { + "1.0": { + schema: "yaml-1.1", + merge: !0, + tagPrefixes: [{ + handle: "!", + prefix: Y.defaultTagPrefix + }, { + handle: "!!", + prefix: "tag:private.yaml.org,2002:" + }] + }, + 1.1: { + schema: "yaml-1.1", + merge: !0, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: Y.defaultTagPrefix + }] + }, + 1.2: { + schema: "core", + merge: !1, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: Y.defaultTagPrefix + }] + } + }; + function Os(t, e) { + if ((t.version || t.options.version) === "1.0") { + let s = e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/); + if (s) return "!" + s[1]; + let i = e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/); + return i ? `!${i[1]}/${i[2]}` : `!${e.replace(/^tag:/, "")}`; + } + let n = t.tagPrefixes.find((s) => e.indexOf(s.prefix) === 0); + if (!n) { + let s = t.getDefaults().tagPrefixes; + n = s && s.find((i) => e.indexOf(i.prefix) === 0); + } + if (!n) return e[0] === "!" ? e : `!<${e}>`; + let r = e.substr(n.prefix.length).replace(/[!,[\]{}]/g, (s) => ({ + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + })[s]); + return n.handle + r; + } + function Ea(t, e) { + if (e instanceof S.Alias) return S.Alias; + if (e.tag) { + let s = t.filter((i) => i.tag === e.tag); + if (s.length > 0) return s.find((i) => i.format === e.format) || s[0]; + } + let n, r; + if (e instanceof S.Scalar) { + r = e.value; + let s = t.filter((i) => i.identify && i.identify(r) || i.class && r instanceof i.class); + n = s.find((i) => i.format === e.format) || s.find((i) => !i.format); + } else r = e, n = t.find((s) => s.nodeClass && r instanceof s.nodeClass); + if (!n) { + let s = r && r.constructor ? r.constructor.name : typeof r; + throw new Error(`Tag not resolved for ${s} value`); + } + return n; + } + function Sa(t, e, { anchors: n, doc: r }) { + let s = [], i = r.anchors.getName(t); + return i && (n[i] = t, s.push(`&${i}`)), t.tag ? s.push(Os(r, t.tag)) : e.default || s.push(Os(r, e.tag)), s.join(" "); + } + function Kt(t, e, n, r) { + let { anchors: s, schema: i } = e.doc, o; + if (!(t instanceof S.Node)) { + let l = { + aliasNodes: [], + onTagObj: (f) => o = f, + prevObjects: /* @__PURE__ */ new Map() + }; + t = i.createNode(t, !0, null, l); + for (let f of l.aliasNodes) { + f.source = f.source.node; + let m = s.getName(f.source); + m || (m = s.newName(), s.map[m] = f.source); + } + } + if (t instanceof S.Pair) return t.toString(e, n, r); + o || (o = Ea(i.tags, t)); + let a = Sa(t, o, e); + a.length > 0 && (e.indentAtStart = (e.indentAtStart || 0) + a.length + 1); + let c = typeof o.stringify == "function" ? o.stringify(t, e, n, r) : t instanceof S.Scalar ? S.stringifyString(t, e, n, r) : t.toString(e, n, r); + return a ? t instanceof S.Scalar || c[0] === "{" || c[0] === "[" ? `${a} ${c}` : `${a} +${e.indent}${c}` : c; + } + var jn = class t { + static validAnchorNode(e) { + return e instanceof S.Scalar || e instanceof S.YAMLSeq || e instanceof S.YAMLMap; + } + constructor(e) { + Y._defineProperty(this, "map", Object.create(null)), this.prefix = e; + } + createAlias(e, n) { + return this.setAnchor(e, n), new S.Alias(e); + } + createMergePair(...e) { + let n = new S.Merge(); + return n.value.items = e.map((r) => { + if (r instanceof S.Alias) { + if (r.source instanceof S.YAMLMap) return r; + } else if (r instanceof S.YAMLMap) return this.createAlias(r); + throw new Error("Merge sources must be Map nodes or their Aliases"); + }), n; + } + getName(e) { + let { map: n } = this; + return Object.keys(n).find((r) => n[r] === e); + } + getNames() { + return Object.keys(this.map); + } + getNode(e) { + return this.map[e]; + } + newName(e) { + e || (e = this.prefix); + let n = Object.keys(this.map); + for (let r = 1;; ++r) { + let s = `${e}${r}`; + if (!n.includes(s)) return s; + } + } + resolveNodes() { + let { map: e, _cstAliases: n } = this; + Object.keys(e).forEach((r) => { + e[r] = e[r].resolved; + }), n.forEach((r) => { + r.source = r.source.resolved; + }), delete this._cstAliases; + } + setAnchor(e, n) { + if (e != null && !t.validAnchorNode(e)) throw new Error("Anchors may only be set for Scalar, Seq and Map nodes"); + if (n && /[\x00-\x19\s,[\]{}]/.test(n)) throw new Error("Anchor names must not contain whitespace or control characters"); + let { map: r } = this, s = e && Object.keys(r).find((i) => r[i] === e); + if (s) if (n) s !== n && (delete r[s], r[n] = e); + else return s; + else { + if (!n) { + if (!e) return null; + n = this.newName(); + } + r[n] = e; + } + return n; + } + }, jt = (t, e) => { + if (t && typeof t == "object") { + let { tag: n } = t; + t instanceof S.Collection ? (n && (e[n] = !0), t.items.forEach((r) => jt(r, e))) : t instanceof S.Pair ? (jt(t.key, e), jt(t.value, e)) : t instanceof S.Scalar && n && (e[n] = !0); + } + return e; + }, wa = (t) => Object.keys(jt(t, {})); + function ba(t, e) { + let n = { + before: [], + after: [] + }, r, s = !1; + for (let i of e) if (i.valueRange) { + if (r !== void 0) { + t.errors.push(new Y.YAMLSyntaxError(i, "Document contains trailing content not separated by a ... or --- line")); + break; + } + let o = S.resolveNode(t, i); + s && (o.spaceBefore = !0, s = !1), r = o; + } else i.comment !== null ? (r === void 0 ? n.before : n.after).push(i.comment) : i.type === Y.Type.BLANK_LINE && (s = !0, r === void 0 && n.before.length > 0 && !t.commentBefore && (t.commentBefore = n.before.join(` +`), n.before = [])); + if (t.contents = r || null, !r) t.comment = n.before.concat(n.after).join(` +`) || null; + else { + let i = n.before.join(` +`); + if (i) { + let o = r instanceof S.Collection && r.items[0] ? r.items[0] : r; + o.commentBefore = o.commentBefore ? `${i} +${o.commentBefore}` : i; + } + t.comment = n.after.join(` +`) || null; + } + } + function Na({ tagPrefixes: t }, e) { + let [n, r] = e.parameters; + if (!n || !r) throw new Y.YAMLSemanticError(e, "Insufficient parameters given for %TAG directive"); + if (t.some((s) => s.handle === n)) throw new Y.YAMLSemanticError(e, "The %TAG directive must only be given at most once per handle in the same document."); + return { + handle: n, + prefix: r + }; + } + function Oa(t, e) { + let [n] = e.parameters; + if (e.name === "YAML:1.0" && (n = "1.0"), !n) throw new Y.YAMLSemanticError(e, "Insufficient parameters given for %YAML directive"); + if (!As[n]) { + let s = `Document will be parsed as YAML ${t.version || t.options.version} rather than YAML ${n}`; + t.warnings.push(new Y.YAMLWarning(e, s)); + } + return n; + } + function Aa(t, e, n) { + let r = [], s = !1; + for (let i of e) { + let { comment: o, name: a } = i; + switch (a) { + case "TAG": + try { + t.tagPrefixes.push(Na(t, i)); + } catch (c) { + t.errors.push(c); + } + s = !0; + break; + case "YAML": + case "YAML:1.0": + if (t.version) t.errors.push(new Y.YAMLSemanticError(i, "The %YAML directive must only be given at most once per document.")); + try { + t.version = Oa(t, i); + } catch (c) { + t.errors.push(c); + } + s = !0; + break; + default: if (a) { + let c = `YAML only supports %TAG and %YAML directives, and not %${a}`; + t.warnings.push(new Y.YAMLWarning(i, c)); + } + } + o && r.push(o); + } + if (n && !s && (t.version || n.version || t.options.version) === "1.1") { + let i = ({ handle: o, prefix: a }) => ({ + handle: o, + prefix: a + }); + t.tagPrefixes = n.tagPrefixes.map(i), t.version = n.version; + } + t.commentBefore = r.join(` +`) || null; + } + function Be(t) { + if (t instanceof S.Collection) return !0; + throw new Error("Expected a YAML collection as document contents"); + } + var Qt = class t { + constructor(e) { + this.anchors = new jn(e.anchorPrefix), this.commentBefore = null, this.comment = null, this.contents = null, this.directivesEndMarker = null, this.errors = [], this.options = e, this.schema = null, this.tagPrefixes = [], this.version = null, this.warnings = []; + } + add(e) { + return Be(this.contents), this.contents.add(e); + } + addIn(e, n) { + Be(this.contents), this.contents.addIn(e, n); + } + delete(e) { + return Be(this.contents), this.contents.delete(e); + } + deleteIn(e) { + return S.isEmptyPath(e) ? this.contents == null ? !1 : (this.contents = null, !0) : (Be(this.contents), this.contents.deleteIn(e)); + } + getDefaults() { + return t.defaults[this.version] || t.defaults[this.options.version] || {}; + } + get(e, n) { + return this.contents instanceof S.Collection ? this.contents.get(e, n) : void 0; + } + getIn(e, n) { + return S.isEmptyPath(e) ? !n && this.contents instanceof S.Scalar ? this.contents.value : this.contents : this.contents instanceof S.Collection ? this.contents.getIn(e, n) : void 0; + } + has(e) { + return this.contents instanceof S.Collection ? this.contents.has(e) : !1; + } + hasIn(e) { + return S.isEmptyPath(e) ? this.contents !== void 0 : this.contents instanceof S.Collection ? this.contents.hasIn(e) : !1; + } + set(e, n) { + Be(this.contents), this.contents.set(e, n); + } + setIn(e, n) { + S.isEmptyPath(e) ? this.contents = n : (Be(this.contents), this.contents.setIn(e, n)); + } + setSchema(e, n) { + if (!e && !n && this.schema) return; + typeof e == "number" && (e = e.toFixed(1)), e === "1.0" || e === "1.1" || e === "1.2" ? (this.version ? this.version = e : this.options.version = e, delete this.options.schema) : e && typeof e == "string" && (this.options.schema = e), Array.isArray(n) && (this.options.customTags = n); + let r = Object.assign({}, this.getDefaults(), this.options); + this.schema = new Ns.Schema(r); + } + parse(e, n) { + this.options.keepCstNodes && (this.cstNode = e), this.options.keepNodeTypes && (this.type = "DOCUMENT"); + let { directives: r = [], contents: s = [], directivesEndMarker: i, error: o, valueRange: a } = e; + if (o && (o.source || (o.source = this), this.errors.push(o)), Aa(this, r, n), i && (this.directivesEndMarker = !0), this.range = a ? [a.start, a.end] : null, this.setSchema(), this.anchors._cstAliases = [], ba(this, s), this.anchors.resolveNodes(), this.options.prettyErrors) { + for (let c of this.errors) c instanceof Y.YAMLError && c.makePretty(); + for (let c of this.warnings) c instanceof Y.YAMLError && c.makePretty(); + } + return this; + } + listNonDefaultTags() { + return wa(this.contents).filter((e) => e.indexOf(Ns.Schema.defaultPrefix) !== 0); + } + setTagPrefix(e, n) { + if (e[0] !== "!" || e[e.length - 1] !== "!") throw new Error("Handle must start and end with !"); + if (n) { + let r = this.tagPrefixes.find((s) => s.handle === e); + r ? r.prefix = n : this.tagPrefixes.push({ + handle: e, + prefix: n + }); + } else this.tagPrefixes = this.tagPrefixes.filter((r) => r.handle !== e); + } + toJSON(e, n) { + let { keepBlobsInJSON: r, mapAsMap: s, maxAliasCount: i } = this.options, o = r && (typeof e != "string" || !(this.contents instanceof S.Scalar)), a = { + doc: this, + indentStep: " ", + keep: o, + mapAsMap: o && !!s, + maxAliasCount: i, + stringify: Kt + }, c = Object.keys(this.anchors.map); + c.length > 0 && (a.anchors = new Map(c.map((f) => [this.anchors.map[f], { + alias: [], + aliasCount: 0, + count: 1 + }]))); + let l = S.toJSON(this.contents, e, a); + if (typeof n == "function" && a.anchors) for (let { count: f, res: m } of a.anchors.values()) n(m, f); + return l; + } + toString() { + if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified"); + let e = this.options.indent; + if (!Number.isInteger(e) || e <= 0) { + let c = JSON.stringify(e); + throw new Error(`"indent" option must be a positive integer, not ${c}`); + } + this.setSchema(); + let n = [], r = !1; + if (this.version) { + let c = "%YAML 1.2"; + this.schema.name === "yaml-1.1" && (this.version === "1.0" ? c = "%YAML:1.0" : this.version === "1.1" && (c = "%YAML 1.1")), n.push(c), r = !0; + } + let s = this.listNonDefaultTags(); + this.tagPrefixes.forEach(({ handle: c, prefix: l }) => { + s.some((f) => f.indexOf(l) === 0) && (n.push(`%TAG ${c} ${l}`), r = !0); + }), (r || this.directivesEndMarker) && n.push("---"), this.commentBefore && ((r || !this.directivesEndMarker) && n.unshift(""), n.unshift(this.commentBefore.replace(/^/gm, "#"))); + let i = { + anchors: Object.create(null), + doc: this, + indent: "", + indentStep: " ".repeat(e), + stringify: Kt + }, o = !1, a = null; + if (this.contents) { + this.contents instanceof S.Node && (this.contents.spaceBefore && (r || this.directivesEndMarker) && n.push(""), this.contents.commentBefore && n.push(this.contents.commentBefore.replace(/^/gm, "#")), i.forceBlockIndent = !!this.comment, a = this.contents.comment); + let c = a ? null : () => o = !0, l = Kt(this.contents, i, () => a = null, c); + n.push(S.addComment(l, "", a)); + } else this.contents !== void 0 && n.push(Kt(this.contents, i)); + return this.comment && ((!o || a) && n[n.length - 1] !== "" && n.push(""), n.push(this.comment.replace(/^/gm, "#"))), n.join(` +`) + ` +`; + } + }; + Y._defineProperty(Qt, "defaults", As); + Gt.Document = Qt; + Gt.defaultOptions = ga; + Gt.scalarOptions = ya; + }); + Ms = ne((Cs) => { + "use strict"; + var Qn = Qr(), Ne = Ls(), La = Kn(), Ta = ce(), Ca = qn(); + De(); + function Ma(t, e = !0, n) { + n === void 0 && typeof e == "string" && (n = e, e = !0); + let r = Object.assign({}, Ne.Document.defaults[Ne.defaultOptions.version], Ne.defaultOptions); + return new La.Schema(r).createNode(t, e, n); + } + var Fe = class extends Ne.Document { + constructor(e) { + super(Object.assign({}, Ne.defaultOptions, e)); + } + }; + function ka(t, e) { + let n = [], r; + for (let s of Qn.parse(t)) { + let i = new Fe(e); + i.parse(s, r), n.push(i), r = i; + } + return n; + } + function Ts(t, e) { + let n = Qn.parse(t), r = new Fe(e).parse(n[0]); + if (n.length > 1) r.errors.unshift(new Ta.YAMLSemanticError(n[1], "Source contains multiple documents; please use YAML.parseAllDocuments()")); + return r; + } + function Pa(t, e) { + let n = Ts(t, e); + if (n.warnings.forEach((r) => Ca.warn(r)), n.errors.length > 0) throw n.errors[0]; + return n.toJSON(); + } + function va(t, e) { + let n = new Fe(e); + return n.contents = t, String(n); + } + Cs.YAML = { + createNode: Ma, + defaultOptions: Ne.defaultOptions, + Document: Fe, + parse: Pa, + parseAllDocuments: ka, + parseCST: Qn.parse, + parseDocument: Ts, + scalarOptions: Ne.scalarOptions, + stringify: va + }; + }); + Gn = ne((Lf, ks) => { + ks.exports = Ms().YAML; + }); + Ps = ne((H) => { + "use strict"; + var qe = De(), Ue = ce(); + H.findPair = qe.findPair; + H.parseMap = qe.resolveMap; + H.parseSeq = qe.resolveSeq; + H.stringifyNumber = qe.stringifyNumber; + H.stringifyString = qe.stringifyString; + H.toJSON = qe.toJSON; + H.Type = Ue.Type; + H.YAMLError = Ue.YAMLError; + H.YAMLReferenceError = Ue.YAMLReferenceError; + H.YAMLSemanticError = Ue.YAMLSemanticError; + H.YAMLSyntaxError = Ue.YAMLSyntaxError; + H.YAMLWarning = Ue.YAMLWarning; + }); + Ci = {}; + or(Ci, { + __parsePrettierYamlConfig: () => Xa, + languages: () => Ur, + options: () => Vr, + parsers: () => ir, + printers: () => Ja + }); + mt = (t, e) => (n, r, ...s) => n | 1 && r == null ? void 0 : (e.call(r) ?? r[t]).apply(r, s); + D = mt("at", function() { + if (Array.isArray(this) || typeof this == "string") return Ri; + }); + $i = String.prototype.replaceAll ?? function(t, e) { + return t.global ? this.replace(t, e) : this.split(t).join(e); + }, ht = mt("replaceAll", function() { + if (typeof this == "string") return $i; + }); + Bi = () => {}, je = Bi; + Qe = "string", Ge = "array", dt = "cursor", gt = "indent", Ae = "align", yt = "trim", Le = "group", Te = "fill", Ce = "if-break", Et = "indent-if-break", Me = "line-suffix", St = "line-suffix-boundary", re = "line", wt = "label", ke = "break-parent", bt = /* @__PURE__ */ new Set([ + dt, + gt, + Ae, + yt, + Le, + Te, + Ce, + Et, + Me, + St, + re, + wt, + ke + ]); + Nt = Fi; + qi = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t); + an = class extends Error { + name = "InvalidDocError"; + constructor(e) { + super(Ui(e)), this.doc = e; + } + }, ar = an; + Z = je, Ot = je, lr = je, fr = je; + Xe = { type: ke }; + se = { type: re }, Lt = { + type: re, + soft: !0 + }, N = [{ + type: re, + hard: !0 + }, Xe], He = [{ + type: re, + hard: !0, + literal: !0 + }, Xe]; + fn = Tt(" "); + hr = (t) => t === ` +` || t === "\r" || t === "\u2028" || t === "\u2029"; + un = ji; + pn = Qi; + mn = class extends Error { + name = "UnexpectedNodeError"; + constructor(e, n, r = "type") { + super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`), this.node = e; + } + }, dr = mn; + gr = "format"; + yr = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/u, Er = /^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/u, Sr = /^\s*@(?:format|prettier)\s*$/u; + wr = (t) => Sr.test(t), br = (t) => Er.test(t), Nr = (t) => yr.test(t), Or = (t) => `# @${gr} + +${t}`; + Ar.ignoredProperties = /* @__PURE__ */ new Set(["position"]); + Lr = Ar; + Tr.getVisitorKeys = () => []; + Cr = Tr; + Ze = null; + Gi = 10; + for (let t = 0; t <= Gi; t++) et(); + Mr = Hi; + k = [ + [ + "children", + "anchor", + "tag", + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ], + [ + "anchor", + "tag", + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ], + [ + "key", + "value", + "children", + "anchor", + "tag", + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ], + [ + "content", + "children", + "anchor", + "tag", + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ], + [ + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ] + ]; + Pr = Mr({ + root: k[0], + document: [ + "head", + "body", + "children", + "anchor", + "tag", + "indicatorComment", + "leadingComments", + "middleComments", + "trailingComment", + "endComments" + ], + documentHead: k[0], + documentBody: k[0], + directive: k[1], + alias: k[1], + blockLiteral: k[1], + blockFolded: k[0], + plain: k[0], + quoteSingle: k[1], + quoteDouble: k[1], + mapping: k[0], + mappingItem: k[2], + mappingKey: k[3], + mappingValue: k[3], + sequence: k[0], + sequenceItem: k[3], + flowMapping: k[0], + flowMappingItem: k[2], + flowSequence: k[0], + flowSequenceItem: k[3], + comment: k[1], + tag: k[4], + anchor: k[4] + }); + tt = (t) => t.position.start.offset, vr = (t) => t.position.end.offset; + ve = Xi; + yn = /* @__PURE__ */ new WeakMap(); + Yr = Zi; + Br = to; + Fr = so; + qr = { + preprocess: Fr, + embed: Cr, + print: oo, + massageAstNode: Lr, + insertPragma: Or, + getVisitorKeys: Pr + }; + Ur = [{ + name: "YAML", + type: "data", + aceMode: "yaml", + extensions: [ + ".yml", + ".mir", + ".reek", + ".rviz", + ".sublime-syntax", + ".syntax", + ".yaml", + ".yaml-tmlanguage", + ".yaml.sed", + ".yml.mysql" + ], + filenames: [ + ".clang-format", + ".clang-tidy", + ".clangd", + ".gemrc", + "CITATION.cff", + "glide.lock", + "pixi.lock", + ".prettierrc", + ".stylelintrc", + ".lintstagedrc" + ], + tmScope: "source.yaml", + aliases: ["yml"], + codemirrorMode: "yaml", + codemirrorMimeType: "text/x-yaml", + parsers: ["yaml"], + vscodeLanguageIds: [ + "yaml", + "ansible", + "dockercompose", + "github-actions-workflow", + "home-assistant" + ], + linguistLanguageId: 407 + }]; + vt = { + bracketSpacing: { + category: "Common", + type: "boolean", + default: !0, + description: "Print spaces between brackets.", + oppositeDescription: "Do not print spaces between brackets." + }, + objectWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap object literals.", + choices: [{ + value: "preserve", + description: "Keep as multi-line, if there is a newline between the opening brace and first property." + }, { + value: "collapse", + description: "Fit to a single line when possible." + }] + }, + singleQuote: { + category: "Common", + type: "boolean", + default: !1, + description: "Use single quotes instead of double quotes." + }, + proseWrap: { + category: "Common", + type: "choice", + default: "preserve", + description: "How to wrap prose.", + choices: [ + { + value: "always", + description: "Wrap prose if it exceeds the print width." + }, + { + value: "never", + description: "Do not wrap prose." + }, + { + value: "preserve", + description: "Wrap prose as-is." + } + ] + }, + bracketSameLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Put > of opening tags on the last line instead of on a new line." + }, + singleAttributePerLine: { + category: "Common", + type: "boolean", + default: !1, + description: "Enforce single attribute per line in HTML, Vue and JSX." + } + }; + Vr = { + bracketSpacing: vt.bracketSpacing, + singleQuote: vt.singleQuote, + proseWrap: vt.proseWrap + }; + ir = {}; + or(ir, { yaml: () => Ha }); + sr = on(Gn(), 1), J = on(Ps(), 1); + J.default.findPair; + J.default.toJSON; + J.default.parseMap; + J.default.parseSeq; + J.default.stringifyNumber; + J.default.stringifyString; + J.default.Type; + J.default.YAMLError; + J.default.YAMLReferenceError; + vs = J.default.YAMLSemanticError; + J.default.YAMLSyntaxError; + J.default.YAMLWarning; + (function(t) { + t.Tag = "!", t.Anchor = "&", t.Comment = "#"; + })(me || (me = {})); + (function(t) { + t.CLIP = "clip", t.STRIP = "strip", t.KEEP = "keep"; + })(Jn || (Jn = {})); + er = class { + text; + comments = []; + #e; + #t; + constructor(e, n) { + this.text = n, this.#e = e; + } + setOrigRanges() { + if (!this.#e.setOrigRanges()) for (let e of this.#e) e.setOrigRanges([], 0); + } + #n(e) { + if (!Zn) { + let [o] = this.#e, a = Object.getPrototypeOf(Object.getPrototypeOf(o)); + Zn = Object.getOwnPropertyDescriptor(a, "rangeAsLinePos").get; + } + if (this.#t ?? (this.#t = { root: { context: { src: this.text } } }), this.text === "" && e.origStart === 0 && e.origEnd === 0) return { + start: { + offset: 0, + line: 1, + column: 1 + }, + end: { + offset: 0, + line: 1, + column: 1 + } + }; + let { start: { line: n, col: r }, end: { line: s, col: i } } = Zn.call({ + range: { + start: this.#r(e.origStart), + end: this.#r(e.origEnd) + }, + context: this.#t + }); + return { + start: { + offset: e.origStart, + line: n, + column: r + }, + end: { + offset: e.origEnd, + line: s, + column: i + } + }; + } + #r(e) { + return e < 0 ? 0 : e > this.text.length ? this.text.length : e; + } + transformOffset(e) { + return this.#n({ + origStart: e, + origEnd: e + }).start; + } + transformRange(e) { + let { start: n, end: r } = this.#n(e); + return X(n, r); + } + transformNode(e) { + return wi(e, this); + } + transformContent(e) { + return Ht(e, this); + } + }, bi = er; + Li = Qa; + Ha = { + astFormat: "yaml", + parse: Ga, + hasPragma: br, + hasIgnorePragma: Nr, + locStart: tt, + locEnd: vr + }; + Ja = { yaml: qr }; + Xa = on(Gn(), 1).default.parse; +}))(); +export { Xa as __parsePrettierYamlConfig, Ci as default, Ur as languages, Vr as options, ir as parsers, Ja as printers }; diff --git a/.github/actions/check-public-api/index.js b/.github/actions/check-public-api/index.js deleted file mode 100644 index 9ec68cdcdb..0000000000 --- a/.github/actions/check-public-api/index.js +++ /dev/null @@ -1,78565 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 3916: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* - -The MIT License (MIT) - -Original Library - - Copyright (c) Marak Squires - -Additional functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var colors = {}; -module['exports'] = colors; - -colors.themes = {}; - -var util = __nccwpck_require__(9023); -var ansiStyles = colors.styles = __nccwpck_require__(7434); -var defineProps = Object.defineProperties; -var newLineRegex = new RegExp(/[\r\n]+/g); - -colors.supportsColor = (__nccwpck_require__(1625).supportsColor); - -if (typeof colors.enabled === 'undefined') { - colors.enabled = colors.supportsColor() !== false; -} - -colors.enable = function() { - colors.enabled = true; -}; - -colors.disable = function() { - colors.enabled = false; -}; - -colors.stripColors = colors.strip = function(str) { - return ('' + str).replace(/\x1B\[\d+m/g, ''); -}; - -// eslint-disable-next-line no-unused-vars -var stylize = colors.stylize = function stylize(str, style) { - if (!colors.enabled) { - return str+''; - } - - var styleMap = ansiStyles[style]; - - // Stylize should work for non-ANSI styles, too - if (!styleMap && style in colors) { - // Style maps like trap operate as functions on strings; - // they don't have properties like open or close. - return colors[style](str); - } - - return styleMap.open + str + styleMap.close; -}; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var escapeStringRegexp = function(str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - return str.replace(matchOperatorsRe, '\\$&'); -}; - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - builder._styles = _styles; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - builder.__proto__ = proto; - return builder; -} - -var styles = (function() { - var ret = {}; - ansiStyles.grey = ansiStyles.gray; - Object.keys(ansiStyles).forEach(function(key) { - ansiStyles[key].closeRe = - new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - ret[key] = { - get: function() { - return build(this._styles.concat(key)); - }, - }; - }); - return ret; -})(); - -var proto = defineProps(function colors() {}, styles); - -function applyStyle() { - var args = Array.prototype.slice.call(arguments); - - var str = args.map(function(arg) { - // Use weak equality check so we can colorize null/undefined in safe mode - if (arg != null && arg.constructor === String) { - return arg; - } else { - return util.inspect(arg); - } - }).join(' '); - - if (!colors.enabled || !str) { - return str; - } - - var newLinesPresent = str.indexOf('\n') != -1; - - var nestedStyles = this._styles; - - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - str = code.open + str.replace(code.closeRe, code.open) + code.close; - if (newLinesPresent) { - str = str.replace(newLineRegex, function(match) { - return code.close + match + code.open; - }); - } - } - - return str; -} - -colors.setTheme = function(theme) { - if (typeof theme === 'string') { - console.log('colors.setTheme now only accepts an object, not a string. ' + - 'If you are trying to set a theme from a file, it is now your (the ' + - 'caller\'s) responsibility to require the file. The old syntax ' + - 'looked like colors.setTheme(__dirname + ' + - '\'/../themes/generic-logging.js\'); The new syntax looks like '+ - 'colors.setTheme(require(__dirname + ' + - '\'/../themes/generic-logging.js\'));'); - return; - } - for (var style in theme) { - (function(style) { - colors[style] = function(str) { - if (typeof theme[style] === 'object') { - var out = str; - for (var i in theme[style]) { - out = colors[theme[style][i]](out); - } - return out; - } - return colors[theme[style]](str); - }; - })(style); - } -}; - -function init() { - var ret = {}; - Object.keys(styles).forEach(function(name) { - ret[name] = { - get: function() { - return build([name]); - }, - }; - }); - return ret; -} - -var sequencer = function sequencer(map, str) { - var exploded = str.split(''); - exploded = exploded.map(map); - return exploded.join(''); -}; - -// custom formatter methods -colors.trap = __nccwpck_require__(1297); -colors.zalgo = __nccwpck_require__(6653); - -// maps -colors.maps = {}; -colors.maps.america = __nccwpck_require__(6316)(colors); -colors.maps.zebra = __nccwpck_require__(1288)(colors); -colors.maps.rainbow = __nccwpck_require__(2206)(colors); -colors.maps.random = __nccwpck_require__(3217)(colors); - -for (var map in colors.maps) { - (function(map) { - colors[map] = function(str) { - return sequencer(colors.maps[map], str); - }; - })(map); -} - -defineProps(colors, init()); - - -/***/ }), - -/***/ 1297: -/***/ ((module) => { - -module['exports'] = function runTheTrap(text, options) { - var result = ''; - text = text || 'Run the trap, drop the bass'; - text = text.split(''); - var trap = { - a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'], - b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'], - c: ['\u00a9', '\u023b', '\u03fe'], - d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'], - e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc', - '\u0a6c'], - f: ['\u04fa'], - g: ['\u0262'], - h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'], - i: ['\u0f0f'], - j: ['\u0134'], - k: ['\u0138', '\u04a0', '\u04c3', '\u051e'], - l: ['\u0139'], - m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'], - n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'], - o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd', - '\u06dd', '\u0e4f'], - p: ['\u01f7', '\u048e'], - q: ['\u09cd'], - r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'], - s: ['\u00a7', '\u03de', '\u03df', '\u03e8'], - t: ['\u0141', '\u0166', '\u0373'], - u: ['\u01b1', '\u054d'], - v: ['\u05d8'], - w: ['\u0428', '\u0460', '\u047c', '\u0d70'], - x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'], - y: ['\u00a5', '\u04b0', '\u04cb'], - z: ['\u01b5', '\u0240'], - }; - text.forEach(function(c) { - c = c.toLowerCase(); - var chars = trap[c] || [' ']; - var rand = Math.floor(Math.random() * chars.length); - if (typeof trap[c] !== 'undefined') { - result += trap[c][rand]; - } else { - result += c; - } - }); - return result; -}; - - -/***/ }), - -/***/ 6653: -/***/ ((module) => { - -// please no -module['exports'] = function zalgo(text, options) { - text = text || ' he is here '; - var soul = { - 'up': [ - '̍', '̎', '̄', '̅', - '̿', '̑', '̆', '̐', - '͒', '͗', '͑', '̇', - '̈', '̊', '͂', '̓', - '̈', '͊', '͋', '͌', - '̃', '̂', '̌', '͐', - '̀', '́', '̋', '̏', - '̒', '̓', '̔', '̽', - '̉', 'ͣ', 'ͤ', 'ͥ', - 'ͦ', 'ͧ', 'ͨ', 'ͩ', - 'ͪ', 'ͫ', 'ͬ', 'ͭ', - 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚', - ], - 'down': [ - '̖', '̗', '̘', '̙', - '̜', '̝', '̞', '̟', - '̠', '̤', '̥', '̦', - '̩', '̪', '̫', '̬', - '̭', '̮', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', '̻', '̼', 'ͅ', - '͇', '͈', '͉', '͍', - '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣', - ], - 'mid': [ - '̕', '̛', '̀', '́', - '͘', '̡', '̢', '̧', - '̨', '̴', '̵', '̶', - '͜', '͝', '͞', - '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉', - ], - }; - var all = [].concat(soul.up, soul.down, soul.mid); - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function isChar(character) { - var bool = false; - all.filter(function(i) { - bool = (i === character); - }); - return bool; - } - - - function heComes(text, options) { - var result = ''; - var counts; - var l; - options = options || {}; - options['up'] = - typeof options['up'] !== 'undefined' ? options['up'] : true; - options['mid'] = - typeof options['mid'] !== 'undefined' ? options['mid'] : true; - options['down'] = - typeof options['down'] !== 'undefined' ? options['down'] : true; - options['size'] = - typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; - text = text.split(''); - for (l in text) { - if (isChar(l)) { - continue; - } - result = result + text[l]; - counts = {'up': 0, 'down': 0, 'mid': 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.mid = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.mid = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ['up', 'mid', 'down']; - for (var d in arr) { - var index = arr[d]; - for (var i = 0; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - // don't summon him - return heComes(text, options); -}; - - - -/***/ }), - -/***/ 6316: -/***/ ((module) => { - -module['exports'] = function(colors) { - return function(letter, i, exploded) { - if (letter === ' ') return letter; - switch (i%3) { - case 0: return colors.red(letter); - case 1: return colors.white(letter); - case 2: return colors.blue(letter); - } - }; -}; - - -/***/ }), - -/***/ 2206: -/***/ ((module) => { - -module['exports'] = function(colors) { - // RoY G BiV - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; - return function(letter, i, exploded) { - if (letter === ' ') { - return letter; - } else { - return colors[rainbowColors[i++ % rainbowColors.length]](letter); - } - }; -}; - - - -/***/ }), - -/***/ 3217: -/***/ ((module) => { - -module['exports'] = function(colors) { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', - 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', - 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; - return function(letter, i, exploded) { - return letter === ' ' ? letter : - colors[ - available[Math.round(Math.random() * (available.length - 2))] - ](letter); - }; -}; - - -/***/ }), - -/***/ 1288: -/***/ ((module) => { - -module['exports'] = function(colors) { - return function(letter, i, exploded) { - return i % 2 === 0 ? letter : colors.inverse(letter); - }; -}; - - -/***/ }), - -/***/ 7434: -/***/ ((module) => { - -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var styles = {}; -module['exports'] = styles; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - grey: [90, 39], - - brightRed: [91, 39], - brightGreen: [92, 39], - brightYellow: [93, 39], - brightBlue: [94, 39], - brightMagenta: [95, 39], - brightCyan: [96, 39], - brightWhite: [97, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgGray: [100, 49], - bgGrey: [100, 49], - - bgBrightRed: [101, 49], - bgBrightGreen: [102, 49], - bgBrightYellow: [103, 49], - bgBrightBlue: [104, 49], - bgBrightMagenta: [105, 49], - bgBrightCyan: [106, 49], - bgBrightWhite: [107, 49], - - // legacy styles for colors pre v1.0.0 - blackBG: [40, 49], - redBG: [41, 49], - greenBG: [42, 49], - yellowBG: [43, 49], - blueBG: [44, 49], - magentaBG: [45, 49], - cyanBG: [46, 49], - whiteBG: [47, 49], - -}; - -Object.keys(codes).forEach(function(key) { - var val = codes[key]; - var style = styles[key] = []; - style.open = '\u001b[' + val[0] + 'm'; - style.close = '\u001b[' + val[1] + 'm'; -}); - - -/***/ }), - -/***/ 8569: -/***/ ((module) => { - -/* -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - - - -module.exports = function(flag, argv) { - argv = argv || process.argv || []; - - var terminatorPos = argv.indexOf('--'); - var prefix = /^-{1,2}/.test(flag) ? '' : '--'; - var pos = argv.indexOf(prefix + flag); - - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; - - -/***/ }), - -/***/ 1625: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - - - -var os = __nccwpck_require__(857); -var hasFlag = __nccwpck_require__(8569); - -var env = process.env; - -var forceColor = void 0; -if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') - || hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 - || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level: level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3, - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || hasFlag('color=full') - || hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - var min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first - // Windows release that supports 256 colors. Windows 10 build 14931 is the - // first release that supports 16m/TrueColor. - var osRelease = os.release().split('.'); - if (Number(process.versions.node.split('.')[0]) >= 8 - && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) { - return sign in env; - }) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0 - ); - } - - if ('TERM_PROGRAM' in env) { - var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Hyper': - return 3; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - var level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr), -}; - - -/***/ }), - -/***/ 6457: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// -// Remark: Requiring this file will use the "safe" colors API, -// which will not touch String.prototype. -// -// var colors = require('colors/safe'); -// colors.red("foo") -// -// -var colors = __nccwpck_require__(3916); -module['exports'] = colors; - - -/***/ }), - -/***/ 7766: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var enabled = __nccwpck_require__(8395); - -/** - * Creates a new Adapter. - * - * @param {Function} fn Function that returns the value. - * @returns {Function} The adapter logic. - * @public - */ -module.exports = function create(fn) { - return function adapter(namespace) { - try { - return enabled(namespace, fn()); - } catch (e) { /* Any failure means that we found nothing */ } - - return false; - }; -} - - -/***/ }), - -/***/ 666: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var adapter = __nccwpck_require__(7766); - -/** - * Extracts the values from process.env. - * - * @type {Function} - * @public - */ -module.exports = adapter(function processenv() { - return process.env.DEBUG || process.env.DIAGNOSTICS; -}); - - -/***/ }), - -/***/ 7241: -/***/ ((module) => { - -/** - * Contains all configured adapters for the given environment. - * - * @type {Array} - * @public - */ -var adapters = []; - -/** - * Contains all modifier functions. - * - * @typs {Array} - * @public - */ -var modifiers = []; - -/** - * Our default logger. - * - * @public - */ -var logger = function devnull() {}; - -/** - * Register a new adapter that will used to find environments. - * - * @param {Function} adapter A function that will return the possible env. - * @returns {Boolean} Indication of a successful add. - * @public - */ -function use(adapter) { - if (~adapters.indexOf(adapter)) return false; - - adapters.push(adapter); - return true; -} - -/** - * Assign a new log method. - * - * @param {Function} custom The log method. - * @public - */ -function set(custom) { - logger = custom; -} - -/** - * Check if the namespace is allowed by any of our adapters. - * - * @param {String} namespace The namespace that needs to be enabled - * @returns {Boolean|Promise} Indication if the namespace is enabled by our adapters. - * @public - */ -function enabled(namespace) { - var async = []; - - for (var i = 0; i < adapters.length; i++) { - if (adapters[i].async) { - async.push(adapters[i]); - continue; - } - - if (adapters[i](namespace)) return true; - } - - if (!async.length) return false; - - // - // Now that we know that we Async functions, we know we run in an ES6 - // environment and can use all the API's that they offer, in this case - // we want to return a Promise so that we can `await` in React-Native - // for an async adapter. - // - return new Promise(function pinky(resolve) { - Promise.all( - async.map(function prebind(fn) { - return fn(namespace); - }) - ).then(function resolved(values) { - resolve(values.some(Boolean)); - }); - }); -} - -/** - * Add a new message modifier to the debugger. - * - * @param {Function} fn Modification function. - * @returns {Boolean} Indication of a successful add. - * @public - */ -function modify(fn) { - if (~modifiers.indexOf(fn)) return false; - - modifiers.push(fn); - return true; -} - -/** - * Write data to the supplied logger. - * - * @param {Object} meta Meta information about the log. - * @param {Array} args Arguments for console.log. - * @public - */ -function write() { - logger.apply(logger, arguments); -} - -/** - * Process the message with the modifiers. - * - * @param {Mixed} message The message to be transformed by modifers. - * @returns {String} Transformed message. - * @public - */ -function process(message) { - for (var i = 0; i < modifiers.length; i++) { - message = modifiers[i].apply(modifiers[i], arguments); - } - - return message; -} - -/** - * Introduce options to the logger function. - * - * @param {Function} fn Calback function. - * @param {Object} options Properties to introduce on fn. - * @returns {Function} The passed function - * @public - */ -function introduce(fn, options) { - var has = Object.prototype.hasOwnProperty; - - for (var key in options) { - if (has.call(options, key)) { - fn[key] = options[key]; - } - } - - return fn; -} - -/** - * Nope, we're not allowed to write messages. - * - * @returns {Boolean} false - * @public - */ -function nope(options) { - options.enabled = false; - options.modify = modify; - options.set = set; - options.use = use; - - return introduce(function diagnopes() { - return false; - }, options); -} - -/** - * Yep, we're allowed to write debug messages. - * - * @param {Object} options The options for the process. - * @returns {Function} The function that does the logging. - * @public - */ -function yep(options) { - /** - * The function that receives the actual debug information. - * - * @returns {Boolean} indication that we're logging. - * @public - */ - function diagnostics() { - var args = Array.prototype.slice.call(arguments, 0); - - write.call(write, options, process(args, options)); - return true; - } - - options.enabled = true; - options.modify = modify; - options.set = set; - options.use = use; - - return introduce(diagnostics, options); -} - -/** - * Simple helper function to introduce various of helper methods to our given - * diagnostics function. - * - * @param {Function} diagnostics The diagnostics function. - * @returns {Function} diagnostics - * @public - */ -module.exports = function create(diagnostics) { - diagnostics.introduce = introduce; - diagnostics.enabled = enabled; - diagnostics.process = process; - diagnostics.modify = modify; - diagnostics.write = write; - diagnostics.nope = nope; - diagnostics.yep = yep; - diagnostics.set = set; - diagnostics.use = use; - - return diagnostics; -} - - -/***/ }), - -/***/ 1155: -/***/ ((module) => { - -/** - * An idiot proof logger to be used as default. We've wrapped it in a try/catch - * statement to ensure the environments without the `console` API do not crash - * as well as an additional fix for ancient browsers like IE8 where the - * `console.log` API doesn't have an `apply`, so we need to use the Function's - * apply functionality to apply the arguments. - * - * @param {Object} meta Options of the logger. - * @param {Array} messages The actuall message that needs to be logged. - * @public - */ -module.exports = function (meta, messages) { - // - // So yea. IE8 doesn't have an apply so we need a work around to puke the - // arguments in place. - // - try { Function.prototype.apply.call(console.log, console, messages); } - catch (e) {} -} - - -/***/ }), - -/***/ 2872: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var colorspace = __nccwpck_require__(1470); -var kuler = __nccwpck_require__(5407); - -/** - * Prefix the messages with a colored namespace. - * - * @param {Array} args The messages array that is getting written. - * @param {Object} options Options for diagnostics. - * @returns {Array} Altered messages array. - * @public - */ -module.exports = function ansiModifier(args, options) { - var namespace = options.namespace; - var ansi = options.colors !== false - ? kuler(namespace +':', colorspace(namespace)) - : namespace +':'; - - args[0] = ansi +' '+ args[0]; - return args; -}; - - -/***/ }), - -/***/ 7987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var create = __nccwpck_require__(7241); -var tty = (__nccwpck_require__(2018).isatty)(1); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function dev(namespace, options) { - options = options || {}; - options.colors = 'colors' in options ? options.colors : tty; - options.namespace = namespace; - options.prod = false; - options.dev = true; - - if (!dev.enabled(namespace) && !(options.force || dev.force)) { - return dev.nope(options); - } - - return dev.yep(options); -}); - -// -// Configure the logger for the given environment. -// -diagnostics.modify(__nccwpck_require__(2872)); -diagnostics.use(__nccwpck_require__(666)); -diagnostics.set(__nccwpck_require__(1155)); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; - - -/***/ }), - -/***/ 6302: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// -// Select the correct build version depending on the environment. -// -if (process.env.NODE_ENV === 'production') { - module.exports = __nccwpck_require__(6567); -} else { - module.exports = __nccwpck_require__(7987); -} - - -/***/ }), - -/***/ 6567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var create = __nccwpck_require__(7241); - -/** - * Create a new diagnostics logger. - * - * @param {String} namespace The namespace it should enable. - * @param {Object} options Additional options. - * @returns {Function} The logger. - * @public - */ -var diagnostics = create(function prod(namespace, options) { - options = options || {}; - options.namespace = namespace; - options.prod = true; - options.dev = false; - - if (!(options.force || prod.force)) return prod.nope(options); - return prod.yep(options); -}); - -// -// Expose the diagnostics logger. -// -module.exports = diagnostics; - - -/***/ }), - -/***/ 9286: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fs = __nccwpck_require__(9896); -var fsp = __nccwpck_require__(1943); -var tools = __nccwpck_require__(807); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); - -/** - * A default ordering for monorepo tool checks. - * - * This ordering is designed to check the most typical package.json-based - * monorepo implementations first, with tools based on custom file schemas - * checked last. - */ -const DEFAULT_TOOLS = [tools.YarnTool, tools.PnpmTool, tools.LernaTool, tools.RushTool, tools.BoltTool, tools.RootTool]; -const isNoEntryError = err => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; -class NoPkgJsonFound extends Error { - constructor(directory) { - super(`No package.json could be found upwards from directory ${directory}`); - this.directory = directory; - } -} -class NoMatchingMonorepoFound extends Error { - constructor(directory) { - super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); - this.directory = directory; - } -} - -/** - * Configuration options for `findRoot` and `findRootSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return a `MonorepoRoot` object with the discovered directory and a - * corresponding monorepo `Tool` object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function findRoot(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - await findUp(async directory => { - return Promise.all(tools$1.map(async tool => { - if (await tool.isMonorepoRoot(directory)) { - return { - tool: tool, - rootDir: directory - }; - } - })).then(x => x.find(value => value)).then(result => { - if (result) { - monorepoRoot = result; - return directory; - } - }); - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - let rootDir = await findUp(async directory => { - try { - await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); - return directory; - } catch (err) { - if (!isNoEntryError(err)) { - throw err; - } - } - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} - -/** - * A synchronous version of {@link findRoot}. - */ -function findRootSync(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - findUpSync(directory => { - for (const tool of tools$1) { - if (tool.isMonorepoRootSync(directory)) { - monorepoRoot = { - tool: tool, - rootDir: directory - }; - return directory; - } - } - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - const rootDir = findUpSync(directory => { - const exists = fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")); - return exists ? directory : undefined; - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} -async function findUp(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = await matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} -function findUpSync(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} - -exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; -exports.NoPkgJsonFound = NoPkgJsonFound; -exports.findRoot = findRoot; -exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 1307: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(7544); -} else { - module.exports = __nccwpck_require__(9286); -} - - -/***/ }), - -/***/ 7544: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fs = __nccwpck_require__(9896); -var fsp = __nccwpck_require__(1943); -var tools = __nccwpck_require__(807); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); - -/** - * A default ordering for monorepo tool checks. - * - * This ordering is designed to check the most typical package.json-based - * monorepo implementations first, with tools based on custom file schemas - * checked last. - */ -const DEFAULT_TOOLS = [tools.YarnTool, tools.PnpmTool, tools.LernaTool, tools.RushTool, tools.BoltTool, tools.RootTool]; -const isNoEntryError = err => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; -class NoPkgJsonFound extends Error { - constructor(directory) { - super(`No package.json could be found upwards from directory ${directory}`); - this.directory = directory; - } -} -class NoMatchingMonorepoFound extends Error { - constructor(directory) { - super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); - this.directory = directory; - } -} - -/** - * Configuration options for `findRoot` and `findRootSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return a `MonorepoRoot` object with the discovered directory and a - * corresponding monorepo `Tool` object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function findRoot(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - await findUp(async directory => { - return Promise.all(tools$1.map(async tool => { - if (await tool.isMonorepoRoot(directory)) { - return { - tool: tool, - rootDir: directory - }; - } - })).then(x => x.find(value => value)).then(result => { - if (result) { - monorepoRoot = result; - return directory; - } - }); - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - let rootDir = await findUp(async directory => { - try { - await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); - return directory; - } catch (err) { - if (!isNoEntryError(err)) { - throw err; - } - } - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} - -/** - * A synchronous version of {@link findRoot}. - */ -function findRootSync(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - findUpSync(directory => { - for (const tool of tools$1) { - if (tool.isMonorepoRootSync(directory)) { - monorepoRoot = { - tool: tool, - rootDir: directory - }; - return directory; - } - } - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - const rootDir = findUpSync(directory => { - const exists = fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")); - return exists ? directory : undefined; - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} -async function findUp(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = await matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} -function findUpSync(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} - -exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; -exports.NoPkgJsonFound = NoPkgJsonFound; -exports.findRoot = findRoot; -exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 9425: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ value: true }); - -var path = __nccwpck_require__(6928); -var findRoot = __nccwpck_require__(1307); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); - -class PackageJsonMissingNameError extends Error { - constructor(directories) { - super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); - this.directories = directories; - } -} - -/** - * Configuration options for `getPackages` and `getPackagesSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return the collection of packages and a corresponding monorepo `Tool` - * object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function getPackages(dir, options) { - const monorepoRoot = await findRoot.findRoot(dir, options); - const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} - -/** - * A synchronous version of {@link getPackages}. - */ -function getPackagesSync(dir, options) { - const monorepoRoot = findRoot.findRootSync(dir, options); - const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} -function validatePackages(packages) { - const pkgJsonsMissingNameField = []; - for (const pkg of packages.packages) { - if (!pkg.packageJson.name) { - pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); - } - } - if (pkgJsonsMissingNameField.length > 0) { - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - } -} - -__webpack_unused_export__ = PackageJsonMissingNameError; -exports.getPackages = getPackages; -__webpack_unused_export__ = getPackagesSync; - - -/***/ }), - -/***/ 4344: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(2313); -} else { - module.exports = __nccwpck_require__(9425); -} - - -/***/ }), - -/***/ 2313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ value: true }); - -var path = __nccwpck_require__(6928); -var findRoot = __nccwpck_require__(1307); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); - -class PackageJsonMissingNameError extends Error { - constructor(directories) { - super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); - this.directories = directories; - } -} - -/** - * Configuration options for `getPackages` and `getPackagesSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return the collection of packages and a corresponding monorepo `Tool` - * object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function getPackages(dir, options) { - const monorepoRoot = await findRoot.findRoot(dir, options); - const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} - -/** - * A synchronous version of {@link getPackages}. - */ -function getPackagesSync(dir, options) { - const monorepoRoot = findRoot.findRootSync(dir, options); - const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} -function validatePackages(packages) { - const pkgJsonsMissingNameField = []; - for (const pkg of packages.packages) { - if (!pkg.packageJson.name) { - pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); - } - } - if (pkgJsonsMissingNameField.length > 0) { - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - } -} - -__webpack_unused_export__ = PackageJsonMissingNameError; -exports.getPackages = getPackages; -__webpack_unused_export__ = getPackagesSync; - - -/***/ }), - -/***/ 2610: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fsp = __nccwpck_require__(1943); -var glob = __nccwpck_require__(4838); -var fs = __nccwpck_require__(9896); -var yaml = __nccwpck_require__(1179); -var jju = __nccwpck_require__(9656); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); -var glob__default = /*#__PURE__*/_interopDefault(glob); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var yaml__default = /*#__PURE__*/_interopDefault(yaml); -var jju__default = /*#__PURE__*/_interopDefault(jju); - -/** - * A package.json access type. - */ - -/** - * An in-memory representation of a package.json file. - */ - -/** - * An individual package json structure, along with the directory it lives in, - * relative to the root of the current monorepo. - */ - -/** - * A collection of packages, along with the monorepo tool used to load them, - * and (if supported by the tool) the associated "root" package. - */ - -/** - * An object representing the root of a specific monorepo, with the root - * directory and associated monorepo tool. - * - * Note that this type is currently not used by Tool definitions directly, - * but it is the suggested way to pass around a reference to a monorepo root - * directory and associated tool. - */ - -/** - * Monorepo tools may throw this error if a caller attempts to get the package - * collection from a directory that is not a valid monorepo root. - */ -class InvalidMonorepoError extends Error {} - -/** - * A monorepo tool is a specific implementation of monorepos, whether provided built-in - * by a package manager or via some other wrapper. - * - * Each tool defines a common interface for detecting whether a directory is - * a valid instance of this type of monorepo, how to retrieve the packages, etc. - */ - -const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); -const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); - -/** - * This internal method takes a list of one or more directory globs and the absolute path - * to the root directory, and returns a list of all matching relative directories that - * contain a `package.json` file. - */ -async function expandPackageGlobs(packageGlobs, directory) { - const relativeDirectories = await glob__default["default"](packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = await Promise.all(directories.map(dir => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch(err => { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - }).then(result => { - if (result) { - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson: JSON.parse(result) - }; - } - }))); - return discoveredPackages.filter(pkg => pkg); -} - -/** - * A synchronous version of {@link expandPackagesGlobs}. - */ -function expandPackageGlobsSync(packageGlobs, directory) { - const relativeDirectories = glob__default["default"].sync(packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = directories.map(dir => { - try { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - } catch (err) { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - } - }); - return discoveredPackages.filter(pkg => pkg); -} - -const BoltTool = { - type: "bolt", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - } -}; - -const LernaTool = { - type: "lerna", - async isMonorepoRoot(directory) { - try { - const lernaJson = await readJson(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const lernaJson = readJsonSync(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = await readJson(rootDir, "lerna.json"); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = readJsonSync(rootDir, "lerna.json"); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - } -}; - -async function readYamlFile(path) { - return fsp__default["default"].readFile(path, "utf8").then(data => yaml__default["default"].load(data)); -} -function readYamlFileSync(path) { - return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); -} -const PnpmTool = { - type: "pnpm", - async isMonorepoRoot(directory) { - try { - const manifest = await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const manifest = readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - } -}; - -const RootTool = { - type: "root", - async isMonorepoRoot(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - isMonorepoRootSync(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - } -}; - -const RushTool = { - type: "rush", - async isMonorepoRoot(directory) { - try { - await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - isMonorepoRootSync(directory) { - try { - fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = await Promise.all(directories.map(async dir => { - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson: await readJson(dir, "package.json") - }; - })); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = directories.map(dir => { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - }); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - } -}; - -const YarnTool = { - type: "yarn", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - } -}; - -exports.BoltTool = BoltTool; -exports.InvalidMonorepoError = InvalidMonorepoError; -exports.LernaTool = LernaTool; -exports.PnpmTool = PnpmTool; -exports.RootTool = RootTool; -exports.RushTool = RushTool; -exports.YarnTool = YarnTool; - - -/***/ }), - -/***/ 807: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(4452); -} else { - module.exports = __nccwpck_require__(2610); -} - - -/***/ }), - -/***/ 4452: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fsp = __nccwpck_require__(1943); -var glob = __nccwpck_require__(4838); -var fs = __nccwpck_require__(9896); -var yaml = __nccwpck_require__(1179); -var jju = __nccwpck_require__(9656); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); -var glob__default = /*#__PURE__*/_interopDefault(glob); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var yaml__default = /*#__PURE__*/_interopDefault(yaml); -var jju__default = /*#__PURE__*/_interopDefault(jju); - -/** - * A package.json access type. - */ - -/** - * An in-memory representation of a package.json file. - */ - -/** - * An individual package json structure, along with the directory it lives in, - * relative to the root of the current monorepo. - */ - -/** - * A collection of packages, along with the monorepo tool used to load them, - * and (if supported by the tool) the associated "root" package. - */ - -/** - * An object representing the root of a specific monorepo, with the root - * directory and associated monorepo tool. - * - * Note that this type is currently not used by Tool definitions directly, - * but it is the suggested way to pass around a reference to a monorepo root - * directory and associated tool. - */ - -/** - * Monorepo tools may throw this error if a caller attempts to get the package - * collection from a directory that is not a valid monorepo root. - */ -class InvalidMonorepoError extends Error {} - -/** - * A monorepo tool is a specific implementation of monorepos, whether provided built-in - * by a package manager or via some other wrapper. - * - * Each tool defines a common interface for detecting whether a directory is - * a valid instance of this type of monorepo, how to retrieve the packages, etc. - */ - -const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); -const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); - -/** - * This internal method takes a list of one or more directory globs and the absolute path - * to the root directory, and returns a list of all matching relative directories that - * contain a `package.json` file. - */ -async function expandPackageGlobs(packageGlobs, directory) { - const relativeDirectories = await glob__default["default"](packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = await Promise.all(directories.map(dir => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch(err => { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - }).then(result => { - if (result) { - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson: JSON.parse(result) - }; - } - }))); - return discoveredPackages.filter(pkg => pkg); -} - -/** - * A synchronous version of {@link expandPackagesGlobs}. - */ -function expandPackageGlobsSync(packageGlobs, directory) { - const relativeDirectories = glob__default["default"].sync(packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = directories.map(dir => { - try { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - } catch (err) { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - } - }); - return discoveredPackages.filter(pkg => pkg); -} - -const BoltTool = { - type: "bolt", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - } -}; - -const LernaTool = { - type: "lerna", - async isMonorepoRoot(directory) { - try { - const lernaJson = await readJson(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const lernaJson = readJsonSync(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = await readJson(rootDir, "lerna.json"); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = readJsonSync(rootDir, "lerna.json"); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - } -}; - -async function readYamlFile(path) { - return fsp__default["default"].readFile(path, "utf8").then(data => yaml__default["default"].load(data)); -} -function readYamlFileSync(path) { - return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); -} -const PnpmTool = { - type: "pnpm", - async isMonorepoRoot(directory) { - try { - const manifest = await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const manifest = readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - } -}; - -const RootTool = { - type: "root", - async isMonorepoRoot(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - isMonorepoRootSync(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - } -}; - -const RushTool = { - type: "rush", - async isMonorepoRoot(directory) { - try { - await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - isMonorepoRootSync(directory) { - try { - fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = await Promise.all(directories.map(async dir => { - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson: await readJson(dir, "package.json") - }; - })); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = directories.map(dir => { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - }); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - } -}; - -const YarnTool = { - type: "yarn", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - } -}; - -exports.BoltTool = BoltTool; -exports.InvalidMonorepoError = InvalidMonorepoError; -exports.LernaTool = LernaTool; -exports.PnpmTool = PnpmTool; -exports.RootTool = RootTool; -exports.RushTool = RushTool; -exports.YarnTool = YarnTool; - - -/***/ }), - -/***/ 5254: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1121: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; -const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); -if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); -} -const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); -const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); -const SUPPORTED_MAJOR_VERSION = 10; -const SUPPORTED_MINOR_VERSION = 10; -const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; -const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; -/** - * IS `true` for Node.js 10.10 and greater. - */ -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - - -/***/ }), - -/***/ 1484: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.scandirSync = exports.scandir = void 0; -const async = __nccwpck_require__(9977); -const sync = __nccwpck_require__(5554); -const settings_1 = __nccwpck_require__(595); -exports.Settings = settings_1.default; -function scandir(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.scandir = scandir; -function scandirSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.scandirSync = scandirSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9977: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const rpl = __nccwpck_require__(7906); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); -} -exports.read = read; -function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; -} -function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path, settings.fsStatSettings, (error, stats) => { - if (error !== null) { - done(error); - return; - } - const entry = { - name, - path, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); -} -exports.readdir = readdir; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 9392: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = void 0; -function joinPathSegments(a, b, separator) { - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 5554: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); -} -exports.read = read; -function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } - catch (error) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error; - } - } - } - return entry; - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); -} -exports.readdir = readdir; - - -/***/ }), - -/***/ 595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const fs = __nccwpck_require__(5254); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2535: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 2046: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fs = void 0; -const fs = __nccwpck_require__(2535); -exports.fs = fs; - - -/***/ }), - -/***/ 5375: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.statSync = exports.stat = exports.Settings = void 0; -const async = __nccwpck_require__(9100); -const sync = __nccwpck_require__(4421); -const settings_1 = __nccwpck_require__(8448); -exports.Settings = settings_1.default; -function stat(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.stat = stat; -function statSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.statSync = statSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9100: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings, callback) { - settings.fs.lstat(path, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); -} -exports.read = read; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 4421: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings) { - const lstat = settings.fs.lstatSync(path); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } - catch (error) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error; - } -} -exports.read = read; - - -/***/ }), - -/***/ 8448: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs = __nccwpck_require__(5375); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2705: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; -const async_1 = __nccwpck_require__(6200); -const stream_1 = __nccwpck_require__(2); -const sync_1 = __nccwpck_require__(6345); -const settings_1 = __nccwpck_require__(2287); -exports.Settings = settings_1.default; -function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); -} -exports.walk = walk; -function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); -} -exports.walkSync = walkSync; -function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); -} -exports.walkStream = walkStream; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 6200: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(826); -class AsyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error) => { - callFailureCallback(callback, error); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } -} -exports["default"] = AsyncProvider; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, entries) { - callback(null, entries); -} - - -/***/ }), - -/***/ 2: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const async_1 = __nccwpck_require__(826); -class StreamProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error) => { - this._stream.emit('error', error); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } -} -exports["default"] = StreamProvider; - - -/***/ }), - -/***/ 6345: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(127); -class SyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } -} -exports["default"] = SyncProvider; - - -/***/ }), - -/***/ 826: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(4434); -const fsScandir = __nccwpck_require__(1484); -const fastq = __nccwpck_require__(885); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class AsyncReader extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit('end'); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error('The reader is already destroyed'); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on('entry', callback); - } - onError(callback) { - this._emitter.once('error', callback); - } - onEnd(callback) { - this._emitter.once('end', callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error) => { - if (error !== null) { - this._handleError(error); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { - if (error !== null) { - done(error, undefined); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, undefined); - }); - } - _handleError(error) { - if (this._isDestroyed || !common.isFatalError(this._settings, error)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit('error', error); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit('entry', entry); - } -} -exports["default"] = AsyncReader; - - -/***/ }), - -/***/ 5305: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; -function isFatalError(settings, error) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error); -} -exports.isFatalError = isFatalError; -function isAppliedFilter(filter, value) { - return filter === null || filter(value); -} -exports.isAppliedFilter = isAppliedFilter; -function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); -} -exports.replacePathSegmentSeparator = replacePathSegmentSeparator; -function joinPathSegments(a, b, separator) { - if (a === '') { - return b; - } - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 2983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const common = __nccwpck_require__(5305); -class Reader { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 127: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsScandir = __nccwpck_require__(1484); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class SyncReader extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } - catch (error) { - this._handleError(error); - } - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - throw error; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } -} -exports["default"] = SyncReader; - - -/***/ }), - -/***/ 2287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsScandir = __nccwpck_require__(1484); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, undefined); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 1470: -/***/ ((module) => { - - - -var cssKeywords = { - aliceblue: [240, 248, 255], - antiquewhite: [250, 235, 215], - aqua: [0, 255, 255], - aquamarine: [127, 255, 212], - azure: [240, 255, 255], - beige: [245, 245, 220], - bisque: [255, 228, 196], - black: [0, 0, 0], - blanchedalmond: [255, 235, 205], - blue: [0, 0, 255], - blueviolet: [138, 43, 226], - brown: [165, 42, 42], - burlywood: [222, 184, 135], - cadetblue: [95, 158, 160], - chartreuse: [127, 255, 0], - chocolate: [210, 105, 30], - coral: [255, 127, 80], - cornflowerblue: [100, 149, 237], - cornsilk: [255, 248, 220], - crimson: [220, 20, 60], - cyan: [0, 255, 255], - darkblue: [0, 0, 139], - darkcyan: [0, 139, 139], - darkgoldenrod: [184, 134, 11], - darkgray: [169, 169, 169], - darkgreen: [0, 100, 0], - darkgrey: [169, 169, 169], - darkkhaki: [189, 183, 107], - darkmagenta: [139, 0, 139], - darkolivegreen: [85, 107, 47], - darkorange: [255, 140, 0], - darkorchid: [153, 50, 204], - darkred: [139, 0, 0], - darksalmon: [233, 150, 122], - darkseagreen: [143, 188, 143], - darkslateblue: [72, 61, 139], - darkslategray: [47, 79, 79], - darkslategrey: [47, 79, 79], - darkturquoise: [0, 206, 209], - darkviolet: [148, 0, 211], - deeppink: [255, 20, 147], - deepskyblue: [0, 191, 255], - dimgray: [105, 105, 105], - dimgrey: [105, 105, 105], - dodgerblue: [30, 144, 255], - firebrick: [178, 34, 34], - floralwhite: [255, 250, 240], - forestgreen: [34, 139, 34], - fuchsia: [255, 0, 255], - gainsboro: [220, 220, 220], - ghostwhite: [248, 248, 255], - gold: [255, 215, 0], - goldenrod: [218, 165, 32], - gray: [128, 128, 128], - green: [0, 128, 0], - greenyellow: [173, 255, 47], - grey: [128, 128, 128], - honeydew: [240, 255, 240], - hotpink: [255, 105, 180], - indianred: [205, 92, 92], - indigo: [75, 0, 130], - ivory: [255, 255, 240], - khaki: [240, 230, 140], - lavender: [230, 230, 250], - lavenderblush: [255, 240, 245], - lawngreen: [124, 252, 0], - lemonchiffon: [255, 250, 205], - lightblue: [173, 216, 230], - lightcoral: [240, 128, 128], - lightcyan: [224, 255, 255], - lightgoldenrodyellow: [250, 250, 210], - lightgray: [211, 211, 211], - lightgreen: [144, 238, 144], - lightgrey: [211, 211, 211], - lightpink: [255, 182, 193], - lightsalmon: [255, 160, 122], - lightseagreen: [32, 178, 170], - lightskyblue: [135, 206, 250], - lightslategray: [119, 136, 153], - lightslategrey: [119, 136, 153], - lightsteelblue: [176, 196, 222], - lightyellow: [255, 255, 224], - lime: [0, 255, 0], - limegreen: [50, 205, 50], - linen: [250, 240, 230], - magenta: [255, 0, 255], - maroon: [128, 0, 0], - mediumaquamarine: [102, 205, 170], - mediumblue: [0, 0, 205], - mediumorchid: [186, 85, 211], - mediumpurple: [147, 112, 219], - mediumseagreen: [60, 179, 113], - mediumslateblue: [123, 104, 238], - mediumspringgreen: [0, 250, 154], - mediumturquoise: [72, 209, 204], - mediumvioletred: [199, 21, 133], - midnightblue: [25, 25, 112], - mintcream: [245, 255, 250], - mistyrose: [255, 228, 225], - moccasin: [255, 228, 181], - navajowhite: [255, 222, 173], - navy: [0, 0, 128], - oldlace: [253, 245, 230], - olive: [128, 128, 0], - olivedrab: [107, 142, 35], - orange: [255, 165, 0], - orangered: [255, 69, 0], - orchid: [218, 112, 214], - palegoldenrod: [238, 232, 170], - palegreen: [152, 251, 152], - paleturquoise: [175, 238, 238], - palevioletred: [219, 112, 147], - papayawhip: [255, 239, 213], - peachpuff: [255, 218, 185], - peru: [205, 133, 63], - pink: [255, 192, 203], - plum: [221, 160, 221], - powderblue: [176, 224, 230], - purple: [128, 0, 128], - rebeccapurple: [102, 51, 153], - red: [255, 0, 0], - rosybrown: [188, 143, 143], - royalblue: [65, 105, 225], - saddlebrown: [139, 69, 19], - salmon: [250, 128, 114], - sandybrown: [244, 164, 96], - seagreen: [46, 139, 87], - seashell: [255, 245, 238], - sienna: [160, 82, 45], - silver: [192, 192, 192], - skyblue: [135, 206, 235], - slateblue: [106, 90, 205], - slategray: [112, 128, 144], - slategrey: [112, 128, 144], - snow: [255, 250, 250], - springgreen: [0, 255, 127], - steelblue: [70, 130, 180], - tan: [210, 180, 140], - teal: [0, 128, 128], - thistle: [216, 191, 216], - tomato: [255, 99, 71], - turquoise: [64, 224, 208], - violet: [238, 130, 238], - wheat: [245, 222, 179], - white: [255, 255, 255], - whitesmoke: [245, 245, 245], - yellow: [255, 255, 0], - yellowgreen: [154, 205, 50] -}; - -const reverseNames = Object.create(null); - -// Create a list of reverse color names -for (const name in cssKeywords) { - if (Object.hasOwn(cssKeywords, name)) { - reverseNames[cssKeywords[name]] = name; - } -} - -const cs = { - to: {}, - get: {}, -}; - -cs.get = function (string) { - const prefix = string.slice(0, 3).toLowerCase(); - let value; - let model; - switch (prefix) { - case 'hsl': { - value = cs.get.hsl(string); - model = 'hsl'; - break; - } - - case 'hwb': { - value = cs.get.hwb(string); - model = 'hwb'; - break; - } - - default: { - value = cs.get.rgb(string); - model = 'rgb'; - break; - } - } - - if (!value) { - return null; - } - - return {model, value}; -}; - -cs.get.rgb = function (string) { - if (!string) { - return null; - } - - const abbr = /^#([a-f\d]{3,4})$/i; - const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i; - const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/; - const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/; - const keyword = /^(\w+)$/; - - let rgb = [0, 0, 0, 1]; - let match; - let i; - let hexAlpha; - - if (match = string.match(hex)) { - hexAlpha = match[2]; - match = match[1]; - - for (i = 0; i < 3; i++) { - // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 - const i2 = i * 2; - rgb[i] = Number.parseInt(match.slice(i2, i2 + 2), 16); - } - - if (hexAlpha) { - rgb[3] = Number.parseInt(hexAlpha, 16) / 255; - } - } else if (match = string.match(abbr)) { - match = match[1]; - hexAlpha = match[3]; - - for (i = 0; i < 3; i++) { - rgb[i] = Number.parseInt(match[i] + match[i], 16); - } - - if (hexAlpha) { - rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255; - } - } else if (match = string.match(rgba)) { - for (i = 0; i < 3; i++) { - rgb[i] = Number.parseInt(match[i + 1], 10); - } - - if (match[4]) { - rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]); - } - } else if (match = string.match(per)) { - for (i = 0; i < 3; i++) { - rgb[i] = Math.round(Number.parseFloat(match[i + 1]) * 2.55); - } - - if (match[4]) { - rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]); - } - } else if (match = string.match(keyword)) { - if (match[1] === 'transparent') { - return [0, 0, 0, 0]; - } - - if (!Object.hasOwn(cssKeywords, match[1])) { - return null; - } - - rgb = cssKeywords[match[1]]; - rgb[3] = 1; - - return rgb; - } else { - return null; - } - - for (i = 0; i < 3; i++) { - rgb[i] = clamp(rgb[i], 0, 255); - } - - rgb[3] = clamp(rgb[3], 0, 1); - - return rgb; -}; - -cs.get.hsl = function (string) { - if (!string) { - return null; - } - - const hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - const match = string.match(hsl); - - if (match) { - const alpha = Number.parseFloat(match[4]); - const h = ((Number.parseFloat(match[1]) % 360) + 360) % 360; - const s = clamp(Number.parseFloat(match[2]), 0, 100); - const l = clamp(Number.parseFloat(match[3]), 0, 100); - const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1); - - return [h, s, l, a]; - } - - return null; -}; - -cs.get.hwb = function (string) { - if (!string) { - return null; - } - - const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - const match = string.match(hwb); - - if (match) { - const alpha = Number.parseFloat(match[4]); - const h = ((Number.parseFloat(match[1]) % 360) + 360) % 360; - const w = clamp(Number.parseFloat(match[2]), 0, 100); - const b = clamp(Number.parseFloat(match[3]), 0, 100); - const a = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1); - return [h, w, b, a]; - } - - return null; -}; - -cs.to.hex = function (...rgba) { - return ( - '#' + - hexDouble(rgba[0]) + - hexDouble(rgba[1]) + - hexDouble(rgba[2]) + - (rgba[3] < 1 - ? (hexDouble(Math.round(rgba[3] * 255))) - : '') - ); -}; - -cs.to.rgb = function (...rgba) { - return rgba.length < 4 || rgba[3] === 1 - ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' - : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; -}; - -cs.to.rgb.percent = function (...rgba) { - const r = Math.round(rgba[0] / 255 * 100); - const g = Math.round(rgba[1] / 255 * 100); - const b = Math.round(rgba[2] / 255 * 100); - - return rgba.length < 4 || rgba[3] === 1 - ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' - : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; -}; - -cs.to.hsl = function (...hsla) { - return hsla.length < 4 || hsla[3] === 1 - ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' - : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; -}; - -// Hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax -// (hwb have alpha optional & 1 is default value) -cs.to.hwb = function (...hwba) { - let a = ''; - if (hwba.length >= 4 && hwba[3] !== 1) { - a = ', ' + hwba[3]; - } - - return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; -}; - -cs.to.keyword = function (...rgb) { - return reverseNames[rgb.slice(0, 3)]; -}; - -// Helpers -function clamp(number_, min, max) { - return Math.min(Math.max(min, number_), max); -} - -function hexDouble(number_) { - const string_ = Math.round(number_).toString(16).toUpperCase(); - return (string_.length < 2) ? '0' + string_ : string_; -} - -/* MIT license */ -/* eslint-disable no-mixed-operators */ - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert$1 = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - oklab: {channels: 3, labels: ['okl', 'oka', 'okb']}, - lch: {channels: 3, labels: 'lch'}, - oklch: {channels: 3, labels: ['okl', 'okc', 'okh']}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']}, -}; - -// LAB f(t) constant -const LAB_FT = (6 / 29) ** 3; - -// SRGB non-linear transform functions -function srgbNonlinearTransform(c) { - const cc = c > 0.003_130_8 - ? ((1.055 * (c ** (1 / 2.4))) - 0.055) - : c * 12.92; - return Math.min(Math.max(0, cc), 1); -} - -function srgbNonlinearTransformInv(c) { - return c > 0.040_45 ? (((c + 0.055) / 1.055) ** 2.4) : (c / 12.92); -} - -// Hide .channels and .labels properties -for (const model of Object.keys(convert$1)) { - if (!('channels' in convert$1[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert$1[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert$1[model].labels.length !== convert$1[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert$1[model]; - delete convert$1[model].channels; - delete convert$1[model].labels; - Object.defineProperty(convert$1[model], 'channels', {value: channels}); - Object.defineProperty(convert$1[model], 'labels', {value: labels}); -} - -convert$1.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - switch (max) { - case min: { - h = 0; - - break; - } - - case r: { - h = (g - b) / delta; - - break; - } - - case g: { - h = 2 + (b - r) / delta; - - break; - } - - case b: { - h = 4 + (r - g) / delta; - - break; - } - // No default - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert$1.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - switch (v) { - case r: { - h = bdif - gdif; - - break; - } - - case g: { - h = (1 / 3) + rdif - bdif; - - break; - } - - case b: { - h = (2 / 3) + gdif - rdif; - - break; - } - // No default - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100, - ]; -}; - -convert$1.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert$1.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert$1.rgb.oklab = function (rgb) { - // Assume sRGB - const r = srgbNonlinearTransformInv(rgb[0] / 255); - const g = srgbNonlinearTransformInv(rgb[1] / 255); - const b = srgbNonlinearTransformInv(rgb[2] / 255); - - const lp = Math.cbrt(0.412_221_470_8 * r + 0.536_332_536_3 * g + 0.051_445_992_9 * b); - const mp = Math.cbrt(0.211_903_498_2 * r + 0.680_699_545_1 * g + 0.107_396_956_6 * b); - const sp = Math.cbrt(0.088_302_461_9 * r + 0.281_718_837_6 * g + 0.629_978_700_5 * b); - - const l = 0.210_454_255_3 * lp + 0.793_617_785 * mp - 0.004_072_046_8 * sp; - const aa = 1.977_998_495_1 * lp - 2.428_592_205 * mp + 0.450_593_709_9 * sp; - const bb = 0.025_904_037_1 * lp + 0.782_771_766_2 * mp - 0.808_675_766 * sp; - - return [l * 100, aa * 100, bb * 100]; -}; - -convert$1.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert$1.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Number.POSITIVE_INFINITY; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert$1.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert$1.rgb.xyz = function (rgb) { - // Assume sRGB - const r = srgbNonlinearTransformInv(rgb[0] / 255); - const g = srgbNonlinearTransformInv(rgb[1] / 255); - const b = srgbNonlinearTransformInv(rgb[2] / 255); - - const x = (r * 0.412_456_4) + (g * 0.357_576_1) + (b * 0.180_437_5); - const y = (r * 0.212_672_9) + (g * 0.715_152_2) + (b * 0.072_175); - const z = (r * 0.019_333_9) + (g * 0.119_192) + (b * 0.950_304_1); - - return [x * 100, y * 100, z * 100]; -}; - -convert$1.rgb.lab = function (rgb) { - const xyz = convert$1.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > LAB_FT ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > LAB_FT ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > LAB_FT ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert$1.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t3; - let value; - - if (s === 0) { - value = l * 255; - return [value, value, value]; - } - - const t2 = l < 0.5 ? l * (1 + s) : l + s - l * s; - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - value = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - value = t2; - } else if (3 * t3 < 2) { - value = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - value = t1; - } - - rgb[i] = value * 255; - } - - return rgb; -}; - -convert$1.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert$1.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: { - return [v, t, p]; - } - - case 1: { - return [q, v, p]; - } - - case 2: { - return [p, v, t]; - } - - case 3: { - return [p, q, v]; - } - - case 4: { - return [t, p, v]; - } - - case 5: { - return [v, p, q]; - } - } -}; - -convert$1.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert$1.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - // eslint-disable-next-line no-bitwise - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces, default-case-last */ - switch (i) { - default: - case 6: - case 0: { r = v; g = n; b = wh; break; - } - - case 1: { r = n; g = v; b = wh; break; - } - - case 2: { r = wh; g = v; b = n; break; - } - - case 3: { r = wh; g = n; b = v; break; - } - - case 4: { r = n; g = wh; b = v; break; - } - - case 5: { r = v; g = wh; b = n; break; - } - } - /* eslint-enable max-statements-per-line,no-multi-spaces, default-case-last */ - - return [r * 255, g * 255, b * 255]; -}; - -convert$1.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert$1.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.240_454_2) + (y * -1.537_138_5) + (z * -0.498_531_4); - g = (x * -0.969_266) + (y * 1.876_010_8) + (z * 0.041_556); - b = (x * 0.055_643_4) + (y * -0.204_025_9) + (z * 1.057_225_2); - - // Assume sRGB - r = srgbNonlinearTransform(r); - g = srgbNonlinearTransform(g); - b = srgbNonlinearTransform(b); - - return [r * 255, g * 255, b * 255]; -}; - -convert$1.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > LAB_FT ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > LAB_FT ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > LAB_FT ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert$1.xyz.oklab = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - - const lp = Math.cbrt(0.818_933_010_1 * x + 0.361_866_742_4 * y - 0.128_859_713_7 * z); - const mp = Math.cbrt(0.032_984_543_6 * x + 0.929_311_871_5 * y + 0.036_145_638_7 * z); - const sp = Math.cbrt(0.048_200_301_8 * x + 0.264_366_269_1 * y + 0.633_851_707 * z); - - const l = 0.210_454_255_3 * lp + 0.793_617_785 * mp - 0.004_072_046_8 * sp; - const a = 1.977_998_495_1 * lp - 2.428_592_205 * mp + 0.450_593_709_9 * sp; - const b = 0.025_904_037_1 * lp + 0.782_771_766_2 * mp - 0.808_675_766 * sp; - - return [l * 100, a * 100, b * 100]; -}; - -convert$1.oklab.oklch = function (oklab) { - return convert$1.lab.lch(oklab); -}; - -convert$1.oklab.xyz = function (oklab) { - const ll = oklab[0] / 100; - const a = oklab[1] / 100; - const b = oklab[2] / 100; - - const l = (0.999_999_998 * ll + 0.396_337_792 * a + 0.215_803_758 * b) ** 3; - const m = (1.000_000_008 * ll - 0.105_561_342 * a - 0.063_854_175 * b) ** 3; - const s = (1.000_000_055 * ll - 0.089_484_182 * a - 1.291_485_538 * b) ** 3; - - const x = 1.227_013_851 * l - 0.557_799_98 * m + 0.281_256_149 * s; - const y = -0.040_580_178 * l + 1.112_256_87 * m - 0.071_676_679 * s; - const z = -0.076_381_285 * l - 0.421_481_978 * m + 1.586_163_22 * s; - - return [x * 100, y * 100, z * 100]; -}; - -convert$1.oklab.rgb = function (oklab) { - const ll = oklab[0] / 100; - const aa = oklab[1] / 100; - const bb = oklab[2] / 100; - - const l = (ll + 0.396_337_777_4 * aa + 0.215_803_757_3 * bb) ** 3; - const m = (ll - 0.105_561_345_8 * aa - 0.063_854_172_8 * bb) ** 3; - const s = (ll - 0.089_484_177_5 * aa - 1.291_485_548 * bb) ** 3; - - // Assume sRGB - const r = srgbNonlinearTransform(4.076_741_662_1 * l - 3.307_711_591_3 * m + 0.230_969_929_2 * s); - const g = srgbNonlinearTransform(-1.268_438_004_6 * l + 2.609_757_401_1 * m - 0.341_319_396_5 * s); - const b = srgbNonlinearTransform(-0.004_196_086_3 * l - 0.703_418_614_7 * m + 1.707_614_701 * s); - - return [r * 255, g * 255, b * 255]; -}; - -convert$1.oklch.oklab = function (oklch) { - return convert$1.lch.lab(oklch); -}; - -convert$1.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > LAB_FT ? y2 : (y - 16 / 116) / 7.787; - x = x2 > LAB_FT ? x2 : (x - 16 / 116) / 7.787; - z = z2 > LAB_FT ? z2 : (z - 16 / 116) / 7.787; - - // Illuminant D65 XYZ Tristrimulus Values - // https://en.wikipedia.org/wiki/CIE_1931_color_space - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert$1.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert$1.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert$1.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - /* eslint-disable no-bitwise */ - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - /* eslint-enable no-bitwise */ - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert$1.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]); -}; - -convert$1.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - // eslint-disable-next-line no-bitwise - if (r >> 4 === g >> 4 && g >> 4 === b >> 4) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert$1.ansi16.rgb = function (args) { - args = args[0]; - - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (Math.trunc(args > 50) + 1) * 0.5; - /* eslint-disable no-bitwise */ - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - /* eslint-enable no-bitwise */ - - return [r, g, b]; -}; - -convert$1.ansi256.rgb = function (args) { - args = args[0]; - - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert$1.rgb.hex = function (args) { - /* eslint-disable no-bitwise */ - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - /* eslint-enable no-bitwise */ - - const string = integer.toString(16).toUpperCase(); - return '000000'.slice(string.length) + string; -}; - -convert$1.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = [...colorString].map(char => char + char).join(''); - } - - const integer = Number.parseInt(colorString, 16); - /* eslint-disable no-bitwise */ - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - /* eslint-enable no-bitwise */ - - return [r, g, b]; -}; - -convert$1.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let hue; - - const grayscale = chroma < 1 ? min / (1 - chroma) : 0; - - if (chroma <= 0) { - hue = 0; - } else if (max === r) { - hue = ((g - b) / chroma) % 6; - } else if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert$1.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2 * s * l) : (2 * s * (1 - l)); - - let f = 0; - if (c < 1) { - f = (l - 0.5 * c) / (1 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert$1.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert$1.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: { - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - } - - case 1: { - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - } - - case 2: { - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - } - - case 3: { - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - } - - case 4: { - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - } - - default: { - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - } - /* eslint-enable max-statements-per-line */ - - mg = (1 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255, - ]; -}; - -convert$1.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1 - c); - let f = 0; - - if (v > 0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert$1.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1 - c) + 0.5 * c; - let s = 0; - - if (l > 0 && l < 0.5) { - s = c / (2 * l); - } else if (l >= 0.5 && l < 1) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert$1.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert$1.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert$1.apple.rgb = function (apple) { - return [(apple[0] / 65_535) * 255, (apple[1] / 65_535) * 255, (apple[2] / 65_535) * 255]; -}; - -convert$1.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65_535, (rgb[1] / 255) * 65_535, (rgb[2] / 255) * 65_535]; -}; - -convert$1.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert$1.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert$1.gray.hsv = convert$1.gray.hsl; - -convert$1.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert$1.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert$1.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert$1.gray.hex = function (gray) { - /* eslint-disable no-bitwise */ - const value = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (value << 16) + (value << 8) + value; - /* eslint-enable no-bitwise */ - - const string = integer.toString(16).toUpperCase(); - return '000000'.slice(string.length) + string; -}; - -convert$1.rgb.gray = function (rgb) { - const value = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [value / 255 * 100]; -}; - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(convert$1); - - for (let {length} = models, i = 0; i < length; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null, - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length > 0) { - const current = queue.pop(); - const adjacents = Object.keys(convert$1[current]); - - for (let {length} = adjacents, i = 0; i < length; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = convert$1[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(convert$1[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -function route(fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let {length} = models, i = 0; i < length; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -} - -const convert = {}; - -const models = Object.keys(convert$1); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let {length} = result, i = 0; i < length; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -for (const fromModel of models) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: convert$1[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: convert$1[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - for (const toModel of routeModels) { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - } -} - -const skippedModels = [ - // To be honest, I don't really feel like keyword belongs in color convert, but eh. - 'keyword', - - // Gray conflicts with some method names, and has its own method defined. - 'gray', - - // Shouldn't really be in color-convert either... - 'hex', -]; - -const hashedModelKeys = {}; -for (const model of Object.keys(convert)) { - hashedModelKeys[[...convert[model].labels].sort().join('')] = model; -} - -const limiters = {}; - -function Color(object, model) { - if (!(this instanceof Color)) { - return new Color(object, model); - } - - if (model && model in skippedModels) { - model = null; - } - - if (model && !(model in convert)) { - throw new Error('Unknown model: ' + model); - } - - let i; - let channels; - - if (object == null) { // eslint-disable-line no-eq-null,eqeqeq - this.model = 'rgb'; - this.color = [0, 0, 0]; - this.valpha = 1; - } else if (object instanceof Color) { - this.model = object.model; - this.color = [...object.color]; - this.valpha = object.valpha; - } else if (typeof object === 'string') { - const result = cs.get(object); - if (result === null) { - throw new Error('Unable to parse color from string: ' + object); - } - - this.model = result.model; - channels = convert[this.model].channels; - this.color = result.value.slice(0, channels); - this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; - } else if (object.length > 0) { - this.model = model || 'rgb'; - channels = convert[this.model].channels; - const newArray = Array.prototype.slice.call(object, 0, channels); - this.color = zeroArray(newArray, channels); - this.valpha = typeof object[channels] === 'number' ? object[channels] : 1; - } else if (typeof object === 'number') { - // This is always RGB - can be converted later on. - this.model = 'rgb'; - this.color = [ - (object >> 16) & 0xFF, - (object >> 8) & 0xFF, - object & 0xFF, - ]; - this.valpha = 1; - } else { - this.valpha = 1; - - const keys = Object.keys(object); - if ('alpha' in object) { - keys.splice(keys.indexOf('alpha'), 1); - this.valpha = typeof object.alpha === 'number' ? object.alpha : 0; - } - - const hashedKeys = keys.sort().join(''); - if (!(hashedKeys in hashedModelKeys)) { - throw new Error('Unable to parse color from object: ' + JSON.stringify(object)); - } - - this.model = hashedModelKeys[hashedKeys]; - - const {labels} = convert[this.model]; - const color = []; - for (i = 0; i < labels.length; i++) { - color.push(object[labels[i]]); - } - - this.color = zeroArray(color); - } - - // Perform limitations (clamping, etc.) - if (limiters[this.model]) { - channels = convert[this.model].channels; - for (i = 0; i < channels; i++) { - const limit = limiters[this.model][i]; - if (limit) { - this.color[i] = limit(this.color[i]); - } - } - } - - this.valpha = Math.max(0, Math.min(1, this.valpha)); - - if (Object.freeze) { - Object.freeze(this); - } -} - -Color.prototype = { - toString() { - return this.string(); - }, - - toJSON() { - return this[this.model](); - }, - - string(places) { - let self = this.model in cs.to ? this : this.rgb(); - self = self.round(typeof places === 'number' ? places : 1); - const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha]; - return cs.to[self.model](...arguments_); - }, - - percentString(places) { - const self = this.rgb().round(typeof places === 'number' ? places : 1); - const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha]; - return cs.to.rgb.percent(...arguments_); - }, - - array() { - return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha]; - }, - - object() { - const result = {}; - const {channels} = convert[this.model]; - const {labels} = convert[this.model]; - - for (let i = 0; i < channels; i++) { - result[labels[i]] = this.color[i]; - } - - if (this.valpha !== 1) { - result.alpha = this.valpha; - } - - return result; - }, - - unitArray() { - const rgb = this.rgb().color; - rgb[0] /= 255; - rgb[1] /= 255; - rgb[2] /= 255; - - if (this.valpha !== 1) { - rgb.push(this.valpha); - } - - return rgb; - }, - - unitObject() { - const rgb = this.rgb().object(); - rgb.r /= 255; - rgb.g /= 255; - rgb.b /= 255; - - if (this.valpha !== 1) { - rgb.alpha = this.valpha; - } - - return rgb; - }, - - round(places) { - places = Math.max(places || 0, 0); - return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model); - }, - - alpha(value) { - if (value !== undefined) { - return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model); - } - - return this.valpha; - }, - - // Rgb - red: getset('rgb', 0, maxfn(255)), - green: getset('rgb', 1, maxfn(255)), - blue: getset('rgb', 2, maxfn(255)), - - hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360), - - saturationl: getset('hsl', 1, maxfn(100)), - lightness: getset('hsl', 2, maxfn(100)), - - saturationv: getset('hsv', 1, maxfn(100)), - value: getset('hsv', 2, maxfn(100)), - - chroma: getset('hcg', 1, maxfn(100)), - gray: getset('hcg', 2, maxfn(100)), - - white: getset('hwb', 1, maxfn(100)), - wblack: getset('hwb', 2, maxfn(100)), - - cyan: getset('cmyk', 0, maxfn(100)), - magenta: getset('cmyk', 1, maxfn(100)), - yellow: getset('cmyk', 2, maxfn(100)), - black: getset('cmyk', 3, maxfn(100)), - - x: getset('xyz', 0, maxfn(95.047)), - y: getset('xyz', 1, maxfn(100)), - z: getset('xyz', 2, maxfn(108.833)), - - l: getset('lab', 0, maxfn(100)), - a: getset('lab', 1), - b: getset('lab', 2), - - keyword(value) { - if (value !== undefined) { - return new Color(value); - } - - return convert[this.model].keyword(this.color); - }, - - hex(value) { - if (value !== undefined) { - return new Color(value); - } - - return cs.to.hex(...this.rgb().round().color); - }, - - hexa(value) { - if (value !== undefined) { - return new Color(value); - } - - const rgbArray = this.rgb().round().color; - - let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase(); - if (alphaHex.length === 1) { - alphaHex = '0' + alphaHex; - } - - return cs.to.hex(...rgbArray) + alphaHex; - }, - - rgbNumber() { - const rgb = this.rgb().color; - return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); - }, - - luminosity() { - // http://www.w3.org/TR/WCAG20/#relativeluminancedef - const rgb = this.rgb().color; - - const lum = []; - for (const [i, element] of rgb.entries()) { - const chan = element / 255; - lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4; - } - - return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; - }, - - contrast(color2) { - // http://www.w3.org/TR/WCAG20/#contrast-ratiodef - const lum1 = this.luminosity(); - const lum2 = color2.luminosity(); - - if (lum1 > lum2) { - return (lum1 + 0.05) / (lum2 + 0.05); - } - - return (lum2 + 0.05) / (lum1 + 0.05); - }, - - level(color2) { - // https://www.w3.org/TR/WCAG/#contrast-enhanced - const contrastRatio = this.contrast(color2); - if (contrastRatio >= 7) { - return 'AAA'; - } - - return (contrastRatio >= 4.5) ? 'AA' : ''; - }, - - isDark() { - // YIQ equation from http://24ways.org/2010/calculating-color-contrast - const rgb = this.rgb().color; - const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000; - return yiq < 128; - }, - - isLight() { - return !this.isDark(); - }, - - negate() { - const rgb = this.rgb(); - for (let i = 0; i < 3; i++) { - rgb.color[i] = 255 - rgb.color[i]; - } - - return rgb; - }, - - lighten(ratio) { - const hsl = this.hsl(); - hsl.color[2] += hsl.color[2] * ratio; - return hsl; - }, - - darken(ratio) { - const hsl = this.hsl(); - hsl.color[2] -= hsl.color[2] * ratio; - return hsl; - }, - - saturate(ratio) { - const hsl = this.hsl(); - hsl.color[1] += hsl.color[1] * ratio; - return hsl; - }, - - desaturate(ratio) { - const hsl = this.hsl(); - hsl.color[1] -= hsl.color[1] * ratio; - return hsl; - }, - - whiten(ratio) { - const hwb = this.hwb(); - hwb.color[1] += hwb.color[1] * ratio; - return hwb; - }, - - blacken(ratio) { - const hwb = this.hwb(); - hwb.color[2] += hwb.color[2] * ratio; - return hwb; - }, - - grayscale() { - // http://en.wikipedia.org/wiki/Grayscale#Converting_colour_to_grayscale - const rgb = this.rgb().color; - const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; - return Color.rgb(value, value, value); - }, - - fade(ratio) { - return this.alpha(this.valpha - (this.valpha * ratio)); - }, - - opaquer(ratio) { - return this.alpha(this.valpha + (this.valpha * ratio)); - }, - - rotate(degrees) { - const hsl = this.hsl(); - let hue = hsl.color[0]; - hue = (hue + degrees) % 360; - hue = hue < 0 ? 360 + hue : hue; - hsl.color[0] = hue; - return hsl; - }, - - mix(mixinColor, weight) { - // Ported from sass implementation in C - // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 - if (!mixinColor || !mixinColor.rgb) { - throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); - } - - const color1 = mixinColor.rgb(); - const color2 = this.rgb(); - const p = weight === undefined ? 0.5 : weight; - - const w = 2 * p - 1; - const a = color1.alpha() - color2.alpha(); - - const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2; - const w2 = 1 - w1; - - return Color.rgb( - w1 * color1.red() + w2 * color2.red(), - w1 * color1.green() + w2 * color2.green(), - w1 * color1.blue() + w2 * color2.blue(), - color1.alpha() * p + color2.alpha() * (1 - p)); - }, -}; - -// Model conversion methods and static constructors -for (const model of Object.keys(convert)) { - if (skippedModels.includes(model)) { - continue; - } - - const {channels} = convert[model]; - - // Conversion methods - Color.prototype[model] = function (...arguments_) { - if (this.model === model) { - return new Color(this); - } - - if (arguments_.length > 0) { - return new Color(arguments_, model); - } - - return new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model); - }; - - // 'static' construction methods - Color[model] = function (...arguments_) { - let color = arguments_[0]; - if (typeof color === 'number') { - color = zeroArray(arguments_, channels); - } - - return new Color(color, model); - }; -} - -function roundTo(number, places) { - return Number(number.toFixed(places)); -} - -function roundToPlace(places) { - return function (number) { - return roundTo(number, places); - }; -} - -function getset(model, channel, modifier) { - model = Array.isArray(model) ? model : [model]; - - for (const m of model) { - (limiters[m] ||= [])[channel] = modifier; - } - - model = model[0]; - - return function (value) { - let result; - - if (value !== undefined) { - if (modifier) { - value = modifier(value); - } - - result = this[model](); - result.color[channel] = value; - return result; - } - - result = this[model]().color[channel]; - if (modifier) { - result = modifier(result); - } - - return result; - }; -} - -function maxfn(max) { - return function (v) { - return Math.max(0, Math.min(max, v)); - }; -} - -function assertArray(value) { - return Array.isArray(value) ? value : [value]; -} - -function zeroArray(array, length) { - for (let i = 0; i < length; i++) { - if (typeof array[i] !== 'number') { - array[i] = 0; - } - } - - return array; -} - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -/*** - * Convert string to hex color. - * - * @param {String} str Text to hash and convert to hex. - * @returns {String} - * @api public - */ -var textHex = function hex(str) { - for ( - var i = 0, hash = 0; - i < str.length; - hash = str.charCodeAt(i++) + ((hash << 5) - hash) - ); - - var color = Math.floor( - Math.abs( - (Math.sin(hash) * 10000) % 1 * 16777216 - ) - ).toString(16); - - return '#' + Array(6 - color.length + 1).join('0') + color; -}; - -var hex = /*@__PURE__*/getDefaultExportFromCjs(textHex); - -/** - * Generate a color for a given name. But be reasonably smart about it by - * understanding name spaces and coloring each namespace a bit lighter so they - * still have the same base color as the root. - * - * @param {string} namespace The namespace - * @param {string} [delimiter] The delimiter - * @returns {string} color - */ -function colorspace(namespace, delimiter) { - const split = namespace.split(delimiter || ':'); - let base = hex(split[0]); - if (!split.length) return base; - for (let i = 0, l = split.length - 1; i < l; i++) { - base = Color(base).mix(Color(hex(split[i + 1]))).saturate(1).hex(); - } - return base; -} - -module.exports = colorspace; - - -/***/ }), - -/***/ 9325: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = __nccwpck_require__(4434); -const debug_1 = __importDefault(__nccwpck_require__(6675)); -const promisify_1 = __importDefault(__nccwpck_require__(7733)); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 7733: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; -} -exports["default"] = promisify; -//# sourceMappingURL=promisify.js.map - -/***/ }), - -/***/ 9672: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = asyncify; - -var _initialParams = __nccwpck_require__(2262); - -var _initialParams2 = _interopRequireDefault(_initialParams); - -var _setImmediate = __nccwpck_require__(7247); - -var _setImmediate2 = _interopRequireDefault(_setImmediate); - -var _wrapAsync = __nccwpck_require__(8608); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ -function asyncify(func) { - if ((0, _wrapAsync.isAsync)(func)) { - return function (...args /*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback); - }; - } - - return (0, _initialParams2.default)(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback); - } else { - callback(null, result); - } - }); -} - -function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); - }); -} - -function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - (0, _setImmediate2.default)(e => { - throw e; - }, err); - } -} -module.exports = exports.default; - -/***/ }), - -/***/ 3998: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _isArrayLike = __nccwpck_require__(738); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _breakLoop = __nccwpck_require__(2149); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -var _eachOfLimit = __nccwpck_require__(6163); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _once = __nccwpck_require__(2127); - -var _once2 = _interopRequireDefault(_once); - -var _onlyOnce = __nccwpck_require__(25); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = __nccwpck_require__(8608); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = __nccwpck_require__(9770); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// eachOf implementation optimized for array-likes -function eachOfArrayLike(coll, iteratee, callback) { - callback = (0, _once2.default)(callback); - var index = 0, - completed = 0, - { length } = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return; - if (err) { - callback(err); - } else if (++completed === length || value === _breakLoop2.default) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback)); - } -} - -// a generic version of eachOf which can handle array, object, and iterator cases. -function eachOfGeneric(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback); -} - -/** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ -function eachOf(coll, iteratee, callback) { - var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports["default"] = (0, _awaitify2.default)(eachOf, 3); -module.exports = exports.default; - -/***/ }), - -/***/ 6163: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _eachOfLimit2 = __nccwpck_require__(1611); - -var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2); - -var _wrapAsync = __nccwpck_require__(8608); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = __nccwpck_require__(9770); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfLimit(coll, limit, iteratee, callback) { - return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback); -} - -exports["default"] = (0, _awaitify2.default)(eachOfLimit, 4); -module.exports = exports.default; - -/***/ }), - -/***/ 3223: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _eachOfLimit = __nccwpck_require__(6163); - -var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); - -var _awaitify = __nccwpck_require__(9770); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ -function eachOfSeries(coll, iteratee, callback) { - return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback); -} -exports["default"] = (0, _awaitify2.default)(eachOfSeries, 3); -module.exports = exports.default; - -/***/ }), - -/***/ 3342: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _eachOf = __nccwpck_require__(3998); - -var _eachOf2 = _interopRequireDefault(_eachOf); - -var _withoutIndex = __nccwpck_require__(2982); - -var _withoutIndex2 = _interopRequireDefault(_withoutIndex); - -var _wrapAsync = __nccwpck_require__(8608); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = __nccwpck_require__(9770); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ -function eachLimit(coll, iteratee, callback) { - return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); -} - -exports["default"] = (0, _awaitify2.default)(eachLimit, 3); -module.exports = exports.default; - -/***/ }), - -/***/ 2985: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = asyncEachOfLimit; - -var _breakLoop = __nccwpck_require__(2149); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// for async generators -function asyncEachOfLimit(generator, limit, iteratee, callback) { - let done = false; - let canceled = false; - let awaiting = false; - let running = 0; - let idx = 0; - - function replenish() { - //console.log('replenish') - if (running >= limit || awaiting || done) return; - //console.log('replenish awaiting') - awaiting = true; - generator.next().then(({ value, done: iterDone }) => { - //console.log('got value', value) - if (canceled || done) return; - awaiting = false; - if (iterDone) { - done = true; - if (running <= 0) { - //console.log('done nextCb') - callback(null); - } - return; - } - running++; - iteratee(value, idx, iterateeCallback); - idx++; - replenish(); - }).catch(handleError); - } - - function iterateeCallback(err, result) { - //console.log('iterateeCallback') - running -= 1; - if (canceled) return; - if (err) return handleError(err); - - if (err === false) { - done = true; - canceled = true; - return; - } - - if (result === _breakLoop2.default || done && running <= 0) { - done = true; - //console.log('done iterCb') - return callback(null); - } - replenish(); - } - - function handleError(err) { - if (canceled) return; - awaiting = false; - done = true; - callback(err); - } - - replenish(); -} -module.exports = exports.default; - -/***/ }), - -/***/ 9770: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = awaitify; -// conditionally promisify a function. -// only return a promise if a callback is omitted -function awaitify(asyncFn, arity) { - if (!arity) arity = asyncFn.length; - if (!arity) throw new Error('arity is undefined'); - function awaitable(...args) { - if (typeof args[arity - 1] === 'function') { - return asyncFn.apply(this, args); - } - - return new Promise((resolve, reject) => { - args[arity - 1] = (err, ...cbArgs) => { - if (err) return reject(err); - resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); - }; - asyncFn.apply(this, args); - }); - } - - return awaitable; -} -module.exports = exports.default; - -/***/ }), - -/***/ 2149: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -// A temporary value used to identify if the loop should be broken. -// See #1064, #1293 -const breakLoop = {}; -exports["default"] = breakLoop; -module.exports = exports.default; - -/***/ }), - -/***/ 1611: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _once = __nccwpck_require__(2127); - -var _once2 = _interopRequireDefault(_once); - -var _iterator = __nccwpck_require__(4128); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _onlyOnce = __nccwpck_require__(25); - -var _onlyOnce2 = _interopRequireDefault(_onlyOnce); - -var _wrapAsync = __nccwpck_require__(8608); - -var _asyncEachOfLimit = __nccwpck_require__(2985); - -var _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit); - -var _breakLoop = __nccwpck_require__(2149); - -var _breakLoop2 = _interopRequireDefault(_breakLoop); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports["default"] = limit => { - return (obj, iteratee, callback) => { - callback = (0, _once2.default)(callback); - if (limit <= 0) { - throw new RangeError('concurrency limit cannot be less than 1'); - } - if (!obj) { - return callback(null); - } - if ((0, _wrapAsync.isAsyncGenerator)(obj)) { - return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback); - } - if ((0, _wrapAsync.isAsyncIterable)(obj)) { - return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback); - } - var nextElem = (0, _iterator2.default)(obj); - var done = false; - var canceled = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - if (canceled) return; - running -= 1; - if (err) { - done = true; - callback(err); - } else if (err === false) { - done = true; - canceled = true; - } else if (value === _breakLoop2.default || done && running <= 0) { - done = true; - return callback(null); - } else if (!looping) { - replenish(); - } - } - - function replenish() { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; -}; - -module.exports = exports.default; - -/***/ }), - -/***/ 2242: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -exports["default"] = function (coll) { - return coll[Symbol.iterator] && coll[Symbol.iterator](); -}; - -module.exports = exports.default; - -/***/ }), - -/***/ 2262: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -exports["default"] = function (fn) { - return function (...args /*, callback*/) { - var callback = args.pop(); - return fn.call(this, args, callback); - }; -}; - -module.exports = exports.default; - -/***/ }), - -/***/ 738: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isArrayLike; -function isArrayLike(value) { - return value && typeof value.length === 'number' && value.length >= 0 && value.length % 1 === 0; -} -module.exports = exports.default; - -/***/ }), - -/***/ 4128: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = createIterator; - -var _isArrayLike = __nccwpck_require__(738); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _getIterator = __nccwpck_require__(2242); - -var _getIterator2 = _interopRequireDefault(_getIterator); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? { value: coll[i], key: i } : null; - }; -} - -function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) return null; - i++; - return { value: item.value, key: i }; - }; -} - -function createObjectIterator(obj) { - var okeys = obj ? Object.keys(obj) : []; - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? { value: obj[key], key } : null; - }; -} - -function createIterator(coll) { - if ((0, _isArrayLike2.default)(coll)) { - return createArrayIterator(coll); - } - - var iterator = (0, _getIterator2.default)(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); -} -module.exports = exports.default; - -/***/ }), - -/***/ 2127: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = once; -function once(fn) { - function wrapper(...args) { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, args); - } - Object.assign(wrapper, fn); - return wrapper; -} -module.exports = exports.default; - -/***/ }), - -/***/ 25: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = onlyOnce; -function onlyOnce(fn) { - return function (...args) { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, args); - }; -} -module.exports = exports.default; - -/***/ }), - -/***/ 9129: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _isArrayLike = __nccwpck_require__(738); - -var _isArrayLike2 = _interopRequireDefault(_isArrayLike); - -var _wrapAsync = __nccwpck_require__(8608); - -var _wrapAsync2 = _interopRequireDefault(_wrapAsync); - -var _awaitify = __nccwpck_require__(9770); - -var _awaitify2 = _interopRequireDefault(_awaitify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports["default"] = (0, _awaitify2.default)((eachfn, tasks, callback) => { - var results = (0, _isArrayLike2.default)(tasks) ? [] : {}; - - eachfn(tasks, (task, key, taskCb) => { - (0, _wrapAsync2.default)(task)((err, ...result) => { - if (result.length < 2) { - [result] = result; - } - results[key] = result; - taskCb(err); - }); - }, err => callback(err, results)); -}, 3); -module.exports = exports.default; - -/***/ }), - -/***/ 7247: -/***/ ((__unused_webpack_module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.fallback = fallback; -exports.wrap = wrap; -/* istanbul ignore file */ - -var hasQueueMicrotask = exports.hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; -var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; -var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - -function fallback(fn) { - setTimeout(fn, 0); -} - -function wrap(defer) { - return (fn, ...args) => defer(() => fn(...args)); -} - -var _defer; - -if (hasQueueMicrotask) { - _defer = queueMicrotask; -} else if (hasSetImmediate) { - _defer = setImmediate; -} else if (hasNextTick) { - _defer = process.nextTick; -} else { - _defer = fallback; -} - -exports["default"] = wrap(_defer); - -/***/ }), - -/***/ 2982: -/***/ ((module, exports) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _withoutIndex; -function _withoutIndex(iteratee) { - return (value, index, callback) => iteratee(value, callback); -} -module.exports = exports.default; - -/***/ }), - -/***/ 8608: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.isAsyncIterable = exports.isAsyncGenerator = exports.isAsync = undefined; - -var _asyncify = __nccwpck_require__(9672); - -var _asyncify2 = _interopRequireDefault(_asyncify); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isAsync(fn) { - return fn[Symbol.toStringTag] === 'AsyncFunction'; -} - -function isAsyncGenerator(fn) { - return fn[Symbol.toStringTag] === 'AsyncGenerator'; -} - -function isAsyncIterable(obj) { - return typeof obj[Symbol.asyncIterator] === 'function'; -} - -function wrapAsync(asyncFn) { - if (typeof asyncFn !== 'function') throw new Error('expected a function'); - return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; -} - -exports["default"] = wrapAsync; -exports.isAsync = isAsync; -exports.isAsyncGenerator = isAsyncGenerator; -exports.isAsyncIterable = isAsyncIterable; - -/***/ }), - -/***/ 491: -/***/ ((module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = series; - -var _parallel2 = __nccwpck_require__(9129); - -var _parallel3 = _interopRequireDefault(_parallel2); - -var _eachOfSeries = __nccwpck_require__(3223); - -var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @return {Promise} a promise, if no callback is passed - * @example - * - * //Using Callbacks - * async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] - * }); - * - * // an example using objects instead of arrays - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.series([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ -function series(tasks, callback) { - return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback); -} -module.exports = exports.default; - -/***/ }), - -/***/ 8915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = -{ - parallel : __nccwpck_require__(9612), - serial : __nccwpck_require__(1851), - serialOrdered : __nccwpck_require__(1742) -}; - - -/***/ }), - -/***/ 6941: -/***/ ((module) => { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ 7563: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var defer = __nccwpck_require__(9851); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} - - -/***/ }), - -/***/ 9851: -/***/ ((module) => { - -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} - - -/***/ }), - -/***/ 3493: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var async = __nccwpck_require__(7563) - , abort = __nccwpck_require__(6941) - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ 1606: -/***/ ((module) => { - -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ 4718: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var abort = __nccwpck_require__(6941) - , async = __nccwpck_require__(7563) - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ 9612: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(3493) - , initState = __nccwpck_require__(1606) - , terminator = __nccwpck_require__(4718) - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} - - -/***/ }), - -/***/ 1851: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var serialOrdered = __nccwpck_require__(1742); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} - - -/***/ }), - -/***/ 1742: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(3493) - , initState = __nccwpck_require__(1606) - , terminator = __nccwpck_require__(4718) - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ 8671: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); -const compile = __nccwpck_require__(4898); -const expand = __nccwpck_require__(5331); -const parse = __nccwpck_require__(168); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; - - -/***/ }), - -/***/ 4898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const utils = __nccwpck_require__(2474); - -const compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - - if (node.isClose === true) { - console.log('node.isClose', prefix, node.value); - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? prefix + node.value : '('; - } - - if (node.type === 'close') { - return invalid ? prefix + node.value : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - - return output; - }; - - return walk(ast); -}; - -module.exports = compile; - - -/***/ }), - -/***/ 1778: -/***/ ((module) => { - - - -module.exports = { - MAX_LENGTH: 10000, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; - - -/***/ }), - -/***/ 5331: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const stringify = __nccwpck_require__(3062); -const utils = __nccwpck_require__(2474); - -const append = (queue = '', stash = '', enclose = false) => { - const result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; - - const walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; - - -/***/ }), - -/***/ 168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __nccwpck_require__(1778); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - const opts = options || {}; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - const ast = { type: 'root', input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - const open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - const brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - const type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - const parent = stack[stack.length - 1]; - const index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 3062: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(2474); - -module.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - - - -/***/ }), - -/***/ 2474: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - const node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - - if (Array.isArray(ele)) { - flat(ele); - continue; - } - - if (ele !== undefined) { - result.push(ele); - } - } - return result; - }; - - flat(args); - return result; -}; - - -/***/ }), - -/***/ 1648: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var bind = __nccwpck_require__(7797); - -var $apply = __nccwpck_require__(4834); -var $call = __nccwpck_require__(8772); -var $reflectApply = __nccwpck_require__(9095); - -/** @type {import('./actualApply')} */ -module.exports = $reflectApply || bind.call($call, $apply); - - -/***/ }), - -/***/ 4834: -/***/ ((module) => { - - - -/** @type {import('./functionApply')} */ -module.exports = Function.prototype.apply; - - -/***/ }), - -/***/ 8772: -/***/ ((module) => { - - - -/** @type {import('./functionCall')} */ -module.exports = Function.prototype.call; - - -/***/ }), - -/***/ 2462: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var bind = __nccwpck_require__(7797); -var $TypeError = __nccwpck_require__(7166); - -var $call = __nccwpck_require__(8772); -var $actualApply = __nccwpck_require__(1648); - -/** @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('a function is required'); - } - return $actualApply(bind, $call, args); -}; - - -/***/ }), - -/***/ 9095: -/***/ ((module) => { - - - -/** @type {import('./reflectApply')} */ -module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - - -/***/ }), - -/***/ 7814: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(9023); -var Stream = (__nccwpck_require__(2203).Stream); -var DelayedStream = __nccwpck_require__(3369); - -module.exports = CombinedStream; -function CombinedStream() { - 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.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); - } - } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; - } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.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.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.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.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } - - self.dataSize += stream.dataSize; - }); - - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; - -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; - - -/***/ }), - -/***/ 471: -/***/ ((module, exports, __nccwpck_require__) => { - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = __nccwpck_require__(1210)(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - - -/***/ }), - -/***/ 1210: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(6987); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; - - -/***/ }), - -/***/ 6675: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(471); -} else { - module.exports = __nccwpck_require__(7443); -} - - -/***/ }), - -/***/ 7443: -/***/ ((module, exports, __nccwpck_require__) => { - -/** - * Module dependencies. - */ - -const tty = __nccwpck_require__(2018); -const util = __nccwpck_require__(9023); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(6480); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = __nccwpck_require__(1210)(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - - -/***/ }), - -/***/ 3369: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Stream = (__nccwpck_require__(2203).Stream); -var util = __nccwpck_require__(9023); - -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); - -DelayedStream.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.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); - -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; - -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } - - this.source.resume(); -}; - -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; - -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; - -DelayedStream.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.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)); -}; - - -/***/ }), - -/***/ 3859: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var callBind = __nccwpck_require__(2462); -var gOPD = __nccwpck_require__(8322); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; - - -/***/ }), - -/***/ 8395: -/***/ ((module) => { - - - -/** - * Checks if a given namespace is allowed by the given variable. - * - * @param {String} name namespace that should be included. - * @param {String} variable Value that needs to be tested. - * @returns {Boolean} Indication if namespace is enabled. - * @public - */ -module.exports = function enabled(name, variable) { - if (!variable) return false; - - var variables = variable.split(/[\s,]+/) - , i = 0; - - for (; i < variables.length; i++) { - variable = variables[i].replace('*', '.*?'); - - if ('-' === variable.charAt(0)) { - if ((new RegExp('^'+ variable.substr(1) +'$')).test(name)) { - return false; - } - - continue; - } - - if ((new RegExp('^'+ variable +'$')).test(name)) { - return true; - } - } - - return false; -}; - - -/***/ }), - -/***/ 871: -/***/ ((module) => { - - - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; - - -/***/ }), - -/***/ 1247: -/***/ ((module) => { - - - -/** @type {import('./eval')} */ -module.exports = EvalError; - - -/***/ }), - -/***/ 6621: -/***/ ((module) => { - - - -/** @type {import('.')} */ -module.exports = Error; - - -/***/ }), - -/***/ 6136: -/***/ ((module) => { - - - -/** @type {import('./range')} */ -module.exports = RangeError; - - -/***/ }), - -/***/ 252: -/***/ ((module) => { - - - -/** @type {import('./ref')} */ -module.exports = ReferenceError; - - -/***/ }), - -/***/ 9546: -/***/ ((module) => { - - - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; - - -/***/ }), - -/***/ 7166: -/***/ ((module) => { - - - -/** @type {import('./type')} */ -module.exports = TypeError; - - -/***/ }), - -/***/ 1223: -/***/ ((module) => { - - - -/** @type {import('./uri')} */ -module.exports = URIError; - - -/***/ }), - -/***/ 7955: -/***/ ((module) => { - - - -/** @type {import('.')} */ -module.exports = Object; - - -/***/ }), - -/***/ 8362: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var GetIntrinsic = __nccwpck_require__(1893); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -var hasToStringTag = __nccwpck_require__(532)(); -var hasOwn = __nccwpck_require__(585); -var $TypeError = __nccwpck_require__(7166); - -var toStringTag = hasToStringTag ? Symbol.toStringTag : null; - -/** @type {import('.')} */ -module.exports = function setToStringTag(object, value) { - var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; - var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; - if ( - (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') - || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') - ) { - throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); - } - if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { - if ($defineProperty) { - $defineProperty(object, toStringTag, { - configurable: !nonConfigurable, - enumerable: false, - value: value, - writable: false - }); - } else { - object[toStringTag] = value; // eslint-disable-line no-param-reassign - } - } -}; - - -/***/ }), - -/***/ 4838: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const taskManager = __nccwpck_require__(6160); -const async_1 = __nccwpck_require__(3616); -const stream_1 = __nccwpck_require__(2410); -const sync_1 = __nccwpck_require__(3473); -const settings_1 = __nccwpck_require__(948); -const utils = __nccwpck_require__(123); -async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); -} -// https://github.com/typescript-eslint/typescript-eslint/issues/60 -// eslint-disable-next-line no-redeclare -(function (FastGlob) { - FastGlob.glob = FastGlob; - FastGlob.globSync = sync; - FastGlob.globStream = stream; - FastGlob.async = FastGlob; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - /** - * The stream returned by the provider cannot work with an asynchronous iterator. - * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. - * This affects performance (+25%). I don't see best solution right now. - */ - return utils.stream.merge(works); - } - FastGlob.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob.convertPathToPattern = convertPathToPattern; - let posix; - (function (posix) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix.convertPathToPattern = convertPathToPattern; - })(posix = FastGlob.posix || (FastGlob.posix = {})); - let win32; - (function (win32) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win32.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win32.convertPathToPattern = convertPathToPattern; - })(win32 = FastGlob.win32 || (FastGlob.win32 = {})); -})(FastGlob || (FastGlob = {})); -function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); -} -function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError('Patterns must be a string (non empty) or an array of strings'); - } -} -module.exports = FastGlob; - - -/***/ }), - -/***/ 6160: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; -const utils = __nccwpck_require__(123); -function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); - const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); - return staticTasks.concat(dynamicTasks); -} -exports.generate = generate; -function processPatterns(input, settings) { - let patterns = input; - /** - * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry - * and some problems with the micromatch package (see fast-glob issues: #365, #394). - * - * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown - * in matching in the case of a large set of patterns after expansion. - */ - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - /** - * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used - * at any nesting level. - * - * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change - * the pattern in the filter before creating a regular expression. There is no need to change the patterns - * in the application. Only on the input. - */ - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`); - } - /** - * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. - */ - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); -} -/** - * Returns tasks grouped by basic pattern directories. - * - * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. - * This is necessary because directory traversal starts at the base directory and goes deeper. - */ -function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - /* - * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory - * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. - */ - if ('.' in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); - } - else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; -} -exports.convertPatternsToTasks = convertPatternsToTasks; -function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); -} -exports.getPositivePatterns = getPositivePatterns; -function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; -} -exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; -function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } - else { - collection[base] = [pattern]; - } - return collection; - }, group); -} -exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; -function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); -} -exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; -function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; -} -exports.convertPatternGroupToTask = convertPatternGroupToTask; - - -/***/ }), - -/***/ 3616: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(6866); -const provider_1 = __nccwpck_require__(3815); -class ProviderAsync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderAsync; - - -/***/ }), - -/***/ 4084: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -const partial_1 = __nccwpck_require__(3147); -class DeepFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - /** - * Avoid unnecessary depth calculations when it doesn't matter. - */ - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split('/').length; - if (basePath === '') { - return entryPathDepth; - } - const basePathDepth = basePath.split('/').length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } -} -exports["default"] = DeepFilter; - - -/***/ }), - -/***/ 2552: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, undefined); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - // Trying to match files and directories by patterns. - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - // A pattern with a trailling slash can be used for directory matching. - // To apply such pattern, we need to add a tralling slash to the path. - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + '/', patternsRe); - } - return isMatched; - } -} -exports["default"] = EntryFilter; - - -/***/ }), - -/***/ 5042: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class ErrorFilter { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error) => this._isNonFatalError(error); - } - _isNonFatalError(error) { - return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; - } -} -exports["default"] = ErrorFilter; - - -/***/ }), - -/***/ 5828: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class Matcher { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } -} -exports["default"] = Matcher; - - -/***/ }), - -/***/ 3147: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const matcher_1 = __nccwpck_require__(5828); -class PartialMatcher extends matcher_1.default { - match(filepath) { - const parts = filepath.split('/'); - const levels = parts.length; - const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - /** - * In this case, the pattern has a globstar and we must read all directories unconditionally, - * but only if the level has reached the end of the first group. - * - * fixtures/{a,b}/** - * ^ true/false ^ always true - */ - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } -} -exports["default"] = PartialMatcher; - - -/***/ }), - -/***/ 3815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const deep_1 = __nccwpck_require__(4084); -const entry_1 = __nccwpck_require__(2552); -const error_1 = __nccwpck_require__(5042); -const entry_2 = __nccwpck_require__(825); -class Provider { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === '.' ? '' : task.base; - return { - basePath, - pathSegmentSeparator: '/', - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } -} -exports["default"] = Provider; - - -/***/ }), - -/***/ 2410: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const stream_2 = __nccwpck_require__(1980); -const provider_1 = __nccwpck_require__(3815); -class ProviderStream extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); - source - .once('error', (error) => destination.emit('error', error)) - .on('data', (entry) => destination.emit('data', options.transform(entry))) - .once('end', () => destination.emit('end')); - destination - .once('close', () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderStream; - - -/***/ }), - -/***/ 3473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(967); -const provider_1 = __nccwpck_require__(3815); -class ProviderSync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderSync; - - -/***/ }), - -/***/ 825: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryTransformer { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += '/'; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } -} -exports["default"] = EntryTransformer; - - -/***/ }), - -/***/ 6866: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -const stream_1 = __nccwpck_require__(1980); -class ReaderAsync extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve, reject) => { - this._walkAsync(root, options, (error, entries) => { - if (error === null) { - resolve(entries); - } - else { - reject(error); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - // After #235, replace it with an asynchronous iterator. - return new Promise((resolve, reject) => { - stream.once('error', reject); - stream.on('data', (entry) => entries.push(entry)); - stream.once('end', () => resolve(entries)); - }); - } -} -exports["default"] = ReaderAsync; - - -/***/ }), - -/***/ 6703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const utils = __nccwpck_require__(123); -class Reader { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error) { - return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 1980: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderStream extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options) - .then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }) - .catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath) - .then((stats) => this._makeEntry(stats, pattern)) - .catch((error) => { - if (options.errorFilter(error)) { - return null; - } - throw error; - }); - } - _getStat(filepath) { - return new Promise((resolve, reject) => { - this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve(stats) : reject(error); - }); - }); - } -} -exports["default"] = ReaderStream; - - -/***/ }), - -/***/ 967: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderSync extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } - catch (error) { - if (options.errorFilter(error)) { - return null; - } - throw error; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } -} -exports["default"] = ReaderSync; - - -/***/ }), - -/***/ 948: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -const os = __nccwpck_require__(857); -/** - * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. - * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 - */ -const CPU_COUNT = Math.max(os.cpus().length, 1); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - lstatSync: fs.lstatSync, - stat: fs.stat, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -class Settings { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - // Remove the cast to the array in the next major (#404). - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === undefined ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 3614: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitWhen = exports.flatten = void 0; -function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); -} -exports.flatten = flatten; -function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } - else { - result[groupIndex].push(item); - } - } - return result; -} -exports.splitWhen = splitWhen; - - -/***/ }), - -/***/ 163: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEnoentCodeError = void 0; -function isEnoentCodeError(error) { - return error.code === 'ENOENT'; -} -exports.isEnoentCodeError = isEnoentCodeError; - - -/***/ }), - -/***/ 9416: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 123: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; -const array = __nccwpck_require__(3614); -exports.array = array; -const errno = __nccwpck_require__(163); -exports.errno = errno; -const fs = __nccwpck_require__(9416); -exports.fs = fs; -const path = __nccwpck_require__(8692); -exports.path = path; -const pattern = __nccwpck_require__(5869); -exports.pattern = pattern; -const stream = __nccwpck_require__(9103); -exports.stream = stream; -const string = __nccwpck_require__(3682); -exports.string = string; - - -/***/ }), - -/***/ 8692: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; -const os = __nccwpck_require__(857); -const path = __nccwpck_require__(6928); -const IS_WINDOWS_PLATFORM = os.platform() === 'win32'; -const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ -/** - * All non-escaped special characters. - * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. - * Windows: (){}[], !+@ before (, ! at the beginning. - */ -const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; -const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; -/** - * The device path (\\.\ or \\?\). - * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths - */ -const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; -/** - * All backslashes except those escaping special characters. - * Windows: !()+@{} - * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions - */ -const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; -/** - * Designed to work only with simple paths: `dir\\file`. - */ -function unixify(filepath) { - return filepath.replace(/\\/g, '/'); -} -exports.unixify = unixify; -function makeAbsolute(cwd, filepath) { - return path.resolve(cwd, filepath); -} -exports.makeAbsolute = makeAbsolute; -function removeLeadingDotSegment(entry) { - // We do not use `startsWith` because this is 10x slower than current implementation for some cases. - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with - if (entry.charAt(0) === '.') { - const secondCharactery = entry.charAt(1); - if (secondCharactery === '/' || secondCharactery === '\\') { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; -} -exports.removeLeadingDotSegment = removeLeadingDotSegment; -exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; -function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapeWindowsPath = escapeWindowsPath; -function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapePosixPath = escapePosixPath; -exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; -function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath) - .replace(DOS_DEVICE_PATH_RE, '//$1') - .replace(WINDOWS_BACKSLASHES_RE, '/'); -} -exports.convertWindowsPathToPattern = convertWindowsPathToPattern; -function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); -} -exports.convertPosixPathToPattern = convertPosixPathToPattern; - - -/***/ }), - -/***/ 5869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __nccwpck_require__(6928); -const globParent = __nccwpck_require__(2435); -const micromatch = __nccwpck_require__(9555); -const GLOBSTAR = '**'; -const ESCAPE_SYMBOL = '\\'; -const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; -const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; -const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; -const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; -const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; -/** - * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. - * The latter is due to the presence of the device path at the beginning of the UNC path. - */ -const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; -function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); -} -exports.isStaticPattern = isStaticPattern; -function isDynamicPattern(pattern, options = {}) { - /** - * A special case with an empty string is necessary for matching patterns that start with a forward slash. - * An empty string cannot be a dynamic pattern. - * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. - */ - if (pattern === '') { - return false; - } - /** - * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check - * filepath directly (without read directory). - */ - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; -} -exports.isDynamicPattern = isDynamicPattern; -function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf('{'); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); -} -function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; -} -exports.convertToPositivePattern = convertToPositivePattern; -function convertToNegativePattern(pattern) { - return '!' + pattern; -} -exports.convertToNegativePattern = convertToNegativePattern; -function isNegativePattern(pattern) { - return pattern.startsWith('!') && pattern[1] !== '('; -} -exports.isNegativePattern = isNegativePattern; -function isPositivePattern(pattern) { - return !isNegativePattern(pattern); -} -exports.isPositivePattern = isPositivePattern; -function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); -} -exports.getNegativePatterns = getNegativePatterns; -function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); -} -exports.getPositivePatterns = getPositivePatterns; -/** - * Returns patterns that can be applied inside the current directory. - * - * @example - * // ['./*', '*', 'a/*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); -} -exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; -/** - * Returns patterns to be expanded relative to (outside) the current directory. - * - * @example - * // ['../*', './../*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); -} -exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; -function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith('..') || pattern.startsWith('./..'); -} -exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; -function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); -} -exports.getBaseDirectory = getBaseDirectory; -function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); -} -exports.hasGlobStar = hasGlobStar; -function endsWithSlashGlobStar(pattern) { - return pattern.endsWith('/' + GLOBSTAR); -} -exports.endsWithSlashGlobStar = endsWithSlashGlobStar; -function isAffectDepthOfReadingPattern(pattern) { - const basename = path.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); -} -exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; -function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); -} -exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; -function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - /** - * Sort the patterns by length so that the same depth patterns are processed side by side. - * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` - */ - patterns.sort((a, b) => a.length - b.length); - /** - * Micromatch can return an empty string in the case of patterns like `{a,}`. - */ - return patterns.filter((pattern) => pattern !== ''); -} -exports.expandBraceExpansion = expandBraceExpansion; -function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - /** - * The scan method returns an empty array in some cases. - * See micromatch/picomatch#58 for more details. - */ - if (parts.length === 0) { - parts = [pattern]; - } - /** - * The scan method does not return an empty part for the pattern with a forward slash. - * This is another part of micromatch/picomatch#58. - */ - if (parts[0].startsWith('/')) { - parts[0] = parts[0].slice(1); - parts.unshift(''); - } - return parts; -} -exports.getPatternParts = getPatternParts; -function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); -} -exports.makeRe = makeRe; -function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); -} -exports.convertPatternsToRe = convertPatternsToRe; -function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); -} -exports.matchAny = matchAny; -/** - * This package only works with forward slashes as a path separator. - * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. - */ -function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, '/'); -} -exports.removeDuplicateSlashes = removeDuplicateSlashes; -function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute(pattern)) { - absolute.push(pattern); - } - else { - relative.push(pattern); - } - } - return [absolute, relative]; -} -exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; -function isAbsolute(pattern) { - return path.isAbsolute(pattern); -} -exports.isAbsolute = isAbsolute; - - -/***/ }), - -/***/ 9103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -const merge2 = __nccwpck_require__(4031); -function merge(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once('error', (error) => mergedStream.emit('error', error)); - }); - mergedStream.once('close', () => propagateCloseEventToSources(streams)); - mergedStream.once('end', () => propagateCloseEventToSources(streams)); - return mergedStream; -} -exports.merge = merge; -function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit('close')); -} - - -/***/ }), - -/***/ 3682: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEmpty = exports.isString = void 0; -function isString(input) { - return typeof input === 'string'; -} -exports.isString = isString; -function isEmpty(input) { - return input === ''; -} -exports.isEmpty = isEmpty; - - -/***/ }), - -/***/ 6701: -/***/ (function(__unused_webpack_module, exports) { - -(function (global, factory) { - true ? factory(exports) : - 0; -}(this, (function (exports) { 'use strict'; - - var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g; - var twoDigitsOptional = "\\d\\d?"; - var twoDigits = "\\d\\d"; - var threeDigits = "\\d{3}"; - var fourDigits = "\\d{4}"; - var word = "[^\\s]+"; - var literal = /\[([^]*?)\]/gm; - function shorten(arr, sLen) { - var newArr = []; - for (var i = 0, len = arr.length; i < len; i++) { - newArr.push(arr[i].substr(0, sLen)); - } - return newArr; - } - var monthUpdate = function (arrName) { return function (v, i18n) { - var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); }); - var index = lowerCaseArr.indexOf(v.toLowerCase()); - if (index > -1) { - return index; - } - return null; - }; }; - function assign(origObj) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - for (var _a = 0, args_1 = args; _a < args_1.length; _a++) { - var obj = args_1[_a]; - for (var key in obj) { - // @ts-ignore ex - origObj[key] = obj[key]; - } - } - return origObj; - } - var dayNames = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ]; - var monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ]; - var monthNamesShort = shorten(monthNames, 3); - var dayNamesShort = shorten(dayNames, 3); - var defaultI18n = { - dayNamesShort: dayNamesShort, - dayNames: dayNames, - monthNamesShort: monthNamesShort, - monthNames: monthNames, - amPm: ["am", "pm"], - DoFn: function (dayOfMonth) { - return (dayOfMonth + - ["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 - ? 0 - : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]); - } - }; - var globalI18n = assign({}, defaultI18n); - var setGlobalDateI18n = function (i18n) { - return (globalI18n = assign(globalI18n, i18n)); - }; - var regexEscape = function (str) { - return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&"); - }; - var pad = function (val, len) { - if (len === void 0) { len = 2; } - val = String(val); - while (val.length < len) { - val = "0" + val; - } - return val; - }; - var formatFlags = { - D: function (dateObj) { return String(dateObj.getDate()); }, - DD: function (dateObj) { return pad(dateObj.getDate()); }, - Do: function (dateObj, i18n) { - return i18n.DoFn(dateObj.getDate()); - }, - d: function (dateObj) { return String(dateObj.getDay()); }, - dd: function (dateObj) { return pad(dateObj.getDay()); }, - ddd: function (dateObj, i18n) { - return i18n.dayNamesShort[dateObj.getDay()]; - }, - dddd: function (dateObj, i18n) { - return i18n.dayNames[dateObj.getDay()]; - }, - M: function (dateObj) { return String(dateObj.getMonth() + 1); }, - MM: function (dateObj) { return pad(dateObj.getMonth() + 1); }, - MMM: function (dateObj, i18n) { - return i18n.monthNamesShort[dateObj.getMonth()]; - }, - MMMM: function (dateObj, i18n) { - return i18n.monthNames[dateObj.getMonth()]; - }, - YY: function (dateObj) { - return pad(String(dateObj.getFullYear()), 4).substr(2); - }, - YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); }, - h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); }, - hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); }, - H: function (dateObj) { return String(dateObj.getHours()); }, - HH: function (dateObj) { return pad(dateObj.getHours()); }, - m: function (dateObj) { return String(dateObj.getMinutes()); }, - mm: function (dateObj) { return pad(dateObj.getMinutes()); }, - s: function (dateObj) { return String(dateObj.getSeconds()); }, - ss: function (dateObj) { return pad(dateObj.getSeconds()); }, - S: function (dateObj) { - return String(Math.round(dateObj.getMilliseconds() / 100)); - }, - SS: function (dateObj) { - return pad(Math.round(dateObj.getMilliseconds() / 10), 2); - }, - SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); }, - a: function (dateObj, i18n) { - return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1]; - }, - A: function (dateObj, i18n) { - return dateObj.getHours() < 12 - ? i18n.amPm[0].toUpperCase() - : i18n.amPm[1].toUpperCase(); - }, - ZZ: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4)); - }, - Z: function (dateObj) { - var offset = dateObj.getTimezoneOffset(); - return ((offset > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(offset) / 60), 2) + - ":" + - pad(Math.abs(offset) % 60, 2)); - } - }; - var monthParse = function (v) { return +v - 1; }; - var emptyDigits = [null, twoDigitsOptional]; - var emptyWord = [null, word]; - var amPm = [ - "isPm", - word, - function (v, i18n) { - var val = v.toLowerCase(); - if (val === i18n.amPm[0]) { - return 0; - } - else if (val === i18n.amPm[1]) { - return 1; - } - return null; - } - ]; - var timezoneOffset = [ - "timezoneOffset", - "[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?", - function (v) { - var parts = (v + "").match(/([+-]|\d\d)/gi); - if (parts) { - var minutes = +parts[1] * 60 + parseInt(parts[2], 10); - return parts[0] === "+" ? minutes : -minutes; - } - return 0; - } - ]; - var parseFlags = { - D: ["day", twoDigitsOptional], - DD: ["day", twoDigits], - Do: ["day", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }], - M: ["month", twoDigitsOptional, monthParse], - MM: ["month", twoDigits, monthParse], - YY: [ - "year", - twoDigits, - function (v) { - var now = new Date(); - var cent = +("" + now.getFullYear()).substr(0, 2); - return +("" + (+v > 68 ? cent - 1 : cent) + v); - } - ], - h: ["hour", twoDigitsOptional, undefined, "isPm"], - hh: ["hour", twoDigits, undefined, "isPm"], - H: ["hour", twoDigitsOptional], - HH: ["hour", twoDigits], - m: ["minute", twoDigitsOptional], - mm: ["minute", twoDigits], - s: ["second", twoDigitsOptional], - ss: ["second", twoDigits], - YYYY: ["year", fourDigits], - S: ["millisecond", "\\d", function (v) { return +v * 100; }], - SS: ["millisecond", twoDigits, function (v) { return +v * 10; }], - SSS: ["millisecond", threeDigits], - d: emptyDigits, - dd: emptyDigits, - ddd: emptyWord, - dddd: emptyWord, - MMM: ["month", word, monthUpdate("monthNamesShort")], - MMMM: ["month", word, monthUpdate("monthNames")], - a: amPm, - A: amPm, - ZZ: timezoneOffset, - Z: timezoneOffset - }; - // Some common format strings - var globalMasks = { - default: "ddd MMM DD YYYY HH:mm:ss", - shortDate: "M/D/YY", - mediumDate: "MMM D, YYYY", - longDate: "MMMM D, YYYY", - fullDate: "dddd, MMMM D, YYYY", - isoDate: "YYYY-MM-DD", - isoDateTime: "YYYY-MM-DDTHH:mm:ssZ", - shortTime: "HH:mm", - mediumTime: "HH:mm:ss", - longTime: "HH:mm:ss.SSS" - }; - var setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); }; - /*** - * Format a date - * @method format - * @param {Date|number} dateObj - * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate' - * @returns {string} Formatted date string - */ - var format = function (dateObj, mask, i18n) { - if (mask === void 0) { mask = globalMasks["default"]; } - if (i18n === void 0) { i18n = {}; } - if (typeof dateObj === "number") { - dateObj = new Date(dateObj); - } - if (Object.prototype.toString.call(dateObj) !== "[object Date]" || - isNaN(dateObj.getTime())) { - throw new Error("Invalid Date pass to format"); - } - mask = globalMasks[mask] || mask; - var literals = []; - // Make literals inactive by replacing them with @@@ - mask = mask.replace(literal, function ($0, $1) { - literals.push($1); - return "@@@"; - }); - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // Apply formatting rules - mask = mask.replace(token, function ($0) { - return formatFlags[$0](dateObj, combinedI18nSettings); - }); - // Inline literal values back into the formatted value - return mask.replace(/@@@/g, function () { return literals.shift(); }); - }; - /** - * Parse a date string into a Javascript Date object / - * @method parse - * @param {string} dateStr Date string - * @param {string} format Date parse format - * @param {i18n} I18nSettingsOptional Full or subset of I18N settings - * @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format - */ - function parse(dateStr, format, i18n) { - if (i18n === void 0) { i18n = {}; } - if (typeof format !== "string") { - throw new Error("Invalid format in fecha parse"); - } - // Check to see if the format is actually a mask - format = globalMasks[format] || format; - // Avoid regular expression denial of service, fail early for really long strings - // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS - if (dateStr.length > 1000) { - return null; - } - // Default to the beginning of the year. - var today = new Date(); - var dateInfo = { - year: today.getFullYear(), - month: 0, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0, - isPm: null, - timezoneOffset: null - }; - var parseInfo = []; - var literals = []; - // Replace all the literals with @@@. Hopefully a string that won't exist in the format - var newFormat = format.replace(literal, function ($0, $1) { - literals.push(regexEscape($1)); - return "@@@"; - }); - var specifiedFields = {}; - var requiredFields = {}; - // Change every token that we find into the correct regex - newFormat = regexEscape(newFormat).replace(token, function ($0) { - var info = parseFlags[$0]; - var field = info[0], regex = info[1], requiredField = info[3]; - // Check if the person has specified the same field twice. This will lead to confusing results. - if (specifiedFields[field]) { - throw new Error("Invalid format. " + field + " specified twice in format"); - } - specifiedFields[field] = true; - // Check if there are any required fields. For instance, 12 hour time requires AM/PM specified - if (requiredField) { - requiredFields[requiredField] = true; - } - parseInfo.push(info); - return "(" + regex + ")"; - }); - // Check all the required fields are present - Object.keys(requiredFields).forEach(function (field) { - if (!specifiedFields[field]) { - throw new Error("Invalid format. " + field + " is required in specified format"); - } - }); - // Add back all the literals after - newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); }); - // Check if the date string matches the format. If it doesn't return null - var matches = dateStr.match(new RegExp(newFormat, "i")); - if (!matches) { - return null; - } - var combinedI18nSettings = assign(assign({}, globalI18n), i18n); - // For each match, call the parser function for that date part - for (var i = 1; i < matches.length; i++) { - var _a = parseInfo[i - 1], field = _a[0], parser = _a[2]; - var value = parser - ? parser(matches[i], combinedI18nSettings) - : +matches[i]; - // If the parser can't make sense of the value, return null - if (value == null) { - return null; - } - dateInfo[field] = value; - } - if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) { - dateInfo.hour = +dateInfo.hour + 12; - } - else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) { - dateInfo.hour = 0; - } - var dateTZ; - if (dateInfo.timezoneOffset == null) { - dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond); - var validateFields = [ - ["month", "getMonth"], - ["day", "getDate"], - ["hour", "getHours"], - ["minute", "getMinutes"], - ["second", "getSeconds"] - ]; - for (var i = 0, len = validateFields.length; i < len; i++) { - // Check to make sure the date field is within the allowed range. Javascript dates allows values - // outside the allowed range. If the values don't match the value was invalid - if (specifiedFields[validateFields[i][0]] && - dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) { - return null; - } - } - } - else { - dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond)); - // We can't validate dates in another timezone unfortunately. Do a basic check instead - if (dateInfo.month > 11 || - dateInfo.month < 0 || - dateInfo.day > 31 || - dateInfo.day < 1 || - dateInfo.hour > 23 || - dateInfo.hour < 0 || - dateInfo.minute > 59 || - dateInfo.minute < 0 || - dateInfo.second > 59 || - dateInfo.second < 0) { - return null; - } - } - // Don't allow invalid dates - return dateTZ; - } - var fecha = { - format: format, - parse: parse, - defaultI18n: defaultI18n, - setGlobalDateI18n: setGlobalDateI18n, - setGlobalDateMasks: setGlobalDateMasks - }; - - exports.assign = assign; - exports.default = fecha; - exports.format = format; - exports.parse = parse; - exports.defaultI18n = defaultI18n; - exports.setGlobalDateI18n = setGlobalDateI18n; - exports.setGlobalDateMasks = setGlobalDateMasks; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=fecha.umd.js.map - - -/***/ }), - -/***/ 9730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -const util = __nccwpck_require__(9023); -const toRegexRange = __nccwpck_require__(743); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; - - -/***/ }), - -/***/ 7365: -/***/ ((module) => { - - - -var toString = Object.prototype.toString; - -/** - * Extract names from functions. - * - * @param {Function} fn The function who's name we need to extract. - * @returns {String} The name of the function. - * @public - */ -module.exports = function name(fn) { - if ('string' === typeof fn.displayName && fn.constructor.name) { - return fn.displayName; - } else if ('string' === typeof fn.name && fn.name) { - return fn.name; - } - - // - // Check to see if the constructor has a name. - // - if ( - 'object' === typeof fn - && fn.constructor - && 'string' === typeof fn.constructor.name - ) return fn.constructor.name; - - // - // toString the given function and attempt to parse it out of it, or determine - // the class. - // - var named = fn.toString() - , type = toString.call(fn).slice(8, -1); - - if ('Function' === type) { - named = named.substring(named.indexOf('(') + 1, named.indexOf(')')); - } else { - named = type; - } - - return named || 'anonymous'; -}; - - -/***/ }), - -/***/ 3586: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var debug; - -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __nccwpck_require__(6675)("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; - } - } - debug.apply(null, arguments); -}; - - -/***/ }), - -/***/ 8541: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var url = __nccwpck_require__(7016); -var URL = url.URL; -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var Writable = (__nccwpck_require__(2203).Writable); -var assert = __nccwpck_require__(2613); -var debug = __nccwpck_require__(3586); - -// Preventive platform detection -// istanbul ignore next -(function detectUnsupportedEnvironment() { - var looksLikeNode = typeof process !== "undefined"; - var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; - var looksLikeV8 = isFunction(Error.captureStackTrace); - if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { - console.warn("The follow-redirects package should be excluded from browser builds."); - } -}()); - -// Whether to use the native URL object or the legacy url module -var useNativeURL = false; -try { - assert(new URL("")); -} -catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; -} - -// HTTP headers to drop across HTTP/HTTPS and domain boundaries -var sensitiveHeaders = [ - "Authorization", - "Proxy-Authorization", - "Cookie", -]; - -// URL fields to preserve in copy operations -var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash", -]; - -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// istanbul ignore next -var destroy = Writable.prototype.destroy || noop; - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - try { - self._processResponse(response); - } - catch (cause) { - self.emit("error", cause instanceof RedirectionError ? - cause : new RedirectionError({ cause: cause })); - } - }; - - // Create filter for sensitive HTTP headers - this._headerFilter = new RegExp("^(?:" + - sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + - ")$", "i"); - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -RedirectableRequest.prototype.abort = function () { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); -}; - -RedirectableRequest.prototype.destroy = function (error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; -}; - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } - - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } - - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - self.removeListener("close", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } - - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } - - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); - } - - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); - - return this; -}; - -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - if (!isArray(options.sensitiveHeaders)) { - options.sensitiveHeaders = []; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } - - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - // istanbul ignore else - if (request === self._currentRequest) { - // Report any write errors - // istanbul ignore if - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - // istanbul ignore else - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - return; - } - - // The response is a redirect, so abort the current request - destroyRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); - } - - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); - - // Create the redirected request - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); - - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrl.protocol !== currentUrlParts.protocol && - redirectUrl.protocol !== "https:" || - redirectUrl.host !== currentHost && - !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(this._headerFilter, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - this._performRequest(); -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters, ensuring that input is an object - if (isURL(input)) { - input = spreadUrlObject(input); - } - else if (isString(input)) { - input = spreadUrlObject(parseUrl(input)); - } - else { - callback = options; - options = validateUrl(input); - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -function noop() { /* empty */ } - -function parseUrl(input) { - var parsed; - // istanbul ignore else - if (useNativeURL) { - parsed = new URL(input); - } - else { - // Ensure the URL is valid and absolute - parsed = validateUrl(url.parse(input)); - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - } - return parsed; -} - -function resolveUrl(relative, base) { - // istanbul ignore next - return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); -} - -function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); - } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); - } - return input; -} - -function spreadUrlObject(urlObject, target) { - var spread = target || {}; - for (var key of preservedUrlFields) { - spread[key] = urlObject[key]; - } - - // Fix IPv6 hostname - if (spread.hostname.startsWith("[")) { - spread.hostname = spread.hostname.slice(1, -1); - } - // Ensure port is a number - if (spread.port !== "") { - spread.port = Number(spread.port); - } - // Concatenate path - spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - - return spread; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - // istanbul ignore else - if (isFunction(Error.captureStackTrace)) { - Error.captureStackTrace(this, this.constructor); - } - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; - } - - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false, - }, - name: { - value: "Error [" + code + "]", - enumerable: false, - }, - }); - return CustomError; -} - -function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.destroy(error); -} - -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} - -function isArray(value) { - return value instanceof Array; -} - -function isString(value) { - return typeof value === "string" || value instanceof String; -} - -function isFunction(value) { - return typeof value === "function"; -} - -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} - -function isURL(value) { - return URL && value instanceof URL; -} - -function escapeRegex(regex) { - return regex.replace(/[\]\\/()*+?.$]/g, "\\$&"); -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; - - -/***/ }), - -/***/ 4504: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var CombinedStream = __nccwpck_require__(7814); -var util = __nccwpck_require__(9023); -var path = __nccwpck_require__(6928); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var parseUrl = (__nccwpck_require__(7016).parse); -var fs = __nccwpck_require__(9896); -var Stream = (__nccwpck_require__(2203).Stream); -var crypto = __nccwpck_require__(6982); -var mime = __nccwpck_require__(2574); -var asynckit = __nccwpck_require__(8915); -var setToStringTag = __nccwpck_require__(8362); -var hasOwn = __nccwpck_require__(585); -var populate = __nccwpck_require__(3549); - -/** - * Escape CR, LF, and `"` in a multipart `name`/`filename` parameter, so a field - * name or filename can not break out of its header line to inject headers or - * smuggle additional parts. Matches the WHATWG HTML multipart/form-data encoding. - * - * @param {string} str - the parameter value to escape - * @returns {string} the escaped value - */ -function escapeHeaderParam(str) { - return String(str).replace(/\r/g, '%0D').replace(/\n/g, '%0A').replace(/"/g, '%22'); -} - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; // eslint-disable-line no-param-reassign - for (var option in options) { // eslint-disable-line no-restricted-syntax - this[option] = options[option]; - } -} - -// make it a Stream -util.inherits(FormData, CombinedStream); - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function (field, value, options) { - options = options || {}; // eslint-disable-line no-param-reassign - - // allow filename as single option - if (typeof options === 'string') { - options = { filename: options }; // eslint-disable-line no-param-reassign - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value === 'number' || value == null) { - value = String(value); // eslint-disable-line no-param-reassign - } - - // https://github.com/felixge/node-form-data/issues/38 - if (Array.isArray(value)) { - /* - * Please convert your array into string - * the way web server expects it - */ - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function (header, value, options) { - var valueLength = 0; - - /* - * used w/ getLengthSync(), when length is known. - * e.g. for streaming directly from a remote server, - * w/ a known file a size, and not wanting to wait for - * incoming file to finish to get its size. - */ - if (options.knownLength != null) { - valueLength += Number(options.knownLength); - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response or not a stream - if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function (value, callback) { - if (hasOwn(value, 'fd')) { - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function (err, stat) { - if (err) { - callback(err); - return; - } - - // update final size based on the range options - var fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (hasOwn(value, 'httpVersion')) { - callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return - - // or request stream http://github.com/mikeal/request - } else if (hasOwn(value, 'httpModule')) { - // wait till response come back - value.on('response', function (response) { - value.pause(); - callback(null, Number(response.headers['content-length'])); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); // eslint-disable-line callback-return - } -}; - -FormData.prototype._multiPartHeader = function (field, value, options) { - /* - * custom header specified (as string)? - * it becomes responsible for boundary - * (e.g. to handle extra CRLFs on .NET servers) - */ - if (typeof options.header === 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header === 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { // eslint-disable-line no-restricted-syntax - if (hasOwn(headers, prop)) { - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return - var filename; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || (value && (value.name || value.path))) { - /* - * custom filename take precedence - * formidable and the browser add a name property - * fs- and request- streams have path property - */ - filename = path.basename(options.filename || (value && (value.name || value.path))); - } else if (value && value.readable && hasOwn(value, 'httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } - - if (filename) { - return 'filename="' + escapeHeaderParam(filename) + '"'; - } -}; - -FormData.prototype._getContentType = function (value, options) { - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && value && typeof value === 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function () { - return function (next) { - var footer = FormData.LINE_BREAK; - - var lastPart = this._streams.length === 0; - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function () { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function (userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { // eslint-disable-line no-restricted-syntax - if (hasOwn(userHeaders, header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.setBoundary = function (boundary) { - if (typeof boundary !== 'string') { - throw new TypeError('FormData boundary must be a string'); - } - this._boundary = boundary; -}; - -FormData.prototype.getBoundary = function () { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype.getBuffer = function () { - var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap - var boundary = this.getBoundary(); - - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { - // Add content to the buffer. - if (Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); - } else { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); - } - - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { - dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); - } - } - } - - // Add the footer and return the Buffer object. - return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); -}; - -FormData.prototype._generateBoundary = function () { - // This generates a 50 character boundary similar to those used by Firefox. - - // They are optimized for boyer-moore parsing. - this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually and add it as knownLength option -FormData.prototype.getLengthSync = function () { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - /* - * Some async length retrievers are present - * therefore synchronous length calculation is false. - * Please use getLength(callback) to get proper length - */ - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function () { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function (cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { - if (err) { - cb(err); - return; - } - - values.forEach(function (length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function (params, cb) { - var request; - var options; - var defaults = { method: 'post' }; - - // parse provided url if it's string or treat it as options object - if (typeof params === 'string') { - params = parseUrl(params); // eslint-disable-line no-param-reassign - /* eslint sort-keys: 0 */ - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - } else { // use custom params - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol === 'https:' ? 443 : 80; - } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol === 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function (err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } - - // add content length - if (length) { - request.setHeader('Content-Length', length); - } - - this.pipe(request); - if (cb) { - var onResponse; - - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - - return cb.call(this, error, responce); - }; - - onResponse = callback.bind(this, null); - - request.on('error', callback); - request.on('response', onResponse); - } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function (err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; -setToStringTag(FormData.prototype, 'FormData'); - -// Public API -module.exports = FormData; - - -/***/ }), - -/***/ 3549: -/***/ ((module) => { - - - -// populates missing values -module.exports = function (dst, src) { - Object.keys(src).forEach(function (prop) { - dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign - }); - - return dst; -}; - - -/***/ }), - -/***/ 6555: -/***/ ((module) => { - - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(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(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(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(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() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; - - -/***/ }), - -/***/ 7797: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var implementation = __nccwpck_require__(6555); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ 1893: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var undefined; - -var $Object = __nccwpck_require__(7955); - -var $Error = __nccwpck_require__(6621); -var $EvalError = __nccwpck_require__(1247); -var $RangeError = __nccwpck_require__(6136); -var $ReferenceError = __nccwpck_require__(252); -var $SyntaxError = __nccwpck_require__(9546); -var $TypeError = __nccwpck_require__(7166); -var $URIError = __nccwpck_require__(1223); - -var abs = __nccwpck_require__(4197); -var floor = __nccwpck_require__(4455); -var max = __nccwpck_require__(1295); -var min = __nccwpck_require__(6949); -var pow = __nccwpck_require__(2943); -var round = __nccwpck_require__(1721); -var sign = __nccwpck_require__(3536); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = __nccwpck_require__(8322); -var $defineProperty = __nccwpck_require__(871); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __nccwpck_require__(9131)(); - -var getProto = __nccwpck_require__(9717); -var $ObjectGPO = __nccwpck_require__(45); -var $ReflectGPO = __nccwpck_require__(7767); - -var $apply = __nccwpck_require__(4834); -var $call = __nccwpck_require__(8772); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%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; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __nccwpck_require__(7797); -var hasOwn = __nccwpck_require__(585); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 45: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var $Object = __nccwpck_require__(7955); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; - - -/***/ }), - -/***/ 7767: -/***/ ((module) => { - - - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; - - -/***/ }), - -/***/ 9717: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var reflectGetProto = __nccwpck_require__(7767); -var originalGetProto = __nccwpck_require__(45); - -var getDunderProto = __nccwpck_require__(3859); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; - - -/***/ }), - -/***/ 2435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var isGlob = __nccwpck_require__(686); -var pathPosixDirname = (__nccwpck_require__(6928).posix).dirname; -var isWin32 = (__nccwpck_require__(857).platform)() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; - - -/***/ }), - -/***/ 8422: -/***/ ((module) => { - - - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; - - -/***/ }), - -/***/ 8322: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/** @type {import('.')} */ -var $gOPD = __nccwpck_require__(8422); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), - -/***/ 4167: -/***/ ((module) => { - - - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; - - -/***/ }), - -/***/ 9131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __nccwpck_require__(6313); - -/** @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(); -}; - - -/***/ }), - -/***/ 6313: -/***/ ((module) => { - - - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - 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; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - 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') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 532: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var hasSymbols = __nccwpck_require__(6313); - -/** @type {import('.')} */ -module.exports = function hasToStringTagShams() { - return hasSymbols() && !!Symbol.toStringTag; -}; - - -/***/ }), - -/***/ 585: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = __nccwpck_require__(7797); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); - - -/***/ }), - -/***/ 65: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const net_1 = __importDefault(__nccwpck_require__(9278)); -const tls_1 = __importDefault(__nccwpck_require__(4756)); -const url_1 = __importDefault(__nccwpck_require__(7016)); -const assert_1 = __importDefault(__nccwpck_require__(2613)); -const debug_1 = __importDefault(__nccwpck_require__(6675)); -const agent_base_1 = __nccwpck_require__(9325); -const parse_proxy_response_1 = __importDefault(__nccwpck_require__(7236)); -const debug = debug_1.default('https-proxy-agent:agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('creating new HttpsProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - const headers = Object.assign({}, proxy.headers); - const hostname = `${opts.host}:${opts.port}`; - let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; - } - // The `Host` header should only include the port - // number when it is not the default port. - let { host, port, secureEndpoint } = opts; - if (!isDefaultPort(port, secureEndpoint)) { - host += `:${port}`; - } - headers.Host = host; - headers.Connection = 'close'; - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = parse_proxy_response_1.default(socket); - socket.write(`${payload}\r\n`); - const { statusCode, buffered } = yield proxyResponsePromise; - if (statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername })); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net_1.default.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('replaying proxy buffer for failed request'); - assert_1.default(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - }); - } -} -exports["default"] = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=agent.js.map - -/***/ }), - -/***/ 2123: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(__nccwpck_require__(65)); -function createHttpsProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpsProxyAgent) { - createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; - createHttpsProxyAgent.prototype = agent_1.default.prototype; -})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); -module.exports = createHttpsProxyAgent; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 7236: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const debug_1 = __importDefault(__nccwpck_require__(6675)); -const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - function onclose(err) { - debug('onclose had error %o', err); - } - function onend() { - debug('onend'); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); - const statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - resolve({ - statusCode, - buffered - }); - } - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - read(); - }); -} -exports["default"] = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map - -/***/ }), - -/***/ 8013: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -try { - var util = __nccwpck_require__(9023); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(1638); -} - - -/***/ }), - -/***/ 1638: -/***/ ((module) => { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} - - -/***/ }), - -/***/ 9825: -/***/ ((module) => { - -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; - - -/***/ }), - -/***/ 686: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = __nccwpck_require__(9825); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; - - -/***/ }), - -/***/ 952: -/***/ ((module) => { - -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; - - -/***/ }), - -/***/ 1066: -/***/ ((module) => { - - - -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; - -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; - -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); - -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; - -module.exports = isStream; - - -/***/ }), - -/***/ 9656: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -module.exports.__defineGetter__('parse', function() { - return (__nccwpck_require__(1079).parse) -}) - -module.exports.__defineGetter__('stringify', function() { - return (__nccwpck_require__(8585)/* .stringify */ .A) -}) - -module.exports.__defineGetter__('tokenize', function() { - return (__nccwpck_require__(1079).tokenize) -}) - -module.exports.__defineGetter__('update', function() { - return (__nccwpck_require__(4175)/* .update */ .f) -}) - -module.exports.__defineGetter__('analyze', function() { - return (__nccwpck_require__(636)/* .analyze */ .n) -}) - -module.exports.__defineGetter__('utils', function() { - return __nccwpck_require__(7629) -}) - -/**package -{ "name": "jju", - "version": "0.0.0", - "dependencies": {"js-yaml": "*"}, - "scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"} -} -**/ - - -/***/ }), - -/***/ 636: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -var tokenize = (__nccwpck_require__(1079).tokenize) - -module.exports.n = function analyzeJSON(input, options) { - if (options == null) options = {} - - if (!Array.isArray(input)) { - input = tokenize(input, options) - } - - var result = { - has_whitespace: false, - has_comments: false, - has_newlines: false, - has_trailing_comma: false, - indent: '', - newline: '\n', - quote: '"', - quote_keys: true, - } - - var stats = { - indent: {}, - newline: {}, - quote: {}, - } - - for (var i=0; i stats[k][b] ? a : b - }) - } - } - - return result -} - - - -/***/ }), - -/***/ 4175: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - -var assert = __nccwpck_require__(2613) -var tokenize = (__nccwpck_require__(1079).tokenize) -var stringify = (__nccwpck_require__(8585)/* .stringify */ .A) -var analyze = (__nccwpck_require__(636)/* .analyze */ .n) - -function isObject(x) { - return typeof(x) === 'object' && x !== null -} - -function value_to_tokenlist(value, stack, options, is_key, indent) { - options = Object.create(options) - options._stringify_key = !!is_key - - if (indent) { - options._prefix = indent.prefix.map(function(x) { - return x.raw - }).join('') - } - - if (options._splitMin == null) options._splitMin = 0 - if (options._splitMax == null) options._splitMax = 0 - - var stringified = stringify(value, options) - - if (is_key) { - return [ { raw: stringified, type: 'key', stack: stack, value: value } ] - } - - options._addstack = stack - var result = tokenize(stringified, { - _addstack: stack, - }) - result.data = null - return result -} - -// '1.2.3' -> ['1','2','3'] -function arg_to_path(path) { - // array indexes - if (typeof(path) === 'number') path = String(path) - - if (path === '') path = [] - if (typeof(path) === 'string') path = path.split('.') - - if (!Array.isArray(path)) throw Error('Invalid path type, string or array expected') - return path -} - -// returns new [begin, end] or false if not found -// -// {x:3, xxx: 111, y: [111, {q: 1, e: 2} ,333] } -// f('y',0) returns this B^^^^^^^^^^^^^^^^^^^^^^^^E -// then f('1',1) would reduce it to B^^^^^^^^^^E -function find_element_in_tokenlist(element, lvl, tokens, begin, end) { - while(tokens[begin].stack[lvl] != element) { - if (begin++ >= end) return false - } - while(tokens[end].stack[lvl] != element) { - if (end-- < begin) return false - } - return [begin, end] -} - -function is_whitespace(token_type) { - return token_type === 'whitespace' - || token_type === 'newline' - || token_type === 'comment' -} - -function find_first_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[begin].type)) { - if (begin++ >= end) return false - } - return begin -} - -function find_last_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[end].type)) { - if (end-- < begin) return false - } - return end -} - -/* - * when appending a new element of an object/array, we are trying to - * figure out the style used on the previous element - * - * return {prefix, sep1, sep2, suffix} - * - * ' "key" : "element" \r\n' - * prefix^^^^ sep1^ ^^sep2 ^^^^^^^^suffix - * - * begin - the beginning of the object/array - * end - last token of the last element (value or comma usually) - */ -function detect_indent_style(tokens, is_array, begin, end, level) { - var result = { - sep1: [], - sep2: [], - suffix: [], - prefix: [], - newline: [], - } - - if (tokens[end].type === 'separator' && tokens[end].stack.length !== level+1 && tokens[end].raw !== ',') { - // either a beginning of the array (no last element) or other weird situation - // - // just return defaults - return result - } - - // ' "key" : "value" ,' - // skipping last separator, we're now here ^^ - if (tokens[end].type === 'separator') - end = find_last_non_ws_token(tokens, begin, end - 1) - if (end === false) return result - - // ' "key" : "value" ,' - // skipping value ^^^^^^^ - while(tokens[end].stack.length > level) end-- - - if (!is_array) { - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep2.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - end-- - } - - // ' "key" : "value" ,' - // skipping separator ^ - assert.equal(tokens[end].type, 'separator') - assert.equal(tokens[end].raw, ':') - while(is_whitespace(tokens[--end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep1.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - } - - assert.equal(tokens[end].type, 'key') - end-- - } - - // ' "key" : "value" ,' - // skipping key ^^^^^ - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.prefix.unshift(tokens[end]) - } else if (tokens[end].type === 'newline') { - result.newline.unshift(tokens[end]) - return result - } else { - // comment or other unrecognized codestyle - return result - } - end-- - } - - return result -} - -function Document(text, options) { - var self = Object.create(Document.prototype) - - if (options == null) options = {} - //options._structure = true - var tokens = self._tokens = tokenize(text, options) - self._data = tokens.data - tokens.data = null - self._options = options - - var stats = analyze(text, options) - if (options.indent == null) { - options.indent = stats.indent - } - if (options.quote == null) { - options.quote = stats.quote - } - if (options.quote_keys == null) { - options.quote_keys = stats.quote_keys - } - if (options.no_trailing_comma == null) { - options.no_trailing_comma = !stats.has_trailing_comma - } - return self -} - -// return true if it's a proper object -// throw otherwise -function check_if_can_be_placed(key, object, is_unset) { - //if (object == null) return false - function error(add) { - return Error("You can't " + (is_unset ? 'unset' : 'set') + " key '" + key + "'" + add) - } - - if (!isObject(object)) { - throw error(' of an non-object') - } - if (Array.isArray(object)) { - // array, check boundary - if (String(key).match(/^\d+$/)) { - key = Number(String(key)) - if (object.length < key || (is_unset && object.length === key)) { - throw error(', out of bounds') - } else if (is_unset && object.length !== key+1) { - throw error(' in the middle of an array') - } else { - return true - } - } else { - throw error(' of an array') - } - } else { - // object - return true - } -} - -// usage: document.set('path.to.something', 'value') -// or: document.set(['path','to','something'], 'value') -Document.prototype.set = function(path, value) { - path = arg_to_path(path) - - // updating this._data and check for errors - if (path.length === 0) { - if (value === undefined) throw Error("can't remove root document") - this._data = value - var new_key = false - - } else { - var data = this._data - - for (var i=0; i {x:1}` - // removing sep, literal and optional sep - // ':' - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - assert.equal(this._tokens[pos2].raw, ':') - position[0] = pos2 - - // key - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'key') - assert.equal(this._tokens[pos2].value, path[path.length-1]) - position[0] = pos2 - } - - // removing comma in arrays and objects - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[0] = pos2 - } else { - // beginning of the array/object, so we should remove trailing comma instead - pos2 = find_first_non_ws_token(this._tokens, position[1] + 1, pos_old[1]) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[1] = pos2 - } - } - - } else { - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i) - : {} - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - } - - } else { - // insert new key, that's tricky - var path_1 = path.slice(0, i) - - // find a last separator after which we're inserting it - var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1) - assert(pos2 !== false) - - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i) - : {} - - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - - // adding leading whitespaces according to detected codestyle - var prefix = [] - if (indent.newline && indent.newline.length) - prefix = prefix.concat(indent.newline) - if (indent.prefix && indent.prefix.length) - prefix = prefix.concat(indent.prefix) - - // adding '"key":' (as in "key":"value") to object values - if (!Array.isArray(data)) { - prefix = prefix.concat(value_to_tokenlist(path[path.length-1], path_1, this._options, true)) - if (indent.sep1 && indent.sep1.length) - prefix = prefix.concat(indent.sep1) - prefix.push({raw: ':', type: 'separator', stack: path_1}) - if (indent.sep2 && indent.sep2.length) - prefix = prefix.concat(indent.sep2) - } - - newtokens.unshift.apply(newtokens, prefix) - - // check if prev token is a separator AND they're at the same level - if (this._tokens[pos2].type === 'separator' && this._tokens[pos2].stack.length === path.length-1) { - // previous token is either , or [ or { - if (this._tokens[pos2].raw === ',') { - // restore ending comma - newtokens.push({raw: ',', type: 'separator', stack: path_1}) - } - } else { - // previous token isn't a separator, so need to insert one - newtokens.unshift({raw: ',', type: 'separator', stack: path_1}) - } - - if (indent.suffix && indent.suffix.length) - newtokens.push.apply(newtokens, indent.suffix) - - assert.equal(this._tokens[position[1]].type, 'separator') - position[0] = pos2+1 - position[1] = pos2 - } - - newtokens.unshift(position[1] - position[0] + 1) - newtokens.unshift(position[0]) - this._tokens.splice.apply(this._tokens, newtokens) - - return this -} - -// convenience method -Document.prototype.unset = function(path) { - return this.set(path, undefined) -} - -Document.prototype.get = function(path) { - path = arg_to_path(path) - - var data = this._data - for (var i=0; i old_data.length) { - // adding new elements, so going forward - for (var i=0; i=0; i--) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - - } else { - // both values are objects here - for (var i in new_data) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - - for (var i in old_data) { - if (i in new_data) continue - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - } -} - -Document.prototype.toString = function() { - return this._tokens.map(function(x) { - return x.raw - }).join('') -} - -__webpack_unused_export__ = Document - -module.exports.f = function updateJSON(source, new_value, options) { - return Document(source, options).update(new_value).toString() -} - - - -/***/ }), - -/***/ 1079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf - -var Uni = __nccwpck_require__(3667) - -function isHexDigit(x) { - return (x >= '0' && x <= '9') - || (x >= 'A' && x <= 'F') - || (x >= 'a' && x <= 'f') -} - -function isOctDigit(x) { - return x >= '0' && x <= '7' -} - -function isDecDigit(x) { - return x >= '0' && x <= '9' -} - -var unescapeMap = { - '\'': '\'', - '"' : '"', - '\\': '\\', - 'b' : '\b', - 'f' : '\f', - 'n' : '\n', - 'r' : '\r', - 't' : '\t', - 'v' : '\v', - '/' : '/', -} - -function formatError(input, msg, position, lineno, column, json5) { - var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1) - , tmppos = position - column - 1 - , srcline = '' - , underline = '' - - var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON - - // output no more than 70 characters before the wrong ones - if (tmppos < position - 70) { - tmppos = position - 70 - } - - while (1) { - var chr = input[++tmppos] - - if (isLineTerminator(chr) || tmppos === input.length) { - if (position >= tmppos) { - // ending line error, so show it after the last char - underline += '^' - } - break - } - srcline += chr - - if (position === tmppos) { - underline += '^' - } else if (position > tmppos) { - underline += input[tmppos] === '\t' ? '\t' : ' ' - } - - // output no more than 78 characters on the string - if (srcline.length > 78) break - } - - return result + '\n' + srcline + '\n' + underline -} - -function parse(input, options) { - // parse as a standard JSON mode - var json5 = false - var cjson = false - - if (options.legacy || options.mode === 'json') { - // use json - } else if (options.mode === 'cjson') { - cjson = true - } else if (options.mode === 'json5') { - json5 = true - } else { - // use it by default - json5 = true - } - - var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON - var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON - - var length = input.length - , lineno = 0 - , linestart = 0 - , position = 0 - , stack = [] - - var tokenStart = function() {} - var tokenEnd = function(v) {return v} - - /* tokenize({ - raw: '...', - type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline', - value: 'number'|'string'|'whatever', - path: [...], - }) - */ - if (options._tokenize) { - ;(function() { - var start = null - tokenStart = function() { - if (start !== null) throw Error('internal error, token overlap') - start = position - } - - tokenEnd = function(v, type) { - if (start != position) { - var hash = { - raw: input.substr(start, position-start), - type: type, - stack: stack.slice(0), - } - if (v !== undefined) hash.value = v - options._tokenize.call(null, hash) - } - start = null - return v - } - })() - } - - function fail(msg) { - var column = position - linestart - - if (!msg) { - if (position < length) { - var token = '\'' + - JSON - .stringify(input[position]) - .replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - + '\'' - - if (!msg) msg = 'Unexpected token ' + token - } else { - if (!msg) msg = 'Unexpected end of input' - } - } - - var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)) - error.row = lineno + 1 - error.column = column + 1 - throw error - } - - function newline(chr) { - // account for - if (chr === '\r' && input[position] === '\n') position++ - linestart = position - lineno++ - } - - function parseGeneric() { - var result - - while (position < length) { - tokenStart() - var chr = input[position++] - - if (chr === '"' || (chr === '\'' && json5)) { - return tokenEnd(parseString(chr), 'literal') - - } else if (chr === '{') { - tokenEnd(undefined, 'separator') - return parseObject() - - } else if (chr === '[') { - tokenEnd(undefined, 'separator') - return parseArray() - - } else if (chr === '-' - || chr === '.' - || isDecDigit(chr) - // + number Infinity NaN - || (json5 && (chr === '+' || chr === 'I' || chr === 'N')) - ) { - return tokenEnd(parseNumber(), 'literal') - - } else if (chr === 'n') { - parseKeyword('null') - return tokenEnd(null, 'literal') - - } else if (chr === 't') { - parseKeyword('true') - return tokenEnd(true, 'literal') - - } else if (chr === 'f') { - parseKeyword('false') - return tokenEnd(false, 'literal') - - } else { - position-- - return tokenEnd(undefined) - } - } - } - - function parseKey() { - var result - - while (position < length) { - tokenStart() - var chr = input[position++] - - if (chr === '"' || (chr === '\'' && json5)) { - return tokenEnd(parseString(chr), 'key') - - } else if (chr === '{') { - tokenEnd(undefined, 'separator') - return parseObject() - - } else if (chr === '[') { - tokenEnd(undefined, 'separator') - return parseArray() - - } else if (chr === '.' - || isDecDigit(chr) - ) { - return tokenEnd(parseNumber(true), 'key') - - } else if (json5 - && Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) { - // unicode char or a unicode sequence - var rollback = position - 1 - var result = parseIdentifier() - - if (result === undefined) { - position = rollback - return tokenEnd(undefined) - } else { - return tokenEnd(result, 'key') - } - - } else { - position-- - return tokenEnd(undefined) - } - } - } - - function skipWhiteSpace() { - tokenStart() - while (position < length) { - var chr = input[position++] - - if (isLineTerminator(chr)) { - position-- - tokenEnd(undefined, 'whitespace') - tokenStart() - position++ - newline(chr) - tokenEnd(undefined, 'newline') - tokenStart() - - } else if (isWhiteSpace(chr)) { - // nothing - - } else if (chr === '/' - && (json5 || cjson) - && (input[position] === '/' || input[position] === '*') - ) { - position-- - tokenEnd(undefined, 'whitespace') - tokenStart() - position++ - skipComment(input[position++] === '*') - tokenEnd(undefined, 'comment') - tokenStart() - - } else { - position-- - break - } - } - return tokenEnd(undefined, 'whitespace') - } - - function skipComment(multi) { - while (position < length) { - var chr = input[position++] - - if (isLineTerminator(chr)) { - // LineTerminator is an end of singleline comment - if (!multi) { - // let parent function deal with newline - position-- - return - } - - newline(chr) - - } else if (chr === '*' && multi) { - // end of multiline comment - if (input[position] === '/') { - position++ - return - } - - } else { - // nothing - } - } - - if (multi) { - fail('Unclosed multiline comment') - } - } - - function parseKeyword(keyword) { - // keyword[0] is not checked because it should've checked earlier - var _pos = position - var len = keyword.length - for (var i=1; i= length || keyword[i] != input[position]) { - position = _pos-1 - fail() - } - position++ - } - } - - function parseObject() { - var result = options.null_prototype ? Object.create(null) : {} - , empty_object = {} - , is_non_empty = false - - while (position < length) { - skipWhiteSpace() - var item1 = parseKey() - skipWhiteSpace() - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (chr === '}' && item1 === undefined) { - if (!json5 && is_non_empty) { - position-- - fail('Trailing comma in object') - } - return result - - } else if (chr === ':' && item1 !== undefined) { - skipWhiteSpace() - stack.push(item1) - var item2 = parseGeneric() - stack.pop() - - if (item2 === undefined) fail('No value found for key ' + item1) - if (typeof(item1) !== 'string') { - if (!json5 || typeof(item1) !== 'number') { - fail('Wrong key type: ' + item1) - } - } - - if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') { - if (options.reserved_keys === 'throw') { - fail('Reserved key: ' + item1) - } else { - // silently ignore it - } - } else { - if (typeof(options.reviver) === 'function') { - item2 = options.reviver.call(null, item1, item2) - } - - if (item2 !== undefined) { - is_non_empty = true - Object.defineProperty(result, item1, { - value: item2, - enumerable: true, - configurable: true, - writable: true, - }) - } - } - - skipWhiteSpace() - - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (chr === ',') { - continue - - } else if (chr === '}') { - return result - - } else { - fail() - } - - } else { - position-- - fail() - } - } - - fail() - } - - function parseArray() { - var result = [] - - while (position < length) { - skipWhiteSpace() - stack.push(result.length) - var item = parseGeneric() - stack.pop() - skipWhiteSpace() - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (item !== undefined) { - if (typeof(options.reviver) === 'function') { - item = options.reviver.call(null, String(result.length), item) - } - if (item === undefined) { - result.length++ - item = true // hack for check below, not included into result - } else { - result.push(item) - } - } - - if (chr === ',') { - if (item === undefined) { - fail('Elisions are not supported') - } - - } else if (chr === ']') { - if (!json5 && item === undefined && result.length) { - position-- - fail('Trailing comma in array') - } - return result - - } else { - position-- - fail() - } - } - } - - function parseNumber() { - // rewind because we don't know first char - position-- - - var start = position - , chr = input[position++] - , t - - var to_num = function(is_octal) { - var str = input.substr(start, position - start) - - if (is_octal) { - var result = parseInt(str.replace(/^0o?/, ''), 8) - } else { - var result = Number(str) - } - - if (Number.isNaN(result)) { - position-- - fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"') - } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { - // additional restrictions imposed by json - position-- - fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"') - } else { - return result - } - } - - // ex: -5982475.249875e+29384 - // ^ skipping this - if (chr === '-' || (chr === '+' && json5)) chr = input[position++] - - if (chr === 'N' && json5) { - parseKeyword('NaN') - return NaN - } - - if (chr === 'I' && json5) { - parseKeyword('Infinity') - - // returning +inf or -inf - return to_num() - } - - if (chr >= '1' && chr <= '9') { - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - // special case for leading zero: 0.123456 - if (chr === '0') { - chr = input[position++] - - // new syntax, "0o777" old syntax, "0777" - var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr) - var is_hex = chr === 'x' || chr === 'X' - - if (json5 && (is_octal || is_hex)) { - while (position < length - && (is_hex ? isHexDigit : isOctDigit)( input[position] ) - ) position++ - - var sign = 1 - if (input[start] === '-') { - sign = -1 - start++ - } else if (input[start] === '+') { - start++ - } - - return sign * to_num(is_octal) - } - } - - if (chr === '.') { - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - if (chr === 'e' || chr === 'E') { - chr = input[position++] - if (chr === '-' || chr === '+') position++ - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - // we have char in the buffer, so count for it - position-- - return to_num() - } - - function parseIdentifier() { - // rewind because we don't know first char - position-- - - var result = '' - - while (position < length) { - var chr = input[position++] - - if (chr === '\\' - && input[position] === 'u' - && isHexDigit(input[position+1]) - && isHexDigit(input[position+2]) - && isHexDigit(input[position+3]) - && isHexDigit(input[position+4]) - ) { - // UnicodeEscapeSequence - chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16)) - position += 5 - } - - if (result.length) { - // identifier started - if (Uni.isIdentifierPart(chr)) { - result += chr - } else { - position-- - return result - } - - } else { - if (Uni.isIdentifierStart(chr)) { - result += chr - } else { - return undefined - } - } - } - - fail() - } - - function parseString(endChar) { - // 7.8.4 of ES262 spec - var result = '' - - while (position < length) { - var chr = input[position++] - - if (chr === endChar) { - return result - - } else if (chr === '\\') { - if (position >= length) fail() - chr = input[position++] - - if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) { - result += unescapeMap[chr] - - } else if (json5 && isLineTerminator(chr)) { - // line continuation - newline(chr) - - } else if (chr === 'u' || (chr === 'x' && json5)) { - // unicode/character escape sequence - var off = chr === 'u' ? 4 : 2 - - // validation for \uXXXX - for (var i=0; i= length) fail() - if (!isHexDigit(input[position])) fail('Bad escape sequence') - position++ - } - - result += String.fromCharCode(parseInt(input.substr(position-off, off), 16)) - } else if (json5 && isOctDigit(chr)) { - if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) { - // three-digit octal - var digits = 3 - } else if (isOctDigit(input[position])) { - // two-digit octal - var digits = 2 - } else { - var digits = 1 - } - position += digits - 1 - result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8)) - /*if (!isOctDigit(input[position])) { - // \0 is allowed still - result += '\0' - } else { - fail('Octal literals are not supported') - }*/ - - } else if (json5) { - // \X -> x - result += chr - - } else { - position-- - fail() - } - - } else if (isLineTerminator(chr)) { - fail() - - } else { - if (!json5 && chr.charCodeAt(0) < 32) { - position-- - fail('Unexpected control character') - } - - // SourceCharacter but not one of " or \ or LineTerminator - result += chr - } - } - - fail() - } - - skipWhiteSpace() - var return_value = parseGeneric() - if (return_value !== undefined || position < length) { - skipWhiteSpace() - - if (position >= length) { - if (typeof(options.reviver) === 'function') { - return_value = options.reviver.call(null, '', return_value) - } - return return_value - } else { - fail() - } - - } else { - if (position) { - fail('No data, only a whitespace') - } else { - fail('No data, empty input') - } - } -} - -/* - * parse(text, options) - * or - * parse(text, reviver) - * - * where: - * text - string - * options - object - * reviver - function - */ -module.exports.parse = function parseJSON(input, options) { - // support legacy functions - if (typeof(options) === 'function') { - options = { - reviver: options - } - } - - if (input === undefined) { - // parse(stringify(x)) should be equal x - // with JSON functions it is not 'cause of undefined - // so we're fixing it - return undefined - } - - // JSON.parse compat - if (typeof(input) !== 'string') input = String(input) - if (options == null) options = {} - if (options.reserved_keys == null) options.reserved_keys = 'ignore' - - if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') { - if (options.null_prototype == null) { - options.null_prototype = true - } - } - - try { - return parse(input, options) - } catch(err) { - // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack - // - // this catch is used to skip all those internal calls - if (err instanceof SyntaxError && err.row != null && err.column != null) { - var old_err = err - err = SyntaxError(old_err.message) - err.column = old_err.column - err.row = old_err.row - } - throw err - } -} - -module.exports.tokenize = function tokenizeJSON(input, options) { - if (options == null) options = {} - - options._tokenize = function(smth) { - if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack) - tokens.push(smth) - } - - var tokens = [] - tokens.data = module.exports.parse(input, options) - return tokens -} - - - -/***/ }), - -/***/ 8585: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -var Uni = __nccwpck_require__(3667) - -// Fix Function#name on browsers that do not support it (IE) -// http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie -if (!(function f(){}).name) { - Object.defineProperty((function(){}).constructor.prototype, 'name', { - get: function() { - var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1] - // For better performance only parse once, and then cache the - // result through a new accessor for repeated access. - Object.defineProperty(this, 'name', { value: name }) - return name - } - }) -} - -var special_chars = { - 0: '\\0', // this is not an octal literal - 8: '\\b', - 9: '\\t', - 10: '\\n', - 11: '\\v', - 12: '\\f', - 13: '\\r', - 92: '\\\\', -} - -// for oddballs -var hasOwnProperty = Object.prototype.hasOwnProperty - -// some people escape those, so I'd copy this to be safe -var escapable = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/ - -function _stringify(object, options, recursiveLvl, currentKey) { - var json5 = (options.mode === 'json5' || !options.mode) - /* - * Opinionated decision warning: - * - * Objects are serialized in the following form: - * { type: 'Class', data: DATA } - * - * Class is supposed to be a function, and new Class(DATA) is - * supposed to be equivalent to the original value - */ - /*function custom_type() { - return stringify({ - type: object.constructor.name, - data: object.toString() - }) - }*/ - - // if add, it's an internal indentation, so we add 1 level and a eol - // if !add, it's an ending indentation, so we just indent - function indent(str, add) { - var prefix = options._prefix ? options._prefix : '' - if (!options.indent) return prefix + str - var result = '' - var count = recursiveLvl + (add || 0) - for (var i=0; i 0) { - if (!Uni.isIdentifierPart(key[i])) - return _stringify_str(key) - - } else { - if (!Uni.isIdentifierStart(key[i])) - return _stringify_str(key) - } - - var chr = key.charCodeAt(i) - - if (options.ascii) { - if (chr < 0x80) { - result += key[i] - - } else { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - } - - } else { - if (escapable.exec(key[i])) { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - - } else { - result += key[i] - } - } - } - - return result - } - - function _stringify_str(key) { - var quote = options.quote - var quoteChr = quote.charCodeAt(0) - - var result = '' - for (var i=0; i= 8 && chr <= 13 && (json5 || chr !== 11)) { - result += special_chars[chr] - } else if (json5) { - result += '\\x0' + chr.toString(16) - } else { - result += '\\u000' + chr.toString(16) - } - - } else if (chr < 0x20) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr >= 0x20 && chr < 0x80) { - // ascii range - if (chr === 47 && i && key[i-1] === '<') { - // escaping slashes in - result += '\\' + key[i] - - } else if (chr === 92) { - result += '\\\\' - - } else if (chr === quoteChr) { - result += '\\' + quote - - } else { - result += key[i] - } - - } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) { - if (chr < 0x100) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr < 0x1000) { - result += '\\u0' + chr.toString(16) - - } else if (chr < 0x10000) { - result += '\\u' + chr.toString(16) - - } else { - throw Error('weird codepoint') - } - } else { - result += key[i] - } - } - return quote + result + quote - } - - function _stringify_object() { - if (object === null) return 'null' - var result = [] - , len = 0 - , braces - - if (Array.isArray(object)) { - braces = '[]' - for (var i=0; i options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) { - // remove trailing comma in multiline if asked to - if (options.no_trailing_comma && result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.map(function(x) {return indent(x, 1)}).join('') - return braces[0] - + (options.indent ? '\n' : '') - + innerStuff - + indent(braces[1]) - } else { - // always remove trailing comma in one-lined arrays - if (result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.join(options.indent ? ' ' : '') - return braces[0] - + innerStuff - + braces[1] - } - } - - function _stringify_nonobject(object) { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - } - - switch(typeof(object)) { - case 'string': - return _stringify_str(object) - - case 'number': - if (object === 0 && 1/object < 0) { - // Opinionated decision warning: - // - // I want cross-platform negative zero in all js engines - // I know they're equal, but why lose that tiny bit of - // information needlessly? - return '-0' - } - if (!json5 && !Number.isFinite(object)) { - // json don't support infinity (= sucks) - return 'null' - } - return object.toString() - - case 'boolean': - return object.toString() - - case 'undefined': - return undefined - - case 'function': -// return custom_type() - - default: - // fallback for something weird - return JSON.stringify(object) - } - } - - if (options._stringify_key) { - return _stringify_key(object) - } - - if (typeof(object) === 'object') { - if (object === null) return 'null' - - var str - if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') { - object = str.call(object, currentKey) - - } else if (typeof(str = object.toJSON) === 'function') { - object = str.call(object, currentKey) - } - - if (object === null) return 'null' - if (typeof(object) !== 'object') return _stringify_nonobject(object) - - if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) { - object = object.valueOf() - return _stringify_nonobject(object) - - } else if (object.constructor === Date) { - // only until we can't do better - return _stringify_nonobject(object.toISOString()) - - } else { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - if (typeof(object) !== 'object') return _stringify_nonobject(object) - } - - return _stringify_object(object) - } - } else { - return _stringify_nonobject(object) - } -} - -/* - * stringify(value, options) - * or - * stringify(value, replacer, space) - * - * where: - * value - anything - * options - object - * replacer - function or array - * space - boolean or number or string - */ -module.exports.A = function stringifyJSON(object, options, _space) { - // support legacy syntax - if (typeof(options) === 'function' || Array.isArray(options)) { - options = { - replacer: options - } - } else if (typeof(options) === 'object' && options !== null) { - // nothing to do - } else { - options = {} - } - if (_space != null) options.indent = _space - - if (options.indent == null) options.indent = '\t' - if (options.quote == null) options.quote = "'" - if (options.ascii == null) options.ascii = false - if (options.mode == null) options.mode = 'json5' - - if (options.mode === 'json' || options.mode === 'cjson') { - // json only supports double quotes (= sucks) - options.quote = '"' - - // json don't support trailing commas (= sucks) - options.no_trailing_comma = true - - // json don't support unquoted property names (= sucks) - options.quote_keys = true - } - - // why would anyone use such objects? - if (typeof(options.indent) === 'object') { - if (options.indent.constructor === Number - || options.indent.constructor === Boolean - || options.indent.constructor === String) - options.indent = options.indent.valueOf() - } - - // gap is capped at 10 characters - if (typeof(options.indent) === 'number') { - if (options.indent >= 0) { - options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ') - } else { - options.indent = false - } - } else if (typeof(options.indent) === 'string') { - options.indent = options.indent.substr(0, 10) - } - - if (options._splitMin == null) options._splitMin = 50 - if (options._splitMax == null) options._splitMax = 70 - - return _stringify(object, options, 0, '') -} - - - -/***/ }), - -/***/ 3667: -/***/ ((module) => { - - -// This is autogenerated with esprima tools, see: -// https://github.com/ariya/esprima/blob/master/esprima.js -// -// PS: oh God, I hate Unicode - -// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart: - -var Uni = module.exports - -module.exports.isWhiteSpace = function isWhiteSpace(x) { - // section 7.2, table 2 - return x === '\u0020' - || x === '\u00A0' - || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one - || (x >= '\u0009' && x <= '\u000D') // 9 A B C D - - // + whitespace characters from unicode, category Zs - || x === '\u1680' - || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A - || x === '\u2028' - || x === '\u2029' - || x === '\u202F' - || x === '\u205F' - || x === '\u3000' -} - -module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { - return x === '\u0020' - || x === '\u0009' - || x === '\u000A' - || x === '\u000D' -} - -module.exports.isLineTerminator = function isLineTerminator(x) { - // ok, here is the part when JSON is wrong - // section 7.3, table 3 - return x === '\u000A' - || x === '\u000D' - || x === '\u2028' - || x === '\u2029' -} - -module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { - return x === '\u000A' - || x === '\u000D' -} - -module.exports.isIdentifierStart = function isIdentifierStart(x) { - return x === '$' - || x === '_' - || (x >= 'A' && x <= 'Z') - || (x >= 'a' && x <= 'z') - || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x)) -} - -module.exports.isIdentifierPart = function isIdentifierPart(x) { - return x === '$' - || x === '_' - || (x >= 'A' && x <= 'Z') - || (x >= 'a' && x <= 'z') - || (x >= '0' && x <= '9') // <-- addition to Start - || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x)) -} - -module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - -// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart: - -module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - - -/***/ }), - -/***/ 7629: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var FS = __nccwpck_require__(9896) -var jju = __nccwpck_require__(9656) - -// this function registers json5 extension, so you -// can do `require("./config.json5")` kind of thing -module.exports.register = function() { - var r = __WEBPACK_EXTERNAL_createRequire(import.meta.url), e = 'extensions' - r[e]['.json5'] = function(m, f) { - /*eslint no-sync:0*/ - m.exports = jju.parse(FS.readFileSync(f, 'utf8')) - } -} - -// this function monkey-patches JSON.parse, so it -// will return an exact position of error in case -// of parse failure -module.exports.patch_JSON_parse = function() { - var _parse = JSON.parse - JSON.parse = function(text, rev) { - try { - return _parse(text, rev) - } catch(err) { - // this call should always throw - (__nccwpck_require__(9656).parse)(text, { - mode: 'json', - legacy: true, - reviver: rev, - reserved_keys: 'replace', - null_prototype: false, - }) - - // if it didn't throw, but original parser did, - // this is an error in this library and should be reported - throw err - } - } -} - -// this function is an express/connect middleware -// that accepts uploads in application/json5 format -module.exports.middleware = function() { - return function(req, res, next) { - throw Error('this function is removed, use express-json5 instead') - } -} - - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const loader = __nccwpck_require__(9384) -const dumper = __nccwpck_require__(3698) - -function renamed (from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.') - } -} - -module.exports.Type = __nccwpck_require__(1647) -module.exports.Schema = __nccwpck_require__(9992) -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(5478) -module.exports.JSON_SCHEMA = __nccwpck_require__(1441) -module.exports.CORE_SCHEMA = __nccwpck_require__(8920) -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(8922) -module.exports.load = loader.load -module.exports.loadAll = loader.loadAll -module.exports.dump = dumper.dump -module.exports.YAMLException = __nccwpck_require__(3954) - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: __nccwpck_require__(4259), - float: __nccwpck_require__(2102), - map: __nccwpck_require__(9362), - null: __nccwpck_require__(3507), - pairs: __nccwpck_require__(3985), - set: __nccwpck_require__(3896), - timestamp: __nccwpck_require__(7328), - bool: __nccwpck_require__(1928), - int: __nccwpck_require__(2729), - merge: __nccwpck_require__(7652), - omap: __nccwpck_require__(7023), - seq: __nccwpck_require__(2987), - str: __nccwpck_require__(2999) -} - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load') -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll') -module.exports.safeDump = renamed('safeDump', 'dump') - - -/***/ }), - -/***/ 3922: -/***/ ((module) => { - - - -function isNothing (subject) { - return (typeof subject === 'undefined') || (subject === null) -} - -function isObject (subject) { - return (typeof subject === 'object') && (subject !== null) -} - -function toArray (sequence) { - if (Array.isArray(sequence)) return sequence - else if (isNothing(sequence)) return [] - - return [sequence] -} - -function extend (target, source) { - if (source) { - const sourceKeys = Object.keys(source) - - for (let index = 0, length = sourceKeys.length; index < length; index += 1) { - const key = sourceKeys[index] - target[key] = source[key] - } - } - - return target -} - -function repeat (string, count) { - let result = '' - - for (let cycle = 0; cycle < count; cycle += 1) { - result += string - } - - return result -} - -function isNegativeZero (number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number) -} - -module.exports.isNothing = isNothing -module.exports.isObject = isObject -module.exports.toArray = toArray -module.exports.repeat = repeat -module.exports.isNegativeZero = isNegativeZero -module.exports.extend = extend - - -/***/ }), - -/***/ 3698: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _toString = Object.prototype.toString -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CHAR_BOM = 0xFEFF -const CHAR_TAB = 0x09 /* Tab */ -const CHAR_LINE_FEED = 0x0A /* LF */ -const CHAR_CARRIAGE_RETURN = 0x0D /* CR */ -const CHAR_SPACE = 0x20 /* Space */ -const CHAR_EXCLAMATION = 0x21 /* ! */ -const CHAR_DOUBLE_QUOTE = 0x22 /* " */ -const CHAR_SHARP = 0x23 /* # */ -const CHAR_PERCENT = 0x25 /* % */ -const CHAR_AMPERSAND = 0x26 /* & */ -const CHAR_SINGLE_QUOTE = 0x27 /* ' */ -const CHAR_ASTERISK = 0x2A /* * */ -const CHAR_COMMA = 0x2C /* , */ -const CHAR_MINUS = 0x2D /* - */ -const CHAR_COLON = 0x3A /* : */ -const CHAR_EQUALS = 0x3D /* = */ -const CHAR_GREATER_THAN = 0x3E /* > */ -const CHAR_QUESTION = 0x3F /* ? */ -const CHAR_COMMERCIAL_AT = 0x40 /* @ */ -const CHAR_LEFT_SQUARE_BRACKET = 0x5B /* [ */ -const CHAR_RIGHT_SQUARE_BRACKET = 0x5D /* ] */ -const CHAR_GRAVE_ACCENT = 0x60 /* ` */ -const CHAR_LEFT_CURLY_BRACKET = 0x7B /* { */ -const CHAR_VERTICAL_LINE = 0x7C /* | */ -const CHAR_RIGHT_CURLY_BRACKET = 0x7D /* } */ - -const ESCAPE_SEQUENCES = {} - -ESCAPE_SEQUENCES[0x00] = '\\0' -ESCAPE_SEQUENCES[0x07] = '\\a' -ESCAPE_SEQUENCES[0x08] = '\\b' -ESCAPE_SEQUENCES[0x09] = '\\t' -ESCAPE_SEQUENCES[0x0A] = '\\n' -ESCAPE_SEQUENCES[0x0B] = '\\v' -ESCAPE_SEQUENCES[0x0C] = '\\f' -ESCAPE_SEQUENCES[0x0D] = '\\r' -ESCAPE_SEQUENCES[0x1B] = '\\e' -ESCAPE_SEQUENCES[0x22] = '\\"' -ESCAPE_SEQUENCES[0x5C] = '\\\\' -ESCAPE_SEQUENCES[0x85] = '\\N' -ESCAPE_SEQUENCES[0xA0] = '\\_' -ESCAPE_SEQUENCES[0x2028] = '\\L' -ESCAPE_SEQUENCES[0x2029] = '\\P' - -const DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -] - -const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/ - -function compileStyleMap (schema, map) { - if (map === null) return {} - - const result = {} - const keys = Object.keys(map) - - for (let index = 0, length = keys.length; index < length; index += 1) { - let tag = keys[index] - let style = String(map[tag]) - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2) - } - const type = schema.compiledTypeMap['fallback'][tag] - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style] - } - - result[tag] = style - } - - return result -} - -function encodeHex (character) { - let handle - let length - - const string = character.toString(16).toUpperCase() - - if (character <= 0xFF) { - handle = 'x' - length = 2 - } else if (character <= 0xFFFF) { - handle = 'u' - length = 4 - } else if (character <= 0xFFFFFFFF) { - handle = 'U' - length = 8 - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF') - } - - return '\\' + handle + common.repeat('0', length - string.length) + string -} - -const QUOTING_TYPE_SINGLE = 1 -const QUOTING_TYPE_DOUBLE = 2 - -function State (options) { - this.schema = options['schema'] || DEFAULT_SCHEMA - this.indent = Math.max(1, (options['indent'] || 2)) - this.noArrayIndent = options['noArrayIndent'] || false - this.skipInvalid = options['skipInvalid'] || false - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']) - this.styleMap = compileStyleMap(this.schema, options['styles'] || null) - this.sortKeys = options['sortKeys'] || false - this.lineWidth = options['lineWidth'] || 80 - this.noRefs = options['noRefs'] || false - this.noCompatMode = options['noCompatMode'] || false - this.condenseFlow = options['condenseFlow'] || false - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE - this.forceQuotes = options['forceQuotes'] || false - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null - - this.implicitTypes = this.schema.compiledImplicit - this.explicitTypes = this.schema.compiledExplicit - - this.tag = null - this.result = '' - - this.duplicates = [] - this.usedDuplicates = null -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString (string, spaces) { - const ind = common.repeat(' ', spaces) - let position = 0 - let result = '' - const length = string.length - - while (position < length) { - let line - const next = string.indexOf('\n', position) - if (next === -1) { - line = string.slice(position) - position = length - } else { - line = string.slice(position, next + 1) - position = next + 1 - } - - if (line.length && line !== '\n') result += ind - - result += line - } - - return result -} - -function generateNextLine (state, level) { - return '\n' + common.repeat(' ', state.indent * level) -} - -function testImplicitResolving (state, str) { - for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) { - const type = state.implicitTypes[index] - - if (type.resolve(str)) { - return true - } - } - - return false -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace (c) { - return c === CHAR_SPACE || c === CHAR_TAB -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable (c) { - return (c >= 0x00020 && c <= 0x00007E) || - ((c >= 0x000A1 && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) || - ((c >= 0x0E000 && c <= 0x00FFFD) && c !== CHAR_BOM) || - (c >= 0x10000 && c <= 0x10FFFF) -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace (c) { - return isPrintable(c) && - c !== CHAR_BOM && - // - b-char - c !== CHAR_CARRIAGE_RETURN && - c !== CHAR_LINE_FEED -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe (c, prev, inblock) { - const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c) - const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c) - return ( - ( - // ns-plain-safe - inblock // c = flow-in - ? cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace && - // - c-flow-indicator - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET - ) && - // ns-plain-char - c !== CHAR_SHARP && // false on '#' - !(prev === CHAR_COLON && !cIsNsChar) - ) || // false on ': ' - (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) || // change to true on '[^ ]#' - (prev === CHAR_COLON && cIsNsChar) // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst (c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && - c !== CHAR_BOM && - !isWhitespace(c) && // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - c !== CHAR_MINUS && - c !== CHAR_QUESTION && - c !== CHAR_COLON && - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET && - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - c !== CHAR_SHARP && - c !== CHAR_AMPERSAND && - c !== CHAR_ASTERISK && - c !== CHAR_EXCLAMATION && - c !== CHAR_VERTICAL_LINE && - c !== CHAR_EQUALS && - c !== CHAR_GREATER_THAN && - c !== CHAR_SINGLE_QUOTE && - c !== CHAR_DOUBLE_QUOTE && - // | “%” | “@” | “`”) - c !== CHAR_PERCENT && - c !== CHAR_COMMERCIAL_AT && - c !== CHAR_GRAVE_ACCENT -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast (c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt (string, pos) { - const first = string.charCodeAt(pos) - let second - - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1) - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000 - } - } - return first -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator (string) { - const leadingSpaceRe = /^\n* / - return leadingSpaceRe.test(string) -} - -const STYLE_PLAIN = 1 -const STYLE_SINGLE = 2 -const STYLE_LITERAL = 3 -const STYLE_FOLDED = 4 -const STYLE_DOUBLE = 5 - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle (string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - let i - let char = 0 - let prevChar = null - let hasLineBreak = false - let hasFoldableLine = false // only checked if shouldTrackWidth - const shouldTrackWidth = lineWidth !== -1 - let previousLineBreak = -1 // count the first line correctly - let plain = isPlainSafeFirst(codePointAt(string, 0)) && - isPlainSafeLast(codePointAt(string, string.length - 1)) - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (char === CHAR_LINE_FEED) { - hasLineBreak = true - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ') - previousLineBreak = i - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')) - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar (state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''" - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'") - } - } - - const indent = state.indent * Math.max(1, level) // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - const lineWidth = (state.lineWidth === -1) - ? -1 - : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent) - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - const singleLineOnly = iskey || - // No block styles in flow mode. - (state.flowLevel > -1 && level >= state.flowLevel) - function testAmbiguity (string) { - return testImplicitResolving(state, string) - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - case STYLE_PLAIN: - return string - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'" - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(string, indent)) - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(foldString(string, lineWidth), indent)) - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"' - default: - throw new YAMLException('impossible error: invalid scalar style') - } - }()) -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader (string, indentPerLevel) { - const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '' - - // note the special case: the string '\n' counts as a "trailing" empty line. - const clip = string[string.length - 1] === '\n' - const keep = clip && (string[string.length - 2] === '\n' || string === '\n') - const chomp = keep ? '+' : (clip ? '' : '-') - - return indentIndicator + chomp + '\n' -} - -// (See the note for writeScalar.) -function dropEndingNewline (string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString (string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - const lineRe = /(\n+)([^\n]*)/g - - // first line (possibly an empty line) - let result = (function () { - let nextLF = string.indexOf('\n') - nextLF = nextLF !== -1 ? nextLF : string.length - lineRe.lastIndex = nextLF - return foldLine(string.slice(0, nextLF), width) - }()) - // If we haven't reached the first content line yet, don't add an extra \n. - let prevMoreIndented = string[0] === '\n' || string[0] === ' ' - let moreIndented - - // rest of the lines - let match - while ((match = lineRe.exec(string))) { - const prefix = match[1] - const line = match[2] - - moreIndented = (line[0] === ' ') - result += prefix + - ((!prevMoreIndented && !moreIndented && line !== '') ? '\n' : '') + - foldLine(line, width) - prevMoreIndented = moreIndented - } - - return result -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine (line, width) { - if (line === '' || line[0] === ' ') return line - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - const breakRe = / [^ ]/g // note: the match index will always be <= length-2. - let match - // start is an inclusive index. end, curr, and next are exclusive. - let start = 0 - let end - let curr = 0 - let next = 0 - let result = '' - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next // derive end <= length-2 - result += '\n' + line.slice(start, end) - // skip the space that was output as \n - start = end + 1 // derive start <= length-1 - } - curr = next - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n' - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1) - } else { - result += line.slice(start) - } - - return result.slice(1) // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString (string) { - let result = '' - let char = 0 - - for (let i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - const escapeSeq = ESCAPE_SEQUENCES[char] - - if (!escapeSeq && isPrintable(char)) { - result += string[i] - if (char >= 0x10000) result += string[i + 1] - } else { - result += escapeSeq || encodeHex(char) - } - } - - return result -} - -function writeFlowSequence (state, level, object) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '') - _result += state.dump - } - } - - state.tag = _tag - state.dump = '[' + _result + ']' -} - -function writeBlockSequence (state, level, object, compact) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - if (!compact || _result !== '') { - _result += generateNextLine(state, level) - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-' - } else { - _result += '- ' - } - - _result += state.dump - } - } - - state.tag = _tag - state.dump = _result || '[]' // Empty sequence if no valid values. -} - -function writeFlowMapping (state, level, object) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - if (_result !== '') pairBuffer += ', ' - - if (state.condenseFlow) pairBuffer += '"' - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? ' - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ') - - if (!writeNode(state, level, objectValue, false, false)) { - continue // Skip this pair because of invalid value. - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = '{' + _result + '}' -} - -function writeBlockMapping (state, level, object, compact) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort() - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys) - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function') - } - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level) - } - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue // Skip this pair because of invalid key. - } - - const explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024) - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?' - } else { - pairBuffer += '? ' - } - } - - pairBuffer += state.dump - - if (explicitPair) { - pairBuffer += generateNextLine(state, level) - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':' - } else { - pairBuffer += ': ' - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = _result || '{}' // Empty mapping if no valid pairs. -} - -function detectType (state, object, explicit) { - const typeList = explicit ? state.explicitTypes : state.implicitTypes - - for (let index = 0, length = typeList.length; index < length; index += 1) { - const type = typeList[index] - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object) - } else { - state.tag = type.tag - } - } else { - state.tag = '?' - } - - if (type.represent) { - const style = state.styleMap[type.tag] || type.defaultStyle - - let _result - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style) - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style) - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style') - } - - state.dump = _result - } - - return true - } - } - - return false -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode (state, level, object, block, compact, iskey, isblockseq) { - state.tag = null - state.dump = object - - if (!detectType(state, object, false)) { - detectType(state, object, true) - } - - const type = _toString.call(state.dump) - const inblock = block - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level) - } - - const objectOrArray = type === '[object Object]' || type === '[object Array]' - let duplicateIndex - let duplicate - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object) - duplicate = duplicateIndex !== -1 - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowMapping(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact) - } else { - writeBlockSequence(state, level, state.dump, compact) - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowSequence(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock) - } - } else if (type === '[object Undefined]') { - return false - } else { - if (state.skipInvalid) return false - throw new YAMLException('unacceptable kind of an object to dump ' + type) - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - let tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21') - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18) - } else { - tagStr = '!<' + tagStr + '>' - } - - state.dump = tagStr + ' ' + state.dump - } - } - - return true -} - -function getDuplicateReferences (object, state) { - const objects = [] - const duplicatesIndexes = [] - - inspectNode(object, objects, duplicatesIndexes) - - const length = duplicatesIndexes.length - for (let index = 0; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]) - } - state.usedDuplicates = new Array(length) -} - -function inspectNode (object, objects, duplicatesIndexes) { - if (object !== null && typeof object === 'object') { - const index = objects.indexOf(object) - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index) - } - } else { - objects.push(object) - - if (Array.isArray(object)) { - for (let i = 0, length = object.length; i < length; i += 1) { - inspectNode(object[i], objects, duplicatesIndexes) - } - } else { - const objectKeyList = Object.keys(object) - - for (let i = 0, length = objectKeyList.length; i < length; i += 1) { - inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes) - } - } - } - } -} - -function dump (input, options) { - options = options || {} - - const state = new State(options) - - if (!state.noRefs) getDuplicateReferences(input, state) - - let value = input - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value) - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n' - - return '' -} - -module.exports.dump = dump - - -/***/ }), - -/***/ 3954: -/***/ ((module) => { - -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - -function formatError (exception, compact) { - let where = '' - const message = exception.reason || '(unknown reason)' - - if (!exception.mark) return message - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" ' - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')' - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet - } - - return message + ' ' + where -} - -function YAMLException (reason, mark) { - // Super constructor - Error.call(this) - - this.name = 'YAMLException' - this.reason = reason - this.mark = mark - this.message = formatError(this, false) - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor) - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || '' - } -} - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype) -YAMLException.prototype.constructor = YAMLException - -YAMLException.prototype.toString = function toString (compact) { - return this.name + ': ' + formatError(this, compact) -} - -module.exports = YAMLException - - -/***/ }), - -/***/ 9384: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const makeSnippet = __nccwpck_require__(1934) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CONTEXT_FLOW_IN = 1 -const CONTEXT_FLOW_OUT = 2 -const CONTEXT_BLOCK_IN = 3 -const CONTEXT_BLOCK_OUT = 4 - -const CHOMPING_CLIP = 1 -const CHOMPING_STRIP = 2 -const CHOMPING_KEEP = 3 - -// eslint-disable-next-line no-control-regex -const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ -const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i - -function _class (obj) { return Object.prototype.toString.call(obj) } - -function isEol (c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */) -} - -function isWhiteSpace (c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */) -} - -function isWsOrEol (c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */) -} - -function isFlowIndicator (c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */ -} - -function fromHexCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - const lc = c | 0x20 - - if ((lc >= 0x61/* a */) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10 - } - - return -1 -} - -function escapedHexLen (c) { - if (c === 0x78/* x */) { return 2 } - if (c === 0x75/* u */) { return 4 } - if (c === 0x55/* U */) { return 8 } - return 0 -} - -function fromDecimalCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - return -1 -} - -function simpleEscapeSequence (c) { - switch (c) { - case 0x30/* 0 */: return '\x00' - case 0x61/* a */: return '\x07' - case 0x62/* b */: return '\x08' - case 0x74/* t */: return '\x09' - case 0x09/* Tab */: return '\x09' - case 0x6E/* n */: return '\x0A' - case 0x76/* v */: return '\x0B' - case 0x66/* f */: return '\x0C' - case 0x72/* r */: return '\x0D' - case 0x65/* e */: return '\x1B' - case 0x20/* Space */: return ' ' - case 0x22/* " */: return '\x22' - case 0x2F/* / */: return '/' - case 0x5C/* \ */: return '\x5C' - case 0x4E/* N */: return '\x85' - case 0x5F/* _ */: return '\xA0' - case 0x4C/* L */: return '\u2028' - case 0x50/* P */: return '\u2029' - default: return '' - } -} - -function charFromCodepoint (c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c) - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ) -} - -// set a property of a literal object, while protecting against prototype pollution, -// see https://github.com/nodeca/js-yaml/issues/164 for more details -function setProperty (object, key, value) { - // used for this specific key only because Object.defineProperty is slow - if (key === '__proto__') { - Object.defineProperty(object, key, { - configurable: true, - enumerable: true, - writable: true, - value: value - }) - } else { - object[key] = value - } -} - -const simpleEscapeCheck = new Array(256) // integer, for fast access -const simpleEscapeMap = new Array(256) -for (let i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0 - simpleEscapeMap[i] = simpleEscapeSequence(i) -} - -function State (input, options) { - this.input = input - - this.filename = options['filename'] || null - this.schema = options['schema'] || DEFAULT_SCHEMA - this.onWarning = options['onWarning'] || null - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false - - this.json = options['json'] || false - this.listener = options['listener'] || null - this.maxDepth = typeof options['maxDepth'] === 'number' ? options['maxDepth'] : 100 - this.maxMergeSeqLength = typeof options['maxMergeSeqLength'] === 'number' ? options['maxMergeSeqLength'] : 20 - - this.implicitTypes = this.schema.compiledImplicit - this.typeMap = this.schema.compiledTypeMap - - this.length = input.length - this.position = 0 - this.line = 0 - this.lineStart = 0 - this.lineIndent = 0 - this.depth = 0 - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1 - - this.documents = [] - this.anchorMapTransactions = [] - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result; */ -} - -function generateError (state, message) { - const mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - } - - mark.snippet = makeSnippet(mark) - - return new YAMLException(message, mark) -} - -function throwError (state, message) { - throw generateError(state, message) -} - -function throwWarning (state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)) - } -} - -function storeAnchor (state, name, value) { - const transactions = state.anchorMapTransactions - - if (transactions.length !== 0) { - const transaction = transactions[transactions.length - 1] - - if (!_hasOwnProperty.call(transaction, name)) { - transaction[name] = { - existed: _hasOwnProperty.call(state.anchorMap, name), - value: state.anchorMap[name] - } - } - } - - state.anchorMap[name] = value -} - -function beginAnchorTransaction (state) { - state.anchorMapTransactions.push(Object.create(null)) -} - -function commitAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const transactions = state.anchorMapTransactions - - if (transactions.length === 0) return - - const parent = transactions[transactions.length - 1] - const names = Object.keys(transaction) - - for (let index = 0, length = names.length; index < length; index += 1) { - const name = names[index] - - if (!_hasOwnProperty.call(parent, name)) { - parent[name] = transaction[name] - } - } -} - -function rollbackAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const names = Object.keys(transaction) - - for (let index = names.length - 1; index >= 0; index -= 1) { - const entry = transaction[names[index]] - - if (entry.existed) { - state.anchorMap[names[index]] = entry.value - } else { - delete state.anchorMap[names[index]] - } - } -} - -function snapshotState (state) { - return { - position: state.position, - line: state.line, - lineStart: state.lineStart, - lineIndent: state.lineIndent, - firstTabInLine: state.firstTabInLine, - tag: state.tag, - anchor: state.anchor, - kind: state.kind, - result: state.result - } -} - -function restoreState (state, snapshot) { - state.position = snapshot.position - state.line = snapshot.line - state.lineStart = snapshot.lineStart - state.lineIndent = snapshot.lineIndent - state.firstTabInLine = snapshot.firstTabInLine - state.tag = snapshot.tag - state.anchor = snapshot.anchor - state.kind = snapshot.kind - state.result = snapshot.result -} - -const directiveHandlers = { - - YAML: function handleYamlDirective (state, name, args) { - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive') - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument') - } - - const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]) - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive') - } - - const major = parseInt(match[1], 10) - const minor = parseInt(match[2], 10) - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document') - } - - state.version = args[0] - state.checkLineBreaks = (minor < 2) - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document') - } - }, - - TAG: function handleTagDirective (state, name, args) { - let prefix - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments') - } - - const handle = args[0] - prefix = args[1] - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive') - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle') - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive') - } - - try { - prefix = decodeURIComponent(prefix) - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix) - } - - state.tagMap[handle] = prefix - } -} - -function captureSegment (state, start, end, checkJson) { - if (start < end) { - const _result = state.input.slice(start, end) - - if (checkJson) { - for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { - const _character = _result.charCodeAt(_position) - if (!(_character === 0x09 || - (_character >= 0x20 && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character') - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters') - } - - state.result += _result - } -} - -function mergeMappings (state, destination, source, overridableKeys) { - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable') - } - - const sourceKeys = Object.keys(source) - - for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - const key = sourceKeys[index] - - if (!_hasOwnProperty.call(destination, key)) { - setProperty(destination, key, source[key]) - overridableKeys[key] = true - } - } -} - -function storeMappingPair (state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode) - - for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys') - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]' - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]' - } - - keyNode = String(keyNode) - - if (_result === null) { - _result = {} - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - if (valueNode.length > state.maxMergeSeqLength) { - throwError(state, 'merge sequence length exceeded maxMergeSeqLength (' + state.maxMergeSeqLength + ')') - } - const seen = new Set() - for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { - const src = valueNode[index] - // Existing keys are not overridden on merge, so dedupe sources to - // avoid redundant work on repeated aliases. - if (seen.has(src)) continue - seen.add(src) - mergeMappings(state, _result, src, overridableKeys) - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys) - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line - state.lineStart = startLineStart || state.lineStart - state.position = startPos || state.position - throwError(state, 'duplicated mapping key') - } - - setProperty(_result, keyNode, valueNode) - delete overridableKeys[keyNode] - } - - return _result -} - -function readLineBreak (state) { - const ch = state.input.charCodeAt(state.position) - - if (ch === 0x0A/* LF */) { - state.position++ - } else if (ch === 0x0D/* CR */) { - state.position++ - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++ - } - } else { - throwError(state, 'a line break is expected') - } - - state.line += 1 - state.lineStart = state.position - state.firstTabInLine = -1 -} - -function skipSeparationSpace (state, allowComments, checkIndent) { - let lineBreaks = 0 - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position - } - ch = state.input.charCodeAt(++state.position) - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position) - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0) - } - - if (isEol(ch)) { - readLineBreak(state) - - ch = state.input.charCodeAt(state.position) - lineBreaks++ - state.lineIndent = 0 - - while (ch === 0x20/* Space */) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - } else { - break - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation') - } - - return lineBreaks -} - -function testDocumentSeparator (state) { - let _position = state.position - let ch = state.input.charCodeAt(_position) - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - _position += 3 - - ch = state.input.charCodeAt(_position) - - if (ch === 0 || isWsOrEol(ch)) { - return true - } - } - - return false -} - -function writeFoldedLines (state, count) { - if (count === 1) { - state.result += ' ' - } else if (count > 1) { - state.result += common.repeat('\n', count - 1) - } -} - -function readPlainScalar (state, nodeIndent, withinFlowCollection) { - let captureStart - let captureEnd - let hasPendingContent - let _line - let _lineStart - let _lineIndent - const _kind = state.kind - const _result = state.result - - let ch = state.input.charCodeAt(state.position) - - if (isWsOrEol(ch) || - isFlowIndicator(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - return false - } - } - - state.kind = 'scalar' - state.result = '' - captureStart = captureEnd = state.position - hasPendingContent = false - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - break - } - } else if (ch === 0x23/* # */) { - const preceding = state.input.charCodeAt(state.position - 1) - - if (isWsOrEol(preceding)) { - break - } - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - (withinFlowCollection && isFlowIndicator(ch))) { - break - } else if (isEol(ch)) { - _line = state.line - _lineStart = state.lineStart - _lineIndent = state.lineIndent - skipSeparationSpace(state, false, -1) - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true - ch = state.input.charCodeAt(state.position) - continue - } else { - state.position = captureEnd - state.line = _line - state.lineStart = _lineStart - state.lineIndent = _lineIndent - break - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false) - writeFoldedLines(state, state.line - _line) - captureStart = captureEnd = state.position - hasPendingContent = false - } - - if (!isWhiteSpace(ch)) { - captureEnd = state.position + 1 - } - - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, captureEnd, false) - - if (state.result) { - return true - } - - state.kind = _kind - state.result = _result - return false -} - -function readSingleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x27/* ' */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x27/* ' */) { - captureStart = state.position - state.position++ - captureEnd = state.position - } else { - return true - } - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar') -} - -function readDoubleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x22/* " */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true) - state.position++ - return true - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (isEol(ch)) { - skipSeparationSpace(state, false, nodeIndent) - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch] - state.position++ - } else if ((tmp = escapedHexLen(ch)) > 0) { - let hexLength = tmp - let hexResult = 0 - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position) - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp - } else { - throwError(state, 'expected hexadecimal character') - } - } - - state.result += charFromCodepoint(hexResult) - - state.position++ - } else { - throwError(state, 'unknown escape sequence') - } - - captureStart = captureEnd = state.position - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar') -} - -function readFlowCollection (state, nodeIndent) { - let readNext = true - let _line - let _lineStart - let _pos - const _tag = state.tag - let _result - const _anchor = state.anchor - let terminator - let isPair - let isExplicitPair - let isMapping - const overridableKeys = Object.create(null) - let keyNode - let keyTag - let valueNode - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x5B/* [ */) { - terminator = 0x5D/* ] */ - isMapping = false - _result = [] - } else if (ch === 0x7B/* { */) { - terminator = 0x7D/* } */ - isMapping = true - _result = {} - } else { - return false - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - ch = state.input.charCodeAt(++state.position) - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === terminator) { - state.position++ - state.tag = _tag - state.anchor = _anchor - state.kind = isMapping ? 'mapping' : 'sequence' - state.result = _result - return true - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries') - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','") - } - - keyTag = keyNode = valueNode = null - isPair = isExplicitPair = false - - if (ch === 0x3F/* ? */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following)) { - isPair = isExplicitPair = true - state.position++ - skipSeparationSpace(state, true, nodeIndent) - } - } - - _line = state.line // Save the current line. - _lineStart = state.lineStart - _pos = state.position - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - keyTag = state.tag - keyNode = state.result - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true - ch = state.input.charCodeAt(++state.position) - skipSeparationSpace(state, true, nodeIndent) - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - valueNode = state.result - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos) - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)) - } else { - _result.push(keyNode) - } - - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === 0x2C/* , */) { - readNext = true - ch = state.input.charCodeAt(++state.position) - } else { - readNext = false - } - } - - throwError(state, 'unexpected end of the stream within a flow collection') -} - -function readBlockScalar (state, nodeIndent) { - let folding - let chomping = CHOMPING_CLIP - let didReadContent = false - let detectedIndent = false - let textIndent = nodeIndent - let emptyLines = 0 - let atMoreIndented = false - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x7C/* | */) { - folding = false - } else if (ch === 0x3E/* > */) { - folding = true - } else { - return false - } - - state.kind = 'scalar' - state.result = '' - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP - } else { - throwError(state, 'repeat of a chomping mode identifier') - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one') - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1 - detectedIndent = true - } else { - throwError(state, 'repeat of an indentation width identifier') - } - } else { - break - } - } - - if (isWhiteSpace(ch)) { - do { ch = state.input.charCodeAt(++state.position) } - while (isWhiteSpace(ch)) - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (!isEol(ch) && (ch !== 0)) - } - } - - while (ch !== 0) { - readLineBreak(state) - state.lineIndent = 0 - - ch = state.input.charCodeAt(state.position) - - // eslint-disable-next-line no-unmodified-loop-condition - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent - } - - if (isEol(ch)) { - emptyLines++ - continue - } - - if (!detectedIndent && textIndent === 0) { - throwError(state, 'missing indentation for block scalar') - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n' - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - // Lines starting with white space characters (more-indented lines) are not folded. - if (isWhiteSpace(ch)) { - atMoreIndented = true - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false - state.result += common.repeat('\n', emptyLines + 1) - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' ' - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines) - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } - - didReadContent = true - detectedIndent = true - emptyLines = 0 - const captureStart = state.position - - while (!isEol(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, state.position, false) - } - - return true -} - -function readBlockSequence (state, nodeIndent) { - const _tag = state.tag - const _anchor = state.anchor - const _result = [] - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - if (ch !== 0x2D/* - */) { - break - } - - const following = state.input.charCodeAt(state.position + 1) - - if (!isWsOrEol(following)) { - break - } - - detected = true - state.position++ - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null) - ch = state.input.charCodeAt(state.position) - continue - } - } - - const _line = state.line - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true) - _result.push(state.result) - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'sequence' - state.result = _result - return true - } - return false -} - -function readBlockMapping (state, nodeIndent, flowIndent) { - let allowCompact - let _keyLine - let _keyLineStart - let _keyPos - const _tag = state.tag - const _anchor = state.anchor - const _result = {} - const overridableKeys = Object.create(null) - let keyTag = null - let keyNode = null - let valueNode = null - let atExplicitKey = false - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - const following = state.input.charCodeAt(state.position + 1) - const _line = state.line // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEol(following)) { - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = true - allowCompact = true - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false - allowCompact = true - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line') - } - - state.position += 1 - ch = following - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position) - - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position) - - if (!isWsOrEol(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping') - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = false - allowCompact = false - keyTag = state.tag - keyNode = state.result - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result - } else { - valueNode = state.result - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - skipSeparationSpace(state, true, -1) - ch = state.input.charCodeAt(state.position) - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'mapping' - state.result = _result - } - - return detected -} - -function readTagProperty (state) { - let isVerbatim = false - let isNamed = false - let tagHandle - let tagName - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x21/* ! */) return false - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property') - } - - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x3C/* < */) { - isVerbatim = true - ch = state.input.charCodeAt(++state.position) - } else if (ch === 0x21/* ! */) { - isNamed = true - tagHandle = '!!' - ch = state.input.charCodeAt(++state.position) - } else { - tagHandle = '!' - } - - let _position = state.position - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && ch !== 0x3E/* > */) - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position) - ch = state.input.charCodeAt(++state.position) - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag') - } - } else { - while (ch !== 0 && !isWsOrEol(ch)) { - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1) - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters') - } - - isNamed = true - _position = state.position + 1 - } else { - throwError(state, 'tag suffix cannot contain exclamation marks') - } - } - - ch = state.input.charCodeAt(++state.position) - } - - tagName = state.input.slice(_position, state.position) - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters') - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName) - } - - try { - tagName = decodeURIComponent(tagName) - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName) - } - - if (isVerbatim) { - state.tag = tagName - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName - } else if (tagHandle === '!') { - state.tag = '!' + tagName - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"') - } - - return true -} - -function readAnchorProperty (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x26/* & */) return false - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property') - } - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character') - } - - state.anchor = state.input.slice(_position, state.position) - return true -} - -function readAlias (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x2A/* * */) return false - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character') - } - - const alias = state.input.slice(_position, state.position) - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"') - } - - state.result = state.anchorMap[alias] - skipSeparationSpace(state, true, -1) - return true -} - -function tryReadBlockMappingFromProperty (state, propertyStart, nodeIndent, flowIndent) { - const fallbackState = snapshotState(state) - - beginAnchorTransaction(state) - restoreState(state, propertyStart) - - // Re-read the leading properties as part of the first implicit key, not as - // properties of the current node. - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === 'mapping') { - commitAnchorTransaction(state) - return true - } - - rollbackAnchorTransaction(state) - restoreState(state, fallbackState) - return false -} - -function composeNode (state, parentIndent, nodeContext, allowToSeek, allowCompact) { - let allowBlockScalars - let allowBlockCollections - let indentStatus = 1 // 1: this>parent, 0: this=parent, -1: this= state.maxDepth) { - throwError(state, 'nesting exceeded maxDepth (' + state.maxDepth + ')') - } - - state.depth += 1 - - if (state.listener !== null) { - state.listener('open', state) - } - - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - const allowBlockStyles = allowBlockScalars = allowBlockCollections = - CONTEXT_BLOCK_OUT === nodeContext || - CONTEXT_BLOCK_IN === nodeContext - - if (allowToSeek) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } - } - - if (indentStatus === 1) { - while (true) { - const ch = state.input.charCodeAt(state.position) - const propertyState = snapshotState(state) - - // A duplicate property token after a line break can be the first key of - // a nested block mapping, e.g. `!!map\n !!str key: value`. - if (atNewLine && - ((ch === 0x21/* ! */ && state.tag !== null) || - (ch === 0x26/* & */ && state.anchor !== null))) { - break - } - - if (!readTagProperty(state) && !readAnchorProperty(state)) { - break - } - - if (propertyStart === null) { - propertyStart = propertyState - } - - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - allowBlockCollections = allowBlockStyles - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } else { - allowBlockCollections = false - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent - } else { - flowIndent = parentIndent + 1 - } - - blockIndent = state.position - state.lineStart - - if (indentStatus === 1) { - if ((allowBlockCollections && - (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent))) || - readFlowCollection(state, flowIndent)) { - hasContent = true - } else { - const ch = state.input.charCodeAt(state.position) - - if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && - ch !== 0x7C/* | */ && ch !== 0x3E/* > */ && - tryReadBlockMappingFromProperty( - state, - propertyStart, - propertyStart.position - propertyStart.lineStart, - flowIndent - )) { - hasContent = true - } else if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true - } else if (readAlias(state)) { - hasContent = true - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties') - } - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true - - if (state.tag === null) { - state.tag = '?' - } - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent) - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"') - } - - for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex] - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result) - state.tag = type.tag - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - break - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag] - } else { - // looking for multi type - type = null - const typeList = state.typeMap.multi[state.kind || 'fallback'] - - for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex] - break - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>') - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"') - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag') - } else { - state.result = type.construct(state.result, state.tag) - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } - - if (state.listener !== null) { - state.listener('close', state) - } - - state.depth -= 1 - return state.tag !== null || state.anchor !== null || hasContent -} - -function readDocument (state) { - const documentStart = state.position - let hasDirectives = false - let ch - - state.version = null - state.checkLineBreaks = state.legacy - state.tagMap = Object.create(null) - state.anchorMap = Object.create(null) - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break - } - - hasDirectives = true - ch = state.input.charCodeAt(++state.position) - let _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - const directiveName = state.input.slice(_position, state.position) - const directiveArgs = [] - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length') - } - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && !isEol(ch)) - break - } - - if (isEol(ch)) break - - _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - directiveArgs.push(state.input.slice(_position, state.position)) - } - - if (ch !== 0) readLineBreak(state) - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs) - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"') - } - } - - skipSeparationSpace(state, true, -1) - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected') - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true) - skipSeparationSpace(state, true, -1) - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content') - } - - state.documents.push(state.result) - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } - return - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected') - } -} - -function loadDocuments (input, options) { - input = String(input) - options = options || {} - - if (input.length !== 0) { - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n' - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1) - } - } - - const state = new State(input, options) - - const nullpos = input.indexOf('\0') - - if (nullpos !== -1) { - state.position = nullpos - throwError(state, 'null byte is not allowed in input') - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0' - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1 - state.position += 1 - } - - while (state.position < (state.length - 1)) { - readDocument(state) - } - - return state.documents -} - -function loadAll (input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator - iterator = null - } - - const documents = loadDocuments(input, options) - - if (typeof iterator !== 'function') { - return documents - } - - for (let index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]) - } -} - -function load (input, options) { - const documents = loadDocuments(input, options) - - if (documents.length === 0) { - return undefined - } else if (documents.length === 1) { - return documents[0] - } - throw new YAMLException('expected a single document in the stream, but found more') -} - -module.exports.loadAll = loadAll -module.exports.load = load - - -/***/ }), - -/***/ 9992: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) -const Type = __nccwpck_require__(1647) - -function compileList (schema, name) { - const result = [] - - schema[name].forEach(function (currentType) { - let newIndex = result.length - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - newIndex = previousIndex - } - }) - - result[newIndex] = currentType - }) - - return result -} - -function compileMap (/* lists... */) { - const result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - } - function collectType (type) { - if (type.multi) { - result.multi[type.kind].push(type) - result.multi['fallback'].push(type) - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type - } - } - - for (let index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType) - } - return result -} - -function Schema (definition) { - return this.extend(definition) -} - -Schema.prototype.extend = function extend (definition) { - let implicit = [] - let explicit = [] - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition) - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition) - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit) - if (definition.explicit) explicit = explicit.concat(definition.explicit) - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })') - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.') - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.') - } - }) - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - }) - - const result = Object.create(Schema.prototype) - - result.implicit = (this.implicit || []).concat(implicit) - result.explicit = (this.explicit || []).concat(explicit) - - result.compiledImplicit = compileList(result, 'implicit') - result.compiledExplicit = compileList(result, 'explicit') - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit) - - return result -} - -module.exports = Schema - - -/***/ }), - -/***/ 8920: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - -module.exports = __nccwpck_require__(1441) - - -/***/ }), - -/***/ 8922: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - -module.exports = (__nccwpck_require__(8920).extend)({ - implicit: [ - __nccwpck_require__(7328), - __nccwpck_require__(7652) - ], - explicit: [ - __nccwpck_require__(4259), - __nccwpck_require__(7023), - __nccwpck_require__(3985), - __nccwpck_require__(3896) - ] -}) - - -/***/ }), - -/***/ 5478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - -const Schema = __nccwpck_require__(9992) - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(2999), - __nccwpck_require__(2987), - __nccwpck_require__(9362) - ] -}) - - -/***/ }), - -/***/ 1441: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - -module.exports = (__nccwpck_require__(5478).extend)({ - implicit: [ - __nccwpck_require__(3507), - __nccwpck_require__(1928), - __nccwpck_require__(2729), - __nccwpck_require__(2102) - ] -}) - - -/***/ }), - -/***/ 1934: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) - -// get snippet for a single line, respecting maxLength -function getLine (buffer, lineStart, lineEnd, position, maxLineLength) { - let head = '' - let tail = '' - const maxHalfLength = Math.floor(maxLineLength / 2) - 1 - - if (position - lineStart > maxHalfLength) { - head = ' ... ' - lineStart = position - maxHalfLength + head.length - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...' - lineEnd = position + maxHalfLength - tail.length - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - } -} - -function padStart (string, max) { - return common.repeat(' ', max - string.length) + string -} - -function makeSnippet (mark, options) { - options = Object.create(options || null) - - if (!mark.buffer) return null - - if (!options.maxLength) options.maxLength = 79 - if (typeof options.indent !== 'number') options.indent = 1 - if (typeof options.linesBefore !== 'number') options.linesBefore = 3 - if (typeof options.linesAfter !== 'number') options.linesAfter = 2 - - const re = /\r?\n|\r|\0/g - const lineStarts = [0] - const lineEnds = [] - let match - let foundLineNo = -1 - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index) - lineStarts.push(match.index + match[0].length) - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2 - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1 - - let result = '' - const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length - const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3) - - for (let i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ) - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result - } - - const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength) - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n' - - for (let i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ) - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - } - - return result.replace(/\n$/, '') -} - -module.exports = makeSnippet - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) - -const TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -] - -const YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -] - -function compileStyleAliases (map) { - const result = {} - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style - }) - }) - } - - return result -} - -function Type (tag, options) { - options = options || {} - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.') - } - }) - - // TODO: Add tag format check. - this.options = options // keep original options in case user wants to extend this type later - this.tag = tag - this.kind = options['kind'] || null - this.resolve = options['resolve'] || function () { return true } - this.construct = options['construct'] || function (data) { return data } - this.instanceOf = options['instanceOf'] || null - this.predicate = options['predicate'] || null - this.represent = options['represent'] || null - this.representName = options['representName'] || null - this.defaultStyle = options['defaultStyle'] || null - this.multi = options['multi'] || false - this.styleAliases = compileStyleAliases(options['styleAliases'] || null) - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.') - } -} - -module.exports = Type - - -/***/ }), - -/***/ 4259: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -const BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r' - -function resolveYamlBinary (data) { - if (data === null) return false - - let bitlen = 0 - const max = data.length - const map = BASE64_MAP - - // Convert one by one. - for (let idx = 0; idx < max; idx++) { - const code = map.indexOf(data.charAt(idx)) - - // Skip CR/LF - if (code > 64) continue - - // Fail on illegal characters - if (code < 0) return false - - bitlen += 6 - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0 -} - -function constructYamlBinary (data) { - const input = data.replace(/[\r\n=]/g, '') // remove CR/LF & padding to simplify scan - const max = input.length - const map = BASE64_MAP - let bits = 0 - const result = [] - - // Collect by 6*4 bits (3 bytes) - - for (let idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)) - } - - // Dump tail - - const tailbits = (max % 4) * 6 - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF) - result.push((bits >> 2) & 0xFF) - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF) - } - - return new Uint8Array(result) -} - -function representYamlBinary (object /*, style */) { - let result = '' - let bits = 0 - const max = object.length - const map = BASE64_MAP - - // Convert every three bytes to 4 ASCII characters. - - for (let idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } - - bits = (bits << 8) + object[idx] - } - - // Dump tail - - const tail = max % 3 - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F] - result += map[(bits >> 4) & 0x3F] - result += map[(bits << 2) & 0x3F] - result += map[64] - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F] - result += map[(bits << 4) & 0x3F] - result += map[64] - result += map[64] - } - - return result -} - -function isBinary (obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]' -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}) - - -/***/ }), - -/***/ 1928: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlBoolean (data) { - if (data === null) return false - - const max = data.length - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')) -} - -function constructYamlBoolean (data) { - return data === 'true' || - data === 'True' || - data === 'TRUE' -} - -function isBoolean (object) { - return Object.prototype.toString.call(object) === '[object Boolean]' -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false' }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE' }, - camelcase: function (object) { return object ? 'True' : 'False' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2102: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -const YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -const YAML_FLOAT_SPECIAL_PATTERN = new RegExp( - '^(?:' + - // .inf - '[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -function resolveYamlFloat (data) { - if (data === null) return false - - if (!YAML_FLOAT_PATTERN.test(data)) { - return false - } - - if (Number.isFinite(parseFloat(data, 10))) { - return true - } - - return YAML_FLOAT_SPECIAL_PATTERN.test(data) -} - -function constructYamlFloat (data) { - let value = data.toLowerCase() - const sign = value[0] === '-' ? -1 : 1 - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1) - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY - } else if (value === '.nan') { - return NaN - } - return sign * parseFloat(value, 10) -} - -const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/ - -function representYamlFloat (object, style) { - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan' - case 'uppercase': return '.NAN' - case 'camelcase': return '.NaN' - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf' - case 'uppercase': return '.INF' - case 'camelcase': return '.Inf' - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf' - case 'uppercase': return '-.INF' - case 'camelcase': return '-.Inf' - } - } else if (common.isNegativeZero(object)) { - return '-0.0' - } - - const res = object.toString(10) - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res -} - -function isFloat (object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2729: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -function isHexCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) || - ((c >= 0x41/* A */) && (c <= 0x46/* F */)) || - ((c >= 0x61/* a */) && (c <= 0x66/* f */)) -} - -function isOctCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x37/* 7 */)) -} - -function isDecCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) -} - -function resolveYamlInteger (data) { - if (data === null) return false - - const max = data.length - let index = 0 - let hasDigits = false - - if (!max) return false - - let ch = data[index] - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index] - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true - ch = data[++index] - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++ - - for (; index < max; index++) { - ch = data[index] - if (ch !== '0' && ch !== '1') return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'x') { - // base 16 - index++ - - for (; index < max; index++) { - if (!isHexCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'o') { - // base 8 - index++ - - for (; index < max; index++) { - if (!isOctCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - } - - // base 10 (except 0) - - for (; index < max; index++) { - if (!isDecCode(data.charCodeAt(index))) { - return false - } - hasDigits = true - } - - if (!hasDigits) return false - - return Number.isFinite(parseYamlInteger(data)) -} - -function parseYamlInteger (data) { - let value = data - let sign = 1 - - let ch = value[0] - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1 - value = value.slice(1) - ch = value[0] - } - - if (value === '0') return 0 - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2) - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16) - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8) - } - - return sign * parseInt(value, 10) -} - -function constructYamlInteger (data) { - return parseYamlInteger(data) -} - -function isInteger (object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1) }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1) }, - decimal: function (obj) { return obj.toString(10) }, - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1) } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [2, 'bin'], - octal: [8, 'oct'], - decimal: [10, 'dec'], - hexadecimal: [16, 'hex'] - } -}) - - -/***/ }), - -/***/ 9362: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {} } -}) - - -/***/ }), - -/***/ 7652: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlMerge (data) { - return data === '<<' || data === null -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}) - - -/***/ }), - -/***/ 3507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlNull (data) { - if (data === null) return true - - const max = data.length - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')) -} - -function constructYamlNull () { - return null -} - -function isNull (object) { - return object === null -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~' }, - lowercase: function () { return 'null' }, - uppercase: function () { return 'NULL' }, - camelcase: function () { return 'Null' }, - empty: function () { return '' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 7023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty -const _toString = Object.prototype.toString - -function resolveYamlOmap (data) { - if (data === null) return true - - const objectKeys = [] - const object = data - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - let pairHasKey = false - - if (_toString.call(pair) !== '[object Object]') return false - - let pairKey - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true - else return false - } - } - - if (!pairHasKey) return false - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey) - else return false - } - - return true -} - -function constructYamlOmap (data) { - return data !== null ? data : [] -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}) - - -/***/ }), - -/***/ 3985: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _toString = Object.prototype.toString - -function resolveYamlPairs (data) { - if (data === null) return true - - const object = data - - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - if (_toString.call(pair) !== '[object Object]') return false - - const keys = Object.keys(pair) - - if (keys.length !== 1) return false - - result[index] = [keys[0], pair[keys[0]]] - } - - return true -} - -function constructYamlPairs (data) { - if (data === null) return [] - - const object = data - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - const keys = Object.keys(pair) - - result[index] = [keys[0], pair[keys[0]]] - } - - return result -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}) - - -/***/ }), - -/***/ 2987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : [] } -}) - - -/***/ }), - -/***/ 3896: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -function resolveYamlSet (data) { - if (data === null) return true - - const object = data - - for (const key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false - } - } - - return true -} - -function constructYamlSet (data) { - return data !== null ? data : {} -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}) - - -/***/ }), - -/***/ 2999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : '' } -}) - - -/***/ }), - -/***/ 7328: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$') // [3] day - -const YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tzHour - '(?::([0-9][0-9]))?))?$') // [11] tzMinute - -function resolveYamlTimestamp (data) { - if (data === null) return false - if (YAML_DATE_REGEXP.exec(data) !== null) return true - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true - return false -} - -function constructYamlTimestamp (data) { - let fraction = 0 - let delta = null - - let match = YAML_DATE_REGEXP.exec(data) - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data) - - if (match === null) throw new Error('Date resolve error') - - // match: [1] year [2] month [3] day - - const year = +(match[1]) - const month = +(match[2]) - 1 // JS month starts with 0 - const day = +(match[3]) - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)) - } - - // match: [4] hour [5] minute [6] second [7] fraction - - const hour = +(match[4]) - const minute = +(match[5]) - const second = +(match[6]) - - if (match[7]) { - fraction = match[7].slice(0, 3) - while (fraction.length < 3) { // milli-seconds - fraction += '0' - } - fraction = +fraction - } - - // match: [8] tz [9] tz_sign [10] tzHour [11] tzMinute - - if (match[9]) { - const tzHour = +(match[10]) - const tzMinute = +(match[11] || 0) - delta = (tzHour * 60 + tzMinute) * 60000 // delta in mili-seconds - if (match[9] === '-') delta = -delta - } - - const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)) - - if (delta) date.setTime(date.getTime() - delta) - - return date -} - -function representYamlTimestamp (object /*, style */) { - return object.toISOString() -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}) - - -/***/ }), - -/***/ 5407: -/***/ ((module) => { - - - -/** - * Kuler: Color text using CSS colors - * - * @constructor - * @param {String} text The text that needs to be styled - * @param {String} color Optional color for alternate API. - * @api public - */ -function Kuler(text, color) { - if (color) return (new Kuler(text)).style(color); - if (!(this instanceof Kuler)) return new Kuler(text); - - this.text = text; -} - -/** - * ANSI color codes. - * - * @type {String} - * @private - */ -Kuler.prototype.prefix = '\x1b['; -Kuler.prototype.suffix = 'm'; - -/** - * Parse a hex color string and parse it to it's RGB equiv. - * - * @param {String} color - * @returns {Array} - * @api private - */ -Kuler.prototype.hex = function hex(color) { - color = color[0] === '#' ? color.substring(1) : color; - - // - // Pre-parse for shorthand hex colors. - // - if (color.length === 3) { - color = color.split(''); - - color[5] = color[2]; // F60##0 - color[4] = color[2]; // F60#00 - color[3] = color[1]; // F60600 - color[2] = color[1]; // F66600 - color[1] = color[0]; // FF6600 - - color = color.join(''); - } - - var r = color.substring(0, 2) - , g = color.substring(2, 4) - , b = color.substring(4, 6); - - return [ parseInt(r, 16), parseInt(g, 16), parseInt(b, 16) ]; -}; - -/** - * Transform a 255 RGB value to an RGV code. - * - * @param {Number} r Red color channel. - * @param {Number} g Green color channel. - * @param {Number} b Blue color channel. - * @returns {String} - * @api public - */ -Kuler.prototype.rgb = function rgb(r, g, b) { - var red = r / 255 * 5 - , green = g / 255 * 5 - , blue = b / 255 * 5; - - return this.ansi(red, green, blue); -}; - -/** - * Turns RGB 0-5 values into a single ANSI code. - * - * @param {Number} r Red color channel. - * @param {Number} g Green color channel. - * @param {Number} b Blue color channel. - * @returns {String} - * @api public - */ -Kuler.prototype.ansi = function ansi(r, g, b) { - var red = Math.round(r) - , green = Math.round(g) - , blue = Math.round(b); - - return 16 + (red * 36) + (green * 6) + blue; -}; - -/** - * Marks an end of color sequence. - * - * @returns {String} Reset sequence. - * @api public - */ -Kuler.prototype.reset = function reset() { - return this.prefix +'39;49'+ this.suffix; -}; - -/** - * Colour the terminal using CSS. - * - * @param {String} color The HEX color code. - * @returns {String} the escape code. - * @api public - */ -Kuler.prototype.style = function style(color) { - return this.prefix +'38;5;'+ this.rgb.apply(this, this.hex(color)) + this.suffix + this.text + this.reset(); -}; - - -// -// Expose the actual interface. -// -module.exports = Kuler; - - -/***/ }), - -/***/ 2871: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); - -/* - * function align (info) - * Returns a new instance of the align Format which adds a `\t` - * delimiter before the message to properly align it in the same place. - * It was previously { align: true } in winston < 3.0.0 - */ -module.exports = format(info => { - info.message = `\t${info.message}`; - return info; -}); - - -/***/ }), - -/***/ 7044: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Colorizer } = __nccwpck_require__(5491); -const { Padder } = __nccwpck_require__(2159); -const { configs, MESSAGE } = __nccwpck_require__(1255); - - -/** - * Cli format class that handles initial state for a a separate - * Colorizer and Padder instance. - */ -class CliFormat { - constructor(opts = {}) { - if (!opts.levels) { - opts.levels = configs.cli.levels; - } - - this.colorizer = new Colorizer(opts); - this.padder = new Padder(opts); - this.options = opts; - } - - /* - * function transform (info, opts) - * Attempts to both: - * 1. Pad the { level } - * 2. Colorize the { level, message } - * of the given `logform` info object depending on the `opts`. - */ - transform(info, opts) { - this.colorizer.transform( - this.padder.transform(info, opts), - opts - ); - - info[MESSAGE] = `${info.level}:${info.message}`; - return info; - } -} - -/* - * function cli (opts) - * Returns a new instance of the CLI format that turns a log - * `info` object into the same format previously available - * in `winston.cli()` in `winston < 3.0.0`. - */ -module.exports = opts => new CliFormat(opts); - -// -// Attach the CliFormat for registration purposes -// -module.exports.Format = CliFormat; - - -/***/ }), - -/***/ 5491: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const colors = __nccwpck_require__(6457); -const { LEVEL, MESSAGE } = __nccwpck_require__(1255); - -// -// Fix colors not appearing in non-tty environments -// -colors.enabled = true; - -/** - * @property {RegExp} hasSpace - * Simple regex to check for presence of spaces. - */ -const hasSpace = /\s+/; - -/* - * Colorizer format. Wraps the `level` and/or `message` properties - * of the `info` objects with ANSI color codes based on a few options. - */ -class Colorizer { - constructor(opts = {}) { - if (opts.colors) { - this.addColors(opts.colors); - } - - this.options = opts; - } - - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - static addColors(clrs) { - const nextColors = Object.keys(clrs).reduce((acc, level) => { - acc[level] = hasSpace.test(clrs[level]) - ? clrs[level].split(hasSpace) - : clrs[level]; - - return acc; - }, {}); - - Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors); - return Colorizer.allColors; - } - - /* - * Adds the colors Object to the set of allColors - * known by the Colorizer - * - * @param {Object} colors Set of color mappings to add. - */ - addColors(clrs) { - return Colorizer.addColors(clrs); - } - - /* - * function colorize (lookup, level, message) - * Performs multi-step colorization using @colors/colors/safe - */ - colorize(lookup, level, message) { - if (typeof message === 'undefined') { - message = level; - } - - // - // If the color for the level is just a string - // then attempt to colorize the message with it. - // - if (!Array.isArray(Colorizer.allColors[lookup])) { - return colors[Colorizer.allColors[lookup]](message); - } - - // - // If it is an Array then iterate over that Array, applying - // the colors function for each item. - // - for (let i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) { - message = colors[Colorizer.allColors[lookup][i]](message); - } - - return message; - } - - /* - * function transform (info, opts) - * Attempts to colorize the { level, message } of the given - * `logform` info object. - */ - transform(info, opts) { - if (opts.all && typeof info[MESSAGE] === 'string') { - info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]); - } - - if (opts.level || opts.all || !opts.message) { - info.level = this.colorize(info[LEVEL], info.level); - } - - if (opts.all || opts.message) { - info.message = this.colorize(info[LEVEL], info.level, info.message); - } - - return info; - } -} - -/* - * function colorize (info) - * Returns a new instance of the colorize Format that applies - * level colors to `info` objects. This was previously exposed - * as { colorize: true } to transports in `winston < 3.0.0`. - */ -module.exports = opts => new Colorizer(opts); - -// -// Attach the Colorizer for registration purposes -// -module.exports.Colorizer - = module.exports.Format - = Colorizer; - - -/***/ }), - -/***/ 9331: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); - -/* - * function cascade(formats) - * Returns a function that invokes the `._format` function in-order - * for the specified set of `formats`. In this manner we say that Formats - * are "pipe-like", but not a pure pumpify implementation. Since there is no back - * pressure we can remove all of the "readable" plumbing in Node streams. - */ -function cascade(formats) { - if (!formats.every(isValidFormat)) { - return; - } - - return info => { - let obj = info; - for (let i = 0; i < formats.length; i++) { - obj = formats[i].transform(obj, formats[i].options); - if (!obj) { - return false; - } - } - - return obj; - }; -} - -/* - * function isValidFormat(format) - * If the format does not define a `transform` function throw an error - * with more detailed usage. - */ -function isValidFormat(fmt) { - if (typeof fmt.transform !== 'function') { - throw new Error([ - 'No transform function found on format. Did you create a format instance?', - 'const myFormat = format(formatFn);', - 'const instance = myFormat();' - ].join('\n')); - } - - return true; -} - -/* - * function combine (info) - * Returns a new instance of the combine Format which combines the specified - * formats into a new format. This is similar to a pipe-chain in transform streams. - * We choose to combine the prototypes this way because there is no back pressure in - * an in-memory transform chain. - */ -module.exports = (...formats) => { - const combinedFormat = format(cascade(formats)); - const instance = combinedFormat(); - instance.Format = combinedFormat.Format; - return instance; -}; - -// -// Export the cascade method for use in cli and other -// combined formats that should not be assumed to be -// singletons. -// -module.exports.cascade = cascade; - - -/***/ }), - -/***/ 4823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint no-undefined: 0 */ - - -const format = __nccwpck_require__(8259); -const { LEVEL, MESSAGE } = __nccwpck_require__(1255); - -/* - * function errors (info) - * If the `message` property of the `info` object is an instance of `Error`, - * replace the `Error` object its own `message` property. - * - * Optionally, the Error's `stack` and/or `cause` properties can also be appended to the `info` object. - */ -module.exports = format((einfo, { stack, cause }) => { - if (einfo instanceof Error) { - const info = Object.assign({}, einfo, { - level: einfo.level, - [LEVEL]: einfo[LEVEL] || einfo.level, - message: einfo.message, - [MESSAGE]: einfo[MESSAGE] || einfo.message - }); - - if (stack) info.stack = einfo.stack; - if (cause) info.cause = einfo.cause; - return info; - } - - if (!(einfo.message instanceof Error)) return einfo; - - // Assign all enumerable properties and the - // message property from the error provided. - const err = einfo.message; - Object.assign(einfo, err); - einfo.message = err.message; - einfo[MESSAGE] = err.message; - - // Assign the stack and/or cause if requested. - if (stack) einfo.stack = err.stack; - if (cause) einfo.cause = err.cause; - return einfo; -}); - - -/***/ }), - -/***/ 8259: -/***/ ((module) => { - - - -/* - * Displays a helpful message and the source of - * the format when it is invalid. - */ -class InvalidFormatError extends Error { - constructor(formatFn) { - super(`Format functions must be synchronous taking a two arguments: (info, opts) -Found: ${formatFn.toString().split('\n')[0]}\n`); - - Error.captureStackTrace(this, InvalidFormatError); - } -} - -/* - * function format (formatFn) - * Returns a create function for the `formatFn`. - */ -module.exports = formatFn => { - if (formatFn.length > 2) { - throw new InvalidFormatError(formatFn); - } - - /* - * function Format (options) - * Base prototype which calls a `_format` - * function and pushes the result. - */ - function Format(options = {}) { - this.options = options; - } - - Format.prototype.transform = formatFn; - - // - // Create a function which returns new instances of - // FormatWrap for simple syntax like: - // - // require('winston').formats.json(); - // - function createFormatWrap(opts) { - return new Format(opts); - } - - // - // Expose the FormatWrap through the create function - // for testability. - // - createFormatWrap.Format = Format; - return createFormatWrap; -}; - - -/***/ }), - -/***/ 6946: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -/* - * @api public - * @property {function} format - * Both the construction method and set of exposed - * formats. - */ -const format = exports.format = __nccwpck_require__(8259); - -/* - * @api public - * @method {function} levels - * Registers the specified levels with logform. - */ -exports.levels = __nccwpck_require__(2855); - -/* - * @api private - * method {function} exposeFormat - * Exposes a sub-format on the main format object - * as a lazy-loaded getter. - */ -function exposeFormat(name, requireFormat) { - Object.defineProperty(format, name, { - get() { - return requireFormat(); - }, - configurable: true - }); -} - -// -// Setup all transports as lazy-loaded getters. -// -exposeFormat('align', function () { return __nccwpck_require__(2871); }); -exposeFormat('errors', function () { return __nccwpck_require__(4823); }); -exposeFormat('cli', function () { return __nccwpck_require__(7044); }); -exposeFormat('combine', function () { return __nccwpck_require__(9331); }); -exposeFormat('colorize', function () { return __nccwpck_require__(5491); }); -exposeFormat('json', function () { return __nccwpck_require__(6810); }); -exposeFormat('label', function () { return __nccwpck_require__(3360); }); -exposeFormat('logstash', function () { return __nccwpck_require__(2851); }); -exposeFormat('metadata', function () { return __nccwpck_require__(6609); }); -exposeFormat('ms', function () { return __nccwpck_require__(5720); }); -exposeFormat('padLevels', function () { return __nccwpck_require__(2159); }); -exposeFormat('prettyPrint', function () { return __nccwpck_require__(530); }); -exposeFormat('printf', function () { return __nccwpck_require__(5643); }); -exposeFormat('simple', function () { return __nccwpck_require__(1986); }); -exposeFormat('splat', function () { return __nccwpck_require__(8018); }); -exposeFormat('timestamp', function () { return __nccwpck_require__(1498); }); -exposeFormat('uncolorize', function () { return __nccwpck_require__(1144); }); - - -/***/ }), - -/***/ 6810: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); -const { MESSAGE } = __nccwpck_require__(1255); -const stringify = __nccwpck_require__(4450); - -/* - * function replacer (key, value) - * Handles proper stringification of Buffer and bigint output. - */ -function replacer(key, value) { - // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes. - // Leading to a loss in fidelity if the resulting string is parsed. - // It would also be a breaking change for logform. - if (typeof value === 'bigint') - return value.toString(); - return value; -} - -/* - * function json (info) - * Returns a new instance of the JSON format that turns a log `info` - * object into pure JSON. This was previously exposed as { json: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - const jsonStringify = stringify.configure(opts); - info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space); - return info; -}); - - -/***/ }), - -/***/ 3360: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); - -/* - * function label (info) - * Returns a new instance of the label Format which adds the specified - * `opts.label` before the message. This was previously exposed as - * { label: 'my label' } to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - if (opts.message) { - info.message = `[${opts.label}] ${info.message}`; - return info; - } - - info.label = opts.label; - return info; -}); - - -/***/ }), - -/***/ 2855: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Colorizer } = __nccwpck_require__(5491); - -/* - * Simple method to register colors with a simpler require - * path within the module. - */ -module.exports = config => { - Colorizer.addColors(config.colors || config); - return config; -}; - - -/***/ }), - -/***/ 2851: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); -const { MESSAGE } = __nccwpck_require__(1255); -const jsonStringify = __nccwpck_require__(4450); - -/* - * function logstash (info) - * Returns a new instance of the LogStash Format that turns a - * log `info` object into pure JSON with the appropriate logstash - * options. This was previously exposed as { logstash: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format(info => { - const logstash = {}; - if (info.message) { - logstash['@message'] = info.message; - delete info.message; - } - - if (info.timestamp) { - logstash['@timestamp'] = info.timestamp; - delete info.timestamp; - } - - logstash['@fields'] = info; - info[MESSAGE] = jsonStringify(logstash); - return info; -}); - - -/***/ }), - -/***/ 6609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const format = __nccwpck_require__(8259); - -function fillExcept(info, fillExceptKeys, metadataKey) { - const savedKeys = fillExceptKeys.reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - const metadata = Object.keys(info).reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - - Object.assign(info, savedKeys, { - [metadataKey]: metadata - }); - return info; -} - -function fillWith(info, fillWithKeys, metadataKey) { - info[metadataKey] = fillWithKeys.reduce((acc, key) => { - acc[key] = info[key]; - delete info[key]; - return acc; - }, {}); - return info; -} - -/** - * Adds in a "metadata" object to collect extraneous data, similar to the metadata - * object in winston 2.x. - */ -module.exports = format((info, opts = {}) => { - let metadataKey = 'metadata'; - if (opts.key) { - metadataKey = opts.key; - } - - let fillExceptKeys = []; - if (!opts.fillExcept && !opts.fillWith) { - fillExceptKeys.push('level'); - fillExceptKeys.push('message'); - } - - if (opts.fillExcept) { - fillExceptKeys = opts.fillExcept; - } - - if (fillExceptKeys.length > 0) { - return fillExcept(info, fillExceptKeys, metadataKey); - } - - if (opts.fillWith) { - return fillWith(info, opts.fillWith, metadataKey); - } - - return info; -}); - - -/***/ }), - -/***/ 5720: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - - - -const format = __nccwpck_require__(8259); -const ms = __nccwpck_require__(6987); - -/* - * function ms (info) - * Returns an `info` with a `ms` property. The `ms` property holds the Value - * of the time difference between two calls in milliseconds. - */ -module.exports = format(info => { - const curr = +new Date(); - this.diff = curr - (this.prevTime || curr); - this.prevTime = curr; - info.ms = `+${ms(this.diff)}`; - - return info; -}); - - -/***/ }), - -/***/ 2159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint no-unused-vars: 0 */ - - -const { configs, LEVEL, MESSAGE } = __nccwpck_require__(1255); - -class Padder { - constructor(opts = { levels: configs.npm.levels }) { - this.paddings = Padder.paddingForLevels(opts.levels, opts.filler); - this.options = opts; - } - - /** - * Returns the maximum length of keys in the specified `levels` Object. - * @param {Object} levels Set of all levels to calculate longest level against. - * @returns {Number} Maximum length of the longest level string. - */ - static getLongestLevel(levels) { - const lvls = Object.keys(levels).map(level => level.length); - return Math.max(...lvls); - } - - /** - * Returns the padding for the specified `level` assuming that the - * maximum length of all levels it's associated with is `maxLength`. - * @param {String} level Level to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @param {Number} maxLength Length of the longest level - * @returns {String} Padding string for the `level` - */ - static paddingForLevel(level, filler, maxLength) { - const targetLen = maxLength + 1 - level.length; - const rep = Math.floor(targetLen / filler.length); - const padding = `${filler}${filler.repeat(rep)}`; - return padding.slice(0, targetLen); - } - - /** - * Returns an object with the string paddings for the given `levels` - * using the specified `filler`. - * @param {Object} levels Set of all levels to calculate padding for. - * @param {String} filler Repeatable text to use for padding. - * @returns {Object} Mapping of level to desired padding. - */ - static paddingForLevels(levels, filler = ' ') { - const maxLength = Padder.getLongestLevel(levels); - return Object.keys(levels).reduce((acc, level) => { - acc[level] = Padder.paddingForLevel(level, filler, maxLength); - return acc; - }, {}); - } - - /** - * Prepends the padding onto the `message` based on the `LEVEL` of - * the `info`. This is based on the behavior of `winston@2` which also - * prepended the level onto the message. - * - * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201 - * - * @param {Info} info Logform info object - * @param {Object} opts Options passed along to this instance. - * @returns {Info} Modified logform info object. - */ - transform(info, opts) { - info.message = `${this.paddings[info[LEVEL]]}${info.message}`; - if (info[MESSAGE]) { - info[MESSAGE] = `${this.paddings[info[LEVEL]]}${info[MESSAGE]}`; - } - - return info; - } -} - -/* - * function padLevels (info) - * Returns a new instance of the padLevels Format which pads - * levels to be the same length. This was previously exposed as - * { padLevels: true } to transports in `winston < 3.0.0`. - */ -module.exports = opts => new Padder(opts); - -module.exports.Padder - = module.exports.Format - = Padder; - - -/***/ }), - -/***/ 530: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const inspect = (__nccwpck_require__(9023).inspect); -const format = __nccwpck_require__(8259); -const { LEVEL, MESSAGE, SPLAT } = __nccwpck_require__(1255); - -/* - * function prettyPrint (info) - * Returns a new instance of the prettyPrint Format that "prettyPrint" - * serializes `info` objects. This was previously exposed as - * { prettyPrint: true } to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts = {}) => { - // - // info[{LEVEL, MESSAGE, SPLAT}] are enumerable here. Since they - // are internal, we remove them before util.inspect so they - // are not printed. - // - const stripped = Object.assign({}, info); - - // Remark (indexzero): update this technique in April 2019 - // when node@6 is EOL - delete stripped[LEVEL]; - delete stripped[MESSAGE]; - delete stripped[SPLAT]; - - info[MESSAGE] = inspect(stripped, false, opts.depth || null, opts.colorize); - return info; -}); - - -/***/ }), - -/***/ 5643: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MESSAGE } = __nccwpck_require__(1255); - -class Printf { - constructor(templateFn) { - this.template = templateFn; - } - - transform(info) { - info[MESSAGE] = this.template(info); - return info; - } -} - -/* - * function printf (templateFn) - * Returns a new instance of the printf Format that creates an - * intermediate prototype to store the template string-based formatter - * function. - */ -module.exports = opts => new Printf(opts); - -module.exports.Printf - = module.exports.Format - = Printf; - - -/***/ }), - -/***/ 1986: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint no-undefined: 0 */ - - -const format = __nccwpck_require__(8259); -const { MESSAGE } = __nccwpck_require__(1255); -const jsonStringify = __nccwpck_require__(4450); - -/* - * function simple (info) - * Returns a new instance of the simple format TransformStream - * which writes a simple representation of logs. - * - * const { level, message, splat, ...rest } = info; - * - * ${level}: ${message} if rest is empty - * ${level}: ${message} ${JSON.stringify(rest)} otherwise - */ -module.exports = format(info => { - const stringifiedRest = jsonStringify(Object.assign({}, info, { - level: undefined, - message: undefined, - splat: undefined - })); - - const padding = info.padding && info.padding[info.level] || ''; - if (stringifiedRest !== '{}') { - info[MESSAGE] = `${info.level}:${padding} ${info.message} ${stringifiedRest}`; - } else { - info[MESSAGE] = `${info.level}:${padding} ${info.message}`; - } - - return info; -}); - - -/***/ }), - -/***/ 8018: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const { SPLAT } = __nccwpck_require__(1255); - -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ -const formatRegExp = /%[scdjifoO%]/g; - -/** - * Captures the number of escaped % signs in a format string (i.e. %s strings). - * @type {RegExp} - */ -const escapedPercent = /%%/g; - -class Splatter { - constructor(opts) { - this.options = opts; - } - - /** - * Check to see if tokens <= splat.length, assign { splat, meta } into the - * `info` accordingly, and write to this instance. - * - * @param {Info} info Logform info message. - * @param {String[]} tokens Set of string interpolation tokens. - * @returns {Info} Modified info message - * @private - */ - _splat(info, tokens) { - const msg = info.message; - const splat = info[SPLAT] || info.splat || []; - const percents = msg.match(escapedPercent); - const escapes = percents && percents.length || 0; - - // The expected splat is the number of tokens minus the number of escapes - // e.g. - // - { expectedSplat: 3 } '%d %s %j' - // - { expectedSplat: 5 } '[%s] %d%% %d%% %s %j' - // - // Any "meta" will be arugments in addition to the expected splat size - // regardless of type. e.g. - // - // logger.log('info', '%d%% %s %j', 100, 'wow', { such: 'js' }, { thisIsMeta: true }); - // would result in splat of four (4), but only three (3) are expected. Therefore: - // - // extraSplat = 3 - 4 = -1 - // metas = [100, 'wow', { such: 'js' }, { thisIsMeta: true }].splice(-1, -1 * -1); - // splat = [100, 'wow', { such: 'js' }] - const expectedSplat = tokens.length - escapes; - const extraSplat = expectedSplat - splat.length; - const metas = extraSplat < 0 - ? splat.splice(extraSplat, -1 * extraSplat) - : []; - - // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - const metalen = metas.length; - if (metalen) { - for (let i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - info.message = util.format(msg, ...splat); - return info; - } - - /** - * Transforms the `info` message by using `util.format` to complete - * any `info.message` provided it has string interpolation tokens. - * If no tokens exist then `info` is immutable. - * - * @param {Info} info Logform info message. - * @param {Object} opts Options for this instance. - * @returns {Info} Modified info message - */ - transform(info) { - const msg = info.message; - const splat = info[SPLAT] || info.splat; - - // No need to process anything if splat is undefined - if (!splat || !splat.length) { - return info; - } - - // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - const tokens = msg && msg.match && msg.match(formatRegExp); - - // This condition will take care of inputs with info[SPLAT] - // but no tokens present - if (!tokens && (splat || splat.length)) { - const metas = splat.length > 1 - ? splat.splice(0) - : splat; - - // Now that { splat } has been separated from any potential { meta }. we - // can assign this to the `info` object and write it to our format stream. - // If the additional metas are **NOT** objects or **LACK** enumerable properties - // you are going to have a bad time. - const metalen = metas.length; - if (metalen) { - for (let i = 0; i < metalen; i++) { - Object.assign(info, metas[i]); - } - } - - return info; - } - - if (tokens) { - return this._splat(info, tokens); - } - - return info; - } -} - -/* - * function splat (info) - * Returns a new instance of the splat format TransformStream - * which performs string interpolation from `info` objects. This was - * previously exposed implicitly in `winston < 3.0.0`. - */ -module.exports = opts => new Splatter(opts); - - -/***/ }), - -/***/ 1498: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fecha = __nccwpck_require__(6701); -const format = __nccwpck_require__(8259); - -/* - * function timestamp (info) - * Returns a new instance of the timestamp Format which adds a timestamp - * to the info. It was previously available in winston < 3.0.0 as: - * - * - { timestamp: true } // `new Date.toISOString()` - * - { timestamp: function:String } // Value returned by `timestamp()` - */ -module.exports = format((info, opts = {}) => { - if (opts.format) { - info.timestamp = typeof opts.format === 'function' - ? opts.format() - : fecha.format(new Date(), opts.format); - } - - if (!info.timestamp) { - info.timestamp = new Date().toISOString(); - } - - if (opts.alias) { - info[opts.alias] = info.timestamp; - } - - return info; -}); - - -/***/ }), - -/***/ 1144: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const colors = __nccwpck_require__(6457); -const format = __nccwpck_require__(8259); -const { MESSAGE } = __nccwpck_require__(1255); - -/* - * function uncolorize (info) - * Returns a new instance of the uncolorize Format that strips colors - * from `info` objects. This was previously exposed as { stripColors: true } - * to transports in `winston < 3.0.0`. - */ -module.exports = format((info, opts) => { - if (opts.level !== false) { - info.level = colors.strip(info.level); - } - - if (opts.message !== false) { - info.message = colors.strip(String(info.message)); - } - - if (opts.raw !== false && info[MESSAGE]) { - info[MESSAGE] = colors.strip(String(info[MESSAGE])); - } - - return info; -}); - - -/***/ }), - -/***/ 4197: -/***/ ((module) => { - - - -/** @type {import('./abs')} */ -module.exports = Math.abs; - - -/***/ }), - -/***/ 4455: -/***/ ((module) => { - - - -/** @type {import('./floor')} */ -module.exports = Math.floor; - - -/***/ }), - -/***/ 6128: -/***/ ((module) => { - - - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), - -/***/ 1295: -/***/ ((module) => { - - - -/** @type {import('./max')} */ -module.exports = Math.max; - - -/***/ }), - -/***/ 6949: -/***/ ((module) => { - - - -/** @type {import('./min')} */ -module.exports = Math.min; - - -/***/ }), - -/***/ 2943: -/***/ ((module) => { - - - -/** @type {import('./pow')} */ -module.exports = Math.pow; - - -/***/ }), - -/***/ 1721: -/***/ ((module) => { - - - -/** @type {import('./round')} */ -module.exports = Math.round; - - -/***/ }), - -/***/ 3536: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var $isNaN = __nccwpck_require__(6128); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; - - -/***/ }), - -/***/ 4031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/* - * merge2 - * https://github.com/teambition/merge2 - * - * Copyright (c) 2014-2020 Teambition - * Licensed under the MIT license. - */ -const Stream = __nccwpck_require__(2203) -const PassThrough = Stream.PassThrough -const slice = Array.prototype.slice - -module.exports = merge2 - -function merge2 () { - const streamsQueue = [] - const args = slice.call(arguments) - let merging = false - let options = args[args.length - 1] - - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop() - } else { - options = {} - } - - const doEnd = options.end !== false - const doPipeError = options.pipeError === true - if (options.objectMode == null) { - options.objectMode = true - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024 - } - const mergedStream = PassThrough(options) - - function addStream () { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)) - } - mergeStream() - return this - } - - function mergeStream () { - if (merging) { - return - } - merging = true - - let streams = streamsQueue.shift() - if (!streams) { - process.nextTick(endStream) - return - } - if (!Array.isArray(streams)) { - streams = [streams] - } - - let pipesCount = streams.length + 1 - - function next () { - if (--pipesCount > 0) { - return - } - merging = false - mergeStream() - } - - function pipe (stream) { - function onend () { - stream.removeListener('merge2UnpipeEnd', onend) - stream.removeListener('end', onend) - if (doPipeError) { - stream.removeListener('error', onerror) - } - next() - } - function onerror (err) { - mergedStream.emit('error', err) - } - // skip ended stream - if (stream._readableState.endEmitted) { - return next() - } - - stream.on('merge2UnpipeEnd', onend) - stream.on('end', onend) - - if (doPipeError) { - stream.on('error', onerror) - } - - stream.pipe(mergedStream, { end: false }) - // compatible for old stream - stream.resume() - } - - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]) - } - - next() - } - - function endStream () { - merging = false - // emit 'queueDrain' when all streams merged. - mergedStream.emit('queueDrain') - if (doEnd) { - mergedStream.end() - } - } - - mergedStream.setMaxListeners(0) - mergedStream.add = addStream - mergedStream.on('unpipe', function (stream) { - stream.emit('merge2UnpipeEnd') - }) - - if (args.length) { - addStream.apply(null, args) - } - return mergedStream -} - -// check and pause streams for pipe. -function pauseStreams (streams, options) { - if (!Array.isArray(streams)) { - // Backwards-compat with old-style streams - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)) - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error('Only readable stream can be merged.') - } - streams.pause() - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options) - } - } - return streams -} - - -/***/ }), - -/***/ 9555: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const braces = __nccwpck_require__(8671); -const picomatch = __nccwpck_require__(3268); -const utils = __nccwpck_require__(3753); - -const isEmptyString = v => v === '' || v === './'; -const hasBraces = v => { - const index = v.indexOf('{'); - return index > -1 && v.indexOf('}', index) > -1; -}; - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} `list` List of strings to match. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `[options]` See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any of the patterns matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.parse(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -// exposed for tests -micromatch.hasBraces = hasBraces; -module.exports = micromatch; - - -/***/ }), - -/***/ 7331: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = __nccwpck_require__(2087) - - -/***/ }), - -/***/ 2574: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var db = __nccwpck_require__(7331) -var extname = (__nccwpck_require__(6928).extname) - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} - - -/***/ }), - -/***/ 6987: -/***/ ((module) => { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} - - -/***/ }), - -/***/ 9224: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var name = __nccwpck_require__(7365); - -/** - * Wrap callbacks to prevent double execution. - * - * @param {Function} fn Function that should only be called once. - * @returns {Function} A wrapped callback which prevents multiple executions. - * @public - */ -module.exports = function one(fn) { - var called = 0 - , value; - - /** - * The function that prevents double execution. - * - * @private - */ - function onetime() { - if (called) return value; - - called = 1; - value = fn.apply(this, arguments); - fn = null; - - return value; - } - - // - // To make debugging more easy we want to use the name of the supplied - // function. So when you look at the functions that are assigned to event - // listeners you don't see a load of `onetime` functions but actually the - // names of the functions that this module will call. - // - // NOTE: We cannot override the `name` property, as that is `readOnly` - // property, so displayName will have to do. - // - onetime.displayName = name(fn); - return onetime; -}; - - -/***/ }), - -/***/ 3268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = __nccwpck_require__(1614); - - -/***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -const DEFAULT_MAX_EXTGLOB_RECURSION = 0; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - __proto__: null, - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - DEFAULT_MAX_EXTGLOB_RECURSION, - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - __proto__: null, - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - - -/***/ }), - -/***/ 51: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const constants = __nccwpck_require__(1237); -const utils = __nccwpck_require__(3753); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -const splitTopLevel = input => { - const parts = []; - let bracket = 0; - let paren = 0; - let quote = 0; - let value = ''; - let escaped = false; - - for (const ch of input) { - if (escaped === true) { - value += ch; - escaped = false; - continue; - } - - if (ch === '\\') { - value += ch; - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - value += ch; - continue; - } - - if (quote === 0) { - if (ch === '[') { - bracket++; - } else if (ch === ']' && bracket > 0) { - bracket--; - } else if (bracket === 0) { - if (ch === '(') { - paren++; - } else if (ch === ')' && paren > 0) { - paren--; - } else if (ch === '|' && paren === 0) { - parts.push(value); - value = ''; - continue; - } - } - } - - value += ch; - } - - parts.push(value); - return parts; -}; - -const isPlainBranch = branch => { - let escaped = false; - - for (const ch of branch) { - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (/[?*+@!()[\]{}]/.test(ch)) { - return false; - } - } - - return true; -}; - -const normalizeSimpleBranch = branch => { - let value = branch.trim(); - let changed = true; - - while (changed === true) { - changed = false; - - if (/^@\([^\\()[\]{}|]+\)$/.test(value)) { - value = value.slice(2, -1); - changed = true; - } - } - - if (!isPlainBranch(value)) { - return; - } - - return value.replace(/\\(.)/g, '$1'); -}; - -const hasRepeatedCharPrefixOverlap = branches => { - const values = branches.map(normalizeSimpleBranch).filter(Boolean); - - for (let i = 0; i < values.length; i++) { - for (let j = i + 1; j < values.length; j++) { - const a = values[i]; - const b = values[j]; - const char = a[0]; - - if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) { - continue; - } - - if (a === b || a.startsWith(b) || b.startsWith(a)) { - return true; - } - } - } - - return false; -}; - -const parseRepeatedExtglob = (pattern, requireEnd = true) => { - if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') { - return; - } - - let bracket = 0; - let paren = 0; - let quote = 0; - let escaped = false; - - for (let i = 1; i < pattern.length; i++) { - const ch = pattern[i]; - - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - continue; - } - - if (quote === 1) { - continue; - } - - if (ch === '[') { - bracket++; - continue; - } - - if (ch === ']' && bracket > 0) { - bracket--; - continue; - } - - if (bracket > 0) { - continue; - } - - if (ch === '(') { - paren++; - continue; - } - - if (ch === ')') { - paren--; - - if (paren === 0) { - if (requireEnd === true && i !== pattern.length - 1) { - return; - } - - return { - type: pattern[0], - body: pattern.slice(2, i), - end: i - }; - } - } - } -}; - -const getStarExtglobSequenceOutput = pattern => { - let index = 0; - const chars = []; - - while (index < pattern.length) { - const match = parseRepeatedExtglob(pattern.slice(index), false); - - if (!match || match.type !== '*') { - return; - } - - const branches = splitTopLevel(match.body).map(branch => branch.trim()); - if (branches.length !== 1) { - return; - } - - const branch = normalizeSimpleBranch(branches[0]); - if (!branch || branch.length !== 1) { - return; - } - - chars.push(branch); - index += match.end + 1; - } - - if (chars.length < 1) { - return; - } - - const source = chars.length === 1 - ? utils.escapeRegex(chars[0]) - : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`; - - return `${source}*`; -}; - -const repeatedExtglobRecursion = pattern => { - let depth = 0; - let value = pattern.trim(); - let match = parseRepeatedExtglob(value); - - while (match) { - depth++; - value = match.body.trim(); - match = parseRepeatedExtglob(value); - } - - return depth; -}; - -const analyzeRepeatedExtglob = (body, options) => { - if (options.maxExtglobRecursion === false) { - return { risky: false }; - } - - const max = - typeof options.maxExtglobRecursion === 'number' - ? options.maxExtglobRecursion - : constants.DEFAULT_MAX_EXTGLOB_RECURSION; - - const branches = splitTopLevel(body).map(branch => branch.trim()); - - if (branches.length > 1) { - if ( - branches.some(branch => branch === '') || - branches.some(branch => /^[*?]+$/.test(branch)) || - hasRepeatedCharPrefixOverlap(branches) - ) { - return { risky: true }; - } - } - - for (const branch of branches) { - const safeOutput = getStarExtglobSequenceOutput(branch); - if (safeOutput) { - return { risky: true, safeOutput }; - } - - if (repeatedExtglobRecursion(branch) > max) { - return { risky: true }; - } - } - - return { risky: false }; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - token.startIndex = state.index; - token.tokensIndex = tokens.length; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - const literal = input.slice(token.startIndex, state.index + 1); - const body = input.slice(token.startIndex + 2, state.index); - const analysis = analyzeRepeatedExtglob(body, opts); - - if ((token.type === 'plus' || token.type === 'star') && analysis.risky) { - const safeOutput = analysis.safeOutput - ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) - : undefined; - const open = tokens[token.tokensIndex]; - - open.type = 'text'; - open.value = literal; - open.output = safeOutput || utils.escapeRegex(literal); - - for (let i = token.tokensIndex + 1; i < tokens.length; i++) { - tokens[i].value = ''; - tokens[i].output = ''; - delete tokens[i].suffix; - } - - state.output = token.output + open.output; - state.backtrack = true; - - push({ type: 'paren', extglob: true, value, output: '' }); - decrement('parens'); - return; - } - - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 1614: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const scan = __nccwpck_require__(3999); -const parse = __nccwpck_require__(51); -const utils = __nccwpck_require__(3753); -const constants = __nccwpck_require__(1237); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; - - -/***/ }), - -/***/ 3999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(3753); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __nccwpck_require__(1237); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; - - -/***/ }), - -/***/ 3753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = __nccwpck_require__(1237); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; - - -/***/ }), - -/***/ 1989: -/***/ ((module) => { - -/*! queue-microtask. MIT License. Feross Aboukhadijeh */ -let promise - -module.exports = typeof queueMicrotask === 'function' - ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) - // reuse resolved promise, and allocate it lazily - : cb => (promise || (promise = Promise.resolve())) - .then(cb) - .catch(err => setTimeout(() => { throw err }, 0)) - - -/***/ }), - -/***/ 6307: -/***/ ((module) => { - - - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.F = codes; - - -/***/ }), - -/***/ 3396: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - - - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; -/**/ - -module.exports = Duplex; -var Readable = __nccwpck_require__(4458); -var Writable = __nccwpck_require__(5422); -__nccwpck_require__(8013)(Duplex, Readable); -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -// the no-half-open enforcer -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -/***/ }), - -/***/ 7550: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - - - -module.exports = PassThrough; -var Transform = __nccwpck_require__(7588); -__nccwpck_require__(8013)(PassThrough, Transform); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; - -/***/ }), - -/***/ 4458: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -module.exports = Readable; - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = (__nccwpck_require__(4434).EventEmitter); -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = __nccwpck_require__(4986); -/**/ - -var Buffer = (__nccwpck_require__(181).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ -var debugUtil = __nccwpck_require__(9023); -var debug; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - -var BufferList = __nccwpck_require__(1948); -var destroyImpl = __nccwpck_require__(5466); -var _require = __nccwpck_require__(5349), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(6307)/* .codes */ .F), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - -// Lazy loaded to improve the startup performance. -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; -__nccwpck_require__(8013)(Readable, Stream); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(3396); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(7319)/* .StringDecoder */ .I); - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} -function Readable(options) { - Duplex = Duplex || __nccwpck_require__(3396); - if (!(this instanceof Readable)) return new Readable(options); - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); - - // legacy - this.readable = true; - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - Stream.call(this); -} -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } - - // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - return er; -} -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(7319)/* .StringDecoder */ .I); - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; - - // Iterate over current buffer to convert already stored Buffers: - var p = this._readableState.buffer.head; - var content = ''; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; - -// Don't raise the hwm > 1GB -var MAX_HWM = 0x40000000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - if (ret !== null) this.emit('data', ret); - return ret; -}; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } - - // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - return dest; -}; -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; - - // Try start flowing on next tick if stream isn't explicitly paused - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; - - // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - state.flowing = !state.readableListening; - resume(this, state); - } - state.paused = false; - return this; -}; -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} -function resume_(stream, state) { - debug('resume', state.reading); - if (!state.reading) { - stream.read(0); - } - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - this._readableState.paused = true; - return this; -}; -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - return this; -}; -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = __nccwpck_require__(9089); - } - return createReadableStreamAsyncIterator(this); - }; -} -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); - - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } - } -} -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = __nccwpck_require__(7354); - } - return from(Readable, iterable, opts); - }; -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} - -/***/ }), - -/***/ 7588: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - - - -module.exports = Transform; -var _require$codes = (__nccwpck_require__(6307)/* .codes */ .F), - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -var Duplex = __nccwpck_require__(3396); -__nccwpck_require__(8013)(Transform, Duplex); -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - ts.writechunk = null; - ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} -function prefinish() { - var _this = this; - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); - - // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} - -/***/ }), - -/***/ 5422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - - - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var internalUtil = { - deprecate: __nccwpck_require__(7260) -}; -/**/ - -/**/ -var Stream = __nccwpck_require__(4986); -/**/ - -var Buffer = (__nccwpck_require__(181).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -var destroyImpl = __nccwpck_require__(5466); -var _require = __nccwpck_require__(5349), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(6307)/* .codes */ .F), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -var errorOrDestroy = destroyImpl.errorOrDestroy; -__nccwpck_require__(8013)(Writable, Stream); -function nop() {} -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(3396); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} -function Writable(options) { - Duplex = Duplex || __nccwpck_require__(3396); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); - - // legacy. - this.writable = true; - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var er; - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - return true; -} -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; -Writable.prototype.cork = function () { - this._writableState.corked++; -}; -Writable.prototype.uncork = function () { - var state = this._writableState; - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - return ret; -} -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - if (entry === null) state.lastBufferedRequest = null; - } - state.bufferedRequest = entry; - state.bufferProcessing = false; -} -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending) endWritable(this, state, cb); - return this; -}; -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - errorOrDestroy(stream, err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - return need; -} -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - - // reuse the free corkReq. - state.corkedRequestsFree.next = corkReq; -} -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; - -/***/ }), - -/***/ 9089: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var finished = __nccwpck_require__(9376); -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null - // we can be expecting either 'end' or - // 'error' - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); - } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } - - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); - } - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise - // returned by next() and store the error - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; - } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; -module.exports = createReadableStreamAsyncIterator; - -/***/ }), - -/***/ 1948: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var _require = __nccwpck_require__(181), - Buffer = _require.Buffer; -var _require2 = __nccwpck_require__(9023), - inspect = _require2.inspect; -var custom = inspect && inspect.custom || 'inspect'; -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} -module.exports = /*#__PURE__*/function () { - function BufferList() { - _classCallCheck(this, BufferList); - this.head = null; - this.tail = null; - this.length = 0; - } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) ret += s + p.data; - return ret; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - } - - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } - - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - } - }]); - return BufferList; -}(); - -/***/ }), - -/***/ 5466: -/***/ ((module) => { - - - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - return this; -} -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} -function emitErrorNT(self, err) { - self.emit('error', err); -} -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; - -/***/ }), - -/***/ 9376: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). - - - -var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(6307)/* .codes */ .F).ERR_STREAM_PREMATURE_CLOSE; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; -} -function noop() {} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - var onerror = function onerror(err) { - callback.call(stream, err); - }; - var onclose = function onclose() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} -module.exports = eos; - -/***/ }), - -/***/ 7354: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(6307)/* .codes */ .F).ERR_INVALID_ARG_TYPE; -function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - // Reading boolean to protect against _read - // being called before last iteration completion. - var reading = false; - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); - } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - return readable; -} -module.exports = from; - - -/***/ }), - -/***/ 4924: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). - - - -var eos; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} -var _require$codes = (__nccwpck_require__(6307)/* .codes */ .F), - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = __nccwpck_require__(9376); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; - - // request.destroy just do .end - .abort is what we want - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} -function call(fn) { - fn(); -} -function pipe(from, to) { - return from.pipe(to); -} -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} -module.exports = pipeline; - -/***/ }), - -/***/ 5349: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(6307)/* .codes */ .F).ERR_INVALID_OPT_VALUE; -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - return Math.floor(hwm); - } - - // Default value - return state.objectMode ? 16 : 16 * 1024; -} -module.exports = { - getHighWaterMark: getHighWaterMark -}; - -/***/ }), - -/***/ 4986: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(2203); - - -/***/ }), - -/***/ 436: -/***/ ((module, exports, __nccwpck_require__) => { - -var Stream = __nccwpck_require__(2203); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = __nccwpck_require__(4458); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = __nccwpck_require__(5422); - exports.Duplex = __nccwpck_require__(3396); - exports.Transform = __nccwpck_require__(7588); - exports.PassThrough = __nccwpck_require__(7550); - exports.finished = __nccwpck_require__(9376); - exports.pipeline = __nccwpck_require__(4924); -} - - -/***/ }), - -/***/ 3728: -/***/ ((module) => { - - - -function reusify (Constructor) { - var head = new Constructor() - var tail = head - - function get () { - var current = head - - if (current.next) { - head = current.next - } else { - head = new Constructor() - tail = head - } - - current.next = null - - return current - } - - function release (obj) { - tail.next = obj - tail = obj - } - - return { - get: get, - release: release - } -} - -module.exports = reusify - - -/***/ }), - -/***/ 7906: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! run-parallel. MIT License. Feross Aboukhadijeh */ -module.exports = runParallel - -const queueMicrotask = __nccwpck_require__(1989) - -function runParallel (tasks, cb) { - let results, pending, keys - let isSync = true - - if (Array.isArray(tasks)) { - results = [] - pending = tasks.length - } else { - keys = Object.keys(tasks) - results = {} - pending = keys.length - } - - function done (err) { - function end () { - if (cb) cb(err, results) - cb = null - } - if (isSync) queueMicrotask(end) - else end() - } - - function each (i, err, result) { - results[i] = result - if (--pending === 0 || err) { - done(err) - } - } - - if (!pending) { - // empty - done(null) - } else if (keys) { - // object - keys.forEach(function (key) { - tasks[key](function (err, result) { each(key, err, result) }) - }) - } else { - // array - tasks.forEach(function (task, i) { - task(function (err, result) { each(i, err, result) }) - }) - } - - isSync = false -} - - -/***/ }), - -/***/ 5725: -/***/ ((module, exports, __nccwpck_require__) => { - -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = __nccwpck_require__(181) -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), - -/***/ 4450: -/***/ ((module, exports) => { - - - -const { hasOwnProperty } = Object.prototype - -const stringify = configure() - -// @ts-expect-error -stringify.configure = configure -// @ts-expect-error -stringify.stringify = stringify - -// @ts-expect-error -stringify.default = stringify - -// @ts-expect-error used for named export -exports.stringify = stringify -// @ts-expect-error used for named export -exports.configure = configure - -module.exports = stringify - -// eslint-disable-next-line no-control-regex -const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/ - -// Escape C0 control characters, double quotes, the backslash and every code -// unit with a numeric value in the inclusive range 0xD800 to 0xDFFF. -function strEscape (str) { - // Some magic numbers that worked out fine while benchmarking with v8 8.0 - if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) { - return `"${str}"` - } - return JSON.stringify(str) -} - -function sort (array, comparator) { - // Insertion sort is very efficient for small input sizes, but it has a bad - // worst case complexity. Thus, use native array sort for bigger values. - if (array.length > 2e2 || comparator) { - return array.sort(comparator) - } - for (let i = 1; i < array.length; i++) { - const currentValue = array[i] - let position = i - while (position !== 0 && array[position - 1] > currentValue) { - array[position] = array[position - 1] - position-- - } - array[position] = currentValue - } - return array -} - -const typedArrayPrototypeGetSymbolToStringTag = - Object.getOwnPropertyDescriptor( - Object.getPrototypeOf( - Object.getPrototypeOf( - new Int8Array() - ) - ), - Symbol.toStringTag - ).get - -function isTypedArrayWithEntries (value) { - return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0 -} - -function stringifyTypedArray (array, separator, maximumBreadth) { - if (array.length < maximumBreadth) { - maximumBreadth = array.length - } - const whitespace = separator === ',' ? '' : ' ' - let res = `"0":${whitespace}${array[0]}` - for (let i = 1; i < maximumBreadth; i++) { - res += `${separator}"${i}":${whitespace}${array[i]}` - } - return res -} - -function getCircularValueOption (options) { - if (hasOwnProperty.call(options, 'circularValue')) { - const circularValue = options.circularValue - if (typeof circularValue === 'string') { - return `"${circularValue}"` - } - if (circularValue == null) { - return circularValue - } - if (circularValue === Error || circularValue === TypeError) { - return { - toString () { - throw new TypeError('Converting circular structure to JSON') - } - } - } - throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined') - } - return '"[Circular]"' -} - -function getDeterministicOption (options) { - let value - if (hasOwnProperty.call(options, 'deterministic')) { - value = options.deterministic - if (typeof value !== 'boolean' && typeof value !== 'function') { - throw new TypeError('The "deterministic" argument must be of type boolean or comparator function') - } - } - return value === undefined ? true : value -} - -function getBooleanOption (options, key) { - let value - if (hasOwnProperty.call(options, key)) { - value = options[key] - if (typeof value !== 'boolean') { - throw new TypeError(`The "${key}" argument must be of type boolean`) - } - } - return value === undefined ? true : value -} - -function getPositiveIntegerOption (options, key) { - let value - if (hasOwnProperty.call(options, key)) { - value = options[key] - if (typeof value !== 'number') { - throw new TypeError(`The "${key}" argument must be of type number`) - } - if (!Number.isInteger(value)) { - throw new TypeError(`The "${key}" argument must be an integer`) - } - if (value < 1) { - throw new RangeError(`The "${key}" argument must be >= 1`) - } - } - return value === undefined ? Infinity : value -} - -function getItemCount (number) { - if (number === 1) { - return '1 item' - } - return `${number} items` -} - -function getUniqueReplacerSet (replacerArray) { - const replacerSet = new Set() - for (const value of replacerArray) { - if (typeof value === 'string' || typeof value === 'number') { - replacerSet.add(String(value)) - } - } - return replacerSet -} - -function getStrictOption (options) { - if (hasOwnProperty.call(options, 'strict')) { - const value = options.strict - if (typeof value !== 'boolean') { - throw new TypeError('The "strict" argument must be of type boolean') - } - if (value) { - return (value) => { - let message = `Object can not safely be stringified. Received type ${typeof value}` - if (typeof value !== 'function') message += ` (${value.toString()})` - throw new Error(message) - } - } - } -} - -function configure (options) { - options = { ...options } - const fail = getStrictOption(options) - if (fail) { - if (options.bigint === undefined) { - options.bigint = false - } - if (!('circularValue' in options)) { - options.circularValue = Error - } - } - const circularValue = getCircularValueOption(options) - const bigint = getBooleanOption(options, 'bigint') - const deterministic = getDeterministicOption(options) - const comparator = typeof deterministic === 'function' ? deterministic : undefined - const maximumDepth = getPositiveIntegerOption(options, 'maximumDepth') - const maximumBreadth = getPositiveIntegerOption(options, 'maximumBreadth') - - function stringifyFnReplacer (key, parent, stack, replacer, spacer, indentation) { - let value = parent[key] - - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - value = replacer.call(parent, key, value) - - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - let join = ',' - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let whitespace = '' - let separator = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (deterministic && !isTypedArrayWithEntries(value)) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${whitespace}${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifyArrayReplacer (key, value, stack, replacer, spacer, indentation) { - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - const originalIndentation = indentation - let res = '' - let join = ',' - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - stack.push(value) - let whitespace = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - let separator = '' - for (const key of replacer) { - const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${whitespace}${tmp}` - separator = join - } - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifyIndent (key, value, stack, spacer, indentation) { - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again. - if (typeof value !== 'object') { - return stringifyIndent(key, value, stack, spacer, indentation) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - indentation += spacer - let res = `\n${indentation}` - const join = `,\n${indentation}` - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - res += `\n${originalIndentation}` - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - indentation += spacer - const join = `,\n${indentation}` - let res = '' - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, join, maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = join - } - if (deterministic) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyIndent(key, value[key], stack, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}: ${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (separator !== '') { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifySimple (key, value, stack) { - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again - if (typeof value !== 'object') { - return stringifySimple(key, value, stack) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - - const hasLength = value.length !== undefined - if (hasLength && Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifySimple(String(i), value[i], stack) - res += tmp !== undefined ? tmp : 'null' - res += ',' - } - const tmp = stringifySimple(String(i), value[i], stack) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `,"... ${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (hasLength && isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, ',', maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = ',' - } - if (deterministic) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifySimple(key, value[key], stack) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${tmp}` - separator = ',' - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringify (value, replacer, space) { - if (arguments.length > 1) { - let spacer = '' - if (typeof space === 'number') { - spacer = ' '.repeat(Math.min(space, 10)) - } else if (typeof space === 'string') { - spacer = space.slice(0, 10) - } - if (replacer != null) { - if (typeof replacer === 'function') { - return stringifyFnReplacer('', { '': value }, [], replacer, spacer, '') - } - if (Array.isArray(replacer)) { - return stringifyArrayReplacer('', value, [], getUniqueReplacerSet(replacer), spacer, '') - } - } - if (spacer.length !== 0) { - return stringifyIndent('', value, [], spacer, '') - } - } - return stringifySimple('', value, []) - } - - return stringify -} - - -/***/ }), - -/***/ 1546: -/***/ ((__unused_webpack_module, exports) => { - -exports.get = function(belowFn) { - var oldLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; - - var dummyObject = {}; - - var v8Handler = Error.prepareStackTrace; - Error.prepareStackTrace = function(dummyObject, v8StackTrace) { - return v8StackTrace; - }; - Error.captureStackTrace(dummyObject, belowFn || exports.get); - - var v8StackTrace = dummyObject.stack; - Error.prepareStackTrace = v8Handler; - Error.stackTraceLimit = oldLimit; - - return v8StackTrace; -}; - -exports.parse = function(err) { - if (!err.stack) { - return []; - } - - var self = this; - var lines = err.stack.split('\n').slice(1); - - return lines - .map(function(line) { - if (line.match(/^\s*[-]{4,}$/)) { - return self._createParsedCallSite({ - fileName: line, - lineNumber: null, - functionName: null, - typeName: null, - methodName: null, - columnNumber: null, - 'native': null, - }); - } - - var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); - if (!lineMatch) { - return; - } - - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = (lineMatch[5] === 'native'); - - if (lineMatch[1]) { - functionName = lineMatch[1]; - var methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart-1] == '.') - methodStart--; - if (methodStart > 0) { - object = functionName.substr(0, methodStart); - method = functionName.substr(methodStart + 1); - var objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.substr(objectEnd + 1); - object = object.substr(0, objectEnd); - } - } - typeName = null; - } - - if (method) { - typeName = object; - methodName = method; - } - - if (method === '') { - methodName = null; - functionName = null; - } - - var properties = { - fileName: lineMatch[2] || null, - lineNumber: parseInt(lineMatch[3], 10) || null, - functionName: functionName, - typeName: typeName, - methodName: methodName, - columnNumber: parseInt(lineMatch[4], 10) || null, - 'native': isNative, - }; - - return self._createParsedCallSite(properties); - }) - .filter(function(callSite) { - return !!callSite; - }); -}; - -function CallSite(properties) { - for (var property in properties) { - this[property] = properties[property]; - } -} - -var strProperties = [ - 'this', - 'typeName', - 'functionName', - 'methodName', - 'fileName', - 'lineNumber', - 'columnNumber', - 'function', - 'evalOrigin' -]; -var boolProperties = [ - 'topLevel', - 'eval', - 'native', - 'constructor' -]; -strProperties.forEach(function (property) { - CallSite.prototype[property] = null; - CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; - } -}); -boolProperties.forEach(function (property) { - CallSite.prototype[property] = false; - CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; - } -}); - -exports._createParsedCallSite = function(properties) { - return new CallSite(properties); -}; - - -/***/ }), - -/***/ 7319: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -/**/ - -var Buffer = (__nccwpck_require__(5725).Buffer); -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.I = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} - -/***/ }), - -/***/ 6480: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const os = __nccwpck_require__(857); -const tty = __nccwpck_require__(2018); -const hasFlag = __nccwpck_require__(4167); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; - - -/***/ }), - -/***/ 743: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -const isNumber = __nccwpck_require__(952); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; - - -/***/ }), - -/***/ 9864: -/***/ ((__unused_webpack_module, exports) => { - -/** - * cli.js: Config that conform to commonly used CLI logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -/** - * Default levels for the CLI configuration. - * @type {Object} - */ -exports.levels = { - error: 0, - warn: 1, - help: 2, - data: 3, - info: 4, - debug: 5, - prompt: 6, - verbose: 7, - input: 8, - silly: 9 -}; - -/** - * Default colors for the CLI configuration. - * @type {Object} - */ -exports.colors = { - error: 'red', - warn: 'yellow', - help: 'cyan', - data: 'grey', - info: 'green', - debug: 'blue', - prompt: 'grey', - verbose: 'cyan', - input: 'grey', - silly: 'magenta' -}; - - -/***/ }), - -/***/ 7574: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * index.js: Default settings for all levels that winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -/** - * Export config set for the CLI. - * @type {Object} - */ -Object.defineProperty(exports, "cli", ({ - value: __nccwpck_require__(9864) -})); - -/** - * Export config set for npm. - * @type {Object} - */ -Object.defineProperty(exports, "npm", ({ - value: __nccwpck_require__(5019) -})); - -/** - * Export config set for the syslog. - * @type {Object} - */ -Object.defineProperty(exports, "syslog", ({ - value: __nccwpck_require__(9473) -})); - - -/***/ }), - -/***/ 5019: -/***/ ((__unused_webpack_module, exports) => { - -/** - * npm.js: Config that conform to npm logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -/** - * Default levels for the npm configuration. - * @type {Object} - */ -exports.levels = { - error: 0, - warn: 1, - info: 2, - http: 3, - verbose: 4, - debug: 5, - silly: 6 -}; - -/** - * Default levels for the npm configuration. - * @type {Object} - */ -exports.colors = { - error: 'red', - warn: 'yellow', - info: 'green', - http: 'green', - verbose: 'cyan', - debug: 'blue', - silly: 'magenta' -}; - - -/***/ }), - -/***/ 9473: -/***/ ((__unused_webpack_module, exports) => { - -/** - * syslog.js: Config that conform to syslog logging levels. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -/** - * Default levels for the syslog configuration. - * @type {Object} - */ -exports.levels = { - emerg: 0, - alert: 1, - crit: 2, - error: 3, - warning: 4, - notice: 5, - info: 6, - debug: 7 -}; - -/** - * Default levels for the syslog configuration. - * @type {Object} - */ -exports.colors = { - emerg: 'red', - alert: 'yellow', - crit: 'red', - error: 'red', - warning: 'red', - notice: 'yellow', - info: 'green', - debug: 'blue' -}; - - -/***/ }), - -/***/ 1255: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden level identifier - * to allow the readable level property to be mutable for - * operations like colorization - * - * @type {Symbol} - */ -Object.defineProperty(exports, "LEVEL", ({ - value: Symbol.for('level') -})); - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden message identifier - * to allow the final message property to not have - * side effects on another. - * - * @type {Symbol} - */ -Object.defineProperty(exports, "MESSAGE", ({ - value: Symbol.for('message') -})); - -/** - * A shareable symbol constant that can be used - * as a non-enumerable / semi-hidden message identifier - * to allow the extracted splat property be hidden - * - * @type {Symbol} - */ -Object.defineProperty(exports, "SPLAT", ({ - value: Symbol.for('splat') -})); - -/** - * A shareable object constant that can be used - * as a standard configuration for winston@3. - * - * @type {Object} - */ -Object.defineProperty(exports, "configs", ({ - value: __nccwpck_require__(7574) -})); - - -/***/ }), - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* unused reexport */ __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -__webpack_unused_export__ = httpOverHttp; -__webpack_unused_export__ = httpsOverHttp; -__webpack_unused_export__ = httpOverHttps; -__webpack_unused_export__ = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -__webpack_unused_export__ = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -__webpack_unused_export__ = Dispatcher -__webpack_unused_export__ = Client -__webpack_unused_export__ = Pool -__webpack_unused_export__ = BalancedPool -__webpack_unused_export__ = Agent -__webpack_unused_export__ = ProxyAgent -__webpack_unused_export__ = EnvHttpProxyAgent -__webpack_unused_export__ = RetryAgent -__webpack_unused_export__ = RetryHandler - -__webpack_unused_export__ = DecoratorHandler -__webpack_unused_export__ = RedirectHandler -__webpack_unused_export__ = createRedirectInterceptor -__webpack_unused_export__ = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -__webpack_unused_export__ = buildConnector -__webpack_unused_export__ = errors -__webpack_unused_export__ = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -__webpack_unused_export__ = setGlobalDispatcher -__webpack_unused_export__ = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -__webpack_unused_export__ = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -/* unused reexport */ __nccwpck_require__(9822).Headers -/* unused reexport */ __nccwpck_require__(8661).Response -/* unused reexport */ __nccwpck_require__(6465).Request -/* unused reexport */ __nccwpck_require__(9976).FormData -__webpack_unused_export__ = globalThis.File ?? (__nccwpck_require__(4573).File) -/* unused reexport */ __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -__webpack_unused_export__ = setGlobalOrigin -__webpack_unused_export__ = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -__webpack_unused_export__ = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -__webpack_unused_export__ = deleteCookie -__webpack_unused_export__ = getCookies -__webpack_unused_export__ = getSetCookies -__webpack_unused_export__ = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -__webpack_unused_export__ = parseMIMEType -__webpack_unused_export__ = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -/* unused reexport */ __nccwpck_require__(7976).WebSocket -__webpack_unused_export__ = CloseEvent -__webpack_unused_export__ = ErrorEvent -__webpack_unused_export__ = MessageEvent - -__webpack_unused_export__ = makeDispatcher(api.request) -__webpack_unused_export__ = makeDispatcher(api.stream) -__webpack_unused_export__ = makeDispatcher(api.pipeline) -__webpack_unused_export__ = makeDispatcher(api.connect) -__webpack_unused_export__ = makeDispatcher(api.upgrade) - -__webpack_unused_export__ = MockClient -__webpack_unused_export__ = MockPool -__webpack_unused_export__ = MockAgent -__webpack_unused_export__ = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -__webpack_unused_export__ = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9h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qIQEMXgtBigEhAyABIARGDaICIAIoAgAiACAEIAFraiEFIAEgAGtBAWohBgNAIAEtAAAgAEGMzwBqLQAARw1kIABBAUYN+gEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMogILQYsBIQMgASAERg2hAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGOzwBqLQAARw1kIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQ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wELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYCHCACIAE2AhQgAkGbCjYCECACQQg2AgxBACEDDJ8BCyACQQA2AgALQQAhAyACQQA2AhwgAiABNgIUIAJBkDM2AhAgAkEINgIMDJ0BCyACQQA2AgAgBkEBaiEBIAItAClBI0kNACACQQA2Ahw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BAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZt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ACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQtBACEDIAJBADYCHCACIAE2AhQgAkH3CTYCECACQQg2AgwMoAELIAJBADYCACAGQQFqIQEgAi0AKUEhRg0DIAJBADYC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AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 7260: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = __nccwpck_require__(9023).deprecate; - - -/***/ }), - -/***/ 5231: -/***/ (function(module) { - -/*! - * Voca string library 1.4.1 - * https://vocajs.pages.dev - * - * Copyright Dmitri Pavlutin and other contributors - * Released under the MIT license - */ - -(function (global, factory) { - true ? module.exports = factory() : - 0; -}(this, (function () { 'use strict'; - - function _extends() { - _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - - return _extends.apply(this, arguments); - } - - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } - } - - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } - - function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { - return; - } - - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - - /** - * Checks if `value` is `null` or `undefined` - * - * @ignore - * @function isNil - * @param {*} value The object to check - * @return {boolean} Returns `true` is `value` is `undefined` or `null`, `false` otherwise - */ - function isNil(value) { - return value === undefined || value === null; - } - - /** - * Converts the `value` to a boolean. If `value` is `undefined` or `null`, returns `defaultValue`. - * - * @ignore - * @function toBoolean - * @param {*} value The value to convert. - * @param {boolean} [defaultValue=false] The default value. - * @return {boolean} Returns the coercion to boolean. - */ - - function coerceToBoolean(value) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (isNil(value)) { - return defaultValue; - } - - return Boolean(value); - } - - /** - * Checks whether `subject` is a string primitive type. - * - * @function isString - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} subject The value to verify. - * @return {boolean} Returns `true` if `subject` is string primitive type or `false` otherwise. - * @example - * v.isString('vacation'); - * // => true - * - * v.isString(560); - * // => false - */ - function isString(subject) { - return typeof subject === 'string'; - } - - /** - * Get the string representation of the `value`. - * Converts the `value` to string. - * If `value` is `null` or `undefined`, return `defaultValue`. - * - * @ignore - * @function toString - * @param {*} value The value to convert. - * @param {*} [defaultValue=''] The default value to return. - * @return {string|null} Returns the string representation of `value`. Returns `defaultValue` if `value` is - * `null` or `undefined`. - */ - - function coerceToString(value) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - - if (isNil(value)) { - return defaultValue; - } - - if (isString(value)) { - return value; - } - - return String(value); - } - - /** - * Converts the first character of `subject` to upper case. If `restToLower` is `true`, convert the rest of - * `subject` to lower case. - * - * @function capitalize - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to capitalize. - * @param {boolean} [restToLower=false] Convert the rest of `subject` to lower case. - * @return {string} Returns the capitalized string. - * @example - * v.capitalize('apple'); - * // => 'Apple' - * - * v.capitalize('aPPle', true); - * // => 'Apple' - */ - - function capitalize(subject, restToLower) { - var subjectString = coerceToString(subject); - var restToLowerCaseBoolean = coerceToBoolean(restToLower); - - if (subjectString === '') { - return ''; - } - - if (restToLowerCaseBoolean) { - subjectString = subjectString.toLowerCase(); - } - - return subjectString.substr(0, 1).toUpperCase() + subjectString.substr(1); - } - - /** - * Converts the `subject` to lower case. - * - * @function lowerCase - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to lower case. - * @return {string} Returns the lower case string. - * @example - * v.lowerCase('Green'); - * // => 'green' - * - * v.lowerCase('BLUE'); - * // => 'blue' - */ - - function lowerCase(subject) { - var subjectString = coerceToString(subject, ''); - return subjectString.toLowerCase(); - } - - /** - * A regular expression string matching digits - * - * @type {string} - * @ignore - */ - var digit = '\\d'; - /** - * A regular expression string matching whitespace - * - * @type {string} - * @ignore - */ - - var whitespace = '\\s\\uFEFF\\xA0'; - /** - * A regular expression string matching high surrogate - * - * @type {string} - * @ignore - */ - - var highSurrogate = '\\uD800-\\uDBFF'; - /** - * A regular expression string matching low surrogate - * - * @type {string} - * @ignore - */ - - var lowSurrogate = '\\uDC00-\\uDFFF'; - /** - * A regular expression string matching diacritical mark - * - * @type {string} - * @ignore - */ - - var diacriticalMark = '\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F'; - /** - * A regular expression to match the base character for a combining mark - * - * @type {string} - * @ignore - */ - - var base = '\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF'; - /** - * Regular expression to match combining marks - * - * @see http://unicode.org/faq/char_combmark.html - * @type {RegExp} - * @ignore - */ - - var REGEXP_COMBINING_MARKS = new RegExp('([' + base + ']|[' + highSurrogate + '][' + lowSurrogate + ']|[' + highSurrogate + '](?![' + lowSurrogate + '])|(?:[^' + highSurrogate + ']|^)[' + lowSurrogate + '])([' + diacriticalMark + ']+)', 'g'); - /** - * Regular expression to match surrogate pairs - * - * @see http://www.unicode.org/faq/utf_bom.html#utf16-2 - * @type {RegExp} - * @ignore - */ - - var REGEXP_SURROGATE_PAIRS = new RegExp('([' + highSurrogate + '])([' + lowSurrogate + '])', 'g'); - /** - * Regular expression to match a unicode character - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_UNICODE_CHARACTER = new RegExp('((?:[' + base + ']|[' + highSurrogate + '][' + lowSurrogate + ']|[' + highSurrogate + '](?![' + lowSurrogate + '])|(?:[^' + highSurrogate + ']|^)[' + lowSurrogate + '])(?:[' + diacriticalMark + ']+))|\ -([' + highSurrogate + '][' + lowSurrogate + '])|\ -([\\n\\r\\u2028\\u2029])|\ -(.)', 'g'); - /** - * Regular expression to match whitespaces - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_WHITESPACE = new RegExp('[' + whitespace + ']'); - /** - * Regular expression to match whitespaces from the left side - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_TRIM_LEFT = new RegExp('^[' + whitespace + ']+'); - /** - * Regular expression to match whitespaces from the right side - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_TRIM_RIGHT = new RegExp('[' + whitespace + ']+$'); - /** - * Regular expression to match digit characters - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_DIGIT = new RegExp('^' + digit + '+$'); - /** - * Regular expression to match regular expression special characters - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_SPECIAL_CHARACTERS = /[-[\]{}()*+!<=:?./\\^$|#,]/g; - /** - * Regular expression to match not latin characters - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_NON_LATIN = /[^A-Za-z0-9]/g; - /** - * Regular expression to match HTML special characters. - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_HTML_SPECIAL_CHARACTERS = /[<>&"'`]/g; - /** - * Regular expression to match sprintf format string - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_CONVERSION_SPECIFICATION = /(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g; - /** - * Regular expression to match trailing zeros in a number - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_TRAILING_ZEROS = /\.?0+$/g; - /** - * Regular expression to match a list of tags. - * - * @see https://html.spec.whatwg.org/multipage/syntax.html#syntax-tag-name - * @type {RegExp} - * @ignore - */ - - var REGEXP_TAG_LIST = /<([A-Za-z0-9]+)>/g; - - /** - * A regular expression to match the General Punctuation Unicode block - * - * @type {string} - * @ignore - */ - - var generalPunctuationBlock = '\\u2000-\\u206F'; - /** - * A regular expression to match non characters from from Basic Latin and Latin-1 Supplement Unicode blocks - * - * @type {string} - * @ignore - */ - - var nonCharacter = '\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7'; - /** - * A regular expression to match the dingbat Unicode block - * - * @type {string} - * @ignore - */ - - var dingbatBlock = '\\u2700-\\u27BF'; - /** - * A regular expression string that matches lower case letters: LATIN - * - * @type {string} - * @ignore - */ - - var lowerCaseLetter = 'a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F'; - /** - * A regular expression string that matches upper case letters: LATIN - * - * @type {string} - * @ignore - */ - - var upperCaseLetter = '\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e'; - /** - * Regular expression to match Unicode words - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_WORD = new RegExp('(?:[' + upperCaseLetter + '][' + diacriticalMark + ']*)?(?:[' + lowerCaseLetter + '][' + diacriticalMark + ']*)+|\ -(?:[' + upperCaseLetter + '][' + diacriticalMark + ']*)+(?![' + lowerCaseLetter + '])|\ -[' + digit + ']+|\ -[' + dingbatBlock + ']|\ -[^' + nonCharacter + generalPunctuationBlock + whitespace + ']+', 'g'); - /** - * Regular expression to match words from Basic Latin and Latin-1 Supplement blocks - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_LATIN_WORD = /[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g; - /** - * Regular expression to match alpha characters - * - * @see http://stackoverflow.com/a/22075070/1894471 - * @type {RegExp} - * @ignore - */ - - var REGEXP_ALPHA = new RegExp('^(?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)+$'); - /** - * Regular expression to match alpha and digit characters - * - * @see http://stackoverflow.com/a/22075070/1894471 - * @type {RegExp} - * @ignore - */ - - var REGEXP_ALPHA_DIGIT = new RegExp('^((?:[' + lowerCaseLetter + upperCaseLetter + '][' + diacriticalMark + ']*)|[' + digit + '])+$'); - /** - * Regular expression to match Extended ASCII characters, i.e. the first 255 - * - * @type {RegExp} - * @ignore - */ - - var REGEXP_EXTENDED_ASCII = /^[\x01-\xFF]*$/; - - /** - * Verifies if `value` is `undefined` or `null` and returns `defaultValue`. In other case returns `value`. - * - * @ignore - * @function nilDefault - * @param {*} value The value to verify. - * @param {*} defaultValue The default value. - * @return {*} Returns `defaultValue` if `value` is `undefined` or `null`, otherwise `defaultValue`. - */ - function nilDefault(value, defaultValue) { - return value == null ? defaultValue : value; - } - - /** - * Get the string representation of the `value`. - * Converts the `value` to string. - * - * @ignore - * @function toString - * @param {*} value The value to convert. - * @return {string|null} Returns the string representation of `value`. - */ - - function toString(value) { - if (isNil(value)) { - return null; - } - - if (isString(value)) { - return value; - } - - return String(value); - } - - /** - * Splits `subject` into an array of words. - * - * @function words - * @static - * @since 1.0.0 - * @memberOf Split - * @param {string} [subject=''] The string to split into words. - * @param {string|RegExp} [pattern] The pattern to watch words. If `pattern` is not RegExp, it is transformed to `new RegExp(pattern, flags)`. - * @param {string} [flags=''] The regular expression flags. Applies when `pattern` is string type. - * @return {Array} Returns the array of words. - * @example - * v.words('gravity can cross dimensions'); - * // => ['gravity', 'can', 'cross', 'dimensions'] - * - * v.words('GravityCanCrossDimensions'); - * // => ['Gravity', 'Can', 'Cross', 'Dimensions'] - * - * v.words('Gravity - can cross dimensions!'); - * // => ['Gravity', 'can', 'cross', 'dimensions'] - * - * v.words('Earth gravity', /[^\s]+/g); - * // => ['Earth', 'gravity'] - */ - - function words(subject, pattern, flags) { - var subjectString = coerceToString(subject); - var patternRegExp; - - if (isNil(pattern)) { - patternRegExp = REGEXP_EXTENDED_ASCII.test(subjectString) ? REGEXP_LATIN_WORD : REGEXP_WORD; - } else if (pattern instanceof RegExp) { - patternRegExp = pattern; - } else { - var flagsString = toString(nilDefault(flags, '')); - patternRegExp = new RegExp(toString(pattern), flagsString); - } - - return nilDefault(subjectString.match(patternRegExp), []); - } - - /** - * Transforms the `word` into camel case chunk. - * - * @param {string} word The word string - * @param {number} index The index of the word in phrase. - * @return {string} The transformed word. - * @ignore - */ - - function wordToCamel(word, index) { - return index === 0 ? lowerCase(word) : capitalize(word, true); - } - /** - * Converts the `subject` to camel case. - * - * @function camelCase - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to camel case. - * @return {string} The camel case string. - * @example - * v.camelCase('bird flight'); - * // => 'birdFlight' - * - * v.camelCase('BirdFlight'); - * // => 'birdFlight' - * - * v.camelCase('-BIRD-FLIGHT-'); - * // => 'birdFlight' - */ - - - function camelCase(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - return words(subjectString).map(wordToCamel).join(''); - } - - /** - * Converts the first character of `subject` to lower case. - * - * @function decapitalize - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to decapitalize. - * @return {string} Returns the decapitalized string. - * @example - * v.decapitalize('Sun'); - * // => 'sun' - * - * v.decapitalize('moon'); - * // => 'moon' - */ - - function decapitalize(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - return subjectString.substr(0, 1).toLowerCase() + subjectString.substr(1); - } - - /** - * Converts the `subject` to kebab case, - * also called spinal case or lisp case. - * - * @function kebabCase - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to kebab case. - * @return {string} Returns the kebab case string. - * @example - * v.kebabCase('goodbye blue sky'); - * // => 'goodbye-blue-sky' - * - * v.kebabCase('GoodbyeBlueSky'); - * // => 'goodbye-blue-sky' - * - * v.kebabCase('-Goodbye-Blue-Sky-'); - * // => 'goodbye-blue-sky' - */ - - function kebabCase(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - return words(subjectString).map(lowerCase).join('-'); - } - - /** - * Converts the `subject` to snake case. - * - * @function snakeCase - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to snake case. - * @return {string} Returns the snake case string. - * @example - * v.snakeCase('learning to fly'); - * // => 'learning_to_fly' - * - * v.snakeCase('LearningToFly'); - * // => 'learning_to_fly' - * - * v.snakeCase('-Learning-To-Fly-'); - * // => 'learning_to_fly' - */ - - function snakeCase(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - return words(subjectString).map(lowerCase).join('_'); - } - - /** - * Converts the `subject` to upper case. - * - * @function upperCase - * @static - * @since 1.0.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to upper case. - * @return {string} Returns the upper case string. - * @example - * v.upperCase('school'); - * // => 'SCHOOL' - */ - - function upperCase(subject) { - var subjectString = coerceToString(subject); - return subjectString.toUpperCase(); - } - - /** - * Converts the uppercase alpha characters of `subject` to lowercase and lowercase - * characters to uppercase. - * - * @function swapCase - * @static - * @since 1.3.0 - * @memberOf Case - * @param {string} [subject=''] The string to swap the case. - * @return {string} Returns the converted string. - * @example - * v.swapCase('League of Shadows'); - * // => 'lEAGUE OF sHADOWS' - * - * v.swapCase('2 Bees'); - * // => '2 bEES' - */ - - function swapCase(subject) { - var subjectString = coerceToString(subject); - return subjectString.split('').reduce(swapAndConcat, ''); - } - - function swapAndConcat(swapped, character) { - var lowerCase = character.toLowerCase(); - var upperCase = character.toUpperCase(); - return swapped + (character === lowerCase ? upperCase : lowerCase); - } - - /** - * Converts the subject to title case. - * - * @function titleCase - * @static - * @since 1.4.0 - * @memberOf Case - * @param {string} [subject=''] The string to convert to title case. - * @param {Array} [noSplit] Do not split words at the specified characters. - * @return {string} Returns the title case string. - * @example - * v.titleCase('learning to fly'); - * // => 'Learning To Fly' - * - * v.titleCase('jean-luc is good-looking', ['-']); - * // => 'Jean-luc Is Good-looking' - */ - - function titleCase(subject, noSplit) { - var subjectString = coerceToString(subject); - var noSplitArray = Array.isArray(noSplit) ? noSplit : []; - var wordsRegExp = REGEXP_EXTENDED_ASCII.test(subjectString) ? REGEXP_LATIN_WORD : REGEXP_WORD; - return subjectString.replace(wordsRegExp, function (word, index) { - var isNoSplit = index > 0 && noSplitArray.indexOf(subjectString[index - 1]) >= 0; - return isNoSplit ? word.toLowerCase() : capitalize(word, true); - }); - } - - /** - * Clip the number to interval `downLimit` to `upLimit`. - * - * @ignore - * @function clipNumber - * @param {number} value The number to clip - * @param {number} downLimit The down limit - * @param {number} upLimit The upper limit - * @return {number} The clipped number - */ - function clipNumber(value, downLimit, upLimit) { - if (value <= downLimit) { - return downLimit; - } - - if (value >= upLimit) { - return upLimit; - } - - return value; - } - - /** - * Max save integer value - * - * @ignore - * @type {number} - */ - var MAX_SAFE_INTEGER = 0x1fffffffffffff; - - /** - * Transforms `value` to an integer. - * - * @ignore - * @function toInteger - * @param {number} value The number to transform. - * @returns {number} Returns the transformed integer. - */ - - function toInteger(value) { - if (value === Infinity) { - return MAX_SAFE_INTEGER; - } - - if (value === -Infinity) { - return -MAX_SAFE_INTEGER; - } - - return ~~value; - } - - /** - * Truncates `subject` to a new `length`. - * - * @function truncate - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to truncate. - * @param {int} length The length to truncate the string. - * @param {string} [end='...'] The string to be added at the end. - * @return {string} Returns the truncated string. - * @example - * v.truncate('Once upon a time', 7); - * // => 'Once...' - * - * v.truncate('Good day, Little Red Riding Hood', 14, ' (...)'); - * // => 'Good day (...)' - * - * v.truncate('Once upon', 10); - * // => 'Once upon' - */ - - function truncate(subject, length, end) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? subjectString.length : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - var endString = coerceToString(end, '...'); - - if (lengthInt >= subjectString.length) { - return subjectString; - } - - return subjectString.substr(0, length - endString.length) + endString; - } - - /** - * Access a character from `subject` at specified `position`. - * - * @function charAt - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {numbers} position The position to get the character. - * @return {string} Returns the character at specified position. - * @example - * v.charAt('helicopter', 0); - * // => 'h' - * - * v.charAt('helicopter', 1); - * // => 'e' - */ - - function charAt(subject, position) { - var subjectString = coerceToString(subject); - return subjectString.charAt(position); - } - - var HIGH_SURROGATE_START = 0xd800; - var HIGH_SURROGATE_END = 0xdbff; - var LOW_SURROGATE_START = 0xdc00; - var LOW_SURROGATE_END = 0xdfff; - /** - * Checks if `codePoint` is a high-surrogate number from range 0xD800 to 0xDBFF. - * - * @ignore - * @param {number} codePoint The code point number to be verified - * @return {boolean} Returns a boolean whether `codePoint` is a high-surrogate number. - */ - - function isHighSurrogate(codePoint) { - return codePoint >= HIGH_SURROGATE_START && codePoint <= HIGH_SURROGATE_END; - } - /** - * Checks if `codePoint` is a low-surrogate number from range 0xDC00 to 0xDFFF. - * - * @ignore - * @param {number} codePoint The code point number to be verified - * @return {boolean} Returns a boolean whether `codePoint` is a low-surrogate number. - */ - - function isLowSurrogate(codePoint) { - return codePoint >= LOW_SURROGATE_START && codePoint <= LOW_SURROGATE_END; - } - /** - * Get the astral code point number based on surrogate pair numbers. - * - * @ignore - * @param {number} highSurrogate The high-surrogate code point number. - * @param {number} lowSurrogate The low-surrogate code point number. - * @return {number} Returns the astral symbol number. - */ - - function getAstralNumberFromSurrogatePair(highSurrogate, lowSurrogate) { - return (highSurrogate - HIGH_SURROGATE_START) * 0x400 + lowSurrogate - LOW_SURROGATE_START + 0x10000; - } - - /** - * Get the number representation of the `value`. - * Converts the `value` to number. - * If `value` is `null` or `undefined`, return `defaultValue`. - * - * @ignore - * @function toString - * @param {*} value The value to convert. - * @param {*} [defaultValue=''] The default value to return. - * @return {number|null} Returns the number representation of `value`. Returns `defaultValue` if `value` is - * `null` or `undefined`. - */ - - function coerceToNumber(value) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - if (isNil(value)) { - return defaultValue; - } - - if (typeof value === 'number') { - return value; - } - - return Number(value); - } - - /** - * If `value` is `NaN`, return `defaultValue`. In other case returns `value`. - * - * @ignore - * @function nanDefault - * @param {*} value The value to verify. - * @param {*} defaultValue The default value. - * @return {*} Returns `defaultValue` if `value` is `NaN`, otherwise `defaultValue`. - */ - function nanDefault(value, defaultValue) { - return value !== value ? defaultValue : value; - } - - /** - * Get the Unicode code point value of the character at `position`.
- * If a valid UTF-16 - * surrogate pair starts at `position`, the - * astral code point - * value at `position` is returned. - * - * @function codePointAt - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {number} position The position to get the code point number. - * @return {number} Returns a non-negative number less than or equal to `0x10FFFF`. - * @example - * v.codePointAt('rain', 1); - * // => 97, or 0x0061 - * - * v.codePointAt('\uD83D\uDE00 is smile', 0); // or '😀 is smile' - * // => 128512, or 0x1F600 - */ - - function codePointAt(subject, position) { - var subjectString = coerceToString(subject); - var subjectStringLength = subjectString.length; - var positionNumber = coerceToNumber(position); - positionNumber = nanDefault(positionNumber, 0); - - if (positionNumber < 0 || positionNumber >= subjectStringLength) { - return undefined; - } - - var firstCodePoint = subjectString.charCodeAt(positionNumber); - var secondCodePoint; - - if (isHighSurrogate(firstCodePoint) && subjectStringLength > positionNumber + 1) { - secondCodePoint = subjectString.charCodeAt(positionNumber + 1); - - if (isLowSurrogate(secondCodePoint)) { - return getAstralNumberFromSurrogatePair(firstCodePoint, secondCodePoint); - } - } - - return firstCodePoint; - } - - /** - * Extracts the first `length` characters from `subject`. - * - * @function first - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {int} [length=1] The number of characters to extract. - * @return {string} Returns the first characters string. - * @example - * v.first('helicopter'); - * // => 'h' - * - * v.first('vehicle', 2); - * // => 've' - * - * v.first('car', 5); - * // => 'car' - */ - - function first(subject, length) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? 1 : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - - if (subjectString.length <= lengthInt) { - return subjectString; - } - - return subjectString.substr(0, lengthInt); - } - - /** - * Get a grapheme from `subject` at specified `position` taking care of - * surrogate pairs and - * combining marks. - * - * @function graphemeAt - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {number} position The position to get the grapheme. - * @return {string} Returns the grapheme at specified position. - * @example - * v.graphemeAt('\uD835\uDC00\uD835\uDC01', 0); // or '𝐀𝐁' - * // => 'A' - * - * v.graphemeAt('cafe\u0301', 3); // or 'café' - * // => 'é' - */ - - function graphemeAt(subject, position) { - var subjectString = coerceToString(subject); - var positionNumber = coerceToNumber(position); - var graphemeMatch; - var graphemeMatchIndex = 0; - positionNumber = nanDefault(positionNumber, 0); - - while ((graphemeMatch = REGEXP_UNICODE_CHARACTER.exec(subjectString)) !== null) { - if (graphemeMatchIndex === positionNumber) { - REGEXP_UNICODE_CHARACTER.lastIndex = 0; - return graphemeMatch[0]; - } - - graphemeMatchIndex++; - } - - return ''; - } - - /** - * Extracts the last `length` characters from `subject`. - * - * @function last - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {int} [length=1] The number of characters to extract. - * @return {string} Returns the last characters string. - * @example - * v.last('helicopter'); - * // => 'r' - * - * v.last('vehicle', 2); - * // => 'le' - * - * v.last('car', 5); - * // => 'car' - */ - - function last(subject, length) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? 1 : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - - if (subjectString.length <= lengthInt) { - return subjectString; - } - - return subjectString.substr(subjectString.length - lengthInt, lengthInt); - } - - /** - * Truncates `subject` to a new `length` and does not break the words. Guarantees that the truncated string is no longer - * than `length`. - * - * @static - * @function prune - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to prune. - * @param {int} length The length to prune the string. - * @param {string} [end='...'] The string to be added at the end. - * @return {string} Returns the pruned string. - * @example - * v.prune('Once upon a time', 7); - * // => 'Once...' - * - * v.prune('Good day, Little Red Riding Hood', 16, ' (more)'); - * // => 'Good day (more)' - * - * v.prune('Once upon', 10); - * // => 'Once upon' - */ - - function prune(subject, length, end) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? subjectString.length : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - var endString = coerceToString(end, '...'); - - if (lengthInt >= subjectString.length) { - return subjectString; - } - - var pattern = REGEXP_EXTENDED_ASCII.test(subjectString) ? REGEXP_LATIN_WORD : REGEXP_WORD; - var truncatedLength = 0; - subjectString.replace(pattern, function (word, offset) { - var wordInsertLength = offset + word.length; - - if (wordInsertLength <= lengthInt - endString.length) { - truncatedLength = wordInsertLength; - } - }); - return subjectString.substr(0, truncatedLength) + endString; - } - - /** - * Extracts from `subject` a string from `start` position up to `end` position. The character at `end` position is not - * included. - * - * @function slice - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {number} start The position to start extraction. If negative use `subject.length + start`. - * @param {number} [end=subject.length] The position to end extraction. If negative use `subject.length + end`. - * @return {string} Returns the extracted string. - * @note Uses native `String.prototype.slice()` - * @example - * v.slice('miami', 1); - * // => 'iami' - * - * v.slice('florida', -4); - * // => 'rida' - * - * v.slice('florida', 1, 4); - * // => "lor" - */ - - function slice(subject, start, end) { - return coerceToString(subject).slice(start, end); - } - - /** - * Extracts from `subject` a string from `start` position a number of `length` characters. - * - * @function substr - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {number} start The position to start extraction. - * @param {number} [length=subject.endOfString] The number of characters to extract. If omitted, extract to the end of `subject`. - * @return {string} Returns the extracted string. - * @note Uses native `String.prototype.substr()` - * @example - * v.substr('infinite loop', 9); - * // => 'loop' - * - * v.substr('dreams', 2, 2); - * // => 'ea' - */ - - function substr(subject, start, length) { - return coerceToString(subject).substr(start, length); - } - - /** - * Extracts from `subject` a string from `start` position up to `end` position. The character at `end` position is not - * included. - * - * @function substring - * @static - * @since 1.0.0 - * @memberOf Chop - * @param {string} [subject=''] The string to extract from. - * @param {number} start The position to start extraction. - * @param {number} [end=subject.length] The position to end extraction. - * @return {string} Returns the extracted string. - * @note Uses native `String.prototype.substring()` - * @example - * v.substring('beach', 1); - * // => 'each' - * - * v.substring('ocean', 1, 3); - * // => 'ea' - */ - - function substring(subject, start, end) { - return coerceToString(subject).substring(start, end); - } - - /** - * Counts the characters in `subject`.
- * - * @function count - * @static - * @since 1.0.0 - * @memberOf Count - * @param {string} [subject=''] The string to count characters. - * @return {number} Returns the number of characters in `subject`. - * @example - * v.count('rain'); - * // => 4 - */ - - function count(subject) { - return coerceToString(subject).length; - } - - /** - * Counts the graphemes in `subject` taking care of - * surrogate pairs and - * combining marks. - * - * @function countGraphemes - * @static - * @since 1.0.0 - * @memberOf Count - * @param {string} [subject=''] The string to count graphemes. - * @return {number} Returns the number of graphemes in `subject`. - * @example - * v.countGraphemes('cafe\u0301'); // or 'café' - * // => 4 - * - * v.countGraphemes('\uD835\uDC00\uD835\uDC01'); // or '𝐀𝐁' - * // => 2 - * - * v.countGraphemes('rain'); - * // => 4 - */ - - function countGrapheme(subject) { - return coerceToString(subject).replace(REGEXP_COMBINING_MARKS, '*').replace(REGEXP_SURROGATE_PAIRS, '*').length; - } - - /** - * Counts the number of `substring` appearances in `subject`. - * - * @function countSubstrings - * @static - * @since 1.0.0 - * @memberOf Count - * @param {string} [subject=''] The string where to count. - * @param {string} substring The substring to be counted. - * @return {number} Returns the number of `substring` appearances. - * @example - * v.countSubstrings('bad boys, bad boys whatcha gonna do?', 'boys'); - * // => 2 - * - * v.countSubstrings('every dog has its day', 'cat'); - * // => 0 - */ - - function countSubstrings(subject, substring) { - var subjectString = coerceToString(subject); - var substringString = coerceToString(substring); - var substringLength = substringString.length; - var count = 0; - var matchIndex = 0; - - if (subjectString === '' || substringString === '') { - return count; - } - - do { - matchIndex = subjectString.indexOf(substringString, matchIndex); - - if (matchIndex !== -1) { - count++; - matchIndex += substringLength; - } - } while (matchIndex !== -1); - - return count; - } - - var reduce = Array.prototype.reduce; - /** - * Counts the characters in `subject` for which `predicate` returns truthy. - * - * @function countWhere - * @static - * @since 1.0.0 - * @memberOf Count - * @param {string} [subject=''] The string to count characters. - * @param {Function} predicate The predicate function invoked on each character with parameters `(character, index, string)`. - * @param {Object} [context] The context to invoke the `predicate`. - * @return {number} Returns the number of characters for which `predicate` returns truthy. - * @example - * v.countWhere('hola!', v.isAlpha); - * // => 4 - * - * v.countWhere('2022', function(character, index, str) { - * return character === '2'; - * }); - * // => 3 - */ - - function countWhere(subject, predicate, context) { - var subjectString = coerceToString(subject); - - if (subjectString === '' || typeof predicate !== 'function') { - return 0; - } - - var predicateWithContext = predicate.bind(context); - return reduce.call(subjectString, function (countTruthy, character, index) { - return predicateWithContext(character, index, subjectString) ? countTruthy + 1 : countTruthy; - }, 0); - } - - /** - * Counts the number of words in `subject`. - * - * @function countWords - * @static - * @since 1.0.0 - * @memberOf Count - * @param {string} [subject=''] The string to split into words. - * @param {string|RegExp} [pattern] The pattern to watch words. If `pattern` is not RegExp, it is transformed to `new RegExp(pattern, flags)`. - * @param {string} [flags=''] The regular expression flags. Applies when `pattern` is string type. - * @return {number} Returns the number of words. - * @example - * v.countWords('gravity can cross dimensions'); - * // => 4 - * - * v.countWords('GravityCanCrossDimensions'); - * // => 4 - * - * v.countWords('Gravity - can cross dimensions!'); - * // => 4 - * - * v.words('Earth gravity', /[^\s]+/g); - * // => 2 - */ - - function countWords(subject, pattern, flags) { - return words(subject, pattern, flags).length; - } - - /** - * The current index. - * - * @ignore - * @name ReplacementIndex#index - * @type {number} - * @return {ReplacementIndex} ReplacementIndex instance. - */ - - function ReplacementIndex() { - this.index = 0; - } - /** - * Increment the current index. - * - * @ignore - * @return {undefined} - */ - - - ReplacementIndex.prototype.increment = function () { - this.index++; - }; - /** - * Increment the current index by position. - * - * @ignore - * @param {number} [position] The replacement position. - * @return {undefined} - */ - - - ReplacementIndex.prototype.incrementOnEmptyPosition = function (position) { - if (isNil(position)) { - this.increment(); - } - }; - /** - * Get the replacement index by position. - * - * @ignore - * @param {number} [position] The replacement position. - * @return {number} The replacement index. - */ - - - ReplacementIndex.prototype.getIndexByPosition = function (position) { - return isNil(position) ? this.index : position - 1; - }; - - // Type specifiers - var TYPE_INTEGER = 'i'; - var TYPE_INTEGER_BINARY = 'b'; - var TYPE_INTEGER_ASCII_CHARACTER = 'c'; - var TYPE_INTEGER_DECIMAL = 'd'; - var TYPE_INTEGER_OCTAL = 'o'; - var TYPE_INTEGER_UNSIGNED_DECIMAL = 'u'; - var TYPE_INTEGER_HEXADECIMAL = 'x'; - var TYPE_INTEGER_HEXADECIMAL_UPPERCASE = 'X'; - var TYPE_FLOAT_SCIENTIFIC = 'e'; - var TYPE_FLOAT_SCIENTIFIC_UPPERCASE = 'E'; - var TYPE_FLOAT = 'f'; - var TYPE_FLOAT_SHORT = 'g'; - var TYPE_FLOAT_SHORT_UPPERCASE = 'G'; - var TYPE_STRING = 's'; // Simple literals - var LITERAL_SINGLE_QUOTE = "'"; - var LITERAL_PLUS = '+'; - var LITERAL_MINUS = '-'; - var LITERAL_PERCENT_SPECIFIER = '%%'; // Radix constants to format numbers - - var RADIX_BINARY = 2; - var RADIX_OCTAL = 8; - var RADIX_HEXADECIMAL = 16; - - /** - * Repeats the `subject` number of `times`. - * - * @function repeat - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to repeat. - * @param {number} [times=1] The number of times to repeat. - * @return {string} Returns the repeated string. - * @example - * v.repeat('w', 3); - * // => 'www' - * - * v.repeat('world', 0); - * // => '' - */ - - function repeat(subject, times) { - var subjectString = coerceToString(subject); - var timesInt = isNil(times) ? 1 : clipNumber(toInteger(times), 0, MAX_SAFE_INTEGER); - var repeatString = ''; - - while (timesInt) { - if (timesInt & 1) { - repeatString += subjectString; - } - - if (timesInt > 1) { - subjectString += subjectString; - } - - timesInt >>= 1; - } - - return repeatString; - } - - /** - * Creates the padding string. - * - * @ignore - * @param {string} padCharacters The characters to create padding string. - * @param {number} length The padding string length. - * @return {string} The padding string. - */ - - function buildPadding(padCharacters, length) { - var padStringRepeat = toInteger(length / padCharacters.length); - var padStringRest = length % padCharacters.length; - return repeat(padCharacters, padStringRepeat + padStringRest).substr(0, length); - } - - /** - * Pads `subject` from left to a new `length`. - * - * @function padLeft - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to pad. - * @param {int} [length=0] The length to left pad the string. No changes are made if `length` is less than `subject.length`. - * @param {string} [pad=' '] The string to be used for padding. - * @return {string} Returns the left padded string. - * @example - * v.padLeft('dog', 5); - * // => ' dog' - * - * v.padLeft('bird', 6, '-'); - * // => '--bird' - * - * v.padLeft('cat', 6, '-='); - * // => '-=-cat' - */ - - function padLeft(subject, length, pad) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? 0 : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - var padString = coerceToString(pad, ' '); - - if (lengthInt <= subjectString.length) { - return subjectString; - } - - return buildPadding(padString, lengthInt - subjectString.length) + subjectString; - } - - /** - * Pads `subject` from right to a new `length`. - * - * @function padRight - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to pad. - * @param {int} [length=0] The length to right pad the string. No changes are made if `length` is less than `subject.length`. - * @param {string} [pad=' '] The string to be used for padding. - * @return {string} Returns the right padded string. - * @example - * v.padRight('dog', 5); - * // => 'dog ' - * - * v.padRight('bird', 6, '-'); - * // => 'bird--' - * - * v.padRight('cat', 6, '-='); - * // => 'cat-=-' - */ - - function padRight(subject, length, pad) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? 0 : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - var padString = coerceToString(pad, ' '); - - if (lengthInt <= subjectString.length) { - return subjectString; - } - - return subjectString + buildPadding(padString, lengthInt - subjectString.length); - } - - /** - * Aligns and pads `subject` string. - * - * @ignore - * @param {string} subject The subject string. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the aligned and padded string. - */ - - function alignAndPad(subject, conversion) { - var width = conversion.width; - - if (isNil(width) || subject.length >= width) { - return subject; - } - - var padType = conversion.alignmentSpecifier === LITERAL_MINUS ? padRight : padLeft; - return padType(subject, width, conversion.getPaddingCharacter()); - } - - /** - * Add sign to the formatted number. - * - * @ignore - * @name addSignToFormattedNumber - * @param {number} replacementNumber The number to be replaced. - * @param {string} formattedReplacement The formatted version of number. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted number string with a sign. - */ - - function addSignToFormattedNumber(replacementNumber, formattedReplacement, conversion) { - if (conversion.signSpecifier === LITERAL_PLUS && replacementNumber >= 0) { - formattedReplacement = LITERAL_PLUS + formattedReplacement; - } - - return formattedReplacement; - } - - /** - * Formats a float type according to specifiers. - * - * @ignore - * @param {string} replacement The string to be formatted. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted string. - */ - - function float(replacement, conversion) { - var replacementNumber = parseFloat(replacement); - var formattedReplacement; - - if (isNaN(replacementNumber)) { - replacementNumber = 0; - } - - var precision = coerceToNumber(conversion.precision, 6); - - switch (conversion.typeSpecifier) { - case TYPE_FLOAT: - formattedReplacement = replacementNumber.toFixed(precision); - break; - - case TYPE_FLOAT_SCIENTIFIC: - formattedReplacement = replacementNumber.toExponential(precision); - break; - - case TYPE_FLOAT_SCIENTIFIC_UPPERCASE: - formattedReplacement = replacementNumber.toExponential(precision).toUpperCase(); - break; - - case TYPE_FLOAT_SHORT: - case TYPE_FLOAT_SHORT_UPPERCASE: - formattedReplacement = formatFloatAsShort(replacementNumber, precision, conversion); - break; - } - - formattedReplacement = addSignToFormattedNumber(replacementNumber, formattedReplacement, conversion); - return coerceToString(formattedReplacement); - } - /** - * Formats the short float. - * - * @ignore - * @param {number} replacementNumber The number to format. - * @param {number} precision The precision to format the float. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted short float. - */ - - function formatFloatAsShort(replacementNumber, precision, conversion) { - if (replacementNumber === 0) { - return '0'; - } - - var nonZeroPrecision = precision === 0 ? 1 : precision; - var formattedReplacement = replacementNumber.toPrecision(nonZeroPrecision).replace(REGEXP_TRAILING_ZEROS, ''); - - if (conversion.typeSpecifier === TYPE_FLOAT_SHORT_UPPERCASE) { - formattedReplacement = formattedReplacement.toUpperCase(); - } - - return formattedReplacement; - } - - /** - * Formats an integer type according to specifiers. - * - * @ignore - * @param {string} replacement The string to be formatted. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted string. - */ - - function integerBase(replacement, conversion) { - var integer = parseInt(replacement); - - if (isNaN(integer)) { - integer = 0; - } - - integer = integer >>> 0; - - switch (conversion.typeSpecifier) { - case TYPE_INTEGER_ASCII_CHARACTER: - integer = String.fromCharCode(integer); - break; - - case TYPE_INTEGER_BINARY: - integer = integer.toString(RADIX_BINARY); - break; - - case TYPE_INTEGER_OCTAL: - integer = integer.toString(RADIX_OCTAL); - break; - - case TYPE_INTEGER_HEXADECIMAL: - integer = integer.toString(RADIX_HEXADECIMAL); - break; - - case TYPE_INTEGER_HEXADECIMAL_UPPERCASE: - integer = integer.toString(RADIX_HEXADECIMAL).toUpperCase(); - break; - } - - return coerceToString(integer); - } - - /** - * Formats a decimal integer type according to specifiers. - * - * @ignore - * @param {string} replacement The string to be formatted. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted string. - */ - - function integerDecimal(replacement, conversion) { - var integer = parseInt(replacement); - - if (isNaN(integer)) { - integer = 0; - } - - return addSignToFormattedNumber(integer, toString(integer), conversion); - } - - /** - * Formats a string type according to specifiers. - * - * @ignore - * @param {string} replacement The string to be formatted. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the formatted string. - */ - - function stringFormat(replacement, conversion) { - var formattedReplacement = replacement; - var precision = conversion.precision; - - if (!isNil(precision) && formattedReplacement.length > precision) { - formattedReplacement = truncate(formattedReplacement, precision, ''); - } - - return formattedReplacement; - } - - /** - * Returns the computed string based on format specifiers. - * - * @ignore - * @name computeReplacement - * @param {string} replacement The replacement value. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {string} Returns the computed string. - */ - - function compute(replacement, conversion) { - var formatFunction; - - switch (conversion.typeSpecifier) { - case TYPE_STRING: - formatFunction = stringFormat; - break; - - case TYPE_INTEGER_DECIMAL: - case TYPE_INTEGER: - formatFunction = integerDecimal; - break; - - case TYPE_INTEGER_ASCII_CHARACTER: - case TYPE_INTEGER_BINARY: - case TYPE_INTEGER_OCTAL: - case TYPE_INTEGER_HEXADECIMAL: - case TYPE_INTEGER_HEXADECIMAL_UPPERCASE: - case TYPE_INTEGER_UNSIGNED_DECIMAL: - formatFunction = integerBase; - break; - - case TYPE_FLOAT: - case TYPE_FLOAT_SCIENTIFIC: - case TYPE_FLOAT_SCIENTIFIC_UPPERCASE: - case TYPE_FLOAT_SHORT: - case TYPE_FLOAT_SHORT_UPPERCASE: - formatFunction = float; - break; - } - - var formattedString = formatFunction(replacement, conversion); - return alignAndPad(formattedString, conversion); - } - - /** - * Construct the new conversion specification object. - * - * @ignore - * @param {Object} properties An object with properties to initialize. - * @return {ConversionSpecification} ConversionSpecification instance. - */ - - function ConversionSpecification(properties) { - /** - * The percent characters from conversion specification. - * - * @ignore - * @name ConversionSpecification#percent - * @type {string} - */ - this.percent = properties.percent; - /** - * The sign specifier to force a sign to be used on a number. - * - * @ignore - * @name ConversionSpecification#signSpecifier - * @type {string} - */ - - this.signSpecifier = properties.signSpecifier; - /** - * The padding specifier that says what padding character will be used. - * - * @ignore - * @name ConversionSpecification#paddingSpecifier - * @type {string} - */ - - this.paddingSpecifier = properties.paddingSpecifier; - /** - * The alignment specifier that says if the result should be left-justified or right-justified. - * - * @ignore - * @name ConversionSpecification#alignmentSpecifier - * @type {string} - */ - - this.alignmentSpecifier = properties.alignmentSpecifier; - /** - * The width specifier how many characters this conversion should result in. - * - * @ignore - * @name ConversionSpecification#width - * @type {number} - */ - - this.width = properties.width; - /** - * The precision specifier says how many decimal digits should be displayed for floating-point numbers. - * - * @ignore - * @name ConversionSpecification#precision - * @type {number} - */ - - this.precision = properties.precision; - /** - * The type specifier says what type the argument data should be treated as. - * - * @ignore - * @name ConversionSpecification#typeSpecifier - * @type {string} - */ - - this.typeSpecifier = properties.typeSpecifier; - } - /** - * Check if the conversion specification is a percent literal "%%". - * - * @ignore - * @return {boolean} Returns true if the conversion is a percent literal, false otherwise. - */ - - - ConversionSpecification.prototype.isPercentLiteral = function () { - return LITERAL_PERCENT_SPECIFIER === this.percent; - }; - /** - * Get the padding character from padding specifier. - * - * @ignore - * @returns {string} Returns the padding character. - */ - - - ConversionSpecification.prototype.getPaddingCharacter = function () { - var paddingCharacter = nilDefault(this.paddingSpecifier, ' '); - - if (paddingCharacter.length === 2 && paddingCharacter[0] === LITERAL_SINGLE_QUOTE) { - paddingCharacter = paddingCharacter[1]; - } - - return paddingCharacter; - }; - - /** - * Validates the specifier type and replacement position. - * - * @ignore - * @throws {Error} Throws an exception on insufficient arguments or unknown specifier. - * @param {number} index The index of the matched specifier. - * @param {number} replacementsLength The number of replacements. - * @param {ConversionSpecification} conversion The conversion specification object. - * @return {undefined} - */ - - function validate(index, replacementsLength, conversion) { - if (isNil(conversion.typeSpecifier)) { - throw new Error('sprintf(): Unknown type specifier'); - } - - if (index > replacementsLength - 1) { - throw new Error('sprintf(): Too few arguments'); - } - - if (index < 0) { - throw new Error('sprintf(): Argument number must be greater than zero'); - } - } - - /** - * Return the replacement for regular expression match of the conversion specification. - * - * @ignore - * @name matchReplacement - * @param {ReplacementIndex} replacementIndex The replacement index object. - * @param {string[]} replacements The array of replacements. - * @param {string} conversionSpecification The conversion specification. - * @param {string} percent The percent characters from conversion specification. - * @param {string} position The position to insert the replacement. - * @param {string} signSpecifier The sign specifier to force a sign to be used on a number. - * @param {string} paddingSpecifier The padding specifier that says what padding character will be used. - * @param {string} alignmentSpecifier The alignment specifier that says if the result should be left-justified or right-justified. - * @param {string} widthSpecifier The width specifier how many characters this conversion should result in. - * @param {string} precisionSpecifier The precision specifier says how many decimal digits should be displayed for floating-point numbers. - * @param {string} typeSpecifier The type specifier says what type the argument data should be treated as. - * @return {string} Returns the computed replacement. - */ - - function match(replacementIndex, replacements, conversionSpecification, percent, position, signSpecifier, paddingSpecifier, alignmentSpecifier, widthSpecifier, precisionSpecifier, typeSpecifier) { - var conversion = new ConversionSpecification({ - percent: percent, - signSpecifier: signSpecifier, - paddingSpecifier: paddingSpecifier, - alignmentSpecifier: alignmentSpecifier, - width: coerceToNumber(widthSpecifier, null), - precision: coerceToNumber(precisionSpecifier, null), - typeSpecifier: typeSpecifier - }); - - if (conversion.isPercentLiteral()) { - return conversionSpecification.slice(1); - } - - var actualReplacementIndex = replacementIndex.getIndexByPosition(position); - replacementIndex.incrementOnEmptyPosition(position); - validate(actualReplacementIndex, replacements.length, conversion); - return compute(replacements[actualReplacementIndex], conversion); - } - - /** - * Produces a string according to `format`. - * - *
- * `format` string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged - * to the output string and conversion specifications, each of which results in fetching zero or more subsequent - * arguments.

- * - * Each conversion specification is introduced by the character %, and ends with a conversion - * specifier. In between there may be (in this order) zero or more flags, an optional minimum field width - * and an optional precision.
- * The syntax is: ConversionSpecification = "%" { Flags } - * [ MinimumFieldWidth ] [ Precision ] ConversionSpecifier, where curly braces { } denote repetition - * and square brackets [ ] optionality.

- * - * By default, the arguments are used in the given order.
- * For argument numbering and swapping, `%m$` (where `m` is a number indicating the argument order) - * is used instead of `%` to specify explicitly which argument is taken. For instance `%1$s` fetches the 1st argument, - * `%2$s` the 2nd and so on, no matter what position the conversion specification has in `format`. - *

- * - * The flags
- * The character % is followed by zero or more of the following flags:
- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
+ - * A sign (+ or -) should always be placed before a number produced by a - * signed conversion. By default a sign is used only for negative numbers. - *
0The value should be zero padded.
(a space) The value should be space padded.
'Indicates alternate padding character, specified by prefixing it with a single quote '.
-The converted value is to be left adjusted on the field boundary (the default is right justification).
- * - * The minimum field width
- * An optional decimal digit string (with nonzero first digit) specifying a minimum field width. If the converted - * value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the - * left-adjustment flag has been given).

- * - * The precision
- * An optional precision, in the form of a period `.` followed by an optional decimal digit string.
- * This gives the number of digits to appear after the radix character for `e`, `E`, `f` and `F` conversions, the - * maximum number of significant digits for `g` and `G` conversions or the maximum number of characters to be printed - * from a string for `s` conversion.

- * - * The conversion specifier
- * A specifier that mentions what type the argument should be treated as: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
`s`The string argument is treated as and presented as a string.
`d` `i`The integer argument is converted to signed decimal notation.
`b`The unsigned integer argument is converted to unsigned binary.
`c`The unsigned integer argument is converted to an ASCII character with that number.
`o`The unsigned integer argument is converted to unsigned octal.
`u`The unsigned integer argument is converted to unsigned decimal.
`x` `X`The unsigned integer argument is converted to unsigned hexadecimal. The letters `abcdef` are used for `x` - * conversions; the letters `ABCDEF` are used for `X` conversions.
`f` - * The float argument is rounded and converted to decimal notation in the style `[-]ddd.ddd`, where the number of - * digits after the decimal-point character is equal to the precision specification. If the precision is missing, - * it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. - * If a decimal point appears, at least one digit appears before it. - *
`e` `E` - * The float argument is rounded and converted in the style `[-]d.ddde±dd`, where there is one digit - * before the decimal-point character and the number of digits after it is equal to the precision. If - * the precision is missing, it is taken as `6`; if the precision is zero, no decimal-point character - * appears. An `E` conversion uses the letter `E` (rather than `e`) to introduce the exponent. - *
`g` `G` - * The float argument is converted in style `f` or `e` (or `F` or `E` for `G` conversions). The precision specifies - * the number of significant digits. If the precision is missing, `6` digits are given; if the - * precision is zero, it is treated as `1`. Style `e` is used if the exponent from its conversion is less - * than `-6` or greater than or equal to the precision. Trailing zeros are removed from the fractional - * part of the result; a decimal point appears only if it is followed by at least one digit. - *
`%`A literal `%` is written. No argument is converted. The complete conversion specification is `%%`.
- *
- * - * @function sprintf - * @static - * @since 1.0.0 - * @memberOf Format - * @param {string} [format=''] The format string. - * @param {...*} replacements The replacements to produce the string. - * @return {string} Returns the produced string. - * @example - * v.sprintf('%s, %s!', 'Hello', 'World'); - * // => 'Hello World!' - * - * v.sprintf('%s costs $%d', 'coffee', 2); - * // => 'coffee costs $2' - * - * v.sprintf('%1$s %2$s %1$s %2$s, watcha gonna %3$s', 'bad', 'boys', 'do') - * // => 'bad boys bad boys, watcha gonna do' - * - * v.sprintf('% 6s', 'bird'); - * // => ' bird' - * - * v.sprintf('% -6s', 'crab'); - * // => 'crab ' - * - * v.sprintf("%'*5s", 'cat'); - * // => '**cat' - * - * v.sprintf("%'*-6s", 'duck'); - * // => 'duck**' - * - * v.sprintf('%d %i %+d', 15, -2, 25); - * // => '15 -2 +25' - * - * v.sprintf("%06d", 15); - * // => '000015' - * - * v.sprintf('0b%b 0o%o 0x%X', 12, 9, 155); - * // => '0b1100 0o11 0x9B' - * - * v.sprintf('%.2f', 10.469); - * // => '10.47' - * - * v.sprintf('%.2e %g', 100.5, 0.455); - * // => '1.01e+2 0.455' - * - */ - - function sprintf(format) { - var formatString = coerceToString(format); - - if (formatString === '') { - return formatString; - } - - for (var _len = arguments.length, replacements = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - replacements[_key - 1] = arguments[_key]; - } - - var boundReplacementMatch = match.bind(undefined, new ReplacementIndex(), replacements); - return formatString.replace(REGEXP_CONVERSION_SPECIFICATION, boundReplacementMatch); - } - - /** - * Produces a string according to `format`. Works exactly like sprintf(), - * with the only difference that accepts the formatting arguments in an array `values`.
- * See here `format` string specifications. - * - * @function vprintf - * @static - * @since 1.0.0 - * @memberOf Format - * @param {string} format=''] The format string. - * @param {Array} replacements The array of replacements to produce the string. - * @return {string} Returns the produced string. - * @example - * v.vprintf('%s', ['Welcome']) - * // => 'Welcome' - * - * v.vprintf('%s has %d apples', ['Alexandra', 3]); - * // => 'Alexandra has 3 apples' - */ - - function vprintf(format, replacements) { - return sprintf.apply(void 0, [format].concat(_toConsumableArray(nilDefault(replacements, [])))); - } - - var escapeCharactersMap = { - '<': '<', - '>': '>', - '&': '&', - '"': '"', - "'": ''', - '`': '`' - }; - /** - * Return the escaped version of `character`. - * - * @ignore - * @param {string} character The character to be escape. - * @return {string} The escaped version of character. - */ - - function replaceSpecialCharacter(character) { - return escapeCharactersMap[character]; - } - /** - * Escapes HTML special characters < > & ' " ` in subject. - * - * @function escapeHtml - * @static - * @since 1.0.0 - * @memberOf Escape - * @param {string} [subject=''] The string to escape. - * @return {string} Returns the escaped string. - * @example - * v.escapeHtml('

wonderful world

'); - * // => '<p>wonderful world</p>' - */ - - - function escapeHtml(subject) { - return coerceToString(subject).replace(REGEXP_HTML_SPECIAL_CHARACTERS, replaceSpecialCharacter); - } - - /** - * Escapes the regular expression special characters `- [ ] / { } ( ) * + ? . \ ^ $ |` in `subject`. - * - * @function escapeRegExp - * @static - * @since 1.0.0 - * @memberOf Escape - * @param {string} [subject=''] The string to escape. - * @return {string} Returns the escaped string. - * @example - * v.escapeRegExp('(hours)[minutes]{seconds}'); - * // => '\(hours\)\[minutes\]\{seconds\}' - */ - - function escapeRegExp(subject) { - return coerceToString(subject).replace(REGEXP_SPECIAL_CHARACTERS, '\\$&'); - } - - var unescapeCharactersMap = { - '<': /(<)|(�*3c;)|(�*60;)/gi, - '>': /(>)|(�*3e;)|(�*62;)/gi, - '&': /(&)|(�*26;)|(�*38;)/gi, - '"': /(")|(�*22;)|(�*34;)/gi, - "'": /(�*27;)|(�*39;)/gi, - '`': /(�*60;)|(�*96;)/gi - }; - var characters = Object.keys(unescapeCharactersMap); - /** - * Replaces the HTML entities with corresponding characters. - * - * @ignore - * @param {string} string The accumulator string. - * @param {string} key The character. - * @return {string} The string with replaced HTML entity - */ - - function reduceUnescapedString(string, key) { - return string.replace(unescapeCharactersMap[key], key); - } - /** - * Unescapes HTML special characters from &lt; &gt; &amp; &quot; &#x27; &#x60; - * to corresponding < > & ' " ` in subject. - * - * @function unescapeHtml - * @static - * @since 1.0.0 - * @memberOf Escape - * @param {string} [subject=''] The string to unescape. - * @return {string} Returns the unescaped string. - * @example - * v.unescapeHtml('<p>wonderful world</p>'); - * // => '

wonderful world

' - */ - - - function unescapeHtml(subject) { - var subjectString = coerceToString(subject); - return characters.reduce(reduceUnescapedString, subjectString); - } - - /** - * Returns the first occurrence index of `search` in `subject`. - * - * @function indexOf - * @static - * @since 1.0.0 - * @memberOf Index - * @param {string} [subject=''] The string where to search. - * @param {string} search The string to search. - * @param {number} [fromIndex=0] The index to start searching. - * @return {number} Returns the first occurrence index or `-1` if not found. - * @example - * v.indexOf('morning', 'n'); - * // => 3 - * - * v.indexOf('evening', 'o'); - * // => -1 - */ - - function indexOf(subject, search, fromIndex) { - var subjectString = coerceToString(subject); - return subjectString.indexOf(search, fromIndex); - } - - /** - * Returns the last occurrence index of `search` in `subject`. - * - * @function lastIndexOf - * @static - * @since 1.0.0 - * @memberOf Index - * @param {string} [subject=''] The string where to search. - * @param {string} search The string to search. - * @param {number} [fromIndex=subject.length - 1] The index to start searching backward in the string. - * @return {number} Returns the last occurrence index or `-1` if not found. - * @example - * v.lastIndexOf('morning', 'n'); - * // => 5 - * - * v.lastIndexOf('evening', 'o'); - * // => -1 - */ - - function lastIndexOf(subject, search, fromIndex) { - var subjectString = coerceToString(subject); - return subjectString.lastIndexOf(search, fromIndex); - } - - /** - * Returns the first index of a `pattern` match in `subject`. - * - * @function search - * @static - * @since 1.0.0 - * @memberOf Index - * @param {string} [subject=''] The string where to search. - * @param {string|RegExp} pattern The pattern to match. If `pattern` is not RegExp, it is transformed to `new RegExp(pattern)`. - * @param {number} [fromIndex=0] The index to start searching. - * @return {number} Returns the first match index or `-1` if not found. - * @example - * v.search('morning', /rn/); - * // => 2 - * - * v.search('evening', '/\d/'); - * // => -1 - */ - - function search(subject, pattern, fromIndex) { - var subjectString = coerceToString(subject); - var fromIndexNumber = isNil(fromIndex) ? 0 : clipNumber(toInteger(fromIndex), 0, subjectString.length); - var matchIndex = subjectString.substr(fromIndexNumber).search(pattern); - - if (matchIndex !== -1 && !isNaN(fromIndexNumber)) { - matchIndex += fromIndexNumber; - } - - return matchIndex; - } - - /** - * Inserts into `subject` a string `toInsert` at specified `position`. - * - * @function insert - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string where to insert. - * @param {string} [toInsert=''] The string to be inserted. - * @param {number} [position=0] The position to insert. - * @return {string} Returns the string after insertion. - * @example - * v.insert('ct', 'a', 1); - * // => 'cat' - * - * v.insert('sunny', ' day', 5); - * // => 'sunny day' - */ - - function insert(subject, toInsert, position) { - var subjectString = coerceToString(subject); - var toInsertString = coerceToString(toInsert); - var positionNumber = coerceToNumber(position); - - if (positionNumber < 0 || positionNumber > subjectString.length || toInsertString === '') { - return subjectString; - } - - return subjectString.slice(0, positionNumber) + toInsertString + subjectString.slice(positionNumber); - } - - /** - * Generated diacritics map. See bellow the base code. - * @ignore - * @type Object - */ - var diacritics = { - '3': '\u039e\u03be', - '8': '\u0398\u03b8', - A: '\x41\xc0\xc1\xc2\xc3\xc4\xc5\u0100\u0102\u0104\u01cd\u01de\u01e0\u01fa\u0200\u0202\u0226\u023a\u0386\u0391\u0410', - B: '\x42\u0181\u0182\u0243\u0392\u0411', - C: '\x43\xc7\u0106\u0108\u010a\u010c\u0187\u023b\u0426', - D: '\x44\u010e\u0110\u0189\u018a\u018b\xd0\u0394\u0414', - E: '\x45\xc8\xc9\xca\xcb\u0112\u0114\u0116\u0118\u011a\u018e\u0190\u0204\u0206\u0228\u0388\u0395\u0415\u042d', - F: '\x46\u0191\u03a6\u0424', - G: '\x47\u011c\u011e\u0120\u0122\u0193\u01e4\u01e6\u01f4\u0393\u0413\u0490', - H: '\x48\u0124\u0126\u021e\u0389\u0397\u0425', - I: '\x49\xcc\xcd\xce\xcf\u0128\u012a\u012c\u012e\u0130\u0197\u01cf\u0208\u020a\u038a\u0399\u03aa\u0406\u0418', - J: '\x4a\u0134\u0248\u0419', - K: '\x4b\u0136\u0198\u01e8\u039a\u041a', - L: '\x4c\u0139\u013b\u013d\u013f\u0141\u023d\u039b\u041b', - M: '\x4d\u019c\u039c\u041c', - N: '\x4e\xd1\u0143\u0145\u0147\u019d\u01f8\u0220\u039d\u041d', - O: '\x4f\xd2\xd3\xd4\xd5\xd6\xd8\u014c\u014e\u0150\u0186\u019f\u01a0\u01d1\u01ea\u01ec\u01fe\u020c\u020e\u022a\u022c\u022e\u0230\u038c\u039f\u041e', - P: '\x50\u01a4\u03a0\u041f', - Q: '\x51\u024a', - R: '\x52\u0154\u0156\u0158\u0210\u0212\u024c\u03a1\u0420', - S: '\x53\u015a\u015c\u015e\u0160\u0218\u03a3\u0421', - T: '\x54\u0162\u0164\u0166\u01ac\u01ae\u021a\u023e\u03a4\u0422', - U: '\x55\xd9\xda\xdb\xdc\u0168\u016a\u016c\u016e\u0170\u0172\u01af\u01d3\u01d5\u01d7\u01d9\u01db\u0214\u0216\u0244\u0423\u042a', - V: '\x56\u01b2\u0245\u0412', - W: '\x57\u0174\u038f\u03a9', - X: '\x58\u03a7', - Y: '\x59\xdd\u0176\u0178\u01b3\u0232\u024e\u038e\u03a5\u03ab\u042b', - Z: '\x5a\u0179\u017b\u017d\u01b5\u0224\u0396\u0417', - a: '\x61\xe0\xe1\xe2\xe3\xe4\xe5\u0101\u0103\u0105\u01ce\u01df\u01e1\u01fb\u0201\u0203\u0227\u0250\u03ac\u03b1\u0430', - b: '\x62\u0180\u0183\u0253\u03b2\u0431', - c: '\x63\xe7\u0107\u0109\u010b\u010d\u0188\u023c\u0446', - d: '\x64\u010f\u0111\u018c\u0256\u0257\xf0\u03b4\u0434', - e: '\x65\xe8\xe9\xea\xeb\u0113\u0115\u0117\u0119\u011b\u01dd\u0205\u0207\u0229\u0247\u025b\u03ad\u03b5\u0435\u044d', - f: '\x66\u0192\u03c6\u0444', - g: '\x67\u011d\u011f\u0121\u0123\u01e5\u01e7\u01f5\u0260\u03b3\u0433\u0491', - h: '\x68\u0125\u0127\u021f\u0265\u03ae\u03b7\u0445', - i: '\x69\xec\xed\xee\xef\u0129\u012b\u012d\u012f\u0131\u01d0\u0209\u020b\u0268\u0390\u03af\u03b9\u03ca\u0438\u0456', - j: '\x6a\u0135\u01f0\u0249\u0439', - k: '\x6b\u0137\u0199\u01e9\u03ba\u043a', - l: '\x6c\u013a\u013c\u013e\u0140\u0142\u017f\u019a\u026b\u03bb\u043b', - m: '\x6d\u026f\u0271\u03bc\u043c', - n: '\x6e\xf1\u0144\u0146\u0148\u0149\u019e\u01f9\u0272\u03bd\u043d', - o: '\x6f\xf2\xf3\xf4\xf5\xf6\xf8\u014d\u014f\u0151\u01a1\u01d2\u01eb\u01ed\u01ff\u020d\u020f\u022b\u022d\u022f\u0231\u0254\u0275\u03bf\u03cc\u043e', - p: '\x70\u01a5\u03c0\u043f', - q: '\x71\u024b', - r: '\x72\u0155\u0157\u0159\u0211\u0213\u024d\u027d\u03c1\u0440', - s: '\x73\xdf\u015b\u015d\u015f\u0161\u0219\u023f\u03c2\u03c3\u0441', - t: '\x74\u0163\u0165\u0167\u01ad\u021b\u0288\u03c4\u0442', - u: '\x75\xf9\xfa\xfb\xfc\u0169\u016b\u016d\u016f\u0171\u0173\u01b0\u01d4\u01d6\u01d8\u01da\u01dc\u0215\u0217\u0289\u0443\u044a', - v: '\x76\u028b\u028c\u0432', - w: '\x77\u0175\u03c9\u03ce', - x: '\x78\u03c7', - y: '\x79\xfd\xff\u0177\u01b4\u0233\u024f\u03b0\u03c5\u03cb\u03cd\u044b', - z: '\x7a\u017a\u017c\u017e\u01b6\u0225\u0240\u03b6\u0437', - OE: '\x8c\u0152', - oe: '\x9c\u0153', - AE: '\xc6\u01e2\u01fc', - ae: '\xe6\u01e3\u01fd', - hv: '\u0195', - OI: '\u01a2', - oi: '\u01a3', - DZ: '\u01c4\u01f1', - Dz: '\u01c5\u01f2', - dz: '\u01c6\u01f3', - LJ: '\u01c7', - Lj: '\u01c8', - lj: '\u01c9', - NJ: '\u01ca', - Nj: '\u01cb', - nj: '\u01cc', - OU: '\u0222', - ou: '\u0223', - TH: '\xde', - th: '\xfe', - PS: '\u03a8', - ps: '\u03c8', - Yo: '\u0401', - Ye: '\u0404', - Yi: '\u0407', - Zh: '\u0416', - Ch: '\u0427', - Sh: '\u0428\u0429', - '': '\u042a\u042c\u044c', - Yu: '\u042e', - Ya: '\u042f', - zh: '\u0436', - ch: '\u0447', - sh: '\u0448\u0449', - yu: '\u044e', - ya: '\u044f', - yo: '\u0451', - ye: '\u0454', - yi: '\u0457' - }; - var diacriticsMap = null; - /** - * Creates a map of the diacritics. - * - * @ignore - * @returns {Object} Returns the diacritics map. - */ - - function getDiacriticsMap() { - if (diacriticsMap !== null) { - return diacriticsMap; - } - - diacriticsMap = {}; - Object.keys(diacritics).forEach(function (key) { - var characters = diacritics[key]; - - for (var index = 0; index < characters.length; index++) { - var character = characters[index]; - diacriticsMap[character] = key; - } - }); - return diacriticsMap; - } - /** - * Get the latin character from character with diacritics. - * - * @ignore - * @param {string} character The character with diacritics. - * @returns {string} Returns the character without diacritics. - */ - - - function getLatinCharacter(character) { - var characterWithoutDiacritic = getDiacriticsMap()[character]; - return characterWithoutDiacritic ? characterWithoutDiacritic : character; - } - - /** - * Returns the `cleanCharacter` from combining marks regular expression match. - * - * @ignore - * @param {string} character The character with combining marks - * @param {string} cleanCharacter The character without combining marks. - * @return {string} The character without combining marks. - */ - - function removeCombiningMarks(character, cleanCharacter) { - return cleanCharacter; - } - /** - * Latinises the `subject` by removing diacritic characters. - * - * @function latinise - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to latinise. - * @return {string} Returns the latinised string. - * @example - * v.latinise('cafe\u0301'); // or 'café' - * // => 'cafe' - * - * v.latinise('août décembre'); - * // => 'aout decembre' - * - * v.latinise('как прекрасен этот мир'); - * // => 'kak prekrasen etot mir' - */ - - - function latinise(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - return subjectString.replace(REGEXP_NON_LATIN, getLatinCharacter).replace(REGEXP_COMBINING_MARKS, removeCombiningMarks); - } - - /** - * Pads `subject` to a new `length`. - * - * @function pad - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to pad. - * @param {int} [length=0] The length to pad the string. No changes are made if `length` is less than `subject.length`. - * @param {string} [pad=' '] The string to be used for padding. - * @return {string} Returns the padded string. - * @example - * v.pad('dog', 5); - * // => ' dog ' - * - * v.pad('bird', 6, '-'); - * // => '-bird-' - * - * v.pad('cat', 6, '-='); - * // => '-cat-=' - */ - - function pad(subject, length, pad) { - var subjectString = coerceToString(subject); - var lengthInt = isNil(length) ? 0 : clipNumber(toInteger(length), 0, MAX_SAFE_INTEGER); - var padString = coerceToString(pad, ' '); - - if (lengthInt <= subjectString.length) { - return subjectString; - } - - var paddingLength = lengthInt - subjectString.length; - var paddingSideLength = toInteger(paddingLength / 2); - var paddingSideRemainingLength = paddingLength % 2; - return buildPadding(padString, paddingSideLength) + subjectString + buildPadding(padString, paddingSideLength + paddingSideRemainingLength); - } - - /** - * Replaces the matches of `search` with `replace`.
- * - * @function replace - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to verify. - * @param {string|RegExp} search The search pattern to replace. If `search` is a string, - * a simple string match is evaluated and only the first occurrence replaced. - * @param {string|Function} replace The string or function which invocation result replaces `search` match. - * @return {string} Returns the replacement result. - * @example - * v.replace('swan', 'wa', 'u'); - * // => 'sun' - * - * v.replace('domestic duck', /domestic\s/, ''); - * // => 'duck' - * - * v.replace('nice duck', /(nice)(duck)/, function(match, nice, duck) { - * return 'the ' + duck + ' is ' + nice; - * }); - * // => 'the duck is nice' - */ - - function replace(subject, search, replace) { - var subjectString = coerceToString(subject); - return subjectString.replace(search, replace); - } - - /** - * Replaces all occurrences of `search` with `replace`.
- * - * @function replaceAll - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to verify. - * @param {string|RegExp} search The search pattern to replace. If `search` is a string, a simple string match is evaluated. - * All matches are replaced. - * @param {string|Function} replace The string or function which invocation result replaces all `search` matches. - * @return {string} Returns the replacement result. - * @example - * v.replaceAll('good morning', 'o', '*'); - * // => 'g**d m*rning' - * v.replaceAll('evening', /n/g, 's'); - * // => 'evesisg' - * - */ - - function replaceAll(subject, search, replace) { - var subjectString = coerceToString(subject); - - if (search instanceof RegExp) { - if (search.flags.indexOf('g') === -1) { - throw new TypeError('search argument is a non-global regular expression'); - } - - return subjectString.replace(search, replace); - } - - var searchString = coerceToString(search); - var isFunctionalReplace = typeof replace === 'function'; - - if (!isFunctionalReplace) { - replace = coerceToString(replace); - } - - var searchLength = searchString.length; - - if (searchLength === 0) { - return replaceAll(subject, /(?:)/g, replace); - } - - var advanceBy = searchLength > 1 ? searchLength : 1; - var matchPositions = []; - var position = subjectString.indexOf(searchString, 0); - - while (position !== -1) { - matchPositions.push(position); - position = subjectString.indexOf(searchString, position + advanceBy); - } - - var endOfLastMatch = 0; - var result = ''; - - for (var i = 0; i < matchPositions.length; i++) { - var _position = matchPositions[i]; - var replacement = replace; - - if (isFunctionalReplace) { - replacement = coerceToString(replace.call(undefined, searchString, _position, subjectString)); - } - - result += subjectString.slice(endOfLastMatch, _position) + replacement; - endOfLastMatch = _position + searchLength; - } - - if (endOfLastMatch < subjectString.length) { - result += subjectString.slice(endOfLastMatch); - } - - return result; - } - - /** - * Reverses the `subject`. - * - * @function reverse - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to reverse. - * @return {string} Returns the reversed string. - * @example - * v.reverse('winter'); - * // => 'retniw' - */ - - function reverse(subject) { - var subjectString = coerceToString(subject); - return subjectString.split('').reverse().join(''); - } - - /** - * Reverses the `subject` taking care of - * surrogate pairs and - * combining marks. - * - * @function reverseGrapheme - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to reverse. - * @return {string} Returns the reversed string. - * @example - * v.reverseGrapheme('summer'); - * // => 'remmus' - * - * v.reverseGrapheme('𝌆 bar mañana mañana'); - * // => 'anañam anañam rab 𝌆' - */ - - function reverseGrapheme(subject) { - var subjectString = coerceToString(subject); - /** - * @see https://github.com/mathiasbynens/esrever - */ - - subjectString = subjectString.replace(REGEXP_COMBINING_MARKS, function ($0, $1, $2) { - return reverseGrapheme($2) + $1; - }).replace(REGEXP_SURROGATE_PAIRS, '$2$1'); - var reversedString = ''; - var index = subjectString.length; - - while (index--) { - reversedString += subjectString.charAt(index); - } - - return reversedString; - } - - /** - * Slugifies the `subject`. Cleans the `subject` by replacing diacritics with corresponding latin characters. - * - * @function slugify - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to slugify. - * @return {string} Returns the slugified string. - * @example - * v.slugify('Italian cappuccino drink'); - * // => 'italian-cappuccino-drink' - * - * v.slugify('caffé latté'); - * // => 'caffe-latte' - * - * v.slugify('хорошая погода'); - * // => 'horoshaya-pogoda' - */ - - function slugify(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - var cleanSubjectString = latinise(subjectString).replace(REGEXP_NON_LATIN, '-'); - return kebabCase(cleanSubjectString); - } - - /** - * Changes `subject` by deleting `deleteCount` of characters starting at position `start`. Places a new string - * `toAdd` instead of deleted characters. - * - * @function splice - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string where to insert. - * @param {string} start The position to start changing the string. For a negative position will start from the end of - * the string. - * @param {number} [deleteCount=subject.length-start] The number of characters to delete from string. - * @param {string} [toAdd=''] The string to be added instead of deleted characters. - * @return {string} Returns the modified string. - * @example - * v.splice('new year', 0, 4); - * // => 'year' - * - * v.splice('new year', 0, 3, 'happy'); - * // => 'happy year' - * - * v.splice('new year', -4, 4, 'day'); - * // => 'new day' - */ - - function splice(subject, start, deleteCount, toAdd) { - var subjectString = coerceToString(subject); - var toAddString = coerceToString(toAdd); - var startPosition = coerceToNumber(start); - - if (startPosition < 0) { - startPosition = subjectString.length + startPosition; - - if (startPosition < 0) { - startPosition = 0; - } - } else if (startPosition > subjectString.length) { - startPosition = subjectString.length; - } - - var deleteCountNumber = coerceToNumber(deleteCount, subjectString.length - startPosition); - - if (deleteCountNumber < 0) { - deleteCountNumber = 0; - } - - return subjectString.slice(0, startPosition) + toAddString + subjectString.slice(startPosition + deleteCountNumber); - } - - /** - * Translates characters or replaces substrings in `subject`. - * - * @function tr - * @static - * @since 1.3.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to translate. - * @param {string|Object} from The string of characters to translate from. Or an object, then the object keys are replaced with corresponding values (longest keys are tried first). - * @param {string} to The string of characters to translate to. Ignored when `from` is an object. - * @return {string} Returns the translated string. - * @example - * v.tr('hello', 'el', 'ip'); - * // => 'hippo' - * - * v.tr('légèreté', 'éè', 'ee'); - * // => 'legerete' - * - * v.tr('Yes. The fire rises.', { - * 'Yes': 'Awesome', - * 'fire': 'flame' - * }) - * // => 'Awesome. The flame rises.' - * - * v.tr(':where is the birthplace of :what', { - * ':where': 'Africa', - * ':what': 'Humanity' - * }); - * // => 'Africa is the birthplace of Humanity' - * - */ - - function tr(subject, from, to) { - var subjectString = coerceToString(subject); - var keys; - var values; - - if (isString(from) && isString(to)) { - keys = from.split(''); - values = to.split(''); - } else { - var _extractKeysAndValues = extractKeysAndValues(nilDefault(from, {})); - - var _extractKeysAndValues2 = _slicedToArray(_extractKeysAndValues, 2); - - keys = _extractKeysAndValues2[0]; - values = _extractKeysAndValues2[1]; - } - - var keysLength = keys.length; - - if (keysLength === 0) { - return subjectString; - } - - var result = ''; - var valuesLength = values.length; - - for (var index = 0; index < subjectString.length; index++) { - var isMatch = false; - var matchValue = void 0; - - for (var keyIndex = 0; keyIndex < keysLength && keyIndex < valuesLength; keyIndex++) { - var key = keys[keyIndex]; - - if (subjectString.substr(index, key.length) === key) { - isMatch = true; - matchValue = values[keyIndex]; - index = index + key.length - 1; - break; - } - } - - result += isMatch ? matchValue : subjectString[index]; - } - - return result; - } - - function extractKeysAndValues(object) { - var keys = Object.keys(object); - var values = keys.sort(sortStringByLength).map(function (key) { - return object[key]; - }); - return [keys, values]; - } - - function sortStringByLength(str1, str2) { - if (str1.length === str2.length) { - return 0; - } - - return str1.length < str2.length ? 1 : -1; - } - - /** - * Checks whether `subject` includes `search` starting from `position`. - * - * @function includes - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string where to search. - * @param {string} search The string to search. - * @param {number} [position=0] The position to start searching. - * @return {boolean} Returns `true` if `subject` includes `search` or `false` otherwise. - * @example - * v.includes('starship', 'star'); - * // => true - * - * v.includes('galaxy', 'g', 1); - * // => false - */ - - function includes(subject, search, position) { - var subjectString = coerceToString(subject); - var searchString = toString(search); - - if (searchString === null) { - return false; - } - - if (searchString === '') { - return true; - } - - position = isNil(position) ? 0 : clipNumber(toInteger(position), 0, subjectString.length); - return subjectString.indexOf(searchString, position) !== -1; - } - - var reduce$1 = Array.prototype.reduce; - /** - * Removes whitespaces from the left side of the `subject`. - * - * @function trimLeft - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to trim. - * @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped. - * @return {string} Returns the trimmed string. - * @example - * v.trimLeft(' Starship Troopers'); - * // => 'Starship Troopers' - * - * v.trimLeft('***Mobile Infantry', '*'); - * // => 'Mobile Infantry' - */ - - function trimLeft(subject, whitespace) { - var subjectString = coerceToString(subject); - - if (whitespace === '' || subjectString === '') { - return subjectString; - } - - var whitespaceString = toString(whitespace); - - if (isNil(whitespaceString)) { - return subjectString.replace(REGEXP_TRIM_LEFT, ''); - } - - var matchWhitespace = true; - return reduce$1.call(subjectString, function (trimmed, character) { - if (matchWhitespace && includes(whitespaceString, character)) { - return trimmed; - } - - matchWhitespace = false; - return trimmed + character; - }, ''); - } - - var reduceRight = Array.prototype.reduceRight; - /** - * Removes whitespaces from the right side of the `subject`. - * - * @function trimRight - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to trim. - * @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped. - * @return {string} Returns the trimmed string. - * @example - * v.trimRight('the fire rises '); - * // => 'the fire rises' - * - * v.trimRight('do you feel in charge?!!!', '!'); - * // => 'do you feel in charge?' - */ - - function trimRight(subject, whitespace) { - var subjectString = coerceToString(subject); - - if (whitespace === '' || subjectString === '') { - return subjectString; - } - - var whitespaceString = toString(whitespace); - - if (isNil(whitespaceString)) { - return subjectString.replace(REGEXP_TRIM_RIGHT, ''); - } - - var matchWhitespace = true; - return reduceRight.call(subjectString, function (trimmed, character) { - if (matchWhitespace && includes(whitespaceString, character)) { - return trimmed; - } - - matchWhitespace = false; - return character + trimmed; - }, ''); - } - - /** - * Removes whitespaces from left and right sides of the `subject`. - * - * @function trim - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to trim. - * @param {string} [whitespace=whitespace] The whitespace characters to trim. List all characters that you want to be stripped. - * @return {string} Returns the trimmed string. - * @example - * v.trim(' Mother nature '); - * // => 'Mother nature' - * - * v.trim('--Earth--', '-'); - * // => 'Earth' - */ - - function trim(subject, whitespace) { - var subjectString = coerceToString(subject); - - if (whitespace === '' || subjectString === '') { - return subjectString; - } - - var whitespaceString = toString(whitespace); - - if (isNil(whitespaceString)) { - return subjectString.trim(); - } - - return trimRight(trimLeft(subjectString, whitespaceString), whitespaceString); - } - - var OPTION_WIDTH = 'width'; - var OPTION_NEW_LINE = 'newLine'; - var OPTION_INDENT = 'indent'; - var OPTION_CUT = 'cut'; - /** - * Wraps `subject` to a given number of characters using a string break character. - * - * @function wordWrap - * @static - * @since 1.0.0 - * @memberOf Manipulate - * @param {string} [subject=''] The string to wrap. - * @param {Object} [options={}] The wrap options. - * @param {number} [options.width=75] The number of characters at which to wrap. - * @param {string} [options.newLine='\n'] The string to add at the end of line. - * @param {string} [options.indent=''] The string to intend the line. - * @param {boolean} [options.cut=false] When `false` (default) does not split the word even if word length is bigger than `width`.
- * When `true` breaks the word that has length bigger than `width`. - * - * @return {string} Returns wrapped string. - * @example - * v.wordWrap('Hello world', { - * width: 5 - * }); - * // => 'Hello\nworld' - * - * v.wordWrap('Hello world', { - * width: 5, - * newLine: '
', - * indent: '__' - * }); - * // => '__Hello
__world' - * - * v.wordWrap('Wonderful world', { - * width: 5, - * cut: true - * }); - * // => 'Wonde\nrful\nworld' - * - */ - - function wordWrap(subject) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var subjectString = coerceToString(subject); - - var _determineOptions = determineOptions(options), - width = _determineOptions.width, - newLine = _determineOptions.newLine, - indent = _determineOptions.indent, - cut = _determineOptions.cut; - - if (subjectString === '' || width <= 0) { - return indent; - } - - var subjectLength = subjectString.length; - var substring = subjectString.substring.bind(subjectString); - var offset = 0; - var wrappedLine = ''; - - while (subjectLength - offset > width) { - if (subjectString[offset] === ' ') { - offset++; - continue; - } - - var spaceToWrapAt = subjectString.lastIndexOf(' ', width + offset); - - if (spaceToWrapAt >= offset) { - wrappedLine += indent + substring(offset, spaceToWrapAt) + newLine; - offset = spaceToWrapAt + 1; - } else { - if (cut) { - wrappedLine += indent + substring(offset, width + offset) + newLine; - offset += width; - } else { - spaceToWrapAt = subjectString.indexOf(' ', width + offset); - - if (spaceToWrapAt >= 0) { - wrappedLine += indent + substring(offset, spaceToWrapAt) + newLine; - offset = spaceToWrapAt + 1; - } else { - wrappedLine += indent + substring(offset); - offset = subjectLength; - } - } - } - } - - if (offset < subjectLength) { - wrappedLine += indent + substring(offset); - } - - return wrappedLine; - } - /** - * Determine the word wrap options. The missing values are filled with defaults. - * - * @param {Object} options The options object. - * @return {Object} The word wrap options, with default settings if necessary. - * @ignore - */ - - function determineOptions(options) { - return { - width: coerceToNumber(options[OPTION_WIDTH], 75), - newLine: coerceToString(options[OPTION_NEW_LINE], '\n'), - indent: coerceToString(options[OPTION_INDENT], ''), - cut: coerceToBoolean(options[OPTION_CUT], false) - }; - } - - /** - * Checks whether `subject` ends with `end`. - * - * @function endsWith - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @param {string} end The ending string. - * @param {number} [position=subject.length] Search within `subject` as if the string were only `position` long. - * @return {boolean} Returns `true` if `subject` ends with `end` or `false` otherwise. - * @example - * v.endsWith('red alert', 'alert'); - * // => true - * - * v.endsWith('metro south', 'metro'); - * // => false - * - * v.endsWith('Murphy', 'ph', 5); - * // => true - */ - - function endsWith(subject, end, position) { - if (isNil(end)) { - return false; - } - - var subjectString = coerceToString(subject); - var endString = coerceToString(end); - - if (endString === '') { - return true; - } - - position = isNil(position) ? subjectString.length : clipNumber(toInteger(position), 0, subjectString.length); - position -= endString.length; - var lastIndex = subjectString.indexOf(endString, position); - return lastIndex !== -1 && lastIndex === position; - } - - /** - * Checks whether `subject` contains only alpha characters. - * - * @function isAlpha - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` contains only alpha characters or `false` otherwise. - * @example - * v.isAlpha('bart'); - * // => true - * - * v.isAlpha('lisa!'); - * // => false - * - * v.isAlpha('lisa and bart'); - * // => false - */ - - function isAlpha(subject) { - var subjectString = coerceToString(subject); - return REGEXP_ALPHA.test(subjectString); - } - - /** - * Checks whether `subject` contains only alpha and digit characters. - * - * @function isAlphaDigit - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` contains only alpha and digit characters or `false` otherwise. - * @example - * v.isAlphaDigit('year2020'); - * // => true - * - * v.isAlphaDigit('1448'); - * // => true - * - * v.isAlphaDigit('40-20'); - * // => false - */ - - function isAlphaDigit(subject) { - var subjectString = coerceToString(subject); - return REGEXP_ALPHA_DIGIT.test(subjectString); - } - - /** - * Checks whether `subject` is empty or contains only whitespaces. - * - * @function isBlank - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` is empty or contains only whitespaces or `false` otherwise. - * @example - * v.isBlank(''); - * // => true - * - * v.isBlank(' '); - * // => true - * - * v.isBlank('World'); - * // => false - */ - - function isBlank(subject) { - var subjectString = coerceToString(subject); - return subjectString.trim().length === 0; - } - - /** - * Checks whether `subject` contains only digit characters. - * - * @function isDigit - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` contains only digit characters or `false` otherwise. - * @example - * v.isDigit('35'); - * // => true - * - * v.isDigit('1.5'); - * // => false - * - * v.isDigit('ten'); - * // => false - */ - - function isDigit(subject) { - var subjectString = coerceToString(subject); - return REGEXP_DIGIT.test(subjectString); - } - - /** - * Checks whether `subject` is empty. - * - * @function isEmpty - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` is empty or `false` otherwise - * @example - * v.isEmpty(''); - * // => true - * - * v.isEmpty(' '); - * // => false - * - * v.isEmpty('sun'); - * // => false - */ - - function isEmpty(subject) { - var subjectString = coerceToString(subject); - return subjectString.length === 0; - } - - /** - * Checks whether `subject` has only lower case characters. - * - * @function isLowerCase - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` is lower case or `false` otherwise. - * @example - * v.isLowerCase('motorcycle'); - * // => true - * - * v.isLowerCase('John'); - * // => false - * - * v.isLowerCase('T1000'); - * // => false - */ - - function isLowerCase(subject) { - var valueString = coerceToString(subject); - return isAlpha(valueString) && valueString.toLowerCase() === valueString; - } - - /** - * Checks whether `subject` is numeric. - * - * @function isNumeric - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` is numeric or `false` otherwise. - * @example - * v.isNumeric('350'); - * // => true - * - * v.isNumeric('-20.5'); - * // => true - * - * v.isNumeric('1.5E+2'); - * // => true - * - * v.isNumeric('five'); - * // => false - */ - - function isNumeric(subject) { - var valueNumeric = typeof subject === 'object' && !isNil(subject) ? Number(subject) : subject; - return (typeof valueNumeric === 'number' || typeof valueNumeric === 'string') && !isNaN(valueNumeric - parseFloat(valueNumeric)); - } - - /** - * Checks whether `subject` contains only upper case characters. - * - * @function isUpperCase - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @return {boolean} Returns `true` if `subject` is upper case or `false` otherwise. - * @example - * v.isUpperCase('ACDC'); - * // => true - * - * v.isUpperCase('Morning'); - * // => false - */ - - function isUpperCase(subject) { - var subjectString = coerceToString(subject); - return isAlpha(subjectString) && subjectString.toUpperCase() === subjectString; - } - - /** - * Checks whether `subject` matches the regular expression `pattern`. - * - * @function matches - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @param {RegExp|string} pattern The pattern to match. If `pattern` is not RegExp, it is transformed to `new RegExp(pattern, flags)`. - * @param {string} [flags=''] The regular expression flags. Applies when `pattern` is string type. - * @return {boolean} Returns `true` if `subject` matches `pattern` or `false` otherwise. - * @example - * v.matches('pluto', /plu.{2}/); - * // => true - * - * v.matches('sun', 'S', 'i'); - * // => true - * - * v.matches('apollo 11', '\\d{3}'); - * // => false - */ - - function matches(subject, pattern, flags) { - var subjectString = coerceToString(subject); - var flagsString = coerceToString(flags); - var patternString; - - if (!(pattern instanceof RegExp)) { - patternString = toString(pattern); - - if (patternString === null) { - return false; - } - - pattern = new RegExp(patternString, flagsString); - } - - return pattern.test(subjectString); - } - - /** - * Checks whether `subject` starts with `start`. - * - * @function startsWith - * @static - * @since 1.0.0 - * @memberOf Query - * @param {string} [subject=''] The string to verify. - * @param {string} start The starting string. - * @param {number} [position=0] The position to start searching. - * @return {boolean} Returns `true` if `subject` starts with `start` or `false` otherwise. - * @example - * v.startsWith('say hello to my little friend', 'say hello'); - * // => true - * - * v.startsWith('tony', 'on', 1); - * // => true - * - * v.startsWith('the world is yours', 'world'); - * // => false - */ - - function startsWith(subject, start, position) { - var subjectString = coerceToString(subject); - var startString = toString(start); - - if (startString === null) { - return false; - } - - if (startString === '') { - return true; - } - - position = isNil(position) ? 0 : clipNumber(toInteger(position), 0, subjectString.length); - return subjectString.substr(position, startString.length) === startString; - } - - /** - * Splits `subject` into an array of characters. - * - * @function chars - * @static - * @since 1.0.0 - * @memberOf Split - * @param {string} [subject=''] The string to split into characters. - * @return {Array} Returns the array of characters. - * @example - * v.chars('cloud'); - * // => ['c', 'l', 'o', 'u', 'd'] - */ - - function chars(subject) { - var subjectString = coerceToString(subject); - return subjectString.split(''); - } - - /** - * Returns an array of Unicode code point values from characters of `subject`. - * - * @function codePoints - * @static - * @since 1.0.0 - * @memberOf Split - * @param {string} [subject=''] The string to extract from. - * @return {Array} Returns an array of non-negative numbers less than or equal to `0x10FFFF`. - * @example - * v.codePoints('rain'); - * // => [114, 97, 105, 110], or - * // [0x72, 0x61, 0x69, 0x6E] - * - * v.codePoints('\uD83D\uDE00 smile'); // or '😀 smile' - * // => [128512, 32, 115, 109, 105, 108, 101], or - * // [0x1F600, 0x20, 0x73, 0x6D, 0x69, 0x6C, 0x65] - */ - - function codePoints(subject) { - var subjectString = coerceToString(subject); - var subjectStringLength = subjectString.length; - var codePointArray = []; - var index = 0; - var codePointNumber; - - while (index < subjectStringLength) { - codePointNumber = codePointAt(subjectString, index); - codePointArray.push(codePointNumber); - index += codePointNumber > 0xffff ? 2 : 1; - } - - return codePointArray; - } - - /** - * Splits `subject` into an array of graphemes taking care of - * surrogate pairs and - * combining marks. - * - * @function graphemes - * @static - * @since 1.0.0 - * @memberOf Split - * @param {string} [subject=''] The string to split into characters. - * @return {Array} Returns the array of graphemes. - * @example - * v.graphemes('\uD835\uDC00\uD835\uDC01'); // or '𝐀𝐁' - * // => ['\uD835\uDC00', '\uD835\uDC01'], or - * // ['𝐀', '𝐁'] - * - * v.graphemes('cafe\u0301'); // or 'café' - * // => ['c', 'a', 'f', 'e\u0301'], or - * // ['c', 'a', 'f', 'é'] - */ - - function graphemes(subject) { - var subjectString = coerceToString(subject); - return nilDefault(subjectString.match(REGEXP_UNICODE_CHARACTER), []); - } - - /** - * Splits `subject` into an array of chunks by `separator`. - * - * @function split - * @static - * @since 1.0.0 - * @memberOf Split - * @param {string} [subject=''] The string to split into characters. - * @param {string|RegExp} [separator] The pattern to match the separator. - * @param {number} [limit] Limit the number of chunks to be found. - * @return {Array} Returns the array of chunks. - * @example - * v.split('rage against the dying of the light', ' '); - * // => ['rage', 'against', 'the', 'dying', 'of', 'the', 'light'] - * - * v.split('the dying of the light', /\s/, 3); - * // => ['the', 'dying', 'of'] - */ - - function split(subject, separator, limit) { - var subjectString = coerceToString(subject); - return subjectString.split(separator, limit); - } - - var BYRE_ORDER_MARK = '\uFEFF'; - /** - * Strips the byte order mark (BOM) from the beginning of `subject`. - * - * @function stripBom - * @static - * @since 1.2.0 - * @memberOf Strip - * @param {string} [subject=''] The string to strip from. - * @return {string} Returns the stripped string. - * @example - * - * v.stripBom('\uFEFFsummertime sadness'); - * // => 'summertime sadness' - * - * v.stripBom('summertime happiness'); - * // => 'summertime happiness' - * - */ - - function trim$1(subject) { - var subjectString = coerceToString(subject); - - if (subjectString === '') { - return ''; - } - - if (subjectString[0] === BYRE_ORDER_MARK) { - return subjectString.substring(1); - } - - return subjectString; - } - - /** - * Checks whether `subject` contains substring at specific `index`. - * - * @ignore - * @param {string} subject The subject to search in. - * @param {string} substring The substring to search/ - * @param {number} index The index to search substring. - * @param {boolean} lookBehind Whether to look behind (true) or ahead (false). - * @return {boolean} Returns a boolean whether the substring exists. - */ - function hasSubstringAtIndex(subject, substring, index) { - var lookBehind = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - var indexOffset = 0; - - if (lookBehind) { - indexOffset = -substring.length + 1; - } - - var extractedSubstring = subject.substr(index + indexOffset, substring.length); - return extractedSubstring.toLowerCase() === substring; - } - - /** - * Parses the tags from the string '...'. - * - * @ignore - * @param {string} tags The string that contains the tags. - * @return {string[]} Returns the array of tag names. - */ - - function parseTagList(tags) { - var tagsList = []; - var match; - - while ((match = REGEXP_TAG_LIST.exec(tags)) !== null) { - tagsList.push(match[1]); - } - - return tagsList; - } - - var STATE_START_TAG = 0; - var STATE_NON_WHITESPACE = 1; - var STATE_DONE = 2; - /** - * Parses the tag name from html content. - * - * @ignore - * @param {string} tagContent The tag content. - * @return {string} Returns the tag name. - */ - - function parseTagName(tagContent) { - var state = STATE_START_TAG; - var tagName = ''; - var index = 0; - - while (state !== STATE_DONE) { - var char = tagContent[index++].toLowerCase(); - - switch (char) { - case '<': - break; - - case '>': - state = STATE_DONE; - break; - - default: - if (REGEXP_WHITESPACE.test(char)) { - if (state === STATE_NON_WHITESPACE) { - state = STATE_DONE; - } - } else { - if (state === STATE_START_TAG) { - state = STATE_NON_WHITESPACE; - } - - if (char !== '/') { - tagName += char; - } - } - - break; - } - } - - return tagName; - } - - var STATE_OUTPUT = 0; - var STATE_HTML = 1; - var STATE_EXCLAMATION = 2; - var STATE_COMMENT = 3; - /** - * Strips HTML tags from `subject`. - * - * @function stripTags - * @static - * @since 1.1.0 - * @memberOf Strip - * @param {string} [subject=''] The string to strip from. - * @param {string|Array} [allowableTags] The string `''` or array `['tag1', 'tag2']` of tags that should not be stripped. - * @param {string} [replacement=''] The string to replace the stripped tag. - * @return {string} Returns the stripped string. - * @example - * - * v.stripTags('Summer is nice'); - * // => 'Summer is nice' - * - * v.stripTags('Winter is cold', ['b', 'i']); - * // => 'Winter is cold' - * - * v.stripTags('Sun
set', '', '-'); - * // => 'Sun-set' - */ - - function trim$2(subject, allowableTags, replacement) { - subject = coerceToString(subject); - - if (subject === '') { - return ''; - } - - if (!Array.isArray(allowableTags)) { - var allowableTagsString = coerceToString(allowableTags); - allowableTags = allowableTagsString === '' ? [] : parseTagList(allowableTagsString); - } - - var replacementString = coerceToString(replacement); - var length = subject.length; - var hasAllowableTags = allowableTags.length > 0; - var hasSubstring = hasSubstringAtIndex.bind(null, subject); - var state = STATE_OUTPUT; - var depth = 0; - var output = ''; - var tagContent = ''; - var quote = null; - - for (var index = 0; index < length; index++) { - var char = subject[index]; - var advance = false; - - switch (char) { - case '<': - if (quote) { - break; - } - - if (hasSubstring('< ', index, false)) { - advance = true; - break; - } - - if (state === STATE_OUTPUT) { - advance = true; - state = STATE_HTML; - break; - } - - if (state === STATE_HTML) { - depth++; - break; - } - - advance = true; - break; - - case '!': - if (state === STATE_HTML && hasSubstring('': - if (depth > 0) { - depth--; - break; - } - - if (quote) { - break; - } - - if (state === STATE_HTML) { - quote = null; - state = STATE_OUTPUT; - - if (hasAllowableTags) { - tagContent += '>'; - var tagName = parseTagName(tagContent); - - if (allowableTags.indexOf(tagName.toLowerCase()) !== -1) { - output += tagContent; - } else { - output += replacementString; - } - - tagContent = ''; - } else { - output += replacementString; - } - - break; - } - - if (state === STATE_EXCLAMATION || state === STATE_COMMENT && hasSubstring('-->', index)) { - quote = null; - state = STATE_OUTPUT; - tagContent = ''; - break; - } - - advance = true; - break; - - default: - advance = true; - } - - if (advance) { - switch (state) { - case STATE_OUTPUT: - output += char; - break; - - case STATE_HTML: - if (hasAllowableTags) { - tagContent += char; - } - - break; - } - } - } - - return output; - } - - var globalObject = null; - - function getGlobalObject() { - if (globalObject !== null) { - return globalObject; - } - /* istanbul ignore next */ - // It's hard to mock the global variables. This code surely works fine. I hope :) - - - if (typeof global === 'object' && global.Object === Object) { - // NodeJS global object - globalObject = global; - } else if (typeof self === 'object' && self.Object === Object) { - // self property from Window object - globalObject = self; - } else { - // Other cases. Function constructor always has the context as global object - globalObject = new Function('return this')(); - } - - return globalObject; - } - - var globalObject$1 = getGlobalObject(); - var previousV = globalObject$1.v; - /** - * Restores `v` variable to previous value and returns Voca library instance. - * - * @function noConflict - * @static - * @since 1.0.0 - * @memberOf Util - * @return {Object} Returns Voca library instance. - * @example - * var voca = v.noConflict(); - * voca.isAlpha('Hello'); - * // => true - */ - - function noConflict() { - if (this === globalObject$1.v) { - globalObject$1.v = previousV; - } - - return this; - } - - /** - * A property that contains the library semantic version number. - * @name version - * @static - * @since 1.0.0 - * @memberOf Util - * @type string - * @example - * v.version - * // => '1.4.0' - */ - var version = '1.4.0'; - - /* eslint sort-imports: "off" */ - var functions = { - camelCase: camelCase, - capitalize: capitalize, - decapitalize: decapitalize, - kebabCase: kebabCase, - lowerCase: lowerCase, - snakeCase: snakeCase, - swapCase: swapCase, - titleCase: titleCase, - upperCase: upperCase, - count: count, - countGraphemes: countGrapheme, - countSubstrings: countSubstrings, - countWhere: countWhere, - countWords: countWords, - escapeHtml: escapeHtml, - escapeRegExp: escapeRegExp, - unescapeHtml: unescapeHtml, - sprintf: sprintf, - vprintf: vprintf, - indexOf: indexOf, - lastIndexOf: lastIndexOf, - search: search, - charAt: charAt, - codePointAt: codePointAt, - first: first, - graphemeAt: graphemeAt, - last: last, - prune: prune, - slice: slice, - substr: substr, - substring: substring, - truncate: truncate, - insert: insert, - latinise: latinise, - pad: pad, - padLeft: padLeft, - padRight: padRight, - repeat: repeat, - replace: replace, - replaceAll: replaceAll, - reverse: reverse, - reverseGrapheme: reverseGrapheme, - slugify: slugify, - splice: splice, - tr: tr, - trim: trim, - trimLeft: trimLeft, - trimRight: trimRight, - wordWrap: wordWrap, - endsWith: endsWith, - includes: includes, - isAlpha: isAlpha, - isAlphaDigit: isAlphaDigit, - isBlank: isBlank, - isDigit: isDigit, - isEmpty: isEmpty, - isLowerCase: isLowerCase, - isNumeric: isNumeric, - isString: isString, - isUpperCase: isUpperCase, - matches: matches, - startsWith: startsWith, - chars: chars, - codePoints: codePoints, - graphemes: graphemes, - split: split, - words: words, - stripBom: trim$1, - stripTags: trim$2, - noConflict: noConflict, - version: version - }; - - /** - * The chain wrapper constructor. - * - * @ignore - * @param {string} subject The string to be wrapped. - * @param {boolean} [explicitChain=false] A boolean that indicates if the chain sequence is explicit or implicit. - * @return {ChainWrapper} Returns a new instance of `ChainWrapper` - * @constructor - */ - - function ChainWrapper(subject, explicitChain) { - this._wrappedValue = subject; - this._explicitChain = explicitChain; - } - /** - * Unwraps the chain sequence wrapped value. - * - * @memberof Chain - * @since 1.0.0 - * @function __proto__value - * @return {*} Returns the unwrapped value. - * @example - * v - * .chain('Hello world') - * .replace('Hello', 'Hi') - * .lowerCase() - * .slugify() - * .value() - * // => 'hi-world' - * - * v(' Space travel ') - * .trim() - * .truncate(8) - * .value() - * // => 'Space...' - */ - - - ChainWrapper.prototype.value = function () { - return this._wrappedValue; - }; - /** - * Override the default object valueOf(). - * - * @ignore - * @return {*} Returns the wrapped value. - */ - - - ChainWrapper.prototype.valueOf = function () { - return this.value(); - }; - /** - * Returns the wrapped value to be used in JSON.stringify(). - * - * @ignore - * @return {*} Returns the wrapped value. - */ - - - ChainWrapper.prototype.toJSON = function () { - return this.value(); - }; - /** - * Returns the string representation of the wrapped value. - * - * @ignore - * @return {string} Returns the string representation. - */ - - - ChainWrapper.prototype.toString = function () { - return String(this.value()); - }; - /** - * Creates a new chain object that enables explicit chain sequences. - * Use `v.prototype.value()` to unwrap the result.
- * Does not modify the wrapped value. - * - * @memberof Chain - * @since 1.0.0 - * @function __proto__chain - * @return {Object} Returns the wrapper in explicit mode. - * @example - * v('Back to School') - * .chain() - * .lowerCase() - * .words() - * .value() - * // => ['back', 'to', 'school'] - * - * v(" Back to School ") - * .chain() - * .trim() - * .truncate(7) - * .value() - * // => 'Back...' - */ - - - ChainWrapper.prototype.chain = function () { - return new ChainWrapper(this._wrappedValue, true); - }; - /** - * Modifies the wrapped value with the invocation result of `changer` function. The current wrapped value is the - * argument of `changer` invocation. - * - * @memberof Chain - * @since 1.0.0 - * @function __proto__thru - * @param {Function} changer The function to invoke. - * @return {Object} Returns the new wrapper that wraps the invocation result of `changer`. - * @example - * v - * .chain('sun is shining') - * .words() - * .thru(function(words) { - * return words[0]; - * }) - * .value() - * // => 'sun' - * - */ - - - ChainWrapper.prototype.thru = function (changer) { - if (typeof changer === 'function') { - return new ChainWrapper(changer(this._wrappedValue), this._explicitChain); - } - - return this; - }; - /** - * A boolean that indicates if the chain sequence is explicit or implicit. - * @ignore - * @type {boolean} - * @private - */ - - - ChainWrapper.prototype._explicitChain = true; - /** - * Make a voca function chainable. - * - * @ignore - * @param {Function} functionInstance The function to make chainable - * @return {Function} Returns the chainable function - */ - - function makeFunctionChainable(functionInstance) { - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var result = functionInstance.apply(void 0, [this._wrappedValue].concat(args)); - - if (this._explicitChain || typeof result === 'string') { - return new ChainWrapper(result, this._explicitChain); - } else { - return result; - } - }; - } - - Object.keys(functions).forEach(function (name) { - ChainWrapper.prototype[name] = makeFunctionChainable(functions[name]); - }); - - /** - * Creates a chain object that wraps `subject`, enabling explicit chain sequences.
- * Use `v.prototype.value()` to unwrap the result. - * - * @memberOf Chain - * @since 1.0.0 - * @function chain - * @param {string} subject The string to wrap. - * @return {Object} Returns the new wrapper object. - * @example - * v - * .chain('Back to School') - * .lowerCase() - * .words() - * .value() - * // => ['back', 'to', 'school'] - */ - - function chain(subject) { - return new ChainWrapper(subject, true); - } - - /** - * Creates a chain object that wraps `subject`, enabling implicit chain sequences.
- * A function that returns `number`, `boolean` or `array` type terminates the chain sequence and returns the unwrapped value. - * Otherwise use `v.prototype.value()` to unwrap the result. - * - * @memberOf Chain - * @since 1.0.0 - * @function v - * @param {string} subject The string to wrap. - * @return {Object} Returns the new wrapper object. - * @example - * v('Back to School') - * .lowerCase() - * .words() - * // => ['back', 'to', 'school'] - * - * v(" Back to School ") - * .trim() - * .truncate(7) - * .value() - * // => 'Back...' - */ - - function Voca(subject) { - return new ChainWrapper(subject, false); - } - - _extends(Voca, functions, { - chain: chain - }); - - return Voca; - -}))); - - -/***/ }), - -/***/ 3766: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// Expose modern transport directly as the export -module.exports = __nccwpck_require__(5479); - -// Expose legacy stream -module.exports.LegacyTransportStream = __nccwpck_require__(6540); - - -/***/ }), - -/***/ 6540: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const { LEVEL } = __nccwpck_require__(1255); -const TransportStream = __nccwpck_require__(5479); - -/** - * Constructor function for the LegacyTransportStream. This is an internal - * wrapper `winston >= 3` uses to wrap older transports implementing - * log(level, message, meta). - * @param {Object} options - Options for this TransportStream instance. - * @param {Transpot} options.transport - winston@2 or older Transport to wrap. - */ - -const LegacyTransportStream = module.exports = function LegacyTransportStream(options = {}) { - TransportStream.call(this, options); - if (!options.transport || typeof options.transport.log !== 'function') { - throw new Error('Invalid transport, must be an object with a log method.'); - } - - this.transport = options.transport; - this.level = this.level || options.transport.level; - this.handleExceptions = this.handleExceptions || options.transport.handleExceptions; - - // Display our deprecation notice. - this._deprecated(); - - // Properly bubble up errors from the transport to the - // LegacyTransportStream instance, but only once no matter how many times - // this transport is shared. - function transportError(err) { - this.emit('error', err, this.transport); - } - - if (!this.transport.__winstonError) { - this.transport.__winstonError = transportError.bind(this); - this.transport.on('error', this.transport.__winstonError); - } -}; - -/* - * Inherit from TransportStream using Node.js built-ins - */ -util.inherits(LegacyTransportStream, TransportStream); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -LegacyTransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || (info.exception === true && !this.handleExceptions)) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. - if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) { - this.transport.log(info[LEVEL], info.message, info, this._nop); - } - - callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -LegacyTransportStream.prototype._writev = function _writev(chunks, callback) { - for (let i = 0; i < chunks.length; i++) { - if (this._accept(chunks[i])) { - this.transport.log( - chunks[i].chunk[LEVEL], - chunks[i].chunk.message, - chunks[i].chunk, - this._nop - ); - chunks[i].callback(); - } - } - - return callback(null); -}; - -/** - * Displays a deprecation notice. Defined as a function so it can be - * overriden in tests. - * @returns {undefined} - */ -LegacyTransportStream.prototype._deprecated = function _deprecated() { - // eslint-disable-next-line no-console - console.error([ - `${this.transport.name} is a legacy winston transport. Consider upgrading: `, - '- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md' - ].join('\n')); -}; - -/** - * Clean up error handling state on the legacy transport associated - * with this instance. - * @returns {undefined} - */ -LegacyTransportStream.prototype.close = function close() { - if (this.transport.close) { - this.transport.close(); - } - - if (this.transport.__winstonError) { - this.transport.removeListener('error', this.transport.__winstonError); - this.transport.__winstonError = null; - } -}; - - -/***/ }), - -/***/ 5479: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const Writable = __nccwpck_require__(5422); -const { LEVEL } = __nccwpck_require__(1255); - -/** - * Constructor function for the TransportStream. This is the base prototype - * that all `winston >= 3` transports should inherit from. - * @param {Object} options - Options for this TransportStream instance - * @param {String} options.level - Highest level according to RFC5424. - * @param {Boolean} options.handleExceptions - If true, info with - * { exception: true } will be written. - * @param {Function} options.log - Custom log function for simple Transport - * creation - * @param {Function} options.close - Called on "unpipe" from parent. - */ -const TransportStream = module.exports = function TransportStream(options = {}) { - Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark }); - - this.format = options.format; - this.level = options.level; - this.handleExceptions = options.handleExceptions; - this.handleRejections = options.handleRejections; - this.silent = options.silent; - - if (options.log) this.log = options.log; - if (options.logv) this.logv = options.logv; - if (options.close) this.close = options.close; - - // Get the levels from the source we are piped from. - this.once('pipe', logger => { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - this.levels = logger.levels; - this.parent = logger; - }); - - // If and/or when the transport is removed from this instance - this.once('unpipe', src => { - // Remark (indexzero): this bookkeeping can only support multiple - // Logger parents with the same `levels`. This comes into play in - // the `winston.Container` code in which `container.add` takes - // a fully realized set of options with pre-constructed TransportStreams. - if (src === this.parent) { - this.parent = null; - if (this.close) { - this.close(); - } - } - }); -}; - -/* - * Inherit from Writeable using Node.js built-ins - */ -util.inherits(TransportStream, Writable); - -/** - * Writes the info object to our transport instance. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - * @private - */ -TransportStream.prototype._write = function _write(info, enc, callback) { - if (this.silent || (info.exception === true && !this.handleExceptions)) { - return callback(null); - } - - // Remark: This has to be handled in the base transport now because we - // cannot conditionally write to our pipe targets as stream. We always - // prefer any explicit level set on the Transport itself falling back to - // any level set on the parent. - const level = this.level || (this.parent && this.parent.level); - - if (!level || this.levels[level] >= this.levels[info[LEVEL]]) { - if (info && !this.format) { - return this.log(info, callback); - } - - let errState; - let transformed; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform(Object.assign({}, info), this.format.options); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - callback(); - if (errState) throw errState; - return; - } - - return this.log(transformed, callback); - } - this._writableState.sync = false; - return callback(null); -}; - -/** - * Writes the batch of info objects (i.e. "object chunks") to our transport - * instance after performing any necessary filtering. - * @param {mixed} chunks - TODO: add params description. - * @param {function} callback - TODO: add params description. - * @returns {mixed} - TODO: add returns description. - * @private - */ -TransportStream.prototype._writev = function _writev(chunks, callback) { - if (this.logv) { - const infos = chunks.filter(this._accept, this); - if (!infos.length) { - return callback(null); - } - - // Remark (indexzero): from a performance perspective if Transport - // implementers do choose to implement logv should we make it their - // responsibility to invoke their format? - return this.logv(infos, callback); - } - - for (let i = 0; i < chunks.length; i++) { - if (!this._accept(chunks[i])) continue; - - if (chunks[i].chunk && !this.format) { - this.log(chunks[i].chunk, chunks[i].callback); - continue; - } - - let errState; - let transformed; - - // We trap(and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - transformed = this.format.transform( - Object.assign({}, chunks[i].chunk), - this.format.options - ); - } catch (err) { - errState = err; - } - - if (errState || !transformed) { - // eslint-disable-next-line callback-return - chunks[i].callback(); - if (errState) { - // eslint-disable-next-line callback-return - callback(null); - throw errState; - } - } else { - this.log(transformed, chunks[i].callback); - } - } - - return callback(null); -}; - -/** - * Predicate function that returns true if the specfied `info` on the - * WriteReq, `write`, should be passed down into the derived - * TransportStream's I/O via `.log(info, callback)`. - * @param {WriteReq} write - winston@3 Node.js WriteReq for the `info` object - * representing the log message. - * @returns {Boolean} - Value indicating if the `write` should be accepted & - * logged. - */ -TransportStream.prototype._accept = function _accept(write) { - const info = write.chunk; - if (this.silent) { - return false; - } - - // We always prefer any explicit level set on the Transport itself - // falling back to any level set on the parent. - const level = this.level || (this.parent && this.parent.level); - - // Immediately check the average case: log level filtering. - if ( - info.exception === true || - !level || - this.levels[level] >= this.levels[info[LEVEL]] - ) { - // Ensure the info object is valid based on `{ exception }`: - // 1. { handleExceptions: true }: all `info` objects are valid - // 2. { exception: false }: accepted by all transports. - if (this.handleExceptions || info.exception !== true) { - return true; - } - } - - return false; -}; - -/** - * _nop is short for "No operation" - * @returns {Boolean} Intentionally false. - */ -TransportStream.prototype._nop = function _nop() { - // eslint-disable-next-line no-undefined - return void undefined; -}; - - -/***/ }), - -/***/ 9654: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * winston.js: Top-level include defining Winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const logform = __nccwpck_require__(6946); -const { warn } = __nccwpck_require__(9652); - -/** - * Expose version. Use `require` method for `webpack` support. - * @type {string} - */ -exports.version = __nccwpck_require__(1306).version; -/** - * Include transports defined by default by winston - * @type {Array} - */ -exports.transports = __nccwpck_require__(8640); -/** - * Expose utility methods - * @type {Object} - */ -exports.config = __nccwpck_require__(1456); -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ -exports.addColors = logform.levels; -/** - * Hoist format-related functionality from logform. - * @type {Object} - */ -exports.format = logform.format; -/** - * Expose core Logging-related prototypes. - * @type {function} - */ -exports.createLogger = __nccwpck_require__(2950); -/** - * Expose core Logging-related prototypes. - * @type {function} - */ -exports.Logger = __nccwpck_require__(5325); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -exports.ExceptionHandler = __nccwpck_require__(321); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -exports.RejectionHandler = __nccwpck_require__(7699); -/** - * Expose core Logging-related prototypes. - * @type {Container} - */ -exports.Container = __nccwpck_require__(4926); -/** - * Expose core Logging-related prototypes. - * @type {Object} - */ -exports.Transport = __nccwpck_require__(3766); -/** - * We create and expose a default `Container` to `winston.loggers` so that the - * programmer may manage multiple `winston.Logger` instances without any - * additional overhead. - * @example - * // some-file1.js - * const logger = require('winston').loggers.get('something'); - * - * // some-file2.js - * const logger = require('winston').loggers.get('something'); - */ -exports.loggers = new exports.Container(); - -/** - * We create and expose a 'defaultLogger' so that the programmer may do the - * following without the need to create an instance of winston.Logger directly: - * @example - * const winston = require('winston'); - * winston.log('info', 'some message'); - * winston.error('some error'); - */ -const defaultLogger = exports.createLogger(); - -// Pass through the target methods onto `winston. -Object.keys(exports.config.npm.levels) - .concat([ - 'log', - 'query', - 'stream', - 'add', - 'remove', - 'clear', - 'profile', - 'startTimer', - 'handleExceptions', - 'unhandleExceptions', - 'handleRejections', - 'unhandleRejections', - 'configure', - 'child' - ]) - .forEach( - method => (exports[method] = (...args) => defaultLogger[method](...args)) - ); - -/** - * Define getter / setter for the default logger level which need to be exposed - * by winston. - * @type {string} - */ -Object.defineProperty(exports, "level", ({ - get() { - return defaultLogger.level; - }, - set(val) { - defaultLogger.level = val; - } -})); - -/** - * Define getter for `exceptions` which replaces `handleExceptions` and - * `unhandleExceptions`. - * @type {Object} - */ -Object.defineProperty(exports, "exceptions", ({ - get() { - return defaultLogger.exceptions; - } -})); - -/** - * Define getter for `rejections` which replaces `handleRejections` and - * `unhandleRejections`. - * @type {Object} - */ -Object.defineProperty(exports, "rejections", ({ - get() { - return defaultLogger.rejections; - } -})); - -/** - * Define getters / setters for appropriate properties of the default logger - * which need to be exposed by winston. - * @type {Logger} - */ -['exitOnError'].forEach(prop => { - Object.defineProperty(exports, prop, { - get() { - return defaultLogger[prop]; - }, - set(val) { - defaultLogger[prop] = val; - } - }); -}); - -/** - * The default transports and exceptionHandlers for the default winston logger. - * @type {Object} - */ -Object.defineProperty(exports, "default", ({ - get() { - return { - exceptionHandlers: defaultLogger.exceptionHandlers, - rejectionHandlers: defaultLogger.rejectionHandlers, - transports: defaultLogger.transports - }; - } -})); - -// Have friendlier breakage notices for properties that were exposed by default -// on winston < 3.0. -warn.deprecated(exports, 'setLevels'); -warn.forFunctions(exports, 'useFormat', ['cli']); -warn.forProperties(exports, 'useFormat', ['padLevels', 'stripColors']); -warn.forFunctions(exports, 'deprecated', [ - 'addRewriter', - 'addFilter', - 'clone', - 'extend' -]); -warn.forProperties(exports, 'deprecated', ['emitErrs', 'levelLength']); - - - -/***/ }), - -/***/ 9652: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * common.js: Internal helper and utility functions for winston. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const { format } = __nccwpck_require__(9023); - -/** - * Set of simple deprecation notices and a way to expose them for a set of - * properties. - * @type {Object} - * @private - */ -exports.warn = { - deprecated(prop) { - return () => { - throw new Error(format('{ %s } was removed in winston@3.0.0.', prop)); - }; - }, - useFormat(prop) { - return () => { - throw new Error([ - format('{ %s } was removed in winston@3.0.0.', prop), - 'Use a custom winston.format = winston.format(function) instead.' - ].join('\n')); - }; - }, - forFunctions(obj, type, props) { - props.forEach(prop => { - obj[prop] = exports.warn[type](prop); - }); - }, - forProperties(obj, type, props) { - props.forEach(prop => { - const notice = exports.warn[type](prop); - Object.defineProperty(obj, prop, { - get: notice, - set: notice - }); - }); - } -}; - - -/***/ }), - -/***/ 1456: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * index.js: Default settings for all levels that winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const logform = __nccwpck_require__(6946); -const { configs } = __nccwpck_require__(1255); - -/** - * Export config set for the CLI. - * @type {Object} - */ -exports.cli = logform.levels(configs.cli); - -/** - * Export config set for npm. - * @type {Object} - */ -exports.npm = logform.levels(configs.npm); - -/** - * Export config set for the syslog. - * @type {Object} - */ -exports.syslog = logform.levels(configs.syslog); - -/** - * Hoist addColors from logform where it was refactored into in winston@3. - * @type {Object} - */ -exports.addColors = logform.levels; - - -/***/ }), - -/***/ 4926: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * container.js: Inversion of control container for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const createLogger = __nccwpck_require__(2950); - -/** - * Inversion of control container for winston logger instances. - * @type {Container} - */ -module.exports = class Container { - /** - * Constructor function for the Container object responsible for managing a - * set of `winston.Logger` instances based on string ids. - * @param {!Object} [options={}] - Default pass-thru options for Loggers. - */ - constructor(options = {}) { - this.loggers = new Map(); - this.options = options; - } - - /** - * Retrieves a `winston.Logger` instance for the specified `id`. If an - * instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - add(id, options) { - if (!this.loggers.has(id)) { - // Remark: Simple shallow clone for configuration options in case we pass - // in instantiated protoypal objects - options = Object.assign({}, options || this.options); - const existing = options.transports || this.options.transports; - - // Remark: Make sure if we have an array of transports we slice it to - // make copies of those references. - if (existing) { - options.transports = Array.isArray(existing) ? existing.slice() : [existing]; - } else { - options.transports = []; - } - - const logger = createLogger(options); - logger.on('close', () => this._delete(id)); - this.loggers.set(id, logger); - } - - return this.loggers.get(id); - } - - /** - * Retreives a `winston.Logger` instance for the specified `id`. If - * an instance does not exist, one is created. - * @param {!string} id - The id of the Logger to get. - * @param {?Object} [options] - Options for the Logger instance. - * @returns {Logger} - A configured Logger instance with a specified id. - */ - get(id, options) { - return this.add(id, options); - } - - /** - * Check if the container has a logger with the id. - * @param {?string} id - The id of the Logger instance to find. - * @returns {boolean} - Boolean value indicating if this instance has a - * logger with the specified `id`. - */ - has(id) { - return !!this.loggers.has(id); - } - - /** - * Closes a `Logger` instance with the specified `id` if it exists. - * If no `id` is supplied then all Loggers are closed. - * @param {?string} id - The id of the Logger instance to close. - * @returns {undefined} - */ - close(id) { - if (id) { - return this._removeLogger(id); - } - - this.loggers.forEach((val, key) => this._removeLogger(key)); - } - - /** - * Remove a logger based on the id. - * @param {!string} id - The id of the logger to remove. - * @returns {undefined} - * @private - */ - _removeLogger(id) { - if (!this.loggers.has(id)) { - return; - } - - const logger = this.loggers.get(id); - logger.close(); - this._delete(id); - } - - /** - * Deletes a `Logger` instance with the specified `id`. - * @param {!string} id - The id of the Logger instance to delete from - * container. - * @returns {undefined} - * @private - */ - _delete(id) { - this.loggers.delete(id); - } -}; - - -/***/ }), - -/***/ 2950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * create-logger.js: Logger factory for winston logger instances. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const { LEVEL } = __nccwpck_require__(1255); -const config = __nccwpck_require__(1456); -const Logger = __nccwpck_require__(5325); -const debug = __nccwpck_require__(6302)('winston:create-logger'); - -function isLevelEnabledFunctionName(level) { - return 'is' + level.charAt(0).toUpperCase() + level.slice(1) + 'Enabled'; -} - -/** - * Create a new instance of a winston Logger. Creates a new - * prototype for each instance. - * @param {!Object} opts - Options for the created logger. - * @returns {Logger} - A newly created logger instance. - */ -module.exports = function (opts = {}) { - // - // Default levels: npm - // - opts.levels = opts.levels || config.npm.levels; - - /** - * DerivedLogger to attach the logs level methods. - * @type {DerivedLogger} - * @extends {Logger} - */ - class DerivedLogger extends Logger { - /** - * Create a new class derived logger for which the levels can be attached to - * the prototype of. This is a V8 optimization that is well know to increase - * performance of prototype functions. - * @param {!Object} options - Options for the created logger. - */ - constructor(options) { - super(options); - } - } - - const logger = new DerivedLogger(opts); - - // - // Create the log level methods for the derived logger. - // - Object.keys(opts.levels).forEach(function (level) { - debug('Define prototype method for "%s"', level); - if (level === 'log') { - // eslint-disable-next-line no-console - console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.'); - return; - } - - // - // Define prototype methods for each log level e.g.: - // logger.log('info', msg) implies these methods are defined: - // - logger.info(msg) - // - logger.isInfoEnabled() - // - // Remark: to support logger.child this **MUST** be a function - // so it'll always be called on the instance instead of a fixed - // place in the prototype chain. - // - DerivedLogger.prototype[level] = function (...args) { - // Prefer any instance scope, but default to "root" logger - const self = this || logger; - - // Optimize the hot-path which is the single object. - if (args.length === 1) { - const [msg] = args; - const info = msg && msg.message && msg || { message: msg }; - info.level = info[LEVEL] = level; - self._addDefaultMeta(info); - self.write(info); - return (this || logger); - } - - // When provided nothing assume the empty string - if (args.length === 0) { - self.log(level, ''); - return self; - } - - // Otherwise build argument list which could potentially conform to - // either: - // . v3 API: log(obj) - // 2. v1/v2 API: log(level, msg, ... [string interpolate], [{metadata}], [callback]) - return self.log(level, ...args); - }; - - DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function () { - return (this || logger).isLevelEnabled(level); - }; - }); - - return logger; -}; - - -/***/ }), - -/***/ 321: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const os = __nccwpck_require__(857); -const asyncForEach = __nccwpck_require__(3342); -const debug = __nccwpck_require__(6302)('winston:exception'); -const once = __nccwpck_require__(9224); -const stackTrace = __nccwpck_require__(1546); -const ExceptionStream = __nccwpck_require__(9345); - -/** - * Object for handling uncaughtException events. - * @type {ExceptionHandler} - */ -module.exports = class ExceptionHandler { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - constructor(logger) { - if (!logger) { - throw new Error('Logger is required to handle exceptions'); - } - - this.logger = logger; - this.handlers = new Map(); - } - - /** - * Handles `uncaughtException` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - handle(...args) { - args.forEach(arg => { - if (Array.isArray(arg)) { - return arg.forEach(handler => this._addHandler(handler)); - } - - this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._uncaughtException.bind(this); - process.on('uncaughtException', this.catcher); - } - } - - /** - * Removes any handlers to `uncaughtException` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - unhandle() { - if (this.catcher) { - process.removeListener('uncaughtException', this.catcher); - this.catcher = false; - - Array.from(this.handlers.values()) - .forEach(wrapper => this.logger.unpipe(wrapper)); - } - } - - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - getAllInfo(err) { - let message = null; - if (err) { - message = typeof err === 'string' ? err : err.message; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: [ - `uncaughtException: ${(message || '(no error message)')}`, - err && err.stack || ' No stack trace' - ].join('\n'), - stack: err && err.stack, - exception: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - getTrace(err) { - const trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(site => { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - function: site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - native: site.isNative() - }; - }); - } - - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleExceptions = true; - const wrapper = new ExceptionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - _uncaughtException(err) { - const info = this.getAllInfo(err); - const handlers = this._getExceptionHandlers(); - // Calculate if we should exit on this error - let doExit = typeof this.logger.exitOnError === 'function' - ? this.logger.exitOnError(err) - : this.logger.exitOnError; - let timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no exception handlers.'); - // eslint-disable-next-line no-console - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any exceptions from transports when - // catching uncaught exceptions. - if (timeout) { - clearTimeout(timeout); - } - // eslint-disable-next-line no-process-exit - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } - - // Log to all transports attempting to listen for when they are completed. - asyncForEach(handlers, (handler, next) => { - const done = once(next); - const transport = handler.transport || handler; - - // Debug wrapping so that we can inspect what's going on under the covers. - function onDone(event) { - return () => { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, () => doExit && gracefulExit()); - - this.logger.log(info); - - // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - _getExceptionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleExceptions: true` - return this.logger.transports.filter(wrap => { - const transport = wrap.transport || wrap; - return transport.handleExceptions; - }); - } -}; - - -/***/ }), - -/***/ 9345: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * exception-stream.js: TODO: add file header handler. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const { Writable } = __nccwpck_require__(436); - -/** - * TODO: add class description. - * @type {ExceptionStream} - * @extends {Writable} - */ -module.exports = class ExceptionStream extends Writable { - /** - * Constructor function for the ExceptionStream responsible for wrapping a - * TransportStream; only allowing writes of `info` objects with - * `info.exception` set to true. - * @param {!TransportStream} transport - Stream to filter to exceptions - */ - constructor(transport) { - super({ objectMode: true }); - - if (!transport) { - throw new Error('ExceptionStream requires a TransportStream instance.'); - } - - // Remark (indexzero): we set `handleExceptions` here because it's the - // predicate checked in ExceptionHandler.prototype.__getExceptionHandlers - this.handleExceptions = true; - this.transport = transport; - } - - /** - * Writes the info object to our transport instance if (and only if) the - * `exception` property is set on the info. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {mixed} - TODO: add return description. - * @private - */ - _write(info, enc, callback) { - if (info.exception) { - return this.transport.log(info, callback); - } - - callback(); - return true; - } -}; - - -/***/ }), - -/***/ 5325: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * logger.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const { Stream, Transform } = __nccwpck_require__(436); -const asyncForEach = __nccwpck_require__(3342); -const { LEVEL, SPLAT } = __nccwpck_require__(1255); -const isStream = __nccwpck_require__(1066); -const ExceptionHandler = __nccwpck_require__(321); -const RejectionHandler = __nccwpck_require__(7699); -const LegacyTransportStream = __nccwpck_require__(6540); -const Profiler = __nccwpck_require__(1944); -const { warn } = __nccwpck_require__(9652); -const config = __nccwpck_require__(1456); - -/** - * Captures the number of format (i.e. %s strings) in a given string. - * Based on `util.format`, see Node.js source: - * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230 - * @type {RegExp} - */ -const formatRegExp = /%[scdjifoO%]/g; - -/** - * TODO: add class description. - * @type {Logger} - * @extends {Transform} - */ -class Logger extends Transform { - /** - * Constructor function for the Logger object responsible for persisting log - * messages and metadata to one or more transports. - * @param {!Object} options - foo - */ - constructor(options) { - super({ objectMode: true }); - this.configure(options); - } - - child(defaultRequestMetadata) { - const logger = this; - return Object.create(logger, { - write: { - value: function (info) { - const infoClone = Object.assign( - {}, - defaultRequestMetadata, - info - ); - - // Object.assign doesn't copy inherited Error - // properties so we have to do that explicitly - // - // Remark (indexzero): we should remove this - // since the errors format will handle this case. - // - if (info instanceof Error) { - infoClone.stack = info.stack; - infoClone.message = info.message; - infoClone.cause = info.cause; - } - - logger.write(infoClone); - } - } - }); - } - - /** - * This will wholesale reconfigure this instance by: - * 1. Resetting all transports. Older transports will be removed implicitly. - * 2. Set all other options including levels, colors, rewriters, filters, - * exceptionHandlers, etc. - * @param {!Object} options - TODO: add param description. - * @returns {undefined} - */ - configure({ - silent, - format, - defaultMeta, - levels, - level = 'info', - exitOnError = true, - transports, - colors, - emitErrs, - formatters, - padLevels, - rewriters, - stripColors, - exceptionHandlers, - rejectionHandlers - } = {}) { - // Reset transports if we already have them - if (this.transports.length) { - this.clear(); - } - - this.silent = silent; - this.format = format || this.format || __nccwpck_require__(6810)(); - - this.defaultMeta = defaultMeta || null; - // Hoist other options onto this instance. - this.levels = levels || this.levels || config.npm.levels; - this.level = level; - if (this.exceptions) { - this.exceptions.unhandle(); - } - if (this.rejections) { - this.rejections.unhandle(); - } - this.exceptions = new ExceptionHandler(this); - this.rejections = new RejectionHandler(this); - this.profilers = {}; - this.exitOnError = exitOnError; - - // Add all transports we have been provided. - if (transports) { - transports = Array.isArray(transports) ? transports : [transports]; - transports.forEach(transport => this.add(transport)); - } - - if ( - colors || - emitErrs || - formatters || - padLevels || - rewriters || - stripColors - ) { - throw new Error( - [ - '{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.', - 'Use a custom winston.format(function) instead.', - 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md' - ].join('\n') - ); - } - - if (exceptionHandlers) { - this.exceptions.handle(exceptionHandlers); - } - if (rejectionHandlers) { - this.rejections.handle(rejectionHandlers); - } - } - - /* eslint-disable valid-jsdoc */ - /** - * Helper method to get the highest logging level associated with a logger - * - * @returns { number | null } - The highest configured logging level, null - * for invalid configuration - */ - getHighestLogLevel() { - // This can be null, if this.level has an invalid value - const configuredLevelValue = getLevelValue(this.levels, this.level); - - // If there are no transports, return the level configured at the logger level - if (!this.transports || this.transports.length === 0) { - return configuredLevelValue; - } - - return this.transports.reduce((max, transport) => { - const levelValue = getLevelValue(this.levels, transport.level); - return levelValue !== null && levelValue > max ? levelValue : max; - }, configuredLevelValue); - } - - isLevelEnabled(level) { - const givenLevelValue = getLevelValue(this.levels, level); - if (givenLevelValue === null) { - return false; - } - - const configuredLevelValue = getLevelValue(this.levels, this.level); - if (configuredLevelValue === null) { - return false; - } - - if (!this.transports || this.transports.length === 0) { - return configuredLevelValue >= givenLevelValue; - } - - const index = this.transports.findIndex(transport => { - let transportLevelValue = getLevelValue(this.levels, transport.level); - if (transportLevelValue === null) { - transportLevelValue = configuredLevelValue; - } - return transportLevelValue >= givenLevelValue; - }); - return index !== -1; - } - - /* eslint-disable valid-jsdoc */ - /** - * Ensure backwards compatibility with a `log` method - * @param {mixed} level - Level the log message is written at. - * @param {mixed} msg - TODO: add param description. - * @param {mixed} meta - TODO: add param description. - * @returns {Logger} - TODO: add return description. - * - * @example - * // Supports the existing API: - * logger.log('info', 'Hello world', { custom: true }); - * logger.log('info', new Error('Yo, it\'s on fire')); - * - * // Requires winston.format.splat() - * logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true }); - * - * // And the new API with a single JSON literal: - * logger.log({ level: 'info', message: 'Hello world', custom: true }); - * logger.log({ level: 'info', message: new Error('Yo, it\'s on fire') }); - * - * // Also requires winston.format.splat() - * logger.log({ - * level: 'info', - * message: '%s %d%%', - * [SPLAT]: ['A string', 50], - * meta: { thisIsMeta: true } - * }); - * - */ - /* eslint-enable valid-jsdoc */ - log(level, msg, ...splat) { - // eslint-disable-line max-params - // Optimize for the hotpath of logging JSON literals - if (arguments.length === 1) { - // Yo dawg, I heard you like levels ... seriously ... - // In this context the LHS `level` here is actually the `info` so read - // this as: info[LEVEL] = info.level; - level[LEVEL] = level.level; - this._addDefaultMeta(level); - this.write(level); - return this; - } - - // Slightly less hotpath, but worth optimizing for. - if (arguments.length === 2) { - if (msg && typeof msg === 'object') { - msg[LEVEL] = msg.level = level; - this._addDefaultMeta(msg); - this.write(msg); - return this; - } - - msg = { [LEVEL]: level, level, message: msg }; - this._addDefaultMeta(msg); - this.write(msg); - return this; - } - - const [meta] = splat; - if (typeof meta === 'object' && meta !== null) { - // Extract tokens, if none available default to empty array to - // ensure consistancy in expected results - const tokens = msg && msg.match && msg.match(formatRegExp); - - if (!tokens) { - const info = Object.assign({}, this.defaultMeta, meta, { - [LEVEL]: level, - [SPLAT]: splat, - level, - message: msg - }); - - if (meta.message) info.message = `${info.message} ${meta.message}`; - if (meta.stack) info.stack = meta.stack; - if (meta.cause) info.cause = meta.cause; - - this.write(info); - return this; - } - } - - this.write(Object.assign({}, this.defaultMeta, { - [LEVEL]: level, - [SPLAT]: splat, - level, - message: msg - })); - - return this; - } - - /** - * Pushes data so that it can be picked up by all of our pipe targets. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - Continues stream processing. - * @returns {undefined} - * @private - */ - _transform(info, enc, callback) { - if (this.silent) { - return callback(); - } - - // [LEVEL] is only soft guaranteed to be set here since we are a proper - // stream. It is likely that `info` came in through `.log(info)` or - // `.info(info)`. If it is not defined, however, define it. - // This LEVEL symbol is provided by `triple-beam` and also used in: - // - logform - // - winston-transport - // - abstract-winston-transport - if (!info[LEVEL]) { - info[LEVEL] = info.level; - } - - // Remark: really not sure what to do here, but this has been reported as - // very confusing by pre winston@2.0.0 users as quite confusing when using - // custom levels. - if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) { - // eslint-disable-next-line no-console - console.error('[winston] Unknown logger level: %s', info[LEVEL]); - } - - // Remark: not sure if we should simply error here. - if (!this._readableState.pipes) { - // eslint-disable-next-line no-console - console.error( - '[winston] Attempt to write logs with no transports, which can increase memory usage: %j', - info - ); - } - - // Here we write to the `format` pipe-chain, which on `readable` above will - // push the formatted `info` Object onto the buffer for this instance. We trap - // (and re-throw) any errors generated by the user-provided format, but also - // guarantee that the streams callback is invoked so that we can continue flowing. - try { - this.push(this.format.transform(info, this.format.options)); - } finally { - this._writableState.sync = false; - // eslint-disable-next-line callback-return - callback(); - } - } - - /** - * Delays the 'finish' event until all transport pipe targets have - * also emitted 'finish' or are already finished. - * @param {mixed} callback - Continues stream processing. - */ - _final(callback) { - const transports = this.transports.slice(); - asyncForEach( - transports, - (transport, next) => { - if (!transport || transport.finished) return setImmediate(next); - transport.once('finish', next); - transport.end(); - }, - callback - ); - } - - /** - * Adds the transport to this logger instance by piping to it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - add(transport) { - // Support backwards compatibility with all existing `winston < 3.x.x` - // transports which meet one of two criteria: - // 1. They inherit from winston.Transport in < 3.x.x which is NOT a stream. - // 2. They expose a log method which has a length greater than 2 (i.e. more then - // just `log(info, callback)`. - const target = - !isStream(transport) || transport.log.length > 2 - ? new LegacyTransportStream({ transport }) - : transport; - - if (!target._writableState || !target._writableState.objectMode) { - throw new Error( - 'Transports must WritableStreams in objectMode. Set { objectMode: true }.' - ); - } - - // Listen for the `error` event and the `warn` event on the new Transport. - this._onEvent('error', target); - this._onEvent('warn', target); - this.pipe(target); - - if (transport.handleExceptions) { - this.exceptions.handle(); - } - - if (transport.handleRejections) { - this.rejections.handle(); - } - - return this; - } - - /** - * Removes the transport from this logger instance by unpiping from it. - * @param {mixed} transport - TODO: add param description. - * @returns {Logger} - TODO: add return description. - */ - remove(transport) { - if (!transport) return this; - let target = transport; - if (!isStream(transport) || transport.log.length > 2) { - target = this.transports.filter( - match => match.transport === transport - )[0]; - } - - if (target) { - this.unpipe(target); - } - return this; - } - - /** - * Removes all transports from this logger instance. - * @returns {Logger} - TODO: add return description. - */ - clear() { - this.unpipe(); - return this; - } - - /** - * Cleans up resources (streams, event listeners) for all transports - * associated with this instance (if necessary). - * @returns {Logger} - TODO: add return description. - */ - close() { - this.exceptions.unhandle(); - this.rejections.unhandle(); - this.clear(); - this.emit('close'); - return this; - } - - /** - * Sets the `target` levels specified on this instance. - * @param {Object} Target levels to use on this instance. - */ - setLevels() { - warn.deprecated('setLevels'); - } - - /** - * Queries the all transports for this instance with the specified `options`. - * This will aggregate each transport's results into one object containing - * a property per transport. - * @param {Object} options - Query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = options || {}; - const results = {}; - const queryObject = Object.assign({}, options.query || {}); - - // Helper function to query a single transport - function queryTransport(transport, next) { - if (options.query && typeof transport.formatQuery === 'function') { - options.query = transport.formatQuery(queryObject); - } - - transport.query(options, (err, res) => { - if (err) { - return next(err); - } - - if (typeof transport.formatResults === 'function') { - res = transport.formatResults(res, options.format); - } - - next(null, res); - }); - } - - // Helper function to accumulate the results from `queryTransport` into - // the `results`. - function addResults(transport, next) { - queryTransport(transport, (err, result) => { - // queryTransport could potentially invoke the callback multiple times - // since Transport code can be unpredictable. - if (next) { - result = err || result; - if (result) { - results[transport.name] = result; - } - - // eslint-disable-next-line callback-return - next(); - } - - next = null; - }); - } - - // Iterate over the transports in parallel setting the appropriate key in - // the `results`. - asyncForEach( - this.transports.filter(transport => !!transport.query), - addResults, - () => callback(null, results) - ); - } - - /** - * Returns a log stream for all transports. Options object is optional. - * @param{Object} options={} - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - */ - stream(options = {}) { - const out = new Stream(); - const streams = []; - - out._streams = streams; - out.destroy = () => { - let i = streams.length; - while (i--) { - streams[i].destroy(); - } - }; - - // Create a list of all transports for this instance. - this.transports - .filter(transport => !!transport.stream) - .forEach(transport => { - const str = transport.stream(options); - if (!str) { - return; - } - - streams.push(str); - - str.on('log', log => { - log.transport = log.transport || []; - log.transport.push(transport.name); - out.emit('log', log); - }); - - str.on('error', err => { - err.transport = err.transport || []; - err.transport.push(transport.name); - out.emit('error', err); - }); - }); - - return out; - } - - /** - * Returns an object corresponding to a specific timing. When done is called - * the timer will finish and log the duration. e.g.: - * @returns {Profile} - TODO: add return description. - * @example - * const timer = winston.startTimer() - * setTimeout(() => { - * timer.done({ - * message: 'Logging message' - * }); - * }, 1000); - */ - startTimer() { - return new Profiler(this); - } - - /** - * Tracks the time inbetween subsequent calls to this method with the same - * `id` parameter. The second call to this method will log the difference in - * milliseconds along with the message. - * @param {string} id Unique id of the profiler - * @returns {Logger} - TODO: add return description. - */ - profile(id, ...args) { - const time = Date.now(); - if (this.profilers[id]) { - const timeEnd = this.profilers[id]; - delete this.profilers[id]; - - // Attempt to be kind to users if they are still using older APIs. - if (typeof args[args.length - 2] === 'function') { - // eslint-disable-next-line no-console - console.warn( - 'Callback function no longer supported as of winston@3.0.0' - ); - args.pop(); - } - - // Set the duration property of the metadata - const info = typeof args[args.length - 1] === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = time - timeEnd; - info.message = info.message || id; - return this.write(info); - } - - this.profilers[id] = time; - return this; - } - - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - handleExceptions(...args) { - // eslint-disable-next-line no-console - console.warn( - 'Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()' - ); - this.exceptions.handle(...args); - } - - /** - * Backwards compatibility to `exceptions.handle` in winston < 3.0.0. - * @returns {undefined} - * @deprecated - */ - unhandleExceptions(...args) { - // eslint-disable-next-line no-console - console.warn( - 'Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()' - ); - this.exceptions.unhandle(...args); - } - - /** - * Throw a more meaningful deprecation notice - * @throws {Error} - TODO: add throws description. - */ - cli() { - throw new Error( - [ - 'Logger.cli() was removed in winston@3.0.0', - 'Use a custom winston.formats.cli() instead.', - 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md' - ].join('\n') - ); - } - - /** - * Bubbles the `event` that occured on the specified `transport` up - * from this instance. - * @param {string} event - The event that occured - * @param {Object} transport - Transport on which the event occured - * @private - */ - _onEvent(event, transport) { - function transportEvent(err) { - // https://github.com/winstonjs/winston/issues/1364 - if (event === 'error' && !this.transports.includes(transport)) { - this.add(transport); - } - this.emit(event, err, transport); - } - - if (!transport['__winston' + event]) { - transport['__winston' + event] = transportEvent.bind(this); - transport.on(event, transport['__winston' + event]); - } - } - - _addDefaultMeta(msg) { - if (this.defaultMeta) { - Object.assign(msg, this.defaultMeta); - } - } -} - -function getLevelValue(levels, level) { - const value = levels[level]; - if (!value && value !== 0) { - return null; - } - return value; -} - -/** - * Represents the current readableState pipe targets for this Logger instance. - * @type {Array|Object} - */ -Object.defineProperty(Logger.prototype, 'transports', { - configurable: false, - enumerable: true, - get() { - const { pipes } = this._readableState; - return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes; - } -}); - -module.exports = Logger; - - -/***/ }), - -/***/ 1944: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * profiler.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - -/** - * TODO: add class description. - * @type {Profiler} - * @private - */ -class Profiler { - /** - * Constructor function for the Profiler instance used by - * `Logger.prototype.startTimer`. When done is called the timer will finish - * and log the duration. - * @param {!Logger} logger - TODO: add param description. - * @private - */ - constructor(logger) { - const Logger = __nccwpck_require__(5325); - if (typeof logger !== 'object' || Array.isArray(logger) || !(logger instanceof Logger)) { - throw new Error('Logger is required for profiling'); - } else { - this.logger = logger; - this.start = Date.now(); - } - } - - /** - * Ends the current timer (i.e. Profiler) instance and logs the `msg` along - * with the duration since creation. - * @returns {mixed} - TODO: add return description. - * @private - */ - done(...args) { - if (typeof args[args.length - 1] === 'function') { - // eslint-disable-next-line no-console - console.warn('Callback function no longer supported as of winston@3.0.0'); - args.pop(); - } - - const info = typeof args[args.length - 1] === 'object' ? args.pop() : {}; - info.level = info.level || 'info'; - info.durationMs = (Date.now()) - this.start; - - return this.logger.write(info); - } -} - -module.exports = Profiler; - - -/***/ }), - -/***/ 7699: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * exception-handler.js: Object for handling uncaughtException events. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const os = __nccwpck_require__(857); -const asyncForEach = __nccwpck_require__(3342); -const debug = __nccwpck_require__(6302)('winston:rejection'); -const once = __nccwpck_require__(9224); -const stackTrace = __nccwpck_require__(1546); -const RejectionStream = __nccwpck_require__(9951); - -/** - * Object for handling unhandledRejection events. - * @type {RejectionHandler} - */ -module.exports = class RejectionHandler { - /** - * TODO: add contructor description - * @param {!Logger} logger - TODO: add param description - */ - constructor(logger) { - if (!logger) { - throw new Error('Logger is required to handle rejections'); - } - - this.logger = logger; - this.handlers = new Map(); - } - - /** - * Handles `unhandledRejection` events for the current process by adding any - * handlers passed in. - * @returns {undefined} - */ - handle(...args) { - args.forEach(arg => { - if (Array.isArray(arg)) { - return arg.forEach(handler => this._addHandler(handler)); - } - - this._addHandler(arg); - }); - - if (!this.catcher) { - this.catcher = this._unhandledRejection.bind(this); - process.on('unhandledRejection', this.catcher); - } - } - - /** - * Removes any handlers to `unhandledRejection` events for the current - * process. This does not modify the state of the `this.handlers` set. - * @returns {undefined} - */ - unhandle() { - if (this.catcher) { - process.removeListener('unhandledRejection', this.catcher); - this.catcher = false; - - Array.from(this.handlers.values()).forEach(wrapper => - this.logger.unpipe(wrapper) - ); - } - } - - /** - * TODO: add method description - * @param {Error} err - Error to get information about. - * @returns {mixed} - TODO: add return description. - */ - getAllInfo(err) { - let message = null; - if (err) { - message = typeof err === 'string' ? err : err.message; - } - - return { - error: err, - // TODO (indexzero): how do we configure this? - level: 'error', - message: [ - `unhandledRejection: ${message || '(no error message)'}`, - err && err.stack || ' No stack trace' - ].join('\n'), - stack: err && err.stack, - rejection: true, - date: new Date().toString(), - process: this.getProcessInfo(), - os: this.getOsInfo(), - trace: this.getTrace(err) - }; - } - - /** - * Gets all relevant process information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getProcessInfo() { - return { - pid: process.pid, - uid: process.getuid ? process.getuid() : null, - gid: process.getgid ? process.getgid() : null, - cwd: process.cwd(), - execPath: process.execPath, - version: process.version, - argv: process.argv, - memoryUsage: process.memoryUsage() - }; - } - - /** - * Gets all relevant OS information for the currently running process. - * @returns {mixed} - TODO: add return description. - */ - getOsInfo() { - return { - loadavg: os.loadavg(), - uptime: os.uptime() - }; - } - - /** - * Gets a stack trace for the specified error. - * @param {mixed} err - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - getTrace(err) { - const trace = err ? stackTrace.parse(err) : stackTrace.get(); - return trace.map(site => { - return { - column: site.getColumnNumber(), - file: site.getFileName(), - function: site.getFunctionName(), - line: site.getLineNumber(), - method: site.getMethodName(), - native: site.isNative() - }; - }); - } - - /** - * Helper method to add a transport as an exception handler. - * @param {Transport} handler - The transport to add as an exception handler. - * @returns {void} - */ - _addHandler(handler) { - if (!this.handlers.has(handler)) { - handler.handleRejections = true; - const wrapper = new RejectionStream(handler); - this.handlers.set(handler, wrapper); - this.logger.pipe(wrapper); - } - } - - /** - * Logs all relevant information around the `err` and exits the current - * process. - * @param {Error} err - Error to handle - * @returns {mixed} - TODO: add return description. - * @private - */ - _unhandledRejection(err) { - const info = this.getAllInfo(err); - const handlers = this._getRejectionHandlers(); - // Calculate if we should exit on this error - let doExit = - typeof this.logger.exitOnError === 'function' - ? this.logger.exitOnError(err) - : this.logger.exitOnError; - let timeout; - - if (!handlers.length && doExit) { - // eslint-disable-next-line no-console - console.warn('winston: exitOnError cannot be true with no rejection handlers.'); - // eslint-disable-next-line no-console - console.warn('winston: not exiting process.'); - doExit = false; - } - - function gracefulExit() { - debug('doExit', doExit); - debug('process._exiting', process._exiting); - - if (doExit && !process._exiting) { - // Remark: Currently ignoring any rejections from transports when - // catching unhandled rejections. - if (timeout) { - clearTimeout(timeout); - } - // eslint-disable-next-line no-process-exit - process.exit(1); - } - } - - if (!handlers || handlers.length === 0) { - return process.nextTick(gracefulExit); - } - - // Log to all transports attempting to listen for when they are completed. - asyncForEach( - handlers, - (handler, next) => { - const done = once(next); - const transport = handler.transport || handler; - - // Debug wrapping so that we can inspect what's going on under the covers. - function onDone(event) { - return () => { - debug(event); - done(); - }; - } - - transport._ending = true; - transport.once('finish', onDone('finished')); - transport.once('error', onDone('error')); - }, - () => doExit && gracefulExit() - ); - - this.logger.log(info); - - // If exitOnError is true, then only allow the logging of exceptions to - // take up to `3000ms`. - if (doExit) { - timeout = setTimeout(gracefulExit, 3000); - } - } - - /** - * Returns the list of transports and exceptionHandlers for this instance. - * @returns {Array} - List of transports and exceptionHandlers for this - * instance. - * @private - */ - _getRejectionHandlers() { - // Remark (indexzero): since `logger.transports` returns all of the pipes - // from the _readableState of the stream we actually get the join of the - // explicit handlers and the implicit transports with - // `handleRejections: true` - return this.logger.transports.filter(wrap => { - const transport = wrap.transport || wrap; - return transport.handleRejections; - }); - } -}; - - -/***/ }), - -/***/ 9951: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * rejection-stream.js: TODO: add file header handler. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const { Writable } = __nccwpck_require__(436); - -/** - * TODO: add class description. - * @type {RejectionStream} - * @extends {Writable} - */ -module.exports = class RejectionStream extends Writable { - /** - * Constructor function for the RejectionStream responsible for wrapping a - * TransportStream; only allowing writes of `info` objects with - * `info.rejection` set to true. - * @param {!TransportStream} transport - Stream to filter to rejections - */ - constructor(transport) { - super({ objectMode: true }); - - if (!transport) { - throw new Error('RejectionStream requires a TransportStream instance.'); - } - - this.handleRejections = true; - this.transport = transport; - } - - /** - * Writes the info object to our transport instance if (and only if) the - * `rejection` property is set on the info. - * @param {mixed} info - TODO: add param description. - * @param {mixed} enc - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {mixed} - TODO: add return description. - * @private - */ - _write(info, enc, callback) { - if (info.rejection) { - return this.transport.log(info, callback); - } - - callback(); - return true; - } -}; - - -/***/ }), - -/***/ 8586: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * tail-file.js: TODO: add file header description. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const fs = __nccwpck_require__(9896); -const { StringDecoder } = __nccwpck_require__(3193); -const { Stream } = __nccwpck_require__(436); - -/** - * Simple no-op function. - * @returns {undefined} - */ -function noop() {} - -/** - * TODO: add function description. - * @param {Object} options - Options for tail. - * @param {function} iter - Iterator function to execute on every line. -* `tail -f` a file. Options must include file. - * @returns {mixed} - TODO: add return description. - */ -module.exports = (options, iter) => { - const buffer = Buffer.alloc(64 * 1024); - const decode = new StringDecoder('utf8'); - const stream = new Stream(); - let buff = ''; - let pos = 0; - let row = 0; - - if (options.start === -1) { - delete options.start; - } - - stream.readable = true; - stream.destroy = () => { - stream.destroyed = true; - stream.emit('end'); - stream.emit('close'); - }; - - fs.open(options.file, 'a+', '0644', (err, fd) => { - if (err) { - if (!iter) { - stream.emit('error', err); - } else { - iter(err); - } - stream.destroy(); - return; - } - - (function read() { - if (stream.destroyed) { - fs.close(fd, noop); - return; - } - - return fs.read(fd, buffer, 0, buffer.length, pos, (error, bytes) => { - if (error) { - if (!iter) { - stream.emit('error', error); - } else { - iter(error); - } - stream.destroy(); - return; - } - - if (!bytes) { - if (buff) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', buff); - } else { - iter(null, buff); - } - } - row++; - buff = ''; - } - return setTimeout(read, 1000); - } - - let data = decode.write(buffer.slice(0, bytes)); - if (!iter) { - stream.emit('data', data); - } - - data = (buff + data).split(/\n+/); - - const l = data.length - 1; - let i = 0; - - for (; i < l; i++) { - // eslint-disable-next-line eqeqeq - if (options.start == null || row > options.start) { - if (!iter) { - stream.emit('line', data[i]); - } else { - iter(null, data[i]); - } - } - row++; - } - - buff = data[l]; - pos += bytes; - return read(); - }); - }()); - }); - - if (!iter) { - return stream; - } - - return stream.destroy; -}; - - -/***/ }), - -/***/ 557: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable no-console */ -/* - * console.js: Transport for outputting to the console. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const os = __nccwpck_require__(857); -const { LEVEL, MESSAGE } = __nccwpck_require__(1255); -const TransportStream = __nccwpck_require__(3766); - -/** - * Transport for outputting to the console. - * @type {Console} - * @extends {TransportStream} - */ -module.exports = class Console extends TransportStream { - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - constructor(options = {}) { - super(options); - - // Expose the name of this Transport on the prototype - this.name = options.name || 'console'; - this.stderrLevels = this._stringArrayToSet(options.stderrLevels); - this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels); - this.eol = typeof options.eol === 'string' ? options.eol : os.EOL; - this.forceConsole = options.forceConsole || false; - - // Keep a reference to the log, warn, and error console methods - // in case they get redirected to this transport after the logger is - // instantiated. This prevents a circular reference issue. - this._consoleLog = console.log.bind(console); - this._consoleWarn = console.warn.bind(console); - this._consoleError = console.error.bind(console); - - this.setMaxListeners(30); - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - setImmediate(() => this.emit('logged', info)); - - // Remark: what if there is no raw...? - if (this.stderrLevels[info[LEVEL]]) { - if (console._stderr && !this.forceConsole) { - // Node.js maps `process.stderr` to `console._stderr`. - console._stderr.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.error adds a newline - this._consoleError(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } else if (this.consoleWarnLevels[info[LEVEL]]) { - if (console._stderr && !this.forceConsole) { - // Node.js maps `process.stderr` to `console._stderr`. - // in Node.js console.warn is an alias for console.error - console._stderr.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.warn adds a newline - this._consoleWarn(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } - - if (console._stdout && !this.forceConsole) { - // Node.js maps `process.stdout` to `console._stdout`. - console._stdout.write(`${info[MESSAGE]}${this.eol}`); - } else { - // console.log adds a newline. - this._consoleLog(info[MESSAGE]); - } - - if (callback) { - callback(); // eslint-disable-line callback-return - } - } - - /** - * Returns a Set-like object with strArray's elements as keys (each with the - * value true). - * @param {Array} strArray - Array of Set-elements as strings. - * @param {?string} [errMsg] - Custom error message thrown on invalid input. - * @returns {Object} - TODO: add return description. - * @private - */ - _stringArrayToSet(strArray, errMsg) { - if (!strArray) return {}; - - errMsg = - errMsg || 'Cannot make set from type other than Array of string elements'; - - if (!Array.isArray(strArray)) { - throw new Error(errMsg); - } - - return strArray.reduce((set, el) => { - if (typeof el !== 'string') { - throw new Error(errMsg); - } - set[el] = true; - - return set; - }, {}); - } -}; - - -/***/ }), - -/***/ 7248: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint-disable complexity,max-statements */ -/** - * file.js: Transport for outputting to a local log file. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const fs = __nccwpck_require__(9896); -const path = __nccwpck_require__(6928); -const asyncSeries = __nccwpck_require__(491); -const zlib = __nccwpck_require__(3106); -const { MESSAGE } = __nccwpck_require__(1255); -const { Stream, PassThrough } = __nccwpck_require__(436); -const TransportStream = __nccwpck_require__(3766); -const debug = __nccwpck_require__(6302)('winston:file'); -const os = __nccwpck_require__(857); -const tailFile = __nccwpck_require__(8586); - -/** - * Transport for outputting to a local log file. - * @type {File} - * @extends {TransportStream} - */ -module.exports = class File extends TransportStream { - /** - * Constructor function for the File transport object responsible for - * persisting log messages and metadata to one or more files. - * @param {Object} options - Options for this instance. - */ - constructor(options = {}) { - super(options); - - // Expose the name of this Transport on the prototype. - this.name = options.name || 'file'; - - // Helper function which throws an `Error` in the event that any of the - // rest of the arguments is present in `options`. - function throwIf(target, ...args) { - args.slice(1).forEach(name => { - if (options[name]) { - throw new Error(`Cannot set ${name} and ${target} together`); - } - }); - } - - // Setup the base stream that always gets piped to to handle buffering. - this._stream = new PassThrough(); - this._stream.setMaxListeners(30); - - // Bind this context for listener methods. - this._onError = this._onError.bind(this); - - if (options.filename || options.dirname) { - throwIf('filename or dirname', 'stream'); - this._basename = this.filename = options.filename - ? path.basename(options.filename) - : 'winston.log'; - - this.dirname = options.dirname || path.dirname(options.filename); - this.options = options.options || { flags: 'a' }; - } else if (options.stream) { - // eslint-disable-next-line no-console - console.warn('options.stream will be removed in winston@4. Use winston.transports.Stream'); - throwIf('stream', 'filename', 'maxsize'); - this._dest = this._stream.pipe(this._setupStream(options.stream)); - this.dirname = path.dirname(this._dest.path); - // We need to listen for drain events when write() returns false. This - // can make node mad at times. - } else { - throw new Error('Cannot log to file without filename or stream.'); - } - - this.maxsize = options.maxsize || null; - this.rotationFormat = options.rotationFormat || false; - this.zippedArchive = options.zippedArchive || false; - this.maxFiles = options.maxFiles || null; - this.eol = (typeof options.eol === 'string') ? options.eol : os.EOL; - this.tailable = options.tailable || false; - this.lazy = options.lazy || false; - - // Internal state variables representing the number of files this instance - // has created and the current size (in bytes) of the current logfile. - this._size = 0; - this._pendingSize = 0; - this._created = 0; - this._drain = false; - this._opening = false; - this._ending = false; - this._fileExist = false; - - if (this.dirname) this._createLogDirIfNotExist(this.dirname); - if (!this.lazy) this.open(); - } - - finishIfEnding() { - if (this._ending) { - if (this._opening) { - this.once('open', () => { - this._stream.once('finish', () => this.emit('finish')); - setImmediate(() => this._stream.end()); - }); - } else { - this._stream.once('finish', () => this.emit('finish')); - setImmediate(() => this._stream.end()); - } - } - } - - /** - * Called by Node.js Writable stream before emitting 'finish'. - * Ensures all buffered data is flushed to the underlying file stream - * before the transport signals completion. - * @param {Function} callback - Callback to signal completion. - * @private - */ - _final(callback) { - // If still opening, wait for the file to be opened first - if (this._opening) { - this.once('open', () => this._final(callback)); - return; - } - - // End the PassThrough stream - this._stream.end(); - - // No destination stream, call callback immediately - if (!this._dest) { - return callback(); - } - - // Destination is already finished - if (this._dest.writableFinished) { - return callback(); - } - - // Wait for destination stream to finish writing - this._dest.once('finish', callback); - this._dest.once('error', callback); - } - - /** - * Core logging method exposed to Winston. Metadata is optional. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback = () => { }) { - // Remark: (jcrugzz) What is necessary about this callback(null, true) now - // when thinking about 3.x? Should silent be handled in the base - // TransportStream _write method? - if (this.silent) { - callback(); - return true; - } - - - // Output stream buffer is full and has asked us to wait for the drain event - if (this._drain) { - this._stream.once('drain', () => { - this._drain = false; - this.log(info, callback); - }); - return; - } - if (this._rotate) { - this._stream.once('rotate', () => { - this._rotate = false; - this.log(info, callback); - }); - return; - } - if (this.lazy) { - if (!this._fileExist) { - if (!this._opening) { - this.open(); - } - this.once('open', () => { - this._fileExist = true; - this.log(info, callback); - return; - }); - return; - } - if (this._needsNewFile(this._pendingSize)) { - this._dest.once('close', () => { - if (!this._opening) { - this.open(); - } - this.once('open', () => { - this.log(info, callback); - return; - }); - return; - }); - return; - } - } - - // Grab the raw string and append the expected EOL. - const output = `${info[MESSAGE]}${this.eol}`; - const bytes = Buffer.byteLength(output); - - // After we have written to the PassThrough check to see if we need - // to rotate to the next file. - // - // Remark: This gets called too early and does not depict when data - // has been actually flushed to disk. - function logged() { - this._size += bytes; - this._pendingSize -= bytes; - - debug('logged %s %s', this._size, output); - this.emit('logged', info); - - // Do not attempt to rotate files while rotating - if (this._rotate) { - return; - } - - // Do not attempt to rotate files while opening - if (this._opening) { - return; - } - - // Check to see if we need to end the stream and create a new one. - if (!this._needsNewFile()) { - return; - } - if (this.lazy) { - this._endStream(() => {this.emit('fileclosed');}); - return; - } - - // End the current stream, ensure it flushes and create a new one. - // This could potentially be optimized to not run a stat call but its - // the safest way since we are supporting `maxFiles`. - this._rotate = true; - this._endStream(() => this._rotateFile()); - } - - // Keep track of the pending bytes being written while files are opening - // in order to properly rotate the PassThrough this._stream when the file - // eventually does open. - this._pendingSize += bytes; - if (this._opening - && !this.rotatedWhileOpening - && this._needsNewFile(this._size + this._pendingSize)) { - this.rotatedWhileOpening = true; - } - - const written = this._stream.write(output, logged.bind(this)); - if (!written) { - this._drain = true; - this._stream.once('drain', () => { - this._drain = false; - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - - debug('written', written, this._drain); - - this.finishIfEnding(); - - return written; - } - - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * TODO: Refactor me. - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = normalizeQuery(options); - const file = path.join(this.dirname, this.filename); - let buff = ''; - let results = []; - let row = 0; - - const stream = fs.createReadStream(file, { - encoding: 'utf8' - }); - - stream.on('error', err => { - if (stream.readable) { - stream.destroy(); - } - if (!callback) { - return; - } - - return err.code !== 'ENOENT' ? callback(err) : callback(null, results); - }); - - stream.on('data', data => { - data = (buff + data).split(/\n+/); - const l = data.length - 1; - let i = 0; - - for (; i < l; i++) { - if (!options.start || row >= options.start) { - add(data[i]); - } - row++; - } - - buff = data[l]; - }); - - stream.on('close', () => { - if (buff) { - add(buff, true); - } - if (options.order === 'desc') { - results = results.reverse(); - } - - // eslint-disable-next-line callback-return - if (callback) callback(null, results); - }); - - function add(buff, attempt) { - try { - const log = JSON.parse(buff); - if (check(log)) { - push(log); - } - } catch (e) { - if (!attempt) { - stream.emit('error', e); - } - } - } - - function push(log) { - if ( - options.rows && - results.length >= options.rows && - options.order !== 'desc' - ) { - if (stream.readable) { - stream.destroy(); - } - return; - } - - if (options.fields) { - log = options.fields.reduce((obj, key) => { - obj[key] = log[key]; - return obj; - }, {}); - } - - if (options.order === 'desc') { - if (results.length >= options.rows) { - results.shift(); - } - } - results.push(log); - } - - function check(log) { - if (!log) { - return; - } - - if (typeof log !== 'object') { - return; - } - - const time = new Date(log.timestamp); - if ( - (options.from && time < options.from) || - (options.until && time > options.until) || - (options.level && options.level !== log.level) - ) { - return; - } - - return true; - } - - function normalizeQuery(options) { - options = options || {}; - - // limit - options.rows = options.rows || options.limit || 10; - - // starting row offset - options.start = options.start || 0; - - // now - options.until = options.until || new Date(); - if (typeof options.until !== 'object') { - options.until = new Date(options.until); - } - - // now - 24 - options.from = options.from || (options.until - (24 * 60 * 60 * 1000)); - if (typeof options.from !== 'object') { - options.from = new Date(options.from); - } - - // 'asc' or 'desc' - options.order = options.order || 'desc'; - - return options; - } - } - - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description. - * TODO: Refactor me. - */ - stream(options = {}) { - const file = path.join(this.dirname, this.filename); - const stream = new Stream(); - const tail = { - file, - start: options.start - }; - - stream.destroy = tailFile(tail, (err, line) => { - if (err) { - return stream.emit('error', err); - } - - try { - stream.emit('data', line); - line = JSON.parse(line); - stream.emit('log', line); - } catch (e) { - stream.emit('error', e); - } - }); - - return stream; - } - - /** - * Checks to see the filesize of. - * @returns {undefined} - */ - open() { - // If we do not have a filename then we were passed a stream and - // don't need to keep track of size. - if (!this.filename) return; - if (this._opening) return; - - this._opening = true; - - // Stat the target file to get the size and create the stream. - this.stat((err, size) => { - if (err) { - return this.emit('error', err); - } - debug('stat done: %s { size: %s }', this.filename, size); - this._size = size; - this._dest = this._createStream(this._stream); - this._opening = false; - this.once('open', () => { - if (!this._stream.emit('rotate')) { - this._rotate = false; - } - }); - }); - } - - /** - * Stat the file and assess information in order to create the proper stream. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - stat(callback) { - const target = this._getFile(); - const fullpath = path.join(this.dirname, target); - - fs.stat(fullpath, (err, stat) => { - if (err && err.code === 'ENOENT') { - debug('ENOENT ok', fullpath); - // Update internally tracked filename with the new target name. - this.filename = target; - return callback(null, 0); - } - - if (err) { - debug(`err ${err.code} ${fullpath}`); - return callback(err); - } - - if (!stat || this._needsNewFile(stat.size)) { - // If `stats.size` is greater than the `maxsize` for this - // instance then try again. - return this._incFile(() => this.stat(callback)); - } - - // Once we have figured out what the filename is, set it - // and return the size. - this.filename = target; - callback(null, stat.size); - }); - } - - /** - * Closes the stream associated with this instance. - * @param {function} cb - TODO: add param description. - * @returns {undefined} - */ - close(cb) { - if (!this._stream) { - return; - } - - this._stream.end(() => { - if (cb) { - cb(); // eslint-disable-line callback-return - } - this.emit('flush'); - this.emit('closed'); - }); - } - - /** - * TODO: add method description. - * @param {number} size - TODO: add param description. - * @returns {undefined} - */ - _needsNewFile(size) { - size = size || this._size; - return this.maxsize && size >= this.maxsize; - } - - /** - * TODO: add method description. - * @param {Error} err - TODO: add param description. - * @returns {undefined} - */ - _onError(err) { - this.emit('error', err); - } - - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - _setupStream(stream) { - stream.on('error', this._onError); - - return stream; - } - - /** - * TODO: add method description. - * @param {Stream} stream - TODO: add param description. - * @returns {mixed} - TODO: add return description. - */ - _cleanupStream(stream) { - stream.removeListener('error', this._onError); - stream.destroy(); - return stream; - } - - /** - * TODO: add method description. - */ - _rotateFile() { - this._incFile(() => this.open()); - } - - /** - * Unpipe from the stream that has been marked as full and end it so it - * flushes to disk. - * - * @param {function} callback - Callback for when the current file has closed. - * @private - */ - _endStream(callback = () => { }) { - if (this._dest) { - this._stream.unpipe(this._dest); - this._dest.end(() => { - this._cleanupStream(this._dest); - callback(); - }); - } else { - callback(); // eslint-disable-line callback-return - } - } - - /** - * Returns the WritableStream for the active file on this instance. If we - * should gzip the file then a zlib stream is returned. - * - * @param {ReadableStream} source –PassThrough to pipe to the file when open. - * @returns {WritableStream} Stream that writes to disk for the active file. - */ - _createStream(source) { - const fullpath = path.join(this.dirname, this.filename); - - debug('create stream start', fullpath, this.options); - const dest = fs.createWriteStream(fullpath, this.options) - // TODO: What should we do with errors here? - .on('error', err => debug(err)) - .on('close', () => debug('close', dest.path, dest.bytesWritten)) - .on('open', () => { - debug('file open ok', fullpath); - this.emit('open', fullpath); - source.pipe(dest); - - // If rotation occured during the open operation then we immediately - // start writing to a new PassThrough, begin opening the next file - // and cleanup the previous source and dest once the source has drained. - if (this.rotatedWhileOpening) { - this._stream = new PassThrough(); - this._stream.setMaxListeners(30); - this._rotateFile(); - this.rotatedWhileOpening = false; - this._cleanupStream(dest); - source.end(); - } - }); - - debug('create stream ok', fullpath); - return dest; - } - - /** - * TODO: add method description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - _incFile(callback) { - debug('_incFile', this.filename); - const ext = path.extname(this._basename); - const basename = path.basename(this._basename, ext); - const tasks = []; - - if (this.zippedArchive) { - tasks.push( - function (cb) { - const num = this._created > 0 && !this.tailable ? this._created : ''; - this._compressFile( - path.join(this.dirname, `${basename}${num}${ext}`), - path.join(this.dirname, `${basename}${num}${ext}.gz`), - cb - ); - }.bind(this) - ); - } - - tasks.push( - function (cb) { - if (!this.tailable) { - this._created += 1; - this._checkMaxFilesIncrementing(ext, basename, cb); - } else { - this._checkMaxFilesTailable(ext, basename, cb); - } - }.bind(this) - ); - - asyncSeries(tasks, callback); - } - - /** - * Gets the next filename to use for this instance in the case that log - * filesizes are being capped. - * @returns {string} - TODO: add return description. - * @private - */ - _getFile() { - const ext = path.extname(this._basename); - const basename = path.basename(this._basename, ext); - const isRotation = this.rotationFormat - ? this.rotationFormat() - : this._created; - - // Caveat emptor (indexzero): rotationFormat() was broken by design When - // combined with max files because the set of files to unlink is never - // stored. - return !this.tailable && this._created - ? `${basename}${isRotation}${ext}` - : `${basename}${ext}`; - } - - /** - * Increment the number of files created or checked by this instance. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - _checkMaxFilesIncrementing(ext, basename, callback) { - // Check for maxFiles option and delete file. - if (!this.maxFiles || this._created < this.maxFiles) { - return setImmediate(callback); - } - - const oldest = this._created - this.maxFiles; - const isOldest = oldest !== 0 ? oldest : ''; - const isZipped = this.zippedArchive ? '.gz' : ''; - const filePath = `${basename}${isOldest}${ext}${isZipped}`; - const target = path.join(this.dirname, filePath); - - fs.unlink(target, callback); - } - - /** - * Roll files forward based on integer, up to maxFiles. e.g. if base if - * file.log and it becomes oversized, roll to file1.log, and allow file.log - * to be re-used. If file is oversized again, roll file1.log to file2.log, - * roll file.log to file1.log, and so on. - * @param {mixed} ext - TODO: add param description. - * @param {mixed} basename - TODO: add param description. - * @param {mixed} callback - TODO: add param description. - * @returns {undefined} - * @private - */ - _checkMaxFilesTailable(ext, basename, callback) { - const tasks = []; - if (!this.maxFiles) { - return; - } - - // const isZipped = this.zippedArchive ? '.gz' : ''; - const isZipped = this.zippedArchive ? '.gz' : ''; - for (let x = this.maxFiles - 1; x > 1; x--) { - tasks.push(function (i, cb) { - let fileName = `${basename}${(i - 1)}${ext}${isZipped}`; - const tmppath = path.join(this.dirname, fileName); - - fs.exists(tmppath, exists => { - if (!exists) { - return cb(null); - } - - fileName = `${basename}${i}${ext}${isZipped}`; - fs.rename(tmppath, path.join(this.dirname, fileName), cb); - }); - }.bind(this, x)); - } - - asyncSeries(tasks, () => { - fs.rename( - path.join(this.dirname, `${basename}${ext}${isZipped}`), - path.join(this.dirname, `${basename}1${ext}${isZipped}`), - callback - ); - }); - } - - /** - * Compresses src to dest with gzip and unlinks src - * @param {string} src - path to source file. - * @param {string} dest - path to zipped destination file. - * @param {Function} callback - callback called after file has been compressed. - * @returns {undefined} - * @private - */ - _compressFile(src, dest, callback) { - fs.access(src, fs.F_OK, (err) => { - if (err) { - return callback(); - } - var gzip = zlib.createGzip(); - var inp = fs.createReadStream(src); - var out = fs.createWriteStream(dest); - out.on('finish', () => { - fs.unlink(src, callback); - }); - inp.pipe(gzip).pipe(out); - }); - } - - _createLogDirIfNotExist(dirPath) { - /* eslint-disable no-sync */ - if (!fs.existsSync(dirPath)) { - fs.mkdirSync(dirPath, { recursive: true }); - } - /* eslint-enable no-sync */ - } -}; - - -/***/ }), - -/***/ 2774: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * http.js: Transport for outputting to a json-rpcserver. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const http = __nccwpck_require__(8611); -const https = __nccwpck_require__(5692); -const { Stream } = __nccwpck_require__(436); -const TransportStream = __nccwpck_require__(3766); -const { configure } = __nccwpck_require__(4450); - -/** - * Transport for outputting to a json-rpc server. - * @type {Stream} - * @extends {TransportStream} - */ -module.exports = class Http extends TransportStream { - /** - * Constructor function for the Http transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - // eslint-disable-next-line max-statements - constructor(options = {}) { - super(options); - - this.options = options; - this.name = options.name || 'http'; - this.ssl = !!options.ssl; - this.host = options.host || 'localhost'; - this.port = options.port; - this.auth = options.auth; - this.path = options.path || ''; - this.maximumDepth = options.maximumDepth; - this.agent = options.agent; - this.headers = options.headers || {}; - this.headers['content-type'] = 'application/json'; - this.batch = options.batch || false; - this.batchInterval = options.batchInterval || 5000; - this.batchCount = options.batchCount || 10; - this.batchOptions = []; - this.batchTimeoutID = -1; - this.batchCallback = {}; - - if (!this.port) { - this.port = this.ssl ? 443 : 80; - } - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - this._request(info, null, null, (err, res) => { - if (res && res.statusCode !== 200) { - err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); - } - - if (err) { - this.emit('warn', err); - } else { - this.emit('logged', info); - } - }); - - // Remark: (jcrugzz) Fire and forget here so requests dont cause buffering - // and block more requests from happening? - if (callback) { - setImmediate(callback); - } - } - - /** - * Query the transport. Options object is optional. - * @param {Object} options - Loggly-like query options for this instance. - * @param {function} callback - Continuation to respond to when complete. - * @returns {undefined} - */ - query(options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } - - options = { - method: 'query', - params: this.normalizeQuery(options) - }; - - const auth = options.params.auth || null; - delete options.params.auth; - - const path = options.params.path || null; - delete options.params.path; - - this._request(options, auth, path, (err, res, body) => { - if (res && res.statusCode !== 200) { - err = new Error(`Invalid HTTP Status Code: ${res.statusCode}`); - } - - if (err) { - return callback(err); - } - - if (typeof body === 'string') { - try { - body = JSON.parse(body); - } catch (e) { - return callback(e); - } - } - - callback(null, body); - }); - } - - /** - * Returns a log stream for this transport. Options object is optional. - * @param {Object} options - Stream options for this instance. - * @returns {Stream} - TODO: add return description - */ - stream(options = {}) { - const stream = new Stream(); - options = { - method: 'stream', - params: options - }; - - const path = options.params.path || null; - delete options.params.path; - - const auth = options.params.auth || null; - delete options.params.auth; - - let buff = ''; - const req = this._request(options, auth, path); - - stream.destroy = () => req.destroy(); - req.on('data', data => { - data = (buff + data).split(/\n+/); - const l = data.length - 1; - - let i = 0; - for (; i < l; i++) { - try { - stream.emit('log', JSON.parse(data[i])); - } catch (e) { - stream.emit('error', e); - } - } - - buff = data[l]; - }); - req.on('error', err => stream.emit('error', err)); - - return stream; - } - - /** - * Make a request to a winstond server or any http server which can - * handle json-rpc. - * @param {function} options - Options to sent the request. - * @param {Object?} auth - authentication options - * @param {string} path - request path - * @param {function} callback - Continuation to respond to when complete. - */ - _request(options, auth, path, callback) { - options = options || {}; - - auth = auth || this.auth; - path = path || this.path || ''; - - if (this.batch) { - this._doBatch(options, callback, auth, path); - } else { - this._doRequest(options, callback, auth, path); - } - } - - /** - * Send or memorize the options according to batch configuration - * @param {function} options - Options to sent the request. - * @param {function} callback - Continuation to respond to when complete. - * @param {Object?} auth - authentication options - * @param {string} path - request path - */ - _doBatch(options, callback, auth, path) { - this.batchOptions.push(options); - if (this.batchOptions.length === 1) { - // First message stored, it's time to start the timeout! - const me = this; - this.batchCallback = callback; - this.batchTimeoutID = setTimeout(function () { - // timeout is reached, send all messages to endpoint - me.batchTimeoutID = -1; - me._doBatchRequest(me.batchCallback, auth, path); - }, this.batchInterval); - } - if (this.batchOptions.length === this.batchCount) { - // max batch count is reached, send all messages to endpoint - this._doBatchRequest(this.batchCallback, auth, path); - } - } - - /** - * Initiate a request with the memorized batch options, stop the batch timeout - * @param {function} callback - Continuation to respond to when complete. - * @param {Object?} auth - authentication options - * @param {string} path - request path - */ - _doBatchRequest(callback, auth, path) { - if (this.batchTimeoutID > 0) { - clearTimeout(this.batchTimeoutID); - this.batchTimeoutID = -1; - } - const batchOptionsCopy = this.batchOptions.slice(); - this.batchOptions = []; - this._doRequest(batchOptionsCopy, callback, auth, path); - } - - /** - * Make a request to a winstond server or any http server which can - * handle json-rpc. - * @param {function} options - Options to sent the request. - * @param {function} callback - Continuation to respond to when complete. - * @param {Object?} auth - authentication options - * @param {string} path - request path - */ - _doRequest(options, callback, auth, path) { - // Prepare options for outgoing HTTP request - const headers = Object.assign({}, this.headers); - if (auth && auth.bearer) { - headers.Authorization = `Bearer ${auth.bearer}`; - } - const req = (this.ssl ? https : http).request({ - ...this.options, - method: 'POST', - host: this.host, - port: this.port, - path: `/${path.replace(/^\//, '')}`, - headers: headers, - auth: (auth && auth.username && auth.password) ? (`${auth.username}:${auth.password}`) : '', - agent: this.agent - }); - - req.on('error', callback); - req.on('response', res => ( - res.on('end', () => callback(null, res)).resume() - )); - const jsonStringify = configure({ - ...(this.maximumDepth && { maximumDepth: this.maximumDepth }) - }); - req.end(Buffer.from(jsonStringify(options, this.options.replacer), 'utf8')); - } -}; - - -/***/ }), - -/***/ 8640: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * transports.js: Set of all transports Winston knows about. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -/** - * TODO: add property description. - * @type {Console} - */ -Object.defineProperty(exports, "Console", ({ - configurable: true, - enumerable: true, - get() { - return __nccwpck_require__(557); - } -})); - -/** - * TODO: add property description. - * @type {File} - */ -Object.defineProperty(exports, "File", ({ - configurable: true, - enumerable: true, - get() { - return __nccwpck_require__(7248); - } -})); - -/** - * TODO: add property description. - * @type {Http} - */ -Object.defineProperty(exports, "Http", ({ - configurable: true, - enumerable: true, - get() { - return __nccwpck_require__(2774); - } -})); - -/** - * TODO: add property description. - * @type {Stream} - */ -Object.defineProperty(exports, "Stream", ({ - configurable: true, - enumerable: true, - get() { - return __nccwpck_require__(9006); - } -})); - - -/***/ }), - -/***/ 9006: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * stream.js: Transport for outputting to any arbitrary stream. - * - * (C) 2010 Charlie Robbins - * MIT LICENCE - */ - - - -const isStream = __nccwpck_require__(1066); -const { MESSAGE } = __nccwpck_require__(1255); -const os = __nccwpck_require__(857); -const TransportStream = __nccwpck_require__(3766); - -/** - * Transport for outputting to any arbitrary stream. - * @type {Stream} - * @extends {TransportStream} - */ -module.exports = class Stream extends TransportStream { - /** - * Constructor function for the Console transport object responsible for - * persisting log messages and metadata to a terminal or TTY. - * @param {!Object} [options={}] - Options for this instance. - */ - constructor(options = {}) { - super(options); - - if (!options.stream || !isStream(options.stream)) { - throw new Error('options.stream is required.'); - } - - // We need to listen for drain events when write() returns false. This can - // make node mad at times. - this._stream = options.stream; - this._stream.setMaxListeners(Infinity); - this.isObjectMode = options.stream._writableState.objectMode; - this.eol = (typeof options.eol === 'string') ? options.eol : os.EOL; - } - - /** - * Core logging method exposed to Winston. - * @param {Object} info - TODO: add param description. - * @param {Function} callback - TODO: add param description. - * @returns {undefined} - */ - log(info, callback) { - setImmediate(() => this.emit('logged', info)); - if (this.isObjectMode) { - this._stream.write(info); - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } - - this._stream.write(`${info[MESSAGE]}${this.eol}`); - if (callback) { - callback(); // eslint-disable-line callback-return - } - return; - } -}; - - -/***/ }), - -/***/ 6435: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - -__webpack_unused_export__ = ({ value: true }); -exports.uu = transpileDirectory; -exports.JA = readIncludeExcludeWithDefaults; -exports.q1 = readCompilerOptions; -const path_1 = __nccwpck_require__(6928); -const fs_1 = __nccwpck_require__(9896); -const os_1 = __nccwpck_require__(857); -const util_1 = __nccwpck_require__(2343); -const typescript_1 = __nccwpck_require__(5852); -const glob_1 = __nccwpck_require__(2514); -const file_writer_1 = __nccwpck_require__(8925); -const logger = (0, util_1.createLogger)('compiler'); -const { mkdir } = fs_1.promises; -/** - * Executes the TypeScript compilation for the given directory. - * It recursively compiles all files ending with .ts - * @param path - Directory to be compiled. - * @param compilerOptions - Compiler options to be used - * @param includeExclude - Included and excluded files for compilation - * @internal - */ -async function transpileDirectory(path, { compilerOptions, createFileOptions }, includeExclude = defaultIncludeExclude) { - logger.verbose(`Transpiling files in the directory: ${path} started.`); - const includes = includeExclude.include.length > 1 - ? `{${includeExclude.include.join(',')}}` - : includeExclude.include[0]; - const excludes = includeExclude.exclude.length > 1 - ? `{${includeExclude.exclude.join(',')}}` - : includeExclude.exclude[0]; - const allFiles = await (0, glob_1.glob)(includes, { - ignore: excludes, - cwd: path - }); - const program = await (0, typescript_1.createProgram)(allFiles.map(file => (0, path_1.resolve)(path, file)), compilerOptions); - // The write file handler does not support async function hence the work around with the outer promise list. - const fileWriterPromises = []; - const prettierWriter = (fileName, text) => { - const parsed = (0, path_1.parse)(fileName); - const promise = mkdir(parsed.dir, { recursive: true }).then(async () => { - // The transpile process creates `.map.js`, `.js` and `.d.ts` files - // All not emitted files like .md or .json should be already formatted using prettier on creation. - // Formatting .js files could break source map -> skip these. - // The .map files are not human-readable and formatting increases file size -> skip these. - const usePrettier = createFileOptions.usePrettier === false - ? false - : (0, file_writer_1.getFileExtension)(fileName) === 'd.ts'; - return (0, file_writer_1.createFile)(parsed.dir, parsed.base, text, { - ...createFileOptions, - usePrettier - }); - }); - fileWriterPromises.push(promise); - }; - const emitResult = program.emit(undefined, prettierWriter); - await Promise.all(fileWriterPromises); - const allDiagnostics = (0, typescript_1.getPreEmitDiagnostics)(program).concat(emitResult.diagnostics); - if (allDiagnostics.length > 0) { - throw new Error(`Compilation Errors:${os_1.EOL}${getErrorList(allDiagnostics).join(os_1.EOL)}`); - } - logger.verbose(`Transpiling files in directory: ${path} finished.`); -} -function getErrorList(diagnostics) { - return diagnostics.map(diagnostic => { - const text = typeof diagnostic.messageText === 'string' - ? diagnostic.messageText - : diagnostic.messageText.messageText; - if (diagnostic.file) { - const { lineNumber, linePosition } = findPositions(diagnostic.file.statements, diagnostic.start); - return `${diagnostic.file.fileName}:${lineNumber}:${linePosition} - error TS${diagnostic.code}: ${text}`; - } - return `error TS${diagnostic.code}: ${text}`; - }); -} -function findPositions(statements, errorPosition) { - if (!statements || statements.length === 0 || !errorPosition) { - return { lineNumber: 0, linePosition: 0 }; - } - let response; - statements.forEach((statement, index) => { - if (statement.pos <= errorPosition && errorPosition < statement.end) { - response = { - lineNumber: index + 1, - linePosition: errorPosition - statement.pos - }; - } - }); - if (!response) { - throw new Error('Can not find error position in list of statements.'); - } - return response; -} -async function readTsConfig(pathToTsConfig) { - const fullPath = (0, path_1.parse)(pathToTsConfig).base === 'tsconfig.json' - ? pathToTsConfig - : (0, path_1.resolve)(pathToTsConfig, 'tsconfig.json'); - if (!(0, fs_1.existsSync)(fullPath)) { - throw new Error(`No tsconfig found under path ${fullPath}`); - } - return JSON.parse(await fs_1.promises.readFile(fullPath, { - encoding: 'utf8' - })); -} -const defaultIncludeExclude = { - include: ['**/*.ts'], - exclude: ['dist/**/*', '**/*.d.ts', '**/*.spec.ts', 'node_modules/**/*'] -}; -/** - * Reads the include and exclude property from the tsconfig.json using ['**\/*.ts'] and ["dist/**\/*", "**\/*.spec.ts", "**\/*.d.ts", "node_modules/**\/*"] as default values. - * @param pathToTsConfig - Folder containing or path to a tsconfig.json files - * @returns IncludeExclude options for include and exclude files for compilation - * @internal - */ -async function readIncludeExcludeWithDefaults(pathToTsConfig) { - const tsConfig = await readTsConfig(pathToTsConfig); - return { - include: tsConfig.include || defaultIncludeExclude.include, - exclude: tsConfig.exclude || defaultIncludeExclude.exclude - }; -} -/** - * Reads and parses the compiler options a tsconfig.json. - * @param pathToTsConfig - Folder containing or path to a tsconfig.json files - * @returns Compiler options from the tsconfig.json - * @internal - */ -async function readCompilerOptions(pathToTsConfig) { - const options = (await readTsConfig(pathToTsConfig))['compilerOptions'] || {}; - if (options.moduleResolution) { - options.moduleResolution = parseModuleResolutionKind(options.moduleResolution); - } - if (options.lib && options.lib.length > 0) { - options.lib = options.lib.map(name => `lib.${name}.d.ts`); - } - if (options.target) { - options.target = parseScriptTarget(options.target); - } - if (options.module) { - options.module = parseModuleKind(options.module); - } - return options; -} -function parseModuleResolutionKind(input) { - const moduleResolution = input.toLowerCase(); - if (moduleResolution === 'node') { - return typescript_1.ModuleResolutionKind.NodeJs; - } - if (moduleResolution === 'node16') { - return typescript_1.ModuleResolutionKind.Node16; - } - if (moduleResolution === 'nodenext') { - return typescript_1.ModuleResolutionKind.NodeNext; - } - return typescript_1.ModuleResolutionKind.Classic; -} -function parseScriptTarget(input) { - const mapping = { - es3: typescript_1.ScriptTarget.ES3, - es5: typescript_1.ScriptTarget.ES5, - esnext: typescript_1.ScriptTarget.ESNext, - es2015: typescript_1.ScriptTarget.ES2015, - es2016: typescript_1.ScriptTarget.ES2016, - es2017: typescript_1.ScriptTarget.ES2017, - es2018: typescript_1.ScriptTarget.ES2018, - es2019: typescript_1.ScriptTarget.ES2019, - es2020: typescript_1.ScriptTarget.ES2020, - es2021: typescript_1.ScriptTarget.ES2021, - es2022: typescript_1.ScriptTarget.ES2022 - }; - if (mapping[input.toLowerCase()]) { - return mapping[input.toLowerCase()]; - } - logger.warn(`The selected ES target ${input} is not found - Fallback es2021 used`); - return typescript_1.ScriptTarget.ES2021; -} -function parseModuleKind(input) { - const mapping = { - commonjs: typescript_1.ModuleKind.CommonJS, - amd: typescript_1.ModuleKind.AMD, - es2015: typescript_1.ModuleKind.ES2015, - es2020: typescript_1.ModuleKind.ES2020, - esnext: typescript_1.ModuleKind.ESNext, - node16: typescript_1.ModuleKind.Node16, - nodenext: typescript_1.ModuleKind.NodeNext - }; - if (mapping[input.toLowerCase()]) { - return mapping[input.toLowerCase()]; - } - logger.warn(`The selected module kind ${input} is not found - Fallback commonJS used`); - return typescript_1.ModuleKind.CommonJS; -} -//# sourceMappingURL=compiler.js.map - -/***/ }), - -/***/ 1051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.copyFile = copyFile; -exports.copyFiles = copyFiles; -const fs_1 = __nccwpck_require__(9896); -const path_1 = __nccwpck_require__(6928); -const util_1 = __nccwpck_require__(2343); -const { copyFile: fsCopyFile } = fs_1.promises; -const logger = (0, util_1.createLogger)('generator-common'); -/** - * Copy a file from a given path. - * @param src - Path to the source file. - * @param dest - Path to the destination file - * @param overwrite - Whether or not existing files should be overwritten. - * @internal - */ -async function copyFile(src, dest, overwrite = false) { - if (!overwrite && (0, fs_1.existsSync)(dest)) { - return; - } - return fsCopyFile(src, dest); -} -/** - * @param files - List of files to be copied - * @param dest - Path to where the files are copied - * @param overwrite - Overwrite flag - * @internal - */ -async function copyFiles(files, dest, overwrite) { - logger.verbose(`Copying additional files ${files} into ${dest}.`); - return Promise.all(files.map(filePath => copyFile((0, path_1.resolve)(filePath), (0, path_1.join)(dest, (0, path_1.basename)(filePath)), overwrite))); -} -//# sourceMappingURL=copy-file.js.map - -/***/ }), - -/***/ 4400: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultPrettierConfig = void 0; -exports.readPrettierConfig = readPrettierConfig; -exports.getFileExtension = getFileExtension; -exports.createFile = createFile; -const node_path_1 = __nccwpck_require__(6760); -const node_fs_1 = __nccwpck_require__(3024); -const util_1 = __nccwpck_require__(2343); -const prettier_1 = __nccwpck_require__(5824); -const util_2 = __nccwpck_require__(1490); -const { writeFile, readFile } = node_fs_1.promises; -const logger = (0, util_1.createLogger)('create-file'); -/** - * @internal - */ -exports.defaultPrettierConfig = { - singleQuote: true, - trailingComma: 'none', - arrowParens: 'avoid', - endOfLine: 'lf' -}; -const prettierConfigCache = {}; -/** - * Read the prettier config and caches it. - * @param prettierConfigPath - Path to the prettier config. - * @returns Config or default. - * @internal - */ -async function readPrettierConfig(prettierConfigPath) { - if (prettierConfigPath && prettierConfigCache[prettierConfigPath]) { - return prettierConfigCache[prettierConfigPath]; - } - if (prettierConfigPath) { - try { - const config = await readFile(prettierConfigPath, { encoding: 'utf-8' }); - prettierConfigCache[prettierConfigPath] = JSON.parse(config); - return prettierConfigCache[prettierConfigPath]; - } - catch { - logger.warn(`Prettier config file not found: ${prettierConfigPath} - default is used.`); - return exports.defaultPrettierConfig; - } - } - logger.debug('Default prettier config is used.'); - return exports.defaultPrettierConfig; -} -const fileParserMap = { - ts: 'typescript', - md: 'markdown', - json: 'json', - js: 'espree', - mdx: 'mdx', - yml: 'yaml', - yaml: 'yaml', - 'd.ts': 'typescript', - 'js.map': 'json', - 'd.ts.map': 'json' -}; -/** - * This method considers also double dots like `.map.js` - * @param fileName - * @returns The complete file extension containing multiple dots - * @internal - */ -function getFileExtension(fileName) { - return (0, node_path_1.parse)(fileName).base.split('.').slice(1).join('.'); -} -async function formatWithPrettier(fileName, content, prettierOptions) { - const fileExtension = getFileExtension(fileName); - const parser = fileParserMap[fileExtension]; - if (parser) { - try { - return (0, prettier_1.format)(content, { ...prettierOptions, parser }); - } - catch { - logger.warn(`Error in prettify file ${fileName} - emit unformatted content`); - return content; - } - } - logger.info(`No prettier-parser configured for file ${fileName} - skip prettier.`); - return content; -} -function addCopyrightHeader(content, withCopyright) { - if (!withCopyright) { - return content; - } - return (0, util_1.codeBlock) ` -${(0, util_2.getCopyrightHeader)()} -${content} -\n -`; -} -/** - * Write a file generated by the SAP Cloud SDK for JavaScript. - * @param directoryPath - Path of the directory to write to. - * @param fileName - Name of the file to write - * @param content - Content to be written to the file. A copyright statement will be added to this. - * @param overwrite - Whether or not existing files should be overwritten. - * @param withCopyright - Whether the generated file contains the copyright information. - * @internal - */ -async function createFile(directoryPath, fileName, content, options) { - const { overwrite, prettierOptions, usePrettier = true } = options; - try { - // Our copyright header is only valid for source files i.e. typescript. - const withCopyright = getFileExtension(fileName) === 'ts' || - getFileExtension(fileName) === 'd.ts'; - let adjusted = addCopyrightHeader(content, withCopyright); - if (usePrettier) { - adjusted = await formatWithPrettier(fileName, adjusted, prettierOptions); - } - return await writeFile((0, node_path_1.join)(directoryPath, fileName), adjusted, { - encoding: 'utf8', - flag: overwrite ? 'w' : 'wx' - }); - } - catch (err) { - const recommendation = err.code === 'EEXIST' && !overwrite - ? ' File already exists. If you want to allow overwriting files, enable the `overwrite` flag.' - : ''; - throw new util_1.ErrorWithCause(`Could not write file "${fileName}".${recommendation}`, err); - } -} -//# sourceMappingURL=create-file.js.map - -/***/ }), - -/***/ 6007: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serializeImports = serializeImports; -const util_1 = __nccwpck_require__(2343); -/** - * @internal - */ -function serializeImports(imports) { - const relevantImports = imports.filter(({ names, defaultImport }) => names.length || defaultImport); - return relevantImports - .map(({ names, defaultImport, moduleIdentifier, typeOnly }) => (0, util_1.codeBlock) `import ${typeOnly ? 'type ' : ''}${defaultImport ? `${defaultImport},` : ''}{ ${names.join(', ')} } from '${moduleIdentifier}';`) - .join('\n'); -} -//# sourceMappingURL=imports.js.map - -/***/ }), - -/***/ 8925: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(1051), exports); -__exportStar(__nccwpck_require__(3604), exports); -__exportStar(__nccwpck_require__(4400), exports); -__exportStar(__nccwpck_require__(6007), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 3604: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.packageJsonBase = packageJsonBase; -/** - * @internal - */ -function packageJsonBase(options) { - const basePackageJson = { - name: options.npmPackageName, - version: '1.0.0', - description: options.description, - homepage: 'https://sap.github.io/cloud-sdk/docs/js/getting-started', - main: './index.js', - types: './index.d.ts', - license: 'UNLICENSED', - publishConfig: { - access: 'public' - }, - repository: { - type: 'git', - url: '' - } - }; - if (options.moduleType === 'esm') { - basePackageJson.type = 'module'; - } - return basePackageJson; -} -//# sourceMappingURL=package-json.js.map - -/***/ }), - -/***/ 1490: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCopyrightHeader = getCopyrightHeader; -exports.validateNpmCompliance = validateNpmCompliance; -exports.npmCompliantName = npmCompliantName; -exports.directoryToSpeakingModuleName = directoryToSpeakingModuleName; -exports.directoryToServiceName = directoryToServiceName; -const util_1 = __nccwpck_require__(2343); -const voca_1 = __importDefault(__nccwpck_require__(5231)); -/** - * @returns A copyright header - * @internal - */ -function getCopyrightHeader() { - return (0, util_1.codeBlock) ` -/* - * Copyright (c) ${new Date().getFullYear()} SAP SE or an SAP affiliate company. All rights reserved. - * - * This is a generated file powered by the SAP Cloud SDK for JavaScript. - */ - `; -} -const logger = (0, util_1.createLogger)('generator-common-util'); -const npmMaxLength = 214; -const npmRegex = /^(?:@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/; -/** - * Checks whether a name is compliant with npm naming rules. Logs a warning if not. - * @param packageName - The name to be checked. - * @internal - */ -function validateNpmCompliance(packageName) { - if (packageName.length > npmMaxLength) { - logger.warn(`Provided package name "${packageName}" is longer than 214 chars and will be cut!`); - } - if (!isCompliant(packageName)) { - const newPackageName = npmCompliantName(packageName); - logger.warn(`Provided package name "${packageName}" is not compliant with npm naming rules and was transformed to ${newPackageName}!`); - } -} -/** - * Takes a name and returns a transformation that is guaranteed to be compliant with npm naming rules. - * @param packageName - The name to be transformed, if necessary. - * @returns Name that is guaranteed to be npm compliant. - * @internal - */ -function npmCompliantName(packageName) { - packageName = packageName.substring(0, npmMaxLength); - return isScoped(packageName) - ? transformScopedName(packageName) - : transformUnscopedName(packageName); -} -function isCompliant(packageName) { - return !!npmRegex.exec(packageName); -} -function isScoped(packageName) { - return packageName.startsWith('@') && packageName.includes('/'); -} -function transformScopedName(packageName) { - return ('@' + - splitAtFirstOccurrence(packageName, '/') - .map(scopeOrName => transformUnscopedName(scopeOrName)) - .join('/')); -} -function transformUnscopedName(packageName) { - let compliantName = packageName.toLowerCase(); - compliantName = stripLeadingDotsAndUnderscores(compliantName); - compliantName = replaceNonNpmPackageCharacters(compliantName); - return compliantName; -} -/** - * This is taken from version 2.0 - * @internal - */ -function directoryToSpeakingModuleName(packageName) { - return voca_1.default.titleCase(packageName.replace(/[-,_]/g, ' ')); -} -/** - * This is taken from version 2.0 - * @internal - */ -function directoryToServiceName(name) { - return `${directoryToSpeakingModuleName(name).replace(/ /g, '')}`; -} -function stripLeadingDotsAndUnderscores(str) { - return str.replace(/^[._]*/g, ''); -} -function replaceNonNpmPackageCharacters(str) { - return str.replace(/[^a-z0-9-~._]/g, ''); -} -function splitAtFirstOccurrence(str, separator) { - return [ - str.slice(0, str.indexOf(separator)), - str.slice(str.indexOf(separator) + 1) - ]; -} -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 1730: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.flatten = void 0; -exports.flat = flat; -exports.unique = unique; -exports.last = last; -exports.first = first; -exports.splitInChunks = splitInChunks; -exports.transformVariadicArgumentToArray = transformVariadicArgumentToArray; -exports.zip = zip; -exports.partition = partition; -exports.filterDuplicates = filterDuplicates; -exports.filterDuplicatesRight = filterDuplicatesRight; -/** - * Flatten a two dimensional array into a one dimensional array. - * @param arr - The array to be flattened. - * @returns A one dimensional array. - */ -function flat(arr) { - return arr.reduce((flattened, subArr) => [...flattened, ...subArr], []); -} -/** - * Remove all duplicates from an array. - * @param arr - Array that might contain duplicates. - * @returns Array of unique items. - */ -function unique(arr) { - return Array.from(new Set(arr)); -} -/** - * Get the last item from an array. Returns `undefined`, if the array is empty. - * @param arr - Array to get the last item of. - * @returns Last item of the array or `undefined`, if the array was empty. - */ -function last(arr) { - return arr.length ? arr[arr.length - 1] : undefined; -} -/** - * Get the first item from an array. Returns `undefined`, if the array is empty. - * @param arr - Array to get the first item of. - * @returns Fist item of the array or `undefined`, if the array was empty. - */ -function first(arr) { - return arr[0]; -} -/** - * Split the given array in chunks. - * @param arr - Array to be split into chunks. - * @param chunkSize - Size of the chunks. - * @returns Two dimensional array with arrays of length chunkSize. The last subarray could be shorter. - */ -function splitInChunks(arr, chunkSize) { - const chunks = []; - if (arr) { - for (let i = 0; i < arr.length; i += chunkSize) { - chunks.push(arr.slice(i, i + chunkSize)); - } - } - return chunks; -} -/** - * We want to provide methods which accept a variable single number of elements and arrays. - * The overloaded signature to achieve this is: - * ``` - * function doSomething(array: T[]) - * function doSomething(...varArgs: T[]) - * function doSomething(first: undefined | T | T[], ...rest: T[]) { - * //implementation - * } - * ``` - * This wrapper methods makes it easy build an array from the input. - * @param firstOrArray - Either an array, the first element of the var args or `undefined`, if no argument was given. - * @param rest - Second to last element, if var args were used, empty array, if the first argument is an array. - * @returns Array from the input or empty array if no input was given. - */ -function transformVariadicArgumentToArray(firstOrArray, rest) { - if (Array.isArray(firstOrArray)) { - return [...firstOrArray, ...rest]; - } - return firstOrArray ? [firstOrArray, ...rest] : [...rest]; -} -/** - * Flattens a array: [1,[2,[3,4]],5] will become [1,2,3,4,5]. - * Non primitive values are copied by reference. - * @param input - Array to be flattened. - * @returns The flattened array. - */ -const flatten = (input) => { - const flatResult = []; - const stack = [...input]; - while (stack.length > 0) { - const current = stack.pop(); - if (!Array.isArray(current)) { - flatResult.push(current); - } - else { - stack.push(...current); - } - } - return flatResult.reverse(); -}; -exports.flatten = flatten; -/** - * Merge two arrays by alternately adding inserting values from both arrays, starting from the left. - * @example `zip([1, 2], [3, 4, 5, 6])` results in `[1, 3, 2, 4, 5, 6]`. - * @param left - Array to start alternately merging from. - * @param right - Second array to merge. - * @returns Zipped array. - */ -function zip(left, right) { - const longerArr = left.length > right.length ? left : right; - return longerArr.reduce((zipped, _, i) => { - const currentZipped = []; - if (left.length > i) { - currentZipped.push(left[i]); - } - if (right.length > i) { - currentZipped.push(right[i]); - } - return [...zipped, ...currentZipped]; - }, []); -} -/** - * Split an array into two based on a condition. - * @param arr - Array to partition. - * @param condition - Function to determine to where to put each item. - * @returns A two dimensional array containing two arrays, where the first one includes all items where the given condition was met and the second one includes all items where it was not met. - */ -function partition(arr, condition) { - return arr.reduce(([conditionTrue, conditionFalse], item) => condition(item) - ? [[...conditionTrue, item], conditionFalse] - : [conditionTrue, [...conditionFalse, item]], [[], []]); -} -/** - * Filter an array by removing duplicates and keeping the left most occurrence. By default this compares by identity. - * @param arr - Array to remove duplicates from. - * @param comparator - Optional comparator function, indicating whether two items are equal and therefore handled as duplicates. Defaults to identity. - * @returns A filtered array containing no duplicates. - */ -function filterDuplicates(arr, comparator = (left, right) => left === right) { - return arr.filter((item, index) => !arr.slice(0, index).find(filteredItem => comparator(item, filteredItem))); -} -/** - * Filter an array by removing duplicates and keeping the right most occurrence. By default this compares by identity. - * @param arr - Array to remove duplicates from. - * @param comparator - Optional comparator function, indicating whether two items are equal and therefore handled as duplicates. Defaults to identity. - * @returns A filtered array containing no duplicates. - */ -function filterDuplicatesRight(arr, comparator = (left, right) => left === right) { - return filterDuplicates(arr.reverse(), comparator).reverse(); -} -//# sourceMappingURL=array.js.map - -/***/ }), - -/***/ 3622: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.codeBlock = codeBlock; -const array_1 = __nccwpck_require__(1730); -const string_1 = __nccwpck_require__(2310); -/** - * @experimental This API is experimental and might change in newer versions. Use with caution. - * Transform strings and arguments to a string formatted as a code block, keeping the indentation of sub code blocks. - * Use in tagged templates, e.g.: - * ``` - * codeBlock`Code with ${arguments} and more code;` - * ``` - * @param strings - Strings in the tagged template. In the example above that would be ['Code with ', ' and more code;']. - * @param args - Arguments in the tagged template. In the example above that would be the resolved value for `arguments`;. - * @returns A string formatted as code block. - */ -function codeBlock(strings, ...args) { - const pre = strings.slice(0, -1).map(string => { - const trimmed = trimRightNewlines(string); - return trimmed.length === string.length ? string : `${trimmed}\n`; - }); - pre.push(strings[strings.length - 1]); - const indents = strings.slice(0, -1).map(s => { - const indentation = s.split('\n').pop(); - return !indentation.trim() ? indentation : ''; - }); - const post = args.map((arg, i) => ('' + arg) - .split('\n') - .map(subArg => indents[i] + subArg) - .join('\n')); - const zipped = (0, array_1.zip)(pre, post); - return (0, string_1.trim)(zipped.join('')); -} -function trimRightNewlines(string) { - let subStrings = string.split('\n'); - if (!subStrings[subStrings.length - 1].trim()) { - subStrings = subStrings.slice(0, -1); - } - return subStrings.join('\n'); -} -//# sourceMappingURL=code-block.js.map - -/***/ }), - -/***/ 5201: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.documentationBlock = documentationBlock; -const array_1 = __nccwpck_require__(1730); -const logger_1 = __nccwpck_require__(3112); -const logger = (0, logger_1.createLogger)('documentation-block'); -/** - * @experimental This API is experimental and might change in newer versions. Use with caution. - * Transform strings and arguments to a string formatted as a documentation block. - * The formatting is block like so no leading or trailing spaces. - * New lines in the beginning and end are also removed. - * Use in tagged templates, e.g.: - * ``` - * documentationBlock`Docs with ${arguments} and more content;` - * ``` - * @param strings - Strings in the tagged template. In the example above that would be ['Docs with ', ' and more content;']. - * @param args - Arguments in the tagged template. In the example above that would be the resolved value for `arguments`;. - * @returns A string formatted as documentation block. - */ -function documentationBlock(strings, ...args) { - const firstLineTrimmed = removeLeadingEmptyLines(strings.raw[0]); - const textIndentation = getIndentation(firstLineTrimmed); - const argsWithIndentation = addIndentationToArguments(args, textIndentation); - let content = (0, array_1.zip)([firstLineTrimmed, ...strings.raw.slice(1)], argsWithIndentation).join(''); - // If no text is given return just empty string. - if (!content.match(/\w/)) { - return ''; - } - content = maskProblematicCharacters(content); - let lines = content.split('\n'); - lines = adjustIndentation(lines, textIndentation); - content = lines.join('\n * '); - return ['/**', ` * ${content}`, ' */'].join('\n'); -} -/* -New lines at the beginning are mainly unintentional when you make documentationBlock` -myContent -` - */ -function removeLeadingEmptyLines(firstLine) { - const lines = firstLine.split('\n'); - const indexFirstNonEmpty = lines.findIndex(str => str.match(/\w/)) || 0; - return lines.splice(indexFirstNonEmpty).join('\n'); -} -/* - The arguments do not contain any indentation so this is added via this method. - */ -function addIndentationToArguments(args, textIndentation) { - const argsWithIndentation = args.map(arg => arg.replace(/\n/g, '\n' + ' '.repeat(textIndentation))); - return argsWithIndentation; -} -/* - Takes the first text line as reference and does indentation with respect to this line. - */ -function adjustIndentation(lines, textIndentation) { - return lines.map(str => str.slice(textIndentation)); -} -/* - Searches for the first line containing text and returns the number of white spaces in that line. - */ -function getIndentation(firstLine) { - const removeStarting = firstLine?.replace(/^\n*/g, ''); - const countEmptySpaces = removeStarting?.search(/\S/); - return countEmptySpaces > 0 ? countEmptySpaces : 0; -} -function maskProblematicCharacters(str) { - if (str.includes('*/')) { - logger.warn(`The documentation block ${str}' - )} contained */ in the text will be masked as \\*\\/.`); - } - return str.replace(/\*\//g, '\\*\\/'); -} -//# sourceMappingURL=documentation-block.js.map - -/***/ }), - -/***/ 7419: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.equalObjects = equalObjects; -exports.equal = equal; -exports.equalArrays = equalArrays; -const nullish_1 = __nccwpck_require__(608); -/** - * Checks whether the keys and values of two objects are equal. - * @param obj1 - The first object. - * @param obj2 - The second object. - * @returns A boolean, indicating whether the two objects are equal to each other. - */ -function equalObjects(obj1, obj2) { - const keys1 = Object.keys(obj1); - return (Object.keys(obj1).length === Object.keys(obj2).length && - keys1.every(key => equal(obj1[key], obj2[key]))); -} -/** - * Checks whether the two items contain the same content. - * When both of them are arrays, the elements and the order are checked, see {@link equalArrays}. - * When both of them are objects, the key/value pairs are checked, see {@link equalObjects}. - * In other cases, triple equals is used. - * @param item1 - The first item. - * @param item2 - The second item. - * @returns A boolean, indicating all the items equal to each other. - */ -function equal(item1, item2) { - if (Array.isArray(item1) && Array.isArray(item2)) { - return equalArrays(item1, item2); - } - if (typeof item1 === 'object' && - typeof item2 === 'object' && - !(0, nullish_1.isNullish)(item1) && - !(0, nullish_1.isNullish)(item2)) { - return equalObjects(item1, item2); - } - return item1 === item2; -} -/** - * Checks whether the elements of two arrays are the same with the same order. - * @param arr1 - The first array. - * @param arr2 - The second array. - * @returns A boolean, indicating both arrays have the same contents. - */ -function equalArrays(arr1, arr2) { - return (arr1.length === arr2.length && - arr1.every((item1, i) => equal(item1, arr2[i]))); -} -//# sourceMappingURL=equal.js.map - -/***/ }), - -/***/ 4684: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ErrorWithCause = void 0; -exports.isErrorWithCause = isErrorWithCause; -const logger_1 = __nccwpck_require__(3112); -const logger = (0, logger_1.createLogger)({ - package: 'util', - messageContext: 'error-with-cause' -}); -/** - * Represents an error that was caused by another error. - */ -class ErrorWithCause extends Error { - /** - * Create an instance of ErrorWithCause. - * @param message - Error message. - * @param cause - Original error, causing this error. - */ - constructor(message, cause) { - // There is an issue with the prototype chain when extending from Error: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget - super(message); // 'Error' breaks prototype chain here - this.cause = cause; - Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain - this.name = 'ErrorWithCause'; - this.addStack(cause); - } - isAxiosError(err) { - return err['isAxiosError'] === true; - } - addStack(cause) { - // Axios removed the stack property in version 0.27 which gave no useful information anyway. This adds the http cause. - if (this.isAxiosError(cause)) { - let response = ''; - if (cause.response?.data) { - try { - response = `\n${JSON.stringify(cause.response?.data, null, 2)}`; - } - catch (error) { - logger.warn(`Failed to stringify response data: ${error.message}`); - response = `\n${cause.response?.data}`; - } - } - this.stack = `${this.stack}\nCaused by:\nHTTP Response: ${cause.message}${response}`; - } - else if (this.stack && cause?.stack) { - // Stack is a non-standard property according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types - this.stack = `${this.stack}\nCaused by:\n${cause.stack}`; - } - } - /** - * Root cause of the error. - * If there are multiple errors caused one by another, the root cause is the first error that occurred. - * In case there is no root cause. - * @returns The root cause. - */ - get rootCause() { - return isErrorWithCause(this.cause) ? this.cause.rootCause : this.cause; - } -} -exports.ErrorWithCause = ErrorWithCause; -/** - * Type guard to check whether an error is of type ErrorWithCause. - * @param err - An error. - * @returns Whether the given error is of type ErrorWithCause. - */ -function isErrorWithCause(err) { - return err?.name === 'ErrorWithCause'; -} -//# sourceMappingURL=error-with-cause.js.map - -/***/ }), - -/***/ 1276: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findProjectRoot = findProjectRoot; -exports.readJSON = readJSON; -const fs_1 = __nccwpck_require__(9896); -const path_1 = __nccwpck_require__(6928); -const logger_1 = __nccwpck_require__(3112); -const logger = (0, logger_1.createLogger)({ - package: 'util', - messageContext: 'fs' -}); -/** - * @internal - */ -function findProjectRoot(path, lastPath = path) { - if (!path) { - return lastPath; - } - const inProject = (0, fs_1.readdirSync)(path).includes('package.json') || - (0, fs_1.readdirSync)(path).includes('node_modules') || - path.includes('node_modules'); - if (!inProject) { - return lastPath; - } - return findProjectRoot((0, path_1.resolve)(path, '..'), path); -} -/** - * Read a JSON file from the file system. - * @param path - The path to the JSON file. - * @returns An object parsed from the JSON file. - */ -function readJSON(path) { - if ((0, fs_1.existsSync)(path)) { - return JSON.parse((0, fs_1.readFileSync)(path, 'utf8')); - } - logger.warn(`File "${path}" does not exist, return empty object.`); - return {}; -} -//# sourceMappingURL=fs.js.map - -/***/ }), - -/***/ 2343: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -/** - * [[include:util/README.md]] - * @packageDocumentation - * @module @sap-cloud-sdk/util - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(1730), exports); -__exportStar(__nccwpck_require__(3622), exports); -__exportStar(__nccwpck_require__(5201), exports); -__exportStar(__nccwpck_require__(7419), exports); -__exportStar(__nccwpck_require__(4684), exports); -__exportStar(__nccwpck_require__(1276), exports); -__exportStar(__nccwpck_require__(3112), exports); -__exportStar(__nccwpck_require__(608), exports); -__exportStar(__nccwpck_require__(4248), exports); -__exportStar(__nccwpck_require__(9047), exports); -__exportStar(__nccwpck_require__(7542), exports); -__exportStar(__nccwpck_require__(4399), exports); -__exportStar(__nccwpck_require__(2310), exports); -__exportStar(__nccwpck_require__(7841), exports); -__exportStar(__nccwpck_require__(4814), exports); -__exportStar(__nccwpck_require__(6770), exports); -__exportStar(__nccwpck_require__(2158), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 9317: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cloudSdkExceptionLogger = exports.logFormat = void 0; -exports.muteLoggers = muteLoggers; -exports.unmuteLoggers = unmuteLoggers; -exports.disableExceptionLogger = disableExceptionLogger; -exports.enableExceptionLogger = enableExceptionLogger; -exports.createLogger = createLogger; -exports.getLogger = getLogger; -exports.setLogLevel = setLogLevel; -exports.setGlobalLogLevel = setGlobalLogLevel; -exports.getGlobalLogLevel = getGlobalLogLevel; -exports.setGlobalTransports = setGlobalTransports; -exports.setLogFormat = setLogFormat; -exports.setGlobalLogFormat = setGlobalLogFormat; -exports.getGlobalLogFormat = getGlobalLogFormat; -exports.sanitizeRecord = sanitizeRecord; -exports.resetCustomLogLevels = resetCustomLogLevels; -exports.resetCustomLogFormats = resetCustomLogFormats; -const winston_1 = __nccwpck_require__(9654); -const format_1 = __nccwpck_require__(5286); -const loggerReference = 'sap-cloud-sdk-logger'; -const exceptionLoggerId = 'sap-cloud-sdk-exception-logger'; -const container = new winston_1.Container(); -/** - * Log formats provided by the util package. - */ -exports.logFormat = { - kibana: format_1.kibana, - local: format_1.local -}; -// Set default format based on NODE_ENV -container.options.format = - process.env.NODE_ENV === 'production' ? exports.logFormat.kibana : exports.logFormat.local; -const exceptionTransport = new winston_1.transports.Console(); -const customLogLevels = {}; -const customLogFormats = {}; -const DEFAULT_LOGGER__MESSAGE_CONTEXT = '__DEFAULT_LOGGER__MESSAGE_CONTEXT'; -let silent = false; -const moduleLogger = createLogger({ - package: 'util', - messageContext: 'cloud-sdk-logger' -}); -function toggleMuteLoggers(silence) { - silent = silence; - container.loggers.forEach(logger => toggleSilenceTransports(logger, silence)); -} -function toggleSilenceTransports(logger, silence) { - logger.transports.forEach(transport => (transport.silent = silence)); -} -/** - * Mute all logger output created by the SAP Cloud SDK Logger. This also applies to future loggers created. Useful for tests. - */ -function muteLoggers() { - toggleMuteLoggers(true); -} -/** - * Unmute all logger output created by the SAP Cloud SDK Logger. This also applies to future loggers created. Useful for tests. - */ -function unmuteLoggers() { - toggleMuteLoggers(false); -} -/** - * Default logger for the SAP Cloud SDK for unhandled exceptions. - */ -exports.cloudSdkExceptionLogger = container.get(exceptionLoggerId, { - defaultMeta: { logger: loggerReference, test: 'exception' }, - format: container.options.format, - exceptionHandlers: [exceptionTransport] -}); -/** - * Disable logging of exceptions. Enabled by default. - */ -function disableExceptionLogger() { - exports.cloudSdkExceptionLogger.exceptions.unhandle(); -} -/** - * Enable logging of exceptions. Enabled by default. - */ -function enableExceptionLogger() { - // Flush all possible handlers to make sure there is only one in the end. - disableExceptionLogger(); - exports.cloudSdkExceptionLogger.exceptions.handle(exceptionTransport); -} -/** - * Create a logger for the given message context, if available. - * - * Usage: - * To create a logger in your module, it is recommended to pass a module identifier that will be logged as `messageContext` for all messages from this logger: - * `const logger = createLogger('my-module');`. Not setting any module identifier will retrieve the default logger. - * Use this logger throughout your module. If the module is spread over multiple files, you can retrieve the logger instance by calling the `createLogger` function with the respective module identifier. - * There will always be only one instance of a logger per module identifier. - * You can pass any custom data that you want to be logged in addition by passing an object instead. You can change the default logging level (`INFO`) using the `level` key in the object. - * In those cases, provide the `messageContext` as a key in the object: - * ``` - * const logger = createLogger({ - * messageContext: 'my-module', - * myCustomKey: 'my-custom-data', - * level: 'debug' - * }); - * ``` - * You will find these information under the _custom_fields_ key in your Cloud Foundry logs. - * - * To retrieve a logger after its creation use {@link getLogger}. - * If you want to change the log level of a logger use {@link setLogLevel}. - * @param messageContext - Either a key for the message context of all messages produced by the logger or an object with additional keys to set in the message. - * @returns A newly created or an already existing logger for the given context. - */ -function createLogger(messageContext) { - const customFields = typeof messageContext === 'string' - ? { messageContext } - : { ...messageContext }; - const logger = container.get(customFields.messageContext, { - level: process.env.SAP_CLOUD_SDK_LOG_LEVEL || - customLogLevels[customFields.messageContext] || - customFields.level || - container.options.level || - 'info', - defaultMeta: { - ...(Object.entries(customFields).length && { - custom_fields: customFields - }), - logger: customFields.logger || loggerReference - }, - format: customLogFormats[customFields.messageContext] || - customFields.format || - container.options.format || - exports.logFormat.local, - transports: [new winston_1.transports.Console()] - }); - toggleSilenceTransports(logger, silent); - return logger; -} -/** - * Get logger for a given message context, if available. - * @param messageContext - A key for the message context of all messages produced by the logger. - * @returns The logger for the given messageContext if it was created before. - */ -function getLogger(messageContext = DEFAULT_LOGGER__MESSAGE_CONTEXT) { - if (container.has(messageContext)) { - return container.get(messageContext); - } -} -/** - * Change the log level of a logger based on its message context. - * e.g., to set the log level for the destination accessor module of the SDK to _debug_, simply call `setLogLevel('debug', 'destination-accessor')`. - * @param level - Level to set the logger to. Use an empty string '' as level to unset context level. - * @param messageContextOrLogger - Message context of the logger to change the log level for or the logger itself. - */ -function setLogLevel(level, messageContextOrLogger = DEFAULT_LOGGER__MESSAGE_CONTEXT) { - const messageContext = typeof messageContextOrLogger === 'string' - ? messageContextOrLogger - : getMessageContext(messageContextOrLogger); - if (messageContext) { - customLogLevels[messageContext] = level; - if (container.has(messageContext)) { - const logger = container.get(messageContext); - logger.level = level; - } - } - else if (typeof messageContextOrLogger !== 'string') { - moduleLogger.warn('Setting log level for logger with unknown message context'); - messageContextOrLogger.level = level; - } -} -/** - * Change the global log level of the container which will set default level for all active loggers. - * e.g., to set the global log level call `setGlobalLogLevel('debug')`. - * @param level - The log level to set the global log level to. - */ -function setGlobalLogLevel(level) { - container.options.level = level; - // Update existing loggers' log level with global level. - container.loggers.forEach(logger => { - logger.level = level; - }); -} -/** - * Get the global log level of the container. - * @returns The global log level, or `undefined` when not defined. - */ -function getGlobalLogLevel() { - return container.options.level; -} -/** - * Change the global transport of the container which will set default transport for all active loggers. - * e.g., to set the global transport call `setGlobalTransports(httpTransport)`. - * @param customTransports - The transport to set the global transport to. Both single transport and an array with multiple transports are supported. - */ -function setGlobalTransports(customTransports) { - container.options.transports = customTransports; - container.loggers.forEach(logger => { - logger.clear(); - return Array.isArray(customTransports) - ? customTransports.forEach(transport => logger.add(transport)) - : logger.add(customTransports); - }); -} -/** - * Change the log format of a logger based on its message context. - * e.g., to set the log format for the destination accessor module of the SDK to `local`, simply call `setLogFormat(logFormat.local, 'destination-accessor')`. - * @param format - Format to set the logger to. Use `logFormat` to get the pre-defined log formats or use a custom log format. - * @param messageContextOrLogger - Message context of the logger to change the log level for or the logger itself. - */ -function setLogFormat(format, messageContextOrLogger = DEFAULT_LOGGER__MESSAGE_CONTEXT) { - const messageContext = typeof messageContextOrLogger === 'string' - ? messageContextOrLogger - : getMessageContext(messageContextOrLogger); - if (messageContext) { - customLogFormats[messageContext] = format; - if (container.has(messageContext)) { - const logger = container.get(messageContext); - logger.format = format; - } - } - else if (typeof messageContextOrLogger !== 'string') { - moduleLogger.warn('Setting log format for logger with unknown message context'); - messageContextOrLogger.format = format; - } -} -/** - * Change the global log format of the container which will set default format for all active loggers. - * e.g., to set the global log format to `local` call `setGlobalLogLevel(logFormat.local)` or use a custom log format. - * @param format - The log format to set the global log format to. - */ -function setGlobalLogFormat(format) { - container.options.format = format; - // Update existing loggers' log level with global level. - container.loggers.forEach(logger => { - logger.format = format; - }); -} -/** - * Get the global log format of the container. - * @returns The global log format, or `undefined` when not defined. - */ -function getGlobalLogFormat() { - return container.options.format; -} -const defaultSensitiveKeys = [ - 'access_token', - 'authentication', - 'authorization', - 'apiKey', - 'credentials', - 'csrf', - 'xsrf', - 'secret', - 'password', - 'JTENANT', - 'JSESSION' -]; -/** - * Check if the input key contains or matches any of the sensitive keys. - * @param inputKey - Key of the record to be sanitized. - * @param value - Value corresponding to the inputKey. - * @param sensitiveKeys - List of keys to be matched. - * @returns A boolean to indicate if the key contains or matches any sensitive key. - */ -function isSensitive(inputKey, value, sensitiveKeys) { - const normalizedKeys = sensitiveKeys.map(key => key.toLowerCase()); - // If checking cookie header, it matches the content instead of the key - const input = isCookieHeader(inputKey, value) ? value : inputKey; - return normalizedKeys.some(normalizedKey => input.toLowerCase().includes(normalizedKey)); -} -function isCookieHeader(inputKey, value) { - return inputKey.toLowerCase() === 'cookie' && typeof value === 'string'; -} -/** - * Potentially sensitive keys will be matched case-insensitive and as substrings. - * Matches will be replaced with a placeholder string. - * @param input - The record to be sanitized. - * @param replacementString - The placeholder string. - * @param sensitiveKeys - The list of keys to be replaced. This overrides the default list. - * @returns The sanitized copy of the input record. - */ -function sanitizeRecord(input, replacementString = '', sensitiveKeys = defaultSensitiveKeys) { - return Object.fromEntries(Object.entries(input).map(([inputKey, value]) => isSensitive(inputKey, value, sensitiveKeys) - ? [inputKey, replacementString] - : [inputKey, value])); -} -function getMessageContext(logger) { - // This is a workaround for the missing defaultMeta property on the winston logger. - const loggerOptions = logger; - if (loggerOptions && - loggerOptions.defaultMeta && - loggerOptions.defaultMeta.custom_fields) { - return loggerOptions.defaultMeta.custom_fields.messageContext; - } -} -/** - * Reset all the custom log levels for loggers and message context. - */ -function resetCustomLogLevels() { - Object.keys(customLogLevels).forEach(key => delete customLogLevels[key]); -} -/** - * Reset all the custom log formats for loggers and message context. - */ -function resetCustomLogFormats() { - Object.keys(customLogFormats).forEach(key => delete customLogFormats[key]); -} -//# sourceMappingURL=cloud-sdk-logger.js.map - -/***/ }), - -/***/ 5286: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(5332), exports); -__exportStar(__nccwpck_require__(2457), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 5332: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.kibana = void 0; -const winston_1 = __nccwpck_require__(9654); -const local_1 = __nccwpck_require__(2457); -const { combine, timestamp, json, errors } = winston_1.format; -/** - * Format for logging in Kibana. - */ -exports.kibana = combine(errors({ stack: true }), timestamp(), (0, winston_1.format)(kibanaTransformer)(), json()); -function kibanaTransformer(info) { - return { - ...info, - msg: (0, local_1.getMessageOrStack)(info), - written_ts: new Date(info.timestamp).getTime(), - written_at: info.timestamp - }; -} -//# sourceMappingURL=kibana.js.map - -/***/ }), - -/***/ 2457: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.local = void 0; -exports.getMessageOrStack = getMessageOrStack; -const node_util_1 = __nccwpck_require__(7975); -const winston_1 = __nccwpck_require__(9654); -const { combine, timestamp, cli, printf, errors } = winston_1.format; -/** - * Format for local logging. - */ -exports.local = combine(errors({ stack: true }), timestamp(), (0, winston_1.format)(localTransformer)(), cli(), printf((info) => { - // Ensure custom_fields is an object and has messageContext - const messageContext = info.custom_fields && - typeof info.custom_fields === 'object' && - 'messageContext' in info.custom_fields - ? `${(0, node_util_1.styleText)('blue', `(${info.custom_fields.messageContext})`)}: ` - : ''; - // Type guard to ensure message is a string - const message = typeof info.message === 'string' ? info.message : ''; - const trimmedMessage = message.replace(/^\s*/, ''); - const paddingLength = message.length - trimmedMessage.length + messageContext.length; - if (info.error) { - info.level = (0, node_util_1.styleText)('inverse', info.level); - } - return `${(0, node_util_1.styleText)('gray', `[${info.timestamp}]`)} ${info.level} ${messageContext.padStart(paddingLength, ' ')}${trimmedMessage}`; -})); -/** - * Gets the stack of the given error if available, otherwise the message. - * @param info - Object to be transformed. - * @returns The message string to be used. - * @internal - */ -function getMessageOrStack(info) { - const isString = (value) => typeof value === 'string'; - // Check if it's an error with a stack trace - const hasStackTrace = info.stack && info.level === 'error'; - if (hasStackTrace && isString(info.stack)) { - return info.stack; - } - if (isString(info.message)) { - return info.message; - } - return ''; -} -function localTransformer(info) { - return { - ...info, - level: info.level.toUpperCase(), - message: getMessageOrStack(info) - }; -} -//# sourceMappingURL=local.js.map - -/***/ }), - -/***/ 3112: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(9317), exports); -__exportStar(__nccwpck_require__(5286), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 608: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isNullish = isNullish; -/** - * Checks whether a value is either `null` or `undefined`. - * @param val - Value to check. - * @returns `true` for `null` or `undefined`, `false` otherwise. - */ -function isNullish(val) { - return val === null || val === undefined; -} -//# sourceMappingURL=nullish.js.map - -/***/ }), - -/***/ 4248: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exclude = exports.pick = exports.renameKeys = void 0; -exports.propertyExists = propertyExists; -exports.toSanitizedObject = toSanitizedObject; -exports.pickIgnoreCase = pickIgnoreCase; -exports.pickValueIgnoreCase = pickValueIgnoreCase; -exports.pickNonNullish = pickNonNullish; -exports.mergeLeftIgnoreCase = mergeLeftIgnoreCase; -exports.mergeIgnoreCase = mergeIgnoreCase; -const nullish_1 = __nccwpck_require__(608); -/** - * Checks if a chain of properties exists on the given object. - * @param obj - The object to be checked. - * @param properties - Chained properties. - * @returns `true` if the property chain leads to a truthy value, `false` otherwise. - */ -function propertyExists(obj, ...properties) { - if (!properties.length) { - return true; - } - if (obj && obj.hasOwnProperty(properties[0])) { - return propertyExists(obj[properties[0]], ...properties.slice(1)); - } - return false; -} -/** - * Takes an object and returns a new object whose keys are renamed according to the provided key mapping. - * Any keys in the input object not present in the key mapping will be present in the output object as-is. - * If a key in the key mapping is not present in the input object, the output object will contain the key with value "undefined". - * @param keyMapping - An object mapping keys of the input object to keys of the output object. - * @param obj - The input object. - * @returns An object with renamed keys. - */ -const renameKeys = (keyMapping, obj) => { - const unchangedEntries = Object.keys(obj) - .filter(k => !Object.keys(keyMapping).includes(k)) - .reduce((newObj, key) => ({ ...newObj, [key]: obj[key] }), {}); - return Object.entries(keyMapping).reduce((newObj, [oldKey, newKey]) => ({ ...newObj, [newKey]: obj[oldKey] }), unchangedEntries); -}; -exports.renameKeys = renameKeys; -/** - * Create a shallow copy of the given object, that contains the given keys. - * Non existing keys in the source object are ignored. - * @param keys - Properties to be selected. - * @param obj - Object from which the values are taken. - * @returns An object with the selected keys and corresponding values. - */ -const pick = (keys, obj) => { - const result = {}; - keys.forEach(key => { - const value = obj[key]; - if (Object.keys(obj).includes(key)) { - result[key] = value; - } - }); - return result; -}; -exports.pick = pick; -/** - * Create a shallow copy of the given object, that does not contain the given keys. - * Non existing keys in the source object are ignored. - * @param keys - Properties to be selected. - * @param obj - Object from which the values are taken. - * @returns An object with the selected keys and corresponding values. - */ -const exclude = (keys, obj) => { - const result = {}; - Object.keys(obj).forEach(key => { - const value = obj[key]; - if (!keys.includes(key)) { - result[key] = value; - } - }); - return result; -}; -exports.exclude = exclude; -/** - * Create an object based on the given key and value if neither key nor value are nullish. - * @param key - Name of the header. - * @param value - Value of the header. - * @returns - An object containing the given key and value of an empty object. - */ -function toSanitizedObject(key, value) { - return (0, nullish_1.isNullish)(key) || (0, nullish_1.isNullish)(value) ? {} : { [key]: value }; -} -/** - * Create a shallow copy of the given object, that contains the given keys, independent of casing. - * Non existing keys in the source object are ignored. - * @param obj - Object to pick the given key from. - * @param keys - Keys of the pair to be picked. - * @returns - An object containing the given key-value pairs in its original case or an empty object if none of them are found. - */ -function pickIgnoreCase(obj = {}, ...keys) { - return keys.reduce((filteredHeaders, providedKey) => { - const originalKey = Object.keys(obj).find(objKey => objKey.toLowerCase() === providedKey.toLowerCase()); - return { - ...filteredHeaders, - ...(originalKey && { [originalKey]: obj[originalKey] }) - }; - }, {}); -} -/** - * Returns the value of an object based on the given key, independent of casing. - * @param obj - Object to be searched for the given key. - * @param key - Key of the value to pick. - * @returns The value of for the given key or `undefined`, if not available. - */ -function pickValueIgnoreCase(obj = {}, key) { - return Object.values(pickIgnoreCase(obj, key))[0]; -} -/** - * Create a shallow copy of the given object, that contains all entries with non-nullish values. - * @param obj - An object to pick from. - * @returns - A filtered object containing only keys with non-nullish values. - */ -function pickNonNullish(obj = {}) { - return Object.entries(obj) - .filter(([key, value]) => !(0, nullish_1.isNullish)(key) && !(0, nullish_1.isNullish)(value)) - .reduce((filtered, [key, value]) => ({ ...filtered, [key]: value }), {}); -} -/** - * Create an object by merging the `right` object into a shallow copy of the `left` object ignoring casing, but keeping the `right` casing. Only keys present in the `left` object will be present in the merged object. - * @param left - Object to merge into. They keys of this object will be present in the returned object. - * @param right - Object to merge. Only keys in `left` will be considered for merging. - * @returns - An object containing all keys from the `left` object, where entries present in the `right` object are replaced. Note that the casing used by `right` will be used. - */ -function mergeLeftIgnoreCase(left = {}, right = {}) { - return Object.entries(left) - .map(([key, value]) => pickValueIgnoreCase(right, key) - ? pickIgnoreCase(right, key) - : { [key]: value }) - .reduce((replaced, obj) => ({ ...replaced, ...obj }), {}); -} -/** - * Create an object by merging the `right` object into a shallow copy of the `left` object ignoring casing, but keeping the right casing. Keys present both objects will be present in the merged object. - * @param left - Object to merge. - * @param right - Object to merge. The casing of the keys of this object takes precedence. - * @returns - An object containing all keys from both objects, where entries present in the `right` object are replaced. Note that the casing used by `right` will be used. - */ -function mergeIgnoreCase(left = {}, right = {}) { - return { - ...mergeLeftIgnoreCase(left, right), - ...right - }; -} -//# sourceMappingURL=object.js.map - -/***/ }), - -/***/ 9047: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.identity = identity; -/** - * Identity function. - * @param value - Any value. - * @returns The given value. - */ -function identity(value) { - return value; -} -//# sourceMappingURL=pipe.js.map - -/***/ }), - -/***/ 7542: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.finishAll = finishAll; -/** - * Await all promises and resolve if non of them failed. - * Reject if at least one of them was rejected, but only once all of them are finished. - * Throws an error consisting of a list of reasons. - * @param promises - Promises to settle. - * @param errorMessage - Message to use as introductory text of the error if an error occurs. - */ -async function finishAll(promises, errorMessage) { - const settledPromises = await Promise.allSettled(promises); - const rejectedPromises = settledPromises.filter(promise => promise.status === 'rejected'); - if (rejectedPromises.length) { - const reasons = rejectedPromises - .map(promise => `\t${promise.reason}`) - .join('\n'); - const message = errorMessage ? `${errorMessage} ` : ''; - throw new Error(`${message}Errors: [\n${reasons}\n]`); - } -} -//# sourceMappingURL=promise.js.map - -/***/ }), - -/***/ 4399: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.removeSlashes = removeSlashes; -exports.removeTrailingSlashes = removeTrailingSlashes; -exports.removeLeadingSlashes = removeLeadingSlashes; -/** - * @internal - * Utility function to remove a single leading and trailing slash from a path. - */ -function removeSlashes(path) { - path = removeLeadingSlashes(path); - path = removeTrailingSlashes(path); - return path; -} -/** - * @internal - * Utility function to remove a single trailing slash from a path. - */ -function removeTrailingSlashes(path) { - return path.endsWith('/') ? path.slice(0, -1) : path; -} -/** - * @internal - * Utility function to remove a single leading slash from a path. - */ -function removeLeadingSlashes(path) { - return path.startsWith('/') ? path.slice(1) : path; -} -//# sourceMappingURL=remove-slashes.js.map - -/***/ }), - -/***/ 7841: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.webEOL = exports.unixEOL = void 0; -exports.upperCaseSnakeCase = upperCaseSnakeCase; -exports.camelCase = camelCase; -exports.titleFormat = titleFormat; -exports.pascalCase = pascalCase; -exports.kebabCase = kebabCase; -exports.formatJson = formatJson; -const voca_1 = __importDefault(__nccwpck_require__(5231)); -/** - * Within all files generated by the SDK we use the unix style end of line delimiter. - * We do not consider if the generator is executed on windows or unix systems. - * It will always be `\n` to have consistent clients between operating systems. - * @deprecated Since v4.6.0. Use '\n' directly instead. - */ -exports.unixEOL = '\n'; -/** - * For request payloads, etc., it is convention to use the `\r\n` new line. - * @deprecated Since v4.6.0. Use '\r\n' directly instead. - */ -exports.webEOL = '\r\n'; -/** - * Convert a string to the uppercase snake case. This format is used e.g. for static properties on entity classes. - * @param str - The string to be transformed. - * @returns The input string in the case used by static methods on entity-classes. - */ -function upperCaseSnakeCase(str) { - return voca_1.default.upperCase(voca_1.default.snakeCase(str)); -} -/** - * Convert a string to camelCase. This format used e.g. for properties on entity class instances. - * @param str - The string to be transformed. - * @returns The transformed string. - */ -function camelCase(str) { - return voca_1.default.camelCase(str); -} -/** - * Convert a string to a human readable format, e.g. it transforms `to_BusinessPartner` to `To Business Partner`. - * @param str - The string to be transformed. - * @returns The transformed string. - */ -function titleFormat(str) { - return voca_1.default.titleCase(voca_1.default.words(str).join(' ')); -} -/** - * Convert a string to pascal case. This format is used e.g. for types. - * @param str - The string to be transformed. - * @returns The transformed string. - */ -function pascalCase(str) { - return voca_1.default - .words(str) - .map(word => voca_1.default.capitalize(word)) - .join(''); -} -/** - * Convert a string to kebab case. This format is used e.g. for file names. - * @param str - The string to be transformed. - * @returns The transformed string. - */ -function kebabCase(str) { - return voca_1.default.kebabCase(str); -} -/** - * Convert a JSON object to a string using formatting in line with the prettier with indentation and new line at the end. - * @param json - Object to be stringified. - * @returns The JSON object as string. - */ -function formatJson(json) { - return JSON.stringify(json, null, 2) + '\n'; -} -//# sourceMappingURL=string-formatter.js.map - -/***/ }), - -/***/ 2310: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.encodeBase64 = encodeBase64; -exports.trimLeft = trimLeft; -exports.trimRight = trimRight; -exports.trim = trim; -exports.removeFileExtension = removeFileExtension; -/** - * Encode a string to a base64 encoded string. - * @param str - String to encode. - * @returns Base64 encoded string. - */ -function encodeBase64(str) { - return Buffer.from(str).toString('base64'); -} -/** - * Remove whitespace from the left side of a string. - * @param string - String to trim. - * @returns String without whitespace on the left side. - */ -function trimLeft(string) { - const subStrings = string.split('\n'); - const leftTrimmed = subStrings[0].trimStart(); - if (!leftTrimmed) { - subStrings.shift(); - } - else { - subStrings[0] = leftTrimmed; - } - return subStrings.join('\n'); -} -/** - * Remove whitespace from the right side of a string. - * @param string - String to trim. - * @returns String without whitespace on the right side. - */ -function trimRight(string) { - const subStrings = string.split('\n'); - const rightTrimmed = subStrings[subStrings.length - 1].trimEnd(); - if (!rightTrimmed) { - subStrings.pop(); - } - else { - subStrings[subStrings.length - 1] = rightTrimmed; - } - return subStrings.join('\n'); -} -/** - * Remove whitespace from the left and right side of a string. - * @param string - String to trim. - * @returns String without outer whitespace. - */ -function trim(string) { - return trimRight(trimLeft(string)); -} -/** - * Remove file extension from a string, e.g. remove 'test.jpg' would return 'test'. - * @param fileName - File name to remove the file extension from. - * @returns File name without extension. - */ -function removeFileExtension(fileName) { - return fileName.includes('.') - ? fileName.split('.').slice(0, -1).join('.') - : fileName; -} -//# sourceMappingURL=string.js.map - -/***/ }), - -/***/ 4814: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.caps = caps; -/** - * Returns the OData version in capital letters so V2 or V4. - * @param oDataVersion - OData version in lower case: 'v2' or 'v4'. - * @returns 'V2' or 'V4'. - */ -function caps(oDataVersion) { - return oDataVersion ? oDataVersion.toUpperCase() : 'V2'; -} -//# sourceMappingURL=types.js.map - -/***/ }), - -/***/ 6770: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UniqueNameGenerator = void 0; -/** - * Holds state on already used names and provides new names if there are naming conflicts. - */ -class UniqueNameGenerator { - static getNameForComparison(name, caseSensitive) { - return caseSensitive ? name : name.toLowerCase(); - } - /** - * Creates an instance of UniqueNameGenerator. - * @param indexSeparator - The separator to be used when adding an index. - * @param usedNames - Sets the already used names considered in the finding process. - */ - constructor(indexSeparator = '_', usedNames = []) { - this.indexSeparator = indexSeparator; - this.usedNames = []; - this.addToUsedNames(...usedNames); - } - /** - * Adds the name(s) to the already used names. - * @param names - Names to be added. - */ - addToUsedNames(...names) { - this.usedNames.push(...names); - } - /** - * Generate a unique name by appending an index separated by the `indexSeparator` if necessary, e.g. if `MyName` is already taken `MyName_1` will be found by default. - * If the name is already unique nothing is appended. - * @param name - The name to get a unique name from. - * @param caseSensitive - Whether to check the already used names in a case sensitive manner. - * @returns A unique name. - */ - generateUniqueName(name, caseSensitive = true) { - return this.generateUniqueNamesWithSuffixes(name, [], caseSensitive)[0]; - } - /** - * Generate a unique name by appending an index separated by the `indexSeparator` if necessary, e.g. if `MyName` is already taken `MyName_1` will be found by default. - * The generated name is added to the used names. - * If the name is already unique nothing is appended. - * @param name - The name to get a unique name from. - * @param caseSensitive - Whether to check the already used names in a case sensitive manner. - * @returns A unique name. - */ - generateAndSaveUniqueName(name, caseSensitive = true) { - const uniqueName = this.generateUniqueName(name, caseSensitive); - this.addToUsedNames(uniqueName); - return uniqueName; - } - /** - * Generate unique names by appending an index separated by the `indexSeparator` if necessary, while respecting the given suffixes. - * If the name is already unique nothing is appended. - * Each given suffix is appended to the unique name in the result. - * The resulting names are also checked for uniqueness. - * All names in the result have the same number suffix. - * @example if `MyName` and `MyName_1MySuffix` is already taken, `[MyName_2, MyName_2MySuffix]` will be generated by default. - * @param name - The name to get a unique name from. - * @param suffixes - Additional name of suffixes to be considered for the finding process, as well as the output. - * @param caseSensitive - Whether to check the already used names in a case sensitive manner. - * @returns A list of unique names. The length of this array is one plus the number of suffixes provided. The first entry corresponds to the given name. - */ - generateUniqueNamesWithSuffixes(name, suffixes, caseSensitive = true) { - // Filter names to those that might be relevant for performance reasons - const relevantUsedNames = this.getUsedNamesStartingWith(name, caseSensitive); - const namesWithSuffixes = this.generateNamesWithSuffixes(name, suffixes); - // Names do not need index - if (!this.areNamesUsed(namesWithSuffixes, relevantUsedNames, caseSensitive)) { - return [name, ...namesWithSuffixes]; - } - // Names do need index - const index = this.getUniqueIndex(name, relevantUsedNames, suffixes, caseSensitive); - return this.generateNamesWithIndexAndSuffixes(name, index, suffixes); - } - /** - * Generate unique names by appending an index separated by the `indexSeparator` if necessary, while respecting the given suffixes. - * If the name is already unique nothing is appended. - * The generated names are added to the used names. - * Each given suffix is appended to the unique name in the result. - * The resulting names are also checked for uniqueness. - * All names in the result have the same number suffix. - * @example if `MyName` and `MyName_1MySuffix` is already taken, `[MyName_2, MyName_2MySuffix]` will be generated by default. - * @param name - The name to get a unique name from. - * @param suffixes - Additional name of suffixes to be considered for the finding process, as well as the output. - * @param caseSensitive - Whether to check the already used names in a case sensitive manner. - * @returns A list of unique names. The length of this array is one plus the number of suffixes provided. The first entry corresponds to the given name. - */ - generateAndSaveUniqueNamesWithSuffixes(name, suffixes, caseSensitive = true) { - const uniqueNames = this.generateUniqueNamesWithSuffixes(name, suffixes, caseSensitive); - this.addToUsedNames(...uniqueNames); - return uniqueNames; - } - getUsedNamesForComparison(caseSensitive) { - return this.usedNames.map(name => UniqueNameGenerator.getNameForComparison(name, caseSensitive)); - } - areNamesUsed(names, usedNames, caseSensitive) { - return names.some(name => usedNames - .map(usedName => UniqueNameGenerator.getNameForComparison(usedName, caseSensitive)) - .includes(UniqueNameGenerator.getNameForComparison(name, caseSensitive))); - } - generateNamesWithIndexAndSuffixes(name, index, suffixes) { - const nameWithoutIndex = this.getNameWithoutIndex(name); - return this.generateNamesWithSuffixes(`${nameWithoutIndex}${this.indexSeparator}${index}`, suffixes); - } - generateNamesWithSuffixes(name, suffixes) { - return [name, ...suffixes.map(nameSuffix => `${name}${nameSuffix}`)]; - } - getUsedNamesStartingWith(name, caseSensitive) { - const modifiedName = this.getNameWithoutIndex(name); - return this.getUsedNamesForComparison(caseSensitive).filter(used => used.startsWith(UniqueNameGenerator.getNameForComparison(modifiedName, caseSensitive))); - } - getUniqueIndex(name, usedNames, suffixes, caseSensitive) { - let index = 1; - // This algorithm has order N**2 for N identical names. With a sort you could get it down to N*log(N). - // However with the related items in mind this is much easier and N should be small anyway. - while (index < UniqueNameGenerator.MAXIMUM_NUMBER_OF_SUFFIX) { - const newNames = this.generateNamesWithIndexAndSuffixes(name, index, suffixes); - if (!this.areNamesUsed(newNames, usedNames, caseSensitive)) { - return index; - } - index++; - } - throw new Error(`Unable to find a unique name for ${name} within the range of ${UniqueNameGenerator.MAXIMUM_NUMBER_OF_SUFFIX} suffixes.`); - } - getNameWithoutIndex(name) { - return name.replace(new RegExp(`${this.indexSeparator}\\d+$`), ''); - } -} -exports.UniqueNameGenerator = UniqueNameGenerator; -UniqueNameGenerator.MAXIMUM_NUMBER_OF_SUFFIX = 1000; -//# sourceMappingURL=unique-name-generator.js.map - -/***/ }), - -/***/ 2158: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isValidUrl = isValidUrl; -exports.checkUrlExists = checkUrlExists; -const axios_1 = __importDefault(__nccwpck_require__(7728)); -/** - * Checks whether a string is a valid URL. - * @param url - String to check. - * @returns True if the string is a valid URL, false otherwise. - * @internal - */ -function isValidUrl(url) { - try { - new URL(url); - return true; - } - catch { - return false; - } -} -/** - * Checks whether a URL is existing via a head request. - * @param url - URL to be checked. - * @returns Promise - resolves if the URL exists. - */ -async function checkUrlExists(url) { - return axios_1.default - .request({ url, method: 'HEAD' }) - .then(response => response.status); -} -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 181: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer"); - -/***/ }), - -/***/ 6982: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); - -/***/ }), - -/***/ 1943: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5675: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http2"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 3024: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs"); - -/***/ }), - -/***/ 1455: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 8161: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:os"); - -/***/ }), - -/***/ 6760: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 6193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:string_decoder"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 857: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); - -/***/ }), - -/***/ 5824: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("prettier"); - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 2018: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tty"); - -/***/ }), - -/***/ 5852: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("typescript"); - -/***/ }), - -/***/ 7016: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("url"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }), - -/***/ 3106: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("zlib"); - -/***/ }), - -/***/ 885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* eslint-disable no-var */ - -var reusify = __nccwpck_require__(3728) - -function fastqueue (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - if (!(_concurrency >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - - var cache = reusify(Task) - var queueHead = null - var queueTail = null - var _running = 0 - var errorHandler = null - - var self = { - push: push, - drain: noop, - saturated: noop, - pause: pause, - paused: false, - - get concurrency () { - return _concurrency - }, - set concurrency (value) { - if (!(value >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - _concurrency = value - - if (self.paused) return - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - }, - - running: running, - resume: resume, - idle: idle, - length: length, - getQueue: getQueue, - unshift: unshift, - empty: noop, - kill: kill, - killAndDrain: killAndDrain, - error: error, - abort: abort - } - - return self - - function running () { - return _running - } - - function pause () { - self.paused = true - } - - function length () { - var current = queueHead - var counter = 0 - - while (current) { - current = current.next - counter++ - } - - return counter - } - - function getQueue () { - var current = queueHead - var tasks = [] - - while (current) { - tasks.push(current.value) - current = current.next - } - - return tasks - } - - function resume () { - if (!self.paused) return - self.paused = false - if (queueHead === null) { - _running++ - release() - return - } - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - } - - function idle () { - return _running === 0 && self.length() === 0 - } - - function push (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueTail) { - queueTail.next = current - queueTail = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function unshift (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueHead) { - current.next = queueHead - queueHead = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function release (holder) { - if (holder) { - cache.release(holder) - } - var next = queueHead - if (next && _running <= _concurrency) { - if (!self.paused) { - if (queueTail === queueHead) { - queueTail = null - } - queueHead = next.next - next.next = null - worker.call(context, next.value, next.worked) - if (queueTail === null) { - self.empty() - } - } else { - _running-- - } - } else if (--_running === 0) { - self.drain() - } - } - - function kill () { - queueHead = null - queueTail = null - self.drain = noop - } - - function killAndDrain () { - queueHead = null - queueTail = null - self.drain() - self.drain = noop - } - - function abort () { - var current = queueHead - queueHead = null - queueTail = null - - while (current) { - var next = current.next - var callback = current.callback - var errorHandler = current.errorHandler - var val = current.value - var context = current.context - - // Reset the task state - current.value = null - current.callback = noop - current.errorHandler = null - - // Call error handler if present - if (errorHandler) { - errorHandler(new Error('abort'), val) - } - - // Call callback with error - callback.call(context, new Error('abort')) - - // Release the task back to the pool - current.release(current) - - current = next - } - - self.drain = noop - } - - function error (handler) { - errorHandler = handler - } -} - -function noop () {} - -function Task () { - this.value = null - this.callback = noop - this.next = null - this.release = noop - this.context = null - this.errorHandler = null - - var self = this - - this.worked = function worked (err, result) { - var callback = self.callback - var errorHandler = self.errorHandler - var val = self.value - self.value = null - self.callback = noop - if (self.errorHandler) { - errorHandler(err, val) - } - callback.call(self.context, err, result) - self.release(self) - } -} - -function queueAsPromised (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - function asyncWrapper (arg, cb) { - worker.call(this, arg) - .then(function (res) { - cb(null, res) - }, cb) - } - - var queue = fastqueue(context, asyncWrapper, _concurrency) - - var pushCb = queue.push - var unshiftCb = queue.unshift - - queue.push = push - queue.unshift = unshift - queue.drained = drained - - return queue - - function push (value) { - var p = new Promise(function (resolve, reject) { - pushCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function unshift (value) { - var p = new Promise(function (resolve, reject) { - unshiftCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function drained () { - var p = new Promise(function (resolve) { - process.nextTick(function () { - if (queue.idle()) { - resolve() - } else { - var previousDrain = queue.drain - queue.drain = function () { - if (typeof previousDrain === 'function') previousDrain() - resolve() - queue.drain = previousDrain - } - } - }) - }) - - return p - } -} - -module.exports = fastqueue -module.exports.promise = queueAsPromised - - -/***/ }), - -/***/ 2514: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var R=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Ge=R(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.range=Y.balanced=void 0;var Gs=(n,t,e)=>{let s=n instanceof RegExp?Ie(n,e):n,i=t instanceof RegExp?Ie(t,e):t,r=s!==null&&i!=null&&(0,Y.range)(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}};Y.balanced=Gs;var Ie=(n,t)=>{let e=t.match(n);return e?e[0]:null},zs=(n,t,e)=>{let s,i,r,h,o,a=e.indexOf(n),l=e.indexOf(t,a+1),f=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;f>=0&&!o;){if(f===a)s.push(f),a=e.indexOf(n,f+1);else if(s.length===1){let c=s.pop();c!==void 0&&(o=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&h!==void 0&&(o=[r,h])}return o};Y.range=zs});var Ke=R(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.EXPANSION_MAX=void 0;it.expand=ei;var ze=Ge(),Ue="\0SLASH"+Math.random()+"\0",$e="\0OPEN"+Math.random()+"\0",ue="\0CLOSE"+Math.random()+"\0",qe="\0COMMA"+Math.random()+"\0",He="\0PERIOD"+Math.random()+"\0",Us=new RegExp(Ue,"g"),$s=new RegExp($e,"g"),qs=new RegExp(ue,"g"),Hs=new RegExp(qe,"g"),Vs=new RegExp(He,"g"),Ks=/\\\\/g,Xs=/\\{/g,Ys=/\\}/g,Js=/\\,/g,Zs=/\\./g;it.EXPANSION_MAX=1e5;function ce(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function Qs(n){return n.replace(Ks,Ue).replace(Xs,$e).replace(Ys,ue).replace(Js,qe).replace(Zs,He)}function ti(n){return n.replace(Us,"\\").replace($s,"{").replace(qs,"}").replace(Hs,",").replace(Vs,".")}function Ve(n){if(!n)return[""];let t=[],e=(0,ze.balanced)("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,h=s.split(",");h[h.length-1]+="{"+i+"}";let o=Ve(r);return r.length&&(h[h.length-1]+=o.shift(),h.push.apply(h,o)),t.push.apply(t,h),t}function ei(n,t={}){if(!n)return[];let{max:e=it.EXPANSION_MAX}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(Qs(n),e,!0).map(ti)}function si(n){return"{"+n+"}"}function ii(n){return/^-?0\d/.test(n)}function ri(n,t){return n<=t}function ni(n,t){return n>=t}function ht(n,t,e){let s=[],i=(0,ze.balanced)("{","}",n);if(!i)return[n];let r=i.pre,h=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o=0;if(!l&&!f)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+ue+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=Ve(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(si),c.length===1))return h.map(u=>i.pre+c[0]+u);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let u=ce(c[0]),m=ce(c[1]),p=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ce(c[2])):1,w=ri;m0){let U=new Array(B+1).join("0");y<0?S="-"+U+S.slice(1):S=U+S}}d.push(S)}}else{d=[];for(let u=0;u{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.assertValidPattern=void 0;var hi=1024*64,oi=n=>{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>hi)throw new TypeError("pattern is too long")};Ct.assertValidPattern=oi});var Je=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.parseClass=void 0;var ai={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ot=n=>n.replace(/[[\]\\-]/g,"\\$&"),li=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ye=n=>n.join(""),ci=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,h=!1,o=!1,a=!1,l=!1,f=e,c="";t:for(;rc?s.push(ot(c)+"-"+ot(p)):p===c&&s.push(ot(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(ot(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(ot(p)),r++}if(f{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.unescape=void 0;var ui=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!0}={})=>e?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");At.unescape=ui});var pe=R(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.AST=void 0;var fi=Je(),Mt=kt(),di=new Set(["!","?","+","*","@"]),Ze=n=>di.has(n),pi="(?!(?:^|/)\\.\\.?(?:$|/))",Pt="(?!\\.)",mi=new Set(["[","."]),gi=new Set(["..","."]),wi=new Set("().*{}+?[]^$\\!"),bi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),de="[^/]",Qe=de+"*?",ts=de+"+?",fe=class n{type;#t;#s;#n=!1;#r=[];#h;#S;#w;#c=!1;#o;#f;#u=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#h=e,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?s:this.#t.#o,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#h?this.#h.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#f=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#h;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#h?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#S===0)return!0;let t=this.#h;for(let e=0;etypeof u!="string"),l=this.#r.map(u=>{let[m,p,b,w]=typeof u=="string"?n.#v(u,this.#s,a):u.toRegExpSource(t);return this.#s=this.#s||b,this.#n=this.#n||w,m}).join(""),f="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&gi.has(this.#r[0]))){let m=mi,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),b=!e&&!t&&m.has(l.charAt(0));f=p?pi:b?Pt:""}let c="";return this.isEnd()&&this.#t.#c&&this.#h?.type==="!"&&(c="(?:$|\\/)"),[f+l+c,(0,Mt.unescape)(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,(0,Mt.unescape)(this.toString()),!1,!1]}let h=!s||t||e||!Pt?"":this.#d(!0);h===r&&(h=""),h&&(r=`(?:${r})(?:${h})*?`);let o="";if(this.type==="!"&&this.#u)o=(this.isStart()&&!e?Pt:"")+ts;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Pt:"")+Qe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?")?":`)${this.type}`;o=i+r+a}return[o,(0,Mt.unescape)(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,h]=e.toRegExpSource(t);return this.#n=this.#n||h,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#v(t,e,s=!1){let i=!1,r="",h=!1,o=!1;for(let a=0;a{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.escape=void 0;var yi=(n,{windowsPathsNoEscape:t=!1,magicalBraces:e=!1}={})=>e?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");Ft.escape=yi});var H=R(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.unescape=g.escape=g.AST=g.Minimatch=g.match=g.makeRe=g.braceExpand=g.defaults=g.filter=g.GLOBSTAR=g.sep=g.minimatch=void 0;var Si=Ke(),jt=Xe(),is=pe(),vi=me(),Ei=kt(),_i=(n,t,e={})=>((0,jt.assertValidPattern)(t),!e.nocomment&&t.charAt(0)==="#"?!1:new J(t,e).match(n));g.minimatch=_i;var Oi=/^\*+([^+@!?\*\[\(]*)$/,xi=n=>t=>!t.startsWith(".")&&t.endsWith(n),Ti=n=>t=>t.endsWith(n),Ci=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ri=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ai=/^\*+\.\*+$/,ki=n=>!n.startsWith(".")&&n.includes("."),Mi=n=>n!=="."&&n!==".."&&n.includes("."),Pi=/^\.\*+$/,Di=n=>n!=="."&&n!==".."&&n.startsWith("."),Fi=/^\*+$/,ji=n=>n.length!==0&&!n.startsWith("."),Ni=n=>n.length!==0&&n!=="."&&n!=="..",Li=/^\?+([^+@!?\*\[\(]*)?$/,Wi=([n,t=""])=>{let e=rs([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Bi=([n,t=""])=>{let e=ns([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Ii=([n,t=""])=>{let e=ns([n]);return t?s=>e(s)&&s.endsWith(t):e},Gi=([n,t=""])=>{let e=rs([n]);return t?s=>e(s)&&s.endsWith(t):e},rs=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},ns=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},hs=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",es={win32:{sep:"\\"},posix:{sep:"/"}};g.sep=hs==="win32"?es.win32.sep:es.posix.sep;g.minimatch.sep=g.sep;g.GLOBSTAR=Symbol("globstar **");g.minimatch.GLOBSTAR=g.GLOBSTAR;var zi="[^/]",Ui=zi+"*?",$i="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qi="(?:(?!(?:\\/|^)\\.).)*?",Hi=(n,t={})=>e=>(0,g.minimatch)(e,n,t);g.filter=Hi;g.minimatch.filter=g.filter;var F=(n,t={})=>Object.assign({},n,t),Vi=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return g.minimatch;let t=g.minimatch;return Object.assign((s,i,r={})=>t(s,i,F(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,F(n,r))}static defaults(i){return t.defaults(F(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,h={}){super(i,r,F(n,h))}static fromGlob(i,r={}){return t.AST.fromGlob(i,F(n,r))}},unescape:(s,i={})=>t.unescape(s,F(n,i)),escape:(s,i={})=>t.escape(s,F(n,i)),filter:(s,i={})=>t.filter(s,F(n,i)),defaults:s=>t.defaults(F(n,s)),makeRe:(s,i={})=>t.makeRe(s,F(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,F(n,i)),match:(s,i,r={})=>t.match(s,i,F(n,r)),sep:t.sep,GLOBSTAR:g.GLOBSTAR})};g.defaults=Vi;g.minimatch.defaults=g.defaults;var Ki=(n,t={})=>((0,jt.assertValidPattern)(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Si.expand)(n,{max:t.braceExpandMax}));g.braceExpand=Ki;g.minimatch.braceExpand=g.braceExpand;var Xi=(n,t={})=>new J(n,t).makeRe();g.makeRe=Xi;g.minimatch.makeRe=g.makeRe;var Yi=(n,t,e={})=>{let s=new J(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};g.match=Yi;g.minimatch.match=g.match;var ss=/[?*]|[+@!]\(.*?\)|\[|\]/,Ji=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,jt.assertValidPattern)(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||hs,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,h,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ss.test(r[2]))&&!ss.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(f=>this.parse(f))];if(l)return[r[0],...r.slice(1).map(f=>this.parse(f))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,h-i);let o=s[i+1],a=s[i+2],l=s[i+3];if(o!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let f=s.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let h=1;he.length)}partsMatch(t,e,s=!1){let i=0,r=0,h=[],o="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var h=0,o=0,a=t.length,l=e.length;h>> no match, partial?`,t,d,e,u),d===a))}let p;if(typeof f=="string"?(p=c===f,this.debug("string match",f,c,p)):(p=f.test(c),this.debug("pattern match",f,c,p)),!p)return!1}if(h===a&&o===l)return!0;if(h===a)return s;if(o===l)return h===a-1&&t[h]==="";throw new Error("wtf?")}braceExpand(){return(0,g.braceExpand)(this.pattern,this.options)}parse(t){(0,jt.assertValidPattern)(t);let e=this.options;if(t==="**")return g.GLOBSTAR;if(t==="")return"";let s,i=null;(s=t.match(Fi))?i=e.dot?Ni:ji:(s=t.match(Oi))?i=(e.nocase?e.dot?Ri:Ci:e.dot?Ti:xi)(s[1]):(s=t.match(Li))?i=(e.nocase?e.dot?Bi:Wi:e.dot?Ii:Gi)(s):(s=t.match(Ai))?i=e.dot?Mi:ki:(s=t.match(Pi))&&(i=Di);let r=is.AST.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Ui:e.dot?$i:qi,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?Ji(c):c===g.GLOBSTAR?g.GLOBSTAR:c._src});l.forEach((c,d)=>{let u=l[d+1],m=l[d-1];c!==g.GLOBSTAR||m===g.GLOBSTAR||(m===void 0?u!==void 0&&u!==g.GLOBSTAR?l[d+1]="(?:\\/|"+s+"\\/)?"+u:l[d]=s:u===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":u!==g.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+u,l[d+1]=g.GLOBSTAR))});let f=l.filter(c=>c!==g.GLOBSTAR);if(this.partial&&f.length>=1){let c=[];for(let d=1;d<=f.length;d++)c.push(f.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return f.join("/")}).join("|"),[h,o]=t.length>1?["(?:",")"]:["",""];r="^"+h+r+o+"$",this.partial&&(r="^(?:\\/|"+h+r.slice(1,-1)+o+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let h=i[i.length-1];if(!h)for(let o=i.length-2;!h&&o>=0;o--)h=i[o];for(let o=0;o{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=void 0;var er=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,as=new Set,ge=typeof process=="object"&&process?process:{},ls=(n,t,e,s)=>{typeof ge.emitWarning=="function"?ge.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Lt=globalThis.AbortController,os=globalThis.AbortSignal;if(typeof Lt>"u"){os=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},Lt=class{constructor(){t()}signal=new os;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=ge.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ls("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var sr=n=>!as.has(n),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),cs=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Nt:null:null,Nt=class extends Array{constructor(n){super(n),this.fill(0)}},ir=class at{heap;length;static#t=!1;static create(t){let e=cs(t);if(!e)return[];at.#t=!0;let s=new at(t,e);return at.#t=!1,s}constructor(t,e){if(!at.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},rr=class us{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(t){return{starts:t.#x,ttls:t.#g,autopurgeTimers:t.#b,sizes:t.#O,keyMap:t.#u,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#v,get head(){return t.#y},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#z(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#k(e),rindexes:e=>t.#M(e),isStale:e=>t.#_(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:a,dispose:l,onInsert:f,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:u,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:b,fetchMethod:w,memoMethod:v,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:B,ignoreFetchAbort:U,perf:et}=t;if(et!==void 0&&typeof et?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=et??er,e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let st=e?cs(e):Array;if(!st)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=b,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=v,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new st(e),this.#v=new st(e),this.#y=0,this.#p=0,this.#R=ir.create(e),this.#o=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"&&(this.#r=f),typeof c=="function"?(this.#h=c,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let le="LRU_CACHE_UNBOUNDED";sr(le)&&(as.add(le),ls("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",le,us))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#P(){let t=new Nt(this.#t),e=new Nt(this.#t);this.#g=t,this.#x=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#b=s,this.#W=(h,o,a=this.#c.now())=>{if(e[h]=o!==0?a:0,t[h]=o,s?.[h]&&(clearTimeout(s[h]),s[h]=void 0),o!==0&&s){let l=setTimeout(()=>{this.#_(h)&&this.#A(this.#a[h],"expire")},o+1);l.unref&&l.unref(),s[h]=l}},this.#C=h=>{e[h]=t[h]!==0?this.#c.now():0},this.#D=(h,o)=>{if(t[o]){let a=t[o],l=e[o];if(!a||!l)return;h.ttl=a,h.start=l,h.now=i||r();let f=h.now-l;h.remainingTTL=a-f}};let i=0,r=()=>{let h=this.#c.now();if(this.ttlResolution>0){i=h;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return h};this.getRemainingTTL=h=>{let o=this.#u.get(h);if(o===void 0)return 0;let a=t[o],l=e[o];if(!a||!l)return 1/0;let f=(i||r())-l;return a-f},this.#_=h=>{let o=e[h],a=t[h];return!!a&&!!o&&(i||r())-o>a}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let t=new Nt(this.#t);this.#f=0,this.#O=t,this.#L=e=>{this.#f-=t[e],t[e]=0},this.#B=(e,s,i,r)=>{if(this.#l(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#j=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#G(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#L=t=>{};#j=(t,e,s)=>{};#B=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#p;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#y));)e=this.#v[e]}*#M({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#y;!(!this.#I(e)||((t||!this.#_(e))&&(yield e),e===this.#p));)e=this.#d[e]}#I(t){return t!==void 0&&this.#u.get(this.#a[t])===t}*entries(){for(let t of this.#k())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#M())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#k()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#M()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#k())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#M())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#k()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#M()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#M({allowStale:!0}))this.#_(e)&&(this.#A(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#u.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#x){let h=this.#g[e],o=this.#x[e];if(h&&o){let a=h-(this.#c.now()-o);r.ttl=a,r.start=Date.now()}}return this.#O&&(r.size=this.#O[e]),r}dump(){let t=[];for(let e of this.#k({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let h={value:r};if(this.#g&&this.#x){h.ttl=this.#g[e];let o=this.#c.now()-this.#x[e];h.start=Math.floor(Date.now()-o)}this.#O&&(h.size=this.#O[e]),t.unshift([s,h])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,f=this.#B(t,e,s.size||0,o);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#A(t,"set"),this;let c=this.#o===0?void 0:this.#u.get(t);if(c===void 0)c=this.#o===0?this.#p:this.#R.length!==0?this.#R.pop():this.#o===this.#t?this.#G(!1):this.#o,this.#a[c]=t,this.#i[c]=e,this.#u.set(t,c),this.#d[this.#p]=c,this.#v[c]=this.#p,this.#p=c,this.#o++,this.#j(c,f,a),a&&(a.set="add"),l=!1,this.#F&&this.#r?.(e,t,"add");else{this.#N(c);let d=this.#i[c];if(e!==d){if(this.#T&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=d;u!==void 0&&!h&&(this.#E&&this.#n?.(u,t,"set"),this.#e&&this.#m?.push([u,t,"set"]))}else h||(this.#E&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#L(c),this.#j(c,f,a),this.#i[c]=e,a){a.set="replace";let u=d&&this.#l(d)?d.__staleWhileFetching:d;u!==void 0&&(a.oldValue=u)}}else a&&(a.set="update");this.#F&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#P(),this.#g&&(l||this.#W(c,i,r),a&&this.#D(a,c)),!h&&this.#e&&this.#m){let d=this.#m,u;for(;u=d?.shift();)this.#h?.(...u)}return this}pop(){try{for(;this.#o;){let t=this.#i[this.#y];if(this.#G(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#h?.(...e)}}}#G(t){let e=this.#y,s=this.#a[e],i=this.#i[e];return this.#T&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#L(e),this.#b?.[e]&&(clearTimeout(this.#b[e]),this.#b[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[e],this.#u.delete(s),this.#o--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#u.get(t);if(r!==void 0){let h=this.#i[r];if(this.#l(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#_(r))i&&(i.has="stale",this.#D(i,r));else return s&&this.#C(r),i&&(i.has="hit",this.#D(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#u.get(t);if(i===void 0||!s&&this.#_(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#z(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let h=new Lt,{signal:o}=s;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let a={signal:h.signal,options:s,context:i},l=(p,b=!1)=>{let{aborted:w}=h.signal,v=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(w&&!b?(s.status.fetchAborted=!0,s.status.fetchError=h.signal.reason,v&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),w&&!v&&!b)return c(h.signal.reason,E);let y=u,S=this.#i[e];return(S===u||v&&b&&S===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#A(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},f=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,b)=>{let{aborted:w}=h.signal,v=w&&s.allowStaleOnFetchAbort,E=v||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,S=u;if(this.#i[e]===u&&(!y||!b&&S.__staleWhileFetching===void 0?this.#A(t,"fetch"):v||(this.#i[e]=S.__staleWhileFetching)),E)return s.status&&S.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw p},d=(p,b)=>{let w=this.#S?.(t,r,a);w&&w instanceof Promise&&w.then(v=>p(v===void 0?void 0:v),b),h.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=v=>l(v,!0)))})};s.status&&(s.status.fetchDispatched=!0);let u=new Promise(d).then(l,f),m=Object.assign(u,{__abortController:h,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#u.get(t)):this.#i[e]=m,m}#l(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Lt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:w,signal:v}=e;if(!this.#T)return w&&(w.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:w});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:h,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:u,status:w,signal:v},y=this.#u.get(t);if(y===void 0){w&&(w.fetch="miss");let S=this.#z(t,y,E,p);return S.__returned=S}else{let S=this.#i[y];if(this.#l(S)){let st=s&&S.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",st&&(w.returnedStale=!0)),st?S.__staleWhileFetching:S.__returned=S}let B=this.#_(y);if(!b&&!B)return w&&(w.fetch="hit"),this.#N(y),i&&this.#C(y),w&&this.#D(w,y),S;let U=this.#z(t,y,E,p),et=U.__staleWhileFetching!==void 0&&s;return w&&(w.fetch=B?"stale":"refresh",et&&B&&(w.returnedStale=!0)),et?U.__staleWhileFetching:U.__returned=U}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...h}=e,o=this.get(t,h);if(!r&&o!==void 0)return o;let a=s(t,o,{options:h,context:i});return this.set(t,a,h),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:h}=e,o=this.#u.get(t);if(o!==void 0){let a=this.#i[o],l=this.#l(a);return h&&this.#D(h,o),this.#_(o)?(h&&(h.get="stale"),l?(h&&s&&a.__staleWhileFetching!==void 0&&(h.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#A(t,"expire"),h&&s&&(h.returnedStale=!0),s?a:void 0)):(h&&(h.get="hit"),l?a.__staleWhileFetching:(this.#N(o),i&&this.#C(o),a))}else h&&(h.get="miss")}#U(t,e){this.#v[e]=t,this.#d[t]=e}#N(t){t!==this.#p&&(t===this.#y?this.#y=this.#d[t]:this.#U(this.#v[t],this.#d[t]),this.#U(this.#p,t),this.#p=t)}delete(t){return this.#A(t,"delete")}#A(t,e){let s=!1;if(this.#o!==0){let i=this.#u.get(t);if(i!==void 0)if(this.#b?.[i]&&(clearTimeout(this.#b?.[i]),this.#b[i]=void 0),s=!0,this.#o===1)this.#q(e);else{this.#L(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#u.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#v[i];else if(i===this.#y)this.#y=this.#d[i];else{let h=this.#v[i];this.#d[h]=this.#d[i];let o=this.#d[i];this.#v[o]=this.#v[i]}this.#o--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#h?.(...r)}return s}clear(){return this.#q("delete")}#q(t){for(let e of this.#M({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#E&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#h?.(...s)}}};Wt.LRUCache=rr});var Oe=R(P=>{"use strict";var nr=P&&P.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(P,"__esModule",{value:!0});P.Minipass=P.isWritable=P.isReadable=P.isStream=void 0;var ds=typeof process=="object"&&process?process:{stdout:null,stderr:null},_e=__nccwpck_require__(8474),ws=nr(__nccwpck_require__(7075)),hr=__nccwpck_require__(6193),or=n=>!!n&&typeof n=="object"&&(n instanceof qt||n instanceof ws.default||(0,P.isReadable)(n)||(0,P.isWritable)(n));P.isStream=or;var ar=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.pipe=="function"&&n.pipe!==ws.default.Writable.prototype.pipe;P.isReadable=ar;var lr=n=>!!n&&typeof n=="object"&&n instanceof _e.EventEmitter&&typeof n.write=="function"&&typeof n.end=="function";P.isWritable=lr;var $=Symbol("EOF"),q=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),Bt=Symbol("emittingEnd"),lt=Symbol("emittedError"),It=Symbol("closed"),ps=Symbol("read"),Gt=Symbol("flush"),ms=Symbol("flushChunk"),L=Symbol("encoding"),rt=Symbol("decoder"),x=Symbol("flowing"),ct=Symbol("paused"),nt=Symbol("resume"),T=Symbol("buffer"),M=Symbol("pipes"),C=Symbol("bufferLength"),we=Symbol("bufferPush"),zt=Symbol("bufferShift"),k=Symbol("objectMode"),O=Symbol("destroyed"),be=Symbol("error"),ye=Symbol("emitData"),gs=Symbol("emitEnd"),Se=Symbol("emitEnd2"),I=Symbol("async"),ve=Symbol("abort"),Ut=Symbol("aborted"),ut=Symbol("signal"),Z=Symbol("dataListeners"),D=Symbol("discarded"),ft=n=>Promise.resolve().then(n),cr=n=>n(),ur=n=>n==="end"||n==="finish"||n==="prefinish",fr=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,dr=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),$t=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[nt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Ee=class extends $t{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},pr=n=>!!n.objectMode,mr=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",qt=class extends _e.EventEmitter{[x]=!1;[ct]=!1;[M]=[];[T]=[];[k];[L];[I];[rt];[$]=!1;[K]=!1;[Bt]=!1;[It]=!1;[lt]=null;[C]=0;[O]=!1;[ut];[Ut]=!1;[Z]=0;[D]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pr(e)?(this[k]=!0,this[L]=null):mr(e)?(this[L]=e.encoding,this[k]=!1):(this[k]=!1,this[L]=null),this[I]=!!e.async,this[rt]=this[L]?new hr.StringDecoder(this[L]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[ut]=s,s.aborted?this[ve]():s.addEventListener("abort",()=>this[ve]()))}get bufferLength(){return this[C]}get encoding(){return this[L]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[I]}set async(t){this[I]=this[I]||!!t}[ve](){this[Ut]=!0,this.emit("abort",this[ut]?.reason),this.destroy(this[ut]?.reason)}get aborted(){return this[Ut]}set aborted(t){}write(t,e,s){if(this[Ut])return!1;if(this[$])throw new Error("write after end");if(this[O])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[I]?ft:cr;if(!this[k]&&!Buffer.isBuffer(t)){if(dr(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fr(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):t.length?(typeof t=="string"&&!(e===this[L]&&!this[rt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[L]&&(t=this[rt].write(t)),this[x]&&this[C]!==0&&this[Gt](!0),this[x]?this.emit("data",t):this[we](t),this[C]!==0&&this.emit("readable"),s&&i(s),this[x]):(this[C]!==0&&this.emit("readable"),s&&i(s),this[x])}read(t){if(this[O])return null;if(this[D]=!1,this[C]===0||t===0||t&&t>this[C])return this[q](),null;this[k]&&(t=null),this[T].length>1&&!this[k]&&(this[T]=[this[L]?this[T].join(""):Buffer.concat(this[T],this[C])]);let e=this[ps](t||null,this[T][0]);return this[q](),e}[ps](t,e){if(this[k])this[zt]();else{let s=e;t===s.length||t===null?this[zt]():typeof s=="string"?(this[T][0]=s.slice(t),e=s.slice(0,t),this[C]-=t):(this[T][0]=s.subarray(t),e=s.subarray(0,t),this[C]-=t)}return this.emit("data",e),!this[T].length&&!this[$]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[$]=!0,this.writable=!1,(this[x]||!this[ct])&&this[q](),this}[nt](){this[O]||(!this[Z]&&!this[M].length&&(this[D]=!0),this[ct]=!1,this[x]=!0,this.emit("resume"),this[T].length?this[Gt]():this[$]?this[q]():this.emit("drain"))}resume(){return this[nt]()}pause(){this[x]=!1,this[ct]=!0,this[D]=!1}get destroyed(){return this[O]}get flowing(){return this[x]}get paused(){return this[ct]}[we](t){this[k]?this[C]+=1:this[C]+=t.length,this[T].push(t)}[zt](){return this[k]?this[C]-=1:this[C]-=this[T][0].length,this[T].shift()}[Gt](t=!1){do;while(this[ms](this[zt]())&&this[T].length);!t&&!this[T].length&&!this[$]&&this.emit("drain")}[ms](t){return this.emit("data",t),this[x]}pipe(t,e){if(this[O])return t;this[D]=!1;let s=this[K];return e=e||{},t===ds.stdout||t===ds.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new Ee(this,t,e):new $t(this,t,e)),this[I]?ft(()=>this[nt]()):this[nt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[x]&&this[Z]===0&&(this[x]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[D]=!1,this[Z]++,!this[M].length&&!this[x]&&this[nt]();else if(t==="readable"&&this[C]!==0)super.emit("readable");else if(ur(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[lt]){let i=e;this[I]?ft(()=>i.call(this,this[lt])):i.call(this,this[lt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[D]&&!this[M].length&&(this[x]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[D]&&!this[M].length&&(this[x]=!1)),e}get emittedEnd(){return this[K]}[q](){!this[Bt]&&!this[K]&&!this[O]&&this[T].length===0&&this[$]&&(this[Bt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[It]&&this.emit("close"),this[Bt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==O&&this[O])return!1;if(t==="data")return!this[k]&&!s?!1:this[I]?(ft(()=>this[ye](s)),!0):this[ye](s);if(t==="end")return this[gs]();if(t==="close"){if(this[It]=!0,!this[K]&&!this[O])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[lt]=s,super.emit(be,s);let r=!this[ut]||this.listeners("error").length?super.emit("error",s):!1;return this[q](),r}else if(t==="resume"){let r=super.emit("resume");return this[q](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[q](),i}[ye](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[D]?!1:super.emit("data",t);return this[q](),e}[gs](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[I]?(ft(()=>this[Se]()),!0):this[Se]())}[Se](){if(this[rt]){let e=this[rt].end();if(e){for(let s of this[M])s.dest.write(e);this[D]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[L]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(O,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[D]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[$])return e();let r,h,o=c=>{this.off("data",a),this.off("end",l),this.off(O,f),e(),h(c)},a=c=>{this.off("error",o),this.off("end",l),this.off(O,f),this.pause(),r({value:c,done:!!this[$]})},l=()=>{this.off("error",o),this.off("data",a),this.off(O,f),e(),r({done:!0,value:void 0})},f=()=>o(new Error("stream destroyed"));return new Promise((c,d)=>{h=d,r=c,this.once(O,f),this.once("error",o),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[D]=!1;let t=!1,e=()=>(this.pause(),this.off(be,e),this.off(O,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(be,e),this.once(O,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[O])return t?this.emit("error",t):this.emit(O),this;this[O]=!0,this[D]=!0,this[T].length=0,this[C]=0;let e=this;return typeof e.close=="function"&&!this[It]&&e.close(),t?this.emit("error",t):this.emit(O),this}static get isStream(){return P.isStream}};P.Minipass=qt});var Ms=R(_=>{"use strict";var gr=_&&_.__createBinding||(Object.create?(function(n,t,e,s){s===void 0&&(s=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,s,i)}):(function(n,t,e,s){s===void 0&&(s=e),n[s]=t[e]})),wr=_&&_.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),br=_&&_.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&gr(t,n,e);return wr(t,n),t};Object.defineProperty(_,"__esModule",{value:!0});_.PathScurry=_.Path=_.PathScurryDarwin=_.PathScurryPosix=_.PathScurryWin32=_.PathScurryBase=_.PathPosix=_.PathWin32=_.PathBase=_.ChildrenCache=_.ResolveCache=void 0;var Qt=fs(),Yt=__nccwpck_require__(6760),yr=__nccwpck_require__(3136),pt=__nccwpck_require__(9896),Sr=br(__nccwpck_require__(3024)),vr=pt.realpathSync.native,Ht=__nccwpck_require__(1455),bs=Oe(),mt={lstatSync:pt.lstatSync,readdir:pt.readdir,readdirSync:pt.readdirSync,readlinkSync:pt.readlinkSync,realpathSync:vr,promises:{lstat:Ht.lstat,readdir:Ht.readdir,readlink:Ht.readlink,realpath:Ht.realpath}},_s=n=>!n||n===mt||n===Sr?mt:{...mt,...n,promises:{...mt.promises,...n.promises||{}}},Os=/^\\\\\?\\([a-z]:)\\?$/i,Er=n=>n.replace(/\//g,"\\").replace(Os,"$1\\"),_r=/[\\\/]/,N=0,xs=1,Ts=2,G=4,Cs=6,Rs=8,Q=10,As=12,j=15,dt=~j,xe=16,ys=32,gt=64,W=128,Vt=256,Xt=512,Ss=gt|W|Xt,Or=1023,Te=n=>n.isFile()?Rs:n.isDirectory()?G:n.isSymbolicLink()?Q:n.isCharacterDevice()?Ts:n.isBlockDevice()?Cs:n.isSocket()?As:n.isFIFO()?xs:N,vs=new Qt.LRUCache({max:2**12}),wt=n=>{let t=vs.get(n);if(t)return t;let e=n.normalize("NFKD");return vs.set(n,e),e},Es=new Qt.LRUCache({max:2**12}),Kt=n=>{let t=Es.get(n);if(t)return t;let e=wt(n.toLowerCase());return Es.set(n,e),e},bt=class extends Qt.LRUCache{constructor(){super({max:256})}};_.ResolveCache=bt;var Jt=class extends Qt.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}};_.ChildrenCache=Jt;var ks=Symbol("PathScurry setAsCwd"),A=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=N,s,i,r,h,o){this.name=t,this.#O=r?Kt(t):wt(t),this.#e=e&Or,this.nocase=r,this.roots=i,this.root=s||this,this.#F=h,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=_s(o.fs)}depth(){return this.#x!==void 0?this.#x:this.parent?this.#x=this.parent.depth()+1:this.#x=0}childrenCache(){return this.#F}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#D(i):this.#D(i)}#D(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#F.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#F.set(this,e),this.#e&=~xe,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Kt(t):wt(t);for(let a of s)if(a.#O===i)return a;let r=this.parent?this.sep:"",h=this.#g?this.#g+r+t:void 0,o=this.newChild(t,N,{...e,parent:this,fullpath:h});return this.canReaddir()||(o.#e|=W),s.push(o),o}relative(){if(this.isCWD)return"";if(this.#E!==void 0)return this.#E;let t=this.name,e=this.parent;if(!e)return this.#E=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let t=this.name,e=this.parent;if(!e)return this.#T=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#b=s}isUnknown(){return(this.#e&j)===N}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&j)===Rs}isDirectory(){return(this.#e&j)===G}isCharacterDevice(){return(this.#e&j)===Ts}isBlockDevice(){return(this.#e&j)===Cs}isFIFO(){return(this.#e&j)===xs}isSocket(){return(this.#e&j)===As}isSymbolicLink(){return(this.#e&Q)===Q}lstatCached(){return this.#e&ys?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let t=this.#e&j;return!(t!==N&&t!==Q||this.#e&Vt||this.#e&W)}calledReaddir(){return!!(this.#e&xe)}isENOENT(){return!!(this.#e&W)}isNamed(t){return this.nocase?this.#O===Kt(t):this.#O===wt(t)}async readlink(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}readlinkSync(){let t=this.#P;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#P=s}catch(e){this.#M(e.code);return}}#W(t){this.#e|=xe;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#N.push(t),this.#A)return;this.#A=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,h)=>{if(r)this.#B(r.code),s.provisional=0;else{for(let o of h)this.#I(o,s);this.#W(s)}this.#q(s.slice(0,s.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#H)await this.#H;else{let s=()=>{};this.#H=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#I(i,t);this.#W(t)}catch(i){this.#B(i.code),t.provisional=0}this.#H=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#I(s,t);this.#W(t)}catch(s){this.#B(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ss)return!1;let t=j&this.#e;return t===N||t===G||t===Q}shouldWalk(t,e){return(this.#e&G)===G&&!(this.#e&Ss)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((Xt|Vt|W)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(t)}catch{this.#L()}}[ks](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#E=s.join(this.sep),i.#T=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#E=void 0,i.#T=void 0,i=i.parent}};_.PathBase=A;var yt=class n extends A{sep="\\";splitSep=_r;constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return Yt.win32.parse(t).root}getRoot(t){if(t=Er(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new Et(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(Os,"$1\\"),t===e}};_.PathWin32=yt;var St=class n extends A{splitSep="/";sep="/";constructor(t,e=N,s,i,r,h,o){super(t,e,s,i,r,h,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=N,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}};_.PathPosix=St;var vt=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:h=mt}={}){this.#r=_s(h),(t instanceof URL||t.startsWith("file://"))&&(t=(0,yr.fileURLToPath)(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#t=new bt,this.#s=new bt,this.#n=new Jt(r);let a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,f=a.length-1,c=e.sep,d=this.rootPath,u=!1;for(let m of a){let p=f--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(u?"":c)+m}),u=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let h=t[r];if(!(!h||h===".")&&(e=e?`${h}/${e}`:h,this.isAbsolute(h)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((u,m)=>{if(u)return d(u);let p=m.length;if(!p)return d();let b=()=>{--p===0&&d()};for(let w of m)(!r||r(w))&&o.push(s?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(a,h)?l(v,b):b()):w.shouldWalk(a,h)?l(w,b):b()},!0)},f=t;return new Promise((c,d)=>{l(f,u=>{if(u)return d(u);c(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=[];(!r||r(t))&&o.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let f=l.readdirSync();for(let c of f){(!r||r(c))&&o.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,h)&&a.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e;(!r||r(t))&&(yield s?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let f of l){(!r||r(f))&&(yield s?f:f.fullpath());let c=f;if(f.isSymbolicLink()){if(!(i&&(c=f.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(o,h)&&o.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0});(!r||r(t))&&o.write(s?t:t.fullpath());let a=new Set,l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=(b,w,v=!1)=>{if(b)return o.emit("error",b);if(i&&!v){let E=[];for(let y of w)y.isSymbolicLink()&&E.push(y.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(E.length){Promise.all(E).then(()=>m(null,w,!0));return}}for(let E of w)E&&(!r||r(E))&&(o.write(s?E:E.fullpath())||(d=!0));f--;for(let E of w){let y=E.realpathCached()||E;y.shouldWalk(a,h)&&l.push(y)}d&&!o.flowing?o.once("drain",c):p||c()},p=!0;u.readdirCB(m,!0),p=!1}};return c(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof A||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:h}=e,o=new bs.Minipass({objectMode:!0}),a=new Set;(!r||r(t))&&o.write(s?t:t.fullpath());let l=[t],f=0,c=()=>{let d=!1;for(;!d;){let u=l.shift();if(!u){f===0&&o.end();return}f++,a.add(u);let m=u.readdirSync();for(let p of m)(!r||r(p))&&(o.write(s?p:p.fullpath())||(d=!0));f--;for(let p of m){let b=p;if(p.isSymbolicLink()){if(!(i&&(b=p.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,h)&&l.push(b)}}d&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ks](e)}};_.PathScurryBase=vt;var Et=class extends vt{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,Yt.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return Yt.win32.parse(t).root.toUpperCase()}newRoot(t){return new yt(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};_.PathScurryWin32=Et;var _t=class extends vt{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Yt.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new St(this.rootPath,G,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};_.PathScurryPosix=_t;var Zt=class extends _t{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}};_.PathScurryDarwin=Zt;_.Path=process.platform==="win32"?yt:St;_.PathScurry=process.platform==="win32"?Et:process.platform==="darwin"?Zt:_t});var Re=R(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.Pattern=void 0;var xr=H(),Tr=n=>n.length>=1,Cr=n=>n.length>=1,Rr=Symbol.for("nodejs.util.inspect.custom"),Ce=class n{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(t,e,s,i){if(!Tr(t))throw new TypeError("empty pattern list");if(!Cr(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,h,o,a,...l]=this.#t,[f,c,d,u,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,h,o,a,""].join("/"),b=[f,c,d,u,""].join("/");this.#t=[p,...l],this.#s=[b,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...h]=this.#t,[o,...a]=this.#s;h[0]===""&&(h.shift(),a.shift());let l=r+"/",f=o+"/";this.#t=[l,...h],this.#s=[f,...a],this.length=this.#t.length}}}[Rr](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===xr.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}};te.Pattern=Ce});var ke=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.Ignore=void 0;var Ps=H(),Ar=Re(),kr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ae=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:h=kr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=h,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:h,nocomment:!0,nonegate:!0};for(let o of t)this.add(o)}add(t){let e=new Ps.Minimatch(t,this.mmopts);for(let s=0;s{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.Processor=z.SubWalks=z.MatchRecord=z.HasWalkedCache=void 0;var Ds=H(),se=class n{store;constructor(t=new Map){this.store=t}copy(){return new n(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){let s=t.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}};z.HasWalkedCache=se;var ie=class{store=new Map;add(t,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(t);this.store.set(t,r===void 0?i:i&r)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}};z.MatchRecord=ie;var re=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};z.SubWalks=re;var Me=class n{hasWalkedCache;matches=new ie;subwalks=new re;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new se}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let h=r.root(),o=r.isAbsolute()&&this.opts.absolute!==!1;if(h){i=i.resolve(h==="/"&&this.opts.root!==void 0?this.opts.root:h);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,f=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,f=!0;if(a=r.pattern(),l=r.rest(),f){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),o,c);continue}else if(a===Ds.GLOBSTAR){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,o,c===""||c===".");else if(c===".."){let u=i.parent||i;d?this.hasWalkedCache.hasWalked(u,d)||this.subwalks.add(u,d):this.matches.add(u,o,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let h of s){let o=h.isAbsolute(),a=h.pattern(),l=h.rest();a===Ds.GLOBSTAR?i.testGlobstar(r,h,l,o):a instanceof RegExp?i.testRegExp(r,a,l,o):i.testString(r,a,l,o)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let h=t.parent||t;this.subwalks.add(h,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};z.Processor=Me});var Ls=R(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.GlobStream=X.GlobWalker=X.GlobUtil=void 0;var Mr=Oe(),js=ke(),Ns=Fs(),Pr=(n,t)=>typeof n=="string"?new js.Ignore([n],t):Array.isArray(n)?new js.Ignore(n,t):n,Ot=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Pr(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=await r.realpath();h&&(h.isUnknown()||this.opts.stat)&&await h.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let h=r.realpathSync();h&&(h?.isUnknown()||this.opts.stat)&&h.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),h=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?h+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Ns.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,s,h):o.readdirCB((l,f)=>this.walkCB3(o,f,s,h),!0)}h()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||(r++,this.match(o,a,l).then(()=>h()));for(let[o,a]of s.subwalks.entries())r++,this.walkCB2(o,a,s.child(),h);h()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Ns.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let o of s.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;r++;let a=o.readdirSync();this.walkCB3Sync(o,a,s,h)}h()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,h=()=>{--r===0&&i()};for(let[o,a,l]of s.matches.entries())this.#r(o)||this.matchSync(o,a,l);for(let[o,a]of s.subwalks.entries())r++,this.walkCB2Sync(o,a,s.child(),h);h()}};X.GlobUtil=Ot;var Pe=class extends Ot{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};X.GlobWalker=Pe;var De=class extends Ot{results;constructor(t,e,s){super(t,e,s),this.results=new Mr.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};X.GlobStream=De});var je=R(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Glob=void 0;var Dr=H(),Fr=__nccwpck_require__(3136),ne=Ms(),jr=Re(),he=Ls(),Nr=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Fe=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Fr.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Nr,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ne.PathScurryWin32:e.platform==="darwin"?ne.PathScurryDarwin:e.platform?ne.PathScurryPosix:ne.PathScurry;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new Dr.Minimatch(a,i)),[h,o]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=h.map((a,l)=>{let f=o[l];if(!f)throw new Error("invalid pattern object");return new jr.Pattern(a,f,0,this.platform)})}async walk(){return[...await new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new he.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new he.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};oe.Glob=Fe});var Ne=R(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.hasMagic=void 0;var Lr=H(),Wr=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new Lr.Minimatch(e,t).hasMagic())return!0;return!1};ae.hasMagic=Wr});Object.defineProperty(exports, "__esModule", ({value:!0}));exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0;exports.globStreamSync=xt;exports.globStream=Le;exports.globSync=We;exports.globIterateSync=Tt;exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports, "escape", ({enumerable:!0,get:function(){return Is.escape}}));Object.defineProperty(exports, "unescape", ({enumerable:!0,get:function(){return Is.unescape}}));var Ir=je();Object.defineProperty(exports, "Glob", ({enumerable:!0,get:function(){return Ir.Glob}}));var Gr=Ne();Object.defineProperty(exports, "hasMagic", ({enumerable:!0,get:function(){return Gr.hasMagic}}));var zr=ke();Object.defineProperty(exports, "Ignore", ({enumerable:!0,get:function(){return zr.Ignore}}));function xt(n,t={}){return new tt.Glob(n,t).streamSync()}function Le(n,t={}){return new tt.Glob(n,t).stream()}function We(n,t={}){return new tt.Glob(n,t).walkSync()}async function Bs(n,t={}){return new tt.Glob(n,t).walk()}function Tt(n,t={}){return new tt.Glob(n,t).iterateSync()}function Be(n,t={}){return new tt.Glob(n,t).iterate()}exports.streamSync=xt;exports.stream=Object.assign(Le,{sync:xt});exports.iterateSync=Tt;exports.iterate=Object.assign(Be,{sync:Tt});exports.sync=Object.assign(We,{stream:xt,iterate:Tt});exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape});exports.glob.glob=exports.glob; -//# sourceMappingURL=index.min.js.map - - -/***/ }), - -/***/ 7728: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! Axios v1.18.0 Copyright (c) 2026 Matt Zabriskie and contributors */ - - -var FormData$1 = __nccwpck_require__(4504); -var crypto = __nccwpck_require__(6982); -var url = __nccwpck_require__(7016); -var HttpsProxyAgent = __nccwpck_require__(2123); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var http2 = __nccwpck_require__(5675); -var util = __nccwpck_require__(9023); -var path = __nccwpck_require__(6928); -var followRedirects = __nccwpck_require__(8541); -var zlib = __nccwpck_require__(3106); -var stream = __nccwpck_require__(2203); -var events = __nccwpck_require__(4434); - -/** - * Create a bound version of a function with a specified `this` context - * - * @param {Function} fn - The function to bind - * @param {*} thisArg - The value to be passed as the `this` parameter - * @returns {Function} A new function that will call the original function with the specified `this` context - */ -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - -// utils is a library of generic helper functions non-specific to axios - -const { - toString -} = Object.prototype; -const { - getPrototypeOf -} = Object; -const { - iterator, - toStringTag -} = Symbol; - -/* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({ - hasOwnProperty -}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - -/** - * Walk the prototype chain (excluding the shared Object.prototype) looking for - * an own `prop`. This distinguishes genuine own/inherited members — including - * class accessors and template prototypes — from members injected via - * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which - * live on Object.prototype itself and are therefore never matched. - * - * @param {*} thing The value whose chain to inspect - * @param {string|symbol} prop The property key to look for - * - * @returns {boolean} True when `prop` is owned below Object.prototype - */ -const hasOwnInPrototypeChain = (thing, prop) => { - let obj = thing; - const seen = []; - while (obj != null && obj !== Object.prototype) { - if (seen.indexOf(obj) !== -1) { - return false; - } - seen.push(obj); - if (hasOwnProperty(obj, prop)) { - return true; - } - obj = getPrototypeOf(obj); - } - return false; -}; - -/** - * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own - * properties and members inherited from a non-Object.prototype source (a class - * instance or template object) are honored; a value reachable only through a - * polluted Object.prototype is ignored and `undefined` is returned. - * - * @param {*} obj The source object - * @param {string|symbol} prop The property key to read - * - * @returns {*} The resolved value, or undefined when unsafe/absent - */ -const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; -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 a non-null object - * - * @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(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 = 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 (!isObject(val)) { - return false; - } - const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && - // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or - // Symbol.iterator as evidence the value is a tagged/iterable type rather - // than a plain object, while ignoring keys injected onto Object.prototype. - !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator); -}; - -/** - * Determine if a value is an empty object (safely handles Buffers) - * - * @param {*} val The value to test - * - * @returns {boolean} True if value is an empty object, otherwise false - */ -const isEmptyObject = val => { - // Early return for non-objects or Buffers to prevent RangeError - if (!isObject(val) || isBuffer(val)) { - return false; - } - try { - return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; - } catch (e) { - // Fallback for any other objects that might cause RangeError with Object.keys() - return false; - } -}; - -/** - * 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 React Native Blob - * React Native "blob": an object with a `uri` attribute. Optionally, it can - * also have a `name` and `type` attribute to specify filename and content type - * - * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 - * - * @param {*} value The value to test - * - * @returns {boolean} True if value is a React Native Blob, otherwise false - */ -const isReactNativeBlob = value => { - return !!(value && typeof value.uri !== 'undefined'); -}; - -/** - * Determine if environment is React Native - * ReactNative `FormData` has a non-standard `getParts()` method - * - * @param {*} formData The formData to test - * - * @returns {boolean} True if environment is React Native, otherwise false - */ -const isReactNative = formData => formData && typeof formData.getParts !== 'undefined'; - -/** - * 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 FileList, 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 - */ -function getGlobal() { - if (typeof globalThis !== 'undefined') return globalThis; - if (typeof self !== 'undefined') return self; - if (typeof window !== 'undefined') return window; - if (typeof global !== 'undefined') return global; - return {}; -} -const G = getGlobal(); -const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; -const isFormData = thing => { - if (!thing) return false; - if (FormDataCtor && thing instanceof FormDataCtor) return true; - // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. - const proto = getPrototypeOf(thing); - if (!proto || proto === Object.prototype) return false; - if (!isFunction$1(thing.append)) return false; - const kind = kindOf(thing); - return kind === 'formdata' || - // detect form-data instance - 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 => { - return 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 {Object} [options] - * @param {Boolean} [options.allOwnKeys = false] - * @returns {any} - */ -function forEach(obj, fn, { - allOwnKeys = false -} = {}) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - let i; - let l; - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - if (isArray(obj)) { - // Iterate over array values - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Buffer check - if (isBuffer(obj)) { - return; - } - - // Iterate over object keys - 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); - } - } -} - -/** - * Finds a key in an object, case-insensitive, returning the actual key name. - * Returns null if the object is a Buffer or if no match is found. - * - * @param {Object} obj - The object to search. - * @param {string} key - The key to find (case-insensitive). - * @returns {?string} The actual key name if found, otherwise null. - */ -function findKey(obj, key) { - if (isBuffer(obj)) { - return null; - } - 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 = (() => { - /*eslint no-undef:0*/ - 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 - * const 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(...objs) { - const { - caseless, - skipUndefined - } = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - // Skip dangerous property names to prevent prototype pollution - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return; - } - - // findKey lowercases the key, so caseless lookup only applies to strings — - // symbol keys are identity-matched. - const targetKey = caseless && typeof key === 'string' && findKey(result, key) || key; - // Read via own-prop only — a bare `result[targetKey]` walks the prototype - // chain, so a polluted Object.prototype value could surface here and get - // copied into the merged result. - const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; - if (isPlainObject(existing) && isPlainObject(val)) { - result[targetKey] = merge(existing, val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else if (!skipUndefined || !isUndefined(val)) { - result[targetKey] = val; - } - }; - for (let i = 0, l = objs.length; i < l; i++) { - const source = objs[i]; - if (!source || isBuffer(source)) { - continue; - } - forEach(source, assignValue); - if (typeof source !== 'object' || isArray(source)) { - continue; - } - const symbols = Object.getOwnPropertySymbols(source); - for (let j = 0; j < symbols.length; j++) { - const symbol = symbols[j]; - if (propertyIsEnumerable.call(source, symbol)) { - assignValue(source[symbol], symbol); - } - } - } - 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 {Object} [options] - * @param {Boolean} [options.allOwnKeys] - * @returns {Object} The resulting value of object a - */ -const extend = (a, b, thisArg, { - allOwnKeys -} = {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction$1(val)) { - Object.defineProperty(a, key, { - // Null-proto descriptor so a polluted Object.prototype.get cannot - // hijack defineProperty's accessor-vs-data resolution. - __proto__: null, - value: bind(val, thisArg), - writable: true, - enumerable: true, - configurable: true - }); - } else { - Object.defineProperty(a, key, { - __proto__: null, - value: val, - writable: true, - enumerable: true, - configurable: true - }); - } - }, { - 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) === 0xfeff) { - 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) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - Object.defineProperty(constructor.prototype, 'constructor', { - __proto__: null, - value: constructor, - writable: true, - enumerable: false, - configurable: true - }); - Object.defineProperty(constructor, 'super', { - __proto__: null, - 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 || {}; - // eslint-disable-next-line no-eq-null,eqeqeq - 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 === undefined || 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} - */ -// eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { - // eslint-disable-next-line func-names - return thing => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - -/** - * For each entry in the object, call the function with the key and value. - * - * @param {Object} obj - The object to iterate over. - * @param {Function} fn - The function to call for each entry. - * - * @returns {void} - */ -const forEachEntry = (obj, fn) => { - const generator = obj && obj[iterator]; - const _iterator = generator.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} - */ -const matchAll = (regExp, str) => { - let matches; - const arr = []; - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - return arr; -}; - -/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ -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 { - propertyIsEnumerable -} = 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 = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - forEach(descriptors, (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) => { - // skip restricted props in strict mode - if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) { - 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 + "'"); - }; - } - }); -}; - -/** - * Converts an array or a delimited string into an object set with values as keys and true as values. - * Useful for fast membership checks. - * - * @param {Array|string} arrayOrString - The array or string to convert. - * @param {string} delimiter - The delimiter to use if input is a string. - * @returns {Object} An object with keys from the array or string, values set to true. - */ -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 = () => {}; -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[toStringTag] === 'FormData' && thing[iterator]); -} - -/** - * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. - * - * @param {Object} obj - The object to convert. - * @returns {Object} The JSON-compatible object. - */ -const toJSONObject = obj => { - const visited = new WeakSet(); - const visit = source => { - if (isObject(source)) { - if (visited.has(source)) { - return; - } - - //Buffer check - if (isBuffer(source)) { - return source; - } - if (!('toJSON' in source)) { - // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). - visited.add(source); - const target = isArray(source) ? [] : {}; - forEach(source, (value, key) => { - const reducedValue = visit(value); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - visited.delete(source); - return target; - } - } - return source; - }; - return visit(obj); -}; - -/** - * Determines if a value is an async function. - * - * @param {*} thing - The value to test. - * @returns {boolean} True if value is an async function, otherwise false. - */ -const isAsyncFn = kindOfTest('AsyncFunction'); - -/** - * Determines if a value is thenable (has then and catch methods). - * - * @param {*} thing - The value to test. - * @returns {boolean} True if value is thenable, otherwise false. - */ -const isThenable = thing => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch); - -// original code -// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 - -/** - * Provides a cross-platform setImmediate implementation. - * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. - * - * @param {boolean} setImmediateSupported - Whether setImmediate is supported. - * @param {boolean} postMessageSupported - Whether postMessage is supported. - * @returns {Function} A function to schedule a callback asynchronously. - */ -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)); - -/** - * Schedules a microtask or asynchronous callback as soon as possible. - * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. - * - * @type {Function} - */ -const asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate; - -// ********************* - -const isIterable = thing => thing != null && isFunction$1(thing[iterator]); - -/** - * Determine if a value is iterable via an iterator that is NOT sourced solely - * from a polluted Object.prototype. Use this instead of `isIterable` whenever - * the iterable comes from untrusted input (e.g. user-supplied header sources), - * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object - * into an attacker-controlled entries iterator. - * - * @param {*} thing The value to test - * - * @returns {boolean} True if value has a non-polluted iterator - */ -const isSafeIterable = thing => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); -var utils$1 = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isEmptyObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isReactNativeBlob, - isReactNative, - 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, - // an alias to avoid ESLint no-prototype-builtins detection - hasOwnInPrototypeChain, - getSafeProp, - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap, - isIterable, - isSafeIterable -}; - -// RawAxiosHeaders whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -const ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']); - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} rawHeaders Headers needing to be parsed - * - * @returns {Object} Headers parsed into an object - */ -var parseHeaders = rawHeaders => { - const parsed = {}; - let key; - let val; - let i; - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - if (!key || parsed[key] && ignoreDuplicateOf[key]) { - return; - } - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); - return parsed; -}; - -function trimSPorHTAB(str) { - let start = 0; - let end = str.length; - while (start < end) { - const code = str.charCodeAt(start); - if (code !== 0x09 && code !== 0x20) { - break; - } - start += 1; - } - while (end > start) { - const code = str.charCodeAt(end - 1); - if (code !== 0x09 && code !== 0x20) { - break; - } - end -= 1; - } - return start === 0 && end === str.length ? str : str.slice(start, end); -} - -// The control-code ranges are intentional: header sanitization strips C0/DEL bytes. -// eslint-disable-next-line no-control-regex -const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g'); -// eslint-disable-next-line no-control-regex -const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g'); -function sanitizeValue(value, invalidChars) { - if (utils$1.isArray(value)) { - return value.map(item => sanitizeValue(item, invalidChars)); - } - return trimSPorHTAB(String(value).replace(invalidChars, '')); -} -const sanitizeHeaderValue = value => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); -const sanitizeByteStringHeaderValue = value => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); -function toByteStringHeaderObject(headers) { - const byteStringHeaders = Object.create(null); - utils$1.forEach(headers.toJSON(), (value, header) => { - byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); - }); - return byteStringHeaders; -} - -const $internals = Symbol('internals'); -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); -} -function parseTokens(str) { - const tokens = Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - while (match = tokensRE.exec(str)) { - tokens[match[1]] = match[2]; - } - return tokens; -} -const isValidHeaderName = str => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); -function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { - if (utils$1.isFunction(filter)) { - return filter.call(this, value, header); - } - if (isHeaderNameFilter) { - value = header; - } - if (!utils$1.isString(value)) return; - if (utils$1.isString(filter)) { - return value.indexOf(filter) !== -1; - } - if (utils$1.isRegExp(filter)) { - return filter.test(value); - } -} -function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} -function buildAccessors(obj, header) { - const accessorName = utils$1.toCamelCase(' ' + header); - ['get', 'set', 'has'].forEach(methodName => { - Object.defineProperty(obj, methodName + accessorName, { - // Null-proto descriptor so a polluted Object.prototype.get cannot turn - // this data descriptor into an accessor descriptor on the way in. - __proto__: null, - value: function (arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - set(header, valueOrRewrite, rewrite) { - const self = this; - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - if (!lHeader) { - return; - } - const key = utils$1.findKey(self, lHeader); - if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) { - self[key || _header] = normalizeValue(_value); - } - } - const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - if (utils$1.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders(header), valueOrRewrite); - } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) { - let obj = Object.create(null), - dest, - key; - for (const entry of header) { - if (!utils$1.isArray(entry)) { - throw new TypeError('Object iterator must return a key-value pair'); - } - key = entry[0]; - if (utils$1.hasOwnProp(obj, key)) { - dest = obj[key]; - obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; - } else { - obj[key] = entry[1]; - } - } - setHeaders(obj, valueOrRewrite); - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - return this; - } - get(header, parser) { - header = normalizeHeader(header); - if (header) { - const key = utils$1.findKey(this, header); - if (key) { - const value = this[key]; - if (!parser) { - return value; - } - if (parser === true) { - return parseTokens(value); - } - if (utils$1.isFunction(parser)) { - return parser.call(this, value, key); - } - if (utils$1.isRegExp(parser)) { - return parser.exec(value); - } - throw new TypeError('parser must be boolean|regexp|function'); - } - } - } - has(header, matcher) { - header = normalizeHeader(header); - if (header) { - const key = utils$1.findKey(this, header); - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - return false; - } - delete(header, matcher) { - const self = this; - let deleted = false; - function deleteHeader(_header) { - _header = normalizeHeader(_header); - if (_header) { - const key = utils$1.findKey(self, _header); - if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { - delete self[key]; - deleted = true; - } - } - } - if (utils$1.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - return deleted; - } - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - while (i--) { - const key = keys[i]; - if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - return deleted; - } - normalize(format) { - const self = this; - const headers = {}; - utils$1.forEach(this, (value, header) => { - const key = utils$1.findKey(headers, header); - if (key) { - self[key] = normalizeValue(value); - delete self[header]; - return; - } - const normalized = format ? formatHeader(header) : String(header).trim(); - if (normalized !== header) { - delete self[header]; - } - self[normalized] = normalizeValue(value); - headers[normalized] = true; - }); - return this; - } - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - toJSON(asStrings) { - const obj = Object.create(null); - utils$1.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); - }); - return obj; - } - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); - } - getSetCookie() { - return this.get('set-cookie') || []; - } - get [Symbol.toStringTag]() { - return 'AxiosHeaders'; - } - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - static concat(first, ...targets) { - const computed = new this(first); - targets.forEach(target => computed.set(target)); - return computed; - } - static accessor(header) { - const internals = this[$internals] = this[$internals] = { - accessors: {} - }; - const accessors = internals.accessors; - const prototype = this.prototype; - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - if (!accessors[lHeader]) { - buildAccessors(prototype, _header); - accessors[lHeader] = true; - } - } - utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - return this; - } -} -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); - -// reserved names hotfix -utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ - value -}, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - }; -}); -utils$1.freezeMethods(AxiosHeaders); - -const REDACTED = '[REDACTED ****]'; -function hasOwnOrPrototypeToJSON(source) { - if (utils$1.hasOwnProp(source, 'toJSON')) { - return true; - } - let prototype = Object.getPrototypeOf(source); - while (prototype && prototype !== Object.prototype) { - if (utils$1.hasOwnProp(prototype, 'toJSON')) { - return true; - } - prototype = Object.getPrototypeOf(prototype); - } - return false; -} - -// Build a plain-object snapshot of `config` and replace the value of any key -// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays -// and AxiosHeaders, and short-circuits on circular references. -function redactConfig(config, redactKeys) { - const lowerKeys = new Set(redactKeys.map(k => String(k).toLowerCase())); - const seen = []; - const visit = source => { - if (source === null || typeof source !== 'object') return source; - if (utils$1.isBuffer(source)) return source; - if (seen.indexOf(source) !== -1) return undefined; - if (source instanceof AxiosHeaders) { - source = source.toJSON(); - } - seen.push(source); - let result; - if (utils$1.isArray(source)) { - result = []; - source.forEach((v, i) => { - const reducedValue = visit(v); - if (!utils$1.isUndefined(reducedValue)) { - result[i] = reducedValue; - } - }); - } else { - if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { - seen.pop(); - return source; - } - result = Object.create(null); - for (const [key, value] of Object.entries(source)) { - const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); - if (!utils$1.isUndefined(reducedValue)) { - result[key] = reducedValue; - } - } - } - seen.pop(); - return result; - }; - return visit(config); -} -class AxiosError extends Error { - static from(error, code, config, request, response, customProps) { - const axiosError = new AxiosError(error.message, code || error.code, config, request, response); - axiosError.cause = error; - axiosError.name = error.name; - - // Preserve status from the original error if not already set from response - if (error.status != null && axiosError.status == null) { - axiosError.status = error.status; - } - customProps && Object.assign(axiosError, customProps); - return axiosError; - } - - /** - * 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. - */ - constructor(message, code, config, request, response) { - super(message); - - // Make message enumerable to maintain backward compatibility - // The native Error constructor sets message as non-enumerable, - // but axios < v1.13.3 had it as enumerable - Object.defineProperty(this, 'message', { - // Null-proto descriptor so a polluted Object.prototype.get cannot turn - // this data descriptor into an accessor descriptor on the way in. - __proto__: null, - value: message, - enumerable: true, - writable: true, - configurable: true - }); - this.name = 'AxiosError'; - this.isAxiosError = true; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - if (response) { - this.response = response; - this.status = response.status; - } - } - toJSON() { - // Opt-in redaction: when the request config carries a `redact` array, the - // value of any matching key (case-insensitive, at any depth) is replaced - // with REDACTED in the serialized snapshot. Undefined or empty leaves the - // existing serialization behavior unchanged. - const config = this.config; - const redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined; - const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config); - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: serializedConfig, - code: this.code, - status: this.status - }; - } -} - -// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. -AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; -AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; -AxiosError.ECONNABORTED = 'ECONNABORTED'; -AxiosError.ETIMEDOUT = 'ETIMEDOUT'; -AxiosError.ECONNREFUSED = 'ECONNREFUSED'; -AxiosError.ERR_NETWORK = 'ERR_NETWORK'; -AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; -AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; -AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; -AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; -AxiosError.ERR_CANCELED = 'ERR_CANCELED'; -AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; -AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; -AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; - -// Default nesting limit shared with the inverse transform (formDataToJSON) so -// the FormData <-> JSON round-trip stays symmetric. -const DEFAULT_FORM_DATA_MAX_DEPTH = 100; - -/** - * Determines if the given thing is a array or js object. - * - * @param {string} thing - The object or array to be visited. - * - * @returns {boolean} - */ -function isVisitable(thing) { - return utils$1.isPlainObject(thing) || utils$1.isArray(thing); -} - -/** - * It removes the brackets from the end of a string - * - * @param {string} key - The key of the parameter. - * - * @returns {string} the key without the brackets. - */ -function removeBrackets(key) { - return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; -} - -/** - * It takes a path, a key, and a boolean, and returns a string - * - * @param {string} path - The path to the current key. - * @param {string} key - The key of the current object being iterated over. - * @param {string} dots - If true, the key will be rendered with dots instead of brackets. - * - * @returns {string} The path to the current key. - */ -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); -} - -/** - * If the array is an array and none of its elements are visitable, then it's a flat array. - * - * @param {Array} arr - The array to check - * - * @returns {boolean} - */ -function isFlatArray(arr) { - return utils$1.isArray(arr) && !arr.some(isVisitable); -} -const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); - -/** - * Convert a data object to FormData - * - * @param {Object} obj - * @param {?Object} [formData] - * @param {?Object} [options] - * @param {Function} [options.visitor] - * @param {Boolean} [options.metaTokens = true] - * @param {Boolean} [options.dots = false] - * @param {?Boolean} [options.indexes = false] - * - * @returns {Object} - **/ - -/** - * It converts an object into a FormData object - * - * @param {Object} obj - The object to convert to form data. - * @param {string} formData - The FormData object to append to. - * @param {Object} options - * - * @returns - */ -function toFormData(obj, formData, options) { - if (!utils$1.isObject(obj)) { - throw new TypeError('target must be an object'); - } - - // eslint-disable-next-line no-param-reassign - formData = formData || new (FormData$1 || FormData)(); - - // eslint-disable-next-line no-param-reassign - options = utils$1.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !utils$1.isUndefined(source[option]); - }); - const metaTokens = options.metaTokens; - // eslint-disable-next-line no-use-before-define - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; - const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth; - const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); - const stack = []; - if (!utils$1.isFunction(visitor)) { - throw new TypeError('visitor must be a function'); - } - function convertValue(value) { - if (value === null) return ''; - if (utils$1.isDate(value)) { - return value.toISOString(); - } - if (utils$1.isBoolean(value)) { - return value.toString(); - } - if (!useBlob && utils$1.isBlob(value)) { - throw new AxiosError('Blob is not supported. Use a Buffer instead.'); - } - if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { - return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); - } - return value; - } - function throwIfMaxDepthExceeded(depth) { - if (depth > maxDepth) { - throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); - } - } - function stringifyWithDepthLimit(value, depth) { - if (maxDepth === Infinity) { - return JSON.stringify(value); - } - const ancestors = []; - return JSON.stringify(value, function limitDepth(_key, currentValue) { - if (!utils$1.isObject(currentValue)) { - return currentValue; - } - while (ancestors.length && ancestors[ancestors.length - 1] !== this) { - ancestors.pop(); - } - ancestors.push(currentValue); - throwIfMaxDepthExceeded(depth + ancestors.length - 1); - return currentValue; - }); - } - - /** - * Default visitor. - * - * @param {*} value - * @param {String|Number} key - * @param {Array} path - * @this {FormData} - * - * @returns {boolean} return true to visit the each prop of the value recursively - */ - function defaultVisitor(value, key, path) { - let arr = value; - if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { - formData.append(renderKey(path, key, dots), convertValue(value)); - return false; - } - if (value && !path && typeof value === 'object') { - if (utils$1.endsWith(key, '{}')) { - // eslint-disable-next-line no-param-reassign - key = metaTokens ? key : key.slice(0, -2); - // eslint-disable-next-line no-param-reassign - value = stringifyWithDepthLimit(value, 1); - } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) { - // eslint-disable-next-line no-param-reassign - key = removeBrackets(key); - arr.forEach(function each(el, index) { - !(utils$1.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el)); - }); - return false; - } - } - if (isVisitable(value)) { - return true; - } - formData.append(renderKey(path, key, dots), convertValue(value)); - return false; - } - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - function build(value, path, depth = 0) { - if (utils$1.isUndefined(value)) return; - throwIfMaxDepthExceeded(depth); - if (stack.indexOf(value) !== -1) { - throw new Error('Circular reference detected in ' + path.join('.')); - } - stack.push(value); - utils$1.forEach(value, function each(el, key) { - const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); - if (result === true) { - build(el, path ? path.concat(key) : [key], depth + 1); - } - }); - stack.pop(); - } - if (!utils$1.isObject(obj)) { - throw new TypeError('data must be an object'); - } - build(obj); - return formData; -} - -/** - * It encodes a string by replacing all characters that are not in the unreserved set with - * their percent-encoded equivalents - * - * @param {string} str - The string to encode. - * - * @returns {string} The encoded string. - */ -function encode$1(str) { - const charMap = { - '!': '%21', - "'": '%27', - '(': '%28', - ')': '%29', - '~': '%7E', - '%20': '+' - }; - return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { - return charMap[match]; - }); -} - -/** - * It takes a params object and converts it to a FormData object - * - * @param {Object} params - The parameters to be converted to a FormData object. - * @param {Object} options - The options object passed to the Axios constructor. - * - * @returns {void} - */ -function AxiosURLSearchParams(params, options) { - this._pairs = []; - params && toFormData(params, this, options); -} -const prototype = AxiosURLSearchParams.prototype; -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; -prototype.toString = function toString(encoder) { - const _encode = encoder ? function (value) { - return encoder.call(this, value, encode$1); - } : encode$1; - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); -}; - -/** - * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with - * their plain counterparts (`:`, `$`, `,`, `+`). - * - * @param {string} val The value to be encoded. - * - * @returns {string} The encoded value. - */ -function encode(val) { - return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @param {?(object|Function)} options - * - * @returns {string} The formatted url - */ -function buildURL(url, params, options) { - if (!params) { - return url; - } - const _options = utils$1.isFunction(options) ? { - serialize: options - } : options; - - // Read serializer options pollution-safely: own properties and methods on a - // class/template prototype are honored, but values injected onto a polluted - // Object.prototype are ignored. - const _encode = utils$1.getSafeProp(_options, 'encode') || encode; - const serializeFn = utils$1.getSafeProp(_options, 'serialize'); - let serializedParams; - if (serializeFn) { - serializedParams = serializeFn(params, _options); - } else { - serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode); - } - if (serializedParams) { - const hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - return url; -} - -class InterceptorManager { - constructor() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * @param {Object} options The options for the interceptor, synchronous and runWhen - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {void} - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - utils$1.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} - -var transitionalDefaults = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false, - legacyInterceptorReqResOrdering: true, - advertiseZstdAcceptEncoding: false, - validateStatusUndefinedResolves: true -}; - -var URLSearchParams = url.URLSearchParams; - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; -const DIGIT = '0123456789'; -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const { - length - } = alphabet; - const randomValues = new Uint32Array(size); - crypto.randomFillSync(randomValues); - for (let i = 0; i < size; i++) { - str += alphabet[randomValues[i] % length]; - } - return str; -}; -var platform$1 = { - isNode: true, - classes: { - URLSearchParams, - FormData: FormData$1, - Blob: typeof Blob !== 'undefined' && Blob || null - }, - ALPHABET, - generateString, - protocols: ['http', 'https', 'file', 'data'] -}; - -const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; -const _navigator = typeof navigator === 'object' && navigator || undefined; - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - * - * @returns {boolean} - */ -const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); - -/** - * Determine if we're running in a standard browser webWorker environment - * - * Although the `isStandardBrowserEnv` method indicates that - * `allows axios to run in a web worker`, the WebWorker will still be - * filtered out due to its judgment standard - * `typeof window !== 'undefined' && typeof document !== 'undefined'`. - * This leads to a problem when axios post `FormData` in webWorker - */ -const hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== 'undefined' && - // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && typeof self.importScripts === 'function'; -})(); -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; - -var utils = /*#__PURE__*/Object.freeze({ - __proto__: null, - hasBrowserEnv: hasBrowserEnv, - hasStandardBrowserEnv: hasStandardBrowserEnv, - hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, - navigator: _navigator, - origin: origin -}); - -var platform = { - ...utils, - ...platform$1 -}; - -function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), { - visitor: function (value, key, path, helpers) { - if (platform.isNode && utils$1.isBuffer(value)) { - this.append(key, value.toString('base64')); - return false; - } - return helpers.defaultVisitor.apply(this, arguments); - }, - ...options - }); -} - -const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; -function throwIfDepthExceeded(index) { - if (index > MAX_DEPTH) { - throw new AxiosError('FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); - } -} - -/** - * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] - * - * @param {string} name - The name of the property to get. - * - * @returns An array of strings. - */ -function parsePropPath(name) { - // foo[x][y][z] - // foo.x.y.z - // foo-x-y-z - // foo x y z - const path = []; - const pattern = /\w+|\[(\w*)]/g; - let match; - while ((match = pattern.exec(name)) !== null) { - throwIfDepthExceeded(path.length); - path.push(match[0] === '[]' ? '' : match[1] || match[0]); - } - return path; -} - -/** - * Convert an array to an object. - * - * @param {Array} arr - The array to convert to an object. - * - * @returns An object with the same keys and values as the array. - */ -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} - -/** - * It takes a FormData object and returns a JavaScript object - * - * @param {string} formData The FormData object to convert to JSON. - * - * @returns {Object | null} The converted object. - */ -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - throwIfDepthExceeded(index); - let name = path[index++]; - if (name === '__proto__') return true; - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && utils$1.isArray(target) ? target.length : name; - if (isLast) { - if (utils$1.hasOwnProp(target, name)) { - target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value]; - } else { - target[name] = value; - } - return !isNumericKey; - } - if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) { - target[name] = []; - } - const result = buildPath(path, value, target[name], index); - if (result && utils$1.isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - return !isNumericKey; - } - if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { - const obj = {}; - utils$1.forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - return obj; - } - return null; -} - -const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined; - -/** - * It takes a string, tries to parse it, and if it fails, it returns the stringified version - * of the input - * - * @param {any} rawValue - The value to be stringified. - * @param {Function} parser - A function that parses a string into a JavaScript object. - * @param {Function} encoder - A function that takes a value and returns a string. - * - * @returns {string} A stringified version of the rawValue. - */ -function stringifySafely(rawValue, parser, encoder) { - if (utils$1.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils$1.trim(rawValue); - } catch (e) { - if (e.name !== 'SyntaxError') { - throw e; - } - } - } - return (encoder || JSON.stringify)(rawValue); -} -const defaults = { - transitional: transitionalDefaults, - adapter: ['xhr', 'http', 'fetch'], - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = utils$1.isObject(data); - if (isObjectPayload && utils$1.isHTMLForm(data)) { - data = new FormData(data); - } - const isFormData = utils$1.isFormData(data); - if (isFormData) { - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } - if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) { - return data; - } - if (utils$1.isArrayBufferView(data)) { - return data.buffer; - } - if (utils$1.isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } - let isFileList; - if (isObjectPayload) { - const formSerializer = own(this, 'formSerializer'); - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return toURLEncodedForm(data, formSerializer).toString(); - } - if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const env = own(this, 'env'); - const _FormData = env && env.FormData; - return toFormData(isFileList ? { - 'files[]': data - } : data, _FormData && new _FormData(), formSerializer); - } - } - if (isObjectPayload || hasJSONContentType) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } - return data; - }], - transformResponse: [function transformResponse(data) { - const transitional = own(this, 'transitional') || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const responseType = own(this, 'responseType'); - const JSONRequested = responseType === 'json'; - if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { - return data; - } - if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data, own(this, 'parseReviver')); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response')); - } - throw e; - } - } - } - return data; - }], - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - maxContentLength: -1, - maxBodyLength: -1, - env: { - FormData: platform.classes.FormData, - Blob: platform.classes.Blob - }, - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - headers: { - common: { - Accept: 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } -}; -utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query'], method => { - defaults.headers[method] = {}; -}); - -/** - * Transform the data for a request or a response - * - * @param {Array|Function} fns A single function or Array of functions - * @param {?Object} response The response object - * - * @returns {*} The resulting transformed data - */ -function transformData(fns, response) { - const config = this || defaults; - const context = response || config; - const headers = AxiosHeaders.from(context.headers); - let data = context.data; - utils$1.forEach(fns, function transform(fn) { - data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); - }); - headers.normalize(); - return data; -} - -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - -class CanceledError extends AxiosError { - /** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ - constructor(message, config, request) { - super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); - this.name = 'CanceledError'; - this.__CANCEL__ = true; - } -} - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - * - * @returns {object} The response. - */ -function settle(resolve, reject, response) { - const validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(new AxiosError('Request failed with status code ' + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response)); - } -} - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - if (typeof url !== 'string') { - return false; - } - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); -} - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * - * @returns {string} The combined URL - */ -function combineURLs(baseURL, relativeURL) { - return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; -} - -const malformedHttpProtocol = /^https?:(?!\/\/)/i; -const httpProtocolControlCharacters = /[\t\n\r]/g; -function stripLeadingC0ControlOrSpace(url) { - let i = 0; - while (i < url.length && url.charCodeAt(i) <= 0x20) { - i++; - } - return url.slice(i); -} -function normalizeURLForProtocolCheck(url) { - return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, ''); -} -function assertValidHttpProtocolURL(url, config) { - if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) { - throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config); - } -} - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * - * @returns {string} The combined full path - */ -function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { - assertValidHttpProtocolURL(requestedURL, config); - let isRelativeUrl = !isAbsoluteURL(requestedURL); - if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { - assertValidHttpProtocolURL(baseURL, config); - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -} - -var DEFAULT_PORTS$1 = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; -function parseUrl(urlString) { - try { - return new URL(urlString); - } catch { - return null; - } -} - -/** - * @param {string|object|URL} url - The URL as a string or URL instance, or a - * compatible object (such as the result from legacy url.parse). - * @return {string} The URL of the proxy that should handle the request to the - * given URL. If no proxy is set, this will be an empty string. - */ -function getProxyForUrl(url) { - var parsedUrl = (typeof url === 'string' ? parseUrl(url) : url) || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { - return ''; // Don't proxy URLs without a valid scheme or host. - } - proto = proto.split(':', 1)[0]; - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, ''); - port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ''; // Don't proxy URLs that match NO_PROXY. - } - var proxy = getEnv(proto + '_proxy') || getEnv('all_proxy'); - if (proxy && proxy.indexOf('://') === -1) { - // Missing scheme in proxy, default to the requested URL's scheme. - proxy = proto + '://' + proxy; - } - return proxy; -} - -/** - * Determines whether a given URL should be proxied. - * - * @param {string} hostname - The host name of the URL. - * @param {number} port - The effective port of the URL. - * @returns {boolean} Whether the given URL should be proxied. - * @private - */ -function shouldProxy(hostname, port) { - var NO_PROXY = getEnv('no_proxy').toLowerCase(); - if (!NO_PROXY) { - return true; // Always proxy if NO_PROXY is not set. - } - if (NO_PROXY === '*') { - return false; // Never proxy if wildcard is set. - } - return NO_PROXY.split(/[,\s]/).every(function (proxy) { - if (!proxy) { - return true; // Skip zero-length hosts. - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; // Skip if ports don't match. - } - if (!/^[.*]/.test(parsedProxyHostname)) { - // No wildcards, so stop proxying if there is an exact match. - return hostname !== parsedProxyHostname; - } - if (parsedProxyHostname.charAt(0) === '*') { - // Remove leading wildcard. - parsedProxyHostname = parsedProxyHostname.slice(1); - } - // Stop proxying if the hostname ends with the no_proxy host. - return !hostname.endsWith(parsedProxyHostname); - }); -} - -/** - * Get the value for an environment variable. - * - * @param {string} key - The name of the environment variable. - * @return {string} The value of the environment variable. - * @private - */ -function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; -} - -const VERSION = "1.18.0"; - -function parseProtocol(url) { - const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); - return match && match[1] || ''; -} - -// RFC 2397: data:[][;base64], -// mediatype = type/subtype followed by optional ;name=value parameters -const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/; - -/** - * Parse data uri to a Buffer or Blob - * - * @param {String} uri - * @param {?Boolean} asBlob - * @param {?Object} options - * @param {?Function} options.Blob - * - * @returns {Buffer|Blob} - */ -function fromDataURI(uri, asBlob, options) { - const _Blob = options && options.Blob || platform.classes.Blob; - const protocol = parseProtocol(uri); - if (asBlob === undefined && _Blob) { - asBlob = true; - } - if (protocol === 'data') { - uri = protocol.length ? uri.slice(protocol.length + 1) : uri; - const match = DATA_URL_PATTERN.exec(uri); - if (!match) { - throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); - } - const type = match[1]; - const params = match[2]; - const encoding = match[3] ? 'base64' : 'utf8'; - const body = match[4]; - - // RFC 2397 section 3: default mediatype is text/plain;charset=US-ASCII - // Bare `data:,` leaves mime undefined; Blob normalises that to "" per spec. - let mime; - if (type) { - mime = params ? type + params : type; - } else if (params) { - mime = 'text/plain' + params; - } - const buffer = Buffer.from(decodeURIComponent(body), encoding); - if (asBlob) { - if (!_Blob) { - throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); - } - return new _Blob([buffer], { - type: mime - }); - } - return buffer; - } - throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); -} - -const kInternals = Symbol('internals'); -class AxiosTransformStream extends stream.Transform { - constructor(options) { - options = utils$1.toFlatObject(options, { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, null, (prop, source) => { - return !utils$1.isUndefined(source[prop]); - }); - super({ - readableHighWaterMark: options.chunkSize - }); - const internals = this[kInternals] = { - timeWindow: options.timeWindow, - chunkSize: options.chunkSize, - maxRate: options.maxRate, - minChunkSize: options.minChunkSize, - bytesSeen: 0, - isCaptured: false, - notifiedBytesLoaded: 0, - ts: Date.now(), - bytes: 0, - onReadCallback: null - }; - this.on('newListener', event => { - if (event === 'progress') { - if (!internals.isCaptured) { - internals.isCaptured = true; - } - } - }); - } - _read(size) { - const internals = this[kInternals]; - if (internals.onReadCallback) { - internals.onReadCallback(); - } - return super._read(size); - } - _transform(chunk, encoding, callback) { - const internals = this[kInternals]; - const maxRate = internals.maxRate; - const readableHighWaterMark = this.readableHighWaterMark; - const timeWindow = internals.timeWindow; - const divider = 1000 / timeWindow; - const bytesThreshold = maxRate / divider; - const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; - const pushChunk = (_chunk, _callback) => { - const bytes = Buffer.byteLength(_chunk); - internals.bytesSeen += bytes; - internals.bytes += bytes; - internals.isCaptured && this.emit('progress', internals.bytesSeen); - if (this.push(_chunk)) { - process.nextTick(_callback); - } else { - internals.onReadCallback = () => { - internals.onReadCallback = null; - process.nextTick(_callback); - }; - } - }; - const transformChunk = (_chunk, _callback) => { - const chunkSize = Buffer.byteLength(_chunk); - let chunkRemainder = null; - let maxChunkSize = readableHighWaterMark; - let bytesLeft; - let passed = 0; - if (maxRate) { - const now = Date.now(); - if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { - internals.ts = now; - bytesLeft = bytesThreshold - internals.bytes; - internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; - passed = 0; - } - bytesLeft = bytesThreshold - internals.bytes; - } - if (maxRate) { - if (bytesLeft <= 0) { - // next time window - return setTimeout(() => { - _callback(null, _chunk); - }, timeWindow - passed); - } - if (bytesLeft < maxChunkSize) { - maxChunkSize = bytesLeft; - } - } - if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { - chunkRemainder = _chunk.subarray(maxChunkSize); - _chunk = _chunk.subarray(0, maxChunkSize); - } - pushChunk(_chunk, chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback); - }; - transformChunk(chunk, function transformNextChunk(err, _chunk) { - if (err) { - return callback(err); - } - if (_chunk) { - transformChunk(_chunk, transformNextChunk); - } else { - callback(null); - } - }); - } -} - -const { - asyncIterator -} = Symbol; -const readBlob = async function* (blob) { - if (blob.stream) { - yield* blob.stream(); - } else if (blob.arrayBuffer) { - yield await blob.arrayBuffer(); - } else if (blob[asyncIterator]) { - yield* blob[asyncIterator](); - } else { - yield blob; - } -}; - -const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; -const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); -const CRLF = '\r\n'; -const CRLF_BYTES = textEncoder.encode(CRLF); -const CRLF_BYTES_COUNT = 2; -class FormDataPart { - constructor(name, value) { - const { - escapeName - } = this.constructor; - const isStringValue = utils$1.isString(value); - let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''}${CRLF}`; - if (isStringValue) { - value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); - } else { - const safeType = String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); - headers += `Content-Type: ${safeType}${CRLF}`; - } - this.headers = textEncoder.encode(headers + CRLF); - this.contentLength = isStringValue ? value.byteLength : value.size; - this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; - this.name = name; - this.value = value; - } - async *encode() { - yield this.headers; - const { - value - } = this; - if (utils$1.isTypedArray(value)) { - yield value; - } else { - yield* readBlob(value); - } - yield CRLF_BYTES; - } - static escapeName(name) { - return String(name).replace(/[\r\n"]/g, match => ({ - '\r': '%0D', - '\n': '%0A', - '"': '%22' - })[match]); - } -} -const formDataToStream = (form, headersHandler, options) => { - const { - tag = 'form-data-boundary', - size = 25, - boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET) - } = options || {}; - if (!utils$1.isFormData(form)) { - throw new TypeError('FormData instance required'); - } - if (boundary.length < 1 || boundary.length > 70) { - throw new Error('boundary must be 1-70 characters long'); - } - const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); - const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF); - let contentLength = footerBytes.byteLength; - const parts = Array.from(form.entries()).map(([name, value]) => { - const part = new FormDataPart(name, value); - contentLength += part.size; - return part; - }); - contentLength += boundaryBytes.byteLength * parts.length; - contentLength = utils$1.toFiniteNumber(contentLength); - const computedHeaders = { - 'Content-Type': `multipart/form-data; boundary=${boundary}` - }; - if (Number.isFinite(contentLength)) { - computedHeaders['Content-Length'] = contentLength; - } - headersHandler && headersHandler(computedHeaders); - return stream.Readable.from(async function* () { - for (const part of parts) { - yield boundaryBytes; - yield* part.encode(); - } - yield footerBytes; - }()); -}; - -class ZlibHeaderTransformStream extends stream.Transform { - __transform(chunk, encoding, callback) { - this.push(chunk); - callback(); - } - _transform(chunk, encoding, callback) { - if (chunk.length !== 0) { - this._transform = this.__transform; - - // Add Default Compression headers if no zlib headers are present - if (chunk[0] !== 120) { - // Hex: 78 - const header = Buffer.alloc(2); - header[0] = 120; // Hex: 78 - header[1] = 156; // Hex: 9C - this.push(header, encoding); - } - } - this.__transform(chunk, encoding, callback); - } -} - -class Http2Sessions { - constructor() { - this.sessions = Object.create(null); - } - getSession(authority, options) { - options = Object.assign({ - sessionTimeout: 1000 - }, options); - let authoritySessions = this.sessions[authority]; - if (authoritySessions) { - let len = authoritySessions.length; - for (let i = 0; i < len; i++) { - const [sessionHandle, sessionOptions] = authoritySessions[i]; - if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) { - return sessionHandle; - } - } - } - const session = http2.connect(authority, options); - let removed; - let timer; - const removeSession = () => { - if (removed) { - return; - } - removed = true; - if (timer) { - clearTimeout(timer); - timer = null; - } - let entries = authoritySessions, - len = entries.length, - i = len; - while (i--) { - if (entries[i][0] === session) { - if (len === 1) { - delete this.sessions[authority]; - } else { - entries.splice(i, 1); - } - if (!session.closed) { - session.close(); - } - return; - } - } - }; - const originalRequestFn = session.request; - const { - sessionTimeout - } = options; - if (sessionTimeout != null) { - let streamsCount = 0; - session.request = function () { - const stream = originalRequestFn.apply(this, arguments); - streamsCount++; - if (timer) { - clearTimeout(timer); - timer = null; - } - stream.once('close', () => { - if (! --streamsCount) { - timer = setTimeout(() => { - timer = null; - removeSession(); - }, sessionTimeout); - } - }); - return stream; - }; - } - session.once('close', removeSession); - let entry = [session, options]; - authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry]; - return session; - } -} - -const callbackify = (fn, reducer) => { - return utils$1.isAsyncFn(fn) ? function (...args) { - const cb = args.pop(); - fn.apply(this, args).then(value => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); - } - }, cb); - } : fn; -}; - -const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']); -const isIPv4Loopback = host => { - const parts = host.split('.'); - if (parts.length !== 4) return false; - if (parts[0] !== '127') return false; - return parts.every(p => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255); -}; -const isIPv6ZeroGroup = group => /^0{1,4}$/.test(group); - -// The unspecified address (IPv4 0.0.0.0 / IPv6 ::) resolves to the local host -// for outbound connections, so treat it as loopback-equivalent for NO_PROXY -// matching. 0.0.0.0 is covered by LOOPBACK_HOSTNAMES; this handles compressed -// and full IPv6 all-zero forms so both families bypass symmetrically. -const isIPv6Unspecified = host => { - if (host === '::') return true; - const compressionIndex = host.indexOf('::'); - if (compressionIndex !== -1) { - if (compressionIndex !== host.lastIndexOf('::')) return false; - const left = host.slice(0, compressionIndex); - const right = host.slice(compressionIndex + 2); - const leftGroups = left ? left.split(':') : []; - const rightGroups = right ? right.split(':') : []; - const explicitGroups = leftGroups.length + rightGroups.length; - return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup); - } - const groups = host.split(':'); - return groups.length === 8 && groups.every(isIPv6ZeroGroup); -}; -const isIPv6Loopback = host => { - // Collapse all-zero groups: any form of ::1 / 0:0:...:0:1 - // First, strip any leading "::" by normalising with Set lookup of common forms, - // then fall back to structural check. - if (host === '::1') return true; - - // Check IPv4-mapped IPv6 loopback: ::ffff: or ::ffff: - // Node's URL parser normalises ::ffff:127.0.0.1 → ::ffff:7f00:1 - const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i); - if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]); - const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i); - if (v4MappedHex) { - const high = parseInt(v4MappedHex[1], 16); - // High 16 bits must start with 127 (0x7f) — i.e. 0x7f00..0x7fff - return high >= 0x7f00 && high <= 0x7fff; - } - - // Full-form ::1 variants: any number of zero groups followed by trailing 1 - // e.g. 0:0:0:0:0:0:0:1, 0000:...:0001 - const groups = host.split(':'); - if (groups.length === 8) { - for (let i = 0; i < 7; i++) { - if (!/^0+$/.test(groups[i])) return false; - } - return /^0*1$/.test(groups[7]); - } - return false; -}; -const isLoopback = host => { - if (!host) return false; - if (LOOPBACK_HOSTNAMES.has(host)) return true; - if (isIPv4Loopback(host)) return true; - if (isIPv6Unspecified(host)) return true; - return isIPv6Loopback(host); -}; -const DEFAULT_PORTS = { - http: 80, - https: 443, - ws: 80, - wss: 443, - ftp: 21 -}; -const parseNoProxyEntry = entry => { - let entryHost = entry; - let entryPort = 0; - if (entryHost.charAt(0) === '[') { - const bracketIndex = entryHost.indexOf(']'); - if (bracketIndex !== -1) { - const host = entryHost.slice(1, bracketIndex); - const rest = entryHost.slice(bracketIndex + 1); - if (rest.charAt(0) === ':' && /^\d+$/.test(rest.slice(1))) { - entryPort = Number.parseInt(rest.slice(1), 10); - } - return [host, entryPort]; - } - } - const firstColon = entryHost.indexOf(':'); - const lastColon = entryHost.lastIndexOf(':'); - if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) { - entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10); - entryHost = entryHost.slice(0, lastColon); - } - return [entryHost, entryPort]; -}; - -// Convert IPv4-mapped IPv6 (::ffff:0:0/96 prefix) to IPv4 dotted form so both -// sides of a NO_PROXY comparison see the same canonical address. Without this, -// `NO_PROXY=192.168.1.5` would not match a request to `http://[::ffff:192.168.1.5]/` -// (Node's URL parser normalises that to `[::ffff:c0a8:105]`), and vice-versa, -// allowing the proxy-bypass policy to be circumvented by using the alternate -// representation. Returns the input unchanged when not IPv4-mapped. -const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i; -const IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i; -const unmapIPv4MappedIPv6 = host => { - if (typeof host !== 'string' || host.indexOf(':') === -1) return host; - const dotted = host.match(IPV4_MAPPED_DOTTED_RE); - if (dotted) return dotted[1]; - const hex = host.match(IPV4_MAPPED_HEX_RE); - if (hex) { - const high = parseInt(hex[1], 16); - const low = parseInt(hex[2], 16); - return `${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`; - } - return host; -}; -const normalizeNoProxyHost = hostname => { - if (!hostname) { - return hostname; - } - if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') { - hostname = hostname.slice(1, -1); - } - return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, '')); -}; -function shouldBypassProxy(location) { - let parsed; - try { - parsed = new URL(location); - } catch (_err) { - return false; - } - const noProxy = (process.env.no_proxy || process.env.NO_PROXY || '').toLowerCase(); - if (!noProxy) { - return false; - } - if (noProxy === '*') { - return true; - } - const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0; - const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase()); - return noProxy.split(/[\s,]+/).some(entry => { - if (!entry) { - return false; - } - let [entryHost, entryPort] = parseNoProxyEntry(entry); - entryHost = normalizeNoProxyHost(entryHost); - if (!entryHost) { - return false; - } - if (entryPort && entryPort !== port) { - return false; - } - if (entryHost.charAt(0) === '*') { - entryHost = entryHost.slice(1); - } - if (entryHost.charAt(0) === '.') { - return hostname.endsWith(entryHost); - } - return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost); - }); -} - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - min = min !== undefined ? min : 1000; - return function push(chunkLength) { - const now = Date.now(); - const startedAt = timestamps[tail]; - if (!firstSampleTS) { - firstSampleTS = now; - } - bytes[head] = chunkLength; - timestamps[head] = now; - let i = tail; - let bytesCount = 0; - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - head = (head + 1) % samplesCount; - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - if (now - firstSampleTS < min) { - return; - } - const passed = startedAt && now - startedAt; - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; -} - -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1000 / freq; - let lastArgs; - let timer; - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn(...args); - }; - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if (passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs); - }, threshold - passed); - } - } - }; - const flush = () => lastArgs && invoke(lastArgs); - return [throttled, flush]; -} - -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); - return throttle(e => { - if (!e || typeof e.loaded !== 'number') { - return; - } - const rawLoaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded; - const progressBytes = Math.max(0, loaded - bytesNotified); - const rate = _speedometer(progressBytes); - bytesNotified = Math.max(bytesNotified, loaded); - const data = { - loaded, - total, - progress: total ? loaded / total : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null, - [isDownloadStream ? 'download' : 'upload']: true - }; - listener(data); - }, freq); -}; -const progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - return [loaded => throttled[0]({ - lengthComputable, - total, - loaded - }), throttled[1]]; -}; -const asyncDecorator = fn => (...args) => utils$1.asap(() => fn(...args)); - -/** - * Estimate decoded byte length of a data:// URL *without* allocating large buffers. - * - For base64: compute exact decoded size using length and padding; - * handle %XX at the character-count level (no string allocation). - * - For non-base64: compute the exact percent-decoded UTF-8 byte length. - * - * @param {string} url - * @returns {number} - */ -const isHexDigit = charCode => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102; -const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); -function estimateDataURLDecodedBytes(url) { - if (!url || typeof url !== 'string') return 0; - if (!url.startsWith('data:')) return 0; - const comma = url.indexOf(','); - if (comma < 0) return 0; - const meta = url.slice(5, comma); - const body = url.slice(comma + 1); - const isBase64 = /;base64/i.test(meta); - if (isBase64) { - let effectiveLen = body.length; - const len = body.length; // cache length - - for (let i = 0; i < len; i++) { - if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) { - const a = body.charCodeAt(i + 1); - const b = body.charCodeAt(i + 2); - const isHex = isHexDigit(a) && isHexDigit(b); - if (isHex) { - effectiveLen -= 2; - i += 2; - } - } - } - let pad = 0; - let idx = len - 1; - const tailIsPct3D = j => j >= 2 && body.charCodeAt(j - 2) === 37 && - // '%' - body.charCodeAt(j - 1) === 51 && ( - // '3' - body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd' - - if (idx >= 0) { - if (body.charCodeAt(idx) === 61 /* '=' */) { - pad++; - idx--; - } else if (tailIsPct3D(idx)) { - pad++; - idx -= 3; - } - } - if (pad === 1 && idx >= 0) { - if (body.charCodeAt(idx) === 61 /* '=' */) { - pad++; - } else if (tailIsPct3D(idx)) { - pad++; - } - } - const groups = Math.floor(effectiveLen / 4); - const bytes = groups * 3 - (pad || 0); - return bytes > 0 ? bytes : 0; - } - - // Compute UTF-8 byte length directly from UTF-16 code units without allocating - // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). - // Valid %XX triplets count as one decoded byte; this matches the bytes that - // decodeURIComponent(body) would produce before Buffer re-encodes the string. - let bytes = 0; - for (let i = 0, len = body.length; i < len; i++) { - const c = body.charCodeAt(i); - if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { - bytes += 1; - i += 2; - } else if (c < 0x80) { - bytes += 1; - } else if (c < 0x800) { - bytes += 2; - } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { - const next = body.charCodeAt(i + 1); - if (next >= 0xdc00 && next <= 0xdfff) { - bytes += 4; - i++; - } else { - bytes += 3; - } - } else { - bytes += 3; - } - } - return bytes; -} - -const zlibOptions = { - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH -}; -const brotliOptions = { - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH -}; -const zstdOptions = { - flush: zlib.constants.ZSTD_e_flush, - finishFlush: zlib.constants.ZSTD_e_flush -}; -const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress); -const isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress); -const ACCEPT_ENCODING = 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''); -const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ', zstd' : ''); -const { - http: httpFollow, - https: httpsFollow -} = followRedirects; -const isHttps = /https:?/; -const FORM_DATA_CONTENT_HEADERS$1 = ['content-type', 'content-length']; -function setFormDataHeaders$1(headers, formHeaders, policy) { - if (policy !== 'content-only') { - headers.set(formHeaders); - return; - } - Object.entries(formHeaders).forEach(([key, val]) => { - if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) { - headers.set(key, val); - } - }); -} - -// Symbols used to bind a single 'error' listener to a pooled socket and track -// the request currently owning that socket across keep-alive reuse (issue #10780). -const kAxiosSocketListener = Symbol('axios.http.socketListener'); -const kAxiosCurrentReq = Symbol('axios.http.currentReq'); - -// Tags HttpsProxyAgent instances installed by setProxy() so the redirect path -// can strip them without clobbering a user-supplied agent that happens to be -// an HttpsProxyAgent. -const kAxiosInstalledTunnel = Symbol('axios.http.installedTunnel'); - -// Cache of CONNECT-tunneling agents keyed by proxy config so repeat requests -// through the same proxy reuse a single agent (and its socket pool). The -// keyspace is bounded by the set of distinct proxy configs the process uses, -// so unbounded growth is not a concern in practice. -const tunnelingAgentCache = new Map(); -const tunnelingAgentCacheUser = new WeakMap(); -function getTunnelingAgent(agentOptions, userHttpsAgent) { - const key = agentOptions.protocol + '//' + agentOptions.hostname + ':' + (agentOptions.port || '') + '#' + (agentOptions.auth || ''); - const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, new Map()).get(userHttpsAgent) : tunnelingAgentCache; - let agent = cache.get(key); - if (agent) return agent; - // Forward the user's TLS options (custom CA, rejectUnauthorized, client cert, - // etc.) into the tunneling agent so they apply to the origin TLS upgrade - // performed after CONNECT. Our proxy fields take precedence on conflict. - const merged = userHttpsAgent && userHttpsAgent.options ? { - ...userHttpsAgent.options, - ...agentOptions - } : agentOptions; - agent = new HttpsProxyAgent(merged); - if (userHttpsAgent && userHttpsAgent.options) { - const originTLSOptions = { - ...userHttpsAgent.options - }; - const callback = agent.callback; - agent.callback = function axiosTunnelingAgentCallback(req, opts) { - // HttpsProxyAgent v5 reads callback opts for the post-CONNECT origin TLS upgrade. - return callback.call(this, req, { - ...originTLSOptions, - ...opts - }); - }; - } - agent[kAxiosInstalledTunnel] = true; - cache.set(key, agent); - return agent; -} -const supportedProtocols = platform.protocols.map(protocol => { - return protocol + ':'; -}); - -// Node's WHATWG URL parser returns `username` and `password` percent-encoded. -// Decode before composing the `auth` option so credentials such as -// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the -// original value for malformed input so a bad encoding never throws. -const decodeURIComponentSafe$1 = value => { - if (!utils$1.isString(value)) { - return value; - } - try { - return decodeURIComponent(value); - } catch (error) { - return value; - } -}; -const flushOnFinish = (stream, [throttled, flush]) => { - stream.on('end', flush).on('error', flush); - return throttled; -}; -const http2Sessions = new Http2Sessions(); - -/** - * If the proxy, auth, sensitive header, or config beforeRedirects functions are defined, - * call them with the options object. - * - * @param {Object} options - The options object that was passed to the request. - * - * @returns {Object} - */ -function dispatchBeforeRedirect(options, responseDetails, requestDetails) { - if (options.beforeRedirects.proxy) { - options.beforeRedirects.proxy(options); - } - if (options.beforeRedirects.auth) { - options.beforeRedirects.auth(options); - } - if (options.beforeRedirects.sensitiveHeaders) { - options.beforeRedirects.sensitiveHeaders(options, requestDetails); - } - if (options.beforeRedirects.config) { - options.beforeRedirects.config(options, responseDetails, requestDetails); - } -} -function stripMatchingHeaders(headers, sensitiveSet) { - if (!headers) { - return; - } - Object.keys(headers).forEach(header => { - if (sensitiveSet.has(header.toLowerCase())) { - delete headers[header]; - } - }); -} -function isSameOriginRedirect(redirectOptions, requestDetails) { - if (!requestDetails) { - return false; - } - try { - return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin; - } catch (e) { - // If origin comparison fails, treat the redirect as unsafe. - return false; - } -} - -/** - * If the proxy or config afterRedirects functions are defined, call them with the options - * - * @param {http.ClientRequestArgs} options - * @param {AxiosProxyConfig} configProxy configuration from Axios options object - * @param {string} location - * - * @returns {http.ClientRequestArgs} - */ -function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) { - let proxy = configProxy; - if (!proxy && proxy !== false) { - const proxyUrl = getProxyForUrl(location); - if (proxyUrl) { - if (!shouldBypassProxy(location)) { - proxy = new URL(proxyUrl); - } - } - } - // On redirect re-invocation, strip any stale Proxy-Authorization header carried - // over from the prior request (e.g. new target no longer uses a proxy, or uses - // a different proxy). Skip on the initial request so user-supplied headers are - // preserved. Header names are case-insensitive, so remove every case variant. - if (isRedirect && options.headers) { - for (const name of Object.keys(options.headers)) { - if (name.toLowerCase() === 'proxy-authorization') { - delete options.headers[name]; - } - } - } - // Strip any tunneling agent we installed for the previous hop so a redirect - // that drops the proxy or crosses an HTTPS↔HTTP boundary doesn't reuse a - // stale one. Match on our Symbol marker so a user-supplied HttpsProxyAgent - // (which won't carry the marker) is left alone. - if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) { - options.agent = undefined; - } - if (proxy) { - // Read proxy fields without traversing the prototype chain. URL instances expose - // username/password/hostname/host/port/protocol via getters on URL.prototype (so - // direct reads are shielded), but plain object proxies — and the `auth` field - // (which URL does not expose) — must be guarded so a polluted Object.prototype - // (e.g. Object.prototype.auth = { username, password }) cannot inject - // attacker-controlled credentials into the Proxy-Authorization header or - // redirect proxying to an attacker-controlled host. - const isProxyURL = proxy instanceof URL; - const readProxyField = key => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : undefined; - const proxyUsername = readProxyField('username'); - const proxyPassword = readProxyField('password'); - let proxyAuth = utils$1.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined; - - // Basic proxy authorization - if (proxyUsername) { - proxyAuth = (proxyUsername || '') + ':' + (proxyPassword || ''); - } - if (proxyAuth) { - // Support proxy auth object form. Read sub-fields via own-prop checks so a - // plain object inheriting from polluted Object.prototype cannot leak creds. - const authIsObject = typeof proxyAuth === 'object'; - const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined; - const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined; - const validProxyAuth = Boolean(authUsername || authPassword); - if (validProxyAuth) { - proxyAuth = (authUsername || '') + ':' + (authPassword || ''); - } else if (authIsObject) { - throw new AxiosError('Invalid proxy authorization', AxiosError.ERR_BAD_OPTION, { - proxy - }); - } - } - const targetIsHttps = isHttps.test(options.protocol); - if (targetIsHttps) { - // CONNECT-tunneling path for HTTPS targets. Preserves end-to-end TLS to - // the origin so the proxy cannot inspect the URL, headers, or body — the - // behavior already promised by THREATMODEL.md (T-R9). HttpsProxyAgent - // sends Proxy-Authorization on the CONNECT request only, never on the - // wrapped TLS request, which is why we don't stamp it onto - // options.headers here. If the user already supplied an HttpsProxyAgent, - // they own tunneling end-to-end and we leave them alone; otherwise we - // install our own tunneling agent and forward their TLS options (if any) - // so a custom httpsAgent for cert pinning / rejectUnauthorized still - // applies to the origin TLS upgrade. - if (!(configHttpsAgent instanceof HttpsProxyAgent)) { - const proxyHost = readProxyField('hostname') || readProxyField('host'); - const proxyPort = readProxyField('port'); - const rawProxyProtocol = readProxyField('protocol'); - const normalizedProtocol = rawProxyProtocol ? rawProxyProtocol.includes(':') ? rawProxyProtocol : `${rawProxyProtocol}:` : 'http:'; - // Bracket IPv6 literals for URL parsing; URL.hostname strips the - // brackets again on read so the agent receives the raw form. - const proxyHostForURL = proxyHost && proxyHost.includes(':') && !proxyHost.startsWith('[') ? `[${proxyHost}]` : proxyHost; - const proxyURL = new URL(`${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ':' + proxyPort : ''}`); - const agentOptions = { - protocol: proxyURL.protocol, - hostname: proxyURL.hostname.replace(/^\[|\]$/g, ''), - port: proxyURL.port, - auth: proxyAuth && typeof proxyAuth === 'string' ? proxyAuth : undefined - }; - if (proxyURL.protocol === 'https:') { - agentOptions.ALPNProtocols = ['http/1.1']; - } - const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent); - // Set both: `options.agent` is consumed by the native https.request path - // (maxRedirects === 0); `options.agents.https` is consumed by - // follow-redirects, which ignores `options.agent` when `options.agents` - // is present. - options.agent = tunnelingAgent; - if (options.agents) { - options.agents.https = tunnelingAgent; - } - } - } else { - // Forward-proxy mode for plaintext HTTP targets. The request line carries - // the absolute URL and the proxy sees everything — acceptable for plain - // HTTP since the wire was already plaintext. - if (proxyAuth) { - const base64 = Buffer.from(proxyAuth, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - - // Preserve a user-supplied Host header (case-insensitive) so callers can override - // the value forwarded to the proxy; otherwise default to the request URL's host. - let hasUserHostHeader = false; - for (const name of Object.keys(options.headers)) { - if (name.toLowerCase() === 'host') { - hasUserHostHeader = true; - break; - } - } - if (!hasUserHostHeader) { - options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); - } - const proxyHost = readProxyField('hostname') || readProxyField('host'); - options.hostname = proxyHost; - // Replace 'host' since options is not a URL object - options.host = proxyHost; - options.port = readProxyField('port'); - options.path = location; - const proxyProtocol = readProxyField('protocol'); - if (proxyProtocol) { - options.protocol = proxyProtocol.includes(':') ? proxyProtocol : `${proxyProtocol}:`; - } - } - } - options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { - // Configure proxy for redirected request, passing the original config proxy to apply - // the exact same logic as if the redirected request was performed by axios directly. - setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent); - }; -} -const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; - -// temporary hotfix - -const wrapAsync = asyncExecutor => { - return new Promise((resolve, reject) => { - let onDone; - let isDone; - const done = (value, isRejected) => { - if (isDone) return; - isDone = true; - onDone && onDone(value, isRejected); - }; - const _resolve = value => { - done(value); - resolve(value); - }; - const _reject = reason => { - done(reason, true); - reject(reason); - }; - asyncExecutor(_resolve, _reject, onDoneHandler => onDone = onDoneHandler).catch(_reject); - }); -}; -const resolveFamily = ({ - address, - family -}) => { - if (!utils$1.isString(address)) { - throw TypeError('address must be a string'); - } - return { - address, - family: family || (address.indexOf('.') < 0 ? 6 : 4) - }; -}; -const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { - address, - family -}); -const http2Transport = { - request(options, cb) { - const authority = options.protocol + '//' + options.hostname + ':' + (options.port || (options.protocol === 'https:' ? 443 : 80)); - const { - http2Options, - headers - } = options; - const session = http2Sessions.getSession(authority, http2Options); - const { - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_STATUS - } = http2.constants; - const http2Headers = { - [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''), - [HTTP2_HEADER_METHOD]: options.method, - [HTTP2_HEADER_PATH]: options.path - }; - utils$1.forEach(headers, (header, name) => { - name.charAt(0) !== ':' && (http2Headers[name] = header); - }); - const req = session.request(http2Headers); - req.once('response', responseHeaders => { - const response = req; //duplex - - responseHeaders = Object.assign({}, responseHeaders); - const status = responseHeaders[HTTP2_HEADER_STATUS]; - delete responseHeaders[HTTP2_HEADER_STATUS]; - response.headers = responseHeaders; - response.statusCode = +status; - cb(response); - }); - return req; - } -}; - -/*eslint consistent-return:0*/ -var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { - return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - // Read config pollution-safely: own properties and members inherited from - // a non-Object.prototype source (e.g. an Object.create(defaults) template) - // are honored, but values injected onto a polluted Object.prototype are - // ignored. All behavior-affecting reads in this adapter go through own() - // so the protection boundary stays consistent. - const own = key => utils$1.getSafeProp(config, key); - const transitional = own('transitional') || transitionalDefaults; - let data = own('data'); - let lookup = own('lookup'); - let family = own('family'); - let httpVersion = own('httpVersion'); - if (httpVersion === undefined) httpVersion = 1; - let http2Options = own('http2Options'); - const responseType = own('responseType'); - const responseEncoding = own('responseEncoding'); - const httpAgent = own('httpAgent'); - const httpsAgent = own('httpsAgent'); - const method = own('method').toUpperCase(); - const maxRedirects = own('maxRedirects'); - const maxBodyLength = own('maxBodyLength'); - const maxContentLength = own('maxContentLength'); - const decompress = own('decompress'); - let isDone; - let rejected = false; - let req; - let connectPhaseTimer; - httpVersion = +httpVersion; - if (Number.isNaN(httpVersion)) { - throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`); - } - if (httpVersion !== 1 && httpVersion !== 2) { - throw TypeError(`Unsupported protocol version '${httpVersion}'`); - } - const isHttp2 = httpVersion === 2; - if (lookup) { - const _lookup = callbackify(lookup, value => utils$1.isArray(value) ? value : [value]); - // hotfix to support opt.all option which is required for node 20.x - lookup = (hostname, opt, cb) => { - _lookup(hostname, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); - }); - }; - } - const abortEmitter = new events.EventEmitter(); - function abort(reason) { - try { - abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); - } catch (err) { - // ignore emit errors - } - } - function clearConnectPhaseTimer() { - if (connectPhaseTimer) { - clearTimeout(connectPhaseTimer); - connectPhaseTimer = null; - } - } - function createTimeoutError() { - const configTimeout = own('timeout'); - let timeoutErrorMessage = configTimeout ? 'timeout of ' + configTimeout + 'ms exceeded' : 'timeout exceeded'; - const configTimeoutErrorMessage = own('timeoutErrorMessage'); - if (configTimeoutErrorMessage) { - timeoutErrorMessage = configTimeoutErrorMessage; - } - return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req); - } - abortEmitter.once('abort', reject); - const onFinished = () => { - clearConnectPhaseTimer(); - if (config.cancelToken) { - config.cancelToken.unsubscribe(abort); - } - if (config.signal) { - config.signal.removeEventListener('abort', abort); - } - abortEmitter.removeAllListeners(); - }; - if (config.cancelToken || config.signal) { - config.cancelToken && config.cancelToken.subscribe(abort); - if (config.signal) { - config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); - } - } - onDone((response, isRejected) => { - isDone = true; - clearConnectPhaseTimer(); - if (isRejected) { - rejected = true; - onFinished(); - return; - } - const { - data - } = response; - if (data instanceof stream.Readable || data instanceof stream.Duplex) { - const offListeners = stream.finished(data, () => { - offListeners(); - onFinished(); - }); - } else { - onFinished(); - } - }); - - // Parse url - const fullPath = buildFullPath(own('baseURL'), own('url'), own('allowAbsoluteUrls'), config); - const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); - const protocol = parsed.protocol || supportedProtocols[0]; - if (protocol === 'data:') { - // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set. - if (maxContentLength > -1) { - // Use the exact string passed to fromDataURI (the configured url); fall back to fullPath if needed. - const dataUrl = String(own('url') || fullPath || ''); - const estimated = estimateDataURLDecodedBytes(dataUrl); - if (estimated > maxContentLength) { - return reject(new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config)); - } - } - let convertedData; - if (method !== 'GET') { - return settle(resolve, reject, { - status: 405, - statusText: 'method not allowed', - headers: {}, - config - }); - } - try { - convertedData = fromDataURI(own('url'), responseType === 'blob', { - Blob: config.env && config.env.Blob - }); - } catch (err) { - throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); - } - if (responseType === 'text') { - convertedData = convertedData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === 'utf8') { - convertedData = utils$1.stripBOM(convertedData); - } - } else if (responseType === 'stream') { - convertedData = stream.Readable.from(convertedData); - } - return settle(resolve, reject, { - data: convertedData, - status: 200, - statusText: 'OK', - headers: new AxiosHeaders(), - config - }); - } - if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config)); - } - const headers = AxiosHeaders.from(config.headers).normalize(); - - // Set User-Agent (required by some servers) - // See https://github.com/axios/axios/issues/69 - // User-Agent is specified; handle case where no UA header is desired - // Only set header if it hasn't been set in config - headers.set('User-Agent', 'axios/' + VERSION, false); - const { - onUploadProgress, - onDownloadProgress - } = config; - const maxRate = config.maxRate; - let maxUploadRate = undefined; - let maxDownloadRate = undefined; - - // support for spec compliant FormData objects - if (utils$1.isSpecCompliantForm(data)) { - const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - data = formDataToStream(data, formHeaders => { - headers.set(formHeaders); - }, { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || undefined - }); - // support for https://www.npmjs.com/package/form-data api - } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) { - setFormDataHeaders$1(headers, data.getHeaders(), own('formDataHeaderPolicy')); - if (!headers.hasContentLength()) { - try { - const knownLength = await util.promisify(data.getLength).call(data); - Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - /*eslint no-empty:0*/ - } catch (e) {} - } - } else if (utils$1.isBlob(data) || utils$1.isFile(data)) { - data.size && headers.setContentType(data.type || 'application/octet-stream'); - headers.setContentLength(data.size || 0); - data = stream.Readable.from(readBlob(data)); - } else if (data && !utils$1.isStream(data)) { - if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils$1.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(new AxiosError('Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', AxiosError.ERR_BAD_REQUEST, config)); - } - - // Add Content-Length header if data exists - headers.setContentLength(data.length, false); - if (maxBodyLength > -1 && data.length > maxBodyLength) { - return reject(new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config)); - } - } - const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); - if (utils$1.isArray(maxRate)) { - maxUploadRate = maxRate[0]; - maxDownloadRate = maxRate[1]; - } else { - maxUploadRate = maxDownloadRate = maxRate; - } - if (data && (onUploadProgress || maxUploadRate)) { - if (!utils$1.isStream(data)) { - data = stream.Readable.from(data, { - objectMode: false - }); - } - data = stream.pipeline([data, new AxiosTransformStream({ - maxRate: utils$1.toFiniteNumber(maxUploadRate) - })], utils$1.noop); - onUploadProgress && data.on('progress', flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3)))); - } - - // HTTP basic authentication - let auth = undefined; - const configAuth = own('auth'); - if (configAuth) { - const username = utils$1.getSafeProp(configAuth, 'username') || ''; - const password = utils$1.getSafeProp(configAuth, 'password') || ''; - auth = username + ':' + password; - } - if (!auth && (parsed.username || parsed.password)) { - const urlUsername = decodeURIComponentSafe$1(parsed.username); - const urlPassword = decodeURIComponentSafe$1(parsed.password); - auth = urlUsername + ':' + urlPassword; - } - auth && headers.delete('authorization'); - let path$1; - try { - path$1 = buildURL(parsed.pathname + parsed.search, own('params'), own('paramsSerializer')).replace(/^\?/, ''); - } catch (err) { - const customErr = new Error(err.message); - customErr.config = config; - customErr.url = own('url'); - customErr.exists = true; - return reject(customErr); - } - headers.set('Accept-Encoding', utils$1.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false); - - // Null-prototype to block prototype pollution gadgets on properties read - // directly by Node's http.request (e.g. insecureHTTPParser, lookup). - const options = Object.assign(Object.create(null), { - path: path$1, - method: method, - headers: toByteStringHeaderObject(headers), - agents: { - http: httpAgent, - https: httpsAgent - }, - auth, - protocol, - family, - beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: Object.create(null), - http2Options - }); - - // cacheable-lookup integration hotfix - !utils$1.isUndefined(lookup) && (options.lookup = lookup); - const socketPath = own('socketPath'); - if (socketPath) { - if (typeof socketPath !== 'string') { - return reject(new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config)); - } - const allowedSocketPaths = own('allowedSocketPaths'); - if (allowedSocketPaths != null) { - const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths]; - const resolvedSocket = path.resolve(socketPath); - const isAllowed = allowed.some(entry => typeof entry === 'string' && path.resolve(entry) === resolvedSocket); - if (!isAllowed) { - return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config)); - } - } - options.socketPath = socketPath; - } else { - options.hostname = parsed.hostname.startsWith('[') ? parsed.hostname.slice(1, -1) : parsed.hostname; - options.port = parsed.port; - setProxy(options, own('proxy'), protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path, false, httpsAgent); - } - let transport; - let isNativeTransport = false; - // True only for the follow-redirects transport, which applies - // options.maxBodyLength itself. Every other transport (http2, native - // http/https, a user-supplied custom transport) needs the explicit - // byte-counting pipeline below to enforce maxBodyLength on streamed uploads. - let transportEnforcesMaxBodyLength = false; - const isHttpsRequest = isHttps.test(options.protocol); - // Don't clobber a CONNECT-tunneling agent installed by setProxy() for an - // HTTPS target. - if (options.agent == null) { - options.agent = isHttpsRequest ? httpsAgent : httpAgent; - } - if (isHttp2) { - transport = http2Transport; - } else { - const configTransport = own('transport'); - if (configTransport) { - transport = configTransport; - } else if (maxRedirects === 0) { - transport = isHttpsRequest ? https : http; - isNativeTransport = true; - } else { - transportEnforcesMaxBodyLength = true; - options.sensitiveHeaders = []; - if (maxRedirects) { - options.maxRedirects = maxRedirects; - } - const configBeforeRedirect = own('beforeRedirect'); - if (configBeforeRedirect) { - options.beforeRedirects.config = configBeforeRedirect; - } - if (auth) { - // Restore HTTP Basic credentials on same-origin redirects only. - // follow-redirects >= 1.15.8 strips Authorization on every redirect (see #6929); - // cross-origin stripping is the documented mitigation for T-R2 in THREATMODEL.md - // and is preserved by deliberately not restoring on origin change. - const requestOrigin = parsed.origin; - const authToRestore = auth; - options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) { - try { - if (new URL(redirectOptions.href).origin === requestOrigin) { - redirectOptions.auth = authToRestore; - } - } catch (e) { - // ignore malformed URL: leaving auth stripped is fail-safe - } - }; - } - const sensitiveHeaders = own('sensitiveHeaders'); - if (sensitiveHeaders != null) { - if (!utils$1.isArray(sensitiveHeaders)) { - return reject(new AxiosError('sensitiveHeaders must be an array of strings', AxiosError.ERR_BAD_OPTION_VALUE, config)); - } - const sensitiveSet = new Set(); - for (const header of sensitiveHeaders) { - if (!utils$1.isString(header)) { - return reject(new AxiosError('sensitiveHeaders must be an array of strings', AxiosError.ERR_BAD_OPTION_VALUE, config)); - } - sensitiveSet.add(header.toLowerCase()); - } - if (sensitiveSet.size) { - options.sensitiveHeaders = Array.from(sensitiveSet); - options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) { - if (!isSameOriginRedirect(redirectOptions, requestDetails)) { - stripMatchingHeaders(redirectOptions.headers, sensitiveSet); - } - }; - } - } - transport = isHttpsRequest ? httpsFollow : httpFollow; - } - } - if (maxBodyLength > -1) { - options.maxBodyLength = maxBodyLength; - } else { - // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited - options.maxBodyLength = Infinity; - } - - // Always set an explicit own value so a polluted - // Object.prototype.insecureHTTPParser cannot enable the lenient parser - // through Node's internal options copy - options.insecureHTTPParser = Boolean(own('insecureHTTPParser')); - - // Create the request - req = transport.request(options, function handleResponse(res) { - clearConnectPhaseTimer(); - if (req.destroyed) return; - const streams = [res]; - const responseLength = utils$1.toFiniteNumber(res.headers['content-length']); - if (onDownloadProgress || maxDownloadRate) { - const transformStream = new AxiosTransformStream({ - maxRate: utils$1.toFiniteNumber(maxDownloadRate) - }); - onDownloadProgress && transformStream.on('progress', flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)))); - streams.push(transformStream); - } - - // decompress the response body transparently if required - let responseStream = res; - - // return the last request in case of redirects - const lastRequest = res.req || req; - - // if decompress disabled we should not decompress - if (decompress !== false && res.headers['content-encoding']) { - // if no content, but headers still say that it is encoded, - // remove the header not confuse downstream operations - if (method === 'HEAD' || res.statusCode === 204) { - delete res.headers['content-encoding']; - } - switch ((res.headers['content-encoding'] || '').toLowerCase()) { - /*eslint default-case:0*/ - case 'gzip': - case 'x-gzip': - case 'compress': - case 'x-compress': - // add the unzipper to the body stream processing pipeline - streams.push(zlib.createUnzip(zlibOptions)); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'deflate': - streams.push(new ZlibHeaderTransformStream()); - - // add the unzipper to the body stream processing pipeline - streams.push(zlib.createUnzip(zlibOptions)); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'br': - if (isBrotliSupported) { - streams.push(zlib.createBrotliDecompress(brotliOptions)); - delete res.headers['content-encoding']; - } - break; - case 'zstd': - if (isZstdSupported) { - streams.push(zlib.createZstdDecompress(zstdOptions)); - delete res.headers['content-encoding']; - } - break; - } - } - responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0]; - const response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: new AxiosHeaders(res.headers), - config, - request: lastRequest - }; - if (responseType === 'stream') { - // Enforce maxContentLength on streamed responses; previously this - // was applied only to buffered responses. - if (maxContentLength > -1) { - const limit = maxContentLength; - const source = responseStream; - async function* enforceMaxContentLength() { - let totalResponseBytes = 0; - for await (const chunk of source) { - totalResponseBytes += chunk.length; - if (totalResponseBytes > limit) { - throw new AxiosError('maxContentLength size of ' + limit + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest); - } - yield chunk; - } - } - responseStream = stream.Readable.from(enforceMaxContentLength(), { - objectMode: false - }); - } - response.data = responseStream; - settle(resolve, reject, response); - } else { - const responseBuffer = []; - let totalResponseBytes = 0; - responseStream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; - - // make sure the content length is not over the maxContentLength if specified - if (maxContentLength > -1 && totalResponseBytes > maxContentLength) { - // stream.destroy() emit aborted event before calling reject() on Node.js v16 - rejected = true; - responseStream.destroy(); - abort(new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); - } - }); - responseStream.on('aborted', function handlerStreamAborted() { - if (rejected) { - return; - } - const err = new AxiosError('stream has been aborted', AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response); - responseStream.destroy(err); - reject(err); - }); - responseStream.on('error', function handleStreamError(err) { - if (rejected) return; - reject(AxiosError.from(err, null, config, lastRequest, response)); - }); - responseStream.on('end', function handleStreamEnd() { - try { - let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (responseType !== 'arraybuffer') { - responseData = responseData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === 'utf8') { - responseData = utils$1.stripBOM(responseData); - } - } - response.data = responseData; - } catch (err) { - return reject(AxiosError.from(err, null, config, response.request, response)); - } - settle(resolve, reject, response); - }); - } - abortEmitter.once('abort', err => { - if (!responseStream.destroyed) { - responseStream.emit('error', err); - responseStream.destroy(); - } - }); - }); - abortEmitter.once('abort', err => { - if (req.close) { - req.close(); - } else { - req.destroy(err); - } - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - reject(AxiosError.from(err, null, config, req)); - }); - - // set tcp keep alive to prevent drop connection by peer - // Track every socket bound to this outer RedirectableRequest so a single - // 'close' listener can release ownership on all of them. follow-redirects - // re-emits the 'socket' event for each hop's native request onto the same - // outer request, so attaching per-request listeners inside this handler - // would accumulate across hops and trigger MaxListenersExceededWarning at - // >= 11 redirects. Clearing only the last-bound socket would leave stale - // kAxiosCurrentReq refs on earlier hop sockets returned to the keep-alive - // pool, causing an idle-pool 'error' to be attributed to a closed req. - const boundSockets = new Set(); - req.on('socket', function handleRequestSocket(socket) { - // default interval of sending ack packet is 1 minute - socket.setKeepAlive(true, 1000 * 60); - - // Install a single 'error' listener per socket (not per request) to avoid - // accumulating listeners on pooled keep-alive sockets that get reassigned - // to new requests before the previous request's 'close' fires (issue #10780). - // The listener is bound to the socket's currently-active request via a - // symbol, which is swapped as the socket is reassigned. - if (!socket[kAxiosSocketListener]) { - socket.on('error', function handleSocketError(err) { - const current = socket[kAxiosCurrentReq]; - if (current && !current.destroyed) { - current.destroy(err); - } - }); - socket[kAxiosSocketListener] = true; - } - socket[kAxiosCurrentReq] = req; - boundSockets.add(socket); - }); - req.once('close', function clearCurrentReq() { - clearConnectPhaseTimer(); - for (const socket of boundSockets) { - if (socket[kAxiosCurrentReq] === req) { - socket[kAxiosCurrentReq] = null; - } - } - boundSockets.clear(); - }); - - // Handle request timeout - if (own('timeout')) { - // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. - const timeout = parseInt(own('timeout'), 10); - if (Number.isNaN(timeout)) { - abort(new AxiosError('error trying to parse `config.timeout` to int', AxiosError.ERR_BAD_OPTION_VALUE, config, req)); - return; - } - const handleTimeout = function handleTimeout() { - if (isDone) return; - abort(createTimeoutError()); - }; - if (isNativeTransport && timeout > 0) { - // Native ClientRequest#setTimeout starts from the socket lifecycle and - // may not fire while TCP connect is still pending. Mirror the - // follow-redirects wall-clock timer for the maxRedirects === 0 path. - connectPhaseTimer = setTimeout(handleTimeout, timeout); - } - - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devouring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(timeout, handleTimeout); - } else { - // explicitly reset the socket timeout value for a possible `keep-alive` request - req.setTimeout(0); - } - - // Send the request - if (utils$1.isStream(data)) { - let ended = false; - let errored = false; - data.on('end', () => { - ended = true; - }); - data.once('error', err => { - errored = true; - req.destroy(err); - }); - data.on('close', () => { - if (!ended && !errored) { - abort(new CanceledError('Request stream has been aborted', config, req)); - } - }); - - // Enforce maxBodyLength for streamed uploads on every transport that - // does not apply options.maxBodyLength itself (native http/https, http2, - // and user-supplied custom transports). The follow-redirects transport - // enforces it on the redirected HTTP/1 path. - let uploadStream = data; - if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) { - const limit = maxBodyLength; - let bytesSent = 0; - uploadStream = stream.pipeline([data, new stream.Transform({ - transform(chunk, _enc, cb) { - bytesSent += chunk.length; - if (bytesSent > limit) { - return cb(new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, req)); - } - cb(null, chunk); - } - })], utils$1.noop); - uploadStream.on('error', err => { - if (!req.destroyed) req.destroy(err); - }); - } - uploadStream.pipe(req); - } else { - data && req.write(data); - req.end(); - } - }); -}; - -var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => url => { - url = new URL(url, platform.origin); - return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port); -})(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true; - -var cookies = platform.hasStandardBrowserEnv ? -// Standard browser envs support document.cookie -{ - write(name, value, expires, path, domain, secure, sameSite) { - if (typeof document === 'undefined') return; - const cookie = [`${name}=${encodeURIComponent(value)}`]; - if (utils$1.isNumber(expires)) { - cookie.push(`expires=${new Date(expires).toUTCString()}`); - } - if (utils$1.isString(path)) { - cookie.push(`path=${path}`); - } - if (utils$1.isString(domain)) { - cookie.push(`domain=${domain}`); - } - if (secure === true) { - cookie.push('secure'); - } - if (utils$1.isString(sameSite)) { - cookie.push(`SameSite=${sameSite}`); - } - document.cookie = cookie.join('; '); - }, - read(name) { - if (typeof document === 'undefined') return null; - // Match name=value by splitting on the semicolon separator instead of building a - // RegExp from `name` — interpolating an unescaped string into a RegExp would let - // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or - // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or - // "; ", so ignore optional whitespace before each cookie name. - const cookies = document.cookie.split(';'); - for (let i = 0; i < cookies.length; i++) { - const cookie = cookies[i].replace(/^\s+/, ''); - const eq = cookie.indexOf('='); - if (eq !== -1 && cookie.slice(0, eq) === name) { - return decodeURIComponent(cookie.slice(eq + 1)); - } - } - return null; - }, - remove(name) { - this.write(name, '', Date.now() - 86400000, '/'); - } -} : -// Non-standard browser env (web workers, react-native) lack needed support. -{ - write() {}, - read() { - return null; - }, - remove() {} -}; - -const headersToObject = thing => thing instanceof AxiosHeaders ? { - ...thing -} : thing; - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * - * @returns {Object} New object resulting from merging config2 to config1 - */ -function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - - // Use a null-prototype object so that downstream reads such as `config.auth` - // or `config.baseURL` cannot inherit polluted values from Object.prototype. - // `hasOwnProperty` is restored as a non-enumerable own slot to preserve - // ergonomics for user code that relies on it. - const config = Object.create(null); - Object.defineProperty(config, 'hasOwnProperty', { - // Null-proto descriptor so a polluted Object.prototype.get cannot turn - // this data descriptor into an accessor descriptor on the way in. - __proto__: null, - value: Object.prototype.hasOwnProperty, - enumerable: false, - writable: true, - configurable: true - }); - function getMergedValue(target, source, prop, caseless) { - if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { - return utils$1.merge.call({ - caseless - }, target, source); - } else if (utils$1.isPlainObject(source)) { - return utils$1.merge({}, source); - } else if (utils$1.isArray(source)) { - return source.slice(); - } - return source; - } - function mergeDeepProperties(a, b, prop, caseless) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(a, b, prop, caseless); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a, prop, caseless); - } - } - - // eslint-disable-next-line consistent-return - function valueFromConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } - } - - // eslint-disable-next-line consistent-return - function defaultToConfig2(a, b) { - if (!utils$1.isUndefined(b)) { - return getMergedValue(undefined, b); - } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a); - } - } - function getMergedTransitionalOption(prop) { - const transitional2 = utils$1.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined; - if (!utils$1.isUndefined(transitional2)) { - if (utils$1.isPlainObject(transitional2)) { - if (utils$1.hasOwnProp(transitional2, prop)) { - return transitional2[prop]; - } - } else { - return undefined; - } - } - const transitional1 = utils$1.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined; - if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) { - return transitional1[prop]; - } - return undefined; - } - - // eslint-disable-next-line consistent-return - function mergeDirectKeys(a, b, prop) { - if (utils$1.hasOwnProp(config2, prop)) { - return getMergedValue(a, b); - } else if (utils$1.hasOwnProp(config1, prop)) { - return getMergedValue(undefined, a); - } - } - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - allowedSocketPaths: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) - }; - utils$1.forEach(Object.keys({ - ...config1, - ...config2 - }), function computeConfigValue(prop) { - if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return; - const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; - const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined; - const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined; - const configValue = merge(a, b, prop); - utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); - }); - if (utils$1.hasOwnProp(config2, 'validateStatus') && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption('validateStatusUndefinedResolves') === false) { - if (utils$1.hasOwnProp(config1, 'validateStatus')) { - config.validateStatus = getMergedValue(undefined, config1.validateStatus); - } else { - delete config.validateStatus; - } - } - return config; -} - -const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; -function setFormDataHeaders(headers, formHeaders, policy) { - if (policy !== 'content-only') { - headers.set(formHeaders); - return; - } - Object.entries(formHeaders).forEach(([key, val]) => { - if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { - headers.set(key, val); - } - }); -} - -/** - * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). - * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. - * - * @param {string} str The string to encode - * - * @returns {string} UTF-8 bytes as a Latin-1 string - */ -const encodeUTF8$1 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); -function resolveConfig(config) { - const newConfig = mergeConfig({}, config); - - // Read only own properties to prevent prototype pollution gadgets - // (e.g. Object.prototype.baseURL = 'https://evil.com'). - const own = key => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined; - const data = own('data'); - let withXSRFToken = own('withXSRFToken'); - const xsrfHeaderName = own('xsrfHeaderName'); - const xsrfCookieName = own('xsrfCookieName'); - let headers = own('headers'); - const auth = own('auth'); - const baseURL = own('baseURL'); - const allowAbsoluteUrls = own('allowAbsoluteUrls'); - const url = own('url'); - newConfig.headers = headers = AxiosHeaders.from(headers); - newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own('params'), own('paramsSerializer')); - - // HTTP basic authentication - if (auth) { - const username = utils$1.getSafeProp(auth, 'username') || ''; - const password = utils$1.getSafeProp(auth, 'password') || ''; - headers.set('Authorization', 'Basic ' + btoa(username + ':' + (password ? encodeUTF8$1(password) : ''))); - } - if (utils$1.isFormData(data)) { - if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) { - headers.setContentType(undefined); // browser/web worker/RN handles it - } else if (utils$1.isFunction(data.getHeaders)) { - // Node.js FormData (like form-data package) - setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy')); - } - } - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - - if (platform.hasStandardBrowserEnv) { - if (utils$1.isFunction(withXSRFToken)) { - withXSRFToken = withXSRFToken(newConfig); - } - - // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) - // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking - // the XSRF token cross-origin. - const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url); - if (shouldSendXSRF) { - const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName); - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); - } - } - } - return newConfig; -} - -const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; -var xhrAdapter = isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig(config); - let requestData = _config.data; - const requestHeaders = AxiosHeaders.from(_config.headers).normalize(); - let { - responseType, - onUploadProgress, - onDownloadProgress - } = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - function done() { - flushUpload && flushUpload(); // flush events - flushDownload && flushDownload(); // flush events - - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - _config.signal && _config.signal.removeEventListener('abort', onCanceled); - } - let request = new XMLHttpRequest(); - request.open(_config.method.toUpperCase(), _config.url, true); - - // Set the request timeout in MS - request.timeout = _config.timeout; - function onloadend() { - if (!request) { - return; - } - // Prepare the response - const responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders()); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - - // Clean up request - request = null; - } - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith('file:'))) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); - done(); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError(event) { - // Browsers deliver a ProgressEvent in XHR onerror - // (message may be empty; when present, surface it) - // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event - const msg = event && event.message ? event.message : 'Network Error'; - const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request); - // attach the underlying event for consumers who want details - err.event = event || null; - reject(err); - done(); - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || transitionalDefaults; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)); - done(); - - // Clean up request - request = null; - }; - - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); - - // Add headers to the request - if ('setRequestHeader' in request) { - utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } - - // Add withCredentials to request if needed - if (!utils$1.isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } - - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } - - // Handle progress if needed - if (onDownloadProgress) { - [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); - request.addEventListener('progress', downloadThrottled); - } - - // Not all browsers support upload events - if (onUploadProgress && request.upload) { - [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); - request.upload.addEventListener('progress', uploadThrottled); - request.upload.addEventListener('loadend', flushUpload); - } - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); - request.abort(); - done(); - request = null; - }; - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); - } - } - const protocol = parseProtocol(_config.url); - if (protocol && !platform.protocols.includes(protocol)) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } - - // Send the request - request.send(requestData || null); - }); -}; - -const composeSignals = (signals, timeout) => { - signals = signals ? signals.filter(Boolean) : []; - if (!timeout && !signals.length) { - return; - } - const controller = new AbortController(); - let aborted = false; - const onabort = function (reason) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); - } - }; - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (!signals) { - return; - } - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort); - }); - signals = null; - }; - signals.forEach(signal => signal.addEventListener('abort', onabort)); - const { - signal - } = controller; - signal.unsubscribe = () => utils$1.asap(unsubscribe); - return signal; -}; - -const streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - if (len < chunkSize) { - yield chunk; - return; - } - let pos = 0; - let end; - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -}; -const readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -}; -const readStream = async function* (stream) { - if (stream[Symbol.asyncIterator]) { - yield* stream; - return; - } - const reader = stream.getReader(); - try { - for (;;) { - const { - done, - value - } = await reader.read(); - if (done) { - break; - } - yield value; - } - } finally { - await reader.cancel(); - } -}; -const trackStream = (stream, chunkSize, onProgress, onFinish) => { - const iterator = readBytes(stream, chunkSize); - let bytes = 0; - let done; - let _onFinish = e => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - }; - return new ReadableStream({ - async pull(controller) { - try { - const { - done, - value - } = await iterator.next(); - if (done) { - _onFinish(); - controller.close(); - return; - } - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); - } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; - } - }, - cancel(reason) { - _onFinish(reason); - return iterator.return(); - } - }, { - highWaterMark: 2 - }); -}; - -const DEFAULT_CHUNK_SIZE = 64 * 1024; -const { - isFunction -} = utils$1; - -/** - * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). - * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. - * - * @param {string} str The string to encode - * - * @returns {string} UTF-8 bytes as a Latin-1 string - */ -const encodeUTF8 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); - -// Node's WHATWG URL parser returns `username` and `password` percent-encoded. -// Decode before composing the `auth` option so credentials such as -// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the -// original value for malformed input so a bad encoding never throws. -const decodeURIComponentSafe = value => { - if (!utils$1.isString(value)) { - return value; - } - try { - return decodeURIComponent(value); - } catch (error) { - return value; - } -}; -const test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false; - } -}; -const maybeWithAuthCredentials = url => { - const protocolIndex = url.indexOf('://'); - let urlToCheck = url; - if (protocolIndex !== -1) { - urlToCheck = urlToCheck.slice(protocolIndex + 3); - } - return urlToCheck.includes('@') || urlToCheck.includes(':'); -}; -const factory = env => { - const globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis; - const { - ReadableStream, - TextEncoder - } = globalObject; - env = utils$1.merge.call({ - skipUndefined: true - }, { - Request: globalObject.Request, - Response: globalObject.Response - }, env); - const { - fetch: envFetch, - Request, - Response - } = env; - const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; - const isRequestSupported = isFunction(Request); - const isResponseSupported = isFunction(Response); - if (!isFetchSupported) { - return false; - } - const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); - const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? (encoder => str => encoder.encode(str))(new TextEncoder()) : async str => new Uint8Array(await new Request(str).arrayBuffer())); - const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { - let duplexAccessed = false; - const request = new Request(platform.origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; - } - }); - const hasContentType = request.headers.has('Content-Type'); - if (request.body != null) { - request.body.cancel(); - } - return duplexAccessed && !hasContentType; - }); - const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response('').body)); - const resolvers = { - stream: supportsResponseStream && (res => res.body) - }; - isFetchSupported && (() => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = (res, config) => { - let method = res && res[type]; - if (method) { - return method.call(res); - } - throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); - }); - }); - })(); - const getBodyLength = async body => { - if (body == null) { - return 0; - } - if (utils$1.isBlob(body)) { - return body.size; - } - if (utils$1.isSpecCompliantForm(body)) { - const _request = new Request(platform.origin, { - method: 'POST', - body - }); - return (await _request.arrayBuffer()).byteLength; - } - if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { - return body.byteLength; - } - if (utils$1.isURLSearchParams(body)) { - body = body + ''; - } - if (utils$1.isString(body)) { - return (await encodeText(body)).byteLength; - } - }; - const resolveBodyLength = async (headers, body) => { - const length = utils$1.toFiniteNumber(headers.getContentLength()); - return length == null ? getBodyLength(body) : length; - }; - return async config => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions, - maxContentLength, - maxBodyLength - } = resolveConfig(config); - const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1; - const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1; - const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined; - let _fetch = envFetch || fetch; - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout); - let request = null; - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - let requestContentLength; - - // AxiosError we raise while the request body is being streamed. Captured - // by identity so the catch block can surface it directly, regardless of - // how the runtime wraps the resulting fetch rejection (undici exposes it - // as `err.cause`; some browsers drop the original error entirely). - let pendingBodyError = null; - const maxBodyLengthError = () => new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, request); - try { - // HTTP basic authentication - let auth = undefined; - const configAuth = own('auth'); - if (configAuth) { - const username = utils$1.getSafeProp(configAuth, 'username') || ''; - const password = utils$1.getSafeProp(configAuth, 'password') || ''; - auth = { - username, - password - }; - } - if (maybeWithAuthCredentials(url)) { - const parsedURL = new URL(url, platform.origin); - if (!auth && (parsedURL.username || parsedURL.password)) { - const urlUsername = decodeURIComponentSafe(parsedURL.username); - const urlPassword = decodeURIComponentSafe(parsedURL.password); - auth = { - username: urlUsername, - password: urlPassword - }; - } - if (parsedURL.username || parsedURL.password) { - parsedURL.username = ''; - parsedURL.password = ''; - url = parsedURL.href; - } - } - if (auth) { - headers.delete('authorization'); - headers.set('Authorization', 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))); - } - - // Enforce maxContentLength for data: URLs up-front so we never materialize - // an oversized payload. The HTTP adapter applies the same check (see http.js - // "if (protocol === 'data:')" branch). - if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) { - const estimated = estimateDataURLDecodedBytes(url); - if (estimated > maxContentLength) { - throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); - } - } - - // Enforce maxBodyLength against known-size bodies before dispatch using - // the body's *actual* size — never a caller-declared Content-Length, - // which could under-report to slip an oversized body past the check. - // Unknown-size streams return undefined here and are counted per-chunk - // below as fetch consumes them. - if (hasMaxBodyLength && method !== 'get' && method !== 'head') { - const outboundLength = await getBodyLength(data); - if (typeof outboundLength === 'number' && isFinite(outboundLength)) { - requestContentLength = outboundLength; - if (outboundLength > maxBodyLength) { - throw maxBodyLengthError(); - } - } - } - - // A streamed body under maxBodyLength must be counted as fetch consumes - // it; its size is never trusted from a caller-declared Content-Length. - const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data)); - const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, loadedBytes => { - if (hasMaxBodyLength && loadedBytes > maxBodyLength) { - throw pendingBodyError = maxBodyLengthError(); - } - onProgress && onProgress(loadedBytes); - }, flush); - if (supportsRequestStream && method !== 'get' && method !== 'head' && (onUploadProgress || mustEnforceStreamBody)) { - requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength; - - // A declared length of 0 is only trusted to skip the wrap when we are - // not enforcing a stream limit (which must not rely on that header). - if (requestContentLength !== 0 || mustEnforceStreamBody) { - let _request = new Request(url, { - method: 'POST', - body: data, - duplex: 'half' - }); - let contentTypeHeader; - if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader); - } - if (_request.body) { - const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || []; - data = trackRequestStream(_request.body, onProgress, flush); - } - } - } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== 'get' && method !== 'head') { - data = trackRequestStream(data); - } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== 'get' && method !== 'head') { - throw new AxiosError('Stream request bodies are not supported by the current fetch implementation', AxiosError.ERR_NOT_SUPPORT, config, request); - } - if (!utils$1.isString(withCredentials)) { - withCredentials = withCredentials ? 'include' : 'omit'; - } - - // Cloudflare Workers throws when credentials are defined - // see https://github.com/cloudflare/workerd/issues/902 - const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; - - // If data is FormData and Content-Type is multipart/form-data without boundary, - // delete it so fetch can set it correctly with the boundary - if (utils$1.isFormData(data)) { - const contentType = headers.getContentType(); - if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) { - headers.delete('content-type'); - } - } - - // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) - headers.set('User-Agent', 'axios/' + VERSION, false); - const resolvedOptions = { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: toByteStringHeaderObject(headers.normalize()), - body: data, - duplex: 'half', - credentials: isCredentialsSupported ? withCredentials : undefined - }; - request = isRequestSupported && new Request(url, resolvedOptions); - let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions)); - const responseHeaders = AxiosHeaders.from(response.headers); - - // Cheap pre-check: if the server honestly declares a content-length that - // already exceeds the cap, reject before we start streaming. - if (hasMaxContentLength) { - const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); - if (declaredLength != null && declaredLength > maxContentLength) { - throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); - } - } - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); - if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) { - const options = {}; - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; - }); - const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); - const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || []; - let bytesRead = 0; - const onChunkProgress = loadedBytes => { - if (hasMaxContentLength) { - bytesRead = loadedBytes; - if (bytesRead > maxContentLength) { - throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); - } - } - onProgress && onProgress(loadedBytes); - }; - response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), options); - } - responseType = responseType || 'text'; - let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); - - // Fallback enforcement for environments without ReadableStream support - // (legacy runtimes). Detect materialized size from typed output; skip - // streams/Response passthrough since the user will read those themselves. - if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { - let materializedSize; - if (responseData != null) { - if (typeof responseData.byteLength === 'number') { - materializedSize = responseData.byteLength; - } else if (typeof responseData.size === 'number') { - materializedSize = responseData.size; - } else if (typeof responseData === 'string') { - materializedSize = typeof TextEncoder === 'function' ? new TextEncoder().encode(responseData).byteLength : responseData.length; - } - } - if (typeof materializedSize === 'number' && materializedSize > maxContentLength) { - throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); - } - } - !isStreamResponse && unsubscribe && unsubscribe(); - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request - }); - }); - } catch (err) { - unsubscribe && unsubscribe(); - - // Safari can surface fetch aborts as a DOMException-like object whose - // branded getters throw. Prefer our composed signal reason before reading - // the caught error, preserving timeout vs cancellation semantics. - if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) { - const canceledError = composedSignal.reason; - canceledError.config = config; - request && (canceledError.request = request); - err !== canceledError && (canceledError.cause = err); - throw canceledError; - } - - // Surface a maxBodyLength violation we raised while the request body was - // being streamed. Matching by identity (rather than reading - // `err.cause.isAxiosError`) keeps the error deterministic across runtimes - // and avoids both prototype-pollution reads and mis-attributing a foreign - // AxiosError that merely happened to land in `err.cause`. - if (pendingBodyError) { - request && !pendingBodyError.request && (pendingBodyError.request = request); - throw pendingBodyError; - } - - // Re-throw AxiosErrors we raised synchronously (data: URL / content-length - // pre-checks, response size enforcement) without re-wrapping them. - if (err instanceof AxiosError) { - request && !err.request && (err.request = request); - throw err; - } - if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { - throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, err && err.response), { - cause: err.cause || err - }); - } - throw AxiosError.from(err, err && err.code, config, request, err && err.response); - } - }; -}; -const seedCache = new Map(); -const getFetch = config => { - let env = config && config.env || {}; - const { - fetch, - Request, - Response - } = env; - const seeds = [Request, Response, fetch]; - let len = seeds.length, - i = len, - seed, - target, - map = seedCache; - while (i--) { - seed = seeds[i]; - target = map.get(seed); - target === undefined && map.set(seed, target = i ? new Map() : factory(env)); - map = target; - } - return target; -}; -getFetch(); - -/** - * Known adapters mapping. - * Provides environment-specific adapters for Axios: - * - `http` for Node.js - * - `xhr` for browsers - * - `fetch` for fetch API-based requests - * - * @type {Object} - */ -const knownAdapters = { - http: httpAdapter, - xhr: xhrAdapter, - fetch: { - get: getFetch - } -}; - -// Assign adapter names for easier debugging and identification -utils$1.forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - // Null-proto descriptors so a polluted Object.prototype.get cannot turn - // these data descriptors into accessor descriptors on the way in. - Object.defineProperty(fn, 'name', { - __proto__: null, - value - }); - } catch (e) { - // eslint-disable-next-line no-empty - } - Object.defineProperty(fn, 'adapterName', { - __proto__: null, - value - }); - } -}); - -/** - * Render a rejection reason string for unknown or unsupported adapters - * - * @param {string} reason - * @returns {string} - */ -const renderReason = reason => `- ${reason}`; - -/** - * Check if the adapter is resolved (function, null, or false) - * - * @param {Function|null|false} adapter - * @returns {boolean} - */ -const isResolvedHandle = adapter => utils$1.isFunction(adapter) || adapter === null || adapter === false; - -/** - * Get the first suitable adapter from the provided list. - * Tries each adapter in order until a supported one is found. - * Throws an AxiosError if no adapter is suitable. - * - * @param {Array|string|Function} adapters - Adapter(s) by name or function. - * @param {Object} config - Axios request configuration - * @throws {AxiosError} If no suitable adapter is available - * @returns {Function} The resolved adapter function - */ -function getAdapter(adapters, config) { - adapters = utils$1.isArray(adapters) ? adapters : [adapters]; - const { - length - } = adapters; - let nameOrAdapter; - let adapter; - const rejectedReasons = {}; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - adapter = nameOrAdapter; - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - if (adapter === undefined) { - throw new AxiosError(`Unknown adapter '${id}'`); - } - } - if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { - break; - } - rejectedReasons[id || '#' + i] = adapter; - } - if (!adapter) { - const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build')); - let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified'; - throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, 'ERR_NOT_SUPPORT'); - } - return adapter; -} - -/** - * Exports Axios adapters and utility to resolve an adapter - */ -var adapters = { - /** - * Resolve an adapter from a list of adapter names or functions. - * @type {Function} - */ - getAdapter, - /** - * Exposes all known adapters - * @type {Object} - */ - adapters: knownAdapters -}; - -/** - * Throws a `CanceledError` if cancellation has been requested. - * - * @param {Object} config The config that is to be used for the request - * - * @returns {void} - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - if (config.signal && config.signal.aborted) { - throw new CanceledError(null, config); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * - * @returns {Promise} The Promise to be fulfilled - */ -function dispatchRequest(config) { - throwIfCancellationRequested(config); - config.headers = AxiosHeaders.from(config.headers); - - // Transform request data - config.data = transformData.call(config, config.transformRequest); - if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { - config.headers.setContentType('application/x-www-form-urlencoded', false); - } - const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Expose the current response on config so that transformResponse can - // attach it to any AxiosError it throws (e.g. on JSON parse failure). - // We clean it up afterwards to avoid polluting the config object. - config.response = response; - try { - response.data = transformData.call(config, config.transformResponse, response); - } finally { - delete config.response; - } - response.headers = AxiosHeaders.from(response.headers); - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - config.response = reason.response; - try { - reason.response.data = transformData.call(config, config.transformResponse, reason.response); - } finally { - delete config.response; - } - reason.response.headers = AxiosHeaders.from(reason.response.headers); - } - } - return Promise.reject(reason); - }); -} - -const validators$1 = {}; - -// eslint-disable-next-line func-names -['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { - validators$1[type] = function validator(thing) { - return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; - }; -}); -const deprecatedWarnings = {}; - -/** - * Transitional option validator - * - * @param {function|boolean?} validator - set to false if the transitional option has been removed - * @param {string?} version - deprecated version / removed since version - * @param {string?} message - some message with additional info - * - * @returns {function} - */ -validators$1.transitional = function transitional(validator, version, message) { - function formatMessage(opt, desc) { - return '[Axios v' + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : ''); - } - - // eslint-disable-next-line func-names - return (value, opt, opts) => { - if (validator === false) { - throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED); - } - if (version && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - // eslint-disable-next-line no-console - console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future')); - } - return validator ? validator(value, opt, opts) : true; - }; -}; -validators$1.spelling = function spelling(correctSpelling) { - return (value, opt) => { - // eslint-disable-next-line no-console - console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); - return true; - }; -}; - -/** - * Assert object's properties type - * - * @param {object} options - * @param {object} schema - * @param {boolean?} allowUnknown - * - * @returns {object} - */ - -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - // Use hasOwnProperty so a polluted Object.prototype. cannot supply - // a non-function validator and cause a TypeError. - const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; - if (validator) { - const value = options[opt]; - const result = value === undefined || validator(value, opt, options); - if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); - } - } -} -var validator = { - assertOptions, - validators: validators$1 -}; - -const validators = validator.validators; - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - * - * @return {Axios} A new instance of Axios - */ -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig || {}; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; - } - - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - async request(configOrUrl, config) { - try { - return await this._request(configOrUrl, config); - } catch (err) { - if (err instanceof Error) { - let dummy = {}; - Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); - - // slice off the Error: ... line - const stack = (() => { - if (!dummy.stack) { - return ''; - } - const firstNewlineIndex = dummy.stack.indexOf('\n'); - return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1); - })(); - try { - if (!err.stack) { - err.stack = stack; - // match without the 2 top stack lines - } else if (stack) { - const firstNewlineIndex = stack.indexOf('\n'); - const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1); - const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1); - if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) { - err.stack += '\n' + stack; - } - } - } catch (e) { - // ignore the case where "stack" is an un-writable property - } - } - throw err; - } - } - _request(configOrUrl, config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof configOrUrl === 'string') { - config = config || {}; - config.url = configOrUrl; - } else { - config = configOrUrl || {}; - } - config = mergeConfig(this.defaults, config); - const { - transitional, - paramsSerializer, - headers - } = config; - if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean), - legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), - advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), - validateStatusUndefinedResolves: validators.transitional(validators.boolean) - }, false); - } - if (paramsSerializer != null) { - if (utils$1.isFunction(paramsSerializer)) { - config.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - } - - // Set config.allowAbsoluteUrls - if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { - config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; - } else { - config.allowAbsoluteUrls = true; - } - validator.assertOptions(config, { - baseUrl: validators.spelling('baseURL'), - withXsrfToken: validators.spelling('withXSRFToken') - }, true); - - // Set config.method - config.method = (config.method || this.defaults.method || 'get').toLowerCase(); - - // Flatten headers - let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]); - headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], method => { - delete headers[method]; - }); - config.headers = AxiosHeaders.concat(contextHeaders, headers); - - // filter out skipped interceptors - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { - return; - } - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - const transitional = config.transitional || transitionalDefaults; - const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering; - if (legacyInterceptorReqResOrdering) { - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - } else { - requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - } - }); - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - let promise; - let i = 0; - let len; - if (!synchronousRequestInterceptors) { - const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift(...requestInterceptorChain); - chain.push(...responseInterceptorChain); - len = chain.length; - promise = Promise.resolve(config); - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - return promise; - } - len = requestInterceptorChain.length; - let newConfig = config; - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error) { - onRejected.call(this, error); - break; - } - } - try { - promise = dispatchRequest.call(this, newConfig); - } catch (error) { - return Promise.reject(error); - } - i = 0; - len = responseInterceptorChain.length; - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - return promise; - } - getUri(config) { - config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); - return buildURL(fullPath, config.params, config.paramsSerializer); - } -} - -// Provide aliases for supported request methods -utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function (url, config) { - return this.request(mergeConfig(config || {}, { - method, - url, - data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined - })); - }; -}); -utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { - function generateHTTPMethod(isForm) { - return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); - }; - } - Axios.prototype[method] = generateHTTPMethod(); - - // QUERY is a safe/idempotent read method; multipart form bodies don't fit - // its semantics, so no queryForm shorthand is generated. - if (method !== 'query') { - Axios.prototype[method + 'Form'] = generateHTTPMethod(true); - } -}); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @param {Function} executor The executor function. - * - * @returns {CancelToken} - */ -class CancelToken { - constructor(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - let resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - const token = this; - - // eslint-disable-next-line func-names - this.promise.then(cancel => { - if (!token._listeners) return; - let i = token._listeners.length; - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - - // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { - let _resolve; - // eslint-disable-next-line func-names - const promise = new Promise(resolve => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - return promise; - }; - executor(function cancel(message, config, request) { - if (token.reason) { - // Cancellation has already been requested - return; - } - token.reason = new CanceledError(message, config, request); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - - /** - * Subscribe to the cancel signal - */ - - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - - /** - * Unsubscribe from the cancel signal - */ - - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - toAbortSignal() { - const controller = new AbortController(); - const abort = err => { - controller.abort(err); - }; - this.subscribe(abort); - controller.signal.unsubscribe = () => this.unsubscribe(abort); - return controller.signal; - } - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * const args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * - * @returns {Function} - */ -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} - -/** - * Determines whether the payload is an error thrown by Axios - * - * @param {*} payload The value to test - * - * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false - */ -function isAxiosError(payload) { - return utils$1.isObject(payload) && payload.isAxiosError === true; -} - -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, - WebServerIsDown: 521, - ConnectionTimedOut: 522, - OriginIsUnreachable: 523, - TimeoutOccurred: 524, - SslHandshakeFailed: 525, - InvalidSslCertificate: 526 -}; -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * - * @returns {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - const context = new Axios(defaultConfig); - const instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils$1.extend(instance, Axios.prototype, context, { - allOwnKeys: true - }); - - // Copy context to instance - utils$1.extend(instance, context, null, { - allOwnKeys: true - }); - - // Factory for creating new instances - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - return instance; -} - -// Create the default instance to be exported -const axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Expose Cancel & CancelToken -axios.CanceledError = CanceledError; -axios.CancelToken = CancelToken; -axios.isCancel = isCancel; -axios.VERSION = VERSION; -axios.toFormData = toFormData; - -// Expose AxiosError class -axios.AxiosError = AxiosError; - -// alias for CanceledError for backward compatibility -axios.Cancel = axios.CanceledError; - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = spread; - -// Expose isAxiosError -axios.isAxiosError = isAxiosError; - -// Expose mergeConfig -axios.mergeConfig = mergeConfig; -axios.AxiosHeaders = AxiosHeaders; -axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); -axios.getAdapter = adapters.getAdapter; -axios.HttpStatusCode = HttpStatusCode; -axios.default = axios; - -module.exports = axios; -//# sourceMappingURL=axios.cjs.map - - -/***/ }), - -/***/ 1699: -/***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ IR: () => (/* binding */ parseExportedObjectsInFile), -/* harmony export */ NV: () => (/* binding */ checkIndexFileExists), -/* harmony export */ YG: () => (/* binding */ regexExportedInternal), -/* harmony export */ ZY: () => (/* binding */ exportAllInBarrel), -/* harmony export */ aS: () => (/* binding */ parseTypeDefinitionFiles), -/* harmony export */ ad: () => (/* binding */ parseBarrelFile), -/* harmony export */ gw: () => (/* binding */ parseIndexFile), -/* harmony export */ i8: () => (/* binding */ checkApiOfPackage), -/* harmony export */ le: () => (/* binding */ checkBarrelRecursive), -/* harmony export */ qc: () => (/* binding */ typeDescriptorPaths), -/* harmony export */ tk: () => (/* binding */ regexExportedIndex) -/* harmony export */ }); -/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(6760); -/* harmony import */ var node_fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(1455); -/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(8161); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(9337); -/* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(8847); -/* harmony import */ var _sap_cloud_sdk_util__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(2343); -/* harmony import */ var _sap_cloud_sdk_generator_common_dist_compiler_js__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(6435); -/* harmony import */ var _sap_cloud_sdk_generator_common_dist_file_writer_create_file_js__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(4400); -/* harmony import */ var _manypkg_get_packages__WEBPACK_IMPORTED_MODULE_8__ = __nccwpck_require__(4344); -/* eslint-disable jsdoc/require-jsdoc */ - - - - - - -// import directly from the files to avoid importing non-esm compatible functionality (e.g. __dirname) - -// eslint-disable-next-line import-x/no-internal-modules - - -const pathToTsConfigRoot = (0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(process.cwd(), 'tsconfig.json'); -const regexExportedIndex = /export(?:type)?\{([\w,]+)\}from'\./g; -const regexExportedInternal = /\.\/([\w-]+)/g; -function paths(pathToPackage) { - return { - pathToSource: getPathWithPosixSeparator((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(pathToPackage, 'src')), - pathToPackageJson: getPathWithPosixSeparator((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(pathToPackage, 'package.json')), - pathToTsConfig: getPathWithPosixSeparator((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(pathToPackage, 'tsconfig.json')), - pathToNodeModules: getPathWithPosixSeparator((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(pathToPackage, 'node_modules')) - }; -} -function getPathWithPosixSeparator(filePath) { - return filePath.split(node_path__WEBPACK_IMPORTED_MODULE_0__.sep).join(node_path__WEBPACK_IMPORTED_MODULE_0__.posix.sep); -} -/** - * Read the compiler options from the root and cwd tsconfig.json. - * @param pathToPackage - Path to the package under investigation. - * @param pathCompiled - Path to the output directory for compiled files. - * @returns The compiler options. - */ -async function getCompilerOptions(pathToPackage, pathCompiled) { - const { pathToSource, pathToTsConfig } = paths(pathToPackage); - const compilerOptions = await (0,_sap_cloud_sdk_generator_common_dist_compiler_js__WEBPACK_IMPORTED_MODULE_6__/* .readCompilerOptions */ .q1)(pathToTsConfig); - const compilerOptionsRoot = await (0,_sap_cloud_sdk_generator_common_dist_compiler_js__WEBPACK_IMPORTED_MODULE_6__/* .readCompilerOptions */ .q1)(pathToTsConfigRoot); - return { - ...compilerOptionsRoot, - ...compilerOptions, - stripInternal: true, - rootDir: pathToSource, - outDir: pathCompiled - }; -} -function getListFromInput(inputKey) { - const input = (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .getInput */ .V4)(inputKey); - return input ? input.split(',').map(item => item.trim()) : []; -} -/** - * Here the two sets: exports from index and exports from .d.ts are compared and logs are created. - * @param allExportedIndex - Names of the object imported by the index.ts. - * @param allExportedTypes - Exported object by the .d.ts files. - * @returns True if the two sets export the same objects. - */ -function compareApisAndLog(allExportedIndex, allExportedTypes) { - let setsAreEqual = true; - const ignoredPathPattern = (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .getInput */ .V4)('ignored_path_pattern'); - allExportedTypes.forEach(exportedType => { - const normalizedPath = getPathWithPosixSeparator(exportedType.path); - const isPathMatched = ignoredPathPattern - ? new RegExp(ignoredPathPattern).test(normalizedPath) - : false; - if (!allExportedIndex.find(nameInIndex => exportedType.name === nameInIndex)) { - if (isPathMatched) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .warning */ .$e)(`The ${exportedType.type} "${exportedType.name}" in file: ${exportedType.path} is not exported in the index.ts.`); - return; - } - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`The ${exportedType.type} "${exportedType.name}" in file: ${exportedType.path} is neither listed in the index.ts nor marked as internal.`); - setsAreEqual = false; - } - }); - allExportedIndex.forEach(nameInIndex => { - if (!allExportedTypes.find(exportedType => exportedType.name === nameInIndex)) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`The object "${nameInIndex}" is exported from the index.ts but marked as @internal.`); - setsAreEqual = false; - } - }); - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .info */ .pq)(`We have found ${allExportedIndex.length} exports.`); - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .info */ .pq)(`Public api: ${allExportedIndex.sort().join(',\n')}`); - return setsAreEqual; -} -/** - * Executes the public API check for a given package. - * @param pathToPackage - Path to the package. - */ -async function checkApiOfPackage(pathToPackage) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .info */ .pq)(`Check package: ${pathToPackage}`); - const { pathToSource, pathToTsConfig } = paths(pathToPackage); - const pathCompiled = await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.mkdtemp)((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)((0,node_os__WEBPACK_IMPORTED_MODULE_2__.tmpdir)(), 'check-public-api-')); - try { - const opts = await getCompilerOptions(pathToPackage, pathCompiled); - const includeExclude = await (0,_sap_cloud_sdk_generator_common_dist_compiler_js__WEBPACK_IMPORTED_MODULE_6__/* .readIncludeExcludeWithDefaults */ .JA)(pathToTsConfig); - await (0,_sap_cloud_sdk_generator_common_dist_compiler_js__WEBPACK_IMPORTED_MODULE_6__/* .transpileDirectory */ .uu)(pathToSource, { - compilerOptions: opts, - // We have things in our sources like `#!/usr/bin/env node` in CLI `.js` files which is not working with parser of prettier. - createFileOptions: { - overwrite: true, - prettierOptions: _sap_cloud_sdk_generator_common_dist_file_writer_create_file_js__WEBPACK_IMPORTED_MODULE_7__.defaultPrettierConfig, - usePrettier: false - } - }, { - exclude: includeExclude ? includeExclude.exclude : [], - include: ['**/*.ts'] - }); - const forceInternalExports = (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .getInput */ .V4)('force_internal_exports') === 'true'; - if (forceInternalExports) { - await checkBarrelRecursive(pathToSource); - } - const indexFilePath = (0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(pathToSource, 'index.ts'); - await checkIndexFileExists(indexFilePath); - const allExportedTypes = await parseTypeDefinitionFiles(pathCompiled); - const allExportedIndex = await parseIndexFile(indexFilePath, forceInternalExports); - const setsAreEqual = compareApisAndLog(allExportedIndex, allExportedTypes); - if (!setsAreEqual) { - process.exit(1); - } - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .info */ .pq)(`The index.ts of package ${pathToPackage} is in sync with the type annotations.\n`); - } - finally { - await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.rm)(pathCompiled, { recursive: true, force: true }); - } -} -async function checkIndexFileExists(indexFilePath) { - const isFile = await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.lstat)(indexFilePath) - .then(stat => stat.isFile()) - .catch(() => false); - if (!isFile) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`No index.ts file found in ${(0,node_path__WEBPACK_IMPORTED_MODULE_0__.dirname)(indexFilePath)}.`); - } -} -/** - * Get the paths of all `.d.ts` files. - * @param cwd - Directory which is scanned for type definitions. - * @returns Paths to the `.d.ts` files excluding `index.d.ts` files. - */ -async function typeDescriptorPaths(cwd) { - const files = await (0,glob__WEBPACK_IMPORTED_MODULE_3__/* .glob */ .TI)('**/*.d.ts', { cwd }); - return files - .filter(file => !file.endsWith('index.d.ts')) - .map(file => (0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(cwd, file)); -} -/** - * Execute the parseTypeDefinitionFile for all files in the cwd. - * @param pathCompiled - Path to the compiled sources containing the .d.ts files. - * @returns Information on the exported objects. - */ -async function parseTypeDefinitionFiles(pathCompiled) { - const typeDefinitionPaths = await typeDescriptorPaths(pathCompiled); - const result = await Promise.all(typeDefinitionPaths.map(async (pathTypeDefinition) => { - const fileContent = await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile)(pathTypeDefinition, 'utf8'); - const types = parseExportedObjectsInFile(fileContent); - return types.map(type => ({ path: pathTypeDefinition, ...type })); - })); - return (0,_sap_cloud_sdk_util__WEBPACK_IMPORTED_MODULE_5__.flatten)(result); -} -/** - * Parses a '.d.ts' or '.ts' file for the exported objects in it. - * @param fileContent - Content of the file to be processed. - * @returns List of exported object. - */ -function parseExportedObjectsInFile(fileContent) { - const normalized = fileContent.replace(/\n+/g, ''); - return [ - 'function', - 'const', - 'enum', - 'class', - 'abstract class', - 'type', - 'interface' - ].reduce((allObjects, objectType) => { - const regex = objectType === 'interface' - ? new RegExp(`export ${objectType} (\\w+)`, 'g') - : new RegExp(`export (?:declare )?${objectType} (\\w+)`, 'g'); - const exported = captureGroupsFromGlobalRegex(regex, normalized).map(element => ({ name: element, type: objectType })); - return [...allObjects, ...exported]; - }, []); -} -/** - * Parse a barrel file for the exported objects. - * It selects all string in \{\} e.g. export \{a,b,c\} from './xyz' will result in [a,b,c]. - * Aliases defined with 'as' keyword are removed. - * @param fileContent - Content of the index file to be parsed. - * @param regex - Regular expression used for matching exports. - * @returns List of objects exported by the given index file. - */ -function parseBarrelFile(fileContent, regex) { - // Remove block comments, single-line comments, 'as' keyword and aliases, and whitespace characters - const normalized = fileContent.replace(/\/\*[\s\S]*?\*\/|\/\/.*|[\s]+as[\s]+[a-zA-Z_$][0-9a-zA-Z_$]*|[\s]+/g, ''); - const groups = captureGroupsFromGlobalRegex(regex, normalized); - return (0,_sap_cloud_sdk_util__WEBPACK_IMPORTED_MODULE_5__.flatten)(groups.map(group => group.split(','))); -} -function checkInternalReExports(fileContent, filePath) { - const internalReExports = parseBarrelFile(fileContent, /\{([\w,]+)\}from'.*\/internal'/g); - if (internalReExports.length) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`Re-exporting internal modules is not allowed. ${internalReExports - .map(reExport => `'${reExport}'`) - .join(', ')} exported in '${filePath}'.`); - } -} -async function parseIndexFile(filePath, forceInternalExports) { - const cwd = (0,node_path__WEBPACK_IMPORTED_MODULE_0__.dirname)(filePath); - const fileContent = await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile)(filePath, 'utf-8'); - checkInternalReExports(fileContent, filePath); - const localExports = forceInternalExports - ? parseBarrelFile(fileContent, regexExportedIndex) - : [ - ...parseBarrelFile(fileContent, regexExportedIndex), - ...parseExportedObjectsInFile(fileContent).map(obj => obj.name) - ]; - const starFiles = captureGroupsFromGlobalRegex(/export \* from '([\w/.-]+)'/g, fileContent); - const starFileExports = await Promise.all(starFiles.map(async (relativeFilePath) => { - const absolutePath = relativeFilePath.endsWith('.js') - ? (0,node_path__WEBPACK_IMPORTED_MODULE_0__.resolve)(cwd, `${relativeFilePath.slice(0, -3)}.ts`) - : (0,node_path__WEBPACK_IMPORTED_MODULE_0__.resolve)(cwd, `${relativeFilePath}.ts`); - return parseIndexFile(absolutePath, forceInternalExports); - })); - return [...localExports, ...starFileExports.flat()]; -} -function captureGroupsFromGlobalRegex(regex, str) { - const groups = Array.from(str.matchAll(regex)); - return groups.map(group => group[1]); -} -async function checkBarrelRecursive(cwd) { - (await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.readdir)(cwd, { withFileTypes: true })) - .filter(dirent => dirent.isDirectory()) - .forEach(async (subDir) => { - if (subDir.name !== '__snapshots__') { - await checkBarrelRecursive((0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(cwd, subDir.name)); - } - }); - await exportAllInBarrel(cwd, (0,node_path__WEBPACK_IMPORTED_MODULE_0__.parse)(cwd).name === 'src' ? 'internal.ts' : 'index.ts'); -} -async function exportAllInBarrel(cwd, barrelFileName) { - const barrelFilePath = (0,node_path__WEBPACK_IMPORTED_MODULE_0__.join)(cwd, barrelFileName); - if (await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.lstat)(barrelFilePath) - .then(stat => stat.isFile()) - .catch(() => false)) { - const dirContents = (await (0,glob__WEBPACK_IMPORTED_MODULE_3__/* .glob */ .TI)('*', { - ignore: [ - '**/*.spec.ts', - '__snapshots__', - 'internal.ts', - 'index.ts', - 'cli.ts', - '**/*.md' - ], - cwd - })).map(name => (0,node_path__WEBPACK_IMPORTED_MODULE_0__.basename)(name, '.ts')); - const exportedFiles = parseBarrelFile(await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_1__.readFile)(barrelFilePath, 'utf8'), regexExportedInternal); - if (compareBarrels(dirContents, exportedFiles, barrelFilePath)) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`'${barrelFileName}' is not in sync.`); - } - } - else { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`No '${barrelFileName}' file found in '${cwd}'.`); - } -} -function compareBarrels(dirContents, exportedFiles, barrelFilePath) { - const missingBarrelExports = dirContents.filter(x => !exportedFiles.includes(x)); - missingBarrelExports.forEach(tsFiles => (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`'${tsFiles}' is not exported in '${barrelFilePath}'.`)); - const extraBarrelExports = exportedFiles.filter(x => !dirContents.includes(x)); - extraBarrelExports.forEach(exports => (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .error */ .z3)(`'${exports}' is exported from the '${barrelFilePath}' but does not exist in this directory.`)); - return missingBarrelExports.length || extraBarrelExports.length; -} -async function runCheckApi() { - const { packages } = await (0,_manypkg_get_packages__WEBPACK_IMPORTED_MODULE_8__.getPackages)(process.cwd()); - const excludedPackages = getListFromInput('excluded_packages'); - const packagesToCheck = packages.filter(pkg => pkg.relativeDir.startsWith('packages') && - !excludedPackages.some(excl => pkg.relativeDir.includes(excl))); - for (const pkg of packagesToCheck) { - try { - await checkApiOfPackage(pkg.dir); - } - catch (e) { - (0,_actions_core__WEBPACK_IMPORTED_MODULE_4__/* .setFailed */ .C1)(`API check failed for ${pkg.relativeDir}: ${e}`); - process.exit(1); - } - } -} -if (import.meta.url === `file://${process.argv[1]}`) { - await runCheckApi(); -} - -__webpack_async_result__(); -} catch(e) { __webpack_async_result__(e); } }, 1); - -/***/ }), - -/***/ 8847: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - z3: () => (/* binding */ error), - V4: () => (/* binding */ getInput), - pq: () => (/* binding */ info), - C1: () => (/* binding */ setFailed), - $e: () => (/* binding */ warning) -}); - -// UNUSED EXPORTS: ExitCode, addPath, debug, endGroup, exportVariable, getBooleanInput, getIDToken, getMultilineInput, getState, group, isDebug, markdownSummary, notice, platform, saveState, setCommandEcho, setOutput, setSecret, startGroup, summary, toPlatformPath, toPosixPath, toWin32Path - -// EXTERNAL MODULE: external "os" -var external_os_ = __nccwpck_require__(857); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -// EXTERNAL MODULE: external "crypto" -var external_crypto_ = __nccwpck_require__(6982); -// EXTERNAL MODULE: external "fs" -var external_fs_ = __nccwpck_require__(9896); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -// EXTERNAL MODULE: external "path" -var external_path_ = __nccwpck_require__(6928); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_.constants.R_OK | external_fs_.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -;// CONCATENATED MODULE: external "child_process" -const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_.dirname(filePath); - const upperName = external_path_.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_.EOL.length); - n = s.indexOf(external_os_.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_namespaceObject.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_.platform(); -const arch = external_os_.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - issueCommand('set-output', { name }, toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - command_issueCommand('warning', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + external_os_.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 9337: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -var node_fs__WEBPACK_IMPORTED_MODULE_3___namespace_cache; -/* harmony export */ __nccwpck_require__.d(__webpack_exports__, { -/* harmony export */ TI: () => (/* binding */ Ze) -/* harmony export */ }); -/* unused harmony exports Glob, Ignore, escape, globIterate, globIterateSync, globStream, globStreamSync, globSync, hasMagic, iterate, iterateSync, stream, streamSync, sync, unescape */ -/* harmony import */ var node_url__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3136); -/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(6760); -/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9896); -/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(3024); -/* harmony import */ var node_fs_promises__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(1455); -/* harmony import */ var node_events__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(8474); -/* harmony import */ var node_stream__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(7075); -/* harmony import */ var node_string_decoder__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(6193); -var Gt=(n,t,e)=>{let s=n instanceof RegExp?ce(n,e):n,i=t instanceof RegExp?ce(t,e):t,r=s!==null&&i!=null&&ss(s,i,e);return r&&{start:r[0],end:r[1],pre:e.slice(0,r[0]),body:e.slice(r[0]+s.length,r[1]),post:e.slice(r[1]+i.length)}},ce=(n,t)=>{let e=t.match(n);return e?e[0]:null},ss=(n,t,e)=>{let s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),u=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;u>=0&&!h;){if(u===a)s.push(u),a=e.indexOf(n,u+1);else if(s.length===1){let c=s.pop();c!==void 0&&(h=[c,l])}else i=s.pop(),i!==void 0&&i=0?a:l}s.length&&o!==void 0&&(h=[r,o])}return h};var fe="\0SLASH"+Math.random()+"\0",ue="\0OPEN"+Math.random()+"\0",qt="\0CLOSE"+Math.random()+"\0",de="\0COMMA"+Math.random()+"\0",pe="\0PERIOD"+Math.random()+"\0",is=new RegExp(fe,"g"),rs=new RegExp(ue,"g"),ns=new RegExp(qt,"g"),os=new RegExp(de,"g"),hs=new RegExp(pe,"g"),as=/\\\\/g,ls=/\\{/g,cs=/\\}/g,fs=/\\,/g,us=/\\./g,ds=1e5;function Ht(n){return isNaN(n)?n.charCodeAt(0):parseInt(n,10)}function ps(n){return n.replace(as,fe).replace(ls,ue).replace(cs,qt).replace(fs,de).replace(us,pe)}function ms(n){return n.replace(is,"\\").replace(rs,"{").replace(ns,"}").replace(os,",").replace(hs,".")}function me(n){if(!n)return[""];let t=[],e=Gt("{","}",n);if(!e)return n.split(",");let{pre:s,body:i,post:r}=e,o=s.split(",");o[o.length-1]+="{"+i+"}";let h=me(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function ge(n,t={}){if(!n)return[];let{max:e=ds}=t;return n.slice(0,2)==="{}"&&(n="\\{\\}"+n.slice(2)),ht(ps(n),e,!0).map(ms)}function gs(n){return"{"+n+"}"}function ws(n){return/^-?0\d/.test(n)}function ys(n,t){return n<=t}function bs(n,t){return n>=t}function ht(n,t,e){let s=[],i=Gt("{","}",n);if(!i)return[n];let r=i.pre,o=i.post.length?ht(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let h=0;h=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(n=i.pre+"{"+i.body+qt+i.post,ht(n,t,!0)):[n];let c;if(l)c=i.body.split(/\.\./);else if(c=me(i.body),c.length===1&&c[0]!==void 0&&(c=ht(c[0],t,!1).map(gs),c.length===1))return o.map(f=>i.pre+c[0]+f);let d;if(l&&c[0]!==void 0&&c[1]!==void 0){let f=Ht(c[0]),m=Ht(c[1]),p=Math.max(c[0].length,c[1].length),w=c.length===3&&c[2]!==void 0?Math.abs(Ht(c[2])):1,g=ys;m0){let $=new Array(z+1).join("0");y<0?b="-"+$+b.slice(1):b=$+b}}d.push(b)}}else{d=[];for(let f=0;f{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ss={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},lt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Es=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),we=n=>n.join(""),ye=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=!1,h=!1,a=!1,l=!1,u=e,c="";t:for(;rc?s.push(lt(c)+"-"+lt(p)):p===c&&s.push(lt(p)),c="",r++;continue}if(n.startsWith("-]",r+1)){s.push(lt(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){c=p,r+=2;continue}s.push(lt(p)),r++}if(ue?t?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?n.replace(/\[([^\/\\{}])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var xs=new Set(["!","?","+","*","@"]),be=n=>xs.has(n),vs="(?!(?:^|/)\\.\\.?(?:$|/))",Ct="(?!\\.)",Cs=new Set(["[","."]),Ts=new Set(["..","."]),As=new Set("().*{}+?[]^$\\!"),ks=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kt="[^/]",Se=Kt+"*?",Ee=Kt+"+?",Q=class n{type;#t;#s;#n=!1;#r=[];#o;#S;#w;#c=!1;#h;#u;#f=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#w=this.#t===this?[]:this.#t.#w,t==="!"&&!this.#t.#c&&this.#w.push(this),this.#S=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#r)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(t=>String(t)).join("|")+")":this.#u=this.#r.map(t=>String(t)).join("")}#a(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#w.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let t=this.#o;for(let e=0;etypeof f!="string"),l=this.#r.map(f=>{let[m,p,w,g]=typeof f=="string"?n.#E(f,this.#s,a):f.toRegExpSource(t);return this.#s=this.#s||w,this.#n=this.#n||g,m}).join(""),u="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Ts.has(this.#r[0]))){let m=Cs,p=e&&m.has(l.charAt(0))||l.startsWith("\\.")&&m.has(l.charAt(2))||l.startsWith("\\.\\.")&&m.has(l.charAt(4)),w=!e&&!t&&m.has(l.charAt(0));u=p?vs:w?Ct:""}let c="";return this.isEnd()&&this.#t.#c&&this.#o?.type==="!"&&(c="(?:$|\\/)"),[u+l+c,W(l),this.#s=!!this.#s,this.#n]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#r=[a],this.type=null,this.#s=void 0,[a,W(this.toString()),!1,!1]}let o=!s||t||e||!Ct?"":this.#d(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#f)h=(this.isStart()&&!e?Ct:"")+Ee;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ct:"")+Se+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a}return[h,W(r),this.#s=!!this.#s,this.#n]}#d(t){return this.#r.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#n=this.#n||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#E(t,e,s=!1){let i=!1,r="",o=!1,h=!1;for(let a=0;ae?t?n.replace(/[?*()[\]{}]/g,"[$&]"):n.replace(/[?*()[\]\\{}]/g,"\\$&"):t?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O=(n,t,e={})=>(at(t),!e.nocomment&&t.charAt(0)==="#"?!1:new D(t,e).match(n)),Rs=/^\*+([^+@!?\*\[\(]*)$/,Os=n=>t=>!t.startsWith(".")&&t.endsWith(n),Fs=n=>t=>t.endsWith(n),Ds=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),Ms=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),Ns=/^\*+\.\*+$/,_s=n=>!n.startsWith(".")&&n.includes("."),Ls=n=>n!=="."&&n!==".."&&n.includes("."),Ws=/^\.\*+$/,Ps=n=>n!=="."&&n!==".."&&n.startsWith("."),js=/^\*+$/,Is=n=>n.length!==0&&!n.startsWith("."),zs=n=>n.length!==0&&n!=="."&&n!=="..",Bs=/^\?+([^+@!?\*\[\(]*)?$/,Us=([n,t=""])=>{let e=Ce([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},$s=([n,t=""])=>{let e=Te([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},Gs=([n,t=""])=>{let e=Te([n]);return t?s=>e(s)&&s.endsWith(t):e},Hs=([n,t=""])=>{let e=Ce([n]);return t?s=>e(s)&&s.endsWith(t):e},Ce=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Te=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ae=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xe={win32:{sep:"\\"},posix:{sep:"/"}},qs=Ae==="win32"?xe.win32.sep:xe.posix.sep;O.sep=qs;var A=Symbol("globstar **");O.GLOBSTAR=A;var Ks="[^/]",Vs=Ks+"*?",Ys="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Xs="(?:(?!(?:\\/|^)\\.).)*?",Js=(n,t={})=>e=>O(e,n,t);O.filter=Js;var N=(n,t={})=>Object.assign({},n,t),Zs=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O;let t=O;return Object.assign((s,i,r={})=>t(s,i,N(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,N(n,r))}static defaults(i){return t.defaults(N(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,N(n,o))}static fromGlob(i,r={}){return t.AST.fromGlob(i,N(n,r))}},unescape:(s,i={})=>t.unescape(s,N(n,i)),escape:(s,i={})=>t.escape(s,N(n,i)),filter:(s,i={})=>t.filter(s,N(n,i)),defaults:s=>t.defaults(N(n,s)),makeRe:(s,i={})=>t.makeRe(s,N(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,N(n,i)),match:(s,i,r={})=>t.match(s,i,N(n,r)),sep:t.sep,GLOBSTAR:A})};O.defaults=Zs;var ke=(n,t={})=>(at(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:ge(n,{max:t.braceExpandMax}));O.braceExpand=ke;var Qs=(n,t={})=>new D(n,t).makeRe();O.makeRe=Qs;var ti=(n,t,e={})=>{let s=new D(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O.match=ti;var ve=/[?*]|[+@!]\(.*?\)|\[|\]/,ei=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ae,this.isWindows=this.platform==="win32";let s="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[s]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!ve.test(r[2]))&&!ve.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(u=>this.parse(u))];if(l)return[r[0],...r.slice(1).map(u=>this.parse(u))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let u=s.slice(0);u[i]="**",t.push(u),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length)}partsMatch(t,e,s=!1){let i=0,r=0,o=[],h="";for(;iE?e=e.slice(y):E>y&&(t=t.slice(E)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o>> no match, partial?`,t,d,e,f),d===a))}let p;if(typeof u=="string"?(p=c===u,this.debug("string match",u,c,p)):(p=u.test(c),this.debug("pattern match",u,c,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return ke(this.pattern,this.options)}parse(t){at(t);let e=this.options;if(t==="**")return A;if(t==="")return"";let s,i=null;(s=t.match(js))?i=e.dot?zs:Is:(s=t.match(Rs))?i=(e.nocase?e.dot?Ms:Ds:e.dot?Fs:Os)(s[1]):(s=t.match(Bs))?i=(e.nocase?e.dot?$s:Us:e.dot?Gs:Hs)(s):(s=t.match(Ns))?i=e.dot?Ls:_s:(s=t.match(Ws))&&(i=Ps);let r=Q.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Vs:e.dot?Ys:Xs,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let d of c.flags.split(""))i.add(d);return typeof c=="string"?ei(c):c===A?A:c._src});l.forEach((c,d)=>{let f=l[d+1],m=l[d-1];c!==A||m===A||(m===void 0?f!==void 0&&f!==A?l[d+1]="(?:\\/|"+s+"\\/)?"+f:l[d]=s:f===void 0?l[d-1]=m+"(?:\\/|\\/"+s+")?":f!==A&&(l[d-1]=m+"(?:\\/|\\/"+s+"\\/)"+f,l[d+1]=A))});let u=l.filter(c=>c!==A);if(this.partial&&u.length>=1){let c=[];for(let d=1;d<=u.length;d++)c.push(u.slice(0,d).join("/"));return"(?:"+c.join("|")+")"}return u.join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.partial&&(r="^(?:\\/|"+o+r.slice(1,-1)+h+")$"),this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof Vt.emitWarning=="function"?Vt.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},At=globalThis.AbortController,Re=globalThis.AbortSignal;if(typeof At>"u"){Re=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,s){this._onabort.push(s)}},At=class{constructor(){t()}signal=new Re;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let s of this.signal._onabort)s(e);this.signal.onabort?.(e)}}};let n=Vt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,Fe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var ii=n=>!Oe.has(n);var q=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),De=n=>q(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Tt:null:null,Tt=class extends Array{constructor(n){super(n),this.fill(0)}},ri=class ct{heap;length;static#t=!1;static create(t){let e=De(t);if(!e)return[];ct.#t=!0;let s=new ct(t,e);return ct.#t=!1,s}constructor(t,e){if(!ct.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},ft=class Me{#t;#s;#n;#r;#o;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#u;#f;#a;#i;#d;#E;#b;#p;#R;#m;#C;#T;#g;#y;#x;#A;#e;#_;static unsafeExposeInternals(t){return{starts:t.#T,ttls:t.#g,autopurgeTimers:t.#y,sizes:t.#C,keyMap:t.#f,keyList:t.#a,valList:t.#i,next:t.#d,prev:t.#E,get head(){return t.#b},get tail(){return t.#p},free:t.#R,isBackgroundFetch:e=>t.#l(e),backgroundFetch:(e,s,i,r)=>t.#U(e,s,i,r),moveToTail:e=>t.#W(e),indexes:e=>t.#F(e),rindexes:e=>t.#D(e),isStale:e=>t.#v(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#u}get size(){return this.#h}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,onInsert:u,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:m=0,maxEntrySize:p=0,sizeCalculation:w,fetchMethod:g,memoMethod:S,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:z,ignoreFetchAbort:$,perf:J}=t;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#c=J??si,e!==0&&!q(e))throw new TypeError("max option must be a nonnegative integer");let Z=e?De(e):Array;if(!Z)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=m,this.maxEntrySize=p||this.#s,this.sizeCalculation=w,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#w=S,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#S=g,this.#A=!!g,this.#f=new Map,this.#a=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#d=new Z(e),this.#E=new Z(e),this.#b=0,this.#p=0,this.#R=ri.create(e),this.#h=0,this.#u=0,typeof l=="function"&&(this.#n=l),typeof u=="function"&&(this.#r=u),typeof c=="function"?(this.#o=c,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#x=!!this.#n,this.#_=!!this.#r,this.#e=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!$,this.maxEntrySize!==0){if(this.#s!==0&&!q(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!q(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#G()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=q(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!q(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let $t="LRU_CACHE_UNBOUNDED";ii($t)&&(Oe.add($t),Fe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$t,Me))}}getRemainingTTL(t){return this.#f.has(t)?1/0:0}#M(){let t=new Tt(this.#t),e=new Tt(this.#t);this.#g=t,this.#T=e;let s=this.ttlAutopurge?new Array(this.#t):void 0;this.#y=s,this.#j=(o,h,a=this.#c.now())=>{if(e[o]=h!==0?a:0,t[o]=h,s?.[o]&&(clearTimeout(s[o]),s[o]=void 0),h!==0&&s){let l=setTimeout(()=>{this.#v(o)&&this.#O(this.#a[o],"expire")},h+1);l.unref&&l.unref(),s[o]=l}},this.#k=o=>{e[o]=t[o]!==0?this.#c.now():0},this.#N=(o,h)=>{if(t[h]){let a=t[h],l=e[h];if(!a||!l)return;o.ttl=a,o.start=l,o.now=i||r();let u=o.now-l;o.remainingTTL=a-u}};let i=0,r=()=>{let o=this.#c.now();if(this.ttlResolution>0){i=o;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return o};this.getRemainingTTL=o=>{let h=this.#f.get(o);if(h===void 0)return 0;let a=t[h],l=e[h];if(!a||!l)return 1/0;let u=(i||r())-l;return a-u},this.#v=o=>{let h=e[o],a=t[o];return!!a&&!!h&&(i||r())-h>a}}#k=()=>{};#N=()=>{};#j=()=>{};#v=()=>!1;#G(){let t=new Tt(this.#t);this.#u=0,this.#C=t,this.#P=e=>{this.#u-=t[e],t[e]=0},this.#I=(e,s,i,r)=>{if(this.#l(s))return 0;if(!q(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!q(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#u>r;)this.#B(!0)}this.#u+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#u)}}#P=t=>{};#L=(t,e,s)=>{};#I=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#p;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#b));)e=this.#E[e]}*#D({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#b;!(!this.#z(e)||((t||!this.#v(e))&&(yield e),e===this.#p));)e=this.#d[e]}#z(t){return t!==void 0&&this.#f.get(this.#a[t])===t}*entries(){for(let t of this.#F())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#D())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#l(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#F()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*rkeys(){for(let t of this.#D()){let e=this.#a[t];e!==void 0&&!this.#l(this.#i[t])&&(yield e)}}*values(){for(let t of this.#F())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#D())this.#i[t]!==void 0&&!this.#l(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#F()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#D()){let i=this.#i[s],r=this.#l(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#D({allowStale:!0}))this.#v(e)&&(this.#O(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#f.get(t);if(e===void 0)return;let s=this.#i[e],i=this.#l(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#g&&this.#T){let o=this.#g[e],h=this.#T[e];if(o&&h){let a=o-(this.#c.now()-h);r.ttl=a,r.start=Date.now()}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:!0})){let s=this.#a[e],i=this.#i[e],r=this.#l(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#g&&this.#T){o.ttl=this.#g[e];let h=this.#c.now()-this.#T[e];o.start=Math.floor(Date.now()-h)}this.#C&&(o.size=this.#C[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=this.#c.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,u=this.#I(t,e,s.size||0,h);if(this.maxEntrySize&&u>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#O(t,"set"),this;let c=this.#h===0?void 0:this.#f.get(t);if(c===void 0)c=this.#h===0?this.#p:this.#R.length!==0?this.#R.pop():this.#h===this.#t?this.#B(!1):this.#h,this.#a[c]=t,this.#i[c]=e,this.#f.set(t,c),this.#d[this.#p]=c,this.#E[c]=this.#p,this.#p=c,this.#h++,this.#L(c,u,a),a&&(a.set="add"),l=!1,this.#_&&this.#r?.(e,t,"add");else{this.#W(c);let d=this.#i[c];if(e!==d){if(this.#A&&this.#l(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!o&&(this.#x&&this.#n?.(f,t,"set"),this.#e&&this.#m?.push([f,t,"set"]))}else o||(this.#x&&this.#n?.(d,t,"set"),this.#e&&this.#m?.push([d,t,"set"]));if(this.#P(c),this.#L(c,u,a),this.#i[c]=e,a){a.set="replace";let f=d&&this.#l(d)?d.__staleWhileFetching:d;f!==void 0&&(a.oldValue=f)}}else a&&(a.set="update");this.#_&&this.onInsert?.(e,t,e===d?"update":"replace")}if(i!==0&&!this.#g&&this.#M(),this.#g&&(l||this.#j(c,i,r),a&&this.#N(a,c)),!o&&this.#e&&this.#m){let d=this.#m,f;for(;f=d?.shift();)this.#o?.(...f)}return this}pop(){try{for(;this.#h;){let t=this.#i[this.#b];if(this.#B(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#e&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#o?.(...e)}}}#B(t){let e=this.#b,s=this.#a[e],i=this.#i[e];return this.#A&&this.#l(i)?i.__abortController.abort(new Error("evicted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(i,s,"evict"),this.#e&&this.#m?.push([i,s,"evict"])),this.#P(e),this.#y?.[e]&&(clearTimeout(this.#y[e]),this.#y[e]=void 0),t&&(this.#a[e]=void 0,this.#i[e]=void 0,this.#R.push(e)),this.#h===1?(this.#b=this.#p=0,this.#R.length=0):this.#b=this.#d[e],this.#f.delete(s),this.#h--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#f.get(t);if(r!==void 0){let o=this.#i[r];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#v(r))i&&(i.has="stale",this.#N(i,r));else return s&&this.#k(r),i&&(i.has="hit",this.#N(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#f.get(t);if(i===void 0||!s&&this.#v(i))return;let r=this.#i[i];return this.#l(r)?r.__staleWhileFetching:r}#U(t,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#l(r))return r;let o=new At,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:g}=o.signal,S=s.ignoreFetchAbort&&p!==void 0,E=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&p!==void 0);if(s.status&&(g&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!S&&!w)return c(o.signal.reason,E);let y=f,b=this.#i[e];return(b===f||S&&w&&b===void 0)&&(p===void 0?y.__staleWhileFetching!==void 0?this.#i[e]=y.__staleWhileFetching:this.#O(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},u=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),c(p,!1)),c=(p,w)=>{let{aborted:g}=o.signal,S=g&&s.allowStaleOnFetchAbort,E=S||s.allowStaleOnFetchRejection,y=E||s.noDeleteOnFetchRejection,b=f;if(this.#i[e]===f&&(!y||!w&&b.__staleWhileFetching===void 0?this.#O(t,"fetch"):S||(this.#i[e]=b.__staleWhileFetching)),E)return s.status&&b.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),b.__staleWhileFetching;if(b.__returned===b)throw p},d=(p,w)=>{let g=this.#S?.(t,r,a);g&&g instanceof Promise&&g.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let f=new Promise(d).then(l,u),m=Object.assign(f,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,m,{...a.options,status:void 0}),e=this.#f.get(t)):this.#i[e]=m,m}#l(t){if(!this.#A)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof At}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:g,signal:S}=e;if(!this.#A)return g&&(g.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});let E={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:f,status:g,signal:S},y=this.#f.get(t);if(y===void 0){g&&(g.fetch="miss");let b=this.#U(t,y,E,p);return b.__returned=b}else{let b=this.#i[y];if(this.#l(b)){let Z=s&&b.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",Z&&(g.returnedStale=!0)),Z?b.__staleWhileFetching:b.__returned=b}let z=this.#v(y);if(!w&&!z)return g&&(g.fetch="hit"),this.#W(y),i&&this.#k(y),g&&this.#N(g,y),b;let $=this.#U(t,y,E,p),J=$.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=z?"stale":"refresh",J&&z&&(g.returnedStale=!0)),J?$.__staleWhileFetching:$.__returned=$}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#w;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#f.get(t);if(h!==void 0){let a=this.#i[h],l=this.#l(a);return o&&this.#N(o,h),this.#v(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#O(t,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#W(h),i&&this.#k(h),a))}else o&&(o.get="miss")}#$(t,e){this.#E[e]=t,this.#d[t]=e}#W(t){t!==this.#p&&(t===this.#b?this.#b=this.#d[t]:this.#$(this.#E[t],this.#d[t]),this.#$(this.#p,t),this.#p=t)}delete(t){return this.#O(t,"delete")}#O(t,e){let s=!1;if(this.#h!==0){let i=this.#f.get(t);if(i!==void 0)if(this.#y?.[i]&&(clearTimeout(this.#y?.[i]),this.#y[i]=void 0),s=!0,this.#h===1)this.#H(e);else{this.#P(i);let r=this.#i[i];if(this.#l(r)?r.__abortController.abort(new Error("deleted")):(this.#x||this.#e)&&(this.#x&&this.#n?.(r,t,e),this.#e&&this.#m?.push([r,t,e])),this.#f.delete(t),this.#a[i]=void 0,this.#i[i]=void 0,i===this.#p)this.#p=this.#E[i];else if(i===this.#b)this.#b=this.#d[i];else{let o=this.#E[i];this.#d[o]=this.#d[i];let h=this.#d[i];this.#E[h]=this.#E[i]}this.#h--,this.#R.push(i)}}if(this.#e&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#o?.(...r)}return s}clear(){return this.#H("delete")}#H(t){for(let e of this.#D({allowStale:!0})){let s=this.#i[e];if(this.#l(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#x&&this.#n?.(s,i,t),this.#e&&this.#m?.push([s,i,t])}}if(this.#f.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#T){this.#g.fill(0),this.#T.fill(0);for(let e of this.#y??[])e!==void 0&&clearTimeout(e);this.#y?.fill(void 0)}if(this.#C&&this.#C.fill(0),this.#b=0,this.#p=0,this.#R.length=0,this.#u=0,this.#h=0,this.#e&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#o?.(...s)}}};var Ne=typeof process=="object"&&process?process:{stdout:null,stderr:null},oi=n=>!!n&&typeof n=="object"&&(n instanceof V||n instanceof node_stream__WEBPACK_IMPORTED_MODULE_6__||hi(n)||ai(n)),hi=n=>!!n&&typeof n=="object"&&n instanceof node_events__WEBPACK_IMPORTED_MODULE_5__.EventEmitter&&typeof n.pipe=="function"&&n.pipe!==node_stream__WEBPACK_IMPORTED_MODULE_6__.Writable.prototype.pipe,ai=n=>!!n&&typeof n=="object"&&n instanceof node_events__WEBPACK_IMPORTED_MODULE_5__.EventEmitter&&typeof n.write=="function"&&typeof n.end=="function",G=Symbol("EOF"),H=Symbol("maybeEmitEnd"),K=Symbol("emittedEnd"),kt=Symbol("emittingEnd"),ut=Symbol("emittedError"),Rt=Symbol("closed"),_e=Symbol("read"),Ot=Symbol("flush"),Le=Symbol("flushChunk"),P=Symbol("encoding"),et=Symbol("decoder"),v=Symbol("flowing"),dt=Symbol("paused"),st=Symbol("resume"),C=Symbol("buffer"),F=Symbol("pipes"),T=Symbol("bufferLength"),Yt=Symbol("bufferPush"),Ft=Symbol("bufferShift"),k=Symbol("objectMode"),x=Symbol("destroyed"),Xt=Symbol("error"),Jt=Symbol("emitData"),We=Symbol("emitEnd"),Zt=Symbol("emitEnd2"),B=Symbol("async"),Qt=Symbol("abort"),Dt=Symbol("aborted"),pt=Symbol("signal"),Y=Symbol("dataListeners"),M=Symbol("discarded"),mt=n=>Promise.resolve().then(n),li=n=>n(),ci=n=>n==="end"||n==="finish"||n==="prefinish",fi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,ui=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),Mt=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[st](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},te=class extends Mt{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>this.dest.emit("error",i),t.on("error",this.proxyErrors)}},di=n=>!!n.objectMode,pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",V=class extends node_events__WEBPACK_IMPORTED_MODULE_5__.EventEmitter{[v]=!1;[dt]=!1;[F]=[];[C]=[];[k];[P];[B];[et];[G]=!1;[K]=!1;[kt]=!1;[Rt]=!1;[ut]=null;[T]=0;[x]=!1;[pt];[Dt]=!1;[Y]=0;[M]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");di(e)?(this[k]=!0,this[P]=null):pi(e)?(this[P]=e.encoding,this[k]=!1):(this[k]=!1,this[P]=null),this[B]=!!e.async,this[et]=this[P]?new node_string_decoder__WEBPACK_IMPORTED_MODULE_7__.StringDecoder(this[P]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[F]});let{signal:s}=e;s&&(this[pt]=s,s.aborted?this[Qt]():s.addEventListener("abort",()=>this[Qt]()))}get bufferLength(){return this[T]}get encoding(){return this[P]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[B]}set async(t){this[B]=this[B]||!!t}[Qt](){this[Dt]=!0,this.emit("abort",this[pt]?.reason),this.destroy(this[pt]?.reason)}get aborted(){return this[Dt]}set aborted(t){}write(t,e,s){if(this[Dt])return!1;if(this[G])throw new Error("write after end");if(this[x])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[B]?mt:li;if(!this[k]&&!Buffer.isBuffer(t)){if(ui(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(fi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):t.length?(typeof t=="string"&&!(e===this[P]&&!this[et]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P]&&(t=this[et].write(t)),this[v]&&this[T]!==0&&this[Ot](!0),this[v]?this.emit("data",t):this[Yt](t),this[T]!==0&&this.emit("readable"),s&&i(s),this[v]):(this[T]!==0&&this.emit("readable"),s&&i(s),this[v])}read(t){if(this[x])return null;if(this[M]=!1,this[T]===0||t===0||t&&t>this[T])return this[H](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[P]?this[C].join(""):Buffer.concat(this[C],this[T])]);let e=this[_e](t||null,this[C][0]);return this[H](),e}[_e](t,e){if(this[k])this[Ft]();else{let s=e;t===s.length||t===null?this[Ft]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[T]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[T]-=t)}return this.emit("data",e),!this[C].length&&!this[G]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[G]=!0,this.writable=!1,(this[v]||!this[dt])&&this[H](),this}[st](){this[x]||(!this[Y]&&!this[F].length&&(this[M]=!0),this[dt]=!1,this[v]=!0,this.emit("resume"),this[C].length?this[Ot]():this[G]?this[H]():this.emit("drain"))}resume(){return this[st]()}pause(){this[v]=!1,this[dt]=!0,this[M]=!1}get destroyed(){return this[x]}get flowing(){return this[v]}get paused(){return this[dt]}[Yt](t){this[k]?this[T]+=1:this[T]+=t.length,this[C].push(t)}[Ft](){return this[k]?this[T]-=1:this[T]-=this[C][0].length,this[C].shift()}[Ot](t=!1){do;while(this[Le](this[Ft]())&&this[C].length);!t&&!this[C].length&&!this[G]&&this.emit("drain")}[Le](t){return this.emit("data",t),this[v]}pipe(t,e){if(this[x])return t;this[M]=!1;let s=this[K];return e=e||{},t===Ne.stdout||t===Ne.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F].push(e.proxyErrors?new te(this,t,e):new Mt(this,t,e)),this[B]?mt(()=>this[st]()):this[st]()),t}unpipe(t){let e=this[F].find(s=>s.dest===t);e&&(this[F].length===1?(this[v]&&this[Y]===0&&(this[v]=!1),this[F]=[]):this[F].splice(this[F].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[M]=!1,this[Y]++,!this[F].length&&!this[v]&&this[st]();else if(t==="readable"&&this[T]!==0)super.emit("readable");else if(ci(t)&&this[K])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[ut]){let i=e;this[B]?mt(()=>i.call(this,this[ut])):i.call(this,this[ut])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Y]=this.listeners("data").length,this[Y]===0&&!this[M]&&!this[F].length&&(this[v]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Y]=0,!this[M]&&!this[F].length&&(this[v]=!1)),e}get emittedEnd(){return this[K]}[H](){!this[kt]&&!this[K]&&!this[x]&&this[C].length===0&&this[G]&&(this[kt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Rt]&&this.emit("close"),this[kt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==x&&this[x])return!1;if(t==="data")return!this[k]&&!s?!1:this[B]?(mt(()=>this[Jt](s)),!0):this[Jt](s);if(t==="end")return this[We]();if(t==="close"){if(this[Rt]=!0,!this[K]&&!this[x])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[ut]=s,super.emit(Xt,s);let r=!this[pt]||this.listeners("error").length?super.emit("error",s):!1;return this[H](),r}else if(t==="resume"){let r=super.emit("resume");return this[H](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[H](),i}[Jt](t){for(let s of this[F])s.dest.write(t)===!1&&this.pause();let e=this[M]?!1:super.emit("data",t);return this[H](),e}[We](){return this[K]?!1:(this[K]=!0,this.readable=!1,this[B]?(mt(()=>this[Zt]()),!0):this[Zt]())}[Zt](){if(this[et]){let e=this[et].end();if(e){for(let s of this[F])s.dest.write(e);this[M]||super.emit("data",e)}}for(let e of this[F])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(x,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[M]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[G])return e();let r,o,h=c=>{this.off("data",a),this.off("end",l),this.off(x,u),e(),o(c)},a=c=>{this.off("error",h),this.off("end",l),this.off(x,u),this.pause(),r({value:c,done:!!this[G]})},l=()=>{this.off("error",h),this.off("data",a),this.off(x,u),e(),r({done:!0,value:void 0})},u=()=>h(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,r=c,this.once(x,u),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[M]=!1;let t=!1,e=()=>(this.pause(),this.off(Xt,e),this.off(x,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(Xt,e),this.once(x,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[x])return t?this.emit("error",t):this.emit(x),this;this[x]=!0,this[M]=!0,this[C].length=0,this[T]=0;let e=this;return typeof e.close=="function"&&!this[Rt]&&e.close(),t?this.emit("error",t):this.emit(x),this}static get isStream(){return oi}};var vi=fs__WEBPACK_IMPORTED_MODULE_2__.realpathSync.native,wt={lstatSync:fs__WEBPACK_IMPORTED_MODULE_2__.lstatSync,readdir:fs__WEBPACK_IMPORTED_MODULE_2__.readdir,readdirSync:fs__WEBPACK_IMPORTED_MODULE_2__.readdirSync,readlinkSync:fs__WEBPACK_IMPORTED_MODULE_2__.readlinkSync,realpathSync:vi,promises:{lstat:node_fs_promises__WEBPACK_IMPORTED_MODULE_4__.lstat,readdir:node_fs_promises__WEBPACK_IMPORTED_MODULE_4__.readdir,readlink:node_fs_promises__WEBPACK_IMPORTED_MODULE_4__.readlink,realpath:node_fs_promises__WEBPACK_IMPORTED_MODULE_4__.realpath}},Ue=n=>!n||n===wt||n===/*#__PURE__*/ (node_fs__WEBPACK_IMPORTED_MODULE_3___namespace_cache || (node_fs__WEBPACK_IMPORTED_MODULE_3___namespace_cache = __nccwpck_require__.t(node_fs__WEBPACK_IMPORTED_MODULE_3__, 2)))?wt:{...wt,...n,promises:{...wt.promises,...n.promises||{}}},$e=/^\\\\\?\\([a-z]:)\\?$/i,Ri=n=>n.replace(/\//g,"\\").replace($e,"$1\\"),Oi=/[\\\/]/,L=0,Ge=1,He=2,U=4,qe=6,Ke=8,X=10,Ve=12,_=15,gt=~_,se=16,je=32,yt=64,j=128,Nt=256,Lt=512,Ie=yt|j|Lt,Fi=1023,ie=n=>n.isFile()?Ke:n.isDirectory()?U:n.isSymbolicLink()?X:n.isCharacterDevice()?He:n.isBlockDevice()?qe:n.isSocket()?Ve:n.isFIFO()?Ge:L,ze=new ft({max:2**12}),bt=n=>{let t=ze.get(n);if(t)return t;let e=n.normalize("NFKD");return ze.set(n,e),e},Be=new ft({max:2**12}),_t=n=>{let t=Be.get(n);if(t)return t;let e=bt(n.toLowerCase());return Be.set(n,e),e},Wt=class extends ft{constructor(){super({max:256})}},ne=class extends ft{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},Ye=Symbol("PathScurry setAsCwd"),R=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#h;get ino(){return this.#h}#u;get size(){return this.#u}#f;get blocks(){return this.#f}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#C;#T;#g;#y;#x;#A;#e;#_;#M;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=L,s,i,r,o,h){this.name=t,this.#C=r?_t(t):bt(t),this.#e=e&Fi,this.nocase=r,this.roots=i,this.root=s||this,this.#_=o,this.#g=h.fullpath,this.#x=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=Ue(h.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#_}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#_.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#_.set(this,e),this.#e&=~se,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?_t(t):bt(t);for(let a of s)if(a.#C===i)return a;let r=this.parent?this.sep:"",o=this.#g?this.#g+r+t:void 0,h=this.newChild(t,L,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#e|=j),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#x!==void 0)return this.#x;let t=this.name,e=this.parent;if(!e)return this.#x=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#g!==void 0)return this.#g;let t=this.name,e=this.parent;if(!e)return this.#g=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#g=i}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#y=`//?/${i}`:this.#y=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#y=s}isUnknown(){return(this.#e&_)===L}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&_)===Ke}isDirectory(){return(this.#e&_)===U}isCharacterDevice(){return(this.#e&_)===He}isBlockDevice(){return(this.#e&_)===qe}isFIFO(){return(this.#e&_)===Ge}isSocket(){return(this.#e&_)===Ve}isSymbolicLink(){return(this.#e&X)===X}lstatCached(){return this.#e&je?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#k}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let t=this.#e&_;return!(t!==L&&t!==X||this.#e&Nt||this.#e&j)}calledReaddir(){return!!(this.#e&se)}isENOENT(){return!!(this.#e&j)}isNamed(t){return this.nocase?this.#C===_t(t):this.#C===bt(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#D(e.code);return}}#j(t){this.#e|=se;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#W.push(t),this.#O)return;this.#O=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#I(r.code),s.provisional=0;else{for(let h of o)this.#z(h,s);this.#j(s)}this.#H(s.slice(0,s.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#q)await this.#q;else{let s=()=>{};this.#q=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#z(i,t);this.#j(t)}catch(i){this.#I(i.code),t.provisional=0}this.#q=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#z(s,t);this.#j(t)}catch(s){this.#I(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#e&Ie)return!1;let t=_&this.#e;return t===L||t===U||t===X}shouldWalk(t,e){return(this.#e&U)===U&&!(this.#e&Ie)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}realpathSync(){if(this.#k)return this.#k;if(!((Lt|Nt|j)&this.#e))try{let t=this.#t.realpathSync(this.fullpath());return this.#k=this.resolve(t)}catch{this.#P()}}[Ye](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#x=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#x=void 0,i.#A=void 0,i=i.parent}},Pt=class n extends R{sep="\\";splitSep=Oi;constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return node_path__WEBPACK_IMPORTED_MODULE_1__.win32.parse(t).root}getRoot(t){if(t=Ri(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new it(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace($e,"$1\\"),t===e}},jt=class n extends R{splitSep="/";sep="/";constructor(t,e=L,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=L,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},It=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=wt}={}){this.#r=Ue(o),(t instanceof URL||t.startsWith("file://"))&&(t=(0,node_url__WEBPACK_IMPORTED_MODULE_0__.fileURLToPath)(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Wt,this.#s=new Wt,this.#n=new ne(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=a.length-1,c=e.sep,d=this.rootPath,f=!1;for(let m of a){let p=u--;l=l.child(m,{relative:new Array(p).fill("..").join(c),relativePosix:new Array(p).fill("..").join("/"),fullpath:d+=(f?"":c)+m}),f=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(c,d)=>{a.add(c),c.readdirCB((f,m)=>{if(f)return d(f);let p=m.length;if(!p)return d();let w=()=>{--p===0&&d()};for(let g of m)(!r||r(g))&&h.push(s?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):g.shouldWalk(a,o)?l(g,w):w()},!0)},u=t;return new Promise((c,d)=>{l(u,f=>{if(f)return d(f);c(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let u=l.readdirSync();for(let c of u){(!r||r(c))&&h.push(s?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(i&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let u of l){(!r||r(u))&&(yield s?u:u.fullpath());let c=u;if(u.isSymbolicLink()){if(!(i&&(c=u.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(h,o)&&h.add(c)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=(w,g,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let E=[];for(let y of g)y.isSymbolicLink()&&E.push(y.realpath().then(b=>b?.isUnknown()?b.lstat():b));if(E.length){Promise.all(E).then(()=>m(null,g,!0));return}}for(let E of g)E&&(!r||r(E))&&(h.write(s?E:E.fullpath())||(d=!0));u--;for(let E of g){let y=E.realpathCached()||E;y.shouldWalk(a,o)&&l.push(y)}d&&!h.flowing?h.once("drain",c):p||c()},p=!0;f.readdirCB(m,!0),p=!1}};return c(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new V({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],u=0,c=()=>{let d=!1;for(;!d;){let f=l.shift();if(!f){u===0&&h.end();return}u++,a.add(f);let m=f.readdirSync();for(let p of m)(!r||r(p))&&(h.write(s?p:p.fullpath())||(d=!0));u--;for(let p of m){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}d&&!h.flowing&&h.once("drain",c)};return c(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ye](e)}},it=class extends It{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,node_path__WEBPACK_IMPORTED_MODULE_1__.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return node_path__WEBPACK_IMPORTED_MODULE_1__.win32.parse(t).root.toUpperCase()}newRoot(t){return new Pt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},rt=class extends It{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,node_path__WEBPACK_IMPORTED_MODULE_1__.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new jt(this.rootPath,U,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},St=class extends rt{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},Cr=process.platform==="win32"?Pt:jt,Xe=process.platform==="win32"?it:process.platform==="darwin"?St:rt;var Di=n=>n.length>=1,Mi=n=>n.length>=1,Ni=Symbol.for("nodejs.util.inspect.custom"),nt=class n{#t;#s;#n;length;#r;#o;#S;#w;#c;#h;#u=!0;constructor(t,e,s,i){if(!Di(t))throw new TypeError("empty pattern list");if(!Mi(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#n=s,this.#r=i,this.#n===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[u,c,d,f,...m]=this.#s;l[0]===""&&(l.shift(),m.shift());let p=[r,o,h,a,""].join("/"),w=[u,c,d,f,""].join("/");this.#t=[p,...l],this.#s=[w,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",u=h+"/";this.#t=[l,...o],this.#s=[u,...a],this.length=this.#t.length}}}[Ni](){return"Pattern <"+this.#s.slice(this.#n).join("/")+">"}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===A}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#s,this.#n+1,this.#r),this.#o.#h=this.#h,this.#o.#c=this.#c,this.#o.#w=this.#w,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#c!==void 0?this.#c:this.#c=this.#r==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#w!==void 0?this.#w:this.#w=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var _i=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ot=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=_i}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ae=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Et=class n{hasWalkedCache;matches=new he;subwalks=new ae;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new oe}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=r.rest();if(c)r=c;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,u=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,u=!0;if(a=r.pattern(),l=r.rest(),u){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,c);continue}else if(a===A){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let c=l?.pattern(),d=l?.rest();if(!l||(c===""||c===".")&&!d)this.matches.add(i,h,c===""||c===".");else if(c===".."){let f=i.parent||i;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):this.matches.add(f,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===A?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var Li=(n,t)=>typeof n=="string"?new ot([n],t):Array.isArray(n)?new ot(n,t):n,zt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#n=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=Li(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#r(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#o(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#r(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#r(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Et(this.opts),s)}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,u)=>this.walkCB3(h,u,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Et(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#r(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},xt=class extends zt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},vt=class extends zt{results;constructor(t,e,s){super(t,e,s),this.results=new V({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var Pi=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",I=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,node_url__WEBPACK_IMPORTED_MODULE_0__.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||Pi,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?it:e.platform==="darwin"?St:e.platform?rt:Xe;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let u=h[l];if(!u)throw new Error("invalid pattern object");return new nt(a,u,0,this.platform)})}async walk(){return[...await new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new xt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new vt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var le=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Bt(n,t={}){return new I(n,t).streamSync()}function Qe(n,t={}){return new I(n,t).stream()}function ts(n,t={}){return new I(n,t).walkSync()}async function Je(n,t={}){return new I(n,t).walk()}function Ut(n,t={}){return new I(n,t).iterateSync()}function es(n,t={}){return new I(n,t).iterate()}var ji=Bt,Ii=Object.assign(Qe,{sync:Bt}),zi=Ut,Bi=Object.assign(es,{sync:Ut}),Ui=Object.assign(ts,{stream:Bt,iterate:Ut}),Ze=Object.assign(Je,{glob:Je,globSync:ts,sync:Ui,globStream:Qe,stream:Ii,globStreamSync:Bt,streamSync:ji,globIterate:es,iterate:Bi,globIterateSync:Ut,iterateSync:zi,Glob:I,hasMagic:le,escape:tt,unescape:W});Ze.glob=Ze; -//# sourceMappingURL=index.min.js.map - - -/***/ }), - -/***/ 2087: -/***/ ((module) => { - -module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}'); - -/***/ }), - -/***/ 1306: -/***/ ((module) => { - -module.exports = {"version":"3.19.0"}; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/async module */ -/******/ (() => { -/******/ var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__"; -/******/ var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__"; -/******/ var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__"; -/******/ var resolveQueue = (queue) => { -/******/ if(queue && queue.d < 1) { -/******/ queue.d = 1; -/******/ queue.forEach((fn) => (fn.r--)); -/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn())); -/******/ } -/******/ } -/******/ var wrapDeps = (deps) => (deps.map((dep) => { -/******/ if(dep !== null && typeof dep === "object") { -/******/ if(dep[webpackQueues]) return dep; -/******/ if(dep.then) { -/******/ var queue = []; -/******/ queue.d = 0; -/******/ dep.then((r) => { -/******/ obj[webpackExports] = r; -/******/ resolveQueue(queue); -/******/ }, (e) => { -/******/ obj[webpackError] = e; -/******/ resolveQueue(queue); -/******/ }); -/******/ var obj = {}; -/******/ obj[webpackQueues] = (fn) => (fn(queue)); -/******/ return obj; -/******/ } -/******/ } -/******/ var ret = {}; -/******/ ret[webpackQueues] = x => {}; -/******/ ret[webpackExports] = dep; -/******/ return ret; -/******/ })); -/******/ __nccwpck_require__.a = (module, body, hasAwait) => { -/******/ var queue; -/******/ hasAwait && ((queue = []).d = -1); -/******/ var depQueues = new Set(); -/******/ var exports = module.exports; -/******/ var currentDeps; -/******/ var outerResolve; -/******/ var reject; -/******/ var promise = new Promise((resolve, rej) => { -/******/ reject = rej; -/******/ outerResolve = resolve; -/******/ }); -/******/ promise[webpackExports] = exports; -/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {})); -/******/ module.exports = promise; -/******/ body((deps) => { -/******/ currentDeps = wrapDeps(deps); -/******/ var fn; -/******/ var getResult = () => (currentDeps.map((d) => { -/******/ if(d[webpackError]) throw d[webpackError]; -/******/ return d[webpackExports]; -/******/ })) -/******/ var promise = new Promise((resolve) => { -/******/ fn = () => (resolve(getResult)); -/******/ fn.r = 0; -/******/ var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))); -/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue))); -/******/ }); -/******/ return fn.r ? promise : getResult(); -/******/ }, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))); -/******/ queue && queue.d < 0 && (queue.d = 0); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/create fake namespace object */ -/******/ (() => { -/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); -/******/ var leafPrototypes; -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 16: return value when it's Promise-like -/******/ // mode & 8|1: behave like require -/******/ __nccwpck_require__.t = function(value, mode) { -/******/ if(mode & 1) value = this(value); -/******/ if(mode & 8) return value; -/******/ if(typeof value === 'object' && value) { -/******/ if((mode & 4) && value.__esModule) return value; -/******/ if((mode & 16) && typeof value.then === 'function') return value; -/******/ } -/******/ var ns = Object.create(null); -/******/ __nccwpck_require__.r(ns); -/******/ var def = {}; -/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; -/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { -/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); -/******/ } -/******/ def['default'] = () => (value); -/******/ __nccwpck_require__.d(ns, def); -/******/ return ns; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module used 'module' so it can't be inlined -/******/ var __webpack_exports__ = __nccwpck_require__(1699); -/******/ __webpack_exports__ = await __webpack_exports__; -/******/ var __webpack_exports__checkApiOfPackage = __webpack_exports__.i8; -/******/ var __webpack_exports__checkBarrelRecursive = __webpack_exports__.le; -/******/ var __webpack_exports__checkIndexFileExists = __webpack_exports__.NV; -/******/ var __webpack_exports__exportAllInBarrel = __webpack_exports__.ZY; -/******/ var __webpack_exports__parseBarrelFile = __webpack_exports__.ad; -/******/ var __webpack_exports__parseExportedObjectsInFile = __webpack_exports__.IR; -/******/ var __webpack_exports__parseIndexFile = __webpack_exports__.gw; -/******/ var __webpack_exports__parseTypeDefinitionFiles = __webpack_exports__.aS; -/******/ var __webpack_exports__regexExportedIndex = __webpack_exports__.tk; -/******/ var __webpack_exports__regexExportedInternal = __webpack_exports__.YG; -/******/ var __webpack_exports__typeDescriptorPaths = __webpack_exports__.qc; -/******/ export { __webpack_exports__checkApiOfPackage as checkApiOfPackage, __webpack_exports__checkBarrelRecursive as checkBarrelRecursive, __webpack_exports__checkIndexFileExists as checkIndexFileExists, __webpack_exports__exportAllInBarrel as exportAllInBarrel, __webpack_exports__parseBarrelFile as parseBarrelFile, __webpack_exports__parseExportedObjectsInFile as parseExportedObjectsInFile, __webpack_exports__parseIndexFile as parseIndexFile, __webpack_exports__parseTypeDefinitionFiles as parseTypeDefinitionFiles, __webpack_exports__regexExportedIndex as regexExportedIndex, __webpack_exports__regexExportedInternal as regexExportedInternal, __webpack_exports__typeDescriptorPaths as typeDescriptorPaths }; -/******/ diff --git a/.github/actions/get-changelog/action.yml b/.github/actions/get-changelog/action.yml index f0ce5d6977..c1df9845af 100644 --- a/.github/actions/get-changelog/action.yml +++ b/.github/actions/get-changelog/action.yml @@ -5,4 +5,4 @@ outputs: description: 'The current changelog' runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/get-changelog/dist/index.js b/.github/actions/get-changelog/dist/index.js new file mode 100644 index 0000000000..da60049696 --- /dev/null +++ b/.github/actions/get-changelog/dist/index.js @@ -0,0 +1,16219 @@ +import { createRequire } from "node:module"; +import { readFileSync } from "node:fs"; +import { readFile } from "node:fs/promises"; +import * as os$1 from "os"; +import os, { EOL } from "os"; +import * as crypto from "crypto"; +import * as fs from "fs"; +import { constants, promises } from "fs"; +import * as path from "path"; +import * as events from "events"; +import "child_process"; +import "timers"; +var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js +/** +* Sanitizes an input into a string so it can be passed into issueCommand safely +* @param input input to sanitize into a string +*/ +function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); +} +/** +* +* @param annotationProperties +* @returns The command properties to send with the actual annotation command +* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 +*/ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js +/** +* Issues a command to the GitHub Actions runner +* +* @param command - The command name to issue +* @param properties - Additional properties for the command (key-value pairs) +* @param message - The message to include with the command +* @remarks +* This function outputs a specially formatted string to stdout that the Actions +* runner interprets as a command. These commands can control workflow behavior, +* set outputs, create annotations, mask values, and more. +* +* Command Format: +* ::name key=value,key=value::message +* +* @example +* ```typescript +* // Issue a warning annotation +* issueCommand('warning', {}, 'This is a warning message'); +* // Output: ::warning::This is a warning message +* +* // Set an environment variable +* issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); +* // Output: ::set-env name=MY_VAR::some value +* +* // Add a secret mask +* issueCommand('add-mask', {}, 'secretValue123'); +* // Output: ::add-mask::secretValue123 +* ``` +* +* @internal +* This is an internal utility function that powers the public API functions +* such as setSecret, warning, error, and exportVariable. +*/ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$1.EOL); +} +const CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) throw new Error(`Unable to find environment variable for file command ${command}`); + if (!fs.existsSync(filePath)) throw new Error(`Missing file at path: ${filePath}`); + fs.appendFileSync(filePath, `${toCommandValue(message)}${os$1.EOL}`, { encoding: "utf8" }); +} +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter)) throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + if (convertedValue.includes(delimiter)) throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + return `${key}<<${delimiter}${os$1.EOL}${convertedValue}${os$1.EOL}${delimiter}`; +} +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { + __require("net"); + __require("tls"); + var http$1 = __require("http"); + __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$2 = __require("util"); + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$1.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$2.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; +})); +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_tunnel$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + const kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"); + var MessageSizeExceededError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + get [kMessageSizeExceededError]() { + return true; + } + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$4(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$26 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$2 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$26(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$26(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$2.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$26(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$26(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$26(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$1 = __require("node:util"); + const undiciDebugLog = util$1.debuglog("undici"); + const fetchDebuglog = util$1.debuglog("fetch"); + const websocketDebuglog = util$1.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$25 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$4(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (upgrade && !isValidHeaderValue(upgrade)) throw new InvalidArgumentError("invalid upgrade header"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$25(!this.aborted); + assert$25(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$25(!this.aborted); + assert$25(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$25(!this.aborted); + assert$25(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$25(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (headerName === "host") { + if (request.host !== null) throw new InvalidArgumentError("duplicate host header"); + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) throw new InvalidArgumentError("duplicate content-length header"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const EventEmitter = __require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + var DispatcherBase = class extends Dispatcher { + constructor(opts) { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 }; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = 499; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const net$1 = __require("node:net"); + const assert$24 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$24(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$24(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"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2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9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EBQYkBIQMM8AELIAFBAWohAUGKASEDDO8BCyABQQFqIQFBjwEhAwzuAQsgAUEBaiEBQZEBIQMM7QELQacBIQMgASAERg2FAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAER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AIQMMuAELIAJBADYCHCACIAE2AhQgAkGMHDYCECACQQc2AgxBACEDDLcBCyACQQA2AhwgAiABNgIUIAJBww82AhAgAkEHNgIMQQAhAwy2AQsgAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBF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1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHR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IAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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AQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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MDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet: new Set(subresource), + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$23 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$23(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$23(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$23(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$23(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { types: types$3, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$3.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$3.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$3.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$3.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$3.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$2(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$22 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$22(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$22(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$22(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$22(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$22("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$2 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$22(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject: new EnvironmentSettingsObject() + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/file.js +var require_file = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file(); + const { makeEntry } = require_formdata(); + const assert$21 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$21(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$21(isUSVString(name)); + assert$21(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$21(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$20 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$20(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$20(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$20(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$19 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$3(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$19(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$19(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$19(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 3; + const TIMEOUT_BODY = 5; + const TIMEOUT_KEEP_ALIVE = 8; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$19(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$19(this.ptr != null); + assert$19(currentParser == null); + assert$19(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$19(this.ptr != null); + assert$19(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$19(upgrade); + assert$19(client[kSocket] === socket); + assert$19(!socket.destroyed); + assert$19(!this.paused); + assert$19((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$19(!this.upgrade); + assert$19(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$19(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$19(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$19((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + assert$19(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$19(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$19(statusCode >= 100); + assert$19((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$19(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$19(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$19(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$19(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$19(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$19(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$19(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$19(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$19(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$19(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$19(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$18 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$18(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$18(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$18(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$18(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$18(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$18(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$18(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$18(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$17 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$1 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$17(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$17(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$17(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$16 = __require("node:assert"); + const net = __require("node:net"); + const http = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, webSocket } = {}) { + super({ webSocket }); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$16(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$16(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$16(!client[kConnecting]); + assert$16(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$16(idx !== -1); + const ip = hostname.substring(1, idx); + assert$16(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$16(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$16(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$16(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + super(options); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + super(options); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$15 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + module.exports = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$15(this.start === start, "content-range mismatch"); + assert$15(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$15(start != null && Number.isFinite(start), "content-range mismatch"); + assert$15(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$15(Number.isFinite(this.start)); + assert$15(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$14 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$14(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$14(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return /* @__PURE__ */ new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$13 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$13(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$12 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$11 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$1 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$11(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$1(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$10 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$10(!res, "pipeline cannot be retried"); + assert$10(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } + } + module.exports = pipeline; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$9 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$9(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$9(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$8 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$8(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + module.exports = { MockNotMatchedError: class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + } }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify: promisify$1 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$1(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { promisify } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$1({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$7 = __require("node:assert"); + const util = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$7(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$7(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$7(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$2(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$6 = __require("node:assert"); + const { types: types$2 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$6(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$6(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$6(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$2.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$2(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$5 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$5(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$4 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$2(); + const EE = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$4(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$4(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$4(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$4(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$4(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$4(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$1 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$1.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const assert$3 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$3(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$2 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$2(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$2(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$1(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$1 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$1(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { parseSetCookie } = require_parse(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 2 ** 16 - 1, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { maxUnsigned16Bit } = require_constants(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const { MessageSizeExceededError } = require_errors(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; + } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + const { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {number} */ + #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { maxPayloadSize }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { Transform } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); +require_tunnel(); +require_undici(); +var HttpCodes; +(function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect; +HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout; +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js +var __awaiter$6 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { access, appendFile, writeFile } = promises; +const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$6(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$6(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$6(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +new Summary(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js +var __awaiter$5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs.promises; +const IS_WINDOWS$1 = process.platform === "win32"; +fs.constants.O_RDONLY; +/** +* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: +* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). +*/ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (IS_WINDOWS$1) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); +} +/** +* Best effort attempt to determine whether a file exists and is executable. +* @param filePath file path to check +* @param extensions additional file extensions to try +* @return if file exists and is executable, returns the file path. otherwise empty string. +*/ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter$5(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + const upperExt = path.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + try { + const directory = path.dirname(filePath); + const upperName = path.basename(filePath).toUpperCase(); + for (const actualName of yield readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); +} +function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$1) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js +var __awaiter$4 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/** +* Returns path of a tool had the tool actually been invoked. Resolves via paths. +* If you check and the tool does not exist, it will throw. +* +* @param tool name of the tool +* @param check whether to check if tool exists +* @returns Promise path to tool +*/ +function which(tool, check) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (IS_WINDOWS$1) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); +} +/** +* Returns a list of all occurrences of the given tool on the system path. +* +* @returns Promise the paths of the tool +*/ +function findInPath(tool) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (IS_WINDOWS$1 && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path.delimiter)) if (extension) extensions.push(extension); + } + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); +} +process.platform; +events.EventEmitter; +events.EventEmitter; +os.platform(); +os.arch(); +/** +* The code to exit an action +*/ +var ExitCode; +(function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +/** +* Sets the value of an output. +* +* @param name name of the output to set +* @param value value to store. Non-string values will be converted to a string via JSON.stringify +*/ +function setOutput(name, value) { + if (process.env["GITHUB_OUTPUT"] || "") return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); + process.stdout.write(os$1.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); +} +/** +* Sets the action status to failed. +* When the action exits it will be with an exit code of 1 +* @param message add error issue message +*/ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +/** +* Adds an error issue +* @param message error issue message. Errors will be converted to string via toString() +* @param properties optional properties to add to the annotation. +*/ +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +//#endregion +//#region index.ts +async function getPackageVersion() { + const packageJson = await readFile("package.json", "utf8"); + return JSON.parse(packageJson).version; +} +async function getChangelog(v) { + const [, olderLogs] = readFileSync("CHANGELOG.md", { encoding: "utf8" }).split(`\n# ${v || await getPackageVersion()}`); + const logs = olderLogs.split("\n# ")[0]; + return logs.slice(logs.indexOf("\n##") + 1); +} +(async () => { + try { + setOutput("changelog", await getChangelog()); + } catch (error) { + setFailed(error.message); + } +})(); +//#endregion +export {}; diff --git a/.github/actions/get-changelog/index.js b/.github/actions/get-changelog/index.js deleted file mode 100644 index 8a292e5354..0000000000 --- a/.github/actions/get-changelog/index.js +++ /dev/null @@ -1,30950 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* unused reexport */ __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -__webpack_unused_export__ = httpOverHttp; -__webpack_unused_export__ = httpsOverHttp; -__webpack_unused_export__ = httpOverHttps; -__webpack_unused_export__ = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -__webpack_unused_export__ = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -__webpack_unused_export__ = Dispatcher -__webpack_unused_export__ = Client -__webpack_unused_export__ = Pool -__webpack_unused_export__ = BalancedPool -__webpack_unused_export__ = Agent -__webpack_unused_export__ = ProxyAgent -__webpack_unused_export__ = EnvHttpProxyAgent -__webpack_unused_export__ = RetryAgent -__webpack_unused_export__ = RetryHandler - -__webpack_unused_export__ = DecoratorHandler -__webpack_unused_export__ = RedirectHandler -__webpack_unused_export__ = createRedirectInterceptor -__webpack_unused_export__ = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -__webpack_unused_export__ = buildConnector -__webpack_unused_export__ = errors -__webpack_unused_export__ = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -__webpack_unused_export__ = setGlobalDispatcher -__webpack_unused_export__ = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -__webpack_unused_export__ = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -/* unused reexport */ __nccwpck_require__(9822).Headers -/* unused reexport */ __nccwpck_require__(8661).Response -/* unused reexport */ __nccwpck_require__(6465).Request -/* unused reexport */ __nccwpck_require__(9976).FormData -__webpack_unused_export__ = globalThis.File ?? (__nccwpck_require__(4573).File) -/* unused reexport */ __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -__webpack_unused_export__ = setGlobalOrigin -__webpack_unused_export__ = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -__webpack_unused_export__ = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -__webpack_unused_export__ = deleteCookie -__webpack_unused_export__ = getCookies -__webpack_unused_export__ = getSetCookies -__webpack_unused_export__ = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -__webpack_unused_export__ = parseMIMEType -__webpack_unused_export__ = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -/* unused reexport */ __nccwpck_require__(7976).WebSocket -__webpack_unused_export__ = CloseEvent -__webpack_unused_export__ = ErrorEvent -__webpack_unused_export__ = MessageEvent - -__webpack_unused_export__ = makeDispatcher(api.request) -__webpack_unused_export__ = makeDispatcher(api.stream) -__webpack_unused_export__ = makeDispatcher(api.pipeline) -__webpack_unused_export__ = makeDispatcher(api.connect) -__webpack_unused_export__ = makeDispatcher(api.upgrade) - -__webpack_unused_export__ = MockClient -__webpack_unused_export__ = MockPool -__webpack_unused_export__ = MockAgent -__webpack_unused_export__ = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -__webpack_unused_export__ = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAA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ELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYCECACQRo2AgxBACEDDKIBCyACQeQANgIcIAIgATYCFCACQeMXNgIQIAJBFTYCDEEAIQMMoQELIAJBADYCACAGQQFqIQEgAi0AKSIAQSNrQQtJDQQCQCAAQQZLDQBBASAAdEHKAHFFDQAMBQ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BAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAEH6yAALBAEAAAIAQZDJAAtfAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAQfrKAAsEAQAAAQBBkMsACwEBAEGqywALQQIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAEH6zAALBAEAAAEAQZDNAAsBAQBBms0ACwYCAAAAAAIAQbHNAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB8M4AC5YBTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9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coAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwNDtgBDxDXARES1gETFBUWFxgZGhvgAd8BHB0e1QEfICEiIyQl1AEmJygpKiss0wHSAS0u0QHQAS8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRtsBR0hJSs8BzgFLzQFMzAFN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QAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEB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ohAUHEACEDDMUCCyABIARHBEAgAkENNgIIIAIgATYCBEHFACEDDMUCC0HPACEDDN0CCwJAAkAgAS0AAEEKaw4EAZABkAEAkAELIAFBAWohAQtBKCEDDMMCCyABIARGBEBB0QAhAwzcAgsgAS0AAEEgRw0AIAFBAWohASACLQAtQQFxRQ3QAQtBFyEDDMECCyABIARHDcsBQdIAIQMM2QILQdMAIQMgASAERg3YAiACKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABB1sIAai0AAEcNxwEgAEEBRg3KASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBjYCAAzYAgsgASAERgRAQdUAIQMM2AILIAEtAABBCkcNwgEgAUEBaiEBDMoBCyABIARGBEBB1gAhAwzXAgsCQAJAIAEtAABBCmsOBADDAcMBAcMBCyABQQFqIQEMygELIAFBAWohAUHKACEDDL0CC0EAIQACQCACKAI4IgNFDQAgAygCPCIDRQ0AIAIgAxEAACEACyAADb8BQc0AIQMMvAILIAItAClBIkYNzwIMiQELIAQgASIFRgRAQdsAIQMM1AILQQAhAEEBIQFBASEGQQAhAwJAAn8CQAJAAkACQAJAAkACQCAFLQAAQTBrDgrFAcQBAAECAwQFBgjDAQtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshA0EAIQFBACEGDL0BC0EJIQNBASEAQQAhAUEAIQYMvAELIAEgBEYEQEHdACEDDNMCCyABLQAAQS5HDbgBIAFBAWohAQyIAQsgASAERw22AUHfACEDDNECCyABIARHBEAgAkEONgIIIAIgATYCBEHQACEDDLgCC0HgACEDDNACC0HhACEDIAEgBEYNzwIgAigCACIAIAQgAWtqIQUgASAAa0EDaiEGA0AgAS0AACAAQeLCAGotAABHDbEBIABBA0YNswEgAEEBaiEAIAQgAUEBaiIBRw0ACyACIAU2AgAMzwILQeIAIQMgASAERg3OAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYDQCABLQAAIABB5sIAai0AAEcNsAEgAEECRg2vASAAQQFqIQAgBCABQQFqI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gAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQe3PAGotAABHDXIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADLACCyACQQA2AgAgBkEBaiEBQRAMcwtB/gAhAyABIARGDa4CIAIoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQfbOAGotAABHDXEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK8CCyACQQA2AgAgBkEBaiEBQRYMcgtB/wAhAyABIARGDa0CIAIoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQfzOAGotAABHDXAgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADK4CCyACQQA2AgAgBkEBaiEBQQUMcQsgASAERgRAQYABIQMMrQILIAEtAABB2QBHDW4gAUEBaiEBQQgMcAsgASAERgRAQYEBIQMMrAILAkACQCABLQAAQc4Aaw4DAG8BbwsgAUEBaiEBQesAIQMMkwILIAFBAWohAUHsACEDDJICCyABIARGBEBBggEhAwyrAgsCQAJAIAEtAABByABrDggAbm5ubm5uAW4LIAFBAWohAUHqACEDDJICCyABQQFqIQFB7QAhAwyRAgtBgwEhAyABIARGDakCIAIoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQYDPAGotAABHDWwgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKoCCyACQQA2AgAgBkEBaiEBQQAMbQtBhAEhAyABIARGDagCIAIoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQYPPAGotAABHDWsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAiAFNgIADKkCCyACQQA2AgAgBkEBaiEBQSMMbAsgASAERgRAQYUBIQMMqAILAkACQCABLQAAQcwAaw4IAGtra2trawFrCyABQQFqIQFB7wAhAwyPAgsgAUEBaiEBQfAAIQMMjgILIAEgBEYEQEGGASEDDKcCCyABLQAAQcUARw1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ACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQQAhAwykAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQAgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwyjAQtB1QAhAwyJAQsgAEEVRwRAIAJBADYCHCACIAE2AhQgAkG5DTYC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QEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAQfnGAAsEAQAAAQBBkccAC98BAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBB+sgACwQBAAACAEGQyQALXwMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAEH6ygALBAEAAAEAQZDLAAsBAQBBqssAC0ECAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; - -;// CONCATENATED MODULE: external "node:fs" -const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs"); -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -;// CONCATENATED MODULE: external "os" -const external_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_namespaceObject.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -;// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); -;// CONCATENATED MODULE: external "fs" -const external_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!external_fs_namespaceObject.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - external_fs_namespaceObject.appendFileSync(filePath, `${utils_toCommandValue(message)}${external_os_namespaceObject.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${external_crypto_namespaceObject.randomUUID()}`; - const convertedValue = utils_toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${external_os_namespaceObject.EOL}${convertedValue}${external_os_namespaceObject.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -;// CONCATENATED MODULE: external "path" -const external_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_namespaceObject.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_namespaceObject.constants.R_OK | external_fs_namespaceObject.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_namespaceObject.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -;// CONCATENATED MODULE: external "child_process" -const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_namespaceObject.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_namespaceObject.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_namespaceObject.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_namespaceObject.dirname(filePath); - const upperName = external_path_namespaceObject.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_namespaceObject.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_namespaceObject.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_namespaceObject.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_namespaceObject.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_namespaceObject.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_namespaceObject.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_namespaceObject.EOL.length); - n = s.indexOf(external_os_namespaceObject.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_namespaceObject.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_namespaceObject.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_namespaceObject.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_namespaceObject.platform(); -const arch = external_os_namespaceObject.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return file_command_issueFileCommand('OUTPUT', file_command_prepareKeyValueMessage(name, value)); - } - process.stdout.write(external_os_namespaceObject.EOL); - command_issueCommand('set-output', { name }, utils_toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map -;// CONCATENATED MODULE: ./lib/build-packages/get-changelog/index.js - - - -async function getPackageVersion() { - const packageJson = await (0,promises_namespaceObject.readFile)('package.json', 'utf8'); - return JSON.parse(packageJson).version; -} -async function getChangelog(v) { - const changelog = (0,external_node_fs_namespaceObject.readFileSync)('CHANGELOG.md', { encoding: 'utf8' }); - const [, olderLogs] = changelog.split(`\n# ${v || (await getPackageVersion())}`); - const logs = olderLogs.split('\n# ')[0]; - return logs.slice(logs.indexOf('\n##') + 1); -} -(async () => { - try { - setOutput('changelog', await getChangelog()); - } - catch (error) { - setFailed(error.message); - } -})(); - diff --git a/.github/actions/merge-and-write-changelogs/action.yml b/.github/actions/merge-and-write-changelogs/action.yml index 02addb8e9e..3bc07a958c 100644 --- a/.github/actions/merge-and-write-changelogs/action.yml +++ b/.github/actions/merge-and-write-changelogs/action.yml @@ -2,4 +2,4 @@ name: 'Merge Changelogs' description: 'Merges all public changelogs from changesets into a single changelog.' runs: using: 'node24' - main: 'index.js' + main: 'dist/index.js' diff --git a/.github/actions/merge-and-write-changelogs/dist/index.js b/.github/actions/merge-and-write-changelogs/dist/index.js new file mode 100644 index 0000000000..aa0a3756d3 --- /dev/null +++ b/.github/actions/merge-and-write-changelogs/dist/index.js @@ -0,0 +1,26818 @@ +import { createRequire } from "node:module"; +import { readFile, writeFile } from "node:fs/promises"; +import { resolve } from "node:path"; +import * as os$3 from "os"; +import os, { EOL } from "os"; +import * as fs$7 from "fs"; +import { constants, promises } from "fs"; +import * as path$15 from "path"; +import * as events from "events"; +import "child_process"; +import "timers"; +var __defProp$1 = Object.defineProperty; +var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; +var __getOwnPropNames$1 = Object.getOwnPropertyNames; +var __hasOwnProp$1 = Object.prototype.hasOwnProperty; +var __esmMin = (fn, res, err) => () => { + if (err) throw err[0]; + try { + return fn && (res = fn(fn = 0)), res; + } catch (e) { + throw err = [e], e; + } +}; +var __commonJSMin$1 = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp$1(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp$1(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +var __copyProps$1 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable + }); + } + return to; +}; +var __toCommonJS = (mod) => __hasOwnProp$1.call(mod, "module.exports") ? mod["module.exports"] : __copyProps$1(__defProp$1({}, "__esModule", { value: true }), mod); +var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js +/** +* Sanitizes an input into a string so it can be passed into issueCommand safely +* @param input input to sanitize into a string +*/ +function toCommandValue(input) { + if (input === null || input === void 0) return ""; + else if (typeof input === "string" || input instanceof String) return input; + return JSON.stringify(input); +} +/** +* +* @param annotationProperties +* @returns The command properties to send with the actual annotation command +* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 +*/ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) return {}; + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js +/** +* Issues a command to the GitHub Actions runner +* +* @param command - The command name to issue +* @param properties - Additional properties for the command (key-value pairs) +* @param message - The message to include with the command +* @remarks +* This function outputs a specially formatted string to stdout that the Actions +* runner interprets as a command. These commands can control workflow behavior, +* set outputs, create annotations, mask values, and more. +* +* Command Format: +* ::name key=value,key=value::message +* +* @example +* ```typescript +* // Issue a warning annotation +* issueCommand('warning', {}, 'This is a warning message'); +* // Output: ::warning::This is a warning message +* +* // Set an environment variable +* issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); +* // Output: ::set-env name=MY_VAR::some value +* +* // Add a secret mask +* issueCommand('add-mask', {}, 'secretValue123'); +* // Output: ::add-mask::secretValue123 +* ``` +* +* @internal +* This is an internal utility function that powers the public API functions +* such as setSecret, warning, error, and exportVariable. +*/ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os$3.EOL); +} +const CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message) { + if (!command) command = "missing.command"; + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) first = false; + else cmdStr += ","; + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +}; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + __require("net"); + __require("tls"); + var http$1 = __require("http"); + __require("https"); + var events$1 = __require("events"); + __require("assert"); + var util$4 = __require("util"); + function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http$1.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + self.on("free", function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); + } + util$4.inherits(TunnelingAgent, events$1.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); + if (self.sockets.length >= this.maxSockets) { + self.requests.push(options); + return; + } + self.createSocket(options, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self.emit("free", socket, options); + } + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: "CONNECT", + path: options.host + ":" + options.port, + agent: false, + headers: { host: options.host + ":" + options.port } + }); + if (options.localAddress) connectOptions.localAddress = options.localAddress; + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug("making CONNECT request"); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug("tunneling socket could not be established, statusCode=%d", res.statusCode); + socket.destroy(); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug("got illegal response body from proxy"); + socket.destroy(); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + return; + } + debug("tunneling connection has established"); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); + error.code = "ECONNRESET"; + options.request.emit("error", error); + self.removeSocket(placeholder); + } + }; + TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket); + if (pos === -1) return; + this.sockets.splice(pos, 1); + var pending = this.requests.shift(); + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + }; + function toOptions(host, port, localAddress) { + if (typeof host === "string") return { + host, + port, + localAddress + }; + return host; + } + function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === "object") { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== void 0) target[k] = overrides[k]; + } + } + } + return target; + } + var debug; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; +})); +//#endregion +//#region ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = require_tunnel$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/symbols.js +var require_symbols$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kClose: Symbol("close"), + kDestroy: Symbol("destroy"), + kDispatch: Symbol("dispatch"), + kUrl: Symbol("url"), + kWriting: Symbol("writing"), + kResuming: Symbol("resuming"), + kQueue: Symbol("queue"), + kConnect: Symbol("connect"), + kConnecting: Symbol("connecting"), + kKeepAliveDefaultTimeout: Symbol("default keep alive timeout"), + kKeepAliveMaxTimeout: Symbol("max keep alive timeout"), + kKeepAliveTimeoutThreshold: Symbol("keep alive timeout threshold"), + kKeepAliveTimeoutValue: Symbol("keep alive timeout"), + kKeepAlive: Symbol("keep alive"), + kHeadersTimeout: Symbol("headers timeout"), + kBodyTimeout: Symbol("body timeout"), + kServerName: Symbol("server name"), + kLocalAddress: Symbol("local address"), + kHost: Symbol("host"), + kNoRef: Symbol("no ref"), + kBodyUsed: Symbol("used"), + kBody: Symbol("abstracted request body"), + kRunning: Symbol("running"), + kBlocking: Symbol("blocking"), + kPending: Symbol("pending"), + kSize: Symbol("size"), + kBusy: Symbol("busy"), + kQueued: Symbol("queued"), + kFree: Symbol("free"), + kConnected: Symbol("connected"), + kClosed: Symbol("closed"), + kNeedDrain: Symbol("need drain"), + kReset: Symbol("reset"), + kDestroyed: Symbol.for("nodejs.stream.destroyed"), + kResume: Symbol("resume"), + kOnError: Symbol("on error"), + kMaxHeadersSize: Symbol("max headers size"), + kRunningIdx: Symbol("running index"), + kPendingIdx: Symbol("pending index"), + kError: Symbol("error"), + kClients: Symbol("clients"), + kClient: Symbol("client"), + kParser: Symbol("parser"), + kOnDestroyed: Symbol("destroy callbacks"), + kPipelining: Symbol("pipelining"), + kSocket: Symbol("socket"), + kHostHeader: Symbol("host header"), + kConnector: Symbol("connector"), + kStrictContentLength: Symbol("strict content length"), + kMaxRedirections: Symbol("maxRedirections"), + kMaxRequests: Symbol("maxRequestsPerClient"), + kProxy: Symbol("proxy agent options"), + kCounter: Symbol("socket request counter"), + kInterceptors: Symbol("dispatch interceptors"), + kMaxResponseSize: Symbol("max response size"), + kHTTP2Session: Symbol("http2Session"), + kHTTP2SessionState: Symbol("http2Session state"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable"), + kListeners: Symbol("listeners"), + kHTTPContext: Symbol("http context"), + kMaxConcurrentStreams: Symbol("max concurrent streams"), + kNoProxyAgent: Symbol("no proxy agent"), + kHttpProxyAgent: Symbol("http proxy agent"), + kHttpsProxyAgent: Symbol("https proxy agent") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/errors.js +var require_errors = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const kUndiciError = Symbol.for("undici.error.UND_ERR"); + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kUndiciError] === true; + } + [kUndiciError] = true; + }; + const kConnectTimeoutError = Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"); + var ConnectTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kConnectTimeoutError] === true; + } + [kConnectTimeoutError] = true; + }; + const kHeadersTimeoutError = Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"); + var HeadersTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersTimeoutError] === true; + } + [kHeadersTimeoutError] = true; + }; + const kHeadersOverflowError = Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"); + var HeadersOverflowError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHeadersOverflowError] === true; + } + [kHeadersOverflowError] = true; + }; + const kBodyTimeoutError = Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"); + var BodyTimeoutError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBodyTimeoutError] === true; + } + [kBodyTimeoutError] = true; + }; + const kResponseStatusCodeError = Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"); + var ResponseStatusCodeError = class extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + this.name = "ResponseStatusCodeError"; + this.message = message || "Response Status Code Error"; + this.code = "UND_ERR_RESPONSE_STATUS_CODE"; + this.body = body; + this.status = statusCode; + this.statusCode = statusCode; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseStatusCodeError] === true; + } + [kResponseStatusCodeError] = true; + }; + const kInvalidArgumentError = Symbol.for("undici.error.UND_ERR_INVALID_ARG"); + var InvalidArgumentError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidArgumentError] === true; + } + [kInvalidArgumentError] = true; + }; + const kInvalidReturnValueError = Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE"); + var InvalidReturnValueError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInvalidReturnValueError] === true; + } + [kInvalidReturnValueError] = true; + }; + const kAbortError = Symbol.for("undici.error.UND_ERR_ABORT"); + var AbortError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "The operation was aborted"; + this.code = "UND_ERR_ABORT"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kAbortError] === true; + } + [kAbortError] = true; + }; + const kRequestAbortedError = Symbol.for("undici.error.UND_ERR_ABORTED"); + var RequestAbortedError = class extends AbortError { + constructor(message) { + super(message); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestAbortedError] === true; + } + [kRequestAbortedError] = true; + }; + const kInformationalError = Symbol.for("undici.error.UND_ERR_INFO"); + var InformationalError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kInformationalError] === true; + } + [kInformationalError] = true; + }; + const kRequestContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"); + var RequestContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestContentLengthMismatchError] === true; + } + [kRequestContentLengthMismatchError] = true; + }; + const kResponseContentLengthMismatchError = Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH"); + var ResponseContentLengthMismatchError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseContentLengthMismatchError] === true; + } + [kResponseContentLengthMismatchError] = true; + }; + const kClientDestroyedError = Symbol.for("undici.error.UND_ERR_DESTROYED"); + var ClientDestroyedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientDestroyedError] === true; + } + [kClientDestroyedError] = true; + }; + const kClientClosedError = Symbol.for("undici.error.UND_ERR_CLOSED"); + var ClientClosedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kClientClosedError] === true; + } + [kClientClosedError] = true; + }; + const kSocketError = Symbol.for("undici.error.UND_ERR_SOCKET"); + var SocketError = class extends UndiciError { + constructor(message, socket) { + super(message); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSocketError] === true; + } + [kSocketError] = true; + }; + const kNotSupportedError = Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED"); + var NotSupportedError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kNotSupportedError] === true; + } + [kNotSupportedError] = true; + }; + const kBalancedPoolMissingUpstreamError = Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM"); + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kBalancedPoolMissingUpstreamError] === true; + } + [kBalancedPoolMissingUpstreamError] = true; + }; + const kHTTPParserError = Symbol.for("undici.error.UND_ERR_HTTP_PARSER"); + var HTTPParserError = class extends Error { + constructor(message, code, data) { + super(message); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kHTTPParserError] === true; + } + [kHTTPParserError] = true; + }; + const kResponseExceededMaxSizeError = Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE"); + var ResponseExceededMaxSizeError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseExceededMaxSizeError] === true; + } + [kResponseExceededMaxSizeError] = true; + }; + const kRequestRetryError = Symbol.for("undici.error.UND_ERR_REQ_RETRY"); + var RequestRetryError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kRequestRetryError] === true; + } + [kRequestRetryError] = true; + }; + const kResponseError = Symbol.for("undici.error.UND_ERR_RESPONSE"); + var ResponseError = class extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + this.name = "ResponseError"; + this.message = message || "Response error"; + this.code = "UND_ERR_RESPONSE"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kResponseError] === true; + } + [kResponseError] = true; + }; + const kSecureProxyConnectionError = Symbol.for("undici.error.UND_ERR_PRX_TLS"); + var SecureProxyConnectionError = class extends UndiciError { + constructor(cause, message, options) { + super(message, { + cause, + ...options ?? {} + }); + this.name = "SecureProxyConnectionError"; + this.message = message || "Secure Proxy Connection failed"; + this.code = "UND_ERR_PRX_TLS"; + this.cause = cause; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kSecureProxyConnectionError] === true; + } + [kSecureProxyConnectionError] = true; + }; + const kMessageSizeExceededError = Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"); + var MessageSizeExceededError = class extends UndiciError { + constructor(message) { + super(message); + this.name = "MessageSizeExceededError"; + this.message = message || "Max decompressed message size exceeded"; + this.code = "UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMessageSizeExceededError] === true; + } + get [kMessageSizeExceededError]() { + return true; + } + }; + module.exports = { + AbortError, + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError, + ResponseError, + SecureProxyConnectionError, + MessageSizeExceededError + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/constants.js +var require_constants$7 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** @type {Record} */ + const headerNameLowerCasedRecord = {}; + const wellknownHeaderNames = [ + "Accept", + "Accept-Encoding", + "Accept-Language", + "Accept-Ranges", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Age", + "Allow", + "Alt-Svc", + "Alt-Used", + "Authorization", + "Cache-Control", + "Clear-Site-Data", + "Connection", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-Length", + "Content-Location", + "Content-Range", + "Content-Security-Policy", + "Content-Security-Policy-Report-Only", + "Content-Type", + "Cookie", + "Cross-Origin-Embedder-Policy", + "Cross-Origin-Opener-Policy", + "Cross-Origin-Resource-Policy", + "Date", + "Device-Memory", + "Downlink", + "ECT", + "ETag", + "Expect", + "Expect-CT", + "Expires", + "Forwarded", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Range", + "If-Unmodified-Since", + "Keep-Alive", + "Last-Modified", + "Link", + "Location", + "Max-Forwards", + "Origin", + "Permissions-Policy", + "Pragma", + "Proxy-Authenticate", + "Proxy-Authorization", + "RTT", + "Range", + "Referer", + "Referrer-Policy", + "Refresh", + "Retry-After", + "Sec-WebSocket-Accept", + "Sec-WebSocket-Extensions", + "Sec-WebSocket-Key", + "Sec-WebSocket-Protocol", + "Sec-WebSocket-Version", + "Server", + "Server-Timing", + "Service-Worker-Allowed", + "Service-Worker-Navigation-Preload", + "Set-Cookie", + "SourceMap", + "Strict-Transport-Security", + "Supports-Loading-Mode", + "TE", + "Timing-Allow-Origin", + "Trailer", + "Transfer-Encoding", + "Upgrade", + "Upgrade-Insecure-Requests", + "User-Agent", + "Vary", + "Via", + "WWW-Authenticate", + "X-Content-Type-Options", + "X-DNS-Prefetch-Control", + "X-Frame-Options", + "X-Permitted-Cross-Domain-Policies", + "X-Powered-By", + "X-Requested-With", + "X-XSS-Protection" + ]; + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/tree.js +var require_tree = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { wellknownHeaderNames, headerNameLowerCasedRecord } = require_constants$7(); + var TstNode = class TstNode { + /** @type {any} */ + value = null; + /** @type {null | TstNode} */ + left = null; + /** @type {null | TstNode} */ + middle = null; + /** @type {null | TstNode} */ + right = null; + /** @type {number} */ + code; + /** + * @param {string} key + * @param {any} value + * @param {number} index + */ + constructor(key, value, index) { + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; + } + /** + * @param {string} key + * @param {any} value + */ + add(key, value) { + const length = key.length; + if (length === 0) throw new TypeError("Unreachable"); + let index = 0; + let node = this; + while (true) { + const code = key.charCodeAt(index); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; + } + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { + node.right = new TstNode(key, value, index); + break; + } + } + } + /** + * @param {Uint8Array} key + * @return {TstNode | null} + */ + search(key) { + const keylength = key.length; + let index = 0; + let node = this; + while (node !== null && index < keylength) { + let code = key[index]; + if (code <= 90 && code >= 65) code |= 32; + while (node !== null) { + if (code === node.code) { + if (keylength === ++index) return node; + node = node.middle; + break; + } + node = node.code < code ? node.left : node.right; + } + } + return null; + } + }; + var TernarySearchTree = class { + /** @type {TstNode | null} */ + node = null; + /** + * @param {string} key + * @param {any} value + * */ + insert(key, value) { + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); + } + /** + * @param {Uint8Array} key + * @return {any} + */ + lookup(key) { + return this.node?.search(key)?.value ?? null; + } + }; + const tree = new TernarySearchTree(); + for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]]; + tree.insert(key, key); + } + module.exports = { + TernarySearchTree, + tree + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/util.js +var require_util$7 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$27 = __require("node:assert"); + const { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols$4(); + const { IncomingMessage } = __require("node:http"); + const stream = __require("node:stream"); + const net$2 = __require("node:net"); + const { Blob: Blob$3 } = __require("node:buffer"); + const nodeUtil$3 = __require("node:util"); + const { stringify } = __require("node:querystring"); + const { EventEmitter: EE$2 } = __require("node:events"); + const { InvalidArgumentError } = require_errors(); + const { headerNameLowerCasedRecord } = require_constants$7(); + const { tree } = require_tree(); + const [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$27(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + function wrapRequestBody(body) { + if (isStream(body)) { + if (bodyLength(body) === 0) body.on("data", function() { + assert$27(false); + }); + if (typeof body.readableDidRead !== "boolean") { + body[kBodyUsed] = false; + EE$2.prototype.on.call(body, "data", function() { + this[kBodyUsed] = true; + }); + } + return body; + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; + } + function nop() {} + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; + } + function isBlobLike(object) { + if (object === null) return false; + else if (object instanceof Blob$3) return true; + else if (typeof object !== "object") return false; + else { + const sTag = object[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); + } + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); + const stringified = stringify(queryParams); + if (stringified) url += "?" + stringified; + return url; + } + function isValidPort(port) { + const value = parseInt(port, 10); + return value === Number(port) && value >= 0 && value <= 65535; + } + function isHttpOrHttpsPrefixed(value) { + return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; + let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; + let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; + return new URL(`${origin}${path}`); + } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); + return url; + } + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); + return url; + } + function getHostname(host) { + if (host[0] === "[") { + const idx = host.indexOf("]"); + assert$27(idx !== -1); + return host.substring(1, idx); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); + } + function getServerName(host) { + if (!host) return null; + assert$27(typeof host === "string"); + const servername = getHostname(host); + if (net$2.isIP(servername)) return ""; + return servername; + } + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); + } + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); + } + function bodyLength(body) { + if (body == null) return 0; + else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; + return null; + } + function isDestroyed(body) { + return body && !!(body.destroyed || body[kDestroyed] || stream.isDestroyed?.(body)); + } + function destroy(stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; + if (typeof stream.destroy === "function") { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; + stream.destroy(err); + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; + } + const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; + } + /** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ + function headerNameToString(value) { + return typeof value === "string" ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() : tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * Receive the buffer as a string and return its lowercase value. + * @param {Buffer} value Header name + * @returns {string} + */ + function bufferToLowerCasedHeaderName(value) { + return tree.lookup(value) ?? value.toString("latin1").toLowerCase(); + } + /** + * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers + * @param {Record} [obj] + * @returns {Record} + */ + function parseHeaders(headers, obj) { + if (obj === void 0) obj = {}; + for (let i = 0; i < headers.length; i += 2) { + const key = headerNameToString(headers[i]); + let val = obj[key]; + if (val) { + if (typeof val === "string") { + val = [val]; + obj[key] = val; + } + val.push(headers[i + 1].toString("utf8")); + } else { + const headersValue = headers[i + 1]; + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("utf8")) : headersValue.toString("utf8"); + } + } + if ("content-length" in obj && "content-disposition" in obj) obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + return obj; + } + function parseRawHeaders(headers) { + const len = headers.length; + const ret = new Array(len); + let hasContentLength = false; + let contentDispositionIdx = -1; + let key; + let val; + let kLen = 0; + for (let n = 0; n < headers.length; n += 2) { + key = headers[n]; + val = headers[n + 1]; + typeof key !== "string" && (key = key.toString()); + typeof val !== "string" && (val = val.toString("utf8")); + kLen = key.length; + if (kLen === 14 && key[7] === "-" && (key === "content-length" || key.toLowerCase() === "content-length")) hasContentLength = true; + else if (kLen === 19 && key[7] === "-" && (key === "content-disposition" || key.toLowerCase() === "content-disposition")) contentDispositionIdx = n + 1; + ret[n] = key; + ret[n + 1] = val; + } + if (hasContentLength && contentDispositionIdx !== -1) ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + return ret; + } + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler, method, upgrade) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); + if (upgrade || method === "CONNECT") { + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); + } else { + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); + } + } + function isDisturbed(body) { + return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])); + } + function isErrored(body) { + return !!(body && stream.isErrored(body)); + } + function isReadable(body) { + return !!(body && stream.isReadable(body)); + } + function getSocketInfo(socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead + }; + } + /** @type {globalThis['ReadableStream']} */ + function ReadableStreamFrom(iterable) { + let iterator; + return new ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + if (buf.byteLength) controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + const hasToWellFormed = typeof String.prototype.toWellFormed === "function"; + const hasIsWellFormed = typeof String.prototype.isWellFormed === "function"; + /** + * @param {string} val + */ + function toUSVString(val) { + return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil$3.toUSVString(val); + } + /** + * @param {string} val + */ + function isUSVString(val) { + return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}`; + } + /** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: return false; + default: return c >= 33 && c <= 126; + } + } + /** + * @param {string} characters + */ + function isValidHTTPToken(characters) { + if (characters.length === 0) return false; + for (let i = 0; i < characters.length; ++i) if (!isTokenCharCode(characters.charCodeAt(i))) return false; + return true; + } + /** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ + const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /** + * @param {string} characters + */ + function isValidHeaderValue(characters) { + return !headerCharRegex.test(characters); + } + function parseRangeHeader(range) { + if (range == null || range === "") return { + start: 0, + end: null, + size: null + }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + function addListener(obj, name, listener) { + (obj[kListeners] ??= []).push([name, listener]); + obj.on(name, listener); + return obj; + } + function removeAllListeners(obj) { + for (const [name, listener] of obj[kListeners] ?? []) obj.removeListener(name, listener); + obj[kListeners] = null; + } + function errorRequest(client, request, err) { + try { + request.onError(err); + assert$27(request.aborted); + } catch (err) { + client.emit("error", err); + } + } + const kEnumerableProperty = Object.create(null); + kEnumerableProperty.enumerable = true; + const normalizedMethodRecordsBase = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + const normalizedMethodRecords = { + ...normalizedMethodRecordsBase, + patch: "patch", + PATCH: "PATCH" + }; + Object.setPrototypeOf(normalizedMethodRecordsBase, null); + Object.setPrototypeOf(normalizedMethodRecords, null); + module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isUSVString, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + bufferToLowerCasedHeaderName, + addListener, + removeAllListeners, + errorRequest, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + addAbortListener, + isValidHTTPToken, + isValidHeaderValue, + isTokenCharCode, + parseRangeHeader, + normalizedMethodRecordsBase, + normalizedMethodRecords, + isValidPort, + isHttpOrHttpsPrefixed, + nodeMajor, + nodeMinor, + safeHTTPMethods: [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ], + wrapRequestBody + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/diagnostics.js +var require_diagnostics = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const diagnosticsChannel = __require("node:diagnostics_channel"); + const util$3 = __require("node:util"); + const undiciDebugLog = util$3.debuglog("undici"); + const fetchDebuglog = util$3.debuglog("fetch"); + const websocketDebuglog = util$3.debuglog("websocket"); + let isClientSet = false; + const channels = { + beforeConnect: diagnosticsChannel.channel("undici:client:beforeConnect"), + connected: diagnosticsChannel.channel("undici:client:connected"), + connectError: diagnosticsChannel.channel("undici:client:connectError"), + sendHeaders: diagnosticsChannel.channel("undici:client:sendHeaders"), + create: diagnosticsChannel.channel("undici:request:create"), + bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + headers: diagnosticsChannel.channel("undici:request:headers"), + trailers: diagnosticsChannel.channel("undici:request:trailers"), + error: diagnosticsChannel.channel("undici:request:error"), + open: diagnosticsChannel.channel("undici:websocket:open"), + close: diagnosticsChannel.channel("undici:websocket:close"), + socketError: diagnosticsChannel.channel("undici:websocket:socket_error"), + ping: diagnosticsChannel.channel("undici:websocket:ping"), + pong: diagnosticsChannel.channel("undici:websocket:pong") + }; + if (undiciDebugLog.enabled || fetchDebuglog.enabled) { + const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { + const { request: { method, path, origin }, response: { statusCode } } = evt; + debuglog("received response to %s %s/%s - HTTP %d", method, origin, path, statusCode); + }); + diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("trailers received from %s %s/%s", method, origin, path); + }); + diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { + const { request: { method, path, origin }, error } = evt; + debuglog("request to %s %s/%s errored - %s", method, origin, path, error.message); + }); + isClientSet = true; + } + if (websocketDebuglog.enabled) { + if (!isClientSet) { + const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; + diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { + const { connectParams: { version, protocol, port, host } } = evt; + debuglog("connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, version); + }); + diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { + const { connectParams: { version, protocol, port, host }, error } = evt; + debuglog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version, error.message); + }); + diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { + const { request: { method, path, origin } } = evt; + debuglog("sending request to %s %s/%s", method, origin, path); + }); + } + diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { + const { address: { address, port } } = evt; + websocketDebuglog("connection opened %s%s", address, port ? `:${port}` : ""); + }); + diagnosticsChannel.channel("undici:websocket:close").subscribe((evt) => { + const { websocket, code, reason } = evt; + websocketDebuglog("closed connection to %s - %s %s", websocket.url, code, reason); + }); + diagnosticsChannel.channel("undici:websocket:socket_error").subscribe((err) => { + websocketDebuglog("connection errored - %s", err.message); + }); + diagnosticsChannel.channel("undici:websocket:ping").subscribe((evt) => { + websocketDebuglog("ping received"); + }); + diagnosticsChannel.channel("undici:websocket:pong").subscribe((evt) => { + websocketDebuglog("pong received"); + }); + } + module.exports = { channels }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/request.js +var require_request$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError, NotSupportedError } = require_errors(); + const assert$26 = __require("node:assert"); + const { isValidHTTPToken, isValidHeaderValue, isStream, destroy, isBuffer, isFormDataLike, isIterable, isBlobLike, buildURL, validateHandler, getServerName, normalizedMethodRecords } = require_util$7(); + const { channels } = require_diagnostics(); + const { headerNameLowerCasedRecord } = require_constants$7(); + const invalidPathRegex = /[^\u0021-\u00ff]/; + const kHandler = Symbol("handler"); + var Request = class { + constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, throwOnError, expectContinue, servername }, handler) { + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (upgrade && !isValidHeaderValue(upgrade)) throw new InvalidArgumentError("invalid upgrade header"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + this.headersTimeout = headersTimeout; + this.bodyTimeout = bodyTimeout; + this.throwOnError = throwOnError === true; + this.method = method; + this.abort = null; + if (body == null) this.body = null; + else if (isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + destroy(this); + }; + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) this.abort(err); + else this.error = err; + }; + this.body.on("error", this.errorHandler); + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); + this.completed = false; + this.aborted = false; + this.upgrade = upgrade || null; + this.path = query ? buildURL(path, query) : path; + this.origin = origin; + this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; + this.blocking = blocking == null ? false : blocking; + this.reset = reset == null ? null : reset; + this.host = null; + this.contentLength = null; + this.contentType = null; + this.headers = []; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); + } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); + validateHandler(handler, method, upgrade); + this.servername = servername || getServerName(this.host); + this[kHandler] = handler; + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + onConnect(abort) { + assert$26(!this.aborted); + assert$26(!this.completed); + if (this.error) abort(this.error); + else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onResponseStarted() { + return this[kHandler].onResponseStarted?.(); + } + onHeaders(statusCode, headers, resume, statusText) { + assert$26(!this.aborted); + assert$26(!this.completed); + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } + } + onData(chunk) { + assert$26(!this.aborted); + assert$26(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert$26(!this.aborted); + assert$26(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert$26(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; + this.aborted = true; + return this[kHandler].onError(error); + } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + }; + function processHeader(request, key, val) { + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; + let headerName = headerNameLowerCasedRecord[key]; + if (headerName === void 0) { + headerName = key.toLowerCase(); + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); + } + if (Array.isArray(val)) { + const arr = []; + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); + val = arr; + } else if (typeof val === "string") { + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; + if (headerName === "host") { + if (request.host !== null) throw new InvalidArgumentError("duplicate host header"); + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); + request.host = val; + } else if (headerName === "content-length") { + if (request.contentLength !== null) throw new InvalidArgumentError("duplicate content-length header"); + request.contentLength = parseInt(val, 10); + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); + } else if (request.contentType === null && headerName === "content-type") { + request.contentType = val; + request.headers.push(key, val); + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { + const value = typeof val === "string" ? val.toLowerCase() : null; + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); + } + module.exports = Request; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher.js +var require_dispatcher = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const EventEmitter = __require("node:events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + compose(...args) { + const interceptors = Array.isArray(args[0]) ? args[0] : args; + let dispatch = this.dispatch.bind(this); + for (const interceptor of interceptors) { + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); + dispatch = interceptor(dispatch); + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); + } + return new ComposedDispatcher(this, dispatch); + } + }; + var ComposedDispatcher = class extends Dispatcher { + #dispatcher = null; + #dispatch = null; + constructor(dispatcher, dispatch) { + super(); + this.#dispatcher = dispatcher; + this.#dispatch = dispatch; + } + dispatch(...args) { + this.#dispatch(...args); + } + close(...args) { + return this.#dispatcher.close(...args); + } + destroy(...args) { + return this.#dispatcher.destroy(...args); + } + }; + module.exports = Dispatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/dispatcher-base.js +var require_dispatcher_base = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Dispatcher = require_dispatcher(); + const { ClientDestroyedError, ClientClosedError, InvalidArgumentError } = require_errors(); + const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = require_symbols$4(); + const kOnDestroyed = Symbol("onDestroyed"); + const kOnClosed = Symbol("onClosed"); + const kInterceptedDispatch = Symbol("Intercepted Dispatch"); + const kWebSocketOptions = Symbol("webSocketOptions"); + var DispatcherBase = class extends Dispatcher { + constructor(opts) { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + this[kWebSocketOptions] = opts?.webSocket ?? {}; + } + get webSocketOptions() { + return { maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 }; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) if (typeof this[kInterceptors][i] !== "function") throw new InvalidArgumentError("interceptor must be an function"); + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (this[kDestroyed]) { + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); + return; + } + if (!err) err = new ClientDestroyedError(); + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) dispatch = this[kInterceptors][i](dispatch); + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler); + } + dispatch(opts, handler) { + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + try { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); + return this[kInterceptedDispatch](opts, handler); + } catch (err) { + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + handler.onError(err); + return false; + } + } + }; + module.exports = DispatcherBase; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/util/timers.js +var require_timers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * This module offers an optimized timer implementation designed for scenarios + * where high precision is not critical. + * + * The timer achieves faster performance by using a low-resolution approach, + * with an accuracy target of within 500ms. This makes it particularly useful + * for timers with delays of 1 second or more, where exact timing is less + * crucial. + * + * It's important to note that Node.js timers are inherently imprecise, as + * delays can occur due to the event loop being blocked by other operations. + * Consequently, timers may trigger later than their scheduled time. + */ + /** + * The fastNow variable contains the internal fast timer clock value. + * + * @type {number} + */ + let fastNow = 0; + /** + * RESOLUTION_MS represents the target resolution time in milliseconds. + * + * @type {number} + * @default 1000 + */ + const RESOLUTION_MS = 1e3; + /** + * TICK_MS defines the desired interval in milliseconds between each tick. + * The target value is set to half the resolution time, minus 1 ms, to account + * for potential event loop overhead. + * + * @type {number} + * @default 499 + */ + const TICK_MS = 499; + /** + * fastNowTimeout is a Node.js timer used to manage and process + * the FastTimers stored in the `fastTimers` array. + * + * @type {NodeJS.Timeout} + */ + let fastNowTimeout; + /** + * The kFastTimer symbol is used to identify FastTimer instances. + * + * @type {Symbol} + */ + const kFastTimer = Symbol("kFastTimer"); + /** + * The fastTimers array contains all active FastTimers. + * + * @type {FastTimer[]} + */ + const fastTimers = []; + /** + * These constants represent the various states of a FastTimer. + */ + /** + * The `NOT_IN_LIST` constant indicates that the FastTimer is not included + * in the `fastTimers` array. Timers with this status will not be processed + * during the next tick by the `onTick` function. + * + * A FastTimer can be re-added to the `fastTimers` array by invoking the + * `refresh` method on the FastTimer instance. + * + * @type {-2} + */ + const NOT_IN_LIST = -2; + /** + * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled + * for removal from the `fastTimers` array. A FastTimer in this state will + * be removed in the next tick by the `onTick` function and will no longer + * be processed. + * + * This status is also set when the `clear` method is called on the FastTimer instance. + * + * @type {-1} + */ + const TO_BE_CLEARED = -1; + /** + * The `PENDING` constant signifies that the FastTimer is awaiting processing + * in the next tick by the `onTick` function. Timers with this status will have + * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. + * + * @type {0} + */ + const PENDING = 0; + /** + * The `ACTIVE` constant indicates that the FastTimer is active and waiting + * for its timer to expire. During the next tick, the `onTick` function will + * check if the timer has expired, and if so, it will execute the associated callback. + * + * @type {1} + */ + const ACTIVE = 1; + /** + * The onTick function processes the fastTimers array. + * + * @returns {void} + */ + function onTick() { + /** + * Increment the fastNow value by the TICK_MS value, despite the actual time + * that has passed since the last tick. This approach ensures independence + * from the system clock and delays caused by a blocked event loop. + * + * @type {number} + */ + fastNow += TICK_MS; + /** + * The `idx` variable is used to iterate over the `fastTimers` array. + * Expired timers are removed by replacing them with the last element in the array. + * Consequently, `idx` is only incremented when the current element is not removed. + * + * @type {number} + */ + let idx = 0; + /** + * The len variable will contain the length of the fastTimers array + * and will be decremented when a FastTimer should be removed from the + * fastTimers array. + * + * @type {number} + */ + let len = fastTimers.length; + while (idx < len) { + /** + * @type {FastTimer} + */ + const timer = fastTimers[idx]; + if (timer._state === PENDING) { + timer._idleStart = fastNow - TICK_MS; + timer._state = ACTIVE; + } else if (timer._state === ACTIVE && fastNow >= timer._idleStart + timer._idleTimeout) { + timer._state = TO_BE_CLEARED; + timer._idleStart = -1; + timer._onTimeout(timer._timerArg); + } + if (timer._state === TO_BE_CLEARED) { + timer._state = NOT_IN_LIST; + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; + } + fastTimers.length = len; + if (fastTimers.length !== 0) refreshTimeout(); + } + function refreshTimeout() { + if (fastNowTimeout) fastNowTimeout.refresh(); + else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTick, TICK_MS); + if (fastNowTimeout.unref) fastNowTimeout.unref(); + } + } + /** + * The `FastTimer` class is a data structure designed to store and manage + * timer information. + */ + var FastTimer = class { + [kFastTimer] = true; + /** + * The state of the timer, which can be one of the following: + * - NOT_IN_LIST (-2) + * - TO_BE_CLEARED (-1) + * - PENDING (0) + * - ACTIVE (1) + * + * @type {-2|-1|0|1} + * @private + */ + _state = NOT_IN_LIST; + /** + * The number of milliseconds to wait before calling the callback. + * + * @type {number} + * @private + */ + _idleTimeout = -1; + /** + * The time in milliseconds when the timer was started. This value is used to + * calculate when the timer should expire. + * + * @type {number} + * @default -1 + * @private + */ + _idleStart = -1; + /** + * The function to be executed when the timer expires. + * @type {Function} + * @private + */ + _onTimeout; + /** + * The argument to be passed to the callback when the timer expires. + * + * @type {*} + * @private + */ + _timerArg; + /** + * @constructor + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should wait + * before the specified function or code is executed. + * @param {*} arg + */ + constructor(callback, delay, arg) { + this._onTimeout = callback; + this._idleTimeout = delay; + this._timerArg = arg; + this.refresh(); + } + /** + * Sets the timer's start time to the current time, and reschedules the timer + * to call its callback at the previously specified duration adjusted to the + * current time. + * Using this on a timer that has already called its callback will reactivate + * the timer. + * + * @returns {void} + */ + refresh() { + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); + this._state = PENDING; + } + /** + * The `clear` method cancels the timer, preventing it from executing. + * + * @returns {void} + * @private + */ + clear() { + this._state = TO_BE_CLEARED; + this._idleStart = -1; + } + }; + /** + * This module exports a setTimeout and clearTimeout function that can be + * used as a drop-in replacement for the native functions. + */ + module.exports = { + /** + * The setTimeout() method sets a timer which executes a function once the + * timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {NodeJS.Timeout|FastTimer} + */ + setTimeout(callback, delay, arg) { + return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated Timer previously created + * by calling setTimeout. + * + * @param {NodeJS.Timeout|FastTimer} timeout + */ + clearTimeout(timeout) { + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); + }, + /** + * The setFastTimeout() method sets a fastTimer which executes a function once + * the timer expires. + * @param {Function} callback A function to be executed after the timer + * expires. + * @param {number} delay The time, in milliseconds that the timer should + * wait before the specified function or code is executed. + * @param {*} [arg] An optional argument to be passed to the callback function + * when the timer expires. + * @returns {FastTimer} + */ + setFastTimeout(callback, delay, arg) { + return new FastTimer(callback, delay, arg); + }, + /** + * The clearTimeout method cancels an instantiated FastTimer previously + * created by calling setFastTimeout. + * + * @param {FastTimer} timeout + */ + clearFastTimeout(timeout) { + timeout.clear(); + }, + /** + * The now method returns the value of the internal fast timer clock. + * + * @returns {number} + */ + now() { + return fastNow; + }, + /** + * Trigger the onTick function to process the fastTimers array. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + * @param {number} [delay=0] The delay in milliseconds to add to the now value. + */ + tick(delay = 0) { + fastNow += delay - RESOLUTION_MS + 1; + onTick(); + onTick(); + }, + /** + * Reset FastTimers. + * Exported for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + reset() { + fastNow = 0; + fastTimers.length = 0; + clearTimeout(fastNowTimeout); + fastNowTimeout = null; + }, + /** + * Exporting for testing purposes only. + * Marking as deprecated to discourage any use outside of testing. + * @deprecated + */ + kFastTimer + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/core/connect.js +var require_connect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const net$1 = __require("node:net"); + const assert$25 = __require("node:assert"); + const util = require_util$7(); + const { InvalidArgumentError, ConnectTimeoutError } = require_errors(); + const timers = require_timers(); + function noop() {} + let tls; + let SessionCache; + if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) return; + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; + else SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) return; + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); + const options = { + path: socketPath, + ...opts + }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls) tls = __require("node:tls"); + servername = servername || options.servername || util.getServerName(host) || null; + const sessionKey = servername || hostname; + assert$25(sessionKey); + const session = customSession || sessionCache.get(sessionKey) || null; + port = port || 443; + socket = tls.connect({ + highWaterMark: 16384, + ...options, + servername, + session, + localAddress, + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + port, + host: hostname + }); + socket.on("session", function(session) { + sessionCache.set(sessionKey, session); + }); + } else { + assert$25(!httpSocket, "httpSocket can only be sent on TLS update"); + port = port || 80; + socket = net$1.connect({ + highWaterMark: 64 * 1024, + ...options, + localAddress, + port, + host: hostname + }); + } + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { + timeout, + hostname, + port + }); + socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(null, this); + } + }).on("error", function(err) { + queueMicrotask(clearConnectTimeout); + if (callback) { + const cb = callback; + callback = null; + cb(err); + } + }); + return socket; + }; + } + /** + * @param {WeakRef} socketWeakRef + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + * @returns {() => void} + */ + const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + let s2 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + clearImmediate(s2); + }; + } : (socketWeakRef, opts) => { + if (!opts.timeout) return noop; + let s1 = null; + const fastTimer = timers.setFastTimeout(() => { + s1 = setImmediate(() => { + onConnectTimeout(socketWeakRef.deref(), opts); + }); + }, opts.timeout); + return () => { + timers.clearFastTimeout(fastTimer); + clearImmediate(s1); + }; + }; + /** + * @param {net.Socket} socket + * @param {object} opts + * @param {number} opts.timeout + * @param {string} opts.hostname + * @param {number} opts.port + */ + function onConnectTimeout(socket, opts) { + if (socket == null) return; + let message = "Connect Timeout Error"; + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; + message += ` timeout: ${opts.timeout}ms)`; + util.destroy(socket, new ConnectTimeoutError(message)); + } + module.exports = buildConnector; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/utils.js +var require_utils$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") res[key] = value; + }); + return res; + } + exports.enumToMap = enumToMap; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/constants.js +var require_constants$6 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; + const utils_1 = require_utils$5(); + (function(ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; + })(exports.ERROR || (exports.ERROR = {})); + (function(TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; + })(exports.TYPE || (exports.TYPE = {})); + (function(FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(exports.FLAGS || (exports.FLAGS = {})); + (function(LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + METHODS[METHODS["PRI"] = 34] = "PRI"; + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports.METHODS || (exports.METHODS = {})); + exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + METHODS.SOURCE + ]; + exports.METHODS_ICE = [METHODS.SOURCE]; + exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + METHODS.GET, + METHODS.POST + ]; + exports.METHOD_MAP = utils_1.enumToMap(METHODS); + exports.H_METHOD_MAP = {}; + Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + }); + (function(FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; + })(exports.FINISH || (exports.FINISH = {})); + exports.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports.ALPHA.push(String.fromCharCode(i)); + exports.ALPHA.push(String.fromCharCode(i + 32)); + } + exports.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); + exports.MARK = [ + "-", + "_", + ".", + "!", + "~", + "*", + "'", + "(", + ")" + ]; + exports.USERINFO_CHARS = exports.ALPHANUM.concat(exports.MARK).concat([ + "%", + ";", + ":", + "&", + "=", + "+", + "$", + "," + ]); + exports.STRICT_URL_CHAR = [ + "!", + "\"", + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports.ALPHANUM); + exports.URL_CHAR = exports.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) exports.URL_CHAR.push(i); + exports.HEX = exports.NUM.concat([ + "a", + "b", + "c", + "d", + "e", + "f", + "A", + "B", + "C", + "D", + "E", + "F" + ]); + exports.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports.ALPHANUM); + exports.TOKEN = exports.STRICT_TOKEN.concat([" "]); + exports.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); + exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); + exports.MAJOR = exports.NUM_MAP; + exports.MINOR = exports.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); + exports.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Buffer: Buffer$2 } = __require("node:buffer"); + module.exports = Buffer$2.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25fa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ADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIoAhwiA0EBaw7dAdoBAdkBAgMEBQYHCAkKCwwN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AJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADDsYBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHyAhIyUmKCorLC8wMTIzNDU2Nzk6Ozw9lANAQkRFRklLTk9QUVJTVFVWWFpbXF1eX2BhYmNkZWZnaGpsb3Bxc3V2eHl6e3x/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEB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CABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHtzwBqLQAARw1IIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyGAgsgAkEANgIAIAZBAWohAUERDEkLQagBIQMgASAERg2EAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHCzwBqLQAARw1HIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyFAgsgAkEANgIAIAZBAWohAUEsDEgLQakBIQMgASAERg2DAiACKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHFzwBqLQAARw1GIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyEAgsgAkEANgIAIAZBAWohAUErDEcLQaoBIQMgASAERg2CAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHKzwBqLQAARw1FIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyDAgsgAkEANgIAIAZBAWohAUEUDEYLIAEgBEYEQEGrASEDDIICCwJAAkACQAJAIAEtAABBwgBrDg8AAQJHR0dHR0dHR0dHRwNHCyABQQFqIQFBkwEhAwzrAQsgAUEBaiEBQZQBIQMM6gELIAFBAWohAUGVASEDDOkBCyABQQFqIQFBlgEhAwzoAQsgASAERgRAQawBIQMMgQILIAEtAABBxQBHDUIgAUEBaiEBDD0LQa0BIQMgASAERg3/ASACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHNzwBqLQAARw1CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyAAgsgAkEANgIAIAZBAWohAUEODEMLIAEgBEYEQEGuASEDDP8BCyABLQAAQdAARw1AIAFBAWohAUElDEILQa8BIQMgASAERg39ASACKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEHQzwBqLQAARw1AIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBT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gAkEANgIcIAIgATYCFCACQcMPNgIQIAJBBzYCDEEAIQMMtQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0RIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMtAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0gIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMswELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0iIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMsgELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0OIAJB5QA2AhwgAiABNgIUIAIgADYCDEEAIQMMsQELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0dIAJB0wA2AhwgAiABNgIUIAIgADYCDEEAIQMMsAELIAIoAgQhACACQQA2AgQgAiAAIAEQJSIARQ0fIAJB0gA2AhwgAiABNgIUIAIgADYCDEEAIQMMrwELIABBP0cNASABQQFqCyEBQQUhAwyUAQtBACEDIAJBADYCHCACIAE2AhQgAkH9EjYCECACQQc2AgwMrAELIAJBADYCHCACIAE2AhQgAkHcCDYCECACQQc2AgxBACEDDKsBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNByACQeUANgIcIAIgATYCFCACIAA2AgxBACEDDKoBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNFiACQdMANgIcIAIgATYCFCACIAA2AgxBACEDDKkBCyACKAIEIQAgAkEANgIEIAIgACABECUiAEUNGCACQdIANgIcIAIgATYCFCACIAA2AgxBACEDDKgBCyACQQA2AhwgAiABNgIUIAJBxgo2AhAgAkEHNgIMQQAhAwynAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDQMgAkHlADYCHCACIAE2AhQgAiAANgIMQQAhAwymAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRIgAkHTADYCHCACIAE2AhQgAiAANgIMQQAhAwylAQsgAigCBCEAIAJBADYCBCACIAAgARAlIgBFDRQgAkHSADYCHCACIAE2AhQgAiAANgIMQ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undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Buffer: Buffer$1 } = __require("node:buffer"); + module.exports = Buffer$1.from("AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3VtZQAYG2xsaHR0cF9yZXN1bWVfYWZ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cUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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AQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==", "base64"); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/constants.js +var require_constants$5 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const corsSafeListedMethods = [ + "GET", + "HEAD", + "POST" + ]; + const corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + const nullBodyStatus = [ + 101, + 204, + 205, + 304 + ]; + const redirectStatus = [ + 301, + 302, + 303, + 307, + 308 + ]; + const redirectStatusSet = new Set(redirectStatus); + /** + * @see https://fetch.spec.whatwg.org/#block-bad-port + */ + const badPorts = [ + "1", + "7", + "9", + "11", + "13", + "15", + "17", + "19", + "20", + "21", + "22", + "23", + "25", + "37", + "42", + "43", + "53", + "69", + "77", + "79", + "87", + "95", + "101", + "102", + "103", + "104", + "109", + "110", + "111", + "113", + "115", + "117", + "119", + "123", + "135", + "137", + "139", + "143", + "161", + "179", + "389", + "427", + "465", + "512", + "513", + "514", + "515", + "526", + "530", + "531", + "532", + "540", + "548", + "554", + "556", + "563", + "587", + "601", + "636", + "989", + "990", + "993", + "995", + "1719", + "1720", + "1723", + "2049", + "3659", + "4045", + "4190", + "5060", + "5061", + "6000", + "6566", + "6665", + "6666", + "6667", + "6668", + "6669", + "6679", + "6697", + "10080" + ]; + const badPortsSet = new Set(badPorts); + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies + */ + const referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + const referrerPolicySet = new Set(referrerPolicy); + const requestRedirect = [ + "follow", + "manual", + "error" + ]; + const safeMethods = [ + "GET", + "HEAD", + "OPTIONS", + "TRACE" + ]; + const safeMethodsSet = new Set(safeMethods); + const requestMode = [ + "navigate", + "same-origin", + "no-cors", + "cors" + ]; + const requestCredentials = [ + "omit", + "same-origin", + "include" + ]; + const requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + /** + * @see https://fetch.spec.whatwg.org/#request-body-header-name + */ + const requestBodyHeader = [ + "content-encoding", + "content-language", + "content-location", + "content-type", + "content-length" + ]; + /** + * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex + */ + const requestDuplex = ["half"]; + /** + * @see http://fetch.spec.whatwg.org/#forbidden-method + */ + const forbiddenMethods = [ + "CONNECT", + "TRACE", + "TRACK" + ]; + const forbiddenMethodsSet = new Set(forbiddenMethods); + const subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + module.exports = { + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet: new Set(subresource), + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/global.js +var require_global$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + writable: true, + enumerable: false, + configurable: false + }); + return; + } + const parsedURL = new URL(newOrigin); + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module.exports = { + getGlobalOrigin, + setGlobalOrigin + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/data-url.js +var require_data_url = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$24 = __require("node:assert"); + const encoder = new TextEncoder(); + /** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ + const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; + const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; + const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; + /** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ + const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; + /** @param {URL} dataURL */ + function dataURLProcessor(dataURL) { + assert$24(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast(",", input, position); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) return "failure"; + position.position++; + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + return { + mimeType: mimeTypeRecord, + body + }; + } + /** + * @param {URL} url + * @param {boolean} excludeFragment + */ + function URLSerializer(url, excludeFragment = false) { + if (!excludeFragment) return url.href; + const href = url.href; + const hashLength = url.hash.length; + const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); + return serialized; + } + /** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; + } + /** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ + function collectASequenceOfCodePointsFast(char, input, position) { + const idx = input.indexOf(char, position.position); + const start = position.position; + if (idx === -1) { + position.position = input.length; + return input.slice(start); + } + position.position = idx; + return input.slice(start, position.position); + } + /** @param {string} input */ + function stringPercentDecode(input) { + return percentDecode(encoder.encode(input)); + } + /** + * @param {number} byte + */ + function isHexCharByte(byte) { + return byte >= 48 && byte <= 57 || byte >= 65 && byte <= 70 || byte >= 97 && byte <= 102; + } + /** + * @param {number} byte + */ + function hexByteToNumber(byte) { + return byte >= 48 && byte <= 57 ? byte - 48 : (byte & 223) - 55; + } + /** @param {Uint8Array} input */ + function percentDecode(input) { + const length = input.length; + /** @type {Uint8Array} */ + const output = new Uint8Array(length); + let j = 0; + for (let i = 0; i < length; ++i) { + const byte = input[i]; + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { + output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); + i += 2; + } + } + return length === j ? output : output.subarray(0, j); + } + /** @param {string} input */ + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type = collectASequenceOfCodePointsFast("/", input, position); + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position > input.length) return "failure"; + position.position++; + let subtype = collectASequenceOfCodePointsFast(";", input, position); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; + const typeLowercase = type.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints((char) => HTTP_WHITESPACE_REGEX.test(char), input, position); + let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") continue; + position.position++; + } + if (position.position > input.length) break; + let parameterValue = null; + if (input[position.position] === "\"") { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast(";", input, position); + } else { + parameterValue = collectASequenceOfCodePointsFast(";", input, position); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) continue; + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); + } + return mimeType; + } + /** @param {string} data */ + function forgivingBase64(data) { + data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, ""); + let dataLength = data.length; + if (dataLength % 4 === 0) { + if (data.charCodeAt(dataLength - 1) === 61) { + --dataLength; + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; + } + } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; + const buffer = Buffer.from(data, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + } + /** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert$24(input[position.position] === "\""); + position.position++; + while (true) { + value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); + if (position.position >= input.length) break; + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert$24(quoteOrBackslash === "\""); + break; + } + } + if (extractValue) return value; + return input.slice(positionStart, position.position); + } + /** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ + function serializeAMimeType(mimeType) { + assert$24(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = "\"" + value; + value += "\""; + } + serialization += value; + } + return serialization; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {number} char + */ + function isHTTPWhiteSpace(char) { + return char === 13 || char === 10 || char === 9 || char === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeHTTPWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isHTTPWhiteSpace); + } + /** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {number} char + */ + function isASCIIWhitespace(char) { + return char === 13 || char === 10 || char === 9 || char === 12 || char === 32; + } + /** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + * @param {string} str + * @param {boolean} [leading=true] + * @param {boolean} [trailing=true] + */ + function removeASCIIWhitespace(str, leading = true, trailing = true) { + return removeChars(str, leading, trailing, isASCIIWhitespace); + } + /** + * @param {string} str + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns + */ + function removeChars(str, leading, trailing, predicate) { + let lead = 0; + let trail = str.length - 1; + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; + return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); + } + /** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {Uint8Array} input + * @returns {string} + */ + function isomorphicDecode(input) { + const length = input.length; + if (65535 > length) return String.fromCharCode.apply(null, input); + let result = ""; + let i = 0; + let addition = 65535; + while (i < length) { + if (i + addition > length) addition = length - i; + result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); + } + return result; + } + /** + * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type + * @param {Exclude, 'failure'>} mimeType + */ + function minimizeSupportedMimeType(mimeType) { + switch (mimeType.essence) { + case "application/ecmascript": + case "application/javascript": + case "application/x-ecmascript": + case "application/x-javascript": + case "text/ecmascript": + case "text/javascript": + case "text/javascript1.0": + case "text/javascript1.1": + case "text/javascript1.2": + case "text/javascript1.3": + case "text/javascript1.4": + case "text/javascript1.5": + case "text/jscript": + case "text/livescript": + case "text/x-ecmascript": + case "text/x-javascript": return "text/javascript"; + case "application/json": + case "text/json": return "application/json"; + case "image/svg+xml": return "image/svg+xml"; + case "text/xml": + case "application/xml": return "application/xml"; + } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; + return ""; + } + module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType, + removeChars, + removeHTTPWhitespace, + minimizeSupportedMimeType, + HTTP_TOKEN_CODEPOINTS, + isomorphicDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/webidl.js +var require_webidl = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { types: types$4, inspect } = __require("node:util"); + const { markAsUncloneable } = __require("node:worker_threads"); + const { toUSVString } = require_util$7(); + /** @type {import('../../../types/webidl').Webidl} */ + const webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); + }; + webidl.errors.conversionFailed = function(context) { + const plural = context.types.length === 1 ? "" : " one of"; + const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + return webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts) { + if (opts?.strict !== false) { + if (!(V instanceof I)) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + } else if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); + err.code = "ERR_INVALID_THIS"; + throw err; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + webidl.util.Type = function(V) { + switch (typeof V) { + case "undefined": return "Undefined"; + case "boolean": return "Boolean"; + case "string": return "String"; + case "symbol": return "Symbol"; + case "number": return "Number"; + case "bigint": return "BigInt"; + case "function": + case "object": + if (V === null) return "Null"; + return "Object"; + } + }; + webidl.util.markAsUncloneable = markAsUncloneable || (() => {}); + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) x = 0; + if (opts?.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + return x; + } + if (!Number.isNaN(x) && opts?.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) return -1 * r; + return r; + }; + webidl.util.Stringify = function(V) { + switch (webidl.util.Type(V)) { + case "Symbol": return `Symbol(${V.description})`; + case "Object": return inspect(V); + case "String": return `"${V}"`; + default: return `${V}`; + } + }; + webidl.sequenceConverter = function(converter) { + return (V, prefix, argument, Iterable) => { + if (webidl.util.Type(V) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); + /** @type {Generator} */ + const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); + const seq = []; + let index = 0; + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); + while (true) { + const { done, value } = method.next(); + if (done) break; + seq.push(converter(value, prefix, `${argument}[${index++}]`)); + } + return seq; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O, prefix, argument) => { + if (webidl.util.Type(O) !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` + }); + const result = {}; + if (!types$4.isProxy(O)) { + const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; + for (const key of keys) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, prefix, argument, opts) => { + if (opts?.strict !== false && !(V instanceof i)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` + }); + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary, prefix, argument) => { + const type = webidl.util.Type(dictionary); + const dict = {}; + if (type === "Null" || type === "Undefined") return dict; + else if (type !== "Object") throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + for (const options of converters) { + const { key, defaultValue, required, converter } = options; + if (required === true) { + if (!Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); + } + let value = dictionary[key]; + const hasDefault = Object.hasOwn(options, "defaultValue"); + if (hasDefault && value !== null) value ??= defaultValue(); + if (required || hasDefault || value !== void 0) { + value = converter(value, prefix, `${argument}.${key}`); + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V, prefix, argument) => { + if (V === null) return V; + return converter(V, prefix, argument); + }; + }; + webidl.converters.DOMString = function(V, prefix, argument, opts) { + if (V === null && opts?.legacyNullToEmptyString) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); + return String(V); + }; + webidl.converters.ByteString = function(V, prefix, argument) { + const x = webidl.converters.DOMString(V, prefix, argument); + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + return Boolean(V); + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "signed", void 0, prefix, argument); + }; + webidl.converters["unsigned long long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 64, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned long"] = function(V, prefix, argument) { + return webidl.util.ConvertToInt(V, 32, "unsigned", void 0, prefix, argument); + }; + webidl.converters["unsigned short"] = function(V, prefix, argument, opts) { + return webidl.util.ConvertToInt(V, 16, "unsigned", opts, prefix, argument); + }; + webidl.converters.ArrayBuffer = function(V, prefix, argument, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isAnyArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.resizable || V.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.TypedArray = function(V, T, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.DataView = function(V, prefix, name, opts) { + if (webidl.util.Type(V) !== "Object" || !types$4.isDataView(V)) throw webidl.errors.exception({ + header: prefix, + message: `${name} is not a DataView.` + }); + if (opts?.allowShared === false && types$4.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + if (V.buffer.resizable || V.buffer.growable) throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "Received a resizable ArrayBuffer." + }); + return V; + }; + webidl.converters.BufferSource = function(V, prefix, name, opts) { + if (types$4.isAnyArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, name, { + ...opts, + allowShared: false + }); + if (types$4.isTypedArray(V)) return webidl.converters.TypedArray(V, V.constructor, prefix, name, { + ...opts, + allowShared: false + }); + if (types$4.isDataView(V)) return webidl.converters.DataView(V, prefix, name, { + ...opts, + allowShared: false + }); + throw webidl.errors.conversionFailed({ + prefix, + argument: `${name} ("${webidl.util.Stringify(V)}")`, + types: ["BufferSource"] + }); + }; + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.ByteString); + webidl.converters["sequence>"] = webidl.sequenceConverter(webidl.converters["sequence"]); + webidl.converters["record"] = webidl.recordConverter(webidl.converters.ByteString, webidl.converters.ByteString); + module.exports = { webidl }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/util.js +var require_util$6 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform: Transform$2 } = __require("node:stream"); + const zlib$1 = __require("node:zlib"); + const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants$5(); + const { getGlobalOrigin } = require_global$1(); + const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); + const { performance: performance$1 } = __require("node:perf_hooks"); + const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util$7(); + const assert$23 = __require("node:assert"); + const { isUint8Array } = __require("node:util/types"); + const { webidl } = require_webidl(); + let supportedHashes = []; + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + const possibleRelevantHashes = [ + "sha256", + "sha384", + "sha512" + ]; + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch {} + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) return null; + let location = response.headersList.get("location", true); + if (location !== null && isValidHeaderValue(location)) { + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) location.hash = requestFragment; + return location; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 + * @param {string} url + * @returns {boolean} + */ + function isValidEncodedURL(url) { + for (let i = 0; i < url.length; ++i) { + const code = url.charCodeAt(i); + if (code > 126 || code < 32) return false; + } + return true; + } + /** + * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. + * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. + * @param {string} value + * @returns {string} + */ + function normalizeBinaryStringToUtf8(value) { + return Buffer.from(value, "binary").toString("utf8"); + } + /** @returns {URL} */ + function requestCurrentURL(request) { + return request.urlList[request.urlList.length - 1]; + } + function requestBadPort(request) { + const url = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; + return "allowed"; + } + function isErrorLike(object) { + return object instanceof Error || object?.constructor?.name === "Error" || object?.constructor?.name === "DOMException"; + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; + } + return true; + } + /** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ + const isValidHeaderName = isValidHTTPToken; + /** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ + function isValidHeaderValue(potentialValue) { + return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; + } + function setRequestReferrerPolicyOnRedirect(request, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; + } + } + if (policy !== "") request.referrerPolicy = policy; + } + function crossOriginResourcePolicyCheck() { + return "allowed"; + } + function corsCheck() { + return "success"; + } + function TAOCheck() { + return "success"; + } + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header, true); + } + function appendRequestOriginHeader(request) { + let serializedOrigin = request.origin; + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { + switch (request.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; + break; + case "same-origin": + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; + break; + default: + } + request.headersList.append("origin", serializedOrigin, true); + } + } + function coarsenTime(timestamp, crossOriginIsolatedCapability) { + return timestamp; + } + function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; + return { + domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), + domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), + connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), + connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), + secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), + ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol + }; + } + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return coarsenTime(performance$1.now(), crossOriginIsolatedCapability); + } + function createOpaqueTimingInfo(timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null + }; + } + function makePolicyContainer() { + return { referrerPolicy: "strict-origin-when-cross-origin" }; + } + function clonePolicyContainer(policyContainer) { + return { referrerPolicy: policyContainer.referrerPolicy }; + } + function determineRequestsReferrer(request) { + const policy = request.referrerPolicy; + assert$23(policy); + let referrerSource = null; + if (request.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; + referrerSource = new URL(globalOrigin); + } else if (request.referrer instanceof URL) referrerSource = request.referrer; + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; + const areSameOrigin = sameOrigin(request, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request.url); + switch (policy) { + case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); + case "unsafe-url": return referrerURL; + case "same-origin": return areSameOrigin ? referrerOrigin : "no-referrer"; + case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; + case "strict-origin-when-cross-origin": { + const currentURL = requestCurrentURL(request); + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; + return referrerOrigin; + } + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + default: return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; + } + } + /** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ + function stripURLForReferrer(url, originOnly) { + assert$23(url instanceof URL); + url = new URL(url); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") return "no-referrer"; + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; + } + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") return true; + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || originAsURL.hostname === "localhost" || originAsURL.hostname.includes("localhost.") || originAsURL.hostname.endsWith(".localhost")) return true; + return false; + } + } + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ + function bytesMatch(bytes, metadataList) { + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === void 0) return true; + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") return true; + if (parsedMetadata.length === 0) return true; + const metadata = filterMetadataListByAlgorithm(parsedMetadata, getStrongestMetadata(parsedMetadata)); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); + if (actualValue[actualValue.length - 1] === "=") if (actualValue[actualValue.length - 2] === "=") actualValue = actualValue.slice(0, -2); + else actualValue = actualValue.slice(0, -1); + if (compareBase64Mixed(actualValue, expectedValue)) return true; + } + return false; + } + const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + /** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ + function parseMetadata(metadata) { + /** @type {{ algo: string, hash: string }[]} */ + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) continue; + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) result.push(parsedToken.groups); + } + if (empty === true) return "no metadata"; + return result; + } + /** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") return algorithm; + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") continue; + else if (metadata.algo[3] === "3") algorithm = "sha384"; + } + return algorithm; + } + function filterMetadataListByAlgorithm(metadataList, algorithm) { + if (metadataList.length === 1) return metadataList; + let pos = 0; + for (let i = 0; i < metadataList.length; ++i) if (metadataList[i].algo === algorithm) metadataList[pos++] = metadataList[i]; + metadataList.length = pos; + return metadataList; + } + /** + * Compares two base64 strings, allowing for base64url + * in the second string. + * + * @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ + function compareBase64Mixed(actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) return false; + for (let i = 0; i < actualValue.length; ++i) if (actualValue[i] !== expectedValue[i]) { + if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; + return false; + } + return true; + } + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {} + /** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; + return false; + } + function createDeferredPromise() { + let res; + let rej; + return { + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), + resolve: res, + reject: rej + }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ + function normalizeMethod(method) { + return normalizedMethodRecordsBase[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) throw new TypeError("Value is not JSON serializable"); + assert$23(typeof result === "string"); + return result; + } + const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function createIterator(name, kInternalIterator, keyIndex = 0, valueIndex = 1) { + class FastIterableIterator { + /** @type {any} */ + #target; + /** @type {'key' | 'value' | 'key+value'} */ + #kind; + /** @type {number} */ + #index; + /** + * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + */ + constructor(target, kind) { + this.#target = target; + this.#kind = kind; + this.#index = 0; + } + next() { + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); + const index = this.#index; + const values = this.#target[kInternalIterator]; + if (index >= values.length) return { + value: void 0, + done: true + }; + const { [keyIndex]: key, [valueIndex]: value } = values[index]; + this.#index = index + 1; + let result; + switch (this.#kind) { + case "key": + result = key; + break; + case "value": + result = value; + break; + case "key+value": + result = [key, value]; + break; + } + return { + value: result, + done: false + }; + } + } + delete FastIterableIterator.prototype.constructor; + Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype); + Object.defineProperties(FastIterableIterator.prototype, { + [Symbol.toStringTag]: { + writable: false, + enumerable: false, + configurable: true, + value: `${name} Iterator` + }, + next: { + writable: true, + enumerable: true, + configurable: true + } + }); + /** + * @param {unknown} target + * @param {'key' | 'value' | 'key+value'} kind + * @returns {IterableIterator} + */ + return function(target, kind) { + return new FastIterableIterator(target, kind); + }; + } + /** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {string} name name of the instance + * @param {any} object class + * @param {symbol} kInternalIterator + * @param {string | number} [keyIndex] + * @param {string | number} [valueIndex] + */ + function iteratorMixin(name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { + const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); + const properties = { + keys: { + writable: true, + enumerable: true, + configurable: true, + value: function keys() { + webidl.brandCheck(this, object); + return makeIterator(this, "key"); + } + }, + values: { + writable: true, + enumerable: true, + configurable: true, + value: function values() { + webidl.brandCheck(this, object); + return makeIterator(this, "value"); + } + }, + entries: { + writable: true, + enumerable: true, + configurable: true, + value: function entries() { + webidl.brandCheck(this, object); + return makeIterator(this, "key+value"); + } + }, + forEach: { + writable: true, + enumerable: true, + configurable: true, + value: function forEach(callbackfn, thisArg = globalThis) { + webidl.brandCheck(this, object); + webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); + } + } + }; + return Object.defineProperties(object.prototype, { + ...properties, + [Symbol.iterator]: { + writable: true, + enumerable: false, + configurable: true, + value: properties.entries.value + } + }); + } + /** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + successSteps(await readAllBytes(reader)); + } catch (e) { + errorSteps(e); + } + } + function isReadableStreamLike(stream) { + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; + } + /** + * @param {ReadableStreamController} controller + */ + function readableStreamClose(controller) { + try { + controller.close(); + controller.byobRequest?.respond(0); + } catch (err) { + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; + } + } + const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; + /** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ + function isomorphicEncode(input) { + assert$23(!invalidIsomorphicEncodeValueRegex.test(input)); + return input; + } + /** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) return Buffer.concat(bytes, byteLength); + if (!isUint8Array(chunk)) throw new TypeError("Received non-Uint8Array chunk"); + bytes.push(chunk); + byteLength += chunk.length; + } + } + /** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ + function urlIsLocal(url) { + assert$23("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + /** + * @param {string|URL} url + * @returns {boolean} + */ + function urlHasHttpsScheme(url) { + return typeof url === "string" && url[5] === ":" && url[0] === "h" && url[1] === "t" && url[2] === "t" && url[3] === "p" && url[4] === "s" || url.protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ + function urlIsHttpHttpsScheme(url) { + assert$23("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + /** + * @see https://fetch.spec.whatwg.org/#simple-range-header-value + * @param {string} value + * @param {boolean} allowWhitespace + */ + function simpleRangeHeaderValue(value, allowWhitespace) { + const data = value; + if (!data.startsWith("bytes")) return "failure"; + const position = { position: 5 }; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeStart = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; + position.position++; + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + const rangeEnd = collectASequenceOfCodePoints((char) => { + const code = char.charCodeAt(0); + return code >= 48 && code <= 57; + }, data, position); + const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; + return { + rangeStartValue, + rangeEndValue + }; + } + /** + * @see https://fetch.spec.whatwg.org/#build-a-content-range + * @param {number} rangeStart + * @param {number} rangeEnd + * @param {number} fullLength + */ + function buildContentRange(rangeStart, rangeEnd, fullLength) { + let contentRange = "bytes "; + contentRange += isomorphicEncode(`${rangeStart}`); + contentRange += "-"; + contentRange += isomorphicEncode(`${rangeEnd}`); + contentRange += "/"; + contentRange += isomorphicEncode(`${fullLength}`); + return contentRange; + } + var InflateStream = class extends Transform$2 { + #zlibOptions; + /** @param {zlib.ZlibOptions} [zlibOptions] */ + constructor(zlibOptions) { + super(); + this.#zlibOptions = zlibOptions; + } + _transform(chunk, encoding, callback) { + if (!this._inflateStream) { + if (chunk.length === 0) { + callback(); + return; + } + this._inflateStream = (chunk[0] & 15) === 8 ? zlib$1.createInflate(this.#zlibOptions) : zlib$1.createInflateRaw(this.#zlibOptions); + this._inflateStream.on("data", this.push.bind(this)); + this._inflateStream.on("end", () => this.push(null)); + this._inflateStream.on("error", (err) => this.destroy(err)); + } + this._inflateStream.write(chunk, encoding, callback); + } + _final(callback) { + if (this._inflateStream) { + this._inflateStream.end(); + this._inflateStream = null; + } + callback(); + } + }; + /** + * @param {zlib.ZlibOptions} [zlibOptions] + * @returns {InflateStream} + */ + function createInflate(zlibOptions) { + return new InflateStream(zlibOptions); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type + * @param {import('./headers').HeadersList} headers + */ + function extractMimeType(headers) { + let charset = null; + let essence = null; + let mimeType = null; + const values = getDecodeSplit("content-type", headers); + if (values === null) return "failure"; + for (const value of values) { + const temporaryMimeType = parseMIMEType(value); + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; + mimeType = temporaryMimeType; + if (mimeType.essence !== essence) { + charset = null; + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); + essence = mimeType.essence; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); + } + if (mimeType == null) return "failure"; + return mimeType; + } + /** + * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split + * @param {string|null} value + */ + function gettingDecodingSplitting(value) { + const input = value; + const position = { position: 0 }; + const values = []; + let temporaryValue = ""; + while (position.position < input.length) { + temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$23(input.charCodeAt(position.position) === 44); + position.position++; + } + temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); + values.push(temporaryValue); + temporaryValue = ""; + } + return values; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split + * @param {string} name lowercase header name + * @param {import('./headers').HeadersList} list + */ + function getDecodeSplit(name, list) { + const value = list.get(name, true); + if (value === null) return null; + return gettingDecodingSplitting(value); + } + const textDecoder = new TextDecoder(); + /** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); + } + var EnvironmentSettingsObjectBase = class { + get baseUrl() { + return getGlobalOrigin(); + } + get origin() { + return this.baseUrl?.origin; + } + policyContainer = makePolicyContainer(); + }; + var EnvironmentSettingsObject = class { + settingsObject = new EnvironmentSettingsObjectBase(); + }; + module.exports = { + isAborted, + isCancelled, + isValidEncodedURL, + createDeferredPromise, + ReadableStreamFrom, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + clampAndCoarsenConnectionTimingInfo, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + iteratorMixin, + createIterator, + isValidHeaderName, + isValidHeaderValue, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + simpleRangeHeaderValue, + buildContentRange, + parseMetadata, + createInflate, + extractMimeType, + getDecodeSplit, + utf8DecodeBytes, + environmentSettingsObject: new EnvironmentSettingsObject() + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/symbols.js +var require_symbols$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kDispatcher: Symbol("dispatcher") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/file.js +var require_file = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Blob: Blob$2, File } = __require("node:buffer"); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + var FileLike = class FileLike { + constructor(blobLike, fileName, options = {}) { + const n = fileName; + const t = options.type; + const d = options.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + webidl.converters.Blob = webidl.interfaceConverter(Blob$2); + function isFileLike(object) { + return object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; + } + module.exports = { + FileLike, + isFileLike + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata.js +var require_formdata = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isBlobLike, iteratorMixin } = require_util$6(); + const { kState } = require_symbols$3(); + const { kEnumerableProperty } = require_util$7(); + const { FileLike, isFileLike } = require_file(); + const { webidl } = require_webidl(); + const { File: NativeFile } = __require("node:buffer"); + const nodeUtil$2 = __require("node:util"); + /** @type {globalThis['File']} */ + const File = globalThis.File ?? NativeFile; + var FormData = class FormData { + constructor(form) { + webidl.util.markAsUncloneable(this); + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.append"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "value", { strict: false }) : webidl.converters.USVString(value, prefix, "value"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "filename") : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.get"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) return null; + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.getAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + name = webidl.converters.USVString(name, prefix, "name"); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, FormData); + const prefix = "FormData.set"; + webidl.argumentLengthCheck(arguments, 2, prefix); + if (arguments.length === 3 && !isBlobLike(value)) throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'"); + name = webidl.converters.USVString(name, prefix, "name"); + value = isBlobLike(value) ? webidl.converters.Blob(value, prefix, "name", { strict: false }) : webidl.converters.USVString(value, prefix, "name"); + filename = arguments.length === 3 ? webidl.converters.USVString(filename, prefix, "name") : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx !== -1) this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this[kState].push(entry); + } + [nodeUtil$2.inspect.custom](depth, options) { + const state = this[kState].reduce((a, b) => { + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; + return a; + }, { __proto__: null }); + options.depth ??= depth; + options.colors ??= true; + const output = nodeUtil$2.formatWithOptions(options, state); + return `FormData ${output.slice(output.indexOf("]") + 2)}`; + } + }; + iteratorMixin("FormData", FormData, kState, "name", "value"); + Object.defineProperties(FormData.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + getAll: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + /** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ + function makeEntry(name, value, filename) { + if (typeof value === "string") {} else { + if (!isFileLike(value)) value = value instanceof Blob ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + if (filename !== void 0) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + }; + value = value instanceof NativeFile ? new File([value], filename, options) : new FileLike(value, filename, options); + } + } + return { + name, + value + }; + } + module.exports = { + FormData, + makeEntry + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/formdata-parser.js +var require_formdata_parser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isUSVString, bufferToLowerCasedHeaderName } = require_util$7(); + const { utf8DecodeBytes } = require_util$6(); + const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); + const { isFileLike } = require_file(); + const { makeEntry } = require_formdata(); + const assert$22 = __require("node:assert"); + const { File: NodeFile } = __require("node:buffer"); + const File = globalThis.File ?? NodeFile; + const formDataNameBuffer = Buffer.from("form-data; name=\""); + const filenameBuffer = Buffer.from("; filename"); + const dd = Buffer.from("--"); + const ddcrlf = Buffer.from("--\r\n"); + /** + * @param {string} chars + */ + function isAsciiString(chars) { + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary + * @param {string} boundary + */ + function validateBoundary(boundary) { + const length = boundary.length; + if (length < 27 || length > 70) return false; + for (let i = 0; i < length; ++i) { + const cp = boundary.charCodeAt(i); + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; + } + return true; + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser + * @param {Buffer} input + * @param {ReturnType} mimeType + */ + function multipartFormDataParser(input, mimeType) { + assert$22(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + const boundaryString = mimeType.parameters.get("boundary"); + if (boundaryString === void 0) return "failure"; + const boundary = Buffer.from(`--${boundaryString}`, "utf8"); + const entryList = []; + const position = { position: 0 }; + while (input[position.position] === 13 && input[position.position + 1] === 10) position.position += 2; + let trailing = input.length; + while (input[trailing - 1] === 10 && input[trailing - 2] === 13) trailing -= 2; + if (trailing !== input.length) input = input.subarray(0, trailing); + while (true) { + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else return "failure"; + if (position.position === input.length - 2 && bufferStartsWith(input, dd, position) || position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + position.position += 2; + const result = parseMultipartFormDataHeaders(input, position); + if (result === "failure") return "failure"; + let { name, filename, contentType, encoding } = result; + position.position += 2; + let body; + { + const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); + if (boundaryIndex === -1) return "failure"; + body = input.subarray(position.position, boundaryIndex - 4); + position.position += body.length; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); + } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + let value; + if (filename !== null) { + contentType ??= "text/plain"; + if (!isAsciiString(contentType)) contentType = ""; + value = new File([body], filename, { type: contentType }); + } else value = utf8DecodeBytes(Buffer.from(body)); + assert$22(isUSVString(name)); + assert$22(typeof value === "string" && isUSVString(value) || isFileLike(value)); + entryList.push(makeEntry(name, value, filename)); + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataHeaders(input, position) { + let name = null; + let filename = null; + let contentType = null; + let encoding = null; + while (true) { + if (input[position.position] === 13 && input[position.position + 1] === 10) { + if (name === null) return "failure"; + return { + name, + filename, + contentType, + encoding + }; + } + let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); + headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) return "failure"; + if (input[position.position] !== 58) return "failure"; + position.position++; + collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); + switch (bufferToLowerCasedHeaderName(headerName)) { + case "content-disposition": + name = filename = null; + if (!bufferStartsWith(input, formDataNameBuffer, position)) return "failure"; + position.position += 17; + name = parseMultipartFormDataName(input, position); + if (name === null) return "failure"; + if (bufferStartsWith(input, filenameBuffer, position)) { + let check = position.position + filenameBuffer.length; + if (input[check] === 42) { + position.position += 1; + check += 1; + } + if (input[check] !== 61 || input[check + 1] !== 34) return "failure"; + position.position += 12; + filename = parseMultipartFormDataName(input, position); + if (filename === null) return "failure"; + } + break; + case "content-type": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + contentType = isomorphicDecode(headerValue); + break; + } + case "content-transfer-encoding": { + let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); + encoding = isomorphicDecode(headerValue); + break; + } + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); + } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) return "failure"; + else position.position += 2; + } + } + /** + * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name + * @param {Buffer} input + * @param {{ position: number }} position + */ + function parseMultipartFormDataName(input, position) { + assert$22(input[position.position - 1] === 34); + /** @type {string | Buffer} */ + let name = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); + if (input[position.position] !== 34) return null; + else position.position++; + name = new TextDecoder().decode(name).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); + return name; + } + /** + * @param {(char: number) => boolean} condition + * @param {Buffer} input + * @param {{ position: number }} position + */ + function collectASequenceOfBytes(condition, input, position) { + let start = position.position; + while (start < input.length && condition(input[start])) ++start; + return input.subarray(position.position, position.position = start); + } + /** + * @param {Buffer} buf + * @param {boolean} leading + * @param {boolean} trailing + * @param {(charCode: number) => boolean} predicate + * @returns {Buffer} + */ + function removeChars(buf, leading, trailing, predicate) { + let lead = 0; + let trail = buf.length - 1; + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; + return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); + } + /** + * Checks if {@param buffer} starts with {@param start} + * @param {Buffer} buffer + * @param {Buffer} start + * @param {{ position: number }} position + */ + function bufferStartsWith(buffer, start, position) { + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; + return true; + } + module.exports = { + multipartFormDataParser, + validateBoundary + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/body.js +var require_body = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { ReadableStreamFrom, isBlobLike, isReadableStreamLike, readableStreamClose, createDeferredPromise, fullyReadBody, extractMimeType, utf8DecodeBytes } = require_util$6(); + const { FormData } = require_formdata(); + const { kState } = require_symbols$3(); + const { webidl } = require_webidl(); + const { Blob: Blob$1 } = __require("node:buffer"); + const assert$21 = __require("node:assert"); + const { isErrored, isDisturbed } = __require("node:stream"); + const { isArrayBuffer } = __require("node:util/types"); + const { serializeAMimeType } = require_data_url(); + const { multipartFormDataParser } = require_formdata_parser(); + let random; + try { + const crypto = __require("node:crypto"); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + const textEncoder = new TextEncoder(); + function noop() {} + const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + let streamRegistry; + if (hasFinalizationRegistry) streamRegistry = new FinalizationRegistry((weakRef) => { + const stream = weakRef.deref(); + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) stream.cancel("Response object has been garbage collected").catch(noop); + }); + function extractBody(object, keepalive = false) { + let stream = null; + if (object instanceof ReadableStream) stream = object; + else if (isBlobLike(object)) stream = object.stream(); + else stream = new ReadableStream({ + async pull(controller) { + const buffer = typeof source === "string" ? textEncoder.encode(source) : source; + if (buffer.byteLength) controller.enqueue(buffer); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() {}, + type: "bytes" + }); + assert$21(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type = null; + if (typeof object === "string") { + source = object; + type = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) source = new Uint8Array(object.slice()); + else if (ArrayBuffer.isView(object)) source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r\nContent-Disposition: form-data`; + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; + } + const chunk = textEncoder.encode(`--${boundary}--\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) length = null; + source = object; + action = async function* () { + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; + }; + type = `multipart/form-data; boundary=${boundary}`; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) type = object.type; + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util.isBuffer(source)) length = Buffer.byteLength(source); + if (action != null) { + let iterator; + stream = new ReadableStream({ + async start() { + iterator = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator.next(); + if (done) queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else if (!isErrored(stream)) { + const buffer = new Uint8Array(value); + if (buffer.byteLength) controller.enqueue(buffer); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator.return(); + }, + type: "bytes" + }); + } + return [{ + stream, + source, + length + }, type]; + } + function safelyExtractBody(object, keepalive = false) { + if (object instanceof ReadableStream) { + // istanbul ignore next + assert$21(!util.isDisturbed(object), "The body has already been consumed."); + // istanbul ignore next + assert$21(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); + } + function cloneBody(instance, body) { + const [out1, out2] = body.stream.tee(); + body.stream = out1; + return { + stream: out2, + length: body.length, + source: body.source + }; + } + function throwIfAborted(state) { + if (state.aborted) throw new DOMException("The operation was aborted.", "AbortError"); + } + function bodyMixinMethods(instance) { + return { + blob() { + return consumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); + return new Blob$1([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return consumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return consumeBody(this, parseJSONFromBytes, instance); + }, + formData() { + return consumeBody(this, (value) => { + const mimeType = bodyMimeType(this); + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + if (parsed === "failure") throw new TypeError("Failed to parse body as FormData."); + const fd = new FormData(); + fd[kState] = parsed; + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; + } + } + throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); + }, instance); + }, + bytes() { + return consumeBody(this, (bytes) => { + return new Uint8Array(bytes); + }, instance); + } + }; + } + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ + async function consumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + if (bodyUnusable(object)) throw new TypeError("Body is unusable: Body has already been read"); + throwIfAborted(object[kState]); + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(Buffer.allocUnsafe(0)); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; + } + function bodyUnusable(object) { + const body = object[kState].body; + return body != null && (body.stream.locked || util.isDisturbed(body.stream)); + } + /** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} requestOrResponse + */ + function bodyMimeType(requestOrResponse) { + /** @type {import('./headers').HeadersList} */ + const headers = requestOrResponse[kState].headersList; + const mimeType = extractMimeType(headers); + if (mimeType === "failure") return null; + return mimeType; + } + module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody, + streamRegistry, + hasFinalizationRegistry, + bodyUnusable + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h1.js +var require_client_h1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$20 = __require("node:assert"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const timers = require_timers(); + const { RequestContentLengthMismatchError, ResponseContentLengthMismatchError, RequestAbortedError, HeadersTimeoutError, HeadersOverflowError, SocketError, InformationalError, BodyTimeoutError, HTTPParserError, ResponseExceededMaxSizeError } = require_errors(); + const { kUrl, kReset, kClient, kParser, kBlocking, kRunning, kPending, kSize, kWriting, kQueue, kNoRef, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kSocket, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kMaxRequests, kCounter, kMaxResponseSize, kOnError, kResume, kHTTPContext } = require_symbols$4(); + const constants = require_constants$6(); + const EMPTY_BUF = Buffer.alloc(0); + const FastBuffer = Buffer[Symbol.species]; + const addListener = util.addListener; + const removeAllListeners = util.removeAllListeners; + let extractBody; + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(require_llhttp_simd_wasm()); + } catch (e) { + /* istanbul ignore next */ + mod = await WebAssembly.compile(llhttpWasmData || require_llhttp_wasm()); + } + return await WebAssembly.instantiate(mod, { env: { + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0; + }, + wasm_on_status: (p, at, len) => { + assert$20(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert$20(currentParser.ptr === p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert$20(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert$20(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert$20(currentParser.ptr === p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert$20(currentParser.ptr === p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert$20(currentParser.ptr === p); + return currentParser.onMessageComplete() || 0; + } + } }); + } + let llhttpInstance = null; + let llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + let currentParser = null; + let currentBufferRef = null; + let currentBufferSize = 0; + let currentBufferPtr = null; + const USE_FAST_TIMER = 1; + const TIMEOUT_HEADERS = 3; + const TIMEOUT_BODY = 5; + const TIMEOUT_KEEP_ALIVE = 8; + var Parser = class { + constructor(client, socket, { exports: exports$1 }) { + assert$20(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports$1; + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE); + this.client = client; + this.socket = socket; + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.statusCode = null; + this.statusText = ""; + this.upgrade = false; + this.headers = []; + this.headersSize = 0; + this.headersMaxSize = client[kMaxHeadersSize]; + this.shouldKeepAlive = false; + this.paused = false; + this.resume = this.resume.bind(this); + this.bytesRead = 0; + this.keepAlive = ""; + this.contentLength = ""; + this.connection = ""; + this.maxResponseSize = client[kMaxResponseSize]; + } + setTimeout(delay, type) { + if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { + if (this.timeout) { + timers.clearTimeout(this.timeout); + this.timeout = null; + } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout.unref(); + } + this.timeoutValue = delay; + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.timeoutType = type; + } + resume() { + if (this.socket.destroyed || !this.paused) return; + assert$20(this.ptr != null); + assert$20(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert$20(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) break; + this.execute(chunk); + } + } + execute(data) { + assert$20(this.ptr != null); + assert$20(currentParser == null); + assert$20(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) llhttp.free(currentBufferPtr); + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data.slice(offset)); + else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr); + let message = ""; + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0); + message = "Response does not match the HTTP/1.1 protocol (" + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util.destroy(socket, err); + } + } + destroy() { + assert$20(this.ptr != null); + assert$20(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + this.timeout && timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + if (!request) return -1; + request.onResponseStarted(); + } + onHeaderField(buf) { + const len = this.headers.length; + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + this.trackHeader(buf.length); + } + onHeaderValue(buf) { + let len = this.headers.length; + if ((len & 1) === 1) { + this.headers.push(buf); + len += 1; + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); + const key = this.headers[len - 2]; + if (key.length === 10) { + const headerName = util.bufferToLowerCasedHeaderName(key); + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); + this.trackHeader(buf.length); + } + trackHeader(len) { + this.headersSize += len; + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert$20(upgrade); + assert$20(client[kSocket] === socket); + assert$20(!socket.destroyed); + assert$20(!this.paused); + assert$20((headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$20(request); + assert$20(request.upgrade || request.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + removeAllListeners(socket); + client[kSocket] = null; + client[kHTTPContext] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request.onUpgrade(statusCode, headers, socket); + } catch (err) { + util.destroy(socket, err); + } + client[kResume](); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) return -1; + assert$20(!this.upgrade); + assert$20(this.statusCode < 200); + if (statusCode === 100) { + util.destroy(socket, new SocketError("bad response", util.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError("bad upgrade", util.getSocketInfo(socket))); + return -1; + } + assert$20(this.timeoutType === TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || request.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + if (request.method === "CONNECT") { + assert$20(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert$20(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert$20((this.headers.length & 1) === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; + if (socket[kBlocking]) { + socket[kBlocking] = false; + client[kResume](); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) return -1; + const request = client[kQueue][client[kRunningIdx]]; + assert$20(request); + assert$20(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) this.timeout.refresh(); + } + assert$20(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request.onData(buf) === false) return constants.ERROR.PAUSED; + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return; + assert$20(statusCode >= 100); + assert$20((this.headers.length & 1) === 0); + const request = client[kQueue][client[kRunningIdx]]; + assert$20(request); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) return; + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert$20(client[kRunning] === 0); + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(() => client[kResume]()); + else client[kResume](); + } + }; + function onParserTimeout(parser) { + const { socket, timeoutType, client, paused } = parser.deref(); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert$20(!paused, "cannot be paused while waiting for headers"); + util.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!paused) util.destroy(socket, new BodyTimeoutError()); + } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { + assert$20(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util.destroy(socket, new InformationalError("socket idle timeout")); + } + } + async function connectH1(client, socket) { + client[kSocket] = socket; + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + addListener(socket, "error", function(err) { + assert$20(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + const parser = this[kParser]; + if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + this[kError] = err; + this[kClient][kOnError](err); + }); + addListener(socket, "readable", function() { + const parser = this[kParser]; + if (parser) parser.readMore(); + }); + addListener(socket, "end", function() { + const parser = this[kParser]; + if (parser.statusCode && !parser.shouldKeepAlive) { + parser.onMessageComplete(); + return; + } + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + addListener(socket, "close", function() { + const client = this[kClient]; + const parser = this[kParser]; + if (parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + client[kHTTPContext] = null; + if (client.destroyed) { + assert$20(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert$20(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h1", + defaultPipelining: 1, + write(...args) { + return writeH1(client, ...args); + }, + resume() { + resumeH1(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy(request) { + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; + if (request) { + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } + return false; + } + }; + } + function resumeH1(client) { + const socket = client[kSocket]; + if (socket && !socket.destroyed) { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } + } + } + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH1(client, request) { + const { method, path, host, upgrade, blocking, reset } = request; + let { body, headers, contentLength } = request; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; + if (util.isFormDataLike(body)) { + if (!extractBody) extractBody = require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + if (request.contentType == null) headers.push("content-type", contentType); + body = bodyStream.stream; + contentLength = bodyStream.length; + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); + const bodyLength = util.bodyLength(body); + contentLength = bodyLength ?? contentLength; + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + const abort = (err) => { + if (request.aborted || request.completed) return; + util.errorRequest(client, request, err || new RequestAbortedError()); + util.destroy(body); + util.destroy(socket, new InformationalError("aborted")); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; + let header = `${method} ${path} HTTP/1.1\r\n`; + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$20(false); + return true; + } + function writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$20(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + let finished = false; + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + const onData = function(chunk) { + if (finished) return; + try { + if (!writer.write(chunk) && this.pause) this.pause(); + } catch (err) { + util.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) return; + if (body.resume) body.resume(); + }; + const onClose = function() { + queueMicrotask(() => { + body.removeListener("error", onFinished); + }); + if (!finished) { + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + } + }; + const onFinished = function(err) { + if (finished) return; + finished = true; + assert$20(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + socket.off("drain", onDrain).off("error", onFinished); + body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); + if (!err) try { + writer.end(); + } catch (er) { + err = er; + } + writer.destroy(err); + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); + }; + body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); + if (body.resume) body.resume(); + socket.on("drain", onDrain).on("error", onFinished); + if (body.errorEmitted ?? body.errored) setImmediate(() => onFinished(body.errored)); + else if (body.endEmitted ?? body.readableEnded) setImmediate(() => onFinished(null)); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); + } + function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { + try { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$20(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { + assert$20(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(body); + socket.uncork(); + request.onBodySent(body); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + } + request.onRequestSent(); + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$20(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + socket.write(buffer); + socket.uncork(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) { + assert$20(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$20(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ + abort, + socket, + request, + contentLength, + client, + expectsPayload, + header + }); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); + } + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ abort, socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + this.abort = abort; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; + const len = Buffer.byteLength(chunk); + if (!len) return true; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + process.emitWarning(new RequestContentLengthMismatchError()); + } + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); + } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + } + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; + request.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); + } + client[kResume](); + } + destroy(err) { + const { socket, client, abort } = this; + socket[kWriting] = false; + if (err) { + assert$20(client[kRunning] <= 1, "pipeline should only contain this request"); + abort(err); + } + } + }; + module.exports = connectH1; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client-h2.js +var require_client_h2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$19 = __require("node:assert"); + const { pipeline: pipeline$2 } = __require("node:stream"); + const util = require_util$7(); + const { RequestContentLengthMismatchError, RequestAbortedError, SocketError, InformationalError } = require_errors(); + const { kUrl, kReset, kClient, kRunning, kPending, kQueue, kPendingIdx, kRunningIdx, kError, kSocket, kStrictContentLength, kOnError, kMaxConcurrentStreams, kHTTP2Session, kResume, kSize, kHTTPContext } = require_symbols$4(); + const kOpenStreams = Symbol("open streams"); + let extractBody; + let h2ExperimentalWarned = false; + /** @type {import('http2')} */ + let http2; + try { + http2 = __require("node:http2"); + } catch { + http2 = { constants: {} }; + } + const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS } } = http2; + function parseH2Headers(headers) { + const result = []; + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); + return result; + } + async function connectH2(client, socket) { + client[kSocket] = socket; + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { code: "UNDICI-H2" }); + } + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kMaxConcurrentStreams] + }); + session[kOpenStreams] = 0; + session[kClient] = client; + session[kSocket] = socket; + util.addListener(session, "error", onHttp2SessionError); + util.addListener(session, "frameError", onHttp2FrameError); + util.addListener(session, "end", onHttp2SessionEnd); + util.addListener(session, "goaway", onHTTP2GoAway); + util.addListener(session, "close", function() { + const { [kClient]: client } = this; + const { [kSocket]: socket } = client; + const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util.getSocketInfo(socket)); + client[kHTTP2Session] = null; + if (client.destroyed) { + assert$19(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + } + }); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + util.addListener(socket, "error", function(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kError] = err; + this[kClient][kOnError](err); + }); + util.addListener(socket, "end", function() { + util.destroy(this, new SocketError("other side closed", util.getSocketInfo(this))); + }); + util.addListener(socket, "close", function() { + const err = this[kError] || new SocketError("closed", util.getSocketInfo(this)); + client[kSocket] = null; + if (this[kHTTP2Session] != null) this[kHTTP2Session].destroy(err); + client[kPendingIdx] = client[kRunningIdx]; + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + }); + let closed = false; + socket.on("close", () => { + closed = true; + }); + return { + version: "h2", + defaultPipelining: Infinity, + write(...args) { + return writeH2(client, ...args); + }, + resume() { + resumeH2(client); + }, + destroy(err, callback) { + if (closed) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); + }, + get destroyed() { + return socket.destroyed; + }, + busy() { + return false; + } + }; + } + function resumeH2(client) { + const socket = client[kSocket]; + if (socket?.destroyed === false) if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); + } + } + function onHttp2SessionError(err) { + assert$19(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + function onHttp2FrameError(type, code, id) { + if (id === 0) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); + this[kSocket][kError] = err; + this[kClient][kOnError](err); + } + } + function onHttp2SessionEnd() { + const err = new SocketError("other side closed", util.getSocketInfo(this[kSocket])); + this.destroy(err); + util.destroy(this[kSocket], err); + } + /** + * This is the root cause of #3011 + * We need to handle GOAWAY frames properly, and trigger the session close + * along with the socket right away + */ + function onHTTP2GoAway(code) { + const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)); + const client = this[kClient]; + client[kSocket] = null; + client[kHTTPContext] = null; + if (this[kHTTP2Session] != null) { + this[kHTTP2Session].destroy(err); + this[kHTTP2Session] = null; + } + util.destroy(this[kSocket], err); + if (client[kRunningIdx] < client[kQueue].length) { + const request = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + util.errorRequest(client, request, err); + client[kPendingIdx] = client[kRunningIdx]; + } + assert$19(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + client[kResume](); + } + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + function writeH2(client, request) { + const session = client[kHTTP2Session]; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + let { body } = request; + if (upgrade) { + util.errorRequest(client, request, /* @__PURE__ */ new Error("Upgrade not supported for H2")); + return false; + } + const headers = {}; + for (let n = 0; n < reqHeaders.length; n += 2) { + const key = reqHeaders[n + 0]; + const val = reqHeaders[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `,${val[i]}`; + else headers[key] = val[i]; + else headers[key] = val; + } + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream; + const { hostname, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; + headers[HTTP2_HEADER_METHOD] = method; + const abort = (err) => { + if (request.aborted || request.completed) return; + err = err || new RequestAbortedError(); + util.errorRequest(client, request, err); + if (stream != null) util.destroy(stream, err); + util.destroy(body, err); + client[kQueue][client[kRunningIdx]++] = null; + client[kResume](); + }; + try { + request.onConnect(abort); + } catch (err) { + util.errorRequest(client, request, err); + } + if (request.aborted) return false; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { + endStream: false, + signal + }); + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + } else stream.once("ready", () => { + request.onUpgrade(null, null, stream); + ++session[kOpenStreams]; + client[kQueue][client[kRunningIdx]++] = null; + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + return true; + } + headers[HTTP2_HEADER_PATH] = path; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") body.read(0); + let contentLength = util.bodyLength(body); + if (util.isFormDataLike(body)) { + extractBody ??= require_body().extractBody; + const [bodyStream, contentType] = extractBody(body); + headers["content-type"] = contentType; + body = bodyStream.stream; + contentLength = bodyStream.length; + } + if (contentLength == null) contentLength = request.contentLength; + if (contentLength === 0 || !expectsPayload) contentLength = null; + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + util.errorRequest(client, request, new RequestContentLengthMismatchError()); + return false; + } + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert$19(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD" || body === null; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++session[kOpenStreams]; + stream.once("response", (headers) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers; + request.onResponseStarted(); + if (request.aborted) { + const err = new RequestAbortedError(); + util.errorRequest(client, request, err); + util.destroy(stream, err); + return; + } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); + stream.on("data", (chunk) => { + if (request.onData(chunk) === false) stream.pause(); + }); + }); + stream.once("end", () => { + if (stream.state?.state == null || stream.state.state < 6) request.onComplete([]); + if (session[kOpenStreams] === 0) session.unref(); + abort(new InformationalError("HTTP/2: stream half-closed (remote)")); + client[kQueue][client[kRunningIdx]++] = null; + client[kPendingIdx] = client[kRunningIdx]; + client[kResume](); + }); + stream.once("close", () => { + session[kOpenStreams] -= 1; + if (session[kOpenStreams] === 0) session.unref(); + }); + stream.once("error", function(err) { + abort(err); + }); + stream.once("frameError", (type, code) => { + abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)); + }); + return true; + function writeBodyH2() { + /* istanbul ignore else: assertion */ + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$19(false); + } + } + function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + try { + if (body != null && util.isBuffer(body)) { + assert$19(contentLength === body.byteLength, "buffer body must have content length"); + h2stream.cork(); + h2stream.write(body); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(body); + } + if (!expectsPayload) socket[kReset] = true; + request.onRequestSent(); + client[kResume](); + } catch (error) { + abort(error); + } + } + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe = pipeline$2(body, h2stream, (err) => { + if (err) { + util.destroy(pipe, err); + abort(err); + } else { + util.removeAllListeners(pipe); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } + }); + util.addListener(pipe, "data", onPipeData); + function onPipeData(chunk) { + request.onBodySent(chunk); + } + } + async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$19(contentLength === body.size, "blob body must have content length"); + try { + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); + const buffer = Buffer.from(await body.arrayBuffer()); + h2stream.cork(); + h2stream.write(buffer); + h2stream.uncork(); + h2stream.end(); + request.onBodySent(buffer); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } + } + async function writeIterable(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { + assert$19(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); + } + } + const waitForDrain = () => new Promise((resolve, reject) => { + assert$19(callback === null); + if (socket[kError]) reject(socket[kError]); + else callback = resolve; + }); + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) throw socket[kError]; + const res = h2stream.write(chunk); + request.onBodySent(chunk); + if (!res) await waitForDrain(); + } + h2stream.end(); + request.onRequestSent(); + if (!expectsPayload) socket[kReset] = true; + client[kResume](); + } catch (err) { + abort(err); + } finally { + h2stream.off("close", onDrain).off("drain", onDrain); + } + } + module.exports = connectH2; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/redirect-handler.js +var require_redirect_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { kBodyUsed } = require_symbols$4(); + const assert$18 = __require("node:assert"); + const { InvalidArgumentError } = require_errors(); + const EE$1 = __require("node:events"); + const redirectableStatusCodes = [ + 300, + 301, + 302, + 303, + 307, + 308 + ]; + const kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert$18(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + util.validateHandler(handler, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { + ...opts, + maxRedirections: 0 + }; + this.maxRedirections = maxRedirections; + this.handler = handler; + this.history = []; + this.redirectionLimitReached = false; + if (util.isStream(this.opts.body)) { + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$18(false); + }); + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE$1.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); + } + onConnect(abort) { + this.abort = abort; + this.handler.onConnect(abort, { history: this.history }); + } + onUpgrade(statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket); + } + onError(error) { + this.handler.onError(error); + } + onHeaders(statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { + if (this.request) this.request.abort(/* @__PURE__ */ new Error("max redirects")); + this.redirectionLimitReached = true; + this.abort(/* @__PURE__ */ new Error("max redirects")); + return; + } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); + if (!this.location) return this.handler.onHeaders(statusCode, headers, resume, statusText); + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + if (statusCode === 303 && this.opts.method !== "HEAD") { + this.opts.method = "GET"; + this.opts.body = null; + } + } + onData(chunk) { + if (this.location) {} else return this.handler.onData(chunk); + } + onComplete(trailers) { + if (this.location) { + this.location = null; + this.abort = null; + this.dispatch(this.opts, this); + } else this.handler.onComplete(trailers); + } + onBodySent(chunk) { + if (this.handler.onBodySent) this.handler.onBodySent(chunk); + } + }; + function parseLocation(statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) return null; + for (let i = 0; i < headers.length; i += 2) if (headers[i].length === 8 && util.headerNameToString(headers[i]) === "location") return headers[i + 1]; + } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; + } + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") { + for (const key of Object.keys(headers)) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, headers[key]); + } else assert$18(headers == null, "headers must be an object or an array"); + return ret; + } + module.exports = RedirectHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect-interceptor.js +var require_redirect_interceptor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) return dispatch(opts, handler); + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler); + opts = { + ...opts, + maxRedirections: 0 + }; + return dispatch(opts, redirectHandler); + }; + }; + } + module.exports = createRedirectInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/client.js +var require_client = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$17 = __require("node:assert"); + const net = __require("node:net"); + const http = __require("node:http"); + const util = require_util$7(); + const { channels } = require_diagnostics(); + const Request = require_request$1(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, InformationalError, ClientDestroyedError } = require_errors(); + const buildConnector = require_connect(); + const { kUrl, kServerName, kClient, kBusy, kConnect, kResuming, kRunning, kPending, kSize, kQueue, kConnected, kConnecting, kNeedDrain, kKeepAliveDefaultTimeout, kHostHeader, kPendingIdx, kRunningIdx, kError, kPipelining, kKeepAliveTimeoutValue, kMaxHeadersSize, kKeepAliveMaxTimeout, kKeepAliveTimeoutThreshold, kHeadersTimeout, kBodyTimeout, kStrictContentLength, kConnector, kMaxRedirections, kMaxRequests, kCounter, kClose, kDestroy, kDispatch, kInterceptors, kLocalAddress, kMaxResponseSize, kOnError, kHTTPContext, kMaxConcurrentStreams, kResume } = require_symbols$4(); + const connectH1 = require_client_h1(); + const connectH2 = require_client_h2(); + let deprecatedInterceptorWarned = false; + const kClosedResolve = Symbol("kClosedResolve"); + const noop = () => {}; + function getPipelining(client) { + return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; + } + /** + * @type {import('../../types/client.js').default} + */ + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../../types/client.js').Client.Options} options + */ + constructor(url, { interceptors, maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, maxRedirections, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, webSocket } = {}) { + super({ webSocket }); + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) throw new InvalidArgumentError("invalid maxHeaderSize"); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + if (interceptors?.Client && Array.isArray(interceptors.Client)) { + this[kInterceptors] = interceptors.Client; + if (!deprecatedInterceptorWarned) { + deprecatedInterceptorWarned = true; + process.emitWarning("Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.", { code: "UNDICI-CLIENT-INTERCEPTOR-DEPRECATED" }); + } + } else this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util.parseOrigin(url); + this[kConnector] = connect; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r\n`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100; + this[kHTTPContext] = null; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + this[kResume] = (sync) => resume(this, sync); + this[kOnError] = (err) => onError(this, err); + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + this[kResume](true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed; + } + get [kBusy]() { + return Boolean(this[kHTTPContext]?.busy(null) || this[kSize] >= (getPipelining(this) || 1) || this[kPending] > 0); + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect(this); + this.once("connect", cb); + } + [kDispatch](opts, handler) { + const request = new Request(opts.origin || this[kUrl].origin, opts, handler); + this[kQueue].push(request); + if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + this[kResuming] = 1; + queueMicrotask(() => resume(this)); + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve) => { + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); + }); + } + async [kDestroy](err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(this, request, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve(null); + }; + if (this[kHTTPContext]) { + this[kHTTPContext].destroy(err, callback); + this[kHTTPContext] = null; + } else queueMicrotask(callback); + this[kResume](); + }); + } + }; + const createRedirectInterceptor = require_redirect_interceptor(); + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert$17(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request = requests[i]; + util.errorRequest(client, request, err); + } + assert$17(client[kSize] === 0); + } + } + /** + * @param {Client} client + * @returns + */ + async function connect(client) { + assert$17(!client[kConnecting]); + assert$17(!client[kHTTPContext]); + let { host, hostname, protocol, port } = client[kUrl]; + if (hostname[0] === "[") { + const idx = hostname.indexOf("]"); + assert$17(idx !== -1); + const ip = hostname.substring(1, idx); + assert$17(net.isIP(ip)); + hostname = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) reject(err); + else resolve(socket); + }); + }); + if (client.destroyed) { + util.destroy(socket.on("error", noop), new ClientDestroyedError()); + return; + } + assert$17(socket); + try { + client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); + } catch (err) { + socket.destroy().on("error", noop); + throw err; + } + client[kConnecting] = false; + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + if (channels.connected.hasSubscribers) channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert$17(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++]; + util.errorRequest(client, request, err); + } + } else onError(client, err); + client.emit("connectionError", client[kUrl], [client], err); + } + client[kResume](); + } + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); + } + function resume(client, sync) { + if (client[kResuming] === 2) return; + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } + } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert$17(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + queueMicrotask(() => emitDrain(client)); + } else emitDrain(client); + continue; + } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; + const request = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) return; + client[kServerName] = request.servername; + client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { + client[kHTTPContext] = null; + resume(client); + }); + } + if (client[kConnecting]) return; + if (!client[kHTTPContext]) { + connect(client); + return; + } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); + } + } + module.exports = Client; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/fixed-queue.js +var require_fixed_queue = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const kSize = 2048; + const kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) this.tail = tail.next; + return next; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-stats.js +var require_pool_stats = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols$4(); + const kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module.exports = PoolStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool-base.js +var require_pool_base = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const FixedQueue = require_fixed_queue(); + const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols$4(); + const PoolStats = require_pool_stats(); + const kClients = Symbol("clients"); + const kNeedDrain = Symbol("needDrain"); + const kQueue = Symbol("queue"); + const kClosedResolve = Symbol("closed resolve"); + const kOnDrain = Symbol("onDrain"); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kGetDispatcher = Symbol("get dispatcher"); + const kAddClient = Symbol("add client"); + const kRemoveClient = Symbol("remove client"); + const kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) break; + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + }; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) ret += pending; + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) ret += running; + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) ret += size; + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) await Promise.all(this[kClients].map((c) => c.close())); + else await new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) break; + item.handler.onError(err); + } + await Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ + opts, + handler + }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client[kUrl], [this, client]); + }); + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) this[kClients].splice(idx, 1); + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/pool.js +var require_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { PoolBase, kClients, kNeedDrain, kAddClient, kGetDispatcher } = require_pool_base(); + const Client = require_client(); + const { InvalidArgumentError } = require_errors(); + const util = require_util$7(); + const { kUrl, kInterceptors } = require_symbols$4(); + const buildConnector = require_connect(); + const kOptions = Symbol("options"); + const kConnections = Symbol("connections"); + const kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, ...options } = {}) { + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...autoSelectFamily ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); + super(options); + this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) ? options.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util.parseOrigin(origin); + this[kOptions] = { + ...util.deepClone(options), + connect, + allowH2 + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kFactory] = factory; + this.on("connectionError", (origin, targets, error) => { + for (const target of targets) { + const idx = this[kClients].indexOf(target); + if (idx !== -1) this[kClients].splice(idx, 1); + } + }); + } + [kGetDispatcher]() { + for (const client of this[kClients]) if (!client[kNeedDrain]) return client; + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + const dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + return dispatcher; + } + } + }; + module.exports = Pool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/balanced-pool.js +var require_balanced_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { BalancedPoolMissingUpstreamError, InvalidArgumentError } = require_errors(); + const { PoolBase, kClients, kNeedDrain, kAddClient, kRemoveClient, kGetDispatcher } = require_pool_base(); + const Pool = require_pool(); + const { kUrl, kInterceptors } = require_symbols$4(); + const { parseOrigin } = require_util$7(); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + const kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + const kCurrentWeight = Symbol("kCurrentWeight"); + const kIndex = Symbol("kIndex"); + const kWeight = Symbol("kWeight"); + const kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + const kErrorPenalty = Symbol("kErrorPenalty"); + /** + * Calculate the greatest common divisor of two numbers by + * using the Euclidean algorithm. + * + * @param {number} a + * @param {number} b + * @returns {number} + */ + function getGreatestCommonDivisor(a, b) { + if (a === 0) return b; + while (b !== 0) { + const t = b; + b = a % b; + a = t; + } + return a; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) upstreams = [upstreams]; + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) this.addUpstream(upstream); + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + let result = 0; + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); + this[kGreatestCommonDivisor] = result; + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); + if (pool) this[kRemoveClient](pool); + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module.exports = BalancedPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/agent.js +var require_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError } = require_errors(); + const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const DispatcherBase = require_dispatcher_base(); + const Pool = require_pool(); + const Client = require_client(); + const util = require_util$7(); + const createRedirectInterceptor = require_redirect_interceptor(); + const kOnConnect = Symbol("onConnect"); + const kOnDisconnect = Symbol("onDisconnect"); + const kOnConnectionError = Symbol("onConnectionError"); + const kMaxRedirections = Symbol("maxRedirections"); + const kOnDrain = Symbol("onDrain"); + const kFactory = Symbol("factory"); + const kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) throw new InvalidArgumentError("maxRedirections must be a positive number"); + super(options); + if (connect && typeof connect !== "function") connect = { ...connect }; + this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) ? options.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { + ...util.deepClone(options), + connect + }; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kOnDrain] = (origin, targets) => { + this.emit("drain", origin, [this, ...targets]); + }; + this[kOnConnect] = (origin, targets) => { + this.emit("connect", origin, [this, ...targets]); + }; + this[kOnDisconnect] = (origin, targets, err) => { + this.emit("disconnect", origin, [this, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + this.emit("connectionError", origin, [this, ...targets], err); + }; + } + get [kRunning]() { + let ret = 0; + for (const client of this[kClients].values()) ret += client[kRunning]; + return ret; + } + [kDispatch](opts, handler) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + let dispatcher = this[kClients].get(key); + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, dispatcher); + } + return dispatcher.dispatch(opts, handler); + } + async [kClose]() { + const closePromises = []; + for (const client of this[kClients].values()) closePromises.push(client.close()); + this[kClients].clear(); + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const client of this[kClients].values()) destroyPromises.push(client.destroy(err)); + this[kClients].clear(); + await Promise.all(destroyPromises); + } + }; + module.exports = Agent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/proxy-agent.js +var require_proxy_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols$4(); + const { URL: URL$1 } = __require("node:url"); + const Agent = require_agent(); + const Pool = require_pool(); + const DispatcherBase = require_dispatcher_base(); + const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = require_errors(); + const buildConnector = require_connect(); + const Client = require_client(); + const kAgent = Symbol("proxy agent"); + const kClient = Symbol("proxy client"); + const kProxyHeaders = Symbol("proxy headers"); + const kRequestTls = Symbol("request tls settings"); + const kProxyTls = Symbol("proxy tls settings"); + const kConnectEndpoint = Symbol("connect endpoint function"); + const kTunnelProxy = Symbol("tunnel proxy"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + const noop = () => {}; + function defaultAgentFactory(origin, opts) { + if (opts.connections === 1) return new Client(origin, opts); + return new Pool(origin, opts); + } + var Http1ProxyWrapper = class extends DispatcherBase { + #client; + constructor(proxyUrl, { headers = {}, connect, factory }) { + super(); + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); + this[kProxyHeaders] = headers; + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); + } + [kDispatch](opts, handler) { + const onHeaders = handler.onHeaders; + handler.onHeaders = function(statusCode, data, resume) { + if (statusCode === 407) { + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); + return; + } + if (onHeaders) onHeaders.call(this, statusCode, data, resume); + }; + const { origin, path = "/", headers = {} } = opts; + opts.path = origin + path; + if (!("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(origin); + headers.host = host; + } + opts.headers = { + ...this[kProxyHeaders], + ...headers + }; + return this.#client[kDispatch](opts, handler); + } + async [kClose]() { + return this.#client.close(); + } + async [kDestroy](err) { + return this.#client.destroy(err); + } + }; + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(); + if (!opts || typeof opts === "object" && !(opts instanceof URL$1) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + const { proxyTunnel = true } = opts; + const url = this.#getUrl(opts); + const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url; + this[kProxy] = { + uri: href, + protocol + }; + this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + this[kTunnelProxy] = proxyTunnel; + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + const connect = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + const agentFactory = opts.factory || defaultAgentFactory; + const factory = (origin, options) => { + const { protocol } = new URL$1(origin); + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); + return agentFactory(origin, options); + }; + this[kClient] = clientFactory(url, { connect }); + this[kAgent] = new Agent({ + ...opts, + factory, + connect: async (opts, callback) => { + let requestedPath = opts.host; + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedPath, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host: opts.host + }, + servername: this[kProxyTls]?.servername || proxyHostname + }); + if (statusCode !== 200) { + socket.on("error", noop).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; + this[kConnectEndpoint]({ + ...opts, + servername, + httpSocket: socket + }, callback); + } catch (err) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); + } + } + }); + } + dispatch(opts, handler) { + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + if (headers && !("host" in headers) && !("Host" in headers)) { + const { host } = new URL$1(opts.origin); + headers.host = host; + } + return this[kAgent].dispatch({ + ...opts, + headers + }, handler); + } + /** + * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts + * @returns {URL} + */ + #getUrl(opts) { + if (typeof opts === "string") return new URL$1(opts); + else if (opts instanceof URL$1) return opts; + else return new URL$1(opts.uri); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + /** + * @param {string[] | Record} headers + * @returns {Record} + */ + function buildHeaders(headers) { + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; + return headersPair; + } + return headers; + } + /** + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons + */ + function throwIfProxyAuthIsSent(headers) { + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); + } + module.exports = ProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const DispatcherBase = require_dispatcher_base(); + const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols$4(); + const ProxyAgent = require_proxy_agent(); + const Agent = require_agent(); + const DEFAULT_PORTS = { + "http:": 80, + "https:": 443 + }; + let experimentalWarned = false; + var EnvHttpProxyAgent = class extends DispatcherBase { + #noProxyValue = null; + #noProxyEntries = null; + #opts = null; + constructor(opts = {}) { + super(); + this.#opts = opts; + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EnvHttpProxyAgent is experimental, expect them to change at any time.", { code: "UNDICI-EHPA" }); + } + const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; + this[kNoProxyAgent] = new Agent(agentOpts); + const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; + const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; + this.#parseNoProxy(); + } + [kDispatch](opts, handler) { + const url = new URL(opts.origin); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); + } + async [kClose]() { + await this[kNoProxyAgent].close(); + if (!this[kHttpProxyAgent][kClosed]) await this[kHttpProxyAgent].close(); + if (!this[kHttpsProxyAgent][kClosed]) await this[kHttpsProxyAgent].close(); + } + async [kDestroy](err) { + await this[kNoProxyAgent].destroy(err); + if (!this[kHttpProxyAgent][kDestroyed]) await this[kHttpProxyAgent].destroy(err); + if (!this[kHttpsProxyAgent][kDestroyed]) await this[kHttpsProxyAgent].destroy(err); + } + #getProxyAgentForUrl(url) { + let { protocol, host: hostname, port } = url; + hostname = hostname.replace(/:\d*$/, "").toLowerCase(); + port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; + return this[kHttpProxyAgent]; + } + #shouldProxy(hostname, port) { + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; + for (let i = 0; i < this.#noProxyEntries.length; i++) { + const entry = this.#noProxyEntries[i]; + if (entry.port && entry.port !== port) continue; + if (!/^[.*]/.test(entry.hostname)) { + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; + } + return true; + } + #parseNoProxy() { + const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv; + const noProxySplit = noProxyValue.split(/[,\s]/); + const noProxyEntries = []; + for (let i = 0; i < noProxySplit.length; i++) { + const entry = noProxySplit[i]; + if (!entry) continue; + const parsed = entry.match(/^(.+):(\d+)$/); + noProxyEntries.push({ + hostname: (parsed ? parsed[1] : entry).toLowerCase(), + port: parsed ? Number.parseInt(parsed[2], 10) : 0 + }); + } + this.#noProxyValue = noProxyValue; + this.#noProxyEntries = noProxyEntries; + } + get #noProxyChanged() { + if (this.#opts.noProxy !== void 0) return false; + return this.#noProxyValue !== this.#noProxyEnv; + } + get #noProxyEnv() { + return process.env.no_proxy ?? process.env.NO_PROXY ?? ""; + } + }; + module.exports = EnvHttpProxyAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/retry-handler.js +var require_retry_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$16 = __require("node:assert"); + const { kRetryHandlerDefaultRetry } = require_symbols$4(); + const { RequestRetryError } = require_errors(); + const { isDisturbed, parseHeaders, parseRangeHeader, wrapRequestBody } = require_util$7(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + return new Date(retryAfter).getTime() - current; + } + module.exports = class RetryHandler { + constructor(opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts; + const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes } = retryOptions ?? {}; + this.dispatch = handlers.dispatch; + this.handler = handlers.handler; + this.opts = { + ...dispatchOpts, + body: wrapRequestBody(opts.body) + }; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + minTimeout: minTimeout ?? 500, + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + methods: methods ?? [ + "GET", + "HEAD", + "OPTIONS", + "PUT", + "DELETE", + "TRACE" + ], + statusCodes: statusCodes ?? [ + 500, + 502, + 503, + 504, + 429 + ], + errorCodes: errorCodes ?? [ + "ECONNRESET", + "ECONNREFUSED", + "ENOTFOUND", + "ENETDOWN", + "ENETUNREACH", + "EHOSTDOWN", + "EHOSTUNREACH", + "EPIPE", + "UND_ERR_SOCKET" + ] + }; + this.retryCount = 0; + this.retryCountCheckpoint = 0; + this.start = 0; + this.end = null; + this.etag = null; + this.resume = null; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) this.abort(reason); + else this.reason = reason; + }); + } + onRequestSent() { + if (this.handler.onRequestSent) this.handler.onRequestSent(); + } + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) this.handler.onUpgrade(statusCode, headers, socket); + } + onConnect(abort) { + if (this.aborted) abort(this.reason); + else this.abort = abort; + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { maxRetries, minTimeout, maxTimeout, timeoutFactor, statusCodes, errorCodes, methods } = retryOptions; + const { counter } = state; + if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers?.["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = Number.isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout); + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) if (this.retryOpts.statusCodes.includes(statusCode) === false) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + else { + this.abort(new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { + this.abort(new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort(new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort(new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + })); + return false; + } + const { start, size, end = size - 1 } = contentRange; + assert$16(this.start === start, "content-range mismatch"); + assert$16(this.end == null || this.end === end, "content-range mismatch"); + this.resume = resume; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + const { start, size, end = size - 1 } = range; + assert$16(start != null && Number.isFinite(start), "content-range mismatch"); + assert$16(end != null && Number.isFinite(end), "invalid content-length"); + this.start = start; + this.end = end; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) - 1 : null; + } + assert$16(Number.isFinite(this.start)); + assert$16(this.end == null || Number.isFinite(this.end), "invalid content-length"); + this.resume = resume; + this.etag = headers.etag != null ? headers.etag : null; + if (this.etag != null && this.etag.startsWith("W/")) this.etag = null; + return this.handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + const err = new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); + this.abort(err); + return false; + } + onData(chunk) { + this.start += chunk.length; + return this.handler.onData(chunk); + } + onComplete(rawTrailers) { + this.retryCount = 0; + return this.handler.onComplete(rawTrailers); + } + onError(err) { + if (this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; + this.retryOpts.retry(err, { + state: { counter: this.retryCount }, + opts: { + retryOptions: this.retryOpts, + ...this.opts + } + }, onRetry.bind(this)); + function onRetry(err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) return this.handler.onError(err); + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; + if (this.etag != null) headers["if-match"] = this.etag; + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + }; + } + try { + this.retryCountCheckpoint = this.retryCount; + this.dispatch(this.opts, this); + } catch (err) { + this.handler.onError(err); + } + } + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/dispatcher/retry-agent.js +var require_retry_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Dispatcher = require_dispatcher(); + const RetryHandler = require_retry_handler(); + var RetryAgent = class extends Dispatcher { + #agent = null; + #options = null; + constructor(agent, options = {}) { + super(options); + this.#agent = agent; + this.#options = options; + } + dispatch(opts, handler) { + const retry = new RetryHandler({ + ...opts, + retryOptions: this.#options + }, { + dispatch: this.#agent.dispatch.bind(this.#agent), + handler + }); + return this.#agent.dispatch(opts, retry); + } + close() { + return this.#agent.close(); + } + destroy() { + return this.#agent.destroy(); + } + }; + module.exports = RetryAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/readable.js +var require_readable = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$15 = __require("node:assert"); + const { Readable: Readable$2 } = __require("node:stream"); + const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); + const util = require_util$7(); + const { ReadableStreamFrom } = require_util$7(); + const kConsume = Symbol("kConsume"); + const kReading = Symbol("kReading"); + const kBody = Symbol("kBody"); + const kAbort = Symbol("kAbort"); + const kContentType = Symbol("kContentType"); + const kContentLength = Symbol("kContentLength"); + const noop = () => {}; + var BodyReadable = class extends Readable$2 { + constructor({ resume, abort, contentType = "", contentLength, highWaterMark = 64 * 1024 }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kContentLength] = contentLength; + this[kReading] = false; + } + destroy(err) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + return super.destroy(err); + } + _destroy(err, callback) { + if (!this[kReading]) setImmediate(() => { + callback(err); + }); + else callback(err); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") this[kReading] = true; + return super.on(ev, ...args); + } + addListener(ev, ...args) { + return this.on(ev, ...args); + } + off(ev, ...args) { + const ret = super.off(ev, ...args); + if (ev === "data" || ev === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; + } + return super.push(chunk); + } + async text() { + return consume(this, "text"); + } + async json() { + return consume(this, "json"); + } + async blob() { + return consume(this, "blob"); + } + async bytes() { + return consume(this, "bytes"); + } + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + async formData() { + throw new NotSupportedError(); + } + get bodyUsed() { + return util.isDisturbed(this); + } + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert$15(this[kBody].locked); + } + } + return this[kBody]; + } + async dump(opts) { + let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024; + const signal = opts?.signal; + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) throw new InvalidArgumentError("signal must be an AbortSignal"); + signal?.throwIfAborted(); + if (this._readableState.closeEmitted) return null; + return await new Promise((resolve, reject) => { + if (this[kContentLength] > limit) this.destroy(new AbortError()); + const onAbort = () => { + this.destroy(signal.reason ?? new AbortError()); + }; + signal?.addEventListener("abort", onAbort); + this.on("close", function() { + signal?.removeEventListener("abort", onAbort); + if (signal?.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); + }).on("error", noop).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) this.destroy(); + }).resume(); + }); + } + }; + function isLocked(self) { + return self[kBody] && self[kBody].locked === true || self[kConsume]; + } + function isUnusable(self) { + return util.isDisturbed(self) || isLocked(self); + } + async function consume(stream, type) { + assert$15(!stream[kConsume]); + return new Promise((resolve, reject) => { + if (isUnusable(stream)) { + const rState = stream._readableState; + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", (err) => { + reject(err); + }).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); + }); + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); + }); + } + function consumeStart(consume) { + if (consume.body === null) return; + const { _readableState: state } = consume.stream; + if (state.bufferIndex) { + const start = state.bufferIndex; + const end = state.buffer.length; + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume]); + else consume.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + consume.stream.resume(); + while (consume.stream.read() != null); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + */ + function chunksDecode(chunks, length) { + if (chunks.length === 0 || length === 0) return ""; + const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); + const bufferLength = buffer.length; + const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; + return buffer.utf8Slice(start, bufferLength); + } + /** + * @param {Buffer[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + function chunksConcat(chunks, length) { + if (chunks.length === 0 || length === 0) return /* @__PURE__ */ new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); + const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); + let offset = 0; + for (let i = 0; i < chunks.length; ++i) { + const chunk = chunks[i]; + buffer.set(chunk, offset); + offset += chunk.length; + } + return buffer; + } + function consumeEnd(consume) { + const { type, body, resolve, stream, length } = consume; + try { + if (type === "text") resolve(chunksDecode(body, length)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); + consumeFinish(consume); + } catch (err) { + stream.destroy(err); + } + } + function consumePush(consume, chunk) { + consume.length += chunk.length; + consume.body.push(chunk); + } + function consumeFinish(consume, err) { + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); + consume.type = null; + consume.stream = null; + consume.resolve = null; + consume.reject = null; + consume.length = 0; + consume.body = null; + } + module.exports = { + Readable: BodyReadable, + chunksDecode + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/util.js +var require_util$5 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$14 = __require("node:assert"); + const { ResponseStatusCodeError } = require_errors(); + const { chunksDecode } = require_readable(); + const CHUNK_LIMIT = 128 * 1024; + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert$14(body); + let chunks = []; + let length = 0; + try { + for await (const chunk of body) { + chunks.push(chunk); + length += chunk.length; + if (length > CHUNK_LIMIT) { + chunks = []; + length = 0; + break; + } + } + } catch { + chunks = []; + length = 0; + } + const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`; + if (statusCode === 204 || !contentType || !length) { + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))); + return; + } + const stackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + let payload; + try { + if (isContentTypeApplicationJson(contentType)) payload = JSON.parse(chunksDecode(chunks, length)); + else if (isContentTypeText(contentType)) payload = chunksDecode(chunks, length); + } catch {} finally { + Error.stackTraceLimit = stackTraceLimit; + } + queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))); + } + const isContentTypeApplicationJson = (contentType) => { + return contentType.length > 15 && contentType[11] === "/" && contentType[0] === "a" && contentType[1] === "p" && contentType[2] === "p" && contentType[3] === "l" && contentType[4] === "i" && contentType[5] === "c" && contentType[6] === "a" && contentType[7] === "t" && contentType[8] === "i" && contentType[9] === "o" && contentType[10] === "n" && contentType[12] === "j" && contentType[13] === "s" && contentType[14] === "o" && contentType[15] === "n"; + }; + const isContentTypeText = (contentType) => { + return contentType.length > 4 && contentType[4] === "/" && contentType[0] === "t" && contentType[1] === "e" && contentType[2] === "x" && contentType[3] === "t"; + }; + module.exports = { + getResolveErrorBodyCallback, + isContentTypeApplicationJson, + isContentTypeText + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-request.js +var require_api_request = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$13 = __require("node:assert"); + const { Readable } = require_readable(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$4 } = __require("node:async_hooks"); + var RequestHandler = class extends AsyncResource$4 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_REQUEST"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.method = method; + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.res = null; + this.abort = null; + this.body = body; + this.trailers = {}; + this.context = null; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError; + this.highWaterMark = highWaterMark; + this.signal = signal; + this.reason = null; + this.removeAbortListener = null; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + if (this.signal) if (this.signal.aborted) this.reason = this.signal.reason ?? new RequestAbortedError(); + else this.removeAbortListener = util.addAbortListener(this.signal, () => { + this.reason = this.signal.reason ?? new RequestAbortedError(); + if (this.res) util.destroy(this.res.on("error", util.nop), this.reason); + else if (this.abort) this.abort(this.reason); + if (this.removeAbortListener) { + this.res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + }); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$13(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const contentLength = parsedHeaders["content-length"]; + const res = new Readable({ + resume, + abort, + contentType, + contentLength: this.method !== "HEAD" && contentLength ? Number(contentLength) : null, + highWaterMark + }); + if (this.removeAbortListener) res.on("close", this.removeAbortListener); + this.callback = null; + this.res = res; + if (callback !== null) if (this.throwOnError && statusCode >= 400) this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + else this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } + onData(chunk) { + return this.res.push(chunk); + } + onComplete(trailers) { + util.parseHeaders(trailers, this.trailers); + this.res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (res) { + this.res = null; + queueMicrotask(() => { + util.destroy(res, err); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + if (this.removeAbortListener) { + res?.off("close", this.removeAbortListener); + this.removeAbortListener(); + this.removeAbortListener = null; + } + } + }; + function request(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = request; + module.exports.RequestHandler = RequestHandler; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { addAbortListener } = require_util$7(); + const { RequestAbortedError } = require_errors(); + const kListener = Symbol("kListener"); + const kSignal = Symbol("kSignal"); + function abort(self) { + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); + removeSignal(self); + } + function addSignal(self, signal) { + self.reason = null; + self[kSignal] = null; + self[kListener] = null; + if (!signal) return; + if (signal.aborted) { + abort(self); + return; + } + self[kSignal] = signal; + self[kListener] = () => { + abort(self); + }; + addAbortListener(self[kSignal], self[kListener]); + } + function removeSignal(self) { + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); + self[kSignal] = null; + self[kListener] = null; + } + module.exports = { + addSignal, + removeSignal + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-stream.js +var require_api_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$12 = __require("node:assert"); + const { finished: finished$1, PassThrough: PassThrough$2 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError } = require_errors(); + const util = require_util$7(); + const { getResolveErrorBodyCallback } = require_util$5(); + const { AsyncResource: AsyncResource$3 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource$3 { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_STREAM"); + } catch (err) { + if (util.isStream(body)) util.destroy(body.on("error", util.nop), err); + throw err; + } + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.factory = factory; + this.callback = callback; + this.res = null; + this.abort = null; + this.context = null; + this.trailers = null; + this.body = body; + this.onInfo = onInfo || null; + this.throwOnError = throwOnError || false; + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$12(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); + return; + } + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const contentType = (responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers)["content-type"]; + res = new PassThrough$2(); + this.callback = null; + this.runInAsyncScope(getResolveErrorBodyCallback, null, { + callback, + body: res, + contentType, + statusCode, + statusMessage, + headers + }); + } else { + if (factory === null) return; + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); + finished$1(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this; + this.res = null; + if (err || !res.readable) util.destroy(res, err); + this.callback = null; + this.runInAsyncScope(callback, null, err || null, { + opaque, + trailers + }); + if (err) abort(); + }); + } + res.on("drain", resume); + this.res = res; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) return; + this.trailers = util.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + if (body) { + this.body = null; + util.destroy(body, err); + } + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = stream; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Readable: Readable$1, Duplex, PassThrough: PassThrough$1 } = __require("node:stream"); + const { InvalidArgumentError, InvalidReturnValueError, RequestAbortedError } = require_errors(); + const util = require_util$7(); + const { AsyncResource: AsyncResource$2 } = __require("node:async_hooks"); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$11 = __require("node:assert"); + const kResume = Symbol("resume"); + var PipelineRequest = class extends Readable$1 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume } = this; + if (resume) { + this[kResume] = null; + resume(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable$1 { + constructor(resume) { + super({ autoDestroy: true }); + this[kResume] = resume; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource$2 { + constructor(opts, handler) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body?.resume) body.resume(); + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); + util.destroy(body, err); + util.destroy(req, err); + util.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + if (this.reason) { + abort(this.reason); + return; + } + assert$11(!res, "pipeline cannot be retried"); + assert$11(!ret.destroyed); + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.onInfo({ + statusCode, + headers + }); + } + return; + } + this.res = new PipelineResponse(resume); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util.nop); + throw err; + } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); + body.on("data", (chunk) => { + const { ret, body } = this; + if (!ret.push(chunk) && body.pause) body.pause(); + }).on("error", (err) => { + const { ret } = this; + util.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util.destroy(ret, err); + } + }; + function pipeline(opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler); + this.dispatch({ + ...opts, + body: pipelineHandler.req + }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough$1().destroy(err); + } + } + module.exports = pipeline; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { InvalidArgumentError, SocketError } = require_errors(); + const { AsyncResource: AsyncResource$1 } = __require("node:async_hooks"); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + const assert$10 = __require("node:assert"); + var UpgradeHandler = class extends AsyncResource$1 { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_UPGRADE"); + this.responseHeaders = responseHeaders || null; + this.opaque = opaque || null; + this.callback = callback; + this.abort = null; + this.context = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$10(this.callback); + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + assert$10(statusCode === 101); + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = upgrade; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/api-connect.js +var require_api_connect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$9 = __require("node:assert"); + const { AsyncResource } = __require("node:async_hooks"); + const { InvalidArgumentError, SocketError } = require_errors(); + const util = require_util$7(); + const { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + super("UNDICI_CONNECT"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.callback = callback; + this.abort = null; + addSignal(this, signal); + } + onConnect(abort, context) { + if (this.reason) { + abort(this.reason); + return; + } + assert$9(this.callback); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); + } + } + }; + function connect(opts, callback) { + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); + }); + }); + try { + const connectHandler = new ConnectHandler(opts, callback); + this.dispatch({ + ...opts, + method: "CONNECT" + }, connectHandler); + } catch (err) { + if (typeof callback !== "function") throw err; + const opaque = opts?.opaque; + queueMicrotask(() => callback(err, { opaque })); + } + } + module.exports = connect; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/api/index.js +var require_api = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports.request = require_api_request(); + module.exports.stream = require_api_stream(); + module.exports.pipeline = require_api_pipeline(); + module.exports.upgrade = require_api_upgrade(); + module.exports.connect = require_api_connect(); +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { UndiciError } = require_errors(); + const kMockNotMatchedError = Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED"); + module.exports = { MockNotMatchedError: class MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + static [Symbol.hasInstance](instance) { + return instance && instance[kMockNotMatchedError] === true; + } + [kMockNotMatchedError] = true; + } }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kAgent: Symbol("agent"), + kOptions: Symbol("options"), + kFactory: Symbol("factory"), + kDispatches: Symbol("dispatches"), + kDispatchKey: Symbol("dispatch key"), + kDefaultHeaders: Symbol("default headers"), + kDefaultTrailers: Symbol("default trailers"), + kContentLength: Symbol("content length"), + kMockAgent: Symbol("mock agent"), + kMockAgentSet: Symbol("mock agent set"), + kMockAgentGet: Symbol("mock agent get"), + kMockDispatch: Symbol("mock dispatch"), + kClose: Symbol("close"), + kOriginalClose: Symbol("original agent close"), + kOrigin: Symbol("origin"), + kIsMockActive: Symbol("is mock active"), + kNetConnect: Symbol("net connect"), + kGetNetConnect: Symbol("get net connect"), + kConnected: Symbol("connected") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { MockNotMatchedError } = require_mock_errors(); + const { kDispatches, kMockAgent, kOriginalDispatch, kOrigin, kGetNetConnect } = require_mock_symbols(); + const { buildURL } = require_util$7(); + const { STATUS_CODES: STATUS_CODES$1 } = __require("node:http"); + const { types: { isPromise } } = __require("node:util"); + function matchValue(match, value) { + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; + return false; + } + function lowerCaseEntries(headers) { + return Object.fromEntries(Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + })); + } + /** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ + function getHeaderByName(headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } + /** @param {string[]} headers */ + function buildHeadersFromArray(headers) { + const clone = headers.slice(); + const entries = []; + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); + return Object.fromEntries(entries); + } + function matchHeaders(mockDispatch, headers) { + if (typeof mockDispatch.headers === "function") { + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; + return true; + } + function safeUrl(path) { + if (typeof path !== "string") return path; + const pathSegments = path.split("?"); + if (pathSegments.length !== 2) return path; + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path); + const methodMatch = matchValue(mockDispatch.method, method); + const bodyMatch = typeof mockDispatch.body !== "undefined" ? matchValue(mockDispatch.body, body) : true; + const headersMatch = matchHeaders(mockDispatch, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData(data) { + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else return data.toString(); + } + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); + return matchedMockDispatches[0]; + } + function addMockDispatch(mockDispatches, key, data) { + const baseData = { + timesInvoked: 0, + times: 1, + persist: false, + consumed: false + }; + const replyData = typeof data === "function" ? { callback: data } : { ...data }; + const newMockDispatch = { + ...baseData, + ...key, + pending: true, + data: { + error: null, + ...replyData + } + }; + mockDispatches.push(newMockDispatch); + return newMockDispatch; + } + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) return false; + return matchKey(dispatch, key); + }); + if (index !== -1) mockDispatches.splice(index, 1); + } + function buildKey(opts) { + const { path, method, body, headers, query } = opts; + return { + path, + method, + body, + headers, + query + }; + } + function generateKeyValues(data) { + const keys = Object.keys(data); + const result = []; + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + const value = data[key]; + const name = Buffer.from(`${key}`); + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); + } + return result; + } + /** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ + function getStatusText(statusCode) { + return STATUS_CODES$1[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) buffers.push(data); + return Buffer.concat(buffers).toString("utf8"); + } + /** + * Mock dispatch function used to simulate undici dispatches + */ + function mockDispatch(opts, handler) { + const key = buildKey(opts); + const mockDispatch = getMockDispatch(this[kDispatches], key); + mockDispatch.timesInvoked++; + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; + const { timesInvoked, times } = mockDispatch; + mockDispatch.consumed = !persist && timesInvoked >= times; + mockDispatch.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); + else handleReply(this[kDispatches]); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ + ...opts, + headers: optsHeaders + }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler.onConnect?.((err) => handler.onError(err), null); + handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)); + handler.onData?.(Buffer.from(responseData)); + handler.onComplete?.(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume() {} + return true; + } + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler) { + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); + }; + } + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; + return false; + } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName, + buildHeadersFromArray + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { getResponseData, buildKey, addMockDispatch } = require_mock_utils(); + const { kDispatches, kDispatchKey, kDefaultHeaders, kDefaultTrailers, kContentLength, kMockDispatch } = require_mock_symbols(); + const { InvalidArgumentError } = require_errors(); + const { buildURL } = require_util$7(); + /** + * Defines the scope API for an interceptor reply + */ + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; + } + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + this[kMockDispatch].delay = waitInMs; + return this; + } + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[kMockDispatch].persist = true; + return this; + } + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times(repeatTimes) { + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); + this[kMockDispatch].times = repeatTimes; + return this; + } + }; + /** + * Defines an interceptor for a Mock + */ + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = buildURL(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData({ statusCode, data, responseOptions }) { + const responseData = getResponseData(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + return { + statusCode, + data, + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } + }; + } + validateReplyParameters(replyParameters) { + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyOptionsCallbackOrStatusCode) { + if (typeof replyOptionsCallbackOrStatusCode === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyOptionsCallbackOrStatusCode(opts); + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); + const replyParameters = { + data: "", + responseOptions: {}, + ...resolvedData + }; + this.validateReplyParameters(replyParameters); + return { ...this.createMockScopeDispatchData(replyParameters) }; + }; + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback)); + } + const replyParameters = { + statusCode: replyOptionsCallbackOrStatusCode, + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] + }; + this.validateReplyParameters(replyParameters); + const dispatchData = this.createMockScopeDispatchData(replyParameters); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData)); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error })); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module.exports.MockInterceptor = MockInterceptor; + module.exports.MockScope = MockScope; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { promisify: promisify$1 } = __require("node:util"); + const Client = require_client(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify$1(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockClient; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { promisify } = __require("node:util"); + const Pool = require_pool(); + const { buildMockDispatch } = require_mock_utils(); + const { kDispatches, kMockAgent, kClose, kOriginalClose, kOrigin, kOriginalDispatch, kConnected } = require_mock_symbols(); + const { MockInterceptor } = require_mock_interceptor(); + const Symbols = require_symbols$4(); + const { InvalidArgumentError } = require_errors(); + /** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module.exports = MockPool; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + const plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; + } + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { + ...keys, + count, + noun + }; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform: Transform$1 } = __require("node:stream"); + const { Console } = __require("node:console"); + const PERSISTENT = process.versions.icu ? "✅" : "Y "; + const NOT_PERSISTENT = process.versions.icu ? "❌" : "N "; + /** + * Gets the output of `console.table(…)` as a string. + */ + module.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform$1({ transform(chunk, _enc, cb) { + cb(null, chunk); + } }); + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { colors: !disableColors && !process.env.CI } + }); + } + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + "Status code": statusCode, + Persistent: persist ? PERSISTENT : NOT_PERSISTENT, + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kClients } = require_symbols$4(); + const Agent = require_agent(); + const { kAgent, kMockAgentSet, kMockAgentGet, kDispatches, kIsMockActive, kNetConnect, kGetNetConnect, kOptions, kFactory } = require_mock_symbols(); + const MockClient = require_mock_client(); + const MockPool = require_mock_pool(); + const { matchValue, buildMockOptions } = require_mock_utils(); + const { InvalidArgumentError, UndiciError } = require_errors(); + const Dispatcher = require_dispatcher(); + const Pluralizer = require_pluralizer(); + const PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + const agent = opts?.agent ? opts.agent : new Agent(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); + } + disableNetConnect() { + this[kNetConnect] = false; + } + get isMockActive() { + return this[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, dispatcher); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const client = this[kClients].get(origin); + if (client) return client; + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope[kDispatches].map((dispatch) => ({ + ...dispatch, + origin + }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) return; + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module.exports = MockAgent; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/global.js +var require_global = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + const { InvalidArgumentError } = require_errors(); + const Agent = require_agent(); + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); + } + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; + } + module.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/handler/decorator-handler.js +var require_decorator_handler = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = class DecoratorHandler { + #handler; + constructor(handler) { + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); + this.#handler = handler; + } + onConnect(...args) { + return this.#handler.onConnect?.(...args); + } + onError(...args) { + return this.#handler.onError?.(...args); + } + onUpgrade(...args) { + return this.#handler.onUpgrade?.(...args); + } + onResponseStarted(...args) { + return this.#handler.onResponseStarted?.(...args); + } + onHeaders(...args) { + return this.#handler.onHeaders?.(...args); + } + onData(...args) { + return this.#handler.onData?.(...args); + } + onComplete(...args) { + return this.#handler.onComplete?.(...args); + } + onBodySent(...args) { + return this.#handler.onBodySent?.(...args); + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/redirect.js +var require_redirect = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RedirectHandler = require_redirect_handler(); + module.exports = (opts) => { + const globalMaxRedirections = opts?.maxRedirections; + return (dispatch) => { + return function redirectInterceptor(opts, handler) { + const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts; + if (!maxRedirections) return dispatch(opts, handler); + return dispatch(baseOpts, new RedirectHandler(dispatch, maxRedirections, opts, handler)); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/retry.js +var require_retry = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const RetryHandler = require_retry_handler(); + module.exports = (globalOpts) => { + return (dispatch) => { + return function retryInterceptor(opts, handler) { + return dispatch(opts, new RetryHandler({ + ...opts, + retryOptions: { + ...globalOpts, + ...opts.retryOptions + } + }, { + handler, + dispatch + })); + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dump.js +var require_dump = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = require_util$7(); + const { InvalidArgumentError, RequestAbortedError } = require_errors(); + const DecoratorHandler = require_decorator_handler(); + var DumpHandler = class extends DecoratorHandler { + #maxSize = 1024 * 1024; + #abort = null; + #dumped = false; + #aborted = false; + #size = 0; + #reason = null; + #handler = null; + constructor({ maxSize }, handler) { + super(handler); + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); + this.#maxSize = maxSize ?? this.#maxSize; + this.#handler = handler; + } + onConnect(abort) { + this.#abort = abort; + this.#handler.onConnect(this.#customAbort.bind(this)); + } + #customAbort(reason) { + this.#aborted = true; + this.#reason = reason; + } + onHeaders(statusCode, rawHeaders, resume, statusMessage) { + const contentLength = util.parseHeaders(rawHeaders)["content-length"]; + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.#aborted) return true; + return this.#handler.onHeaders(statusCode, rawHeaders, resume, statusMessage); + } + onError(err) { + if (this.#dumped) return; + err = this.#reason ?? err; + this.#handler.onError(err); + } + onData(chunk) { + this.#size = this.#size + chunk.length; + if (this.#size >= this.#maxSize) { + this.#dumped = true; + if (this.#aborted) this.#handler.onError(this.#reason); + else this.#handler.onComplete([]); + } + return true; + } + onComplete(trailers) { + if (this.#dumped) return; + if (this.#aborted) { + this.#handler.onError(this.reason); + return; + } + this.#handler.onComplete(trailers); + } + }; + function createDumpInterceptor({ maxSize: defaultMaxSize } = { maxSize: 1024 * 1024 }) { + return (dispatch) => { + return function Intercept(opts, handler) { + const { dumpMaxSize = defaultMaxSize } = opts; + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize }, handler)); + }; + }; + } + module.exports = createDumpInterceptor; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/interceptor/dns.js +var require_dns = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { isIP } = __require("node:net"); + const { lookup } = __require("node:dns"); + const DecoratorHandler = require_decorator_handler(); + const { InvalidArgumentError, InformationalError } = require_errors(); + const maxInt = Math.pow(2, 31) - 1; + var DNSInstance = class { + #maxTTL = 0; + #maxItems = 0; + #records = /* @__PURE__ */ new Map(); + dualStack = true; + affinity = null; + lookup = null; + pick = null; + constructor(opts) { + this.#maxTTL = opts.maxTTL; + this.#maxItems = opts.maxItems; + this.dualStack = opts.dualStack; + this.affinity = opts.affinity; + this.lookup = opts.lookup ?? this.#defaultLookup; + this.pick = opts.pick ?? this.#defaultPick; + } + get full() { + return this.#records.size === this.#maxItems; + } + runLookup(origin, opts, cb) { + const ips = this.#records.get(origin.hostname); + if (ips == null && this.full) { + cb(null, origin.origin); + return; + } + const newOpts = { + affinity: this.affinity, + dualStack: this.dualStack, + lookup: this.lookup, + pick: this.pick, + ...opts.dns, + maxTTL: this.#maxTTL, + maxItems: this.#maxItems + }; + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.#records.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + }); + else { + const ip = this.pick(origin, ips, newOpts.affinity); + if (ip == null) { + this.#records.delete(origin.hostname); + this.runLookup(origin, opts, cb); + return; + } + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, `${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`); + } + } + #defaultLookup(origin, opts, cb) { + lookup(origin.hostname, { + all: true, + family: this.dualStack === false ? this.affinity : 0, + order: "ipv4first" + }, (err, addresses) => { + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); + cb(null, results.values()); + }); + } + #defaultPick(origin, hostnameRecords, affinity) { + let ip = null; + const { records, offset } = hostnameRecords; + let family; + if (this.dualStack) { + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; + } else { + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; + const position = family.offset % family.ips.length; + ip = family.ips[position] ?? null; + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) { + family.ips.splice(position, 1); + return this.pick(origin, hostnameRecords, affinity); + } + return ip; + } + setRecords(origin, addresses) { + const timestamp = Date.now(); + const records = { records: { + 4: null, + 6: null + } }; + for (const record of addresses) { + record.timestamp = timestamp; + if (typeof record.ttl === "number") record.ttl = Math.min(record.ttl, this.#maxTTL); + else record.ttl = this.#maxTTL; + const familyRecords = records.records[record.family] ?? { ips: [] }; + familyRecords.ips.push(record); + records.records[record.family] = familyRecords; + } + this.#records.set(origin.hostname, records); + } + getHandler(meta, opts) { + return new DNSDispatchHandler(this, meta, opts); + } + }; + var DNSDispatchHandler = class extends DecoratorHandler { + #state = null; + #opts = null; + #dispatch = null; + #handler = null; + #origin = null; + constructor(state, { origin, handler, dispatch }, opts) { + super(handler); + this.#origin = origin; + this.#handler = handler; + this.#opts = { ...opts }; + this.#state = state; + this.#dispatch = dispatch; + } + onError(err) { + switch (err.code) { + case "ETIMEDOUT": + case "ECONNREFUSED": + if (this.#state.dualStack) { + this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { + if (err) return this.#handler.onError(err); + const dispatchOpts = { + ...this.#opts, + origin: newOrigin + }; + this.#dispatch(dispatchOpts, this); + }); + return; + } + this.#handler.onError(err); + return; + case "ENOTFOUND": this.#state.deleteRecord(this.#origin); + default: + this.#handler.onError(err); + break; + } + } + }; + module.exports = (interceptorOpts) => { + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + const dualStack = interceptorOpts?.dualStack ?? true; + let affinity; + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ + maxTTL: interceptorOpts?.maxTTL ?? 1e4, + lookup: interceptorOpts?.lookup ?? null, + pick: interceptorOpts?.pick ?? null, + dualStack, + affinity, + maxItems: interceptorOpts?.maxItems ?? Infinity + }); + return (dispatch) => { + return function dnsInterceptor(origDispatchOpts, handler) { + const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); + instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { + if (err) return handler.onError(err); + let dispatchOpts = null; + dispatchOpts = { + ...origDispatchOpts, + servername: origin.hostname, + origin: newOrigin, + headers: { + host: origin.hostname, + ...origDispatchOpts.headers + } + }; + dispatch(dispatchOpts, instance.getHandler({ + origin, + dispatch, + handler + }, origDispatchOpts)); + }); + return true; + }; + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/headers.js +var require_headers = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$4(); + const { kEnumerableProperty } = require_util$7(); + const { iteratorMixin, isValidHeaderName, isValidHeaderValue } = require_util$6(); + const { webidl } = require_webidl(); + const assert$8 = __require("node:assert"); + const util$2 = __require("node:util"); + const kHeadersMap = Symbol("headers map"); + const kHeadersSortedMap = Symbol("headers map sorted"); + /** + * @param {number} code + */ + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill(headers, object) { + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); + appendHeader(headers, header[0], header[1]); + } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); + return getHeadersList(headers).append(name, value, false); + } + function compareHeaderName(a, b) { + return a[0] < b[0] ? -1 : 1; + } + var HeadersList = class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]); + this[kHeadersSortedMap] = init[kHeadersSortedMap]; + this.cookies = init.cookies === null ? null : [...init.cookies]; + } else { + this[kHeadersMap] = new Map(init); + this[kHeadersSortedMap] = null; + } + } + /** + * @see https://fetch.spec.whatwg.org/#header-list-contains + * @param {string} name + * @param {boolean} isLowerCase + */ + contains(name, isLowerCase) { + return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-append + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + append(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else this[kHeadersMap].set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-set + * @param {string} name + * @param {string} value + * @param {boolean} isLowerCase + */ + set(name, value, isLowerCase) { + this[kHeadersSortedMap] = null; + const lowercaseName = isLowerCase ? name : name.toLowerCase(); + if (lowercaseName === "set-cookie") this.cookies = [value]; + this[kHeadersMap].set(lowercaseName, { + name, + value + }); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-delete + * @param {string} name + * @param {boolean} isLowerCase + */ + delete(name, isLowerCase) { + this[kHeadersSortedMap] = null; + if (!isLowerCase) name = name.toLowerCase(); + if (name === "set-cookie") this.cookies = null; + this[kHeadersMap].delete(name); + } + /** + * @see https://fetch.spec.whatwg.org/#concept-header-list-get + * @param {string} name + * @param {boolean} isLowerCase + * @returns {string | null} + */ + get(name, isLowerCase) { + return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null; + } + *[Symbol.iterator]() { + for (const { 0: name, 1: { value } } of this[kHeadersMap]) yield [name, value]; + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size !== 0) for (const { name, value } of this[kHeadersMap].values()) headers[name] = value; + return headers; + } + rawValues() { + return this[kHeadersMap].values(); + } + get entriesList() { + const headers = []; + if (this[kHeadersMap].size !== 0) for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); + return headers; + } + toSortedArray() { + const size = this[kHeadersMap].size; + const array = new Array(size); + if (size <= 32) { + if (size === 0) return array; + const iterator = this[kHeadersMap][Symbol.iterator](); + const firstValue = iterator.next().value; + array[0] = [firstValue[0], firstValue[1].value]; + assert$8(firstValue[1].value !== null); + for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { + value = iterator.next().value; + x = array[i] = [value[0], value[1].value]; + assert$8(x[1] !== null); + left = 0; + right = i; + while (left < right) { + pivot = left + (right - left >> 1); + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; + } + if (i !== pivot) { + j = i; + while (j > left) array[j] = array[--j]; + array[left] = x; + } + } + /* c8 ignore next 4 */ + if (!iterator.next().done) throw new TypeError("Unreachable"); + return array; + } else { + let i = 0; + for (const { 0: name, 1: { value } } of this[kHeadersMap]) { + array[i++] = [name, value]; + assert$8(value !== null); + } + return array.sort(compareHeaderName); + } + } + }; + var Headers = class Headers { + #guard; + #headersList; + constructor(init = void 0) { + webidl.util.markAsUncloneable(this); + if (init === kConstruct) return; + this.#headersList = new HeadersList(); + this.#guard = "none"; + if (init !== void 0) { + init = webidl.converters.HeadersInit(init, "Headers contructor", "init"); + fill(this, init); + } + } + append(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.append"); + const prefix = "Headers.append"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + return appendHeader(this, name, value); + } + delete(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; + this.#headersList.delete(name, false); + } + get(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.get"); + const prefix = "Headers.get"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.get(name, false); + } + has(name) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 1, "Headers.has"); + const prefix = "Headers.has"; + name = webidl.converters.ByteString(name, prefix, "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + return this.#headersList.contains(name, false); + } + set(name, value) { + webidl.brandCheck(this, Headers); + webidl.argumentLengthCheck(arguments, 2, "Headers.set"); + const prefix = "Headers.set"; + name = webidl.converters.ByteString(name, prefix, "name"); + value = webidl.converters.ByteString(value, prefix, "value"); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + this.#headersList.set(name, value, false); + } + getSetCookie() { + webidl.brandCheck(this, Headers); + const list = this.#headersList.cookies; + if (list) return [...list]; + return []; + } + get [kHeadersSortedMap]() { + if (this.#headersList[kHeadersSortedMap]) return this.#headersList[kHeadersSortedMap]; + const headers = []; + const names = this.#headersList.toSortedArray(); + const cookies = this.#headersList.cookies; + if (cookies === null || cookies.length === 1) return this.#headersList[kHeadersSortedMap] = names; + for (let i = 0; i < names.length; ++i) { + const { 0: name, 1: value } = names[i]; + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); + } + return this.#headersList[kHeadersSortedMap] = headers; + } + [util$2.inspect.custom](depth, options) { + options.depth ??= depth; + return `Headers ${util$2.formatWithOptions(options, this.#headersList.entries)}`; + } + static getHeadersGuard(o) { + return o.#guard; + } + static setHeadersGuard(o, guard) { + o.#guard = guard; + } + static getHeadersList(o) { + return o.#headersList; + } + static setHeadersList(o, list) { + o.#headersList = list; + } + }; + const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers; + Reflect.deleteProperty(Headers, "getHeadersGuard"); + Reflect.deleteProperty(Headers, "setHeadersGuard"); + Reflect.deleteProperty(Headers, "getHeadersList"); + Reflect.deleteProperty(Headers, "setHeadersList"); + iteratorMixin("Headers", Headers, kHeadersSortedMap, 0, 1); + Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true + }, + [util$2.inspect.custom]: { enumerable: false } + }); + webidl.converters.HeadersInit = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object") { + const iterator = Reflect.get(V, Symbol.iterator); + if (!util$2.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); + return webidl.converters["record"](V, prefix, argument); + } + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); + }; + module.exports = { + fill, + compareHeaderName, + Headers, + HeadersList, + getHeadersGuard, + setHeadersGuard, + setHeadersList, + getHeadersList + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/response.js +var require_response = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers(); + const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body(); + const util = require_util$7(); + const nodeUtil$1 = __require("node:util"); + const { kEnumerableProperty } = util; + const { isValidReasonPhrase, isCancelled, isAborted, isBlobLike, serializeJavascriptValueToJSONString, isErrorLike, isomorphicEncode, environmentSettingsObject: relevantRealm } = require_util$6(); + const { redirectStatusSet, nullBodyStatus } = require_constants$5(); + const { kState, kHeaders } = require_symbols$3(); + const { webidl } = require_webidl(); + const { FormData } = require_formdata(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$7 = __require("node:assert"); + const { types: types$3 } = __require("node:util"); + const textEncoder = new TextEncoder("utf-8"); + var Response = class Response { + static error() { + return fromInnerResponse(makeNetworkError(), "immutable"); + } + static json(data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, "Response.json"); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); + const responseObject = fromInnerResponse(makeResponse({}), "response"); + initializeResponse(responseObject, init, { + body: body[0], + type: "application/json" + }); + return responseObject; + } + static redirect(url, status = 302) { + webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl); + } catch (err) { + throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); + } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); + const responseObject = fromInnerResponse(makeResponse({}), "immutable"); + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value, true); + return responseObject; + } + constructor(body = null, init = {}) { + webidl.util.markAsUncloneable(this); + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body); + init = webidl.converters.ResponseInit(init); + this[kState] = makeResponse({}); + this[kHeaders] = new Headers(kConstruct); + setHeadersGuard(this[kHeaders], "response"); + setHeadersList(this[kHeaders], this[kState].headersList); + let bodyWithType = null; + if (body != null) { + const [extractedBody, type] = extractBody(body); + bodyWithType = { + body: extractedBody, + type + }; + } + initializeResponse(this, init, bodyWithType); + } + get type() { + webidl.brandCheck(this, Response); + return this[kState].type; + } + get url() { + webidl.brandCheck(this, Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) return ""; + return URLSerializer(url, true); + } + get redirected() { + webidl.brandCheck(this, Response); + return this[kState].urlList.length > 1; + } + get status() { + webidl.brandCheck(this, Response); + return this[kState].status; + } + get ok() { + webidl.brandCheck(this, Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + get statusText() { + webidl.brandCheck(this, Response); + return this[kState].statusText; + } + get headers() { + webidl.brandCheck(this, Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Response); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + clone() { + webidl.brandCheck(this, Response); + if (bodyUnusable(this)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + const clonedResponse = cloneResponse(this[kState]); + if (hasFinalizationRegistry && this[kState].body?.stream) streamRegistry.register(this, new WeakRef(this[kState].body.stream)); + return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])); + } + [nodeUtil$1.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + status: this.status, + statusText: this.statusText, + headers: this.headers, + body: this.body, + bodyUsed: this.bodyUsed, + ok: this.ok, + redirected: this.redirected, + type: this.type, + url: this.url + }; + return `Response ${nodeUtil$1.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Response); + Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true + } + }); + Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); + const newResponse = makeResponse({ + ...response, + body: null + }); + if (response.body != null) newResponse.body = cloneBody(newResponse, response.body); + return newResponse; + } + function makeResponse(init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init, + headersList: init?.headersList ? new HeadersList(init?.headersList) : new HeadersList(), + urlList: init?.urlList ? [...init.urlList] : [] + }; + } + function makeNetworkError(reason) { + return makeResponse({ + type: "error", + status: 0, + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); + } + function isNetworkError(response) { + return response.type === "error" && response.status === 0; + } + function makeFilteredResponse(response, state) { + state = { + internalResponse: response, + ...state + }; + return new Proxy(response, { + get(target, p) { + return p in state ? state[p] : target[p]; + }, + set(target, p, value) { + assert$7(!(p in state)); + target[p] = value; + return true; + } + }); + } + function filterResponse(response, type) { + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$7(false); + } + function makeAppropriateNetworkError(fetchParams, err = null) { + assert$7(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); + } + function initializeResponse(response, init, body) { + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); + if ("statusText" in init && init.statusText != null) { + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); + } + if ("status" in init && init.status != null) response[kState].status = init.status; + if ("statusText" in init && init.statusText != null) response[kState].statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(response[kHeaders], init.headers); + if (body) { + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("content-type", true)) response[kState].headersList.append("content-type", body.type, true); + } + } + /** + * @see https://fetch.spec.whatwg.org/#response-create + * @param {any} innerResponse + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Response} + */ + function fromInnerResponse(innerResponse, guard) { + const response = new Response(kConstruct); + response[kState] = innerResponse; + response[kHeaders] = new Headers(kConstruct); + setHeadersList(response[kHeaders], innerResponse.headersList); + setHeadersGuard(response[kHeaders], guard); + if (hasFinalizationRegistry && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); + return response; + } + webidl.converters.ReadableStream = webidl.interfaceConverter(ReadableStream); + webidl.converters.FormData = webidl.interfaceConverter(FormData); + webidl.converters.URLSearchParams = webidl.interfaceConverter(URLSearchParams); + webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (isBlobLike(V)) return webidl.converters.Blob(V, prefix, name, { strict: false }); + if (ArrayBuffer.isView(V) || types$3.isArrayBuffer(V)) return webidl.converters.BufferSource(V, prefix, name); + if (util.isFormDataLike(V)) return webidl.converters.FormData(V, prefix, name, { strict: false }); + if (V instanceof URLSearchParams) return webidl.converters.URLSearchParams(V, prefix, name); + return webidl.converters.DOMString(V, prefix, name); + }; + webidl.converters.BodyInit = function(V, prefix, argument) { + if (V instanceof ReadableStream) return webidl.converters.ReadableStream(V, prefix, argument); + if (V?.[Symbol.asyncIterator]) return V; + return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: () => 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: () => "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module.exports = { + isNetworkError, + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse, + fromInnerResponse + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/dispatcher-weakref.js +var require_dispatcher_weakref = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConnected, kSize } = require_symbols$4(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) this.finalizer(key); + }); + } + unregister(key) {} + }; + module.exports = function() { + if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { + process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + }; + } + return { + WeakRef, + FinalizationRegistry + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/request.js +var require_request = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body(); + const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers(); + const { FinalizationRegistry } = require_dispatcher_weakref()(); + const util = require_util$7(); + const nodeUtil = __require("node:util"); + const { isValidHTTPToken, sameOrigin, environmentSettingsObject } = require_util$6(); + const { forbiddenMethodsSet, corsSafeListedMethodsSet, referrerPolicy, requestRedirect, requestMode, requestCredentials, requestCache, requestDuplex } = require_constants$5(); + const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util; + const { kHeaders, kSignal, kState, kDispatcher } = require_symbols$3(); + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { kConstruct } = require_symbols$4(); + const assert$6 = __require("node:assert"); + const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); + const kAbortController = Symbol("abortController"); + const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); + function buildAbort(acRef) { + return abort; + function abort() { + const ac = acRef.deref(); + if (ac !== void 0) { + requestFinalizer.unregister(abort); + this.removeEventListener("abort", abort); + ac.abort(this.reason); + const controllerList = dependentControllerMap.get(ac.signal); + if (controllerList !== void 0) { + if (controllerList.size !== 0) { + for (const ref of controllerList) { + const ctrl = ref.deref(); + if (ctrl !== void 0) ctrl.abort(this.reason); + } + controllerList.clear(); + } + dependentControllerMap.delete(ac.signal); + } + } + } + } + let patchMethodWarning = false; + var Request = class Request { + constructor(input, init = {}) { + webidl.util.markAsUncloneable(this); + if (input === kConstruct) return; + const prefix = "Request constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + input = webidl.converters.RequestInfo(input, prefix, "input"); + init = webidl.converters.RequestInit(init, prefix, "init"); + let request = null; + let fallbackMode = null; + const baseUrl = environmentSettingsObject.settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + this[kDispatcher] = init.dispatcher; + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); + request = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + this[kDispatcher] = init.dispatcher || input[kDispatcher]; + assert$6(input instanceof Request); + request = input[kState]; + signal = input[kSignal]; + } + const origin = environmentSettingsObject.settingsObject.origin; + let window = "client"; + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; + request = makeRequest({ + method: request.method, + headersList: request.headersList, + unsafeRequest: request.unsafeRequest, + client: environmentSettingsObject.settingsObject, + window, + priority: request.priority, + origin: request.origin, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + mode: request.mode, + credentials: request.credentials, + cache: request.cache, + redirect: request.redirect, + integrity: request.integrity, + keepalive: request.keepalive, + reloadNavigation: request.reloadNavigation, + historyNavigation: request.historyNavigation, + urlList: [...request.urlList] + }); + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { + if (request.mode === "navigate") request.mode = "same-origin"; + request.reloadNavigation = false; + request.historyNavigation = false; + request.origin = "client"; + request.referrer = "client"; + request.referrerPolicy = ""; + request.url = request.urlList[request.urlList.length - 1]; + request.urlList = [request.url]; + } + if (init.referrer !== void 0) { + const referrer = init.referrer; + if (referrer === "") request.referrer = "no-referrer"; + else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; + } + } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; + let mode; + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { + let method = init.method; + const mayBeNormalized = normalizedMethodRecords[method]; + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); + const upperCase = method.toUpperCase(); + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); + method = normalizedMethodRecordsBase[upperCase] ?? method; + request.method = method; + } + if (!patchMethodWarning && request.method === "patch") { + process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); + patchMethodWarning = true; + } + } + if (init.signal !== void 0) signal = init.signal; + this[kState] = request; + const ac = new AbortController(); + this[kSignal] = ac.signal; + if (signal != null) { + if (!signal || typeof signal.aborted !== "boolean" || typeof signal.addEventListener !== "function") throw new TypeError("Failed to construct 'Request': member signal is not of type AbortSignal."); + if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) setMaxListeners(1500, signal); + } catch {} + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); + } + } + this[kHeaders] = new Headers(kConstruct); + setHeadersList(this[kHeaders], request.headersList); + setHeadersGuard(this[kHeaders], "request"); + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); + setHeadersGuard(this[kHeaders], "request-no-cors"); + } + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = getHeadersList(this[kHeaders]); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); + headersList.cookies = headers.cookies; + } else fillHeaders(this[kHeaders], headers); + } + const inputBody = input instanceof Request ? input[kState].body : null; + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); + let initBody = null; + if (init.body != null) { + const [extractedBody, contentType] = extractBody(init.body, request.keepalive); + initBody = extractedBody; + if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) this[kHeaders].append("content-type", contentType); + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); + request.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (bodyUnusable(input)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + get method() { + webidl.brandCheck(this, Request); + return this[kState].method; + } + get url() { + webidl.brandCheck(this, Request); + return URLSerializer(this[kState].url); + } + get headers() { + webidl.brandCheck(this, Request); + return this[kHeaders]; + } + get destination() { + webidl.brandCheck(this, Request); + return this[kState].destination; + } + get referrer() { + webidl.brandCheck(this, Request); + if (this[kState].referrer === "no-referrer") return ""; + if (this[kState].referrer === "client") return "about:client"; + return this[kState].referrer.toString(); + } + get referrerPolicy() { + webidl.brandCheck(this, Request); + return this[kState].referrerPolicy; + } + get mode() { + webidl.brandCheck(this, Request); + return this[kState].mode; + } + get credentials() { + return this[kState].credentials; + } + get cache() { + webidl.brandCheck(this, Request); + return this[kState].cache; + } + get redirect() { + webidl.brandCheck(this, Request); + return this[kState].redirect; + } + get integrity() { + webidl.brandCheck(this, Request); + return this[kState].integrity; + } + get keepalive() { + webidl.brandCheck(this, Request); + return this[kState].keepalive; + } + get isReloadNavigation() { + webidl.brandCheck(this, Request); + return this[kState].reloadNavigation; + } + get isHistoryNavigation() { + webidl.brandCheck(this, Request); + return this[kState].historyNavigation; + } + get signal() { + webidl.brandCheck(this, Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, Request); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, Request); + return "half"; + } + clone() { + webidl.brandCheck(this, Request); + if (bodyUnusable(this)) throw new TypeError("unusable"); + const clonedRequest = cloneRequest(this[kState]); + const ac = new AbortController(); + if (this.signal.aborted) ac.abort(this.signal.reason); + else { + let list = dependentControllerMap.get(this.signal); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); + dependentControllerMap.set(this.signal, list); + } + const acRef = new WeakRef(ac); + list.add(acRef); + util.addAbortListener(ac.signal, buildAbort(acRef)); + } + return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])); + } + [nodeUtil.inspect.custom](depth, options) { + if (options.depth === null) options.depth = 2; + options.colors ??= true; + const properties = { + method: this.method, + url: this.url, + headers: this.headers, + destination: this.destination, + referrer: this.referrer, + referrerPolicy: this.referrerPolicy, + mode: this.mode, + credentials: this.credentials, + cache: this.cache, + redirect: this.redirect, + integrity: this.integrity, + keepalive: this.keepalive, + isReloadNavigation: this.isReloadNavigation, + isHistoryNavigation: this.isHistoryNavigation, + signal: this.signal + }; + return `Request ${nodeUtil.formatWithOptions(options, properties)}`; + } + }; + mixinBody(Request); + function makeRequest(init) { + return { + method: init.method ?? "GET", + localURLsOnly: init.localURLsOnly ?? false, + unsafeRequest: init.unsafeRequest ?? false, + body: init.body ?? null, + client: init.client ?? null, + reservedClient: init.reservedClient ?? null, + replacesClientId: init.replacesClientId ?? "", + window: init.window ?? "client", + keepalive: init.keepalive ?? false, + serviceWorkers: init.serviceWorkers ?? "all", + initiator: init.initiator ?? "", + destination: init.destination ?? "", + priority: init.priority ?? null, + origin: init.origin ?? "client", + policyContainer: init.policyContainer ?? "client", + referrer: init.referrer ?? "client", + referrerPolicy: init.referrerPolicy ?? "", + mode: init.mode ?? "no-cors", + useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, + credentials: init.credentials ?? "same-origin", + useCredentials: init.useCredentials ?? false, + cache: init.cache ?? "default", + redirect: init.redirect ?? "follow", + integrity: init.integrity ?? "", + cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "", + parserMetadata: init.parserMetadata ?? "", + reloadNavigation: init.reloadNavigation ?? false, + historyNavigation: init.historyNavigation ?? false, + userActivation: init.userActivation ?? false, + taintedOrigin: init.taintedOrigin ?? false, + redirectCount: init.redirectCount ?? 0, + responseTainting: init.responseTainting ?? "basic", + preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, + done: init.done ?? false, + timingAllowFailed: init.timingAllowFailed ?? false, + urlList: init.urlList, + url: init.urlList[0], + headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() + }; + } + function cloneRequest(request) { + const newRequest = makeRequest({ + ...request, + body: null + }); + if (request.body != null) newRequest.body = cloneBody(newRequest, request.body); + return newRequest; + } + /** + * @see https://fetch.spec.whatwg.org/#request-create + * @param {any} innerRequest + * @param {AbortSignal} signal + * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard + * @returns {Request} + */ + function fromInnerRequest(innerRequest, signal, guard) { + const request = new Request(kConstruct); + request[kState] = innerRequest; + request[kSignal] = signal; + request[kHeaders] = new Headers(kConstruct); + setHeadersList(request[kHeaders], innerRequest.headersList); + setHeadersGuard(request[kHeaders], guard); + return request; + } + Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true + } + }); + webidl.converters.Request = webidl.interfaceConverter(Request); + webidl.converters.RequestInfo = function(V, prefix, argument) { + if (typeof V === "string") return webidl.converters.USVString(V, prefix, argument); + if (V instanceof Request) return webidl.converters.Request(V, prefix, argument); + return webidl.converters.USVString(V, prefix, argument); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter(AbortSignal); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter(webidl.converters.BodyInit) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter((signal) => webidl.converters.AbortSignal(signal, "RequestInit", "signal", { strict: false })) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + }, + { + key: "dispatcher", + converter: webidl.converters.any + } + ]); + module.exports = { + Request, + makeRequest, + fromInnerRequest, + cloneRequest + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fetch/index.js +var require_fetch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { makeNetworkError, makeAppropriateNetworkError, filterResponse, makeResponse, fromInnerResponse } = require_response(); + const { HeadersList } = require_headers(); + const { Request, cloneRequest } = require_request(); + const zlib = __require("node:zlib"); + const { bytesMatch, makePolicyContainer, clonePolicyContainer, requestBadPort, TAOCheck, appendRequestOriginHeader, responseLocationURL, requestCurrentURL, setRequestReferrerPolicyOnRedirect, tryUpgradeRequestToAPotentiallyTrustworthyURL, createOpaqueTimingInfo, appendFetchMetadata, corsCheck, crossOriginResourcePolicyCheck, determineRequestsReferrer, coarsenedSharedCurrentTime, createDeferredPromise, isBlobLike, sameOrigin, isCancelled, isAborted, isErrorLike, fullyReadBody, readableStreamClose, isomorphicEncode, urlIsLocal, urlIsHttpHttpsScheme, urlHasHttpsScheme, clampAndCoarsenConnectionTimingInfo, simpleRangeHeaderValue, buildContentRange, createInflate, extractMimeType } = require_util$6(); + const { kState, kDispatcher } = require_symbols$3(); + const assert$5 = __require("node:assert"); + const { safelyExtractBody, extractBody } = require_body(); + const { redirectStatusSet, nullBodyStatus, safeMethodsSet, requestBodyHeader, subresourceSet } = require_constants$5(); + const EE = __require("node:events"); + const { Readable, pipeline: pipeline$1, finished } = __require("node:stream"); + const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = require_util$7(); + const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require_data_url(); + const { getGlobalDispatcher } = require_global(); + const { webidl } = require_webidl(); + const { STATUS_CODES } = __require("node:http"); + const GET_OR_HEAD = ["GET", "HEAD"]; + const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== "undefined" || typeof esbuildDetection !== "undefined" ? "node" : "undici"; + /** @type {import('buffer').resolveObjectURL} */ + let resolveObjectURL; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + } + terminate(reason) { + if (this.state !== "ongoing") return; + this.state = "terminated"; + this.connection?.destroy(reason); + this.emit("terminated", reason); + } + abort(error) { + if (this.state !== "ongoing") return; + this.state = "aborted"; + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); + this.serializedAbortReason = error; + this.connection?.destroy(error); + this.emit("terminated", error); + } + }; + function handleFetchDone(response) { + finalizeAndReportTiming(response, "fetch"); + } + function fetch(input, init = void 0) { + webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); + let p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request(input, init); + } catch (e) { + p.reject(e); + return p.promise; + } + const request = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request, null, requestObject.signal.reason); + return p.promise; + } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; + let responseObject = null; + let locallyAborted = false; + let controller = null; + addAbortListener(requestObject.signal, () => { + locallyAborted = true; + assert$5(controller != null); + controller.abort(requestObject.signal.reason); + const realResponse = responseObject?.deref(); + abortFetch(p, request, realResponse, requestObject.signal.reason); + }); + const processResponse = (response) => { + if (locallyAborted) return; + if (response.aborted) { + abortFetch(p, request, responseObject, controller.serializedAbortReason); + return; + } + if (response.type === "error") { + p.reject(new TypeError("fetch failed", { cause: response.error })); + return; + } + responseObject = new WeakRef(fromInnerResponse(response, "immutable")); + p.resolve(responseObject.deref()); + p = null; + }; + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: requestObject[kDispatcher] + }); + return p.promise; + } + function finalizeAndReportTiming(response, initiatorType = "other") { + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState); + } + const markResourceTiming = performance.markResourceTiming; + function abortFetch(p, request, responseObject, error) { + if (p) p.reject(error); + if (request.body != null && isReadable(request.body?.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; + const response = responseObject[kState]; + if (response.body != null && isReadable(response.body?.stream)) response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + } + function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { + assert$5(dispatcher); + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request.client != null) { + taskDestination = request.client.globalObject; + crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; + } + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert$5(!request.body || request.body.stream); + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); + if (request.priority === null) {} + if (subresourceSet.has(request.destination)) {} + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; + } + async function mainFetch(fetchParams, recursive = false) { + const request = fetchParams.request; + let response = null; + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); + tryUpgradeRequestToAPotentiallyTrustworthyURL(request); + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); + if (response === null) response = await (async () => { + const currentURL = requestCurrentURL(request); + if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { + request.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request.mode === "same-origin") return makeNetworkError("request mode cannot be \"same-origin\""); + if (request.mode === "no-cors") { + if (request.redirect !== "follow") return makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + request.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + request.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + if (recursive) return response; + if (response.status !== 0 && !response.internalResponse) { + if (request.responseTainting === "cors") {} + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$5(false); + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); + if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); + } else fetchFinale(fetchParams, response); + } + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + const { request } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request); + switch (scheme) { + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); + case "blob:": { + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; + const blobURLEntry = requestCurrentURL(request); + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + const blob = resolveObjectURL(blobURLEntry.toString()); + if (request.method !== "GET" || !isBlobLike(blob)) return Promise.resolve(makeNetworkError("invalid method")); + const response = makeResponse(); + const fullLength = blob.size; + const serializedFullLength = isomorphicEncode(`${fullLength}`); + const type = blob.type; + if (!request.headersList.contains("range", true)) { + const bodyWithType = extractBody(blob); + response.statusText = "OK"; + response.body = bodyWithType[0]; + response.headersList.set("content-length", serializedFullLength, true); + response.headersList.set("content-type", type, true); + } else { + response.rangeRequested = true; + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; + if (rangeStart === null) { + rangeStart = fullLength - rangeEnd; + rangeEnd = rangeStart + rangeEnd - 1; + } else { + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; + } + const slicedBlob = blob.slice(rangeStart, rangeEnd, type); + response.body = extractBody(slicedBlob)[0]; + const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); + const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); + response.status = 206; + response.statusText = "Partial Content"; + response.headersList.set("content-length", serializedSlicedLength, true); + response.headersList.set("content-type", type, true); + response.headersList.set("content-range", contentRange, true); + } + return Promise.resolve(response); + } + case "data:": { + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [["content-type", { + name: "Content-Type", + value: mimeType + }]], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); + case "http:": + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); + } + } + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); + } + function fetchFinale(fetchParams, response) { + let timingInfo = fetchParams.timingInfo; + const processResponseEndOfBody = () => { + const unsafeEndTime = Date.now(); + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; + fetchParams.controller.reportTimingSteps = () => { + if (fetchParams.request.url.protocol !== "https:") return; + timingInfo.endTime = unsafeEndTime; + let cacheState = response.cacheState; + const bodyInfo = response.bodyInfo; + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo(timingInfo); + cacheState = ""; + } + let responseStatus = 0; + if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { + responseStatus = response.status; + const mimeType = extractMimeType(response.headersList); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); + } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + }; + const processResponseEndOfBodyTask = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); + }; + queueMicrotask(() => processResponseEndOfBodyTask()); + }; + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); + const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; + if (internalResponse.body == null) processResponseEndOfBody(); + else finished(internalResponse.body.stream, () => { + processResponseEndOfBody(); + }); + } + async function httpFetch(fetchParams) { + const request = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request.serviceWorkers === "all") {} + if (response === null) { + if (request.redirect === "follow") request.serviceWorkers = "none"; + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; + } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); + if (redirectStatusSet.has(actualResponse.status)) { + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$5(false); + } + response.timingInfo = timingInfo; + return response; + } + function httpRedirectFetch(fetchParams, response) { + const request = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); + if (locationURL == null) return response; + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); + request.redirectCount += 1; + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); + if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { + request.method = "GET"; + request.body = null; + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); + } + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + request.headersList.delete("authorization", true); + request.headersList.delete("proxy-authorization", true); + request.headersList.delete("cookie", true); + request.headersList.delete("host", true); + } + if (request.body != null) { + assert$5(request.body.source != null); + request.body = safelyExtractBody(request.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; + request.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + if (request.window === "no-window" && request.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request; + } else { + httpRequest = cloneRequest(request); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); + if (contentLength != null && httpRequest.keepalive) {} + if (httpRequest.referrer instanceof URL) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); + } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); + httpRequest.headersList.delete("host", true); + if (includeCredentials) {} + httpRequest.cache = "no-store"; + if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} + if (response == null) { + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); + const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} + if (response == null) response = forwardResponse; + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + return makeNetworkError("proxy authentication required"); + } + if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); + } + if (isAuthenticationFetch) {} + return response; + } + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert$5(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err, abort = true) { + if (!this.destroyed) { + this.destroyed = true; + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); + } + } + }; + const request = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + request.cache = "no-store"; + if (request.mode === "websocket") {} + let requestBody = null; + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { + const processBodyChunk = async function* (bytes) { + if (isCancelled(fetchParams)) return; + yield bytes; + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); + }; + requestBody = (async function* () { + try { + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + })(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { + const iterator = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator.next(); + response = makeResponse({ + status, + statusText, + headersList + }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = async () => { + await fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); + }; + const stream = new ReadableStream({ + async start(controller) { + fetchParams.controller.controller = controller; + }, + async pull(controller) { + await pullAlgorithm(controller); + }, + async cancel(reason) { + await cancelAlgorithm(reason); + }, + type: "bytes" + }); + response.body = { + stream, + source: null, + length: null + }; + fetchParams.controller.onAborted = onAborted; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += bytes?.byteLength ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + const buffer = new Uint8Array(bytes); + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (fetchParams.controller.controller.desiredSize <= 0) return; + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); + fetchParams.controller.connection.destroy(); + } + return response; + function dispatch({ body }) { + const url = requestCurrentURL(request); + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve, reject) => agent.dispatch({ + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === "websocket" ? "websocket" : void 0 + }, { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onResponseStarted() { + timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + }, + onHeaders(status, rawHeaders, resume, statusText) { + if (status < 200) return; + let location = ""; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + location = headersList.get("location", true); + this.body = new Readable({ read: resume }); + const decoders = []; + const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); + if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const contentEncoding = headersList.get("content-encoding", true); + /** @type {string[]} */ + const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; + const maxContentEncodings = 5; + if (codings.length > maxContentEncodings) { + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + return true; + } + for (let i = codings.length - 1; i >= 0; --i) { + const coding = codings[i].trim(); + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib.createGunzip({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib.createBrotliDecompress({ + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH + })); + else { + decoders.length = 0; + break; + } + } + } + const onError = this.onError.bind(this); + resolve({ + status, + statusText, + headersList, + body: decoders.length ? pipeline$1(this.body, ...decoders, (err) => { + if (err) this.onError(err); + }).on("error", onError) : this.body.on("error", onError) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) return; + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + return this.body.push(bytes); + }, + onComplete() { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + if (fetchParams.controller.onAborted) fetchParams.controller.off("terminated", fetchParams.controller.onAborted); + fetchParams.controller.ended = true; + this.body.push(null); + }, + onError(error) { + if (this.abort) fetchParams.controller.off("terminated", this.abort); + this.body?.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, rawHeaders, socket) { + if (status !== 101) return; + const headersList = new HeadersList(); + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); + resolve({ + status, + statusText: STATUS_CODES[status], + headersList, + socket + }); + return true; + } + })); + } + } + module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/symbols.js +var require_symbols$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kState: Symbol("FileReader state"), + kResult: Symbol("FileReader result"), + kError: Symbol("FileReader error"), + kLastProgressEventFired: Symbol("FileReader last progress event fired timestamp"), + kEvents: Symbol("FileReader events"), + kAborted: Symbol("FileReader aborted") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/progressevent.js +var require_progressevent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const kState = Symbol("ProgressEvent state"); + /** + * @see https://xhr.spec.whatwg.org/#progressevent + */ + var ProgressEvent = class ProgressEvent extends Event { + constructor(type, eventInitDict = {}) { + type = webidl.converters.DOMString(type, "ProgressEvent constructor", "type"); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: () => 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]); + module.exports = { ProgressEvent }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/encoding.js +var require_encoding = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ + function getEncoding(label) { + if (!label) return "failure"; + switch (label.trim().toLowerCase()) { + case "unicode-1-1-utf-8": + case "unicode11utf8": + case "unicode20utf8": + case "utf-8": + case "utf8": + case "x-unicode20utf8": return "UTF-8"; + case "866": + case "cp866": + case "csibm866": + case "ibm866": return "IBM866"; + case "csisolatin2": + case "iso-8859-2": + case "iso-ir-101": + case "iso8859-2": + case "iso88592": + case "iso_8859-2": + case "iso_8859-2:1987": + case "l2": + case "latin2": return "ISO-8859-2"; + case "csisolatin3": + case "iso-8859-3": + case "iso-ir-109": + case "iso8859-3": + case "iso88593": + case "iso_8859-3": + case "iso_8859-3:1988": + case "l3": + case "latin3": return "ISO-8859-3"; + case "csisolatin4": + case "iso-8859-4": + case "iso-ir-110": + case "iso8859-4": + case "iso88594": + case "iso_8859-4": + case "iso_8859-4:1988": + case "l4": + case "latin4": return "ISO-8859-4"; + case "csisolatincyrillic": + case "cyrillic": + case "iso-8859-5": + case "iso-ir-144": + case "iso8859-5": + case "iso88595": + case "iso_8859-5": + case "iso_8859-5:1988": return "ISO-8859-5"; + case "arabic": + case "asmo-708": + case "csiso88596e": + case "csiso88596i": + case "csisolatinarabic": + case "ecma-114": + case "iso-8859-6": + case "iso-8859-6-e": + case "iso-8859-6-i": + case "iso-ir-127": + case "iso8859-6": + case "iso88596": + case "iso_8859-6": + case "iso_8859-6:1987": return "ISO-8859-6"; + case "csisolatingreek": + case "ecma-118": + case "elot_928": + case "greek": + case "greek8": + case "iso-8859-7": + case "iso-ir-126": + case "iso8859-7": + case "iso88597": + case "iso_8859-7": + case "iso_8859-7:1987": + case "sun_eu_greek": return "ISO-8859-7"; + case "csiso88598e": + case "csisolatinhebrew": + case "hebrew": + case "iso-8859-8": + case "iso-8859-8-e": + case "iso-ir-138": + case "iso8859-8": + case "iso88598": + case "iso_8859-8": + case "iso_8859-8:1988": + case "visual": return "ISO-8859-8"; + case "csiso88598i": + case "iso-8859-8-i": + case "logical": return "ISO-8859-8-I"; + case "csisolatin6": + case "iso-8859-10": + case "iso-ir-157": + case "iso8859-10": + case "iso885910": + case "l6": + case "latin6": return "ISO-8859-10"; + case "iso-8859-13": + case "iso8859-13": + case "iso885913": return "ISO-8859-13"; + case "iso-8859-14": + case "iso8859-14": + case "iso885914": return "ISO-8859-14"; + case "csisolatin9": + case "iso-8859-15": + case "iso8859-15": + case "iso885915": + case "iso_8859-15": + case "l9": return "ISO-8859-15"; + case "iso-8859-16": return "ISO-8859-16"; + case "cskoi8r": + case "koi": + case "koi8": + case "koi8-r": + case "koi8_r": return "KOI8-R"; + case "koi8-ru": + case "koi8-u": return "KOI8-U"; + case "csmacintosh": + case "mac": + case "macintosh": + case "x-mac-roman": return "macintosh"; + case "iso-8859-11": + case "iso8859-11": + case "iso885911": + case "tis-620": + case "windows-874": return "windows-874"; + case "cp1250": + case "windows-1250": + case "x-cp1250": return "windows-1250"; + case "cp1251": + case "windows-1251": + case "x-cp1251": return "windows-1251"; + case "ansi_x3.4-1968": + case "ascii": + case "cp1252": + case "cp819": + case "csisolatin1": + case "ibm819": + case "iso-8859-1": + case "iso-ir-100": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "iso_8859-1:1987": + case "l1": + case "latin1": + case "us-ascii": + case "windows-1252": + case "x-cp1252": return "windows-1252"; + case "cp1253": + case "windows-1253": + case "x-cp1253": return "windows-1253"; + case "cp1254": + case "csisolatin5": + case "iso-8859-9": + case "iso-ir-148": + case "iso8859-9": + case "iso88599": + case "iso_8859-9": + case "iso_8859-9:1989": + case "l5": + case "latin5": + case "windows-1254": + case "x-cp1254": return "windows-1254"; + case "cp1255": + case "windows-1255": + case "x-cp1255": return "windows-1255"; + case "cp1256": + case "windows-1256": + case "x-cp1256": return "windows-1256"; + case "cp1257": + case "windows-1257": + case "x-cp1257": return "windows-1257"; + case "cp1258": + case "windows-1258": + case "x-cp1258": return "windows-1258"; + case "x-mac-cyrillic": + case "x-mac-ukrainian": return "x-mac-cyrillic"; + case "chinese": + case "csgb2312": + case "csiso58gb231280": + case "gb2312": + case "gb_2312": + case "gb_2312-80": + case "gbk": + case "iso-ir-58": + case "x-gbk": return "GBK"; + case "gb18030": return "gb18030"; + case "big5": + case "big5-hkscs": + case "cn-big5": + case "csbig5": + case "x-x-big5": return "Big5"; + case "cseucpkdfmtjapanese": + case "euc-jp": + case "x-euc-jp": return "EUC-JP"; + case "csiso2022jp": + case "iso-2022-jp": return "ISO-2022-JP"; + case "csshiftjis": + case "ms932": + case "ms_kanji": + case "shift-jis": + case "shift_jis": + case "sjis": + case "windows-31j": + case "x-sjis": return "Shift_JIS"; + case "cseuckr": + case "csksc56011987": + case "euc-kr": + case "iso-ir-149": + case "korean": + case "ks_c_5601-1987": + case "ks_c_5601-1989": + case "ksc5601": + case "ksc_5601": + case "windows-949": return "EUC-KR"; + case "csiso2022kr": + case "hz-gb-2312": + case "iso-2022-cn": + case "iso-2022-cn-ext": + case "iso-2022-kr": + case "replacement": return "replacement"; + case "unicodefffe": + case "utf-16be": return "UTF-16BE"; + case "csunicode": + case "iso-10646-ucs-2": + case "ucs-2": + case "unicode": + case "unicodefeff": + case "utf-16": + case "utf-16le": return "UTF-16LE"; + case "x-user-defined": return "x-user-defined"; + default: return "failure"; + } + } + module.exports = { getEncoding }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/util.js +var require_util$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kState, kError, kResult, kAborted, kLastProgressEventFired } = require_symbols$2(); + const { ProgressEvent } = require_progressevent(); + const { getEncoding } = require_encoding(); + const { serializeAMimeType, parseMIMEType } = require_data_url(); + const { types: types$2 } = __require("node:util"); + const { StringDecoder } = __require("string_decoder"); + const { btoa } = __require("node:buffer"); + /** @type {PropertyDescriptor} */ + const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + /** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ + function readOperation(fr, blob, type, encodingName) { + if (fr[kState] === "loading") throw new DOMException("Invalid state", "InvalidStateError"); + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const reader = blob.stream().getReader(); + /** @type {Uint8Array[]} */ + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + isFirstChunk = false; + if (!done && types$2.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type, blob.type, encodingName); + if (fr[kAborted]) return; + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + } catch (error) { + if (fr[kAborted]) return; + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") fireAProgressEvent("loadend", fr); + }); + break; + } + })(); + } + /** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + /** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ + function packageData(bytes, type, mimeType, encodingName) { + switch (type) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") dataURL += serializeAMimeType(parsed); + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) dataURL += btoa(decoder.write(chunk)); + dataURL += btoa(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) encoding = getEncoding(encodingName); + if (encoding === "failure" && mimeType) { + const type = parseMIMEType(mimeType); + if (type !== "failure") encoding = getEncoding(type.parameters.get("charset")); + } + if (encoding === "failure") encoding = "UTF-8"; + return decode(bytes, encoding); + } + case "ArrayBuffer": return combineByteSequences(bytes).buffer; + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) binaryString += decoder.write(chunk); + binaryString += decoder.end(); + return binaryString; + } + } + } + /** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); + } + /** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) return "UTF-8"; + else if (a === 254 && b === 255) return "UTF-16BE"; + else if (a === 255 && b === 254) return "UTF-16LE"; + return null; + } + /** + * @param {Uint8Array[]} sequences + */ + function combineByteSequences(sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength; + }, 0); + let offset = 0; + return sequences.reduce((a, b) => { + a.set(b, offset); + offset += b.byteLength; + return a; + }, new Uint8Array(size)); + } + module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/fileapi/filereader.js +var require_filereader = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { staticPropertyDescriptors, readOperation, fireAProgressEvent } = require_util$4(); + const { kState, kError, kResult, kEvents, kAborted } = require_symbols$2(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var FileReader = class FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null + }; + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsArrayBuffer"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsBinaryString"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsText"); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) encoding = webidl.converters.DOMString(encoding, "FileReader.readAsText", "encoding"); + readOperation(this, blob, "Text", encoding); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, FileReader); + webidl.argumentLengthCheck(arguments, 1, "FileReader.readAsDataURL"); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; + } + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") fireAProgressEvent("loadend", this); + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, FileReader); + switch (this[kState]) { + case "empty": return this.EMPTY; + case "loading": return this.LOADING; + case "done": return this.DONE; + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result() { + webidl.brandCheck(this, FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadend) this.removeEventListener("loadend", this[kEvents].loadend); + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else this[kEvents].loadend = null; + } + get onerror() { + webidl.brandCheck(this, FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].error) this.removeEventListener("error", this[kEvents].error); + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else this[kEvents].error = null; + } + get onloadstart() { + webidl.brandCheck(this, FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].loadstart) this.removeEventListener("loadstart", this[kEvents].loadstart); + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else this[kEvents].loadstart = null; + } + get onprogress() { + webidl.brandCheck(this, FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].progress) this.removeEventListener("progress", this[kEvents].progress); + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else this[kEvents].progress = null; + } + get onload() { + webidl.brandCheck(this, FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].load) this.removeEventListener("load", this[kEvents].load); + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else this[kEvents].load = null; + } + get onabort() { + webidl.brandCheck(this, FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, FileReader); + if (this[kEvents].abort) this.removeEventListener("abort", this[kEvents].abort); + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else this[kEvents].abort = null; + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module.exports = { FileReader }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/symbols.js +var require_symbols$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { kConstruct: require_symbols$4().kConstruct }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/util.js +var require_util$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const assert$4 = __require("node:assert"); + const { URLSerializer } = require_data_url(); + const { isValidHeaderName } = require_util$6(); + /** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ + function urlEquals(A, B, excludeFragment = false) { + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); + } + /** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ + function getFieldValues(header) { + assert$4(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (isValidHeaderName(value)) values.push(value); + } + return values; + } + module.exports = { + urlEquals, + getFieldValues + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cache.js +var require_cache = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { urlEquals, getFieldValues } = require_util$3(); + const { kEnumerableProperty, isDisturbed } = require_util$7(); + const { webidl } = require_webidl(); + const { Response, cloneResponse, fromInnerResponse } = require_response(); + const { Request, fromInnerRequest } = require_request(); + const { kState } = require_symbols$3(); + const { fetching } = require_fetch(); + const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util$6(); + const assert$3 = __require("node:assert"); + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ + var Cache = class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); + webidl.util.markAsUncloneable(this); + this.#relevantRequestResponseList = arguments[1]; + } + async match(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.match"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + const p = this.#internalMatchAll(request, options, 1); + if (p.length === 0) return; + return p[0]; + } + async matchAll(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.matchAll"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + return this.#internalMatchAll(request, options); + } + async add(request) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.add"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + const requests = [request]; + return await this.addAll(requests); + } + async addAll(requests) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.addAll"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const responsePromises = []; + const requestList = []; + for (let request of requests) { + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); + request = webidl.converters.RequestInfo(request); + if (typeof request === "string") continue; + const r = request[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); + } + /** @type {ReturnType[]} */ + const fetchControllers = []; + for (const request of requests) { + const r = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const responses = await Promise.all(responsePromises); + const operations = []; + let index = 0; + for (const response of responses) { + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: requestList[index], + response + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async put(request, response) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.put"; + webidl.argumentLengthCheck(arguments, 2, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + response = webidl.converters.Response(response, prefix, "response"); + let innerRequest = null; + if (request instanceof Request) innerRequest = request[kState]; + else innerRequest = new Request(request)[kState]; + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); + const innerResponse = response[kState]; + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ + header: prefix, + message: "Got * vary field value" + }); + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader()).then(bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "put", + request: innerRequest, + response: clonedResponse + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) clonedResponse.body.source = bytes; + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + async delete(request, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + /** + * @type {Request} + */ + let r = null; + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return false; + } else { + assert$3(typeof request === "string"); + r = new Request(request)[kState]; + } + /** @type {CacheBatchOperation[]} */ + const operations = []; + /** @type {CacheBatchOperation} */ + const operation = { + type: "delete", + request: r, + options + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; + try { + requestResponses = this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); + }); + return cacheJobPromise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {Promise} + */ + async keys(request = void 0, options = {}) { + webidl.brandCheck(this, Cache); + const prefix = "Cache.keys"; + if (request !== void 0) request = webidl.converters.RequestInfo(request, prefix, "request"); + options = webidl.converters.CacheQueryOptions(options, prefix, "options"); + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const promise = createDeferredPromise(); + const requests = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); + } + queueMicrotask(() => { + const requestList = []; + for (const request of requests) { + const requestObject = fromInnerRequest(request, new AbortController().signal, "immutable"); + requestList.push(requestObject); + } + promise.resolve(Object.freeze(requestList)); + }); + return promise.promise; + } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations(operations) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) return []; + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$3(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert$3(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); + } + return resultList; + } + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem(requestQuery, request, response = null, options) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request.url); + if (options?.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; + } + return true; + } + #internalMatchAll(request, options, maxResponses = Infinity) { + let r = null; + if (request !== void 0) { + if (request instanceof Request) { + r = request[kState]; + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = new Request(request)[kState]; + } + const responses = []; + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { + const requestResponses = this.#queryCache(r, options); + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); + } + const responseList = []; + for (const response of responses) { + const responseObject = fromInnerResponse(response, "immutable"); + responseList.push(responseObject.clone()); + if (responseList.length >= maxResponses) break; + } + return Object.freeze(responseList); + } + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + const cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([...cacheQueryOptionConverters, { + key: "cacheName", + converter: webidl.converters.DOMString + }]); + webidl.converters.Response = webidl.interfaceConverter(Response); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); + module.exports = { Cache }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cache/cachestorage.js +var require_cachestorage = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kConstruct } = require_symbols$1(); + const { Cache } = require_cache(); + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + var CacheStorage = class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.has"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.open"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, CacheStorage); + const prefix = "CacheStorage.delete"; + webidl.argumentLengthCheck(arguments, 1, prefix); + cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {Promise} + */ + async keys() { + webidl.brandCheck(this, CacheStorage); + return [...this.#caches.keys()]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module.exports = { CacheStorage }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/constants.js +var require_constants$4 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/util.js +var require_util$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * @param {string} value + * @returns {boolean} + */ + function isCTLExcludingHtab(value) { + for (let i = 0; i < value.length; ++i) { + const code = value.charCodeAt(i); + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; + } + return false; + } + /** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ + function validateCookieName(name) { + for (let i = 0; i < name.length; ++i) { + const code = name.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); + } + } + /** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ + function validateCookieValue(value) { + let len = value.length; + let i = 0; + if (value[0] === "\"") { + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); + --len; + ++i; + } + while (i < len) { + const code = value.charCodeAt(i++); + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); + } + } + /** + * path-value = + * @param {string} path + */ + function validateCookiePath(path) { + for (let i = 0; i < path.length; ++i) { + const code = path.charCodeAt(i); + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); + } + } + /** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ + function validateCookieDomain(domain) { + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); + } + const IMFDays = [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ]; + const IMFMonths = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); + /** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] + + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ + function toIMFDate(date) { + if (typeof date === "number") date = new Date(date); + return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; + } + /** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) throw new Error("Invalid cookie max-age"); + } + /** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ + function stringify(cookie) { + if (cookie.name.length === 0) return null; + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); + for (const part of cookie.unparsed) { + if (!part.includes("=")) throw new Error("Invalid unparsed"); + const [key, ...value] = part.split("="); + out.push(`${key.trim()}=${value.join("=")}`); + } + return out.join("; "); + } + module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/parse.js +var require_parse$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { maxNameValuePairSize, maxAttributeValueSize } = require_constants$4(); + const { isCTLExcludingHtab } = require_util$2(); + const { collectASequenceOfCodePointsFast } = require_data_url(); + const assert$2 = __require("node:assert"); + /** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) return null; + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast("=", nameValuePair, position); + value = nameValuePair.slice(position.position + 1); + } + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) return null; + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; + } + /** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) return cookieAttributeList; + assert$2(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast(";", unparsedAttributes, { position: 0 }); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); + attributeValue = cookieAv.slice(position.position + 1); + } else attributeName = cookieAv; + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); + } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + module.exports = { + parseSetCookie, + parseUnparsedAttributes + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/cookies/index.js +var require_cookies = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { parseSetCookie } = require_parse$3(); + const { stringify } = require_util$2(); + const { webidl } = require_webidl(); + const { Headers } = require_headers(); + /** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ + /** + * @param {Headers} headers + * @returns {Record} + */ + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookie = headers.get("cookie"); + const out = {}; + if (!cookie) return out; + for (const piece of cookie.split(";")) { + const [name, ...value] = piece.split("="); + out[name.trim()] = value.join("="); + } + return out; + } + /** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ + function deleteCookie(headers, name, attributes) { + webidl.brandCheck(headers, Headers, { strict: false }); + const prefix = "deleteCookie"; + webidl.argumentLengthCheck(arguments, 2, prefix); + name = webidl.converters.DOMString(name, prefix, "name"); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); + } + /** + * @param {Headers} headers + * @returns {Cookie[]} + */ + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); + webidl.brandCheck(headers, Headers, { strict: false }); + const cookies = headers.getSetCookie(); + if (!cookies) return []; + return cookies.map((pair) => parseSetCookie(pair)); + } + /** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, "setCookie"); + webidl.brandCheck(headers, Headers, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str = stringify(cookie); + if (str) headers.append("Set-Cookie", str); + } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") return webidl.converters["unsigned long long"](value); + return new Date(value); + }), + key: "expires", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: () => null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: () => null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: [ + "Strict", + "Lax", + "None" + ] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: () => new Array(0) + } + ]); + module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/events.js +var require_events = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const { kEnumerableProperty } = require_util$7(); + const { kConstruct } = require_symbols$4(); + const { MessagePort } = __require("node:worker_threads"); + /** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ + var MessageEvent = class MessageEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + if (type === kConstruct) { + super(arguments[1], arguments[2]); + webidl.util.markAsUncloneable(this); + return; + } + const prefix = "MessageEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, "eventInitDict"); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get data() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); + return this.#eventInit.ports; + } + initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { + webidl.brandCheck(this, MessageEvent); + webidl.argumentLengthCheck(arguments, 1, "MessageEvent.initMessageEvent"); + return new MessageEvent(type, { + bubbles, + cancelable, + data, + origin, + lastEventId, + source, + ports + }); + } + static createFastMessageEvent(type, init) { + const messageEvent = new MessageEvent(kConstruct, type, init); + messageEvent.#eventInit = init; + messageEvent.#eventInit.data ??= null; + messageEvent.#eventInit.origin ??= ""; + messageEvent.#eventInit.lastEventId ??= ""; + messageEvent.#eventInit.source ??= null; + messageEvent.#eventInit.ports ??= []; + return messageEvent; + } + }; + const { createFastMessageEvent } = MessageEvent; + delete MessageEvent.createFastMessageEvent; + /** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ + var CloseEvent = class CloseEvent extends Event { + #eventInit; + constructor(type, eventInitDict = {}) { + const prefix = "CloseEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type, eventInitDict); + this.#eventInit = eventInitDict; + webidl.util.markAsUncloneable(this); + } + get wasClean() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent = class ErrorEvent extends Event { + #eventInit; + constructor(type, eventInitDict) { + const prefix = "ErrorEvent constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + super(type, eventInitDict); + webidl.util.markAsUncloneable(this); + type = webidl.converters.DOMString(type, prefix, "type"); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.MessagePort); + const eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: () => false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: () => null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "source", + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: () => null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + defaultValue: () => new Array(0) + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: () => false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: () => 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: () => "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: () => "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: () => "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: () => 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module.exports = { + MessageEvent, + CloseEvent, + ErrorEvent, + createFastMessageEvent + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/constants.js +var require_constants$3 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + NOT_SENT: 0, + PROCESSING: 1, + SENT: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 2 ** 16 - 1, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + string: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/symbols.js +var require_symbols = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + kWebSocketURL: Symbol("url"), + kReadyState: Symbol("ready state"), + kController: Symbol("controller"), + kResponse: Symbol("response"), + kBinaryType: Symbol("binary type"), + kSentClose: Symbol("sent close"), + kReceivedClose: Symbol("received close"), + kByteParser: Symbol("byte parser") + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/util.js +var require_util$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols(); + const { states, opcodes } = require_constants$3(); + const { ErrorEvent, createFastMessageEvent } = require_events(); + const { isUtf8 } = __require("node:buffer"); + const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isConnecting(ws) { + return ws[kReadyState] === states.CONNECTING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; + } + /** + * @param {import('./websocket').WebSocket} ws + * @returns {boolean} + */ + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; + } + /** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {(...args: ConstructorParameters) => Event} eventFactory + * @param {EventInit | undefined} eventInitDict + */ + function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { + const event = eventFactory(e, eventInitDict); + target.dispatchEvent(event); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ + function websocketMessageReceived(ws, type, data) { + if (ws[kReadyState] !== states.OPEN) return; + let dataForEvent; + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; + } + else if (type === opcodes.BINARY) if (ws[kBinaryType] === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); + fireEvent("message", ws, createFastMessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); + } + function toArrayBuffer(buffer) { + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ + function isValidSubprotocol(protocol) { + if (protocol.length === 0) return false; + for (let i = 0; i < protocol.length; ++i) { + const code = protocol.charCodeAt(i); + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; + } + return true; + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; + return code >= 3e3 && code <= 4999; + } + /** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if (response?.socket && !response.socket.destroyed) response.socket.destroy(); + if (reason) fireEvent("error", ws, (type, init) => new ErrorEvent(type, init), { + error: new Error(reason), + message: reason + }); + } + /** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 + * @param {number} opcode + */ + function isControlFrame(opcode) { + return opcode === opcodes.CLOSE || opcode === opcodes.PING || opcode === opcodes.PONG; + } + function isContinuationFrame(opcode) { + return opcode === opcodes.CONTINUATION; + } + function isTextBinaryFrame(opcode) { + return opcode === opcodes.TEXT || opcode === opcodes.BINARY; + } + function isValidOpcode(opcode) { + return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode); + } + /** + * Parses a Sec-WebSocket-Extensions header value. + * @param {string} extensions + * @returns {Map} + */ + function parseExtensions(extensions) { + const position = { position: 0 }; + const extensionList = /* @__PURE__ */ new Map(); + while (position.position < extensions.length) { + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("="); + extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); + position.position++; + } + return extensionList; + } + /** + * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 + * @description "client-max-window-bits = 1*DIGIT" + * @param {string} value + */ + function isValidClientWindowBits(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) { + const byte = value.charCodeAt(i); + if (byte < 48 || byte > 57) return false; + } + const num = Number.parseInt(value, 10); + return num >= 8 && num <= 15; + } + const hasIntl = typeof process.versions.icu === "string"; + const fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; + /** + * Converts a Buffer to utf-8, even on platforms without icu. + * @param {Buffer} buffer + */ + const utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + module.exports = { + isConnecting, + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived, + utf8Decode, + isControlFrame, + isContinuationFrame, + isTextBinaryFrame, + isValidOpcode, + parseExtensions, + isValidClientWindowBits + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/frame.js +var require_frame = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { maxUnsigned16Bit } = require_constants$3(); + const BUFFER_SIZE = 16386; + /** @type {import('crypto')} */ + let crypto; + let buffer = null; + let bufIdx = BUFFER_SIZE; + try { + crypto = __require("node:crypto"); + } catch { + crypto = { randomFillSync: function randomFillSync(buffer, _offset, _size) { + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; + return buffer; + } }; + } + function generateMask() { + if (bufIdx === BUFFER_SIZE) { + bufIdx = 0; + crypto.randomFillSync(buffer ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + } + return [ + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++], + buffer[bufIdx++] + ]; + } + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + } + createFrame(opcode) { + const frameData = this.frameData; + const maskKey = generateMask(); + const bodyLength = frameData?.byteLength ?? 0; + /** @type {number} */ + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = maskKey[0]; + buffer[offset - 3] = maskKey[1]; + buffer[offset - 2] = maskKey[2]; + buffer[offset - 1] = maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; + return buffer; + } + }; + module.exports = { WebsocketFrameSend }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/connection.js +var require_connection = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants$3(); + const { kReadyState, kSentClose, kByteParser, kReceivedClose, kResponse } = require_symbols(); + const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = require_util$1(); + const { channels } = require_diagnostics(); + const { CloseEvent } = require_events(); + const { makeRequest } = require_request(); + const { fetching } = require_fetch(); + const { Headers, getHeadersList } = require_headers(); + const { getDecodeSplit } = require_util$6(); + const { WebsocketFrameSend } = require_frame(); + /** @type {import('crypto')} */ + let crypto; + try { + crypto = __require("node:crypto"); + } catch {} + /** + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any, extensions: string[] | undefined) => void} onEstablish + * @param {Partial} options + */ + function establishWebSocketConnection(url, protocols, client, ws, onEstablish, options) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request = makeRequest({ + urlList: [requestURL], + client, + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); + const keyValue = crypto.randomBytes(16).toString("base64"); + request.headersList.append("sec-websocket-key", keyValue); + request.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits"); + return fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher, + processResponse(response) { + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (response.headersList.get("Upgrade")?.toLowerCase() !== "websocket") { + failWebsocketConnection(ws, "Server did not set Upgrade header to \"websocket\"."); + return; + } + if (response.headersList.get("Connection")?.toLowerCase() !== "upgrade") { + failWebsocketConnection(ws, "Server did not set Connection header to \"upgrade\"."); + return; + } + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto.createHash("sha1").update(keyValue + uid).digest("base64")) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + let extensions; + if (secExtension !== null) { + extensions = parseExtensions(secExtension); + if (!extensions.has("permessage-deflate")) { + failWebsocketConnection(ws, "Sec-WebSocket-Extensions header does not match."); + return; + } + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + onEstablish(response, extensions); + } + }); + } + function closeWebSocketConnection(ws, code, reason, reasonByteLength) { + if (isClosing(ws) || isClosed(ws)) {} else if (!isEstablished(ws)) { + failWebsocketConnection(ws, "Connection was closed before it was established."); + ws[kReadyState] = states.CLOSING; + } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { + ws[kSentClose] = sentCloseFrameState.PROCESSING; + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else frame.frameData = emptyBuffer; + ws[kResponse].socket.write(frame.createFrame(opcodes.CLOSE)); + ws[kSentClose] = sentCloseFrameState.SENT; + ws[kReadyState] = states.CLOSING; + } else ws[kReadyState] = states.CLOSING; + } + /** + * @param {Buffer} chunk + */ + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) this.pause(); + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ + function onSocketClose() { + const { ws } = this; + const { [kResponse]: response } = ws; + response.socket.off("data", onSocketData); + response.socket.off("close", onSocketClose); + response.socket.off("error", onSocketError); + const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result && !result.error) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kReceivedClose]) code = 1006; + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, (type, init) => new CloseEvent(type, init), { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: ws, + code, + reason + }); + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) channels.socketError.publish(error); + this.destroy(); + } + module.exports = { + establishWebSocketConnection, + closeWebSocketConnection + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/permessage-deflate.js +var require_permessage_deflate = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib"); + const { isValidClientWindowBits } = require_util$1(); + const { MessageSizeExceededError } = require_errors(); + const tail = Buffer.from([ + 0, + 0, + 255, + 255 + ]); + const kBuffer = Symbol("kBuffer"); + const kLength = Symbol("kLength"); + var PerMessageDeflate = class { + /** @type {import('node:zlib').InflateRaw} */ + #inflate; + #options = {}; + #maxPayloadSize = 0; + /** + * @param {Map} extensions + */ + constructor(extensions, options) { + this.#options.serverNoContextTakeover = extensions.has("server_no_context_takeover"); + this.#options.serverMaxWindowBits = extensions.get("server_max_window_bits"); + this.#maxPayloadSize = options.maxPayloadSize; + } + /** + * Decompress a compressed payload. + * @param {Buffer} chunk Compressed data + * @param {boolean} fin Final fragment flag + * @param {Function} callback Callback function + */ + decompress(chunk, fin, callback) { + if (!this.#inflate) { + let windowBits = Z_DEFAULT_WINDOWBITS; + if (this.#options.serverMaxWindowBits) { + if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); + return; + } + windowBits = Number.parseInt(this.#options.serverMaxWindowBits); + } + try { + this.#inflate = createInflateRaw({ windowBits }); + } catch (err) { + callback(err); + return; + } + this.#inflate[kBuffer] = []; + this.#inflate[kLength] = 0; + this.#inflate.on("data", (data) => { + this.#inflate[kLength] += data.length; + if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { + callback(new MessageSizeExceededError()); + this.#inflate.removeAllListeners(); + this.#inflate = null; + return; + } + this.#inflate[kBuffer].push(data); + }); + this.#inflate.on("error", (err) => { + this.#inflate = null; + callback(err); + }); + } + this.#inflate.write(chunk); + if (fin) this.#inflate.write(tail); + this.#inflate.flush(() => { + if (!this.#inflate) return; + const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); + this.#inflate[kBuffer].length = 0; + this.#inflate[kLength] = 0; + callback(null, full); + }); + } + }; + module.exports = { PerMessageDeflate }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/receiver.js +var require_receiver = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Writable } = __require("node:stream"); + const assert$1 = __require("node:assert"); + const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants$3(); + const { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols(); + const { channels } = require_diagnostics(); + const { isValidStatusCode, isValidOpcode, failWebsocketConnection, websocketMessageReceived, utf8Decode, isControlFrame, isTextBinaryFrame, isContinuationFrame } = require_util$1(); + const { WebsocketFrameSend } = require_frame(); + const { closeWebSocketConnection } = require_connection(); + const { PerMessageDeflate } = require_permessage_deflate(); + const { MessageSizeExceededError } = require_errors(); + var ByteParser = class extends Writable { + #buffers = []; + #fragmentsBytes = 0; + #byteOffset = 0; + #loop = false; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + /** @type {Map} */ + #extensions; + /** @type {number} */ + #maxPayloadSize; + /** + * @param {import('./websocket').WebSocket} ws + * @param {Map|null} extensions + * @param {{ maxPayloadSize?: number }} [options] + */ + constructor(ws, extensions, options = {}) { + super(); + this.ws = ws; + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + this.#maxPayloadSize = options.maxPayloadSize ?? 0; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions, options)); + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.#loop = true; + this.run(callback); + } + #validatePayloadLength() { + if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, "Payload size exceeds maximum allowed size"); + return false; + } + return true; + } + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run(callback) { + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.ws, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.ws, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.ws, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.ws, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.ws, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.ws, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.ws, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + const lower = buffer.readUInt32BE(4); + if (upper !== 0 || lower > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + this.#info.payloadLength = lower; + this.#state = parserStates.READ_DATA; + if (!this.#validatePayloadLength()) return; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.ws, error.message); + return; + } + this.writeFragments(data); + if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { + failWebsocketConnection(this.ws, new MessageSizeExceededError().message); + return; + } + if (!this.#info.fin) { + this.#state = parserStates.INFO; + this.#loop = true; + this.run(callback); + return; + } + websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer} + */ + consume(n) { + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length; + return this.#buffers.shift(); + } + const buffer = Buffer.allocUnsafe(n); + let offset = 0; + while (offset !== n) { + const next = this.#buffers[0]; + const { length } = next; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset); + break; + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset); + this.#buffers[0] = next.subarray(n - offset); + break; + } else { + buffer.set(this.#buffers.shift(), offset); + offset += next.length; + } + } + this.#byteOffset -= n; + return buffer; + } + writeFragments(fragment) { + this.#fragmentsBytes += fragment.length; + this.#fragments.push(fragment); + } + consumeFragments() { + const fragments = this.#fragments; + if (fragments.length === 1) { + this.#fragmentsBytes = 0; + return fragments.shift(); + } + const output = Buffer.concat(fragments, this.#fragmentsBytes); + this.#fragments = []; + this.#fragmentsBytes = 0; + return output; + } + parseCloseBody(data) { + assert$1(data.length !== 1); + /** @type {number|undefined} */ + let code; + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; + /** @type {Buffer} */ + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); + try { + reason = utf8Decode(reason); + } catch { + return { + code: 1007, + reason: "Invalid UTF-8", + error: true + }; + } + return { + code, + reason, + error: false + }; + } + /** + * Parses control frames. + * @param {Buffer} body + */ + parseControlFrame(body) { + const { opcode, payloadLength } = this.#info; + if (opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return false; + } + this.#info.closeInfo = this.parseCloseBody(body); + if (this.#info.closeInfo.error) { + const { code, reason } = this.#info.closeInfo; + closeWebSocketConnection(this.ws, code, reason, reason.length); + failWebsocketConnection(this.ws, reason); + return false; + } + if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { + let body = emptyBuffer; + if (this.#info.closeInfo.code) { + body = Buffer.allocUnsafe(2); + body.writeUInt16BE(this.#info.closeInfo.code, 0); + } + const closeFrame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(closeFrame.createFrame(opcodes.CLOSE), (err) => { + if (!err) this.ws[kSentClose] = sentCloseFrameState.SENT; + }); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + return false; + } else if (opcode === opcodes.PING) { + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) channels.ping.publish({ payload: body }); + } + } else if (opcode === opcodes.PONG) { + if (channels.pong.hasSubscribers) channels.pong.publish({ payload: body }); + } + return true; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module.exports = { ByteParser }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/sender.js +var require_sender = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { WebsocketFrameSend } = require_frame(); + const { opcodes, sendHints } = require_constants$3(); + const FixedQueue = require_fixed_queue(); + /** @type {typeof Uint8Array} */ + const FastBuffer = Buffer[Symbol.species]; + /** + * @typedef {object} SendQueueNode + * @property {Promise | null} promise + * @property {((...args: any[]) => any)} callback + * @property {Buffer | null} frame + */ + var SendQueue = class { + /** + * @type {FixedQueue} + */ + #queue = new FixedQueue(); + /** + * @type {boolean} + */ + #running = false; + /** @type {import('node:net').Socket} */ + #socket; + constructor(socket) { + this.#socket = socket; + } + add(item, cb, hint) { + if (hint !== sendHints.blob) { + const frame = createFrame(item, hint); + if (!this.#running) this.#socket.write(frame, cb); + else { + /** @type {SendQueueNode} */ + const node = { + promise: null, + callback: cb, + frame + }; + this.#queue.push(node); + } + return; + } + /** @type {SendQueueNode} */ + const node = { + promise: item.arrayBuffer().then((ab) => { + node.promise = null; + node.frame = createFrame(ab, hint); + }), + callback: cb, + frame: null + }; + this.#queue.push(node); + if (!this.#running) this.#run(); + } + async #run() { + this.#running = true; + const queue = this.#queue; + while (!queue.isEmpty()) { + const node = queue.shift(); + if (node.promise !== null) await node.promise; + this.#socket.write(node.frame, node.callback); + node.callback = node.frame = null; + } + this.#running = false; + } + }; + function createFrame(data, hint) { + return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY); + } + function toBuffer(data, hint) { + switch (hint) { + case sendHints.string: return Buffer.from(data); + case sendHints.arrayBuffer: + case sendHints.blob: return new FastBuffer(data); + case sendHints.typedArray: return new FastBuffer(data.buffer, data.byteOffset, data.byteLength); + } + } + module.exports = { SendQueue }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/websocket/websocket.js +var require_websocket = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { webidl } = require_webidl(); + const { URLSerializer } = require_data_url(); + const { environmentSettingsObject } = require_util$6(); + const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = require_constants$3(); + const { kWebSocketURL, kReadyState, kController, kBinaryType, kResponse, kSentClose, kByteParser } = require_symbols(); + const { isConnecting, isEstablished, isClosing, isValidSubprotocol, fireEvent } = require_util$1(); + const { establishWebSocketConnection, closeWebSocketConnection } = require_connection(); + const { ByteParser } = require_receiver(); + const { kEnumerableProperty, isBlobLike } = require_util$7(); + const { getGlobalDispatcher } = require_global(); + const { types: types$1 } = __require("node:util"); + const { ErrorEvent, CloseEvent } = require_events(); + const { SendQueue } = require_sender(); + var WebSocket = class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + }; + #bufferedAmount = 0; + #protocol = ""; + #extensions = ""; + /** @type {SendQueue} */ + #sendQueue; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor(url, protocols = []) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "WebSocket constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); + url = webidl.converters.USVString(url, prefix, "url"); + protocols = options.protocols; + const baseURL = environmentSettingsObject.settingsObject.baseUrl; + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException(`Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, "SyntaxError"); + if (urlRecord.hash || urlRecord.href.endsWith("#")) throw new DOMException("Got fragment", "SyntaxError"); + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + this[kWebSocketURL] = new URL(urlRecord.href); + const client = environmentSettingsObject.settingsObject; + this[kController] = establishWebSocketConnection(urlRecord, protocols, client, this, (response, extensions) => this.#onConnectionEstablished(response, extensions), options); + this[kReadyState] = WebSocket.CONNECTING; + this[kSentClose] = sentCloseFrameState.NOT_SENT; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.close"; + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", { clamp: true }); + if (reason !== void 0) reason = webidl.converters.USVString(reason, prefix, "reason"); + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonByteLength}`, "SyntaxError"); + } + closeWebSocketConnection(this, code, reason, reasonByteLength); + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, WebSocket); + const prefix = "WebSocket.send"; + webidl.argumentLengthCheck(arguments, 1, prefix); + data = webidl.converters.WebSocketSendData(data, prefix, "data"); + if (isConnecting(this)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this) || isClosing(this)) return; + if (typeof data === "string") { + const length = Buffer.byteLength(data); + this.#bufferedAmount += length; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= length; + }, sendHints.string); + } else if (types$1.isArrayBuffer(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.arrayBuffer); + } else if (ArrayBuffer.isView(data)) { + this.#bufferedAmount += data.byteLength; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.byteLength; + }, sendHints.typedArray); + } else if (isBlobLike(data)) { + this.#bufferedAmount += data.size; + this.#sendQueue.add(data, () => { + this.#bufferedAmount -= data.size; + }, sendHints.blob); + } + } + get readyState() { + webidl.brandCheck(this, WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onerror() { + webidl.brandCheck(this, WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + get onclose() { + webidl.brandCheck(this, WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.close) this.removeEventListener("close", this.#events.close); + if (typeof fn === "function") { + this.#events.close = fn; + this.addEventListener("close", fn); + } else this.#events.close = null; + } + get onmessage() { + webidl.brandCheck(this, WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, WebSocket); + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get binaryType() { + webidl.brandCheck(this, WebSocket); + return this[kBinaryType]; + } + set binaryType(type) { + webidl.brandCheck(this, WebSocket); + if (type !== "blob" && type !== "arraybuffer") this[kBinaryType] = "blob"; + else this[kBinaryType] = type; + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response, parsedExtensions) { + this[kResponse] = response; + const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize; + const parser = new ByteParser(this, parsedExtensions, { maxPayloadSize }); + parser.on("drain", onParserDrain); + parser.on("error", onParserError.bind(this)); + response.socket.ws = this; + this[kByteParser] = parser; + this.#sendQueue = new SendQueue(response.socket); + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) this.#extensions = extensions; + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) this.#protocol = protocol; + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); + webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) return webidl.converters["sequence"](V); + return webidl.converters.DOMString(V, prefix, argument); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + defaultValue: () => new Array(0) + }, + { + key: "dispatcher", + converter: webidl.converters.any, + defaultValue: () => getGlobalDispatcher() + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) return webidl.converters.Blob(V, { strict: false }); + if (ArrayBuffer.isView(V) || types$1.isArrayBuffer(V)) return webidl.converters.BufferSource(V); + } + return webidl.converters.USVString(V); + }; + function onParserDrain() { + this.ws[kResponse].socket.resume(); + } + function onParserError(err) { + let message; + let code; + if (err instanceof CloseEvent) { + message = err.reason; + code = err.code; + } else message = err.message; + fireEvent("error", this, () => new ErrorEvent("error", { + error: err, + message + })); + closeWebSocketConnection(this, code); + } + module.exports = { WebSocket }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/util.js +var require_util = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /** + * Checks if the given value is a valid LastEventId. + * @param {string} value + * @returns {boolean} + */ + function isValidLastEventId(value) { + return value.indexOf("\0") === -1; + } + /** + * Checks if the given value is a base 10 digit. + * @param {string} value + * @returns {boolean} + */ + function isASCIINumber(value) { + if (value.length === 0) return false; + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; + return true; + } + function delay(ms) { + return new Promise((resolve) => { + setTimeout(resolve, ms).unref(); + }); + } + module.exports = { + isValidLastEventId, + isASCIINumber, + delay + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource-stream.js +var require_eventsource_stream = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { Transform } = __require("node:stream"); + const { isASCIINumber, isValidLastEventId } = require_util(); + /** + * @type {number[]} BOM + */ + const BOM = [ + 239, + 187, + 191 + ]; + /** + * @type {10} LF + */ + const LF = 10; + /** + * @type {13} CR + */ + const CR = 13; + /** + * @type {58} COLON + */ + const COLON = 58; + /** + * @type {32} SPACE + */ + const SPACE = 32; + /** + * @typedef {object} EventSourceStreamEvent + * @type {object} + * @property {string} [event] The event type. + * @property {string} [data] The data of the message. + * @property {string} [id] A unique ID for the event. + * @property {string} [retry] The reconnection time, in milliseconds. + */ + /** + * @typedef eventSourceSettings + * @type {object} + * @property {string} lastEventId The last event ID received from the server. + * @property {string} origin The origin of the event source. + * @property {number} reconnectionTime The reconnection time, in milliseconds. + */ + var EventSourceStream = class extends Transform { + /** + * @type {eventSourceSettings} + */ + state = null; + /** + * Leading byte-order-mark check. + * @type {boolean} + */ + checkBOM = true; + /** + * @type {boolean} + */ + crlfCheck = false; + /** + * @type {boolean} + */ + eventEndCheck = false; + /** + * @type {Buffer} + */ + buffer = null; + pos = 0; + event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + /** + * @param {object} options + * @param {eventSourceSettings} options.eventSourceSettings + * @param {Function} [options.push] + */ + constructor(options = {}) { + options.readableObjectMode = true; + super(options); + this.state = options.eventSourceSettings || {}; + if (options.push) this.push = options.push; + } + /** + * @param {Buffer} chunk + * @param {string} _encoding + * @param {Function} callback + * @returns {void} + */ + _transform(chunk, _encoding, callback) { + if (chunk.length === 0) { + callback(); + return; + } + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { + callback(); + return; + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); + this.checkBOM = false; + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; + } + while (this.pos < this.buffer.length) { + if (this.eventEndCheck) { + if (this.crlfCheck) { + if (this.buffer[this.pos] === LF) { + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.crlfCheck = false; + continue; + } + this.crlfCheck = false; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + if (this.event.data !== void 0 || this.event.event || this.event.id || this.event.retry) this.processEvent(this.event); + this.clearEvent(); + continue; + } + this.eventEndCheck = false; + continue; + } + if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { + if (this.buffer[this.pos] === CR) this.crlfCheck = true; + this.parseLine(this.buffer.subarray(0, this.pos), this.event); + this.buffer = this.buffer.subarray(this.pos + 1); + this.pos = 0; + this.eventEndCheck = true; + continue; + } + this.pos++; + } + callback(); + } + /** + * @param {Buffer} line + * @param {EventStreamEvent} event + */ + parseLine(line, event) { + if (line.length === 0) return; + const colonPosition = line.indexOf(COLON); + if (colonPosition === 0) return; + let field = ""; + let value = ""; + if (colonPosition !== -1) { + field = line.subarray(0, colonPosition).toString("utf8"); + let valueStart = colonPosition + 1; + if (line[valueStart] === SPACE) ++valueStart; + value = line.subarray(valueStart).toString("utf8"); + } else { + field = line.toString("utf8"); + value = ""; + } + switch (field) { + case "data": + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; + break; + case "retry": + if (isASCIINumber(value)) event[field] = value; + break; + case "id": + if (isValidLastEventId(value)) event[field] = value; + break; + case "event": + if (value.length > 0) event[field] = value; + break; + } + } + /** + * @param {EventSourceStreamEvent} event + */ + processEvent(event) { + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); + } + clearEvent() { + this.event = { + data: void 0, + event: void 0, + id: void 0, + retry: void 0 + }; + } + }; + module.exports = { EventSourceStream }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/lib/web/eventsource/eventsource.js +var require_eventsource = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const { pipeline } = __require("node:stream"); + const { fetching } = require_fetch(); + const { makeRequest } = require_request(); + const { webidl } = require_webidl(); + const { EventSourceStream } = require_eventsource_stream(); + const { parseMIMEType } = require_data_url(); + const { createFastMessageEvent } = require_events(); + const { isNetworkError } = require_response(); + const { delay } = require_util(); + const { kEnumerableProperty } = require_util$7(); + const { environmentSettingsObject } = require_util$6(); + let experimentalWarned = false; + /** + * A reconnection time, in milliseconds. This must initially be an implementation-defined value, + * probably in the region of a few seconds. + * + * In Comparison: + * - Chrome uses 3000ms. + * - Deno uses 5000ms. + * + * @type {3000} + */ + const defaultReconnectionTime = 3e3; + /** + * The readyState attribute represents the state of the connection. + * @enum + * @readonly + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev + */ + /** + * The connection has not yet been established, or it was closed and the user + * agent is reconnecting. + * @type {0} + */ + const CONNECTING = 0; + /** + * The user agent has an open connection and is dispatching events as it + * receives them. + * @type {1} + */ + const OPEN = 1; + /** + * The connection is not open, and the user agent is not trying to reconnect. + * @type {2} + */ + const CLOSED = 2; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". + * @type {'anonymous'} + */ + const ANONYMOUS = "anonymous"; + /** + * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". + * @type {'use-credentials'} + */ + const USE_CREDENTIALS = "use-credentials"; + /** + * The EventSource interface is used to receive server-sent events. It + * connects to a server over HTTP and receives events in text/event-stream + * format without closing the connection. + * @extends {EventTarget} + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events + * @api public + */ + var EventSource = class EventSource extends EventTarget { + #events = { + open: null, + error: null, + message: null + }; + #url = null; + #withCredentials = false; + #readyState = CONNECTING; + #request = null; + #controller = null; + #dispatcher; + /** + * @type {import('./eventsource-stream').eventSourceSettings} + */ + #state; + /** + * Creates a new EventSource object. + * @param {string} url + * @param {EventSourceInit} [eventSourceInitDict] + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface + */ + constructor(url, eventSourceInitDict = {}) { + super(); + webidl.util.markAsUncloneable(this); + const prefix = "EventSource constructor"; + webidl.argumentLengthCheck(arguments, 1, prefix); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("EventSource is experimental, expect them to change at any time.", { code: "UNDICI-ES" }); + } + url = webidl.converters.USVString(url, prefix, "url"); + eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); + this.#dispatcher = eventSourceInitDict.dispatcher; + this.#state = { + lastEventId: "", + reconnectionTime: defaultReconnectionTime + }; + const settings = environmentSettingsObject; + let urlRecord; + try { + urlRecord = new URL(url, settings.settingsObject.baseUrl); + this.#state.origin = urlRecord.origin; + } catch (e) { + throw new DOMException(e, "SyntaxError"); + } + this.#url = urlRecord.href; + let corsAttributeState = ANONYMOUS; + if (eventSourceInitDict.withCredentials) { + corsAttributeState = USE_CREDENTIALS; + this.#withCredentials = true; + } + const initRequest = { + redirect: "follow", + keepalive: true, + mode: "cors", + credentials: corsAttributeState === "anonymous" ? "same-origin" : "omit", + referrer: "no-referrer" + }; + initRequest.client = environmentSettingsObject.settingsObject; + initRequest.headersList = [["accept", { + name: "accept", + value: "text/event-stream" + }]]; + initRequest.cache = "no-store"; + initRequest.initiator = "other"; + initRequest.urlList = [new URL(this.#url)]; + this.#request = makeRequest(initRequest); + this.#connect(); + } + /** + * Returns the state of this EventSource object's connection. It can have the + * values described below. + * @returns {0|1|2} + * @readonly + */ + get readyState() { + return this.#readyState; + } + /** + * Returns the URL providing the event stream. + * @readonly + * @returns {string} + */ + get url() { + return this.#url; + } + /** + * Returns a boolean indicating whether the EventSource object was + * instantiated with CORS credentials set (true), or not (false, the default). + */ + get withCredentials() { + return this.#withCredentials; + } + #connect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + const fetchParams = { + request: this.#request, + dispatcher: this.#dispatcher + }; + const processEventSourceEndOfBody = (response) => { + if (isNetworkError(response)) { + this.dispatchEvent(new Event("error")); + this.close(); + } + this.#reconnect(); + }; + fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; + fetchParams.processResponse = (response) => { + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; + } + const contentType = response.headersList.get("content-type", true); + const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; + const contentTypeValid = mimeType !== "failure" && mimeType.essence === "text/event-stream"; + if (response.status !== 200 || contentTypeValid === false) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } + this.#readyState = OPEN; + this.dispatchEvent(new Event("open")); + this.#state.origin = response.urlList[response.urlList.length - 1].origin; + const eventSourceStream = new EventSourceStream({ + eventSourceSettings: this.#state, + push: (event) => { + this.dispatchEvent(createFastMessageEvent(event.type, event.options)); + } + }); + pipeline(response.body.stream, eventSourceStream, (error) => { + if (error?.aborted === false) { + this.close(); + this.dispatchEvent(new Event("error")); + } + }); + }; + this.#controller = fetching(fetchParams); + } + /** + * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model + * @returns {Promise} + */ + async #reconnect() { + if (this.#readyState === CLOSED) return; + this.#readyState = CONNECTING; + this.dispatchEvent(new Event("error")); + await delay(this.#state.reconnectionTime); + if (this.#readyState !== CONNECTING) return; + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); + this.#connect(); + } + /** + * Closes the connection, if any, and sets the readyState attribute to + * CLOSED. + */ + close() { + webidl.brandCheck(this, EventSource); + if (this.#readyState === CLOSED) return; + this.#readyState = CLOSED; + this.#controller.abort(); + this.#request = null; + } + get onopen() { + return this.#events.open; + } + set onopen(fn) { + if (this.#events.open) this.removeEventListener("open", this.#events.open); + if (typeof fn === "function") { + this.#events.open = fn; + this.addEventListener("open", fn); + } else this.#events.open = null; + } + get onmessage() { + return this.#events.message; + } + set onmessage(fn) { + if (this.#events.message) this.removeEventListener("message", this.#events.message); + if (typeof fn === "function") { + this.#events.message = fn; + this.addEventListener("message", fn); + } else this.#events.message = null; + } + get onerror() { + return this.#events.error; + } + set onerror(fn) { + if (this.#events.error) this.removeEventListener("error", this.#events.error); + if (typeof fn === "function") { + this.#events.error = fn; + this.addEventListener("error", fn); + } else this.#events.error = null; + } + }; + const constantsPropertyDescriptors = { + CONNECTING: { + __proto__: null, + configurable: false, + enumerable: true, + value: CONNECTING, + writable: false + }, + OPEN: { + __proto__: null, + configurable: false, + enumerable: true, + value: OPEN, + writable: false + }, + CLOSED: { + __proto__: null, + configurable: false, + enumerable: true, + value: CLOSED, + writable: false + } + }; + Object.defineProperties(EventSource, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors); + Object.defineProperties(EventSource.prototype, { + close: kEnumerableProperty, + onerror: kEnumerableProperty, + onmessage: kEnumerableProperty, + onopen: kEnumerableProperty, + readyState: kEnumerableProperty, + url: kEnumerableProperty, + withCredentials: kEnumerableProperty + }); + webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([{ + key: "withCredentials", + converter: webidl.converters.boolean, + defaultValue: () => false + }, { + key: "dispatcher", + converter: webidl.converters.any + }]); + module.exports = { + EventSource, + defaultReconnectionTime + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js +var require_undici = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const Client = require_client(); + const Dispatcher = require_dispatcher(); + const Pool = require_pool(); + const BalancedPool = require_balanced_pool(); + const Agent = require_agent(); + const ProxyAgent = require_proxy_agent(); + const EnvHttpProxyAgent = require_env_http_proxy_agent(); + const RetryAgent = require_retry_agent(); + const errors = require_errors(); + const util = require_util$7(); + const { InvalidArgumentError } = errors; + const api = require_api(); + const buildConnector = require_connect(); + const MockClient = require_mock_client(); + const MockAgent = require_mock_agent(); + const MockPool = require_mock_pool(); + const mockErrors = require_mock_errors(); + const RetryHandler = require_retry_handler(); + const { getGlobalDispatcher, setGlobalDispatcher } = require_global(); + const DecoratorHandler = require_decorator_handler(); + const RedirectHandler = require_redirect_handler(); + const createRedirectInterceptor = require_redirect_interceptor(); + Object.assign(Dispatcher.prototype, api); + module.exports.Dispatcher = Dispatcher; + module.exports.Client = Client; + module.exports.Pool = Pool; + module.exports.BalancedPool = BalancedPool; + module.exports.Agent = Agent; + module.exports.ProxyAgent = ProxyAgent; + module.exports.EnvHttpProxyAgent = EnvHttpProxyAgent; + module.exports.RetryAgent = RetryAgent; + module.exports.RetryHandler = RetryHandler; + module.exports.DecoratorHandler = DecoratorHandler; + module.exports.RedirectHandler = RedirectHandler; + module.exports.createRedirectInterceptor = createRedirectInterceptor; + module.exports.interceptors = { + redirect: require_redirect(), + retry: require_retry(), + dump: require_dump(), + dns: require_dns() + }; + module.exports.buildConnector = buildConnector; + module.exports.errors = errors; + module.exports.util = { + parseHeaders: util.parseHeaders, + headerNameToString: util.headerNameToString + }; + function makeDispatcher(fn) { + return (url, opts, handler) => { + if (typeof opts === "function") { + handler = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (opts && opts.path != null) { + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); + let path = opts.path; + if (!opts.path.startsWith("/")) path = `/${path}`; + url = new URL(util.parseOrigin(url).origin + path); + } else { + if (!opts) opts = typeof url === "object" ? url : {}; + url = util.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? "PUT" : "GET") + }, handler); + }; + } + module.exports.setGlobalDispatcher = setGlobalDispatcher; + module.exports.getGlobalDispatcher = getGlobalDispatcher; + const fetchImpl = require_fetch().fetch; + module.exports.fetch = async function fetch(init, options = void 0) { + try { + return await fetchImpl(init, options); + } catch (err) { + if (err && typeof err === "object") Error.captureStackTrace(err); + throw err; + } + }; + module.exports.Headers = require_headers().Headers; + module.exports.Response = require_response().Response; + module.exports.Request = require_request().Request; + module.exports.FormData = require_formdata().FormData; + module.exports.File = globalThis.File ?? __require("node:buffer").File; + module.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global$1(); + module.exports.setGlobalOrigin = setGlobalOrigin; + module.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols$1(); + module.exports.caches = new CacheStorage(kConstruct); + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module.exports.deleteCookie = deleteCookie; + module.exports.getCookies = getCookies; + module.exports.getSetCookies = getSetCookies; + module.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_data_url(); + module.exports.parseMIMEType = parseMIMEType; + module.exports.serializeAMimeType = serializeAMimeType; + const { CloseEvent, ErrorEvent, MessageEvent } = require_events(); + module.exports.WebSocket = require_websocket().WebSocket; + module.exports.CloseEvent = CloseEvent; + module.exports.ErrorEvent = ErrorEvent; + module.exports.MessageEvent = MessageEvent; + module.exports.request = makeDispatcher(api.request); + module.exports.stream = makeDispatcher(api.stream); + module.exports.pipeline = makeDispatcher(api.pipeline); + module.exports.connect = makeDispatcher(api.connect); + module.exports.upgrade = makeDispatcher(api.upgrade); + module.exports.MockClient = MockClient; + module.exports.MockPool = MockPool; + module.exports.MockAgent = MockAgent; + module.exports.mockErrors = mockErrors; + const { EventSource } = require_eventsource(); + module.exports.EventSource = EventSource; +})); +require_tunnel(); +require_undici(); +var HttpCodes; +(function(HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect; +HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout; +//#endregion +//#region ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js +var __awaiter$6 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { access, appendFile, writeFile: writeFile$1 } = promises; +const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter$6(this, void 0, void 0, function* () { + if (this._filePath) return this._filePath; + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + try { + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) return `<${tag}${htmlAttrs}>`; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter$6(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + yield (overwrite ? writeFile$1 : appendFile)(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter$6(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") return this.wrap("td", cell); + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ + src, + alt + }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } +}; +new Summary(); +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js +var __awaiter$5 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +const { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs$7.promises; +const IS_WINDOWS$1 = process.platform === "win32"; +fs$7.constants.O_RDONLY; +/** +* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: +* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). +*/ +function isRooted(p) { + p = normalizeSeparators(p); + if (!p) throw new Error("isRooted() parameter \"p\" cannot be empty"); + if (IS_WINDOWS$1) return p.startsWith("\\") || /^[A-Z]:/i.test(p); + return p.startsWith("/"); +} +/** +* Best effort attempt to determine whether a file exists and is executable. +* @param filePath file path to check +* @param extensions additional file extensions to try +* @return if file exists and is executable, returns the file path. otherwise empty string. +*/ +function tryGetExecutablePath(filePath, extensions) { + return __awaiter$5(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + const upperExt = path$15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + if (stats && stats.isFile()) { + if (IS_WINDOWS$1) { + try { + const directory = path$15.dirname(filePath); + const upperName = path$15.basename(filePath).toUpperCase(); + for (const actualName of yield readdir(directory)) if (upperName === actualName.toUpperCase()) { + filePath = path$15.join(directory, actualName); + break; + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else if (isUnixExecutable(stats)) return filePath; + } + } + return ""; + }); +} +function normalizeSeparators(p) { + p = p || ""; + if (IS_WINDOWS$1) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); +} +function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); +} +//#endregion +//#region ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js +var __awaiter$4 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +/** +* Returns path of a tool had the tool actually been invoked. Resolves via paths. +* If you check and the tool does not exist, it will throw. +* +* @param tool name of the tool +* @param check whether to check if tool exists +* @returns Promise path to tool +*/ +function which(tool, check) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + if (check) { + const result = yield which(tool, false); + if (!result) if (IS_WINDOWS$1) throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + else throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) return matches[0]; + return ""; + }); +} +/** +* Returns a list of all occurrences of the given tool on the system path. +* +* @returns Promise the paths of the tool +*/ +function findInPath(tool) { + return __awaiter$4(this, void 0, void 0, function* () { + if (!tool) throw new Error("parameter 'tool' is required"); + const extensions = []; + if (IS_WINDOWS$1 && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path$15.delimiter)) if (extension) extensions.push(extension); + } + if (isRooted(tool)) { + const filePath = yield tryGetExecutablePath(tool, extensions); + if (filePath) return [filePath]; + return []; + } + if (tool.includes(path$15.sep)) return []; + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path$15.delimiter)) if (p) directories.push(p); + } + const matches = []; + for (const directory of directories) { + const filePath = yield tryGetExecutablePath(path$15.join(directory, tool), extensions); + if (filePath) matches.push(filePath); + } + return matches; + }); +} +process.platform; +events.EventEmitter; +events.EventEmitter; +os.platform(); +os.arch(); +/** +* The code to exit an action +*/ +var ExitCode; +(function(ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +/** +* Sets the action status to failed. +* When the action exits it will be with an exit code of 1 +* @param message add error issue message +*/ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +/** +* Adds an error issue +* @param message error issue message. Errors will be converted to string via toString() +* @param properties optional properties to add to the annotation. +*/ +function error(message, properties = {}) { + issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +/** +* Writes info to log with console.log. +* @param message info message +*/ +function info(message) { + process.stdout.write(message + os$3.EOL); +} +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js +var require_array = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.splitWhen = exports.flatten = void 0; + function flatten(items) { + return items.reduce((collection, item) => [].concat(collection, item), []); + } + exports.flatten = flatten; + function splitWhen(items, predicate) { + const result = [[]]; + let groupIndex = 0; + for (const item of items) if (predicate(item)) { + groupIndex++; + result[groupIndex] = []; + } else result[groupIndex].push(item); + return result; + } + exports.splitWhen = splitWhen; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js +var require_errno = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEnoentCodeError = void 0; + function isEnoentCodeError(error) { + return error.code === "ENOENT"; + } + exports.isEnoentCodeError = isEnoentCodeError; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js +var require_fs$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js +var require_path = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; + const os$2 = __require("os"); + const path$14 = __require("path"); + const IS_WINDOWS_PLATFORM = os$2.platform() === "win32"; + const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; + /** + * All non-escaped special characters. + * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. + * Windows: (){}[], !+@ before (, ! at the beginning. + */ + const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; + const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; + /** + * The device path (\\.\ or \\?\). + * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths + */ + const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; + /** + * All backslashes except those escaping special characters. + * Windows: !()+@{} + * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions + */ + const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; + /** + * Designed to work only with simple paths: `dir\\file`. + */ + function unixify(filepath) { + return filepath.replace(/\\/g, "/"); + } + exports.unixify = unixify; + function makeAbsolute(cwd, filepath) { + return path$14.resolve(cwd, filepath); + } + exports.makeAbsolute = makeAbsolute; + function removeLeadingDotSegment(entry) { + if (entry.charAt(0) === ".") { + const secondCharactery = entry.charAt(1); + if (secondCharactery === "/" || secondCharactery === "\\") return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); + } + return entry; + } + exports.removeLeadingDotSegment = removeLeadingDotSegment; + exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; + function escapeWindowsPath(pattern) { + return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapeWindowsPath = escapeWindowsPath; + function escapePosixPath(pattern) { + return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); + } + exports.escapePosixPath = escapePosixPath; + exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; + function convertWindowsPathToPattern(filepath) { + return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); + } + exports.convertWindowsPathToPattern = convertWindowsPathToPattern; + function convertPosixPathToPattern(filepath) { + return escapePosixPath(filepath); + } + exports.convertPosixPathToPattern = convertPosixPathToPattern; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js +var require_is_extglob = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + module.exports = function isExtglob(str) { + if (typeof str !== "string" || str === "") return false; + var match; + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + return false; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js +var require_is_glob = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + var isExtglob = require_is_extglob(); + var chars = { + "{": "}", + "(": ")", + "[": "]" + }; + var strictCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === "*") return true; + if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) return true; + if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { + if (closeSquareIndex < index) closeSquareIndex = str.indexOf("]", index); + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) return true; + } + } + if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { + closeCurlyIndex = str.indexOf("}", index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) return true; + } + } + if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") { + closeParenIndex = str.indexOf(")", index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf("\\", index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { + if (pipeIndex < index) pipeIndex = str.indexOf("|", index); + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { + closeParenIndex = str.indexOf(")", pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf("\\", pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) return true; + } + } + } + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + var relaxedCheck = function(str) { + if (str[0] === "!") return true; + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) return true; + if (str[index] === "\\") { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) index = n + 1; + } + if (str[index] === "!") return true; + } else index++; + } + return false; + }; + module.exports = function isGlob(str, options) { + if (typeof str !== "string" || str === "") return false; + if (isExtglob(str)) return true; + var check = strictCheck; + if (options && options.strict === false) check = relaxedCheck; + return check(str); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js +var require_glob_parent = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var isGlob = require_is_glob(); + var pathPosixDirname = __require("path").posix.dirname; + var isWin32 = __require("os").platform() === "win32"; + var slash = "/"; + var backslash = /\\/g; + var enclosure = /[\{\[].*[\}\]]$/; + var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; + /** + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} + */ + module.exports = function globParent(str, opts) { + if (Object.assign({ flipBackslashes: true }, opts).flipBackslashes && isWin32 && str.indexOf(slash) < 0) str = str.replace(backslash, slash); + if (enclosure.test(str)) str += slash; + str += "a"; + do + str = pathPosixDirname(str); + while (isGlob(str) || globby.test(str)); + return str.replace(escaped, "$1"); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js +var require_utils$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + exports.isInteger = (num) => { + if (typeof num === "number") return Number.isInteger(num); + if (typeof num === "string" && num.trim() !== "") return Number.isInteger(Number(num)); + return false; + }; + /** + * Find a node of the given type + */ + exports.find = (node, type) => node.nodes.find((node) => node.type === type); + /** + * Find a node of the given type + */ + exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return (Number(max) - Number(min)) / Number(step) >= limit; + }; + /** + * Escape the given node with '\\' before node.value + */ + exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + if (type && node.type === type || node.type === "open" || node.type === "close") { + if (node.escaped !== true) { + node.value = "\\" + node.value; + node.escaped = true; + } + } + }; + /** + * Returns true if the given brace node should be enclosed in literal braces + */ + exports.encloseBrace = (node) => { + if (node.type !== "brace") return false; + if (node.commas >> 0 + node.ranges >> 0 === 0) { + node.invalid = true; + return true; + } + return false; + }; + /** + * Returns true if a brace node is invalid. + */ + exports.isInvalidBrace = (block) => { + if (block.type !== "brace") return false; + if (block.invalid === true || block.dollar) return true; + if (block.commas >> 0 + block.ranges >> 0 === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; + }; + /** + * Returns true if a node is an open or close node + */ + exports.isOpenOrClose = (node) => { + if (node.type === "open" || node.type === "close") return true; + return node.open === true || node.close === true; + }; + /** + * Reduce an array of text nodes. + */ + exports.reduce = (nodes) => nodes.reduce((acc, node) => { + if (node.type === "text") acc.push(node.value); + if (node.type === "range") node.type = "text"; + return acc; + }, []); + /** + * Flatten an array + */ + exports.flatten = (...args) => { + const result = []; + const flat = (arr) => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + if (Array.isArray(ele)) { + flat(ele); + continue; + } + if (ele !== void 0) result.push(ele); + } + return result; + }; + flat(args); + return result; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js +var require_stringify$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const utils = require_utils$4(); + module.exports = (ast, options = {}) => { + const stringify = (node, parent = {}) => { + const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ""; + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) return "\\" + node.value; + return node.value; + } + if (node.value) return node.value; + if (node.nodes) for (const child of node.nodes) output += stringify(child); + return output; + }; + return stringify(ast); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js +/*! +* is-number +* +* Copyright (c) 2014-present, Jon Schlinkert. +* Released under the MIT License. +*/ +var require_is_number = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = function(num) { + if (typeof num === "number") return num - num === 0; + if (typeof num === "string" && num.trim() !== "") return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + return false; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js +/*! +* to-regex-range +* +* Copyright (c) 2015-present, Jon Schlinkert. +* Released under the MIT License. +*/ +var require_to_regex_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const isNumber = require_is_number(); + const toRegexRange = (min, max, options) => { + if (isNumber(min) === false) throw new TypeError("toRegexRange: expected the first argument to be a number"); + if (max === void 0 || min === max) return String(min); + if (isNumber(max) === false) throw new TypeError("toRegexRange: expected the second argument to be a number."); + let opts = { + relaxZeros: true, + ...options + }; + if (typeof opts.strictZeros === "boolean") opts.relaxZeros = opts.strictZeros === false; + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; + if (toRegexRange.cache.hasOwnProperty(cacheKey)) return toRegexRange.cache[cacheKey].result; + let a = Math.min(min, max); + let b = Math.max(min, max); + if (Math.abs(a - b) === 1) { + let result = min + "|" + max; + if (opts.capture) return `(${result})`; + if (opts.wrap === false) return result; + return `(?:${result})`; + } + let isPadded = hasPadding(min) || hasPadding(max); + let state = { + min, + max, + a, + b + }; + let positives = []; + let negatives = []; + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + if (a < 0) { + negatives = splitToPatterns(b < 0 ? Math.abs(b) : 1, Math.abs(a), state, opts); + a = state.a = 0; + } + if (b >= 0) positives = splitToPatterns(a, b, state, opts); + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + if (opts.capture === true) state.result = `(${state.result})`; + else if (opts.wrap !== false && positives.length + negatives.length > 1) state.result = `(?:${state.result})`; + toRegexRange.cache[cacheKey] = state; + return state.result; + }; + function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; + let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; + let intersected = filterPatterns(neg, pos, "-?", true, options) || []; + return onlyNegative.concat(intersected).concat(onlyPositive).join("|"); + } + function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + let stop = countNines(min, nines); + let stops = /* @__PURE__ */ new Set([max]); + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + stop = countZeros(max + 1, zeros) - 1; + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + stops = [...stops]; + stops.sort(compare); + return stops; + } + /** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + function rangeToPattern(start, stop, options) { + if (start === stop) return { + pattern: start, + count: [], + digits: 0 + }; + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ""; + let count = 0; + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + if (startDigit === stopDigit) pattern += startDigit; + else if (startDigit !== "0" || stopDigit !== "9") pattern += toCharacterClass(startDigit, stopDigit, options); + else count++; + } + if (count) pattern += options.shorthand === true ? "\\d" : "[0-9]"; + return { + pattern, + count: [count], + digits + }; + } + function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + for (let i = 0; i < ranges.length; i++) { + let max = ranges[i]; + let obj = rangeToPattern(String(start), String(max), options); + let zeros = ""; + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) prev.count.pop(); + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max + 1; + continue; + } + if (tok.isPadded) zeros = padZeros(max, tok, options); + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max + 1; + prev = obj; + } + return tokens; + } + function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + for (let ele of arr) { + let { string } = ele; + if (!intersection && !contains(comparison, "string", string)) result.push(prefix + string); + if (intersection && contains(comparison, "string", string)) result.push(prefix + string); + } + return result; + } + /** + * Zip strings + */ + function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; + } + function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; + } + function contains(arr, key, val) { + return arr.some((ele) => ele[key] === val); + } + function countNines(min, len) { + return Number(String(min).slice(0, -len) + "9".repeat(len)); + } + function countZeros(integer, zeros) { + return integer - integer % Math.pow(10, zeros); + } + function toQuantifier(digits) { + let [start = 0, stop = ""] = digits; + if (stop || start > 1) return `{${start + (stop ? "," + stop : "")}}`; + return ""; + } + function toCharacterClass(a, b, options) { + return `[${a}${b - a === 1 ? "" : "-"}${b}]`; + } + function hasPadding(str) { + return /^-?(0+)\d/.test(str); + } + function padZeros(value, tok, options) { + if (!tok.isPadded) return value; + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + switch (diff) { + case 0: return ""; + case 1: return relax ? "0?" : "0"; + case 2: return relax ? "0{0,2}" : "00"; + default: return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } + /** + * Cache + */ + toRegexRange.cache = {}; + toRegexRange.clearCache = () => toRegexRange.cache = {}; + /** + * Expose `toRegexRange` + */ + module.exports = toRegexRange; +})); +//#endregion +//#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js +/*! +* fill-range +* +* Copyright (c) 2014-present, Jon Schlinkert. +* Licensed under the MIT License. +*/ +var require_fill_range = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util$1 = __require("util"); + const toRegexRange = require_to_regex_range(); + const isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + const transform = (toNumber) => { + return (value) => toNumber === true ? Number(value) : String(value); + }; + const isValidValue = (value) => { + return typeof value === "number" || typeof value === "string" && value !== ""; + }; + const isNumber = (num) => Number.isInteger(+num); + const zeros = (input) => { + let value = `${input}`; + let index = -1; + if (value[0] === "-") value = value.slice(1); + if (value === "0") return false; + while (value[++index] === "0"); + return index > 0; + }; + const stringify = (start, end, options) => { + if (typeof start === "string" || typeof end === "string") return true; + return options.stringify === true; + }; + const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === "-" ? "-" : ""; + if (dash) input = input.slice(1); + input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); + } + if (toNumber === false) return String(input); + return input; + }; + const toMaxLen = (input, maxLength) => { + let negative = input[0] === "-" ? "-" : ""; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = "0" + input; + return negative ? "-" + input : input; + }; + const toSequence = (parts, options, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + let prefix = options.capture ? "" : "?:"; + let positives = ""; + let negatives = ""; + let result; + if (parts.positives.length) positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); + if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; + if (positives && negatives) result = `${positives}|${negatives}`; + else result = positives || negatives; + if (options.wrap) return `(${prefix}${result})`; + return result; + }; + const toRange = (a, b, isNumbers, options) => { + if (isNumbers) return toRegexRange(a, b, { + wrap: false, + ...options + }); + let start = String.fromCharCode(a); + if (a === b) return start; + return `[${start}-${String.fromCharCode(b)}]`; + }; + const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? "" : "?:"; + return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); + } + return toRegexRange(start, end, options); + }; + const rangeError = (...args) => { + return /* @__PURE__ */ new RangeError("Invalid range arguments: " + util$1.inspect(...args)); + }; + const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + }; + const invalidStep = (step, options) => { + if (options.strictRanges === true) throw new TypeError(`Expected step "${step}" to be a number`); + return []; + }; + const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + if (a === 0) a = 0; + if (b === 0) b = 0; + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + if (options.toRegex && step === 1) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + let parts = { + negatives: [], + positives: [] + }; + let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) push(a); + else range.push(pad(format(a, index), maxLen, toNumber)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { + wrap: false, + ...options + }); + return range; + }; + const fillLetters = (start, end, step = 1, options = {}) => { + if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) return invalidRange(start, end, options); + let format = options.transform || ((val) => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + if (options.toRegex && step === 1) return toRange(min, max, false, options); + let range = []; + let index = 0; + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + if (options.toRegex === true) return toRegex(range, null, { + wrap: false, + options + }); + return range; + }; + const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) return [start]; + if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options); + if (typeof step === "function") return fill(start, end, 1, { transform: step }); + if (isObject(step)) return fill(start, end, 0, step); + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + if (isNumber(start) && isNumber(end)) return fillNumbers(start, end, step, opts); + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); + }; + module.exports = fill; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js +var require_compile = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fill = require_fill_range(); + const utils = require_utils$4(); + const compile = (ast, options = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options.escapeInvalid === true ? "\\" : ""; + let output = ""; + if (node.isOpen === true) return prefix + node.value; + if (node.isClose === true) { + console.log("node.isClose", prefix, node.value); + return prefix + node.value; + } + if (node.type === "open") return invalid ? prefix + node.value : "("; + if (node.type === "close") return invalid ? prefix + node.value : ")"; + if (node.type === "comma") return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; + if (node.value) return node.value; + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { + ...options, + wrap: false, + toRegex: true, + strictZeros: true + }); + if (range.length !== 0) return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + if (node.nodes) for (const child of node.nodes) output += walk(child, node); + return output; + }; + return walk(ast); + }; + module.exports = compile; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js +var require_expand = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const fill = require_fill_range(); + const stringify = require_stringify$1(); + const utils = require_utils$4(); + const append = (queue = "", stash = "", enclose = false) => { + const result = []; + queue = [].concat(queue); + stash = [].concat(stash); + if (!stash.length) return queue; + if (!queue.length) return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; + for (const item of queue) if (Array.isArray(item)) for (const value of item) result.push(append(value, stash, enclose)); + else for (let ele of stash) { + if (enclose === true && typeof ele === "string") ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + return utils.flatten(result); + }; + const expand = (ast, options = {}) => { + const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; + const walk = (node, parent = {}) => { + node.queue = []; + let p = parent; + let q = parent.queue; + while (p.type !== "brace" && p.type !== "root" && p.parent) { + p = p.parent; + q = p.queue; + } + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ["{}"])); + return; + } + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); + let range = fill(...args, options); + if (range.length === 0) range = stringify(node, options); + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + while (block.type !== "brace" && block.type !== "root" && block.parent) { + block = block.parent; + queue = block.queue; + } + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + if (child.type === "comma" && node.type === "brace") { + if (i === 1) queue.push(""); + queue.push(""); + continue; + } + if (child.type === "close") { + q.push(append(q.pop(), queue, enclose)); + continue; + } + if (child.value && child.type !== "open") { + queue.push(append(queue.pop(), child.value)); + continue; + } + if (child.nodes) walk(child, node); + } + return queue; + }; + return utils.flatten(walk(ast)); + }; + module.exports = expand; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js +var require_constants$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = { + MAX_LENGTH: 1e4, + CHAR_0: "0", + CHAR_9: "9", + CHAR_UPPERCASE_A: "A", + CHAR_LOWERCASE_A: "a", + CHAR_UPPERCASE_Z: "Z", + CHAR_LOWERCASE_Z: "z", + CHAR_LEFT_PARENTHESES: "(", + CHAR_RIGHT_PARENTHESES: ")", + CHAR_ASTERISK: "*", + CHAR_AMPERSAND: "&", + CHAR_AT: "@", + CHAR_BACKSLASH: "\\", + CHAR_BACKTICK: "`", + CHAR_CARRIAGE_RETURN: "\r", + CHAR_CIRCUMFLEX_ACCENT: "^", + CHAR_COLON: ":", + CHAR_COMMA: ",", + CHAR_DOLLAR: "$", + CHAR_DOT: ".", + CHAR_DOUBLE_QUOTE: "\"", + CHAR_EQUAL: "=", + CHAR_EXCLAMATION_MARK: "!", + CHAR_FORM_FEED: "\f", + CHAR_FORWARD_SLASH: "/", + CHAR_HASH: "#", + CHAR_HYPHEN_MINUS: "-", + CHAR_LEFT_ANGLE_BRACKET: "<", + CHAR_LEFT_CURLY_BRACE: "{", + CHAR_LEFT_SQUARE_BRACKET: "[", + CHAR_LINE_FEED: "\n", + CHAR_NO_BREAK_SPACE: "\xA0", + CHAR_PERCENT: "%", + CHAR_PLUS: "+", + CHAR_QUESTION_MARK: "?", + CHAR_RIGHT_ANGLE_BRACKET: ">", + CHAR_RIGHT_CURLY_BRACE: "}", + CHAR_RIGHT_SQUARE_BRACKET: "]", + CHAR_SEMICOLON: ";", + CHAR_SINGLE_QUOTE: "'", + CHAR_SPACE: " ", + CHAR_TAB: " ", + CHAR_UNDERSCORE: "_", + CHAR_VERTICAL_LINE: "|", + CHAR_ZERO_WIDTH_NOBREAK_SPACE: "" + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js +var require_parse$2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const stringify = require_stringify$1(); + /** + * Constants + */ + const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants$2(); + /** + * parse + */ + const parse = (input, options = {}) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + const opts = options || {}; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + const ast = { + type: "root", + input, + nodes: [] + }; + const stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + /** + * Helpers + */ + const advance = () => input[index++]; + const push = (node) => { + if (node.type === "text" && prev.type === "dot") prev.type = "text"; + if (prev && prev.type === "text" && node.type === "text") { + prev.value += node.value; + return; + } + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + push({ type: "bos" }); + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + /** + * Invalid chars + */ + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) continue; + /** + * Escaped chars + */ + if (value === CHAR_BACKSLASH) { + push({ + type: "text", + value: (options.keepEscaping ? value : "") + advance() + }); + continue; + } + /** + * Right square bracket (literal): ']' + */ + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ + type: "text", + value: "\\" + value + }); + continue; + } + /** + * Left square bracket: '[' + */ + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + let next; + while (index < length && (next = advance())) { + value += next; + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + if (brackets === 0) break; + } + } + push({ + type: "text", + value + }); + continue; + } + /** + * Parentheses + */ + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ + type: "paren", + nodes: [] + }); + stack.push(block); + push({ + type: "text", + value + }); + continue; + } + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== "paren") { + push({ + type: "text", + value + }); + continue; + } + block = stack.pop(); + push({ + type: "text", + value + }); + block = stack[stack.length - 1]; + continue; + } + /** + * Quotes: '|"|` + */ + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + if (options.keepQuotes !== true) value = ""; + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + value += next; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Left curly brace: '{' + */ + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + block = push({ + type: "brace", + open: true, + close: false, + dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === true, + depth, + commas: 0, + ranges: 0, + nodes: [] + }); + stack.push(block); + push({ + type: "open", + value + }); + continue; + } + /** + * Right curly brace: '}' + */ + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== "brace") { + push({ + type: "text", + value + }); + continue; + } + const type = "close"; + block = stack.pop(); + block.close = true; + push({ + type, + value + }); + depth--; + block = stack[stack.length - 1]; + continue; + } + /** + * Comma: ',' + */ + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { + type: "text", + value: stringify(block) + }]; + } + push({ + type: "comma", + value + }); + block.commas++; + continue; + } + /** + * Dot: '.' + */ + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + if (depth === 0 || siblings.length === 0) { + push({ + type: "text", + value + }); + continue; + } + if (prev.type === "dot") { + block.range = []; + prev.value += value; + prev.type = "range"; + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = "text"; + continue; + } + block.ranges++; + block.args = []; + continue; + } + if (prev.type === "range") { + siblings.pop(); + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + push({ + type: "dot", + value + }); + continue; + } + /** + * Text + */ + push({ + type: "text", + value + }); + } + do { + block = stack.pop(); + if (block.type !== "root") { + block.nodes.forEach((node) => { + if (!node.nodes) { + if (node.type === "open") node.isOpen = true; + if (node.type === "close") node.isClose = true; + if (!node.nodes) node.type = "text"; + node.invalid = true; + } + }); + const parent = stack[stack.length - 1]; + const index = parent.nodes.indexOf(block); + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + push({ type: "eos" }); + return ast; + }; + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js +var require_braces = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const stringify = require_stringify$1(); + const compile = require_compile(); + const expand = require_expand(); + const parse = require_parse$2(); + /** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + const braces = (input, options = {}) => { + let output = []; + if (Array.isArray(input)) for (const pattern of input) { + const result = braces.create(pattern, options); + if (Array.isArray(result)) output.push(...result); + else output.push(result); + } + else output = [].concat(braces.create(input, options)); + if (options && options.expand === true && options.nodupes === true) output = [...new Set(output)]; + return output; + }; + /** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + braces.parse = (input, options = {}) => parse(input, options); + /** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.stringify = (input, options = {}) => { + if (typeof input === "string") return stringify(braces.parse(input, options), options); + return stringify(input, options); + }; + /** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.compile = (input, options = {}) => { + if (typeof input === "string") input = braces.parse(input, options); + return compile(input, options); + }; + /** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.expand = (input, options = {}) => { + if (typeof input === "string") input = braces.parse(input, options); + let result = expand(input, options); + if (options.noempty === true) result = result.filter(Boolean); + if (options.nodupes === true) result = [...new Set(result)]; + return result; + }; + /** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + braces.create = (input, options = {}) => { + if (input === "" || input.length < 3) return [input]; + return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); + }; + /** + * Expose "braces" + */ + module.exports = braces; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js +var require_constants$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$13 = __require("path"); + const WIN_SLASH = "\\\\/"; + const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + const DEFAULT_MAX_EXTGLOB_RECURSION = 0; + /** + * Posix glob regex + */ + const DOT_LITERAL = "\\."; + const PLUS_LITERAL = "\\+"; + const QMARK_LITERAL = "\\?"; + const SLASH_LITERAL = "\\/"; + const ONE_CHAR = "(?=.)"; + const QMARK = "[^/]"; + const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; + const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; + const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; + const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, + NO_DOTS_SLASH: `(?!${DOTS_SLASH})`, + QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`, + STAR: `${QMARK}*?`, + START_ANCHOR + }; + /** + * Windows glob regex + */ + const WINDOWS_CHARS = { + ...POSIX_CHARS, + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)` + }; + module.exports = { + DEFAULT_MAX_EXTGLOB_RECURSION, + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE: { + __proto__: null, + alnum: "a-zA-Z0-9", + alpha: "a-zA-Z", + ascii: "\\x00-\\x7F", + blank: " \\t", + cntrl: "\\x00-\\x1F\\x7F", + digit: "0-9", + graph: "\\x21-\\x7E", + lower: "a-z", + print: "\\x20-\\x7E ", + punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", + space: " \\t\\r\\n\\v\\f", + upper: "A-Z", + word: "A-Za-z0-9_", + xdigit: "A-Fa-f0-9" + }, + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + REPLACEMENTS: { + __proto__: null, + "***": "*", + "**/**": "**", + "**/**/**": "**" + }, + CHAR_0: 48, + CHAR_9: 57, + CHAR_UPPERCASE_A: 65, + CHAR_LOWERCASE_A: 97, + CHAR_UPPERCASE_Z: 90, + CHAR_LOWERCASE_Z: 122, + CHAR_LEFT_PARENTHESES: 40, + CHAR_RIGHT_PARENTHESES: 41, + CHAR_ASTERISK: 42, + CHAR_AMPERSAND: 38, + CHAR_AT: 64, + CHAR_BACKWARD_SLASH: 92, + CHAR_CARRIAGE_RETURN: 13, + CHAR_CIRCUMFLEX_ACCENT: 94, + CHAR_COLON: 58, + CHAR_COMMA: 44, + CHAR_DOT: 46, + CHAR_DOUBLE_QUOTE: 34, + CHAR_EQUAL: 61, + CHAR_EXCLAMATION_MARK: 33, + CHAR_FORM_FEED: 12, + CHAR_FORWARD_SLASH: 47, + CHAR_GRAVE_ACCENT: 96, + CHAR_HASH: 35, + CHAR_HYPHEN_MINUS: 45, + CHAR_LEFT_ANGLE_BRACKET: 60, + CHAR_LEFT_CURLY_BRACE: 123, + CHAR_LEFT_SQUARE_BRACKET: 91, + CHAR_LINE_FEED: 10, + CHAR_NO_BREAK_SPACE: 160, + CHAR_PERCENT: 37, + CHAR_PLUS: 43, + CHAR_QUESTION_MARK: 63, + CHAR_RIGHT_ANGLE_BRACKET: 62, + CHAR_RIGHT_CURLY_BRACE: 125, + CHAR_RIGHT_SQUARE_BRACKET: 93, + CHAR_SEMICOLON: 59, + CHAR_SINGLE_QUOTE: 39, + CHAR_SPACE: 32, + CHAR_TAB: 9, + CHAR_UNDERSCORE: 95, + CHAR_VERTICAL_LINE: 124, + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, + SEP: path$13.sep, + /** + * Create EXTGLOB_CHARS + */ + extglobChars(chars) { + return { + "!": { + type: "negate", + open: "(?:(?!(?:", + close: `))${chars.STAR})` + }, + "?": { + type: "qmark", + open: "(?:", + close: ")?" + }, + "+": { + type: "plus", + open: "(?:", + close: ")+" + }, + "*": { + type: "star", + open: "(?:", + close: ")*" + }, + "@": { + type: "at", + open: "(?:", + close: ")" + } + }; + }, + /** + * Create GLOB_CHARS + */ + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js +var require_utils$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + const path$12 = __require("path"); + const win32 = process.platform === "win32"; + const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1(); + exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); + exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); + exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str) => { + return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + return match === "\\" ? "" : match; + }); + }; + exports.supportsLookbehinds = () => { + const segs = process.version.slice(1).split(".").map(Number); + if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) return true; + return false; + }; + exports.isWindows = (options) => { + if (options && typeof options.windows === "boolean") return options.windows; + return win32 === true || path$12.sep === "\\"; + }; + exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; + }; + exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith("./")) { + output = output.slice(2); + state.prefix = "./"; + } + return output; + }; + exports.wrapOutput = (input, state = {}, options = {}) => { + let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`; + if (state.negated === true) output = `(?:^(?!${output}).*$)`; + return output; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js +var require_scan = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const utils = require_utils$3(); + const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants$1(); + const isPathSeparator = (code) => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; + }; + const depth = (token) => { + if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1; + }; + /** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + const scan = (input, options) => { + const opts = options || {}; + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { + value: "", + depth: 0, + isGlob: false + }; + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + while (index < length) { + code = advance(); + let next; + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + if (code === CHAR_LEFT_CURLY_BRACE) braceEscaped = true; + continue; + } + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { + value: "", + depth: 0, + isGlob: false + }; + if (finished === true) continue; + if (prev === CHAR_DOT && index === start + 1) { + start += 2; + continue; + } + lastIndex = index + 1; + continue; + } + if (opts.noext !== true) { + if ((code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + if (scanToEnd === true) continue; + break; + } + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + if (scanToEnd === true) continue; + break; + } + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + if (isGlob === true) { + finished = true; + if (scanToEnd === true) continue; + break; + } + } + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + let base = str; + let prefix = ""; + let glob = ""; + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ""; + glob = str; + } else base = str; + if (base && base !== "" && base !== "/" && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1); + } + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + if (base && backslashes === true) base = utils.removeBackslashes(base); + } + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) tokens.push(token); + state.tokens = tokens; + } + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else tokens[idx].value = value; + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== "") parts.push(value); + prevIndex = i; + } + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + state.slashes = slashes; + state.parts = parts; + } + return state; + }; + module.exports = scan; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js +var require_parse$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const constants = require_constants$1(); + const utils = require_utils$3(); + /** + * Constants + */ + const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants; + /** + * Helpers + */ + const expandRange = (args, options) => { + if (typeof options.expandRange === "function") return options.expandRange(...args, options); + args.sort(); + const value = `[${args.join("-")}]`; + try { + new RegExp(value); + } catch (ex) { + return args.map((v) => utils.escapeRegex(v)).join(".."); + } + return value; + }; + /** + * Create the message for a syntax error + */ + const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + }; + const splitTopLevel = (input) => { + const parts = []; + let bracket = 0; + let paren = 0; + let quote = 0; + let value = ""; + let escaped = false; + for (const ch of input) { + if (escaped === true) { + value += ch; + escaped = false; + continue; + } + if (ch === "\\") { + value += ch; + escaped = true; + continue; + } + if (ch === "\"") { + quote = quote === 1 ? 0 : 1; + value += ch; + continue; + } + if (quote === 0) { + if (ch === "[") bracket++; + else if (ch === "]" && bracket > 0) bracket--; + else if (bracket === 0) { + if (ch === "(") paren++; + else if (ch === ")" && paren > 0) paren--; + else if (ch === "|" && paren === 0) { + parts.push(value); + value = ""; + continue; + } + } + } + value += ch; + } + parts.push(value); + return parts; + }; + const isPlainBranch = (branch) => { + let escaped = false; + for (const ch of branch) { + if (escaped === true) { + escaped = false; + continue; + } + if (ch === "\\") { + escaped = true; + continue; + } + if (/[?*+@!()[\]{}]/.test(ch)) return false; + } + return true; + }; + const normalizeSimpleBranch = (branch) => { + let value = branch.trim(); + let changed = true; + while (changed === true) { + changed = false; + if (/^@\([^\\()[\]{}|]+\)$/.test(value)) { + value = value.slice(2, -1); + changed = true; + } + } + if (!isPlainBranch(value)) return; + return value.replace(/\\(.)/g, "$1"); + }; + const hasRepeatedCharPrefixOverlap = (branches) => { + const values = branches.map(normalizeSimpleBranch).filter(Boolean); + for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) { + const a = values[i]; + const b = values[j]; + const char = a[0]; + if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue; + if (a === b || a.startsWith(b) || b.startsWith(a)) return true; + } + return false; + }; + const parseRepeatedExtglob = (pattern, requireEnd = true) => { + if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return; + let bracket = 0; + let paren = 0; + let quote = 0; + let escaped = false; + for (let i = 1; i < pattern.length; i++) { + const ch = pattern[i]; + if (escaped === true) { + escaped = false; + continue; + } + if (ch === "\\") { + escaped = true; + continue; + } + if (ch === "\"") { + quote = quote === 1 ? 0 : 1; + continue; + } + if (quote === 1) continue; + if (ch === "[") { + bracket++; + continue; + } + if (ch === "]" && bracket > 0) { + bracket--; + continue; + } + if (bracket > 0) continue; + if (ch === "(") { + paren++; + continue; + } + if (ch === ")") { + paren--; + if (paren === 0) { + if (requireEnd === true && i !== pattern.length - 1) return; + return { + type: pattern[0], + body: pattern.slice(2, i), + end: i + }; + } + } + } + }; + const getStarExtglobSequenceOutput = (pattern) => { + let index = 0; + const chars = []; + while (index < pattern.length) { + const match = parseRepeatedExtglob(pattern.slice(index), false); + if (!match || match.type !== "*") return; + const branches = splitTopLevel(match.body).map((branch) => branch.trim()); + if (branches.length !== 1) return; + const branch = normalizeSimpleBranch(branches[0]); + if (!branch || branch.length !== 1) return; + chars.push(branch); + index += match.end + 1; + } + if (chars.length < 1) return; + return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`; + }; + const repeatedExtglobRecursion = (pattern) => { + let depth = 0; + let value = pattern.trim(); + let match = parseRepeatedExtglob(value); + while (match) { + depth++; + value = match.body.trim(); + match = parseRepeatedExtglob(value); + } + return depth; + }; + const analyzeRepeatedExtglob = (body, options) => { + if (options.maxExtglobRecursion === false) return { risky: false }; + const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION; + const branches = splitTopLevel(body).map((branch) => branch.trim()); + if (branches.length > 1) { + if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true }; + } + for (const branch of branches) { + const safeOutput = getStarExtglobSequenceOutput(branch); + if (safeOutput) return { + risky: true, + safeOutput + }; + if (repeatedExtglobRecursion(branch) > max) return { risky: true }; + } + return { risky: false }; + }; + /** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + const parse = (input, options) => { + if (typeof input !== "string") throw new TypeError("Expected a string"); + input = REPLACEMENTS[input] || input; + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + let len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + const bos = { + type: "bos", + value: "", + output: opts.prepend || "" + }; + const tokens = [bos]; + const capture = opts.capture ? "" : "?:"; + const win32 = utils.isWindows(options); + const PLATFORM_CHARS = constants.globChars(win32); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS; + const globstar = (opts) => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const nodot = opts.dot ? "" : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + if (opts.capture) star = `(${star})`; + if (typeof opts.noext === "boolean") opts.noextglob = opts.noext; + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: "", + output: "", + prefix: "", + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + input = utils.removePrefix(input, state); + len = input.length; + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + /** + * Tokenizing helpers + */ + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ""; + const remaining = () => input.slice(state.index + 1); + const consume = (value = "", num = 0) => { + state.consumed += value; + state.index += num; + }; + const append = (token) => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + const negate = () => { + let count = 1; + while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + advance(); + state.start++; + count++; + } + if (count % 2 === 0) return false; + state.negated = true; + state.start++; + return true; + }; + const increment = (type) => { + state[type]++; + stack.push(type); + }; + const decrement = (type) => { + state[type]--; + stack.pop(); + }; + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + const push = (tok) => { + if (prev.type === "globstar") { + const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); + const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); + if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = "star"; + prev.value = "*"; + prev.output = star; + state.output += prev.output; + } + } + if (extglobs.length && tok.type !== "paren") extglobs[extglobs.length - 1].inner += tok.value; + if (tok.value || tok.output) append(tok); + if (prev && prev.type === "text" && tok.type === "text") { + prev.value += tok.value; + prev.output = (prev.output || "") + tok.value; + return; + } + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + const extglobOpen = (type, value) => { + const token = { + ...EXTGLOB_CHARS[value], + conditions: 1, + inner: "" + }; + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + token.startIndex = state.index; + token.tokensIndex = tokens.length; + const output = (opts.capture ? "(" : "") + token.open; + increment("parens"); + push({ + type, + value, + output: state.output ? "" : ONE_CHAR + }); + push({ + type: "paren", + extglob: true, + value: advance(), + output + }); + extglobs.push(token); + }; + const extglobClose = (token) => { + const literal = input.slice(token.startIndex, state.index + 1); + const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts); + if ((token.type === "plus" || token.type === "star") && analysis.risky) { + const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0; + const open = tokens[token.tokensIndex]; + open.type = "text"; + open.value = literal; + open.output = safeOutput || utils.escapeRegex(literal); + for (let i = token.tokensIndex + 1; i < tokens.length; i++) { + tokens[i].value = ""; + tokens[i].output = ""; + delete tokens[i].suffix; + } + state.output = token.output + open.output; + state.backtrack = true; + push({ + type: "paren", + extglob: true, + value, + output: "" + }); + decrement("parens"); + return; + } + let output = token.close + (opts.capture ? ")" : ""); + let rest; + if (token.type === "negate") { + let extglobStar = star; + if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts); + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`; + if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) output = token.close = `)${parse(rest, { + ...options, + fastpaths: false + }).output})${extglobStar})`; + if (token.prev.type === "bos") state.negatedExtglob = true; + } + push({ + type: "paren", + extglob: true, + value, + output + }); + decrement("parens"); + }; + /** + * Fast paths + */ + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === "\\") { + backslashes = true; + return m; + } + if (first === "?") { + if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : ""); + if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); + return QMARK.repeat(chars.length); + } + if (first === ".") return DOT_LITERAL.repeat(chars.length); + if (first === "*") { + if (esc) return esc + first + (rest ? star : ""); + return star; + } + return esc ? m : `\\${m}`; + }); + if (backslashes === true) if (opts.unescape === true) output = output.replace(/\\/g, ""); + else output = output.replace(/\\+/g, (m) => { + return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; + }); + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + state.output = utils.wrapOutput(output, state, options); + return state; + } + /** + * Tokenize input until we reach end-of-string + */ + while (!eos()) { + value = advance(); + if (value === "\0") continue; + /** + * Escaped characters + */ + if (value === "\\") { + const next = peek(); + if (next === "/" && opts.bash !== true) continue; + if (next === "." || next === ";") continue; + if (!next) { + value += "\\"; + push({ + type: "text", + value + }); + continue; + } + const match = /^\\+/.exec(remaining()); + let slashes = 0; + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) value += "\\"; + } + if (opts.unescape === true) value = advance(); + else value += advance(); + if (state.brackets === 0) { + push({ + type: "text", + value + }); + continue; + } + } + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { + if (opts.posix !== false && value === ":") { + const inner = prev.value.slice(1); + if (inner.includes("[")) { + prev.posix = true; + if (inner.includes(":")) { + const idx = prev.value.lastIndexOf("["); + const pre = prev.value.slice(0, idx); + const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + if (!bos.output && tokens.indexOf(prev) === 1) bos.output = ONE_CHAR; + continue; + } + } + } + } + if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") value = `\\${value}`; + if (value === "]" && (prev.value === "[" || prev.value === "[^")) value = `\\${value}`; + if (opts.posix === true && value === "!" && prev.value === "[") value = "^"; + prev.value += value; + append({ value }); + continue; + } + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + if (state.quotes === 1 && value !== "\"") { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + /** + * Double quotes + */ + if (value === "\"") { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) push({ + type: "text", + value + }); + continue; + } + /** + * Parentheses + */ + if (value === "(") { + increment("parens"); + push({ + type: "paren", + value + }); + continue; + } + if (value === ")") { + if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "(")); + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + push({ + type: "paren", + value, + output: state.parens ? ")" : "\\)" + }); + decrement("parens"); + continue; + } + /** + * Square brackets + */ + if (value === "[") { + if (opts.nobracket === true || !remaining().includes("]")) { + if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); + value = `\\${value}`; + } else increment("brackets"); + push({ + type: "bracket", + value + }); + continue; + } + if (value === "]") { + if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { + push({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + if (state.brackets === 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "[")); + push({ + type: "text", + value, + output: `\\${value}` + }); + continue; + } + decrement("brackets"); + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) value = `/${value}`; + prev.value += value; + append({ value }); + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) continue; + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + /** + * Braces + */ + if (value === "{" && opts.nobrace !== true) { + increment("braces"); + const open = { + type: "brace", + value, + output: "(", + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + braces.push(open); + push(open); + continue; + } + if (value === "}") { + const brace = braces[braces.length - 1]; + if (opts.nobrace === true || !brace) { + push({ + type: "text", + value, + output: value + }); + continue; + } + let output = ")"; + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === "brace") break; + if (arr[i].type !== "dots") range.unshift(arr[i].value); + } + output = expandRange(range, opts); + state.backtrack = true; + } + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = "\\{"; + value = output = "\\}"; + state.output = out; + for (const t of toks) state.output += t.output || t.value; + } + push({ + type: "brace", + value, + output + }); + decrement("braces"); + braces.pop(); + continue; + } + /** + * Pipes + */ + if (value === "|") { + if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++; + push({ + type: "text", + value + }); + continue; + } + /** + * Commas + */ + if (value === ",") { + let output = value; + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === "braces") { + brace.comma = true; + output = "|"; + } + push({ + type: "comma", + value, + output + }); + continue; + } + /** + * Slashes + */ + if (value === "/") { + if (prev.type === "dot" && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ""; + state.output = ""; + tokens.pop(); + prev = bos; + continue; + } + push({ + type: "slash", + value, + output: SLASH_LITERAL + }); + continue; + } + /** + * Dots + */ + if (value === ".") { + if (state.braces > 0 && prev.type === "dot") { + if (prev.value === ".") prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = "dots"; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { + push({ + type: "text", + value, + output: DOT_LITERAL + }); + continue; + } + push({ + type: "dot", + value, + output: DOT_LITERAL + }); + continue; + } + /** + * Question marks + */ + if (value === "?") { + if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("qmark", value); + continue; + } + if (prev && prev.type === "paren") { + const next = peek(); + let output = value; + if (next === "<" && !utils.supportsLookbehinds()) throw new Error("Node.js v10 or higher is required for regex lookbehinds"); + if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`; + push({ + type: "text", + value, + output + }); + continue; + } + if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { + push({ + type: "qmark", + value, + output: QMARK_NO_DOT + }); + continue; + } + push({ + type: "qmark", + value, + output: QMARK + }); + continue; + } + /** + * Exclamation + */ + if (value === "!") { + if (opts.noextglob !== true && peek() === "(") { + if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + extglobOpen("negate", value); + continue; + } + } + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + /** + * Plus + */ + if (value === "+") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + extglobOpen("plus", value); + continue; + } + if (prev && prev.value === "(" || opts.regex === false) { + push({ + type: "plus", + value, + output: PLUS_LITERAL + }); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { + push({ + type: "plus", + value + }); + continue; + } + push({ + type: "plus", + value: PLUS_LITERAL + }); + continue; + } + /** + * Plain text + */ + if (value === "@") { + if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + push({ + type: "at", + extglob: true, + value, + output: "" + }); + continue; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Plain text + */ + if (value !== "*") { + if (value === "$" || value === "^") value = `\\${value}`; + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + push({ + type: "text", + value + }); + continue; + } + /** + * Stars + */ + if (prev && (prev.type === "globstar" || prev.star === true)) { + prev.type = "star"; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen("star", value); + continue; + } + if (prev.type === "star") { + if (opts.noglobstar === true) { + consume(value); + continue; + } + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === "slash" || prior.type === "bos"; + const afterStar = before && (before.type === "star" || before.type === "globstar"); + if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { + push({ + type: "star", + value, + output: "" + }); + continue; + } + const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); + const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); + if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { + push({ + type: "star", + value, + output: "" + }); + continue; + } + while (rest.slice(0, 3) === "/**") { + const after = input[state.index + 4]; + if (after && after !== "/") break; + rest = rest.slice(3); + consume("/**", 3); + } + if (prior.type === "bos" && eos()) { + prev.type = "globstar"; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { + const end = rest[1] !== void 0 ? "|$" : ""; + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + prev.type = "globstar"; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + state.output += prior.output + prev.output; + state.globstar = true; + consume(value + advance()); + push({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + if (prior.type === "bos" && rest[0] === "/") { + prev.type = "globstar"; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ + type: "slash", + value: "/", + output: "" + }); + continue; + } + state.output = state.output.slice(0, -prev.output.length); + prev.type = "globstar"; + prev.output = globstar(opts); + prev.value += value; + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + const token = { + type: "star", + value, + output: star + }; + if (opts.bash === true) { + token.output = ".*?"; + if (prev.type === "bos" || prev.type === "slash") token.output = nodot + token.output; + push(token); + continue; + } + if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { + token.output = value; + push(token); + continue; + } + if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { + if (prev.type === "dot") { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + } else { + state.output += nodot; + prev.output += nodot; + } + if (peek() !== "*") { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + push(token); + } + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); + state.output = utils.escapeLast(state.output, "["); + decrement("brackets"); + } + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); + state.output = utils.escapeLast(state.output, "("); + decrement("parens"); + } + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); + state.output = utils.escapeLast(state.output, "{"); + decrement("braces"); + } + if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push({ + type: "maybe_slash", + value: "", + output: `${SLASH_LITERAL}?` + }); + if (state.backtrack === true) { + state.output = ""; + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + if (token.suffix) state.output += token.suffix; + } + } + return state; + }; + /** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + input = REPLACEMENTS[input] || input; + const win32 = utils.isWindows(options); + const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(win32); + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? "" : "?:"; + const state = { + negated: false, + prefix: "" + }; + let star = opts.bash === true ? ".*?" : STAR; + if (opts.capture) star = `(${star})`; + const globstar = (opts) => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + const create = (str) => { + switch (str) { + case "*": return `${nodot}${ONE_CHAR}${star}`; + case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*.*": return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "*/*": return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + case "**": return nodot + globstar(opts); + case "**/*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + case "**/*.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + const source = create(match[1]); + if (!source) return; + return source + DOT_LITERAL + match[2]; + } + } + }; + let source = create(utils.removePrefix(input, state)); + if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`; + return source; + }; + module.exports = parse; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js +var require_picomatch$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const path$11 = __require("path"); + const scan = require_scan(); + const parse = require_parse$1(); + const utils = require_utils$3(); + const constants = require_constants$1(); + const isObject = (val) => val && typeof val === "object" && !Array.isArray(val); + /** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map((input) => picomatch(input, options, returnState)); + const arrayMatcher = (str) => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + const isState = isObject(glob) && glob.tokens && glob.input; + if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string"); + const opts = options || {}; + const posix = utils.isWindows(options); + const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); + const state = regex.state; + delete regex.state; + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { + ...options, + ignore: null, + onMatch: null, + onResult: null + }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { + glob, + posix + }); + const result = { + glob, + state, + regex, + posix, + input, + output, + match, + isMatch + }; + if (typeof opts.onResult === "function") opts.onResult(result); + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + if (isIgnored(input)) { + if (typeof opts.onIgnore === "function") opts.onIgnore(result); + result.isMatch = false; + return returnObject ? result : false; + } + if (typeof opts.onMatch === "function") opts.onMatch(result); + return returnObject ? result : true; + }; + if (returnState) matcher.state = state; + return matcher; + }; + /** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== "string") throw new TypeError("Expected input to be a string"); + if (input === "") return { + isMatch: false, + output: "" + }; + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = match && format ? format(input) : input; + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + if (match === false || opts.capture === true) if (opts.matchBase === true || opts.basename === true) match = picomatch.matchBase(input, regex, options, posix); + else match = regex.exec(output); + return { + isMatch: Boolean(match), + match, + output + }; + }; + /** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { + return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$11.basename(input)); + }; + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + /** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); + return parse(pattern, { + ...options, + fastpaths: false + }); + }; + /** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + picomatch.scan = (input, options) => scan(input, options); + /** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) return state.output; + const opts = options || {}; + const prepend = opts.contains ? "" : "^"; + const append = opts.contains ? "" : "$"; + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) source = `^(?!${source}).*$`; + const regex = picomatch.toRegex(source, options); + if (returnState === true) regex.state = state; + return regex; + }; + /** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string"); + let parsed = { + negated: false, + fastpaths: true + }; + if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse.fastpaths(input, options); + if (!parsed.output) parsed = parse(input, options); + return picomatch.compileRe(parsed, options, returnOutput, returnState); + }; + /** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } + }; + /** + * Picomatch constants. + * @return {Object} + */ + picomatch.constants = constants; + /** + * Expose "picomatch" + */ + module.exports = picomatch; +})); +//#endregion +//#region ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js +var require_picomatch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports = require_picomatch$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js +var require_micromatch = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const util = __require("util"); + const braces = require_braces(); + const picomatch = require_picomatch(); + const utils = require_utils$3(); + const isEmptyString = (v) => v === "" || v === "./"; + const hasBraces = (v) => { + const index = v.indexOf("{"); + return index > -1 && v.indexOf("}", index) > -1; + }; + /** + * Returns an array of strings that match one or more glob patterns. + * + * ```js + * const mm = require('micromatch'); + * // mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {String|Array} `list` List of strings to match. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) + * @return {Array} Returns an array of matches + * @summary false + * @api public + */ + const micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); + let omit = /* @__PURE__ */ new Set(); + let keep = /* @__PURE__ */ new Set(); + let items = /* @__PURE__ */ new Set(); + let negatives = 0; + let onResult = (state) => { + items.add(state.output); + if (options && options.onResult) options.onResult(state); + }; + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { + ...options, + onResult + }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) negatives++; + for (let item of list) { + let matched = isMatch(item, true); + if (!(negated ? !matched.isMatch : matched.isMatch)) continue; + if (negated) omit.add(matched.output); + else { + omit.delete(matched.output); + keep.add(matched.output); + } + } + } + let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item)); + if (options && matches.length === 0) { + if (options.failglob === true) throw new Error(`No matches found for "${patterns.join(", ")}"`); + if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; + } + return matches; + }; + /** + * Backwards compatibility + */ + micromatch.match = micromatch; + /** + * Returns a matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * const mm = require('micromatch'); + * // mm.matcher(pattern[, options]); + * + * const isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` + * @return {Function} Returns a matcher function. + * @api public + */ + micromatch.matcher = (pattern, options) => picomatch(pattern, options); + /** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const mm = require('micromatch'); + * // mm.isMatch(string, patterns[, options]); + * + * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(mm.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `[options]` See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + /** + * Backwards compatibility + */ + micromatch.any = micromatch.isMatch; + /** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = /* @__PURE__ */ new Set(); + let items = []; + let onResult = (state) => { + if (options.onResult) options.onResult(state); + items.push(state.output); + }; + let matches = new Set(micromatch(list, patterns, { + ...options, + onResult + })); + for (let item of items) if (!matches.has(item)) result.add(item); + return [...result]; + }; + /** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * // mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any of the patterns matches any part of `str`. + * @api public + */ + micromatch.contains = (str, pattern, options) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + if (Array.isArray(pattern)) return pattern.some((p) => micromatch.contains(str, p, options)); + if (typeof pattern === "string") { + if (isEmptyString(str) || isEmptyString(pattern)) return false; + if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) return true; + } + return micromatch.isMatch(str, pattern, { + ...options, + contains: true + }); + }; + /** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * const mm = require('micromatch'); + * // mm.matchKeys(object, patterns[, options]); + * + * const obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) throw new TypeError("Expected the first argument to be an object"); + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) res[key] = obj[key]; + return res; + }; + /** + * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` + * @api public + */ + micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some((item) => isMatch(item))) return true; + } + return false; + }; + /** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` + * @api public + */ + micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every((item) => isMatch(item))) return false; + } + return true; + }; + /** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * const mm = require('micromatch'); + * // mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + micromatch.all = (str, patterns, options) => { + if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + return [].concat(patterns).every((p) => picomatch(p, options)(str)); + }; + /** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * const mm = require('micromatch'); + * // mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `glob` Glob pattern to use for matching. + * @param {String} `input` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. + * @api public + */ + micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let match = picomatch.makeRe(String(glob), { + ...options, + capture: true + }).exec(posix ? utils.toPosixSlashes(input) : input); + if (match) return match.slice(1).map((v) => v === void 0 ? "" : v); + }; + /** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * const mm = require('micromatch'); + * // mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + micromatch.makeRe = (...args) => picomatch.makeRe(...args); + /** + * Scan a glob pattern to separate the pattern into segments. Used + * by the [split](#split) method. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.scan(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + micromatch.scan = (...args) => picomatch.scan(...args); + /** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.parse(pattern[, options]); + * ``` + * @param {String} `glob` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as regex source string. + * @api public + */ + micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) for (let str of braces(String(pattern), options)) res.push(picomatch.parse(str, options)); + return res; + }; + /** + * Process the given brace `pattern`. + * + * ```js + * const { braces } = require('micromatch'); + * console.log(braces('foo/{a,b,c}/bar')); + * //=> [ 'foo/(a|b|c)/bar' ] + * + * console.log(braces('foo/{a,b,c}/bar', { expand: true })); + * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] + * ``` + * @param {String} `pattern` String with brace pattern to process. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + micromatch.braces = (pattern, options) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + if (options && options.nobrace === true || !hasBraces(pattern)) return [pattern]; + return braces(pattern, options); + }; + /** + * Expand braces + */ + micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== "string") throw new TypeError("Expected a string"); + return micromatch.braces(pattern, { + ...options, + expand: true + }); + }; + /** + * Expose micromatch + */ + micromatch.hasBraces = hasBraces; + module.exports = micromatch; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js +var require_pattern = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; + const path$10 = __require("path"); + const globParent = require_glob_parent(); + const micromatch = require_micromatch(); + const GLOBSTAR = "**"; + const ESCAPE_SYMBOL = "\\"; + const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; + const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; + const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; + const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; + const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; + /** + * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. + * The latter is due to the presence of the device path at the beginning of the UNC path. + */ + const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; + function isStaticPattern(pattern, options = {}) { + return !isDynamicPattern(pattern, options); + } + exports.isStaticPattern = isStaticPattern; + function isDynamicPattern(pattern, options = {}) { + /** + * A special case with an empty string is necessary for matching patterns that start with a forward slash. + * An empty string cannot be a dynamic pattern. + * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. + */ + if (pattern === "") return false; + /** + * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check + * filepath directly (without read directory). + */ + if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) return true; + if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) return true; + if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) return true; + if (options.braceExpansion !== false && hasBraceExpansion(pattern)) return true; + return false; + } + exports.isDynamicPattern = isDynamicPattern; + function hasBraceExpansion(pattern) { + const openingBraceIndex = pattern.indexOf("{"); + if (openingBraceIndex === -1) return false; + const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); + if (closingBraceIndex === -1) return false; + const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); + return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); + } + function convertToPositivePattern(pattern) { + return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + } + exports.convertToPositivePattern = convertToPositivePattern; + function convertToNegativePattern(pattern) { + return "!" + pattern; + } + exports.convertToNegativePattern = convertToNegativePattern; + function isNegativePattern(pattern) { + return pattern.startsWith("!") && pattern[1] !== "("; + } + exports.isNegativePattern = isNegativePattern; + function isPositivePattern(pattern) { + return !isNegativePattern(pattern); + } + exports.isPositivePattern = isPositivePattern; + function getNegativePatterns(patterns) { + return patterns.filter(isNegativePattern); + } + exports.getNegativePatterns = getNegativePatterns; + function getPositivePatterns(patterns) { + return patterns.filter(isPositivePattern); + } + exports.getPositivePatterns = getPositivePatterns; + /** + * Returns patterns that can be applied inside the current directory. + * + * @example + * // ['./*', '*', 'a/*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ + function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); + } + exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; + /** + * Returns patterns to be expanded relative to (outside) the current directory. + * + * @example + * // ['../*', './../*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ + function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); + } + exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; + function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith("..") || pattern.startsWith("./.."); + } + exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; + function getBaseDirectory(pattern) { + return globParent(pattern, { flipBackslashes: false }); + } + exports.getBaseDirectory = getBaseDirectory; + function hasGlobStar(pattern) { + return pattern.includes(GLOBSTAR); + } + exports.hasGlobStar = hasGlobStar; + function endsWithSlashGlobStar(pattern) { + return pattern.endsWith("/**"); + } + exports.endsWithSlashGlobStar = endsWithSlashGlobStar; + function isAffectDepthOfReadingPattern(pattern) { + const basename = path$10.basename(pattern); + return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); + } + exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; + function expandPatternsWithBraceExpansion(patterns) { + return patterns.reduce((collection, pattern) => { + return collection.concat(expandBraceExpansion(pattern)); + }, []); + } + exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; + function expandBraceExpansion(pattern) { + const patterns = micromatch.braces(pattern, { + expand: true, + nodupes: true, + keepEscaping: true + }); + /** + * Sort the patterns by length so that the same depth patterns are processed side by side. + * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` + */ + patterns.sort((a, b) => a.length - b.length); + /** + * Micromatch can return an empty string in the case of patterns like `{a,}`. + */ + return patterns.filter((pattern) => pattern !== ""); + } + exports.expandBraceExpansion = expandBraceExpansion; + function getPatternParts(pattern, options) { + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + /** + * The scan method returns an empty array in some cases. + * See micromatch/picomatch#58 for more details. + */ + if (parts.length === 0) parts = [pattern]; + /** + * The scan method does not return an empty part for the pattern with a forward slash. + * This is another part of micromatch/picomatch#58. + */ + if (parts[0].startsWith("/")) { + parts[0] = parts[0].slice(1); + parts.unshift(""); + } + return parts; + } + exports.getPatternParts = getPatternParts; + function makeRe(pattern, options) { + return micromatch.makeRe(pattern, options); + } + exports.makeRe = makeRe; + function convertPatternsToRe(patterns, options) { + return patterns.map((pattern) => makeRe(pattern, options)); + } + exports.convertPatternsToRe = convertPatternsToRe; + function matchAny(entry, patternsRe) { + return patternsRe.some((patternRe) => patternRe.test(entry)); + } + exports.matchAny = matchAny; + /** + * This package only works with forward slashes as a path separator. + * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. + */ + function removeDuplicateSlashes(pattern) { + return pattern.replace(DOUBLE_SLASH_RE, "/"); + } + exports.removeDuplicateSlashes = removeDuplicateSlashes; + function partitionAbsoluteAndRelative(patterns) { + const absolute = []; + const relative = []; + for (const pattern of patterns) if (isAbsolute(pattern)) absolute.push(pattern); + else relative.push(pattern); + return [absolute, relative]; + } + exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; + function isAbsolute(pattern) { + return path$10.isAbsolute(pattern); + } + exports.isAbsolute = isAbsolute; +})); +//#endregion +//#region ../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js +var require_merge2 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const PassThrough = __require("stream").PassThrough; + const slice = Array.prototype.slice; + module.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) args.pop(); + else options = {}; + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) options.objectMode = true; + if (options.highWaterMark == null) options.highWaterMark = 64 * 1024; + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) streamsQueue.push(pauseStreams(arguments[i], options)); + mergeStream(); + return this; + } + function mergeStream() { + if (merging) return; + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream); + return; + } + if (!Array.isArray(streams)) streams = [streams]; + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) return; + merging = false; + mergeStream(); + } + function pipe(stream) { + function onend() { + stream.removeListener("merge2UnpipeEnd", onend); + stream.removeListener("end", onend); + if (doPipeError) stream.removeListener("error", onerror); + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream._readableState.endEmitted) return next(); + stream.on("merge2UnpipeEnd", onend); + stream.on("end", onend); + if (doPipeError) stream.on("error", onerror); + stream.pipe(mergedStream, { end: false }); + stream.resume(); + } + for (let i = 0; i < streams.length; i++) pipe(streams[i]); + next(); + } + function endStream() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) mergedStream.end(); + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream) { + stream.emit("merge2UnpipeEnd"); + }); + if (args.length) addStream.apply(null, args); + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options)); + if (!streams._readableState || !streams.pause || !streams.pipe) throw new Error("Only readable stream can be merged."); + streams.pause(); + } else for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options); + return streams; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js +var require_stream$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.merge = void 0; + const merge2 = require_merge2(); + function merge(streams) { + const mergedStream = merge2(streams); + streams.forEach((stream) => { + stream.once("error", (error) => mergedStream.emit("error", error)); + }); + mergedStream.once("close", () => propagateCloseEventToSources(streams)); + mergedStream.once("end", () => propagateCloseEventToSources(streams)); + return mergedStream; + } + exports.merge = merge; + function propagateCloseEventToSources(streams) { + streams.forEach((stream) => stream.emit("close")); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js +var require_string = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isEmpty = exports.isString = void 0; + function isString(input) { + return typeof input === "string"; + } + exports.isString = isString; + function isEmpty(input) { + return input === ""; + } + exports.isEmpty = isEmpty; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js +var require_utils$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; + exports.array = require_array(); + exports.errno = require_errno(); + exports.fs = require_fs$3(); + exports.path = require_path(); + exports.pattern = require_pattern(); + exports.stream = require_stream$3(); + exports.string = require_string(); +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js +var require_tasks = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; + const utils = require_utils$2(); + function generate(input, settings) { + const patterns = processPatterns(input, settings); + const ignore = processPatterns(settings.ignore, settings); + const positivePatterns = getPositivePatterns(patterns); + const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); + const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); + const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); + const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, false); + const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, true); + return staticTasks.concat(dynamicTasks); + } + exports.generate = generate; + function processPatterns(input, settings) { + let patterns = input; + /** + * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry + * and some problems with the micromatch package (see fast-glob issues: #365, #394). + * + * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown + * in matching in the case of a large set of patterns after expansion. + */ + if (settings.braceExpansion) patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); + /** + * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used + * at any nesting level. + * + * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change + * the pattern in the filter before creating a regular expression. There is no need to change the patterns + * in the application. Only on the input. + */ + if (settings.baseNameMatch) patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); + /** + * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. + */ + return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); + } + /** + * Returns tasks grouped by basic pattern directories. + * + * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. + * This is necessary because directory traversal starts at the base directory and goes deeper. + */ + function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + if ("." in insideCurrentDirectoryGroup) tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); + else tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + return tasks; + } + exports.convertPatternsToTasks = convertPatternsToTasks; + function getPositivePatterns(patterns) { + return utils.pattern.getPositivePatterns(patterns); + } + exports.getPositivePatterns = getPositivePatterns; + function getNegativePatternsAsPositive(patterns, ignore) { + return utils.pattern.getNegativePatterns(patterns).concat(ignore).map(utils.pattern.convertToPositivePattern); + } + exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; + function groupPatternsByBaseDirectory(patterns) { + return patterns.reduce((collection, pattern) => { + const base = utils.pattern.getBaseDirectory(pattern); + if (base in collection) collection[base].push(pattern); + else collection[base] = [pattern]; + return collection; + }, {}); + } + exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; + function convertPatternGroupsToTasks(positive, negative, dynamic) { + return Object.keys(positive).map((base) => { + return convertPatternGroupToTask(base, positive[base], negative, dynamic); + }); + } + exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; + function convertPatternGroupToTask(base, positive, negative, dynamic) { + return { + dynamic, + positive, + negative, + base, + patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) + }; + } + exports.convertPatternGroupToTask = convertPatternGroupToTask; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js +var require_async$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; + callSuccessCallback(callback, stat); + }); + }); + } + exports.read = read; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js +var require_sync$5 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.read = void 0; + function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat; + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; + return stat; + } catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) return lstat; + throw error; + } + } + exports.read = read; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js +var require_fs$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + const fs$6 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs$6.lstat, + stat: fs$6.stat, + lstatSync: fs$6.lstatSync, + statSync: fs$6.statSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js +var require_settings$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fs = require_fs$2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js +var require_out$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.statSync = exports.stat = exports.Settings = void 0; + const async = require_async$5(); + const sync = require_sync$5(); + const settings_1 = require_settings$3(); + exports.Settings = settings_1.default; + function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.stat = stat; + function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports.statSync = statSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js +var require_queue_microtask = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! queue-microtask. MIT License. Feross Aboukhadijeh */ + let promise; + module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { + throw err; + }, 0)); +})); +//#endregion +//#region ../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js +var require_run_parallel = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + /*! run-parallel. MIT License. Feross Aboukhadijeh */ + module.exports = runParallel; + const queueMicrotask = require_queue_microtask(); + function runParallel(tasks, cb) { + let results, pending, keys; + let isSync = true; + if (Array.isArray(tasks)) { + results = []; + pending = tasks.length; + } else { + keys = Object.keys(tasks); + results = {}; + pending = keys.length; + } + function done(err) { + function end() { + if (cb) cb(err, results); + cb = null; + } + if (isSync) queueMicrotask(end); + else end(); + } + function each(i, err, result) { + results[i] = result; + if (--pending === 0 || err) done(err); + } + if (!pending) done(null); + else if (keys) keys.forEach(function(key) { + tasks[key](function(err, result) { + each(key, err, result); + }); + }); + else tasks.forEach(function(task, i) { + task(function(err, result) { + each(i, err, result); + }); + }); + isSync = false; + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js +var require_constants = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; + const NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); + if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); + const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); + const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); + const SUPPORTED_MAJOR_VERSION = 10; + /** + * IS `true` for Node.js 10.10 and greater. + */ + exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION || MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= 10; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js +var require_fs$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createDirentFromStats = void 0; + var DirentFromStats = class { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } + }; + function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); + } + exports.createDirentFromStats = createDirentFromStats; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js +var require_utils$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.fs = void 0; + exports.fs = require_fs$1(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js +var require_common$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = void 0; + function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js +var require_async$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + const fsStat = require_out$3(); + const rpl = require_run_parallel(); + const constants_1 = require_constants(); + const utils = require_utils$1(); + const common = require_common$2(); + function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); + } + exports.read = read; + function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + rpl(entries.map((entry) => makeRplTaskEntry(entry, settings)), (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; + } + function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + rpl(names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + done(null, entry); + }); + }; + }), (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); + } + exports.readdir = readdir; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, result) { + callback(null, result); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js +var require_sync$4 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; + const fsStat = require_out$3(); + const constants_1 = require_constants(); + const utils = require_utils$1(); + const common = require_common$2(); + function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return readdirWithFileTypes(directory, settings); + return readdir(directory, settings); + } + exports.read = read; + function readdirWithFileTypes(directory, settings) { + return settings.fs.readdirSync(directory, { withFileTypes: true }).map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) throw error; + } + return entry; + }); + } + exports.readdirWithFileTypes = readdirWithFileTypes; + function readdir(directory, settings) { + return settings.fs.readdirSync(directory).map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) entry.stats = stats; + return entry; + }); + } + exports.readdir = readdir; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +var require_fs = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; + const fs$5 = __require("fs"); + exports.FILE_SYSTEM_ADAPTER = { + lstat: fs$5.lstat, + stat: fs$5.stat, + lstatSync: fs$5.lstatSync, + statSync: fs$5.statSync, + readdir: fs$5.readdir, + readdirSync: fs$5.readdirSync + }; + function createFileSystemAdapter(fsMethods) { + if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); + } + exports.createFileSystemAdapter = createFileSystemAdapter; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js +var require_settings$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$9 = __require("path"); + const fsStat = require_out$3(); + const fs = require_fs(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$9.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js +var require_out$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.scandirSync = exports.scandir = void 0; + const async = require_async$4(); + const sync = require_sync$4(); + const settings_1 = require_settings$2(); + exports.Settings = settings_1.default; + function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); + } + exports.scandir = scandir; + function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); + } + exports.scandirSync = scandirSync; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js +var require_reusify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + function reusify(Constructor) { + var head = new Constructor(); + var tail = head; + function get() { + var current = head; + if (current.next) head = current.next; + else { + head = new Constructor(); + tail = head; + } + current.next = null; + return current; + } + function release(obj) { + tail.next = obj; + tail = obj; + } + return { + get, + release + }; + } + module.exports = reusify; +})); +//#endregion +//#region ../../node_modules/.pnpm/fastq@1.20.1/node_modules/fastq/queue.js +var require_queue = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var reusify = require_reusify(); + function fastqueue(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + if (!(_concurrency >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + var cache = reusify(Task); + var queueHead = null; + var queueTail = null; + var _running = 0; + var errorHandler = null; + var self = { + push, + drain: noop, + saturated: noop, + pause, + paused: false, + get concurrency() { + return _concurrency; + }, + set concurrency(value) { + if (!(value >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); + _concurrency = value; + if (self.paused) return; + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + }, + running, + resume, + idle, + length, + getQueue, + unshift, + empty: noop, + kill, + killAndDrain, + error, + abort + }; + return self; + function running() { + return _running; + } + function pause() { + self.paused = true; + } + function length() { + var current = queueHead; + var counter = 0; + while (current) { + current = current.next; + counter++; + } + return counter; + } + function getQueue() { + var current = queueHead; + var tasks = []; + while (current) { + tasks.push(current.value); + current = current.next; + } + return tasks; + } + function resume() { + if (!self.paused) return; + self.paused = false; + if (queueHead === null) { + _running++; + release(); + return; + } + for (; queueHead && _running < _concurrency;) { + _running++; + release(); + } + } + function idle() { + return _running === 0 && self.length() === 0; + } + function push(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueTail) { + queueTail.next = current; + queueTail = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function unshift(value, done) { + var current = cache.get(); + current.context = context; + current.release = release; + current.value = value; + current.callback = done || noop; + current.errorHandler = errorHandler; + if (_running >= _concurrency || self.paused) if (queueHead) { + current.next = queueHead; + queueHead = current; + } else { + queueHead = current; + queueTail = current; + self.saturated(); + } + else { + _running++; + worker.call(context, current.value, current.worked); + } + } + function release(holder) { + if (holder) cache.release(holder); + var next = queueHead; + if (next && _running <= _concurrency) if (!self.paused) { + if (queueTail === queueHead) queueTail = null; + queueHead = next.next; + next.next = null; + worker.call(context, next.value, next.worked); + if (queueTail === null) self.empty(); + } else _running--; + else if (--_running === 0) self.drain(); + } + function kill() { + queueHead = null; + queueTail = null; + self.drain = noop; + } + function killAndDrain() { + queueHead = null; + queueTail = null; + self.drain(); + self.drain = noop; + } + function abort() { + var current = queueHead; + queueHead = null; + queueTail = null; + while (current) { + var next = current.next; + var callback = current.callback; + var errorHandler = current.errorHandler; + var val = current.value; + var context = current.context; + current.value = null; + current.callback = noop; + current.errorHandler = null; + if (errorHandler) errorHandler(/* @__PURE__ */ new Error("abort"), val); + callback.call(context, /* @__PURE__ */ new Error("abort")); + current.release(current); + current = next; + } + self.drain = noop; + } + function error(handler) { + errorHandler = handler; + } + } + function noop() {} + function Task() { + this.value = null; + this.callback = noop; + this.next = null; + this.release = noop; + this.context = null; + this.errorHandler = null; + var self = this; + this.worked = function worked(err, result) { + var callback = self.callback; + var errorHandler = self.errorHandler; + var val = self.value; + self.value = null; + self.callback = noop; + if (self.errorHandler) errorHandler(err, val); + callback.call(self.context, err, result); + self.release(self); + }; + } + function queueAsPromised(context, worker, _concurrency) { + if (typeof context === "function") { + _concurrency = worker; + worker = context; + context = null; + } + function asyncWrapper(arg, cb) { + worker.call(this, arg).then(function(res) { + cb(null, res); + }, cb); + } + var queue = fastqueue(context, asyncWrapper, _concurrency); + var pushCb = queue.push; + var unshiftCb = queue.unshift; + queue.push = push; + queue.unshift = unshift; + queue.drained = drained; + return queue; + function push(value) { + var p = new Promise(function(resolve, reject) { + pushCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function unshift(value) { + var p = new Promise(function(resolve, reject) { + unshiftCb(value, function(err, result) { + if (err) { + reject(err); + return; + } + resolve(result); + }); + }); + p.catch(noop); + return p; + } + function drained() { + return new Promise(function(resolve) { + process.nextTick(function() { + if (queue.idle()) resolve(); + else { + var previousDrain = queue.drain; + queue.drain = function() { + if (typeof previousDrain === "function") previousDrain(); + resolve(); + queue.drain = previousDrain; + }; + } + }); + }); + } + } + module.exports = fastqueue; + module.exports.promise = queueAsPromised; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js +var require_common$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; + function isFatalError(settings, error) { + if (settings.errorFilter === null) return true; + return !settings.errorFilter(error); + } + exports.isFatalError = isFatalError; + function isAppliedFilter(filter, value) { + return filter === null || filter(value); + } + exports.isAppliedFilter = isAppliedFilter; + function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); + } + exports.replacePathSegmentSeparator = replacePathSegmentSeparator; + function joinPathSegments(a, b, separator) { + if (a === "") return b; + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) return a + b; + return a + separator + b; + } + exports.joinPathSegments = joinPathSegments; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js +var require_reader$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const common = require_common$1(); + var Reader = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } + }; + exports.default = Reader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js +var require_async$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const events_1 = __require("events"); + const fsScandir = require_out$2(); + const fastq = require_queue(); + const common = require_common$1(); + const reader_1 = require_reader$1(); + var AsyncReader = class extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) this._emitter.emit("end"); + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) throw new Error("The reader is already destroyed"); + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on("entry", callback); + } + onError(callback) { + this._emitter.once("error", callback); + } + onEnd(callback) { + this._emitter.once("end", callback); + } + _pushToQueue(directory, base) { + const queueItem = { + directory, + base + }; + this._queue.push(queueItem, (error) => { + if (error !== null) this._handleError(error); + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, void 0); + return; + } + for (const entry of entries) this._handleEntry(entry, item.base); + done(null, void 0); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) return; + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit("error", error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) return; + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._emitEntry(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _emitEntry(entry) { + this._emitter.emit("entry", entry); + } + }; + exports.default = AsyncReader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js +var require_async$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const async_1 = require_async$3(); + var AsyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } + }; + exports.default = AsyncProvider; + function callFailureCallback(callback, error) { + callback(error); + } + function callSuccessCallback(callback, entries) { + callback(null, entries); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js +var require_stream$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1$2 = __require("stream"); + const async_1 = require_async$3(); + var StreamProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1$2.Readable({ + objectMode: true, + read: () => {}, + destroy: () => { + if (!this._reader.isDestroyed) this._reader.destroy(); + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit("error", error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } + }; + exports.default = StreamProvider; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js +var require_sync$3 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsScandir = require_out$2(); + const common = require_common$1(); + const reader_1 = require_reader$1(); + var SyncReader = class extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = /* @__PURE__ */ new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ + directory, + base + }); + } + _handleQueue() { + for (const item of this._queue.values()) this._handleDirectory(item.directory, item.base); + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) this._handleEntry(entry, base); + } catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) return; + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + if (common.isAppliedFilter(this._settings.entryFilter, entry)) this._pushToStorage(entry); + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); + } + _pushToStorage(entry) { + this._storage.push(entry); + } + }; + exports.default = SyncReader; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js +var require_sync$2 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const sync_1 = require_sync$3(); + var SyncProvider = class { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } + }; + exports.default = SyncProvider; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js +var require_settings$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$8 = __require("path"); + const fsScandir = require_out$2(); + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, void 0); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js +var require_out$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; + const async_1 = require_async$2(); + const stream_1 = require_stream$2(); + const sync_1 = require_sync$2(); + const settings_1 = require_settings$1(); + exports.Settings = settings_1.default; + function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === "function") { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); + } + exports.walk = walk; + function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new sync_1.default(directory, settings).read(); + } + exports.walkSync = walkSync; + function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return new stream_1.default(directory, settings).read(); + } + exports.walkStream = walkStream; + function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) return settingsOrOptions; + return new settings_1.default(settingsOrOptions); + } +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js +var require_reader = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$7 = __require("path"); + const fsStat = require_out$3(); + const utils = require_utils$2(); + var Reader = class { + constructor(_settings) { + this._settings = _settings; + this._fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this._settings.followSymbolicLinks, + fs: this._settings.fs, + throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks + }); + } + _getFullEntryPath(filepath) { + return path$7.resolve(this._settings.cwd, filepath); + } + _makeEntry(stats, pattern) { + const entry = { + name: pattern, + path: pattern, + dirent: utils.fs.createDirentFromStats(pattern, stats) + }; + if (this._settings.stats) entry.stats = stats; + return entry; + } + _isFatalError(error) { + return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; + } + }; + exports.default = Reader; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js +var require_stream$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1$1 = __require("stream"); + const fsStat = require_out$3(); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + var ReaderStream = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkStream = fsWalk.walkStream; + this._stat = fsStat.stat; + } + dynamic(root, options) { + return this._walkStream(root, options); + } + static(patterns, options) { + const filepaths = patterns.map(this._getFullEntryPath, this); + const stream = new stream_1$1.PassThrough({ objectMode: true }); + stream._write = (index, _enc, done) => { + return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { + if (entry !== null && options.entryFilter(entry)) stream.push(entry); + if (index === filepaths.length - 1) stream.end(); + done(); + }).catch(done); + }; + for (let i = 0; i < filepaths.length; i++) stream.write(i); + return stream; + } + _getEntry(filepath, pattern, options) { + return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error) => { + if (options.errorFilter(error)) return null; + throw error; + }); + } + _getStat(filepath) { + return new Promise((resolve, reject) => { + this._stat(filepath, this._fsStatSettings, (error, stats) => { + return error === null ? resolve(stats) : reject(error); + }); + }); + } + }; + exports.default = ReaderStream; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js +var require_async$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + const stream_1 = require_stream$1(); + var ReaderAsync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkAsync = fsWalk.walk; + this._readerStream = new stream_1.default(this._settings); + } + dynamic(root, options) { + return new Promise((resolve, reject) => { + this._walkAsync(root, options, (error, entries) => { + if (error === null) resolve(entries); + else reject(error); + }); + }); + } + async static(patterns, options) { + const entries = []; + const stream = this._readerStream.static(patterns, options); + return new Promise((resolve, reject) => { + stream.once("error", reject); + stream.on("data", (entry) => entries.push(entry)); + stream.once("end", () => resolve(entries)); + }); + } + }; + exports.default = ReaderAsync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js +var require_matcher = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$2(); + var Matcher = class { + constructor(_patterns, _settings, _micromatchOptions) { + this._patterns = _patterns; + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this._storage = []; + this._fillStorage(); + } + _fillStorage() { + for (const pattern of this._patterns) { + const segments = this._getPatternSegments(pattern); + const sections = this._splitSegmentsIntoSections(segments); + this._storage.push({ + complete: sections.length <= 1, + pattern, + segments, + sections + }); + } + } + _getPatternSegments(pattern) { + return utils.pattern.getPatternParts(pattern, this._micromatchOptions).map((part) => { + if (!utils.pattern.isDynamicPattern(part, this._settings)) return { + dynamic: false, + pattern: part + }; + return { + dynamic: true, + pattern: part, + patternRe: utils.pattern.makeRe(part, this._micromatchOptions) + }; + }); + } + _splitSegmentsIntoSections(segments) { + return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); + } + }; + exports.default = Matcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js +var require_partial = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const matcher_1 = require_matcher(); + var PartialMatcher = class extends matcher_1.default { + match(filepath) { + const parts = filepath.split("/"); + const levels = parts.length; + const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); + for (const pattern of patterns) { + const section = pattern.sections[0]; + /** + * In this case, the pattern has a globstar and we must read all directories unconditionally, + * but only if the level has reached the end of the first group. + * + * fixtures/{a,b}/** + * ^ true/false ^ always true + */ + if (!pattern.complete && levels > section.length) return true; + if (parts.every((part, index) => { + const segment = pattern.segments[index]; + if (segment.dynamic && segment.patternRe.test(part)) return true; + if (!segment.dynamic && segment.pattern === part) return true; + return false; + })) return true; + } + return false; + } + }; + exports.default = PartialMatcher; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js +var require_deep = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$2(); + const partial_1 = require_partial(); + var DeepFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + } + getFilter(basePath, positive, negative) { + const matcher = this._getMatcher(positive); + const negativeRe = this._getNegativePatternsRe(negative); + return (entry) => this._filter(basePath, entry, matcher, negativeRe); + } + _getMatcher(patterns) { + return new partial_1.default(patterns, this._settings, this._micromatchOptions); + } + _getNegativePatternsRe(patterns) { + const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); + return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); + } + _filter(basePath, entry, matcher, negativeRe) { + if (this._isSkippedByDeep(basePath, entry.path)) return false; + if (this._isSkippedSymbolicLink(entry)) return false; + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._isSkippedByPositivePatterns(filepath, matcher)) return false; + return this._isSkippedByNegativePatterns(filepath, negativeRe); + } + _isSkippedByDeep(basePath, entryPath) { + /** + * Avoid unnecessary depth calculations when it doesn't matter. + */ + if (this._settings.deep === Infinity) return false; + return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; + } + _getEntryLevel(basePath, entryPath) { + const entryPathDepth = entryPath.split("/").length; + if (basePath === "") return entryPathDepth; + return entryPathDepth - basePath.split("/").length; + } + _isSkippedSymbolicLink(entry) { + return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); + } + _isSkippedByPositivePatterns(entryPath, matcher) { + return !this._settings.baseNameMatch && !matcher.match(entryPath); + } + _isSkippedByNegativePatterns(entryPath, patternsRe) { + return !utils.pattern.matchAny(entryPath, patternsRe); + } + }; + exports.default = DeepFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js +var require_entry$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$2(); + var EntryFilter = class { + constructor(_settings, _micromatchOptions) { + this._settings = _settings; + this._micromatchOptions = _micromatchOptions; + this.index = /* @__PURE__ */ new Map(); + } + getFilter(positive, negative) { + const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); + const patterns = { + positive: { all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) }, + negative: { + absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), + relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) + } + }; + return (entry) => this._filter(entry, patterns); + } + _filter(entry, patterns) { + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._settings.unique && this._isDuplicateEntry(filepath)) return false; + if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) return false; + const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); + if (this._settings.unique && isMatched) this._createIndexRecord(filepath); + return isMatched; + } + _isDuplicateEntry(filepath) { + return this.index.has(filepath); + } + _createIndexRecord(filepath) { + this.index.set(filepath, void 0); + } + _onlyFileFilter(entry) { + return this._settings.onlyFiles && !entry.dirent.isFile(); + } + _onlyDirectoryFilter(entry) { + return this._settings.onlyDirectories && !entry.dirent.isDirectory(); + } + _isMatchToPatternsSet(filepath, patterns, isDirectory) { + if (!this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory)) return false; + if (this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory)) return false; + if (this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory)) return false; + return true; + } + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) return false; + const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + } + _isMatchToPatterns(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) return false; + const isMatched = utils.pattern.matchAny(filepath, patternsRe); + if (!isMatched && isDirectory) return utils.pattern.matchAny(filepath + "/", patternsRe); + return isMatched; + } + }; + exports.default = EntryFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js +var require_error = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$2(); + var ErrorFilter = class { + constructor(_settings) { + this._settings = _settings; + } + getFilter() { + return (error) => this._isNonFatalError(error); + } + _isNonFatalError(error) { + return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; + } + }; + exports.default = ErrorFilter; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js +var require_entry = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const utils = require_utils$2(); + var EntryTransformer = class { + constructor(_settings) { + this._settings = _settings; + } + getTransformer() { + return (entry) => this._transform(entry); + } + _transform(entry) { + let filepath = entry.path; + if (this._settings.absolute) { + filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); + filepath = utils.path.unixify(filepath); + } + if (this._settings.markDirectories && entry.dirent.isDirectory()) filepath += "/"; + if (!this._settings.objectMode) return filepath; + return Object.assign(Object.assign({}, entry), { path: filepath }); + } + }; + exports.default = EntryTransformer; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js +var require_provider = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const path$6 = __require("path"); + const deep_1 = require_deep(); + const entry_1 = require_entry$1(); + const error_1 = require_error(); + const entry_2 = require_entry(); + var Provider = class { + constructor(_settings) { + this._settings = _settings; + this.errorFilter = new error_1.default(this._settings); + this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); + this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); + this.entryTransformer = new entry_2.default(this._settings); + } + _getRootDirectory(task) { + return path$6.resolve(this._settings.cwd, task.base); + } + _getReaderOptions(task) { + const basePath = task.base === "." ? "" : task.base; + return { + basePath, + pathSegmentSeparator: "/", + concurrency: this._settings.concurrency, + deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), + entryFilter: this.entryFilter.getFilter(task.positive, task.negative), + errorFilter: this.errorFilter.getFilter(), + followSymbolicLinks: this._settings.followSymbolicLinks, + fs: this._settings.fs, + stats: this._settings.stats, + throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, + transform: this.entryTransformer.getTransformer() + }; + } + _getMicromatchOptions() { + return { + dot: this._settings.dot, + matchBase: this._settings.baseNameMatch, + nobrace: !this._settings.braceExpansion, + nocase: !this._settings.caseSensitiveMatch, + noext: !this._settings.extglob, + noglobstar: !this._settings.globstar, + posix: true, + strictSlashes: false + }; + } + }; + exports.default = Provider; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js +var require_async = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const async_1 = require_async$1(); + const provider_1 = require_provider(); + var ProviderAsync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new async_1.default(this._settings); + } + async read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + return (await this.api(root, task, options)).map((entry) => options.transform(entry)); + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderAsync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js +var require_stream = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const stream_1 = __require("stream"); + const stream_2 = require_stream$1(); + const provider_1 = require_provider(); + var ProviderStream = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new stream_2.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + const source = this.api(root, task, options); + const destination = new stream_1.Readable({ + objectMode: true, + read: () => {} + }); + source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source.destroy()); + return destination; + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderStream; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js +var require_sync$1 = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const fsStat = require_out$3(); + const fsWalk = require_out$1(); + const reader_1 = require_reader(); + var ReaderSync = class extends reader_1.default { + constructor() { + super(...arguments); + this._walkSync = fsWalk.walkSync; + this._statSync = fsStat.statSync; + } + dynamic(root, options) { + return this._walkSync(root, options); + } + static(patterns, options) { + const entries = []; + for (const pattern of patterns) { + const filepath = this._getFullEntryPath(pattern); + const entry = this._getEntry(filepath, pattern, options); + if (entry === null || !options.entryFilter(entry)) continue; + entries.push(entry); + } + return entries; + } + _getEntry(filepath, pattern, options) { + try { + const stats = this._getStat(filepath); + return this._makeEntry(stats, pattern); + } catch (error) { + if (options.errorFilter(error)) return null; + throw error; + } + } + _getStat(filepath) { + return this._statSync(filepath, this._fsStatSettings); + } + }; + exports.default = ReaderSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js +var require_sync = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + const sync_1 = require_sync$1(); + const provider_1 = require_provider(); + var ProviderSync = class extends provider_1.default { + constructor() { + super(...arguments); + this._reader = new sync_1.default(this._settings); + } + read(task) { + const root = this._getRootDirectory(task); + const options = this._getReaderOptions(task); + return this.api(root, task, options).map(options.transform); + } + api(root, task, options) { + if (task.dynamic) return this._reader.dynamic(root, options); + return this._reader.static(task.patterns, options); + } + }; + exports.default = ProviderSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js +var require_settings = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; + const fs$4 = __require("fs"); + const os$1 = __require("os"); + /** + * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. + * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 + */ + const CPU_COUNT = Math.max(os$1.cpus().length, 1); + exports.DEFAULT_FILE_SYSTEM_ADAPTER = { + lstat: fs$4.lstat, + lstatSync: fs$4.lstatSync, + stat: fs$4.stat, + statSync: fs$4.statSync, + readdir: fs$4.readdir, + readdirSync: fs$4.readdirSync + }; + var Settings = class { + constructor(_options = {}) { + this._options = _options; + this.absolute = this._getValue(this._options.absolute, false); + this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); + this.braceExpansion = this._getValue(this._options.braceExpansion, true); + this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); + this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); + this.cwd = this._getValue(this._options.cwd, process.cwd()); + this.deep = this._getValue(this._options.deep, Infinity); + this.dot = this._getValue(this._options.dot, false); + this.extglob = this._getValue(this._options.extglob, true); + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); + this.fs = this._getFileSystemMethods(this._options.fs); + this.globstar = this._getValue(this._options.globstar, true); + this.ignore = this._getValue(this._options.ignore, []); + this.markDirectories = this._getValue(this._options.markDirectories, false); + this.objectMode = this._getValue(this._options.objectMode, false); + this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); + this.onlyFiles = this._getValue(this._options.onlyFiles, true); + this.stats = this._getValue(this._options.stats, false); + this.suppressErrors = this._getValue(this._options.suppressErrors, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); + this.unique = this._getValue(this._options.unique, true); + if (this.onlyDirectories) this.onlyFiles = false; + if (this.stats) this.objectMode = true; + this.ignore = [].concat(this.ignore); + } + _getValue(option, value) { + return option === void 0 ? value : option; + } + _getFileSystemMethods(methods = {}) { + return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); + } + }; + exports.default = Settings; +})); +//#endregion +//#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.js +var require_out = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + const taskManager = require_tasks(); + const async_1 = require_async(); + const stream_1 = require_stream(); + const sync_1 = require_sync(); + const settings_1 = require_settings(); + const utils = require_utils$2(); + async function FastGlob(source, options) { + assertPatternsInput(source); + const works = getWorks(source, async_1.default, options); + const result = await Promise.all(works); + return utils.array.flatten(result); + } + (function(FastGlob) { + FastGlob.glob = FastGlob; + FastGlob.globSync = sync; + FastGlob.globStream = stream; + FastGlob.async = FastGlob; + function sync(source, options) { + assertPatternsInput(source); + const works = getWorks(source, sync_1.default, options); + return utils.array.flatten(works); + } + FastGlob.sync = sync; + function stream(source, options) { + assertPatternsInput(source); + const works = getWorks(source, stream_1.default, options); + /** + * The stream returned by the provider cannot work with an asynchronous iterator. + * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. + * This affects performance (+25%). I don't see best solution right now. + */ + return utils.stream.merge(works); + } + FastGlob.stream = stream; + function generateTasks(source, options) { + assertPatternsInput(source); + const patterns = [].concat(source); + const settings = new settings_1.default(options); + return taskManager.generate(patterns, settings); + } + FastGlob.generateTasks = generateTasks; + function isDynamicPattern(source, options) { + assertPatternsInput(source); + const settings = new settings_1.default(options); + return utils.pattern.isDynamicPattern(source, settings); + } + FastGlob.isDynamicPattern = isDynamicPattern; + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escape(source); + } + FastGlob.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPathToPattern(source); + } + FastGlob.convertPathToPattern = convertPathToPattern; + (function(posix) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapePosixPath(source); + } + posix.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPosixPathToPattern(source); + } + posix.convertPathToPattern = convertPathToPattern; + })(FastGlob.posix || (FastGlob.posix = {})); + (function(win32) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapeWindowsPath(source); + } + win32.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertWindowsPathToPattern(source); + } + win32.convertPathToPattern = convertPathToPattern; + })(FastGlob.win32 || (FastGlob.win32 = {})); + })(FastGlob || (FastGlob = {})); + function getWorks(source, _Provider, options) { + const patterns = [].concat(source); + const settings = new settings_1.default(options); + const tasks = taskManager.generate(patterns, settings); + const provider = new _Provider(settings); + return tasks.map(provider.read, provider); + } + function assertPatternsInput(input) { + if (![].concat(input).every((item) => utils.string.isString(item) && !utils.string.isEmpty(item))) throw new TypeError("Patterns must be a string (non empty) or an array of strings"); + } + module.exports = FastGlob; +})); +//#endregion +//#region ../../node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/dist/js-yaml.mjs +var js_yaml_exports = /* @__PURE__ */ __exportAll({ + CORE_SCHEMA: () => CORE_SCHEMA, + DEFAULT_SCHEMA: () => DEFAULT_SCHEMA, + FAILSAFE_SCHEMA: () => FAILSAFE_SCHEMA, + JSON_SCHEMA: () => JSON_SCHEMA, + Schema: () => Schema, + Type: () => Type, + YAMLException: () => YAMLException, + default: () => index_vite_proxy_tmp_default, + dump: () => dump, + load: () => load, + loadAll: () => loadAll, + safeDump: () => safeDump, + safeLoad: () => safeLoad, + safeLoadAll: () => safeLoadAll, + types: () => types +}); +var __create, __defProp, __getOwnPropDesc, __getOwnPropNames, __getProtoOf, __hasOwnProp, __commonJSMin, __copyProps, __toESM, require_common, require_exception, require_snippet, require_type, require_schema, require_str, require_seq, require_map, require_failsafe, require_null, require_bool, require_int, require_float, require_json, require_core, require_timestamp, require_merge, require_binary, require_omap, require_pairs, require_set, require_default, require_loader, require_dumper, import_js_yaml, Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump, index_vite_proxy_tmp_default; +var init_js_yaml = __esmMin((() => { + __create = Object.create; + __defProp = Object.defineProperty; + __getOwnPropDesc = Object.getOwnPropertyDescriptor; + __getOwnPropNames = Object.getOwnPropertyNames; + __getProtoOf = Object.getPrototypeOf; + __hasOwnProp = Object.prototype.hasOwnProperty; + __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); + __copyProps = (to, from, except, desc) => { + /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */ + if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { + key = keys[i]; + if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { + get: ((k) => from[k]).bind(null, key), + enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable + }); + } + return to; + }; + __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { + value: mod, + enumerable: true + }) : target, mod)); + require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => { + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + function extend(target, source) { + if (source) { + const sourceKeys = Object.keys(source); + for (let index = 0, length = sourceKeys.length; index < length; index += 1) { + const key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string, count) { + let result = ""; + for (let cycle = 0; cycle < count; cycle += 1) result += string; + return result; + } + function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module.exports.isNothing = isNothing; + module.exports.isObject = isObject; + module.exports.toArray = toArray; + module.exports.repeat = repeat; + module.exports.isNegativeZero = isNegativeZero; + module.exports.extend = extend; + })); + require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => { + function formatError(exception, compact) { + let where = ""; + const message = exception.reason || "(unknown reason)"; + if (!exception.mark) return message; + if (exception.mark.name) where += "in \"" + exception.mark.name + "\" "; + where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; + if (!compact && exception.mark.snippet) where += "\n\n" + exception.mark.snippet; + return message + " " + where; + } + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + else this.stack = (/* @__PURE__ */ new Error()).stack || ""; + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + module.exports = YAMLException; + })); + require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common(); + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position - lineStart + head.length + }; + } + function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; + } + function makeSnippet(mark, options) { + options = Object.create(options || null); + if (!mark.buffer) return null; + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== "number") options.indent = 1; + if (typeof options.linesBefore !== "number") options.linesBefore = 3; + if (typeof options.linesAfter !== "number") options.linesAfter = 2; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match; + let foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2; + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + let result = ""; + const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + for (let i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (let i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); + } + module.exports = makeSnippet; + })); + require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + const result = {}; + if (map !== null) Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) throw new YAMLException("Unknown option \"" + name + "\" is met in definition of \"" + tag + "\" YAML type."); + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) throw new YAMLException("Unknown kind \"" + this.kind + "\" is specified for \"" + tag + "\" YAML type."); + } + module.exports = Type; + })); + require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var YAMLException = require_exception(); + var Type = require_type(); + function compileList(schema, name) { + const result = []; + schema[name].forEach(function(currentType) { + let newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) newIndex = previousIndex; + }); + result[newIndex] = currentType; + }); + return result; + } + function compileMap() { + const result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }; + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi["fallback"].push(type); + } else result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (let index = 0, length = arguments.length; index < length; index += 1) arguments[index].forEach(collectType); + return result; + } + function Schema(definition) { + return this.extend(definition); + } + Schema.prototype.extend = function extend(definition) { + let implicit = []; + let explicit = []; + if (definition instanceof Type) explicit.push(definition); + else if (Array.isArray(definition)) explicit = explicit.concat(definition); + else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + } else throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + implicit.forEach(function(type) { + if (!(type instanceof Type)) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + if (type.loadKind && type.loadKind !== "scalar") throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + if (type.multi) throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + }); + const result = Object.create(Schema.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module.exports = Schema; + })); + require_str = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + })); + require_seq = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + })); + require_map = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_type())("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + })); + require_failsafe = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = new (require_schema())({ explicit: [ + require_str(), + require_seq(), + require_map() + ] }); + })); + require_null = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + function resolveYamlNull(data) { + if (data === null) return true; + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); + })); + require_bool = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + function resolveYamlBoolean(data) { + if (data === null) return false; + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module.exports = new Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + })); + require_int = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common(); + var Type = require_type(); + function isHexCode(c) { + return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102; + } + function isOctCode(c) { + return c >= 48 && c <= 55; + } + function isDecCode(c) { + return c >= 48 && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") ch = data[++index]; + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "x") { + index++; + for (; index < max; index++) { + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + if (ch === "o") { + index++; + for (; index < max; index++) { + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && Number.isFinite(parseYamlInteger(data)); + } + } + for (; index < max; index++) { + if (!isDecCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + if (!hasDigits) return false; + return Number.isFinite(parseYamlInteger(data)); + } + function parseYamlInteger(data) { + let value = data; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value.slice(2), 16); + if (value[1] === "o") return sign * parseInt(value.slice(2), 8); + } + return sign * parseInt(value, 10); + } + function constructYamlInteger(data) { + return parseYamlInteger(data); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !common.isNegativeZero(object); + } + module.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + })); + require_float = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common(); + var Type = require_type(); + var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data)) return false; + if (Number.isFinite(parseFloat(data, 10))) return true; + return YAML_FLOAT_SPECIAL_PATTERN.test(data); + } + function constructYamlFloat(data) { + let value = data.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + else if (value === ".nan") return NaN; + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + if (isNaN(object)) switch (style) { + case "lowercase": return ".nan"; + case "uppercase": return ".NAN"; + case "camelcase": return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === object) switch (style) { + case "lowercase": return ".inf"; + case "uppercase": return ".INF"; + case "camelcase": return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === object) switch (style) { + case "lowercase": return "-.inf"; + case "uppercase": return "-.INF"; + case "camelcase": return "-.Inf"; + } + else if (common.isNegativeZero(object)) return "-0.0"; + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + })); + require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_failsafe().extend({ implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] }); + })); + require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_json(); + })); + require_timestamp = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); + var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + function constructYamlTimestamp(data) { + let fraction = 0; + let delta = null; + let match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + const year = +match[1]; + const month = +match[2] - 1; + const day = +match[3]; + if (!match[4]) return new Date(Date.UTC(year, month, day)); + const hour = +match[4]; + const minute = +match[5]; + const second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) fraction += "0"; + fraction = +fraction; + } + if (match[9]) { + const tzHour = +match[10]; + const tzMinute = +(match[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match[9] === "-") delta = -delta; + } + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + })); + require_merge = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + })); + require_binary = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + let bitlen = 0; + const max = data.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + const code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map = BASE64_MAP; + let bits = 0; + const result = []; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + const tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) result.push(bits >> 4 & 255); + return new Uint8Array(result); + } + function representYamlBinary(object) { + let result = ""; + let bits = 0; + const max = object.length; + const map = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + module.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + })); + require_omap = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + const objectKeys = []; + const object = data; + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + let pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + let pairKey; + for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true; + else return false; + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + })); + require_pairs = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + const object = data; + const result = new Array(object.length); + for (let index = 0, length = object.length; index < length; index += 1) { + const pair = object[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + })); + require_set = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + const object = data; + for (const key in object) if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + })); + require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => { + module.exports = require_core().extend({ + implicit: [require_timestamp(), require_merge()], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + })); + require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common(); + var YAMLException = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function isEol(c) { + return c === 10 || c === 13; + } + function isWhiteSpace(c) { + return c === 9 || c === 32; + } + function isWsOrEol(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function isFlowIndicator(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + if (c >= 48 && c <= 57) return c - 48; + const lc = c | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; + } + function escapedHexLen(c) { + if (c === 120) return 2; + if (c === 117) return 4; + if (c === 85) return 8; + return 0; + } + function fromDecimalCode(c) { + if (c >= 48 && c <= 57) return c - 48; + return -1; + } + function simpleEscapeSequence(c) { + switch (c) { + case 48: return "\0"; + case 97: return "\x07"; + case 98: return "\b"; + case 116: return " "; + case 9: return " "; + case 110: return "\n"; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 101: return "\x1B"; + case 32: return " "; + case 34: return "\""; + case 47: return "/"; + case 92: return "\\"; + case 78: return "…"; + case 95: return "\xA0"; + case 76: return "\u2028"; + case 80: return "\u2029"; + default: return ""; + } + } + function charFromCodepoint(c) { + if (c <= 65535) return String.fromCharCode(c); + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + function setProperty(object, key, value) { + if (key === "__proto__") Object.defineProperty(object, key, { + configurable: true, + enumerable: true, + writable: true, + value + }); + else object[key] = value; + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (let i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100; + this.maxMergeSeqLength = typeof options["maxMergeSeqLength"] === "number" ? options["maxMergeSeqLength"] : 20; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.depth = 0; + this.firstTabInLine = -1; + this.documents = []; + this.anchorMapTransactions = []; + } + function generateError(state, message) { + const mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet(mark); + return new YAMLException(message, mark); + } + function throwError(state, message) { + throw generateError(state, message); + } + function throwWarning(state, message) { + if (state.onWarning) state.onWarning.call(null, generateError(state, message)); + } + function storeAnchor(state, name, value) { + const transactions = state.anchorMapTransactions; + if (transactions.length !== 0) { + const transaction = transactions[transactions.length - 1]; + if (!_hasOwnProperty.call(transaction, name)) transaction[name] = { + existed: _hasOwnProperty.call(state.anchorMap, name), + value: state.anchorMap[name] + }; + } + state.anchorMap[name] = value; + } + function beginAnchorTransaction(state) { + state.anchorMapTransactions.push(Object.create(null)); + } + function commitAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const transactions = state.anchorMapTransactions; + if (transactions.length === 0) return; + const parent = transactions[transactions.length - 1]; + const names = Object.keys(transaction); + for (let index = 0, length = names.length; index < length; index += 1) { + const name = names[index]; + if (!_hasOwnProperty.call(parent, name)) parent[name] = transaction[name]; + } + } + function rollbackAnchorTransaction(state) { + const transaction = state.anchorMapTransactions.pop(); + const names = Object.keys(transaction); + for (let index = names.length - 1; index >= 0; index -= 1) { + const entry = transaction[names[index]]; + if (entry.existed) state.anchorMap[names[index]] = entry.value; + else delete state.anchorMap[names[index]]; + } + } + function snapshotState(state) { + return { + position: state.position, + line: state.line, + lineStart: state.lineStart, + lineIndent: state.lineIndent, + firstTabInLine: state.firstTabInLine, + tag: state.tag, + anchor: state.anchor, + kind: state.kind, + result: state.result + }; + } + function restoreState(state, snapshot) { + state.position = snapshot.position; + state.line = snapshot.line; + state.lineStart = snapshot.lineStart; + state.lineIndent = snapshot.lineIndent; + state.firstTabInLine = snapshot.firstTabInLine; + state.tag = snapshot.tag; + state.anchor = snapshot.anchor; + state.kind = snapshot.kind; + state.result = snapshot.result; + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + if (state.version !== null) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + const major = parseInt(match[1], 10); + const minor = parseInt(match[2], 10); + if (major !== 1) throwError(state, "unacceptable YAML version of the document"); + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) throwWarning(state, "unsupported YAML version of the document"); + }, + TAG: function handleTagDirective(state, name, args) { + let prefix; + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + const handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + if (_hasOwnProperty.call(state.tagMap, handle)) throwError(state, "there is a previously declared suffix for \"" + handle + "\" tag handle"); + if (!PATTERN_TAG_URI.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + if (start < end) { + const _result = state.input.slice(start, end); + if (checkJson) for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { + const _character = _result.charCodeAt(_position); + if (!(_character === 9 || _character >= 32 && _character <= 1114111)) throwError(state, "expected valid JSON character"); + } + else if (PATTERN_NON_PRINTABLE.test(_result)) throwError(state, "the stream contains non-printable characters"); + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + if (!common.isObject(source)) throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + const sourceKeys = Object.keys(source); + for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + const key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) throwError(state, "nested arrays are not supported inside keys"); + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") keyNode[index] = "[object Object]"; + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") keyNode = "[object Object]"; + keyNode = String(keyNode); + if (_result === null) _result = {}; + if (keyTag === "tag:yaml.org,2002:merge") if (Array.isArray(valueNode)) { + if (valueNode.length > state.maxMergeSeqLength) throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")"); + const seen = /* @__PURE__ */ new Set(); + for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { + const src = valueNode[index]; + if (seen.has(src)) continue; + seen.add(src); + mergeMappings(state, _result, src, overridableKeys); + } + } else mergeMappings(state, _result, valueNode, overridableKeys); + else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + const ch = state.input.charCodeAt(state.position); + if (ch === 10) state.position++; + else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } else throwError(state, "a line break is expected"); + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + let lineBreaks = 0; + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (isWhiteSpace(ch)) { + if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position; + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (ch !== 10 && ch !== 13 && ch !== 0); + if (isEol(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else break; + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) throwWarning(state, "deficient indentation"); + return lineBreaks; + } + function testDocumentSeparator(state) { + let _position = state.position; + let ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || isWsOrEol(ch)) return true; + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) state.result += " "; + else if (count > 1) state.result += common.repeat("\n", count - 1); + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + let captureStart; + let captureEnd; + let hasPendingContent; + let _line; + let _lineStart; + let _lineIndent; + const _kind = state.kind; + const _result = state.result; + let ch = state.input.charCodeAt(state.position); + if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) return false; + if (ch === 63 || ch === 45) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) return false; + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break; + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) break; + else if (isEol(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!isWhiteSpace(ch)) captureEnd = state.position + 1; + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) return true; + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let ch = state.input.charCodeAt(state.position); + if (ch !== 39) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else return true; + } else if (isEol(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar"); + else { + state.position++; + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + let captureStart; + let captureEnd; + let tmp; + let ch = state.input.charCodeAt(state.position); + if (ch !== 34) return false; + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (isEol(ch)) skipSeparationSpace(state, false, nodeIndent); + else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + let hexLength = tmp; + let hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) hexResult = (hexResult << 4) + tmp; + else throwError(state, "expected hexadecimal character"); + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else throwError(state, "unknown escape sequence"); + captureStart = captureEnd = state.position; + } else if (isEol(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar"); + else { + state.position++; + if (!isWhiteSpace(ch)) captureEnd = state.position; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + let readNext = true; + let _line; + let _lineStart; + let _pos; + const _tag = state.tag; + let _result; + const _anchor = state.anchor; + let terminator; + let isPair; + let isExplicitPair; + let isMapping; + const overridableKeys = Object.create(null); + let keyNode; + let keyTag; + let valueNode; + let ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) throwError(state, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state, "expected the node content, but found ','"); + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + if (isWsOrEol(state.input.charCodeAt(state.position + 1))) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + else if (isPair) _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + else _result.push(keyNode); + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + let folding; + let chomping = CHOMPING_CLIP; + let didReadContent = false; + let detectedIndent = false; + let textIndent = nodeIndent; + let emptyLines = 0; + let atMoreIndented = false; + let tmp; + let ch = state.input.charCodeAt(state.position); + if (ch === 124) folding = false; + else if (ch === 62) folding = true; + else return false; + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + else throwError(state, "repeat of a chomping mode identifier"); + else if ((tmp = fromDecimalCode(ch)) >= 0) if (tmp === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else throwError(state, "repeat of an indentation width identifier"); + else break; + } + if (isWhiteSpace(ch)) { + do + ch = state.input.charCodeAt(++state.position); + while (isWhiteSpace(ch)); + if (ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!isEol(ch) && ch !== 0); + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) textIndent = state.lineIndent; + if (isEol(ch)) { + emptyLines++; + continue; + } + if (!detectedIndent && textIndent === 0) throwError(state, "missing indentation for block scalar"); + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping === CHOMPING_CLIP) { + if (didReadContent) state.result += "\n"; + } + break; + } + if (folding) if (isWhiteSpace(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) state.result += " "; + } else state.result += common.repeat("\n", emptyLines); + else state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + const captureStart = state.position; + while (!isEol(ch) && ch !== 0) ch = state.input.charCodeAt(++state.position); + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + const _tag = state.tag; + const _anchor = state.anchor; + const _result = []; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) break; + if (!isWsOrEol(state.input.charCodeAt(state.position + 1))) break; + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + const _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a sequence entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + let allowCompact; + let _keyLine; + let _keyLineStart; + let _keyPos; + const _tag = state.tag; + const _anchor = state.anchor; + const _result = {}; + const overridableKeys = Object.create(null); + let keyTag = null; + let keyNode = null; + let valueNode = null; + let atExplicitKey = false; + let detected = false; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) storeAnchor(state, state.anchor, _result); + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const following = state.input.charCodeAt(state.position + 1); + const _line = state.line; + if ((ch === 63 || ch === 58) && isWsOrEol(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!isWsOrEol(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) throwError(state, "can not read an implicit mapping pair; a colon is missed"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) if (atExplicitKey) keyNode = state.result; + else valueNode = state.result; + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a mapping entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (atExplicitKey) storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + let isVerbatim = false; + let isNamed = false; + let tagHandle; + let tagName; + let ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) throwError(state, "duplication of a tag property"); + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else tagHandle = "!"; + let _position = state.position; + if (isVerbatim) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else throwError(state, "unexpected end of the stream within a verbatim tag"); + } else { + while (ch !== 0 && !isWsOrEol(ch)) { + if (ch === 33) if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters"); + isNamed = true; + _position = state.position + 1; + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters"); + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) throwError(state, "tag name cannot contain such characters: " + tagName); + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) state.tag = tagName; + else if (_hasOwnProperty.call(state.tagMap, tagHandle)) state.tag = state.tagMap[tagHandle] + tagName; + else if (tagHandle === "!") state.tag = "!" + tagName; + else if (tagHandle === "!!") state.tag = "tag:yaml.org,2002:" + tagName; + else throwError(state, "undeclared tag handle \"" + tagHandle + "\""); + return true; + } + function readAnchorProperty(state) { + let ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) throwError(state, "duplication of an anchor property"); + ch = state.input.charCodeAt(++state.position); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an anchor node must contain at least one character"); + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + let ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + const _position = state.position; + while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) ch = state.input.charCodeAt(++state.position); + if (state.position === _position) throwError(state, "name of an alias node must contain at least one character"); + const alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) throwError(state, "unidentified alias \"" + alias + "\""); + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function tryReadBlockMappingFromProperty(state, propertyStart, nodeIndent, flowIndent) { + const fallbackState = snapshotState(state); + beginAnchorTransaction(state); + restoreState(state, propertyStart); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === "mapping") { + commitAnchorTransaction(state); + return true; + } + rollbackAnchorTransaction(state); + restoreState(state, fallbackState); + return false; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + let allowBlockScalars; + let allowBlockCollections; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + let type; + let flowIndent; + let blockIndent; + if (state.depth >= state.maxDepth) throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")"); + state.depth += 1; + if (state.listener !== null) state.listener("open", state); + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + const allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } + } + if (indentStatus === 1) while (true) { + const ch = state.input.charCodeAt(state.position); + const propertyState = snapshotState(state); + if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) break; + if (!readTagProperty(state) && !readAnchorProperty(state)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else if (state.lineIndent < parentIndent) indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) flowIndent = parentIndent; + else flowIndent = parentIndent + 1; + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) hasContent = true; + else { + const ch = state.input.charCodeAt(state.position); + if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) hasContent = true; + else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) hasContent = true; + else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) throwError(state, "alias node should not have any properties"); + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) state.tag = "?"; + } + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + if (state.tag === null) { + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") throwError(state, "unacceptable node kind for ! tag; it should be \"scalar\", not \"" + state.kind + "\""); + for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) type = state.typeMap[state.kind || "fallback"][state.tag]; + else { + type = null; + const typeList = state.typeMap.multi[state.kind || "fallback"]; + for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + if (!type) throwError(state, "unknown tag !<" + state.tag + ">"); + if (state.result !== null && type.kind !== state.kind) throwError(state, "unacceptable node kind for !<" + state.tag + "> tag; it should be \"" + type.kind + "\", not \"" + state.kind + "\""); + if (!type.resolve(state.result, state.tag)) throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) storeAnchor(state, state.anchor, state.result); + } + } + if (state.listener !== null) state.listener("close", state); + state.depth -= 1; + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + const documentStart = state.position; + let hasDirectives = false; + let ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) break; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + let _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + const directiveName = state.input.slice(_position, state.position); + const directiveArgs = []; + if (directiveName.length < 1) throwError(state, "directive name must not be less than one character in length"); + while (ch !== 0) { + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 35) { + do + ch = state.input.charCodeAt(++state.position); + while (ch !== 0 && !isEol(ch)); + break; + } + if (isEol(ch)) break; + _position = state.position; + while (ch !== 0 && !isWsOrEol(ch)) ch = state.input.charCodeAt(++state.position); + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) directiveHandlers[directiveName](state, directiveName, directiveArgs); + else throwWarning(state, "unknown document directive \"" + directiveName + "\""); + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) throwError(state, "directives end mark is expected"); + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) throwWarning(state, "non-ASCII line breaks are interpreted as content"); + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) throwError(state, "end of the stream or a document separator is expected"); + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) input += "\n"; + if (input.charCodeAt(0) === 65279) input = input.slice(1); + } + const state = new State(input, options); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) readDocument(state); + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + const documents = loadDocuments(input, options); + if (typeof iterator !== "function") return documents; + for (let index = 0, length = documents.length; index < length; index += 1) iterator(documents[index]); + } + function load(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) return; + else if (documents.length === 1) return documents[0]; + throw new YAMLException("expected a single document in the stream, but found more"); + } + module.exports.loadAll = loadAll; + module.exports.load = load; + })); + require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => { + var common = require_common(); + var YAMLException = require_exception(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = "\\\""; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + function compileStyleMap(schema, map) { + if (map === null) return {}; + const result = {}; + const keys = Object.keys(map); + for (let index = 0, length = keys.length; index < length; index += 1) { + let tag = keys[index]; + let style = String(map[tag]); + if (tag.slice(0, 2) === "!!") tag = "tag:yaml.org,2002:" + tag.slice(2); + const type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) style = type.styleAliases[style]; + result[tag] = style; + } + return result; + } + function encodeHex(character) { + let handle; + let length; + const string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === "\"" ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + const ind = common.repeat(" ", spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) if (state.implicitTypes[index].resolve(str)) return true; + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return c >= 32 && c <= 126 || c >= 161 && c <= 55295 && c !== 8232 && c !== 8233 || c >= 57344 && c <= 65533 && c !== CHAR_BOM || c >= 65536 && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev, inblock) { + const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return (inblock ? cIsNsCharOrWhitespace : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar; + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + const first = string.charCodeAt(pos); + let second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) return (first - 55296) * 1024 + second - 56320 + 65536; + } + return first; + } + function needIndentIndicator(string) { + return /^\n* /.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + let i; + let char = 0; + let prevChar = null; + let hasLineBreak = false; + let hasFoldableLine = false; + const shouldTrackWidth = lineWidth !== -1; + let previousLineBreak = -1; + let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); + if (singleLineOnly || forceQuotes) for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) return STYLE_DOUBLE; + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) return STYLE_PLAIN; + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) return STYLE_DOUBLE; + if (!forceQuotes) return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock) { + state.dump = function() { + if (string.length === 0) return state.quotingType === QUOTING_TYPE_DOUBLE ? "\"\"" : "''"; + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) return state.quotingType === QUOTING_TYPE_DOUBLE ? "\"" + string + "\"" : "'" + string + "'"; + } + const indent = state.indent * Math.max(1, level); + const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + const singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + case STYLE_PLAIN: return string; + case STYLE_SINGLE: return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: return "\"" + escapeString(string, lineWidth) + "\""; + default: throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + const clip = string[string.length - 1] === "\n"; + return indentIndicator + (clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-") + "\n"; + } + function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let result = function() { + let nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }(); + let prevMoreIndented = string[0] === "\n" || string[0] === " "; + let moreIndented; + let match; + while (match = lineRe.exec(string)) { + const prefix = match[1]; + const line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + const breakRe = / [^ ]/g; + let match; + let start = 0; + let end; + let curr = 0; + let next = 0; + let result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + else result += line.slice(start); + return result.slice(1); + } + function escapeString(string) { + let result = ""; + let char = 0; + for (let i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + const escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) result += string[i + 1]; + } else result += escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state.replacer) value = state.replacer.call(object, String(index), value); + if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { + if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + for (let index = 0, length = object.length; index < length; index += 1) { + let value = object[index]; + if (state.replacer) value = state.replacer.call(object, String(index), value); + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") _result += generateNextLine(state, level); + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) _result += "-"; + else _result += "- "; + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += "\""; + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue); + if (!writeNode(state, level, objectKey, false, false)) continue; + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? "\"" : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) continue; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + let _result = ""; + const _tag = state.tag; + const objectKeyList = Object.keys(object); + if (state.sortKeys === true) objectKeyList.sort(); + else if (typeof state.sortKeys === "function") objectKeyList.sort(state.sortKeys); + else if (state.sortKeys) throw new YAMLException("sortKeys must be a boolean or a function"); + for (let index = 0, length = objectKeyList.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || _result !== "") pairBuffer += generateNextLine(state, level); + const objectKey = objectKeyList[index]; + let objectValue = object[objectKey]; + if (state.replacer) objectValue = state.replacer.call(object, objectKey, objectValue); + if (!writeNode(state, level + 1, objectKey, true, true, true)) continue; + const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += state.dump; + if (explicitPair) pairBuffer += generateNextLine(state, level); + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) continue; + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) pairBuffer += ":"; + else pairBuffer += ": "; + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + const typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (let index = 0, length = typeList.length; index < length; index += 1) { + const type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + if (explicit) if (type.multi && type.representName) state.tag = type.representName(object); + else state.tag = type.tag; + else state.tag = "?"; + if (type.represent) { + const style = state.styleMap[type.tag] || type.defaultStyle; + let _result; + if (_toString.call(type.represent) === "[object Function]") _result = type.represent(object, style); + else if (_hasOwnProperty.call(type.represent, style)) _result = type.represent[style](object, style); + else throw new YAMLException("!<" + type.tag + "> tag resolver accepts not \"" + style + "\" style"); + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) detectType(state, object, true); + const type = _toString.call(state.dump); + const inblock = block; + if (block) block = state.flowLevel < 0 || state.flowLevel > level; + const objectOrArray = type === "[object Object]" || type === "[object Array]"; + let duplicateIndex; + let duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) compact = false; + if (duplicate && state.usedDuplicates[duplicateIndex]) state.dump = "*ref_" + duplicateIndex; + else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) state.usedDuplicates[duplicateIndex] = true; + if (type === "[object Object]") if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + else if (type === "[object Array]") if (block && state.dump.length !== 0) { + if (state.noArrayIndent && !isblockseq && level > 0) writeBlockSequence(state, level - 1, state.dump, compact); + else writeBlockSequence(state, level, state.dump, compact); + if (duplicate) state.dump = "&ref_" + duplicateIndex + state.dump; + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + else if (type === "[object String]") { + if (state.tag !== "?") writeScalar(state, state.dump, level, iskey, inblock); + } else if (type === "[object Undefined]") return false; + else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21"); + if (state.tag[0] === "!") tagStr = "!" + tagStr; + else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") tagStr = "!!" + tagStr.slice(18); + else tagStr = "!<" + tagStr + ">"; + state.dump = tagStr + " " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + const objects = []; + const duplicatesIndexes = []; + inspectNode(object, objects, duplicatesIndexes); + const length = duplicatesIndexes.length; + for (let index = 0; index < length; index += 1) state.duplicates.push(objects[duplicatesIndexes[index]]); + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + if (object !== null && typeof object === "object") { + const index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) duplicatesIndexes.push(index); + } else { + objects.push(object); + if (Array.isArray(object)) for (let i = 0, length = object.length; i < length; i += 1) inspectNode(object[i], objects, duplicatesIndexes); + else { + const objectKeyList = Object.keys(object); + for (let i = 0, length = objectKeyList.length; i < length; i += 1) inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes); + } + } + } + } + function dump(input, options) { + options = options || {}; + const state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + let value = input; + if (state.replacer) value = state.replacer.call({ "": value }, "", value); + if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; + return ""; + } + module.exports.dump = dump; + })); + import_js_yaml = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => { + var loader = require_loader(); + var dumper = require_dumper(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module.exports.Type = require_type(); + module.exports.Schema = require_schema(); + module.exports.FAILSAFE_SCHEMA = require_failsafe(); + module.exports.JSON_SCHEMA = require_json(); + module.exports.CORE_SCHEMA = require_core(); + module.exports.DEFAULT_SCHEMA = require_default(); + module.exports.load = loader.load; + module.exports.loadAll = loader.loadAll; + module.exports.dump = dumper.dump; + module.exports.YAMLException = require_exception(); + module.exports.types = { + binary: require_binary(), + float: require_float(), + map: require_map(), + null: require_null(), + pairs: require_pairs(), + set: require_set(), + timestamp: require_timestamp(), + bool: require_bool(), + int: require_int(), + merge: require_merge(), + omap: require_omap(), + seq: require_seq(), + str: require_str() + }; + module.exports.safeLoad = renamed("safeLoad", "load"); + module.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module.exports.safeDump = renamed("safeDump", "dump"); + })))(), 1); + ({Type, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump} = import_js_yaml.default); + index_vite_proxy_tmp_default = import_js_yaml.default; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/unicode.js +var require_unicode = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Uni = module.exports; + module.exports.isWhiteSpace = function isWhiteSpace(x) { + return x === " " || x === "\xA0" || x === "" || x >= " " && x <= "\r" || x === " " || x >= " " && x <= " " || x === "\u2028" || x === "\u2029" || x === " " || x === " " || x === " "; + }; + module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { + return x === " " || x === " " || x === "\n" || x === "\r"; + }; + module.exports.isLineTerminator = function isLineTerminator(x) { + return x === "\n" || x === "\r" || x === "\u2028" || x === "\u2029"; + }; + module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { + return x === "\n" || x === "\r"; + }; + module.exports.isIdentifierStart = function isIdentifierStart(x) { + return x === "$" || x === "_" || x >= "A" && x <= "Z" || x >= "a" && x <= "z" || x >= "€" && Uni.NonAsciiIdentifierStart.test(x); + }; + module.exports.isIdentifierPart = function isIdentifierPart(x) { + return x === "$" || x === "_" || x >= "A" && x <= "Z" || x >= "a" && x <= "z" || x >= "0" && x <= "9" || x >= "€" && Uni.NonAsciiIdentifierPart.test(x); + }; + module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/parse.js +var require_parse = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Uni = require_unicode(); + function isHexDigit(x) { + return x >= "0" && x <= "9" || x >= "A" && x <= "F" || x >= "a" && x <= "f"; + } + function isOctDigit(x) { + return x >= "0" && x <= "7"; + } + function isDecDigit(x) { + return x >= "0" && x <= "9"; + } + var unescapeMap = { + "'": "'", + "\"": "\"", + "\\": "\\", + "b": "\b", + "f": "\f", + "n": "\n", + "r": "\r", + "t": " ", + "v": "\v", + "/": "/" + }; + function formatError(input, msg, position, lineno, column, json5) { + var result = msg + " at " + (lineno + 1) + ":" + (column + 1), tmppos = position - column - 1, srcline = "", underline = ""; + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON; + if (tmppos < position - 70) tmppos = position - 70; + while (1) { + var chr = input[++tmppos]; + if (isLineTerminator(chr) || tmppos === input.length) { + if (position >= tmppos) underline += "^"; + break; + } + srcline += chr; + if (position === tmppos) underline += "^"; + else if (position > tmppos) underline += input[tmppos] === " " ? " " : " "; + if (srcline.length > 78) break; + } + return result + "\n" + srcline + "\n" + underline; + } + function parse(input, options) { + var json5 = false; + var cjson = false; + if (options.legacy || options.mode === "json") {} else if (options.mode === "cjson") cjson = true; + else if (options.mode === "json5") json5 = true; + else json5 = true; + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON; + var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON; + var length = input.length, lineno = 0, linestart = 0, position = 0, stack = []; + var tokenStart = function() {}; + var tokenEnd = function(v) { + return v; + }; + if (options._tokenize) (function() { + var start = null; + tokenStart = function() { + if (start !== null) throw Error("internal error, token overlap"); + start = position; + }; + tokenEnd = function(v, type) { + if (start != position) { + var hash = { + raw: input.substr(start, position - start), + type, + stack: stack.slice(0) + }; + if (v !== void 0) hash.value = v; + options._tokenize.call(null, hash); + } + start = null; + return v; + }; + })(); + function fail(msg) { + var column = position - linestart; + if (!msg) { + if (position < length) { + var token = "'" + JSON.stringify(input[position]).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, "\"") + "'"; + if (!msg) msg = "Unexpected token " + token; + } else if (!msg) msg = "Unexpected end of input"; + } + var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)); + error.row = lineno + 1; + error.column = column + 1; + throw error; + } + function newline(chr) { + if (chr === "\r" && input[position] === "\n") position++; + linestart = position; + lineno++; + } + function parseGeneric() { + while (position < length) { + tokenStart(); + var chr = input[position++]; + if (chr === "\"" || chr === "'" && json5) return tokenEnd(parseString(chr), "literal"); + else if (chr === "{") { + tokenEnd(void 0, "separator"); + return parseObject(); + } else if (chr === "[") { + tokenEnd(void 0, "separator"); + return parseArray(); + } else if (chr === "-" || chr === "." || isDecDigit(chr) || json5 && (chr === "+" || chr === "I" || chr === "N")) return tokenEnd(parseNumber(), "literal"); + else if (chr === "n") { + parseKeyword("null"); + return tokenEnd(null, "literal"); + } else if (chr === "t") { + parseKeyword("true"); + return tokenEnd(true, "literal"); + } else if (chr === "f") { + parseKeyword("false"); + return tokenEnd(false, "literal"); + } else { + position--; + return tokenEnd(void 0); + } + } + } + function parseKey() { + var result; + while (position < length) { + tokenStart(); + var chr = input[position++]; + if (chr === "\"" || chr === "'" && json5) return tokenEnd(parseString(chr), "key"); + else if (chr === "{") { + tokenEnd(void 0, "separator"); + return parseObject(); + } else if (chr === "[") { + tokenEnd(void 0, "separator"); + return parseArray(); + } else if (chr === "." || isDecDigit(chr)) return tokenEnd(parseNumber(true), "key"); + else if (json5 && Uni.isIdentifierStart(chr) || chr === "\\" && input[position] === "u") { + var rollback = position - 1; + var result = parseIdentifier(); + if (result === void 0) { + position = rollback; + return tokenEnd(void 0); + } else return tokenEnd(result, "key"); + } else { + position--; + return tokenEnd(void 0); + } + } + } + function skipWhiteSpace() { + tokenStart(); + while (position < length) { + var chr = input[position++]; + if (isLineTerminator(chr)) { + position--; + tokenEnd(void 0, "whitespace"); + tokenStart(); + position++; + newline(chr); + tokenEnd(void 0, "newline"); + tokenStart(); + } else if (isWhiteSpace(chr)) {} else if (chr === "/" && (json5 || cjson) && (input[position] === "/" || input[position] === "*")) { + position--; + tokenEnd(void 0, "whitespace"); + tokenStart(); + position++; + skipComment(input[position++] === "*"); + tokenEnd(void 0, "comment"); + tokenStart(); + } else { + position--; + break; + } + } + return tokenEnd(void 0, "whitespace"); + } + function skipComment(multi) { + while (position < length) { + var chr = input[position++]; + if (isLineTerminator(chr)) { + if (!multi) { + position--; + return; + } + newline(chr); + } else if (chr === "*" && multi) { + if (input[position] === "/") { + position++; + return; + } + } + } + if (multi) fail("Unclosed multiline comment"); + } + function parseKeyword(keyword) { + var _pos = position; + var len = keyword.length; + for (var i = 1; i < len; i++) { + if (position >= length || keyword[i] != input[position]) { + position = _pos - 1; + fail(); + } + position++; + } + } + function parseObject() { + var result = options.null_prototype ? Object.create(null) : {}, empty_object = {}, is_non_empty = false; + while (position < length) { + skipWhiteSpace(); + var item1 = parseKey(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (chr === "}" && item1 === void 0) { + if (!json5 && is_non_empty) { + position--; + fail("Trailing comma in object"); + } + return result; + } else if (chr === ":" && item1 !== void 0) { + skipWhiteSpace(); + stack.push(item1); + var item2 = parseGeneric(); + stack.pop(); + if (item2 === void 0) fail("No value found for key " + item1); + if (typeof item1 !== "string") { + if (!json5 || typeof item1 !== "number") fail("Wrong key type: " + item1); + } + if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== "replace") { + if (options.reserved_keys === "throw") fail("Reserved key: " + item1); + } else { + if (typeof options.reviver === "function") item2 = options.reviver.call(null, item1, item2); + if (item2 !== void 0) { + is_non_empty = true; + Object.defineProperty(result, item1, { + value: item2, + enumerable: true, + configurable: true, + writable: true + }); + } + } + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (chr === ",") continue; + else if (chr === "}") return result; + else fail(); + } else { + position--; + fail(); + } + } + fail(); + } + function parseArray() { + var result = []; + while (position < length) { + skipWhiteSpace(); + stack.push(result.length); + var item = parseGeneric(); + stack.pop(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (item !== void 0) { + if (typeof options.reviver === "function") item = options.reviver.call(null, String(result.length), item); + if (item === void 0) { + result.length++; + item = true; + } else result.push(item); + } + if (chr === ",") { + if (item === void 0) fail("Elisions are not supported"); + } else if (chr === "]") { + if (!json5 && item === void 0 && result.length) { + position--; + fail("Trailing comma in array"); + } + return result; + } else { + position--; + fail(); + } + } + } + function parseNumber() { + position--; + var start = position, chr = input[position++]; + var to_num = function(is_octal) { + var str = input.substr(start, position - start); + if (is_octal) var result = parseInt(str.replace(/^0o?/, ""), 8); + else var result = Number(str); + if (Number.isNaN(result)) { + position--; + fail("Bad numeric literal - \"" + input.substr(start, position - start + 1) + "\""); + } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { + position--; + fail("Non-json numeric literal - \"" + input.substr(start, position - start + 1) + "\""); + } else return result; + }; + if (chr === "-" || chr === "+" && json5) chr = input[position++]; + if (chr === "N" && json5) { + parseKeyword("NaN"); + return NaN; + } + if (chr === "I" && json5) { + parseKeyword("Infinity"); + return to_num(); + } + if (chr >= "1" && chr <= "9") { + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + if (chr === "0") { + chr = input[position++]; + var is_octal = chr === "o" || chr === "O" || isOctDigit(chr); + var is_hex = chr === "x" || chr === "X"; + if (json5 && (is_octal || is_hex)) { + while (position < length && (is_hex ? isHexDigit : isOctDigit)(input[position])) position++; + var sign = 1; + if (input[start] === "-") { + sign = -1; + start++; + } else if (input[start] === "+") start++; + return sign * to_num(is_octal); + } + } + if (chr === ".") { + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + if (chr === "e" || chr === "E") { + chr = input[position++]; + if (chr === "-" || chr === "+") position++; + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + position--; + return to_num(); + } + function parseIdentifier() { + position--; + var result = ""; + while (position < length) { + var chr = input[position++]; + if (chr === "\\" && input[position] === "u" && isHexDigit(input[position + 1]) && isHexDigit(input[position + 2]) && isHexDigit(input[position + 3]) && isHexDigit(input[position + 4])) { + chr = String.fromCharCode(parseInt(input.substr(position + 1, 4), 16)); + position += 5; + } + if (result.length) if (Uni.isIdentifierPart(chr)) result += chr; + else { + position--; + return result; + } + else if (Uni.isIdentifierStart(chr)) result += chr; + else return; + } + fail(); + } + function parseString(endChar) { + var result = ""; + while (position < length) { + var chr = input[position++]; + if (chr === endChar) return result; + else if (chr === "\\") { + if (position >= length) fail(); + chr = input[position++]; + if (unescapeMap[chr] && (json5 || chr != "v" && chr != "'")) result += unescapeMap[chr]; + else if (json5 && isLineTerminator(chr)) newline(chr); + else if (chr === "u" || chr === "x" && json5) { + var off = chr === "u" ? 4 : 2; + for (var i = 0; i < off; i++) { + if (position >= length) fail(); + if (!isHexDigit(input[position])) fail("Bad escape sequence"); + position++; + } + result += String.fromCharCode(parseInt(input.substr(position - off, off), 16)); + } else if (json5 && isOctDigit(chr)) { + if (chr < "4" && isOctDigit(input[position]) && isOctDigit(input[position + 1])) var digits = 3; + else if (isOctDigit(input[position])) var digits = 2; + else var digits = 1; + position += digits - 1; + result += String.fromCharCode(parseInt(input.substr(position - digits, digits), 8)); + } else if (json5) result += chr; + else { + position--; + fail(); + } + } else if (isLineTerminator(chr)) fail(); + else { + if (!json5 && chr.charCodeAt(0) < 32) { + position--; + fail("Unexpected control character"); + } + result += chr; + } + } + fail(); + } + skipWhiteSpace(); + var return_value = parseGeneric(); + if (return_value !== void 0 || position < length) { + skipWhiteSpace(); + if (position >= length) { + if (typeof options.reviver === "function") return_value = options.reviver.call(null, "", return_value); + return return_value; + } else fail(); + } else if (position) fail("No data, only a whitespace"); + else fail("No data, empty input"); + } + module.exports.parse = function parseJSON(input, options) { + if (typeof options === "function") options = { reviver: options }; + if (input === void 0) return; + if (typeof input !== "string") input = String(input); + if (options == null) options = {}; + if (options.reserved_keys == null) options.reserved_keys = "ignore"; + if (options.reserved_keys === "throw" || options.reserved_keys === "ignore") { + if (options.null_prototype == null) options.null_prototype = true; + } + try { + return parse(input, options); + } catch (err) { + if (err instanceof SyntaxError && err.row != null && err.column != null) { + var old_err = err; + err = SyntaxError(old_err.message); + err.column = old_err.column; + err.row = old_err.row; + } + throw err; + } + }; + module.exports.tokenize = function tokenizeJSON(input, options) { + if (options == null) options = {}; + options._tokenize = function(smth) { + if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack); + tokens.push(smth); + }; + var tokens = []; + tokens.data = module.exports.parse(input, options); + return tokens; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/stringify.js +var require_stringify = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var Uni = require_unicode(); + if (!(function f() {}).name) Object.defineProperty((function() {}).constructor.prototype, "name", { get: function() { + var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]; + Object.defineProperty(this, "name", { value: name }); + return name; + } }); + var special_chars = { + 0: "\\0", + 8: "\\b", + 9: "\\t", + 10: "\\n", + 11: "\\v", + 12: "\\f", + 13: "\\r", + 92: "\\\\" + }; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var escapable = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/; + function _stringify(object, options, recursiveLvl, currentKey) { + var json5 = options.mode === "json5" || !options.mode; + function indent(str, add) { + var prefix = options._prefix ? options._prefix : ""; + if (!options.indent) return prefix + str; + var result = ""; + var count = recursiveLvl + (add || 0); + for (var i = 0; i < count; i++) result += options.indent; + return prefix + result + str + (add ? "\n" : ""); + } + function _stringify_key(key) { + if (options.quote_keys) return _stringify_str(key); + if (String(Number(key)) == key && key[0] != "-") return key; + if (key == "") return _stringify_str(key); + var result = ""; + for (var i = 0; i < key.length; i++) { + if (i > 0) { + if (!Uni.isIdentifierPart(key[i])) return _stringify_str(key); + } else if (!Uni.isIdentifierStart(key[i])) return _stringify_str(key); + var chr = key.charCodeAt(i); + if (options.ascii) if (chr < 128) result += key[i]; + else result += "\\u" + ("0000" + chr.toString(16)).slice(-4); + else if (escapable.exec(key[i])) result += "\\u" + ("0000" + chr.toString(16)).slice(-4); + else result += key[i]; + } + return result; + } + function _stringify_str(key) { + var quote = options.quote; + var quoteChr = quote.charCodeAt(0); + var result = ""; + for (var i = 0; i < key.length; i++) { + var chr = key.charCodeAt(i); + if (chr < 16) if (chr === 0 && json5) result += "\\0"; + else if (chr >= 8 && chr <= 13 && (json5 || chr !== 11)) result += special_chars[chr]; + else if (json5) result += "\\x0" + chr.toString(16); + else result += "\\u000" + chr.toString(16); + else if (chr < 32) if (json5) result += "\\x" + chr.toString(16); + else result += "\\u00" + chr.toString(16); + else if (chr >= 32 && chr < 128) if (chr === 47 && i && key[i - 1] === "<") result += "\\" + key[i]; + else if (chr === 92) result += "\\\\"; + else if (chr === quoteChr) result += "\\" + quote; + else result += key[i]; + else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) if (chr < 256) if (json5) result += "\\x" + chr.toString(16); + else result += "\\u00" + chr.toString(16); + else if (chr < 4096) result += "\\u0" + chr.toString(16); + else if (chr < 65536) result += "\\u" + chr.toString(16); + else throw Error("weird codepoint"); + else result += key[i]; + } + return quote + result + quote; + } + function _stringify_object() { + if (object === null) return "null"; + var result = [], len = 0, braces; + if (Array.isArray(object)) { + braces = "[]"; + for (var i = 0; i < object.length; i++) { + var s = _stringify(object[i], options, recursiveLvl + 1, String(i)); + if (s === void 0) s = "null"; + len += s.length + 2; + result.push(s + ","); + } + } else { + braces = "{}"; + var fn = function(key) { + var t = _stringify(object[key], options, recursiveLvl + 1, key); + if (t !== void 0) { + t = _stringify_key(key) + ":" + (options.indent ? " " : "") + t + ","; + len += t.length + 1; + result.push(t); + } + }; + if (Array.isArray(options.replacer)) { + for (var i = 0; i < options.replacer.length; i++) if (hasOwnProperty.call(object, options.replacer[i])) fn(options.replacer[i]); + } else { + var keys = Object.keys(object); + if (options.sort_keys) keys = keys.sort(typeof options.sort_keys === "function" ? options.sort_keys : void 0); + keys.forEach(fn); + } + } + len -= 2; + if (options.indent && (len > options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin)) { + if (options.no_trailing_comma && result.length) result[result.length - 1] = result[result.length - 1].substring(0, result[result.length - 1].length - 1); + var innerStuff = result.map(function(x) { + return indent(x, 1); + }).join(""); + return braces[0] + (options.indent ? "\n" : "") + innerStuff + indent(braces[1]); + } else { + if (result.length) result[result.length - 1] = result[result.length - 1].substring(0, result[result.length - 1].length - 1); + var innerStuff = result.join(options.indent ? " " : ""); + return braces[0] + innerStuff + braces[1]; + } + } + function _stringify_nonobject(object) { + if (typeof options.replacer === "function") object = options.replacer.call(null, currentKey, object); + switch (typeof object) { + case "string": return _stringify_str(object); + case "number": + if (object === 0 && 1 / object < 0) return "-0"; + if (!json5 && !Number.isFinite(object)) return "null"; + return object.toString(); + case "boolean": return object.toString(); + case "undefined": return; + default: return JSON.stringify(object); + } + } + if (options._stringify_key) return _stringify_key(object); + if (typeof object === "object") { + if (object === null) return "null"; + var str; + if (typeof (str = object.toJSON5) === "function" && options.mode !== "json") object = str.call(object, currentKey); + else if (typeof (str = object.toJSON) === "function") object = str.call(object, currentKey); + if (object === null) return "null"; + if (typeof object !== "object") return _stringify_nonobject(object); + if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) { + object = object.valueOf(); + return _stringify_nonobject(object); + } else if (object.constructor === Date) return _stringify_nonobject(object.toISOString()); + else { + if (typeof options.replacer === "function") { + object = options.replacer.call(null, currentKey, object); + if (typeof object !== "object") return _stringify_nonobject(object); + } + return _stringify_object(object); + } + } else return _stringify_nonobject(object); + } + module.exports.stringify = function stringifyJSON(object, options, _space) { + if (typeof options === "function" || Array.isArray(options)) options = { replacer: options }; + else if (typeof options === "object" && options !== null) {} else options = {}; + if (_space != null) options.indent = _space; + if (options.indent == null) options.indent = " "; + if (options.quote == null) options.quote = "'"; + if (options.ascii == null) options.ascii = false; + if (options.mode == null) options.mode = "json5"; + if (options.mode === "json" || options.mode === "cjson") { + options.quote = "\""; + options.no_trailing_comma = true; + options.quote_keys = true; + } + if (typeof options.indent === "object") { + if (options.indent.constructor === Number || options.indent.constructor === Boolean || options.indent.constructor === String) options.indent = options.indent.valueOf(); + } + if (typeof options.indent === "number") if (options.indent >= 0) options.indent = Array(Math.min(~~options.indent, 10) + 1).join(" "); + else options.indent = false; + else if (typeof options.indent === "string") options.indent = options.indent.substr(0, 10); + if (options._splitMin == null) options._splitMin = 50; + if (options._splitMax == null) options._splitMax = 70; + return _stringify(object, options, 0, ""); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/analyze.js +var require_analyze = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var tokenize = require_parse().tokenize; + module.exports.analyze = function analyzeJSON(input, options) { + if (options == null) options = {}; + if (!Array.isArray(input)) input = tokenize(input, options); + var result = { + has_whitespace: false, + has_comments: false, + has_newlines: false, + has_trailing_comma: false, + indent: "", + newline: "\n", + quote: "\"", + quote_keys: true + }; + var stats = { + indent: {}, + newline: {}, + quote: {} + }; + for (var i = 0; i < input.length; i++) { + if (input[i].type === "newline") { + if (input[i + 1] && input[i + 1].type === "whitespace") { + if (input[i + 1].raw[0] === " ") stats.indent[" "] = (stats.indent[" "] || 0) + 1; + if (input[i + 1].raw.match(/^\x20+$/)) { + var ws_len = input[i + 1].raw.length; + var indent_len = input[i + 1].stack.length + 1; + if (ws_len % indent_len === 0) { + var t = Array(ws_len / indent_len + 1).join(" "); + stats.indent[t] = (stats.indent[t] || 0) + 1; + } + } + } + stats.newline[input[i].raw] = (stats.newline[input[i].raw] || 0) + 1; + } + if (input[i].type === "newline") result.has_newlines = true; + if (input[i].type === "whitespace") result.has_whitespace = true; + if (input[i].type === "comment") result.has_comments = true; + if (input[i].type === "key") { + if (input[i].raw[0] !== "\"" && input[i].raw[0] !== "'") result.quote_keys = false; + } + if (input[i].type === "key" || input[i].type === "literal") { + if (input[i].raw[0] === "\"" || input[i].raw[0] === "'") stats.quote[input[i].raw[0]] = (stats.quote[input[i].raw[0]] || 0) + 1; + } + if (input[i].type === "separator" && input[i].raw === ",") for (var j = i + 1; j < input.length; j++) { + if (input[j].type === "literal" || input[j].type === "key") break; + if (input[j].type === "separator") result.has_trailing_comma = true; + } + } + for (var k in stats) if (Object.keys(stats[k]).length) result[k] = Object.keys(stats[k]).reduce(function(a, b) { + return stats[k][a] > stats[k][b] ? a : b; + }); + return result; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/document.js +var require_document = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var assert = __require("assert"); + var tokenize = require_parse().tokenize; + var stringify = require_stringify().stringify; + var analyze = require_analyze().analyze; + function isObject(x) { + return typeof x === "object" && x !== null; + } + function value_to_tokenlist(value, stack, options, is_key, indent) { + options = Object.create(options); + options._stringify_key = !!is_key; + if (indent) options._prefix = indent.prefix.map(function(x) { + return x.raw; + }).join(""); + if (options._splitMin == null) options._splitMin = 0; + if (options._splitMax == null) options._splitMax = 0; + var stringified = stringify(value, options); + if (is_key) return [{ + raw: stringified, + type: "key", + stack, + value + }]; + options._addstack = stack; + var result = tokenize(stringified, { _addstack: stack }); + result.data = null; + return result; + } + function arg_to_path(path) { + if (typeof path === "number") path = String(path); + if (path === "") path = []; + if (typeof path === "string") path = path.split("."); + if (!Array.isArray(path)) throw Error("Invalid path type, string or array expected"); + return path; + } + function find_element_in_tokenlist(element, lvl, tokens, begin, end) { + while (tokens[begin].stack[lvl] != element) if (begin++ >= end) return false; + while (tokens[end].stack[lvl] != element) if (end-- < begin) return false; + return [begin, end]; + } + function is_whitespace(token_type) { + return token_type === "whitespace" || token_type === "newline" || token_type === "comment"; + } + function find_first_non_ws_token(tokens, begin, end) { + while (is_whitespace(tokens[begin].type)) if (begin++ >= end) return false; + return begin; + } + function find_last_non_ws_token(tokens, begin, end) { + while (is_whitespace(tokens[end].type)) if (end-- < begin) return false; + return end; + } + function detect_indent_style(tokens, is_array, begin, end, level) { + var result = { + sep1: [], + sep2: [], + suffix: [], + prefix: [], + newline: [] + }; + if (tokens[end].type === "separator" && tokens[end].stack.length !== level + 1 && tokens[end].raw !== ",") return result; + if (tokens[end].type === "separator") end = find_last_non_ws_token(tokens, begin, end - 1); + if (end === false) return result; + while (tokens[end].stack.length > level) end--; + if (!is_array) { + while (is_whitespace(tokens[end].type)) { + if (end < begin) return result; + if (tokens[end].type === "whitespace") result.sep2.unshift(tokens[end]); + else return result; + end--; + } + assert.equal(tokens[end].type, "separator"); + assert.equal(tokens[end].raw, ":"); + while (is_whitespace(tokens[--end].type)) { + if (end < begin) return result; + if (tokens[end].type === "whitespace") result.sep1.unshift(tokens[end]); + else return result; + } + assert.equal(tokens[end].type, "key"); + end--; + } + while (is_whitespace(tokens[end].type)) { + if (end < begin) return result; + if (tokens[end].type === "whitespace") result.prefix.unshift(tokens[end]); + else if (tokens[end].type === "newline") { + result.newline.unshift(tokens[end]); + return result; + } else return result; + end--; + } + return result; + } + function Document(text, options) { + var self = Object.create(Document.prototype); + if (options == null) options = {}; + var tokens = self._tokens = tokenize(text, options); + self._data = tokens.data; + tokens.data = null; + self._options = options; + var stats = analyze(text, options); + if (options.indent == null) options.indent = stats.indent; + if (options.quote == null) options.quote = stats.quote; + if (options.quote_keys == null) options.quote_keys = stats.quote_keys; + if (options.no_trailing_comma == null) options.no_trailing_comma = !stats.has_trailing_comma; + return self; + } + function check_if_can_be_placed(key, object, is_unset) { + function error(add) { + return Error("You can't " + (is_unset ? "unset" : "set") + " key '" + key + "'" + add); + } + if (!isObject(object)) throw error(" of an non-object"); + if (Array.isArray(object)) if (String(key).match(/^\d+$/)) { + key = Number(String(key)); + if (object.length < key || is_unset && object.length === key) throw error(", out of bounds"); + else if (is_unset && object.length !== key + 1) throw error(" in the middle of an array"); + else return true; + } else throw error(" of an array"); + else return true; + } + Document.prototype.set = function(path, value) { + path = arg_to_path(path); + if (path.length === 0) { + if (value === void 0) throw Error("can't remove root document"); + this._data = value; + var new_key = false; + } else { + var data = this._data; + for (var i = 0; i < path.length - 1; i++) { + check_if_can_be_placed(path[i], data, false); + data = data[path[i]]; + } + if (i === path.length - 1) check_if_can_be_placed(path[i], data, value === void 0); + var new_key = !(path[i] in data); + if (value === void 0) if (Array.isArray(data)) data.pop(); + else delete data[path[i]]; + else data[path[i]] = value; + } + if (!this._tokens.length) this._tokens = [{ + raw: "", + type: "literal", + stack: [], + value: void 0 + }]; + var position = [find_first_non_ws_token(this._tokens, 0, this._tokens.length - 1), find_last_non_ws_token(this._tokens, 0, this._tokens.length - 1)]; + for (var i = 0; i < path.length - 1; i++) { + position = find_element_in_tokenlist(path[i], i, this._tokens, position[0], position[1]); + if (position == false) throw Error("internal error, please report this"); + } + if (path.length === 0) var newtokens = value_to_tokenlist(value, path, this._options); + else if (!new_key) { + var pos_old = position; + position = find_element_in_tokenlist(path[i], i, this._tokens, position[0], position[1]); + if (value === void 0 && position !== false) { + var newtokens = []; + if (!Array.isArray(data)) { + var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1); + assert.equal(this._tokens[pos2].type, "separator"); + assert.equal(this._tokens[pos2].raw, ":"); + position[0] = pos2; + var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1); + assert.equal(this._tokens[pos2].type, "key"); + assert.equal(this._tokens[pos2].value, path[path.length - 1]); + position[0] = pos2; + } + var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1); + assert.equal(this._tokens[pos2].type, "separator"); + if (this._tokens[pos2].raw === ",") position[0] = pos2; + else { + pos2 = find_first_non_ws_token(this._tokens, position[1] + 1, pos_old[1]); + assert.equal(this._tokens[pos2].type, "separator"); + if (this._tokens[pos2].raw === ",") position[1] = pos2; + } + } else { + var indent = pos2 !== false ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i) : {}; + var newtokens = value_to_tokenlist(value, path, this._options, false, indent); + } + } else { + var path_1 = path.slice(0, i); + var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1); + assert(pos2 !== false); + var indent = pos2 !== false ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i) : {}; + var newtokens = value_to_tokenlist(value, path, this._options, false, indent); + var prefix = []; + if (indent.newline && indent.newline.length) prefix = prefix.concat(indent.newline); + if (indent.prefix && indent.prefix.length) prefix = prefix.concat(indent.prefix); + if (!Array.isArray(data)) { + prefix = prefix.concat(value_to_tokenlist(path[path.length - 1], path_1, this._options, true)); + if (indent.sep1 && indent.sep1.length) prefix = prefix.concat(indent.sep1); + prefix.push({ + raw: ":", + type: "separator", + stack: path_1 + }); + if (indent.sep2 && indent.sep2.length) prefix = prefix.concat(indent.sep2); + } + newtokens.unshift.apply(newtokens, prefix); + if (this._tokens[pos2].type === "separator" && this._tokens[pos2].stack.length === path.length - 1) { + if (this._tokens[pos2].raw === ",") newtokens.push({ + raw: ",", + type: "separator", + stack: path_1 + }); + } else newtokens.unshift({ + raw: ",", + type: "separator", + stack: path_1 + }); + if (indent.suffix && indent.suffix.length) newtokens.push.apply(newtokens, indent.suffix); + assert.equal(this._tokens[position[1]].type, "separator"); + position[0] = pos2 + 1; + position[1] = pos2; + } + newtokens.unshift(position[1] - position[0] + 1); + newtokens.unshift(position[0]); + this._tokens.splice.apply(this._tokens, newtokens); + return this; + }; + Document.prototype.unset = function(path) { + return this.set(path, void 0); + }; + Document.prototype.get = function(path) { + path = arg_to_path(path); + var data = this._data; + for (var i = 0; i < path.length; i++) { + if (!isObject(data)) return void 0; + data = data[path[i]]; + } + return data; + }; + Document.prototype.has = function(path) { + path = arg_to_path(path); + var data = this._data; + for (var i = 0; i < path.length; i++) { + if (!isObject(data)) return false; + data = data[path[i]]; + } + return data !== void 0; + }; + Document.prototype.update = function(value) { + var self = this; + change([], self._data, value); + return self; + function change(path, old_data, new_data) { + if (!isObject(new_data) || !isObject(old_data)) { + if (new_data !== old_data) self.set(path, new_data); + } else if (Array.isArray(new_data) != Array.isArray(old_data)) self.set(path, new_data); + else if (Array.isArray(new_data)) if (new_data.length > old_data.length) for (var i = 0; i < new_data.length; i++) { + path.push(String(i)); + change(path, old_data[i], new_data[i]); + path.pop(); + } + else for (var i = old_data.length - 1; i >= 0; i--) { + path.push(String(i)); + change(path, old_data[i], new_data[i]); + path.pop(); + } + else { + for (var i in new_data) { + path.push(String(i)); + change(path, old_data[i], new_data[i]); + path.pop(); + } + for (var i in old_data) { + if (i in new_data) continue; + path.push(String(i)); + change(path, old_data[i], new_data[i]); + path.pop(); + } + } + } + }; + Document.prototype.toString = function() { + return this._tokens.map(function(x) { + return x.raw; + }).join(""); + }; + module.exports.Document = Document; + module.exports.update = function updateJSON(source, new_value, options) { + return Document(source, options).update(new_value).toString(); + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/lib/utils.js +var require_utils = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + var FS = __require("fs"); + var jju = require_jju(); + module.exports.register = function() { + var r = __require, e = "extensions"; + r[e][".json5"] = function(m, f) { + m.exports = jju.parse(FS.readFileSync(f, "utf8")); + }; + }; + module.exports.patch_JSON_parse = function() { + var _parse = JSON.parse; + JSON.parse = function(text, rev) { + try { + return _parse(text, rev); + } catch (err) { + require_jju().parse(text, { + mode: "json", + legacy: true, + reviver: rev, + reserved_keys: "replace", + null_prototype: false + }); + throw err; + } + }; + }; + module.exports.middleware = function() { + return function(req, res, next) { + throw Error("this function is removed, use express-json5 instead"); + }; + }; +})); +//#endregion +//#region ../../node_modules/.pnpm/jju@1.4.0/node_modules/jju/index.js +var require_jju = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + module.exports.__defineGetter__("parse", function() { + return require_parse().parse; + }); + module.exports.__defineGetter__("stringify", function() { + return require_stringify().stringify; + }); + module.exports.__defineGetter__("tokenize", function() { + return require_parse().tokenize; + }); + module.exports.__defineGetter__("update", function() { + return require_document().update; + }); + module.exports.__defineGetter__("analyze", function() { + return require_analyze().analyze; + }); + module.exports.__defineGetter__("utils", function() { + return require_utils(); + }); +})); +/**package +{ "name": "jju", +"version": "0.0.0", +"dependencies": {"js-yaml": "*"}, +"scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"} +} +**/ +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+tools@1.1.2/node_modules/@manypkg/tools/dist/manypkg-tools.cjs.prod.js +var require_manypkg_tools_cjs_prod = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path$5 = __require("path"); + var fsp$3 = __require("fs/promises"); + var glob = require_out(); + var fs$3 = __require("fs"); + var yaml = (init_js_yaml(), __toCommonJS(js_yaml_exports)); + var jju = require_jju(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path$5); + var fsp__default = /*#__PURE__*/ _interopDefault(fsp$3); + var glob__default = /*#__PURE__*/ _interopDefault(glob); + var fs__default = /*#__PURE__*/ _interopDefault(fs$3); + var yaml__default = /*#__PURE__*/ _interopDefault(yaml); + var jju__default = /*#__PURE__*/ _interopDefault(jju); + /** + * A package.json access type. + */ + /** + * An in-memory representation of a package.json file. + */ + /** + * An individual package json structure, along with the directory it lives in, + * relative to the root of the current monorepo. + */ + /** + * A collection of packages, along with the monorepo tool used to load them, + * and (if supported by the tool) the associated "root" package. + */ + /** + * An object representing the root of a specific monorepo, with the root + * directory and associated monorepo tool. + * + * Note that this type is currently not used by Tool definitions directly, + * but it is the suggested way to pass around a reference to a monorepo root + * directory and associated tool. + */ + /** + * Monorepo tools may throw this error if a caller attempts to get the package + * collection from a directory that is not a valid monorepo root. + */ + var InvalidMonorepoError = class extends Error {}; + /** + * A monorepo tool is a specific implementation of monorepos, whether provided built-in + * by a package manager or via some other wrapper. + * + * Each tool defines a common interface for detecting whether a directory is + * a valid instance of this type of monorepo, how to retrieve the packages, etc. + */ + const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); + const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); + /** + * This internal method takes a list of one or more directory globs and the absolute path + * to the root directory, and returns a list of all matching relative directories that + * contain a `package.json` file. + */ + async function expandPackageGlobs(packageGlobs, directory) { + const directories = (await glob__default["default"](packageGlobs, { + cwd: directory, + onlyDirectories: true, + ignore: ["**/node_modules"] + })).map((p) => path__default["default"].resolve(directory, p)).sort(); + return (await Promise.all(directories.map((dir) => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch((err) => { + if (err && err.code === "ENOENT") return; + throw err; + }).then((result) => { + if (result) return { + dir: path__default["default"].resolve(dir), + relativeDir: path__default["default"].relative(directory, dir), + packageJson: JSON.parse(result) + }; + })))).filter((pkg) => pkg); + } + /** + * A synchronous version of {@link expandPackagesGlobs}. + */ + function expandPackageGlobsSync(packageGlobs, directory) { + return glob__default["default"].sync(packageGlobs, { + cwd: directory, + onlyDirectories: true, + ignore: ["**/node_modules"] + }).map((p) => path__default["default"].resolve(directory, p)).sort().map((dir) => { + try { + const packageJson = readJsonSync(dir, "package.json"); + return { + dir: path__default["default"].resolve(dir), + relativeDir: path__default["default"].relative(directory, dir), + packageJson + }; + } catch (err) { + if (err && err.code === "ENOENT") return; + throw err; + } + }).filter((pkg) => pkg); + } + const BoltTool = { + type: "bolt", + async isMonorepoRoot(directory) { + try { + const pkgJson = await readJson(directory, "package.json"); + if (pkgJson.bolt && pkgJson.bolt.workspaces) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + const pkgJson = readJsonSync(directory, "package.json"); + if (pkgJson.bolt && pkgJson.bolt.workspaces) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = await readJson(rootDir, "package.json"); + if (!pkgJson.bolt || !pkgJson.bolt.workspaces) throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); + const packageGlobs = pkgJson.bolt.workspaces; + return { + tool: BoltTool, + packages: await expandPackageGlobs(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = readJsonSync(rootDir, "package.json"); + if (!pkgJson.bolt || !pkgJson.bolt.workspaces) throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); + const packageGlobs = pkgJson.bolt.workspaces; + return { + tool: BoltTool, + packages: expandPackageGlobsSync(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); + throw err; + } + } + }; + const LernaTool = { + type: "lerna", + async isMonorepoRoot(directory) { + try { + if ((await readJson(directory, "lerna.json")).useWorkspaces !== true) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + if (readJsonSync(directory, "lerna.json").useWorkspaces !== true) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const lernaJson = await readJson(rootDir, "lerna.json"); + const pkgJson = await readJson(rootDir, "package.json"); + return { + tool: LernaTool, + packages: await expandPackageGlobs(lernaJson.packages || ["packages/*"], rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const lernaJson = readJsonSync(rootDir, "lerna.json"); + const pkgJson = readJsonSync(rootDir, "package.json"); + return { + tool: LernaTool, + packages: expandPackageGlobsSync(lernaJson.packages || ["packages/*"], rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); + throw err; + } + } + }; + async function readYamlFile(path) { + return fsp__default["default"].readFile(path, "utf8").then((data) => yaml__default["default"].load(data)); + } + function readYamlFileSync(path) { + return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); + } + const PnpmTool = { + type: "pnpm", + async isMonorepoRoot(directory) { + try { + if ((await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml"))).packages) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + if (readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")).packages) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); + const pkgJson = await readJson(rootDir, "package.json"); + const packageGlobs = manifest.packages; + return { + tool: PnpmTool, + packages: await expandPackageGlobs(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); + const pkgJson = readJsonSync(rootDir, "package.json"); + const packageGlobs = manifest.packages; + return { + tool: PnpmTool, + packages: expandPackageGlobsSync(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); + throw err; + } + } + }; + const RootTool = { + type: "root", + async isMonorepoRoot(directory) { + return false; + }, + isMonorepoRootSync(directory) { + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkg = { + dir: rootDir, + relativeDir: ".", + packageJson: await readJson(rootDir, "package.json") + }; + return { + tool: RootTool, + packages: [pkg], + rootPackage: pkg, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkg = { + dir: rootDir, + relativeDir: ".", + packageJson: readJsonSync(rootDir, "package.json") + }; + return { + tool: RootTool, + packages: [pkg], + rootPackage: pkg, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); + throw err; + } + } + }; + const RushTool = { + type: "rush", + async isMonorepoRoot(directory) { + try { + await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); + return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + }, + isMonorepoRootSync(directory) { + try { + fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); + return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); + const directories = jju__default["default"].parse(rushText).projects.map((project) => path__default["default"].resolve(rootDir, project.projectFolder)); + return { + tool: RushTool, + packages: await Promise.all(directories.map(async (dir) => { + return { + dir, + relativeDir: path__default["default"].relative(directory, dir), + packageJson: await readJson(dir, "package.json") + }; + })), + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); + return { + tool: RushTool, + packages: jju__default["default"].parse(rushText).projects.map((project) => path__default["default"].resolve(rootDir, project.projectFolder)).map((dir) => { + const packageJson = readJsonSync(dir, "package.json"); + return { + dir, + relativeDir: path__default["default"].relative(directory, dir), + packageJson + }; + }), + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); + throw err; + } + } + }; + const YarnTool = { + type: "yarn", + async isMonorepoRoot(directory) { + try { + const pkgJson = await readJson(directory, "package.json"); + if (pkgJson.workspaces) { + if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) return true; + } + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + const pkgJson = readJsonSync(directory, "package.json"); + if (pkgJson.workspaces) { + if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) return true; + } + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = await readJson(rootDir, "package.json"); + return { + tool: YarnTool, + packages: await expandPackageGlobs(Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = readJsonSync(rootDir, "package.json"); + return { + tool: YarnTool, + packages: expandPackageGlobsSync(Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); + throw err; + } + } + }; + exports.BoltTool = BoltTool; + exports.InvalidMonorepoError = InvalidMonorepoError; + exports.LernaTool = LernaTool; + exports.PnpmTool = PnpmTool; + exports.RootTool = RootTool; + exports.RushTool = RushTool; + exports.YarnTool = YarnTool; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+tools@1.1.2/node_modules/@manypkg/tools/dist/manypkg-tools.cjs.dev.js +var require_manypkg_tools_cjs_dev = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path$4 = __require("path"); + var fsp$2 = __require("fs/promises"); + var glob = require_out(); + var fs$2 = __require("fs"); + var yaml = (init_js_yaml(), __toCommonJS(js_yaml_exports)); + var jju = require_jju(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path$4); + var fsp__default = /*#__PURE__*/ _interopDefault(fsp$2); + var glob__default = /*#__PURE__*/ _interopDefault(glob); + var fs__default = /*#__PURE__*/ _interopDefault(fs$2); + var yaml__default = /*#__PURE__*/ _interopDefault(yaml); + var jju__default = /*#__PURE__*/ _interopDefault(jju); + /** + * A package.json access type. + */ + /** + * An in-memory representation of a package.json file. + */ + /** + * An individual package json structure, along with the directory it lives in, + * relative to the root of the current monorepo. + */ + /** + * A collection of packages, along with the monorepo tool used to load them, + * and (if supported by the tool) the associated "root" package. + */ + /** + * An object representing the root of a specific monorepo, with the root + * directory and associated monorepo tool. + * + * Note that this type is currently not used by Tool definitions directly, + * but it is the suggested way to pass around a reference to a monorepo root + * directory and associated tool. + */ + /** + * Monorepo tools may throw this error if a caller attempts to get the package + * collection from a directory that is not a valid monorepo root. + */ + var InvalidMonorepoError = class extends Error {}; + /** + * A monorepo tool is a specific implementation of monorepos, whether provided built-in + * by a package manager or via some other wrapper. + * + * Each tool defines a common interface for detecting whether a directory is + * a valid instance of this type of monorepo, how to retrieve the packages, etc. + */ + const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); + const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); + /** + * This internal method takes a list of one or more directory globs and the absolute path + * to the root directory, and returns a list of all matching relative directories that + * contain a `package.json` file. + */ + async function expandPackageGlobs(packageGlobs, directory) { + const directories = (await glob__default["default"](packageGlobs, { + cwd: directory, + onlyDirectories: true, + ignore: ["**/node_modules"] + })).map((p) => path__default["default"].resolve(directory, p)).sort(); + return (await Promise.all(directories.map((dir) => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch((err) => { + if (err && err.code === "ENOENT") return; + throw err; + }).then((result) => { + if (result) return { + dir: path__default["default"].resolve(dir), + relativeDir: path__default["default"].relative(directory, dir), + packageJson: JSON.parse(result) + }; + })))).filter((pkg) => pkg); + } + /** + * A synchronous version of {@link expandPackagesGlobs}. + */ + function expandPackageGlobsSync(packageGlobs, directory) { + return glob__default["default"].sync(packageGlobs, { + cwd: directory, + onlyDirectories: true, + ignore: ["**/node_modules"] + }).map((p) => path__default["default"].resolve(directory, p)).sort().map((dir) => { + try { + const packageJson = readJsonSync(dir, "package.json"); + return { + dir: path__default["default"].resolve(dir), + relativeDir: path__default["default"].relative(directory, dir), + packageJson + }; + } catch (err) { + if (err && err.code === "ENOENT") return; + throw err; + } + }).filter((pkg) => pkg); + } + const BoltTool = { + type: "bolt", + async isMonorepoRoot(directory) { + try { + const pkgJson = await readJson(directory, "package.json"); + if (pkgJson.bolt && pkgJson.bolt.workspaces) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + const pkgJson = readJsonSync(directory, "package.json"); + if (pkgJson.bolt && pkgJson.bolt.workspaces) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = await readJson(rootDir, "package.json"); + if (!pkgJson.bolt || !pkgJson.bolt.workspaces) throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); + const packageGlobs = pkgJson.bolt.workspaces; + return { + tool: BoltTool, + packages: await expandPackageGlobs(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = readJsonSync(rootDir, "package.json"); + if (!pkgJson.bolt || !pkgJson.bolt.workspaces) throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); + const packageGlobs = pkgJson.bolt.workspaces; + return { + tool: BoltTool, + packages: expandPackageGlobsSync(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); + throw err; + } + } + }; + const LernaTool = { + type: "lerna", + async isMonorepoRoot(directory) { + try { + if ((await readJson(directory, "lerna.json")).useWorkspaces !== true) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + if (readJsonSync(directory, "lerna.json").useWorkspaces !== true) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const lernaJson = await readJson(rootDir, "lerna.json"); + const pkgJson = await readJson(rootDir, "package.json"); + return { + tool: LernaTool, + packages: await expandPackageGlobs(lernaJson.packages || ["packages/*"], rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const lernaJson = readJsonSync(rootDir, "lerna.json"); + const pkgJson = readJsonSync(rootDir, "package.json"); + return { + tool: LernaTool, + packages: expandPackageGlobsSync(lernaJson.packages || ["packages/*"], rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); + throw err; + } + } + }; + async function readYamlFile(path) { + return fsp__default["default"].readFile(path, "utf8").then((data) => yaml__default["default"].load(data)); + } + function readYamlFileSync(path) { + return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); + } + const PnpmTool = { + type: "pnpm", + async isMonorepoRoot(directory) { + try { + if ((await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml"))).packages) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + if (readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")).packages) return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); + const pkgJson = await readJson(rootDir, "package.json"); + const packageGlobs = manifest.packages; + return { + tool: PnpmTool, + packages: await expandPackageGlobs(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); + const pkgJson = readJsonSync(rootDir, "package.json"); + const packageGlobs = manifest.packages; + return { + tool: PnpmTool, + packages: expandPackageGlobsSync(packageGlobs, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); + throw err; + } + } + }; + const RootTool = { + type: "root", + async isMonorepoRoot(directory) { + return false; + }, + isMonorepoRootSync(directory) { + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkg = { + dir: rootDir, + relativeDir: ".", + packageJson: await readJson(rootDir, "package.json") + }; + return { + tool: RootTool, + packages: [pkg], + rootPackage: pkg, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkg = { + dir: rootDir, + relativeDir: ".", + packageJson: readJsonSync(rootDir, "package.json") + }; + return { + tool: RootTool, + packages: [pkg], + rootPackage: pkg, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); + throw err; + } + } + }; + const RushTool = { + type: "rush", + async isMonorepoRoot(directory) { + try { + await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); + return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + }, + isMonorepoRootSync(directory) { + try { + fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); + return true; + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); + const directories = jju__default["default"].parse(rushText).projects.map((project) => path__default["default"].resolve(rootDir, project.projectFolder)); + return { + tool: RushTool, + packages: await Promise.all(directories.map(async (dir) => { + return { + dir, + relativeDir: path__default["default"].relative(directory, dir), + packageJson: await readJson(dir, "package.json") + }; + })), + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); + return { + tool: RushTool, + packages: jju__default["default"].parse(rushText).projects.map((project) => path__default["default"].resolve(rootDir, project.projectFolder)).map((dir) => { + const packageJson = readJsonSync(dir, "package.json"); + return { + dir, + relativeDir: path__default["default"].relative(directory, dir), + packageJson + }; + }), + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); + throw err; + } + } + }; + const YarnTool = { + type: "yarn", + async isMonorepoRoot(directory) { + try { + const pkgJson = await readJson(directory, "package.json"); + if (pkgJson.workspaces) { + if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) return true; + } + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + isMonorepoRootSync(directory) { + try { + const pkgJson = readJsonSync(directory, "package.json"); + if (pkgJson.workspaces) { + if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) return true; + } + } catch (err) { + if (err && err.code === "ENOENT") return false; + throw err; + } + return false; + }, + async getPackages(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = await readJson(rootDir, "package.json"); + return { + tool: YarnTool, + packages: await expandPackageGlobs(Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); + throw err; + } + }, + getPackagesSync(directory) { + const rootDir = path__default["default"].resolve(directory); + try { + const pkgJson = readJsonSync(rootDir, "package.json"); + return { + tool: YarnTool, + packages: expandPackageGlobsSync(Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages, rootDir), + rootPackage: { + dir: rootDir, + relativeDir: ".", + packageJson: pkgJson + }, + rootDir + }; + } catch (err) { + if (err && err.code === "ENOENT") throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); + throw err; + } + } + }; + exports.BoltTool = BoltTool; + exports.InvalidMonorepoError = InvalidMonorepoError; + exports.LernaTool = LernaTool; + exports.PnpmTool = PnpmTool; + exports.RootTool = RootTool; + exports.RushTool = RushTool; + exports.YarnTool = YarnTool; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+tools@1.1.2/node_modules/@manypkg/tools/dist/manypkg-tools.cjs.js +var require_manypkg_tools_cjs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + if (process.env.NODE_ENV === "production") module.exports = require_manypkg_tools_cjs_prod(); + else module.exports = require_manypkg_tools_cjs_dev(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@2.2.3/node_modules/@manypkg/find-root/dist/manypkg-find-root.cjs.prod.js +var require_manypkg_find_root_cjs_prod = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path$3 = __require("path"); + var fs$1 = __require("fs"); + var fsp$1 = __require("fs/promises"); + var tools = require_manypkg_tools_cjs(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path$3); + var fs__default = /*#__PURE__*/ _interopDefault(fs$1); + var fsp__default = /*#__PURE__*/ _interopDefault(fsp$1); + /** + * A default ordering for monorepo tool checks. + * + * This ordering is designed to check the most typical package.json-based + * monorepo implementations first, with tools based on custom file schemas + * checked last. + */ + const DEFAULT_TOOLS = [ + tools.YarnTool, + tools.PnpmTool, + tools.LernaTool, + tools.RushTool, + tools.BoltTool, + tools.RootTool + ]; + const isNoEntryError = (err) => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; + var NoPkgJsonFound = class extends Error { + constructor(directory) { + super(`No package.json could be found upwards from directory ${directory}`); + this.directory = directory; + } + }; + var NoMatchingMonorepoFound = class extends Error { + constructor(directory) { + super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); + this.directory = directory; + } + }; + /** + * Configuration options for `findRoot` and `findRootSync` functions. + */ + /** + * Given a starting folder, search that folder and its parents until a supported monorepo + * is found, and return a `MonorepoRoot` object with the discovered directory and a + * corresponding monorepo `Tool` object. + * + * By default, all predefined `Tool` implementations are included in the search -- the + * caller can provide a list of desired tools to restrict the types of monorepos discovered, + * or to provide a custom tool implementation. + */ + async function findRoot(cwd, options = {}) { + let monorepoRoot; + const tools$1 = options.tools || DEFAULT_TOOLS; + await findUp(async (directory) => { + return Promise.all(tools$1.map(async (tool) => { + if (await tool.isMonorepoRoot(directory)) return { + tool, + rootDir: directory + }; + })).then((x) => x.find((value) => value)).then((result) => { + if (result) { + monorepoRoot = result; + return directory; + } + }); + }, cwd); + if (monorepoRoot) return monorepoRoot; + if (!tools$1.includes(tools.RootTool)) throw new NoMatchingMonorepoFound(cwd); + let rootDir = await findUp(async (directory) => { + try { + await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); + return directory; + } catch (err) { + if (!isNoEntryError(err)) throw err; + } + }, cwd); + if (!rootDir) throw new NoPkgJsonFound(cwd); + return { + tool: tools.RootTool, + rootDir + }; + } + /** + * A synchronous version of {@link findRoot}. + */ + function findRootSync(cwd, options = {}) { + let monorepoRoot; + const tools$1 = options.tools || DEFAULT_TOOLS; + findUpSync((directory) => { + for (const tool of tools$1) if (tool.isMonorepoRootSync(directory)) { + monorepoRoot = { + tool, + rootDir: directory + }; + return directory; + } + }, cwd); + if (monorepoRoot) return monorepoRoot; + if (!tools$1.includes(tools.RootTool)) throw new NoMatchingMonorepoFound(cwd); + const rootDir = findUpSync((directory) => { + return fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")) ? directory : void 0; + }, cwd); + if (!rootDir) throw new NoPkgJsonFound(cwd); + return { + tool: tools.RootTool, + rootDir + }; + } + async function findUp(matcher, cwd) { + let directory = path__default["default"].resolve(cwd); + const { root } = path__default["default"].parse(directory); + while (directory && directory !== root) { + const filePath = await matcher(directory); + if (filePath) return path__default["default"].resolve(directory, filePath); + directory = path__default["default"].dirname(directory); + } + } + function findUpSync(matcher, cwd) { + let directory = path__default["default"].resolve(cwd); + const { root } = path__default["default"].parse(directory); + while (directory && directory !== root) { + const filePath = matcher(directory); + if (filePath) return path__default["default"].resolve(directory, filePath); + directory = path__default["default"].dirname(directory); + } + } + exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; + exports.NoPkgJsonFound = NoPkgJsonFound; + exports.findRoot = findRoot; + exports.findRootSync = findRootSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@2.2.3/node_modules/@manypkg/find-root/dist/manypkg-find-root.cjs.dev.js +var require_manypkg_find_root_cjs_dev = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path$2 = __require("path"); + var fs = __require("fs"); + var fsp = __require("fs/promises"); + var tools = require_manypkg_tools_cjs(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path$2); + var fs__default = /*#__PURE__*/ _interopDefault(fs); + var fsp__default = /*#__PURE__*/ _interopDefault(fsp); + /** + * A default ordering for monorepo tool checks. + * + * This ordering is designed to check the most typical package.json-based + * monorepo implementations first, with tools based on custom file schemas + * checked last. + */ + const DEFAULT_TOOLS = [ + tools.YarnTool, + tools.PnpmTool, + tools.LernaTool, + tools.RushTool, + tools.BoltTool, + tools.RootTool + ]; + const isNoEntryError = (err) => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; + var NoPkgJsonFound = class extends Error { + constructor(directory) { + super(`No package.json could be found upwards from directory ${directory}`); + this.directory = directory; + } + }; + var NoMatchingMonorepoFound = class extends Error { + constructor(directory) { + super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); + this.directory = directory; + } + }; + /** + * Configuration options for `findRoot` and `findRootSync` functions. + */ + /** + * Given a starting folder, search that folder and its parents until a supported monorepo + * is found, and return a `MonorepoRoot` object with the discovered directory and a + * corresponding monorepo `Tool` object. + * + * By default, all predefined `Tool` implementations are included in the search -- the + * caller can provide a list of desired tools to restrict the types of monorepos discovered, + * or to provide a custom tool implementation. + */ + async function findRoot(cwd, options = {}) { + let monorepoRoot; + const tools$1 = options.tools || DEFAULT_TOOLS; + await findUp(async (directory) => { + return Promise.all(tools$1.map(async (tool) => { + if (await tool.isMonorepoRoot(directory)) return { + tool, + rootDir: directory + }; + })).then((x) => x.find((value) => value)).then((result) => { + if (result) { + monorepoRoot = result; + return directory; + } + }); + }, cwd); + if (monorepoRoot) return monorepoRoot; + if (!tools$1.includes(tools.RootTool)) throw new NoMatchingMonorepoFound(cwd); + let rootDir = await findUp(async (directory) => { + try { + await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); + return directory; + } catch (err) { + if (!isNoEntryError(err)) throw err; + } + }, cwd); + if (!rootDir) throw new NoPkgJsonFound(cwd); + return { + tool: tools.RootTool, + rootDir + }; + } + /** + * A synchronous version of {@link findRoot}. + */ + function findRootSync(cwd, options = {}) { + let monorepoRoot; + const tools$1 = options.tools || DEFAULT_TOOLS; + findUpSync((directory) => { + for (const tool of tools$1) if (tool.isMonorepoRootSync(directory)) { + monorepoRoot = { + tool, + rootDir: directory + }; + return directory; + } + }, cwd); + if (monorepoRoot) return monorepoRoot; + if (!tools$1.includes(tools.RootTool)) throw new NoMatchingMonorepoFound(cwd); + const rootDir = findUpSync((directory) => { + return fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")) ? directory : void 0; + }, cwd); + if (!rootDir) throw new NoPkgJsonFound(cwd); + return { + tool: tools.RootTool, + rootDir + }; + } + async function findUp(matcher, cwd) { + let directory = path__default["default"].resolve(cwd); + const { root } = path__default["default"].parse(directory); + while (directory && directory !== root) { + const filePath = await matcher(directory); + if (filePath) return path__default["default"].resolve(directory, filePath); + directory = path__default["default"].dirname(directory); + } + } + function findUpSync(matcher, cwd) { + let directory = path__default["default"].resolve(cwd); + const { root } = path__default["default"].parse(directory); + while (directory && directory !== root) { + const filePath = matcher(directory); + if (filePath) return path__default["default"].resolve(directory, filePath); + directory = path__default["default"].dirname(directory); + } + } + exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; + exports.NoPkgJsonFound = NoPkgJsonFound; + exports.findRoot = findRoot; + exports.findRootSync = findRootSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+find-root@2.2.3/node_modules/@manypkg/find-root/dist/manypkg-find-root.cjs.js +var require_manypkg_find_root_cjs = /* @__PURE__ */ __commonJSMin$1(((exports, module) => { + if (process.env.NODE_ENV === "production") module.exports = require_manypkg_find_root_cjs_prod(); + else module.exports = require_manypkg_find_root_cjs_dev(); +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+get-packages@2.2.2/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.cjs.prod.js +var require_manypkg_get_packages_cjs_prod = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path$1 = __require("path"); + var findRoot = require_manypkg_find_root_cjs(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path$1); + var PackageJsonMissingNameError = class extends Error { + constructor(directories) { + super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); + this.directories = directories; + } + }; + /** + * Configuration options for `getPackages` and `getPackagesSync` functions. + */ + /** + * Given a starting folder, search that folder and its parents until a supported monorepo + * is found, and return the collection of packages and a corresponding monorepo `Tool` + * object. + * + * By default, all predefined `Tool` implementations are included in the search -- the + * caller can provide a list of desired tools to restrict the types of monorepos discovered, + * or to provide a custom tool implementation. + */ + async function getPackages(dir, options) { + const monorepoRoot = await findRoot.findRoot(dir, options); + const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); + validatePackages(packages); + return packages; + } + /** + * A synchronous version of {@link getPackages}. + */ + function getPackagesSync(dir, options) { + const monorepoRoot = findRoot.findRootSync(dir, options); + const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); + validatePackages(packages); + return packages; + } + function validatePackages(packages) { + const pkgJsonsMissingNameField = []; + for (const pkg of packages.packages) if (!pkg.packageJson.name) pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); + if (pkgJsonsMissingNameField.length > 0) { + pkgJsonsMissingNameField.sort(); + throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); + } + } + exports.PackageJsonMissingNameError = PackageJsonMissingNameError; + exports.getPackages = getPackages; + exports.getPackagesSync = getPackagesSync; +})); +//#endregion +//#region ../../node_modules/.pnpm/@manypkg+get-packages@2.2.2/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.cjs.dev.js +var require_manypkg_get_packages_cjs_dev = /* @__PURE__ */ __commonJSMin$1(((exports) => { + Object.defineProperty(exports, "__esModule", { value: true }); + var path = __require("path"); + var findRoot = require_manypkg_find_root_cjs(); + function _interopDefault(e) { + return e && e.__esModule ? e : { "default": e }; + } + var path__default = /*#__PURE__*/ _interopDefault(path); + var PackageJsonMissingNameError = class extends Error { + constructor(directories) { + super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); + this.directories = directories; + } + }; + /** + * Configuration options for `getPackages` and `getPackagesSync` functions. + */ + /** + * Given a starting folder, search that folder and its parents until a supported monorepo + * is found, and return the collection of packages and a corresponding monorepo `Tool` + * object. + * + * By default, all predefined `Tool` implementations are included in the search -- the + * caller can provide a list of desired tools to restrict the types of monorepos discovered, + * or to provide a custom tool implementation. + */ + async function getPackages(dir, options) { + const monorepoRoot = await findRoot.findRoot(dir, options); + const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); + validatePackages(packages); + return packages; + } + /** + * A synchronous version of {@link getPackages}. + */ + function getPackagesSync(dir, options) { + const monorepoRoot = findRoot.findRootSync(dir, options); + const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); + validatePackages(packages); + return packages; + } + function validatePackages(packages) { + const pkgJsonsMissingNameField = []; + for (const pkg of packages.packages) if (!pkg.packageJson.name) pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); + if (pkgJsonsMissingNameField.length > 0) { + pkgJsonsMissingNameField.sort(); + throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); + } + } + exports.PackageJsonMissingNameError = PackageJsonMissingNameError; + exports.getPackages = getPackages; + exports.getPackagesSync = getPackagesSync; +})); +//#endregion +//#region ../changeset-types.ts +var import_manypkg_get_packages_cjs = (/* @__PURE__ */ __commonJSMin$1(((exports, module) => { + if (process.env.NODE_ENV === "production") module.exports = require_manypkg_get_packages_cjs_prod(); + else module.exports = require_manypkg_get_packages_cjs_dev(); +})))(); +const messageTypes = [ + { + name: "compat", + title: "Compatibility Notes", + alternatives: [ + "compatibility", + "compatibility note", + "compat" + ] + }, + { + name: "feat", + title: "New Features", + alternatives: [ + "new", + "new functionality", + "feat" + ] + }, + { + name: "fix", + title: "Fixed Issues", + alternatives: [ + "bug", + "bug fix", + "fixed issue", + "fix", + "fix issue" + ] + }, + { + name: "known-issue", + title: "Known Issues", + alternatives: ["known issue"] + }, + { + name: "impr", + title: "Improvements", + alternatives: ["improvement", "improv"] + }, + { + name: "dep", + title: "Updated Dependencies", + alternatives: ["dependency", "dependency update"] + } +]; +//#endregion +//#region index.ts +function getPackageName(changelog) { + return changelog.split("\n")[0].split("/")[1]; +} +function splitByVersion(changelog) { + return changelog.split("\n## ").slice(1).map((h2) => { + const [version, ...content] = h2.split("\n"); + return { + version, + content: content.join("\n").trim() + }; + }); +} +function getMessageType(matchedType) { + if (!matchedType) throw new Error("Missing message type"); + const type = messageTypes.find(({ name, alternatives }) => [name, ...alternatives].includes(matchedType.toLowerCase())); + if (!type) throw new Error(`Invalid message type: ${matchedType}`); + return type; +} +function getSummary(matchedSummary) { + const summary = matchedSummary?.trim(); + if (!summary) throw new Error("Empty or missing summary"); + return summary; +} +function parseContent(content, version, packageName) { + const contentRegex = /- ((?.*?):) (\[(?.*?)\])? ?(?[^]*?)(?=(\n- |\n### |$))/g; + info(`parsing content for ${packageName} v${version}`); + return [...content.matchAll(contentRegex)].map(({ groups }) => { + const type = getMessageType(groups?.type); + return { + version, + summary: getSummary(groups?.summary), + packageNames: [packageName], + commit: groups.commit ? `(${groups.commit})` : "", + type + }; + }); +} +function parseChangelog(changelog) { + const packageName = getPackageName(changelog); + const [latest] = splitByVersion(changelog); + return parseContent(latest.content, latest.version, packageName).flat(); +} +function formatMessagesOfType(messages, type) { + const formattedMessages = messages.filter((msg) => msg.type.name === type.name).map((msg) => `- [${msg.packageNames.join(", ")}] ${msg.summary} ${msg.commit}${msg.dependencies || ""}`).join("\n"); + return `## ${type.title}\n\n${formattedMessages}`; +} +function mergeMessages(parsedMessages) { + return parsedMessages.reduce((prev, curr) => { + const sameMessage = prev.find((msg) => msg.summary === curr.summary && msg.dependencies === curr.dependencies && msg.version === curr.version && msg.type.name === curr.type.name); + if (sameMessage) { + sameMessage.packageNames.push(curr.packageNames[0]); + return prev; + } + return [...prev, curr]; + }, []); +} +async function formatChangelog(messages) { + if (!messages.length) throw new Error("No messages found in changelogs"); + return messageTypes.filter((type) => messages.some((msg) => msg.type.name === type.name)).map((type) => formatMessagesOfType(messages, type)).join("\n\n"); +} +async function getPublicChangelogs() { + const { packages } = await (0, import_manypkg_get_packages_cjs.getPackages)(process.cwd()); + const pathsToPublicLogs = packages.filter(({ packageJson }) => !packageJson.private).map(({ relativeDir }) => resolve(relativeDir, "CHANGELOG.md")); + info(`changelogs to merge: ${pathsToPublicLogs.join(", ")}`); + return Promise.all(pathsToPublicLogs.map(async (file) => readFile(file, { encoding: "utf8" }))); +} +async function writeChangelog(changelog) { + if (!changelog) throw new Error("CHANGELOG environment variable not set."); + if (!process.env.VERSION) throw new Error("VERSION environment variable not set."); + const unifiedChangelog = await readFile("CHANGELOG.md", { encoding: "utf8" }); + await writeFile("CHANGELOG.md", unifiedChangelog.split("\n").slice(0, 30).join("\n") + ` +# ${process.env.VERSION} +` + changelog + "\n\n" + unifiedChangelog.split("\n").slice(30).join("\n"), { encoding: "utf8" }); +} +async function mergeChangelogs() { + await writeChangelog(await formatChangelog(mergeMessages((await getPublicChangelogs()).map((log) => parseChangelog(log)).flat()))); +} +mergeChangelogs().catch((error) => { + setFailed(error.message); +}); +//#endregion +export { mergeChangelogs }; diff --git a/.github/actions/merge-and-write-changelogs/index.js b/.github/actions/merge-and-write-changelogs/index.js deleted file mode 100644 index e328dea3e5..0000000000 --- a/.github/actions/merge-and-write-changelogs/index.js +++ /dev/null @@ -1,46379 +0,0 @@ -import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; -/******/ var __webpack_modules__ = ({ - -/***/ 9286: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fs = __nccwpck_require__(9896); -var fsp = __nccwpck_require__(1943); -var tools = __nccwpck_require__(807); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); - -/** - * A default ordering for monorepo tool checks. - * - * This ordering is designed to check the most typical package.json-based - * monorepo implementations first, with tools based on custom file schemas - * checked last. - */ -const DEFAULT_TOOLS = [tools.YarnTool, tools.PnpmTool, tools.LernaTool, tools.RushTool, tools.BoltTool, tools.RootTool]; -const isNoEntryError = err => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; -class NoPkgJsonFound extends Error { - constructor(directory) { - super(`No package.json could be found upwards from directory ${directory}`); - this.directory = directory; - } -} -class NoMatchingMonorepoFound extends Error { - constructor(directory) { - super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); - this.directory = directory; - } -} - -/** - * Configuration options for `findRoot` and `findRootSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return a `MonorepoRoot` object with the discovered directory and a - * corresponding monorepo `Tool` object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function findRoot(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - await findUp(async directory => { - return Promise.all(tools$1.map(async tool => { - if (await tool.isMonorepoRoot(directory)) { - return { - tool: tool, - rootDir: directory - }; - } - })).then(x => x.find(value => value)).then(result => { - if (result) { - monorepoRoot = result; - return directory; - } - }); - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - let rootDir = await findUp(async directory => { - try { - await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); - return directory; - } catch (err) { - if (!isNoEntryError(err)) { - throw err; - } - } - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} - -/** - * A synchronous version of {@link findRoot}. - */ -function findRootSync(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - findUpSync(directory => { - for (const tool of tools$1) { - if (tool.isMonorepoRootSync(directory)) { - monorepoRoot = { - tool: tool, - rootDir: directory - }; - return directory; - } - } - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - const rootDir = findUpSync(directory => { - const exists = fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")); - return exists ? directory : undefined; - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} -async function findUp(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = await matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} -function findUpSync(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} - -exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; -exports.NoPkgJsonFound = NoPkgJsonFound; -exports.findRoot = findRoot; -exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 1307: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(7544); -} else { - module.exports = __nccwpck_require__(9286); -} - - -/***/ }), - -/***/ 7544: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fs = __nccwpck_require__(9896); -var fsp = __nccwpck_require__(1943); -var tools = __nccwpck_require__(807); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); - -/** - * A default ordering for monorepo tool checks. - * - * This ordering is designed to check the most typical package.json-based - * monorepo implementations first, with tools based on custom file schemas - * checked last. - */ -const DEFAULT_TOOLS = [tools.YarnTool, tools.PnpmTool, tools.LernaTool, tools.RushTool, tools.BoltTool, tools.RootTool]; -const isNoEntryError = err => !!err && typeof err === "object" && "code" in err && err.code === "ENOENT"; -class NoPkgJsonFound extends Error { - constructor(directory) { - super(`No package.json could be found upwards from directory ${directory}`); - this.directory = directory; - } -} -class NoMatchingMonorepoFound extends Error { - constructor(directory) { - super(`No monorepo matching the list of supported monorepos could be found upwards from directory ${directory}`); - this.directory = directory; - } -} - -/** - * Configuration options for `findRoot` and `findRootSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return a `MonorepoRoot` object with the discovered directory and a - * corresponding monorepo `Tool` object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function findRoot(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - await findUp(async directory => { - return Promise.all(tools$1.map(async tool => { - if (await tool.isMonorepoRoot(directory)) { - return { - tool: tool, - rootDir: directory - }; - } - })).then(x => x.find(value => value)).then(result => { - if (result) { - monorepoRoot = result; - return directory; - } - }); - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - let rootDir = await findUp(async directory => { - try { - await fsp__default["default"].access(path__default["default"].join(directory, "package.json")); - return directory; - } catch (err) { - if (!isNoEntryError(err)) { - throw err; - } - } - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} - -/** - * A synchronous version of {@link findRoot}. - */ -function findRootSync(cwd, options = {}) { - let monorepoRoot; - const tools$1 = options.tools || DEFAULT_TOOLS; - findUpSync(directory => { - for (const tool of tools$1) { - if (tool.isMonorepoRootSync(directory)) { - monorepoRoot = { - tool: tool, - rootDir: directory - }; - return directory; - } - } - }, cwd); - if (monorepoRoot) { - return monorepoRoot; - } - if (!tools$1.includes(tools.RootTool)) { - throw new NoMatchingMonorepoFound(cwd); - } - - // If there is no monorepo root, but we can find a single package json file, we will - // return a "RootTool" repo, which is the special case where we just have a root package - // with no monorepo implementation (i.e.: a normal package folder). - const rootDir = findUpSync(directory => { - const exists = fs__default["default"].existsSync(path__default["default"].join(directory, "package.json")); - return exists ? directory : undefined; - }, cwd); - if (!rootDir) { - throw new NoPkgJsonFound(cwd); - } - return { - tool: tools.RootTool, - rootDir - }; -} -async function findUp(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = await matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} -function findUpSync(matcher, cwd) { - let directory = path__default["default"].resolve(cwd); - const { - root - } = path__default["default"].parse(directory); - while (directory && directory !== root) { - const filePath = matcher(directory); - if (filePath) { - return path__default["default"].resolve(directory, filePath); - } - directory = path__default["default"].dirname(directory); - } -} - -exports.NoMatchingMonorepoFound = NoMatchingMonorepoFound; -exports.NoPkgJsonFound = NoPkgJsonFound; -exports.findRoot = findRoot; -exports.findRootSync = findRootSync; - - -/***/ }), - -/***/ 9425: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ value: true }); - -var path = __nccwpck_require__(6928); -var findRoot = __nccwpck_require__(1307); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); - -class PackageJsonMissingNameError extends Error { - constructor(directories) { - super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); - this.directories = directories; - } -} - -/** - * Configuration options for `getPackages` and `getPackagesSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return the collection of packages and a corresponding monorepo `Tool` - * object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function getPackages(dir, options) { - const monorepoRoot = await findRoot.findRoot(dir, options); - const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} - -/** - * A synchronous version of {@link getPackages}. - */ -function getPackagesSync(dir, options) { - const monorepoRoot = findRoot.findRootSync(dir, options); - const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} -function validatePackages(packages) { - const pkgJsonsMissingNameField = []; - for (const pkg of packages.packages) { - if (!pkg.packageJson.name) { - pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); - } - } - if (pkgJsonsMissingNameField.length > 0) { - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - } -} - -__webpack_unused_export__ = PackageJsonMissingNameError; -exports.getPackages = getPackages; -__webpack_unused_export__ = getPackagesSync; - - -/***/ }), - -/***/ 4344: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(2313); -} else { - module.exports = __nccwpck_require__(9425); -} - - -/***/ }), - -/***/ 2313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ value: true }); - -var path = __nccwpck_require__(6928); -var findRoot = __nccwpck_require__(1307); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); - -class PackageJsonMissingNameError extends Error { - constructor(directories) { - super(`The following package.jsons are missing the "name" field:\n${directories.join("\n")}`); - this.directories = directories; - } -} - -/** - * Configuration options for `getPackages` and `getPackagesSync` functions. - */ - -/** - * Given a starting folder, search that folder and its parents until a supported monorepo - * is found, and return the collection of packages and a corresponding monorepo `Tool` - * object. - * - * By default, all predefined `Tool` implementations are included in the search -- the - * caller can provide a list of desired tools to restrict the types of monorepos discovered, - * or to provide a custom tool implementation. - */ -async function getPackages(dir, options) { - const monorepoRoot = await findRoot.findRoot(dir, options); - const packages = await monorepoRoot.tool.getPackages(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} - -/** - * A synchronous version of {@link getPackages}. - */ -function getPackagesSync(dir, options) { - const monorepoRoot = findRoot.findRootSync(dir, options); - const packages = monorepoRoot.tool.getPackagesSync(monorepoRoot.rootDir); - validatePackages(packages); - return packages; -} -function validatePackages(packages) { - const pkgJsonsMissingNameField = []; - for (const pkg of packages.packages) { - if (!pkg.packageJson.name) { - pkgJsonsMissingNameField.push(path__default["default"].join(pkg.relativeDir, "package.json")); - } - } - if (pkgJsonsMissingNameField.length > 0) { - pkgJsonsMissingNameField.sort(); - throw new PackageJsonMissingNameError(pkgJsonsMissingNameField); - } -} - -__webpack_unused_export__ = PackageJsonMissingNameError; -exports.getPackages = getPackages; -__webpack_unused_export__ = getPackagesSync; - - -/***/ }), - -/***/ 2610: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fsp = __nccwpck_require__(1943); -var glob = __nccwpck_require__(2457); -var fs = __nccwpck_require__(9896); -var yaml = __nccwpck_require__(1179); -var jju = __nccwpck_require__(9656); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); -var glob__default = /*#__PURE__*/_interopDefault(glob); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var yaml__default = /*#__PURE__*/_interopDefault(yaml); -var jju__default = /*#__PURE__*/_interopDefault(jju); - -/** - * A package.json access type. - */ - -/** - * An in-memory representation of a package.json file. - */ - -/** - * An individual package json structure, along with the directory it lives in, - * relative to the root of the current monorepo. - */ - -/** - * A collection of packages, along with the monorepo tool used to load them, - * and (if supported by the tool) the associated "root" package. - */ - -/** - * An object representing the root of a specific monorepo, with the root - * directory and associated monorepo tool. - * - * Note that this type is currently not used by Tool definitions directly, - * but it is the suggested way to pass around a reference to a monorepo root - * directory and associated tool. - */ - -/** - * Monorepo tools may throw this error if a caller attempts to get the package - * collection from a directory that is not a valid monorepo root. - */ -class InvalidMonorepoError extends Error {} - -/** - * A monorepo tool is a specific implementation of monorepos, whether provided built-in - * by a package manager or via some other wrapper. - * - * Each tool defines a common interface for detecting whether a directory is - * a valid instance of this type of monorepo, how to retrieve the packages, etc. - */ - -const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); -const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); - -/** - * This internal method takes a list of one or more directory globs and the absolute path - * to the root directory, and returns a list of all matching relative directories that - * contain a `package.json` file. - */ -async function expandPackageGlobs(packageGlobs, directory) { - const relativeDirectories = await glob__default["default"](packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = await Promise.all(directories.map(dir => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch(err => { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - }).then(result => { - if (result) { - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson: JSON.parse(result) - }; - } - }))); - return discoveredPackages.filter(pkg => pkg); -} - -/** - * A synchronous version of {@link expandPackagesGlobs}. - */ -function expandPackageGlobsSync(packageGlobs, directory) { - const relativeDirectories = glob__default["default"].sync(packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = directories.map(dir => { - try { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - } catch (err) { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - } - }); - return discoveredPackages.filter(pkg => pkg); -} - -const BoltTool = { - type: "bolt", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - } -}; - -const LernaTool = { - type: "lerna", - async isMonorepoRoot(directory) { - try { - const lernaJson = await readJson(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const lernaJson = readJsonSync(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = await readJson(rootDir, "lerna.json"); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = readJsonSync(rootDir, "lerna.json"); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - } -}; - -async function readYamlFile(path) { - return fsp__default["default"].readFile(path, "utf8").then(data => yaml__default["default"].load(data)); -} -function readYamlFileSync(path) { - return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); -} -const PnpmTool = { - type: "pnpm", - async isMonorepoRoot(directory) { - try { - const manifest = await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const manifest = readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - } -}; - -const RootTool = { - type: "root", - async isMonorepoRoot(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - isMonorepoRootSync(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - } -}; - -const RushTool = { - type: "rush", - async isMonorepoRoot(directory) { - try { - await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - isMonorepoRootSync(directory) { - try { - fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = await Promise.all(directories.map(async dir => { - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson: await readJson(dir, "package.json") - }; - })); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = directories.map(dir => { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - }); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - } -}; - -const YarnTool = { - type: "yarn", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - } -}; - -exports.BoltTool = BoltTool; -exports.InvalidMonorepoError = InvalidMonorepoError; -exports.LernaTool = LernaTool; -exports.PnpmTool = PnpmTool; -exports.RootTool = RootTool; -exports.RushTool = RushTool; -exports.YarnTool = YarnTool; - - -/***/ }), - -/***/ 807: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -if (process.env.NODE_ENV === "production") { - module.exports = __nccwpck_require__(4452); -} else { - module.exports = __nccwpck_require__(2610); -} - - -/***/ }), - -/***/ 4452: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var path = __nccwpck_require__(6928); -var fsp = __nccwpck_require__(1943); -var glob = __nccwpck_require__(2457); -var fs = __nccwpck_require__(9896); -var yaml = __nccwpck_require__(1179); -var jju = __nccwpck_require__(9656); - -function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefault(path); -var fsp__default = /*#__PURE__*/_interopDefault(fsp); -var glob__default = /*#__PURE__*/_interopDefault(glob); -var fs__default = /*#__PURE__*/_interopDefault(fs); -var yaml__default = /*#__PURE__*/_interopDefault(yaml); -var jju__default = /*#__PURE__*/_interopDefault(jju); - -/** - * A package.json access type. - */ - -/** - * An in-memory representation of a package.json file. - */ - -/** - * An individual package json structure, along with the directory it lives in, - * relative to the root of the current monorepo. - */ - -/** - * A collection of packages, along with the monorepo tool used to load them, - * and (if supported by the tool) the associated "root" package. - */ - -/** - * An object representing the root of a specific monorepo, with the root - * directory and associated monorepo tool. - * - * Note that this type is currently not used by Tool definitions directly, - * but it is the suggested way to pass around a reference to a monorepo root - * directory and associated tool. - */ - -/** - * Monorepo tools may throw this error if a caller attempts to get the package - * collection from a directory that is not a valid monorepo root. - */ -class InvalidMonorepoError extends Error {} - -/** - * A monorepo tool is a specific implementation of monorepos, whether provided built-in - * by a package manager or via some other wrapper. - * - * Each tool defines a common interface for detecting whether a directory is - * a valid instance of this type of monorepo, how to retrieve the packages, etc. - */ - -const readJson = async (directory, file) => JSON.parse(await fsp__default["default"].readFile(path__default["default"].join(directory, file), "utf-8")); -const readJsonSync = (directory, file) => JSON.parse(fs__default["default"].readFileSync(path__default["default"].join(directory, file), "utf-8")); - -/** - * This internal method takes a list of one or more directory globs and the absolute path - * to the root directory, and returns a list of all matching relative directories that - * contain a `package.json` file. - */ -async function expandPackageGlobs(packageGlobs, directory) { - const relativeDirectories = await glob__default["default"](packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = await Promise.all(directories.map(dir => fsp__default["default"].readFile(path__default["default"].join(dir, "package.json"), "utf-8").catch(err => { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - }).then(result => { - if (result) { - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson: JSON.parse(result) - }; - } - }))); - return discoveredPackages.filter(pkg => pkg); -} - -/** - * A synchronous version of {@link expandPackagesGlobs}. - */ -function expandPackageGlobsSync(packageGlobs, directory) { - const relativeDirectories = glob__default["default"].sync(packageGlobs, { - cwd: directory, - onlyDirectories: true, - ignore: ["**/node_modules"] - }); - const directories = relativeDirectories.map(p => path__default["default"].resolve(directory, p)).sort(); - const discoveredPackages = directories.map(dir => { - try { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir: path__default["default"].resolve(dir), - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - } catch (err) { - if (err && err.code === "ENOENT") { - return undefined; - } - throw err; - } - }); - return discoveredPackages.filter(pkg => pkg); -} - -const BoltTool = { - type: "bolt", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.bolt && pkgJson.bolt.workspaces) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - if (!pkgJson.bolt || !pkgJson.bolt.workspaces) { - throw new InvalidMonorepoError(`Directory ${directory} is not a valid ${BoltTool.type} monorepo root: missing bolt.workspaces entry`); - } - const packageGlobs = pkgJson.bolt.workspaces; - return { - tool: BoltTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${BoltTool.type} monorepo root: missing package.json`); - } - throw err; - } - } -}; - -const LernaTool = { - type: "lerna", - async isMonorepoRoot(directory) { - try { - const lernaJson = await readJson(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const lernaJson = readJsonSync(directory, "lerna.json"); - if (lernaJson.useWorkspaces !== true) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = await readJson(rootDir, "lerna.json"); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const lernaJson = readJsonSync(rootDir, "lerna.json"); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = lernaJson.packages || ["packages/*"]; - return { - tool: LernaTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${LernaTool.type} monorepo root: missing lerna.json and/or package.json`); - } - throw err; - } - } -}; - -async function readYamlFile(path) { - return fsp__default["default"].readFile(path, "utf8").then(data => yaml__default["default"].load(data)); -} -function readYamlFileSync(path) { - return yaml__default["default"].load(fs__default["default"].readFileSync(path, "utf8")); -} -const PnpmTool = { - type: "pnpm", - async isMonorepoRoot(directory) { - try { - const manifest = await readYamlFile(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const manifest = readYamlFileSync(path__default["default"].join(directory, "pnpm-workspace.yaml")); - if (manifest.packages) { - return true; - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = await readYamlFile(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const manifest = readYamlFileSync(path__default["default"].join(rootDir, "pnpm-workspace.yaml")); - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = manifest.packages; - return { - tool: PnpmTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${PnpmTool.type} monorepo root: missing pnpm-workspace.yaml and/or package.json`); - } - throw err; - } - } -}; - -const RootTool = { - type: "root", - async isMonorepoRoot(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - isMonorepoRootSync(directory) { - // The single package tool is never the root of a monorepo. - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const pkg = { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }; - return { - tool: RootTool, - packages: [pkg], - rootPackage: pkg, - rootDir: rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RootTool.type} monorepo root`); - } - throw err; - } - } -}; - -const RushTool = { - type: "rush", - async isMonorepoRoot(directory) { - try { - await fsp__default["default"].readFile(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - isMonorepoRootSync(directory) { - try { - fs__default["default"].readFileSync(path__default["default"].join(directory, "rush.json"), "utf8"); - return true; - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = await fsp__default["default"].readFile(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = await Promise.all(directories.map(async dir => { - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson: await readJson(dir, "package.json") - }; - })); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const rushText = fs__default["default"].readFileSync(path__default["default"].join(rootDir, "rush.json"), "utf8"); - - // Rush configuration files are full of inline and block-scope comment blocks (JSONC), - // so we use a parser that can handle that. - const rushJson = jju__default["default"].parse(rushText); - const directories = rushJson.projects.map(project => path__default["default"].resolve(rootDir, project.projectFolder)); - const packages = directories.map(dir => { - const packageJson = readJsonSync(dir, "package.json"); - return { - dir, - relativeDir: path__default["default"].relative(directory, dir), - packageJson - }; - }); - - // Rush does not have a root package - return { - tool: RushTool, - packages, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${RushTool.type} monorepo root: missing rush.json`); - } - throw err; - } - } -}; - -const YarnTool = { - type: "yarn", - async isMonorepoRoot(directory) { - try { - const pkgJson = await readJson(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - isMonorepoRootSync(directory) { - try { - const pkgJson = readJsonSync(directory, "package.json"); - if (pkgJson.workspaces) { - if (Array.isArray(pkgJson.workspaces) || Array.isArray(pkgJson.workspaces.packages)) { - return true; - } - } - } catch (err) { - if (err && err.code === "ENOENT") { - return false; - } - throw err; - } - return false; - }, - async getPackages(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = await readJson(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: await expandPackageGlobs(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - }, - getPackagesSync(directory) { - const rootDir = path__default["default"].resolve(directory); - try { - const pkgJson = readJsonSync(rootDir, "package.json"); - const packageGlobs = Array.isArray(pkgJson.workspaces) ? pkgJson.workspaces : pkgJson.workspaces.packages; - return { - tool: YarnTool, - packages: expandPackageGlobsSync(packageGlobs, rootDir), - rootPackage: { - dir: rootDir, - relativeDir: ".", - packageJson: pkgJson - }, - rootDir - }; - } catch (err) { - if (err && err.code === "ENOENT") { - throw new InvalidMonorepoError(`Directory ${rootDir} is not a valid ${YarnTool.type} monorepo root`); - } - throw err; - } - } -}; - -exports.BoltTool = BoltTool; -exports.InvalidMonorepoError = InvalidMonorepoError; -exports.LernaTool = LernaTool; -exports.PnpmTool = PnpmTool; -exports.RootTool = RootTool; -exports.RushTool = RushTool; -exports.YarnTool = YarnTool; - - -/***/ }), - -/***/ 5254: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1121: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; -const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); -if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); -} -const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); -const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); -const SUPPORTED_MAJOR_VERSION = 10; -const SUPPORTED_MINOR_VERSION = 10; -const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; -const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; -/** - * IS `true` for Node.js 10.10 and greater. - */ -exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - - -/***/ }), - -/***/ 1484: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.scandirSync = exports.scandir = void 0; -const async = __nccwpck_require__(9977); -const sync = __nccwpck_require__(5554); -const settings_1 = __nccwpck_require__(595); -exports.Settings = settings_1.default; -function scandir(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.scandir = scandir; -function scandirSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.scandirSync = scandirSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9977: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const rpl = __nccwpck_require__(7906); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); -} -exports.read = read; -function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; -} -function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path, settings.fsStatSettings, (error, stats) => { - if (error !== null) { - done(error); - return; - } - const entry = { - name, - path, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); -} -exports.readdir = readdir; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 9392: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = void 0; -function joinPathSegments(a, b, separator) { - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 5554: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(1309); -const constants_1 = __nccwpck_require__(1121); -const utils = __nccwpck_require__(2046); -const common = __nccwpck_require__(9392); -function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); -} -exports.read = read; -function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } - catch (error) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error; - } - } - } - return entry; - }); -} -exports.readdirWithFileTypes = readdirWithFileTypes; -function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); -} -exports.readdir = readdir; - - -/***/ }), - -/***/ 595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const fs = __nccwpck_require__(5254); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2535: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 2046: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fs = void 0; -const fs = __nccwpck_require__(2535); -exports.fs = fs; - - -/***/ }), - -/***/ 5375: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -exports.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync -}; -function createFileSystemAdapter(fsMethods) { - if (fsMethods === undefined) { - return exports.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); -} -exports.createFileSystemAdapter = createFileSystemAdapter; - - -/***/ }), - -/***/ 1309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.statSync = exports.stat = exports.Settings = void 0; -const async = __nccwpck_require__(9100); -const sync = __nccwpck_require__(4421); -const settings_1 = __nccwpck_require__(8448); -exports.Settings = settings_1.default; -function stat(path, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - async.read(path, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path, getSettings(optionsOrSettingsOrCallback), callback); -} -exports.stat = stat; -function statSync(path, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path, settings); -} -exports.statSync = statSync; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 9100: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings, callback) { - settings.fs.lstat(path, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); -} -exports.read = read; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, result) { - callback(null, result); -} - - -/***/ }), - -/***/ 4421: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.read = void 0; -function read(path, settings) { - const lstat = settings.fs.lstatSync(path); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } - catch (error) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error; - } -} -exports.read = read; - - -/***/ }), - -/***/ 8448: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs = __nccwpck_require__(5375); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 2705: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; -const async_1 = __nccwpck_require__(6200); -const stream_1 = __nccwpck_require__(2); -const sync_1 = __nccwpck_require__(6345); -const settings_1 = __nccwpck_require__(2287); -exports.Settings = settings_1.default; -function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === 'function') { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); -} -exports.walk = walk; -function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); -} -exports.walkSync = walkSync; -function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); -} -exports.walkStream = walkStream; -function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); -} - - -/***/ }), - -/***/ 6200: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(826); -class AsyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error) => { - callFailureCallback(callback, error); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } -} -exports["default"] = AsyncProvider; -function callFailureCallback(callback, error) { - callback(error); -} -function callSuccessCallback(callback, entries) { - callback(null, entries); -} - - -/***/ }), - -/***/ 2: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const async_1 = __nccwpck_require__(826); -class StreamProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error) => { - this._stream.emit('error', error); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } -} -exports["default"] = StreamProvider; - - -/***/ }), - -/***/ 6345: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(127); -class SyncProvider { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } -} -exports["default"] = SyncProvider; - - -/***/ }), - -/***/ 826: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(4434); -const fsScandir = __nccwpck_require__(1484); -const fastq = __nccwpck_require__(885); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class AsyncReader extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit('end'); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error('The reader is already destroyed'); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on('entry', callback); - } - onError(callback) { - this._emitter.once('error', callback); - } - onEnd(callback) { - this._emitter.once('end', callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error) => { - if (error !== null) { - this._handleError(error); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { - if (error !== null) { - done(error, undefined); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, undefined); - }); - } - _handleError(error) { - if (this._isDestroyed || !common.isFatalError(this._settings, error)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit('error', error); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit('entry', entry); - } -} -exports["default"] = AsyncReader; - - -/***/ }), - -/***/ 5305: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; -function isFatalError(settings, error) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error); -} -exports.isFatalError = isFatalError; -function isAppliedFilter(filter, value) { - return filter === null || filter(value); -} -exports.isAppliedFilter = isAppliedFilter; -function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); -} -exports.replacePathSegmentSeparator = replacePathSegmentSeparator; -function joinPathSegments(a, b, separator) { - if (a === '') { - return b; - } - /** - * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). - */ - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; -} -exports.joinPathSegments = joinPathSegments; - - -/***/ }), - -/***/ 2983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const common = __nccwpck_require__(5305); -class Reader { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 127: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsScandir = __nccwpck_require__(1484); -const common = __nccwpck_require__(5305); -const reader_1 = __nccwpck_require__(2983); -class SyncReader extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } - catch (error) { - this._handleError(error); - } - } - _handleError(error) { - if (!common.isFatalError(this._settings, error)) { - return; - } - throw error; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== undefined) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } -} -exports["default"] = SyncReader; - - -/***/ }), - -/***/ 2287: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsScandir = __nccwpck_require__(1484); -class Settings { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, undefined); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 8671: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); -const compile = __nccwpck_require__(4898); -const expand = __nccwpck_require__(5331); -const parse = __nccwpck_require__(168); - -/** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - - let result = expand(input, options); - - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; - - -/***/ }), - -/***/ 4898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const utils = __nccwpck_require__(2474); - -const compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - - if (node.isClose === true) { - console.log('node.isClose', prefix, node.value); - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? prefix + node.value : '('; - } - - if (node.type === 'close') { - return invalid ? prefix + node.value : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - - return output; - }; - - return walk(ast); -}; - -module.exports = compile; - - -/***/ }), - -/***/ 1778: -/***/ ((module) => { - - - -module.exports = { - MAX_LENGTH: 10000, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; - - -/***/ }), - -/***/ 5331: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const fill = __nccwpck_require__(9730); -const stringify = __nccwpck_require__(3062); -const utils = __nccwpck_require__(2474); - -const append = (queue = '', stash = '', enclose = false) => { - const result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; - - const walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; - - -/***/ }), - -/***/ 168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const stringify = __nccwpck_require__(3062); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __nccwpck_require__(1778); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - const opts = options || {}; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - const ast = { type: 'root', input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - const open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - const brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - const type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid - do { - block = stack.pop(); - - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - const parent = stack[stack.length - 1]; - const index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 3062: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(2474); - -module.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - - - -/***/ }), - -/***/ 2474: -/***/ ((__unused_webpack_module, exports) => { - - - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - const node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - - if (Array.isArray(ele)) { - flat(ele); - continue; - } - - if (ele !== undefined) { - result.push(ele); - } - } - return result; - }; - - flat(args); - return result; -}; - - -/***/ }), - -/***/ 2457: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const taskManager = __nccwpck_require__(6160); -const async_1 = __nccwpck_require__(3616); -const stream_1 = __nccwpck_require__(2410); -const sync_1 = __nccwpck_require__(3473); -const settings_1 = __nccwpck_require__(948); -const utils = __nccwpck_require__(123); -async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); -} -// https://github.com/typescript-eslint/typescript-eslint/issues/60 -// eslint-disable-next-line no-redeclare -(function (FastGlob) { - FastGlob.glob = FastGlob; - FastGlob.globSync = sync; - FastGlob.globStream = stream; - FastGlob.async = FastGlob; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - /** - * The stream returned by the provider cannot work with an asynchronous iterator. - * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams. - * This affects performance (+25%). I don't see best solution right now. - */ - return utils.stream.merge(works); - } - FastGlob.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob.convertPathToPattern = convertPathToPattern; - let posix; - (function (posix) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix.convertPathToPattern = convertPathToPattern; - })(posix = FastGlob.posix || (FastGlob.posix = {})); - let win32; - (function (win32) { - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win32.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win32.convertPathToPattern = convertPathToPattern; - })(win32 = FastGlob.win32 || (FastGlob.win32 = {})); -})(FastGlob || (FastGlob = {})); -function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); -} -function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError('Patterns must be a string (non empty) or an array of strings'); - } -} -module.exports = FastGlob; - - -/***/ }), - -/***/ 6160: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; -const utils = __nccwpck_require__(123); -function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); - const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true); - return staticTasks.concat(dynamicTasks); -} -exports.generate = generate; -function processPatterns(input, settings) { - let patterns = input; - /** - * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry - * and some problems with the micromatch package (see fast-glob issues: #365, #394). - * - * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown - * in matching in the case of a large set of patterns after expansion. - */ - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - /** - * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used - * at any nesting level. - * - * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change - * the pattern in the filter before creating a regular expression. There is no need to change the patterns - * in the application. Only on the input. - */ - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`); - } - /** - * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. - */ - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); -} -/** - * Returns tasks grouped by basic pattern directories. - * - * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. - * This is necessary because directory traversal starts at the base directory and goes deeper. - */ -function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - /* - * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory - * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. - */ - if ('.' in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); - } - else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; -} -exports.convertPatternsToTasks = convertPatternsToTasks; -function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); -} -exports.getPositivePatterns = getPositivePatterns; -function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; -} -exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive; -function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } - else { - collection[base] = [pattern]; - } - return collection; - }, group); -} -exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; -function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); -} -exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks; -function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; -} -exports.convertPatternGroupToTask = convertPatternGroupToTask; - - -/***/ }), - -/***/ 3616: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(6866); -const provider_1 = __nccwpck_require__(3815); -class ProviderAsync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderAsync; - - -/***/ }), - -/***/ 4084: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -const partial_1 = __nccwpck_require__(3147); -class DeepFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - /** - * Avoid unnecessary depth calculations when it doesn't matter. - */ - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split('/').length; - if (basePath === '') { - return entryPathDepth; - } - const basePathDepth = basePath.split('/').length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } -} -exports["default"] = DeepFilter; - - -/***/ }), - -/***/ 2552: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryFilter { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, undefined); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - // Trying to match files and directories by patterns. - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - // A pattern with a trailling slash can be used for directory matching. - // To apply such pattern, we need to add a tralling slash to the path. - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + '/', patternsRe); - } - return isMatched; - } -} -exports["default"] = EntryFilter; - - -/***/ }), - -/***/ 5042: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class ErrorFilter { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error) => this._isNonFatalError(error); - } - _isNonFatalError(error) { - return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; - } -} -exports["default"] = ErrorFilter; - - -/***/ }), - -/***/ 5828: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class Matcher { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } -} -exports["default"] = Matcher; - - -/***/ }), - -/***/ 3147: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const matcher_1 = __nccwpck_require__(5828); -class PartialMatcher extends matcher_1.default { - match(filepath) { - const parts = filepath.split('/'); - const levels = parts.length; - const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - /** - * In this case, the pattern has a globstar and we must read all directories unconditionally, - * but only if the level has reached the end of the first group. - * - * fixtures/{a,b}/** - * ^ true/false ^ always true - */ - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } -} -exports["default"] = PartialMatcher; - - -/***/ }), - -/***/ 3815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const deep_1 = __nccwpck_require__(4084); -const entry_1 = __nccwpck_require__(2552); -const error_1 = __nccwpck_require__(5042); -const entry_2 = __nccwpck_require__(825); -class Provider { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === '.' ? '' : task.base; - return { - basePath, - pathSegmentSeparator: '/', - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } -} -exports["default"] = Provider; - - -/***/ }), - -/***/ 2410: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const stream_2 = __nccwpck_require__(1980); -const provider_1 = __nccwpck_require__(3815); -class ProviderStream extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); - source - .once('error', (error) => destination.emit('error', error)) - .on('data', (entry) => destination.emit('data', options.transform(entry))) - .once('end', () => destination.emit('end')); - destination - .once('close', () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderStream; - - -/***/ }), - -/***/ 3473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(967); -const provider_1 = __nccwpck_require__(3815); -class ProviderSync extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } -} -exports["default"] = ProviderSync; - - -/***/ }), - -/***/ 825: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(123); -class EntryTransformer { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += '/'; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } -} -exports["default"] = EntryTransformer; - - -/***/ }), - -/***/ 6866: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -const stream_1 = __nccwpck_require__(1980); -class ReaderAsync extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve, reject) => { - this._walkAsync(root, options, (error, entries) => { - if (error === null) { - resolve(entries); - } - else { - reject(error); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - // After #235, replace it with an asynchronous iterator. - return new Promise((resolve, reject) => { - stream.once('error', reject); - stream.on('data', (entry) => entries.push(entry)); - stream.once('end', () => resolve(entries)); - }); - } -} -exports["default"] = ReaderAsync; - - -/***/ }), - -/***/ 6703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(6928); -const fsStat = __nccwpck_require__(1309); -const utils = __nccwpck_require__(123); -class Reader { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error) { - return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; - } -} -exports["default"] = Reader; - - -/***/ }), - -/***/ 1980: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2203); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderStream extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options) - .then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }) - .catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath) - .then((stats) => this._makeEntry(stats, pattern)) - .catch((error) => { - if (options.errorFilter(error)) { - return null; - } - throw error; - }); - } - _getStat(filepath) { - return new Promise((resolve, reject) => { - this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve(stats) : reject(error); - }); - }); - } -} -exports["default"] = ReaderStream; - - -/***/ }), - -/***/ 967: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsStat = __nccwpck_require__(1309); -const fsWalk = __nccwpck_require__(2705); -const reader_1 = __nccwpck_require__(6703); -class ReaderSync extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } - catch (error) { - if (options.errorFilter(error)) { - return null; - } - throw error; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } -} -exports["default"] = ReaderSync; - - -/***/ }), - -/***/ 948: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(9896); -const os = __nccwpck_require__(857); -/** - * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. - * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 - */ -const CPU_COUNT = Math.max(os.cpus().length, 1); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - lstatSync: fs.lstatSync, - stat: fs.stat, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync -}; -class Settings { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - // Remove the cast to the array in the next major (#404). - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === undefined ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } -} -exports["default"] = Settings; - - -/***/ }), - -/***/ 3614: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitWhen = exports.flatten = void 0; -function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); -} -exports.flatten = flatten; -function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } - else { - result[groupIndex].push(item); - } - } - return result; -} -exports.splitWhen = splitWhen; - - -/***/ }), - -/***/ 163: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEnoentCodeError = void 0; -function isEnoentCodeError(error) { - return error.code === 'ENOENT'; -} -exports.isEnoentCodeError = isEnoentCodeError; - - -/***/ }), - -/***/ 9416: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDirentFromStats = void 0; -class DirentFromStats { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } -} -function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); -} -exports.createDirentFromStats = createDirentFromStats; - - -/***/ }), - -/***/ 123: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; -const array = __nccwpck_require__(3614); -exports.array = array; -const errno = __nccwpck_require__(163); -exports.errno = errno; -const fs = __nccwpck_require__(9416); -exports.fs = fs; -const path = __nccwpck_require__(8692); -exports.path = path; -const pattern = __nccwpck_require__(5869); -exports.pattern = pattern; -const stream = __nccwpck_require__(9103); -exports.stream = stream; -const string = __nccwpck_require__(3682); -exports.string = string; - - -/***/ }), - -/***/ 8692: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; -const os = __nccwpck_require__(857); -const path = __nccwpck_require__(6928); -const IS_WINDOWS_PLATFORM = os.platform() === 'win32'; -const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ -/** - * All non-escaped special characters. - * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. - * Windows: (){}[], !+@ before (, ! at the beginning. - */ -const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; -const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; -/** - * The device path (\\.\ or \\?\). - * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths - */ -const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; -/** - * All backslashes except those escaping special characters. - * Windows: !()+@{} - * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions - */ -const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; -/** - * Designed to work only with simple paths: `dir\\file`. - */ -function unixify(filepath) { - return filepath.replace(/\\/g, '/'); -} -exports.unixify = unixify; -function makeAbsolute(cwd, filepath) { - return path.resolve(cwd, filepath); -} -exports.makeAbsolute = makeAbsolute; -function removeLeadingDotSegment(entry) { - // We do not use `startsWith` because this is 10x slower than current implementation for some cases. - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with - if (entry.charAt(0) === '.') { - const secondCharactery = entry.charAt(1); - if (secondCharactery === '/' || secondCharactery === '\\') { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; -} -exports.removeLeadingDotSegment = removeLeadingDotSegment; -exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; -function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapeWindowsPath = escapeWindowsPath; -function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escapePosixPath = escapePosixPath; -exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; -function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath) - .replace(DOS_DEVICE_PATH_RE, '//$1') - .replace(WINDOWS_BACKSLASHES_RE, '/'); -} -exports.convertWindowsPathToPattern = convertWindowsPathToPattern; -function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); -} -exports.convertPosixPathToPattern = convertPosixPathToPattern; - - -/***/ }), - -/***/ 5869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __nccwpck_require__(6928); -const globParent = __nccwpck_require__(2435); -const micromatch = __nccwpck_require__(9555); -const GLOBSTAR = '**'; -const ESCAPE_SYMBOL = '\\'; -const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; -const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; -const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; -const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; -const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; -/** - * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. - * The latter is due to the presence of the device path at the beginning of the UNC path. - */ -const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; -function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); -} -exports.isStaticPattern = isStaticPattern; -function isDynamicPattern(pattern, options = {}) { - /** - * A special case with an empty string is necessary for matching patterns that start with a forward slash. - * An empty string cannot be a dynamic pattern. - * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'. - */ - if (pattern === '') { - return false; - } - /** - * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check - * filepath directly (without read directory). - */ - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; -} -exports.isDynamicPattern = isDynamicPattern; -function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf('{'); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); -} -function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; -} -exports.convertToPositivePattern = convertToPositivePattern; -function convertToNegativePattern(pattern) { - return '!' + pattern; -} -exports.convertToNegativePattern = convertToNegativePattern; -function isNegativePattern(pattern) { - return pattern.startsWith('!') && pattern[1] !== '('; -} -exports.isNegativePattern = isNegativePattern; -function isPositivePattern(pattern) { - return !isNegativePattern(pattern); -} -exports.isPositivePattern = isPositivePattern; -function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); -} -exports.getNegativePatterns = getNegativePatterns; -function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); -} -exports.getPositivePatterns = getPositivePatterns; -/** - * Returns patterns that can be applied inside the current directory. - * - * @example - * // ['./*', '*', 'a/*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); -} -exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; -/** - * Returns patterns to be expanded relative to (outside) the current directory. - * - * @example - * // ['../*', './../*'] - * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) - */ -function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); -} -exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; -function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith('..') || pattern.startsWith('./..'); -} -exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; -function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); -} -exports.getBaseDirectory = getBaseDirectory; -function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); -} -exports.hasGlobStar = hasGlobStar; -function endsWithSlashGlobStar(pattern) { - return pattern.endsWith('/' + GLOBSTAR); -} -exports.endsWithSlashGlobStar = endsWithSlashGlobStar; -function isAffectDepthOfReadingPattern(pattern) { - const basename = path.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); -} -exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; -function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); -} -exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; -function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - /** - * Sort the patterns by length so that the same depth patterns are processed side by side. - * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` - */ - patterns.sort((a, b) => a.length - b.length); - /** - * Micromatch can return an empty string in the case of patterns like `{a,}`. - */ - return patterns.filter((pattern) => pattern !== ''); -} -exports.expandBraceExpansion = expandBraceExpansion; -function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - /** - * The scan method returns an empty array in some cases. - * See micromatch/picomatch#58 for more details. - */ - if (parts.length === 0) { - parts = [pattern]; - } - /** - * The scan method does not return an empty part for the pattern with a forward slash. - * This is another part of micromatch/picomatch#58. - */ - if (parts[0].startsWith('/')) { - parts[0] = parts[0].slice(1); - parts.unshift(''); - } - return parts; -} -exports.getPatternParts = getPatternParts; -function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); -} -exports.makeRe = makeRe; -function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); -} -exports.convertPatternsToRe = convertPatternsToRe; -function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); -} -exports.matchAny = matchAny; -/** - * This package only works with forward slashes as a path separator. - * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. - */ -function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, '/'); -} -exports.removeDuplicateSlashes = removeDuplicateSlashes; -function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute(pattern)) { - absolute.push(pattern); - } - else { - relative.push(pattern); - } - } - return [absolute, relative]; -} -exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; -function isAbsolute(pattern) { - return path.isAbsolute(pattern); -} -exports.isAbsolute = isAbsolute; - - -/***/ }), - -/***/ 9103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.merge = void 0; -const merge2 = __nccwpck_require__(4031); -function merge(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once('error', (error) => mergedStream.emit('error', error)); - }); - mergedStream.once('close', () => propagateCloseEventToSources(streams)); - mergedStream.once('end', () => propagateCloseEventToSources(streams)); - return mergedStream; -} -exports.merge = merge; -function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit('close')); -} - - -/***/ }), - -/***/ 3682: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isEmpty = exports.isString = void 0; -function isString(input) { - return typeof input === 'string'; -} -exports.isString = isString; -function isEmpty(input) { - return input === ''; -} -exports.isEmpty = isEmpty; - - -/***/ }), - -/***/ 9730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -const util = __nccwpck_require__(9023); -const toRegexRange = __nccwpck_require__(743); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; - - -/***/ }), - -/***/ 2435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -var isGlob = __nccwpck_require__(686); -var pathPosixDirname = (__nccwpck_require__(6928).posix).dirname; -var isWin32 = (__nccwpck_require__(857).platform)() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; - - -/***/ }), - -/***/ 9825: -/***/ ((module) => { - -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; - - -/***/ }), - -/***/ 686: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = __nccwpck_require__(9825); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; - - -/***/ }), - -/***/ 952: -/***/ ((module) => { - -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; - - -/***/ }), - -/***/ 9656: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -module.exports.__defineGetter__('parse', function() { - return (__nccwpck_require__(1079).parse) -}) - -module.exports.__defineGetter__('stringify', function() { - return (__nccwpck_require__(8585)/* .stringify */ .A) -}) - -module.exports.__defineGetter__('tokenize', function() { - return (__nccwpck_require__(1079).tokenize) -}) - -module.exports.__defineGetter__('update', function() { - return (__nccwpck_require__(4175)/* .update */ .f) -}) - -module.exports.__defineGetter__('analyze', function() { - return (__nccwpck_require__(636)/* .analyze */ .n) -}) - -module.exports.__defineGetter__('utils', function() { - return __nccwpck_require__(7629) -}) - -/**package -{ "name": "jju", - "version": "0.0.0", - "dependencies": {"js-yaml": "*"}, - "scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"} -} -**/ - - -/***/ }), - -/***/ 636: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -var tokenize = (__nccwpck_require__(1079).tokenize) - -module.exports.n = function analyzeJSON(input, options) { - if (options == null) options = {} - - if (!Array.isArray(input)) { - input = tokenize(input, options) - } - - var result = { - has_whitespace: false, - has_comments: false, - has_newlines: false, - has_trailing_comma: false, - indent: '', - newline: '\n', - quote: '"', - quote_keys: true, - } - - var stats = { - indent: {}, - newline: {}, - quote: {}, - } - - for (var i=0; i stats[k][b] ? a : b - }) - } - } - - return result -} - - - -/***/ }), - -/***/ 4175: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - -var assert = __nccwpck_require__(2613) -var tokenize = (__nccwpck_require__(1079).tokenize) -var stringify = (__nccwpck_require__(8585)/* .stringify */ .A) -var analyze = (__nccwpck_require__(636)/* .analyze */ .n) - -function isObject(x) { - return typeof(x) === 'object' && x !== null -} - -function value_to_tokenlist(value, stack, options, is_key, indent) { - options = Object.create(options) - options._stringify_key = !!is_key - - if (indent) { - options._prefix = indent.prefix.map(function(x) { - return x.raw - }).join('') - } - - if (options._splitMin == null) options._splitMin = 0 - if (options._splitMax == null) options._splitMax = 0 - - var stringified = stringify(value, options) - - if (is_key) { - return [ { raw: stringified, type: 'key', stack: stack, value: value } ] - } - - options._addstack = stack - var result = tokenize(stringified, { - _addstack: stack, - }) - result.data = null - return result -} - -// '1.2.3' -> ['1','2','3'] -function arg_to_path(path) { - // array indexes - if (typeof(path) === 'number') path = String(path) - - if (path === '') path = [] - if (typeof(path) === 'string') path = path.split('.') - - if (!Array.isArray(path)) throw Error('Invalid path type, string or array expected') - return path -} - -// returns new [begin, end] or false if not found -// -// {x:3, xxx: 111, y: [111, {q: 1, e: 2} ,333] } -// f('y',0) returns this B^^^^^^^^^^^^^^^^^^^^^^^^E -// then f('1',1) would reduce it to B^^^^^^^^^^E -function find_element_in_tokenlist(element, lvl, tokens, begin, end) { - while(tokens[begin].stack[lvl] != element) { - if (begin++ >= end) return false - } - while(tokens[end].stack[lvl] != element) { - if (end-- < begin) return false - } - return [begin, end] -} - -function is_whitespace(token_type) { - return token_type === 'whitespace' - || token_type === 'newline' - || token_type === 'comment' -} - -function find_first_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[begin].type)) { - if (begin++ >= end) return false - } - return begin -} - -function find_last_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[end].type)) { - if (end-- < begin) return false - } - return end -} - -/* - * when appending a new element of an object/array, we are trying to - * figure out the style used on the previous element - * - * return {prefix, sep1, sep2, suffix} - * - * ' "key" : "element" \r\n' - * prefix^^^^ sep1^ ^^sep2 ^^^^^^^^suffix - * - * begin - the beginning of the object/array - * end - last token of the last element (value or comma usually) - */ -function detect_indent_style(tokens, is_array, begin, end, level) { - var result = { - sep1: [], - sep2: [], - suffix: [], - prefix: [], - newline: [], - } - - if (tokens[end].type === 'separator' && tokens[end].stack.length !== level+1 && tokens[end].raw !== ',') { - // either a beginning of the array (no last element) or other weird situation - // - // just return defaults - return result - } - - // ' "key" : "value" ,' - // skipping last separator, we're now here ^^ - if (tokens[end].type === 'separator') - end = find_last_non_ws_token(tokens, begin, end - 1) - if (end === false) return result - - // ' "key" : "value" ,' - // skipping value ^^^^^^^ - while(tokens[end].stack.length > level) end-- - - if (!is_array) { - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep2.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - end-- - } - - // ' "key" : "value" ,' - // skipping separator ^ - assert.equal(tokens[end].type, 'separator') - assert.equal(tokens[end].raw, ':') - while(is_whitespace(tokens[--end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep1.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - } - - assert.equal(tokens[end].type, 'key') - end-- - } - - // ' "key" : "value" ,' - // skipping key ^^^^^ - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.prefix.unshift(tokens[end]) - } else if (tokens[end].type === 'newline') { - result.newline.unshift(tokens[end]) - return result - } else { - // comment or other unrecognized codestyle - return result - } - end-- - } - - return result -} - -function Document(text, options) { - var self = Object.create(Document.prototype) - - if (options == null) options = {} - //options._structure = true - var tokens = self._tokens = tokenize(text, options) - self._data = tokens.data - tokens.data = null - self._options = options - - var stats = analyze(text, options) - if (options.indent == null) { - options.indent = stats.indent - } - if (options.quote == null) { - options.quote = stats.quote - } - if (options.quote_keys == null) { - options.quote_keys = stats.quote_keys - } - if (options.no_trailing_comma == null) { - options.no_trailing_comma = !stats.has_trailing_comma - } - return self -} - -// return true if it's a proper object -// throw otherwise -function check_if_can_be_placed(key, object, is_unset) { - //if (object == null) return false - function error(add) { - return Error("You can't " + (is_unset ? 'unset' : 'set') + " key '" + key + "'" + add) - } - - if (!isObject(object)) { - throw error(' of an non-object') - } - if (Array.isArray(object)) { - // array, check boundary - if (String(key).match(/^\d+$/)) { - key = Number(String(key)) - if (object.length < key || (is_unset && object.length === key)) { - throw error(', out of bounds') - } else if (is_unset && object.length !== key+1) { - throw error(' in the middle of an array') - } else { - return true - } - } else { - throw error(' of an array') - } - } else { - // object - return true - } -} - -// usage: document.set('path.to.something', 'value') -// or: document.set(['path','to','something'], 'value') -Document.prototype.set = function(path, value) { - path = arg_to_path(path) - - // updating this._data and check for errors - if (path.length === 0) { - if (value === undefined) throw Error("can't remove root document") - this._data = value - var new_key = false - - } else { - var data = this._data - - for (var i=0; i {x:1}` - // removing sep, literal and optional sep - // ':' - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - assert.equal(this._tokens[pos2].raw, ':') - position[0] = pos2 - - // key - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'key') - assert.equal(this._tokens[pos2].value, path[path.length-1]) - position[0] = pos2 - } - - // removing comma in arrays and objects - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[0] = pos2 - } else { - // beginning of the array/object, so we should remove trailing comma instead - pos2 = find_first_non_ws_token(this._tokens, position[1] + 1, pos_old[1]) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[1] = pos2 - } - } - - } else { - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i) - : {} - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - } - - } else { - // insert new key, that's tricky - var path_1 = path.slice(0, i) - - // find a last separator after which we're inserting it - var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1) - assert(pos2 !== false) - - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i) - : {} - - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - - // adding leading whitespaces according to detected codestyle - var prefix = [] - if (indent.newline && indent.newline.length) - prefix = prefix.concat(indent.newline) - if (indent.prefix && indent.prefix.length) - prefix = prefix.concat(indent.prefix) - - // adding '"key":' (as in "key":"value") to object values - if (!Array.isArray(data)) { - prefix = prefix.concat(value_to_tokenlist(path[path.length-1], path_1, this._options, true)) - if (indent.sep1 && indent.sep1.length) - prefix = prefix.concat(indent.sep1) - prefix.push({raw: ':', type: 'separator', stack: path_1}) - if (indent.sep2 && indent.sep2.length) - prefix = prefix.concat(indent.sep2) - } - - newtokens.unshift.apply(newtokens, prefix) - - // check if prev token is a separator AND they're at the same level - if (this._tokens[pos2].type === 'separator' && this._tokens[pos2].stack.length === path.length-1) { - // previous token is either , or [ or { - if (this._tokens[pos2].raw === ',') { - // restore ending comma - newtokens.push({raw: ',', type: 'separator', stack: path_1}) - } - } else { - // previous token isn't a separator, so need to insert one - newtokens.unshift({raw: ',', type: 'separator', stack: path_1}) - } - - if (indent.suffix && indent.suffix.length) - newtokens.push.apply(newtokens, indent.suffix) - - assert.equal(this._tokens[position[1]].type, 'separator') - position[0] = pos2+1 - position[1] = pos2 - } - - newtokens.unshift(position[1] - position[0] + 1) - newtokens.unshift(position[0]) - this._tokens.splice.apply(this._tokens, newtokens) - - return this -} - -// convenience method -Document.prototype.unset = function(path) { - return this.set(path, undefined) -} - -Document.prototype.get = function(path) { - path = arg_to_path(path) - - var data = this._data - for (var i=0; i old_data.length) { - // adding new elements, so going forward - for (var i=0; i=0; i--) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - - } else { - // both values are objects here - for (var i in new_data) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - - for (var i in old_data) { - if (i in new_data) continue - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - } -} - -Document.prototype.toString = function() { - return this._tokens.map(function(x) { - return x.raw - }).join('') -} - -__webpack_unused_export__ = Document - -module.exports.f = function updateJSON(source, new_value, options) { - return Document(source, options).update(new_value).toString() -} - - - -/***/ }), - -/***/ 1079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -// RTFM: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf - -var Uni = __nccwpck_require__(3667) - -function isHexDigit(x) { - return (x >= '0' && x <= '9') - || (x >= 'A' && x <= 'F') - || (x >= 'a' && x <= 'f') -} - -function isOctDigit(x) { - return x >= '0' && x <= '7' -} - -function isDecDigit(x) { - return x >= '0' && x <= '9' -} - -var unescapeMap = { - '\'': '\'', - '"' : '"', - '\\': '\\', - 'b' : '\b', - 'f' : '\f', - 'n' : '\n', - 'r' : '\r', - 't' : '\t', - 'v' : '\v', - '/' : '/', -} - -function formatError(input, msg, position, lineno, column, json5) { - var result = msg + ' at ' + (lineno + 1) + ':' + (column + 1) - , tmppos = position - column - 1 - , srcline = '' - , underline = '' - - var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON - - // output no more than 70 characters before the wrong ones - if (tmppos < position - 70) { - tmppos = position - 70 - } - - while (1) { - var chr = input[++tmppos] - - if (isLineTerminator(chr) || tmppos === input.length) { - if (position >= tmppos) { - // ending line error, so show it after the last char - underline += '^' - } - break - } - srcline += chr - - if (position === tmppos) { - underline += '^' - } else if (position > tmppos) { - underline += input[tmppos] === '\t' ? '\t' : ' ' - } - - // output no more than 78 characters on the string - if (srcline.length > 78) break - } - - return result + '\n' + srcline + '\n' + underline -} - -function parse(input, options) { - // parse as a standard JSON mode - var json5 = false - var cjson = false - - if (options.legacy || options.mode === 'json') { - // use json - } else if (options.mode === 'cjson') { - cjson = true - } else if (options.mode === 'json5') { - json5 = true - } else { - // use it by default - json5 = true - } - - var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON - var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON - - var length = input.length - , lineno = 0 - , linestart = 0 - , position = 0 - , stack = [] - - var tokenStart = function() {} - var tokenEnd = function(v) {return v} - - /* tokenize({ - raw: '...', - type: 'whitespace'|'comment'|'key'|'literal'|'separator'|'newline', - value: 'number'|'string'|'whatever', - path: [...], - }) - */ - if (options._tokenize) { - ;(function() { - var start = null - tokenStart = function() { - if (start !== null) throw Error('internal error, token overlap') - start = position - } - - tokenEnd = function(v, type) { - if (start != position) { - var hash = { - raw: input.substr(start, position-start), - type: type, - stack: stack.slice(0), - } - if (v !== undefined) hash.value = v - options._tokenize.call(null, hash) - } - start = null - return v - } - })() - } - - function fail(msg) { - var column = position - linestart - - if (!msg) { - if (position < length) { - var token = '\'' + - JSON - .stringify(input[position]) - .replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - + '\'' - - if (!msg) msg = 'Unexpected token ' + token - } else { - if (!msg) msg = 'Unexpected end of input' - } - } - - var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)) - error.row = lineno + 1 - error.column = column + 1 - throw error - } - - function newline(chr) { - // account for - if (chr === '\r' && input[position] === '\n') position++ - linestart = position - lineno++ - } - - function parseGeneric() { - var result - - while (position < length) { - tokenStart() - var chr = input[position++] - - if (chr === '"' || (chr === '\'' && json5)) { - return tokenEnd(parseString(chr), 'literal') - - } else if (chr === '{') { - tokenEnd(undefined, 'separator') - return parseObject() - - } else if (chr === '[') { - tokenEnd(undefined, 'separator') - return parseArray() - - } else if (chr === '-' - || chr === '.' - || isDecDigit(chr) - // + number Infinity NaN - || (json5 && (chr === '+' || chr === 'I' || chr === 'N')) - ) { - return tokenEnd(parseNumber(), 'literal') - - } else if (chr === 'n') { - parseKeyword('null') - return tokenEnd(null, 'literal') - - } else if (chr === 't') { - parseKeyword('true') - return tokenEnd(true, 'literal') - - } else if (chr === 'f') { - parseKeyword('false') - return tokenEnd(false, 'literal') - - } else { - position-- - return tokenEnd(undefined) - } - } - } - - function parseKey() { - var result - - while (position < length) { - tokenStart() - var chr = input[position++] - - if (chr === '"' || (chr === '\'' && json5)) { - return tokenEnd(parseString(chr), 'key') - - } else if (chr === '{') { - tokenEnd(undefined, 'separator') - return parseObject() - - } else if (chr === '[') { - tokenEnd(undefined, 'separator') - return parseArray() - - } else if (chr === '.' - || isDecDigit(chr) - ) { - return tokenEnd(parseNumber(true), 'key') - - } else if (json5 - && Uni.isIdentifierStart(chr) || (chr === '\\' && input[position] === 'u')) { - // unicode char or a unicode sequence - var rollback = position - 1 - var result = parseIdentifier() - - if (result === undefined) { - position = rollback - return tokenEnd(undefined) - } else { - return tokenEnd(result, 'key') - } - - } else { - position-- - return tokenEnd(undefined) - } - } - } - - function skipWhiteSpace() { - tokenStart() - while (position < length) { - var chr = input[position++] - - if (isLineTerminator(chr)) { - position-- - tokenEnd(undefined, 'whitespace') - tokenStart() - position++ - newline(chr) - tokenEnd(undefined, 'newline') - tokenStart() - - } else if (isWhiteSpace(chr)) { - // nothing - - } else if (chr === '/' - && (json5 || cjson) - && (input[position] === '/' || input[position] === '*') - ) { - position-- - tokenEnd(undefined, 'whitespace') - tokenStart() - position++ - skipComment(input[position++] === '*') - tokenEnd(undefined, 'comment') - tokenStart() - - } else { - position-- - break - } - } - return tokenEnd(undefined, 'whitespace') - } - - function skipComment(multi) { - while (position < length) { - var chr = input[position++] - - if (isLineTerminator(chr)) { - // LineTerminator is an end of singleline comment - if (!multi) { - // let parent function deal with newline - position-- - return - } - - newline(chr) - - } else if (chr === '*' && multi) { - // end of multiline comment - if (input[position] === '/') { - position++ - return - } - - } else { - // nothing - } - } - - if (multi) { - fail('Unclosed multiline comment') - } - } - - function parseKeyword(keyword) { - // keyword[0] is not checked because it should've checked earlier - var _pos = position - var len = keyword.length - for (var i=1; i= length || keyword[i] != input[position]) { - position = _pos-1 - fail() - } - position++ - } - } - - function parseObject() { - var result = options.null_prototype ? Object.create(null) : {} - , empty_object = {} - , is_non_empty = false - - while (position < length) { - skipWhiteSpace() - var item1 = parseKey() - skipWhiteSpace() - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (chr === '}' && item1 === undefined) { - if (!json5 && is_non_empty) { - position-- - fail('Trailing comma in object') - } - return result - - } else if (chr === ':' && item1 !== undefined) { - skipWhiteSpace() - stack.push(item1) - var item2 = parseGeneric() - stack.pop() - - if (item2 === undefined) fail('No value found for key ' + item1) - if (typeof(item1) !== 'string') { - if (!json5 || typeof(item1) !== 'number') { - fail('Wrong key type: ' + item1) - } - } - - if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== 'replace') { - if (options.reserved_keys === 'throw') { - fail('Reserved key: ' + item1) - } else { - // silently ignore it - } - } else { - if (typeof(options.reviver) === 'function') { - item2 = options.reviver.call(null, item1, item2) - } - - if (item2 !== undefined) { - is_non_empty = true - Object.defineProperty(result, item1, { - value: item2, - enumerable: true, - configurable: true, - writable: true, - }) - } - } - - skipWhiteSpace() - - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (chr === ',') { - continue - - } else if (chr === '}') { - return result - - } else { - fail() - } - - } else { - position-- - fail() - } - } - - fail() - } - - function parseArray() { - var result = [] - - while (position < length) { - skipWhiteSpace() - stack.push(result.length) - var item = parseGeneric() - stack.pop() - skipWhiteSpace() - tokenStart() - var chr = input[position++] - tokenEnd(undefined, 'separator') - - if (item !== undefined) { - if (typeof(options.reviver) === 'function') { - item = options.reviver.call(null, String(result.length), item) - } - if (item === undefined) { - result.length++ - item = true // hack for check below, not included into result - } else { - result.push(item) - } - } - - if (chr === ',') { - if (item === undefined) { - fail('Elisions are not supported') - } - - } else if (chr === ']') { - if (!json5 && item === undefined && result.length) { - position-- - fail('Trailing comma in array') - } - return result - - } else { - position-- - fail() - } - } - } - - function parseNumber() { - // rewind because we don't know first char - position-- - - var start = position - , chr = input[position++] - , t - - var to_num = function(is_octal) { - var str = input.substr(start, position - start) - - if (is_octal) { - var result = parseInt(str.replace(/^0o?/, ''), 8) - } else { - var result = Number(str) - } - - if (Number.isNaN(result)) { - position-- - fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"') - } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { - // additional restrictions imposed by json - position-- - fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"') - } else { - return result - } - } - - // ex: -5982475.249875e+29384 - // ^ skipping this - if (chr === '-' || (chr === '+' && json5)) chr = input[position++] - - if (chr === 'N' && json5) { - parseKeyword('NaN') - return NaN - } - - if (chr === 'I' && json5) { - parseKeyword('Infinity') - - // returning +inf or -inf - return to_num() - } - - if (chr >= '1' && chr <= '9') { - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - // special case for leading zero: 0.123456 - if (chr === '0') { - chr = input[position++] - - // new syntax, "0o777" old syntax, "0777" - var is_octal = chr === 'o' || chr === 'O' || isOctDigit(chr) - var is_hex = chr === 'x' || chr === 'X' - - if (json5 && (is_octal || is_hex)) { - while (position < length - && (is_hex ? isHexDigit : isOctDigit)( input[position] ) - ) position++ - - var sign = 1 - if (input[start] === '-') { - sign = -1 - start++ - } else if (input[start] === '+') { - start++ - } - - return sign * to_num(is_octal) - } - } - - if (chr === '.') { - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - if (chr === 'e' || chr === 'E') { - chr = input[position++] - if (chr === '-' || chr === '+') position++ - // ex: -5982475.249875e+29384 - // ^^^ skipping these - while (position < length && isDecDigit(input[position])) position++ - chr = input[position++] - } - - // we have char in the buffer, so count for it - position-- - return to_num() - } - - function parseIdentifier() { - // rewind because we don't know first char - position-- - - var result = '' - - while (position < length) { - var chr = input[position++] - - if (chr === '\\' - && input[position] === 'u' - && isHexDigit(input[position+1]) - && isHexDigit(input[position+2]) - && isHexDigit(input[position+3]) - && isHexDigit(input[position+4]) - ) { - // UnicodeEscapeSequence - chr = String.fromCharCode(parseInt(input.substr(position+1, 4), 16)) - position += 5 - } - - if (result.length) { - // identifier started - if (Uni.isIdentifierPart(chr)) { - result += chr - } else { - position-- - return result - } - - } else { - if (Uni.isIdentifierStart(chr)) { - result += chr - } else { - return undefined - } - } - } - - fail() - } - - function parseString(endChar) { - // 7.8.4 of ES262 spec - var result = '' - - while (position < length) { - var chr = input[position++] - - if (chr === endChar) { - return result - - } else if (chr === '\\') { - if (position >= length) fail() - chr = input[position++] - - if (unescapeMap[chr] && (json5 || (chr != 'v' && chr != "'"))) { - result += unescapeMap[chr] - - } else if (json5 && isLineTerminator(chr)) { - // line continuation - newline(chr) - - } else if (chr === 'u' || (chr === 'x' && json5)) { - // unicode/character escape sequence - var off = chr === 'u' ? 4 : 2 - - // validation for \uXXXX - for (var i=0; i= length) fail() - if (!isHexDigit(input[position])) fail('Bad escape sequence') - position++ - } - - result += String.fromCharCode(parseInt(input.substr(position-off, off), 16)) - } else if (json5 && isOctDigit(chr)) { - if (chr < '4' && isOctDigit(input[position]) && isOctDigit(input[position+1])) { - // three-digit octal - var digits = 3 - } else if (isOctDigit(input[position])) { - // two-digit octal - var digits = 2 - } else { - var digits = 1 - } - position += digits - 1 - result += String.fromCharCode(parseInt(input.substr(position-digits, digits), 8)) - /*if (!isOctDigit(input[position])) { - // \0 is allowed still - result += '\0' - } else { - fail('Octal literals are not supported') - }*/ - - } else if (json5) { - // \X -> x - result += chr - - } else { - position-- - fail() - } - - } else if (isLineTerminator(chr)) { - fail() - - } else { - if (!json5 && chr.charCodeAt(0) < 32) { - position-- - fail('Unexpected control character') - } - - // SourceCharacter but not one of " or \ or LineTerminator - result += chr - } - } - - fail() - } - - skipWhiteSpace() - var return_value = parseGeneric() - if (return_value !== undefined || position < length) { - skipWhiteSpace() - - if (position >= length) { - if (typeof(options.reviver) === 'function') { - return_value = options.reviver.call(null, '', return_value) - } - return return_value - } else { - fail() - } - - } else { - if (position) { - fail('No data, only a whitespace') - } else { - fail('No data, empty input') - } - } -} - -/* - * parse(text, options) - * or - * parse(text, reviver) - * - * where: - * text - string - * options - object - * reviver - function - */ -module.exports.parse = function parseJSON(input, options) { - // support legacy functions - if (typeof(options) === 'function') { - options = { - reviver: options - } - } - - if (input === undefined) { - // parse(stringify(x)) should be equal x - // with JSON functions it is not 'cause of undefined - // so we're fixing it - return undefined - } - - // JSON.parse compat - if (typeof(input) !== 'string') input = String(input) - if (options == null) options = {} - if (options.reserved_keys == null) options.reserved_keys = 'ignore' - - if (options.reserved_keys === 'throw' || options.reserved_keys === 'ignore') { - if (options.null_prototype == null) { - options.null_prototype = true - } - } - - try { - return parse(input, options) - } catch(err) { - // jju is a recursive parser, so JSON.parse("{{{{{{{") could blow up the stack - // - // this catch is used to skip all those internal calls - if (err instanceof SyntaxError && err.row != null && err.column != null) { - var old_err = err - err = SyntaxError(old_err.message) - err.column = old_err.column - err.row = old_err.row - } - throw err - } -} - -module.exports.tokenize = function tokenizeJSON(input, options) { - if (options == null) options = {} - - options._tokenize = function(smth) { - if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack) - tokens.push(smth) - } - - var tokens = [] - tokens.data = module.exports.parse(input, options) - return tokens -} - - - -/***/ }), - -/***/ 8585: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -var Uni = __nccwpck_require__(3667) - -// Fix Function#name on browsers that do not support it (IE) -// http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie -if (!(function f(){}).name) { - Object.defineProperty((function(){}).constructor.prototype, 'name', { - get: function() { - var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1] - // For better performance only parse once, and then cache the - // result through a new accessor for repeated access. - Object.defineProperty(this, 'name', { value: name }) - return name - } - }) -} - -var special_chars = { - 0: '\\0', // this is not an octal literal - 8: '\\b', - 9: '\\t', - 10: '\\n', - 11: '\\v', - 12: '\\f', - 13: '\\r', - 92: '\\\\', -} - -// for oddballs -var hasOwnProperty = Object.prototype.hasOwnProperty - -// some people escape those, so I'd copy this to be safe -var escapable = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/ - -function _stringify(object, options, recursiveLvl, currentKey) { - var json5 = (options.mode === 'json5' || !options.mode) - /* - * Opinionated decision warning: - * - * Objects are serialized in the following form: - * { type: 'Class', data: DATA } - * - * Class is supposed to be a function, and new Class(DATA) is - * supposed to be equivalent to the original value - */ - /*function custom_type() { - return stringify({ - type: object.constructor.name, - data: object.toString() - }) - }*/ - - // if add, it's an internal indentation, so we add 1 level and a eol - // if !add, it's an ending indentation, so we just indent - function indent(str, add) { - var prefix = options._prefix ? options._prefix : '' - if (!options.indent) return prefix + str - var result = '' - var count = recursiveLvl + (add || 0) - for (var i=0; i 0) { - if (!Uni.isIdentifierPart(key[i])) - return _stringify_str(key) - - } else { - if (!Uni.isIdentifierStart(key[i])) - return _stringify_str(key) - } - - var chr = key.charCodeAt(i) - - if (options.ascii) { - if (chr < 0x80) { - result += key[i] - - } else { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - } - - } else { - if (escapable.exec(key[i])) { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - - } else { - result += key[i] - } - } - } - - return result - } - - function _stringify_str(key) { - var quote = options.quote - var quoteChr = quote.charCodeAt(0) - - var result = '' - for (var i=0; i= 8 && chr <= 13 && (json5 || chr !== 11)) { - result += special_chars[chr] - } else if (json5) { - result += '\\x0' + chr.toString(16) - } else { - result += '\\u000' + chr.toString(16) - } - - } else if (chr < 0x20) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr >= 0x20 && chr < 0x80) { - // ascii range - if (chr === 47 && i && key[i-1] === '<') { - // escaping slashes in - result += '\\' + key[i] - - } else if (chr === 92) { - result += '\\\\' - - } else if (chr === quoteChr) { - result += '\\' + quote - - } else { - result += key[i] - } - - } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) { - if (chr < 0x100) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr < 0x1000) { - result += '\\u0' + chr.toString(16) - - } else if (chr < 0x10000) { - result += '\\u' + chr.toString(16) - - } else { - throw Error('weird codepoint') - } - } else { - result += key[i] - } - } - return quote + result + quote - } - - function _stringify_object() { - if (object === null) return 'null' - var result = [] - , len = 0 - , braces - - if (Array.isArray(object)) { - braces = '[]' - for (var i=0; i options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) { - // remove trailing comma in multiline if asked to - if (options.no_trailing_comma && result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.map(function(x) {return indent(x, 1)}).join('') - return braces[0] - + (options.indent ? '\n' : '') - + innerStuff - + indent(braces[1]) - } else { - // always remove trailing comma in one-lined arrays - if (result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.join(options.indent ? ' ' : '') - return braces[0] - + innerStuff - + braces[1] - } - } - - function _stringify_nonobject(object) { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - } - - switch(typeof(object)) { - case 'string': - return _stringify_str(object) - - case 'number': - if (object === 0 && 1/object < 0) { - // Opinionated decision warning: - // - // I want cross-platform negative zero in all js engines - // I know they're equal, but why lose that tiny bit of - // information needlessly? - return '-0' - } - if (!json5 && !Number.isFinite(object)) { - // json don't support infinity (= sucks) - return 'null' - } - return object.toString() - - case 'boolean': - return object.toString() - - case 'undefined': - return undefined - - case 'function': -// return custom_type() - - default: - // fallback for something weird - return JSON.stringify(object) - } - } - - if (options._stringify_key) { - return _stringify_key(object) - } - - if (typeof(object) === 'object') { - if (object === null) return 'null' - - var str - if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') { - object = str.call(object, currentKey) - - } else if (typeof(str = object.toJSON) === 'function') { - object = str.call(object, currentKey) - } - - if (object === null) return 'null' - if (typeof(object) !== 'object') return _stringify_nonobject(object) - - if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) { - object = object.valueOf() - return _stringify_nonobject(object) - - } else if (object.constructor === Date) { - // only until we can't do better - return _stringify_nonobject(object.toISOString()) - - } else { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - if (typeof(object) !== 'object') return _stringify_nonobject(object) - } - - return _stringify_object(object) - } - } else { - return _stringify_nonobject(object) - } -} - -/* - * stringify(value, options) - * or - * stringify(value, replacer, space) - * - * where: - * value - anything - * options - object - * replacer - function or array - * space - boolean or number or string - */ -module.exports.A = function stringifyJSON(object, options, _space) { - // support legacy syntax - if (typeof(options) === 'function' || Array.isArray(options)) { - options = { - replacer: options - } - } else if (typeof(options) === 'object' && options !== null) { - // nothing to do - } else { - options = {} - } - if (_space != null) options.indent = _space - - if (options.indent == null) options.indent = '\t' - if (options.quote == null) options.quote = "'" - if (options.ascii == null) options.ascii = false - if (options.mode == null) options.mode = 'json5' - - if (options.mode === 'json' || options.mode === 'cjson') { - // json only supports double quotes (= sucks) - options.quote = '"' - - // json don't support trailing commas (= sucks) - options.no_trailing_comma = true - - // json don't support unquoted property names (= sucks) - options.quote_keys = true - } - - // why would anyone use such objects? - if (typeof(options.indent) === 'object') { - if (options.indent.constructor === Number - || options.indent.constructor === Boolean - || options.indent.constructor === String) - options.indent = options.indent.valueOf() - } - - // gap is capped at 10 characters - if (typeof(options.indent) === 'number') { - if (options.indent >= 0) { - options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ') - } else { - options.indent = false - } - } else if (typeof(options.indent) === 'string') { - options.indent = options.indent.substr(0, 10) - } - - if (options._splitMin == null) options._splitMin = 50 - if (options._splitMax == null) options._splitMax = 70 - - return _stringify(object, options, 0, '') -} - - - -/***/ }), - -/***/ 3667: -/***/ ((module) => { - - -// This is autogenerated with esprima tools, see: -// https://github.com/ariya/esprima/blob/master/esprima.js -// -// PS: oh God, I hate Unicode - -// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart: - -var Uni = module.exports - -module.exports.isWhiteSpace = function isWhiteSpace(x) { - // section 7.2, table 2 - return x === '\u0020' - || x === '\u00A0' - || x === '\uFEFF' // <-- this is not a Unicode WS, only a JS one - || (x >= '\u0009' && x <= '\u000D') // 9 A B C D - - // + whitespace characters from unicode, category Zs - || x === '\u1680' - || (x >= '\u2000' && x <= '\u200A') // 0 1 2 3 4 5 6 7 8 9 A - || x === '\u2028' - || x === '\u2029' - || x === '\u202F' - || x === '\u205F' - || x === '\u3000' -} - -module.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { - return x === '\u0020' - || x === '\u0009' - || x === '\u000A' - || x === '\u000D' -} - -module.exports.isLineTerminator = function isLineTerminator(x) { - // ok, here is the part when JSON is wrong - // section 7.3, table 3 - return x === '\u000A' - || x === '\u000D' - || x === '\u2028' - || x === '\u2029' -} - -module.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { - return x === '\u000A' - || x === '\u000D' -} - -module.exports.isIdentifierStart = function isIdentifierStart(x) { - return x === '$' - || x === '_' - || (x >= 'A' && x <= 'Z') - || (x >= 'a' && x <= 'z') - || (x >= '\u0080' && Uni.NonAsciiIdentifierStart.test(x)) -} - -module.exports.isIdentifierPart = function isIdentifierPart(x) { - return x === '$' - || x === '_' - || (x >= 'A' && x <= 'Z') - || (x >= 'a' && x <= 'z') - || (x >= '0' && x <= '9') // <-- addition to Start - || (x >= '\u0080' && Uni.NonAsciiIdentifierPart.test(x)) -} - -module.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - -// ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart: - -module.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\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u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ - - -/***/ }), - -/***/ 7629: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var FS = __nccwpck_require__(9896) -var jju = __nccwpck_require__(9656) - -// this function registers json5 extension, so you -// can do `require("./config.json5")` kind of thing -module.exports.register = function() { - var r = __WEBPACK_EXTERNAL_createRequire(import.meta.url), e = 'extensions' - r[e]['.json5'] = function(m, f) { - /*eslint no-sync:0*/ - m.exports = jju.parse(FS.readFileSync(f, 'utf8')) - } -} - -// this function monkey-patches JSON.parse, so it -// will return an exact position of error in case -// of parse failure -module.exports.patch_JSON_parse = function() { - var _parse = JSON.parse - JSON.parse = function(text, rev) { - try { - return _parse(text, rev) - } catch(err) { - // this call should always throw - (__nccwpck_require__(9656).parse)(text, { - mode: 'json', - legacy: true, - reviver: rev, - reserved_keys: 'replace', - null_prototype: false, - }) - - // if it didn't throw, but original parser did, - // this is an error in this library and should be reported - throw err - } - } -} - -// this function is an express/connect middleware -// that accepts uploads in application/json5 format -module.exports.middleware = function() { - return function(req, res, next) { - throw Error('this function is removed, use express-json5 instead') - } -} - - - -/***/ }), - -/***/ 1179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const loader = __nccwpck_require__(9384) -const dumper = __nccwpck_require__(3698) - -function renamed (from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.') - } -} - -module.exports.Type = __nccwpck_require__(1647) -module.exports.Schema = __nccwpck_require__(9992) -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(5478) -module.exports.JSON_SCHEMA = __nccwpck_require__(1441) -module.exports.CORE_SCHEMA = __nccwpck_require__(8920) -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(8922) -module.exports.load = loader.load -module.exports.loadAll = loader.loadAll -module.exports.dump = dumper.dump -module.exports.YAMLException = __nccwpck_require__(3954) - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: __nccwpck_require__(4259), - float: __nccwpck_require__(2102), - map: __nccwpck_require__(9362), - null: __nccwpck_require__(3507), - pairs: __nccwpck_require__(3985), - set: __nccwpck_require__(3896), - timestamp: __nccwpck_require__(7328), - bool: __nccwpck_require__(7166), - int: __nccwpck_require__(2729), - merge: __nccwpck_require__(7652), - omap: __nccwpck_require__(7023), - seq: __nccwpck_require__(2987), - str: __nccwpck_require__(2999) -} - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load') -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll') -module.exports.safeDump = renamed('safeDump', 'dump') - - -/***/ }), - -/***/ 3922: -/***/ ((module) => { - - - -function isNothing (subject) { - return (typeof subject === 'undefined') || (subject === null) -} - -function isObject (subject) { - return (typeof subject === 'object') && (subject !== null) -} - -function toArray (sequence) { - if (Array.isArray(sequence)) return sequence - else if (isNothing(sequence)) return [] - - return [sequence] -} - -function extend (target, source) { - if (source) { - const sourceKeys = Object.keys(source) - - for (let index = 0, length = sourceKeys.length; index < length; index += 1) { - const key = sourceKeys[index] - target[key] = source[key] - } - } - - return target -} - -function repeat (string, count) { - let result = '' - - for (let cycle = 0; cycle < count; cycle += 1) { - result += string - } - - return result -} - -function isNegativeZero (number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number) -} - -module.exports.isNothing = isNothing -module.exports.isObject = isObject -module.exports.toArray = toArray -module.exports.repeat = repeat -module.exports.isNegativeZero = isNegativeZero -module.exports.extend = extend - - -/***/ }), - -/***/ 3698: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _toString = Object.prototype.toString -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CHAR_BOM = 0xFEFF -const CHAR_TAB = 0x09 /* Tab */ -const CHAR_LINE_FEED = 0x0A /* LF */ -const CHAR_CARRIAGE_RETURN = 0x0D /* CR */ -const CHAR_SPACE = 0x20 /* Space */ -const CHAR_EXCLAMATION = 0x21 /* ! */ -const CHAR_DOUBLE_QUOTE = 0x22 /* " */ -const CHAR_SHARP = 0x23 /* # */ -const CHAR_PERCENT = 0x25 /* % */ -const CHAR_AMPERSAND = 0x26 /* & */ -const CHAR_SINGLE_QUOTE = 0x27 /* ' */ -const CHAR_ASTERISK = 0x2A /* * */ -const CHAR_COMMA = 0x2C /* , */ -const CHAR_MINUS = 0x2D /* - */ -const CHAR_COLON = 0x3A /* : */ -const CHAR_EQUALS = 0x3D /* = */ -const CHAR_GREATER_THAN = 0x3E /* > */ -const CHAR_QUESTION = 0x3F /* ? */ -const CHAR_COMMERCIAL_AT = 0x40 /* @ */ -const CHAR_LEFT_SQUARE_BRACKET = 0x5B /* [ */ -const CHAR_RIGHT_SQUARE_BRACKET = 0x5D /* ] */ -const CHAR_GRAVE_ACCENT = 0x60 /* ` */ -const CHAR_LEFT_CURLY_BRACKET = 0x7B /* { */ -const CHAR_VERTICAL_LINE = 0x7C /* | */ -const CHAR_RIGHT_CURLY_BRACKET = 0x7D /* } */ - -const ESCAPE_SEQUENCES = {} - -ESCAPE_SEQUENCES[0x00] = '\\0' -ESCAPE_SEQUENCES[0x07] = '\\a' -ESCAPE_SEQUENCES[0x08] = '\\b' -ESCAPE_SEQUENCES[0x09] = '\\t' -ESCAPE_SEQUENCES[0x0A] = '\\n' -ESCAPE_SEQUENCES[0x0B] = '\\v' -ESCAPE_SEQUENCES[0x0C] = '\\f' -ESCAPE_SEQUENCES[0x0D] = '\\r' -ESCAPE_SEQUENCES[0x1B] = '\\e' -ESCAPE_SEQUENCES[0x22] = '\\"' -ESCAPE_SEQUENCES[0x5C] = '\\\\' -ESCAPE_SEQUENCES[0x85] = '\\N' -ESCAPE_SEQUENCES[0xA0] = '\\_' -ESCAPE_SEQUENCES[0x2028] = '\\L' -ESCAPE_SEQUENCES[0x2029] = '\\P' - -const DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -] - -const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/ - -function compileStyleMap (schema, map) { - if (map === null) return {} - - const result = {} - const keys = Object.keys(map) - - for (let index = 0, length = keys.length; index < length; index += 1) { - let tag = keys[index] - let style = String(map[tag]) - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2) - } - const type = schema.compiledTypeMap['fallback'][tag] - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style] - } - - result[tag] = style - } - - return result -} - -function encodeHex (character) { - let handle - let length - - const string = character.toString(16).toUpperCase() - - if (character <= 0xFF) { - handle = 'x' - length = 2 - } else if (character <= 0xFFFF) { - handle = 'u' - length = 4 - } else if (character <= 0xFFFFFFFF) { - handle = 'U' - length = 8 - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF') - } - - return '\\' + handle + common.repeat('0', length - string.length) + string -} - -const QUOTING_TYPE_SINGLE = 1 -const QUOTING_TYPE_DOUBLE = 2 - -function State (options) { - this.schema = options['schema'] || DEFAULT_SCHEMA - this.indent = Math.max(1, (options['indent'] || 2)) - this.noArrayIndent = options['noArrayIndent'] || false - this.skipInvalid = options['skipInvalid'] || false - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']) - this.styleMap = compileStyleMap(this.schema, options['styles'] || null) - this.sortKeys = options['sortKeys'] || false - this.lineWidth = options['lineWidth'] || 80 - this.noRefs = options['noRefs'] || false - this.noCompatMode = options['noCompatMode'] || false - this.condenseFlow = options['condenseFlow'] || false - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE - this.forceQuotes = options['forceQuotes'] || false - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null - - this.implicitTypes = this.schema.compiledImplicit - this.explicitTypes = this.schema.compiledExplicit - - this.tag = null - this.result = '' - - this.duplicates = [] - this.usedDuplicates = null -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString (string, spaces) { - const ind = common.repeat(' ', spaces) - let position = 0 - let result = '' - const length = string.length - - while (position < length) { - let line - const next = string.indexOf('\n', position) - if (next === -1) { - line = string.slice(position) - position = length - } else { - line = string.slice(position, next + 1) - position = next + 1 - } - - if (line.length && line !== '\n') result += ind - - result += line - } - - return result -} - -function generateNextLine (state, level) { - return '\n' + common.repeat(' ', state.indent * level) -} - -function testImplicitResolving (state, str) { - for (let index = 0, length = state.implicitTypes.length; index < length; index += 1) { - const type = state.implicitTypes[index] - - if (type.resolve(str)) { - return true - } - } - - return false -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace (c) { - return c === CHAR_SPACE || c === CHAR_TAB -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable (c) { - return (c >= 0x00020 && c <= 0x00007E) || - ((c >= 0x000A1 && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) || - ((c >= 0x0E000 && c <= 0x00FFFD) && c !== CHAR_BOM) || - (c >= 0x10000 && c <= 0x10FFFF) -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace (c) { - return isPrintable(c) && - c !== CHAR_BOM && - // - b-char - c !== CHAR_CARRIAGE_RETURN && - c !== CHAR_LINE_FEED -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe (c, prev, inblock) { - const cIsNsCharOrWhitespace = isNsCharOrWhitespace(c) - const cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c) - return ( - ( - // ns-plain-safe - inblock // c = flow-in - ? cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace && - // - c-flow-indicator - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET - ) && - // ns-plain-char - c !== CHAR_SHARP && // false on '#' - !(prev === CHAR_COLON && !cIsNsChar) - ) || // false on ': ' - (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) || // change to true on '[^ ]#' - (prev === CHAR_COLON && cIsNsChar) // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst (c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && - c !== CHAR_BOM && - !isWhitespace(c) && // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - c !== CHAR_MINUS && - c !== CHAR_QUESTION && - c !== CHAR_COLON && - c !== CHAR_COMMA && - c !== CHAR_LEFT_SQUARE_BRACKET && - c !== CHAR_RIGHT_SQUARE_BRACKET && - c !== CHAR_LEFT_CURLY_BRACKET && - c !== CHAR_RIGHT_CURLY_BRACKET && - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - c !== CHAR_SHARP && - c !== CHAR_AMPERSAND && - c !== CHAR_ASTERISK && - c !== CHAR_EXCLAMATION && - c !== CHAR_VERTICAL_LINE && - c !== CHAR_EQUALS && - c !== CHAR_GREATER_THAN && - c !== CHAR_SINGLE_QUOTE && - c !== CHAR_DOUBLE_QUOTE && - // | “%” | “@” | “`”) - c !== CHAR_PERCENT && - c !== CHAR_COMMERCIAL_AT && - c !== CHAR_GRAVE_ACCENT -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast (c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt (string, pos) { - const first = string.charCodeAt(pos) - let second - - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1) - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000 - } - } - return first -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator (string) { - const leadingSpaceRe = /^\n* / - return leadingSpaceRe.test(string) -} - -const STYLE_PLAIN = 1 -const STYLE_SINGLE = 2 -const STYLE_LITERAL = 3 -const STYLE_FOLDED = 4 -const STYLE_DOUBLE = 5 - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle (string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - let i - let char = 0 - let prevChar = null - let hasLineBreak = false - let hasFoldableLine = false // only checked if shouldTrackWidth - const shouldTrackWidth = lineWidth !== -1 - let previousLineBreak = -1 // count the first line correctly - let plain = isPlainSafeFirst(codePointAt(string, 0)) && - isPlainSafeLast(codePointAt(string, string.length - 1)) - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - if (char === CHAR_LINE_FEED) { - hasLineBreak = true - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ') - previousLineBreak = i - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE - } - plain = plain && isPlainSafe(char, prevChar, inblock) - prevChar = char - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')) - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar (state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''" - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'") - } - } - - const indent = state.indent * Math.max(1, level) // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - const lineWidth = (state.lineWidth === -1) - ? -1 - : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent) - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - const singleLineOnly = iskey || - // No block styles in flow mode. - (state.flowLevel > -1 && level >= state.flowLevel) - function testAmbiguity (string) { - return testImplicitResolving(state, string) - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - case STYLE_PLAIN: - return string - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'" - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(string, indent)) - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) + - dropEndingNewline(indentString(foldString(string, lineWidth), indent)) - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"' - default: - throw new YAMLException('impossible error: invalid scalar style') - } - }()) -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader (string, indentPerLevel) { - const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '' - - // note the special case: the string '\n' counts as a "trailing" empty line. - const clip = string[string.length - 1] === '\n' - const keep = clip && (string[string.length - 2] === '\n' || string === '\n') - const chomp = keep ? '+' : (clip ? '' : '-') - - return indentIndicator + chomp + '\n' -} - -// (See the note for writeScalar.) -function dropEndingNewline (string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString (string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - const lineRe = /(\n+)([^\n]*)/g - - // first line (possibly an empty line) - let result = (function () { - let nextLF = string.indexOf('\n') - nextLF = nextLF !== -1 ? nextLF : string.length - lineRe.lastIndex = nextLF - return foldLine(string.slice(0, nextLF), width) - }()) - // If we haven't reached the first content line yet, don't add an extra \n. - let prevMoreIndented = string[0] === '\n' || string[0] === ' ' - let moreIndented - - // rest of the lines - let match - while ((match = lineRe.exec(string))) { - const prefix = match[1] - const line = match[2] - - moreIndented = (line[0] === ' ') - result += prefix + - ((!prevMoreIndented && !moreIndented && line !== '') ? '\n' : '') + - foldLine(line, width) - prevMoreIndented = moreIndented - } - - return result -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine (line, width) { - if (line === '' || line[0] === ' ') return line - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - const breakRe = / [^ ]/g // note: the match index will always be <= length-2. - let match - // start is an inclusive index. end, curr, and next are exclusive. - let start = 0 - let end - let curr = 0 - let next = 0 - let result = '' - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next // derive end <= length-2 - result += '\n' + line.slice(start, end) - // skip the space that was output as \n - start = end + 1 // derive start <= length-1 - } - curr = next - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n' - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1) - } else { - result += line.slice(start) - } - - return result.slice(1) // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString (string) { - let result = '' - let char = 0 - - for (let i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i) - const escapeSeq = ESCAPE_SEQUENCES[char] - - if (!escapeSeq && isPrintable(char)) { - result += string[i] - if (char >= 0x10000) result += string[i + 1] - } else { - result += escapeSeq || encodeHex(char) - } - } - - return result -} - -function writeFlowSequence (state, level, object) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '') - _result += state.dump - } - } - - state.tag = _tag - state.dump = '[' + _result + ']' -} - -function writeBlockSequence (state, level, object, compact) { - let _result = '' - const _tag = state.tag - - for (let index = 0, length = object.length; index < length; index += 1) { - let value = object[index] - - if (state.replacer) { - value = state.replacer.call(object, String(index), value) - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - if (!compact || _result !== '') { - _result += generateNextLine(state, level) - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-' - } else { - _result += '- ' - } - - _result += state.dump - } - } - - state.tag = _tag - state.dump = _result || '[]' // Empty sequence if no valid values. -} - -function writeFlowMapping (state, level, object) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - if (_result !== '') pairBuffer += ', ' - - if (state.condenseFlow) pairBuffer += '"' - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? ' - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' ') - - if (!writeNode(state, level, objectValue, false, false)) { - continue // Skip this pair because of invalid value. - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = '{' + _result + '}' -} - -function writeBlockMapping (state, level, object, compact) { - let _result = '' - const _tag = state.tag - const objectKeyList = Object.keys(object) - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort() - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys) - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function') - } - - for (let index = 0, length = objectKeyList.length; index < length; index += 1) { - let pairBuffer = '' - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level) - } - - const objectKey = objectKeyList[index] - let objectValue = object[objectKey] - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue) - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue // Skip this pair because of invalid key. - } - - const explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024) - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?' - } else { - pairBuffer += '? ' - } - } - - pairBuffer += state.dump - - if (explicitPair) { - pairBuffer += generateNextLine(state, level) - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':' - } else { - pairBuffer += ': ' - } - - pairBuffer += state.dump - - // Both key and value are valid. - _result += pairBuffer - } - - state.tag = _tag - state.dump = _result || '{}' // Empty mapping if no valid pairs. -} - -function detectType (state, object, explicit) { - const typeList = explicit ? state.explicitTypes : state.implicitTypes - - for (let index = 0, length = typeList.length; index < length; index += 1) { - const type = typeList[index] - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object) - } else { - state.tag = type.tag - } - } else { - state.tag = '?' - } - - if (type.represent) { - const style = state.styleMap[type.tag] || type.defaultStyle - - let _result - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style) - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style) - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style') - } - - state.dump = _result - } - - return true - } - } - - return false -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode (state, level, object, block, compact, iskey, isblockseq) { - state.tag = null - state.dump = object - - if (!detectType(state, object, false)) { - detectType(state, object, true) - } - - const type = _toString.call(state.dump) - const inblock = block - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level) - } - - const objectOrArray = type === '[object Object]' || type === '[object Array]' - let duplicateIndex - let duplicate - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object) - duplicate = duplicateIndex !== -1 - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowMapping(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact) - } else { - writeBlockSequence(state, level, state.dump, compact) - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump - } - } else { - writeFlowSequence(state, level, state.dump) - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock) - } - } else if (type === '[object Undefined]') { - return false - } else { - if (state.skipInvalid) return false - throw new YAMLException('unacceptable kind of an object to dump ' + type) - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - let tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21') - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18) - } else { - tagStr = '!<' + tagStr + '>' - } - - state.dump = tagStr + ' ' + state.dump - } - } - - return true -} - -function getDuplicateReferences (object, state) { - const objects = [] - const duplicatesIndexes = [] - - inspectNode(object, objects, duplicatesIndexes) - - const length = duplicatesIndexes.length - for (let index = 0; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]) - } - state.usedDuplicates = new Array(length) -} - -function inspectNode (object, objects, duplicatesIndexes) { - if (object !== null && typeof object === 'object') { - const index = objects.indexOf(object) - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index) - } - } else { - objects.push(object) - - if (Array.isArray(object)) { - for (let i = 0, length = object.length; i < length; i += 1) { - inspectNode(object[i], objects, duplicatesIndexes) - } - } else { - const objectKeyList = Object.keys(object) - - for (let i = 0, length = objectKeyList.length; i < length; i += 1) { - inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes) - } - } - } - } -} - -function dump (input, options) { - options = options || {} - - const state = new State(options) - - if (!state.noRefs) getDuplicateReferences(input, state) - - let value = input - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value) - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n' - - return '' -} - -module.exports.dump = dump - - -/***/ }), - -/***/ 3954: -/***/ ((module) => { - -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - -function formatError (exception, compact) { - let where = '' - const message = exception.reason || '(unknown reason)' - - if (!exception.mark) return message - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" ' - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')' - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet - } - - return message + ' ' + where -} - -function YAMLException (reason, mark) { - // Super constructor - Error.call(this) - - this.name = 'YAMLException' - this.reason = reason - this.mark = mark - this.message = formatError(this, false) - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor) - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || '' - } -} - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype) -YAMLException.prototype.constructor = YAMLException - -YAMLException.prototype.toString = function toString (compact) { - return this.name + ': ' + formatError(this, compact) -} - -module.exports = YAMLException - - -/***/ }), - -/***/ 9384: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const YAMLException = __nccwpck_require__(3954) -const makeSnippet = __nccwpck_require__(1934) -const DEFAULT_SCHEMA = __nccwpck_require__(8922) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -const CONTEXT_FLOW_IN = 1 -const CONTEXT_FLOW_OUT = 2 -const CONTEXT_BLOCK_IN = 3 -const CONTEXT_BLOCK_OUT = 4 - -const CHOMPING_CLIP = 1 -const CHOMPING_STRIP = 2 -const CHOMPING_KEEP = 3 - -// eslint-disable-next-line no-control-regex -const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/ -const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/ -// eslint-disable-next-line no-useless-escape -const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i - -function _class (obj) { return Object.prototype.toString.call(obj) } - -function isEol (c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */) -} - -function isWhiteSpace (c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */) -} - -function isWsOrEol (c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */) -} - -function isFlowIndicator (c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */ -} - -function fromHexCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - const lc = c | 0x20 - - if ((lc >= 0x61/* a */) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10 - } - - return -1 -} - -function escapedHexLen (c) { - if (c === 0x78/* x */) { return 2 } - if (c === 0x75/* u */) { return 4 } - if (c === 0x55/* U */) { return 8 } - return 0 -} - -function fromDecimalCode (c) { - if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) { - return c - 0x30 - } - - return -1 -} - -function simpleEscapeSequence (c) { - switch (c) { - case 0x30/* 0 */: return '\x00' - case 0x61/* a */: return '\x07' - case 0x62/* b */: return '\x08' - case 0x74/* t */: return '\x09' - case 0x09/* Tab */: return '\x09' - case 0x6E/* n */: return '\x0A' - case 0x76/* v */: return '\x0B' - case 0x66/* f */: return '\x0C' - case 0x72/* r */: return '\x0D' - case 0x65/* e */: return '\x1B' - case 0x20/* Space */: return ' ' - case 0x22/* " */: return '\x22' - case 0x2F/* / */: return '/' - case 0x5C/* \ */: return '\x5C' - case 0x4E/* N */: return '\x85' - case 0x5F/* _ */: return '\xA0' - case 0x4C/* L */: return '\u2028' - case 0x50/* P */: return '\u2029' - default: return '' - } -} - -function charFromCodepoint (c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c) - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ) -} - -// set a property of a literal object, while protecting against prototype pollution, -// see https://github.com/nodeca/js-yaml/issues/164 for more details -function setProperty (object, key, value) { - // used for this specific key only because Object.defineProperty is slow - if (key === '__proto__') { - Object.defineProperty(object, key, { - configurable: true, - enumerable: true, - writable: true, - value: value - }) - } else { - object[key] = value - } -} - -const simpleEscapeCheck = new Array(256) // integer, for fast access -const simpleEscapeMap = new Array(256) -for (let i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0 - simpleEscapeMap[i] = simpleEscapeSequence(i) -} - -function State (input, options) { - this.input = input - - this.filename = options['filename'] || null - this.schema = options['schema'] || DEFAULT_SCHEMA - this.onWarning = options['onWarning'] || null - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false - - this.json = options['json'] || false - this.listener = options['listener'] || null - this.maxDepth = typeof options['maxDepth'] === 'number' ? options['maxDepth'] : 100 - this.maxMergeSeqLength = typeof options['maxMergeSeqLength'] === 'number' ? options['maxMergeSeqLength'] : 20 - - this.implicitTypes = this.schema.compiledImplicit - this.typeMap = this.schema.compiledTypeMap - - this.length = input.length - this.position = 0 - this.line = 0 - this.lineStart = 0 - this.lineIndent = 0 - this.depth = 0 - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1 - - this.documents = [] - this.anchorMapTransactions = [] - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result; */ -} - -function generateError (state, message) { - const mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - } - - mark.snippet = makeSnippet(mark) - - return new YAMLException(message, mark) -} - -function throwError (state, message) { - throw generateError(state, message) -} - -function throwWarning (state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)) - } -} - -function storeAnchor (state, name, value) { - const transactions = state.anchorMapTransactions - - if (transactions.length !== 0) { - const transaction = transactions[transactions.length - 1] - - if (!_hasOwnProperty.call(transaction, name)) { - transaction[name] = { - existed: _hasOwnProperty.call(state.anchorMap, name), - value: state.anchorMap[name] - } - } - } - - state.anchorMap[name] = value -} - -function beginAnchorTransaction (state) { - state.anchorMapTransactions.push(Object.create(null)) -} - -function commitAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const transactions = state.anchorMapTransactions - - if (transactions.length === 0) return - - const parent = transactions[transactions.length - 1] - const names = Object.keys(transaction) - - for (let index = 0, length = names.length; index < length; index += 1) { - const name = names[index] - - if (!_hasOwnProperty.call(parent, name)) { - parent[name] = transaction[name] - } - } -} - -function rollbackAnchorTransaction (state) { - const transaction = state.anchorMapTransactions.pop() - const names = Object.keys(transaction) - - for (let index = names.length - 1; index >= 0; index -= 1) { - const entry = transaction[names[index]] - - if (entry.existed) { - state.anchorMap[names[index]] = entry.value - } else { - delete state.anchorMap[names[index]] - } - } -} - -function snapshotState (state) { - return { - position: state.position, - line: state.line, - lineStart: state.lineStart, - lineIndent: state.lineIndent, - firstTabInLine: state.firstTabInLine, - tag: state.tag, - anchor: state.anchor, - kind: state.kind, - result: state.result - } -} - -function restoreState (state, snapshot) { - state.position = snapshot.position - state.line = snapshot.line - state.lineStart = snapshot.lineStart - state.lineIndent = snapshot.lineIndent - state.firstTabInLine = snapshot.firstTabInLine - state.tag = snapshot.tag - state.anchor = snapshot.anchor - state.kind = snapshot.kind - state.result = snapshot.result -} - -const directiveHandlers = { - - YAML: function handleYamlDirective (state, name, args) { - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive') - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument') - } - - const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]) - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive') - } - - const major = parseInt(match[1], 10) - const minor = parseInt(match[2], 10) - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document') - } - - state.version = args[0] - state.checkLineBreaks = (minor < 2) - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document') - } - }, - - TAG: function handleTagDirective (state, name, args) { - let prefix - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments') - } - - const handle = args[0] - prefix = args[1] - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive') - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle') - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive') - } - - try { - prefix = decodeURIComponent(prefix) - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix) - } - - state.tagMap[handle] = prefix - } -} - -function captureSegment (state, start, end, checkJson) { - if (start < end) { - const _result = state.input.slice(start, end) - - if (checkJson) { - for (let _position = 0, _length = _result.length; _position < _length; _position += 1) { - const _character = _result.charCodeAt(_position) - if (!(_character === 0x09 || - (_character >= 0x20 && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character') - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters') - } - - state.result += _result - } -} - -function mergeMappings (state, destination, source, overridableKeys) { - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable') - } - - const sourceKeys = Object.keys(source) - - for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - const key = sourceKeys[index] - - if (!_hasOwnProperty.call(destination, key)) { - setProperty(destination, key, source[key]) - overridableKeys[key] = true - } - } -} - -function storeMappingPair (state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode) - - for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys') - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]' - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]' - } - - keyNode = String(keyNode) - - if (_result === null) { - _result = {} - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - if (valueNode.length > state.maxMergeSeqLength) { - throwError(state, 'merge sequence length exceeded maxMergeSeqLength (' + state.maxMergeSeqLength + ')') - } - const seen = new Set() - for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) { - const src = valueNode[index] - // Existing keys are not overridden on merge, so dedupe sources to - // avoid redundant work on repeated aliases. - if (seen.has(src)) continue - seen.add(src) - mergeMappings(state, _result, src, overridableKeys) - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys) - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line - state.lineStart = startLineStart || state.lineStart - state.position = startPos || state.position - throwError(state, 'duplicated mapping key') - } - - setProperty(_result, keyNode, valueNode) - delete overridableKeys[keyNode] - } - - return _result -} - -function readLineBreak (state) { - const ch = state.input.charCodeAt(state.position) - - if (ch === 0x0A/* LF */) { - state.position++ - } else if (ch === 0x0D/* CR */) { - state.position++ - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++ - } - } else { - throwError(state, 'a line break is expected') - } - - state.line += 1 - state.lineStart = state.position - state.firstTabInLine = -1 -} - -function skipSeparationSpace (state, allowComments, checkIndent) { - let lineBreaks = 0 - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position - } - ch = state.input.charCodeAt(++state.position) - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position) - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0) - } - - if (isEol(ch)) { - readLineBreak(state) - - ch = state.input.charCodeAt(state.position) - lineBreaks++ - state.lineIndent = 0 - - while (ch === 0x20/* Space */) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - } else { - break - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation') - } - - return lineBreaks -} - -function testDocumentSeparator (state) { - let _position = state.position - let ch = state.input.charCodeAt(_position) - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - _position += 3 - - ch = state.input.charCodeAt(_position) - - if (ch === 0 || isWsOrEol(ch)) { - return true - } - } - - return false -} - -function writeFoldedLines (state, count) { - if (count === 1) { - state.result += ' ' - } else if (count > 1) { - state.result += common.repeat('\n', count - 1) - } -} - -function readPlainScalar (state, nodeIndent, withinFlowCollection) { - let captureStart - let captureEnd - let hasPendingContent - let _line - let _lineStart - let _lineIndent - const _kind = state.kind - const _result = state.result - - let ch = state.input.charCodeAt(state.position) - - if (isWsOrEol(ch) || - isFlowIndicator(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - return false - } - } - - state.kind = 'scalar' - state.result = '' - captureStart = captureEnd = state.position - hasPendingContent = false - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following) || - (withinFlowCollection && isFlowIndicator(following))) { - break - } - } else if (ch === 0x23/* # */) { - const preceding = state.input.charCodeAt(state.position - 1) - - if (isWsOrEol(preceding)) { - break - } - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - (withinFlowCollection && isFlowIndicator(ch))) { - break - } else if (isEol(ch)) { - _line = state.line - _lineStart = state.lineStart - _lineIndent = state.lineIndent - skipSeparationSpace(state, false, -1) - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true - ch = state.input.charCodeAt(state.position) - continue - } else { - state.position = captureEnd - state.line = _line - state.lineStart = _lineStart - state.lineIndent = _lineIndent - break - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false) - writeFoldedLines(state, state.line - _line) - captureStart = captureEnd = state.position - hasPendingContent = false - } - - if (!isWhiteSpace(ch)) { - captureEnd = state.position + 1 - } - - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, captureEnd, false) - - if (state.result) { - return true - } - - state.kind = _kind - state.result = _result - return false -} - -function readSingleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x27/* ' */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x27/* ' */) { - captureStart = state.position - state.position++ - captureEnd = state.position - } else { - return true - } - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar') -} - -function readDoubleQuotedScalar (state, nodeIndent) { - let captureStart - let captureEnd - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x22/* " */) { - return false - } - - state.kind = 'scalar' - state.result = '' - state.position++ - captureStart = captureEnd = state.position - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true) - state.position++ - return true - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true) - ch = state.input.charCodeAt(++state.position) - - if (isEol(ch)) { - skipSeparationSpace(state, false, nodeIndent) - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch] - state.position++ - } else if ((tmp = escapedHexLen(ch)) > 0) { - let hexLength = tmp - let hexResult = 0 - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position) - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp - } else { - throwError(state, 'expected hexadecimal character') - } - } - - state.result += charFromCodepoint(hexResult) - - state.position++ - } else { - throwError(state, 'unknown escape sequence') - } - - captureStart = captureEnd = state.position - } else if (isEol(ch)) { - captureSegment(state, captureStart, captureEnd, true) - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)) - captureStart = captureEnd = state.position - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar') - } else { - state.position++ - if (!isWhiteSpace(ch)) { - captureEnd = state.position - } - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar') -} - -function readFlowCollection (state, nodeIndent) { - let readNext = true - let _line - let _lineStart - let _pos - const _tag = state.tag - let _result - const _anchor = state.anchor - let terminator - let isPair - let isExplicitPair - let isMapping - const overridableKeys = Object.create(null) - let keyNode - let keyTag - let valueNode - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x5B/* [ */) { - terminator = 0x5D/* ] */ - isMapping = false - _result = [] - } else if (ch === 0x7B/* { */) { - terminator = 0x7D/* } */ - isMapping = true - _result = {} - } else { - return false - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - ch = state.input.charCodeAt(++state.position) - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === terminator) { - state.position++ - state.tag = _tag - state.anchor = _anchor - state.kind = isMapping ? 'mapping' : 'sequence' - state.result = _result - return true - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries') - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','") - } - - keyTag = keyNode = valueNode = null - isPair = isExplicitPair = false - - if (ch === 0x3F/* ? */) { - const following = state.input.charCodeAt(state.position + 1) - - if (isWsOrEol(following)) { - isPair = isExplicitPair = true - state.position++ - skipSeparationSpace(state, true, nodeIndent) - } - } - - _line = state.line // Save the current line. - _lineStart = state.lineStart - _pos = state.position - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - keyTag = state.tag - keyNode = state.result - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true - ch = state.input.charCodeAt(++state.position) - skipSeparationSpace(state, true, nodeIndent) - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true) - valueNode = state.result - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos) - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)) - } else { - _result.push(keyNode) - } - - skipSeparationSpace(state, true, nodeIndent) - - ch = state.input.charCodeAt(state.position) - - if (ch === 0x2C/* , */) { - readNext = true - ch = state.input.charCodeAt(++state.position) - } else { - readNext = false - } - } - - throwError(state, 'unexpected end of the stream within a flow collection') -} - -function readBlockScalar (state, nodeIndent) { - let folding - let chomping = CHOMPING_CLIP - let didReadContent = false - let detectedIndent = false - let textIndent = nodeIndent - let emptyLines = 0 - let atMoreIndented = false - let tmp - - let ch = state.input.charCodeAt(state.position) - - if (ch === 0x7C/* | */) { - folding = false - } else if (ch === 0x3E/* > */) { - folding = true - } else { - return false - } - - state.kind = 'scalar' - state.result = '' - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP - } else { - throwError(state, 'repeat of a chomping mode identifier') - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one') - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1 - detectedIndent = true - } else { - throwError(state, 'repeat of an indentation width identifier') - } - } else { - break - } - } - - if (isWhiteSpace(ch)) { - do { ch = state.input.charCodeAt(++state.position) } - while (isWhiteSpace(ch)) - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (!isEol(ch) && (ch !== 0)) - } - } - - while (ch !== 0) { - readLineBreak(state) - state.lineIndent = 0 - - ch = state.input.charCodeAt(state.position) - - // eslint-disable-next-line no-unmodified-loop-condition - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++ - ch = state.input.charCodeAt(++state.position) - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent - } - - if (isEol(ch)) { - emptyLines++ - continue - } - - if (!detectedIndent && textIndent === 0) { - throwError(state, 'missing indentation for block scalar') - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n' - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - // Lines starting with white space characters (more-indented lines) are not folded. - if (isWhiteSpace(ch)) { - atMoreIndented = true - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false - state.result += common.repeat('\n', emptyLines + 1) - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' ' - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines) - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines) - } - - didReadContent = true - detectedIndent = true - emptyLines = 0 - const captureStart = state.position - - while (!isEol(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position) - } - - captureSegment(state, captureStart, state.position, false) - } - - return true -} - -function readBlockSequence (state, nodeIndent) { - const _tag = state.tag - const _anchor = state.anchor - const _result = [] - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - if (ch !== 0x2D/* - */) { - break - } - - const following = state.input.charCodeAt(state.position + 1) - - if (!isWsOrEol(following)) { - break - } - - detected = true - state.position++ - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null) - ch = state.input.charCodeAt(state.position) - continue - } - } - - const _line = state.line - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true) - _result.push(state.result) - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'sequence' - state.result = _result - return true - } - return false -} - -function readBlockMapping (state, nodeIndent, flowIndent) { - let allowCompact - let _keyLine - let _keyLineStart - let _keyPos - const _tag = state.tag - const _anchor = state.anchor - const _result = {} - const overridableKeys = Object.create(null) - let keyTag = null - let keyNode = null - let valueNode = null - let atExplicitKey = false - let detected = false - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, _result) - } - - let ch = state.input.charCodeAt(state.position) - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine - throwError(state, 'tab characters must not be used in indentation') - } - - const following = state.input.charCodeAt(state.position + 1) - const _line = state.line // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEol(following)) { - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = true - allowCompact = true - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false - allowCompact = true - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line') - } - - state.position += 1 - ch = following - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position) - - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position) - - if (!isWsOrEol(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping') - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - detected = true - atExplicitKey = false - allowCompact = false - keyTag = state.tag - keyNode = state.result - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key') - } else { - state.tag = _tag - state.anchor = _anchor - return true // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line - _keyLineStart = state.lineStart - _keyPos = state.position - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result - } else { - valueNode = state.result - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos) - keyTag = keyNode = valueNode = null - } - - skipSeparationSpace(state, true, -1) - ch = state.input.charCodeAt(state.position) - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry') - } else if (state.lineIndent < nodeIndent) { - break - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos) - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag - state.anchor = _anchor - state.kind = 'mapping' - state.result = _result - } - - return detected -} - -function readTagProperty (state) { - let isVerbatim = false - let isNamed = false - let tagHandle - let tagName - - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x21/* ! */) return false - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property') - } - - ch = state.input.charCodeAt(++state.position) - - if (ch === 0x3C/* < */) { - isVerbatim = true - ch = state.input.charCodeAt(++state.position) - } else if (ch === 0x21/* ! */) { - isNamed = true - tagHandle = '!!' - ch = state.input.charCodeAt(++state.position) - } else { - tagHandle = '!' - } - - let _position = state.position - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && ch !== 0x3E/* > */) - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position) - ch = state.input.charCodeAt(++state.position) - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag') - } - } else { - while (ch !== 0 && !isWsOrEol(ch)) { - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1) - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters') - } - - isNamed = true - _position = state.position + 1 - } else { - throwError(state, 'tag suffix cannot contain exclamation marks') - } - } - - ch = state.input.charCodeAt(++state.position) - } - - tagName = state.input.slice(_position, state.position) - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters') - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName) - } - - try { - tagName = decodeURIComponent(tagName) - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName) - } - - if (isVerbatim) { - state.tag = tagName - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName - } else if (tagHandle === '!') { - state.tag = '!' + tagName - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"') - } - - return true -} - -function readAnchorProperty (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x26/* & */) return false - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property') - } - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character') - } - - state.anchor = state.input.slice(_position, state.position) - return true -} - -function readAlias (state) { - let ch = state.input.charCodeAt(state.position) - - if (ch !== 0x2A/* * */) return false - - ch = state.input.charCodeAt(++state.position) - const _position = state.position - - while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character') - } - - const alias = state.input.slice(_position, state.position) - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"') - } - - state.result = state.anchorMap[alias] - skipSeparationSpace(state, true, -1) - return true -} - -function tryReadBlockMappingFromProperty (state, propertyStart, nodeIndent, flowIndent) { - const fallbackState = snapshotState(state) - - beginAnchorTransaction(state) - restoreState(state, propertyStart) - - // Re-read the leading properties as part of the first implicit key, not as - // properties of the current node. - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === 'mapping') { - commitAnchorTransaction(state) - return true - } - - rollbackAnchorTransaction(state) - restoreState(state, fallbackState) - return false -} - -function composeNode (state, parentIndent, nodeContext, allowToSeek, allowCompact) { - let allowBlockScalars - let allowBlockCollections - let indentStatus = 1 // 1: this>parent, 0: this=parent, -1: this= state.maxDepth) { - throwError(state, 'nesting exceeded maxDepth (' + state.maxDepth + ')') - } - - state.depth += 1 - - if (state.listener !== null) { - state.listener('open', state) - } - - state.tag = null - state.anchor = null - state.kind = null - state.result = null - - const allowBlockStyles = allowBlockScalars = allowBlockCollections = - CONTEXT_BLOCK_OUT === nodeContext || - CONTEXT_BLOCK_IN === nodeContext - - if (allowToSeek) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } - } - - if (indentStatus === 1) { - while (true) { - const ch = state.input.charCodeAt(state.position) - const propertyState = snapshotState(state) - - // A duplicate property token after a line break can be the first key of - // a nested block mapping, e.g. `!!map\n !!str key: value`. - if (atNewLine && - ((ch === 0x21/* ! */ && state.tag !== null) || - (ch === 0x26/* & */ && state.anchor !== null))) { - break - } - - if (!readTagProperty(state) && !readAnchorProperty(state)) { - break - } - - if (propertyStart === null) { - propertyStart = propertyState - } - - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true - allowBlockCollections = allowBlockStyles - - if (state.lineIndent > parentIndent) { - indentStatus = 1 - } else if (state.lineIndent === parentIndent) { - indentStatus = 0 - } else if (state.lineIndent < parentIndent) { - indentStatus = -1 - } - } else { - allowBlockCollections = false - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent - } else { - flowIndent = parentIndent + 1 - } - - blockIndent = state.position - state.lineStart - - if (indentStatus === 1) { - if ((allowBlockCollections && - (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent))) || - readFlowCollection(state, flowIndent)) { - hasContent = true - } else { - const ch = state.input.charCodeAt(state.position) - - if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && - ch !== 0x7C/* | */ && ch !== 0x3E/* > */ && - tryReadBlockMappingFromProperty( - state, - propertyStart, - propertyStart.position - propertyStart.lineStart, - flowIndent - )) { - hasContent = true - } else if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true - } else if (readAlias(state)) { - hasContent = true - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties') - } - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true - - if (state.tag === null) { - state.tag = '?' - } - } - - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent) - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"') - } - - for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex] - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result) - state.tag = type.tag - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - break - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag] - } else { - // looking for multi type - type = null - const typeList = state.typeMap.multi[state.kind || 'fallback'] - - for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex] - break - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>') - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"') - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag') - } else { - state.result = type.construct(state.result, state.tag) - if (state.anchor !== null) { - storeAnchor(state, state.anchor, state.result) - } - } - } - - if (state.listener !== null) { - state.listener('close', state) - } - - state.depth -= 1 - return state.tag !== null || state.anchor !== null || hasContent -} - -function readDocument (state) { - const documentStart = state.position - let hasDirectives = false - let ch - - state.version = null - state.checkLineBreaks = state.legacy - state.tagMap = Object.create(null) - state.anchorMap = Object.create(null) - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1) - - ch = state.input.charCodeAt(state.position) - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break - } - - hasDirectives = true - ch = state.input.charCodeAt(++state.position) - let _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - const directiveName = state.input.slice(_position, state.position) - const directiveArgs = [] - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length') - } - - while (ch !== 0) { - while (isWhiteSpace(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position) } - while (ch !== 0 && !isEol(ch)) - break - } - - if (isEol(ch)) break - - _position = state.position - - while (ch !== 0 && !isWsOrEol(ch)) { - ch = state.input.charCodeAt(++state.position) - } - - directiveArgs.push(state.input.slice(_position, state.position)) - } - - if (ch !== 0) readLineBreak(state) - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs) - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"') - } - } - - skipSeparationSpace(state, true, -1) - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected') - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true) - skipSeparationSpace(state, true, -1) - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content') - } - - state.documents.push(state.result) - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3 - skipSeparationSpace(state, true, -1) - } - return - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected') - } -} - -function loadDocuments (input, options) { - input = String(input) - options = options || {} - - if (input.length !== 0) { - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n' - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1) - } - } - - const state = new State(input, options) - - const nullpos = input.indexOf('\0') - - if (nullpos !== -1) { - state.position = nullpos - throwError(state, 'null byte is not allowed in input') - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0' - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1 - state.position += 1 - } - - while (state.position < (state.length - 1)) { - readDocument(state) - } - - return state.documents -} - -function loadAll (input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator - iterator = null - } - - const documents = loadDocuments(input, options) - - if (typeof iterator !== 'function') { - return documents - } - - for (let index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]) - } -} - -function load (input, options) { - const documents = loadDocuments(input, options) - - if (documents.length === 0) { - return undefined - } else if (documents.length === 1) { - return documents[0] - } - throw new YAMLException('expected a single document in the stream, but found more') -} - -module.exports.loadAll = loadAll -module.exports.load = load - - -/***/ }), - -/***/ 9992: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) -const Type = __nccwpck_require__(1647) - -function compileList (schema, name) { - const result = [] - - schema[name].forEach(function (currentType) { - let newIndex = result.length - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - newIndex = previousIndex - } - }) - - result[newIndex] = currentType - }) - - return result -} - -function compileMap (/* lists... */) { - const result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - } - function collectType (type) { - if (type.multi) { - result.multi[type.kind].push(type) - result.multi['fallback'].push(type) - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type - } - } - - for (let index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType) - } - return result -} - -function Schema (definition) { - return this.extend(definition) -} - -Schema.prototype.extend = function extend (definition) { - let implicit = [] - let explicit = [] - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition) - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition) - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit) - if (definition.explicit) explicit = explicit.concat(definition.explicit) - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })') - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.') - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.') - } - }) - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.') - } - }) - - const result = Object.create(Schema.prototype) - - result.implicit = (this.implicit || []).concat(implicit) - result.explicit = (this.explicit || []).concat(explicit) - - result.compiledImplicit = compileList(result, 'implicit') - result.compiledExplicit = compileList(result, 'explicit') - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit) - - return result -} - -module.exports = Schema - - -/***/ }), - -/***/ 8920: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - -module.exports = __nccwpck_require__(1441) - - -/***/ }), - -/***/ 8922: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - -module.exports = (__nccwpck_require__(8920).extend)({ - implicit: [ - __nccwpck_require__(7328), - __nccwpck_require__(7652) - ], - explicit: [ - __nccwpck_require__(4259), - __nccwpck_require__(7023), - __nccwpck_require__(3985), - __nccwpck_require__(3896) - ] -}) - - -/***/ }), - -/***/ 5478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - -const Schema = __nccwpck_require__(9992) - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(2999), - __nccwpck_require__(2987), - __nccwpck_require__(9362) - ] -}) - - -/***/ }), - -/***/ 1441: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - -module.exports = (__nccwpck_require__(5478).extend)({ - implicit: [ - __nccwpck_require__(3507), - __nccwpck_require__(7166), - __nccwpck_require__(2729), - __nccwpck_require__(2102) - ] -}) - - -/***/ }), - -/***/ 1934: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) - -// get snippet for a single line, respecting maxLength -function getLine (buffer, lineStart, lineEnd, position, maxLineLength) { - let head = '' - let tail = '' - const maxHalfLength = Math.floor(maxLineLength / 2) - 1 - - if (position - lineStart > maxHalfLength) { - head = ' ... ' - lineStart = position - maxHalfLength + head.length - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...' - lineEnd = position + maxHalfLength - tail.length - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - } -} - -function padStart (string, max) { - return common.repeat(' ', max - string.length) + string -} - -function makeSnippet (mark, options) { - options = Object.create(options || null) - - if (!mark.buffer) return null - - if (!options.maxLength) options.maxLength = 79 - if (typeof options.indent !== 'number') options.indent = 1 - if (typeof options.linesBefore !== 'number') options.linesBefore = 3 - if (typeof options.linesAfter !== 'number') options.linesAfter = 2 - - const re = /\r?\n|\r|\0/g - const lineStarts = [0] - const lineEnds = [] - let match - let foundLineNo = -1 - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index) - lineStarts.push(match.index + match[0].length) - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2 - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1 - - let result = '' - const lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length - const maxLineLength = options.maxLength - (options.indent + lineNoLength + 3) - - for (let i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ) - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result - } - - const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength) - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n' - - for (let i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break - const line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ) - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' - } - - return result.replace(/\n$/, '') -} - -module.exports = makeSnippet - - -/***/ }), - -/***/ 1647: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const YAMLException = __nccwpck_require__(3954) - -const TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -] - -const YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -] - -function compileStyleAliases (map) { - const result = {} - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style - }) - }) - } - - return result -} - -function Type (tag, options) { - options = options || {} - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.') - } - }) - - // TODO: Add tag format check. - this.options = options // keep original options in case user wants to extend this type later - this.tag = tag - this.kind = options['kind'] || null - this.resolve = options['resolve'] || function () { return true } - this.construct = options['construct'] || function (data) { return data } - this.instanceOf = options['instanceOf'] || null - this.predicate = options['predicate'] || null - this.represent = options['represent'] || null - this.representName = options['representName'] || null - this.defaultStyle = options['defaultStyle'] || null - this.multi = options['multi'] || false - this.styleAliases = compileStyleAliases(options['styleAliases'] || null) - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.') - } -} - -module.exports = Type - - -/***/ }), - -/***/ 4259: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -const BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r' - -function resolveYamlBinary (data) { - if (data === null) return false - - let bitlen = 0 - const max = data.length - const map = BASE64_MAP - - // Convert one by one. - for (let idx = 0; idx < max; idx++) { - const code = map.indexOf(data.charAt(idx)) - - // Skip CR/LF - if (code > 64) continue - - // Fail on illegal characters - if (code < 0) return false - - bitlen += 6 - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0 -} - -function constructYamlBinary (data) { - const input = data.replace(/[\r\n=]/g, '') // remove CR/LF & padding to simplify scan - const max = input.length - const map = BASE64_MAP - let bits = 0 - const result = [] - - // Collect by 6*4 bits (3 bytes) - - for (let idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)) - } - - // Dump tail - - const tailbits = (max % 4) * 6 - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF) - result.push((bits >> 8) & 0xFF) - result.push(bits & 0xFF) - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF) - result.push((bits >> 2) & 0xFF) - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF) - } - - return new Uint8Array(result) -} - -function representYamlBinary (object /*, style */) { - let result = '' - let bits = 0 - const max = object.length - const map = BASE64_MAP - - // Convert every three bytes to 4 ASCII characters. - - for (let idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } - - bits = (bits << 8) + object[idx] - } - - // Dump tail - - const tail = max % 3 - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F] - result += map[(bits >> 12) & 0x3F] - result += map[(bits >> 6) & 0x3F] - result += map[bits & 0x3F] - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F] - result += map[(bits >> 4) & 0x3F] - result += map[(bits << 2) & 0x3F] - result += map[64] - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F] - result += map[(bits << 4) & 0x3F] - result += map[64] - result += map[64] - } - - return result -} - -function isBinary (obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]' -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}) - - -/***/ }), - -/***/ 7166: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlBoolean (data) { - if (data === null) return false - - const max = data.length - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')) -} - -function constructYamlBoolean (data) { - return data === 'true' || - data === 'True' || - data === 'TRUE' -} - -function isBoolean (object) { - return Object.prototype.toString.call(object) === '[object Boolean]' -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false' }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE' }, - camelcase: function (object) { return object ? 'True' : 'False' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2102: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -const YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -const YAML_FLOAT_SPECIAL_PATTERN = new RegExp( - '^(?:' + - // .inf - '[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$') - -function resolveYamlFloat (data) { - if (data === null) return false - - if (!YAML_FLOAT_PATTERN.test(data)) { - return false - } - - if (Number.isFinite(parseFloat(data, 10))) { - return true - } - - return YAML_FLOAT_SPECIAL_PATTERN.test(data) -} - -function constructYamlFloat (data) { - let value = data.toLowerCase() - const sign = value[0] === '-' ? -1 : 1 - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1) - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY - } else if (value === '.nan') { - return NaN - } - return sign * parseFloat(value, 10) -} - -const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/ - -function representYamlFloat (object, style) { - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan' - case 'uppercase': return '.NAN' - case 'camelcase': return '.NaN' - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf' - case 'uppercase': return '.INF' - case 'camelcase': return '.Inf' - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf' - case 'uppercase': return '-.INF' - case 'camelcase': return '-.Inf' - } - } else if (common.isNegativeZero(object)) { - return '-0.0' - } - - const res = object.toString(10) - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res -} - -function isFloat (object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 2729: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const common = __nccwpck_require__(3922) -const Type = __nccwpck_require__(1647) - -function isHexCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) || - ((c >= 0x41/* A */) && (c <= 0x46/* F */)) || - ((c >= 0x61/* a */) && (c <= 0x66/* f */)) -} - -function isOctCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x37/* 7 */)) -} - -function isDecCode (c) { - return ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) -} - -function resolveYamlInteger (data) { - if (data === null) return false - - const max = data.length - let index = 0 - let hasDigits = false - - if (!max) return false - - let ch = data[index] - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index] - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true - ch = data[++index] - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++ - - for (; index < max; index++) { - ch = data[index] - if (ch !== '0' && ch !== '1') return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'x') { - // base 16 - index++ - - for (; index < max; index++) { - if (!isHexCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - - if (ch === 'o') { - // base 8 - index++ - - for (; index < max; index++) { - if (!isOctCode(data.charCodeAt(index))) return false - hasDigits = true - } - return hasDigits && Number.isFinite(parseYamlInteger(data)) - } - } - - // base 10 (except 0) - - for (; index < max; index++) { - if (!isDecCode(data.charCodeAt(index))) { - return false - } - hasDigits = true - } - - if (!hasDigits) return false - - return Number.isFinite(parseYamlInteger(data)) -} - -function parseYamlInteger (data) { - let value = data - let sign = 1 - - let ch = value[0] - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1 - value = value.slice(1) - ch = value[0] - } - - if (value === '0') return 0 - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2) - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16) - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8) - } - - return sign * parseInt(value, 10) -} - -function constructYamlInteger (data) { - return parseYamlInteger(data) -} - -function isInteger (object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)) -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1) }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1) }, - decimal: function (obj) { return obj.toString(10) }, - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1) } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [2, 'bin'], - octal: [8, 'oct'], - decimal: [10, 'dec'], - hexadecimal: [16, 'hex'] - } -}) - - -/***/ }), - -/***/ 9362: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {} } -}) - - -/***/ }), - -/***/ 7652: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlMerge (data) { - return data === '<<' || data === null -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}) - - -/***/ }), - -/***/ 3507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -function resolveYamlNull (data) { - if (data === null) return true - - const max = data.length - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')) -} - -function constructYamlNull () { - return null -} - -function isNull (object) { - return object === null -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~' }, - lowercase: function () { return 'null' }, - uppercase: function () { return 'NULL' }, - camelcase: function () { return 'Null' }, - empty: function () { return '' } - }, - defaultStyle: 'lowercase' -}) - - -/***/ }), - -/***/ 7023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty -const _toString = Object.prototype.toString - -function resolveYamlOmap (data) { - if (data === null) return true - - const objectKeys = [] - const object = data - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - let pairHasKey = false - - if (_toString.call(pair) !== '[object Object]') return false - - let pairKey - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true - else return false - } - } - - if (!pairHasKey) return false - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey) - else return false - } - - return true -} - -function constructYamlOmap (data) { - return data !== null ? data : [] -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}) - - -/***/ }), - -/***/ 3985: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _toString = Object.prototype.toString - -function resolveYamlPairs (data) { - if (data === null) return true - - const object = data - - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - if (_toString.call(pair) !== '[object Object]') return false - - const keys = Object.keys(pair) - - if (keys.length !== 1) return false - - result[index] = [keys[0], pair[keys[0]]] - } - - return true -} - -function constructYamlPairs (data) { - if (data === null) return [] - - const object = data - const result = new Array(object.length) - - for (let index = 0, length = object.length; index < length; index += 1) { - const pair = object[index] - - const keys = Object.keys(pair) - - result[index] = [keys[0], pair[keys[0]]] - } - - return result -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}) - - -/***/ }), - -/***/ 2987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : [] } -}) - - -/***/ }), - -/***/ 3896: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const _hasOwnProperty = Object.prototype.hasOwnProperty - -function resolveYamlSet (data) { - if (data === null) return true - - const object = data - - for (const key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false - } - } - - return true -} - -function constructYamlSet (data) { - return data !== null ? data : {} -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}) - - -/***/ }), - -/***/ 2999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : '' } -}) - - -/***/ }), - -/***/ 7328: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Type = __nccwpck_require__(1647) - -const YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$') // [3] day - -const YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tzHour - '(?::([0-9][0-9]))?))?$') // [11] tzMinute - -function resolveYamlTimestamp (data) { - if (data === null) return false - if (YAML_DATE_REGEXP.exec(data) !== null) return true - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true - return false -} - -function constructYamlTimestamp (data) { - let fraction = 0 - let delta = null - - let match = YAML_DATE_REGEXP.exec(data) - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data) - - if (match === null) throw new Error('Date resolve error') - - // match: [1] year [2] month [3] day - - const year = +(match[1]) - const month = +(match[2]) - 1 // JS month starts with 0 - const day = +(match[3]) - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)) - } - - // match: [4] hour [5] minute [6] second [7] fraction - - const hour = +(match[4]) - const minute = +(match[5]) - const second = +(match[6]) - - if (match[7]) { - fraction = match[7].slice(0, 3) - while (fraction.length < 3) { // milli-seconds - fraction += '0' - } - fraction = +fraction - } - - // match: [8] tz [9] tz_sign [10] tzHour [11] tzMinute - - if (match[9]) { - const tzHour = +(match[10]) - const tzMinute = +(match[11] || 0) - delta = (tzHour * 60 + tzMinute) * 60000 // delta in mili-seconds - if (match[9] === '-') delta = -delta - } - - const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)) - - if (delta) date.setTime(date.getTime() - delta) - - return date -} - -function representYamlTimestamp (object /*, style */) { - return object.toISOString() -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}) - - -/***/ }), - -/***/ 4031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/* - * merge2 - * https://github.com/teambition/merge2 - * - * Copyright (c) 2014-2020 Teambition - * Licensed under the MIT license. - */ -const Stream = __nccwpck_require__(2203) -const PassThrough = Stream.PassThrough -const slice = Array.prototype.slice - -module.exports = merge2 - -function merge2 () { - const streamsQueue = [] - const args = slice.call(arguments) - let merging = false - let options = args[args.length - 1] - - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop() - } else { - options = {} - } - - const doEnd = options.end !== false - const doPipeError = options.pipeError === true - if (options.objectMode == null) { - options.objectMode = true - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024 - } - const mergedStream = PassThrough(options) - - function addStream () { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)) - } - mergeStream() - return this - } - - function mergeStream () { - if (merging) { - return - } - merging = true - - let streams = streamsQueue.shift() - if (!streams) { - process.nextTick(endStream) - return - } - if (!Array.isArray(streams)) { - streams = [streams] - } - - let pipesCount = streams.length + 1 - - function next () { - if (--pipesCount > 0) { - return - } - merging = false - mergeStream() - } - - function pipe (stream) { - function onend () { - stream.removeListener('merge2UnpipeEnd', onend) - stream.removeListener('end', onend) - if (doPipeError) { - stream.removeListener('error', onerror) - } - next() - } - function onerror (err) { - mergedStream.emit('error', err) - } - // skip ended stream - if (stream._readableState.endEmitted) { - return next() - } - - stream.on('merge2UnpipeEnd', onend) - stream.on('end', onend) - - if (doPipeError) { - stream.on('error', onerror) - } - - stream.pipe(mergedStream, { end: false }) - // compatible for old stream - stream.resume() - } - - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]) - } - - next() - } - - function endStream () { - merging = false - // emit 'queueDrain' when all streams merged. - mergedStream.emit('queueDrain') - if (doEnd) { - mergedStream.end() - } - } - - mergedStream.setMaxListeners(0) - mergedStream.add = addStream - mergedStream.on('unpipe', function (stream) { - stream.emit('merge2UnpipeEnd') - }) - - if (args.length) { - addStream.apply(null, args) - } - return mergedStream -} - -// check and pause streams for pipe. -function pauseStreams (streams, options) { - if (!Array.isArray(streams)) { - // Backwards-compat with old-style streams - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)) - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error('Only readable stream can be merged.') - } - streams.pause() - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options) - } - } - return streams -} - - -/***/ }), - -/***/ 9555: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(9023); -const braces = __nccwpck_require__(8671); -const picomatch = __nccwpck_require__(3268); -const utils = __nccwpck_require__(3753); - -const isEmptyString = v => v === '' || v === './'; -const hasBraces = v => { - const index = v.indexOf('{'); - return index > -1 && v.indexOf('}', index) > -1; -}; - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} `list` List of strings to match. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `[options]` See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any of the patterns matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.parse(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -// exposed for tests -micromatch.hasBraces = hasBraces; -module.exports = micromatch; - - -/***/ }), - -/***/ 3268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = __nccwpck_require__(1614); - - -/***/ }), - -/***/ 1237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -const DEFAULT_MAX_EXTGLOB_RECURSION = 0; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - __proto__: null, - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - DEFAULT_MAX_EXTGLOB_RECURSION, - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - __proto__: null, - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; - - -/***/ }), - -/***/ 51: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const constants = __nccwpck_require__(1237); -const utils = __nccwpck_require__(3753); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -const splitTopLevel = input => { - const parts = []; - let bracket = 0; - let paren = 0; - let quote = 0; - let value = ''; - let escaped = false; - - for (const ch of input) { - if (escaped === true) { - value += ch; - escaped = false; - continue; - } - - if (ch === '\\') { - value += ch; - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - value += ch; - continue; - } - - if (quote === 0) { - if (ch === '[') { - bracket++; - } else if (ch === ']' && bracket > 0) { - bracket--; - } else if (bracket === 0) { - if (ch === '(') { - paren++; - } else if (ch === ')' && paren > 0) { - paren--; - } else if (ch === '|' && paren === 0) { - parts.push(value); - value = ''; - continue; - } - } - } - - value += ch; - } - - parts.push(value); - return parts; -}; - -const isPlainBranch = branch => { - let escaped = false; - - for (const ch of branch) { - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (/[?*+@!()[\]{}]/.test(ch)) { - return false; - } - } - - return true; -}; - -const normalizeSimpleBranch = branch => { - let value = branch.trim(); - let changed = true; - - while (changed === true) { - changed = false; - - if (/^@\([^\\()[\]{}|]+\)$/.test(value)) { - value = value.slice(2, -1); - changed = true; - } - } - - if (!isPlainBranch(value)) { - return; - } - - return value.replace(/\\(.)/g, '$1'); -}; - -const hasRepeatedCharPrefixOverlap = branches => { - const values = branches.map(normalizeSimpleBranch).filter(Boolean); - - for (let i = 0; i < values.length; i++) { - for (let j = i + 1; j < values.length; j++) { - const a = values[i]; - const b = values[j]; - const char = a[0]; - - if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) { - continue; - } - - if (a === b || a.startsWith(b) || b.startsWith(a)) { - return true; - } - } - } - - return false; -}; - -const parseRepeatedExtglob = (pattern, requireEnd = true) => { - if ((pattern[0] !== '+' && pattern[0] !== '*') || pattern[1] !== '(') { - return; - } - - let bracket = 0; - let paren = 0; - let quote = 0; - let escaped = false; - - for (let i = 1; i < pattern.length; i++) { - const ch = pattern[i]; - - if (escaped === true) { - escaped = false; - continue; - } - - if (ch === '\\') { - escaped = true; - continue; - } - - if (ch === '"') { - quote = quote === 1 ? 0 : 1; - continue; - } - - if (quote === 1) { - continue; - } - - if (ch === '[') { - bracket++; - continue; - } - - if (ch === ']' && bracket > 0) { - bracket--; - continue; - } - - if (bracket > 0) { - continue; - } - - if (ch === '(') { - paren++; - continue; - } - - if (ch === ')') { - paren--; - - if (paren === 0) { - if (requireEnd === true && i !== pattern.length - 1) { - return; - } - - return { - type: pattern[0], - body: pattern.slice(2, i), - end: i - }; - } - } - } -}; - -const getStarExtglobSequenceOutput = pattern => { - let index = 0; - const chars = []; - - while (index < pattern.length) { - const match = parseRepeatedExtglob(pattern.slice(index), false); - - if (!match || match.type !== '*') { - return; - } - - const branches = splitTopLevel(match.body).map(branch => branch.trim()); - if (branches.length !== 1) { - return; - } - - const branch = normalizeSimpleBranch(branches[0]); - if (!branch || branch.length !== 1) { - return; - } - - chars.push(branch); - index += match.end + 1; - } - - if (chars.length < 1) { - return; - } - - const source = chars.length === 1 - ? utils.escapeRegex(chars[0]) - : `[${chars.map(ch => utils.escapeRegex(ch)).join('')}]`; - - return `${source}*`; -}; - -const repeatedExtglobRecursion = pattern => { - let depth = 0; - let value = pattern.trim(); - let match = parseRepeatedExtglob(value); - - while (match) { - depth++; - value = match.body.trim(); - match = parseRepeatedExtglob(value); - } - - return depth; -}; - -const analyzeRepeatedExtglob = (body, options) => { - if (options.maxExtglobRecursion === false) { - return { risky: false }; - } - - const max = - typeof options.maxExtglobRecursion === 'number' - ? options.maxExtglobRecursion - : constants.DEFAULT_MAX_EXTGLOB_RECURSION; - - const branches = splitTopLevel(body).map(branch => branch.trim()); - - if (branches.length > 1) { - if ( - branches.some(branch => branch === '') || - branches.some(branch => /^[*?]+$/.test(branch)) || - hasRepeatedCharPrefixOverlap(branches) - ) { - return { risky: true }; - } - } - - for (const branch of branches) { - const safeOutput = getStarExtglobSequenceOutput(branch); - if (safeOutput) { - return { risky: true, safeOutput }; - } - - if (repeatedExtglobRecursion(branch) > max) { - return { risky: true }; - } - } - - return { risky: false }; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - token.startIndex = state.index; - token.tokensIndex = tokens.length; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - const literal = input.slice(token.startIndex, state.index + 1); - const body = input.slice(token.startIndex + 2, state.index); - const analysis = analyzeRepeatedExtglob(body, opts); - - if ((token.type === 'plus' || token.type === 'star') && analysis.risky) { - const safeOutput = analysis.safeOutput - ? (token.output ? '' : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) - : undefined; - const open = tokens[token.tokensIndex]; - - open.type = 'text'; - open.value = literal; - open.output = safeOutput || utils.escapeRegex(literal); - - for (let i = token.tokensIndex + 1; i < tokens.length; i++) { - tokens[i].value = ''; - tokens[i].output = ''; - delete tokens[i].suffix; - } - - state.output = token.output + open.output; - state.backtrack = true; - - push({ type: 'paren', extglob: true, value, output: '' }); - decrement('parens'); - return; - } - - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; - - -/***/ }), - -/***/ 1614: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const scan = __nccwpck_require__(3999); -const parse = __nccwpck_require__(51); -const utils = __nccwpck_require__(3753); -const constants = __nccwpck_require__(1237); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; - - -/***/ }), - -/***/ 3999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const utils = __nccwpck_require__(3753); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __nccwpck_require__(1237); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; - - -/***/ }), - -/***/ 3753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - - -const path = __nccwpck_require__(6928); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = __nccwpck_require__(1237); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; - - -/***/ }), - -/***/ 1989: -/***/ ((module) => { - -/*! queue-microtask. MIT License. Feross Aboukhadijeh */ -let promise - -module.exports = typeof queueMicrotask === 'function' - ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) - // reuse resolved promise, and allocate it lazily - : cb => (promise || (promise = Promise.resolve())) - .then(cb) - .catch(err => setTimeout(() => { throw err }, 0)) - - -/***/ }), - -/***/ 3728: -/***/ ((module) => { - - - -function reusify (Constructor) { - var head = new Constructor() - var tail = head - - function get () { - var current = head - - if (current.next) { - head = current.next - } else { - head = new Constructor() - tail = head - } - - current.next = null - - return current - } - - function release (obj) { - tail.next = obj - tail = obj - } - - return { - get: get, - release: release - } -} - -module.exports = reusify - - -/***/ }), - -/***/ 7906: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! run-parallel. MIT License. Feross Aboukhadijeh */ -module.exports = runParallel - -const queueMicrotask = __nccwpck_require__(1989) - -function runParallel (tasks, cb) { - let results, pending, keys - let isSync = true - - if (Array.isArray(tasks)) { - results = [] - pending = tasks.length - } else { - keys = Object.keys(tasks) - results = {} - pending = keys.length - } - - function done (err) { - function end () { - if (cb) cb(err, results) - cb = null - } - if (isSync) queueMicrotask(end) - else end() - } - - function each (i, err, result) { - results[i] = result - if (--pending === 0 || err) { - done(err) - } - } - - if (!pending) { - // empty - done(null) - } else if (keys) { - // object - keys.forEach(function (key) { - tasks[key](function (err, result) { each(key, err, result) }) - }) - } else { - // array - tasks.forEach(function (task, i) { - task(function (err, result) { each(i, err, result) }) - }) - } - - isSync = false -} - - -/***/ }), - -/***/ 743: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -const isNumber = __nccwpck_require__(952); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; - - -/***/ }), - -/***/ 7285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* unused reexport */ __nccwpck_require__(8703); - - -/***/ }), - -/***/ 8703: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -var net = __nccwpck_require__(9278); -var tls = __nccwpck_require__(4756); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var events = __nccwpck_require__(4434); -var assert = __nccwpck_require__(2613); -var util = __nccwpck_require__(9023); - - -__webpack_unused_export__ = httpOverHttp; -__webpack_unused_export__ = httpsOverHttp; -__webpack_unused_export__ = httpOverHttps; -__webpack_unused_export__ = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -__webpack_unused_export__ = debug; // for test - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var __webpack_unused_export__; - - -const Client = __nccwpck_require__(3279) -const Dispatcher = __nccwpck_require__(6105) -const Pool = __nccwpck_require__(5406) -const BalancedPool = __nccwpck_require__(9319) -const Agent = __nccwpck_require__(4963) -const ProxyAgent = __nccwpck_require__(3950) -const EnvHttpProxyAgent = __nccwpck_require__(1915) -const RetryAgent = __nccwpck_require__(9048) -const errors = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(4785) -const buildConnector = __nccwpck_require__(9346) -const MockClient = __nccwpck_require__(9079) -const MockAgent = __nccwpck_require__(3819) -const MockPool = __nccwpck_require__(406) -const mockErrors = __nccwpck_require__(499) -const RetryHandler = __nccwpck_require__(8630) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(1063) -const DecoratorHandler = __nccwpck_require__(8677) -const RedirectHandler = __nccwpck_require__(5056) -const createRedirectInterceptor = __nccwpck_require__(5002) - -Object.assign(Dispatcher.prototype, api) - -__webpack_unused_export__ = Dispatcher -__webpack_unused_export__ = Client -__webpack_unused_export__ = Pool -__webpack_unused_export__ = BalancedPool -__webpack_unused_export__ = Agent -__webpack_unused_export__ = ProxyAgent -__webpack_unused_export__ = EnvHttpProxyAgent -__webpack_unused_export__ = RetryAgent -__webpack_unused_export__ = RetryHandler - -__webpack_unused_export__ = DecoratorHandler -__webpack_unused_export__ = RedirectHandler -__webpack_unused_export__ = createRedirectInterceptor -__webpack_unused_export__ = { - redirect: __nccwpck_require__(4668), - retry: __nccwpck_require__(5732), - dump: __nccwpck_require__(1722), - dns: __nccwpck_require__(261) -} - -__webpack_unused_export__ = buildConnector -__webpack_unused_export__ = errors -__webpack_unused_export__ = { - parseHeaders: util.parseHeaders, - headerNameToString: util.headerNameToString -} - -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null - } - - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } - - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) - } -} - -__webpack_unused_export__ = setGlobalDispatcher -__webpack_unused_export__ = getGlobalDispatcher - -const fetchImpl = (__nccwpck_require__(4268).fetch) -__webpack_unused_export__ = async function fetch (init, options = undefined) { - try { - return await fetchImpl(init, options) - } catch (err) { - if (err && typeof err === 'object') { - Error.captureStackTrace(err) - } - - throw err - } -} -/* unused reexport */ __nccwpck_require__(9822).Headers -/* unused reexport */ __nccwpck_require__(8661).Response -/* unused reexport */ __nccwpck_require__(6465).Request -/* unused reexport */ __nccwpck_require__(9976).FormData -__webpack_unused_export__ = globalThis.File ?? (__nccwpck_require__(4573).File) -/* unused reexport */ __nccwpck_require__(5713).FileReader - -const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(3701) - -__webpack_unused_export__ = setGlobalOrigin -__webpack_unused_export__ = getGlobalOrigin - -const { CacheStorage } = __nccwpck_require__(7355) -const { kConstruct } = __nccwpck_require__(9567) - -// Cache & CacheStorage are tightly coupled with fetch. Even if it may run -// in an older version of Node, it doesn't have any use without fetch. -__webpack_unused_export__ = new CacheStorage(kConstruct) - -const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(8383) - -__webpack_unused_export__ = deleteCookie -__webpack_unused_export__ = getCookies -__webpack_unused_export__ = getSetCookies -__webpack_unused_export__ = setCookie - -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(8094) - -__webpack_unused_export__ = parseMIMEType -__webpack_unused_export__ = serializeAMimeType - -const { CloseEvent, ErrorEvent, MessageEvent } = __nccwpck_require__(8798) -/* unused reexport */ __nccwpck_require__(7976).WebSocket -__webpack_unused_export__ = CloseEvent -__webpack_unused_export__ = ErrorEvent -__webpack_unused_export__ = MessageEvent - -__webpack_unused_export__ = makeDispatcher(api.request) -__webpack_unused_export__ = makeDispatcher(api.stream) -__webpack_unused_export__ = makeDispatcher(api.pipeline) -__webpack_unused_export__ = makeDispatcher(api.connect) -__webpack_unused_export__ = makeDispatcher(api.upgrade) - -__webpack_unused_export__ = MockClient -__webpack_unused_export__ = MockPool -__webpack_unused_export__ = MockAgent -__webpack_unused_export__ = mockErrors - -const { EventSource } = __nccwpck_require__(7784) - -__webpack_unused_export__ = EventSource - - -/***/ }), - -/***/ 6816: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(8106) -const { RequestAbortedError } = __nccwpck_require__(2545) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort(self[kSignal]?.reason) - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError() - } - removeSignal(self) -} - -function addSignal (self, signal) { - self.reason = null - - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 270: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { AsyncResource } = __nccwpck_require__(6698) -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_CONNECT') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(7075) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body?.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - if (this.reason) { - abort(this.reason) - return - } - - assert(!res, 'pipeline cannot be retried') - assert(!ret.destroyed) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 17: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(8169) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.method = method - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark - this.signal = signal - this.reason = null - this.removeAbortListener = null - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - if (this.signal) { - if (this.signal.aborted) { - this.reason = this.signal.reason ?? new RequestAbortedError() - } else { - this.removeAbortListener = util.addAbortListener(this.signal, () => { - this.reason = this.signal.reason ?? new RequestAbortedError() - if (this.res) { - util.destroy(this.res.on('error', util.nop), this.reason) - } else if (this.abort) { - this.abort(this.reason) - } - - if (this.removeAbortListener) { - this.res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - }) - } - } - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const contentLength = parsedHeaders['content-length'] - const res = new Readable({ - resume, - abort, - contentType, - contentLength: this.method !== 'HEAD' && contentLength - ? Number(contentLength) - : null, - highWaterMark - }) - - if (this.removeAbortListener) { - res.on('close', this.removeAbortListener) - } - - this.callback = null - this.res = res - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }) - } - } - } - - onData (chunk) { - return this.res.push(chunk) - } - - onComplete (trailers) { - util.parseHeaders(trailers, this.trailers) - this.res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - - if (this.removeAbortListener) { - res?.off('close', this.removeAbortListener) - this.removeAbortListener() - this.removeAbortListener = null - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { finished, PassThrough } = __nccwpck_require__(7075) -const { InvalidArgumentError, InvalidReturnValueError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { getResolveErrorBodyCallback } = __nccwpck_require__(7209) -const { AsyncResource } = __nccwpck_require__(6698) -const { addSignal, removeSignal } = __nccwpck_require__(6816) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err - } - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) - - if (err) { - abort() - } - }) - } - - res.on('drain', resume) - - this.res = res - - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState?.needDrain - - return needDrain !== true - } - - onData (chunk) { - const { res } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 7488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError, SocketError } = __nccwpck_require__(2545) -const { AsyncResource } = __nccwpck_require__(6698) -const util = __nccwpck_require__(8106) -const { addSignal, removeSignal } = __nccwpck_require__(6816) -const assert = __nccwpck_require__(4589) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - super('UNDICI_UPGRADE') - - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (this.reason) { - abort(this.reason) - return - } - - assert(this.callback) - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - assert(statusCode === 101) - - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts?.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 4785: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports.request = __nccwpck_require__(17) -module.exports.stream = __nccwpck_require__(6610) -module.exports.pipeline = __nccwpck_require__(8084) -module.exports.upgrade = __nccwpck_require__(7488) -module.exports.connect = __nccwpck_require__(270) - - -/***/ }), - -/***/ 8169: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(4589) -const { Readable } = __nccwpck_require__(7075) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { ReadableStreamFrom } = __nccwpck_require__(8106) - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('kAbort') -const kContentType = Symbol('kContentType') -const kContentLength = Symbol('kContentLength') - -const noop = () => {} - -class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - contentLength, - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType - this[kContentLength] = contentLength - - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } - - destroy (err) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[kAbort]() - } - - return super.destroy(err) - } - - _destroy (err, callback) { - // Workaround for Node "bug". If the stream is destroyed in same - // tick as it is created, then a user who is waiting for a - // promise (i.e micro tick) for installing a 'error' listener will - // never get a chance and will always encounter an unhandled exception. - if (!this[kReading]) { - setImmediate(() => { - callback(err) - }) - } else { - callback(err) - } - } - - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } - - addListener (ev, ...args) { - return this.on(ev, ...args) - } - - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-bytes - async bytes () { - return consume(this, 'bytes') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[kBody] - } - - async dump (opts) { - let limit = Number.isFinite(opts?.limit) ? opts.limit : 128 * 1024 - const signal = opts?.signal - - if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - - signal?.throwIfAborted() - - if (this._readableState.closeEmitted) { - return null - } - - return await new Promise((resolve, reject) => { - if (this[kContentLength] > limit) { - this.destroy(new AbortError()) - } - - const onAbort = () => { - this.destroy(signal.reason ?? new AbortError()) - } - signal?.addEventListener('abort', onAbort) - - this - .on('close', function () { - signal?.removeEventListener('abort', onAbort) - if (signal?.aborted) { - reject(signal.reason ?? new AbortError()) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - if (isUnusable(stream)) { - const rState = stream._readableState - if (rState.destroyed && rState.closeEmitted === false) { - stream - .on('error', err => { - reject(err) - }) - .on('close', () => { - reject(new TypeError('unusable')) - }) - } else { - reject(rState.errored ?? new TypeError('unusable')) - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - consumeStart(stream[kConsume]) - }) - } - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - if (state.bufferIndex) { - const start = state.bufferIndex - const end = state.buffer.length - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]) - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - */ -function chunksDecode (chunks, length) { - if (chunks.length === 0 || length === 0) { - return '' - } - const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length) - const bufferLength = buffer.length - - // Skip BOM. - const start = - bufferLength > 2 && - buffer[0] === 0xef && - buffer[1] === 0xbb && - buffer[2] === 0xbf - ? 3 - : 0 - return buffer.utf8Slice(start, bufferLength) -} - -/** - * @param {Buffer[]} chunks - * @param {number} length - * @returns {Uint8Array} - */ -function chunksConcat (chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0) - } - if (chunks.length === 1) { - // fast-path - return new Uint8Array(chunks[0]) - } - const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer) - - let offset = 0 - for (let i = 0; i < chunks.length; ++i) { - const chunk = chunks[i] - buffer.set(chunk, offset) - offset += chunk.length - } - - return buffer -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(chunksDecode(body, length)) - } else if (type === 'json') { - resolve(JSON.parse(chunksDecode(body, length))) - } else if (type === 'arrayBuffer') { - resolve(chunksConcat(body, length).buffer) - } else if (type === 'blob') { - resolve(new Blob(body, { type: stream[kContentType] })) - } else if (type === 'bytes') { - resolve(chunksConcat(body, length)) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } - - if (err) { - consume.reject(err) - } else { - consume.resolve() - } - - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} - -module.exports = { Readable: BodyReadable, chunksDecode } - - -/***/ }), - -/***/ 7209: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(4589) -const { - ResponseStatusCodeError -} = __nccwpck_require__(2545) - -const { chunksDecode } = __nccwpck_require__(8169) -const CHUNK_LIMIT = 128 * 1024 - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let length = 0 - - try { - for await (const chunk of body) { - chunks.push(chunk) - length += chunk.length - if (length > CHUNK_LIMIT) { - chunks = [] - length = 0 - break - } - } - } catch { - chunks = [] - length = 0 - // Do nothing.... - } - - const message = `Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}` - - if (statusCode === 204 || !contentType || !length) { - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers))) - return - } - - const stackTraceLimit = Error.stackTraceLimit - Error.stackTraceLimit = 0 - let payload - - try { - if (isContentTypeApplicationJson(contentType)) { - payload = JSON.parse(chunksDecode(chunks, length)) - } else if (isContentTypeText(contentType)) { - payload = chunksDecode(chunks, length) - } - } catch { - // process in a callback to avoid throwing in the microtask queue - } finally { - Error.stackTraceLimit = stackTraceLimit - } - queueMicrotask(() => callback(new ResponseStatusCodeError(message, statusCode, headers, payload))) -} - -const isContentTypeApplicationJson = (contentType) => { - return ( - contentType.length > 15 && - contentType[11] === '/' && - contentType[0] === 'a' && - contentType[1] === 'p' && - contentType[2] === 'p' && - contentType[3] === 'l' && - contentType[4] === 'i' && - contentType[5] === 'c' && - contentType[6] === 'a' && - contentType[7] === 't' && - contentType[8] === 'i' && - contentType[9] === 'o' && - contentType[10] === 'n' && - contentType[12] === 'j' && - contentType[13] === 's' && - contentType[14] === 'o' && - contentType[15] === 'n' - ) -} - -const isContentTypeText = (contentType) => { - return ( - contentType.length > 4 && - contentType[4] === '/' && - contentType[0] === 't' && - contentType[1] === 'e' && - contentType[2] === 'x' && - contentType[3] === 't' - ) -} - -module.exports = { - getResolveErrorBodyCallback, - isContentTypeApplicationJson, - isContentTypeText -} - - -/***/ }), - -/***/ 9346: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const net = __nccwpck_require__(7030) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(2545) -const timers = __nccwpck_require__(3113) - -function noop () {} - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } - - this._sessionCache.set(sessionKey, session) - } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(1692) - } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - assert(sessionKey) - - const session = customSession || sessionCache.get(sessionKey) || null - - port = port || 443 - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port, - host: hostname - }) - - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - - port = port || 80 - - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port, - host: hostname - }) - } - - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) - } - - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname, port }) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - queueMicrotask(clearConnectTimeout) - - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) - - return socket - } -} - -/** - * @param {WeakRef} socketWeakRef - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - * @returns {() => void} - */ -const setupConnectTimeout = process.platform === 'win32' - ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - let s2 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout(socketWeakRef.deref(), opts)) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - clearImmediate(s2) - } - } - : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop - } - - let s1 = null - const fastTimer = timers.setFastTimeout(() => { - // setImmediate is added to make sure that we prioritize socket error events over timeouts - s1 = setImmediate(() => { - onConnectTimeout(socketWeakRef.deref(), opts) - }) - }, opts.timeout) - return () => { - timers.clearFastTimeout(fastTimer) - clearImmediate(s1) - } - } - -/** - * @param {net.Socket} socket - * @param {object} opts - * @param {number} opts.timeout - * @param {string} opts.hostname - * @param {number} opts.port - */ -function onConnectTimeout (socket, opts) { - // The socket could be already garbage collected - if (socket == null) { - return - } - - let message = 'Connect Timeout Error' - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(', ')},` - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},` - } - - message += ` timeout: ${opts.timeout}ms)` - - util.destroy(socket, new ConnectTimeoutError(message)) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 8933: -/***/ ((module) => { - - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const wellknownHeaderNames = [ - 'Accept', - 'Accept-Encoding', - 'Accept-Language', - 'Accept-Ranges', - 'Access-Control-Allow-Credentials', - 'Access-Control-Allow-Headers', - 'Access-Control-Allow-Methods', - 'Access-Control-Allow-Origin', - 'Access-Control-Expose-Headers', - 'Access-Control-Max-Age', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Age', - 'Allow', - 'Alt-Svc', - 'Alt-Used', - 'Authorization', - 'Cache-Control', - 'Clear-Site-Data', - 'Connection', - 'Content-Disposition', - 'Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-Range', - 'Content-Security-Policy', - 'Content-Security-Policy-Report-Only', - 'Content-Type', - 'Cookie', - 'Cross-Origin-Embedder-Policy', - 'Cross-Origin-Opener-Policy', - 'Cross-Origin-Resource-Policy', - 'Date', - 'Device-Memory', - 'Downlink', - 'ECT', - 'ETag', - 'Expect', - 'Expect-CT', - 'Expires', - 'Forwarded', - 'From', - 'Host', - 'If-Match', - 'If-Modified-Since', - 'If-None-Match', - 'If-Range', - 'If-Unmodified-Since', - 'Keep-Alive', - 'Last-Modified', - 'Link', - 'Location', - 'Max-Forwards', - 'Origin', - 'Permissions-Policy', - 'Pragma', - 'Proxy-Authenticate', - 'Proxy-Authorization', - 'RTT', - 'Range', - 'Referer', - 'Referrer-Policy', - 'Refresh', - 'Retry-After', - 'Sec-WebSocket-Accept', - 'Sec-WebSocket-Extensions', - 'Sec-WebSocket-Key', - 'Sec-WebSocket-Protocol', - 'Sec-WebSocket-Version', - 'Server', - 'Server-Timing', - 'Service-Worker-Allowed', - 'Service-Worker-Navigation-Preload', - 'Set-Cookie', - 'SourceMap', - 'Strict-Transport-Security', - 'Supports-Loading-Mode', - 'TE', - 'Timing-Allow-Origin', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Upgrade-Insecure-Requests', - 'User-Agent', - 'Vary', - 'Via', - 'WWW-Authenticate', - 'X-Content-Type-Options', - 'X-DNS-Prefetch-Control', - 'X-Frame-Options', - 'X-Permitted-Cross-Domain-Policies', - 'X-Powered-By', - 'X-Requested-With', - 'X-XSS-Protection' -] - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 2276: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const diagnosticsChannel = __nccwpck_require__(3053) -const util = __nccwpck_require__(7975) - -const undiciDebugLog = util.debuglog('undici') -const fetchDebuglog = util.debuglog('fetch') -const websocketDebuglog = util.debuglog('websocket') -let isClientSet = false -const channels = { - // Client - beforeConnect: diagnosticsChannel.channel('undici:client:beforeConnect'), - connected: diagnosticsChannel.channel('undici:client:connected'), - connectError: diagnosticsChannel.channel('undici:client:connectError'), - sendHeaders: diagnosticsChannel.channel('undici:client:sendHeaders'), - // Request - create: diagnosticsChannel.channel('undici:request:create'), - bodySent: diagnosticsChannel.channel('undici:request:bodySent'), - headers: diagnosticsChannel.channel('undici:request:headers'), - trailers: diagnosticsChannel.channel('undici:request:trailers'), - error: diagnosticsChannel.channel('undici:request:error'), - // WebSocket - open: diagnosticsChannel.channel('undici:websocket:open'), - close: diagnosticsChannel.channel('undici:websocket:close'), - socketError: diagnosticsChannel.channel('undici:websocket:socket_error'), - ping: diagnosticsChannel.channel('undici:websocket:ping'), - pong: diagnosticsChannel.channel('undici:websocket:pong') -} - -if (undiciDebugLog.enabled || fetchDebuglog.enabled) { - const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog - - // Track all Client events - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s using %s%s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s using %s%s errored - %s', - `${host}${port ? `:${port}` : ''}`, - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - - // Track Request events - diagnosticsChannel.channel('undici:request:headers').subscribe(evt => { - const { - request: { method, path, origin }, - response: { statusCode } - } = evt - debuglog( - 'received response to %s %s/%s - HTTP %d', - method, - origin, - path, - statusCode - ) - }) - - diagnosticsChannel.channel('undici:request:trailers').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('trailers received from %s %s/%s', method, origin, path) - }) - - diagnosticsChannel.channel('undici:request:error').subscribe(evt => { - const { - request: { method, path, origin }, - error - } = evt - debuglog( - 'request to %s %s/%s errored - %s', - method, - origin, - path, - error.message - ) - }) - - isClientSet = true -} - -if (websocketDebuglog.enabled) { - if (!isClientSet) { - const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog - diagnosticsChannel.channel('undici:client:beforeConnect').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connecting to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connected').subscribe(evt => { - const { - connectParams: { version, protocol, port, host } - } = evt - debuglog( - 'connected to %s%s using %s%s', - host, - port ? `:${port}` : '', - protocol, - version - ) - }) - - diagnosticsChannel.channel('undici:client:connectError').subscribe(evt => { - const { - connectParams: { version, protocol, port, host }, - error - } = evt - debuglog( - 'connection to %s%s using %s%s errored - %s', - host, - port ? `:${port}` : '', - protocol, - version, - error.message - ) - }) - - diagnosticsChannel.channel('undici:client:sendHeaders').subscribe(evt => { - const { - request: { method, path, origin } - } = evt - debuglog('sending request to %s %s/%s', method, origin, path) - }) - } - - // Track all WebSocket events - diagnosticsChannel.channel('undici:websocket:open').subscribe(evt => { - const { - address: { address, port } - } = evt - websocketDebuglog('connection opened %s%s', address, port ? `:${port}` : '') - }) - - diagnosticsChannel.channel('undici:websocket:close').subscribe(evt => { - const { websocket, code, reason } = evt - websocketDebuglog( - 'closed connection to %s - %s %s', - websocket.url, - code, - reason - ) - }) - - diagnosticsChannel.channel('undici:websocket:socket_error').subscribe(err => { - websocketDebuglog('connection errored - %s', err.message) - }) - - diagnosticsChannel.channel('undici:websocket:ping').subscribe(evt => { - websocketDebuglog('ping received') - }) - - diagnosticsChannel.channel('undici:websocket:pong').subscribe(evt => { - websocketDebuglog('pong received') - }) -} - -module.exports = { - channels -} - - -/***/ }), - -/***/ 2545: -/***/ ((module) => { - - - -const kUndiciError = Symbol.for('undici.error.UND_ERR') -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kUndiciError] === true - } - - [kUndiciError] = true -} - -const kConnectTimeoutError = Symbol.for('undici.error.UND_ERR_CONNECT_TIMEOUT') -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kConnectTimeoutError] === true - } - - [kConnectTimeoutError] = true -} - -const kHeadersTimeoutError = Symbol.for('undici.error.UND_ERR_HEADERS_TIMEOUT') -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersTimeoutError] === true - } - - [kHeadersTimeoutError] = true -} - -const kHeadersOverflowError = Symbol.for('undici.error.UND_ERR_HEADERS_OVERFLOW') -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHeadersOverflowError] === true - } - - [kHeadersOverflowError] = true -} - -const kBodyTimeoutError = Symbol.for('undici.error.UND_ERR_BODY_TIMEOUT') -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBodyTimeoutError] === true - } - - [kBodyTimeoutError] = true -} - -const kResponseStatusCodeError = Symbol.for('undici.error.UND_ERR_RESPONSE_STATUS_CODE') -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseStatusCodeError] === true - } - - [kResponseStatusCodeError] = true -} - -const kInvalidArgumentError = Symbol.for('undici.error.UND_ERR_INVALID_ARG') -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidArgumentError] === true - } - - [kInvalidArgumentError] = true -} - -const kInvalidReturnValueError = Symbol.for('undici.error.UND_ERR_INVALID_RETURN_VALUE') -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInvalidReturnValueError] === true - } - - [kInvalidReturnValueError] = true -} - -const kAbortError = Symbol.for('undici.error.UND_ERR_ABORT') -class AbortError extends UndiciError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'The operation was aborted' - this.code = 'UND_ERR_ABORT' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kAbortError] === true - } - - [kAbortError] = true -} - -const kRequestAbortedError = Symbol.for('undici.error.UND_ERR_ABORTED') -class RequestAbortedError extends AbortError { - constructor (message) { - super(message) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestAbortedError] === true - } - - [kRequestAbortedError] = true -} - -const kInformationalError = Symbol.for('undici.error.UND_ERR_INFO') -class InformationalError extends UndiciError { - constructor (message) { - super(message) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kInformationalError] === true - } - - [kInformationalError] = true -} - -const kRequestContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH') -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestContentLengthMismatchError] === true - } - - [kRequestContentLengthMismatchError] = true -} - -const kResponseContentLengthMismatchError = Symbol.for('undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH') -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseContentLengthMismatchError] === true - } - - [kResponseContentLengthMismatchError] = true -} - -const kClientDestroyedError = Symbol.for('undici.error.UND_ERR_DESTROYED') -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientDestroyedError] === true - } - - [kClientDestroyedError] = true -} - -const kClientClosedError = Symbol.for('undici.error.UND_ERR_CLOSED') -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kClientClosedError] === true - } - - [kClientClosedError] = true -} - -const kSocketError = Symbol.for('undici.error.UND_ERR_SOCKET') -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSocketError] === true - } - - [kSocketError] = true -} - -const kNotSupportedError = Symbol.for('undici.error.UND_ERR_NOT_SUPPORTED') -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kNotSupportedError] === true - } - - [kNotSupportedError] = true -} - -const kBalancedPoolMissingUpstreamError = Symbol.for('undici.error.UND_ERR_BPL_MISSING_UPSTREAM') -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kBalancedPoolMissingUpstreamError] === true - } - - [kBalancedPoolMissingUpstreamError] = true -} - -const kHTTPParserError = Symbol.for('undici.error.UND_ERR_HTTP_PARSER') -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kHTTPParserError] === true - } - - [kHTTPParserError] = true -} - -const kResponseExceededMaxSizeError = Symbol.for('undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE') -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseExceededMaxSizeError] === true - } - - [kResponseExceededMaxSizeError] = true -} - -const kRequestRetryError = Symbol.for('undici.error.UND_ERR_REQ_RETRY') -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kRequestRetryError] === true - } - - [kRequestRetryError] = true -} - -const kResponseError = Symbol.for('undici.error.UND_ERR_RESPONSE') -class ResponseError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - this.name = 'ResponseError' - this.message = message || 'Response error' - this.code = 'UND_ERR_RESPONSE' - this.statusCode = code - this.data = data - this.headers = headers - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kResponseError] === true - } - - [kResponseError] = true -} - -const kSecureProxyConnectionError = Symbol.for('undici.error.UND_ERR_PRX_TLS') -class SecureProxyConnectionError extends UndiciError { - constructor (cause, message, options) { - super(message, { cause, ...(options ?? {}) }) - this.name = 'SecureProxyConnectionError' - this.message = message || 'Secure Proxy Connection failed' - this.code = 'UND_ERR_PRX_TLS' - this.cause = cause - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kSecureProxyConnectionError] === true - } - - [kSecureProxyConnectionError] = true -} - -const kMessageSizeExceededError = Symbol.for('undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED') -class MessageSizeExceededError extends UndiciError { - constructor (message) { - super(message) - this.name = 'MessageSizeExceededError' - this.message = message || 'Max decompressed message size exceeded' - this.code = 'UND_ERR_WS_MESSAGE_SIZE_EXCEEDED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMessageSizeExceededError] === true - } - - get [kMessageSizeExceededError] () { - return true - } -} - -module.exports = { - AbortError, - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError, - ResponseError, - SecureProxyConnectionError, - MessageSizeExceededError -} - - -/***/ }), - -/***/ 157: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(2545) -const assert = __nccwpck_require__(4589) -const { - isValidHTTPToken, - isValidHeaderValue, - isStream, - destroy, - isBuffer, - isFormDataLike, - isIterable, - isBlobLike, - buildURL, - validateHandler, - getServerName, - normalizedMethodRecords -} = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue, - servername - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (upgrade && !isValidHeaderValue(upgrade)) { - throw new InvalidArgumentError('invalid upgrade header') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = [] - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError('headers must be in key-value pair format') - } - processHeader(this, header[0], header[1]) - } - } else { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]) - } - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - validateHandler(handler, method, upgrade) - - this.servername = servername || getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onResponseStarted () { - return this[kHandler].onResponseStarted?.() - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false - } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } - - if (this.aborted) { - return - } - this.aborted = true - - return this[kHandler].onError(error) - } - - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } - - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null - } - } - - addHeader (key, value) { - processHeader(this, key, value) - return this - } -} - -function processHeader (request, key, val) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - let headerName = headerNameLowerCasedRecord[key] - - if (headerName === undefined) { - headerName = key.toLowerCase() - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError('invalid header key') - } - } - - if (Array.isArray(val)) { - const arr = [] - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === 'string') { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - arr.push(val[i]) - } else if (val[i] === null) { - arr.push('') - } else if (typeof val[i] === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } else { - arr.push(`${val[i]}`) - } - } - val = arr - } else if (typeof val === 'string') { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - } else if (val === null) { - val = '' - } else { - val = `${val}` - } - - if (headerName === 'host') { - if (request.host !== null) { - throw new InvalidArgumentError('duplicate host header') - } - if (typeof val !== 'string') { - throw new InvalidArgumentError('invalid host header') - } - // Consumed by Client - request.host = val - } else if (headerName === 'content-length') { - if (request.contentLength !== null) { - throw new InvalidArgumentError('duplicate content-length header') - } - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if (request.contentType === null && headerName === 'content-type') { - request.contentType = val - request.headers.push(key, val) - } else if (headerName === 'transfer-encoding' || headerName === 'keep-alive' || headerName === 'upgrade') { - throw new InvalidArgumentError(`invalid ${headerName} header`) - } else if (headerName === 'connection') { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } - - if (value === 'close') { - request.reset = true - } - } else if (headerName === 'expect') { - throw new NotSupportedError('expect header not supported') - } else { - request.headers.push(key, val) - } -} - -module.exports = Request - - -/***/ }), - -/***/ 5953: -/***/ ((module) => { - -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kBody: Symbol('abstracted request body'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kResume: Symbol('resume'), - kOnError: Symbol('on error'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable'), - kListeners: Symbol('listeners'), - kHTTPContext: Symbol('http context'), - kMaxConcurrentStreams: Symbol('max concurrent streams'), - kNoProxyAgent: Symbol('no proxy agent'), - kHttpProxyAgent: Symbol('http proxy agent'), - kHttpsProxyAgent: Symbol('https proxy agent') -} - - -/***/ }), - -/***/ 9598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - wellknownHeaderNames, - headerNameLowerCasedRecord -} = __nccwpck_require__(8933) - -class TstNode { - /** @type {any} */ - value = null - /** @type {null | TstNode} */ - left = null - /** @type {null | TstNode} */ - middle = null - /** @type {null | TstNode} */ - right = null - /** @type {number} */ - code - /** - * @param {string} key - * @param {any} value - * @param {number} index - */ - constructor (key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError('Unreachable') - } - const code = this.code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index) - } else { - this.value = value - } - } - - /** - * @param {string} key - * @param {any} value - */ - add (key, value) { - const length = key.length - if (length === 0) { - throw new TypeError('Unreachable') - } - let index = 0 - let node = this - while (true) { - const code = key.charCodeAt(index) - // check code is ascii string - if (code > 0x7F) { - throw new TypeError('key must be ascii string') - } - if (node.code === code) { - if (length === ++index) { - node.value = value - break - } else if (node.middle !== null) { - node = node.middle - } else { - node.middle = new TstNode(key, value, index) - break - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left - } else { - node.left = new TstNode(key, value, index) - break - } - } else if (node.right !== null) { - node = node.right - } else { - node.right = new TstNode(key, value, index) - break - } - } - } - - /** - * @param {Uint8Array} key - * @return {TstNode | null} - */ - search (key) { - const keylength = key.length - let index = 0 - let node = this - while (node !== null && index < keylength) { - let code = key[index] - // A-Z - // First check if it is bigger than 0x5a. - // Lowercase letters have higher char codes than uppercase ones. - // Also we assume that headers will mostly contain lowercase characters. - if (code <= 0x5a && code >= 0x41) { - // Lowercase for uppercase. - code |= 32 - } - while (node !== null) { - if (code === node.code) { - if (keylength === ++index) { - // Returns Node since it is the last key. - return node - } - node = node.middle - break - } - node = node.code < code ? node.left : node.right - } - } - return null - } -} - -class TernarySearchTree { - /** @type {TstNode | null} */ - node = null - - /** - * @param {string} key - * @param {any} value - * */ - insert (key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0) - } else { - this.node.add(key, value) - } - } - - /** - * @param {Uint8Array} key - * @return {any} - */ - lookup (key) { - return this.node?.search(key)?.value ?? null - } -} - -const tree = new TernarySearchTree() - -for (let i = 0; i < wellknownHeaderNames.length; ++i) { - const key = headerNameLowerCasedRecord[wellknownHeaderNames[i]] - tree.insert(key, key) -} - -module.exports = { - TernarySearchTree, - tree -} - - -/***/ }), - -/***/ 8106: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { kDestroyed, kBodyUsed, kListeners, kBody } = __nccwpck_require__(5953) -const { IncomingMessage } = __nccwpck_require__(7067) -const stream = __nccwpck_require__(7075) -const net = __nccwpck_require__(7030) -const { Blob } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) -const { stringify } = __nccwpck_require__(1792) -const { EventEmitter: EE } = __nccwpck_require__(8474) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { headerNameLowerCasedRecord } = __nccwpck_require__(8933) -const { tree } = __nccwpck_require__(9598) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -function wrapRequestBody (body) { - if (isStream(body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (bodyLength(body) === 0) { - body - .on('data', function () { - assert(false) - }) - } - - if (typeof body.readableDidRead !== 'boolean') { - body[kBodyUsed] = false - EE.prototype.on.call(body, 'data', function () { - this[kBodyUsed] = true - }) - } - - return body - } else if (body && typeof body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - return new BodyAsyncIterable(body) - } else if ( - body && - typeof body !== 'string' && - !ArrayBuffer.isView(body) && - isIterable(body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - return new BodyAsyncIterable(body) - } else { - return body - } -} - -function nop () {} - -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} - -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - if (object === null) { - return false - } else if (object instanceof Blob) { - return true - } else if (typeof object !== 'object') { - return false - } else { - const sTag = object[Symbol.toStringTag] - - return (sTag === 'Blob' || sTag === 'File') && ( - ('stream' in object && typeof object.stream === 'function') || - ('arrayBuffer' in object && typeof object.arrayBuffer === 'function') - ) - } -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function isValidPort (port) { - const value = parseInt(port, 10) - return ( - value === Number(port) && - value >= 0 && - value <= 65535 - ) -} - -function isHttpOrHttpsPrefixed (value) { - return ( - value != null && - value[0] === 'h' && - value[1] === 't' && - value[2] === 't' && - value[3] === 'p' && - ( - value[4] === ':' || - ( - value[4] === 's' && - value[5] === ':' - ) - ) - ) -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && isValidPort(url.port) === false) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol || ''}//${url.hostname || ''}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin[origin.length - 1] === '/') { - origin = origin.slice(0, origin.length - 1) - } - - if (path && path[0] !== '/') { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - return new URL(`${origin}${path}`) - } - - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} - -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } - - assert(typeof host === 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (body) { - return body && !!(body.destroyed || body[kDestroyed] || (stream.isDestroyed?.(body))) -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - - stream.destroy(err) - } else if (err) { - queueMicrotask(() => { - stream.emit('error', err) - }) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} - -/** - * Retrieves a header name and returns its lowercase value. - * @param {string | Buffer} value Header name - * @returns {string} - */ -function headerNameToString (value) { - return typeof value === 'string' - ? headerNameLowerCasedRecord[value] ?? value.toLowerCase() - : tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * Receive the buffer as a string and return its lowercase value. - * @param {Buffer} value Header name - * @returns {string} - */ -function bufferToLowerCasedHeaderName (value) { - return tree.lookup(value) ?? value.toString('latin1').toLowerCase() -} - -/** - * @param {Record | (Buffer | string | (Buffer | string)[])[]} headers - * @param {Record} [obj] - * @returns {Record} - */ -function parseHeaders (headers, obj) { - if (obj === undefined) obj = {} - for (let i = 0; i < headers.length; i += 2) { - const key = headerNameToString(headers[i]) - let val = obj[key] - - if (val) { - if (typeof val === 'string') { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) - } else { - const headersValue = headers[i + 1] - if (typeof headersValue === 'string') { - obj[key] = headersValue - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map(x => x.toString('utf8')) : headersValue.toString('utf8') - } - } - } - - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } - - return obj -} - -function parseRawHeaders (headers) { - const len = headers.length - const ret = new Array(len) - - let hasContentLength = false - let contentDispositionIdx = -1 - let key - let val - let kLen = 0 - - for (let n = 0; n < headers.length; n += 2) { - key = headers[n] - val = headers[n + 1] - - typeof key !== 'string' && (key = key.toString()) - typeof val !== 'string' && (val = val.toString('utf8')) - - kLen = key.length - if (kLen === 14 && key[7] === '-' && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - hasContentLength = true - } else if (kLen === 19 && key[7] === '-' && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = n + 1 - } - ret[n] = key - ret[n + 1] = val - } - - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } - } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - // TODO (fix): Why is body[kBodyUsed] needed? - return !!(body && (stream.isDisturbed(body) || body[kBodyUsed])) -} - -function isErrored (body) { - return !!(body && stream.isErrored(body)) -} - -function isReadable (body) { - return !!(body && stream.isReadable(body)) -} - -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} - -/** @type {globalThis['ReadableStream']} */ -function ReadableStreamFrom (iterable) { - // We cannot use ReadableStream.from here because it does not return a byte stream. - - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - if (buf.byteLength) { - controller.enqueue(new Uint8Array(buf)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - } - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = typeof String.prototype.toWellFormed === 'function' -const hasIsWellFormed = typeof String.prototype.isWellFormed === 'function' - -/** - * @param {string} val - */ -function toUSVString (val) { - return hasToWellFormed ? `${val}`.toWellFormed() : nodeUtil.toUSVString(val) -} - -/** - * @param {string} val - */ -// TODO: move this to webidl -function isUSVString (val) { - return hasIsWellFormed ? `${val}`.isWellFormed() : toUSVString(val) === `${val}` -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -// headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -/** - * @param {string} characters - */ -function isValidHeaderValue (characters) { - return !headerCharRegex.test(characters) -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } - - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} - -function addListener (obj, name, listener) { - const listeners = (obj[kListeners] ??= []) - listeners.push([name, listener]) - obj.on(name, listener) - return obj -} - -function removeAllListeners (obj) { - for (const [name, listener] of obj[kListeners] ?? []) { - obj.removeListener(name, listener) - } - obj[kListeners] = null -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -const normalizedMethodRecordsBase = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} - -const normalizedMethodRecords = { - ...normalizedMethodRecordsBase, - patch: 'patch', - PATCH: 'PATCH' -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizedMethodRecordsBase, null) -Object.setPrototypeOf(normalizedMethodRecords, null) - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isUSVString, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - bufferToLowerCasedHeaderName, - addListener, - removeAllListeners, - errorRequest, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - addAbortListener, - isValidHTTPToken, - isValidHeaderValue, - isTokenCharCode, - parseRangeHeader, - normalizedMethodRecordsBase, - normalizedMethodRecords, - isValidPort, - isHttpOrHttpsPrefixed, - nodeMajor, - nodeMinor, - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'], - wrapRequestBody -} - - -/***/ }), - -/***/ 4963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const DispatcherBase = __nccwpck_require__(1955) -const Pool = __nccwpck_require__(5406) -const Client = __nccwpck_require__(3279) -const util = __nccwpck_require__(8106) -const createRedirectInterceptor = __nccwpck_require__(5002) - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - super(options) - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors?.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - - this[kOnDrain] = (origin, targets) => { - this.emit('drain', origin, [this, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - this.emit('connect', origin, [this, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - this.emit('disconnect', origin, [this, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - this.emit('connectionError', origin, [this, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const client of this[kClients].values()) { - ret += client[kRunning] - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - let dispatcher = this[kClients].get(key) - - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - // This introduces a tiny memory leak, as dispatchers are never removed from the map. - // TODO(mcollina): remove te timer when the client/pool do not have any more - // active connections. - this[kClients].set(key, dispatcher) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const client of this[kClients].values()) { - closePromises.push(client.close()) - } - this[kClients].clear() - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const client of this[kClients].values()) { - destroyPromises.push(client.destroy(err)) - } - this[kClients].clear() - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 9319: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Pool = __nccwpck_require__(5406) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const { parseOrigin } = __nccwpck_require__(8106) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -/** - * Calculate the greatest common divisor of two numbers by - * using the Euclidean algorithm. - * - * @param {number} a - * @param {number} b - * @returns {number} - */ -function getGreatestCommonDivisor (a, b) { - if (a === 0) return b - - while (b !== 0) { - const t = b - b = a % b - a = t - } - return a -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors?.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) - - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - let result = 0 - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result) - } - - this[kGreatestCommonDivisor] = result - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 2283: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const timers = __nccwpck_require__(3113) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kParser, - kBlocking, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kMaxRequests, - kCounter, - kMaxResponseSize, - kOnError, - kResume, - kHTTPContext -} = __nccwpck_require__(5953) - -const constants = __nccwpck_require__(3234) -const EMPTY_BUF = Buffer.alloc(0) -const FastBuffer = Buffer[Symbol.species] -const addListener = util.addListener -const removeAllListeners = util.removeAllListeners - -let extractBody - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(2472) : undefined - - let mod - try { - mod = await WebAssembly.compile(__nccwpck_require__(9888)) - } catch (e) { - /* istanbul ignore next */ - - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(llhttpWasmData || __nccwpck_require__(2472)) - } - - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert(currentParser.ptr === p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert(currentParser.ptr === p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert(currentParser.ptr === p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const USE_NATIVE_TIMER = 0 -const USE_FAST_TIMER = 1 - -// Use fast timers for headers and body to take eventual event loop -// latency into account. -const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER -const TIMEOUT_BODY = 4 | USE_FAST_TIMER - -// Use native timers to ignore event loop latency for keep-alive -// handling. -const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) - - this.bytesRead = 0 - - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } - - setTimeout (delay, type) { - // If the existing timer and the new timer are of different timer type - // (fast or native) or have different delay, we need to clear the existing - // timer and set a new one. - if ( - delay !== this.timeoutValue || - (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER) - ) { - // If a timeout is already set, clear it with clearTimeout of the fast - // timer implementation, as it can clear fast and native timers. - if (this.timeout) { - timers.clearTimeout(this.timeout) - this.timeout = null - } - - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() - } - } - - this.timeoutValue = delay - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.timeoutType = type - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret - - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - this.timeout && timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 - } - request.onResponseStarted() - } - - onHeaderField (buf) { - const len = this.headers.length - - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - this.trackHeader(buf.length) - } - - onHeaderValue (buf) { - let len = this.headers.length - - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - - const key = this.headers[len - 2] - if (key.length === 10) { - const headerName = util.bufferToLowerCasedHeaderName(key) - if (headerName === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (headerName === 'connection') { - this.connection += buf.toString() - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') { - this.contentLength += buf.toString() - } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - assert(client[kSocket] === socket) - assert(!socket.destroyed) - assert(!this.paused) - assert((headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - - removeAllListeners(socket) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } - - client[kResume]() - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } - - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } - - assert(this.timeoutType === TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } - - assert((this.headers.length & 1) === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] - } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 - } - - if (request.method === 'HEAD') { - return 1 - } - - if (statusCode < 200) { - return 1 - } - - if (socket[kBlocking]) { - socket[kBlocking] = false - client[kResume]() - } - - return pause ? constants.ERROR.PAUSED : 0 - } - - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } - - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - assert(statusCode >= 100) - assert((this.headers.length & 1) === 0) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - this.headers = [] - this.headersSize = 0 - - if (statusCode < 200) { - return - } - - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null - - if (socket[kWriting]) { - assert(client[kRunning] === 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(() => client[kResume]()) - } else { - client[kResume]() - } - } -} - -function onParserTimeout (parser) { - const { socket, timeoutType, client, paused } = parser.deref() - - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) - } -} - -async function connectH1 (client, socket) { - client[kSocket] = socket - - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - - addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - const parser = this[kParser] - - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - - this[kError] = err - - this[kClient][kOnError](err) - }) - addListener(socket, 'readable', function () { - const parser = this[kParser] - - if (parser) { - parser.readMore() - } - }) - addListener(socket, 'end', function () { - const parser = this[kParser] - - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - addListener(socket, 'close', function () { - const client = this[kClient] - const parser = this[kParser] - - if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - client[kHTTPContext] = null // TODO (fix): This is hacky... - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - util.errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h1', - defaultPipelining: 1, - write (...args) { - return writeH1(client, ...args) - }, - resume () { - resumeH1(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy (request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true - } - - if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return true - } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return true - } - } - - return false - } - } -} - -function resumeH1 (client) { - const socket = client[kSocket] - - if (socket && !socket.destroyed) { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH1 (client, request) { - const { method, path, host, upgrade, blocking, reset } = request - - let { body, headers, contentLength } = request - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' || - method === 'QUERY' || - method === 'PROPFIND' || - method === 'PROPPATCH' - ) - - if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = (__nccwpck_require__(1858).extractBody) - } - - const [bodyStream, contentType] = extractBody(body) - if (request.contentType == null) { - headers.push('content-type', contentType) - } - body = bodyStream.stream - contentLength = bodyStream.length - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push('content-type', body.type) - } - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - const bodyLength = util.bodyLength(body) - - contentLength = bodyLength ?? contentLength - - if (contentLength === null) { - contentLength = request.contentLength - } - - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - util.errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(body) - util.destroy(socket, new InformationalError('aborted')) - } - - try { - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0] - const val = headers[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n` - } - } else { - header += `${key}: ${val}\r\n` - } - } - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload) - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload) - } else { - assert(false) - } - - return true -} - -function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - let finished = false - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onClose = function () { - // 'close' might be emitted *before* 'error' for - // broken streams. Wait a tick to avoid this case. - queueMicrotask(() => { - // It's only safe to remove 'error' listener after - // 'close'. - body.removeListener('error', onFinished) - }) - - if (!finished) { - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('close', onClose) - - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) - } - } - - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onClose) - - if (body.resume) { - body.resume() - } - - socket - .on('drain', onDrain) - .on('error', onFinished) - - if (body.errorEmitted ?? body.errored) { - setImmediate(() => onFinished(body.errored)) - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(() => onFinished(null)) - } - - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose) - } -} - -function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) { - try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - } - request.onRequestSent() - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) - } -} - -class AsyncWriter { - constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - this.abort = abort - - socket[kWriting] = true - } - - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return false - } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true - } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } - - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - - this.bytesWritten += len - - const ret = socket.write(chunk) - - socket.uncork() - - request.onBodySent(chunk) - - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] - } - - if (socket.destroyed) { - return - } - - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - - client[kResume]() - } - - destroy (err) { - const { socket, client, abort } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - abort(err) - } - } -} - -module.exports = connectH1 - - -/***/ }), - -/***/ 2446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { pipeline } = __nccwpck_require__(7075) -const util = __nccwpck_require__(8106) -const { - RequestContentLengthMismatchError, - RequestAbortedError, - SocketError, - InformationalError -} = __nccwpck_require__(2545) -const { - kUrl, - kReset, - kClient, - kRunning, - kPending, - kQueue, - kPendingIdx, - kRunningIdx, - kError, - kSocket, - kStrictContentLength, - kOnError, - kMaxConcurrentStreams, - kHTTP2Session, - kResume, - kSize, - kHTTPContext -} = __nccwpck_require__(5953) - -const kOpenStreams = Symbol('open streams') - -let extractBody - -// Experimental -let h2ExperimentalWarned = false - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(2467) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -function parseH2Headers (headers) { - const result = [] - - for (const [name, value] of Object.entries(headers)) { - // h2 may concat the header value by array - // e.g. Set-Cookie - if (Array.isArray(value)) { - for (const subvalue of value) { - // we need to provide each header value of header name - // because the headers handler expect name-value pair - result.push(Buffer.from(name), Buffer.from(subvalue)) - } - } else { - result.push(Buffer.from(name), Buffer.from(value)) - } - } - - return result -} - -async function connectH2 (client, socket) { - client[kSocket] = socket - - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kMaxConcurrentStreams] - }) - - session[kOpenStreams] = 0 - session[kClient] = client - session[kSocket] = socket - - util.addListener(session, 'error', onHttp2SessionError) - util.addListener(session, 'frameError', onHttp2FrameError) - util.addListener(session, 'end', onHttp2SessionEnd) - util.addListener(session, 'goaway', onHTTP2GoAway) - util.addListener(session, 'close', function () { - const { [kClient]: client } = this - const { [kSocket]: socket } = client - - const err = this[kSocket][kError] || this[kError] || new SocketError('closed', util.getSocketInfo(socket)) - - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(client[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - } - }) - - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - - util.addListener(socket, 'error', function (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kError] = err - - this[kClient][kOnError](err) - }) - - util.addListener(socket, 'end', function () { - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) - }) - - util.addListener(socket, 'close', function () { - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() - }) - - let closed = false - socket.on('close', () => { - closed = true - }) - - return { - version: 'h2', - defaultPipelining: Infinity, - write (...args) { - return writeH2(client, ...args) - }, - resume () { - resumeH2(client) - }, - destroy (err, callback) { - if (closed) { - queueMicrotask(callback) - } else { - // Destroying the socket will trigger the session close - socket.destroy(err).on('close', callback) - } - }, - get destroyed () { - return socket.destroyed - }, - busy () { - return false - } - } -} - -function resumeH2 (client) { - const socket = client[kSocket] - - if (socket?.destroyed === false) { - if (client[kSize] === 0 && client[kMaxConcurrentStreams] === 0) { - socket.unref() - client[kHTTP2Session].unref() - } else { - socket.ref() - client[kHTTP2Session].ref() - } - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - this[kClient][kOnError](err) -} - -function onHttp2FrameError (type, code, id) { - if (id === 0) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - this[kSocket][kError] = err - this[kClient][kOnError](err) - } -} - -function onHttp2SessionEnd () { - const err = new SocketError('other side closed', util.getSocketInfo(this[kSocket])) - this.destroy(err) - util.destroy(this[kSocket], err) -} - -/** - * This is the root cause of #3011 - * We need to handle GOAWAY frames properly, and trigger the session close - * along with the socket right away - */ -function onHTTP2GoAway (code) { - // We cannot recover, so best to close the session and the socket - const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${code}`, util.getSocketInfo(this)) - const client = this[kClient] - - client[kSocket] = null - client[kHTTPContext] = null - - if (this[kHTTP2Session] != null) { - this[kHTTP2Session].destroy(err) - this[kHTTP2Session] = null - } - - util.destroy(this[kSocket], err) - - // Fail head of pipeline. - if (client[kRunningIdx] < client[kQueue].length) { - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - util.errorRequest(client, request, err) - client[kPendingIdx] = client[kRunningIdx] - } - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - client[kResume]() -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function writeH2 (client, request) { - const session = client[kHTTP2Session] - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - let { body } = request - - if (upgrade) { - util.errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } - - const headers = {} - for (let n = 0; n < reqHeaders.length; n += 2) { - const key = reqHeaders[n + 0] - const val = reqHeaders[n + 1] - - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `,${val[i]}` - } else { - headers[key] = val[i] - } - } - } else { - headers[key] = val - } - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - - const { hostname, port } = client[kUrl] - - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}` - headers[HTTP2_HEADER_METHOD] = method - - const abort = (err) => { - if (request.aborted || request.completed) { - return - } - - err = err || new RequestAbortedError() - - util.errorRequest(client, request, err) - - if (stream != null) { - util.destroy(stream, err) - } - - // We do not destroy the socket as we can continue using the session - // the stream get's destroyed and the session remains to create new streams - util.destroy(body, err) - client[kQueue][client[kRunningIdx]++] = null - client[kResume]() - } - - try { - // We are already connected, streams are pending. - // We can call on connect, and wait for abort - request.onConnect(abort) - } catch (err) { - util.errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - if (method === 'CONNECT') { - session.ref() - // We are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++session[kOpenStreams] - client[kQueue][client[kRunningIdx]++] = null - }) - } - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) session.unref() - }) - - return true - } - - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omitted when sending CONNECT - - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' - - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 - - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. - - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) - - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } - - let contentLength = util.bodyLength(body) - - if (util.isFormDataLike(body)) { - extractBody ??= (__nccwpck_require__(1858).extractBody) - - const [bodyStream, contentType] = extractBody(body) - headers['content-type'] = contentType - - body = bodyStream.stream - contentLength = bodyStream.length - } - - if (contentLength == null) { - contentLength = request.contentLength - } - - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null - } - - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - util.errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } - - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' || body === null - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new streams open - ++session[kOpenStreams] - - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - request.onResponseStarted() - - // Due to the stream nature, it is possible we face a race condition - // where the stream has been assigned, but the request has been aborted - // the request remains in-flight and headers hasn't been received yet - // for those scenarios, best effort is to destroy the stream immediately - // as there's no value to keep it open. - if (request.aborted) { - const err = new RequestAbortedError() - util.errorRequest(client, request, err) - util.destroy(stream, err) - return - } - - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), '') === false) { - stream.pause() - } - - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) - }) - - stream.once('end', () => { - // When state is null, it means we haven't consumed body and the stream still do not have - // a state. - // Present specially when using pipeline or stream - if (stream.state?.state == null || stream.state.state < 6) { - request.onComplete([]) - } - - if (session[kOpenStreams] === 0) { - // Stream is closed or half-closed-remote (6), decrement counter and cleanup - // It does not have sense to continue working with the stream as we do not - // have yet RST_STREAM support on client-side - - session.unref() - } - - abort(new InformationalError('HTTP/2: stream half-closed (remote)')) - client[kQueue][client[kRunningIdx]++] = null - client[kPendingIdx] = client[kRunningIdx] - client[kResume]() - }) - - stream.once('close', () => { - session[kOpenStreams] -= 1 - if (session[kOpenStreams] === 0) { - session.unref() - } - }) - - stream.once('error', function (err) { - abort(err) - }) - - stream.once('frameError', (type, code) => { - abort(new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`)) - }) - - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) - - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) - - // stream.on('push', headers => { - // // TODO(HTTP/2): Support push - // }) - - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) - - return true - - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body || contentLength === 0) { - writeBuffer( - abort, - stream, - null, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBuffer(body)) { - writeBuffer( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable( - abort, - stream, - body.stream(), - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - writeBlob( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } - } else if (util.isStream(body)) { - writeStream( - abort, - client[kSocket], - expectsPayload, - stream, - body, - client, - request, - contentLength - ) - } else if (util.isIterable(body)) { - writeIterable( - abort, - stream, - body, - client, - request, - client[kSocket], - contentLength, - expectsPayload - ) - } else { - assert(false) - } - } -} - -function writeBuffer (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - try { - if (body != null && util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - h2stream.cork() - h2stream.write(body) - h2stream.uncork() - h2stream.end() - - request.onBodySent(body) - } - - if (!expectsPayload) { - socket[kReset] = true - } - - request.onRequestSent() - client[kResume]() - } catch (error) { - abort(error) - } -} - -function writeStream (abort, socket, expectsPayload, h2stream, body, client, request, contentLength) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(pipe, err) - abort(err) - } else { - util.removeAllListeners(pipe) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } - } - ) - - util.addListener(pipe, 'data', onPipeData) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } -} - -async function writeBlob (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength === body.size, 'blob body must have content length') - - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } - - const buffer = Buffer.from(await body.arrayBuffer()) - - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - h2stream.end() - - request.onBodySent(buffer) - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } -} - -async function writeIterable (abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - h2stream - .on('close', onDrain) - .on('drain', onDrain) - - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - - h2stream.end() - - request.onRequestSent() - - if (!expectsPayload) { - socket[kReset] = true - } - - client[kResume]() - } catch (err) { - abort(err) - } finally { - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } -} - -module.exports = connectH2 - - -/***/ }), - -/***/ 3279: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// @ts-check - - - -const assert = __nccwpck_require__(4589) -const net = __nccwpck_require__(7030) -const http = __nccwpck_require__(7067) -const util = __nccwpck_require__(8106) -const { channels } = __nccwpck_require__(2276) -const Request = __nccwpck_require__(157) -const DispatcherBase = __nccwpck_require__(1955) -const { - InvalidArgumentError, - InformationalError, - ClientDestroyedError -} = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const { - kUrl, - kServerName, - kClient, - kBusy, - kConnect, - kResuming, - kRunning, - kPending, - kSize, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kOnError, - kHTTPContext, - kMaxConcurrentStreams, - kResume -} = __nccwpck_require__(5953) -const connectH1 = __nccwpck_require__(2283) -const connectH2 = __nccwpck_require__(2446) -let deprecatedInterceptorWarned = false - -const kClosedResolve = Symbol('kClosedResolve') - -const noop = () => {} - -function getPipelining (client) { - return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1 -} - -/** - * @type {import('../../types/client.js').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../../types/client.js').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - maxConcurrentStreams, - allowH2, - webSocket - } = {}) { - super({ webSocket }) - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a positive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - if (interceptors?.Client && Array.isArray(interceptors.Client)) { - this[kInterceptors] = interceptors.Client - if (!deprecatedInterceptorWarned) { - deprecatedInterceptorWarned = true - process.emitWarning('Client.Options#interceptor is deprecated. Use Dispatcher#compose instead.', { - code: 'UNDICI-CLIENT-INTERCEPTOR-DEPRECATED' - }) - } - } else { - this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })] - } - - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 2e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kMaxConcurrentStreams] = maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - this[kHTTPContext] = null - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - - this[kResume] = (sync) => resume(this, sync) - this[kOnError] = (err) => onError(this, err) - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - this[kResume](true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kHTTPContext] && !this[kConnecting] && !this[kHTTPContext].destroyed - } - - get [kBusy] () { - return Boolean( - this[kHTTPContext]?.busy(null) || - (this[kSize] >= (getPipelining(this) || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = new Request(origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - queueMicrotask(() => resume(this)) - } else { - this[kResume](true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve - } else { - resolve(null) - } - }) - } - - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve(null) - } - - if (this[kHTTPContext]) { - this[kHTTPContext].destroy(err, callback) - this[kHTTPContext] = null - } else { - queueMicrotask(callback) - } - - this[kResume]() - }) - } -} - -const createRedirectInterceptor = __nccwpck_require__(5002) - -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - - assert(client[kPendingIdx] === client[kRunningIdx]) - - const requests = client[kQueue].splice(client[kRunningIdx]) - - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - util.errorRequest(client, request, err) - } - assert(client[kSize] === 0) - } -} - -/** - * @param {Client} client - * @returns - */ -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kHTTPContext]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip - } - - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) - } - - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', noop), new ClientDestroyedError()) - return - } - - assert(socket) - - try { - client[kHTTPContext] = socket.alpnProtocol === 'h2' - ? await connectH2(client, socket) - : await connectH1(client, socket) - } catch (err) { - socket.destroy().on('error', noop) - throw err - } - - client[kConnecting] = false - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - util.errorRequest(client, request, err) - } - } else { - onError(client, err) - } - - client.emit('connectionError', client[kUrl], [client], err) - } - - client[kResume]() -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } - - if (client[kHTTPContext]) { - client[kHTTPContext].resume() - } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - queueMicrotask(() => emitDrain(client)) - } else { - emitDrain(client) - } - continue - } - - if (client[kPending] === 0) { - return - } - - if (client[kRunning] >= (getPipelining(client) || 1)) { - return - } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername - client[kHTTPContext]?.destroy(new InformationalError('servername changed'), () => { - client[kHTTPContext] = null - resume(client) - }) - } - - if (client[kConnecting]) { - return - } - - if (!client[kHTTPContext]) { - connect(client) - return - } - - if (client[kHTTPContext].destroyed) { - return - } - - if (client[kHTTPContext].busy(request)) { - return - } - - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) - } - } -} - -module.exports = Client - - -/***/ }), - -/***/ 1955: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(2545) -const { kDestroy, kClose, kClosed, kDestroyed, kDispatch, kInterceptors } = __nccwpck_require__(5953) - -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -const kWebSocketOptions = Symbol('webSocketOptions') - -class DispatcherBase extends Dispatcher { - constructor (opts) { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - this[kWebSocketOptions] = opts?.webSocket ?? {} - } - - get webSocketOptions () { - return { - maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 - } - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } - - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } - - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - - if (!err) { - err = new ClientDestroyedError() - } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } - - if (this[kClosed]) { - throw new ClientClosedError() - } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - handler.onError(err) - - return false - } - } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 6105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const EventEmitter = __nccwpck_require__(8474) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } - - close () { - throw new Error('not implemented') - } - - destroy () { - throw new Error('not implemented') - } - - compose (...args) { - // So we handle [interceptor1, interceptor2] or interceptor1, interceptor2, ... - const interceptors = Array.isArray(args[0]) ? args[0] : args - let dispatch = this.dispatch.bind(this) - - for (const interceptor of interceptors) { - if (interceptor == null) { - continue - } - - if (typeof interceptor !== 'function') { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`) - } - - dispatch = interceptor(dispatch) - - if (dispatch == null || typeof dispatch !== 'function' || dispatch.length !== 2) { - throw new TypeError('invalid interceptor') - } - } - - return new ComposedDispatcher(this, dispatch) - } -} - -class ComposedDispatcher extends Dispatcher { - #dispatcher = null - #dispatch = null - - constructor (dispatcher, dispatch) { - super() - this.#dispatcher = dispatcher - this.#dispatch = dispatch - } - - dispatch (...args) { - this.#dispatch(...args) - } - - close (...args) { - return this.#dispatcher.close(...args) - } - - destroy (...args) { - return this.#dispatcher.destroy(...args) - } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1915: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = __nccwpck_require__(5953) -const ProxyAgent = __nccwpck_require__(3950) -const Agent = __nccwpck_require__(4963) - -const DEFAULT_PORTS = { - 'http:': 80, - 'https:': 443 -} - -let experimentalWarned = false - -class EnvHttpProxyAgent extends DispatcherBase { - #noProxyValue = null - #noProxyEntries = null - #opts = null - - constructor (opts = {}) { - super() - this.#opts = opts - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EnvHttpProxyAgent is experimental, expect them to change at any time.', { - code: 'UNDICI-EHPA' - }) - } - - const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts - - this[kNoProxyAgent] = new Agent(agentOpts) - - const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTP_PROXY }) - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent] - } - - const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ ...agentOpts, uri: HTTPS_PROXY }) - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent] - } - - this.#parseNoProxy() - } - - [kDispatch] (opts, handler) { - const url = new URL(opts.origin) - const agent = this.#getProxyAgentForUrl(url) - return agent.dispatch(opts, handler) - } - - async [kClose] () { - await this[kNoProxyAgent].close() - if (!this[kHttpProxyAgent][kClosed]) { - await this[kHttpProxyAgent].close() - } - if (!this[kHttpsProxyAgent][kClosed]) { - await this[kHttpsProxyAgent].close() - } - } - - async [kDestroy] (err) { - await this[kNoProxyAgent].destroy(err) - if (!this[kHttpProxyAgent][kDestroyed]) { - await this[kHttpProxyAgent].destroy(err) - } - if (!this[kHttpsProxyAgent][kDestroyed]) { - await this[kHttpsProxyAgent].destroy(err) - } - } - - #getProxyAgentForUrl (url) { - let { protocol, host: hostname, port } = url - - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, '').toLowerCase() - port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0 - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent] - } - if (protocol === 'https:') { - return this[kHttpsProxyAgent] - } - return this[kHttpProxyAgent] - } - - #shouldProxy (hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy() - } - - if (this.#noProxyEntries.length === 0) { - return true // Always proxy if NO_PROXY is not set or empty. - } - if (this.#noProxyValue === '*') { - return false // Never proxy if wildcard is set. - } - - for (let i = 0; i < this.#noProxyEntries.length; i++) { - const entry = this.#noProxyEntries[i] - if (entry.port && entry.port !== port) { - continue // Skip if ports don't match. - } - if (!/^[.*]/.test(entry.hostname)) { - // No wildcards, so don't proxy only if there is not an exact match. - if (hostname === entry.hostname) { - return false - } - } else { - // Don't proxy if the hostname ends with the no_proxy host. - if (hostname.endsWith(entry.hostname.replace(/^\*/, ''))) { - return false - } - } - } - - return true - } - - #parseNoProxy () { - const noProxyValue = this.#opts.noProxy ?? this.#noProxyEnv - const noProxySplit = noProxyValue.split(/[,\s]/) - const noProxyEntries = [] - - for (let i = 0; i < noProxySplit.length; i++) { - const entry = noProxySplit[i] - if (!entry) { - continue - } - const parsed = entry.match(/^(.+):(\d+)$/) - noProxyEntries.push({ - hostname: (parsed ? parsed[1] : entry).toLowerCase(), - port: parsed ? Number.parseInt(parsed[2], 10) : 0 - }) - } - - this.#noProxyValue = noProxyValue - this.#noProxyEntries = noProxyEntries - } - - get #noProxyChanged () { - if (this.#opts.noProxy !== undefined) { - return false - } - return this.#noProxyValue !== this.#noProxyEnv - } - - get #noProxyEnv () { - return process.env.no_proxy ?? process.env.NO_PROXY ?? '' - } -} - -module.exports = EnvHttpProxyAgent - - -/***/ }), - -/***/ 8334: -/***/ ((module) => { - -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; - - -/***/ }), - -/***/ 510: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const DispatcherBase = __nccwpck_require__(1955) -const FixedQueue = __nccwpck_require__(8334) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(5953) -const PoolStats = __nccwpck_require__(6496) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor (opts) { - super(opts) - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - await Promise.all(this[kClients].map(c => c.close())) - } else { - await new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } - - await Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() - } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) - } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 6496: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(5953) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 5406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(510) -const Client = __nccwpck_require__(3279) -const { - InvalidArgumentError -} = __nccwpck_require__(2545) -const util = __nccwpck_require__(8106) -const { kUrl, kInterceptors } = __nccwpck_require__(5953) -const buildConnector = __nccwpck_require__(9346) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - super(options) - - this[kInterceptors] = options.interceptors?.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - - this.on('connectionError', (origin, targets, error) => { - // If a connection error occurs, we remove the client from the pool, - // and emit a connectionError event. They will not be re-used. - // Fixes https://github.com/nodejs/undici/issues/3895 - for (const target of targets) { - // Do not use kRemoveClient here, as it will close the client, - // but the client cannot be closed in this state. - const idx = this[kClients].indexOf(target) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - } - }) - } - - [kGetDispatcher] () { - for (const client of this[kClients]) { - if (!client[kNeedDrain]) { - return client - } - } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - const dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) - return dispatcher - } - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 3950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kProxy, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(5953) -const { URL } = __nccwpck_require__(3136) -const Agent = __nccwpck_require__(4963) -const Pool = __nccwpck_require__(5406) -const DispatcherBase = __nccwpck_require__(1955) -const { InvalidArgumentError, RequestAbortedError, SecureProxyConnectionError } = __nccwpck_require__(2545) -const buildConnector = __nccwpck_require__(9346) -const Client = __nccwpck_require__(3279) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') -const kTunnelProxy = Symbol('tunnel proxy') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -const noop = () => {} - -function defaultAgentFactory (origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts) - } - return new Pool(origin, opts) -} - -class Http1ProxyWrapper extends DispatcherBase { - #client - - constructor (proxyUrl, { headers = {}, connect, factory }) { - super() - if (!proxyUrl) { - throw new InvalidArgumentError('Proxy URL is mandatory') - } - - this[kProxyHeaders] = headers - if (factory) { - this.#client = factory(proxyUrl, { connect }) - } else { - this.#client = new Client(proxyUrl, { connect }) - } - } - - [kDispatch] (opts, handler) { - const onHeaders = handler.onHeaders - handler.onHeaders = function (statusCode, data, resume) { - if (statusCode === 407) { - if (typeof handler.onError === 'function') { - handler.onError(new InvalidArgumentError('Proxy Authentication Required (407)')) - } - return - } - if (onHeaders) onHeaders.call(this, statusCode, data, resume) - } - - // Rewrite request as an HTTP1 Proxy request, without tunneling. - const { - origin, - path = '/', - headers = {} - } = opts - - opts.path = origin + path - - if (!('host' in headers) && !('Host' in headers)) { - const { host } = new URL(origin) - headers.host = host - } - opts.headers = { ...this[kProxyHeaders], ...headers } - - return this.#client[kDispatch](opts, handler) - } - - async [kClose] () { - return this.#client.close() - } - - async [kDestroy] (err) { - return this.#client.destroy(err) - } -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super() - - if (!opts || (typeof opts === 'object' && !(opts instanceof URL) && !opts.uri)) { - throw new InvalidArgumentError('Proxy uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } - - const { proxyTunnel = true } = opts - - const url = this.#getUrl(opts) - const { href, origin, port, protocol, username, password, hostname: proxyHostname } = url - - this[kProxy] = { uri: href, protocol } - this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - this[kTunnelProxy] = proxyTunnel - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` - } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - - const agentFactory = opts.factory || defaultAgentFactory - const factory = (origin, options) => { - const { protocol } = new URL(origin) - if (!this[kTunnelProxy] && protocol === 'http:' && this[kProxy].protocol === 'http:') { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }) - } - return agentFactory(origin, options) - } - this[kClient] = clientFactory(url, { connect }) - this[kAgent] = new Agent({ - ...opts, - factory, - connect: async (opts, callback) => { - let requestedPath = opts.host - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedPath, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host: opts.host - }, - servername: this[kProxyTls]?.servername || proxyHostname - }) - if (statusCode !== 200) { - socket.on('error', noop).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - // Throw a custom error to avoid loop in client.js#connect - callback(new SecureProxyConnectionError(err)) - } else { - callback(err) - } - } - } - }) - } - - dispatch (opts, handler) { - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - - if (headers && !('host' in headers) && !('Host' in headers)) { - const { host } = new URL(opts.origin) - headers.host = host - } - - return this[kAgent].dispatch( - { - ...opts, - headers - }, - handler - ) - } - - /** - * @param {import('../types/proxy-agent').ProxyAgent.Options | string | URL} opts - * @returns {URL} - */ - #getUrl (opts) { - if (typeof opts === 'string') { - return new URL(opts) - } else if (opts instanceof URL) { - return opts - } else { - return new URL(opts.uri) - } - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] - } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 9048: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const Dispatcher = __nccwpck_require__(6105) -const RetryHandler = __nccwpck_require__(8630) - -class RetryAgent extends Dispatcher { - #agent = null - #options = null - constructor (agent, options = {}) { - super(options) - this.#agent = agent - this.#options = options - } - - dispatch (opts, handler) { - const retry = new RetryHandler({ - ...opts, - retryOptions: this.#options - }, { - dispatch: this.#agent.dispatch.bind(this.#agent), - handler - }) - return this.#agent.dispatch(opts, retry) - } - - close () { - return this.#agent.close() - } - - destroy () { - return this.#agent.destroy() - } -} - -module.exports = RetryAgent - - -/***/ }), - -/***/ 1063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(2545) -const Agent = __nccwpck_require__(4963) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 8677: -/***/ ((module) => { - - - -module.exports = class DecoratorHandler { - #handler - - constructor (handler) { - if (typeof handler !== 'object' || handler === null) { - throw new TypeError('handler must be an object') - } - this.#handler = handler - } - - onConnect (...args) { - return this.#handler.onConnect?.(...args) - } - - onError (...args) { - return this.#handler.onError?.(...args) - } - - onUpgrade (...args) { - return this.#handler.onUpgrade?.(...args) - } - - onResponseStarted (...args) { - return this.#handler.onResponseStarted?.(...args) - } - - onHeaders (...args) { - return this.#handler.onHeaders?.(...args) - } - - onData (...args) { - return this.#handler.onData?.(...args) - } - - onComplete (...args) { - return this.#handler.onComplete?.(...args) - } - - onBodySent (...args) { - return this.#handler.onBodySent?.(...args) - } -} - - -/***/ }), - -/***/ 5056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { kBodyUsed } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const EE = __nccwpck_require__(8474) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - this.redirectionLimitReached = false - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - if (this.request) { - this.request.abort(new Error('max redirects')) - } - - this.redirectionLimitReached = true - this.abort(new Error('max redirects')) - return - } - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitly chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) - } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed information. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) - } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].length === 8 && util.headerNameToString(headers[i]) === 'location') { - return headers[i + 1] - } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } - } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } - } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 8630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const assert = __nccwpck_require__(4589) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(5953) -const { RequestRetryError } = __nccwpck_require__(2545) -const { - isDisturbed, - parseHeaders, - parseRangeHeader, - wrapRequestBody -} = __nccwpck_require__(8106) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - return new Date(retryAfter).getTime() - current -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - minTimeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE', - 'UND_ERR_SOCKET' - ] - } - - this.retryCount = 0 - this.retryCountCheckpoint = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - minTimeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - const { counter } = state - - // Any code that is not a Undici's originated and allowed to retry - if (code && code !== 'UND_ERR_REQ_RETRY' && !errorCodes.includes(code)) { - cb(err) - return - } - - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } - - let retryAfterHeader = headers?.['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = Number.isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout) - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } else { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - ) - return false - } - } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - // Only Partial Content 206 supposed to provide Content-Range, - // any other status code that partially consumed the payload - // should not be retry because it would result in downstream - // wrongly concatanete multiple responses. - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - this.abort( - new RequestRetryError('server does not support the range header and the payload was partially consumed', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - data: { count: this.retryCount } - }) - ) - return false - } - - const { start, size, end = size - 1 } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true - } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size - 1 } = range - assert( - start != null && Number.isFinite(start), - 'content-range mismatch' - ) - assert(end != null && Number.isFinite(end), 'invalid content-length') - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) - 1 : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - // Weak etags are not useful for comparison nor cache - // for instance not safe to assume if the response is byte-per-byte - // equal - if (this.etag != null && this.etag.startsWith('W/')) { - this.etag = null - } - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - data: { count: this.retryCount } - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - // We reconcile in case of a mix between network errors - // and server error response - if (this.retryCount - this.retryCountCheckpoint > 0) { - // We count the difference between the last checkpoint and the current retry count - this.retryCount = - this.retryCountCheckpoint + - (this.retryCount - this.retryCountCheckpoint) - } else { - this.retryCount += 1 - } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { isIP } = __nccwpck_require__(7030) -const { lookup } = __nccwpck_require__(610) -const DecoratorHandler = __nccwpck_require__(8677) -const { InvalidArgumentError, InformationalError } = __nccwpck_require__(2545) -const maxInt = Math.pow(2, 31) - 1 - -class DNSInstance { - #maxTTL = 0 - #maxItems = 0 - #records = new Map() - dualStack = true - affinity = null - lookup = null - pick = null - - constructor (opts) { - this.#maxTTL = opts.maxTTL - this.#maxItems = opts.maxItems - this.dualStack = opts.dualStack - this.affinity = opts.affinity - this.lookup = opts.lookup ?? this.#defaultLookup - this.pick = opts.pick ?? this.#defaultPick - } - - get full () { - return this.#records.size === this.#maxItems - } - - runLookup (origin, opts, cb) { - const ips = this.#records.get(origin.hostname) - - // If full, we just return the origin - if (ips == null && this.full) { - cb(null, origin.origin) - return - } - - const newOpts = { - affinity: this.affinity, - dualStack: this.dualStack, - lookup: this.lookup, - pick: this.pick, - ...opts.dns, - maxTTL: this.#maxTTL, - maxItems: this.#maxItems - } - - // If no IPs we lookup - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError('No DNS entries found')) - return - } - - this.setRecords(origin, addresses) - const records = this.#records.get(origin.hostname) - - const ip = this.pick( - origin, - records, - newOpts.affinity - ) - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - }) - } else { - // If there's IPs we pick - const ip = this.pick( - origin, - ips, - newOpts.affinity - ) - - // If no IPs we lookup - deleting old records - if (ip == null) { - this.#records.delete(origin.hostname) - this.runLookup(origin, opts, cb) - return - } - - let port - if (typeof ip.port === 'number') { - port = `:${ip.port}` - } else if (origin.port !== '') { - port = `:${origin.port}` - } else { - port = '' - } - - cb( - null, - `${origin.protocol}//${ - ip.family === 6 ? `[${ip.address}]` : ip.address - }${port}` - ) - } - } - - #defaultLookup (origin, opts, cb) { - lookup( - origin.hostname, - { - all: true, - family: this.dualStack === false ? this.affinity : 0, - order: 'ipv4first' - }, - (err, addresses) => { - if (err) { - return cb(err) - } - - const results = new Map() - - for (const addr of addresses) { - // On linux we found duplicates, we attempt to remove them with - // the latest record - results.set(`${addr.address}:${addr.family}`, addr) - } - - cb(null, results.values()) - } - ) - } - - #defaultPick (origin, hostnameRecords, affinity) { - let ip = null - const { records, offset } = hostnameRecords - - let family - if (this.dualStack) { - if (affinity == null) { - // Balance between ip families - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0 - affinity = 4 - } else { - hostnameRecords.offset++ - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4 - } - } - - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity] - } else { - family = records[affinity === 4 ? 6 : 4] - } - } else { - family = records[affinity] - } - - // If no IPs we return null - if (family == null || family.ips.length === 0) { - return ip - } - - if (family.offset == null || family.offset === maxInt) { - family.offset = 0 - } else { - family.offset++ - } - - const position = family.offset % family.ips.length - ip = family.ips[position] ?? null - - if (ip == null) { - return ip - } - - if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms - // We delete expired records - // It is possible that they have different TTL, so we manage them individually - family.ips.splice(position, 1) - return this.pick(origin, hostnameRecords, affinity) - } - - return ip - } - - setRecords (origin, addresses) { - const timestamp = Date.now() - const records = { records: { 4: null, 6: null } } - for (const record of addresses) { - record.timestamp = timestamp - if (typeof record.ttl === 'number') { - // The record TTL is expected to be in ms - record.ttl = Math.min(record.ttl, this.#maxTTL) - } else { - record.ttl = this.#maxTTL - } - - const familyRecords = records.records[record.family] ?? { ips: [] } - - familyRecords.ips.push(record) - records.records[record.family] = familyRecords - } - - this.#records.set(origin.hostname, records) - } - - getHandler (meta, opts) { - return new DNSDispatchHandler(this, meta, opts) - } -} - -class DNSDispatchHandler extends DecoratorHandler { - #state = null - #opts = null - #dispatch = null - #handler = null - #origin = null - - constructor (state, { origin, handler, dispatch }, opts) { - super(handler) - this.#origin = origin - this.#handler = handler - this.#opts = { ...opts } - this.#state = state - this.#dispatch = dispatch - } - - onError (err) { - switch (err.code) { - case 'ETIMEDOUT': - case 'ECONNREFUSED': { - if (this.#state.dualStack) { - // We delete the record and retry - this.#state.runLookup(this.#origin, this.#opts, (err, newOrigin) => { - if (err) { - return this.#handler.onError(err) - } - - const dispatchOpts = { - ...this.#opts, - origin: newOrigin - } - - this.#dispatch(dispatchOpts, this) - }) - - // if dual-stack disabled, we error out - return - } - - this.#handler.onError(err) - return - } - case 'ENOTFOUND': - this.#state.deleteRecord(this.#origin) - // eslint-disable-next-line no-fallthrough - default: - this.#handler.onError(err) - break - } - } -} - -module.exports = interceptorOpts => { - if ( - interceptorOpts?.maxTTL != null && - (typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0) - ) { - throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number') - } - - if ( - interceptorOpts?.maxItems != null && - (typeof interceptorOpts?.maxItems !== 'number' || - interceptorOpts?.maxItems < 1) - ) { - throw new InvalidArgumentError( - 'Invalid maxItems. Must be a positive number and greater than zero' - ) - } - - if ( - interceptorOpts?.affinity != null && - interceptorOpts?.affinity !== 4 && - interceptorOpts?.affinity !== 6 - ) { - throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6') - } - - if ( - interceptorOpts?.dualStack != null && - typeof interceptorOpts?.dualStack !== 'boolean' - ) { - throw new InvalidArgumentError('Invalid dualStack. Must be a boolean') - } - - if ( - interceptorOpts?.lookup != null && - typeof interceptorOpts?.lookup !== 'function' - ) { - throw new InvalidArgumentError('Invalid lookup. Must be a function') - } - - if ( - interceptorOpts?.pick != null && - typeof interceptorOpts?.pick !== 'function' - ) { - throw new InvalidArgumentError('Invalid pick. Must be a function') - } - - const dualStack = interceptorOpts?.dualStack ?? true - let affinity - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null - } else { - affinity = interceptorOpts?.affinity ?? 4 - } - - const opts = { - maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms - lookup: interceptorOpts?.lookup ?? null, - pick: interceptorOpts?.pick ?? null, - dualStack, - affinity, - maxItems: interceptorOpts?.maxItems ?? Infinity - } - - const instance = new DNSInstance(opts) - - return dispatch => { - return function dnsInterceptor (origDispatchOpts, handler) { - const origin = - origDispatchOpts.origin.constructor === URL - ? origDispatchOpts.origin - : new URL(origDispatchOpts.origin) - - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler) - } - - instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onError(err) - } - - let dispatchOpts = null - dispatchOpts = { - ...origDispatchOpts, - servername: origin.hostname, // For SNI on TLS - origin: newOrigin, - headers: { - host: origin.hostname, - ...origDispatchOpts.headers - } - } - - dispatch( - dispatchOpts, - instance.getHandler({ origin, dispatch, handler }, origDispatchOpts) - ) - }) - - return true - } - } -} - - -/***/ }), - -/***/ 1722: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(2545) -const DecoratorHandler = __nccwpck_require__(8677) - -class DumpHandler extends DecoratorHandler { - #maxSize = 1024 * 1024 - #abort = null - #dumped = false - #aborted = false - #size = 0 - #reason = null - #handler = null - - constructor ({ maxSize }, handler) { - super(handler) - - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError('maxSize must be a number greater than 0') - } - - this.#maxSize = maxSize ?? this.#maxSize - this.#handler = handler - } - - onConnect (abort) { - this.#abort = abort - - this.#handler.onConnect(this.#customAbort.bind(this)) - } - - #customAbort (reason) { - this.#aborted = true - this.#reason = reason - } - - // TODO: will require adjustment after new hooks are out - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = util.parseHeaders(rawHeaders) - const contentLength = headers['content-length'] - - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError( - `Response size (${contentLength}) larger than maxSize (${ - this.#maxSize - })` - ) - } - - if (this.#aborted) { - return true - } - - return this.#handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - onError (err) { - if (this.#dumped) { - return - } - - err = this.#reason ?? err - - this.#handler.onError(err) - } - - onData (chunk) { - this.#size = this.#size + chunk.length - - if (this.#size >= this.#maxSize) { - this.#dumped = true - - if (this.#aborted) { - this.#handler.onError(this.#reason) - } else { - this.#handler.onComplete([]) - } - } - - return true - } - - onComplete (trailers) { - if (this.#dumped) { - return - } - - if (this.#aborted) { - this.#handler.onError(this.reason) - return - } - - this.#handler.onComplete(trailers) - } -} - -function createDumpInterceptor ( - { maxSize: defaultMaxSize } = { - maxSize: 1024 * 1024 - } -) { - return dispatch => { - return function Intercept (opts, handler) { - const { dumpMaxSize = defaultMaxSize } = - opts - - const dumpHandler = new DumpHandler( - { maxSize: dumpMaxSize }, - handler - ) - - return dispatch(opts, dumpHandler) - } - } -} - -module.exports = createDumpInterceptor - - -/***/ }), - -/***/ 5002: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const RedirectHandler = __nccwpck_require__(5056) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 4668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RedirectHandler = __nccwpck_require__(5056) - -module.exports = opts => { - const globalMaxRedirections = opts?.maxRedirections - return dispatch => { - return function redirectInterceptor (opts, handler) { - const { maxRedirections = globalMaxRedirections, ...baseOpts } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler( - dispatch, - maxRedirections, - opts, - handler - ) - - return dispatch(baseOpts, redirectHandler) - } - } -} - - -/***/ }), - -/***/ 5732: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const RetryHandler = __nccwpck_require__(8630) - -module.exports = globalOpts => { - return dispatch => { - return function retryInterceptor (opts, handler) { - return dispatch( - opts, - new RetryHandler( - { ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } }, - { - handler, - dispatch - } - ) - ) - } - } -} - - -/***/ }), - -/***/ 3234: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(2714); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 2472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRfdXBncmFkZQASDGxsaHR0cF9yZXNldAATDmxsaHR0cF9leGVjdXRlABQUbGxodHRwX3NldHRpbmdzX2luaXQAFQ1sbGh0dHBfZmluaXNoABYMbGxodHRwX3BhdXNlABcNbGxodHRwX3Jlc3V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AAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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C0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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URUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRU9SRElSRUNUT1JUUkNIUEFSQU1FVEVSVVJDRUJTQ1JJQkVBUkRPV05BQ0VJTkROS0NLVUJTQ1JJQkVIVFRQL0FEVFAv', 'base64') - - -/***/ }), - -/***/ 9888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Buffer } = __nccwpck_require__(4573) - -module.exports = Buffer.from('AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAX8AYAJ/fwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAy0sBQYAAAIAAAAAAAACAQIAAgICAAADAAAAAAMDAwMBAQEBAQEBAQEAAAIAAAAEBQFwARISBQMBAAIGCAF/AUGA1AQLB9EFIgZtZW1vcnkCAAtfaW5pdGlhbGl6ZQAIGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAtsbGh0dHBfaW5pdAAJGGxsaHR0cF9zaG91bGRfa2VlcF9hbGl2ZQAvDGxsaHR0cF9hbGxvYwALBm1hbGxvYwAxC2xsaHR0cF9mcmVlAAwEZnJlZQAMD2xsaHR0cF9nZXRfdHlwZQANFWxsaHR0cF9nZXRfaHR0cF9tYWpvcgAOFWxsaHR0cF9nZXRfaHR0cF9taW5vcgAPEWxsaHR0cF9nZXRfbWV0aG9kABAWbGxodHRwX2dldF9zdGF0dXNfY29kZQAREmxsaHR0cF9nZXRf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AhAgAiAANgIYCyAFQRRqKAIAIgJFDQAgAEEUaiACNgIAIAIgADYCGAsgASAEaiAENgIAIAEgBEEBcjYCBCABQaDQACgCAEcNAEGU0AAgBDYCAAwBCyAEQf8BTQRAIARBeHFBtNAAaiEAAn9BjNAAKAIAIgJBASAEQQN2dCIDcUUEQEGM0AAgAiADcjYCACAADAELIAAoAggLIgIgATYCDCAAIAE2AgggASAANgIMIAEgAjYCCAwBC0EfIQIgBEH///8HTQRAIARBJiAEQQh2ZyIAa3ZBAXEgAEEBdGtBPmohAgsgASACNgIcIAFCADcCECACQQJ0QbzSAGohAAJAQZDQACgCACIDQQEgAnQiB3FFBEAgACABNgIAQZDQACADIAdyNgIAIAEgADYCGCABIAE2AgggASABNgIMDAELIARBGSACQQF2a0EAIAJBH0cbdCECIAAoAgAhAAJAA0AgACIDKAIEQXhxIARGDQEgAkEddiEAIAJBAXQhAiADIABBBHFqQRBqIgcoAgAiAA0ACyAHIAE2AgAgASADNgIYIAEgATYCDCABIAE2AggMAQsgAygCCCIAIAE2AgwgAyABNgIIIAFBADYCGCABIAM2AgwgASAANgIIC0Gs0ABBrNAAKAIAQQFrIgBBfyAAGzYCAAsLBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LQAEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABAwIAAgBDYCOCAAIAM6ACggACACOgAtIAAgATYCGAu74gECB38DfiABIAJqIQQCQCAAIgIoAgwiAA0AIAIoAgQEQCACIAE2AgQLIwBBEGsiCCQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAC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QEMGwtBqgEMGgtBqwEMGQtBrAEMGAtBrQEMFwtBrgEMFgtBAQwVC0GvAQwUC0GwAQwTC0GxAQwSC0GzAQwRC0GyAQwQC0G0AQwPC0G1AQwOC0G2AQwNC0G3AQwMC0G4AQwLC0G5AQwKC0G6AQwJC0G7AQwIC0HGAQwHC0G8AQwGC0G9AQwFC0G+AQwEC0G/AQwDC0HAAQwCC0HCAQwBC0HBAQshAwNAAkACQAJAAkACQAJAAkACQAJAIAICfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAgJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJA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ASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyiAgsgAkEANgIAIAZBAWohAUECDGULQYwBIQMgASAERg2gAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHwzwBqLQAARw1jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyhAgsgAkEANgIAIAZBAWohAUEfDGQLQY0BIQMgASAERg2fAiACKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHyzwBqLQAARw1iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAygAgsgAkEANgIAIAZBAWohAUEJDGMLIAEgBEYEQEGOASEDDJ8CCwJAAkAgAS0AAEHJAGsOBwBiYmJiYgFiCyABQQFqIQFB+AAhAwyGAgsgAUEBaiEBQfkAIQMMhQILQY8BIQMgASAERg2dAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGRzwBqLQAARw1gIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAyeAgsgAkEANgIAIAZBAWohAUEYDGELQZABIQMgASAERg2cAiACKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGXzwBqLQAARw1fIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAydAgsgAkEANgIAIAZBAWohAUEXDGALQZEBIQMgASAERg2bAiACKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEGazwBqLQAARw1eIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAycAgsgAkEANgIAIAZBAWohAUEVDF8LQZIBIQMgASAERg2aAiACKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGhzwBqLQAARw1dIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAIgBTYCAAybAgsgAkEANgIAIAZBAWohAUEeDF4LIAEgBEYEQEGTASEDDJoCCyABLQA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MDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBB+swACwQBAAABAEGQzQALAQEAQZrNAAsGAgAAAAACAEGxzQALOgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQfDOAAuWAU5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==', 'base64') - - -/***/ }), - -/***/ 2714: -/***/ ((__unused_webpack_module, exports) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3819: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kClients } = __nccwpck_require__(5953) -const Agent = __nccwpck_require__(4963) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(8219) -const MockClient = __nccwpck_require__(9079) -const MockPool = __nccwpck_require__(406) -const { matchValue, buildMockOptions } = __nccwpck_require__(4159) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(2545) -const Dispatcher = __nccwpck_require__(6105) -const Pluralizer = __nccwpck_require__(2823) -const PendingInterceptorsFormatter = __nccwpck_require__(8676) - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts?.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - const agent = opts?.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') - } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, dispatcher) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const client = this[kClients].get(origin) - if (client) { - return client - } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitDispatcher] of Array.from(this[kClients])) { - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } - } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return - } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 9079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Client = __nccwpck_require__(3279) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 499: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { UndiciError } = __nccwpck_require__(2545) - -const kMockNotMatchedError = Symbol.for('undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED') - -/** - * The request does not match any registered mock dispatches. - */ -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } - - static [Symbol.hasInstance] (instance) { - return instance && instance[kMockNotMatchedError] === true - } - - [kMockNotMatchedError] = true -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(8219) -const { InvalidArgumentError } = __nccwpck_require__(2545) -const { buildURL } = __nccwpck_require__(8106) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } - - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } - - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } - - this[kMockDispatch].times = repeatTimes - return this - } -} - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') - } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') - } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' - } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/web/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } - } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() - } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData ({ statusCode, data, responseOptions }) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (replyParameters) { - if (typeof replyParameters.statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof replyParameters.responseOptions !== 'object' || replyParameters.responseOptions === null) { - throw new InvalidArgumentError('responseOptions must be an object') - } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyOptionsCallbackOrStatusCode) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyOptionsCallbackOrStatusCode === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyOptionsCallbackOrStatusCode(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object' || resolvedData === null) { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const replyParameters = { data: '', responseOptions: {}, ...resolvedData } - this.validateReplyParameters(replyParameters) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(replyParameters) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) - } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const replyParameters = { - statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? '' : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] - } - this.validateReplyParameters(replyParameters) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(replyParameters) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') - } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') - } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 406: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { promisify } = __nccwpck_require__(7975) -const Pool = __nccwpck_require__(5406) -const { buildMockDispatch } = __nccwpck_require__(4159) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(8219) -const { MockInterceptor } = __nccwpck_require__(81) -const Symbols = __nccwpck_require__(5953) -const { InvalidArgumentError } = __nccwpck_require__(2545) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 8219: -/***/ ((module) => { - - - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} - - -/***/ }), - -/***/ 4159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { MockNotMatchedError } = __nccwpck_require__(499) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(8219) -const { buildURL } = __nccwpck_require__(8106) -const { STATUS_CODES } = __nccwpck_require__(7067) -const { - types: { - isPromise - } -} = __nccwpck_require__(7975) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} - -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} - -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) - - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} - -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } - - const pathSegments = path.split('?') - - if (pathSegments.length !== 2) { - return path - } - - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} - -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (data instanceof Uint8Array) { - return data - } else if (data instanceof ArrayBuffer) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`) - } - - return matchedMockDispatches[0] -} - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function generateKeyValues (data) { - const keys = Object.keys(data) - const result = [] - for (let i = 0; i < keys.length; ++i) { - const key = keys[i] - const value = data[key] - const name = Buffer.from(`${key}`) - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)) - } - } else { - result.push(name, Buffer.from(`${value}`)) - } - } - return result -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} - -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) - - mockDispatch.timesInvoked++ - - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } - - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch - - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times - - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.onConnect?.(err => handler.onError(err), null) - handler.onHeaders?.(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData?.(Buffer.from(responseData)) - handler.onComplete?.(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName, - buildHeadersFromArray -} - - -/***/ }), - -/***/ 8676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const { Console } = __nccwpck_require__(7540) - -const PERSISTENT = process.versions.icu ? '✅' : 'Y ' -const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N ' - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? PERSISTENT : NOT_PERSISTENT, - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 2823: -/***/ ((module) => { - - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 3113: -/***/ ((module) => { - - - -/** - * This module offers an optimized timer implementation designed for scenarios - * where high precision is not critical. - * - * The timer achieves faster performance by using a low-resolution approach, - * with an accuracy target of within 500ms. This makes it particularly useful - * for timers with delays of 1 second or more, where exact timing is less - * crucial. - * - * It's important to note that Node.js timers are inherently imprecise, as - * delays can occur due to the event loop being blocked by other operations. - * Consequently, timers may trigger later than their scheduled time. - */ - -/** - * The fastNow variable contains the internal fast timer clock value. - * - * @type {number} - */ -let fastNow = 0 - -/** - * RESOLUTION_MS represents the target resolution time in milliseconds. - * - * @type {number} - * @default 1000 - */ -const RESOLUTION_MS = 1e3 - -/** - * TICK_MS defines the desired interval in milliseconds between each tick. - * The target value is set to half the resolution time, minus 1 ms, to account - * for potential event loop overhead. - * - * @type {number} - * @default 499 - */ -const TICK_MS = (RESOLUTION_MS >> 1) - 1 - -/** - * fastNowTimeout is a Node.js timer used to manage and process - * the FastTimers stored in the `fastTimers` array. - * - * @type {NodeJS.Timeout} - */ -let fastNowTimeout - -/** - * The kFastTimer symbol is used to identify FastTimer instances. - * - * @type {Symbol} - */ -const kFastTimer = Symbol('kFastTimer') - -/** - * The fastTimers array contains all active FastTimers. - * - * @type {FastTimer[]} - */ -const fastTimers = [] - -/** - * These constants represent the various states of a FastTimer. - */ - -/** - * The `NOT_IN_LIST` constant indicates that the FastTimer is not included - * in the `fastTimers` array. Timers with this status will not be processed - * during the next tick by the `onTick` function. - * - * A FastTimer can be re-added to the `fastTimers` array by invoking the - * `refresh` method on the FastTimer instance. - * - * @type {-2} - */ -const NOT_IN_LIST = -2 - -/** - * The `TO_BE_CLEARED` constant indicates that the FastTimer is scheduled - * for removal from the `fastTimers` array. A FastTimer in this state will - * be removed in the next tick by the `onTick` function and will no longer - * be processed. - * - * This status is also set when the `clear` method is called on the FastTimer instance. - * - * @type {-1} - */ -const TO_BE_CLEARED = -1 - -/** - * The `PENDING` constant signifies that the FastTimer is awaiting processing - * in the next tick by the `onTick` function. Timers with this status will have - * their `_idleStart` value set and their status updated to `ACTIVE` in the next tick. - * - * @type {0} - */ -const PENDING = 0 - -/** - * The `ACTIVE` constant indicates that the FastTimer is active and waiting - * for its timer to expire. During the next tick, the `onTick` function will - * check if the timer has expired, and if so, it will execute the associated callback. - * - * @type {1} - */ -const ACTIVE = 1 - -/** - * The onTick function processes the fastTimers array. - * - * @returns {void} - */ -function onTick () { - /** - * Increment the fastNow value by the TICK_MS value, despite the actual time - * that has passed since the last tick. This approach ensures independence - * from the system clock and delays caused by a blocked event loop. - * - * @type {number} - */ - fastNow += TICK_MS - - /** - * The `idx` variable is used to iterate over the `fastTimers` array. - * Expired timers are removed by replacing them with the last element in the array. - * Consequently, `idx` is only incremented when the current element is not removed. - * - * @type {number} - */ - let idx = 0 - - /** - * The len variable will contain the length of the fastTimers array - * and will be decremented when a FastTimer should be removed from the - * fastTimers array. - * - * @type {number} - */ - let len = fastTimers.length - - while (idx < len) { - /** - * @type {FastTimer} - */ - const timer = fastTimers[idx] - - // If the timer is in the ACTIVE state and the timer has expired, it will - // be processed in the next tick. - if (timer._state === PENDING) { - // Set the _idleStart value to the fastNow value minus the TICK_MS value - // to account for the time the timer was in the PENDING state. - timer._idleStart = fastNow - TICK_MS - timer._state = ACTIVE - } else if ( - timer._state === ACTIVE && - fastNow >= timer._idleStart + timer._idleTimeout - ) { - timer._state = TO_BE_CLEARED - timer._idleStart = -1 - timer._onTimeout(timer._timerArg) - } - - if (timer._state === TO_BE_CLEARED) { - timer._state = NOT_IN_LIST - - // Move the last element to the current index and decrement len if it is - // not the only element in the array. - if (--len !== 0) { - fastTimers[idx] = fastTimers[len] - } - } else { - ++idx - } - } - - // Set the length of the fastTimers array to the new length and thus - // removing the excess FastTimers elements from the array. - fastTimers.length = len - - // If there are still active FastTimers in the array, refresh the Timer. - // If there are no active FastTimers, the timer will be refreshed again - // when a new FastTimer is instantiated. - if (fastTimers.length !== 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { - fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } - } -} - -/** - * The `FastTimer` class is a data structure designed to store and manage - * timer information. - */ -class FastTimer { - [kFastTimer] = true - - /** - * The state of the timer, which can be one of the following: - * - NOT_IN_LIST (-2) - * - TO_BE_CLEARED (-1) - * - PENDING (0) - * - ACTIVE (1) - * - * @type {-2|-1|0|1} - * @private - */ - _state = NOT_IN_LIST - - /** - * The number of milliseconds to wait before calling the callback. - * - * @type {number} - * @private - */ - _idleTimeout = -1 - - /** - * The time in milliseconds when the timer was started. This value is used to - * calculate when the timer should expire. - * - * @type {number} - * @default -1 - * @private - */ - _idleStart = -1 - - /** - * The function to be executed when the timer expires. - * @type {Function} - * @private - */ - _onTimeout - - /** - * The argument to be passed to the callback when the timer expires. - * - * @type {*} - * @private - */ - _timerArg - - /** - * @constructor - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should wait - * before the specified function or code is executed. - * @param {*} arg - */ - constructor (callback, delay, arg) { - this._onTimeout = callback - this._idleTimeout = delay - this._timerArg = arg - - this.refresh() - } - - /** - * Sets the timer's start time to the current time, and reschedules the timer - * to call its callback at the previously specified duration adjusted to the - * current time. - * Using this on a timer that has already called its callback will reactivate - * the timer. - * - * @returns {void} - */ - refresh () { - // In the special case that the timer is not in the list of active timers, - // add it back to the array to be processed in the next tick by the onTick - // function. - if (this._state === NOT_IN_LIST) { - fastTimers.push(this) - } - - // If the timer is the only active timer, refresh the fastNowTimeout for - // better resolution. - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } - - // Setting the state to PENDING will cause the timer to be reset in the - // next tick by the onTick function. - this._state = PENDING - } - - /** - * The `clear` method cancels the timer, preventing it from executing. - * - * @returns {void} - * @private - */ - clear () { - // Set the state to TO_BE_CLEARED to mark the timer for removal in the next - // tick by the onTick function. - this._state = TO_BE_CLEARED - - // Reset the _idleStart value to -1 to indicate that the timer is no longer - // active. - this._idleStart = -1 - } -} - -/** - * This module exports a setTimeout and clearTimeout function that can be - * used as a drop-in replacement for the native functions. - */ -module.exports = { - /** - * The setTimeout() method sets a timer which executes a function once the - * timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {NodeJS.Timeout|FastTimer} - */ - setTimeout (callback, delay, arg) { - // If the delay is less than or equal to the RESOLUTION_MS value return a - // native Node.js Timer instance. - return delay <= RESOLUTION_MS - ? setTimeout(callback, delay, arg) - : new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated Timer previously created - * by calling setTimeout. - * - * @param {NodeJS.Timeout|FastTimer} timeout - */ - clearTimeout (timeout) { - // If the timeout is a FastTimer, call its own clear method. - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear() - // Otherwise it is an instance of a native NodeJS.Timeout, so call the - // Node.js native clearTimeout function. - } else { - clearTimeout(timeout) - } - }, - /** - * The setFastTimeout() method sets a fastTimer which executes a function once - * the timer expires. - * @param {Function} callback A function to be executed after the timer - * expires. - * @param {number} delay The time, in milliseconds that the timer should - * wait before the specified function or code is executed. - * @param {*} [arg] An optional argument to be passed to the callback function - * when the timer expires. - * @returns {FastTimer} - */ - setFastTimeout (callback, delay, arg) { - return new FastTimer(callback, delay, arg) - }, - /** - * The clearTimeout method cancels an instantiated FastTimer previously - * created by calling setFastTimeout. - * - * @param {FastTimer} timeout - */ - clearFastTimeout (timeout) { - timeout.clear() - }, - /** - * The now method returns the value of the internal fast timer clock. - * - * @returns {number} - */ - now () { - return fastNow - }, - /** - * Trigger the onTick function to process the fastTimers array. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - * @param {number} [delay=0] The delay in milliseconds to add to the now value. - */ - tick (delay = 0) { - fastNow += delay - RESOLUTION_MS + 1 - onTick() - onTick() - }, - /** - * Reset FastTimers. - * Exported for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - reset () { - fastNow = 0 - fastTimers.length = 0 - clearTimeout(fastNowTimeout) - fastNowTimeout = null - }, - /** - * Exporting for testing purposes only. - * Marking as deprecated to discourage any use outside of testing. - * @deprecated - */ - kFastTimer -} - - -/***/ }), - -/***/ 5159: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { urlEquals, getFieldValues } = __nccwpck_require__(2556) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(8106) -const { webidl } = __nccwpck_require__(6131) -const { Response, cloneResponse, fromInnerResponse } = __nccwpck_require__(8661) -const { Request, fromInnerRequest } = __nccwpck_require__(6465) -const { kState } = __nccwpck_require__(1597) -const { fetching } = __nccwpck_require__(4268) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(1214) -const assert = __nccwpck_require__(4589) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - webidl.util.markAsUncloneable(this) - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.match' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - const p = this.#internalMatchAll(request, options, 1) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.matchAll' - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - return this.#internalMatchAll(request, options) - } - - async add (request) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.add' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.addAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - // 1. - const responsePromises = [] - - // 2. - const requestList = [] - - // 3. - for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: 'Argument 1', - types: ['undefined is not allowed'] - }) - } - - request = webidl.converters.RequestInfo(request) - - if (typeof request === 'string') { - continue - } - - // 3.1 - const r = request[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme when method is not GET.' - }) - } - } - - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] - - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected http/s scheme.' - }) - } - - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' - - // 5.5 - requestList.push(r) - - // 5.6 - const responsePromise = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) - - for (const controller of fetchControllers) { - controller.abort() - } - - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } - - // 2. - responsePromise.resolve(response) - } - })) - - // 5.8 - responsePromises.push(responsePromise.promise) - } - - // 6. - const p = Promise.all(responsePromises) - - // 7. - const responses = await p - - // 7.1 - const operations = [] - - // 7.2 - let index = 0 - - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.put' - webidl.argumentLengthCheck(arguments, 2, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - response = webidl.converters.Response(response, prefix, 'response') - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: prefix, - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: prefix, - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: prefix, - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } - - // 17. - operations.push(operation) - - // 19. - const bytes = await bodyReadPromise.promise - - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes - } - - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = createDeferredPromise() - - let errorData = null - let requestResponses - - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {Promise} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - const prefix = 'Cache.keys' - - if (request !== undefined) request = webidl.converters.RequestInfo(request, prefix, 'request') - options = webidl.converters.CacheQueryOptions(options, prefix, 'options') - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = createDeferredPromise() - - // 5. - // 5.1 - const requests = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } - - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] - - // 5.4.2 - for (const request of requests) { - const requestObject = fromInnerRequest( - request, - new AbortController().signal, - 'immutable' - ) - // 5.4.2.1 - requestList.push(requestObject) - } - - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) - - return promise.promise - } - - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] - - // 3. - const addedItems = [] - - // 4.1 - const resultList = [] - - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } - - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } - - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } - - // 4.2.4 - let requestResponses - - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) - - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } - - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } - - // 4.2.6.2 - const r = operation.request - - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } - - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) - - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) - - // 4.2.6.7.1 - cache.splice(idx, 1) - } - - // 4.2.6.8 - cache.push([operation.request, operation.response]) - - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } - - // 4.2.7 - resultList.push([operation.request, operation.response]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] - - const storage = targetStorage ?? this.#relevantRequestResponseList - - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } - - return resultList - } - - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } - - const queryURL = new URL(requestQuery.url) - - const cachedURL = new URL(request.url) - - if (options?.ignoreSearch) { - cachedURL.search = '' - - queryURL.search = '' - } - - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = getFieldValues(response.headersList.get('vary')) - - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } - - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) - - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } - } - - return true - } - - #internalMatchAll (request, options, maxResponses = Infinity) { - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } - } - - // 5. - // 5.1 - const responses = [] - - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) - - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } - - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! - - // 5.5.1 - const responseList = [] - - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = fromInnerResponse(response, 'immutable') - - responseList.push(responseObject.clone()) - - if (responseList.length >= maxResponses) { - break - } - } - - // 6. - return Object.freeze(responseList) - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 7355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConstruct } = __nccwpck_require__(9567) -const { Cache } = __nccwpck_require__(5159) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.open' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') - - // 2.1.1 - const cache = this.#caches.get(cacheName) - - // 2.1.1.1 - return new Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - - const prefix = 'CacheStorage.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - cacheName = webidl.converters.DOMString(cacheName, prefix, 'cacheName') - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {Promise} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 9567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -module.exports = { - kConstruct: (__nccwpck_require__(5953).kConstruct) -} - - -/***/ }), - -/***/ 2556: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) -const { URLSerializer } = __nccwpck_require__(8094) -const { isValidHeaderName } = __nccwpck_require__(1214) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = URLSerializer(B, excludeFragment) - - return serializedA === serializedB -} - -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function getFieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (isValidHeaderName(value)) { - values.push(value) - } - } - - return values -} - -module.exports = { - urlEquals, - getFieldValues -} - - -/***/ }), - -/***/ 8130: -/***/ ((module) => { - - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 8383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { parseSetCookie } = __nccwpck_require__(6667) -const { stringify } = __nccwpck_require__(8783) -const { webidl } = __nccwpck_require__(6131) -const { Headers } = __nccwpck_require__(9822) - -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ - -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } - - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') - - out[name.trim()] = value.join('=') - } - - return out -} - -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.brandCheck(headers, Headers, { strict: false }) - - const prefix = 'deleteCookie' - webidl.argumentLengthCheck(arguments, 2, prefix) - - name = webidl.converters.DOMString(name, prefix, 'name') - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, 'getSetCookies') - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = headers.getSetCookie() - - if (!cookies) { - return [] - } - - return cookies.map((pair) => parseSetCookie(pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, 'setCookie') - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', str) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - } -]) - -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) - } - - return new Date(value) - }), - key: 'expires', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: () => null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: () => null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: () => new Array(0) - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 6667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(8130) -const { isCTLExcludingHtab } = __nccwpck_require__(8783) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(8094) -const assert = __nccwpck_require__(4589) - -/** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned - */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } - - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' - - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } - - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: - - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() - - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList - } - - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) - - let cookieAv = '' - - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } - - // Let the cookie-av string be the characters consumed in this step. - - let attributeName = '' - let attributeValue = '' - - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: - - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } - - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() - - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) - - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. - - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. - - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) - - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) - - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. - - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue - - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } - - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() - - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. - - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: - - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } - - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. - - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. - - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: - - // 1. Let enforcement be "Default". - let enforcement = 'Default' - - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } - - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } - - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] - - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 8783: -/***/ ((module) => { - - - -/** - * @param {string} value - * @returns {boolean} - */ -function isCTLExcludingHtab (value) { - for (let i = 0; i < value.length; ++i) { - const code = value.charCodeAt(i) - - if ( - (code >= 0x00 && code <= 0x08) || - (code >= 0x0A && code <= 0x1F) || - code === 0x7F - ) { - return true - } - } - return false -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (let i = 0; i < name.length; ++i) { - const code = name.charCodeAt(i) - - if ( - code < 0x21 || // exclude CTLs (0-31), SP and HT - code > 0x7E || // exclude non-ascii and DEL - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x3C || // < - code === 0x3E || // > - code === 0x40 || // @ - code === 0x2C || // , - code === 0x3B || // ; - code === 0x3A || // : - code === 0x5C || // \ - code === 0x2F || // / - code === 0x5B || // [ - code === 0x5D || // ] - code === 0x3F || // ? - code === 0x3D || // = - code === 0x7B || // { - code === 0x7D // } - ) { - throw new Error('Invalid cookie name') - } - } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - let len = value.length - let i = 0 - - // if the value is wrapped in DQUOTE - if (value[0] === '"') { - if (len === 1 || value[len - 1] !== '"') { - throw new Error('Invalid cookie value') - } - --len - ++i - } - - while (i < len) { - const code = value.charCodeAt(i++) - - if ( - code < 0x21 || // exclude CTLs (0-31) - code > 0x7E || // non-ascii and DEL (127) - code === 0x22 || // " - code === 0x2C || // , - code === 0x3B || // ; - code === 0x5C // \ - ) { - throw new Error('Invalid cookie value') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (let i = 0; i < path.length; ++i) { - const code = path.charCodeAt(i) - - if ( - code < 0x20 || // exclude CTLs (0-31) - code === 0x7F || // DEL - code === 0x3B // ; - ) { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') - } -} - -const IMFDays = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' -] - -const IMFMonths = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' -] - -const IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, '0')) - -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } - - return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT` -} - -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] - - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } - - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } - - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } - - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -module.exports = { - isCTLExcludingHtab, - validateCookieName, - validateCookiePath, - validateCookieValue, - toIMFDate, - stringify -} - - -/***/ }), - -/***/ 5213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -const { Transform } = __nccwpck_require__(7075) -const { isASCIINumber, isValidLastEventId } = __nccwpck_require__(3441) - -/** - * @type {number[]} BOM - */ -const BOM = [0xEF, 0xBB, 0xBF] -/** - * @type {10} LF - */ -const LF = 0x0A -/** - * @type {13} CR - */ -const CR = 0x0D -/** - * @type {58} COLON - */ -const COLON = 0x3A -/** - * @type {32} SPACE - */ -const SPACE = 0x20 - -/** - * @typedef {object} EventSourceStreamEvent - * @type {object} - * @property {string} [event] The event type. - * @property {string} [data] The data of the message. - * @property {string} [id] A unique ID for the event. - * @property {string} [retry] The reconnection time, in milliseconds. - */ - -/** - * @typedef eventSourceSettings - * @type {object} - * @property {string} lastEventId The last event ID received from the server. - * @property {string} origin The origin of the event source. - * @property {number} reconnectionTime The reconnection time, in milliseconds. - */ - -class EventSourceStream extends Transform { - /** - * @type {eventSourceSettings} - */ - state = null - - /** - * Leading byte-order-mark check. - * @type {boolean} - */ - checkBOM = true - - /** - * @type {boolean} - */ - crlfCheck = false - - /** - * @type {boolean} - */ - eventEndCheck = false - - /** - * @type {Buffer} - */ - buffer = null - - pos = 0 - - event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - - /** - * @param {object} options - * @param {eventSourceSettings} options.eventSourceSettings - * @param {Function} [options.push] - */ - constructor (options = {}) { - // Enable object mode as EventSourceStream emits objects of shape - // EventSourceStreamEvent - options.readableObjectMode = true - - super(options) - - this.state = options.eventSourceSettings || {} - if (options.push) { - this.push = options.push - } - } - - /** - * @param {Buffer} chunk - * @param {string} _encoding - * @param {Function} callback - * @returns {void} - */ - _transform (chunk, _encoding, callback) { - if (chunk.length === 0) { - callback() - return - } - - // Cache the chunk in the buffer, as the data might not be complete while - // processing it - // TODO: Investigate if there is a more performant way to handle - // incoming chunks - // see: https://github.com/nodejs/undici/issues/2630 - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]) - } else { - this.buffer = chunk - } - - // Strip leading byte-order-mark if we opened the stream and started - // the processing of the incoming data - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - // Check if the first byte is the same as the first byte of the BOM - if (this.buffer[0] === BOM[0]) { - // If it is, we need to wait for more data - callback() - return - } - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // The buffer only contains one byte so we need to wait for more data - callback() - return - case 2: - // Check if the first two bytes are the same as the first two bytes - // of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] - ) { - // If it is, we need to wait for more data, because the third byte - // is needed to determine if it is the BOM or not - callback() - return - } - - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - break - case 3: - // Check if the first three bytes are the same as the first three - // bytes of the BOM - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // If it is, we can drop the buffered data, as it is only the BOM - this.buffer = Buffer.alloc(0) - // Set the checkBOM flag to false as we don't need to check for the - // BOM anymore - this.checkBOM = false - - // Await more data - callback() - return - } - // If it is not the BOM, we can start processing the data - this.checkBOM = false - break - default: - // The buffer is longer than 3 bytes, so we can drop the BOM if it is - // present - if ( - this.buffer[0] === BOM[0] && - this.buffer[1] === BOM[1] && - this.buffer[2] === BOM[2] - ) { - // Remove the BOM from the buffer - this.buffer = this.buffer.subarray(3) - } - - // Set the checkBOM flag to false as we don't need to check for the - this.checkBOM = false - break - } - } - - while (this.pos < this.buffer.length) { - // If the previous line ended with an end-of-line, we need to check - // if the next character is also an end-of-line. - if (this.eventEndCheck) { - // If the the current character is an end-of-line, then the event - // is finished and we can process it - - // If the previous line ended with a carriage return, we need to - // check if the current character is a line feed and remove it - // from the buffer. - if (this.crlfCheck) { - // If the current character is a line feed, we can remove it - // from the buffer and reset the crlfCheck flag - if (this.buffer[this.pos] === LF) { - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - this.crlfCheck = false - - // It is possible that the line feed is not the end of the - // event. We need to check if the next character is an - // end-of-line character to determine if the event is - // finished. We simply continue the loop to check the next - // character. - - // As we removed the line feed from the buffer and set the - // crlfCheck flag to false, we basically don't make any - // distinction between a line feed and a carriage return. - continue - } - this.crlfCheck = false - } - - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed so we can remove it from the - // buffer - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - this.buffer = this.buffer.subarray(this.pos + 1) - this.pos = 0 - if ( - this.event.data !== undefined || this.event.event || this.event.id || this.event.retry) { - this.processEvent(this.event) - } - this.clearEvent() - continue - } - // If the current character is not an end-of-line, then the event - // is not finished and we have to reset the eventEndCheck flag - this.eventEndCheck = false - continue - } - - // If the current character is an end-of-line, we can process the - // line - if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - // If the current character is a carriage return, we need to - // set the crlfCheck flag to true, as we need to check if the - // next character is a line feed - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true - } - - // In any case, we can process the line as we reached an - // end-of-line character - this.parseLine(this.buffer.subarray(0, this.pos), this.event) - - // Remove the processed line from the buffer - this.buffer = this.buffer.subarray(this.pos + 1) - // Reset the position as we removed the processed line from the buffer - this.pos = 0 - // A line was processed and this could be the end of the event. We need - // to check if the next line is empty to determine if the event is - // finished. - this.eventEndCheck = true - continue - } - - this.pos++ - } - - callback() - } - - /** - * @param {Buffer} line - * @param {EventStreamEvent} event - */ - parseLine (line, event) { - // If the line is empty (a blank line) - // Dispatch the event, as defined below. - // This will be handled in the _transform method - if (line.length === 0) { - return - } - - // If the line starts with a U+003A COLON character (:) - // Ignore the line. - const colonPosition = line.indexOf(COLON) - if (colonPosition === 0) { - return - } - - let field = '' - let value = '' - - // If the line contains a U+003A COLON character (:) - if (colonPosition !== -1) { - // Collect the characters on the line before the first U+003A COLON - // character (:), and let field be that string. - // TODO: Investigate if there is a more performant way to extract the - // field - // see: https://github.com/nodejs/undici/issues/2630 - field = line.subarray(0, colonPosition).toString('utf8') - - // Collect the characters on the line after the first U+003A COLON - // character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value. - let valueStart = colonPosition + 1 - if (line[valueStart] === SPACE) { - ++valueStart - } - // TODO: Investigate if there is a more performant way to extract the - // value - // see: https://github.com/nodejs/undici/issues/2630 - value = line.subarray(valueStart).toString('utf8') - - // Otherwise, the string is not empty but does not contain a U+003A COLON - // character (:) - } else { - // Process the field using the steps described below, using the whole - // line as the field name, and the empty string as the field value. - field = line.toString('utf8') - value = '' - } - - // Modify the event with the field name and value. The value is also - // decoded as UTF-8 - switch (field) { - case 'data': - if (event[field] === undefined) { - event[field] = value - } else { - event[field] += `\n${value}` - } - break - case 'retry': - if (isASCIINumber(value)) { - event[field] = value - } - break - case 'id': - if (isValidLastEventId(value)) { - event[field] = value - } - break - case 'event': - if (value.length > 0) { - event[field] = value - } - break - } - } - - /** - * @param {EventSourceStreamEvent} event - */ - processEvent (event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10) - } - - if (event.id && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id - } - - // only dispatch event, when data is provided - if (event.data !== undefined) { - this.push({ - type: event.event || 'message', - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }) - } - } - - clearEvent () { - this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined - } - } -} - -module.exports = { - EventSourceStream -} - - -/***/ }), - -/***/ 7784: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { pipeline } = __nccwpck_require__(7075) -const { fetching } = __nccwpck_require__(4268) -const { makeRequest } = __nccwpck_require__(6465) -const { webidl } = __nccwpck_require__(6131) -const { EventSourceStream } = __nccwpck_require__(5213) -const { parseMIMEType } = __nccwpck_require__(8094) -const { createFastMessageEvent } = __nccwpck_require__(8798) -const { isNetworkError } = __nccwpck_require__(8661) -const { delay } = __nccwpck_require__(3441) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { environmentSettingsObject } = __nccwpck_require__(1214) - -let experimentalWarned = false - -/** - * A reconnection time, in milliseconds. This must initially be an implementation-defined value, - * probably in the region of a few seconds. - * - * In Comparison: - * - Chrome uses 3000ms. - * - Deno uses 5000ms. - * - * @type {3000} - */ -const defaultReconnectionTime = 3000 - -/** - * The readyState attribute represents the state of the connection. - * @enum - * @readonly - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev - */ - -/** - * The connection has not yet been established, or it was closed and the user - * agent is reconnecting. - * @type {0} - */ -const CONNECTING = 0 - -/** - * The user agent has an open connection and is dispatching events as it - * receives them. - * @type {1} - */ -const OPEN = 1 - -/** - * The connection is not open, and the user agent is not trying to reconnect. - * @type {2} - */ -const CLOSED = 2 - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "same-origin". - * @type {'anonymous'} - */ -const ANONYMOUS = 'anonymous' - -/** - * Requests for the element will have their mode set to "cors" and their credentials mode set to "include". - * @type {'use-credentials'} - */ -const USE_CREDENTIALS = 'use-credentials' - -/** - * The EventSource interface is used to receive server-sent events. It - * connects to a server over HTTP and receives events in text/event-stream - * format without closing the connection. - * @extends {EventTarget} - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - * @api public - */ -class EventSource extends EventTarget { - #events = { - open: null, - error: null, - message: null - } - - #url = null - #withCredentials = false - - #readyState = CONNECTING - - #request = null - #controller = null - - #dispatcher - - /** - * @type {import('./eventsource-stream').eventSourceSettings} - */ - #state - - /** - * Creates a new EventSource object. - * @param {string} url - * @param {EventSourceInit} [eventSourceInitDict] - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface - */ - constructor (url, eventSourceInitDict = {}) { - // 1. Let ev be a new EventSource object. - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'EventSource constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('EventSource is experimental, expect them to change at any time.', { - code: 'UNDICI-ES' - }) - } - - url = webidl.converters.USVString(url, prefix, 'url') - eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict') - - this.#dispatcher = eventSourceInitDict.dispatcher - this.#state = { - lastEventId: '', - reconnectionTime: defaultReconnectionTime - } - - // 2. Let settings be ev's relevant settings object. - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - const settings = environmentSettingsObject - - let urlRecord - - try { - // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings. - urlRecord = new URL(url, settings.settingsObject.baseUrl) - this.#state.origin = urlRecord.origin - } catch (e) { - // 4. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 5. Set ev's url to urlRecord. - this.#url = urlRecord.href - - // 6. Let corsAttributeState be Anonymous. - let corsAttributeState = ANONYMOUS - - // 7. If the value of eventSourceInitDict's withCredentials member is true, - // then set corsAttributeState to Use Credentials and set ev's - // withCredentials attribute to true. - if (eventSourceInitDict.withCredentials) { - corsAttributeState = USE_CREDENTIALS - this.#withCredentials = true - } - - // 8. Let request be the result of creating a potential-CORS request given - // urlRecord, the empty string, and corsAttributeState. - const initRequest = { - redirect: 'follow', - keepalive: true, - // @see https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attributes - mode: 'cors', - credentials: corsAttributeState === 'anonymous' - ? 'same-origin' - : 'omit', - referrer: 'no-referrer' - } - - // 9. Set request's client to settings. - initRequest.client = environmentSettingsObject.settingsObject - - // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list. - initRequest.headersList = [['accept', { name: 'accept', value: 'text/event-stream' }]] - - // 11. Set request's cache mode to "no-store". - initRequest.cache = 'no-store' - - // 12. Set request's initiator type to "other". - initRequest.initiator = 'other' - - initRequest.urlList = [new URL(this.#url)] - - // 13. Set ev's request to request. - this.#request = makeRequest(initRequest) - - this.#connect() - } - - /** - * Returns the state of this EventSource object's connection. It can have the - * values described below. - * @returns {0|1|2} - * @readonly - */ - get readyState () { - return this.#readyState - } - - /** - * Returns the URL providing the event stream. - * @readonly - * @returns {string} - */ - get url () { - return this.#url - } - - /** - * Returns a boolean indicating whether the EventSource object was - * instantiated with CORS credentials set (true), or not (false, the default). - */ - get withCredentials () { - return this.#withCredentials - } - - #connect () { - if (this.#readyState === CLOSED) return - - this.#readyState = CONNECTING - - const fetchParams = { - request: this.#request, - dispatcher: this.#dispatcher - } - - // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. - const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() - } - - this.#reconnect() - } - - // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... - fetchParams.processResponseEndOfBody = processEventSourceEndOfBody - - // and processResponse set to the following steps given response res: - fetchParams.processResponse = (response) => { - // 1. If res is an aborted network error, then fail the connection. - - if (isNetworkError(response)) { - // 1. When a user agent is to fail the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to CLOSED - // and fires an event named error at the EventSource object. Once the - // user agent has failed the connection, it does not attempt to - // reconnect. - if (response.aborted) { - this.close() - this.dispatchEvent(new Event('error')) - return - // 2. Otherwise, if res is a network error, then reestablish the - // connection, unless the user agent knows that to be futile, in - // which case the user agent may fail the connection. - } else { - this.#reconnect() - return - } - } - - // 3. Otherwise, if res's status is not 200, or if res's `Content-Type` - // is not `text/event-stream`, then fail the connection. - const contentType = response.headersList.get('content-type', true) - const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure' - const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream' - if ( - response.status !== 200 || - contentTypeValid === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - return - } - - // 4. Otherwise, announce the connection and interpret res's body - // line by line. - - // When a user agent is to announce the connection, the user agent - // must queue a task which, if the readyState attribute is set to a - // value other than CLOSED, sets the readyState attribute to OPEN - // and fires an event named open at the EventSource object. - // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - this.#readyState = OPEN - this.dispatchEvent(new Event('open')) - - // If redirected to a different origin, set the origin to the new origin. - this.#state.origin = response.urlList[response.urlList.length - 1].origin - - const eventSourceStream = new EventSourceStream({ - eventSourceSettings: this.#state, - push: (event) => { - this.dispatchEvent(createFastMessageEvent( - event.type, - event.options - )) - } - }) - - pipeline(response.body.stream, - eventSourceStream, - (error) => { - if ( - error?.aborted === false - ) { - this.close() - this.dispatchEvent(new Event('error')) - } - }) - } - - this.#controller = fetching(fetchParams) - } - - /** - * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model - * @returns {Promise} - */ - async #reconnect () { - // When a user agent is to reestablish the connection, the user agent must - // run the following steps. These steps are run in parallel, not as part of - // a task. (The tasks that it queues, of course, are run like normal tasks - // and not themselves in parallel.) - - // 1. Queue a task to run the following steps: - - // 1. If the readyState attribute is set to CLOSED, abort the task. - if (this.#readyState === CLOSED) return - - // 2. Set the readyState attribute to CONNECTING. - this.#readyState = CONNECTING - - // 3. Fire an event named error at the EventSource object. - this.dispatchEvent(new Event('error')) - - // 2. Wait a delay equal to the reconnection time of the event source. - await delay(this.#state.reconnectionTime) - - // 5. Queue a task to run the following steps: - - // 1. If the EventSource object's readyState attribute is not set to - // CONNECTING, then return. - if (this.#readyState !== CONNECTING) return - - // 2. Let request be the EventSource object's request. - // 3. If the EventSource object's last event ID string is not the empty - // string, then: - // 1. Let lastEventIDValue be the EventSource object's last event ID - // string, encoded as UTF-8. - // 2. Set (`Last-Event-ID`, lastEventIDValue) in request's header - // list. - if (this.#state.lastEventId.length) { - this.#request.headersList.set('last-event-id', this.#state.lastEventId, true) - } - - // 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section. - this.#connect() - } - - /** - * Closes the connection, if any, and sets the readyState attribute to - * CLOSED. - */ - close () { - webidl.brandCheck(this, EventSource) - - if (this.#readyState === CLOSED) return - this.#readyState = CLOSED - this.#controller.abort() - this.#request = null - } - - get onopen () { - return this.#events.open - } - - set onopen (fn) { - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onmessage () { - return this.#events.message - } - - set onmessage (fn) { - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get onerror () { - return this.#events.error - } - - set onerror (fn) { - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } -} - -const constantsPropertyDescriptors = { - CONNECTING: { - __proto__: null, - configurable: false, - enumerable: true, - value: CONNECTING, - writable: false - }, - OPEN: { - __proto__: null, - configurable: false, - enumerable: true, - value: OPEN, - writable: false - }, - CLOSED: { - __proto__: null, - configurable: false, - enumerable: true, - value: CLOSED, - writable: false - } -} - -Object.defineProperties(EventSource, constantsPropertyDescriptors) -Object.defineProperties(EventSource.prototype, constantsPropertyDescriptors) - -Object.defineProperties(EventSource.prototype, { - close: kEnumerableProperty, - onerror: kEnumerableProperty, - onmessage: kEnumerableProperty, - onopen: kEnumerableProperty, - readyState: kEnumerableProperty, - url: kEnumerableProperty, - withCredentials: kEnumerableProperty -}) - -webidl.converters.EventSourceInitDict = webidl.dictionaryConverter([ - { - key: 'withCredentials', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'dispatcher', // undici only - converter: webidl.converters.any - } -]) - -module.exports = { - EventSource, - defaultReconnectionTime -} - - -/***/ }), - -/***/ 3441: -/***/ ((module) => { - - - -/** - * Checks if the given value is a valid LastEventId. - * @param {string} value - * @returns {boolean} - */ -function isValidLastEventId (value) { - // LastEventId should not contain U+0000 NULL - return value.indexOf('\u0000') === -1 -} - -/** - * Checks if the given value is a base 10 digit. - * @param {string} value - * @returns {boolean} - */ -function isASCIINumber (value) { - if (value.length === 0) return false - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 0x30 || value.charCodeAt(i) > 0x39) return false - } - return true -} - -// https://github.com/nodejs/undici/issues/2664 -function delay (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms).unref() - }) -} - -module.exports = { - isValidLastEventId, - isASCIINumber, - delay -} - - -/***/ }), - -/***/ 1858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const util = __nccwpck_require__(8106) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody, - extractMimeType, - utf8DecodeBytes -} = __nccwpck_require__(1214) -const { FormData } = __nccwpck_require__(9976) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { Blob } = __nccwpck_require__(4573) -const assert = __nccwpck_require__(4589) -const { isErrored, isDisturbed } = __nccwpck_require__(7075) -const { isArrayBuffer } = __nccwpck_require__(3429) -const { serializeAMimeType } = __nccwpck_require__(8094) -const { multipartFormDataParser } = __nccwpck_require__(4950) -let random - -try { - const crypto = __nccwpck_require__(7598) - random = (max) => crypto.randomInt(0, max) -} catch { - random = (max) => Math.floor(Math.random(max)) -} - -const textEncoder = new TextEncoder() -function noop () {} - -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 -let streamRegistry - -if (hasFinalizationRegistry) { - streamRegistry = new FinalizationRegistry((weakRef) => { - const stream = weakRef.deref() - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) { - stream.cancel('Response object has been garbage collected').catch(noop) - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - // 1. Let stream be null. - let stream = null - - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream with byte reading support. - stream = new ReadableStream({ - async pull (controller) { - const buffer = typeof source === 'string' ? textEncoder.encode(source) : source - - if (buffer.byteLength) { - controller.enqueue(buffer) - } - - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: 'bytes' - }) - } - - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) - - // 6. Let action be null. - let action = null - - // 7. Let source be null. - let source = null - - // 8. Let length be null. - let length = null - - // 9. Let type be null. - let type = null - - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object - - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams - - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 - - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() - - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView - - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` - - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') - - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. - - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false - - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } - - // CRLF is appended to the body to function with legacy servers and match other implementations. - // https://github.com/curl/curl/blob/3434c6b46e682452973972e8313613dfa58cd690/lib/mime.c#L1029-L1030 - // https://github.com/form-data/form-data/issues/63 - const chunk = textEncoder.encode(`--${boundary}--\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = `multipart/form-data; boundary=${boundary}` - } else if (isBlobLike(object)) { - // Blob - - // Set source to object. - source = object - - // Set length to object’s size. - length = object.size - - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } - - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } - - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - controller.byobRequest?.respond(0) - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - const buffer = new Uint8Array(value) - if (buffer.byteLength) { - controller.enqueue(buffer) - } - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: 'bytes' - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } - - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function cloneBody (instance, body) { - // To clone a body body, run these steps: - - // https://fetch.spec.whatwg.org/#concept-body-clone - - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - - // 2. Set body’s stream to out1. - body.stream = out1 - - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: out2, - length: body.length, - source: body.source - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') - } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return consumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - - if (mimeType === null) { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, - - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, - - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return consumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return consumeBody(this, parseJSONFromBytes, instance) - }, - - formData () { - // The formData() method steps are to return the result of running - // consume body with this and the following step given a byte sequence bytes: - return consumeBody(this, (value) => { - // 1. Let mimeType be the result of get the MIME type with this. - const mimeType = bodyMimeType(this) - - // 2. If mimeType is non-null, then switch on mimeType’s essence and run - // the corresponding steps: - if (mimeType !== null) { - switch (mimeType.essence) { - case 'multipart/form-data': { - // 1. ... [long step] - const parsed = multipartFormDataParser(value, mimeType) - - // 2. If that fails for some reason, then throw a TypeError. - if (parsed === 'failure') { - throw new TypeError('Failed to parse body as FormData.') - } - - // 3. Return a new FormData object, appending each entry, - // resulting from the parsing operation, to its entry list. - const fd = new FormData() - fd[kState] = parsed - - return fd - } - case 'application/x-www-form-urlencoded': { - // 1. Let entries be the result of parsing bytes. - const entries = new URLSearchParams(value.toString()) - - // 2. If entries is failure, then throw a TypeError. - - // 3. Return a new FormData object whose entry list is entries. - const fd = new FormData() - - for (const [name, value] of entries) { - fd.append(name, value) - } - - return fd - } - } - } - - // 3. Throw a TypeError. - throw new TypeError( - 'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".' - ) - }, instance) - }, - - bytes () { - // The bytes() method steps are to return the result of running consume body - // with this and the following step given a byte sequence bytes: return the - // result of creating a Uint8Array from bytes in this’s relevant realm. - return consumeBody(this, (bytes) => { - return new Uint8Array(bytes) - }, instance) - } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function consumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object)) { - throw new TypeError('Body is unusable: Body has already been read') - } - - throwIfAborted(object[kState]) - - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } - } - - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(Buffer.allocUnsafe(0)) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (object) { - const body = object[kState].body - - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} requestOrResponse - */ -function bodyMimeType (requestOrResponse) { - // 1. Let headers be null. - // 2. If requestOrResponse is a Request object, then set headers to requestOrResponse’s request’s header list. - // 3. Otherwise, set headers to requestOrResponse’s response’s header list. - /** @type {import('./headers').HeadersList} */ - const headers = requestOrResponse[kState].headersList - - // 4. Let mimeType be the result of extracting a MIME type from headers. - const mimeType = extractMimeType(headers) - - // 5. If mimeType is failure, then return null. - if (mimeType === 'failure') { - return null - } - - // 6. Return mimeType. - return mimeType -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody, - streamRegistry, - hasFinalizationRegistry, - bodyUnusable -} - - -/***/ }), - -/***/ 5105: -/***/ ((module) => { - - - -const corsSafeListedMethods = /** @type {const} */ (['GET', 'HEAD', 'POST']) -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = /** @type {const} */ ([101, 204, 205, 304]) - -const redirectStatus = /** @type {const} */ ([301, 302, 303, 307, 308]) -const redirectStatusSet = new Set(redirectStatus) - -/** - * @see https://fetch.spec.whatwg.org/#block-bad-port - */ -const badPorts = /** @type {const} */ ([ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '4190', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6679', - '6697', '10080' -]) -const badPortsSet = new Set(badPorts) - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#referrer-policies - */ -const referrerPolicy = /** @type {const} */ ([ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -]) -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = /** @type {const} */ (['follow', 'manual', 'error']) - -const safeMethods = /** @type {const} */ (['GET', 'HEAD', 'OPTIONS', 'TRACE']) -const safeMethodsSet = new Set(safeMethods) - -const requestMode = /** @type {const} */ (['navigate', 'same-origin', 'no-cors', 'cors']) - -const requestCredentials = /** @type {const} */ (['omit', 'same-origin', 'include']) - -const requestCache = /** @type {const} */ ([ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -]) - -/** - * @see https://fetch.spec.whatwg.org/#request-body-header-name - */ -const requestBodyHeader = /** @type {const} */ ([ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -]) - -/** - * @see https://fetch.spec.whatwg.org/#enumdef-requestduplex - */ -const requestDuplex = /** @type {const} */ ([ - 'half' -]) - -/** - * @see http://fetch.spec.whatwg.org/#forbidden-method - */ -const forbiddenMethods = /** @type {const} */ (['CONNECT', 'TRACE', 'TRACK']) -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = /** @type {const} */ ([ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -]) -const subresourceSet = new Set(subresource) - -module.exports = { - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 8094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const assert = __nccwpck_require__(4589) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/ // eslint-disable-line -const ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') - - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) - - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - - // 4. Let position point at the start of input. - const position = { position: 0 } - - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) - - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } - - // 8. Advance position by 1. - position.position++ - - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) - - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) - - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } - - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) - - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') - - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } - - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } - - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } - - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } - - const href = url.href - const hashLength = url.hash.length - - const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength) - - if (!hashLength && href.endsWith('#')) { - return serialized.slice(0, -1) - } - - return serialized -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' - - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] - - // 2. Advance position by 1. - position.position++ - } - - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position - - if (idx === -1) { - position.position = input.length - return input.slice(start) - } - - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -/** - * @param {number} byte - */ -function isHexCharByte (byte) { - // 0-9 A-F a-f - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || (byte >= 0x61 && byte <= 0x66) -} - -/** - * @param {number} byte - */ -function hexByteToNumber (byte) { - return ( - // 0-9 - byte >= 0x30 && byte <= 0x39 - ? (byte - 48) - // Convert to uppercase - // ((byte & 0xDF) - 65) + 10 - : ((byte & 0xDF) - 55) - ) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - const length = input.length - // 1. Let output be an empty byte sequence. - /** @type {Uint8Array} */ - const output = new Uint8Array(length) - let j = 0 - // 2. For each byte byte in input: - for (let i = 0; i < length; ++i) { - const byte = input[i] - - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output[j++] = byte - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2])) - ) { - output[j++] = 0x25 - - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - // 2. Append a byte whose value is bytePoint to output. - output[j++] = (hexByteToNumber(input[i + 1]) << 4) | hexByteToNumber(input[i + 2]) - - // 3. Skip the next two bytes in input. - i += 2 - } - } - - // 3. Return output. - return length === j ? output : output.subarray(0, j) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) - - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) - - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } - - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } - - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) - - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } - - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) - - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) - - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() - - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } - - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } - - // 7. Let parameterValue be null. - let parameterValue = null - - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } - - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } - } - - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(ASCII_WHITESPACE_REPLACE_REGEX, '') // eslint-disable-line - - let dataLength = data.length - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (dataLength % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - if (data.charCodeAt(dataLength - 1) === 0x003D) { - --dataLength - } - } - } - - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (dataLength % 4 === 1) { - return 'failure' - } - - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return 'failure' - } - - const buffer = Buffer.from(data, 'base64') - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength) -} - -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) - - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } - - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] - - // 4. Advance position by 1. - position.position++ - - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } - - // 2. Append the code point at position within input to value. - value += input[position.position] - - // 3. Advance position by 1. - position.position++ - - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - break - } - } - - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } - - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) -} - -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name - - // 3. Append U+003D (=) to serialization. - serialization += '=' - - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurrence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') - - // 2. Prepend U+0022 (") to value. - value = '"' + value - - // 3. Append U+0022 (") to value. - value += '"' - } - - // 5. Append value to serialization. - serialization += value - } - - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {number} char - */ -function isHTTPWhiteSpace (char) { - // "\r\n\t " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isHTTPWhiteSpace) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {number} char - */ -function isASCIIWhitespace (char) { - // "\r\n\t\f " - return char === 0x00d || char === 0x00a || char === 0x009 || char === 0x00c || char === 0x020 -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - * @param {string} str - * @param {boolean} [leading=true] - * @param {boolean} [trailing=true] - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - return removeChars(str, leading, trailing, isASCIIWhitespace) -} - -/** - * @param {string} str - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns - */ -function removeChars (str, leading, trailing, predicate) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail-- - } - - return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {Uint8Array} input - * @returns {string} - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - const length = input.length - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input) - } - let result = ''; let i = 0 - let addition = (2 << 15) - 1 - while (i < length) { - if (i + addition > length) { - addition = length - i - } - result += String.fromCharCode.apply(null, input.subarray(i, i += addition)) - } - return result -} - -/** - * @see https://mimesniff.spec.whatwg.org/#minimize-a-supported-mime-type - * @param {Exclude, 'failure'>} mimeType - */ -function minimizeSupportedMimeType (mimeType) { - switch (mimeType.essence) { - case 'application/ecmascript': - case 'application/javascript': - case 'application/x-ecmascript': - case 'application/x-javascript': - case 'text/ecmascript': - case 'text/javascript': - case 'text/javascript1.0': - case 'text/javascript1.1': - case 'text/javascript1.2': - case 'text/javascript1.3': - case 'text/javascript1.4': - case 'text/javascript1.5': - case 'text/jscript': - case 'text/livescript': - case 'text/x-ecmascript': - case 'text/x-javascript': - // 1. If mimeType is a JavaScript MIME type, then return "text/javascript". - return 'text/javascript' - case 'application/json': - case 'text/json': - // 2. If mimeType is a JSON MIME type, then return "application/json". - return 'application/json' - case 'image/svg+xml': - // 3. If mimeType’s essence is "image/svg+xml", then return "image/svg+xml". - return 'image/svg+xml' - case 'text/xml': - case 'application/xml': - // 4. If mimeType is an XML MIME type, then return "application/xml". - return 'application/xml' - } - - // 2. If mimeType is a JSON MIME type, then return "application/json". - if (mimeType.subtype.endsWith('+json')) { - return 'application/json' - } - - // 4. If mimeType is an XML MIME type, then return "application/xml". - if (mimeType.subtype.endsWith('+xml')) { - return 'application/xml' - } - - // 5. If mimeType is supported by the user agent, then return mimeType’s essence. - // Technically, node doesn't support any mimetypes. - - // 6. Return the empty string. - return '' -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType, - removeChars, - removeHTTPWhitespace, - minimizeSupportedMimeType, - HTTP_TOKEN_CODEPOINTS, - isomorphicDecode -} - - -/***/ }), - -/***/ 5735: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kConnected, kSize } = __nccwpck_require__(5953) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - -module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { WeakRef, FinalizationRegistry } -} - - -/***/ }), - -/***/ 756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Blob, File } = __nccwpck_require__(4573) -const { kState } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) - -// TODO(@KhafraDev): remove -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: - - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type - - // 2. Convert every character in t to ASCII lowercase. - // TODO - - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() - - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. - - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (object instanceof File) || - ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { FileLike, isFileLike } - - -/***/ }), - -/***/ 4950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isUSVString, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { utf8DecodeBytes } = __nccwpck_require__(1214) -const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = __nccwpck_require__(8094) -const { isFileLike } = __nccwpck_require__(756) -const { makeEntry } = __nccwpck_require__(9976) -const assert = __nccwpck_require__(4589) -const { File: NodeFile } = __nccwpck_require__(4573) - -const File = globalThis.File ?? NodeFile - -const formDataNameBuffer = Buffer.from('form-data; name="') -const filenameBuffer = Buffer.from('; filename') -const dd = Buffer.from('--') -const ddcrlf = Buffer.from('--\r\n') - -/** - * @param {string} chars - */ -function isAsciiString (chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~0x7F) !== 0) { - return false - } - } - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-boundary - * @param {string} boundary - */ -function validateBoundary (boundary) { - const length = boundary.length - - // - its length is greater or equal to 27 and lesser or equal to 70, and - if (length < 27 || length > 70) { - return false - } - - // - it is composed by bytes in the ranges 0x30 to 0x39, 0x41 to 0x5A, or - // 0x61 to 0x7A, inclusive (ASCII alphanumeric), or which are 0x27 ('), - // 0x2D (-) or 0x5F (_). - for (let i = 0; i < length; ++i) { - const cp = boundary.charCodeAt(i) - - if (!( - (cp >= 0x30 && cp <= 0x39) || - (cp >= 0x41 && cp <= 0x5a) || - (cp >= 0x61 && cp <= 0x7a) || - cp === 0x27 || - cp === 0x2d || - cp === 0x5f - )) { - return false - } - } - - return true -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#multipart-form-data-parser - * @param {Buffer} input - * @param {ReturnType} mimeType - */ -function multipartFormDataParser (input, mimeType) { - // 1. Assert: mimeType’s essence is "multipart/form-data". - assert(mimeType !== 'failure' && mimeType.essence === 'multipart/form-data') - - const boundaryString = mimeType.parameters.get('boundary') - - // 2. If mimeType’s parameters["boundary"] does not exist, return failure. - // Otherwise, let boundary be the result of UTF-8 decoding mimeType’s - // parameters["boundary"]. - if (boundaryString === undefined) { - return 'failure' - } - - const boundary = Buffer.from(`--${boundaryString}`, 'utf8') - - // 3. Let entry list be an empty entry list. - const entryList = [] - - // 4. Let position be a pointer to a byte in input, initially pointing at - // the first byte. - const position = { position: 0 } - - // Note: undici addition, allows leading and trailing CRLFs. - while (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - position.position += 2 - } - - let trailing = input.length - - while (input[trailing - 1] === 0x0a && input[trailing - 2] === 0x0d) { - trailing -= 2 - } - - if (trailing !== input.length) { - input = input.subarray(0, trailing) - } - - // 5. While true: - while (true) { - // 5.1. If position points to a sequence of bytes starting with 0x2D 0x2D - // (`--`) followed by boundary, advance position by 2 + the length of - // boundary. Otherwise, return failure. - // Note: boundary is padded with 2 dashes already, no need to add 2. - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length - } else { - return 'failure' - } - - // 5.2. If position points to the sequence of bytes 0x2D 0x2D 0x0D 0x0A - // (`--` followed by CR LF) followed by the end of input, return entry list. - // Note: a body does NOT need to end with CRLF. It can end with --. - if ( - (position.position === input.length - 2 && bufferStartsWith(input, dd, position)) || - (position.position === input.length - 4 && bufferStartsWith(input, ddcrlf, position)) - ) { - return entryList - } - - // 5.3. If position does not point to a sequence of bytes starting with 0x0D - // 0x0A (CR LF), return failure. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } - - // 5.4. Advance position by 2. (This skips past the newline.) - position.position += 2 - - // 5.5. Let name, filename and contentType be the result of parsing - // multipart/form-data headers on input and position, if the result - // is not failure. Otherwise, return failure. - const result = parseMultipartFormDataHeaders(input, position) - - if (result === 'failure') { - return 'failure' - } - - let { name, filename, contentType, encoding } = result - - // 5.6. Advance position by 2. (This skips past the empty line that marks - // the end of the headers.) - position.position += 2 - - // 5.7. Let body be the empty byte sequence. - let body - - // 5.8. Body loop: While position is not past the end of input: - // TODO: the steps here are completely wrong - { - const boundaryIndex = input.indexOf(boundary.subarray(2), position.position) - - if (boundaryIndex === -1) { - return 'failure' - } - - body = input.subarray(position.position, boundaryIndex - 4) - - position.position += body.length - - // Note: position must be advanced by the body's length before being - // decoded, otherwise the parsing will fail. - if (encoding === 'base64') { - body = Buffer.from(body.toString(), 'base64') - } - } - - // 5.9. If position does not point to a sequence of bytes starting with - // 0x0D 0x0A (CR LF), return failure. Otherwise, advance position by 2. - if (input[position.position] !== 0x0d || input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - - // 5.10. If filename is not null: - let value - - if (filename !== null) { - // 5.10.1. If contentType is null, set contentType to "text/plain". - contentType ??= 'text/plain' - - // 5.10.2. If contentType is not an ASCII string, set contentType to the empty string. - - // Note: `buffer.isAscii` can be used at zero-cost, but converting a string to a buffer is a high overhead. - // Content-Type is a relatively small string, so it is faster to use `String#charCodeAt`. - if (!isAsciiString(contentType)) { - contentType = '' - } - - // 5.10.3. Let value be a new File object with name filename, type contentType, and body body. - value = new File([body], filename, { type: contentType }) - } else { - // 5.11. Otherwise: - - // 5.11.1. Let value be the UTF-8 decoding without BOM of body. - value = utf8DecodeBytes(Buffer.from(body)) - } - - // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || isFileLike(value)) - - // 5.13. Create an entry with name and value, and append it to entry list. - entryList.push(makeEntry(name, value, filename)) - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-multipart-form-data-headers - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataHeaders (input, position) { - // 1. Let name, filename and contentType be null. - let name = null - let filename = null - let contentType = null - let encoding = null - - // 2. While true: - while (true) { - // 2.1. If position points to a sequence of bytes starting with 0x0D 0x0A (CR LF): - if (input[position.position] === 0x0d && input[position.position + 1] === 0x0a) { - // 2.1.1. If name is null, return failure. - if (name === null) { - return 'failure' - } - - // 2.1.2. Return name, filename and contentType. - return { name, filename, contentType, encoding } - } - - // 2.2. Let header name be the result of collecting a sequence of bytes that are - // not 0x0A (LF), 0x0D (CR) or 0x3A (:), given position. - let headerName = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x3a, - input, - position - ) - - // 2.3. Remove any HTTP tab or space bytes from the start or end of header name. - headerName = removeChars(headerName, true, true, (char) => char === 0x9 || char === 0x20) - - // 2.4. If header name does not match the field-name token production, return failure. - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - return 'failure' - } - - // 2.5. If the byte at position is not 0x3A (:), return failure. - if (input[position.position] !== 0x3a) { - return 'failure' - } - - // 2.6. Advance position by 1. - position.position++ - - // 2.7. Collect a sequence of bytes that are HTTP tab or space bytes given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char === 0x20 || char === 0x09, - input, - position - ) - - // 2.8. Byte-lowercase header name and switch on the result: - switch (bufferToLowerCasedHeaderName(headerName)) { - case 'content-disposition': { - // 1. Set name and filename to null. - name = filename = null - - // 2. If position does not point to a sequence of bytes starting with - // `form-data; name="`, return failure. - if (!bufferStartsWith(input, formDataNameBuffer, position)) { - return 'failure' - } - - // 3. Advance position so it points at the byte after the next 0x22 (") - // byte (the one in the sequence of bytes matched above). - position.position += 17 - - // 4. Set name to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return - // failure. - name = parseMultipartFormDataName(input, position) - - if (name === null) { - return 'failure' - } - - // 5. If position points to a sequence of bytes starting with `; filename="`: - if (bufferStartsWith(input, filenameBuffer, position)) { - // Note: undici also handles filename* - let check = position.position + filenameBuffer.length - - if (input[check] === 0x2a) { - position.position += 1 - check += 1 - } - - if (input[check] !== 0x3d || input[check + 1] !== 0x22) { // =" - return 'failure' - } - - // 1. Advance position so it points at the byte after the next 0x22 (") byte - // (the one in the sequence of bytes matched above). - position.position += 12 - - // 2. Set filename to the result of parsing a multipart/form-data name given - // input and position, if the result is not failure. Otherwise, return failure. - filename = parseMultipartFormDataName(input, position) - - if (filename === null) { - return 'failure' - } - } - - break - } - case 'content-type': { - // 1. Let header value be the result of collecting a sequence of bytes that are - // not 0x0A (LF) or 0x0D (CR), given position. - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - // 2. Remove any HTTP tab or space bytes from the end of header value. - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - // 3. Set contentType to the isomorphic decoding of header value. - contentType = isomorphicDecode(headerValue) - - break - } - case 'content-transfer-encoding': { - let headerValue = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - - headerValue = removeChars(headerValue, false, true, (char) => char === 0x9 || char === 0x20) - - encoding = isomorphicDecode(headerValue) - - break - } - default: { - // Collect a sequence of bytes that are not 0x0A (LF) or 0x0D (CR), given position. - // (Do nothing with those bytes.) - collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d, - input, - position - ) - } - } - - // 2.9. If position does not point to a sequence of bytes starting with 0x0D 0x0A - // (CR LF), return failure. Otherwise, advance position by 2 (past the newline). - if (input[position.position] !== 0x0d && input[position.position + 1] !== 0x0a) { - return 'failure' - } else { - position.position += 2 - } - } -} - -/** - * @see https://andreubotella.github.io/multipart-form-data/#parse-a-multipart-form-data-name - * @param {Buffer} input - * @param {{ position: number }} position - */ -function parseMultipartFormDataName (input, position) { - // 1. Assert: The byte at (position - 1) is 0x22 ("). - assert(input[position.position - 1] === 0x22) - - // 2. Let name be the result of collecting a sequence of bytes that are not 0x0A (LF), 0x0D (CR) or 0x22 ("), given position. - /** @type {string | Buffer} */ - let name = collectASequenceOfBytes( - (char) => char !== 0x0a && char !== 0x0d && char !== 0x22, - input, - position - ) - - // 3. If the byte at position is not 0x22 ("), return failure. Otherwise, advance position by 1. - if (input[position.position] !== 0x22) { - return null // name could be 'failure' - } else { - position.position++ - } - - // 4. Replace any occurrence of the following subsequences in name with the given byte: - // - `%0A`: 0x0A (LF) - // - `%0D`: 0x0D (CR) - // - `%22`: 0x22 (") - name = new TextDecoder().decode(name) - .replace(/%0A/ig, '\n') - .replace(/%0D/ig, '\r') - .replace(/%22/g, '"') - - // 5. Return the UTF-8 decoding without BOM of name. - return name -} - -/** - * @param {(char: number) => boolean} condition - * @param {Buffer} input - * @param {{ position: number }} position - */ -function collectASequenceOfBytes (condition, input, position) { - let start = position.position - - while (start < input.length && condition(input[start])) { - ++start - } - - return input.subarray(position.position, (position.position = start)) -} - -/** - * @param {Buffer} buf - * @param {boolean} leading - * @param {boolean} trailing - * @param {(charCode: number) => boolean} predicate - * @returns {Buffer} - */ -function removeChars (buf, leading, trailing, predicate) { - let lead = 0 - let trail = buf.length - 1 - - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++ - } - - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail-- - } - - return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1) -} - -/** - * Checks if {@param buffer} starts with {@param start} - * @param {Buffer} buffer - * @param {Buffer} start - * @param {{ position: number }} position - */ -function bufferStartsWith (buffer, start, position) { - if (buffer.length < start.length) { - return false - } - - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false - } - } - - return true -} - -module.exports = { - multipartFormDataParser, - validateBoundary -} - - -/***/ }), - -/***/ 9976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { isBlobLike, iteratorMixin } = __nccwpck_require__(1214) -const { kState } = __nccwpck_require__(1597) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { FileLike, isFileLike } = __nccwpck_require__(756) -const { webidl } = __nccwpck_require__(6131) -const { File: NativeFile } = __nccwpck_require__(4573) -const nodeUtil = __nccwpck_require__(7975) - -/** @type {globalThis['File']} */ -const File = globalThis.File ?? NativeFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - webidl.util.markAsUncloneable(this) - - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) - } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.append' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'value', { strict: false }) - : webidl.converters.USVString(value, prefix, 'value') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'filename') - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.delete' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.get' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.getAll' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - - has (name) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.has' - webidl.argumentLengthCheck(arguments, 1, prefix) - - name = webidl.converters.USVString(name, prefix, 'name') - - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } - - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - const prefix = 'FormData.set' - webidl.argumentLengthCheck(arguments, 2, prefix) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name, prefix, 'name') - value = isBlobLike(value) - ? webidl.converters.Blob(value, prefix, 'name', { strict: false }) - : webidl.converters.USVString(value, prefix, 'name') - filename = arguments.length === 3 - ? webidl.converters.USVString(filename, prefix, 'name') - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) - - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } - } - - [nodeUtil.inspect.custom] (depth, options) { - const state = this[kState].reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value) - } else { - a[b.name] = [a[b.name], b.value] - } - } else { - a[b.name] = b.value - } - - return a - }, { __proto__: null }) - - options.depth ??= depth - options.colors ??= true - - const output = nodeUtil.formatWithOptions(options, state) - - // remove [Object null prototype] - return `FormData ${output.slice(output.indexOf(']') + 2)}` - } -} - -iteratorMixin('FormData', FormData, kState, 'name', 'value') - -Object.defineProperties(FormData.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - getAll: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) - -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // Note: This operation was done by the webidl converter USVString. - - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - // Note: This operation was done by the webidl converter USVString. - } else { - // 3. Otherwise: - - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } - - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - - value = value instanceof NativeFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } - - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData, makeEntry } - - -/***/ }), - -/***/ 3701: -/***/ ((module) => { - - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - - return - } - - const parsedURL = new URL(newOrigin) - - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } - - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 9822: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kConstruct } = __nccwpck_require__(5953) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { - iteratorMixin, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(1214) -const { webidl } = __nccwpck_require__(6131) -const assert = __nccwpck_require__(4589) -const util = __nccwpck_require__(7975) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - // Note: undici does not implement forbidden header names - if (getHeadersGuard(headers) === 'immutable') { - throw new TypeError('immutable') - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - return getHeadersList(headers).append(name, value, false) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -function compareHeaderName (a, b) { - return a[0] < b[0] ? -1 : 1 -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } - } - - /** - * @see https://fetch.spec.whatwg.org/#header-list-contains - * @param {string} name - * @param {boolean} isLowerCase - */ - contains (name, isLowerCase) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - - return this[kHeadersMap].has(isLowerCase ? name : name.toLowerCase()) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-append - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - append (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = isLowerCase ? name : name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - (this.cookies ??= []).push(value) - } - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-set - * @param {string} name - * @param {string} value - * @param {boolean} isLowerCase - */ - set (name, value, isLowerCase) { - this[kHeadersSortedMap] = null - const lowercaseName = isLowerCase ? name : name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } - - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-delete - * @param {string} name - * @param {boolean} isLowerCase - */ - delete (name, isLowerCase) { - this[kHeadersSortedMap] = null - if (!isLowerCase) name = name.toLowerCase() - - if (name === 'set-cookie') { - this.cookies = null - } - - this[kHeadersMap].delete(name) - } - - /** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get - * @param {string} name - * @param {boolean} isLowerCase - * @returns {string | null} - */ - get (name, isLowerCase) { - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(isLowerCase ? name : name.toLowerCase())?.value ?? null - } - - * [Symbol.iterator] () { - // use the lowercased name - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - yield [name, value] - } - } - - get entries () { - const headers = {} - - if (this[kHeadersMap].size !== 0) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } - - return headers - } - - rawValues () { - return this[kHeadersMap].values() - } - - get entriesList () { - const headers = [] - - if (this[kHeadersMap].size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this[kHeadersMap]) { - if (lowerName === 'set-cookie') { - for (const cookie of this.cookies) { - headers.push([name, cookie]) - } - } else { - headers.push([name, value]) - } - } - } - - return headers - } - - // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set - toSortedArray () { - const size = this[kHeadersMap].size - const array = new Array(size) - // In most cases, you will use the fast-path. - // fast-path: Use binary insertion sort for small arrays. - if (size <= 32) { - if (size === 0) { - // If empty, it is an empty array. To avoid the first index assignment. - return array - } - // Improve performance by unrolling loop and avoiding double-loop. - // Double-loop-less version of the binary insertion sort. - const iterator = this[kHeadersMap][Symbol.iterator]() - const firstValue = iterator.next().value - // set [name, value] to first index. - array[0] = [firstValue[0], firstValue[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(firstValue[1].value !== null) - for ( - let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; - i < size; - ++i - ) { - // get next value - value = iterator.next().value - // set [name, value] to current index. - x = array[i] = [value[0], value[1].value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(x[1] !== null) - left = 0 - right = i - // binary search - while (left < right) { - // middle index - pivot = left + ((right - left) >> 1) - // compare header name - if (array[pivot][0] <= x[0]) { - left = pivot + 1 - } else { - right = pivot - } - } - if (i !== pivot) { - j = i - while (j > left) { - array[j] = array[--j] - } - array[left] = x - } - } - /* c8 ignore next 4 */ - if (!iterator.next().done) { - // This is for debugging and will never be called. - throw new TypeError('Unreachable') - } - return array - } else { - // This case would be a rare occurrence. - // slow-path: fallback - let i = 0 - for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array[i++] = [name, value] - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - // 3.2.2. Assert: value is non-null. - assert(value !== null) - } - return array.sort(compareHeaderName) - } - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - #guard - #headersList - - constructor (init = undefined) { - webidl.util.markAsUncloneable(this) - - if (init === kConstruct) { - return - } - - this.#headersList = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this.#guard = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init, 'Headers contructor', 'init') - fill(this, init) - } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.append') - - const prefix = 'Headers.append' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.delete') - - const prefix = 'Headers.delete' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } - - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 6. If this’s header list does not contain name, then - // return. - if (!this.#headersList.contains(name, false)) { - return - } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this.#headersList.delete(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.get') - - const prefix = 'Headers.get' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return the result of getting name from this’s header - // list. - return this.#headersList.get(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, 'Headers.has') - - const prefix = 'Headers.has' - name = webidl.converters.ByteString(name, prefix, 'name') - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this.#headersList.contains(name, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, 'Headers.set') - - const prefix = 'Headers.set' - name = webidl.converters.ByteString(name, prefix, 'name') - value = webidl.converters.ByteString(value, prefix, 'value') - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: 'header value' - }) - } - - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this.#guard === 'immutable') { - throw new TypeError('immutable') - } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this.#headersList.set(name, value, false) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) - - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. - - const list = this.#headersList.cookies - - if (list) { - return [...list] - } - - return [] - } - - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this.#headersList[kHeadersSortedMap]) { - return this.#headersList[kHeadersSortedMap] - } - - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] - - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = this.#headersList.toSortedArray() - - const cookies = this.#headersList.cookies - - // fast-path - if (cookies === null || cookies.length === 1) { - // Note: The non-null assertion of value has already been done by `HeadersList#toSortedArray` - return (this.#headersList[kHeadersSortedMap] = names) - } - - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const { 0: name, 1: value } = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. - - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - // Note: This operation was done by `HeadersList#toSortedArray`. - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - // 4. Return headers. - return (this.#headersList[kHeadersSortedMap] = headers) - } - - [util.inspect.custom] (depth, options) { - options.depth ??= depth - - return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}` - } - - static getHeadersGuard (o) { - return o.#guard - } - - static setHeadersGuard (o, guard) { - o.#guard = guard - } - - static getHeadersList (o) { - return o.#headersList - } - - static setHeadersList (o, list) { - o.#headersList = list - } -} - -const { getHeadersGuard, setHeadersGuard, getHeadersList, setHeadersList } = Headers -Reflect.deleteProperty(Headers, 'getHeadersGuard') -Reflect.deleteProperty(Headers, 'setHeadersGuard') -Reflect.deleteProperty(Headers, 'getHeadersList') -Reflect.deleteProperty(Headers, 'setHeadersList') - -iteratorMixin('Headers', Headers, kHeadersSortedMap, 0, 1) - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - }, - [util.inspect.custom]: { - enumerable: false - } -}) - -webidl.converters.HeadersInit = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object') { - const iterator = Reflect.get(V, Symbol.iterator) - - // A work-around to ensure we send the properly-cased Headers when V is a Headers object. - // Read https://github.com/nodejs/undici/pull/3159#issuecomment-2075537226 before touching, please. - if (!util.types.isProxy(V) && iterator === Headers.prototype.entries) { // Headers object - try { - return getHeadersList(V).entriesList - } catch { - // fall-through - } - } - - if (typeof iterator === 'function') { - return webidl.converters['sequence>'](V, prefix, argument, iterator.bind(V)) - } - - return webidl.converters['record'](V, prefix, argument) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - // for test. - compareHeaderName, - Headers, - HeadersList, - getHeadersGuard, - setHeadersGuard, - setHeadersList, - getHeadersList -} - - -/***/ }), - -/***/ 4268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse, - fromInnerResponse -} = __nccwpck_require__(8661) -const { HeadersList } = __nccwpck_require__(9822) -const { Request, cloneRequest } = __nccwpck_require__(6465) -const zlib = __nccwpck_require__(8522) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme, - clampAndCoarsenConnectionTimingInfo, - simpleRangeHeaderValue, - buildContentRange, - createInflate, - extractMimeType -} = __nccwpck_require__(1214) -const { kState, kDispatcher } = __nccwpck_require__(1597) -const assert = __nccwpck_require__(4589) -const { safelyExtractBody, extractBody } = __nccwpck_require__(1858) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet -} = __nccwpck_require__(5105) -const EE = __nccwpck_require__(8474) -const { Readable, pipeline, finished } = __nccwpck_require__(7075) -const { addAbortListener, isErrored, isReadable, bufferToLowerCasedHeaderName } = __nccwpck_require__(8106) -const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = __nccwpck_require__(8094) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { webidl } = __nccwpck_require__(6131) -const { STATUS_CODES } = __nccwpck_require__(7067) -const GET_OR_HEAD = ['GET', 'HEAD'] - -const defaultUserAgent = typeof __UNDICI_IS_NODE__ !== 'undefined' || typeof esbuildDetection !== 'undefined' - ? 'node' - : 'undici' - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -function handleFetchDone (response) { - finalizeAndReportTiming(response, 'fetch') -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = undefined) { - webidl.argumentLengthCheck(arguments, 1, 'globalThis.fetch') - - // 1. Let p be a new promise. - let p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) - - const realResponse = responseObject?.deref() - - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, realResponse, requestObject.signal.reason) - } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - // see function handleFetchDone - - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: - - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return - } - - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. - - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return - } - - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject(new TypeError('fetch failed', { cause: response.error })) - return - } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new WeakRef(fromInnerResponse(response, 'immutable')) - - // 5. Resolve p with responseObject. - p.resolve(responseObject.deref()) - p = null - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: requestObject[kDispatcher] // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL.href, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -const markResourceTiming = performance.markResourceTiming - -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // 1. Reject promise with error. - if (p) { - // We might have already resolved the promise at this stage - p.reject(error) - } - - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher = getGlobalDispatcher() // undici -}) { - // Ensure that the dispatcher is set accordingly - assert(dispatcher) - - // 1. Let taskDestination be null. - let taskDestination = null - - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false - - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject - - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } - - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO - - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currentTime - }) - - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } - - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) - - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } - - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - request.origin = request.client.origin - } - - // 10. If all of the following conditions are true: - // TODO - - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept', true)) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value, true) - } - - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language', true)) { - request.headersList.append('accept-language', '*', true) - } - - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) - - // 17. Return fetchParam's controller - return fetchParams.controller -} - -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? - - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO - - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } - - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } - - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' - - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - - // 12. If recursive is true, then return response. - if (recursive) { - return response - } - - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } - - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } - - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } - - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO - - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range', true) - ) { - response = internalResponse = makeNetworkError() - } - - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) - - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = requestCurrentURL(request) - - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. - - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) - } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(4573).resolveObjectURL) - } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) - - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - - const blob = resolveObjectURL(blobURLEntry.toString()) - - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blob)) { - return Promise.resolve(makeNetworkError('invalid method')) - } - - // 3. Let blob be blobURLEntry’s object. - // Note: done above - - // 4. Let response be a new response. - const response = makeResponse() - - // 5. Let fullLength be blob’s size. - const fullLength = blob.size - - // 6. Let serializedFullLength be fullLength, serialized and isomorphic encoded. - const serializedFullLength = isomorphicEncode(`${fullLength}`) - - // 7. Let type be blob’s type. - const type = blob.type - - // 8. If request’s header list does not contain `Range`: - // 9. Otherwise: - if (!request.headersList.contains('range', true)) { - // 1. Let bodyWithType be the result of safely extracting blob. - // Note: in the FileAPI a blob "object" is a Blob *or* a MediaSource. - // In node, this can only ever be a Blob. Therefore we can safely - // use extractBody directly. - const bodyWithType = extractBody(blob) - - // 2. Set response’s status message to `OK`. - response.statusText = 'OK' - - // 3. Set response’s body to bodyWithType’s body. - response.body = bodyWithType[0] - - // 4. Set response’s header list to « (`Content-Length`, serializedFullLength), (`Content-Type`, type) ». - response.headersList.set('content-length', serializedFullLength, true) - response.headersList.set('content-type', type, true) - } else { - // 1. Set response’s range-requested flag. - response.rangeRequested = true - - // 2. Let rangeHeader be the result of getting `Range` from request’s header list. - const rangeHeader = request.headersList.get('range', true) - - // 3. Let rangeValue be the result of parsing a single range header value given rangeHeader and true. - const rangeValue = simpleRangeHeaderValue(rangeHeader, true) - - // 4. If rangeValue is failure, then return a network error. - if (rangeValue === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 5. Let (rangeStart, rangeEnd) be rangeValue. - let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue - - // 6. If rangeStart is null: - // 7. Otherwise: - if (rangeStart === null) { - // 1. Set rangeStart to fullLength − rangeEnd. - rangeStart = fullLength - rangeEnd - - // 2. Set rangeEnd to rangeStart + rangeEnd − 1. - rangeEnd = rangeStart + rangeEnd - 1 - } else { - // 1. If rangeStart is greater than or equal to fullLength, then return a network error. - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError('Range start is greater than the blob\'s size.')) - } - - // 2. If rangeEnd is null or rangeEnd is greater than or equal to fullLength, then set - // rangeEnd to fullLength − 1. - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1 - } - } - - // 8. Let slicedBlob be the result of invoking slice blob given blob, rangeStart, - // rangeEnd + 1, and type. - const slicedBlob = blob.slice(rangeStart, rangeEnd, type) - - // 9. Let slicedBodyWithType be the result of safely extracting slicedBlob. - // Note: same reason as mentioned above as to why we use extractBody - const slicedBodyWithType = extractBody(slicedBlob) - - // 10. Set response’s body to slicedBodyWithType’s body. - response.body = slicedBodyWithType[0] - - // 11. Let serializedSlicedLength be slicedBlob’s size, serialized and isomorphic encoded. - const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`) - - // 12. Let contentRange be the result of invoking build a content range given rangeStart, - // rangeEnd, and fullLength. - const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength) - - // 13. Set response’s status to 206. - response.status = 206 - - // 14. Set response’s status message to `Partial Content`. - response.statusText = 'Partial Content' - - // 15. Set response’s header list to « (`Content-Length`, serializedSlicedLength), - // (`Content-Type`, type), (`Content-Range`, contentRange) ». - response.headersList.set('content-length', serializedSlicedLength, true) - response.headersList.set('content-type', type, true) - response.headersList.set('content-range', contentRange, true) - } - - // 10. Return response. - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) - - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} - -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. Let timingInfo be fetchParams’s timing info. - let timingInfo = fetchParams.timingInfo - - // 2. If response is not a network error and fetchParams’s request’s client is a secure context, - // then set timingInfo’s server-timing headers to the result of getting, decoding, and splitting - // `Server-Timing` from response’s internal response’s header list. - // TODO - - // 3. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Let unsafeEndTime be the unsafe shared current time. - const unsafeEndTime = Date.now() // ? - - // 2. If fetchParams’s request’s destination is "document", then set fetchParams’s controller’s - // full timing info to fetchParams’s timing info. - if (fetchParams.request.destination === 'document') { - fetchParams.controller.fullTimingInfo = timingInfo - } - - // 3. Set fetchParams’s controller’s report timing steps to the following steps given a global object global: - fetchParams.controller.reportTimingSteps = () => { - // 1. If fetchParams’s request’s URL’s scheme is not an HTTP(S) scheme, then return. - if (fetchParams.request.url.protocol !== 'https:') { - return - } - - // 2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global. - timingInfo.endTime = unsafeEndTime - - // 3. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 4. Let bodyInfo be response’s body info. - const bodyInfo = response.bodyInfo - - // 5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an - // opaque timing info for timingInfo and set cacheState to the empty string. - if (!response.timingAllowPassed) { - timingInfo = createOpaqueTimingInfo(timingInfo) - - cacheState = '' - } - - // 6. Let responseStatus be 0. - let responseStatus = 0 - - // 7. If fetchParams’s request’s mode is not "navigate" or response’s has-cross-origin-redirects is false: - if (fetchParams.request.mode !== 'navigator' || !response.hasCrossOriginRedirects) { - // 1. Set responseStatus to response’s status. - responseStatus = response.status - - // 2. Let mimeType be the result of extracting a MIME type from response’s header list. - const mimeType = extractMimeType(response.headersList) - - // 3. If mimeType is not failure, then set bodyInfo’s content type to the result of minimizing a supported MIME type given mimeType. - if (mimeType !== 'failure') { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType) - } - } - - // 8. If fetchParams’s request’s initiator type is non-null, then mark resource timing given timingInfo, - // fetchParams’s request’s URL, fetchParams’s request’s initiator type, global, cacheState, bodyInfo, - // and responseStatus. - if (fetchParams.request.initiatorType != null) { - // TODO: update markresourcetiming - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus) - } - } - - // 4. Let processResponseEndOfBodyTask be the following steps: - const processResponseEndOfBodyTask = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true - - // 2. If fetchParams’s process response end-of-body is non-null, then run fetchParams’s process - // response end-of-body given response. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - - // 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s - // global object is fetchParams’s task destination, then run fetchParams’s controller’s report - // timing steps given fetchParams’s request’s client’s global object. - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps() - } - } - - // 5. Queue a fetch task to run processResponseEndOfBodyTask with fetchParams’s task destination - queueMicrotask(() => processResponseEndOfBodyTask()) - } - - // 4. If fetchParams’s process response is non-null, then queue a fetch task to run fetchParams’s - // process response given response, with fetchParams’s task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response) - fetchParams.processResponse = null - }) - } - - // 5. Let internalResponse be response, if response is a network error; otherwise response’s internal response. - const internalResponse = response.type === 'error' ? response : (response.internalResponse ?? response) - - // 6. If internalResponse’s body is null, then run processResponseEndOfBody. - // 7. Otherwise: - if (internalResponse.body == null) { - processResponseEndOfBody() - } else { - // mcollina: all the following steps of the specs are skipped. - // The internal transform stream is not needed. - // See https://github.com/nodejs/undici/pull/3093#issuecomment-2050198541 - - // 1. Let transformStream be a new TransformStream. - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, enqueues chunk in transformStream. - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm and flushAlgorithm - // set to processResponseEndOfBody. - // 4. Set internalResponse’s body’s stream to the result of internalResponse’s body’s stream piped through transformStream. - - finished(internalResponse.body.stream, () => { - processResponseEndOfBody() - }) - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null - - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } - - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy(undefined, false) - } - - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } - - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 10. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response - - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL - - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) - - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } - - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } - - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 - - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } - - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } - - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } - - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null - - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } - - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization', true) - - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) - - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie', true) - request.headersList.delete('host', true) - } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime - } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null - - // 4. Let response be null. - let response = null - - // 5. Let storedResponse be null. - // TODO: cache - - // 6. Let httpCache be null. - const httpCache = null - - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false - - // 8. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: - - // 1. Set httpRequest to a clone of request. - httpRequest = cloneRequest(request) - - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } - - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } - - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null - - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null - - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } - - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) - } - - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue, true) - } - - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. - - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } - - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href), true) - } - - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) - - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent', true)) { - httpRequest.headersList.append('user-agent', defaultUserAgent) - } - - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since', true) || - httpRequest.headersList.contains('if-none-match', true) || - httpRequest.headersList.contains('if-unmodified-since', true) || - httpRequest.headersList.contains('if-match', true) || - httpRequest.headersList.contains('if-range', true)) - ) { - httpRequest.cache = 'no-store' - } - - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control', true) - ) { - httpRequest.headersList.append('cache-control', 'max-age=0', true) - } - - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma', true)) { - httpRequest.headersList.append('pragma', 'no-cache', true) - } - - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control', true)) { - httpRequest.headersList.append('cache-control', 'no-cache', true) - } - } - - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range', true)) { - httpRequest.headersList.append('accept-encoding', 'identity', true) - } - - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding', true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate', true) - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate', true) - } - } - - httpRequest.headersList.delete('host', true) - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication - - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache - - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } - - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.cache !== 'no-store' && httpRequest.cache !== 'reload') { - // TODO: cache - } - - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO - - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.cache === 'only-if-cached') { - return makeNetworkError('only if cached') - } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) - - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } - - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse - - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } - } - - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] - - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range', true)) { - response.rangeRequested = true - } - - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials - - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO - - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() - } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? - - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } - - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: - - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) - } - - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. - - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() - - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } - - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err, abort = true) { - if (!this.destroyed) { - this.destroyed = true - if (abort) { - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } - } - - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null - - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } - - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO - - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars - - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: - - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. - - // 2. Otherwise, return a network error. - - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: - - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. Run this step in parallel: transmit bytes. - yield bytes - - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } - - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) - } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) - } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = async () => { - await fetchParams.controller.resume() - } - - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - // If the aborted fetch was already terminated, then we do not - // need to do anything. - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason) - } - } - - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO - - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO - - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with byte reading support with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm. - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - }, - type: 'bytes' - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream, source: null, length: null } - - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO - - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO - - // 18. If aborted, then: - // TODO - - // 19. Run these steps in parallel: - - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.onAborted = onAborted - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... - - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break - } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err - - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } - - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return - } - - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - const buffer = new Uint8Array(bytes) - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer) - } - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (fetchParams.controller.controller.desiredSize <= 0) { - return - } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } - - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - - // 20. Return response. - return response - - function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher - - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, - - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller - - // Set timingInfo’s final connection timing info to the result of calling clamp and coarsen - // connection timing info with connection’s timing info, timingInfo’s post-redirect start - // time, and fetchParams’s cross-origin isolated capability. - // TODO: implement connection timing - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability) - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - - // Set timingInfo’s final network-request start time to the coarsened shared current time given - // fetchParams’s cross-origin isolated capability. - timingInfo.finalNetworkRequestStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onResponseStarted () { - // Set timingInfo’s final network-response start time to the coarsened shared current - // time given fetchParams’s cross-origin isolated capability, immediately after the - // user agent’s HTTP parser receives the first byte of the response (e.g., frame header - // bytes for HTTP/2 or response status line for HTTP/1.x). - timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - }, - - onHeaders (status, rawHeaders, resume, statusText) { - if (status < 200) { - return - } - - let location = '' - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - location = headersList.get('location', true) - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = location && request.redirect === 'follow' && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - const contentEncoding = headersList.get('content-encoding', true) - // "All content-coding values are case-insensitive..." - /** @type {string[]} */ - const codings = contentEncoding ? contentEncoding.toLowerCase().split(',') : [] - - // Limit the number of content-encodings to prevent resource exhaustion. - // CVE fix similar to urllib3 (GHSA-gm62-xv2j-4w53) and curl (CVE-2022-32206). - const maxContentEncodings = 5 - if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)) - return true - } - - for (let i = codings.length - 1; i >= 0; --i) { - const coding = codings[i].trim() - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(createInflate({ - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress({ - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH - })) - } else { - decoders.length = 0 - break - } - } - } - - const onError = this.onError.bind(this) - - resolve({ - status, - statusText, - headersList, - body: decoders.length - ? pipeline(this.body, ...decoders, (err) => { - if (err) { - this.onError(err) - } - }).on('error', onError) - : this.body.on('error', onError) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - - // 1. If one or more bytes have been transmitted from response’s - // message body, then: - - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. - - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - - // 4. See pullAlgorithm... - - return this.body.push(bytes) - }, - - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - if (fetchParams.controller.onAborted) { - fetchParams.controller.off('terminated', fetchParams.controller.onAborted) - } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, rawHeaders, socket) { - if (status !== 101) { - return - } - - const headersList = new HeadersList() - - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString('latin1'), true) - } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList, - socket - }) - - return true - } - } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 6465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody, bodyUnusable } = __nccwpck_require__(1858) -const { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = __nccwpck_require__(9822) -const { FinalizationRegistry } = __nccwpck_require__(5735)() -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { - isValidHTTPToken, - sameOrigin, - environmentSettingsObject -} = __nccwpck_require__(1214) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(5105) -const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { kHeaders, kSignal, kState, kDispatcher } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(8474) - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -const dependentControllerMap = new WeakMap() - -function buildAbort (acRef) { - return abort - - function abort () { - const ac = acRef.deref() - if (ac !== undefined) { - // Currently, there is a problem with FinalizationRegistry. - // https://github.com/nodejs/node/issues/49344 - // https://github.com/nodejs/node/issues/47748 - // In the case of abort, the first step is to unregister from it. - // If the controller can refer to it, it is still registered. - // It will be removed in the future. - requestFinalizer.unregister(abort) - - // Unsubscribe a listener. - // FinalizationRegistry will no longer be called, so this must be done. - this.removeEventListener('abort', abort) - - ac.abort(this.reason) - - const controllerList = dependentControllerMap.get(ac.signal) - - if (controllerList !== undefined) { - if (controllerList.size !== 0) { - for (const ref of controllerList) { - const ctrl = ref.deref() - if (ctrl !== undefined) { - ctrl.abort(this.reason) - } - } - controllerList.clear() - } - dependentControllerMap.delete(ac.signal) - } - } - } -} - -let patchMethodWarning = false - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - webidl.util.markAsUncloneable(this) - if (input === kConstruct) { - return - } - - const prefix = 'Request constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - input = webidl.converters.RequestInfo(input, prefix, 'input') - init = webidl.converters.RequestInit(init, prefix, 'init') - - // 1. Let request be null. - let request = null - - // 2. Let fallbackMode be null. - let fallbackMode = null - - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = environmentSettingsObject.settingsObject.baseUrl - - // 4. Let signal be null. - let signal = null - - // 5. If input is a string, then: - if (typeof input === 'string') { - this[kDispatcher] = init.dispatcher - - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } - - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - this[kDispatcher] = init.dispatcher || input[kDispatcher] - - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = environmentSettingsObject.settingsObject.origin - - // 8. Let window be "client". - let window = 'client' - - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } - - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } - - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } - - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: environmentSettingsObject.settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) - - const initHasKey = Object.keys(init).length !== 0 - - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false - - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false - - // 4. Set request’s origin to "client". - request.origin = 'client' - - // 5. Set request’s referrer to "client" - request.referrer = 'client' - - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] - - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } - - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer - - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy - } - - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } - - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } - - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } - - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } - - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } - - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } - - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method - - const mayBeNormalized = normalizedMethodRecords[method] - - if (mayBeNormalized !== undefined) { - // Note: Bypass validation DELETE, GET, HEAD, OPTIONS, POST, PUT, PATCH and these lowercase ones - request.method = mayBeNormalized - } else { - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - - const upperCase = method.toUpperCase() - - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } - - // 3. Normalize method. - // https://fetch.spec.whatwg.org/#concept-method-normalize - // Note: must be in uppercase - method = normalizedMethodRecordsBase[upperCase] ?? method - - // 4. Set request’s method to method. - request.method = method - } - - if (!patchMethodWarning && request.method === 'patch') { - process.emitWarning('Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.', { - code: 'UNDICI-FETCH-patch' - }) - - patchMethodWarning = true - } - } - - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal - } - - // 27. Set this’s request to request. - this[kState] = request - - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = buildAbort(acRef) - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(1500, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - // The third argument must be a registry key to be unregistered. - // Without it, you cannot unregister. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // abort is used as the unregister key. (because it is unique) - requestFinalizer.register(ac, { signal, abort }, abort) - } - } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - setHeadersList(this[kHeaders], request.headersList) - setHeadersGuard(this[kHeaders], 'request') - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - setHeadersGuard(this[kHeaders], 'request-no-cors') - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = getHeadersList(this[kHeaders]) - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') - } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !getHeadersList(this[kHeaders]).contains('content-type', true)) { - this[kHeaders].append('content-type', contentType) - } - } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (bodyUnusable(input)) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } - - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-forward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw new TypeError('unusable') - } - - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) - - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - let list = dependentControllerMap.get(this.signal) - if (list === undefined) { - list = new Set() - dependentControllerMap.set(this.signal, list) - } - const acRef = new WeakRef(ac) - list.add(acRef) - util.addAbortListener( - ac.signal, - buildAbort(acRef) - ) - } - - // 4. Return clonedRequestObject. - return fromInnerRequest(clonedRequest, ac.signal, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - method: this.method, - url: this.url, - headers: this.headers, - destination: this.destination, - referrer: this.referrer, - referrerPolicy: this.referrerPolicy, - mode: this.mode, - credentials: this.credentials, - cache: this.cache, - redirect: this.redirect, - integrity: this.integrity, - keepalive: this.keepalive, - isReloadNavigation: this.isReloadNavigation, - isHistoryNavigation: this.isHistoryNavigation, - signal: this.signal - } - - return `Request ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Request) - -// https://fetch.spec.whatwg.org/#requests -function makeRequest (init) { - return { - method: init.method ?? 'GET', - localURLsOnly: init.localURLsOnly ?? false, - unsafeRequest: init.unsafeRequest ?? false, - body: init.body ?? null, - client: init.client ?? null, - reservedClient: init.reservedClient ?? null, - replacesClientId: init.replacesClientId ?? '', - window: init.window ?? 'client', - keepalive: init.keepalive ?? false, - serviceWorkers: init.serviceWorkers ?? 'all', - initiator: init.initiator ?? '', - destination: init.destination ?? '', - priority: init.priority ?? null, - origin: init.origin ?? 'client', - policyContainer: init.policyContainer ?? 'client', - referrer: init.referrer ?? 'client', - referrerPolicy: init.referrerPolicy ?? '', - mode: init.mode ?? 'no-cors', - useCORSPreflightFlag: init.useCORSPreflightFlag ?? false, - credentials: init.credentials ?? 'same-origin', - useCredentials: init.useCredentials ?? false, - cache: init.cache ?? 'default', - redirect: init.redirect ?? 'follow', - integrity: init.integrity ?? '', - cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? '', - parserMetadata: init.parserMetadata ?? '', - reloadNavigation: init.reloadNavigation ?? false, - historyNavigation: init.historyNavigation ?? false, - userActivation: init.userActivation ?? false, - taintedOrigin: init.taintedOrigin ?? false, - redirectCount: init.redirectCount ?? 0, - responseTainting: init.responseTainting ?? 'basic', - preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, - done: init.done ?? false, - timingAllowFailed: init.timingAllowFailed ?? false, - urlList: init.urlList, - url: init.urlList[0], - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) - - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(newRequest, request.body) - } - - // 3. Return newRequest. - return newRequest -} - -/** - * @see https://fetch.spec.whatwg.org/#request-create - * @param {any} innerRequest - * @param {AbortSignal} signal - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Request} - */ -function fromInnerRequest (innerRequest, signal, guard) { - const request = new Request(kConstruct) - request[kState] = innerRequest - request[kSignal] = signal - request[kHeaders] = new Headers(kConstruct) - setHeadersList(request[kHeaders], innerRequest.headersList) - setHeadersGuard(request[kHeaders], guard) - return request -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V, prefix, argument) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, argument) - } - - if (V instanceof Request) { - return webidl.converters.Request(V, prefix, argument) - } - - return webidl.converters.USVString(V, prefix, argument) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - 'RequestInit', - 'signal', - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - }, - { - key: 'dispatcher', // undici specific option - converter: webidl.converters.any - } -]) - -module.exports = { Request, makeRequest, fromInnerRequest, cloneRequest } - - -/***/ }), - -/***/ 8661: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = __nccwpck_require__(9822) -const { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = __nccwpck_require__(1858) -const util = __nccwpck_require__(8106) -const nodeUtil = __nccwpck_require__(7975) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode, - environmentSettingsObject: relevantRealm -} = __nccwpck_require__(1214) -const { - redirectStatusSet, - nullBodyStatus -} = __nccwpck_require__(5105) -const { kState, kHeaders } = __nccwpck_require__(1597) -const { webidl } = __nccwpck_require__(6131) -const { FormData } = __nccwpck_require__(9976) -const { URLSerializer } = __nccwpck_require__(8094) -const { kConstruct } = __nccwpck_require__(5953) -const assert = __nccwpck_require__(4589) -const { types } = __nccwpck_require__(7975) - -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = fromInnerResponse(makeNetworkError(), 'immutable') - - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, 'Response.json') - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) - - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'response') - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - webidl.argumentLengthCheck(arguments, 1, 'Response.redirect') - - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) - - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl) - } catch (err) { - throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`) - } - - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = fromInnerResponse(makeResponse({}), 'immutable') - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value, true) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - webidl.util.markAsUncloneable(this) - if (body === kConstruct) { - return - } - - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) - - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - setHeadersGuard(this[kHeaders], 'response') - setHeadersList(this[kHeaders], this[kState].headersList) - - // 3. Let bodyWithType be null. - let bodyWithType = null - - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[kState].urlList - - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null - - if (url === null) { - return '' - } - - return URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) - - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (bodyUnusable(this)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } - - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) - - // Note: To re-register because of a new stream. - if (hasFinalizationRegistry && this[kState].body?.stream) { - streamRegistry.register(this, new WeakRef(this[kState].body.stream)) - } - - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - return fromInnerResponse(clonedResponse, getHeadersGuard(this[kHeaders])) - } - - [nodeUtil.inspect.custom] (depth, options) { - if (options.depth === null) { - options.depth = 2 - } - - options.colors ??= true - - const properties = { - status: this.status, - statusText: this.statusText, - headers: this.headers, - body: this.body, - bodyUsed: this.bodyUsed, - ok: this.ok, - redirected: this.redirected, - type: this.type, - url: this.url - } - - return `Response ${nodeUtil.formatWithOptions(options, properties)}` - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: - - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) - - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(newResponse, response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init?.headersList - ? new HeadersList(init?.headersList) - : new HeadersList(), - urlList: init?.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -// @see https://fetch.spec.whatwg.org/#concept-network-error -function isNetworkError (response) { - return ( - // A network error is a response whose type is "error", - response.type === 'error' && - // status is 0 - response.status === 0 - ) -} - -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } - - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. - - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. - - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. - - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } - - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } - - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } - - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: `Invalid response status code ${response.status}` - }) - } - - // 2. Set response's body to body's body. - response[kState].body = body.body - - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('content-type', true)) { - response[kState].headersList.append('content-type', body.type, true) - } - } -} - -/** - * @see https://fetch.spec.whatwg.org/#response-create - * @param {any} innerResponse - * @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard - * @returns {Response} - */ -function fromInnerResponse (innerResponse, guard) { - const response = new Response(kConstruct) - response[kState] = innerResponse - response[kHeaders] = new Headers(kConstruct) - setHeadersList(response[kHeaders], innerResponse.headersList) - setHeadersGuard(response[kHeaders], guard) - - if (hasFinalizationRegistry && innerResponse.body?.stream) { - // If the target (response) is reclaimed, the cleanup callback may be called at some point with - // the held value provided for it (innerResponse.body.stream). The held value can be any value: - // a primitive or an object, even undefined. If the held value is an object, the registry keeps - // a strong reference to it (so it can pass it to the cleanup callback later). Reworded from - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)) - } - - return response -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) { - if (typeof V === 'string') { - return webidl.converters.USVString(V, prefix, name) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, prefix, name, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V, prefix, name) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, prefix, name, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V, prefix, name) - } - - return webidl.converters.DOMString(V, prefix, name) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V, prefix, argument) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V, prefix, argument) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: () => 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: () => '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - isNetworkError, - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse, - fromInnerResponse -} - - -/***/ }), - -/***/ 1597: -/***/ ((module) => { - - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kDispatcher: Symbol('dispatcher') -} - - -/***/ }), - -/***/ 1214: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Transform } = __nccwpck_require__(7075) -const zlib = __nccwpck_require__(8522) -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(5105) -const { getGlobalOrigin } = __nccwpck_require__(3701) -const { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = __nccwpck_require__(8094) -const { performance } = __nccwpck_require__(643) -const { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = __nccwpck_require__(8106) -const assert = __nccwpck_require__(4589) -const { isUint8Array } = __nccwpck_require__(3429) -const { webidl } = __nccwpck_require__(6131) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location', true) - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - // Some websites respond location header in UTF-8 form without encoding them as ASCII - // and major browsers redirect them to correctly UTF-8 encoded addresses. - // Here, we handle that behavior in the same way. - location = normalizeBinaryStringToUtf8(location) - } - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc1738#section-2.2 - * @param {string} url - * @returns {boolean} - */ -function isValidEncodedURL (url) { - for (let i = 0; i < url.length; ++i) { - const code = url.charCodeAt(i) - - if ( - code > 0x7E || // Non-US-ASCII + DEL - code < 0x20 // Control characters NUL - US - ) { - return false - } - } - return true -} - -/** - * If string contains non-ASCII characters, assumes it's UTF-8 encoded and decodes it. - * Since UTF-8 is a superset of ASCII, this will work for ASCII strings as well. - * @param {string} value - * @returns {string} - */ -function normalizeBinaryStringToUtf8 (value) { - return Buffer.from(value, 'binary').toString('utf8') -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -const isValidHeaderName = isValidHTTPToken - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - return ( - potentialValue[0] === '\t' || - potentialValue[0] === ' ' || - potentialValue[potentialValue.length - 1] === '\t' || - potentialValue[potentialValue.length - 1] === ' ' || - potentialValue.includes('\n') || - potentialValue.includes('\r') || - potentialValue.includes('\0') - ) === false -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. - - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy', true) ?? '').split(',') - - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } - - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } -} - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode - - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header, true) - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO -} - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin - // with request. - // TODO: implement "byte-serializing a request origin" - let serializedOrigin = request.origin - - // - "'client' is changed to an origin during fetching." - // This doesn't happen in undici (in most cases) because undici, by default, - // has no concept of origin. - // - request.origin can also be set to request.client.origin (client being - // an environment settings object), which is undefined without using - // setGlobalOrigin. - if (serializedOrigin === 'client' || serializedOrigin === undefined) { - return - } - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", - // then append (`Origin`, serializedOrigin) to request’s header list. - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - request.headersList.append('origin', serializedOrigin, true) - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and - // request’s current URL’s scheme is not "https", then set - // serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s - // origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } - - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin, true) - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsen-time -function coarsenTime (timestamp, crossOriginIsolatedCapability) { - // TODO - return timestamp -} - -// https://fetch.spec.whatwg.org/#clamp-and-coarsen-connection-timing-info -function clampAndCoarsenConnectionTimingInfo (connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - } - } - - return { - domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), - domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), - connectionStartTime: coarsenTime(connectionTimingInfo.connectionStartTime, crossOriginIsolatedCapability), - connectionEndTime: coarsenTime(connectionTimingInfo.connectionEndTime, crossOriginIsolatedCapability), - secureConnectionStartTime: coarsenTime(connectionTimingInfo.secureConnectionStartTime, crossOriginIsolatedCapability), - ALPNNegotiatedProtocol: connectionTimingInfo.ALPNNegotiatedProtocol - } -} - -// https://w3c.github.io/hr-time/#dfn-coarsened-shared-current-time -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - return coarsenTime(performance.now(), crossOriginIsolatedCapability) -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } -} - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null - - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. - - const globalOrigin = getGlobalOrigin() - - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } - - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) - - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) - - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - url = new URL(url) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' - - // 5. Set url’s fragment to null. - url.hash = '' - - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' - - // 2. Set url’s query to null. - url.search = '' - } - - // 7. Return url. - return url -} - -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } - - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } - - // If scheme is data, return true - if (url.protocol === 'data:') return true - - // If file, return true - if (url.protocol === 'file:') return true - - return isOriginPotentiallyTrustworthy(url.origin) - - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - - const originAsURL = new URL(origin) - - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } - - // If any other, return false - return false - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If response is not eligible for integrity validation, return false. - // TODO - - // 4. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } - - // 5. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const strongest = getStrongestMetadata(parsedMetadata) - const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - - // 6. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo - - // 2. Let expectedValue be the val component of item. - const expectedValue = item.hash - - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. - - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - - if (actualValue[actualValue.length - 1] === '=') { - if (actualValue[actualValue.length - 2] === '=') { - actualValue = actualValue.slice(0, -2) - } else { - actualValue = actualValue.slice(0, -1) - } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (compareBase64Mixed(actualValue, expectedValue)) { - return true - } - } - - // 7. Return false. - return false -} - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true - - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false - - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo.toLowerCase() - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -/** - * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList - */ -function getStrongestMetadata (metadataList) { - // Let algorithm be the algo component of the first item in metadataList. - // Can be sha256 - let algorithm = metadataList[0].algo - // If the algorithm is sha512, then it is the strongest - // and we can return immediately - if (algorithm[3] === '5') { - return algorithm - } - - for (let i = 1; i < metadataList.length; ++i) { - const metadata = metadataList[i] - // If the algorithm is sha512, then it is the strongest - // and we can break the loop immediately - if (metadata.algo[3] === '5') { - algorithm = 'sha512' - break - // If the algorithm is sha384, then a potential sha256 or sha384 is ignored - } else if (algorithm[3] === '3') { - continue - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function filterMetadataListByAlgorithm (metadataList, algorithm) { - if (metadataList.length === 1) { - return metadataList - } - - let pos = 0 - for (let i = 0; i < metadataList.length; ++i) { - if (metadataList[i].algo === algorithm) { - metadataList[pos++] = metadataList[i] - } - } - - metadataList.length = pos - - return metadataList -} - -/** - * Compares two base64 strings, allowing for base64url - * in the second string. - * -* @param {string} actualValue always base64 - * @param {string} expectedValue base64 or base64url - * @returns {boolean} - */ -function compareBase64Mixed (actualValue, expectedValue) { - if (actualValue.length !== expectedValue.length) { - return false - } - for (let i = 0; i < actualValue.length; ++i) { - if (actualValue[i] !== expectedValue[i]) { - if ( - (actualValue[i] === '+' && expectedValue[i] === '-') || - (actualValue[i] === '/' && expectedValue[i] === '_') - ) { - continue - } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizedMethodRecordsBase[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function createIterator (name, kInternalIterator, keyIndex = 0, valueIndex = 1) { - class FastIterableIterator { - /** @type {any} */ - #target - /** @type {'key' | 'value' | 'key+value'} */ - #kind - /** @type {number} */ - #index - - /** - * @see https://webidl.spec.whatwg.org/#dfn-default-iterator-object - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - */ - constructor (target, kind) { - this.#target = target - this.#kind = kind - this.#index = 0 - } - - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (typeof this !== 'object' || this === null || !(#target in this)) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const index = this.#index - const values = this.#target[kInternalIterator] - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { - value: undefined, - done: true - } - } - - // 11. Let pair be the entry in values at index index. - const { [keyIndex]: key, [valueIndex]: value } = values[index] - - // 12. Set object’s index to index + 1. - this.#index = index + 1 - - // 13. Return the iterator result for pair and kind. - - // https://webidl.spec.whatwg.org/#iterator-result - - // 1. Let result be a value determined by the value of kind: - let result - switch (this.#kind) { - case 'key': - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = key - break - case 'value': - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = value - break - case 'key+value': - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = [key, value] - break - } - - // 2. Return CreateIterResultObject(result, false). - return { - value: result, - done: false - } - } - } - - // https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - // @ts-ignore - delete FastIterableIterator.prototype.constructor - - Object.setPrototypeOf(FastIterableIterator.prototype, esIteratorPrototype) - - Object.defineProperties(FastIterableIterator.prototype, { - [Symbol.toStringTag]: { - writable: false, - enumerable: false, - configurable: true, - value: `${name} Iterator` - }, - next: { writable: true, enumerable: true, configurable: true } - }) - - /** - * @param {unknown} target - * @param {'key' | 'value' | 'key+value'} kind - * @returns {IterableIterator} - */ - return function (target, kind) { - return new FastIterableIterator(target, kind) - } -} - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {string} name name of the instance - * @param {any} object class - * @param {symbol} kInternalIterator - * @param {string | number} [keyIndex] - * @param {string | number} [valueIndex] - */ -function iteratorMixin (name, object, kInternalIterator, keyIndex = 0, valueIndex = 1) { - const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex) - - const properties = { - keys: { - writable: true, - enumerable: true, - configurable: true, - value: function keys () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key') - } - }, - values: { - writable: true, - enumerable: true, - configurable: true, - value: function values () { - webidl.brandCheck(this, object) - return makeIterator(this, 'value') - } - }, - entries: { - writable: true, - enumerable: true, - configurable: true, - value: function entries () { - webidl.brandCheck(this, object) - return makeIterator(this, 'key+value') - } - }, - forEach: { - writable: true, - enumerable: true, - configurable: true, - value: function forEach (callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object) - webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`) - if (typeof callbackfn !== 'function') { - throw new TypeError( - `Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.` - ) - } - for (const { 0: key, 1: value } of makeIterator(this, 'key+value')) { - callbackfn.call(thisArg, value, key, this) - } - } - } - } - - return Object.defineProperties(object.prototype, { - ...properties, - [Symbol.iterator]: { - writable: true, - enumerable: false, - configurable: true, - value: properties.entries.value - } - }) -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - successSteps(await readAllBytes(reader)) - } catch (e) { - errorSteps(e) - } -} - -function isReadableStreamLike (stream) { - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - controller.byobRequest?.respond(0) - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed') && !err.message.includes('ReadableStream is already closed')) { - throw err - } - } -} - -const invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/ // eslint-disable-line - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - assert(!invalidIsomorphicEncodeValueRegex.test(input)) - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input -} - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) - } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} - -/** - * @param {string|URL} url - * @returns {boolean} - */ -function urlHasHttpsScheme (url) { - return ( - ( - typeof url === 'string' && - url[5] === ':' && - url[0] === 'h' && - url[1] === 't' && - url[2] === 't' && - url[3] === 'p' && - url[4] === 's' - ) || - url.protocol === 'https:' - ) -} - -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' -} - -/** - * @see https://fetch.spec.whatwg.org/#simple-range-header-value - * @param {string} value - * @param {boolean} allowWhitespace - */ -function simpleRangeHeaderValue (value, allowWhitespace) { - // 1. Let data be the isomorphic decoding of value. - // Note: isomorphic decoding takes a sequence of bytes (ie. a Uint8Array) and turns it into a string, - // nothing more. We obviously don't need to do that if value is a string already. - const data = value - - // 2. If data does not start with "bytes", then return failure. - if (!data.startsWith('bytes')) { - return 'failure' - } - - // 3. Let position be a position variable for data, initially pointing at the 5th code point of data. - const position = { position: 5 } - - // 4. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 5. If the code point at position within data is not U+003D (=), then return failure. - if (data.charCodeAt(position.position) !== 0x3D) { - return 'failure' - } - - // 6. Advance position by 1. - position.position++ - - // 7. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, from - // data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 8. Let rangeStart be the result of collecting a sequence of code points that are ASCII digits, - // from data given position. - const rangeStart = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 9. Let rangeStartValue be rangeStart, interpreted as decimal number, if rangeStart is not the - // empty string; otherwise null. - const rangeStartValue = rangeStart.length ? Number(rangeStart) : null - - // 10. If allowWhitespace is true, collect a sequence of code points that are HTTP tab or space, - // from data given position. - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 11. If the code point at position within data is not U+002D (-), then return failure. - if (data.charCodeAt(position.position) !== 0x2D) { - return 'failure' - } - - // 12. Advance position by 1. - position.position++ - - // 13. If allowWhitespace is true, collect a sequence of code points that are HTTP tab - // or space, from data given position. - // Note from Khafra: its the same step as in #8 again lol - if (allowWhitespace) { - collectASequenceOfCodePoints( - (char) => char === '\t' || char === ' ', - data, - position - ) - } - - // 14. Let rangeEnd be the result of collecting a sequence of code points that are - // ASCII digits, from data given position. - // Note from Khafra: you wouldn't guess it, but this is also the same step as #8 - const rangeEnd = collectASequenceOfCodePoints( - (char) => { - const code = char.charCodeAt(0) - - return code >= 0x30 && code <= 0x39 - }, - data, - position - ) - - // 15. Let rangeEndValue be rangeEnd, interpreted as decimal number, if rangeEnd - // is not the empty string; otherwise null. - // Note from Khafra: THE SAME STEP, AGAIN!!! - // Note: why interpret as a decimal if we only collect ascii digits? - const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null - - // 16. If position is not past the end of data, then return failure. - if (position.position < data.length) { - return 'failure' - } - - // 17. If rangeEndValue and rangeStartValue are null, then return failure. - if (rangeEndValue === null && rangeStartValue === null) { - return 'failure' - } - - // 18. If rangeStartValue and rangeEndValue are numbers, and rangeStartValue is - // greater than rangeEndValue, then return failure. - // Note: ... when can they not be numbers? - if (rangeStartValue > rangeEndValue) { - return 'failure' - } - - // 19. Return (rangeStartValue, rangeEndValue). - return { rangeStartValue, rangeEndValue } -} - -/** - * @see https://fetch.spec.whatwg.org/#build-a-content-range - * @param {number} rangeStart - * @param {number} rangeEnd - * @param {number} fullLength - */ -function buildContentRange (rangeStart, rangeEnd, fullLength) { - // 1. Let contentRange be `bytes `. - let contentRange = 'bytes ' - - // 2. Append rangeStart, serialized and isomorphic encoded, to contentRange. - contentRange += isomorphicEncode(`${rangeStart}`) - - // 3. Append 0x2D (-) to contentRange. - contentRange += '-' - - // 4. Append rangeEnd, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${rangeEnd}`) - - // 5. Append 0x2F (/) to contentRange. - contentRange += '/' - - // 6. Append fullLength, serialized and isomorphic encoded to contentRange. - contentRange += isomorphicEncode(`${fullLength}`) - - // 7. Return contentRange. - return contentRange -} - -// A Stream, which pipes the response to zlib.createInflate() or -// zlib.createInflateRaw() depending on the first byte of the Buffer. -// If the lower byte of the first byte is 0x08, then the stream is -// interpreted as a zlib stream, otherwise it's interpreted as a -// raw deflate stream. -class InflateStream extends Transform { - #zlibOptions - - /** @param {zlib.ZlibOptions} [zlibOptions] */ - constructor (zlibOptions) { - super() - this.#zlibOptions = zlibOptions - } - - _transform (chunk, encoding, callback) { - if (!this._inflateStream) { - if (chunk.length === 0) { - callback() - return - } - this._inflateStream = (chunk[0] & 0x0F) === 0x08 - ? zlib.createInflate(this.#zlibOptions) - : zlib.createInflateRaw(this.#zlibOptions) - - this._inflateStream.on('data', this.push.bind(this)) - this._inflateStream.on('end', () => this.push(null)) - this._inflateStream.on('error', (err) => this.destroy(err)) - } - - this._inflateStream.write(chunk, encoding, callback) - } - - _final (callback) { - if (this._inflateStream) { - this._inflateStream.end() - this._inflateStream = null - } - callback() - } -} - -/** - * @param {zlib.ZlibOptions} [zlibOptions] - * @returns {InflateStream} - */ -function createInflate (zlibOptions) { - return new InflateStream(zlibOptions) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-extract-mime-type - * @param {import('./headers').HeadersList} headers - */ -function extractMimeType (headers) { - // 1. Let charset be null. - let charset = null - - // 2. Let essence be null. - let essence = null - - // 3. Let mimeType be null. - let mimeType = null - - // 4. Let values be the result of getting, decoding, and splitting `Content-Type` from headers. - const values = getDecodeSplit('content-type', headers) - - // 5. If values is null, then return failure. - if (values === null) { - return 'failure' - } - - // 6. For each value of values: - for (const value of values) { - // 6.1. Let temporaryMimeType be the result of parsing value. - const temporaryMimeType = parseMIMEType(value) - - // 6.2. If temporaryMimeType is failure or its essence is "*/*", then continue. - if (temporaryMimeType === 'failure' || temporaryMimeType.essence === '*/*') { - continue - } - - // 6.3. Set mimeType to temporaryMimeType. - mimeType = temporaryMimeType - - // 6.4. If mimeType’s essence is not essence, then: - if (mimeType.essence !== essence) { - // 6.4.1. Set charset to null. - charset = null - - // 6.4.2. If mimeType’s parameters["charset"] exists, then set charset to - // mimeType’s parameters["charset"]. - if (mimeType.parameters.has('charset')) { - charset = mimeType.parameters.get('charset') - } - - // 6.4.3. Set essence to mimeType’s essence. - essence = mimeType.essence - } else if (!mimeType.parameters.has('charset') && charset !== null) { - // 6.5. Otherwise, if mimeType’s parameters["charset"] does not exist, and - // charset is non-null, set mimeType’s parameters["charset"] to charset. - mimeType.parameters.set('charset', charset) - } - } - - // 7. If mimeType is null, then return failure. - if (mimeType == null) { - return 'failure' - } - - // 8. Return mimeType. - return mimeType -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value-get-decode-and-split - * @param {string|null} value - */ -function gettingDecodingSplitting (value) { - // 1. Let input be the result of isomorphic decoding value. - const input = value - - // 2. Let position be a position variable for input, initially pointing at the start of input. - const position = { position: 0 } - - // 3. Let values be a list of strings, initially empty. - const values = [] - - // 4. Let temporaryValue be the empty string. - let temporaryValue = '' - - // 5. While position is not past the end of input: - while (position.position < input.length) { - // 5.1. Append the result of collecting a sequence of code points that are not U+0022 (") - // or U+002C (,) from input, given position, to temporaryValue. - temporaryValue += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== ',', - input, - position - ) - - // 5.2. If position is not past the end of input, then: - if (position.position < input.length) { - // 5.2.1. If the code point at position within input is U+0022 ("), then: - if (input.charCodeAt(position.position) === 0x22) { - // 5.2.1.1. Append the result of collecting an HTTP quoted string from input, given position, to temporaryValue. - temporaryValue += collectAnHTTPQuotedString( - input, - position - ) - - // 5.2.1.2. If position is not past the end of input, then continue. - if (position.position < input.length) { - continue - } - } else { - // 5.2.2. Otherwise: - - // 5.2.2.1. Assert: the code point at position within input is U+002C (,). - assert(input.charCodeAt(position.position) === 0x2C) - - // 5.2.2.2. Advance position by 1. - position.position++ - } - } - - // 5.3. Remove all HTTP tab or space from the start and end of temporaryValue. - temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 0x9 || char === 0x20) - - // 5.4. Append temporaryValue to values. - values.push(temporaryValue) - - // 5.6. Set temporaryValue to the empty string. - temporaryValue = '' - } - - // 6. Return values. - return values -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split - * @param {string} name lowercase header name - * @param {import('./headers').HeadersList} list - */ -function getDecodeSplit (name, list) { - // 1. Let value be the result of getting name from list. - const value = list.get(name, true) - - // 2. If value is null, then return null. - if (value === null) { - return null - } - - // 3. Return the result of getting, decoding, and splitting value. - return gettingDecodingSplitting(value) -} - -const textDecoder = new TextDecoder() - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } - - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. - - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) - } - - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -class EnvironmentSettingsObjectBase { - get baseUrl () { - return getGlobalOrigin() - } - - get origin () { - return this.baseUrl?.origin - } - - policyContainer = makePolicyContainer() -} - -class EnvironmentSettingsObject { - settingsObject = new EnvironmentSettingsObjectBase() -} - -const environmentSettingsObject = new EnvironmentSettingsObject() - -module.exports = { - isAborted, - isCancelled, - isValidEncodedURL, - createDeferredPromise, - ReadableStreamFrom, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - clampAndCoarsenConnectionTimingInfo, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - iteratorMixin, - createIterator, - isValidHeaderName, - isValidHeaderValue, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - simpleRangeHeaderValue, - buildContentRange, - parseMetadata, - createInflate, - extractMimeType, - getDecodeSplit, - utf8DecodeBytes, - environmentSettingsObject -} - - -/***/ }), - -/***/ 6131: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { types, inspect } = __nccwpck_require__(7975) -const { markAsUncloneable } = __nccwpck_require__(5919) -const { toUSVString } = __nccwpck_require__(8106) - -/** @type {import('../../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts) { - if (opts?.strict !== false) { - if (!(V instanceof I)) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } else { - if (V?.[Symbol.toStringTag] !== I.prototype[Symbol.toStringTag]) { - const err = new TypeError('Illegal invocation') - err.code = 'ERR_INVALID_THIS' // node compat. - throw err - } - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - header: ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' - } - } -} - -webidl.util.markAsUncloneable = markAsUncloneable || (() => {}) -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 - - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } - - // 4. Let x be ? ToNumber(V). - let x = Number(V) - - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } - - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts?.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts?.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) - } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r -} - -webidl.util.Stringify = function (V) { - const type = webidl.util.Type(V) - - switch (type) { - case 'Symbol': - return `Symbol(${V.description})` - case 'Object': - return inspect(V) - case 'String': - return `"${V}"` - default: - return `${V}` - } -} - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V, prefix, argument, Iterable) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }) - } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = typeof Iterable === 'function' ? Iterable() : V?.[Symbol.iterator]?.() - const seq = [] - let index = 0 - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value, prefix, `${argument}[${index++}]`)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O, prefix, argument) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.Type(O)}") is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)] - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - - // 5. Return result. - return result - } - - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) - - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) - - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key, prefix, argument) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key], prefix, argument) - - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, prefix, argument, opts) => { - if (opts?.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary, prefix, argument) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }) - } - } - - let value = dictionary[key] - const hasDefault = Object.hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value ??= defaultValue() - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value, prefix, `${argument}.${key}`) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } - - dict[key] = value - } - } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V, prefix, argument) => { - if (V === null) { - return V - } - - return converter(V, prefix, argument) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, prefix, argument, opts) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts?.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }) - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} - -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V, prefix, argument) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V, prefix, argument) - - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } - - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x -} - -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x -} - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed', undefined, prefix, argument) - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V, prefix, argument) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned', undefined, prefix, argument) - - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, prefix, argument, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts, prefix, argument) - - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x -} - -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, prefix, argument, opts) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - if (V.resizable || V.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V -} - -webidl.converters.TypedArray = function (V, T, prefix, name, opts) { - // 1. Let T be the IDL type V is being converted to. - - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} - -webidl.converters.DataView = function (V, prefix, name, opts) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${name} is not a DataView.` - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts?.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (V.buffer.resizable || V.buffer.growable) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'Received a resizable ArrayBuffer.' - }) - } - - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, prefix, name, opts) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor, prefix, name, { ...opts, allowShared: false }) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, prefix, name, { ...opts, allowShared: false }) - } - - throw webidl.errors.conversionFailed({ - prefix, - argument: `${name} ("${webidl.util.Stringify(V)}")`, - types: ['BufferSource'] - }) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 5434: -/***/ ((module) => { - - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 5713: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(6452) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(9255) -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsArrayBuffer') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsBinaryString') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsText') - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding, 'FileReader.readAsText', 'encoding') - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, 'FileReader.readAsDataURL') - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } - - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null - } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null - } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null - } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null - } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null - } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 1435: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type, 'ProgressEvent constructor', 'type') - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: () => 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 9255: -/***/ ((module) => { - - - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - - -/***/ }), - -/***/ 6452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(9255) -const { ProgressEvent } = __nccwpck_require__(1435) -const { getEncoding } = __nccwpck_require__(5434) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(8094) -const { types } = __nccwpck_require__(7975) -const { StringDecoder } = __nccwpck_require__(3193) -const { btoa } = __nccwpck_require__(4573) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } - } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) - } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer - } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString - } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 8811: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = __nccwpck_require__(8570) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose, - kResponse -} = __nccwpck_require__(3066) -const { fireEvent, failWebsocketConnection, isClosing, isClosed, isEstablished, parseExtensions } = __nccwpck_require__(3079) -const { channels } = __nccwpck_require__(2276) -const { CloseEvent } = __nccwpck_require__(8798) -const { makeRequest } = __nccwpck_require__(6465) -const { fetching } = __nccwpck_require__(4268) -const { Headers, getHeadersList } = __nccwpck_require__(9822) -const { getDecodeSplit } = __nccwpck_require__(1214) -const { WebsocketFrameSend } = __nccwpck_require__(6930) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - -} - -/** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any, extensions: string[] | undefined) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, client, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - client, - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)) - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - const permessageDeflate = 'permessage-deflate; client_max_window_bits' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher, - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - let extensions - - if (secExtension !== null) { - extensions = parseExtensions(secExtension) - - if (!extensions.has('permessage-deflate')) { - failWebsocketConnection(ws, 'Sec-WebSocket-Extensions header does not match.') - return - } - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null) { - const requestProtocols = getDecodeSplit('sec-websocket-protocol', request.headersList) - - // The client can request that the server use a specific subprotocol by - // including the |Sec-WebSocket-Protocol| field in its handshake. If it - // is specified, the server needs to include the same field and one of - // the selected subprotocol values in its response for the connection to - // be established. - if (!requestProtocols.includes(secProtocol)) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response, extensions) - } - }) - - return controller -} - -function closeWebSocketConnection (ws, code, reason, reasonByteLength) { - if (isClosing(ws) || isClosed(ws)) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(ws)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(ws, 'Connection was closed before it was established.') - ws[kReadyState] = states.CLOSING - } else if (ws[kSentClose] === sentCloseFrameState.NOT_SENT) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - ws[kSentClose] = sentCloseFrameState.PROCESSING - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = ws[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE)) - - ws[kSentClose] = sentCloseFrameState.SENT - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - ws[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - ws[kReadyState] = states.CLOSING - } -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - const { [kResponse]: response } = ws - - response.socket.off('data', onSocketData) - response.socket.off('close', onSocketClose) - response.socket.off('error', onSocketError) - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] === sentCloseFrameState.SENT && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result && !result.error) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kReceivedClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - // TODO: process.nextTick - fireEvent('close', ws, (type, init) => new CloseEvent(type, init), { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection, - closeWebSocketConnection -} - - -/***/ }), - -/***/ 8570: -/***/ ((module) => { - - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const sentCloseFrameState = { - NOT_SENT: 0, - PROCESSING: 1, - SENT: 2 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -const sendHints = { - string: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 -} - -module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints -} - - -/***/ }), - -/***/ 8798: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { kEnumerableProperty } = __nccwpck_require__(8106) -const { kConstruct } = __nccwpck_require__(5953) -const { MessagePort } = __nccwpck_require__(5919) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - if (type === kConstruct) { - super(arguments[1], arguments[2]) - webidl.util.markAsUncloneable(this) - return - } - - const prefix = 'MessageEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.MessageEventInit(eventInitDict, prefix, 'eventInitDict') - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) - } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, 'MessageEvent.initMessageEvent') - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } - - static createFastMessageEvent (type, init) { - const messageEvent = new MessageEvent(kConstruct, type, init) - messageEvent.#eventInit = init - messageEvent.#eventInit.data ??= null - messageEvent.#eventInit.origin ??= '' - messageEvent.#eventInit.lastEventId ??= '' - messageEvent.#eventInit.source ??= null - messageEvent.#eventInit.ports ??= [] - return messageEvent - } -} - -const { createFastMessageEvent } = MessageEvent -delete MessageEvent.createFastMessageEvent - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - const prefix = 'CloseEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - webidl.util.markAsUncloneable(this) - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - const prefix = 'ErrorEvent constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - super(type, eventInitDict) - webidl.util.markAsUncloneable(this) - - type = webidl.converters.DOMString(type, prefix, 'type') - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: () => false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: () => null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: () => null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - defaultValue: () => new Array(0) - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: () => false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: () => 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: () => '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: () => '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: () => '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: () => 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent, - createFastMessageEvent -} - - -/***/ }), - -/***/ 6930: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { maxUnsigned16Bit } = __nccwpck_require__(8570) - -const BUFFER_SIZE = 16386 - -/** @type {import('crypto')} */ -let crypto -let buffer = null -let bufIdx = BUFFER_SIZE - -try { - crypto = __nccwpck_require__(7598) -/* c8 ignore next 3 */ -} catch { - crypto = { - // not full compatibility, but minimum. - randomFillSync: function randomFillSync (buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0 - } - return buffer - } - } -} - -function generateMask () { - if (bufIdx === BUFFER_SIZE) { - bufIdx = 0 - crypto.randomFillSync((buffer ??= Buffer.allocUnsafe(BUFFER_SIZE)), 0, BUFFER_SIZE) - } - return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]] -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - } - - createFrame (opcode) { - const frameData = this.frameData - const maskKey = generateMask() - const bodyLength = frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 - } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = maskKey[0] - buffer[offset - 3] = maskKey[1] - buffer[offset - 2] = maskKey[2] - buffer[offset - 1] = maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) - } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3] - } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 1919: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __nccwpck_require__(8522) -const { isValidClientWindowBits } = __nccwpck_require__(3079) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -const tail = Buffer.from([0x00, 0x00, 0xff, 0xff]) -const kBuffer = Symbol('kBuffer') -const kLength = Symbol('kLength') - -class PerMessageDeflate { - /** @type {import('node:zlib').InflateRaw} */ - #inflate - - #options = {} - - #maxPayloadSize = 0 - - /** - * @param {Map} extensions - */ - constructor (extensions, options) { - this.#options.serverNoContextTakeover = extensions.has('server_no_context_takeover') - this.#options.serverMaxWindowBits = extensions.get('server_max_window_bits') - - this.#maxPayloadSize = options.maxPayloadSize - } - - /** - * Decompress a compressed payload. - * @param {Buffer} chunk Compressed data - * @param {boolean} fin Final fragment flag - * @param {Function} callback Callback function - */ - decompress (chunk, fin, callback) { - // An endpoint uses the following algorithm to decompress a message. - // 1. Append 4 octets of 0x00 0x00 0xff 0xff to the tail end of the - // payload of the message. - // 2. Decompress the resulting data using DEFLATE. - if (!this.#inflate) { - let windowBits = Z_DEFAULT_WINDOWBITS - - if (this.#options.serverMaxWindowBits) { // empty values default to Z_DEFAULT_WINDOWBITS - if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error('Invalid server_max_window_bits')) - return - } - - windowBits = Number.parseInt(this.#options.serverMaxWindowBits) - } - - try { - this.#inflate = createInflateRaw({ windowBits }) - } catch (err) { - callback(err) - return - } - this.#inflate[kBuffer] = [] - this.#inflate[kLength] = 0 - - this.#inflate.on('data', (data) => { - this.#inflate[kLength] += data.length - - if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) { - callback(new MessageSizeExceededError()) - this.#inflate.removeAllListeners() - this.#inflate = null - return - } - - this.#inflate[kBuffer].push(data) - }) - - this.#inflate.on('error', (err) => { - this.#inflate = null - callback(err) - }) - } - - this.#inflate.write(chunk) - if (fin) { - this.#inflate.write(tail) - } - - this.#inflate.flush(() => { - if (!this.#inflate) { - return - } - - const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]) - - this.#inflate[kBuffer].length = 0 - this.#inflate[kLength] = 0 - - callback(null, full) - }) - } -} - -module.exports = { PerMessageDeflate } - - -/***/ }), - -/***/ 1074: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { Writable } = __nccwpck_require__(7075) -const assert = __nccwpck_require__(4589) -const { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = __nccwpck_require__(8570) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(3066) -const { channels } = __nccwpck_require__(2276) -const { - isValidStatusCode, - isValidOpcode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isTextBinaryFrame, - isContinuationFrame -} = __nccwpck_require__(3079) -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { closeWebSocketConnection } = __nccwpck_require__(8811) -const { PerMessageDeflate } = __nccwpck_require__(1919) -const { MessageSizeExceededError } = __nccwpck_require__(2545) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -class ByteParser extends Writable { - #buffers = [] - #fragmentsBytes = 0 - #byteOffset = 0 - #loop = false - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - /** @type {Map} */ - #extensions - - /** @type {number} */ - #maxPayloadSize - - /** - * @param {import('./websocket').WebSocket} ws - * @param {Map|null} extensions - * @param {{ maxPayloadSize?: number }} [options] - */ - constructor (ws, extensions, options = {}) { - super() - - this.ws = ws - this.#extensions = extensions == null ? new Map() : extensions - this.#maxPayloadSize = options.maxPayloadSize ?? 0 - - if (this.#extensions.has('permessage-deflate')) { - this.#extensions.set('permessage-deflate', new PerMessageDeflate(extensions, options)) - } - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - this.#loop = true - - this.run(callback) - } - - #validatePayloadLength () { - if ( - this.#maxPayloadSize > 0 && - !isControlFrame(this.#info.opcode) && - this.#info.payloadLength > this.#maxPayloadSize - ) { - failWebsocketConnection(this.ws, 'Payload size exceeds maximum allowed size') - return false - } - - return true - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - const fin = (buffer[0] & 0x80) !== 0 - const opcode = buffer[0] & 0x0F - const masked = (buffer[1] & 0x80) === 0x80 - - const fragmented = !fin && opcode !== opcodes.CONTINUATION - const payloadLength = buffer[1] & 0x7F - - const rsv1 = buffer[0] & 0x40 - const rsv2 = buffer[0] & 0x20 - const rsv3 = buffer[0] & 0x10 - - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.ws, 'Invalid opcode received') - return callback() - } - - if (masked) { - failWebsocketConnection(this.ws, 'Frame cannot be masked') - return callback() - } - - // MUST be 0 unless an extension is negotiated that defines meanings - // for non-zero values. If a nonzero value is received and none of - // the negotiated extensions defines the meaning of such a nonzero - // value, the receiving endpoint MUST _Fail the WebSocket - // Connection_. - // This document allocates the RSV1 bit of the WebSocket header for - // PMCEs and calls the bit the "Per-Message Compressed" bit. On a - // WebSocket connection where a PMCE is in use, this bit indicates - // whether a message is compressed or not. - if (rsv1 !== 0 && !this.#extensions.has('permessage-deflate')) { - failWebsocketConnection(this.ws, 'Expected RSV1 to be clear.') - return - } - - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.ws, 'RSV1, RSV2, RSV3 must be clear') - return - } - - if (fragmented && !isTextBinaryFrame(opcode)) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - // If we are already parsing a text/binary frame and do not receive either - // a continuation frame or close frame, fail the connection. - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.ws, 'Expected continuation frame') - return - } - - if (this.#info.fragmented && fragmented) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } - - // "All control frames MUST have a payload length of 125 bytes or less - // and MUST NOT be fragmented." - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.ws, 'Control frame either too large or fragmented') - return - } - - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.ws, 'Unexpected continuation frame') - return - } - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode - this.#info.compressed = rsv1 !== 0 - } - - this.#info.opcode = opcode - this.#info.masked = masked - this.#info.fin = fin - this.#info.fragmented = fragmented - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - const lower = buffer.readUInt32BE(4) - - // 2^31 is the maximum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper !== 0 || lower > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return - } - - this.#info.payloadLength = lower - this.#state = parserStates.READ_DATA - - if (!this.#validatePayloadLength()) { - return - } - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback() - } - - const body = this.consume(this.#info.payloadLength) - - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body) - this.#state = parserStates.INFO - } else { - if (!this.#info.compressed) { - this.writeFragments(body) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - // If the frame is not fragmented, a message has been received. - // If the frame is fragmented, it will terminate with a fin bit set - // and an opcode of 0 (continuation), therefore we handle that when - // parsing continuation frames, not here. - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - } - - this.#state = parserStates.INFO - } else { - this.#extensions.get('permessage-deflate').decompress( - body, - this.#info.fin, - (error, data) => { - if (error) { - failWebsocketConnection(this.ws, error.message) - return - } - - this.writeFragments(data) - - if (this.#maxPayloadSize > 0 && this.#fragmentsBytes > this.#maxPayloadSize) { - failWebsocketConnection(this.ws, new MessageSizeExceededError().message) - return - } - - if (!this.#info.fin) { - this.#state = parserStates.INFO - this.#loop = true - this.run(callback) - return - } - - websocketMessageReceived(this.ws, this.#info.binaryType, this.consumeFragments()) - - this.#loop = true - this.#state = parserStates.INFO - this.run(callback) - } - ) - - this.#loop = false - break - } - } - } - } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer} - */ - consume (n) { - if (n > this.#byteOffset) { - throw new Error('Called consume() before buffers satiated.') - } else if (n === 0) { - return emptyBuffer - } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() - } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } - } - - this.#byteOffset -= n - - return buffer - } - - writeFragments (fragment) { - this.#fragmentsBytes += fragment.length - this.#fragments.push(fragment) - } - - consumeFragments () { - const fragments = this.#fragments - - if (fragments.length === 1) { - this.#fragmentsBytes = 0 - return fragments.shift() - } - - const output = Buffer.concat(fragments, this.#fragmentsBytes) - this.#fragments = [] - this.#fragmentsBytes = 0 - - return output - } - - parseCloseBody (data) { - assert(data.length !== 1) - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) - } - - if (code !== undefined && !isValidStatusCode(code)) { - return { code: 1002, reason: 'Invalid status code', error: true } - } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) - } - - try { - reason = utf8Decode(reason) - } catch { - return { code: 1007, reason: 'Invalid UTF-8', error: true } - } - - return { code, reason, error: false } - } - - /** - * Parses control frames. - * @param {Buffer} body - */ - parseControlFrame (body) { - const { opcode, payloadLength } = this.#info - - if (opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return false - } - - this.#info.closeInfo = this.parseCloseBody(body) - - if (this.#info.closeInfo.error) { - const { code, reason } = this.#info.closeInfo - - closeWebSocketConnection(this.ws, code, reason, reason.length) - failWebsocketConnection(this.ws, reason) - return false - } - - if (this.ws[kSentClose] !== sentCloseFrameState.SENT) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - let body = emptyBuffer - if (this.#info.closeInfo.code) { - body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - } - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = sentCloseFrameState.SENT - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - return false - } else if (opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) - } - } - } else if (opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - } - - return true - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 3478: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { WebsocketFrameSend } = __nccwpck_require__(6930) -const { opcodes, sendHints } = __nccwpck_require__(8570) -const FixedQueue = __nccwpck_require__(8334) - -/** @type {typeof Uint8Array} */ -const FastBuffer = Buffer[Symbol.species] - -/** - * @typedef {object} SendQueueNode - * @property {Promise | null} promise - * @property {((...args: any[]) => any)} callback - * @property {Buffer | null} frame - */ - -class SendQueue { - /** - * @type {FixedQueue} - */ - #queue = new FixedQueue() - - /** - * @type {boolean} - */ - #running = false - - /** @type {import('node:net').Socket} */ - #socket - - constructor (socket) { - this.#socket = socket - } - - add (item, cb, hint) { - if (hint !== sendHints.blob) { - const frame = createFrame(item, hint) - if (!this.#running) { - // fast-path - this.#socket.write(frame, cb) - } else { - /** @type {SendQueueNode} */ - const node = { - promise: null, - callback: cb, - frame - } - this.#queue.push(node) - } - return - } - - /** @type {SendQueueNode} */ - const node = { - promise: item.arrayBuffer().then((ab) => { - node.promise = null - node.frame = createFrame(ab, hint) - }), - callback: cb, - frame: null - } - - this.#queue.push(node) - - if (!this.#running) { - this.#run() - } - } - - async #run () { - this.#running = true - const queue = this.#queue - while (!queue.isEmpty()) { - const node = queue.shift() - // wait pending promise - if (node.promise !== null) { - await node.promise - } - // write - this.#socket.write(node.frame, node.callback) - // cleanup - node.callback = node.frame = null - } - this.#running = false - } -} - -function createFrame (data, hint) { - return new WebsocketFrameSend(toBuffer(data, hint)).createFrame(hint === sendHints.string ? opcodes.TEXT : opcodes.BINARY) -} - -function toBuffer (data, hint) { - switch (hint) { - case sendHints.string: - return Buffer.from(data) - case sendHints.arrayBuffer: - case sendHints.blob: - return new FastBuffer(data) - case sendHints.typedArray: - return new FastBuffer(data.buffer, data.byteOffset, data.byteLength) - } -} - -module.exports = { SendQueue } - - -/***/ }), - -/***/ 3066: -/***/ ((module) => { - - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 3079: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(3066) -const { states, opcodes } = __nccwpck_require__(8570) -const { ErrorEvent, createFastMessageEvent } = __nccwpck_require__(8798) -const { isUtf8 } = __nccwpck_require__(4573) -const { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = __nccwpck_require__(8094) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isConnecting (ws) { - // If the WebSocket connection is not yet established, and the connection - // is not yet closed, then the WebSocket connection is in the CONNECTING state. - return ws[kReadyState] === states.CONNECTING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - * @returns {boolean} - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {(...args: ConstructorParameters) => Event} eventFactory - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = eventFactory(e, eventInitDict) - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = utf8Decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = toArrayBuffer(data) - } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, createFastMessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -function toArrayBuffer (buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer - } - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (let i = 0; i < protocol.length; ++i) { - const code = protocol.charCodeAt(i) - - if ( - code < 0x21 || // CTL, contains SP (0x20) and HT (0x09) - code > 0x7E || - code === 0x22 || // " - code === 0x28 || // ( - code === 0x29 || // ) - code === 0x2C || // , - code === 0x2F || // / - code === 0x3A || // : - code === 0x3B || // ; - code === 0x3C || // < - code === 0x3D || // = - code === 0x3E || // > - code === 0x3F || // ? - code === 0x40 || // @ - code === 0x5B || // [ - code === 0x5C || // \ - code === 0x5D || // ] - code === 0x7B || // { - code === 0x7D // } - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - // TODO: process.nextTick - fireEvent('error', ws, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), - message: reason - }) - } -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 - * @param {number} opcode - */ -function isControlFrame (opcode) { - return ( - opcode === opcodes.CLOSE || - opcode === opcodes.PING || - opcode === opcodes.PONG - ) -} - -function isContinuationFrame (opcode) { - return opcode === opcodes.CONTINUATION -} - -function isTextBinaryFrame (opcode) { - return opcode === opcodes.TEXT || opcode === opcodes.BINARY -} - -function isValidOpcode (opcode) { - return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode) -} - -/** - * Parses a Sec-WebSocket-Extensions header value. - * @param {string} extensions - * @returns {Map} - */ -// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 -function parseExtensions (extensions) { - const position = { position: 0 } - const extensionList = new Map() - - while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(';', extensions, position) - const [name, value = ''] = pair.split('=') - - extensionList.set( - removeHTTPWhitespace(name, true, false), - removeHTTPWhitespace(value, false, true) - ) - - position.position++ - } - - return extensionList -} - -/** - * @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2 - * @description "client-max-window-bits = 1*DIGIT" - * @param {string} value - */ -function isValidClientWindowBits (value) { - // Must have at least one character - if (value.length === 0) { - return false - } - - // Check all characters are ASCII digits - for (let i = 0; i < value.length; i++) { - const byte = value.charCodeAt(i) - - if (byte < 0x30 || byte > 0x39) { - return false - } - } - - // Check numeric range: zlib requires windowBits in range 8-15 - const num = Number.parseInt(value, 10) - return num >= 8 && num <= 15 -} - -// https://nodejs.org/api/intl.html#detecting-internationalization-support -const hasIntl = typeof process.versions.icu === 'string' -const fatalDecoder = hasIntl ? new TextDecoder('utf-8', { fatal: true }) : undefined - -/** - * Converts a Buffer to utf-8, even on platforms without icu. - * @param {Buffer} buffer - */ -const utf8Decode = hasIntl - ? fatalDecoder.decode.bind(fatalDecoder) - : function (buffer) { - if (isUtf8(buffer)) { - return buffer.toString('utf-8') - } - throw new TypeError('Invalid utf-8 received.') - } - -module.exports = { - isConnecting, - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived, - utf8Decode, - isControlFrame, - isContinuationFrame, - isTextBinaryFrame, - isValidOpcode, - parseExtensions, - isValidClientWindowBits -} - - -/***/ }), - -/***/ 7976: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -const { webidl } = __nccwpck_require__(6131) -const { URLSerializer } = __nccwpck_require__(8094) -const { environmentSettingsObject } = __nccwpck_require__(1214) -const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints } = __nccwpck_require__(8570) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(3066) -const { - isConnecting, - isEstablished, - isClosing, - isValidSubprotocol, - fireEvent -} = __nccwpck_require__(3079) -const { establishWebSocketConnection, closeWebSocketConnection } = __nccwpck_require__(8811) -const { ByteParser } = __nccwpck_require__(1074) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(8106) -const { getGlobalDispatcher } = __nccwpck_require__(1063) -const { types } = __nccwpck_require__(7975) -const { ErrorEvent, CloseEvent } = __nccwpck_require__(8798) -const { SendQueue } = __nccwpck_require__(3478) - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** @type {SendQueue} */ - #sendQueue - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.util.markAsUncloneable(this) - - const prefix = 'WebSocket constructor' - webidl.argumentLengthCheck(arguments, 1, prefix) - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols, prefix, 'options') - - url = webidl.converters.USVString(url, prefix, 'url') - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = environmentSettingsObject.settingsObject.baseUrl - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - const client = environmentSettingsObject.settingsObject - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - client, - this, - (response, extensions) => this.#onConnectionEstablished(response, extensions), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - this[kSentClose] = sentCloseFrameState.NOT_SENT - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.close' - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, prefix, 'code', { clamp: true }) - } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason, prefix, 'reason') - } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } - } - - // 3. Run the first matching steps from the following list: - closeWebSocketConnection(this, code, reason, reasonByteLength) - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - const prefix = 'WebSocket.send' - webidl.argumentLengthCheck(arguments, 1, prefix) - - data = webidl.converters.WebSocketSendData(data, prefix, 'data') - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (isConnecting(this)) { - throw new DOMException('Sent before connected.', 'InvalidStateError') - } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return - } - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const length = Buffer.byteLength(data) - - this.#bufferedAmount += length - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= length - }, sendHints.string) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.arrayBuffer) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - this.#bufferedAmount += data.byteLength - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.byteLength - }, sendHints.typedArray) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - this.#bufferedAmount += data.size - this.#sendQueue.add(data, () => { - this.#bufferedAmount -= data.size - }, sendHints.blob) - } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) - } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null - } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) - } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null - } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) - } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null - } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) - } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null - } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type - } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response, parsedExtensions) { - // processResponse is called when the "response's header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const maxPayloadSize = this[kController]?.dispatcher?.webSocketOptions?.maxPayloadSize - - const parser = new ByteParser(this, parsedExtensions, { - maxPayloadSize - }) - parser.on('drain', onParserDrain) - parser.on('error', onParserError.bind(this)) - - response.socket.ws = this - this[kByteParser] = parser - - this.#sendQueue = new SendQueue(response.socket) - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions - } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol - } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V, prefix, argument) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V, prefix, argument) -} - -// This implements the proposal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - defaultValue: () => new Array(0) - }, - { - key: 'dispatcher', - converter: webidl.converters.any, - defaultValue: () => getGlobalDispatcher() - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (ArrayBuffer.isView(V) || types.isArrayBuffer(V)) { - return webidl.converters.BufferSource(V) - } - } - - return webidl.converters.USVString(V) -} - -function onParserDrain () { - this.ws[kResponse].socket.resume() -} - -function onParserError (err) { - let message - let code - - if (err instanceof CloseEvent) { - message = err.reason - code = err.code - } else { - message = err.message - } - - fireEvent('error', this, () => new ErrorEvent('error', { error: err, message })) - - closeWebSocketConnection(this, code) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); - -/***/ }), - -/***/ 4434: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); - -/***/ }), - -/***/ 1943: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"); - -/***/ }), - -/***/ 8611: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); - -/***/ }), - -/***/ 5692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); - -/***/ }), - -/***/ 4589: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:assert"); - -/***/ }), - -/***/ 6698: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:async_hooks"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:buffer"); - -/***/ }), - -/***/ 7540: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:console"); - -/***/ }), - -/***/ 7598: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto"); - -/***/ }), - -/***/ 3053: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:diagnostics_channel"); - -/***/ }), - -/***/ 610: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:dns"); - -/***/ }), - -/***/ 8474: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); - -/***/ }), - -/***/ 7067: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http"); - -/***/ }), - -/***/ 2467: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:http2"); - -/***/ }), - -/***/ 7030: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); - -/***/ }), - -/***/ 643: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:perf_hooks"); - -/***/ }), - -/***/ 1792: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:querystring"); - -/***/ }), - -/***/ 7075: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); - -/***/ }), - -/***/ 1692: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:tls"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:url"); - -/***/ }), - -/***/ 7975: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); - -/***/ }), - -/***/ 3429: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util/types"); - -/***/ }), - -/***/ 5919: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:worker_threads"); - -/***/ }), - -/***/ 8522: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:zlib"); - -/***/ }), - -/***/ 857: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream"); - -/***/ }), - -/***/ 3193: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); - -/***/ }), - -/***/ 4756: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); - -/***/ }), - -/***/ 885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - - -/* eslint-disable no-var */ - -var reusify = __nccwpck_require__(3728) - -function fastqueue (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - if (!(_concurrency >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - - var cache = reusify(Task) - var queueHead = null - var queueTail = null - var _running = 0 - var errorHandler = null - - var self = { - push: push, - drain: noop, - saturated: noop, - pause: pause, - paused: false, - - get concurrency () { - return _concurrency - }, - set concurrency (value) { - if (!(value >= 1)) { - throw new Error('fastqueue concurrency must be equal to or greater than 1') - } - _concurrency = value - - if (self.paused) return - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - }, - - running: running, - resume: resume, - idle: idle, - length: length, - getQueue: getQueue, - unshift: unshift, - empty: noop, - kill: kill, - killAndDrain: killAndDrain, - error: error, - abort: abort - } - - return self - - function running () { - return _running - } - - function pause () { - self.paused = true - } - - function length () { - var current = queueHead - var counter = 0 - - while (current) { - current = current.next - counter++ - } - - return counter - } - - function getQueue () { - var current = queueHead - var tasks = [] - - while (current) { - tasks.push(current.value) - current = current.next - } - - return tasks - } - - function resume () { - if (!self.paused) return - self.paused = false - if (queueHead === null) { - _running++ - release() - return - } - for (; queueHead && _running < _concurrency;) { - _running++ - release() - } - } - - function idle () { - return _running === 0 && self.length() === 0 - } - - function push (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueTail) { - queueTail.next = current - queueTail = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function unshift (value, done) { - var current = cache.get() - - current.context = context - current.release = release - current.value = value - current.callback = done || noop - current.errorHandler = errorHandler - - if (_running >= _concurrency || self.paused) { - if (queueHead) { - current.next = queueHead - queueHead = current - } else { - queueHead = current - queueTail = current - self.saturated() - } - } else { - _running++ - worker.call(context, current.value, current.worked) - } - } - - function release (holder) { - if (holder) { - cache.release(holder) - } - var next = queueHead - if (next && _running <= _concurrency) { - if (!self.paused) { - if (queueTail === queueHead) { - queueTail = null - } - queueHead = next.next - next.next = null - worker.call(context, next.value, next.worked) - if (queueTail === null) { - self.empty() - } - } else { - _running-- - } - } else if (--_running === 0) { - self.drain() - } - } - - function kill () { - queueHead = null - queueTail = null - self.drain = noop - } - - function killAndDrain () { - queueHead = null - queueTail = null - self.drain() - self.drain = noop - } - - function abort () { - var current = queueHead - queueHead = null - queueTail = null - - while (current) { - var next = current.next - var callback = current.callback - var errorHandler = current.errorHandler - var val = current.value - var context = current.context - - // Reset the task state - current.value = null - current.callback = noop - current.errorHandler = null - - // Call error handler if present - if (errorHandler) { - errorHandler(new Error('abort'), val) - } - - // Call callback with error - callback.call(context, new Error('abort')) - - // Release the task back to the pool - current.release(current) - - current = next - } - - self.drain = noop - } - - function error (handler) { - errorHandler = handler - } -} - -function noop () {} - -function Task () { - this.value = null - this.callback = noop - this.next = null - this.release = noop - this.context = null - this.errorHandler = null - - var self = this - - this.worked = function worked (err, result) { - var callback = self.callback - var errorHandler = self.errorHandler - var val = self.value - self.value = null - self.callback = noop - if (self.errorHandler) { - errorHandler(err, val) - } - callback.call(self.context, err, result) - self.release(self) - } -} - -function queueAsPromised (context, worker, _concurrency) { - if (typeof context === 'function') { - _concurrency = worker - worker = context - context = null - } - - function asyncWrapper (arg, cb) { - worker.call(this, arg) - .then(function (res) { - cb(null, res) - }, cb) - } - - var queue = fastqueue(context, asyncWrapper, _concurrency) - - var pushCb = queue.push - var unshiftCb = queue.unshift - - queue.push = push - queue.unshift = unshift - queue.drained = drained - - return queue - - function push (value) { - var p = new Promise(function (resolve, reject) { - pushCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function unshift (value) { - var p = new Promise(function (resolve, reject) { - unshiftCb(value, function (err, result) { - if (err) { - reject(err) - return - } - resolve(result) - }) - }) - - // Let's fork the promise chain to - // make the error bubble up to the user but - // not lead to a unhandledRejection - p.catch(noop) - - return p - } - - function drained () { - var p = new Promise(function (resolve) { - process.nextTick(function () { - if (queue.idle()) { - resolve() - } else { - var previousDrain = queue.drain - queue.drain = function () { - if (typeof previousDrain === 'function') previousDrain() - resolve() - queue.drain = previousDrain - } - } - }) - }) - - return p - } -} - -module.exports = fastqueue -module.exports.promise = queueAsPromised - - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/"; -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - c: () => (/* binding */ mergeChangelogs) -}); - -;// CONCATENATED MODULE: external "node:fs/promises" -const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises"); -;// CONCATENATED MODULE: external "node:path" -const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); -// EXTERNAL MODULE: external "os" -var external_os_ = __nccwpck_require__(857); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/utils.js -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function utils_toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function utils_toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -//# sourceMappingURL=utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/command.js - - -/** - * Issues a command to the GitHub Actions runner - * - * @param command - The command name to issue - * @param properties - Additional properties for the command (key-value pairs) - * @param message - The message to include with the command - * @remarks - * This function outputs a specially formatted string to stdout that the Actions - * runner interprets as a command. These commands can control workflow behavior, - * set outputs, create annotations, mask values, and more. - * - * Command Format: - * ::name key=value,key=value::message - * - * @example - * ```typescript - * // Issue a warning annotation - * issueCommand('warning', {}, 'This is a warning message'); - * // Output: ::warning::This is a warning message - * - * // Set an environment variable - * issueCommand('set-env', { name: 'MY_VAR' }, 'some value'); - * // Output: ::set-env name=MY_VAR::some value - * - * // Add a secret mask - * issueCommand('add-mask', {}, 'secretValue123'); - * // Output: ::add-mask::secretValue123 - * ``` - * - * @internal - * This is an internal utility function that powers the public API functions - * such as setSecret, warning, error, and exportVariable. - */ -function command_issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + external_os_.EOL); -} -function command_issue(name, message = '') { - command_issueCommand(name, {}, message); -} -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map -;// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); -// EXTERNAL MODULE: external "fs" -var external_fs_ = __nccwpck_require__(9896); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/file-command.js -// For internal use, subject to change. -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ - - - - -function file_command_issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -function file_command_prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -//# sourceMappingURL=file-command.js.map -// EXTERNAL MODULE: external "path" -var external_path_ = __nccwpck_require__(6928); -// EXTERNAL MODULE: external "http" -var external_http_ = __nccwpck_require__(8611); -// EXTERNAL MODULE: external "https" -var external_https_ = __nccwpck_require__(5692); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/proxy.js -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); - } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); - } - } - else { - return undefined; - } -} -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperNoProxyItem === '*' || - upperReqHosts.some(x => x === upperNoProxyItem || - x.endsWith(`.${upperNoProxyItem}`) || - (upperNoProxyItem.startsWith('.') && - x.endsWith(`${upperNoProxyItem}`)))) { - return true; - } - } - return false; -} -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } -} -//# sourceMappingURL=proxy.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js -var node_modules_tunnel = __nccwpck_require__(7285); -// EXTERNAL MODULE: ../../node_modules/.pnpm/undici@6.25.0/node_modules/undici/index.js -var undici = __nccwpck_require__(9422); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/index.js -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function lib_getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = (/* unused pure expression or super */ null && (['OPTIONS', 'GET', 'DELETE', 'HEAD'])); -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - this.message.on('data', (chunk) => { - chunks.push(chunk); - }); - this.message.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - })); - }); - } -} -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -class lib_HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent); - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl_1, obj_1) { - return __awaiter(this, arguments, void 0, function* (requestUrl, obj, additionalHeaders = {}) { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = - this._getExistingOrDefaultContentTypeHeader(additionalHeaders, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - /** - * Gets an existing header value or returns a default. - * Handles converting number header values to strings since HTTP headers must be strings. - * Note: This returns string | string[] since some headers can have multiple values. - * For headers that must always be a single string (like Content-Type), use the - * specialized _getExistingOrDefaultContentTypeHeader method instead. - */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[header]; - if (headerValue) { - clientHeader = - typeof headerValue === 'number' ? headerValue.toString() : headerValue; - } - } - const additionalValue = additionalHeaders[header]; - if (additionalValue !== undefined) { - return typeof additionalValue === 'number' - ? additionalValue.toString() - : additionalValue; - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - /** - * Specialized version of _getExistingOrDefaultHeader for Content-Type header. - * Always returns a single string (not an array) since Content-Type should be a single value. - * Converts arrays to comma-separated strings and numbers to strings to ensure type safety. - * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers - * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). - */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys(this.requestOptions.headers)[Headers.ContentType]; - if (headerValue) { - if (typeof headerValue === 'number') { - clientHeader = String(headerValue); - } - else if (Array.isArray(headerValue)) { - clientHeader = headerValue.join(', '); - } - else { - clientHeader = headerValue; - } - } - } - const additionalValue = additionalHeaders[Headers.ContentType]; - // Return the first non-undefined value, converting numbers or arrays to strings if necessary - if (additionalValue !== undefined) { - if (typeof additionalValue === 'number') { - return String(additionalValue); - } - else if (Array.isArray(additionalValue)) { - return additionalValue.join(', '); - } - else { - return additionalValue; - } - } - if (clientHeader !== undefined) { - return clientHeader; - } - return _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}` - }))); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _getUserAgentWithOrchestrationId(userAgent) { - const baseUserAgent = userAgent || 'actions/http-client'; - const orchId = process.env['ACTIONS_ORCHESTRATION_ID']; - if (orchId) { - // Sanitize the orchestration ID to ensure it contains only valid characters - // Valid characters: 0-9, a-z, _, -, . - const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_'); - return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`; - } - return baseUserAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+http-client@4.0.1/node_modules/@actions/http-client/lib/auth.js -var auth_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class auth_BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return auth_awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -//# sourceMappingURL=auth.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/oidc-utils.js -var oidc_utils_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -class oidc_utils_OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new HttpClient('actions/oidc-client', [new BearerCredentialHandler(oidc_utils_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - var _a; - const httpclient = oidc_utils_OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return oidc_utils_awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = oidc_utils_OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - debug(`ID token url is ${id_token_url}`); - const id_token = yield oidc_utils_OidcClient.getCall(id_token_url); - setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -//# sourceMappingURL=oidc-utils.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/summary.js -var summary_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { access, appendFile, writeFile } = external_fs_.promises; -const SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -const SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return summary_awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, external_fs_.constants.R_OK | external_fs_.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return summary_awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return summary_awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(external_os_.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -const markdownSummary = (/* unused pure expression or super */ null && (_summary)); -const summary = (/* unused pure expression or super */ null && (_summary)); -//# sourceMappingURL=summary.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/path-utils.js - -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -//# sourceMappingURL=path-utils.js.map -// EXTERNAL MODULE: external "string_decoder" -var external_string_decoder_ = __nccwpck_require__(3193); -// EXTERNAL MODULE: external "events" -var external_events_ = __nccwpck_require__(4434); -;// CONCATENATED MODULE: external "child_process" -const external_child_process_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); -// EXTERNAL MODULE: external "assert" -var external_assert_ = __nccwpck_require__(2613); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io-util.js -var io_util_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const { chmod, copyFile, lstat, mkdir, open: io_util_open, readdir, rename, rm, rmdir, stat, symlink, unlink } = external_fs_.promises; -// export const {open} = 'fs' -const IS_WINDOWS = process.platform === 'win32'; -/** - * Custom implementation of readlink to ensure Windows junctions - * maintain trailing backslash for backward compatibility with Node.js < 24 - * - * In Node.js 20, Windows junctions (directory symlinks) always returned paths - * with trailing backslashes. Node.js 24 removed this behavior, which breaks - * code that relied on this format for path operations. - * - * This implementation restores the Node 20 behavior by adding a trailing - * backslash to all junction results on Windows. - */ -function readlink(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - const result = yield fs.promises.readlink(fsPath); - // On Windows, restore Node 20 behavior: add trailing backslash to all results - // since junctions on Windows are always directory links - if (IS_WINDOWS && !result.endsWith('\\')) { - return `${result}\\`; - } - return result; - }); -} -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -const UV_FS_O_EXLOCK = 0x10000000; -const READONLY = external_fs_.constants.O_RDONLY; -function exists(fsPath) { - return io_util_awaiter(this, void 0, void 0, function* () { - try { - yield stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; - } - throw err; - } - return true; - }); -} -function isDirectory(fsPath_1) { - return io_util_awaiter(this, arguments, void 0, function* (fsPath, useStat = false) { - const stats = useStat ? yield stat(fsPath) : yield lstat(fsPath); - return stats.isDirectory(); - }); -} -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return io_util_awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = external_path_.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = external_path_.dirname(filePath); - const upperName = external_path_.basename(filePath).toUpperCase(); - for (const actualName of yield readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = external_path_.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ''; - }); -} -function normalizeSeparators(p) { - p = p || ''; - if (IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && - process.getgid !== undefined && - stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && - process.getuid !== undefined && - stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -//# sourceMappingURL=io-util.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+io@3.0.2/node_modules/@actions/io/lib/io.js -var io_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; - } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } - } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield io_copyFile(source, newDest, force); - } - }); -} -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source_1, dest_1) { - return io_awaiter(this, arguments, void 0, function* (source, dest, options = {}) { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } - } - } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return io_awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); -} -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return io_awaiter(this, void 0, void 0, function* () { - ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ''; - }); -} -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return io_awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - // build the list of extensions to try - const extensions = []; - if (IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(external_path_.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (isRooted(tool)) { - const filePath = yield tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(external_path_.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(external_path_.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield tryGetExecutablePath(external_path_.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); -} -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return io_awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield io_copyFile(srcFile, destFile, force); - } - } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function io_copyFile(srcFile, destFile, force) { - return io_awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); - } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); -} -//# sourceMappingURL=io.js.map -;// CONCATENATED MODULE: external "timers" -const external_timers_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("timers"); -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/toolrunner.js -var toolrunner_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - - -/* eslint-disable @typescript-eslint/unbound-method */ -const toolrunner_IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends external_events_.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (toolrunner_IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(external_os_.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + external_os_.EOL.length); - n = s.indexOf(external_os_.EOL); - } - return s; - } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; - } - } - _getSpawnFileName() { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (toolrunner_IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; - } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; - } - } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; - } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; - } - else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split('').reverse().join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return toolrunner_awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (toolrunner_IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = external_path_.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield which(this.toolPath, true); - return new Promise((resolve, reject) => toolrunner_awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + external_os_.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = external_child_process_namespaceObject.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; - } - if (c === '\\' && escaped) { - append(c); - continue; - } - if (c === '\\' && inQuotes) { - escaped = true; - continue; - } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -class ExecState extends external_events_.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } - else if (this.processExited) { - this.timeout = (0,external_timers_namespaceObject.setTimeout)(ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; - } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); - } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+exec@3.0.0/node_modules/@actions/exec/lib/exec.js -var exec_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec_exec(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - return exec_awaiter(this, void 0, void 0, function* () { - var _a, _b; - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new StringDecoder('utf8'); - const stderrDecoder = new StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec_exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -//# sourceMappingURL=exec.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/platform.js -var platform_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - -const getWindowsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => platform_awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version - }; -}); -const platform = external_os_.platform(); -const arch = external_os_.arch(); -const isWindows = platform === 'win32'; -const isMacOS = platform === 'darwin'; -const isLinux = platform === 'linux'; -function getDetails() { - return platform_awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (isWindows - ? getWindowsInfo() - : isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform, - arch, - isWindows, - isMacOS, - isLinux }); - }); -} -//# sourceMappingURL=platform.js.map -;// CONCATENATED MODULE: ../../node_modules/.pnpm/@actions+core@3.0.1/node_modules/@actions/core/lib/core.js -var core_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - - - - - - -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return issueFileCommand('ENV', prepareKeyValueMessage(name, val)); - } - issueCommand('set-env', { name }, convertedVal); -} -/** - * Registers a secret which will get masked from logs - * - * @param secret - Value of the secret to be masked - * @remarks - * This function instructs the Actions runner to mask the specified value in any - * logs produced during the workflow run. Once registered, the secret value will - * be replaced with asterisks (***) whenever it appears in console output, logs, - * or error messages. - * - * This is useful for protecting sensitive information such as: - * - API keys - * - Access tokens - * - Authentication credentials - * - URL parameters containing signatures (SAS tokens) - * - * Note that masking only affects future logs; any previous appearances of the - * secret in logs before calling this function will remain unmasked. - * - * @example - * ```typescript - * // Register an API token as a secret - * const apiToken = "abc123xyz456"; - * setSecret(apiToken); - * - * // Now any logs containing this value will show *** instead - * console.log(`Using token: ${apiToken}`); // Outputs: "Using token: ***" - * ``` - */ -function core_setSecret(secret) { - issueCommand('add-mask', {}, secret); -} -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - issueFileCommand('PATH', inputPath); - } - else { - issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return issueFileCommand('OUTPUT', prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - issueCommand('set-output', { name }, toCommandValue(value)); -} -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - issue('echo', enabled ? 'on' : 'off'); -} -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -/** - * Writes debug message to user log - * @param message debug message - */ -function core_debug(message) { - issueCommand('debug', {}, message); -} -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_issueCommand('error', utils_toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - issueCommand('warning', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - issueCommand('notice', toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + external_os_.EOL); -} -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - issue('group', name); -} -/** - * End an output group. - */ -function endGroup() { - issue('endgroup'); -} -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return core_awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return issueFileCommand('STATE', prepareKeyValueMessage(name, value)); - } - issueCommand('save-state', { name }, toCommandValue(value)); -} -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -function getIDToken(aud) { - return core_awaiter(this, void 0, void 0, function* () { - return yield OidcClient.getIDToken(aud); - }); -} -/** - * Summary exports - */ - -/** - * @deprecated use core.summary - */ - -/** - * Path exports - */ - -/** - * Platform utilities exports - */ - -//# sourceMappingURL=core.js.map -// EXTERNAL MODULE: ../../node_modules/.pnpm/@manypkg+get-packages@2.2.2/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.cjs.js -var manypkg_get_packages_cjs = __nccwpck_require__(4344); -;// CONCATENATED MODULE: ./lib/build-packages/changeset-types.js -/* eslint-disable jsdoc/require-jsdoc */ -const messageTypes = [ - { - name: 'compat', - title: 'Compatibility Notes', - alternatives: ['compatibility', 'compatibility note', 'compat'] - }, - { - name: 'feat', - title: 'New Features', - alternatives: ['new', 'new functionality', 'feat'] - }, - { - name: 'fix', - title: 'Fixed Issues', - alternatives: ['bug', 'bug fix', 'fixed issue', 'fix', 'fix issue'] - }, - { - name: 'known-issue', - title: 'Known Issues', - alternatives: ['known issue'] - }, - { - name: 'impr', - title: 'Improvements', - alternatives: ['improvement', 'improv'] - }, - { - name: 'dep', - title: 'Updated Dependencies', - alternatives: ['dependency', 'dependency update'] - } -]; - -;// CONCATENATED MODULE: ./lib/build-packages/merge-and-write-changelogs/index.js -/* eslint-disable jsdoc/require-jsdoc */ - - - - - -function getPackageName(changelog) { - return changelog.split('\n')[0].split('/')[1]; -} -function splitByVersion(changelog) { - return changelog - .split('\n## ') - .slice(1) - .map(h2 => { - const [version, ...content] = h2.split('\n'); - return { - version, - content: content.join('\n').trim() - }; - }); -} -function getMessageType(matchedType) { - if (!matchedType) { - throw new Error('Missing message type'); - } - const type = messageTypes.find(({ name, alternatives }) => [name, ...alternatives].includes(matchedType.toLowerCase())); - if (!type) { - throw new Error(`Invalid message type: ${matchedType}`); - } - return type; -} -function getSummary(matchedSummary) { - const summary = matchedSummary?.trim(); - if (!summary) { - throw new Error('Empty or missing summary'); - } - return summary; -} -function parseContent(content, version, packageName) { - // Explanation: https://regex101.com/r/ikvIaa/2 - // Adapted ? to the original regex .*? to make it non-greedy - const contentRegex = /- ((?.*?):) (\[(?.*?)\])? ?(?[^]*?)(?=(\n- |\n### |$))/g; - info(`parsing content for ${packageName} v${version}`); - return [...content.matchAll(contentRegex)].map(({ groups }) => { - const type = getMessageType(groups?.type); - const summary = getSummary(groups?.summary); - return { - version, - summary, - packageNames: [packageName], - // TODO: add link to commit - commit: groups.commit ? `(${groups.commit})` : '', - type - }; - }); -} -function parseChangelog(changelog) { - const packageName = getPackageName(changelog); - const [latest] = splitByVersion(changelog); - return parseContent(latest.content, latest.version, packageName).flat(); -} -function formatMessagesOfType(messages, type) { - const formattedMessages = messages - .filter(msg => msg.type.name === type.name) - .map(msg => `- [${msg.packageNames.join(', ')}] ${msg.summary} ${msg.commit}${msg.dependencies || ''}`) - .join('\n'); - return `## ${type.title}\n\n${formattedMessages}`; -} -function mergeMessages(parsedMessages) { - return parsedMessages.reduce((prev, curr) => { - const sameMessage = prev.find(msg => msg.summary === curr.summary && - msg.dependencies === curr.dependencies && - msg.version === curr.version && - msg.type.name === curr.type.name); - if (sameMessage) { - sameMessage.packageNames.push(curr.packageNames[0]); - return prev; - } - return [...prev, curr]; - }, []); -} -async function formatChangelog(messages) { - if (!messages.length) { - throw new Error('No messages found in changelogs'); - } - return messageTypes - .filter(type => messages.some(msg => msg.type.name === type.name)) - .map(type => formatMessagesOfType(messages, type)) - .join('\n\n'); -} -async function getPublicChangelogs() { - const { packages } = await (0,manypkg_get_packages_cjs.getPackages)(process.cwd()); - const pathsToPublicLogs = packages - .filter(({ packageJson }) => !packageJson.private) - .map(({ relativeDir }) => (0,external_node_path_namespaceObject.resolve)(relativeDir, 'CHANGELOG.md')); - info(`changelogs to merge: ${pathsToPublicLogs.join(', ')}`); - return Promise.all(pathsToPublicLogs.map(async (file) => (0,promises_namespaceObject.readFile)(file, { encoding: 'utf8' }))); -} -async function writeChangelog(changelog) { - if (!changelog) { - throw new Error('CHANGELOG environment variable not set.'); - } - if (!process.env.VERSION) { - throw new Error('VERSION environment variable not set.'); - } - const unifiedChangelog = await (0,promises_namespaceObject.readFile)('CHANGELOG.md', { encoding: 'utf8' }); - await (0,promises_namespaceObject.writeFile)('CHANGELOG.md', unifiedChangelog.split('\n').slice(0, 30).join('\n') + - '\n' + - `# ${process.env.VERSION}` + - '\n' + - changelog + - '\n\n' + - unifiedChangelog.split('\n').slice(30).join('\n'), { encoding: 'utf8' }); -} -async function mergeChangelogs() { - const changelogs = await getPublicChangelogs(); - const mergedChangelog = await formatChangelog(mergeMessages(changelogs.map(log => parseChangelog(log)).flat())); - await writeChangelog(mergedChangelog); -} -mergeChangelogs().catch(error => { - setFailed(error.message); -}); - -var __webpack_exports__mergeChangelogs = __webpack_exports__.c; -export { __webpack_exports__mergeChangelogs as mergeChangelogs }; diff --git a/.gitignore b/.gitignore index b0f52d11c0..b4a18c21fa 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules .vscode build/** dist +!.github/actions/*/dist .next/** build-packages/**/lib .DS_Store diff --git a/build-packages/changesets-fixed-version-bump/package.json b/build-packages/changesets-fixed-version-bump/package.json index 08917d6f53..c1759df6fd 100644 --- a/build-packages/changesets-fixed-version-bump/package.json +++ b/build-packages/changesets-fixed-version-bump/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/build-packages/changesets-fixed-version-bump/index.js --out ../../.github/actions/changesets-fixed-version-bump/", + "postcompile": "rolldown -c rolldown.config.ts", "lint": "eslint --ignore-pattern '!index.ts' && prettier --check **/*.ts", "lint:fix": "eslint --ignore-pattern '!index.ts' --fix --quiet && prettier --write **/*.ts", "check:dependencies": "depcheck --skip-missing=true .", @@ -21,11 +21,11 @@ }, "devDependencies": { "@sap-cloud-sdk/test-util-build-internal": "workspace:^", - "@vercel/ncc": "^0.38.4", "depcheck": "^1.4.7", "eslint": "^10.2.1", "memfs": "^4.57.2", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/changesets-fixed-version-bump/rolldown.config.ts b/build-packages/changesets-fixed-version-bump/rolldown.config.ts new file mode 100644 index 0000000000..be8557dca3 --- /dev/null +++ b/build-packages/changesets-fixed-version-bump/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('changesets-fixed-version-bump'); diff --git a/build-packages/check-license/package.json b/build-packages/check-license/package.json index 259aa6fa2a..aad8e85505 100644 --- a/build-packages/check-license/package.json +++ b/build-packages/check-license/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/build-packages/check-license/index.js --out ../../.github/actions/check-license/", + "postcompile": "rolldown -c rolldown.config.ts", "lint": "eslint && prettier --check **/*.ts", "lint:fix": "eslint --fix --quiet && prettier --write **/*.ts", "check:dependencies": "depcheck --skip-missing=true .", @@ -18,10 +18,11 @@ "@blueoak/list": "^15.0.0" }, "devDependencies": { - "@vercel/ncc": "^0.38.4", + "@sap-cloud-sdk/test-util-build-internal": "workspace:^", "depcheck": "^1.4.7", "eslint": "^10.2.1", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/check-license/rolldown.config.ts b/build-packages/check-license/rolldown.config.ts new file mode 100644 index 0000000000..f68c2707c0 --- /dev/null +++ b/build-packages/check-license/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('check-license'); diff --git a/build-packages/check-pr/package.json b/build-packages/check-pr/package.json index f886d9efaa..7fee17a3a0 100644 --- a/build-packages/check-pr/package.json +++ b/build-packages/check-pr/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/check-pr/index.js --out ../../.github/actions/check-pr/", + "postcompile": "rolldown -c rolldown.config.ts", "test": "pnpm run test:unit", "test:unit": "NODE_OPTIONS=--experimental-vm-modules pnpm exec jest", "lint": "eslint --ignore-pattern '!index.ts' && prettier --check **/*.ts", @@ -21,11 +21,11 @@ }, "devDependencies": { "@sap-cloud-sdk/test-util-build-internal": "workspace:^", - "@vercel/ncc": "^0.38.4", "depcheck": "^1.4.7", "eslint": "^10.2.1", "memfs": "^4.57.2", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/check-pr/rolldown.config.ts b/build-packages/check-pr/rolldown.config.ts new file mode 100644 index 0000000000..cec61a1320 --- /dev/null +++ b/build-packages/check-pr/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('check-pr'); diff --git a/build-packages/check-public-api/index.ts b/build-packages/check-public-api/index.ts index 257c5b0245..f6b398fd0c 100644 --- a/build-packages/check-public-api/index.ts +++ b/build-packages/check-public-api/index.ts @@ -5,15 +5,12 @@ import { tmpdir } from 'node:os'; import { glob } from 'glob'; import { info, warning, error, getInput, setFailed } from '@actions/core'; import { flatten } from '@sap-cloud-sdk/util'; -// import directly from the files to avoid importing non-esm compatible functionality (e.g. __dirname) import { + defaultPrettierConfig, readCompilerOptions, readIncludeExcludeWithDefaults, transpileDirectory - // eslint-disable-next-line import-x/no-internal-modules -} from '@sap-cloud-sdk/generator-common/dist/compiler.js'; -// eslint-disable-next-line import-x/no-internal-modules -import { defaultPrettierConfig } from '@sap-cloud-sdk/generator-common/dist/file-writer/create-file.js'; +} from '@sap-cloud-sdk/generator-common/internal'; import { getPackages } from '@manypkg/get-packages'; import type { CompilerOptions } from 'typescript'; diff --git a/build-packages/check-public-api/package.json b/build-packages/check-public-api/package.json index 950f7d3d67..27e8ed0309 100644 --- a/build-packages/check-public-api/package.json +++ b/build-packages/check-public-api/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/index.js --external prettier --external typescript --out ../../.github/actions/check-public-api/", + "postcompile": "rolldown -c rolldown.config.ts", "test": "pnpm run test:unit", "test:unit": "NODE_OPTIONS=--experimental-vm-modules pnpm exec jest", "lint": "eslint && prettier --check **/*.ts", @@ -25,11 +25,11 @@ }, "devDependencies": { "@sap-cloud-sdk/test-util-build-internal": "workspace:^", - "@vercel/ncc": "^0.38.4", "depcheck": "^1.4.7", "eslint": "^10.2.1", "memfs": "^4.57.2", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/check-public-api/rolldown.config.ts b/build-packages/check-public-api/rolldown.config.ts new file mode 100644 index 0000000000..df3b175524 --- /dev/null +++ b/build-packages/check-public-api/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('check-public-api'); diff --git a/build-packages/check-public-api/tsconfig.json b/build-packages/check-public-api/tsconfig.json index 002f463c86..6610582991 100644 --- a/build-packages/check-public-api/tsconfig.json +++ b/build-packages/check-public-api/tsconfig.json @@ -8,7 +8,8 @@ "skipLibCheck": true, "isolatedModules": true, "outDir": "./lib", - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "customConditions": ["workspace"] }, "include": ["*.ts"], "exclude": [] diff --git a/build-packages/get-changelog/package.json b/build-packages/get-changelog/package.json index e4615a4091..b0d3836487 100644 --- a/build-packages/get-changelog/package.json +++ b/build-packages/get-changelog/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/build-packages/get-changelog/index.js --out ../../.github/actions/get-changelog/", + "postcompile": "rolldown -c rolldown.config.ts", "lint": "eslint --ignore-pattern '!index.ts' && prettier --check **/*.ts", "lint:fix": "eslint --ignore-pattern '!index.ts' --fix --quiet && prettier --write **/*.ts", "check:dependencies": "depcheck --skip-missing=true .", @@ -17,10 +17,11 @@ "@actions/core": "^3.0.0" }, "devDependencies": { - "@vercel/ncc": "^0.38.4", + "@sap-cloud-sdk/test-util-build-internal": "workspace:^", "depcheck": "^1.4.7", "eslint": "^10.2.1", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/get-changelog/rolldown.config.ts b/build-packages/get-changelog/rolldown.config.ts new file mode 100644 index 0000000000..35e01b6b4d --- /dev/null +++ b/build-packages/get-changelog/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('get-changelog'); diff --git a/build-packages/merge-and-write-changelogs/package.json b/build-packages/merge-and-write-changelogs/package.json index 9116f1ea3e..963db58285 100644 --- a/build-packages/merge-and-write-changelogs/package.json +++ b/build-packages/merge-and-write-changelogs/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "compile": "tsc -p tsconfig.json", - "postcompile": "ncc build lib/build-packages/merge-and-write-changelogs/index.js --out ../../.github/actions/merge-and-write-changelogs/", + "postcompile": "rolldown -c rolldown.config.ts", "lint": "eslint --ignore-pattern '!index.ts' && prettier --check **/*.ts", "lint:fix": "eslint --ignore-pattern '!index.ts' --fix --quiet && prettier --write **/*.ts", "check:dependencies": "depcheck --skip-missing=true .", @@ -18,10 +18,11 @@ "@manypkg/get-packages": "^2.2.2" }, "devDependencies": { - "@vercel/ncc": "^0.38.4", + "@sap-cloud-sdk/test-util-build-internal": "workspace:^", "depcheck": "^1.4.7", "eslint": "^10.2.1", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/build-packages/merge-and-write-changelogs/rolldown.config.ts b/build-packages/merge-and-write-changelogs/rolldown.config.ts new file mode 100644 index 0000000000..d00445ec4d --- /dev/null +++ b/build-packages/merge-and-write-changelogs/rolldown.config.ts @@ -0,0 +1,3 @@ +import { defineActionConfig } from '@sap-cloud-sdk/test-util-build-internal'; + +export default defineActionConfig('merge-and-write-changelogs'); diff --git a/build-packages/test-utils/index.ts b/build-packages/test-utils/index.ts index be59dc65a2..d2fdd27190 100644 --- a/build-packages/test-utils/index.ts +++ b/build-packages/test-utils/index.ts @@ -1,4 +1,7 @@ +// eslint-disable-next-line import-x/no-internal-modules +import { replacePlugin } from 'rolldown/plugins'; import type { jest } from '@jest/globals'; +import type { RolldownOptions } from 'rolldown'; /** * Mock all `fs` module variants with pure memfs using `jest.unstable_mockModule` (ESM). @@ -35,3 +38,38 @@ export function mockFsWithMemfs(j: typeof jest): void { })) ); } + +/** + * Returns the standard rolldown config for bundling a GitHub Action. + * @param actionName - The action directory name under `.github/actions/`. + * @internal + */ +export function defineActionConfig(actionName: string): RolldownOptions { + const actionDir = `../../.github/actions/${actionName}`; + + return { + input: 'index.ts', + platform: 'node', + plugins: [ + // Shims CJS-specific globals like `__dirname` and `__filename` for ESM output bundles. + replacePlugin( + { + __dirname: 'import.meta.dirname', + __filename: 'import.meta.filename' + }, + { + preventAssignment: true + } + ) + ], + resolve: { + conditionNames: ['import', 'default', 'workspace'] + }, + output: { + dir: `${actionDir}/dist`, + cleanDir: true, + minifyInternalExports: false, + format: 'esm' + } + }; +} diff --git a/build-packages/test-utils/package.json b/build-packages/test-utils/package.json index 4c4e4a65bb..82d061e0fb 100644 --- a/build-packages/test-utils/package.json +++ b/build-packages/test-utils/package.json @@ -24,6 +24,7 @@ "depcheck": "^1.4.7", "eslint": "^10.2.1", "prettier": "^3.8.1", + "rolldown": "1.1.2", "typescript": "~5.9.3" } } diff --git a/package.json b/package.json index 85ceb7f347..c067550c64 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,9 @@ "checks": "turbo run check && pnpm run check:circular && pnpm run check:license && pnpm run check:test-service", "check:circular": "madge --extensions ts --ts-config=./tsconfig.json --circular --exclude 'dist|test-packages|connectivity/src/scp-cf/environment-accessor.ts|http-client/src/csrf-token-header.ts' ./packages", "check:dependencies": "turbo run check:dependencies", - "check:license": "node ./.github/actions/check-license/index.js", + "check:license": "node ./.github/actions/check-license/index.mjs", "check:test-service": "pnpm run generate && pnpm exec ts-node scripts/check-test-service-for-changes.ts", - "check:public-api": "INPUT_FORCE_INTERNAL_EXPORTS=true INPUT_EXCLUDED_PACKAGES=eslint-config,util,test-util node ./.github/actions/check-public-api/index.js", + "check:public-api": "INPUT_FORCE_INTERNAL_EXPORTS=true INPUT_EXCLUDED_PACKAGES=eslint-config,util,test-util node ./.github/actions/check-public-api/index.mjs", "connectivity": "pnpm --filter @sap-cloud-sdk/connectivity", "eslint-config": "pnpm --filter @sap-cloud-sdk/eslint-config", "generator": "pnpm --filter @sap-cloud-sdk/generator", diff --git a/packages/connectivity/internal.d.ts b/packages/connectivity/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/connectivity/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/connectivity/internal.js b/packages/connectivity/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/connectivity/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/connectivity/package.json b/packages/connectivity/package.json index 32b2007c63..8054f278c4 100644 --- a/packages/connectivity/package.json +++ b/packages/connectivity/package.json @@ -12,6 +12,22 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + }, + "./INTERNAL_ONLY/scp-cf/token-accessor": { + "workspace": { + "types": "./src/scp-cf/token-accessor.ts", + "default": "./src/scp-cf/token-accessor.ts" + } + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +35,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/connectivity/src/scp-cf/destination/destination-service.spec.ts b/packages/connectivity/src/scp-cf/destination/destination-service.spec.ts index 6101921d95..8bd44cad68 100644 --- a/packages/connectivity/src/scp-cf/destination/destination-service.spec.ts +++ b/packages/connectivity/src/scp-cf/destination/destination-service.spec.ts @@ -1,5 +1,9 @@ import * as jwt123 from 'jsonwebtoken'; import nock from 'nock'; +jest.mock('@sap-cloud-sdk/resilience/internal', () => ({ + __esModule: true, + ...jest.requireActual('@sap-cloud-sdk/resilience/internal') +})); import * as resilienceMethods from '@sap-cloud-sdk/resilience/internal'; import { circuitBreakers } from '@sap-cloud-sdk/resilience/internal'; import axios from 'axios'; diff --git a/packages/generator-common/internal.d.ts b/packages/generator-common/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/generator-common/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/generator-common/internal.js b/packages/generator-common/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/generator-common/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/generator-common/package.json b/packages/generator-common/package.json index d1ddd3ee21..f47519256d 100644 --- a/packages/generator-common/package.json +++ b/packages/generator-common/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/generator-common/src/file-writer/create-file.ts b/packages/generator-common/src/file-writer/create-file.ts index 89fcd4230e..32fd0dbf0d 100644 --- a/packages/generator-common/src/file-writer/create-file.ts +++ b/packages/generator-common/src/file-writer/create-file.ts @@ -161,14 +161,14 @@ export async function createFile( encoding: 'utf8', flag: overwrite ? 'w' : 'wx' }); - } catch (err) { + } catch (err: unknown) { const recommendation = - err.code === 'EEXIST' && !overwrite + (err as Record).code === 'EEXIST' && !overwrite ? ' File already exists. If you want to allow overwriting files, enable the `overwrite` flag.' : ''; throw new ErrorWithCause( `Could not write file "${fileName}".${recommendation}`, - err + err as Error ); } } diff --git a/packages/generator-common/src/ts-config.ts b/packages/generator-common/src/ts-config.ts index f744f878f6..4fc24c64b5 100644 --- a/packages/generator-common/src/ts-config.ts +++ b/packages/generator-common/src/ts-config.ts @@ -10,13 +10,13 @@ export const defaultTsConfig = ( ): Record => ({ compilerOptions: { target: 'es2021', - module: generateESM ? 'nodenext' : 'commonjs', + module: generateESM ? 'nodenext' : 'node16', lib: ['esnext'], declaration: true, declarationMap: false, sourceMap: true, diagnostics: true, - moduleResolution: generateESM ? 'nodenext' : 'node', + moduleResolution: generateESM ? 'nodenext' : 'node16', esModuleInterop: true, inlineSources: false, strict: true diff --git a/packages/generator/internal.d.ts b/packages/generator/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/generator/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/generator/internal.js b/packages/generator/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/generator/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/generator/package.json b/packages/generator/package.json index b60ff15d12..b5699b27ae 100644 --- a/packages/generator/package.json +++ b/packages/generator/package.json @@ -12,6 +12,22 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + }, + "./INTERNAL_ONLY/test/test-util/create-generator-options": { + "workspace": { + "types": "./test/test-util/create-generator-options.ts", + "default": "./test/test-util/create-generator-options.ts" + } + } + }, "bin": { "generate-odata-client": "./dist/cli.js" }, @@ -22,9 +38,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.d.ts", - "internal.js" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/generator/src/generator.spec.ts b/packages/generator/src/generator.spec.ts index 90b71b6218..ec6ff73a2a 100644 --- a/packages/generator/src/generator.spec.ts +++ b/packages/generator/src/generator.spec.ts @@ -8,8 +8,10 @@ import { transports } from 'winston'; import { vol } from 'memfs'; import prettier from 'prettier'; import { createLogger } from '@sap-cloud-sdk/util'; -import { getInputFilePaths } from '@sap-cloud-sdk/generator-common/dist/options-parser'; -import { getRelPathWithPosixSeparator } from '@sap-cloud-sdk/generator-common/internal'; +import { + getInputFilePaths, + getRelPathWithPosixSeparator +} from '@sap-cloud-sdk/generator-common/internal'; import { createOptions, createParsedOptions diff --git a/packages/generator/src/service-base-path.spec.ts b/packages/generator/src/service-base-path.spec.ts index c8fc5f26b5..5692988c0b 100644 --- a/packages/generator/src/service-base-path.spec.ts +++ b/packages/generator/src/service-base-path.spec.ts @@ -1,6 +1,6 @@ import { createLogger } from '@sap-cloud-sdk/util'; import { getBasePath } from './service-base-path'; -import type { ServiceOptions } from '@sap-cloud-sdk/generator-common/dist/options-per-service'; +import type { ServiceOptions } from '@sap-cloud-sdk/generator-common/internal'; describe('options-per-service', () => { it('gets basePath from optionsPerService over edmx self link and swagger', () => { diff --git a/packages/generator/src/service-generator.spec.ts b/packages/generator/src/service-generator.spec.ts index 7ab1d545b0..4452a9c04f 100644 --- a/packages/generator/src/service-generator.spec.ts +++ b/packages/generator/src/service-generator.spec.ts @@ -9,8 +9,10 @@ import { createParsedOptions } from '../test/test-util/create-generator-options' import { oDataServiceSpecs } from '../../../test-resources/odata-service-specs'; import { parseAllServices, parseService } from './service-generator'; import type { VdmProperty } from './vdm-types'; -import type { OptionsPerService } from '@sap-cloud-sdk/generator-common/internal'; -import type { ServiceOptions } from '@sap-cloud-sdk/generator-common/dist/options-per-service'; +import type { + OptionsPerService, + ServiceOptions +} from '@sap-cloud-sdk/generator-common/internal'; describe('service-generator', () => { describe('v2', () => { diff --git a/packages/http-client/internal.d.ts b/packages/http-client/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/http-client/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/http-client/internal.js b/packages/http-client/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/http-client/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/http-client/package.json b/packages/http-client/package.json index 23517898a4..b750eb832f 100644 --- a/packages/http-client/package.json +++ b/packages/http-client/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/odata-common/internal.d.ts b/packages/odata-common/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/odata-common/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/odata-common/internal.js b/packages/odata-common/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/odata-common/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/odata-common/package.json b/packages/odata-common/package.json index 65da68815b..c76d972ea6 100644 --- a/packages/odata-common/package.json +++ b/packages/odata-common/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/odata-v2/internal.d.ts b/packages/odata-v2/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/odata-v2/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/odata-v2/internal.js b/packages/odata-v2/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/odata-v2/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/odata-v2/package.json b/packages/odata-v2/package.json index bcc86eb5aa..efb6e7ecae 100644 --- a/packages/odata-v2/package.json +++ b/packages/odata-v2/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/odata-v2/src/request-builder/get-all-request-builder.spec.ts b/packages/odata-v2/src/request-builder/get-all-request-builder.spec.ts index 96addef343..0523a49c47 100644 --- a/packages/odata-v2/src/request-builder/get-all-request-builder.spec.ts +++ b/packages/odata-v2/src/request-builder/get-all-request-builder.spec.ts @@ -1,9 +1,9 @@ import nock from 'nock'; import * as httpClient from '@sap-cloud-sdk/http-client'; -import { oDataTypedClientParameterEncoder } from '@sap-cloud-sdk/http-client/dist/http-client'; +import { oDataTypedClientParameterEncoder } from '@sap-cloud-sdk/http-client/internal'; import { asc, desc } from '@sap-cloud-sdk/odata-common'; import { timeout } from '@sap-cloud-sdk/resilience'; -import { parseDestination } from '@sap-cloud-sdk/connectivity/src/scp-cf/destination/destination'; +import { parseDestination } from '@sap-cloud-sdk/connectivity/internal'; import { defaultDestination, mockCountRequest, diff --git a/packages/odata-v4/internal.d.ts b/packages/odata-v4/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/odata-v4/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/odata-v4/internal.js b/packages/odata-v4/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/odata-v4/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/odata-v4/package.json b/packages/odata-v4/package.json index 7e52c9b912..e5ab746ae3 100644 --- a/packages/odata-v4/package.json +++ b/packages/odata-v4/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/openapi-generator/internal.d.ts b/packages/openapi-generator/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/openapi-generator/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/openapi-generator/internal.js b/packages/openapi-generator/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/openapi-generator/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/openapi-generator/package.json b/packages/openapi-generator/package.json index 2670f09cf5..ffdfcec31d 100644 --- a/packages/openapi-generator/package.json +++ b/packages/openapi-generator/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "bin": { "openapi-generator": "./dist/cli.js" }, @@ -19,9 +29,7 @@ "access": "public" }, "files": [ - "dist", - "internal.d.ts", - "internal.js" + "dist" ], "repository": { "type": "git", diff --git a/packages/openapi-generator/src/generator.spec.ts b/packages/openapi-generator/src/generator.spec.ts index aa8f1d7915..8026a04013 100644 --- a/packages/openapi-generator/src/generator.spec.ts +++ b/packages/openapi-generator/src/generator.spec.ts @@ -10,8 +10,8 @@ import { getInputFilePaths } from '@sap-cloud-sdk/generator-common/internal'; import { emptyDocument } from '../test/test-util'; import { generate } from './generator'; -jest.mock('../../generator-common/internal', () => { - const actual = jest.requireActual('../../generator-common/internal'); +jest.mock('@sap-cloud-sdk/generator-common/internal', () => { + const actual = jest.requireActual('@sap-cloud-sdk/generator-common/internal'); return { ...actual, getSdkVersion: async () => '1.2.3' }; }); diff --git a/packages/openapi-generator/src/parser/document.spec.ts b/packages/openapi-generator/src/parser/document.spec.ts index c0225f0a06..a28dfaa681 100644 --- a/packages/openapi-generator/src/parser/document.spec.ts +++ b/packages/openapi-generator/src/parser/document.spec.ts @@ -1,7 +1,7 @@ import { emptyDocument } from '../../test/test-util'; import { parseOpenApiDocument } from './document'; import * as api from './api'; -import type { ServiceOptions } from '@sap-cloud-sdk/generator-common/dist/options-per-service'; +import type { ServiceOptions } from '@sap-cloud-sdk/generator-common/internal'; import type { OpenAPIV3 } from 'openapi-types'; const options = { strictNaming: true, schemaPrefix: '', resolveExternal: true }; diff --git a/packages/openapi/internal.d.ts b/packages/openapi/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/openapi/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/openapi/internal.js b/packages/openapi/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/openapi/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/openapi/package.json b/packages/openapi/package.json index da9da1a815..9c2b60afde 100644 --- a/packages/openapi/package.json +++ b/packages/openapi/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/openapi/src/openapi-request-builder.spec.ts b/packages/openapi/src/openapi-request-builder.spec.ts index bd28749efd..86d1f7ccb1 100644 --- a/packages/openapi/src/openapi-request-builder.spec.ts +++ b/packages/openapi/src/openapi-request-builder.spec.ts @@ -1,4 +1,8 @@ import nock from 'nock'; +jest.mock('@sap-cloud-sdk/resilience/internal', () => ({ + __esModule: true, + ...jest.requireActual('@sap-cloud-sdk/resilience/internal') +})); import * as httpClient from '@sap-cloud-sdk/http-client'; import { sanitizeDestination } from '@sap-cloud-sdk/connectivity'; import { parseDestination } from '@sap-cloud-sdk/connectivity/internal'; diff --git a/packages/resilience/internal.d.ts b/packages/resilience/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/resilience/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/resilience/internal.js b/packages/resilience/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/resilience/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/resilience/package.json b/packages/resilience/package.json index 50c9c8c42a..1f50fe39ff 100644 --- a/packages/resilience/package.json +++ b/packages/resilience/package.json @@ -13,6 +13,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -20,9 +30,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/packages/resilience/src/middleware.spec.ts b/packages/resilience/src/middleware.spec.ts index f9b04acd2a..774f46ff6b 100644 --- a/packages/resilience/src/middleware.spec.ts +++ b/packages/resilience/src/middleware.spec.ts @@ -1,4 +1,4 @@ -import { createLogger } from '@sap-cloud-sdk/util/dist/logger'; +import { createLogger } from '@sap-cloud-sdk/util'; import { executeWithMiddleware } from './middleware'; import type { MiddlewareContext, MiddlewareOptions } from './middleware'; diff --git a/packages/temporal-de-serializers/internal.d.ts b/packages/temporal-de-serializers/internal.d.ts deleted file mode 100644 index daf2ce5e82..0000000000 --- a/packages/temporal-de-serializers/internal.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// eslint-disable-next-line import-x/no-internal-modules -export * from './dist/internal'; -// # sourceMappingURL=internal.d.ts.map diff --git a/packages/temporal-de-serializers/internal.js b/packages/temporal-de-serializers/internal.js deleted file mode 100644 index 065a924587..0000000000 --- a/packages/temporal-de-serializers/internal.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; -function __export(m) { - for (const p in m) { - if (!exports.hasOwnProperty(p)) { - exports[p] = m[p]; - } - } -} -Object.defineProperty(exports, '__esModule', { value: true }); -/** - * @packageDocumentation - * @experimental The internal module is related to sdk-metadata types which are used only internally. - */ -__export(require('./dist/internal')); -// # sourceMappingURL=internal.js.map diff --git a/packages/temporal-de-serializers/package.json b/packages/temporal-de-serializers/package.json index d84cd641b3..ca016f7f8c 100644 --- a/packages/temporal-de-serializers/package.json +++ b/packages/temporal-de-serializers/package.json @@ -12,6 +12,16 @@ ], "main": "./dist/index.js", "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal": { + "types": "./dist/internal.d.ts", + "default": "./dist/internal.js" + } + }, "publishConfig": { "access": "public" }, @@ -19,9 +29,7 @@ "dist/**/*.js", "dist/**/*.js.map", "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "internal.js", - "internal.d.ts" + "dist/**/*.d.ts.map" ], "repository": { "type": "git", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 542c1e64e5..76570a0ad8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,9 +120,6 @@ importers: '@sap-cloud-sdk/test-util-build-internal': specifier: workspace:^ version: link:../test-utils - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -135,6 +132,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -148,9 +148,9 @@ importers: specifier: ^15.0.0 version: 15.0.0 devDependencies: - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 + '@sap-cloud-sdk/test-util-build-internal': + specifier: workspace:^ + version: link:../test-utils depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -160,6 +160,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -176,9 +179,6 @@ importers: '@sap-cloud-sdk/test-util-build-internal': specifier: workspace:^ version: link:../test-utils - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -191,6 +191,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -219,9 +222,6 @@ importers: '@sap-cloud-sdk/test-util-build-internal': specifier: workspace:^ version: link:../test-utils - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -231,6 +231,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -241,9 +244,9 @@ importers: specifier: ^3.0.0 version: 3.0.1 devDependencies: - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 + '@sap-cloud-sdk/test-util-build-internal': + specifier: workspace:^ + version: link:../test-utils depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -253,6 +256,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -266,9 +272,9 @@ importers: specifier: ^2.2.2 version: 2.2.2 devDependencies: - '@vercel/ncc': - specifier: ^0.38.4 - version: 0.38.4 + '@sap-cloud-sdk/test-util-build-internal': + specifier: workspace:^ + version: link:../test-utils depcheck: specifier: ^1.4.7 version: 1.4.7 @@ -278,6 +284,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -300,6 +309,9 @@ importers: prettier: specifier: ^3.8.1 version: 3.8.4 + rolldown: + specifier: 1.1.2 + version: 1.1.2 typescript: specifier: ~5.9.3 version: 5.9.3 @@ -1560,12 +1572,21 @@ packages: '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + '@emnapi/core@1.11.1': + resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} + '@emnapi/runtime@1.10.0': resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + '@emnapi/runtime@1.11.1': + resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} + '@emnapi/wasi-threads@1.2.1': resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} + '@es-joy/jsdoccomment@0.87.0': resolution: {integrity: sha512-mFXZloZMzuJZXSHUmAFu/pXTk0ZJTJBluuAkrvbzidpTN8W6F2bpRFuedSH+85kbdlRLJqc+gfN+kD3JOLJK5g==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -1951,6 +1972,12 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 + '@napi-rs/wasm-runtime@1.1.5': + resolution: {integrity: sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + '@nodable/entities@2.2.0': resolution: {integrity: sha512-9uGyhaQavEUMC8AIddIjau4NsnsXhou+j5sBAGojCM1oxmQpVKTWR/9JxABD6UAv12vpIms55fPZKFQEhG6uBg==} @@ -2017,6 +2044,9 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@oxc-project/types@0.137.0': + resolution: {integrity: sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==} + '@package-json/types@0.0.12': resolution: {integrity: sha512-uu43FGU34B5VM9mCNjXCwLaGHYjXdNincqKLaraaCW+7S2+SmiBg1Nv8bPnmschrIfZmfKNY9f3fC376MRrObw==} @@ -2040,6 +2070,104 @@ packages: '@pm2/pm2-version-check@1.0.4': resolution: {integrity: sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==} + '@rolldown/binding-android-arm64@1.1.2': + resolution: {integrity: sha512-2cZ+7xRS+DBcuJBJKnfzsbleumJhBqSlJVpuzHC0nTqfd3QQ7Vx2/x5YR/D7cBamKSeWplwo82Fn9lqYUDEMfA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.1.2': + resolution: {integrity: sha512-RkPMJnygxsgOYdkfqgpwY0/Fzm8d0VQe6HGU2/B00Xa9eqdLbrII+DOKAodbJAn3ZL1AJxGHkZRPYazgGY6Ljw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.1.2': + resolution: {integrity: sha512-Uiczh6vFhwyfd7WNe7Q7mCA4KxAiLdz7jPE/WGizfRpIieoyFuNVMmM8HqZ9HwudTkY6/AeMQwlNJ9NJijguWw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.1.2': + resolution: {integrity: sha512-+TpdtTRgHiJFjCVFbw311SuLk3KfytPOQQn+VlAEv+gBxYPtL7E6JS9e/tk+8CwxhIZvemJKo4rTKgfWNsKkkA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.1.2': + resolution: {integrity: sha512-4lv1/tkmi7ueIVHnyreaOeUpiZP26BH9rRy6hoYfR9310A2B9nUEVRDvBx69vx64Nr3eTPPRkyciqJJs+j9Jmw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.1.2': + resolution: {integrity: sha512-gBSUVO0eaWgw1JMjK3gB8BMlX2Mk148s2lTiVT3e9vjVxbl7UDfMWWY8CfIaaqiXuM9fVTMxIpUz6CAo/B6Vlw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.1.2': + resolution: {integrity: sha512-LjQP/iZLBu8o8PjIfk4x3At0/mT6h282pvz8Z5LAyhGbu/kDezyO7ea62rF5uoqmgnIYqbN/MqJ3Si3Aymi7xQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.1.2': + resolution: {integrity: sha512-X/7bVLWelEsbyWDUSXt7zVsTniLLPIY2n1rH58qr78l9i7MNbbxBWD8gI2vRfBWf4NUXJCUuQnfZDsp32LqsfQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.1.2': + resolution: {integrity: sha512-gb6dYKW/1KDorGXyy48glEBJs/sxVSC5pcVrox/pFGV4mvwSFeg2sK5L2tRkVsVlh7kueqOgg4GEcuipJcGuKg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.1.2': + resolution: {integrity: sha512-JY4w85pU3iAiJVMh5nuk4/Mh9GjMsupe8MrIN53rwxAZW64GKrWeJBuN6SxQg9QTU5uB1cxyhDzW8jqRn1EABw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.1.2': + resolution: {integrity: sha512-xvpA7o5KCYLB0Rwscmuylb1/zHHSUx4g4xilm4prC5jP76pEUlzBmMbgpbh7bVDbId4NcfT96gN5i6mE6UDaiw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.1.2': + resolution: {integrity: sha512-p/ts6KBLjuk49Bp21XH77poQGt02iNz7ChgHep7tudPOaLinR/De/RHdxF8w8Yj4r/bF/bqXwH6PZrB2sA+Nvw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.1.2': + resolution: {integrity: sha512-VMu/wmrZ9hJzYlRhbw7jK5PODlugyKZ5mOdX78+lS8OvuFkWNQdz1pFLrI2p3P0pjXOmUZ7B48o5VnMH9QOGtg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.1.2': + resolution: {integrity: sha512-xtUJqs8qEkuSviS0n1tsohaPuz3a1SPhZywOji4Oo+sgrJs8daEDMZ0QtqL0OS7dx8PoVpg2J/ZZycPY5I2+Zg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.1.2': + resolution: {integrity: sha512-85YiLQqjUKgSO/Zjnf9e0XIn5Ymrh1fLDWBeAkZqpuBR/3R8TpfoHXuyblqyQrftSSgWO9qpcHN8mkyKsLraoA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -2654,10 +2782,6 @@ packages: cpu: [x64] os: [win32] - '@vercel/ncc@0.38.4': - resolution: {integrity: sha512-8LwjnlP39s08C08J5NstzriPvW1SP8Zfpp1BvC2sI35kPeZnHfxVkCwu4/+Wodgnd60UtT1n8K8zw+Mp7J9JmQ==} - hasBin: true - '@vue/compiler-core@3.5.31': resolution: {integrity: sha512-k/ueL14aNIEy5Onf0OVzR8kiqF/WThgLdFhxwa4e/KF/0qe38IwIdofoSWBTvvxQOesaz6riAFAUaYjoF9fLLQ==} @@ -5511,6 +5635,11 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rolldown@1.1.2: + resolution: {integrity: sha512-x0CrQQqCXWGeI8dTvFfN/Dnv3yMKT9hv5jFjlOreKAx9wqLq9wz7VvLLHyaAXC90/CpggTu9SisSbsJJTPSjNQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -6792,16 +6921,32 @@ snapshots: tslib: 2.8.1 optional: true + '@emnapi/core@1.11.1': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true + '@emnapi/runtime@1.10.0': dependencies: tslib: 2.8.1 optional: true + '@emnapi/runtime@1.11.1': + dependencies: + tslib: 2.8.1 + optional: true + '@emnapi/wasi-threads@1.2.1': dependencies: tslib: 2.8.1 optional: true + '@emnapi/wasi-threads@1.2.2': + dependencies: + tslib: 2.8.1 + optional: true + '@es-joy/jsdoccomment@0.87.0': dependencies: '@types/estree': 1.0.9 @@ -7335,6 +7480,13 @@ snapshots: '@tybys/wasm-util': 0.10.2 optional: true + '@napi-rs/wasm-runtime@1.1.5(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.2 + optional: true + '@nodable/entities@2.2.0': {} '@nodelib/fs.scandir@2.1.5': @@ -7410,6 +7562,8 @@ snapshots: '@open-draft/until@2.1.0': {} + '@oxc-project/types@0.137.0': {} + '@package-json/types@0.0.12': {} '@pkgjs/parseargs@0.11.0': @@ -7437,6 +7591,57 @@ snapshots: transitivePeerDependencies: - supports-color + '@rolldown/binding-android-arm64@1.1.2': + optional: true + + '@rolldown/binding-darwin-arm64@1.1.2': + optional: true + + '@rolldown/binding-darwin-x64@1.1.2': + optional: true + + '@rolldown/binding-freebsd-x64@1.1.2': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.1.2': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.1.2': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.1.2': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.1.2': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.1.2': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.1.2': + optional: true + + '@rolldown/binding-linux-x64-musl@1.1.2': + optional: true + + '@rolldown/binding-openharmony-arm64@1.1.2': + optional: true + + '@rolldown/binding-wasm32-wasi@1.1.2': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.1.2': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.1.2': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + '@rtsao/scc@1.1.0': optional: true @@ -8029,8 +8234,6 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.12.2': optional: true - '@vercel/ncc@0.38.4': {} - '@vue/compiler-core@3.5.31': dependencies: '@babel/parser': 7.29.2 @@ -11457,6 +11660,27 @@ snapshots: reusify@1.1.0: {} + rolldown@1.1.2: + dependencies: + '@oxc-project/types': 0.137.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.1.2 + '@rolldown/binding-darwin-arm64': 1.1.2 + '@rolldown/binding-darwin-x64': 1.1.2 + '@rolldown/binding-freebsd-x64': 1.1.2 + '@rolldown/binding-linux-arm-gnueabihf': 1.1.2 + '@rolldown/binding-linux-arm64-gnu': 1.1.2 + '@rolldown/binding-linux-arm64-musl': 1.1.2 + '@rolldown/binding-linux-ppc64-gnu': 1.1.2 + '@rolldown/binding-linux-s390x-gnu': 1.1.2 + '@rolldown/binding-linux-x64-gnu': 1.1.2 + '@rolldown/binding-linux-x64-musl': 1.1.2 + '@rolldown/binding-openharmony-arm64': 1.1.2 + '@rolldown/binding-wasm32-wasi': 1.1.2 + '@rolldown/binding-win32-arm64-msvc': 1.1.2 + '@rolldown/binding-win32-x64-msvc': 1.1.2 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 diff --git a/test-packages/e2e-tests/test/odata-generator-cli.spec.ts b/test-packages/e2e-tests/test/odata-generator-cli.spec.ts index 9cc63564ee..fc8e1db3a7 100644 --- a/test-packages/e2e-tests/test/odata-generator-cli.spec.ts +++ b/test-packages/e2e-tests/test/odata-generator-cli.spec.ts @@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it } from '@jest/globals'; import execa from 'execa'; import * as fs from 'fs-extra'; import { generate } from '@sap-cloud-sdk/generator/internal'; -import { createOptions } from '@sap-cloud-sdk/generator/test/test-util/create-generator-options'; +import { createOptions } from '@sap-cloud-sdk/generator/INTERNAL_ONLY/test/test-util/create-generator-options'; import { oDataServiceSpecs } from '../../../test-resources/odata-service-specs'; const pathToGenerator = path.resolve( diff --git a/test-packages/integration-tests/test/mtls.spec.ts b/test-packages/integration-tests/test/mtls.spec.ts index 9512b1f9bb..d6e7b27f23 100644 --- a/test-packages/integration-tests/test/mtls.spec.ts +++ b/test-packages/integration-tests/test/mtls.spec.ts @@ -3,7 +3,7 @@ import { mockFsWithMemfs } from '@sap-cloud-sdk/test-util-internal/fs-mocker'; mockFsWithMemfs(jest); import { jest } from '@jest/globals'; -import { registerDestination } from '@sap-cloud-sdk/connectivity/src/scp-cf'; +import { registerDestination } from '@sap-cloud-sdk/connectivity'; import { executeHttpRequest } from '@sap-cloud-sdk/http-client'; import axios from 'axios'; import { vol } from 'memfs'; @@ -11,9 +11,9 @@ import nock from 'nock'; import { mockServiceBindings } from '@sap-cloud-sdk/test-util-internal/environment-mocks'; import type { DestinationWithName, - RegisterDestinationOptions -} from '@sap-cloud-sdk/connectivity/src/scp-cf'; -import type { HttpDestination } from '@sap-cloud-sdk/connectivity'; + RegisterDestinationOptions, + HttpDestination +} from '@sap-cloud-sdk/connectivity'; describe('mTLS on CloudFoundry', () => { beforeEach(() => { diff --git a/test-packages/integration-tests/test/odata-negative-case.spec.ts b/test-packages/integration-tests/test/odata-negative-case.spec.ts index 9454f7dff0..46ab925f9a 100644 --- a/test-packages/integration-tests/test/odata-negative-case.spec.ts +++ b/test-packages/integration-tests/test/odata-negative-case.spec.ts @@ -1,4 +1,4 @@ -import { resolve, join } from 'path'; +import { dirname, resolve, join } from 'path'; import { existsSync, promises } from 'fs'; import execa from 'execa'; import { @@ -8,8 +8,10 @@ import { // TODO use fs-mock describe('odata negative tests', () => { - const pathToGenerator = - require.resolve('@sap-cloud-sdk/generator/dist/cli.js'); + const pathToGenerator = join( + dirname(require.resolve('@sap-cloud-sdk/generator')), + 'cli.js' + ); const testDir = join(testOutputRootDir, 'odata-negative'); beforeAll(async () => { diff --git a/test-packages/integration-tests/test/openapi-negative-case.spec.ts b/test-packages/integration-tests/test/openapi-negative-case.spec.ts index 9f5c0d4083..9571dc672f 100644 --- a/test-packages/integration-tests/test/openapi-negative-case.spec.ts +++ b/test-packages/integration-tests/test/openapi-negative-case.spec.ts @@ -1,4 +1,4 @@ -import { resolve, join } from 'path'; +import { dirname, resolve, join } from 'path'; import { existsSync, promises } from 'fs'; import execa from 'execa'; import { @@ -8,8 +8,10 @@ import { // TODO use fs-mock here describe('openapi negative tests', () => { - const pathToGenerator = - require.resolve('@sap-cloud-sdk/openapi-generator/dist/cli.js'); + const pathToGenerator = join( + dirname(require.resolve('@sap-cloud-sdk/openapi-generator')), + 'cli.js' + ); const testDir = join(testOutputRootDir, 'openapi-negative'); beforeAll(async () => { diff --git a/test-packages/test-services-e2e/TripPin/microsoft-o-data-service-sample-trippin-in-memory-models-service/tsconfig.json b/test-packages/test-services-e2e/TripPin/microsoft-o-data-service-sample-trippin-in-memory-models-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-e2e/TripPin/microsoft-o-data-service-sample-trippin-in-memory-models-service/tsconfig.json +++ b/test-packages/test-services-e2e/TripPin/microsoft-o-data-service-sample-trippin-in-memory-models-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-e2e/v4/test-service/tsconfig.json b/test-packages/test-services-e2e/v4/test-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-e2e/v4/test-service/tsconfig.json +++ b/test-packages/test-services-e2e/v4/test-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-odata-common/generate-common-entity.ts b/test-packages/test-services-odata-common/generate-common-entity.ts index ac3b7a9073..13949c2032 100644 --- a/test-packages/test-services-odata-common/generate-common-entity.ts +++ b/test-packages/test-services-odata-common/generate-common-entity.ts @@ -2,12 +2,12 @@ import { promises } from 'fs'; import { join, resolve } from 'path'; -import { createOptions } from '@sap-cloud-sdk/generator/test/test-util/create-generator-options'; -import { generate } from '@sap-cloud-sdk/generator/src'; +import { createOptions } from '../../packages/generator/test/test-util/create-generator-options'; +import { generate } from '../../packages/generator/src'; import { createFile, defaultPrettierConfig -} from '@sap-cloud-sdk/generator-common/dist/file-writer'; +} from '@sap-cloud-sdk/generator-common/internal'; const outDir = resolve(__dirname, 'common-service'); diff --git a/test-packages/test-services-odata-v2/multiple-schemas-service/tsconfig.json b/test-packages/test-services-odata-v2/multiple-schemas-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-odata-v2/multiple-schemas-service/tsconfig.json +++ b/test-packages/test-services-odata-v2/multiple-schemas-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-odata-v2/test-service/tsconfig.json b/test-packages/test-services-odata-v2/test-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-odata-v2/test-service/tsconfig.json +++ b/test-packages/test-services-odata-v2/test-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-odata-v4/multiple-schemas-service/tsconfig.json b/test-packages/test-services-odata-v4/multiple-schemas-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-odata-v4/multiple-schemas-service/tsconfig.json +++ b/test-packages/test-services-odata-v4/multiple-schemas-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-odata-v4/test-service/tsconfig.json b/test-packages/test-services-odata-v4/test-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-odata-v4/test-service/tsconfig.json +++ b/test-packages/test-services-odata-v4/test-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-openapi/no-schema-service/tsconfig.json b/test-packages/test-services-openapi/no-schema-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-openapi/no-schema-service/tsconfig.json +++ b/test-packages/test-services-openapi/no-schema-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-openapi/swagger-yaml-service/tsconfig.json b/test-packages/test-services-openapi/swagger-yaml-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-openapi/swagger-yaml-service/tsconfig.json +++ b/test-packages/test-services-openapi/swagger-yaml-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-packages/test-services-openapi/test-service/tsconfig.json b/test-packages/test-services-openapi/test-service/tsconfig.json index a6f284a6fa..8d579d8040 100644 --- a/test-packages/test-services-openapi/test-service/tsconfig.json +++ b/test-packages/test-services-openapi/test-service/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { "target": "es2021", - "module": "commonjs", + "module": "node16", "lib": ["esnext"], "declaration": true, "declarationMap": false, "sourceMap": true, "diagnostics": true, - "moduleResolution": "node", + "moduleResolution": "node16", "esModuleInterop": true, "inlineSources": false, "strict": true diff --git a/test-resources/jest.common.config.js b/test-resources/jest.common.config.js index fd5994ad12..6f75d59227 100644 --- a/test-resources/jest.common.config.js +++ b/test-resources/jest.common.config.js @@ -1,6 +1,9 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', + testEnvironmentOptions: { + customExportConditions: ['workspace'] + }, transform: { '^.+\\.tsx?$': 'ts-jest' }, diff --git a/test-resources/test/test-util/package.json b/test-resources/test/test-util/package.json index 7ede1b8e81..9287c60c2d 100644 --- a/test-resources/test/test-util/package.json +++ b/test-resources/test/test-util/package.json @@ -21,7 +21,9 @@ "./test-cache": "./test-cache.ts", "./test-certificate": "./test-certificate.ts", "./test-data": "./test-data.ts", - "./token-accessor-mocks": "./token-accessor-mocks.ts", + "./token-accessor-mocks": { + "workspace": "./token-accessor-mocks.ts" + }, "./xsuaa-service-mocks": "./xsuaa-service-mocks.ts", "./fs-mocker": "./fs-mocker.ts" }, diff --git a/test-resources/test/test-util/token-accessor-mocks.ts b/test-resources/test/test-util/token-accessor-mocks.ts index 7fbaf340a1..4ef1cb2155 100644 --- a/test-resources/test/test-util/token-accessor-mocks.ts +++ b/test-resources/test/test-util/token-accessor-mocks.ts @@ -1,5 +1,5 @@ import nock from 'nock'; -import * as tokenAccessor from '@sap-cloud-sdk/connectivity/src/scp-cf/token-accessor'; +import * as tokenAccessor from '@sap-cloud-sdk/connectivity/INTERNAL_ONLY/scp-cf/token-accessor'; import { decodeJwt } from '@sap-cloud-sdk/connectivity'; import { isXsuaaToken } from '@sap-cloud-sdk/connectivity/internal'; import { onlyIssuerXsuaaUrl, testTenants } from './environment-mocks'; diff --git a/test-resources/test/test-util/tsconfig.json b/test-resources/test/test-util/tsconfig.json index cc4642f0cd..f2a864aba4 100644 --- a/test-resources/test/test-util/tsconfig.json +++ b/test-resources/test/test-util/tsconfig.json @@ -4,8 +4,9 @@ "rootDir": "./", "outDir": "./dist", "tsBuildInfoFile": "./dist/.tsbuildinfo", - "composite": true, - "noEmit": true + "composite": false, + "noEmit": true, + "declaration": false }, "include": ["./*.ts"], "exclude": ["dist/**/*", "node_modules/**/*"] diff --git a/tsconfig.json b/tsconfig.json index 135b0eb33c..d82d1099a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,7 @@ "allowSyntheticDefaultImports": true, "esModuleInterop": true, "inlineSources": false, - "isolatedModules": true + "isolatedModules": true, + "customConditions": ["workspace"] } }